/* ==========================================================================
   1. VARIABLES & CHARTE GRAPHIQUE
   ========================================================================== */
:root {
    --color-sable: #FAF8F5;       /* Fond principal */
    --color-argile: #e8dcd8;      /* Fonds secondaires / audio */
    --color-sauge: #E2E7E1;       /* Bordures / Badges */
    --color-ardoise: #2C3E35;     /* Textes / Lignes */
    --color-terracotta: #D4A373;  /* Accents / Marqueurs */
    --color-terracotta-hover: #C17C43;
    --color-bleu-encre: #1D3540;
    --color-secondary: #54595F;
    --color-secondary-alt: #858585;

    --font-main: 'Lora', Georgia, serif;
    --font-secondary: "Barlow Semi Condensed", sans-serif;
    --font-headings: "Playfair Display SC", serif;

    --header-height: 70px; /* Ajustez cette valeur à la hauteur réelle de votre header */
    --container-max-width: 1200px;
    --transition-smooth: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
    border-radius: 0 !important; /* Esthétique brute sans arrondis */
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    /* background-color: var(--color-sable); */
    color: var(--color-ardoise);
    font-family: var(--font-main) !important;
    font-size: clamp(0.95rem, 1vw + 0.5rem, 1.05rem);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   1.1 TYPOGRAPHIE GLOBALE & ÉCHELLE RESPONSIVE
   ========================================================================== */

/* Titres principaux */
h1, .has-h1-font-size {
	font-family: var(--font-headings) !important;
	font-size: 2.25rem; /* Fallback navigateurs anciens */
	font-size: clamp(2rem, 3.5vw + 1rem, 3.25rem);
	line-height: 1.15;
	font-weight: 400;
	letter-spacing: -0.01em;
	margin-top: 0;
	margin-bottom: 1.25rem;
}

h2, .has-h2-font-size {
	font-family: var(--font-headings) !important;
	font-size: 1.75rem;
	font-size: clamp(1.5rem, 2.5vw + 0.8rem, 2.35rem);
	line-height: 1.2;
	font-weight: 400;
	letter-spacing: -0.005em;
	margin-top: 2rem;
	margin-bottom: 1rem;
}

h3, .has-h3-font-size {
	font-family: var(--font-headings) !important;
	font-size: 1.35rem;
	font-size: clamp(1.25rem, 1.8vw + 0.6rem, 1.75rem);
	line-height: 1.25;
	font-weight: 400;
	margin-top: 1.75rem;
	margin-bottom: 0.75rem;
}

/* Titres secondaires et cartes (Barlow Semi Condensed) */
h4, .has-h4-font-size {
	font-family: var(--font-secondary) !important;
	font-size: 1.15rem;
	font-size: clamp(1.1rem, 1.2vw + 0.5rem, 1.35rem);
	line-height: 1.3;
	font-weight: 600;
	letter-spacing: 0.02em;
	margin-top: 1.5rem;
	margin-bottom: 0.5rem;
}

h5, .has-h5-font-size {
	font-family: var(--font-secondary) !important;
	font-size: 1rem;
	font-size: clamp(0.95rem, 0.8vw + 0.5rem, 1.1rem);
	line-height: 1.35;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	margin-top: 1.25rem;
	margin-bottom: 0.5rem;
}

h6, .has-h6-font-size {
	font-family: var(--font-secondary) !important;
	font-size: 0.85rem;
	font-size: clamp(0.8rem, 0.5vw + 0.5rem, 0.95rem);
	line-height: 1.4;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin-top: 1rem;
	margin-bottom: 0.5rem;
}

/* Paragraphes et corps de texte (Lora) */
p {
	font-family: var(--font-main) !important;
	margin-top: 0;
	margin-bottom: 1.5rem;
}

p:last-child {
	margin-bottom: 0;
}

/* Citations et extraits littéraires */
blockquote, .cbtw-quote {
	font-family: var(--font-main) !important;
	font-style: italic;
	font-size: 1.15rem;
	font-size: clamp(1.05rem, 1vw + 0.6rem, 1.3rem);
	line-height: 1.6;
	border-left: 2px solid var(--color-terracotta);
	margin: 2rem 0;
	padding-left: 1.25rem;
	color: var(--color-ardoise);
}

/* Mentions, légendes et métadonnées */
small, figcaption, .text-small {
	font-family: var(--font-secondary) !important;
	font-size: 0.85rem;
	font-size: clamp(0.8rem, 0.4vw + 0.5rem, 0.9rem);
	line-height: 1.4;
	color: var(--color-secondary);
}

/* Titre sémantique masqué visuellement pour conserver le minimalisme */
.screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ==========================================================================
   2. CONTENEUR GLOBAL & BREADCRUMB
   ========================================================================== */
.site-container {
    width: 100%;
    max-width: var(--container-max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(1rem, 3vw, 2rem);
    padding-right: clamp(1rem, 3vw, 2rem);
}

.adhoc-breadcrumb {
    margin: 0.5rem 0 1rem;
    font-size: clamp(0.75rem, 1vw, 0.85rem);
    color: var(--color-secondary);
    padding: 1rem;
    border-bottom: 1px solid var(--color-argile);
}

.adhoc-breadcrumb .breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    /* align-items: center; */
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

.adhoc-breadcrumb .breadcrumb-item a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.adhoc-breadcrumb .breadcrumb-item a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.adhoc-breadcrumb .breadcrumb-separator {
    color: #999999;
    user-select: none;
}

.adhoc-breadcrumb .breadcrumb-item.active {
    color: var(--color-ardoise);
    font-weight: 500;
}

/* Accessibilité */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* ==========================================================================
   3. HEADER & NAVIGATION
   ========================================================================== */
.site-header {
    position: relative;
    padding: clamp(1rem, 2vw, 1.5rem) clamp(1rem, 3vw, 2rem);
    border-bottom: 1px solid var(--color-sauge);
    background-color: var(--color-sable);
    z-index: 100;
}

.site-header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--container-max-width);
    margin: 0 auto;
    gap: 1rem;
}

