/* Template « adagv » — feuille COMMUNE aux trois versions (structure, composants, mise en page).
 *
 * Portée depuis docs/maquettes/maquette.css le 2026-11-19 ; c'est désormais CE fichier qui fait
 * foi (règle du dossier : dès qu'un élément est codé, c'est le code qui fait foi).
 * L'habillage de chaque version est dans version-<nom>.css, dont SEUL celui choisi dans les
 * réglages du template est chargé. Décision : docs/decisions/2026-11-19-architecture-du-template.md
 *
 * Mise en page par requêtes de conteneur (@container site) : le conteneur est div.site.
 */

/* --- Couleurs : tirées du logo, contrastes vérifiés (voir la spec) ---------------- */
:root {
  /* Couleurs du logo, relevées au pixel : décor et fonds uniquement. */
  --anis: #C0D200;
  --vert: #6CB41E;
  --gris-logo: #8A8A8A;
  /* Teintes de texte, dérivées : toutes ≥ 4,5:1 sur leurs fonds. */
  --encre: #1F2A1B;          /* 14,9:1 sur blanc, 8,9:1 sur anis */
  --vert-fonce: #356210;     /* 7,2:1 sur blanc */
  --texte-doux: #575B55;     /* 6,9:1 sur blanc */
  --anis-pale: #F3F7DA;
  --gris-fonce: #3A3C3A;     /* l'anis y est à 6,6:1, le blanc à 11:1 */
  --fond: #FFFFFF;
  --trait: #D6D9CF;

  /* Rôles, redéfinis par chaque version. */
  --rayon: 0;
  --rayon-bouton: 0;
  --entete-fond: var(--fond);
  --entete-texte: var(--encre);
  --bande-fond: var(--fond);       /* fond des sections alternées */
  --carte-fond: var(--fond);
  --carte-bord: var(--trait);
  --pastille-fond: var(--anis);
  --pastille-texte: var(--encre);
  --bouton-fond: var(--vert-fonce);
  --bouton-texte: #FFFFFF;
  --pied-fond: var(--gris-fonce);
  --pied-texte: #F2F3EF;
  --pied-lien: var(--anis);

  --police: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --marge: clamp(16px, 4cqi, 32px);
}

/* --- Base ---------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #E4E6E0; color: var(--encre); font: 400 1.0625rem/1.55 var(--police); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--vert-fonce); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--vert-fonce); outline-offset: 3px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 700; }
h2 { font-size: clamp(1.4rem, 4.5cqi, 1.9rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1em; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icone { width: 1.5em; height: 1.5em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.site { container: site / inline-size; background: var(--fond); max-width: 1440px; margin: 0 auto; min-height: 100vh; }
.contenu { padding-inline: var(--marge); max-width: 1180px; margin-inline: auto; }
.section { padding-block: clamp(36px, 7cqi, 72px); }
.bande { background: var(--bande-fond); }
.entete-section { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 8px; }
.entete-section a { font-weight: 700; }

/* --- En-tête --------------------------------------------------------------------- */
.entete { background: var(--entete-fond); color: var(--entete-texte); position: sticky; top: 0; z-index: 10; border-bottom: 1px solid rgb(0 0 0 / .1); }
.entete .contenu { display: flex; align-items: center; gap: 10px; min-height: 64px; max-width: 1360px; }
.entete .contenu > * { flex: none; }   /* rien ne s'écrase : au besoin, c'est le bouton Menu qui prend le relais */
.logo { display: block; margin-right: auto; padding: 6px 0; }
.logo img { width: 128px; }
/* Boutons de l'en-tête : Menu, « Appeler » (fiche Contact) ou le lien du module de la position
   « bouton » (« Adhérer »), habillé ici comme eux. */
.bouton-entete, .bouton-principal a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: var(--rayon-bouton);
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; border: 2px solid currentColor; color: var(--entete-texte); background: transparent;
}
.bouton-entete.plein, .bouton-principal a { background: var(--bouton-fond); color: var(--bouton-texte); border-color: var(--bouton-fond); }
.bouton-entete .icone { width: 1.25em; height: 1.25em; }
/* Menu du gestionnaire, conservé : 5 entrées, 3 sous-menus déroulants.
   Téléphone : bouton Menu → liste, sous-menus en accordéon (bouton ▾).
   Grand écran (≥ 1240 px de conteneur, en dessous l'en-tête ne tient pas sans écraser les boutons ▾) : menu en ligne, sous-menu au survol OU au bouton ▾,
   qui seul fonctionne au clavier et au doigt. */
