/* ==========================================================================
   Commune de Pessan — direction « Carte postale »
   Feuille de style d'après le cahier de style validé par le conseil (juillet 2026).

   ÉCARTS ASSUMÉS PAR RAPPORT AU CAHIER — tous pour cause d'accessibilité (RGAA,
   obligation légale pour un site communal). Chaque valeur a été mesurée :
     · texte des boutons abricot : encre et non blanc (blanc sur abricot = 2,17:1) ;
     · terre cuite assombrie #C06A34 -> #9D572B (3,28:1 sur sable -> 4,57:1) ;
     · liens du pied de page #7BA3A9 -> #ADC6C9 (2,98:1 -> 4,55:1).
   Tout le reste suit le cahier.
   ========================================================================== */

:root {
  /* ---- palette --------------------------------------------------------- */
  --creme:          #FBF7EF;   /* fond général des pages             */
  --sarcelle:       #2F6D78;   /* titres, liens, panneaux            */
  --sarcelle-fonce: #24565F;   /* pied de page                       */
  --encre:          #2B3A3D;   /* texte courant                      */
  --abricot:        #E8A06A;   /* aplats et boutons d'action         */
  --terre-cuite:    #9D572B;   /* texte d'accent (corrigé RGAA)      */
  --bleu-gris:      #EAF1F2;   /* bandeau, tuiles, encadrés          */
  --sable:          #FCE7D5;   /* tuiles alternées                   */
  --lien-pied:      #ADC6C9;   /* liens sur sarcelle foncé (corrigé) */
  --blanc:          #FFFFFF;

  --trait:      rgba(47,109,120,.16);
  --trait-fort: rgba(47,109,120,.32);

  /* ---- rayons d'angle -------------------------------------------------- */
  --r-pilule: 999px;
  --r-cadre:  24px;   /* cadre photo « carte postale » */
  --r-carte:  18px;
  --r-image:  16px;

  /* ---- ombres portées -------------------------------------------------- */
  --ombre-heros: 0 14px 40px rgba(47,109,120,.16);
  --ombre-page:  0 20px 60px rgba(47,109,120,.16);
  --ombre-douce: 0 4px 16px rgba(47,109,120,.10);

  /* ---- espacements et grille ------------------------------------------- */
  --marge:   56px;
  --gap:     24px;
  --largeur: 1440px;

  /* ---- typographie ----------------------------------------------------- */
  --titres: "Lora", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --texte:  "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ==========================================================================
   Polices auto-hébergées — voir polices/LISEZMOI.txt
   Tant que les fichiers ne sont pas déposés, la pile de repli ci-dessus prend
   le relais : le site reste lisible et correctement proportionné.
   ========================================================================== */
@font-face { font-family: "Lora"; font-style: normal; font-weight: 400 600;
  font-display: swap; src: url("polices/lora-variable.woff2") format("woff2"); }
@font-face { font-family: "Lora"; font-style: italic; font-weight: 400;
  font-display: swap; src: url("polices/lora-italique.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 600;
  font-display: swap; src: url("polices/figtree-variable.woff2") format("woff2"); }

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  /* animations réduites : on n'affiche pas la vidéo de fond, seulement son image */
  .cliche-video { display: none !important; }
}

body {
  margin: 0;
  background: var(--creme);
  color: var(--encre);
  font-family: var(--texte);
  font-weight: 300;
  font-size: clamp(15px, .3vw + 14px, 17px);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--sarcelle); text-decoration: underline; text-underline-offset: .18em; }
a:hover { color: var(--sarcelle-fonce); }

a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--terre-cuite);
  outline-offset: 2px;
  border-radius: 4px;
}

h1, h2, h3, h4 { font-family: var(--titres); font-weight: 600; color: var(--sarcelle); line-height: 1.2; margin: 0; }
h3, h4 { font-weight: 500; }
ul, ol, p { margin: 0 0 1rem; }

.conteneur { width: min(100% - 2 * var(--marge), var(--largeur)); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--sarcelle-fonce); color: var(--blanc);
  padding: .8rem 1.4rem; border-radius: 0 0 var(--r-carte) 0; font-weight: 500;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.mention-proto {
  background: var(--terre-cuite); color: var(--blanc);
  text-align: center; padding: .45rem 1rem; font-size: .8rem;
  letter-spacing: .04em; font-weight: 500;
}

/* ==========================================================================
   Bandeau République — obligatoire, hauteur fixe
   ========================================================================== */
.bandeau-rf {
  background: var(--bleu-gris);
  border-bottom: 1px solid var(--trait);
  font-size: .78rem; color: var(--encre);
}
.bandeau-rf .conteneur {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; min-height: 38px; flex-wrap: wrap;
}

/* ==========================================================================
   En-tête — fond crème, sans ombre, séparation par la couleur
   ========================================================================== */
header.principal { background: var(--creme); }

.entete-haut {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding: 1.1rem 0; flex-wrap: wrap;
}

.marque { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: inherit; }

/* Sceau détouré seul, posé nu (écart assumé au cahier, validé pour le fond crème).
   Pas de cadre. La hauteur est fixée EN DUR SUR L'IMAGE : une hauteur en %
   ne s'appliquerait pas ici (le parent n'a pas de hauteur définie) et l'image
   s'afficherait à sa taille naturelle, débordant sous la navigation. */
.blason {
  flex: none; align-self: center;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--titres); font-size: 1.2rem; font-weight: 600; color: var(--sarcelle);
}
.blason img { display: block; width: auto; height: 42px; }
.blason-entete img { height: 58px; }

.titre-site { font-family: var(--titres); font-size: 1.7rem; font-weight: 500; color: var(--sarcelle); line-height: 1.05; }
.sous-titre { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--encre); opacity: .72; }

.coordonnees-entete { font-size: .82rem; text-align: right; line-height: 1.5; }
.coordonnees-entete strong { font-weight: 600; }

/* ==========================================================================
   Navigation principale
   ========================================================================== */
nav.principale { background: var(--creme); border-bottom: 1px solid var(--trait); }
nav.principale .conteneur { display: flex; align-items: center; gap: 1rem; }

nav.principale ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .2rem; flex: 1; }
nav.principale a {
  display: block; padding: .85rem .95rem;
  font-size: .875rem; font-weight: 400; color: var(--encre);
  text-decoration: none; border-radius: var(--r-pilule);
}
nav.principale a:hover { background: var(--bleu-gris); color: var(--sarcelle); }
nav.principale a[aria-current="page"] { color: var(--sarcelle); font-weight: 600; }

