/* ==========================================================================
   Header — Le Royaume de Brindille
   ========================================================================== */

body {
	font-family: var(--font-body);
	color: var(--foreground);
	background-color: var(--background);
}

h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: 400;
	letter-spacing: -0.01em;
}

.script {
	font-family: var(--font-script);
	font-weight: 500;
}

.container-wide {
	width: 100%;
	max-width: 82rem;
	margin-inline: auto;
	padding-inline: 1.5rem;
}

a {
	text-decoration: none;
	color: inherit;
}

ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	border-radius: 999px;
	padding: 0.85rem 1.75rem;
	font-size: 0.9rem;
	font-weight: 600;
	transition: background-color var(--transition-normal);
}

.btn--accent {
	background: var(--forest);
	color: var(--cream);
}

.btn--accent:hover {
	background: color-mix(in oklch, var(--forest) 90%, black);
}

.btn--primary {
	background: var(--primary);
	color: var(--primary-foreground);
}

.btn--primary:hover {
	background: var(--forest);
}

/* ---- Topbar ---- */
.main-header__topbar-container {
	display: none;
}

.topbar__phone {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: color-mix(in oklch, var(--cream) 90%, transparent);
}

.topbar__phone svg {
	color: var(--sunny);
}

.topbar__nav {
	display: flex;
	align-items: center;
	gap: 1.5rem;
}

.topbar__nav a {
	color: color-mix(in oklch, var(--cream) 85%, transparent);
}

.topbar__nav a:hover {
	color: var(--cream);
}

/* ---- Sticky header group ----
   Sticky vit sur .main-header__container (enfant direct de <body>, donc de la
   hauteur de toute la page) et non sur .main-header__header-container : un
   élément sticky ne peut rester collé que tant que SON PROPRE parent n'a pas
   fini de défiler. Ici .main-header__inner ne fait que la hauteur du bloc
   header (topbar + logo + mega-menu), donc le sticky s'y décrochait après
   quelques dizaines de px. Le top négatif (= hauteur du topbar desktop) fait
   glisser le topbar hors du viewport dès qu'on scrolle, sans JS. */
.main-header__container {
	position: sticky;
	top: 0;
	z-index: 50;
}

.main-header__header-container {
	background: color-mix(in oklch, var(--background) 95%, transparent);
	backdrop-filter: blur(6px);
}

.main-header__header-container-inner {
	max-width: 82rem;
	margin-inline: auto;
	padding-inline: 1.5rem;
	/* Mobile : burger à gauche, logo centré, actions à droite (comme la maquette) */
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: center;
	gap: 1rem;
	height: 72px;
}

.main-header__header-container-inner .mobile-menu-toggle {
	justify-self: start;
	display: flex;
	padding: 0;
}

.main-header__header-container-inner .header-actions {
	justify-self: end;
}

.main-logo .main-logo__img {
	height: 3.25rem;
	width: auto;
	object-fit: contain;
}

.header-search {
	display: none;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.header-action__link {
	padding: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.25rem;
	font-size: 11px;
	font-weight: 500;
	background: none;
	border: none;
	cursor: pointer;
	color: inherit;
}

.header-action__link:hover,
.header-action__link:focus {
	background: none;
	color: var(--primary);
}

/* reset.css pose max-width:100% sur les svg : dans un bouton dont la largeur dépend
   du contenu (libellé masqué en mobile), ça écrase l'icône à 0px de large. */
.header-action__link svg,
.mobile-menu-toggle svg {
	max-width: none;
	flex-shrink: 0;
}

.header-action__link > span:not(.header-action__icon-wrap) {
	display: none;
}

.header-action__search-mobile {
	display: flex;
}

.header-action__account {
	display: none;
}

.header-action__icon-wrap {
	position: relative;
	display: inline-flex;
}

.header-action__count {
	position: absolute;
	top: -8px;
	right: -8px;
	min-width: 16px;
	height: 16px;
	border-radius: 999px;
	background: var(--sunny);
	color: var(--forest);
	font-size: 10px;
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: center;
	padding-inline: 3px;
}

/* ---- Mobile menu toggle ---- */
.mobile-menu-toggle {
	background: none;
	border: none;
	cursor: pointer;
	color: inherit;
}

/* ---- Mega menu (desktop) ---- */
.mega-menu-row {
	display: none;
}

/* ---- Mobile drawer ---- */
.mobile-drawer {
	position: fixed;
	inset: 0;
	z-index: 60;
}

.mobile-drawer__panel {
	position: absolute;
	inset: 0;
	overflow-y: auto;
	background: var(--background);
}

.mobile-drawer__level {
	display: flex;
	flex-direction: column;
	padding: 45px 1.25rem 1.25rem;
	min-height: 100%;
}

.mobile-drawer__level[hidden] {
	display: none;
}

.mobile-drawer__top {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 1rem;
	margin-bottom: 1rem;
}

.mobile-drawer__back {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	font-size: 14px;
	font-weight: 500;
	background: none;
	border: none;
	cursor: pointer;
	color: inherit;
	margin-right: auto;
}

.mobile-drawer__close {
	background: none;
	border: none;
	cursor: pointer;
	color: inherit;
}

.mobile-drawer__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	border-bottom: 1px solid color-mix(in oklch, var(--border) 60%, transparent);
	padding: 0.75rem 0;
	font-family: var(--font-display);
	font-size: 1.1rem;
	background: none;
	border-left: none;
	border-right: none;
	border-top: none;
	text-align: left;
	cursor: pointer;
	color: inherit;
}

