/* ==========================================================================
   En-tête (sticky, méga-menu Destinations) et pied de page
   ========================================================================== */

/* ---------- En-tête ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255, 255, 255, .92);
	-webkit-backdrop-filter: saturate(1.4) blur(10px);
	backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid var(--amds-line);
	padding: 0;
}
body.admin-bar .site-header { top: 32px; }

.site-header__inner {
	max-width: var(--amds-wrap);
	margin: 0 auto;
	padding: 0 20px;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: 68px;
	flex-wrap: nowrap;
}

.site-header__logo { flex: none; }
.site-header__logo a { line-height: 1; }
.site-header__brand { display: flex; align-items: center; gap: 10px; color: var(--amds-ink); }
.site-header__brand:hover { color: var(--amds-ink); }
.site-header__mark { width: 22px; height: 26px; color: var(--amds-accent); flex: none; }
.site-header__name { display: flex; flex-direction: column; font: 650 1.3rem/1.05 var(--amds-serif); letter-spacing: -.01em; white-space: nowrap; }
.site-header__name small { margin-top: 3px; font: 600 10px/1 var(--amds-font); letter-spacing: .16em; text-transform: uppercase; color: var(--amds-warm); }

.site-header__nav { flex: 1 1 auto; margin: 0; min-width: 0; align-self: stretch; display: flex; }
.site-header .site-header__nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: nowrap; justify-content: flex-end; gap: 2px; }
.site-header .site-header__nav > ul { flex: 1; align-items: stretch; }
.site-header .site-header__nav > ul > li { position: relative; }

.site-header .site-header__nav a {
	display: block;
	padding: 0 14px;
	font: 600 14px/68px var(--amds-font);
	text-transform: none;
	letter-spacing: 0;
	color: var(--amds-ink);
	white-space: nowrap;
	background: none;
}
.site-header .site-header__nav > ul > li > a { position: relative; }
.site-header .site-header__nav > ul > li > a::after {
	content: ""; position: absolute; left: 14px; right: 14px; bottom: 14px; height: 2px;
	background: var(--amds-accent); transform: scaleX(0); transition: transform .2s ease;
}
.site-header .site-header__nav > ul > li:hover > a,
.site-header .site-header__nav > ul > li:has(:focus-visible) > a,
.site-header .site-header__nav > ul > li.current-menu-item > a,
.site-header .site-header__nav > ul > li.current-menu-ancestor > a { color: var(--amds-accent); background: none; }
.site-header .site-header__nav > ul > li:hover > a::after,
.site-header .site-header__nav > ul > li:has(:focus-visible) > a::after,
.site-header .site-header__nav > ul > li.current-menu-item > a::after,
.site-header .site-header__nav > ul > li.current-menu-ancestor > a::after { transform: scaleX(1); }

/* Flèche ajoutée par le thème parent : masquée (inutile avec le soulignement) */
.site-header .site-header__nav .arrow { display: none; }

/* Sous-menus simples */
.site-header .site-header__nav .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 230px;
	flex-direction: column;
	gap: 0;
	padding: 8px;
	background: var(--amds-surface);
	border: 1px solid var(--amds-line);
	border-radius: var(--amds-radius);
	box-shadow: var(--amds-shadow-hover);
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transform: translateY(6px);
	transition: opacity .15s ease .12s, transform .15s ease .12s, visibility 0s linear .27s;
	z-index: 20;
}
.site-header .site-header__nav > ul > li > .sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
.site-header .site-header__nav li:hover > .sub-menu,
.site-header .site-header__nav li:has(:focus-visible) > .sub-menu { visibility: visible; opacity: 1; transform: none; pointer-events: auto; transition-delay: 0s; }

.site-header .site-header__nav .sub-menu a { font: 500 14px/1.3 var(--amds-font); padding: 9px 12px; border-radius: var(--amds-radius-sm); color: var(--amds-ink); white-space: normal; }
.site-header .site-header__nav .sub-menu a:hover { background: var(--amds-accent-soft); color: var(--amds-accent-dark); }
.site-header .site-header__nav .sub-menu .sub-menu { top: 0; left: 100%; }