.site-header__logo {
    font-size: clamp(0.95rem, 1.5vw, 1.15rem);
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--color-ardoise);
    text-decoration: none;
    white-space: nowrap !important;
}

.site-header__nav {
    font-family: var(--font-secondary);
}

.site-header__menu {
    display: flex;
    gap: clamp(1rem, 2vw, 2rem);
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-header__menu a {
    text-decoration: none;
    color: var(--color-ardoise);
    font-size: clamp(0.8rem, 1vw, 0.9rem);
    letter-spacing: 0.1em;
    transition: opacity 0.2s ease;
}

.site-header__menu a:hover {
    opacity: 0.6;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    margin: 5px 0;
    background-color: var(--color-ardoise);
    transition: var(--transition-smooth);
}

.menu-toggle.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.menu-toggle.is-active span:nth-child(2) {
    opacity: 0;
}
.menu-toggle.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   HERO SINGLE - RESPONSIVE FULLSCREEN (PAYSAGE ELEGANT)
   ========================================================================== */

/* Structure du conteneur Hero */
.single-hero {
    /* Hauteur maximale calculée : 100% de la vue moins la hauteur du header */
    height: calc(100dvh - var(--header-height, 70px));
    width: 100%;

    /* Marge/Padding élégant et subtil pour détacher du header et des bords */
    padding: 1.25rem 1.5rem;
    box-sizing: border-box;

    display: flex;
    flex-direction: column;
}

.single-hero__container {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 8px; /* Optionnel : très léger arrondi pour adoucir le cadre */
    overflow: hidden;
    background-color: var(--color-sable, #f4f1ea);
}

/* Cadrage et gestion de l'image paysage */
.single-hero__media {
    width: 100%;
    height: 100%;
}

.single-hero__image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Remplit tout le cadre sans déformer l'image */
    object-position: center center; /* Cadrage centré */
    display: block;
}

/* Optionnel : Habillage texte sur l'image */
.single-hero__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem 2rem 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0) 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.single-hero__badge {
    font-family: var(--font-secondary, sans-serif) !important;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    padding: 0.25rem 0.75rem;
    border-radius: 3px;
}