.navigation { display: none; }
.navigation[data-ouverte] {
  display: block; position: absolute; inset: 64px 0 auto 0; background: var(--fond); color: var(--encre);
  border-bottom: 1px solid var(--trait); box-shadow: 0 20px 30px rgb(0 0 0 / .12); max-height: calc(100vh - 64px); overflow: auto;
  padding: 12px var(--marge) 24px;
}
.navigation ul { list-style: none; margin: 0; padding: 0; }
.navigation > ul > li { border-bottom: 1px solid var(--trait); display: flex; flex-wrap: wrap; align-items: center; }
.navigation a { display: flex; align-items: center; min-height: 48px; color: inherit; text-decoration: none; font-weight: 700; font-size: 1.1rem; flex: 1; }
.navigation a[aria-current] { color: var(--vert-fonce); }
.deplier { display: grid; place-items: center; width: 48px; height: 48px; padding: 0; background: none; border: 0; color: inherit; cursor: pointer; }
.deplier .icone { width: 1.2em; height: 1.2em; transition: transform .15s; }
.parent[data-ouvert] > .deplier .icone { transform: rotate(180deg); }
.navigation .sous { display: none; flex-basis: 100%; padding: 0 0 10px 14px; }
.parent[data-ouvert] > .sous { display: block; }
.navigation .sous a { min-height: 42px; font-weight: 400; font-size: 1rem; }
/* « Espace infos familles » : bouton à droite du menu sur grand écran, en tête du menu sur téléphone. */
/* Le module « Espaces Info famille » (Site personnalisé) contient un simple lien : c'est lui
   qu'on habille en bouton, dans l'en-tête comme dans le menu déplié. */
.cta-entete a, .cta-dans-menu a,
.cta-familles { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; font-weight: 700; text-decoration: none;
  border-radius: var(--rayon-bouton); background: var(--anis); color: var(--encre); border: 2px solid var(--anis); white-space: nowrap; }
.cta-entete a:hover, .cta-dans-menu a:hover, .cta-familles:hover { border-color: var(--encre); }
.cta-entete p, .cta-dans-menu p, .cta-entete .mod-custom, .cta-dans-menu .mod-custom,
.bouton-principal p, .bouton-principal .contenu-module { margin: 0; display: contents; }
.cta-entete { display: none; }
.navigation .cta-dans-menu { display: flex; justify-content: center; margin-bottom: 8px; flex: none; }
.navigation .cta-dans-menu a { width: 100%; justify-content: center; font-size: 1.1rem; }
.numero { display: none; }
@container site (min-width: 1240px) {
  .bouton-menu, .navigation .cta-dans-menu { display: none; }
  .cta-entete { display: inline-flex; }
  .navigation, .navigation[data-ouverte] { display: block; position: static; background: none; box-shadow: none; border: 0; padding: 0; color: inherit; overflow: visible; max-height: none; }
  .navigation > ul { display: flex; gap: 10px; }
  .navigation > ul > li { border: 0; position: relative; flex-wrap: nowrap; }
  .navigation a { min-height: 44px; padding: 0 8px; font-size: 1rem; flex: none; white-space: nowrap; }
  .deplier { flex: none; }
  .navigation > ul > li > a:hover { text-decoration: underline; }
  /* Page en cours : soulignement épais aux couleurs du logo, lisible sur tout en-tête. */
  .navigation > ul > li > a[aria-current] { color: inherit; text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--vert); text-underline-offset: 8px; }
  .parent > a { padding-right: 0; }
  .deplier { width: 32px; height: 44px; }
  .navigation .sous {
    position: absolute; top: 100%; left: 0; min-width: 270px; padding: 8px 0; z-index: 20;
    background: var(--fond); color: var(--encre); border: 1px solid var(--trait); border-top: 4px solid var(--vert);
    border-radius: 0 0 var(--rayon) var(--rayon); box-shadow: 0 14px 30px rgb(0 0 0 / .14);
  }
  .parent:hover > .sous { display: block; }
  .navigation .sous a { padding: 0 16px; min-height: 42px; }
  .navigation .sous a:hover { background: var(--anis-pale); text-decoration: none; }
  .logo img { width: 140px; }
}
@container site (min-width: 1400px) { .numero { display: inline; } }

/* --- Grand bloc d'accueil ------------------------------------------------------------
 * Image de fond, titre, phrase, bouton vidéo. Le texte est TOUJOURS sur un fond qui
 * garantit le contraste (dégradé sombre, panneau ou aplat), jamais posé nu sur la photo. */
.hero { position: relative; overflow: hidden; background: var(--gris-fonce); }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-contenu { position: relative; min-height: min(78vh, 640px); display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; padding-block: 140px 32px; }
/* Agréments et conventions : la suite du texte de l'article « Présentation », en liste discrète.
   Même panneau translucide que le texte principal (contrastes calculés au pire cas, voir la spec). */
.agrements { max-width: 26rem; font-size: .9rem; line-height: 1.45; color: var(--encre);
  background: rgb(255 255 255 / .85); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  padding: 4px 18px; border-radius: var(--rayon); }