.nav-action {
  background: var(--abricot); color: var(--encre) !important;
  font-weight: 600 !important; padding: .7rem 1.5rem !important;
  border-radius: var(--r-pilule); text-decoration: none; white-space: nowrap;
}
.nav-action:hover { background: #DE8F52; color: var(--encre) !important; }

/* Menu : bouton hamburger piloté en JS. Repli sans JS = menu toujours visible. */
.hamburger {
  display: none; align-items: center; gap: .6rem;
  background: none; border: 0; padding: .8rem 0; cursor: pointer;
  font-family: var(--texte); font-size: 1rem; font-weight: 600; color: var(--sarcelle);
}
.barres { display: inline-flex; flex-direction: column; gap: 4px; }
.barres span { display: block; width: 22px; height: 2px; background: var(--sarcelle); border-radius: 2px; }

/* Recherche interne (dropdown alimenté par recherche-index.js) */
.recherche { position: relative; display: flex; align-items: center; }
.recherche input[type="search"] {
  width: 190px; max-width: 42vw; padding: .55rem 2.2rem .55rem .8rem; font: inherit;
  border: 1px solid var(--trait); border-radius: var(--r-pilule);
  background: var(--blanc); color: var(--encre);
}
.recherche input[type="search"]:focus { outline: 2px solid var(--sarcelle); outline-offset: 1px; }
.recherche-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin-left: -40px;
  background: none; border: 0; cursor: pointer; color: var(--sarcelle); font-size: 1.15rem;
}
.recherche-resultats {
  position: absolute; top: calc(100% + 4px); right: 0; z-index: 60;
  list-style: none; margin: 0; padding: .3rem; width: min(340px, 92vw);
  background: var(--blanc); border: 1px solid var(--trait); border-radius: 12px;
  box-shadow: var(--ombre-douce); max-height: 60vh; overflow: auto;
}
.recherche-resultats a { display: block; padding: .5rem .7rem; border-radius: 8px; text-decoration: none; color: var(--encre); }
.recherche-resultats a:hover, .recherche-resultats a:focus { background: var(--bleu-gris); }
.recherche-resultats strong { display: block; color: var(--sarcelle); font-weight: 600; font-size: .92rem; }
.recherche-resultats span { display: block; font-size: .78rem; opacity: .75; }
.recherche-vide { padding: .5rem .7rem; font-size: .88rem; opacity: .7; }

/* En-tête : adresse + bouton d'appel (le bouton reste visible en mobile) */
.coordonnees-entete { display: flex; flex-direction: column; align-items: flex-end; gap: .15rem; }
.entete-tel { font-weight: 600; color: var(--sarcelle); text-decoration: none; white-space: nowrap; }
.entete-tel:hover { text-decoration: underline; }

/* Héros vidéo : bouton lecture / pause (tout mouvement > 5 s doit être arrêtable) */
.cliche-video-hote { position: relative; }
.video-controle {
  position: absolute; z-index: 3; right: 16px; bottom: 16px;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.75); background: rgba(43,58,61,.55);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.video-controle:focus-visible { outline: 2px solid var(--blanc); outline-offset: 2px; }