.single-hero__title {
    font-family: var(--font-headings, serif) !important;
    font-size: clamp(1.5rem, 4vw, 2.75rem);
    line-height: 1.2;
    margin: 0;
    font-weight: 400;
}

/* ==========================================================================
   4. CARTE SVG & TOOLTIPS
   ========================================================================== */
#regions-naturelles .cls-1 {
    fill: #fff;
    stroke: var(--color-secondary-alt);
    stroke-width: .75;
    vector-effect: non-scaling-stroke;
}

#regions-naturelles g[id]:hover .cls-1 {
    fill: var(--color-sable);
}

.map-section {
    padding: clamp(1.5rem, 4vw, 3rem) 1rem;
    display: flex;
    justify-content: center;
}

.map-container {
    position: relative;
    width: 100%;
    max-width: 650px;
    touch-action: manipulation;
}

.map-svg {
    width: 100%;
    height: auto;
    max-height: 75vh;
    display: block;
    overflow: visible;
}

.map-svg__backdrop path {
    fill: var(--color-argile);
    stroke: none;
    opacity: 0;
    animation: backdropFadeIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.3s;
    transform-origin: center;
}

.map-svg__outline path {
    fill: none !important;
    stroke: var(--color-ardoise);
    stroke-width: 2px;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

/* MARQUEURS & TOOLTIP SVG DYNAMIQUE */
.map-marker {
    cursor: pointer;
    outline: none;
}

.map-marker__point {
    fill: var(--color-ardoise);
    opacity: .85;
    stroke: var(--color-sable);
    stroke-width: 2px;
    transform-box: fill-box;
    transform-origin: center;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), fill 0.2s ease;
    vector-effect: non-scaling-stroke;
}

.map-marker:hover .map-marker__point,
.map-marker:focus .map-marker__point,
.map-marker.is-active .map-marker__point {
    transform: scale(1.4);
    opacity: 1;
    stroke: #ffffff;
}

.map-marker__tooltip {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.map-marker__tooltip-bg {
    fill: var(--color-sauge);
    stroke: var(--color-ardoise);
    stroke-width: 1px;
    vector-effect: non-scaling-stroke;
}

.map-marker__tooltip-text {
    fill: var(--color-ardoise);
    font-size: 11px;
    font-family: var(--font-secondary) !important;
    letter-spacing: 0.05em;
    text-anchor: middle;
    dominant-baseline: middle;
    white-space: nowrap;
}

.map-marker:hover .map-marker__tooltip,
.map-marker:focus .map-marker__tooltip,
.map-marker.is-active .map-marker__tooltip {
    opacity: 1;
}

/* BANNIÈRE HINT */
.territory-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 auto;
    padding: 0.6rem 1.2rem;
    max-width: fit-content;
    background-color: rgba(232, 220, 216, 0.4);
    border: 1px dashed var(--color-ardoise);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--color-ardoise);
    transition: var(--transition-smooth);
    animation: hintPulse 2.5s infinite ease-in-out;
}

.territory-hint.is-hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    max-height: 0;
    margin: 0 auto;
    padding: 0;
    overflow: hidden;
}

/* Style épuré pour le pavé sous la carte */
.map-legend-seo__text {
    font-size: 0.85rem;
    color: var(--color-ardoise);
    text-align: center;
}

.map-legend-seo__text a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.map-legend-seo__text a:hover {
    color: var(--color-bleu-encre);
}

/* ==========================================================================
   5. CONTENUS & ÉDITORIAL
   ========================================================================== */
.territory-details {
    transition: opacity 0.3s ease-in-out;
    margin-top: clamp(2rem, 4vw, 3.5rem);
}

.territory-details__container,
.front-page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 1.5rem);
}

.territory-details__title {
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.territory-details__story {
    font-family: var(--font-main) !important;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.75;
    margin-bottom: 2.5rem;
}

.territory-details__actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1.5rem 0 2rem;
}