.agrements summary { min-height: 44px; display: flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; list-style: none; }
.agrements summary::-webkit-details-marker { display: none; }
/* Repère visible : « + » replié, « – » déplié (le marqueur natif disparaît avec display: flex). */
.agrements summary::after { content: "+"; margin-left: auto; font-size: 1.4rem; line-height: 1; color: var(--vert-fonce); }
.agrements[open] summary::after { content: "–"; }
.agrements ul { margin: 0 0 14px; padding-left: 1.1em; }
.agrements li + li { margin-top: 5px; }
.agrements li::marker { color: var(--vert-fonce); }
@container site (min-width: 980px) {
  .hero-contenu { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 32px; }
  .agrements { flex: 0 1 23rem; }
}
.hero-texte { max-width: 36rem; }
.surtitre { display: block; font-weight: 700; font-size: .95rem; letter-spacing: .02em; margin-bottom: 10px; }
.hero h1 { font-size: clamp(1.9rem, 7cqi, 3.4rem); }
.chapo { font-size: clamp(1.05rem, 2.6cqi, 1.25rem); margin-bottom: 22px; }
.bouton-video {
  display: inline-flex; align-items: center; gap: 14px; min-height: 56px; padding: 6px 20px 6px 6px; cursor: pointer; text-align: left;
  font: inherit; font-weight: 700; font-size: 1.05rem; border: 0; border-radius: var(--rayon-bouton); background: var(--anis); color: var(--encre);
}
.bouton-video .lecture { display: grid; place-items: center; width: 44px; height: 44px; background: var(--encre); color: var(--anis); border-radius: var(--rayon-bouton); }
.bouton-video .lecture svg { width: 20px; height: 20px; fill: currentColor; stroke: none; margin-left: 3px; }
.bouton-video small { display: block; font-weight: 400; font-size: .85rem; }