.video-ic { display: block; }
.video-controle.en-lecture .video-ic { width: 12px; height: 14px; box-sizing: border-box; border-left: 4px solid #fff; border-right: 4px solid #fff; }
.video-controle:not(.en-lecture) .video-ic { width: 0; height: 0; border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 12px solid #fff; margin-left: 3px; }

/* Badge « ouvert / fermé actuellement » (mairie) */
.statut-horaires { display: block; margin-bottom: .5rem; }
.statut-mairie { display: inline-block; margin-left: .5rem; padding: .12rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 600; vertical-align: middle; }
.statut-mairie.est-ouvert { background: #E2F0E3; color: #245a30; }
.statut-mairie.est-ferme { background: #F3E1DC; color: #8c2f28; }

/* ==========================================================================
   Boutons — toujours en pilule
   ========================================================================== */
.bouton, .bouton-plein, .bouton-contour, .bouton-abricot, .bouton-sable {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: 14px 26px; min-height: 44px;             /* cible tactile RGAA */
  border-radius: var(--r-pilule);
  font-family: var(--texte); font-size: .95rem; font-weight: 600;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.bouton-plein { background: var(--sarcelle); color: var(--blanc); }
.bouton-plein:hover { background: var(--sarcelle-fonce); color: var(--blanc); }

/* abricot : texte encre et non blanc — blanc sur abricot ne fait que 2,17:1 */
.bouton-abricot { background: var(--abricot); color: var(--encre); }
.bouton-abricot:hover { background: #DE8F52; color: var(--encre); }

.bouton-sable { background: var(--sable); color: var(--terre-cuite); }
.bouton-sable:hover { background: #F8D9BF; color: var(--terre-cuite); }

.bouton-contour { background: transparent; color: var(--sarcelle); border-color: var(--sarcelle); }
.bouton-contour:hover { background: var(--sarcelle); color: var(--blanc); }

/* ==========================================================================
   Héros « carte postale » — signature de la direction
   ========================================================================== */
.heros-carte {
  background: var(--blanc); padding: 14px;
  border-radius: var(--r-cadre); box-shadow: var(--ombre-heros);
  margin: 2.2rem 0 1.6rem; position: relative;
}
.heros-carte .cliche {
  position: relative; border-radius: var(--r-image); overflow: hidden;
  min-height: clamp(300px, 42vw, 520px);
  /* background-COLOR seulement : le raccourci « background » remettrait
     l'image de fond à zéro et, plus spécifique que « .media-hero », il
     empêcherait la photo du héros de s'afficher. */
  background-color: var(--bleu-gris);
  background-size: cover; background-position: center; background-repeat: no-repeat;
  display: flex; align-items: flex-end;
}
/* dégradé sombre en bas : c'est lui qui rend le titre lisible sur la photo */
.heros-carte .cliche::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(23,48,53,.80) 0%, rgba(23,48,53,.36) 34%, rgba(23,48,53,0) 64%);
}
/* fond animé du héros : la boucle drone couvre le cliché, sous le dégradé et le texte.
   L'image « poster » s'affiche pendant le chargement, sur mobile et si les animations
   sont réduites — la vidéo ne se substitue jamais à un contenu, elle décore. */
.cliche-video-hote { background-image: url("images/hero-video-poster.jpg"); }
.cliche-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border: 0; z-index: 0; pointer-events: none;
}
.heros-carte .cliche::after { z-index: 1; }
.heros-carte .legende-cliche { position: relative; z-index: 2; padding: clamp(1.2rem, 3vw, 2.4rem); color: var(--blanc); }
.heros-carte .accroche {
  font-family: var(--titres); font-style: italic; font-weight: 400;
  font-size: clamp(1.1rem, 1.6vw, 1.5rem); color: var(--blanc); margin: 0 0 .1rem;
}
.heros-carte h1, .heros-carte .titre-heros {
  font-family: var(--titres); font-weight: 600; color: var(--blanc);
  font-size: clamp(40px, 5.6vw, 82px); line-height: 1.02; margin: 0;
  text-shadow: 0 2px 18px rgba(15,35,40,.5);
}
.heros-carte .intro-heros {
  color: var(--blanc); max-width: 46ch; margin: .7rem 0 0;
  font-size: clamp(.95rem, .9vw + .6rem, 1.1rem);
  text-shadow: 0 1px 10px rgba(15,35,40,.6);
}

/* la vignette « timbre » — élément identitaire, à conserver */
.timbre {
  position: absolute; top: 30px; right: 30px; z-index: 2;
  width: clamp(64px, 7vw, 96px); aspect-ratio: 3 / 4;
  border: 3px solid var(--blanc); border-radius: 4px;
  box-shadow: 0 6px 18px rgba(15,35,40,.32);
  transform: rotate(4deg);
  background: var(--sable) center/cover no-repeat;
}

.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.4rem 0 0; }

/* ==========================================================================
   Bandeau de page intérieure
   ========================================================================== */
.banniere-page { padding: 2.2rem 0 0; }
.fil-ariane { font-size: .82rem; color: var(--encre); opacity: .78; margin: 0 0 .5rem; }
.fil-ariane a { color: var(--sarcelle); }
.banniere-page h1, .banniere-page h2 {
  font-family: var(--titres); font-weight: 600; color: var(--sarcelle);
  font-size: clamp(32px, 3.6vw, 56px); line-height: 1.1; margin: 0;
}
.banniere-page .chapo { max-width: 62ch; margin: .8rem 0 0; font-size: 1.05rem; }

/* sous-navigation : les sections de la rubrique */
.sous-nav { margin: 1.4rem 0 .4rem; }
.sous-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.sous-nav a {
  display: inline-block; padding: .5rem 1.1rem; min-height: 40px; line-height: 1.7;
  background: var(--bleu-gris); color: var(--sarcelle);
  border-radius: var(--r-pilule); text-decoration: none; font-size: .875rem; font-weight: 500;
}
.sous-nav a:hover { background: var(--sarcelle); color: var(--blanc); }

/* ==========================================================================
   Sections et titres
   ========================================================================== */
section.bloc { padding: 2.2rem 0 3rem; }

.surtitre, .etiquette {
  display: inline-block;
  font-size: .69rem; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 500; color: var(--terre-cuite); margin-bottom: .35rem;
}
.titre-section {
  font-family: var(--titres); font-weight: 500; color: var(--sarcelle);
  font-size: clamp(24px, 2.2vw, 32px); line-height: 1.2; margin: 0 0 1rem;
}
.intro-section { margin-top: -.5rem; margin-bottom: 1.4rem; max-width: 66ch; }

.contenu h2 {
  font-family: var(--titres); font-weight: 500; color: var(--sarcelle);
  font-size: clamp(22px, 1.9vw, 28px); margin: 2.2rem 0 .6rem; scroll-margin-top: 1.5rem;
}
.contenu h2:first-child { margin-top: 0; }
.contenu h3 {
  font-family: var(--titres); font-weight: 600; color: var(--sarcelle);
  font-size: clamp(18px, 1.5vw, 21px); margin: 1.6rem 0 .4rem; scroll-margin-top: 1.5rem;
}
.contenu h4 { font-size: 1.1rem; margin: 1.3rem 0 .35rem; }
.contenu p, .contenu ul { max-width: 72ch; }
.contenu ul { padding-left: 1.3rem; }
.contenu li { margin-bottom: .35rem; }

.deux-colonnes {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 3rem); align-items: start;
}
.encadre { background: var(--bleu-gris); border-radius: var(--r-carte); padding: 1.5rem 1.6rem; position: sticky; top: 1rem; }
.encadre h3 { font-size: 1.15rem; margin: 0 0 .4rem; }
.encadre p:last-child { margin-bottom: 0; }

figure.media-page { margin: 1.4rem 0; }
figure.media-page img { width: 100%; height: auto; border-radius: var(--r-image); box-shadow: var(--ombre-douce); }
figure.media-page figcaption { font-size: .84rem; color: var(--encre); opacity: .75; margin-top: .5rem; }
/* photo insérée au fil du texte (repli quand elle n'est pas isolée en paragraphe) */
.media-inline { max-width: 100%; height: auto; border-radius: var(--r-image); box-shadow: var(--ombre-douce); margin: .8rem 0; display: block; }
/* trois tailles d'affichage, choisies à l'insertion (petite / moyenne / grande) */
figure.media-page.media-petite  { max-width: 280px; }
figure.media-page.media-moyenne { max-width: 520px; }
figure.media-page.media-grande  { max-width: 100%; }
.media-inline.media-petite  { max-width: 280px; }
.media-inline.media-moyenne { max-width: 520px; }
.media-inline.media-grande  { max-width: 100%; }

/* ==========================================================================
   Tuiles d'accès rapide — alternance bleu-gris / sable
   ========================================================================== */
.acces-rapide { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin: 1.6rem 0; }
.tuile {
  display: block; padding: 1.4rem 1.5rem; min-height: 100px;
  border-radius: var(--r-carte); text-decoration: none;
  background: var(--bleu-gris); color: var(--encre);
  transition: transform .15s ease, box-shadow .15s ease;
}
.tuile:nth-child(even) { background: var(--sable); }
.tuile:hover { transform: translateY(-3px); box-shadow: var(--ombre-douce); }
.tuile .titre {
  display: block; font-family: var(--titres); font-weight: 500;
  font-size: clamp(20px, 1.5vw, 22px); color: var(--sarcelle); margin-bottom: .2rem;
}
.tuile:nth-child(even) .titre { color: var(--terre-cuite); }
.tuile .detail { display: block; font-size: .87rem; color: var(--encre); opacity: .85; }
.tuile .icone { display: block; margin-bottom: .5rem; opacity: .8; }

/* ==========================================================================
   Actualité à la une et grille de cartes
   ========================================================================== */
.une-et-agenda { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--gap); }

.carte { border-radius: var(--r-carte); overflow: hidden; }
.carte .media { display: block; height: 220px; border-radius: var(--r-carte); background: var(--bleu-gris) center/cover no-repeat; }
.carte .corps { padding: .9rem .1rem 0; }
.carte h3 { font-family: var(--titres); font-weight: 500; color: var(--sarcelle); font-size: clamp(20px, 1.5vw, 22px); margin: .2rem 0 .4rem; }
.carte h3 a { color: inherit; text-decoration: none; }
.carte h3 a:hover { text-decoration: underline; }
.carte p, .carte .carte-resume { margin: 0 0 .6rem; font-size: .95rem; }
.carte .lire { font-weight: 500; font-size: .9rem; }

/* Page d'une actualité */
.article-actu .surtitre { margin-bottom: 1rem; }
.article-actu .retour-actus { margin-top: 2rem; }
.article-actu .retour-actus a { font-weight: 600; }

.media-eglise   { background-image: url("images/eglise.jpg"), url("images/eglise-placeholder.svg"); }
.media-village  { background-image: url("images/village.jpg"), url("images/village-placeholder.svg"); }
.media-campagne { background-image: url("images/campagne.jpg"), url("images/campagne-placeholder.svg"); }
.media-fetes    { background-image: url("images/fetes.jpg"), url("images/fetes-placeholder.svg"); }
.media-mairie   { background-image: url("images/mairie.jpg"), url("images/mairie-placeholder.svg"); }
.media-hero     { background-image: url("images/hero.jpg"), url("images/hero-placeholder.svg"); }

/* ==========================================================================
   Panneau agenda — fond sarcelle plein
   ========================================================================== */
.panneau-agenda { background: var(--sarcelle); color: var(--blanc); border-radius: var(--r-carte); padding: 1.6rem 1.7rem; }
.panneau-agenda .surtitre { color: var(--blanc); opacity: .85; }
.panneau-agenda .titre-section, .panneau-agenda h2 { color: var(--blanc); font-size: 1.5rem; margin-bottom: 1rem; }
.panneau-agenda a { color: var(--blanc); }
.panneau-agenda .agenda-item { border-bottom: 1px solid rgba(255,255,255,.22); }
.panneau-agenda .agenda-item:last-of-type { border-bottom: 0; }
.panneau-agenda .agenda-item h3, .panneau-agenda .agenda-item h4 { color: var(--blanc); }

.agenda-liste { display: flex; flex-direction: column; }
.agenda-item { display: flex; gap: 1rem; align-items: baseline; padding: .8rem 0; border-bottom: 1px solid var(--trait); }
.agenda-item:last-of-type { border-bottom: 0; }
.agenda-date { flex: none; min-width: 84px; font-weight: 600; font-size: .95rem; }
.agenda-date .jour { margin-right: .25rem; }
.agenda-date .mois { text-transform: lowercase; }
.agenda-item h3, .agenda-item h4 { font-family: var(--texte); font-size: .98rem; font-weight: 600; color: inherit; margin: 0 0 .1rem; }
.agenda-item p { margin: 0; font-size: .87rem; opacity: .85; }

.tout-voir { margin-top: 1.1rem; }

/* ==========================================================================
   Encadré promotionnel — service en ligne
   ========================================================================== */
.promo { background: var(--sarcelle); color: var(--blanc); border-radius: var(--r-carte); padding: 2rem 2.2rem; margin: 2.4rem 0; }
.promo .surtitre { color: var(--blanc); opacity: .85; }
.promo .titre-section, .promo h2 { color: var(--blanc); margin-bottom: .5rem; }
.promo p { max-width: 60ch; margin: 0 0 1.2rem; }

/* ==========================================================================
   Formulaires
   ========================================================================== */
form.contact { max-width: 620px; }
form.contact > div { margin-bottom: 1.1rem; }
form.contact label { display: block; font-weight: 500; margin-bottom: .35rem; font-size: .92rem; }
form.contact input, form.contact textarea, form.contact select {
  width: 100%; padding: .75rem .9rem; min-height: 44px;
  font: inherit; color: var(--encre); background: var(--blanc);
  border: 1.5px solid var(--trait-fort); border-radius: 12px;
}
form.contact textarea { min-height: 140px; resize: vertical; }
form.contact .aide { font-size: .82rem; opacity: .8; margin: .35rem 0 0; }
form.contact button {
  background: var(--sarcelle); color: var(--blanc); border: 0;
  border-radius: var(--r-pilule); padding: 14px 30px; min-height: 44px;
  font-family: var(--texte); font-size: .95rem; font-weight: 600; cursor: pointer;
}
form.contact button:hover { background: var(--sarcelle-fonce); }
.champ-invisible { position: absolute !important; left: -9999px !important; }

/* ==========================================================================
   Salle des fêtes — calendrier public de disponibilité
   Les états reprennent les trois couleurs de la charte : libre en bleu-gris,
   partiellement occupé en sable, complet en terre cuite atténuée. Chaque état
   est aussi porté par le texte du bouton (title), jamais par la seule couleur.
   ========================================================================== */
/* La grille est bornée à deux mois : au-delà, elle créait une troisième colonne
   vide contre laquelle le bouton « Mois suivants » allait se coller, très à
   droite des calendriers. */
#calendrier-salle {
  display: grid; gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  max-width: 760px;
  margin: 1.2rem 0;
}
table.calendrier-mois {
  border-collapse: collapse; width: 100%; table-layout: fixed;  /* sans quoi les
      7 colonnes réclament plus large que leur case de grille, et le dimanche
      se fait rogner par le arrondi en overflow:hidden */
  background: var(--blanc); border-radius: var(--r-carte);
  box-shadow: var(--ombre-douce); overflow: hidden;
}
table.calendrier-mois caption {
  font-family: var(--titres); font-weight: 500; font-size: 1.05rem;
  color: var(--sarcelle); background: var(--bleu-gris);
  padding: .7rem; text-transform: capitalize;
}
table.calendrier-mois th { font-size: .7rem; color: var(--encre); opacity: .7; padding: .5rem 0 .3rem; text-transform: uppercase; letter-spacing: .06em; }
table.calendrier-mois td { text-align: center; padding: 3px 2px; }
table.calendrier-mois button.jour {
  width: 100%; max-width: 40px; aspect-ratio: 1 / 1;
  margin: 0 auto; display: grid; place-items: center;
  border-radius: 50%; border: 0;
  font: inherit; font-size: .87rem; font-weight: 500; cursor: pointer;
  background: var(--bleu-gris); color: var(--encre);
  transition: transform .12s ease;
}
table.calendrier-mois button.jour:hover:not(.passe) { transform: scale(1.08); }
table.calendrier-mois button.jour:focus-visible { outline: 3px solid var(--terre-cuite); outline-offset: 2px; }
table.calendrier-mois button.partiel { background: var(--sable); color: var(--terre-cuite); font-weight: 700; }
table.calendrier-mois button.complet { background: #F2D3C6; color: #8C2F28; font-weight: 700; }
table.calendrier-mois button.passe { background: transparent; color: #77868A; cursor: default; font-weight: 400; }
table.calendrier-mois button.choisi { outline: 3px solid var(--sarcelle); outline-offset: 1px; }

.salle-jour-detail {
  grid-column: 1 / -1;
  background: var(--blanc); border-radius: var(--r-carte);
  padding: 1.1rem 1.3rem; box-shadow: var(--ombre-douce); font-size: .95rem;
}
.salle-jour-detail ul { margin: .4rem 0 0; padding-left: 1.3rem; }
.calendrier-vide { background: var(--bleu-gris); border-radius: var(--r-carte); padding: 1.1rem 1.3rem; }

.salle-nav-mois { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: .8rem 1rem; flex-wrap: wrap; }
.salle-nav-mois span { font-size: .84rem; opacity: .8; flex: 1 1 auto; text-align: center; }
.salle-nav-mois button {
  background: var(--sarcelle); color: var(--blanc); border: 0;
  border-radius: var(--r-pilule); padding: .6rem 1.3rem; min-height: 44px;
  font-family: var(--texte); font-weight: 600; font-size: .88rem; cursor: pointer;
}
.salle-nav-mois button:hover:not(:disabled) { background: var(--sarcelle-fonce); }
.salle-nav-mois button:disabled { background: #C4CFD1; color: #4A5658; cursor: default; }

.salle-legende { font-size: .86rem; }
.pastille { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin: 0 .2rem 0 .6rem; border: 1px solid var(--trait); }
.cr-anciens { margin-top: .8rem; }
.cr-anciens summary { cursor: pointer; color: var(--sarcelle); font-weight: 500; }

/* ==========================================================================
   Blocs de la rubrique Découvrir — mosaïque, frise, carte du village
   ========================================================================== */
.mosaique { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: repeat(2, 1fr); gap: var(--gap); margin: 1.6rem 0; }
.mosaique > :first-child { grid-row: span 2; }
.mosaique img, .mosaique .media { border-radius: var(--r-image); height: 100%; min-height: 180px; object-fit: cover; }

.frise { border-left: 2px solid var(--trait-fort); margin: 1.4rem 0 1.4rem .4rem; padding-left: 1.4rem; }
.frise .evenement { position: relative; padding-bottom: 1.3rem; }
.frise .evenement::before {
  content: ""; position: absolute; left: -1.78rem; top: .45rem;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--abricot); border: 2px solid var(--creme);
}
.frise .date { display: block; font-weight: 600; color: var(--terre-cuite); font-size: .88rem; }

.section-carte { padding: 2.2rem 0 3rem; }
.carte-note { font-size: .9rem; opacity: .8; margin: -.4rem 0 1.2rem; }

/* ==========================================================================
   « Pessan vu du ciel » — photo aérienne avec repères cliquables
   ========================================================================== */
.vue-village {
  display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr);
  gap: var(--gap); align-items: start;
}
.vue-photo {
  position: relative; background: var(--blanc); padding: 12px;
  border-radius: var(--r-cadre); box-shadow: var(--ombre-heros);
}
.vue-photo img { width: 100%; height: auto; display: block; border-radius: var(--r-image); }

/* pastilles numérotées */
.vue-pin { position: absolute; transform: translate(-50%, -50%); z-index: 2; text-decoration: none; }
.vue-pin > span {
  display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 50%; background: var(--terre-cuite); color: var(--blanc);
  font-family: var(--texte); font-weight: 700; font-size: .85rem;
  border: 2px solid var(--blanc); box-shadow: 0 2px 7px rgba(15,35,40,.45);
  transition: transform .14s ease, background-color .14s ease;
}
.vue-pin:hover > span, .vue-pin:focus-visible > span, .vue-pin.actif > span {
  transform: scale(1.28); background: var(--sarcelle);
}
/* le nom apparaît au survol / focus, sur la photo */
.vue-pin-nom {
  position: absolute; left: 50%; top: -6px; transform: translate(-50%, -100%);
  background: rgba(36, 86, 95, .95); color: var(--blanc);
  font-weight: 600; font-size: .78rem; white-space: nowrap;
  padding: .2rem .55rem; border-radius: 6px;
  opacity: 0; pointer-events: none; transition: opacity .14s ease;
}
.vue-pin:hover .vue-pin-nom, .vue-pin:focus-visible .vue-pin-nom, .vue-pin.actif .vue-pin-nom { opacity: 1; }
/* repère de bord (salle des fêtes, hors cadre à gauche) : flèche + numéro */
.vue-pin-bord { transform: translateY(-50%); display: flex; align-items: center; }
.vue-pin-bord .fleche { color: var(--terre-cuite); font-size: 1.6rem; font-weight: 700; margin-right: -4px; text-shadow: 0 1px 3px rgba(255,255,255,.8); line-height: 1; }
.vue-pin-bord .vue-pin-nom { left: 0; transform: translate(0, -100%); }

/* légende à côté de la photo */
.vue-legende { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.vue-legende a { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--encre); padding: .5rem .7rem; border-radius: 10px; }
.vue-legende a:hover, .vue-legende li.actif a { background: var(--bleu-gris); }
.vue-legende .num {
  flex: none; display: grid; place-items: center; width: 26px; height: 26px;
  border-radius: 50%; background: var(--terre-cuite); color: var(--blanc); font-weight: 700; font-size: .8rem;
}
.vue-legende li.actif .num { background: var(--sarcelle); }
.vue-legende strong { display: block; font-family: var(--titres); font-weight: 500; color: var(--sarcelle); font-size: 1.02rem; }
.vue-legende small { display: block; font-size: .8rem; color: var(--encre); opacity: .8; }

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

.bande-chiffres { margin: 1.8rem 0; }
.bande-chiffres .grille { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.chiffre { background: var(--bleu-gris); border-radius: var(--r-carte); padding: 1.3rem 1.4rem; }
.chiffre .valeur { display: block; font-family: var(--titres); font-size: 2.1rem; color: var(--sarcelle); line-height: 1; }
.chiffre .detail,
.chiffre .legende { display: block; font-size: .9rem; color: var(--encre); opacity: .9; margin-top: .35rem; line-height: 1.3; }
.chiffre .source { display: block; font-size: .76rem; opacity: .65; margin-top: .25rem; }

/* ==========================================================================
   Professionnels — cartes groupées par catégorie
   ========================================================================== */
.pro-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--gap); margin: 1rem 0 2rem; }
.pro-carte { background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--r-carte); overflow: hidden; box-shadow: var(--ombre-douce); display: flex; flex-direction: column; }
.pro-photo { aspect-ratio: 16 / 10; background: var(--bleu-gris); }
.pro-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pro-corps { padding: 1rem 1.2rem 1.2rem; display: flex; flex-direction: column; gap: .35rem; }
.pro-carte h4 { font-family: var(--titres); font-weight: 500; color: var(--sarcelle); font-size: 1.2rem; margin: 0; }
.pro-activite { font-weight: 600; color: var(--terre-cuite); font-size: .9rem; margin: 0; }
.pro-desc { margin: .3rem 0 .2rem; font-size: .92rem; }
.pro-coord { list-style: none; margin: .2rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; }
.pro-coord li { display: flex; gap: .5rem; align-items: baseline; }
.pro-ic { flex: none; width: 1.2em; text-align: center; }

