/* ═══════════════════════════════════════════
   Saint-Cyr-sur-Morin — Feuille de style
   ═══════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

:root {
  --vert:        #3a5a40;
  --vert-clair:  #6a9469;
  --vert-pale:   #eef3ec;
  --pierre:      #c8bfb0;
  --pierre-dark: #7a6f63;
  --bois:        #9c6f3e;
  --creme:       #f7f4ef;
  --texte:       #2a2520;
  --gris:        #888078;
  --blanc:       #ffffff;

  /* Palette secondaire pour les accents de couleur sur les sections ou éléments spécifiques */
  /* ROUGE */
  --rouge:       #8c3a3a;
  --rouge-clair: #c46a6a;
  --rouge-pale:  #f7ecec;
  --rouge-pierre:     #d3b4ae;
  --rouge-pierre-dark:#8a6a65;
  --rouge-bois:       #a04a32;
  --rouge-creme:      #f8f1ef;
  --rouge-texte: #2c1f1f;

  /* BLEU */
  --bleu: #2f4a63;
  --bleu-clair: #5f7f9b;
  --bleu-pale: #e8eef3;
  --bleu-pierre: #c3ccd4;
  --bleu-pierre-dark: #6b7680;
  --bleu-bois: #3d5a72;
  --bleu-creme: #f4f7fa;
  --bleu-texte: #22272d;

  /* JAUNE */
  --jaune: #b38a2e;
  --jaune-clair: #d8b866;
  --jaune-pale: #f7f2e3;
  --jaune-pierre: #e3d4b6;
  --jaune-pierre-dark: #8c7a55;
  --jaune-bois: #a67c3a;
  --jaune-creme: #faf6ed;
  --jaune-texte: #2d281c;

  /* VIOLET */
  --violet: #5a3a63;
  --violet-clair: #8a6a92;
  --violet-pale: #f2eaf4;
  --violet-pierre: #d7c6d9;
  --violet-pierre-dark: #7a687c;
  --violet-bois: #744a7a;
  --violet-creme: #faf5fa;
  --violet-texte: #261f29;
}

body.theme-ecole {
  --vert:        #5a3a63;
  --vert-clair:  #8a6a92;
  --vert-pale:   #f2eaf4;
  --pierre:      #d7c6d9;
  --pierre-dark: #7a687c;
  --bois:        #744a7a;
  --creme:       #faf5fa;
  --texte:       #261f29;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--creme);
  color: var(--texte);
  font-size: 16px;
  line-height: 1.6;
}

/* On cible les éléments animés par le scroll reveal */
.reveal {
  /* Force le rendu propre sur mobile et évite les clignotements/doublons */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  
  /* Indique au navigateur de se préparer à une transformation */
  will-change: transform, opacity;
  
  /* Empêche les bugs de démultiplication sur certains moteurs de rendu */
  transform: translateZ(0);
}

/* ─── NAVBAR ──────────────────────────────── */

nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2.5rem;
  height: 68px;
  background: rgba(247,244,239,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(200,191,176,0.4);
  transition: box-shadow .3s;
}
nav.scrolled { box-shadow: 0 2px 20px rgba(42,37,32,0.08); }

.nav-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  padding: .35rem .5rem;
  border-radius: 10px;
  transition: background .2s;
  user-select: none;
}
.nav-logo:hover { 
    background: color-mix(in srgb, var(--vert), transparent 92%); 
}

.nav-logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-logo-badge img {
  height: 30px;
  width: auto;
  display: block;
}

.nav-logo-text { line-height: 1.15; }
.nav-logo-text strong {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: .9rem;
  font-weight: 600;
  color: var(--texte);
  transition: color .2s;
}
.nav-logo-text span { font-size: .72rem; color: var(--gris); font-weight: 300; }
.nav-logo:hover .nav-logo-text strong { color: var(--vert); }

.nav-links {
  display: flex; align-items: center; gap: 2rem;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  color: var(--texte);
  font-size: .85rem;
  font-weight: 400;
  position: relative;
}
.nav-links a:not(.nav-contact) {
  padding-bottom: 2px;
}
.nav-links a:not(.nav-contact)::after {
  content: '';
  position: absolute; bottom: 0; left: 0;
  width: 0; height: 1.5px;
  background: var(--vert);
  transition: width .25s;
}
.nav-links a:not(.nav-contact):hover::after { width: 100%; }

.nav-sub-header {
  padding: 12px 15px 5px 15px;
  font-size: 0.75rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  color: var(--vert); /* On reprend ton vert signature */
  opacity: 0.6;
  pointer-events: none; /* Pour que ce ne soit pas cliquable */
  user-select: none; /* Empêche la sélection du texte */
}

/* Bouton Contact — fix pilule alignement (ta correction préservée) */
.nav-contact {
  background: var(--vert);
  color: var(--blanc) !important;
  padding: .6rem 1.4rem;
  border-radius: 100px;
  font-size: .82rem !important;
  font-weight: 500 !important;
  display: inline-block;
  vertical-align: middle;
  margin-top: 3px;
  margin-left: -.3rem;
  line-height: 1;
  transition: all .2s;
  user-select: none;
}
.nav-contact:hover { background: var(--vert-clair) !important; transform: translateY(-1px); }
.nav-contact::after { content: none !important; }


/* ─── HAMBURGER ───────────────────────────── */