.btn-media, .btn-archive {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    padding: 0.65rem 1.25rem !important;
    border: 1px solid var(--color-ardoise) !important;
    font-size: 0.85rem !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: var(--transition-smooth) !important;
}

.btn-media {
    background-color: var(--color-ardoise) !important;
    color: #ffffff !important;
    border: none !important;
}

.btn-media:hover {
    background-color: var(--color-terracotta) !important;
    transform: translateY(-2px) !important;
}

.btn-archive {
    color: var(--color-ardoise) !important;
}

.btn-archive:hover {
    background-color: var(--color-ardoise) !important;
    color: var(--color-sable) !important;
}

.btn-archive--main {
    background-color: var(--color-argile) !important;
}

/* GRILLE ET CARTES */
.territory-details__grid,
.territory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: clamp(1.25rem, 2.5vw, 2rem);
    margin-bottom: 1em;
}

.card-item, .territory-card {
    background: #ffffff;
    border: 1px solid var(--color-sauge);
    transition: var(--transition-smooth);
}

.card-item:hover, .territory-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.04);
}

.card-item__link, .territory-card__link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-item__media, .territory-card__image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f4f4f4;
}

.card-item__img, .territory-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card-item:hover .card-item__img {
    transform: scale(1.05);
}

.card-item__content, .territory-card__body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-item__badge, .territory-card__badge {
    align-self: flex-start;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.2rem 0.5rem;
    background-color: var(--color-sauge);
    color: var(--color-ardoise);
    margin-bottom: 0.75rem;
}

.card-item__title, .territory-card__title {
    font-size: 1.1rem;
    margin: 0 0 0.5rem;
    line-height: 1.35;
}

.card-item__excerpt, .territory-card__excerpt {
    font-size: 0.85rem;
    color: var(--color-secondary);
    line-height: 1.5;
}

/* PLAYER AUDIO INTEGRÉ */
.territory-player {
    background: #f8f6f5;
    border-left: 3px solid var(--color-terracotta);
    padding: 1rem;
    margin-bottom: 2rem;
}

.territory-player.is-hidden {
    display: none;
}

/* ==========================================================================
   6. ARCHIVES & FILTRES
   ========================================================================== */
.territory-archive__container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 1.5rem);
}

.territory-archive__header {
    /* padding: clamp(2rem, 4vw, 3.5rem) 0 2rem; */
    border-bottom: 1px solid var(--color-sauge);
}

.territory-archive__back {
    display: inline-block;
    color: var(--color-ardoise);
    text-decoration: none;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
}

.territory-archive__badge {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-terracotta);
    margin-bottom: 0.5rem;
}

.territory-archive__title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 600;
    margin: 0 0 1rem;
}

.territory-archive__description {
    font-family: var(--font-main) !important;
    font-size: 1.05rem;
    max-width: 700px;
    line-height: 1.6;
}

.territory-archive__filters {
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-sauge);
    background-color: var(--color-sable);
    position: sticky;
    top: 0;
    z-index: 10;
}

.filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-btn {
    display: block;
    padding: 0.4rem 0.85rem;
    border: 1px solid var(--color-ardoise);
    color: var(--color-ardoise);
    text-decoration: none;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    transition: var(--transition-smooth);
}

.filter-btn:hover,
.filter-btn.is-active {
    background-color: var(--color-ardoise);
    color: var(--color-sable);
}

.territory-archive__content {
    padding: clamp(2rem, 4vw, 3.5rem) 0;
}

.territory-archive__pagination {
    margin-top: 3rem;
    text-align: center;
}

.territory-archive__pagination .page-numbers {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-sauge);
    color: var(--color-ardoise);
    text-decoration: none;
    margin: 0 2px;
}

.territory-archive__pagination .page-numbers.current {
    background-color: var(--color-ardoise);
    color: var(--color-sable);
}

/* ==========================================================================
   6.1 MENU DES ARCHIVES CPT — STYLE ÉDITORIAL & RESPONSIVE
   ========================================================================== */

.cpt-archive-menu {
    margin: 1.5rem 0 2.5rem;
}