/* Appel à candidature : « Vous êtes professionnel ? Rejoignez cette page » */
.pro-rejoindre { margin: 2.4rem 0 .5rem; background: var(--bleu-gris); border: 1px solid var(--sarcelle); border-radius: var(--r-carte); padding: 1.7rem 1.8rem 2rem; }
.pro-rejoindre-intro { max-width: 60ch; margin-bottom: 1.4rem; }
.pro-rejoindre-intro .titre-section { margin: .15rem 0 .55rem; }
.pro-rejoindre-intro p:last-child { margin: 0; }
.pro-rejoindre form.contact { max-width: 660px; }
.pro-rejoindre form.contact > div { margin-bottom: .95rem; }
.pro-rejoindre form.contact input, .pro-rejoindre form.contact select, .pro-rejoindre form.contact textarea { background: var(--blanc); }
.pro-rejoindre form.contact textarea { min-height: 96px; }

/* ==========================================================================
   Pessan Info — numéros du bulletin en téléchargement
   ========================================================================== */
.info-liste { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--gap); }
.info-num a {
  display: flex; flex-direction: column; gap: .15rem; text-decoration: none;
  background: var(--bleu-gris); border-radius: var(--r-carte); padding: 1.1rem 1.3rem;
  color: var(--encre); transition: transform .14s ease, box-shadow .14s ease;
}
.info-num a:hover { transform: translateY(-3px); box-shadow: var(--ombre-douce); }
.info-numero { font-family: var(--titres); font-weight: 600; color: var(--sarcelle); font-size: 1.3rem; }
.info-periode { font-weight: 600; }
.info-tele { font-size: .82rem; color: var(--terre-cuite); margin-top: .3rem; }