.nav-burger {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; cursor: pointer;
  background: none; border: none; padding: 6px;
  border-radius: 8px; transition: background .2s;
}
.nav-burger:hover { background: var(--vert-pale); }
.nav-burger span {
  display: block; height: 2px; background: var(--texte);
  border-radius: 2px; transition: all .3s;
  transform-origin: center;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* ─── DROPDOWNS DESKTOP ───────────────────── */

.has-sub { position: relative; }

.has-sub::after {
  content: '';
  position: absolute;
  bottom: -14px; left: 0;
  width: 100%; height: 14px;
}

.nav-sub {
  list-style: none;
  position: absolute; top: calc(100% + 14px); left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: var(--blanc);
  border: 1px solid rgba(200,191,176,.4);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(42,37,32,.1);
  padding: .5rem;
  min-width: 190px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .2s, transform .2s, visibility .2s;
  z-index: 200;
}
.has-sub:hover .nav-sub {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-sub a {
  display: block;
  /* On réduit le bas et on augmente le haut pour "pousser" le texte vers le haut */
  padding-top: .2rem;    
  padding-bottom: .6rem; 
  line-height: 2;
  
  text-align: center; /* Pour centrer le texte comme demandé */
  
  border-radius: 8px;
  font-size: .82rem; 
  color: var(--texte);
  white-space: nowrap;
  text-decoration: none;
  transition: background .15s, color .15s;
  user-select: none;
}
.nav-sub a:hover { background: var(--vert-pale); color: var(--vert); }

.nav-sub a::after { display: none !important; }

/* Underline animé sur les parents — identique aux liens normaux */
.has-sub > a {
  padding-bottom: 2px;
  position: relative;
  cursor: pointer;
  user-select: none;
}
.has-sub > a::after {
  content: '' !important;
  display: block !important;
  position: absolute; bottom: 0; left: 0;
  width: 0; height: 1.5px;
  background: var(--vert);
  transition: width .25s;
}
.has-sub:hover > a::after { width: 100%; }
.nav-chevron {
  display: none;
  flex-shrink: 0;
  transition: transform .25s;
  align-self: center;
  margin-top: 0;
}
.has-sub.open > a .nav-chevron { transform: rotate(180deg); }


/* ─── RESPONSIVE NAVBAR ───────────────────── */

@media (max-width: 1050px) {
  .nav-burger { display: flex; }

  nav.open {
    height: 100dvh;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(247,244,239,0.98);
    backdrop-filter: blur(16px);
    overflow-y: auto;
  }

  nav.open .nav-burger {
    position: absolute;
    top: 1rem; right: 2rem;
  }
  nav.open .nav-logo {
    position: absolute;
    top: 1rem; left: 2rem;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    text-align: center;
    width: 100%;
    padding: 0 2rem;
  }
  nav.open .nav-links { display: flex; justify-content: center; min-height: 50vh; }

  .has-sub.open > a {
    margin-bottom: 0.5rem !important;
    padding-bottom: 1rem !important;
  }
  
  .nav-links:has(.has-sub.open) > li:not(.open) {
    display: none;
  }

  /* Lien principal Playfair centré */
  .nav-links > li {
    width: 100%;
    text-align: center;
  }
  .nav-links > li > a:not(.nav-contact) {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem; font-weight: 400;
    color: var(--texte);
    padding: .5rem 2rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: .6rem;
    padding-bottom: .6rem;
    gap: .6rem;
    text-decoration: none;
    position: relative;
  }
  .nav-links > li > a:not(.nav-contact):hover { color: var(--vert); }
  .nav-links > li > a:not(.nav-contact) .nav-chevron {
    margin-top: .55rem;
  }

  /* Annule le underline desktop sur les parents en burger */
  .has-sub > a::after { display: none !important; }

  /* Flèche chevron SVG injectée via le JS — pas de pseudo-élément */

  .nav-sub-header {
    font-size: 0.9rem; /* Un peu plus grand pour être lisible sur mobile */
    color: var(--vert);
    
    padding: 2rem 0 0.8rem 0; /* Plus d'espace au-dessus pour bien séparer les blocs */
    border-bottom: 1px solid rgba(58, 90, 64, 0.1); /* Ligne très fine pour souligner le titre */
    margin: 0 2rem 0.5rem 2rem; /* Marges pour ne pas coller aux bords */
    text-align: center;
  }

  /* On ajuste un peu l'espacement du premier header pour ne pas qu'il soit trop loin du titre principal */
  .nav-sub-inner .nav-sub-header:first-child {
    padding-top: 1rem;
  }

  /* Sous-menu burger dépliant */
  .nav-sub {
    position: static;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    background: none;
    border: none; border-radius: 0;
    box-shadow: none;
    min-width: 0;
    transition: none;
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .3s ease;
    padding: 0;
  }
  .has-sub.open .nav-sub {
    display: grid;
    grid-template-rows: 1fr;
    margin-top: -.3rem;
  }
  /* Wrapper interne nécessaire pour l'animation grid */
  .nav-sub-inner {
    overflow: hidden;
  }
  .has-sub:hover .nav-sub { opacity: 1; visibility: visible; transform: none; }

  .nav-sub a {
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem; color: var(--pierre-dark);
    padding: .35rem 1rem;
    border-radius: 0;
    text-align: center;
  }
  .nav-sub a:hover { background: none; color: var(--vert); }

  /* Bouton Contact */
  nav.open .nav-contact {
    font-family: 'Playfair Display', serif !important;
    font-size: 1.75rem !important;
    font-weight: 400 !important;
    margin-top: 1.1rem;
    vertical-align: baseline;
    margin-left: 0;
    padding: .3rem 2rem .5rem;
  }

  .nav-chevron { display: block; }
}


/* ─── HERO ────────────────────────────────── */

.hero {
  position: relative; 
  height: 100svh; /* svh = Small Viewport Height. Ignore complètement les barres d'outils et zooms, reste bloqué à la zone visible */
  min-height: 580px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url("../assets/img/st-cyr-2-scaled.jpg");
  background-size: cover;
  background-position: center;
  filter: brightness(.85) saturate(.85);
}
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(
      to top,
      rgba(20,30,18,.88) 0%,
      rgba(20,30,18,.55) 30%,
      rgba(20,30,18,.15) 60%,
      transparent 100%
    ),
    linear-gradient(
      to right,
      rgba(20,30,18,.25) 0%,
      transparent 55%
    );
}
.hero-content {
  position: relative; z-index: 2;
  height: 100%; display: flex; flex-direction: column;
  justify-content: flex-end; padding: 0 2.5rem 5rem;
  max-width: 1050px;
}
.hero-tag {
  display: inline-block;
  background: rgba(58,90,64,.45);
  border: 1px solid rgba(255,255,255,.25);
  color: var(--blanc); font-size: .75rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .35rem .9rem; border-radius: 100px;
  margin-bottom: 1.2rem;
  animation: fadeUp .8s ease both;
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.8rem, 6vw, 5rem);
  color: var(--blanc); font-weight: 400; line-height: 1.1;
  text-shadow: 0 2px 20px rgba(0,0,0,.35);
  animation: fadeUp .8s ease .15s both;
}
.hero h1 em { 
  font-style: italic; 
  color: rgba(255,255,255,.82);

  /* On force un interlignage plus serré pour le retour à la ligne interne */
  display: inline-block; /* On change en inline-block pour pouvoir contrôler précisément le bloc */
  line-height: 0.9;      /* On resserre très fort l'espace entre "Saint-Cyr" et "Ouen" */
  vertical-align: top;
  margin-top: 0.8rem; 
  
  /* Optionnel : assure-toi qu'il prend bien toute la largeur pour bien forcer le bloc */
  width: 100%;
}
.hero-sub {
  color: rgba(255,255,255,.88); font-size: 1.05rem; font-weight: 300;
  margin-top: .9rem; max-width: 460px;
  text-shadow: 0 1px 10px rgba(0,0,0,.3);
  animation: fadeUp .8s ease .3s both;
}
.hero-actions {
  display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap;
  animation: fadeUp .8s ease .45s both;
}
/* ─── INDICATEUR DE DÉFILEMENT (HERO) ─────────────── */

.hero-scroll {
  position: absolute;
  bottom: 1.8rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.25s ease;
  animation: fadeIn 1.2s ease 1s both;
}

.hero-scroll:hover {
  color: var(--blanc);
}

.hero-scroll svg {
  animation: bounceDown 2s infinite;
}

@keyframes bounceDown {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(5px);
  }
  60% {
    transform: translateY(2px);
  }
}

/* ─── HERO & CONTENU PLAQUÉS EN BAS ─────────────── */

.hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* Plaque tout le contenu en bas */
  padding: 0 2.5rem 4rem;
  max-width: 1050px;
}

/* ─── CARTE ÉVÉNEMENT HERO (À LA UNE) ───────────── */

@keyframes fadeUpCard {
  from { opacity: 0; translate: 0 22px; }
  to   { opacity: 1; translate: 0 0; }
}

.hero-event-card {
  background: var(--creme);
  border: 1px solid rgba(200, 191, 176, 0.6);
  border-radius: 18px;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 12px 32px rgba(20, 30, 18, 0.28);
  z-index: 5;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.hero-event-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(20, 30, 18, 0.35);
  border-color: rgba(200, 191, 176, 0.85);
}

.hero-event-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .5rem;
}

.hero-event-tag {
  display: inline-block;
  background: var(--vert);
  color: var(--blanc);
  font-size: .65rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .2rem .65rem;
  border-radius: 100px;
}

.hero-event-date {
  font-size: .75rem;
  font-weight: 500;
  color: var(--pierre-dark);
}

.hero-event-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--texte);
  line-height: 1.25;
  margin-bottom: .35rem;
}

.hero-event-desc {
  font-size: .83rem;
  color: var(--gris);
  line-height: 1.5;
  margin-bottom: .85rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-event-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  font-weight: 500;
  color: var(--vert);
  text-decoration: none;
  transition: color .2s;
}

.hero-event-link svg {
  stroke: currentColor;
  transition: transform .2s ease-in-out;
}

.hero-event-card:hover .hero-event-link {
  color: var(--vert-clair);
}