/* Liste principale (compatible wp_nav_menu et widget Nav Menu Elementor) */
.cpt-archive-menu ul,
.cpt-archive-menu .elementor-nav-menu {
    display: flex !important;
    flex-wrap: wrap;
    gap: 0.5rem !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Suppression des puces et ajustement des éléments */
.cpt-archive-menu li {
    margin: 0 !important;
    padding: 0 !important;
}

/* Style des boutons de liens */
.cpt-archive-menu ul a,
.cpt-archive-menu .elementor-nav-menu a {
    display: inline-block;
    padding: 0.55rem 1.1rem !important;
    border: 1px solid var(--color-ardoise) !important;
    color: var(--color-ardoise) !important;
    font-family: var(--font-secondary) !important;
    font-size: 0.85rem !important;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none !important;
    background-color: transparent !important;
    transition: var(--transition-smooth) !important;
}

/* Survol et état actif (page d'archive en cours de consultation) */
.cpt-archive-menu ul a:hover,
.cpt-archive-menu ul .current-menu-item a,
.cpt-archive-menu ul .current-post-ancestor a,
.cpt-archive-menu .elementor-nav-menu .elementor-item-active {
    background-color: var(--color-ardoise) !important;
    color: var(--color-sable) !important;
}


/* ==========================================================================
   7. FOOTER
   ========================================================================== */
.site-footer {
	padding: 2rem 0;
	border-top: 1px solid var(--color-sauge);
	margin-top: 4rem;
}

.site-footer__container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	max-width: var(--container-max-width);
	margin: 0 auto;
	padding: 0 clamp(1rem, 3vw, 2rem);
	font-size: 0.85rem;
	flex-wrap: wrap;
	gap: 1.5rem;
}

.site-footer__copyright {
    margin: 0;
}

.site-footer__links {
	display: flex;
	align-items: center;
	gap: 1.25rem;
}

.site-footer__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--color-ardoise);
	font-size: 1.25rem; /* ~20px pour calibrer les icônes Font Awesome */
	line-height: 1;
	text-decoration: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.site-footer__link:hover,
.site-footer__link:focus {
	opacity: 0.7;
	transform: translateY(-2px);
}

/* ==========================================================================
   7.1 MENU DES LIENS LÉGAUX (FOOTER CENTER)
   ========================================================================== */
.site-footer__legal {
    display: flex;
    justify-content: center;
}