.bande-maire { background: var(--sable); border-radius: var(--r-carte); padding: 1.8rem 2rem; margin: 2rem 0; }
.bande-maire p { font-family: var(--titres); font-size: clamp(1.1rem, 1.5vw, 1.35rem); font-style: italic; max-width: 62ch; }
.bande-maire .signature { font-family: var(--texte); font-style: normal; font-size: .88rem; font-weight: 600; color: var(--terre-cuite); }

.sources-discretes { font-size: .78rem; opacity: .7; margin-top: 1.5rem; }
.sources-discretes a { color: inherit; }

/* ==========================================================================
   Pied de page — sarcelle foncé
   ========================================================================== */
footer.principal { background: var(--sarcelle-fonce); color: var(--blanc); padding: 3rem 0 1.4rem; margin-top: 3rem; }
footer.principal a { color: var(--lien-pied); }
footer.principal a:hover { color: var(--blanc); }
footer.principal h2 { color: var(--blanc); font-family: var(--titres); font-weight: 500; font-size: 1.05rem; margin: 0; }
footer.principal .colonnes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--gap) clamp(1.5rem, 4vw, 4rem); }
/* Les trois colonnes ont un en-tête de MÊME hauteur (58px), aligné au bas :
   « Mairie de Pessan », « Liens utiles » et « Le site » reposent sur la même
   ligne, et le contenu qui suit démarre à la même hauteur d'une colonne à l'autre. */