.hero-event-card:hover .hero-event-link svg {
  transform: translateX(3px);
}

/* ── COMPORTEMENT ADAPTATIF ── */

/* Desktop (PC) */
@media (min-width: 992px) {
  .hero-content {
    position: static;
  }
  .hero-event-card {
    position: absolute;
    bottom: 3.5rem;
    right: 2.5rem;
    width: 330px;
    animation: fadeUpCard .8s ease .6s both;
  }
}

/* Mobile & Tablette (< 992px) */
@media (max-width: 991px) {
  .hero {
    min-height: 680px;
  }
  .hero-content {
    padding: 0 1.4rem 2.5rem;
  }
  .hero-event-card {
    position: relative;
    margin-top: 1.25rem;
    width: 100%;
    max-width: 480px;
    animation: fadeUpCard .8s ease .45s both;
  }
  .hero-scroll {
    display: none;
  }
}

@media (max-width: 600px) {
  /* Vraie carte d'information sombre en verre (plus de faux bouton) */
  .hero-event-card {
    background: rgba(20, 30, 18, 0.82) !important; /* Ton vert très sombre */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 14px !important; /* Shape rectangulaire douce, plus du tout pilule */
    padding: 0.85rem 1rem !important;
    margin-top: 1.25rem !important;
    text-align: left;
  }

  /* Entête propre : Badge + Date */
  .hero-event-head {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.35rem;
  }

  .hero-event-tag {
    background: var(--vert-clair) !important;
    color: #ffffff !important;
    font-size: 0.6rem !important;
    padding: 0.15rem 0.5rem !important;
  }

  .hero-event-date {
    color: rgba(255, 255, 255, 0.65) !important;
    font-size: 0.72rem !important;
  }

  /* Titre blanc lisible */
  .hero-event-title {
    color: var(--blanc) !important;
    font-size: 0.92rem !important;
    font-weight: 500 !important;
    margin-bottom: 0.35rem !important;
    line-height: 1.3 !important;
  }

  /* Masque le paragraphe pour faire respirer l'image */
  .hero-event-desc {
    display: none !important;
  }

  /* Lien vert clair fluide */
  .hero-event-link {
    color: var(--vert-pale) !important;
    font-size: 0.78rem !important;
    font-weight: 500 !important;
  }

  .hero-event-link svg {
    stroke: var(--vert-pale) !important;
  }
}


/* ─── BOUTONS ─────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  text-decoration: none; border-radius: 100px;
  font-size: .88rem; font-weight: 500; transition: all .2s;
  padding: .7rem 1.6rem; cursor: pointer; border: none;
}

.btn-primary {
  background: var(--blanc);
  color: var(--texte);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  vertical-align: middle;
}

.btn-primary:hover {
  background: var(--vert-pale);
  transform: translateY(-1px);
}

.btn-primary svg {
  display: inline-block;
  flex-shrink: 0;
  transform: translateY(0);
  transition: transform 0.2s ease-in-out; /* Fluidité parfaite du chevron */
}

.btn-primary:hover svg.icon-arrow {
  transform: translateX(3px); /* Seul le chevron glisse sans faire bouger le bloc */
}

.btn-outline {
  background: transparent; color: var(--blanc);
  border: 1.5px solid rgba(255,255,255,.6);
}
.btn-outline:hover { background: rgba(255,255,255,.12); transform: translateY(-1px); }

/* ─── BANDE INFO ──────────────────────────── */

.infobande {
  background: var(--vert);
  display: flex; align-items: center; justify-content: center;
  gap: 3rem; padding: .85rem 2.5rem;
  flex-wrap: wrap;
}
.infobande-item {
  display: flex; align-items: center; gap: .6rem;
  color: rgba(255,255,255,.85); font-size: .82rem;
}
.infobande-item svg { opacity: .7; }
.infobande-item strong { color: var(--blanc); font-weight: 500; }


/* ─── IMAGES RESPONSIVES (Respect du ratio et adaptabilité) ─────────────── */

img {
  max-width: 100%;
  height: auto; /* Force le respect du ratio même si width/height sont écrits en HTML */
  display: block;
  object-fit: cover;
}

@media (max-width: 600px) {

  /* Force les conteneurs d'images à ne pas dépasser la largeur de l'écran du mobile */
  .village-photos {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }

  .village-photo {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .village-photo img {
    width: 100%;
    max-height: 250px; /* Évite qu'une image verticale ne prenne tout l'écran sur mobile */
    object-fit: cover;
  }

  /* Optimisation de la photo du maire sur petit écran */
  .maire-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
  }

  .maire-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%; /* Joli rendu circulaire sur mobile */
    object-fit: cover;
  }
}


/* ─── SECTIONS ────────────────────────────── */

.section { padding: 5rem 2.5rem; }
.section-inner { max-width: 1140px; margin: 0 auto; }

.section-label {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .72rem; font-weight: 500; letter-spacing: .12em;
  text-transform: uppercase; color: var(--vert);
  margin-bottom: 1rem;
}
.section-label::before {
  content: ''; display: block; width: 22px; height: 2px; background: var(--vert);
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.9rem, 3.5vw, 2.7rem);
  font-weight: 400; color: var(--texte); line-height: 1.2;
  margin-bottom: 2.5rem;
}

.first-section {
  padding-top: calc(5rem + 68px) !important;
}


/* ─── ACCÈS RAPIDES ───────────────────────── */

.acces-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  align-items: stretch;
  grid-auto-rows: 1fr;
}
.acces-card {
  background: var(--blanc);
  border: 1px solid rgba(200,191,176,.5);
  border-radius: 16px;
  padding: 1.4rem 1rem;
  text-align: center; text-decoration: none;
  color: var(--texte);
  display: flex; flex-direction: column; align-items: center; gap: .65rem;
  transition: all .22s;
  height: 100%;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.reveal.visible .acces-card, .reveal.visible .actu-item {
  transition-delay: 0s !important;
}
.acces-card:hover {
  border-color: var(--vert);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(58,90,64,.12);
}
.acces-icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--vert-pale);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s ease;
}
.acces-card:hover .acces-icon { background: var(--vert); }
.acces-card:hover .acces-icon svg { stroke: var(--blanc); }
.acces-label { font-size: .8rem; font-weight: 500; line-height: 1.3; }


/* ─── ACTUALITÉS ──────────────────────────── */

.actu-section { background: var(--blanc); }
.actu-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}
.actu-main {
  background: var(--vert-pale);
  border-radius: 20px; overflow: hidden;
  display: flex; flex-direction: column;
  text-decoration: none; color: var(--texte);
  transition: transform .22s;
}
.actu-main:hover { transform: translateY(-3px); }
.actu-main-img {
  height: 220px;
}
.actu-main-img-placeholder {
  background: var(--vert-pale);
  display: flex;
  align-items: center;
  justify-content: center;
}
.actu-main-img-placeholder svg {
  stroke: var(--vert);
  opacity: 0.3;
}
.actu-main-body { padding: 1.8rem; }
.actu-tag {
  display: inline-block; background: var(--vert);
  color: var(--blanc); font-size: .68rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  padding: .2rem .7rem; border-radius: 100px; margin-bottom: .8rem;
}
.actu-main-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem; font-weight: 600; line-height: 1.3;
  margin-bottom: .6rem;
}
.actu-main-text { font-size: .88rem; color: var(--gris); line-height: 1.6; }
.actu-date { font-size: .75rem; color: var(--pierre-dark); margin-top: 1rem; }