/* ---------- Méga-menu : tout sous-menu de 6 entrées ou plus (Destinations) ---------- */
.site-header .site-header__nav > ul > li:has(> .sub-menu > li:nth-child(6)) { position: static; }
.site-header .site-header__nav > ul > li:has(> .sub-menu > li:nth-child(6)) > .sub-menu {
	left: 0; right: 0;
	width: min(var(--amds-wrap), calc(100vw - 40px));
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 8px 20px;
	padding: 24px 28px 26px;
	max-height: calc(100vh - 120px);
	overflow-y: auto;
}
/* Pays = titre de colonne ; ses sous-rubriques sont visibles, sans survol */
.site-header .site-header__nav .sub-menu:not(:has(.sub-menu)) { box-sizing: border-box; }
.site-header .site-header__nav > ul > li:has(> .sub-menu > li:nth-child(6)) > .sub-menu > li > a {
	font: 700 15px/1.3 var(--amds-serif);
	color: var(--amds-ink);
	padding: 8px 0 6px;
	border-bottom: 1px solid var(--amds-line);
	border-radius: 0;
	margin-bottom: 4px;
}
.site-header .site-header__nav > ul > li:has(> .sub-menu > li:nth-child(6)) > .sub-menu > li > a:hover { background: none; color: var(--amds-accent); }
.site-header .site-header__nav > ul > li:has(> .sub-menu > li:nth-child(6)) > .sub-menu > li > .sub-menu {
	position: static; visibility: inherit; opacity: 1; transform: none;
	min-width: 0; padding: 0; background: none; border: 0; box-shadow: none; border-radius: 0;
}
.site-header .site-header__nav > ul > li:has(> .sub-menu > li:nth-child(6)) > .sub-menu > li > .sub-menu a { font-size: 13.5px; font-weight: 500; padding: 5px 0; color: var(--amds-muted); border-radius: 0; }
.site-header .site-header__nav > ul > li:has(> .sub-menu > li:nth-child(6)) > .sub-menu > li > .sub-menu a:hover { background: none; color: var(--amds-accent); }
/* 4e niveau (A à Z, circuits...) : accessible via les pages de rubrique */
.site-header .site-header__nav > ul > li:has(> .sub-menu > li:nth-child(6)) > .sub-menu .sub-menu .sub-menu { display: none; }