footer.principal .colonnes > div > :first-child {
  min-height: 44px; display: flex; align-items: flex-end;
  margin: 0 0 .9rem;
}
footer.principal ul { list-style: none; margin: 0; padding: 0; }
footer.principal li { margin-bottom: .4rem; }
footer.principal p { margin: 0 0 .5rem; font-size: .92rem; }
.footer-marque { gap: .6rem; }
.footer-nom { color: var(--blanc); font-family: var(--titres); font-weight: 500; font-size: 1.05rem; }
/* pied de page sombre : sceau seul (logo coupé), 38px, blanchi */
.footer-marque .blason { color: var(--blanc); }
.footer-marque .blason img { height: 38px; filter: brightness(0) invert(1); }
.footer-bas {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem;
  margin-top: 2.2rem; padding-top: 1.2rem;
  border-top: 1px solid rgba(255,255,255,.18); font-size: .82rem; opacity: .92;
}

/* ==========================================================================
   Responsive — trois paliers, conformément au §10 du cahier
   ========================================================================== */
@media (max-width: 1024px) {
  :root { --marge: 32px; }
  .acces-rapide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .une-et-agenda, .deux-colonnes { grid-template-columns: 1fr; }
  .encadre { position: static; }

  /* En-tête : on masque l'adresse mais on garde un bouton d'appel bien visible */
  .coordonnees-entete { flex-direction: row; align-items: center; }
  .entete-adresse { display: none; }
  .entete-tel { display: inline-flex; align-items: center; gap: .35rem; padding: .5rem .9rem; background: var(--bleu-gris); border-radius: 999px; }

  /* Menu repliable (bouton) + recherche ; sans JS le menu reste déplié */
  nav.principale .conteneur { flex-wrap: wrap; row-gap: .4rem; }
  .hamburger { display: inline-flex; order: 1; }
  .recherche { order: 2; margin-left: auto; }
  .nav-liste { order: 3; flex-basis: 100%; flex-direction: column; }
  .js .nav-liste { display: none; }
  .js .nav-liste.ouvert { display: flex; }
  nav.principale a { padding: .8rem .9rem; border-radius: 12px; }
}

@media (max-width: 640px) {
  :root { --marge: 20px; --gap: 16px; }

  .acces-rapide { grid-template-columns: 1fr; }
  .mosaique { grid-template-columns: 1fr; grid-template-rows: none; }
  .mosaique > :first-child { grid-row: auto; }

  .heros-carte { padding: 10px; border-radius: 18px; }
  .heros-carte .cliche { min-height: 360px; }
  .timbre { display: none; }         /* le timbre peut être masqué sous 640 px */
  .cliche-video { display: none; }   /* mobile : image fixe, pour épargner le forfait data */
  .video-controle { display: none; } /* pas de vidéo en mobile → pas de bouton */

  .bandeau-rf .conteneur { justify-content: center; text-align: center; font-size: .72rem; }
  .entete-haut { padding: .9rem 0; }
  .titre-site { font-size: 1.4rem; }

  .recherche { flex-basis: 100%; margin-left: 0; }
  .recherche input[type="search"] { width: 100%; max-width: none; }
  nav.principale a { padding: .8rem .9rem; border-radius: 12px; }

  .actions { flex-direction: column; align-items: stretch; }
  .actions > * { width: 100%; }

  /* Vue aérienne : sous 640 px les pastilles se chevaucheraient — on ne garde que la légende */
  .vue-pin { display: none; }

  .agenda-item { flex-direction: column; gap: .15rem; }
  .agenda-date { min-width: 0; }
  .footer-bas { flex-direction: column; }
}

/* ==========================================================================
   Impression — les habitants impriment les comptes rendus et les horaires
   ========================================================================== */