/* Fenêtre vidéo : l'iframe n'est créée qu'au clic (aucun appel à YouTube avant). */
.fenetre-video { border: 0; padding: 0; width: min(960px, 94vw); background: #000; overflow: visible; }
.fenetre-video::backdrop { background: rgb(0 0 0 / .8); }
.fenetre-video .cadre { aspect-ratio: 16 / 9; }
.fenetre-video iframe { width: 100%; height: 100%; border: 0; display: block; }
.fenetre-video .titre-video { margin: 0; padding: 12px 16px; font-size: 1rem; color: #fff; background: #111; }
.fenetre-video .titre-video:empty { display: none; }
.fenetre-video .fermer { position: absolute; top: -52px; right: 0; min-height: 44px; padding: 0 16px; font: inherit; font-weight: 700; background: #fff; color: var(--encre); border: 0; cursor: pointer; }

/* --- Accès rapides et horaires ------------------------------------------------------ */
.rapide .contenu { display: grid; gap: 14px; padding-block: 20px 28px; }
.acces { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; list-style: none; margin: 0; padding: 0; }
.acces a {
  display: flex; flex-direction: column; justify-content: space-between; gap: 12px; height: 100%; min-height: 112px; padding: 14px;
  text-decoration: none; color: var(--encre); background: var(--carte-fond); border: 1px solid var(--carte-bord); border-radius: var(--rayon);
  font-weight: 700; font-size: 1.05rem; line-height: 1.25;
}
.acces a:hover { border-color: var(--vert-fonce); }
.acces .icone { width: 30px; height: 30px; padding: 6px; background: var(--pastille-fond); color: var(--pastille-texte); box-sizing: content-box; border-radius: var(--rayon); }
.acces small { display: block; font-weight: 400; color: var(--texte-doux); font-size: .9rem; margin-top: 4px; }
.horaires { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: .98rem; }
.etat { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.etat::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--gris-logo); }
.etat[data-ouvert="oui"]::before { background: var(--vert); box-shadow: 0 0 0 4px rgb(108 180 30 / .25); }
@container site (min-width: 760px) {
  .acces { grid-template-columns: repeat(4, 1fr); }
  .acces a { min-height: 132px; padding: 18px; }
}

/* --- Cartes : agenda et actualités (.actu), rubriques et « Nos actions » (.carte) ---------
   MÊME CADRE pour toutes (spec 02 § 3 ; étendu aux cartes de rubrique à la demande du
   propriétaire, 2026-11-20 : bord, marge intérieure, image toujours présente, voir
   AdagvGabarit::imageCarte). Téléphone : une ligne compacte, vignette carrée + texte ; au-delà,
   l'image en haut de la carte. Le titre (h2 sur une page de liste, h3 dans une section) est le lien. */
.vide { padding: 14px 16px; background: var(--anis-pale); border-left: 4px solid var(--vert); margin: 0 0 16px; }
.actus, .cartes { display: grid; gap: 14px; list-style: none; padding: 0; margin: 0; }
.actu, .carte { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: start; align-content: start;   /* sinon la hauteur en trop d'une rangée décale la date */
  position: relative; padding: 12px; background: var(--carte-fond); border: 1px solid var(--carte-bord); border-radius: var(--rayon); }
.actu h3, .carte h2, .carte h3 { margin: 4px 0 6px; font-size: 1.08rem; }
.actu h3 a, .carte h2 a, .carte h3 a, .coupure h3 a { color: var(--encre); text-decoration: none; }
.actu h3 a::after, .carte h2 a::after, .carte h3 a::after, .coupure h3 a::after { content: ""; position: absolute; inset: 0; }   /* tout le bloc cliquable */
.actu:hover h3 a, .carte:hover h2 a, .carte:hover h3 a, .coupure:hover h3 a { text-decoration: underline; }
.actu h3 a:focus-visible, .carte h2 a:focus-visible, .carte h3 a:focus-visible, .coupure h3 a:focus-visible { outline: none; }
.actu:focus-within, .carte:focus-within, .coupure:focus-within { outline: 3px solid var(--vert-fonce); outline-offset: 2px; }
.actu p, .carte p { margin: 0; color: var(--texte-doux); font-size: .95rem; }
/* La vignette vidéo d'une carte (lancée sur place) passe AU-DESSUS du lien qui couvre la carte. */
.carte .vignette-video { position: relative; z-index: 1; }
.carte .miniature { aspect-ratio: 1; }
.date { font-size: .88rem; font-weight: 700; color: var(--vert-fonce); }
/* Une image par nature (spec § images). Affiche : montrée ENTIÈRE, jamais recadrée. */
.vignette { overflow: hidden; background: var(--anis-pale); border-radius: var(--rayon); }
.vignette.affiche { aspect-ratio: 3 / 4; }
.vignette.affiche img { width: 100%; height: 100%; object-fit: contain; }
.vignette.photo { aspect-ratio: 1; }
.vignette.photo img { width: 100%; height: 100%; object-fit: cover; }
/* Agenda et actualités : MÊME CADRE pour toutes les cartes, image TOUJOURS ENTIÈRE (affiche,
   capture, photo), le vide comblé par un flou de l'image elle-même. Équilibré quelle que soit
   la qualité des visuels ; rien à régler pour le rédacteur (le template écrit --fond-image). */
.vignette.entiere { position: relative; aspect-ratio: 1; background: #E4E6E0; isolation: isolate; }
.vignette.entiere::before { content: ""; position: absolute; inset: -24px; z-index: -1;
  background: var(--fond-image) center / cover; filter: blur(16px) saturate(1.15); opacity: .6; }
.vignette.entiere img { width: 100%; height: 100%; object-fit: contain; }
@container site (min-width: 760px) {
  .actus, .cartes { gap: 24px; }
  .actus { grid-template-columns: repeat(3, 1fr); }
  .cartes { grid-template-columns: repeat(2, 1fr); }
  .actu, .carte { grid-template-columns: 1fr; padding: 0; overflow: hidden; }
  .actu > div:last-child, .carte > div:last-child { padding: 0 16px 16px; }
  .actu .vignette, .carte .vignette, .carte .vignette-video, .carte .miniature { border-radius: 0; }
  .actu .vignette.entiere, .actu .vignette.affiche, .carte .vignette.entiere, .carte .miniature { aspect-ratio: 4 / 3; }
}
@container site (min-width: 1100px) {
  .cartes { grid-template-columns: repeat(3, 1fr); }
  /* Quatre cartes (« Nos actions ») : une seule rangée plutôt que 3 + 1. */
  .cartes:has(> :nth-child(4):last-child) { grid-template-columns: repeat(4, 1fr); }
}
/* Une ou deux cartes (« Ressources et productions ») : plus larges, au lieu d'un tiers de ligne chacune. */
@container site (min-width: 760px) { .cartes.peu { grid-template-columns: repeat(auto-fill, minmax(280px, 380px)); } }

/* --- Démarches en vidéo ---------------------------------------------------------- */
.themes { display: grid; gap: 10px; list-style: none; padding: 0; margin: 0; }
.themes a { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 14px; background: var(--carte-fond); border: 1px solid var(--carte-bord); border-radius: var(--rayon); color: var(--encre); text-decoration: none; font-weight: 700; font-size: 1.05rem; }
.themes a:hover { border-color: var(--vert-fonce); }
.themes .pastille { display: grid; place-items: center; width: 44px; height: 44px; background: var(--pastille-fond); color: var(--pastille-texte); flex: none; border-radius: var(--rayon); }
.themes .nombre { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 400; font-size: .92rem; color: var(--texte-doux); white-space: nowrap; }
.themes .nombre .icone { width: 1.1em; height: 1.1em; }
@container site (min-width: 760px) { .themes { grid-template-columns: repeat(2, 1fr); } }
@container site (min-width: 1100px) { .themes { grid-template-columns: repeat(3, 1fr); } }

/* --- L'ADAGV en bref ------------------------------------------------------------------ */
.bref { display: grid; gap: 24px; }
.faits { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; list-style: none; padding: 0; margin: 0; }
.faits li { padding: 14px; background: var(--carte-fond); border: 1px solid var(--carte-bord); border-radius: var(--rayon); }
.faits strong { display: block; font-size: 1.45rem; line-height: 1.1; margin-bottom: 4px; }
.faits span { color: var(--texte-doux); font-size: .93rem; }
.documents { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.documents a { display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: var(--carte-fond); border: 1px solid var(--carte-bord); border-radius: var(--rayon); text-decoration: none; font-weight: 700; color: var(--encre); }
.documents a:hover { border-color: var(--vert-fonce); }
.documents small { display: block; font-weight: 400; color: var(--texte-doux); }
@container site (min-width: 980px) { .bref { grid-template-columns: 1.2fr 1fr; align-items: start; } }

/* --- Presse : la coupure est un document, montrée comme tel ------------------------- */
.presse { display: grid; gap: 16px; list-style: none; padding: 0; margin: 0; }
.coupure { display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: start; position: relative; }
.coupure .papier { background: #fff; padding: 6px; border: 1px solid var(--trait); box-shadow: 0 3px 10px rgb(0 0 0 / .12); }
.coupure .papier img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; }
.coupure h3 { font-size: 1.05rem; margin: 2px 0 6px; }
.coupure p { margin: 0; color: var(--texte-doux); font-size: .93rem; }
@container site (min-width: 760px) { .presse { grid-template-columns: 1fr 1fr; } }

/* --- Pied de page : quatre colonnes (coordonnées, contact, horaires, accès rapide) --------
   Tout vient de la fiche Contact « ADAGV » et du menu « Accès rapide ». */
.pied { background: var(--pied-fond); color: var(--pied-texte); }
.pied a { color: var(--pied-lien); }
.pied .colonnes { display: grid; gap: 28px 32px; padding-block: 40px 32px; }
.pied h2 { font-size: 1.05rem; margin-bottom: .6em; }
.pied p { margin: 0 0 .8em; }
.pied address { font-style: normal; }
.pied ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.logo-pied { width: 132px; background: #fff; padding: 6px 10px; margin-bottom: 18px; border-radius: var(--rayon); box-sizing: content-box; }
.pied .appel { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px; border-radius: var(--rayon-bouton); background: var(--anis); color: var(--encre); font-weight: 700; text-decoration: none; }
.pied .etat::before { box-shadow: none; }
.pied .mentions { display: flex; flex-wrap: wrap; gap: 8px 24px; border-top: 1px solid rgb(127 127 127 / .35); font-size: .88rem; padding-block: 16px 24px; }
@container site (min-width: 640px) { .pied .colonnes { grid-template-columns: 1fr 1fr; } }
@container site (min-width: 1100px) { .pied .colonnes { grid-template-columns: 1.2fr 1fr 1fr 1fr; } }

/* =====================================================================================
 * PAGES INTÉRIEURES (spec 02) : fil d'Ariane, en-tête de page, démarches, lecteur vidéo,
 * article, catalogue, contact. Communes aux trois versions (variables), habillage plus bas.
 * ===================================================================================== */
:root { --tete-fond: var(--anis-pale); }

/* Fil d'Ariane (module natif, libellé d'origine « Vous êtes ici : ») */
.fil { font-size: .92rem; border-bottom: 1px solid var(--trait); }
.fil .contenu { display: flex; flex-wrap: wrap; gap: 4px 8px; padding-block: 10px; color: var(--texte-doux); }
.fil ol { display: contents; list-style: none; }
.fil li { display: inline-flex; align-items: center; gap: 8px; }
.fil li + li::before { content: "›"; color: var(--texte-doux); }
.fil [aria-current] { color: var(--encre); font-weight: 700; }

/* En-tête de page : titre + chapô éventuel */
.tete-page { background: var(--tete-fond); }
.tete-page .contenu { padding-block: 28px 30px; }
.tete-page h1 { font-size: clamp(1.7rem, 6cqi, 2.6rem); margin-bottom: .3em; }
.tete-page p { max-width: 60ch; margin: 0; font-size: 1.08rem; }

/* Pastilles de thèmes : ancres vers chaque section (Démarches) */
.puces { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 20px 0 32px; }
.puces a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 6px; text-decoration: none; font-weight: 700;
  color: var(--encre); background: var(--fond); border: 1px solid var(--carte-bord); border-radius: var(--rayon-bouton); }
.puces a:hover { border-color: var(--vert-fonce); }
.puces .icone { width: 30px; height: 30px; padding: 5px; box-sizing: border-box; background: var(--pastille-fond); color: var(--pastille-texte); border-radius: var(--rayon); }
.puces .nombre { font-weight: 400; color: var(--texte-doux); }

/* Liste de tutoriels : grandes cibles, repère vidéo */
.theme { scroll-margin-top: 80px; }
.theme + .theme { margin-top: 36px; }
.theme h2 { display: flex; align-items: center; gap: 12px; }
.theme h2 .icone { width: 40px; height: 40px; padding: 8px; box-sizing: border-box; background: var(--pastille-fond); color: var(--pastille-texte); border-radius: var(--rayon); }
.tutos { display: grid; gap: 10px; list-style: none; padding: 0; margin: 0; }
.tutos a.article { width: 100%; font: inherit; text-align: left; cursor: pointer; display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 14px; text-decoration: none; color: var(--encre); font-weight: 700;
  background: var(--carte-fond); border: 1px solid var(--carte-bord); border-radius: var(--rayon); }
.tutos a.article:hover { border-color: var(--vert-fonce); }
.tutos .icone { color: var(--vert-fonce); width: 28px; height: 28px; }
.tutos a.article .icone { color: var(--texte-doux); }
@container site (min-width: 760px) { .tutos { grid-template-columns: 1fr 1fr; } }

/* Lecteur vidéo : affiche locale, aucune requête vers YouTube avant le clic */
.lecteur { position: relative; aspect-ratio: 16 / 9; background: var(--gris-fonce); color: #fff; overflow: hidden; border-radius: var(--rayon); }
.lecteur iframe { width: 100%; height: 100%; border: 0; display: block; }
.lecteur img.affiche { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.lecteur:has(img.affiche) button { background: linear-gradient(rgb(31 42 27 / .35), rgb(31 42 27 / .78)); }
.lecteur button { position: absolute; inset: 0; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 20px; font: inherit; color: inherit; text-align: center; cursor: pointer; border: 0;
  background: radial-gradient(circle at 50% 40%, #4a4d4a, var(--gris-fonce) 70%); }
.lecteur .rond { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--anis); color: var(--encre); transition: transform .15s; }
.lecteur .rond svg { width: 30px; height: 30px; fill: currentColor; margin-left: 5px; }
.lecteur button:hover .rond { transform: scale(1.06); }
.lecteur strong { font-size: clamp(1rem, 3cqi, 1.3rem); max-width: 32ch; }
.lecteur small { font-size: .85rem; color: #E1E3DC; }

/* Article : texte + colonne « Dans la même rubrique » */
.mise-en-page { display: grid; gap: 32px; padding-block: 32px 56px; }
.prose { max-width: 70ch; }
.prose h2 { font-size: clamp(1.25rem, 4cqi, 1.55rem); margin-top: 1.8em; }
.prose figure { margin: 0 0 1.5em; }
.prose figure img { width: 100%; border-radius: var(--rayon); }
.prose .lecteur { margin-bottom: 1.5em; }
.chapo-article { font-size: 1.15rem; }
.encadre { padding: 18px; background: var(--carte-fond); border: 1px solid var(--trait); border-radius: var(--rayon); }
.encadre + .encadre { margin-top: 16px; }
.encadre h2 { font-size: 1.05rem; }
.encadre ul { list-style: none; margin: 0; padding: 0; }
.encadre li a { display: flex; align-items: center; min-height: 40px; color: var(--encre); text-decoration: none; }
.encadre li a:hover { text-decoration: underline; }
.encadre li a[aria-current] { font-weight: 700; color: var(--vert-fonce); }
.encadre li a[aria-current]::before { content: ""; width: 4px; height: 22px; background: var(--vert); margin-right: 10px; }
.encadre p { margin: 0 0 .6em; }
@container site (min-width: 980px) { .mise-en-page { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; } .mise-en-page aside { position: sticky; top: 84px; } }

/* Agenda : la liste complète réutilise les cartes .actu */


/* Catalogue du Centre de ressources : recherche + filtres, filtrage dans la page */
.recherche { display: flex; align-items: center; gap: 10px; max-width: 560px; margin-top: 20px; padding: 0 14px; min-height: 52px;
  background: var(--fond); border: 2px solid var(--encre); border-radius: var(--rayon-bouton); }
.recherche input { flex: 1; min-width: 0; border: 0; font: inherit; font-size: 1.05rem; background: transparent; color: var(--encre); min-height: 48px; }
.recherche input:focus { outline: none; }
.recherche:focus-within { outline: 3px solid var(--vert-fonce); outline-offset: 2px; }
.filtres { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; border: 0; }
.filtres legend { width: 100%; font-weight: 700; margin-bottom: 8px; }
.filtres button { min-height: 40px; padding: 0 14px; font: inherit; cursor: pointer; color: var(--encre); background: var(--fond);
  border: 1px solid var(--trait); border-radius: var(--rayon-bouton); }
.filtres button[aria-pressed="true"] { background: var(--encre); color: #fff; border-color: var(--encre); font-weight: 700; }
.compte { margin: 22px 0 10px; color: var(--texte-doux); font-weight: 700; }
.fiches { list-style: none; padding: 0; margin: 0; display: grid; }
.fiche { position: relative; display: grid; grid-template-columns: 1fr; gap: 2px; padding: 14px 0; border-bottom: 1px solid var(--trait); }
.fiche h2 { font-size: 1.05rem; margin: 0; }
.fiche h2 a { color: var(--encre); text-decoration: none; }
.fiche h2 a::after { content: ""; position: absolute; inset: 0; }
.fiche:hover h2 a { text-decoration: underline; }
.fiche:focus-within { outline: 3px solid var(--vert-fonce); outline-offset: 2px; }
.fiche .auteur { color: var(--texte-doux); font-size: .95rem; }
.fiche .etiquettes { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: .85rem; margin-top: 4px; }
.fiche .etiquette { padding: 1px 8px; background: var(--anis-pale); color: var(--encre); border-radius: var(--rayon); }
.aucun { padding: 18px; background: var(--anis-pale); }
@container site (min-width: 760px) {
  .fiche { grid-template-columns: minmax(0, 1fr) 220px; column-gap: 24px; align-items: baseline; }
  .fiche .etiquettes { grid-column: 2; grid-row: 1 / span 2; justify-content: flex-end; }
}

/* Contact : coordonnées + formulaire (composant Contacts natif) */
.contact-page { display: grid; gap: 28px; padding-block: 32px 56px; }
.coordonnees { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.coordonnees li { display: flex; gap: 12px; align-items: flex-start; }
.coordonnees .icone { flex: none; width: 36px; height: 36px; padding: 7px; box-sizing: border-box; background: var(--pastille-fond); color: var(--pastille-texte); border-radius: var(--rayon); }
.formulaire { display: grid; gap: 16px; }
.formulaire h2 { margin-bottom: 0; }
.champ { display: grid; gap: 6px; }
.champ label { font-weight: 700; }
.champ .requis { color: var(--texte-doux); font-weight: 400; }
.champ input, .champ textarea { font: inherit; color: var(--encre); background: var(--fond); min-height: 48px; padding: 10px 12px;
  border: 2px solid var(--gris-logo); border-radius: var(--rayon); }
.champ textarea { min-height: 160px; resize: vertical; }
.champ input:focus, .champ textarea:focus { outline: 3px solid var(--vert-fonce); outline-offset: 1px; border-color: var(--encre); }
.case { display: flex; gap: 10px; align-items: flex-start; }
.case input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--vert-fonce); }
.envoyer { justify-self: start; min-height: 52px; padding: 0 26px; font: inherit; font-weight: 700; cursor: pointer;
  background: var(--bouton-fond); color: var(--bouton-texte); border: 0; border-radius: var(--rayon-bouton); }
@container site (min-width: 980px) { .contact-page { grid-template-columns: 360px minmax(0, 1fr); column-gap: 56px; align-items: start; } }

/* =====================================================================================
 * Ce que produisent les gabarits NATIFS de Joomla, habillé aux couleurs du site
 * (formulaire de contact, pagination, messages, descriptions de catégories).
 * ===================================================================================== */
.description p:last-child { margin-bottom: 0; }
.entete-section + .description, .section .description { margin-bottom: 18px; max-width: 70ch; }
.entree-sans-lien { display: flex; align-items: center; min-height: 44px; padding: 0 8px; font-weight: 700; }
.theme h3 { display: flex; align-items: center; gap: 12px; font-size: clamp(1.15rem, 3.5cqi, 1.4rem); }
.theme h3 .icone { width: 40px; height: 40px; padding: 8px; box-sizing: border-box; background: var(--pastille-fond); color: var(--pastille-texte); border-radius: var(--rayon); }
.principal { min-width: 0; }
.contenu-article { padding-top: 4px; }

/* Formulaire du composant Contacts (renderField : .control-group > .control-label + .controls) */
.formulaire form { display: grid; gap: 16px; }
.formulaire fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 16px; }
.formulaire legend { font-weight: 700; margin-bottom: 4px; }
.formulaire .control-group { display: grid; gap: 6px; }
.formulaire .control-label label { font-weight: 700; }
.formulaire .star { color: var(--texte-doux); font-weight: 400; }
.formulaire input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), .formulaire textarea, .formulaire select {
  width: 100%; font: inherit; color: var(--encre); background: var(--fond); min-height: 48px; padding: 10px 12px;
  border: 2px solid var(--gris-logo); border-radius: var(--rayon); }
.formulaire textarea { min-height: 160px; resize: vertical; }
.formulaire input:focus, .formulaire textarea:focus, .formulaire select:focus { outline: 3px solid var(--vert-fonce); outline-offset: 1px; border-color: var(--encre); }
.formulaire .invalid { border-color: #A4161A !important; }
.formulaire .form-control-feedback, .formulaire .invalid-feedback { color: #A4161A; font-weight: 700; }
.formulaire input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--vert-fonce); vertical-align: middle; margin-right: 8px; }
.formulaire .control-group:has(input[type="checkbox"]) { grid-template-columns: auto 1fr; align-items: center; }
.formulaire .control-group:has(input[type="checkbox"]) .controls { order: -1; }
.formulaire button[type="submit"] { justify-self: start; min-height: 52px; padding: 0 26px; font: inherit; font-weight: 700; cursor: pointer;
  background: var(--bouton-fond); color: var(--bouton-texte); border: 0; border-radius: var(--rayon-bouton); }

/* Pagination des listes */
.pagination { margin-top: 28px; }
.pagination ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--trait); border-radius: var(--rayon-bouton); text-decoration: none; }
.pagination .active span, .pagination [aria-current] { background: var(--encre); color: #fff; border-color: var(--encre); }

/* Messages système de Joomla (envoi du formulaire, erreurs) */
joomla-alert { display: block; margin: 16px auto; max-width: 1180px; padding: 14px 18px; border-left: 6px solid var(--vert); background: var(--anis-pale); color: var(--encre); }
joomla-alert[type="danger"], joomla-alert[type="error"] { border-left-color: #A4161A; background: #FCEBEA; }
joomla-alert .joomla-alert--close { float: right; font: inherit; background: none; border: 0; cursor: pointer; min-width: 44px; min-height: 44px; }

/* Catalogue avec vignettes (productions) */
.fiche.avec-vignette { grid-template-columns: 72px minmax(0, 1fr); column-gap: 14px; align-items: start; }
.fiche.avec-vignette .vignette { grid-row: span 2; aspect-ratio: 3 / 4; }
.fiche.avec-vignette .etiquettes { grid-column: 2; }
@container site (min-width: 760px) {
  .fiche.avec-vignette { grid-template-columns: 72px minmax(0, 1fr) 220px; }
  .fiche.avec-vignette .etiquettes { grid-column: 3; grid-row: 1 / span 2; }
}

/* Liens vers des documents (AdagvGabarit::documents) : pictogramme + poids réel */
a.document { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px; margin: 4px 0;
  background: var(--carte-fond); border: 1px solid var(--trait); border-radius: var(--rayon); color: var(--encre); font-weight: 700; text-decoration: none; }
a.document:hover { border-color: var(--vert-fonce); }
a.document .icone { color: var(--vert-fonce); }
a.document small { display: block; font-weight: 400; color: var(--texte-doux); font-size: .88rem; }
.encadre a.document { display: flex; }
.contenu-module p:empty { display: none; }

/* Vignette vidéo (adagv.vignette-video) : lance la vidéo sur place ; le titre à côté mène à
   l'article. Dans les tutoriels comme dans les cartes. */
.vignette-video { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; border-radius: var(--rayon); }
.vignette-video:hover .lecture-mini .icone, .vignette-video:focus-visible .lecture-mini .icone { transform: scale(1.12); }
.miniature { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--gris-fonce); border-radius: var(--rayon); overflow: hidden; }
.miniature img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: auto; border-radius: 0; }
.lecture-mini { position: absolute; inset: 0; display: grid; place-items: center; }
.lecture-mini .icone { width: 38px; height: 38px; padding: 6px; border-radius: 50%; background: var(--anis); color: var(--encre); stroke-width: 2.2; transition: transform .15s; }
/* Tutoriels : une carte = la vignette + le titre (lien vers l'article) */
.tutos .tuto { display: grid; grid-template-columns: 128px 1fr; gap: 14px; align-items: center; padding: 8px;
  background: var(--carte-fond); border: 1px solid var(--carte-bord); border-radius: var(--rayon); }
.tutos .tuto:hover { border-color: var(--vert-fonce); }
.tutos .tuto a.titre-tuto { font-weight: 700; color: var(--encre); text-decoration: underline; text-decoration-color: var(--trait); text-underline-offset: 3px; }
.tutos .tuto a.titre-tuto:hover { text-decoration-color: currentColor; }
.tutos .tuto a.titre-tuto:focus-visible { outline: 3px solid var(--vert-fonce); outline-offset: 2px; }
@container site (min-width: 760px) {
  .tutos:has(.tuto) { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .tutos .tuto { grid-template-columns: 1fr; align-items: start; padding: 0 0 12px; overflow: hidden; }
  .tutos .tuto .vignette-video, .tutos .tuto .miniature { border-radius: 0; }
  .tutos .tuto a.titre-tuto { padding: 0 12px; }
}

/* Fiche article : image entière (affiches, jaquettes), informations de la fiche */
.image-article img { width: auto; max-width: 100%; max-height: 75vh; margin-inline: auto; }
.infos-fiche { display: grid; gap: 6px 24px; margin: 0 0 1.5em; padding: 14px 16px; background: var(--anis-pale); border-radius: var(--rayon); }
.infos-fiche div { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 12px; }
.infos-fiche dt { font-weight: 700; }
.infos-fiche dd { margin: 0; }
.rubrique h2 { font-size: 1.05rem; }

/* Section « L'association » : documents et adhésion, boutons de même largeur, sans puces */
.documents li { margin: 0; }
.documents a.document { display: flex; width: 100%; margin: 0; }

/* Portail « site en préparation » (AdagvGabarit::portail) : version de recette fermée par un code */
.portail { max-width: 340px; margin: 12vh auto; padding: 32px 24px; background: #fff; border-top: 4px solid var(--anis); text-align: center; }
.portail img { width: 180px; height: auto; margin: 0 auto 8px; }
.portail h1 { font-size: 1.4rem; margin: 0 0 20px; }
.portail form { display: grid; gap: 10px; text-align: left; }
.portail label { font-weight: 700; }
.portail input { font: inherit; font-size: 1.3rem; letter-spacing: .3em; padding: 10px 12px; border: 2px solid var(--encre); border-radius: var(--rayon); }
.portail .erreur { color: #8A1C1C; margin: 0; font-weight: 700; }
.portail button { font: inherit; font-weight: 700; padding: 12px; border: 0; border-radius: var(--rayon); background: var(--vert-fonce); color: #fff; cursor: pointer; }
.portail button:hover { background: var(--encre); }