.actu-list { display: flex; flex-direction: column; gap: 1rem; }
.actu-item {
  background: var(--creme); border-radius: 14px;
  padding: 1.2rem; text-decoration: none; color: var(--texte);
  display: flex; gap: 1rem; align-items: flex-start;
  transition: all .2s;
}
.actu-item:hover { background: var(--vert-pale); transform: translateX(4px); }
.actu-item-num {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem; color: var(--pierre); font-weight: 400;
  line-height: 1; flex-shrink: 0; width: 32px;
}
.actu-item-title { font-size: .88rem; font-weight: 500; line-height: 1.4; margin-bottom: .25rem; }
.actu-item-date { font-size: .72rem; color: var(--gris); }
.actu-footer { margin-top: 2rem; text-align: right; }
.actu-footer-btn { border: 1.5px solid var(--pierre); color: var(--texte); }


/* ─── BENTO "À LA UNE" ──────────────────────────────────── */
 
.bento-une {
  display: grid;
  gap: .9rem;
  margin-bottom: 2.8rem;
}
 
/* ── Carte de base ── */
.bento-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  color: var(--blanc);
  display: block;
  transition: transform .28s ease;
}
.bento-card:hover { transform: translateY(-4px); }
 
/* Image de fond — absolue, remplit toute la carte */
.bento-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
 
/* Dégradé lisibilité */
.bento-card:not(.bento-noimg)::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(12,20,10,.92) 0%,
    rgba(12,20,10,.48) 45%,
    rgba(12,20,10,.04) 100%
  );
  pointer-events: none;
}
 
/* Fallback sans image */
.bento-noimg {
  background: linear-gradient(135deg, var(--vert) 0%, var(--vert-clair) 100%);
}
.bento-noimg::after { display: none; }
 
/* ── Corps texte — positionné en absolu en bas de carte ── */
.bento-body {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: 1.4rem 1.6rem;
}
 
.bento-tag {
  display: inline-block;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.22);
  color: rgba(255,255,255,.92);
  font-size: .63rem; font-weight: 500;
  letter-spacing: .09em; text-transform: uppercase;
  padding: .18rem .7rem; border-radius: 100px;
  margin-bottom: .2rem;
  width: fit-content;
}
 
.bento-title {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--blanc);
}
.bento-hero .bento-title { font-size: clamp(1.25rem, 2.2vw, 1.7rem); }
.bento-item .bento-title { font-size: clamp(.9rem, 1.35vw, 1.08rem); }
 
.bento-resume {
  font-size: .87rem;
  color: rgba(255,255,255,.78);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
 
.bento-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  margin-top: .3rem;
}
.bento-date { font-size: .72rem; color: rgba(255,255,255,.55); }
.bento-link {
  font-size: .8rem; font-weight: 500;
  color: rgba(255,255,255,.88);
  white-space: nowrap;
  transition: color .2s;
}
.bento-card:hover .bento-link { color: var(--vert-pale); }

/* Action lien avec SVG (style harmonisé) */
.bento-action {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--vert-pale);
  text-decoration: none;
  white-space: nowrap;
}

.bento-action svg {
  stroke: currentColor;
  transition: transform 0.2s ease-in-out;
}

.bento-card:hover .bento-action svg {
  transform: translateX(3px); /* Petite animation sympa au survol */
}
 
 
/* ── LAYOUTS DESKTOP par nombre d'articles ─────────────── */
/* Les hauteurs en px des rangées définissent la hauteur des cartes.
   bento-body étant en position:absolute, ça ne crée aucun conflit. */
 
/* 1 */
.bento-une[data-count="1"] {
  grid-template-columns: 1fr;
  grid-template-rows: 420px;
}
.bento-une[data-count="1"] .bento-title { font-size: clamp(1.5rem, 3vw, 2.2rem); }
 
/* 2 */
.bento-une[data-count="2"] {
  grid-template-columns: 3fr 2fr;
  grid-template-rows: 360px;
}
 
/* 3 */
.bento-une[data-count="3"] {
  grid-template-columns: 3fr 2fr;
  grid-template-rows: 230px 185px;
  grid-template-areas:
    "hero s1"
    "hero s2";
}
.bento-une[data-count="3"] .bento-hero              { grid-area: hero; }
.bento-une[data-count="3"] .bento-card:nth-child(2) { grid-area: s1; }
.bento-une[data-count="3"] .bento-card:nth-child(3) { grid-area: s2; }
 
/* 4 — validé "très joli" */
.bento-une[data-count="4"] {
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 255px 185px;
  grid-template-areas:
    "hero s1 s1"
    "hero s2 s3";
}
.bento-une[data-count="4"] .bento-hero              { grid-area: hero; }
.bento-une[data-count="4"] .bento-card:nth-child(2) { grid-area: s1; }
.bento-une[data-count="4"] .bento-card:nth-child(3) { grid-area: s2; }
.bento-une[data-count="4"] .bento-card:nth-child(4) { grid-area: s3; }
 
/* 5 — hero large + S2 pilier vertical droit + S3 large */
.bento-une[data-count="5"] {
  grid-template-columns: 2fr 2fr 2fr 1.5fr;
  grid-template-rows: 255px 190px;
  grid-template-areas:
    "hero hero s1 s2"
    "s3   s3   s4 s2";
}
.bento-une[data-count="5"] .bento-hero              { grid-area: hero; }
.bento-une[data-count="5"] .bento-card:nth-child(2) { grid-area: s1; }
.bento-une[data-count="5"] .bento-card:nth-child(3) { grid-area: s2; }
.bento-une[data-count="5"] .bento-card:nth-child(4) { grid-area: s3; }
.bento-une[data-count="5"] .bento-card:nth-child(5) { grid-area: s4; }
 
/* 6 — 3 colonnes inégales (hero plus large que S2) */
.bento-une[data-count="6"] {
  grid-template-columns: 3fr 2fr 2fr;
  grid-template-rows: 220px 165px 155px;
  grid-template-areas:
    "hero s1 s2"
    "hero s3 s2"
    "s4   s4 s5";
}
.bento-une[data-count="6"] .bento-hero              { grid-area: hero; }
.bento-une[data-count="6"] .bento-card:nth-child(2) { grid-area: s1; }
.bento-une[data-count="6"] .bento-card:nth-child(3) { grid-area: s2; }
.bento-une[data-count="6"] .bento-card:nth-child(4) { grid-area: s3; }
.bento-une[data-count="6"] .bento-card:nth-child(5) { grid-area: s4; }
.bento-une[data-count="6"] .bento-card:nth-child(6) { grid-area: s5; }
 
/* 7 — même structure + S6 pleine largeur en bas */
.bento-une[data-count="7"] {
  grid-template-columns: 3fr 2fr 2fr;
  grid-template-rows: 210px 160px 148px 148px;
  grid-template-areas:
    "hero s1 s2"
    "hero s3 s2"
    "s4   s4 s5"
    "s6   s6 s6";
}
.bento-une[data-count="7"] .bento-hero              { grid-area: hero; }
.bento-une[data-count="7"] .bento-card:nth-child(2) { grid-area: s1; }
.bento-une[data-count="7"] .bento-card:nth-child(3) { grid-area: s2; }
.bento-une[data-count="7"] .bento-card:nth-child(4) { grid-area: s3; }
.bento-une[data-count="7"] .bento-card:nth-child(5) { grid-area: s4; }
.bento-une[data-count="7"] .bento-card:nth-child(6) { grid-area: s5; }
.bento-une[data-count="7"] .bento-card:nth-child(7) { grid-area: s6; }
 