@media print {
  .mention-proto, nav.principale, .timbre, .sous-nav, .promo, .skip-link { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .heros-carte { box-shadow: none; padding: 0; }
  footer.principal { background: #fff; color: #000; margin-top: 1rem; }
  footer.principal a { color: #000; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
}

/* Encart « À actualiser » : information à confirmer avant l'ouverture au public */
.a-actualiser {
  margin: 1.1rem 0;
  padding: .8rem 1.1rem;
  border-left: 5px solid var(--abricot);
  background: var(--sable);
  border-radius: 0 var(--r-image) var(--r-image) 0;
  color: var(--encre);
  font-size: .95rem;
  line-height: 1.5;
}
.a-actualiser strong {
  display: inline-block;
  margin-right: .45rem;
  color: var(--terre-cuite);
  font-size: .8rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ==========================================================================
   Collecte « Église Saint-Michel » — compteur de dons et vidéos de la page dédiée
   Les chiffres viennent de collecte.php (cache 1 h) ; sans JavaScript, le lien
   vers la Fondation du patrimoine (.collecte-repli) reste affiché.
   ========================================================================== */
.collecte {
  margin: 1.4rem 0;
  padding: 1.4rem 1.6rem;
  background: var(--blanc);
  border: 1px solid var(--trait);
  border-radius: var(--r-carte);
  box-shadow: var(--ombre-douce);
}
.collecte-repli { margin: 0; }
.collecte-montant {
  margin: 0 0 .7rem;
  font-family: var(--titres);
  font-size: 1.05rem;
  color: var(--encre);
}
.collecte-montant strong {
  display: inline-block;
  margin-right: .35rem;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--sarcelle);
}
.collecte-jauge {
  height: 16px;
  overflow: hidden;
  border-radius: var(--r-pilule);
  background: var(--bleu-gris);
  box-shadow: inset 0 0 0 1px var(--trait);
}
.collecte-jauge > span {
  display: block;
  height: 100%;
  min-width: 10px;
  border-radius: var(--r-pilule);
  background: linear-gradient(90deg, var(--abricot), #DE8F52);
}
.collecte-chiffres { margin: .7rem 0 0; font-weight: 600; color: var(--terre-cuite); }
.collecte-note { margin: .35rem 0 0; font-size: .84rem; color: var(--encre); opacity: .8; }
.collecte-don { margin: 1rem 0 0; }

/* Variante compacte pour l'accueil : titre à gauche, chiffres à droite */
.collecte--bandeau {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 1.2rem 2.2rem;
  align-items: center;
  margin: 1.6rem 0;
  background: var(--bleu-gris);
  border-color: var(--trait-fort);
}
.collecte--bandeau .collecte-intro h2 { margin: .1rem 0 .35rem; font-size: clamp(1.3rem, 2vw, 1.7rem); color: var(--sarcelle); }
.collecte--bandeau .collecte-intro p { margin: 0; }
.collecte--bandeau .collecte-montant { margin-bottom: .5rem; }
.collecte--bandeau .collecte-montant strong { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.collecte--bandeau .collecte-don { margin-top: .8rem; }
.collecte--bandeau .collecte-repli { grid-column: 2; }

/* Vidéos de la page dédiée */
.videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--gap); margin: 1.4rem 0; }
.video-page { margin: 1.4rem 0; }
.videos .video-page { margin: 0; }
.video-page video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 70vh;
  border-radius: var(--r-image);
  background: var(--encre);
  box-shadow: var(--ombre-douce);
}
.video-page figcaption { font-size: .88rem; color: var(--encre); opacity: .8; margin-top: .5rem; }

@media (max-width: 900px) {
  .collecte--bandeau { grid-template-columns: 1fr; }
  .collecte--bandeau .collecte-repli { grid-column: 1; }
}
@media (max-width: 640px) {
  .collecte { padding: 1.1rem 1.1rem; }
  .videos { grid-template-columns: 1fr; }
}
@media print {
  .collecte-don, .video-page { display: none; }
}

/* ==========================================================================
   « Pessan en images » (accueil) — mosaïque des photos cochées dans l'administration.
   Sur grand écran : 1re photo = grande case (moitié gauche), les suivantes à droite ;
   la disposition reste équilibrée de 2 à 6 photos. Tablette et mobile : mosaïque d'origine.
   ========================================================================== */
@media (min-width: 901px) {
  .images-accueil .mosaique {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: 190px;
  }
  .images-accueil .mosaique > :first-child { grid-column: span 2; grid-row: span 2; }
  .images-accueil .mosaique > :nth-child(2):last-child { grid-column: 3 / span 2; grid-row: span 2; }      /* 2 photos */
  .images-accueil .mosaique > :nth-child(2):nth-last-child(2) { grid-column: 3 / span 2; }                 /* 3 photos */
  .images-accueil .mosaique > :nth-child(3):last-child { grid-column: 3 / span 2; }
  .images-accueil .mosaique > :nth-child(4):last-child { grid-column: 3 / span 2; }                         /* 4 photos */
  .images-accueil .mosaique > :nth-child(6):last-child { grid-column: 1 / -1; }                             /* 6 photos : bandeau */
}
.images-accueil .tout-voir { margin-top: 1.4rem; }

/* ==========================================================================
   PanneauPocket — adhésion à l'application + défilement des infos actives
   (fil d'accueil, bandeau de bas de page, page « application-panneaupocket »)
   ========================================================================== */

/* ---- logos officiels (pictogramme seul, ou logo avec le nom) ---- */
.logo-pp-img { display: block; flex: none; width: auto; height: 3.2rem; }
.logo-pp-ligne { display: block; width: auto; height: 3.4rem; margin: 0 0 .8rem; }

/* ---- fil d'infos de l'accueil : « En direct de PanneauPocket » ---- */
.fil-infos {
  display: flex; align-items: center; gap: 1rem;
  margin: 1.2rem 0 0; padding: .45rem .6rem .45rem .45rem;
  background: var(--bleu-gris); border: 1px solid var(--trait); border-radius: var(--r-pilule);
}
.fil-infos[hidden] { display: none; }
.fil-marque {
  flex: none; display: inline-flex; align-items: center; gap: .7rem;
  padding: .3rem 1.3rem .3rem .85rem;
  border: 1px solid var(--trait); border-radius: var(--r-pilule);
  background: var(--blanc); color: var(--encre); text-decoration: none; line-height: 1.15;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.fil-marque:hover { border-color: var(--sarcelle); box-shadow: var(--ombre-douce); }
.fil-marque:focus-visible { outline: 3px solid var(--abricot); outline-offset: 2px; }
.fil-marque img { display: block; width: auto; height: 2.5rem; flex: none; }
.fil-marque strong { display: block; font-family: var(--titres); font-weight: 600; font-size: 1.08rem; color: var(--sarcelle); }
.fil-marque small { display: block; margin-bottom: .1rem; font-size: .72rem; letter-spacing: .03em; opacity: .85; }
.fil-corps { flex: 1; min-width: 0; display: grid; }
.fil-item {
  grid-area: 1 / 1; min-width: 0; display: block;
  opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility .4s;
  white-space: nowrap; overflow: hidden; text-overflow: clip; font-size: .98rem;
}
.fil-item.est-active { opacity: 1; visibility: visible; }
/* le texte de l'info défile de droite à gauche s'il dépasse la place disponible */
.fil-texte { display: inline-block; white-space: nowrap; transition: transform .12s linear; will-change: transform; }
.fil-item strong { color: var(--sarcelle); font-weight: 600; }
.fil-date { margin: 0 .7rem; font-size: .86rem; opacity: .85; }
.fil-extrait { opacity: .95; }
.fil-actions { flex: none; display: flex; align-items: center; gap: .3rem; }
.fil-lien { flex: none; padding: 0 .9rem 0 .4rem; font-weight: 600; font-size: .9rem; white-space: nowrap; }

/* boutons précédent / pause / suivant */
.panneau-btn {
  display: grid; place-items: center; flex: none; width: 36px; height: 36px; padding: 0;
  border: 1.5px solid var(--sarcelle); border-radius: 50%;
  background: transparent; color: var(--sarcelle); cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.panneau-btn:hover { background: var(--sarcelle); color: var(--blanc); }
.panneau-btn:focus-visible { outline: 3px solid var(--abricot); outline-offset: 2px; }
.fil-infos .panneau-btn { width: 32px; height: 32px; }
.panneau-btn svg { display: block; }
.panneau-btn .ic-lecture { display: none; }
.panneau-btn[data-pause="oui"] .ic-lecture { display: block; }
.panneau-btn[data-pause="oui"] .ic-pause { display: none; }

/* ---- grand bandeau de la page dédiée ---- */
.appli {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 1.8rem clamp(1.6rem, 4vw, 3.2rem);
  align-items: center;
  margin: 0 0 2.6rem;
  padding: clamp(1.4rem, 3vw, 2.4rem);
  background: var(--sable);
  border-radius: var(--r-carte);
}
.appli-texte .surtitre { color: var(--terre-cuite); }
.appli-texte h2 {
  margin: .1rem 0 .7rem;
  font-family: var(--titres); font-weight: 500;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem); line-height: 1.2;
  color: var(--sarcelle);
}
.appli-points { list-style: none; margin: 0 0 1.4rem; padding: 0; display: grid; gap: .5rem; }
.contenu .appli-points { padding-left: 0; }
.appli-points li { position: relative; margin: 0; padding-left: 1.9rem; }
.appli-points li::before {
  content: ""; position: absolute; left: 0; top: .2em;
  width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--sarcelle);
}
.appli-points li::after {
  content: ""; position: absolute; left: .44rem; top: .36em;
  width: .3rem; height: .58rem; border: solid var(--blanc); border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.appli-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1rem; }
.bouton-store {
  display: inline-flex; align-items: center; gap: .65rem;
  min-height: 48px; padding: .5rem 1.2rem .5rem 1rem;
  border-radius: var(--r-pilule);
  background: var(--sarcelle); color: var(--blanc); text-decoration: none; line-height: 1.15;
  transition: background .15s ease, transform .15s ease;
}
.bouton-store:hover { background: var(--sarcelle-fonce); color: var(--blanc); transform: translateY(-1px); }
.bouton-store:focus-visible { outline: 3px solid var(--abricot); outline-offset: 2px; }
.bouton-store svg { flex: none; }
.bouton-store small { display: block; font-size: .7rem; font-weight: 400; opacity: .92; }
.bouton-store strong { display: block; font-size: 1rem; font-weight: 600; color: inherit; }
.appli-qr { display: flex; align-items: center; gap: .8rem; margin-left: auto; max-width: 15rem; font-size: .82rem; line-height: 1.35; }
.appli-qr img { width: 92px; height: 92px; flex: none; border-radius: 12px; border: 1px solid var(--trait-fort); background: var(--blanc); }

/* ---- encadré « Derniers articles sur PanneauPocket » (défilement) ---- */
.panneau {
  background: var(--blanc);
  border: 1px solid var(--trait);
  border-radius: var(--r-carte);
  box-shadow: var(--ombre-page);
  overflow: hidden;
}
.panneau [hidden] { display: none; }
.panneau-tete {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .75rem 1.2rem;
  background: var(--sarcelle); color: var(--blanc);
  font-size: .78rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
}
.panneau-tete > span { display: inline-flex; align-items: center; gap: .6rem; }
.panneau-live { display: none; width: .6rem; height: .6rem; border-radius: 50%; background: var(--abricot); animation: panneau-pouls 2.2s ease-out infinite; }
.panneau.est-actif .panneau-live { display: inline-block; }
@keyframes panneau-pouls {
  0%   { box-shadow: 0 0 0 0 rgba(232,160,106,.75); }
  70%, 100% { box-shadow: 0 0 0 .65rem rgba(232,160,106,0); }
}
.panneau-compte { flex: none; font-weight: 500; letter-spacing: 0; text-transform: none; white-space: nowrap; opacity: .92; }
.panneau-progres { height: 3px; background: var(--bleu-gris); }
.panneau-progres > span { display: block; height: 100%; width: 0; background: var(--abricot); }
.panneau-diapos { display: grid; padding: 1.3rem 1.5rem .4rem; }
.panneau-repli { margin: 0 0 1rem; }
.panneau-diapo {
  grid-area: 1 / 1;
  opacity: 0; visibility: hidden;
  transition: opacity .45s ease, visibility .45s;
}
.panneau-diapo.est-active { opacity: 1; visibility: visible; }
.panneau-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin-bottom: .6rem; }
.panneau-type {
  display: inline-block; padding: .16rem .75rem; border-radius: var(--r-pilule);
  background: var(--bleu-gris); color: var(--sarcelle);
  font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.panneau-type--alerte { background: var(--terre-cuite); color: var(--blanc); }
.panneau-date { font-size: .82rem; opacity: .82; }
.panneau-diapo h3 {
  margin: 0 0 .45rem;
  font-family: var(--titres); font-weight: 500;
  font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.25; color: var(--sarcelle);
}
.panneau-diapo p {
  margin: 0 0 .7rem;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.panneau-lire { font-weight: 600; font-size: .92rem; }
.panneau-pied { display: flex; align-items: center; gap: .5rem; padding: .3rem 1rem 1rem 1.5rem; }
.panneau-points { display: flex; flex-wrap: wrap; flex: 1; }
.panneau-pt {
  position: relative; width: 1.6rem; height: 2rem; padding: 0; border: 0; background: transparent; cursor: pointer;
}
.panneau-pt::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: .65rem; height: .65rem;
  transform: translate(-50%, -50%); border-radius: 50%; background: var(--trait-fort);
  transition: background .2s ease, transform .2s ease;
}
.panneau-pt.est-active::before { background: var(--sarcelle); transform: translate(-50%, -50%) scale(1.3); }
.panneau-pt:focus-visible { outline: 2px solid var(--sarcelle); outline-offset: 2px; border-radius: 6px; }

/* ---- bandeau fin en bas des pages ---- */
.appli-bandeau {
  display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.4rem;
  margin: 2.6rem 0 0; padding: 1rem 1.4rem;
  background: var(--bleu-gris); border: 1px solid var(--trait); border-radius: var(--r-carte);
}
.appli-bandeau-texte { flex: 1 1 320px; margin: 0; line-height: 1.4; }
.appli-bandeau-texte strong { display: block; font-family: var(--titres); font-weight: 500; font-size: 1.1rem; color: var(--sarcelle); }
.appli-bandeau .bouton-store { min-height: 42px; padding: .35rem 1rem .35rem .85rem; }
.appli-bandeau .bouton-store strong { font-size: .92rem; }
.appli-bandeau .bouton-store small { display: none; }
.appli-fin { padding: 0 0 2.4rem; }
.appli-fin .appli-bandeau { margin-top: 0; }

/* ---- page dédiée : trois étapes, liste des derniers articles ---- */
.etapes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin: 1.4rem 0 2rem; padding: 0; list-style: none; counter-reset: etape; max-width: none; }
.etapes li {
  position: relative; margin: 0; padding: 1.4rem 1.4rem 1.3rem; counter-increment: etape;
  background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--r-carte); box-shadow: var(--ombre-douce);
}
.etapes li::before {
  content: counter(etape); display: grid; place-items: center; width: 2.4rem; height: 2.4rem; margin-bottom: .8rem;
  border-radius: 50%; background: var(--abricot); color: var(--encre);
  font-family: var(--titres); font-weight: 600; font-size: 1.2rem;
}
.etapes h3 { margin: 0 0 .35rem; font-family: var(--titres); font-weight: 500; font-size: 1.15rem; color: var(--sarcelle); }
.etapes p { margin: 0; }
.liste-infos { list-style: none; margin: 1rem 0 0; padding: 0; border-top: 1px solid var(--trait); }
.contenu .liste-infos { padding-left: 0; }
.liste-infos li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1rem; margin: 0; padding: .8rem 0; border-bottom: 1px solid var(--trait); }
.liste-infos .date { flex: none; min-width: 11.5rem; font-size: .86rem; opacity: .82; }
.liste-infos a { font-weight: 600; }