.mobile-drawer__title {
	font-family: var(--font-display);
	font-size: 1.5rem;
	color: var(--forest);
	margin-bottom: 1rem;
}

.mobile-drawer__eyebrow {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--sunny);
	margin-bottom: 0.25rem;
}

.mobile-drawer__view-all {
	display: inline-flex;
	margin-bottom: 1rem;
	font-weight: 600;
	color: var(--primary);
}

.mobile-drawer__links li a {
	display: block;
	padding: 0.65rem 0;
	border-bottom: 1px solid color-mix(in oklch, var(--border) 60%, transparent);
	font-size: 14px;
	color: var(--foreground);
}

.mobile-drawer__secondary {
	display: flex;
	flex-direction: column;
	margin-top: 1rem;
}

.mobile-drawer__secondary a {
	padding-block: 0.35rem;
	font-size: 14px;
	color: color-mix(in oklch, var(--foreground) 70%, transparent);
}

.mobile-drawer__phone {
	margin-top: auto;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	background: var(--forest);
	color: var(--cream);
	padding: 1rem;
	margin-inline: -1.25rem;
	margin-bottom: -1.25rem;
	font-weight: 600;
}

/* ---- Animation popup ---- */
.animation-popup {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.animation-popup[hidden] {
	display: none;
}

.animation-popup__overlay {
	position: absolute;
	inset: 0;
	background: color-mix(in oklch, var(--forest) 60%, transparent);
	backdrop-filter: blur(2px);
}

.animation-popup__panel {
	position: relative;
	width: 100%;
	max-width: 32rem;
	overflow: hidden;
	border-radius: 1.5rem;
	background: var(--background);
	box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
}

.animation-popup__close {
	position: absolute;
	right: 1rem;
	top: 1rem;
	z-index: 10;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 999px;
	background: color-mix(in oklch, var(--background) 90%, transparent);
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--forest);
	line-height: 0;
	padding: 0;
}

.animation-popup__close svg {
	display: block;
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	color: var(--forest);
}

.animation-popup__head {
	background: var(--forest);
	padding: 2.25rem 2rem 2.5rem;
	text-align: center;
	color: var(--cream);
}

.animation-popup__head .script {
	color: #fff;
	font-size: 1.5rem;
}

.animation-popup__head h2 {
	font-family: var(--font-display);
	font-size: calc(25px + (30 - 25) * ((100vw - 320px) / (1920 - 320)));
	margin-top: 0.5rem;
	text-transform: uppercase;
}

.animation-popup__date {
	margin-top: 1rem;
	display: inline-block;
	background: color-mix(in oklab, var(--secondary) 25%, transparent);
	color: #fff;
	border-radius: 999px;
	padding: 0.4rem 1rem;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.animation-popup__body {
	padding: 1.75rem 2rem;
	text-align: center;
}

.animation-popup__slot {
	margin-bottom: 1rem;
}

.animation-popup__slot-time {
	font-weight: 600;
	color: var(--forest);
}

.animation-popup__slot-desc {
	font-size: 13px;
	color: var(--muted-foreground);
}

.animation-popup__cta {
	margin-top: 1.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	background: var(--forest);
	color: var(--cream);
	border-radius: 999px;
	padding: 0.85rem 1.25rem;
	font-weight: 600;
	text-transform: uppercase;
	font-size: 13px;
}

.animation-popup__link {
	display: inline-block;
	margin-top: 0.75rem;
	font-size: 14px;
	color: var(--forest);
	text-decoration: underline;
}