/* 8 — S6 normal, S7 large droite (diagonale inversée) */
.bento-une[data-count="8"] {
  grid-template-columns: 3fr 2fr 2fr;
  grid-template-rows: 215px 160px 148px 148px;
  grid-template-areas:
    "hero s1 s2"
    "hero s3 s2"
    "s4   s4 s5"
    "s6   s7 s7";
}
.bento-une[data-count="8"] .bento-hero              { grid-area: hero; }
.bento-une[data-count="8"] .bento-card:nth-child(2) { grid-area: s1; }
.bento-une[data-count="8"] .bento-card:nth-child(3) { grid-area: s2; }
.bento-une[data-count="8"] .bento-card:nth-child(4) { grid-area: s3; }
.bento-une[data-count="8"] .bento-card:nth-child(5) { grid-area: s4; }
.bento-une[data-count="8"] .bento-card:nth-child(6) { grid-area: s5; }
.bento-une[data-count="8"] .bento-card:nth-child(7) { grid-area: s6; }
.bento-une[data-count="8"] .bento-card:nth-child(8) { grid-area: s7; }
 
 
/* ─── RÉCENTS ────────────────────────────────────────────── */
 
.actu-recents {
  padding-top: 2.2rem;
  border-top: 1px solid rgba(200,191,176,.38);
}
.actu-recents-label-wrap { margin-bottom: 1.2rem; }
.actu-recents-label {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .72rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--pierre-dark);
}
.actu-recents-label::before {
  content: ''; display: block;
  width: 18px; height: 1.5px; background: var(--pierre);
}
 
.actu-recents-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}
 
.actu-recent-card {
  background: var(--creme);
  border-radius: 18px; overflow: hidden;
  text-decoration: none; color: var(--texte);
  display: flex; flex-direction: column;
  border: 1px solid rgba(200,191,176,.32);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.actu-recent-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(42,37,32,.09);
  border-color: rgba(200,191,176,.65);
}
 
.actu-recent-img {
  height: 158px;
  background-size: cover; background-position: center;
  flex-shrink: 0;
}
.actu-recent-noimg {
  background: var(--vert-pale);
  display: flex; align-items: center; justify-content: center;
}
.actu-recent-noimg svg { stroke: var(--vert); opacity: .22; }
 
.actu-recent-body {
  padding: 1.1rem 1.2rem 1.3rem;
  flex: 1; display: flex; flex-direction: column; gap: .35rem;
}
.actu-recent-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem; font-weight: 600; line-height: 1.3;
}
.actu-recent-desc {
  font-size: .83rem; color: var(--gris); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; flex: 1;
}
.actu-recent-meta { font-size: .72rem; color: var(--pierre-dark); margin-top: .3rem; }
 
 
/* ─── RESPONSIVE ─────────────────────────────────────────── */
 
/* ═══════════════════════════════════════════════════════════
   TABLETTE / LAPTOP ÉTROIT — 960px
   ───────────────────────────────────────────────────────────
   Stratégie :
   • Réinitialisation totale des zones nommées (grid-template-areas: none)
   • Grille 2 colonnes, hauteurs en px explicites → pas de dépendance circulaire
   • Hero pleine largeur, items secondaires en 2 col
   • Fix orphelin pour les counts pairs (dernier item seul → pleine largeur)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
 
  /* Réinitialisation complète du conteneur
     L'attribut [data-count] sans valeur = tout élément ayant cet attribut */
  .bento-une[data-count] {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;         /* reset des rangées desktop */
    grid-template-areas: none;        /* supprime les zones nommées */
  }
 
  /* Effacer les placements nommés des enfants (toujours moins spécifique
     que les règles desktop avec data-count + nth-child → on force !important) */
  .bento-une[data-count] .bento-card {
    grid-area: auto !important;
    grid-column: auto !important;
    grid-row: auto !important;
    height: 160px;   /* hauteur explicite car bento-body est en position:absolute */
  }
 
  /* Hero : pleine largeur + hauteur généreuse */
  .bento-une[data-count] .bento-hero {
    grid-column: 1 / -1 !important;
    height: 285px;
  }
 
  /* Fix orphelin : count pair = nb. secondaires impair = dernier seul.
     On lui donne la pleine largeur pour éviter la case vide. */
  .bento-une[data-count="2"] .bento-card:last-child,
  .bento-une[data-count="4"] .bento-card:last-child,
  .bento-une[data-count="6"] .bento-card:last-child,
  .bento-une[data-count="8"] .bento-card:last-child {
    grid-column: 1 / -1 !important;
    height: 175px;
  }
}
 
 
/* ═══════════════════════════════════════════════════════════
   MOBILE MOYEN — 640px
   On reste en 2 colonnes, on réduit les hauteurs
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .bento-une[data-count] .bento-hero { height: 250px; }
  .bento-une[data-count] .bento-card { height: 140px; }
 
  .bento-une[data-count="2"] .bento-card:last-child,
  .bento-une[data-count="4"] .bento-card:last-child,
  .bento-une[data-count="6"] .bento-card:last-child,
  .bento-une[data-count="8"] .bento-card:last-child {
    height: 158px;
  }
 
  .bento-resume { display: none; }
  .bento-link   { display: none; }
  .bento-action { display: none; }
 
  /* Récents : 1 colonne */
  .actu-recents-grid { grid-template-columns: 1fr; }
  .actu-recent-img   { height: 175px; }

  .bento-hero .bento-title { 
    font-size: 1.1rem !important; 
    line-height: 1.25;
  }
  .bento-body {
    padding: 1rem 1.1rem;
    gap: 0.25rem;
  }
  .bento-tag {
    font-size: 0.58rem;
    padding: 0.12rem 0.55rem;
    margin-bottom: 0.1rem;
  }
}
 
 
/* ═══════════════════════════════════════════════════════════
   MOBILE STRICT — 480px
   1 colonne, tout empilé
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .bento-une[data-count] {
    grid-template-columns: 1fr;
  }
  /* Reset de l'orphelin full-width (déjà full si 1 col) */
  .bento-une[data-count="2"] .bento-card:last-child,
  .bento-une[data-count="4"] .bento-card:last-child,
  .bento-une[data-count="6"] .bento-card:last-child,
  .bento-une[data-count="8"] .bento-card:last-child {
    height: 145px;
  }
 
  .bento-une[data-count] .bento-hero { height: 230px; }
  .bento-une[data-count] .bento-card { height: 145px; }
  .bento-une { gap: .65rem; }
  .bento-body { padding: 1rem 1.1rem; }
}
 

/* ─── VILLAGE ─────────────────────────────── */

.village-section { background: var(--texte); }
.village-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: center;
}
.village-text .section-label { color: var(--vert-clair); }
.village-text .section-label::before { background: var(--vert-clair); }
.village-text .section-title { color: var(--blanc); margin-bottom: 1.2rem; }
.village-text p {
  color: rgba(255,255,255,.65); font-size: .95rem;
  line-height: 1.8; margin-bottom: 1rem;
}
.village-text .btn-village {
  background: var(--vert); color: var(--blanc);
  display: inline-flex; align-items: center; gap: .5rem;
  text-decoration: none; border-radius: 100px;
  font-size: .88rem; font-weight: 500; padding: .7rem 1.6rem;
  margin-top: 1rem; transition: background .2s;
}
.village-text .btn-village:hover { background: var(--vert-clair); }

/* Structure commune pour l'alignement */
.btn-village, 
.actu-footer-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px; /* Espace entre le texte et la flèche */
  text-decoration: none;
  transition: all 0.3s ease;
}

/* Style spécifique du SVG */
.btn-village svg, 
.actu-footer-btn svg {
  transition: transform 0.2s ease-in-out;
  flex-shrink: 0; /* Empêche le SVG de s'écraser si le texte est long */
  transform: translateY(0.25px); /* Légère translation verticale pour un meilleur alignement visuel */
}

/* L'animation au survol : la flèche glisse de 3px vers la droite */
.btn-village:hover svg, 
.actu-footer-btn:hover svg {
  transform: translateX(3px) translateY(0.25px); /* Combine la translation horizontale et la légère translation verticale pour maintenir l'alignement */
}