@media (max-width: 900px) {
  .appli { grid-template-columns: 1fr; }
  .appli-qr { display: none; }
  .etapes { grid-template-columns: 1fr; }
  .fil-lien { display: none; }
}
@media (max-width: 640px) {
  .bouton-store { flex: 1 1 100%; justify-content: center; }
  .panneau-diapos { padding: 1.1rem 1.1rem .3rem; }
  .panneau-pied { padding-left: 1.1rem; }
  .fil-infos { flex-wrap: wrap; border-radius: var(--r-carte); padding: .6rem; gap: .6rem .8rem; }
  .fil-marque { flex: 1 1 auto; padding-right: .8rem; }
  .fil-actions { margin-left: auto; }
  .fil-corps { order: 3; flex: 1 1 100%; padding: 0 .3rem .2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .panneau-live { animation: none; }
  .fil-texte, .fil-item, .panneau-diapo { transition: none; }
}

/* ---------- Accueil : encadré de bienvenue temporaire (Réglages > Message d'accueil) ---------- */
.bienvenue { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.4rem 2rem; align-items: center; margin: 1.6rem 0 0; padding: 1.5rem 1.8rem; background: var(--bleu-gris); border-radius: var(--r-carte); border-left: 6px solid var(--abricot); }
.bienvenue .surtitre { margin: 0 0 .2rem; }
.bienvenue h2 { margin: 0 0 .45rem; font-family: var(--titres); font-weight: 500; font-size: 1.55rem; color: var(--sarcelle); }
.bienvenue p { margin: 0; line-height: 1.55; }
.bienvenue-liens { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .55rem; }
.bienvenue-liens a { display: inline-block; padding: .5rem 1rem; border-radius: var(--r-pilule); background: var(--blanc); border: 1.5px solid var(--sarcelle); color: var(--sarcelle); text-decoration: none; font-weight: 600; font-size: .93rem; }
.bienvenue-liens a:hover, .bienvenue-liens a:focus-visible { background: var(--sarcelle); color: var(--blanc); }
@media (max-width: 760px) {
  .bienvenue { grid-template-columns: 1fr; padding: 1.2rem; }
  .bienvenue h2 { font-size: 1.3rem; }
}