.site-footer__legal-menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer__legal-menu li {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

/* Puce séparatrice discrète entre les liens sur écran large */
.site-footer__legal-menu li:not(:last-child)::after {
    content: "•";
    margin-left: 0.75rem;
    color: var(--color-sauge);
    font-size: 0.7rem;
}

.site-footer__legal-menu a {
    color: var(--color-ardoise);
    font-family: var(--font-secondary) !important;
    font-size: 0.8rem;
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: opacity 0.2s ease;
}

.site-footer__legal-menu a:hover {
    opacity: 0.6;
    text-decoration: underline;
}


/* ==========================================================================
   8. ANIMATIONS
   ========================================================================== */
@keyframes backdropFadeIn {
    0% {
        opacity: 0;
        transform: translate(6px, 6px);
    }
    100% {
        opacity: 1;
        transform: translate(0, 0);
    }
}

@keyframes hintPulse {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* ==========================================================================
   9. SCROLL TRACKER
   ========================================================================== */
.cbtw-scroll-tracker {
	position: fixed;
	right: 1.5rem;
	top: 50%;
	transform: translateY(-50%);
	z-index: 99;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cbtw-scroll-tracker.is-visible {
	opacity: 1;
	visibility: visible;
}

.cbtw-scroll-tracker__path {
	transition: stroke-dashoffset 0.1s linear;
    stroke: var(--color-ardoise);
    opacity: 0.85;
}

/* Classe d'accessibilité WordPress pour la lecture d'écran */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* ==========================================================================
   9. FORMULAIRE DE CONTACT
   ========================================================================== */
/* Habillage WPForms */
.wpforms-container {
	width: 100% !important;
	margin: 0 auto !important;
}

.wpforms-field-label {
	font-weight: 500 !important;
	color: var(--color-ardoise, #2b2d42) !important;
	margin-bottom: 0.5rem !important;
	display: block !important;
}

.wpforms-field input[type="text"],
.wpforms-field input[type="email"],
.wpforms-field textarea {
	width: 100% !important;
	padding: 0.75rem 1rem !important;
	border: 1px solid var(--color-sauge, #d8e2dc) !important;
	border-radius: 0px !important;
	font-family: inherit !important;
	color: currentColor !important;
}

.wpforms-field input:focus,
.wpforms-field textarea:focus {
	outline: none !important;
	border-color: var(--color-ardoise, #2b2d42) !important;
}

.wpforms-submit-container button[type="submit"] {
	background-color: var(--color-ardoise, #2b2d42) !important;
	color: #ffffff !important;
	border: none !important;
	padding: 0.75rem 2rem !important;
	border-radius: 0px !important;
	cursor: pointer !important;
}


/* ==========================================================================
   10. BANIERE CONFIDENTIALITE
   ========================================================================== */
/* Alignement de la bannière Complianz avec la charte */
.cmplz-cookiebanner {
    border-radius: 0 !important;
    border: 1px solid var(--color-ardoise) !important;
    box-shadow: none !important;
    font-family: var(--font-secondary) !important;
}

.cmplz-cookiebanner .cmplz-buttons .cmplz-btn {
    border-radius: 0 !important;
    font-family: var(--font-secondary) !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   11. SCROLL-TO-TOP BUTTON
   ========================================================================== */
.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 99;
    width: 42px;
    height: 42px;
    background-color: var(--color-ardoise);
    color: var(--color-sable);
    border: 1px solid var(--color-ardoise);
    border-radius: 0; /* Angles droits selon votre charte graphique */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;

    /* Transition d'apparition subtile */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease, border-color 0.2s ease;
}

/* État d'apparition au scroll */
.scroll-top-btn.is-visible {
    opacity: 0.85;
    visibility: visible;
    transform: translateY(0);
}

/* Survol / Focus */
.scroll-top-btn:hover,
.scroll-top-btn:focus {
    opacity: 1;
}

/* ==========================================================================
   12. BOUTON AUDIO ON / OFF (HEADER)
   ========================================================================== */
.header-audio-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.85rem;
    background-color: transparent;
    color: var(--color-ardoise);
    border: 1px solid var(--color-ardoise);
    border-radius: 0; /* Angles droits */
    font-family: var(--font-secondary) !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition-smooth, all 0.2s ease);
}

.header-audio-btn i {
    font-size: 0.85rem;
    width: 14px;
    text-align: center;
}

/* Effet au survol */
.header-audio-btn:hover {
    background-color: var(--color-ardoise);
    color: var(--color-sable);
}

/* État désactivé / MUTE */
.header-audio-btn.is-muted {
    opacity: 0.75;
    border-color: rgba(44, 62, 53, 0.5); /* Variante adoucie de l'ardoise */
}

.header-audio-btn.is-muted:hover {
    opacity: 1;
    background-color: var(--color-bleu-encre);
    border-color: var(--color-bleu-encre);
    color: var(--color-sable);
}

/* ==========================================================================
   13. VUES NATIVES (ARCHIVES, SEARCH, 404)
   ========================================================================== */

.archive-container,
.search-container,
.error-404-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

/* Page 404 minimaliste */
.error-404 {
    text-align: center;
    padding: 4rem 1rem;
}

.error-404__code {
    display: block;
    font-family: var(--font-secondary) !important;
    font-size: 5rem;
    font-weight: 700;
    color: var(--color-bleu-encre);
    line-height: 1;
    margin-bottom: 1rem;
}

.error-404 .btn-retour-carte {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--color-ardoise);
    color: var(--color-ardoise);
    text-decoration: none;
    font-family: var(--font-secondary) !important;
    text-transform: uppercase;
    font-size: 0.85rem;
    transition: var(--transition-smooth, all 0.2s ease);
}

.error-404 .btn-retour-carte:hover {
    background-color: var(--color-ardoise);
    color: var(--color-sable);
}

/* ==========================================================================
   99. BREAKPOINTS RESPONSIVE UNIFIÉS
   ========================================================================== */
/* À partir du format tablette (1024px et inférieur), passage footer en empilage centré */
@media screen and (max-width: 1024px) {
    .site-footer__container {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 1.25rem;
    }

    .site-footer__copyright,
    .site-footer__legal,
    .site-footer__links {
        width: 100%;
        justify-content: center;
    }
}

/* Adaptations spécifiques Mobile */
@media screen and (max-width: 767px) {
    .site-header__logo {
        margin-right: auto;
    }

    .single-hero {
        /* Padding réduit sur mobile pour maximiser la zone d'affichage */
        padding: 0.75rem 0.75rem;
        height: calc(100dvh - var(--header-height, 60px));
    }

    .single-hero__overlay {
        padding: 1.5rem 1rem 1rem;
    }

    .menu-toggle {
        display: block;
    }

    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-sable);
        border-bottom: 1px solid var(--color-sauge);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
        padding: 1.5rem 0;
        z-index: 1000;
    }

    .main-navigation.is-open {
        display: block;
    }

    .site-header__menu {
        flex-direction: column;
        align-items: center;
        gap: 1.25rem;
    }

    /* Cache le texte du bouton audio sur mobile */
    .header-audio-btn__text {
        display: none !important;
    }

    /* Définition du conteneur Hero (Header + Section Carte) */
    .hero-wrapper {
        min-height: calc(100dvh - var(--header-height));
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 1rem 1rem 1rem;
        box-sizing: border-box;
    }

    /* La section carte s'agrandit pour occuper tout l'espace disponible */
    .hero-wrapper > :first-child,
    .map-section,
    .map-container {
        flex: 1;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* La carte SVG prend une dimension maximale adaptée tout en conservant son ratio */
    .map-container svg,
    .map-svg {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: calc(100dvh - var(--header-height) - 110px); /* Garde de la place pour le hint */
        object-fit: contain;
    }

    /* La bannière d'incitation reste collée en bas du hero */
    .territory-hint {
        width: 100%;
        margin-top: auto;
        flex-shrink: 0;
    }

    .territory-details__grid,
    .territory-grid {
        grid-template-columns: 1fr;
    }

    .site-footer__container {
        flex-direction: column;
        text-align: center;
        gap: 1.25rem;
    }

    .site-footer__legal-menu {
        gap: 0.5rem 0.75rem;
    }

    /* Retrait des puces sur mobile pour éviter des sauts de ligne dysgracieux */
    .site-footer__legal-menu li:not(:last-child)::after {
        display: none;
    }
}

@media screen and (max-width: 600px) {
    /* Ajustement de la position sur mobile pour éviter de masquer des éléments */
    .scroll-top-btn {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 38px;
        height: 38px;
    }

    /* Adaptation mobile : défilement horizontal fluide sans menu burger */
    .cpt-archive-menu ul,
    .cpt-archive-menu .elementor-nav-menu {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        padding-bottom: 0.5rem !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Masque la barre de défilement sur Firefox */
    }

    .cpt-archive-menu ul::-webkit-scrollbar {
        display: none; /* Masque la barre sur Chrome/Safari */
    }

    .cpt-archive-menu ul a,
    .cpt-archive-menu .elementor-nav-menu a {
        white-space: nowrap !important;
    }
}

/* Mobile Réduit (< 480px) */
@media screen and (max-width: 479px) {
    .btn-archive--main,
    .btn-media {
        width: 100%;
    }

    .filter-list {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }

    .filter-btn {
        white-space: nowrap;
    }
}

.mobile-filter-select {
    width: 100%;
    padding: 0.6rem 1rem;
    background-color: var(--color-sable);
    border: 1px solid var(--color-ardoise);
    color: var(--color-ardoise);
    font-family: var(--font-secondary) !important;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

@media screen and (min-width: 576px) {
    .mobile-filter-select {
        display: none;
    }
}