/* Grille photos : grande en haut sur 2 cols, 2 petites en dessous */
.village-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
.village-photo {
  border-radius: 14px; overflow: hidden; aspect-ratio: 4/3;
}
.village-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.village-photo:hover img { transform: scale(1.04); }
.village-photo:first-child { grid-column: span 2; aspect-ratio: 16/7; }


/* ─── MOT DU MAIRE ────────────────────────── */

.maire-section {
  background: var(--vert-pale);
  position: relative; overflow: hidden;
}
.maire-section::before {
  content: '"';
  font-family: 'Playfair Display', serif;
  font-size: 20rem; color: rgba(58,90,64,.07);
  position: absolute; top: -4rem; left: 1rem;
  line-height: 1; pointer-events: none;
}
.maire-inner {
  display: grid; grid-template-columns: auto 1fr;
  gap: 3rem; align-items: center;
}
.maire-photo {
  width: 140px; height: 140px; border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--blanc);
  box-shadow: 0 4px 20px rgba(58,90,64,.15);
}
.maire-content blockquote {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-style: italic; color: var(--texte);
  line-height: 1.6; margin-bottom: 1.2rem;
}
.maire-sig { font-size: .85rem; color: var(--pierre-dark); }
.maire-sig strong { display: block; color: var(--texte); font-weight: 500; }
.maire-lire {
  display: inline-block; margin-top: 1.2rem;
  font-size: .83rem; color: var(--vert);
  text-decoration: none; font-weight: 500;
}
.maire-lire:hover { color: var(--vert-clair); }
#mot-du-maire {
    scroll-margin-top: 90px; /* 68px de navbar + 22px de confort */
}


/* ─── CONTACT HEADER ──────────────────────── */
.contact-header {
    text-align: center;
    padding-bottom: 6rem !important; /* On laisse de la place pour le bandeau */
}

/* ─── INFO BAR ────────────────────────────── */
/* Alignement de l'horloge et du texte */
.info-item {
    display: flex;
    align-items: center; /* Aligne verticalement au centre */
    gap: 0.85rem;        /* Un peu plus d'espace avec l'icône */
    font-size: 0.95rem;
    color: var(--texte);
}

.info-item svg {
    flex-shrink: 0;
}

/* Le badge en forme de pilule */
.status-badge {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.35rem 0.85rem;
    border-radius: 100px; /* Forme pilule */
    transition: all 0.3s ease;
}

/* Couleurs dynamiques pour le badge (utilisées par le JS) */
.status-badge.open {
    background: var(--vert-pale);
    color: var(--vert);
}

.status-badge.closed {
    background: #fee2e2;
    color: #b91c1c;
}

.schedule-dropdown {
    background: var(--blanc);
    max-width: 600px; /* Plus étroit pour l'effet menu */
    margin: -30px auto 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(58,90,64,0.12);
    border: 1px solid var(--vert-pale);
    overflow: hidden;
    position: relative;
    z-index: 10;
}

.dropdown-trigger {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background 0.2s;
}

.dropdown-trigger:hover { background: var(--creme); }

.trigger-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.arrow-icon { transition: transform 0.3s; }
.schedule-dropdown.open .arrow-icon { transform: rotate(180deg); }

/* Contenu dépliant */
.dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: var(--blanc);
}

.schedule-dropdown.open .dropdown-content {
    max-height: 400px;
    border-top: 1px solid var(--vert-pale);
}

.schedule-list {
    list-style: none;
    padding: 1rem 1.5rem;
}

.schedule-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 0;
    font-size: 0.9rem;
    border-bottom: 1px dashed var(--vert-pale);
}

.schedule-list li:last-child { border: none; }
.schedule-list li.is-today { 
    color: var(--vert); 
    font-weight: 600;
    background: var(--vert-pale);
    margin: 0 -1.5rem;
    padding: 0.6rem 1.5rem;
}


/* ─── PERMANENCES ───────────────── */
.permanences-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.perm-card {
  background: var(--blanc);
  border: 1px solid rgba(200,191,176,0.4);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.22s;
}

.perm-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(42,37,32,0.08);
  border-color: rgba(58,90,64,0.2);
}

.perm-card-head {
  padding: 1rem 1.25rem;
  background: var(--vert-pale);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border-bottom: 1px solid rgba(200,191,176,0.2);
}

.perm-card-head svg {
  stroke: var(--vert);
  flex-shrink: 0;
}

.perm-card-head span {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--texte);
}

.perm-card-body {
  padding: 1.4rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.perm-card-name {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--vert);
}

.perm-horaires {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.perm-horaire-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  border-bottom: 1px dashed rgba(200,191,176,0.3);
  padding-bottom: 0.4rem;
}

.perm-horaire-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.perm-day {
  font-weight: 500;
  color: var(--texte);
}

.perm-hours {
  color: var(--gris);
  text-align: right;
}

.perm-note {
  margin-top: auto;
  font-size: 0.8rem;
  color: var(--bois);
  background: var(--creme);
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  border-left: 3px solid var(--pierre);
  line-height: 1.4;
}

@media (max-width: 680px) {
  .permanences-grid {
    grid-template-columns: 1fr;
  }
}


/* ── LIGNES DE BUS ───────────────────────── */

.lignes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.ligne-card {
  background: var(--blanc);
  border: 1px solid rgba(200,191,176,0.4);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.22s;
  
  /* Flexbox vertical pour l'alignement des éléments internes */
  display: flex;
  flex-direction: column;
  height: 100%;
}

.ligne-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(42,37,32,0.08);
  border-color: rgba(58,90,64,0.2);
}

.ligne-head {
  padding: 1rem 1.25rem;
  background: var(--vert-pale);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-grow: 1; /* Permet d'égaliser la hauteur des entêtes */
}

.ligne-num {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--vert);
  line-height: 1;
  min-width: 60px;
}

.ligne-head-text {
  display: flex;
  flex-direction: column;
}

.ligne-head-text strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--texte);
  margin-bottom: 0.2rem;
  line-height: 1.2;
}

.ligne-head-text span {
  display: block;
  font-size: 0.72rem;
  color: var(--gris);
  line-height: 1.3;
}

.ligne-badge {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  white-space: nowrap; /* Évite que "RÉSERVATION" passe sur deux lignes */
}

.ligne-badge.reguliere { background: #e8f5e9; color: #2e7d32; }
.ligne-badge.scolaire  { background: #fff3e0; color: #e65100; }
.ligne-badge.reservation { background: rgba(90,137,196,0.12); color: #4070b0; }

.ligne-plan {
  width: 100%;
  display: block;
  border-top: 1px solid rgba(200,191,176,0.3);
  flex-shrink: 0;
}

.ligne-plan img {
  width: 100%;
  display: block;
  max-height: 160px;
  object-fit: cover;
  object-position: center;
}

.ligne-footer {
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto; /* Pousse le footer au niveau de la bordure basse de la carte */
  flex-shrink: 0;
}

.ligne-footer a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--vert);
  text-decoration: none;
  transition: color 0.2s;
}

.ligne-footer a:hover { color: var(--vert-clair); }
.ligne-footer a svg { stroke: currentColor; }


/* ─── FORMULAIRE DE CONTACT ───────────────── */
#formulaire-de-contact {
    /* Ajuste la valeur (ex: 80px ou 100px) selon la hauteur de ton menu fixe */
    scroll-margin-top: 100px; 
}

.contact-card h3 {
  display: flex;
  align-items: center; /* Aligne l'icône et le texte sur le même axe central */
  gap: 0.5rem;         /* Remplace le margin-right du SVG */
  margin-bottom: 1rem;
  font-family: 'Playfair Display', serif;
  color: var(--vert);
}