/* ---------- Recherche ---------- */
.site-search { position: relative; flex: none; }
.site-search summary {
	list-style: none; display: flex; align-items: center; justify-content: center;
	width: 42px; height: 42px; border-radius: 50%; cursor: pointer; color: var(--amds-ink);
}
.site-search summary::-webkit-details-marker { display: none; }
.site-search summary:hover, .site-search[open] summary { background: var(--amds-accent-soft); color: var(--amds-accent); }
.site-search form {
	position: absolute; right: 0; top: calc(100% + 12px); display: flex; gap: 8px; width: min(380px, calc(100vw - 40px));
	padding: 12px; background: var(--amds-surface); border: 1px solid var(--amds-line); border-radius: var(--amds-radius); box-shadow: var(--amds-shadow-hover);
}
.site-search input[type="search"] { flex: 1; min-width: 0; padding: 10px 14px; border: 1px solid var(--amds-line); border-radius: 999px; font: 15px var(--amds-font); background: #fff; }
.site-search button { padding: 0 18px; border: 0; border-radius: 999px; background: var(--amds-accent); color: #fff; font: 600 14px var(--amds-font); cursor: pointer; }

/* Hamburger (mobile) */
.site-header__toggle {
	display: none; align-items: center; justify-content: center; flex: none;
	width: 42px; height: 42px; margin: 0;
	background: var(--amds-accent-soft); color: var(--amds-accent-dark); border: 0; border-radius: 50%; cursor: pointer;
}
.site-header__toggle i { font-size: 18px; }

@media (max-width: 1024px) {
	body.admin-bar .site-header { top: 46px; }
	.site-header__inner { flex-wrap: wrap; gap: 12px; min-height: 60px; }
	.site-header__logo { margin-right: auto; }
	.site-header__name { font-size: 1.15rem; }
	.site-header__toggle { display: flex; }

	.site-header__nav {
		display: none; order: 3; width: 100%; flex: none; margin: 0 0 14px;
		max-height: 70vh; overflow-y: auto;
		background: var(--amds-surface); border: 1px solid var(--amds-line); border-radius: var(--amds-radius);
	}
	.site-header__nav.is-open { display: block; }
	.site-header .site-header__nav ul { flex-direction: column; gap: 0; }
	.site-header .site-header__nav a { line-height: 1.3; padding: 14px 18px; }
	.site-header .site-header__nav > ul > li > a::after { display: none; }
	.site-header .site-header__nav > ul > li { border-bottom: 1px solid var(--amds-line); }
	.site-header .site-header__nav > ul > li:last-child { border-bottom: 0; }

	.site-header .site-header__nav .sub-menu,
	.site-header .site-header__nav > ul > li:has(> .sub-menu > li:nth-child(6)) > .sub-menu {
		display: none; position: static; width: auto; margin: 0; max-height: none; overflow: visible;
		visibility: visible; opacity: 1; transform: none; box-shadow: none; border: 0; border-radius: 0;
		padding: 0 0 8px 12px; background: var(--amds-bg); grid-template-columns: 1fr;
	}
	.site-header .site-header__nav li.submenu-open > .sub-menu { display: block; }
	.site-header .site-header__nav li:hover > .sub-menu { display: none; }
	.site-header .site-header__nav li.submenu-open:hover > .sub-menu { display: block; }
	/* Sur mobile : on ne déplie que pays > rubriques, pas les niveaux plus profonds */
	.site-header .site-header__nav > ul > li:has(> .sub-menu > li:nth-child(6)) > .sub-menu > li > .sub-menu { display: none; }
	.site-header .site-header__nav > ul > li:has(> .sub-menu > li:nth-child(6)) > .sub-menu > li > a { font: 600 15px/1.3 var(--amds-font); border-bottom: 0; padding: 12px 18px 12px 0; margin: 0; }
}

/* ==========================================================================
   Pied de page
   ========================================================================== */
.site-footer {
	margin-top: 80px;
	background: var(--amds-deep);
	color: rgba(255, 255, 255, .72);
	font-size: 15px;
}
.site-footer a { color: rgba(255, 255, 255, .85); }
.site-footer a:hover { color: #fff; text-decoration: underline; }

.site-footer__top {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 40px;
	padding-top: 56px;
	padding-bottom: 40px;
}
.site-footer__tagline { margin: 16px 0 12px; max-width: 34ch; }
.site-footer__heading { margin: 0 0 14px; font: 700 12px var(--amds-font); letter-spacing: .12em; text-transform: uppercase; color: #fff; }

.site-footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }

.site-footer .social-icons { display: flex; flex-wrap: wrap; gap: 8px; }
.site-footer .social-icons a {
	display: inline-flex; align-items: center; padding: 7px 14px; border-radius: 999px;
	background: rgba(255, 255, 255, .1); color: #fff; font-size: 14px; font-weight: 500; transition: background .15s;
}
.site-footer .social-icons a:hover { background: var(--amds-accent); text-decoration: none; }

.site-footer__partners { padding-top: 28px; padding-bottom: 32px; border-top: 1px solid rgba(255, 255, 255, .12); }
.site-footer__partner-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }

.site-footer__copyright { padding: 18px 0; background: rgba(0, 0, 0, .22); font-size: 13px; color: rgba(255, 255, 255, .6); }
.site-footer__copyright p { margin: 0; }

@media (max-width: 760px) {
	.site-footer { margin-top: 56px; }
	.site-footer__top { grid-template-columns: 1fr; gap: 32px; padding-top: 40px; }
}

.site-footer__brand, .site-footer__brand:hover { color: #fff; text-decoration: none; }
.site-footer__brand .site-header__mark { color: #5fd0c8; }
.site-footer__brand .site-header__name small { color: rgba(255,255,255,.6); }

/* Fil d'Ariane : l'icône maison (Font Awesome) est dessinée en CSS, plus de police à charger */
.breadcrumbs .home i.fa-home { display: inline-block; width: 15px; height: 15px; vertical-align: -2px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 2 12h3v9h5v-6h4v6h5v-9h3z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 2 12h3v9h5v-6h4v6h5v-9h3z'/%3E%3C/svg%3E") center / contain no-repeat; }
.breadcrumbs .home i.fa-home::before { content: none; }