.contact-card h3 svg {
  /* On descend l'icône de 1 ou 2 pixels pour l'équilibrer à l'œil */
  transform: translateY(1px); 
  
  /* On s'assure qu'il n'y a pas de marges parasites */
  margin: 0;
  flex-shrink: 0;
}

.contact-form {
  background: var(--blanc);
  border: 1px solid rgba(200,191,176,0.4);
  border-radius: 16px;
  padding: 2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--texte);
  margin-bottom: 0.5rem;
}

.form-group .required {
  color: var(--vert);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--texte);
  background: var(--creme);
  border: 1.5px solid rgba(200,191,176,0.4);
  border-radius: 8px;
  transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--vert);
  background: var(--blanc);
  box-shadow: 0 0 0 3px rgba(58,90,64,0.08);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%233a5a40' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* Style spécifique pour les cases à cocher RGPD */
.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-bottom: 1.5rem;
}

.checkbox-content {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 0.15rem;
  cursor: pointer;
  accent-color: var(--vert);
}

.form-checkbox label {
  font-size: 0.85rem;
  color: var(--gris);
  line-height: 1.5;
  cursor: pointer;
}

.form-checkbox label a {
  color: var(--vert);
  text-decoration: none;
  font-weight: 500;
}

.form-checkbox label a:hover {
  text-decoration: underline;
}


/* --- Style du déclencheur "En savoir plus" --- */
.rgpd-trigger {
  color: var(--vert);
  font-weight: 500;
  cursor: pointer;
  margin-left: 0.25rem;
}

.rgpd-trigger:hover {
  text-decoration: underline;
}

/* --- Bloc d'informations RGPD (Style épuré) --- */
.rgpd-info {
  width: 100%;
  overflow: hidden;
}

.rgpd-info-content {
  margin-top: 0.6rem;
  padding: 0.85rem 1rem;
  background: var(--creme); /* Utilise ton fond doux existant */
  border-left: 2px stroke var(--pierre); /* Discret rappel de texture */
  border-radius: 8px;
}

.rgpd-info-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rgpd-info-content li {
  font-size: 0.8rem;
  color: var(--texte);
  line-height: 1.4;
}

.rgpd-info-content li strong {
  color: var(--vert-clair); /* Met en valeur les thématiques sans agresser */
}

.rgpd-info-content li a {
  color: var(--vert);
  text-decoration: none;
}

.rgpd-info-content li a:hover {
  text-decoration: underline;
}

/* Bouton submit */
.contact-form button[type="submit"] {
  width: 100%;
  justify-content: center;
}

/* Réponses formulaire */
.form-response {
  margin-top: 1.5rem;
}

.form-loading {
  padding: 1rem 1.5rem;
  background: var(--vert-pale);
  border-left: 3px solid var(--vert);
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--texte);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.form-success {
  padding: 1.5rem;
  background: #e8f5e9;
  border-left: 3px solid #2e7d32;
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.form-success svg {
  flex-shrink: 0;
  margin-top: 0.15rem;
  stroke: #2e7d32;
}

.form-success strong {
  display: block;
  font-size: 1rem;
  color: #2e7d32;
  margin-bottom: 0.3rem;
}

.form-success p {
  font-size: 0.9rem;
  color: #555;
  margin: 0;
}

.form-error {
  padding: 1.5rem;
  background: #ffebee;
  border-left: 3px solid #c62828;
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.form-error svg {
  flex-shrink: 0;
  margin-top: 0.15rem;
  stroke: #c62828;
}

.form-error strong {
  display: block;
  font-size: 1rem;
  color: #c62828;
  margin-bottom: 0.3rem;
}

.form-error p {
  font-size: 0.9rem;
  color: #555;
  margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .contact-form {
    padding: 1.5rem;
  }
}

/* Cache le select d'origine mais le garde fonctionnel pour le form */
.custom-select-container select {
    display: none;
}

.custom-select-wrapper {
    position: relative;
    user-select: none;
    z-index: 10;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.2rem;
    font-size: 0.95rem;
    color: var(--texte);
    background: var(--creme);
    border: 1.5px solid rgba(200,191,176,0.4);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.custom-select-trigger:after {
    content: '';
    width: 10px;
    height: 10px;
    border-bottom: 2px solid var(--vert);
    border-right: 2px solid var(--vert);
    transform: rotate(45deg);
    margin-top: -4px;
    transition: all 0.3s;
}

.custom-select-wrapper.open .custom-select-trigger:after {
    transform: rotate(-135deg);
    margin-top: 4px;
}

.custom-options {
    position: absolute;
    display: block;
    top: 100%; left: 0; right: 0;
    background: var(--blanc);
    border: 1px solid var(--vert);
    border-radius: 8px;
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.custom-select-wrapper.open .custom-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-option {
    padding: 10px 1.2rem;
    cursor: pointer;
    transition: background 0.2s;
}

.custom-option:hover {
    background: var(--vert-pale);
    color: var(--vert);
}

/* Style pour les titres de groupes (optgroup) */
.custom-group-label {
    padding: 10px 1.2rem 5px;
    font-weight: 700;
    color: var(--vert);
    font-size: 0.8rem;
    text-transform: uppercase;
    background: #f9f9f9;
}

/* Bordure d'alerte si le sélecteur customisé est oublié */
.custom-select-wrapper.select-error .custom-select-trigger {
    border-color: #c62828 !important;
    background-color: #fff8f8 !important;
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.08) !important;
}

/* ── ONGLETS ─────────────────────────────── */

.tabs-bar {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--pierre);
  padding-bottom: 0.75rem;
  
  /* AJOUTS POUR ACTIVER LE RETOUR À LA LIGNE */
  flex-wrap: wrap;        /* Permet aux onglets de passer à la ligne */
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--gris);
  transition: all 0.2s;
  white-space: nowrap;
}

.tab-btn svg { stroke: currentColor; flex-shrink: 0; }

.tab-btn:hover {
  color: var(--texte);
  background: rgba(200,191,176,0.25);
}

.tab-btn.active {
  background: var(--blanc);
  color: var(--vert);
  box-shadow: 0 1px 6px rgba(42,37,32,0.08);
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }


/* ── SYSTÈME DE PREVIEW PDF CENTRALISÉ ── */
.pdf-preview-container {
  position: relative;
  background: #f4f1ec;
  overflow: hidden;
  display: block;
}

/* L'animation Skeleton */
.pdf-preview-container::before {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(90deg, #f4f1ec 25%, #eae6df 50%, #f4f1ec 75%);
  background-size: 200% 100%;
  animation: loadingSkeleton 1.6s infinite linear;
  z-index: 1;
  transition: opacity 0.4s ease-out;
}

/* Arrêt de l'animation */
.pdf-preview-container.loaded::before,
.pdf-preview-container:has(.pdf-fallback-placeholder)::before {
  opacity: 0;
  pointer-events: none;
  animation: none;
}

/* Le Canvas du PDF */
canvas.pdf-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  opacity: 0;
  transition: opacity 0.4s ease-out, transform 0.35s ease;
  z-index: 2;
  position: relative;
}

canvas.pdf-preview.ready {
  opacity: 1;
}

/* Le Placeholder statique en cas d'erreur/absence */
.pdf-fallback-placeholder {
  width: 100%;
  height: 100%;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--vert-pale);
}

.pdf-fallback-placeholder svg {
  stroke: var(--vert);
  opacity: 0.3;
}

@keyframes loadingSkeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


/* ─── FOOTER ──────────────────────────────── */

footer {
  background: var(--texte);
  padding: 3.5rem 2.5rem 2rem;
}
.footer-inner {
  max-width: 1140px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}

/* Badge blason dans le footer : pas de cercle vert, juste l'image */
.footer-brand .nav-logo-badge {
  background: none;
  width: auto; height: auto;
}
.footer-brand .nav-logo-text strong { font-size: 1rem; color: var(--blanc); }
.footer-brand .nav-logo-text span { color: rgba(255,255,255,.4); }
.footer-brand .nav-logo:hover .nav-logo-text strong { color: var(--vert-clair); }

.footer-desc { color: rgba(255,255,255,.45); font-size: .82rem; line-height: 1.7; margin-top: 1rem; }
.footer-contact { margin-top: 1.2rem; }
.footer-contact p { color: rgba(255,255,255,.55); font-size: .8rem; line-height: 1.9; }
.footer-contact a { color: rgba(255,255,255,.55); text-decoration: none; }
.footer-contact a:hover { color: rgba(255,255,255,.8); }
.footer-tel { color: rgba(255,255,255,.7); }

.footer-col h4 {
  color: var(--blanc); font-size: .78rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: .55rem; }
.footer-col ul a {
  text-decoration: none; color: rgba(255,255,255,.45);
  font-size: .82rem; transition: color .2s;
}
.footer-col ul a:hover { color: var(--vert-clair); }

.footer-bottom {
  max-width: 1140px; margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.footer-bottom p { color: rgba(255,255,255,.3); font-size: .75rem; }
.footer-bottom a { color: rgba(255,255,255,.3); text-decoration: none; }
.footer-bottom a:hover { color: rgba(255,255,255,.6); }
.copyright { text-decoration: underline; }


/* ─── ANIMATIONS ──────────────────────────── */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes scrollPulse {
  0%, 100% { opacity: .3; transform: scaleY(1); }
  50%       { opacity: 1;  transform: scaleY(1.15); }
}

.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s, transform .7s; }
.reveal.visible { opacity: 1; transform: none; }




/* ─── RESPONSIVE ──────────────────────────── */

@media (max-width: 992px) { /* On cible aussi les tablettes */
  .infobande {
    gap: 1.5rem; /* Espace vertical et horizontal plus cohérent */
    padding: 1.2rem;
    justify-content: space-evenly; /* Distribue l'espace de façon égale autour des items */
  }
  
  .infobande-item {
    flex: 0 1 auto; /* L'item prend juste la place dont il a besoin */
    min-width: 200px; /* Force un peu de largeur pour éviter que tout soit collé */
    justify-content: center; /* Centre le contenu à l'intérieur de l'item */
  }
}

@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .actu-grid    { grid-template-columns: 1fr; }
  .village-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .village-photos { margin-top: .5rem; }
  .tabs-bar {
    gap: 0.375rem;        /* Rapproche un poil les onglets sur petit écran */
    margin-bottom: 2rem;
  }
  
  .tabs-bar::-webkit-scrollbar { display: none; } /* Cache scroll Chrome/Safari */

  .tab-btn {
    flex: 0 0 auto; /* Empêche les boutons de rétrécir */
    padding: 0.65rem 1.1rem; /* On réduit un peu le padding */
  }
}

@media (max-width: 700px) {
  .infobande { gap: 1rem 2rem; padding: 1rem 1.4rem; justify-content: center;  }
}

@media (max-width: 640px) {
  .maire-inner {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
    gap: 1.5rem;
  }
  .maire-photo { width: 110px; height: 110px; }
  .maire-section::before { font-size: 12rem; }
}

@media (max-width: 600px) {
  .section         { padding: 3.5rem 1.4rem; }
  .first-section   { padding-top: calc(3.5rem + 68px) !important; }
  .hero-content    { padding: 0 1.4rem 4rem; }
  .hero-actions    { flex-direction: column; }
  .hero-actions .btn { justify-content: center; }
  .actu-main-body  { padding: 1.2rem; }
  .actu-main-title { font-size: 1.15rem; }
  .actu-footer     { text-align: center; }
}

@media (max-width: 560px) {
  footer { padding: 2.5rem 1.4rem 1.5rem; }
  .footer-bottom { flex-direction: column; text-align: center; gap: .5rem; }
}

@media (max-width: 480px) {
  /* Accès rapides : 2 colonnes */
  .acces-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .acces-card { padding: 1.1rem .75rem; }

  /*
    Photos village : sur mobile on passe en colonne unique.
    La grande photo garde un ratio 16/9, les deux petites
    reprennent leur ratio 4/3 — plus rien ne disparaît.
  */
  .village-photos { grid-template-columns: 1fr; }
  .village-photo:first-child { grid-column: span 1; aspect-ratio: 16/9; }
  .village-photo { aspect-ratio: 4/3; }

  .footer-inner { grid-template-columns: 1fr; }
}


@media print {
  /* 1. FORCE LE TEXTE ET LE DÉFILEMENT À DEVENIR NORMAUX */
  html, body {
    overflow: visible !important;
    overflow-x: visible !important;
    height: auto !important;
    position: static !important; /* Annule les positionnements fixes/absolus du body */
  }

  /* 2. DÉSACTIVE L'ACCÉLÉRATION GRAPHIQUE QUI TRANSFORME LE TEXTE EN IMAGE */
  *, *::before, *::after {
    will-change: auto !important;
    transform: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    mix-blend-mode: normal !important;
  }

  /* 3. ZÉRO MARGE SUR LA PAGE (Supprime aussi l'URL, la date et le titre du navigateur) */
  @page {
    margin: 0;
  }
  body {
    margin: 0;
    padding: 0;
  }

  /* 4. FORCE TOUS LES "SCROLL REVEAL" À S'ACTIVER ET ÊTRE VISIBLES */
  .reveal, 
  [class*="reveal"],
  [data-sr-id] {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }

  /* 5. Force le rendu des couleurs pour le dégradé du header */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* 6. Fond blanc pur pour tout le reste du PDF */
  body, html, main, .section, .tab-content, .tab-pane {
    background: #ffffff !important;
    color: #111111 !important;
  }

  .village-section {
    background: var(--texte) !important;
  }

  /* 7. Nettoyage des éléments d'interface inutiles */
  nav, footer, .page-header::before {
    display: none !important;
  }

  /* 8. Ajustement du Header */
  .page-header {
    padding: 4rem 2.5rem !important;
  }

  /* 9. GESTION DES ONGLETS : On n'affiche QUE l'onglet actif et son bouton */
  .tab-btn:not(.active) {
    display: none !important;
  }

  .tab-pane {
    display: none !important;
  } 

  /*
  .tabs-bar,
  .tab-btn,
  .tab-content,
  .tab-pane {
    display: none !important;
  }
  
  Si besoin de cacher les onglets */
  
  .tab-pane.active {
    display: block !important;
    opacity: 1 !important;
  }

  /* 10. FORCE L'OUVERTURE DE TOUTES LES COMMISSIONS (<details>) */
  details.comm-item {
    display: block !important;
    height: auto !important;
  }

  /* LE SECRET POUR LES NAVIGATEURS MODERNES :
     On court-circuicte le comportement natif du Shadow DOM qui masque le contenu */
  details.comm-item::details-content {
    display: block !important;
    content-visibility: visible !important; /* Force le rendu du texte masqué */
    visibility: visible !important;
    height: auto !important;
  }

  /* Sécurité pour forcer le bloc interne et ses enfants à s'afficher */
  details.comm-item .comm-body {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    padding: 0.5rem 0 1rem 1.5rem !important; /* Optionnel : léger ajustement des marges pour le PDF */
  }

  /* Conserve la structure en colonnes des lignes (Présidente, Titulaires...) */
  details.comm-item .comm-row {
    display: flex !important;
  }

  /* Force le chevron à tourner vers le bas pour simuler l'état déplié */
  details.comm-item .comm-chevron {
    transform: rotate(90deg) !important;
  }

  /* Évite de couper un bloc de commission en deux au changement de page du PDF */
  .comm-item {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }
}