/* =========================================================
   Centre Social Rural de Lucé — feuille de style
   Les couleurs sont reprises du logo (brique, bois, prairie, ciel)
   et chaque pôle a sa propre couleur vive.
   Pour changer une couleur partout : modifier la variable ci-dessous.
   ========================================================= */

:root {
  --brique: #c9392b;        /* rouge du logo */
  --brique-fonce: #9e2a1f;
  --marine: #1c2a5e;        /* bleu nuit du « de Lucé » */
  --bois: #fbe7a4;
  --creme: #fffaf0;
  --papier: #ffffff;
  --encre: #1f2340;
  --encre-douce: #565b78;
  --trait: #ece4d3;

  /* Couleurs des pôles : vive / foncée / claire */
  --rose: #ef7a86;    --rose-fonce: #b23e55;    --rose-clair: #fde6e8;
  --soleil: #f5c935;  --soleil-fonce: #8a6500;  --soleil-clair: #fff4c7;
  --ciel: #2a96d6;    --ciel-fonce: #17669e;    --ciel-clair: #e0f0fb;
  --prairie: #6db552; --prairie-fonce: #3a7a28; --prairie-clair: #e7f4dd;
  --prune: #4a5bb5;   --prune-fonce: #2c3a86;   --prune-clair: #e6e9f8;
  --menthe: #2aa392;  --menthe-fonce: #167468;  --menthe-clair: #dbf3ef;
  --tomate: #ef8a3c;  --tomate-fonce: #a8520f;  --tomate-clair: #fde9d8;

  --rayon: 22px;
  --ombre: 0 2px 4px rgba(51, 36, 29, .05), 0 10px 30px rgba(51, 36, 29, .09);
  --ombre-forte: 0 6px 12px rgba(51, 36, 29, .08), 0 22px 44px rgba(51, 36, 29, .16);
  --largeur: 1180px;
  --rebond: cubic-bezier(.34, 1.56, .64, 1);

  --titre: "Baloo 2", "Trebuchet MS", sans-serif;
  --texte: "Nunito", "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--texte); font-size: 1.0625rem; line-height: 1.65;
  color: var(--encre); background: var(--creme); overflow-x: hidden; overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brique); text-underline-offset: 3px; }
a:hover { color: var(--brique-fonce); }

h1, h2, h3, h4 { font-family: var(--titre); line-height: 1.1; color: var(--marine); margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }

.conteneur { width: min(var(--largeur), 100% - 32px); margin-inline: auto; }

/* Surlignage façon feutre */
.feutre { background: linear-gradient(transparent 55%, var(--f, #ffd27a) 55%, var(--f, #ffd27a) 88%, transparent 88%); padding: 0 .12em; border-radius: 4px; }

.lien-evitement { position: absolute; left: -9999px; top: 8px; background: var(--brique); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.lien-evitement:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--ciel); outline-offset: 3px; border-radius: 6px; }

/* ---------- Crieur public : le bandeau « gazette » en haut ----------
   Inspiré du journal que tient le livreur : papier crème, bande rouge, éclats colorés. */
.alerte {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 14px;
  color: var(--marine); font-size: .95rem; font-weight: 700; padding: 6px 16px 6px 8px; min-height: 46px;
  background-color: #fbf3e3;
  background-image: repeating-linear-gradient(180deg, transparent 0 7px, rgba(28, 42, 94, .05) 7px 8px);
  border-bottom: 6px double var(--marine);
  overflow: hidden; overflow: clip;
}
.alerte a { color: var(--brique); font-weight: 800; text-decoration-thickness: 2px; }
.alerte-tete { flex: none; display: flex; align-items: center; gap: 4px; align-self: stretch; }
/* On ne montre que le haut du livreur (tête, casquette et journal), qui « passe la tête » dans le bandeau */
.alerte-livreur { position: relative; width: 62px; height: 46px; align-self: flex-end; margin-bottom: -6px; overflow: hidden; }
.alerte-livreur img {
  position: absolute; width: 104px; height: 104px; max-width: none; left: -26px; top: 0;
  transform-origin: 45% 60%; animation: livreurBandeau 2.4s ease-in-out infinite;
}
@keyframes livreurBandeau { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg) translateY(-2px); } }
.alerte-pastille {
  flex: none; background: var(--brique); color: #fff; border-radius: 4px; padding: 3px 12px; font-family: var(--titre); font-weight: 800; font-size: .85rem;
  text-transform: uppercase; letter-spacing: .08em; box-shadow: 3px 3px 0 var(--marine); transform: rotate(-3deg); animation: crie 3s ease-in-out infinite;
}
.alerte-eclats { width: 30px; height: 24px; margin-left: -2px; transform-origin: 0 100%; animation: eclats 3s ease-in-out infinite; }
@keyframes eclats { 0%, 70%, 100% { transform: scale(1); } 80% { transform: scale(1.25) rotate(-6deg); } 90% { transform: scale(.95); } }
.alerte-fil { position: relative; display: grid; min-width: 0; }
.alerte-info { grid-area: 1 / 1; margin: 0; opacity: 0; transform: translateY(12px); transition: opacity .45s ease, transform .5s var(--rebond); visibility: hidden; text-align: center; }
.alerte-info.active { opacity: 1; transform: none; visibility: visible; }
.alerte-points { flex: none; display: flex; gap: 5px; }
.alerte-points i { width: 7px; height: 7px; border-radius: 50%; background: rgba(28, 42, 94, .25); transition: background .3s, transform .3s; }
.alerte-points i.active { background: var(--marine); transform: scale(1.3); }
@media (max-width: 640px) {
  .alerte { font-size: .82rem; padding: 6px 10px 6px 4px; gap: 6px; }
  .alerte-livreur { width: 54px; height: 40px; }
  .alerte-livreur img { width: 90px; height: 90px; left: -22px; }
  .alerte-pastille { display: none; }
  .alerte-eclats { width: 22px; }
  .alerte-points { display: none; }
}

/* ---------- Crieur public : le petit livreur de journaux flottant ---------- */
.crieur { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
  pointer-events: none; opacity: 0; transform: translateY(30px) scale(.8); transition: opacity .35s ease, transform .5s var(--rebond); }
.crieur.visible { opacity: 1; transform: none; pointer-events: auto; }
.crieur-bouton {
  position: relative; width: 88px; height: 88px; padding: 0; border: 0; background: none; cursor: pointer;
  display: grid; place-items: end center; transition: transform .25s var(--rebond);
}
/* Petite ombre au sol sous le livreur */
.crieur-bouton::before {
  content: ""; position: absolute; bottom: 2px; left: 50%; width: 48px; height: 10px; margin-left: -19px; border-radius: 50%;
  background: rgba(31, 35, 64, .22); filter: blur(2px); animation: ombreLivreur 1.1s ease-in-out infinite alternate;
}
.crieur-bouton .livreur {
  position: relative; width: 100%; height: auto; display: block; filter: drop-shadow(0 2px 0 #fff) drop-shadow(0 0 2px #fff);
  transform-origin: 60% 100%; animation: marche 1.1s ease-in-out infinite alternate;
}
@keyframes marche { from { transform: translateY(0) rotate(-2deg); } to { transform: translateY(-6px) rotate(2deg); } }
@keyframes ombreLivreur { from { transform: scaleX(1); opacity: 1; } to { transform: scaleX(.8); opacity: .7; } }
.crieur-bouton:hover { transform: scale(1.06); }
.crieur.lu .crieur-bouton .livreur { animation-duration: 1.8s; }
.crieur-bouton:hover { transform: scale(1.08) rotate(-6deg); }
.crieur:not(.lu).visible .crieur-bouton { animation: bond 4s ease-in-out 1s infinite; }
@keyframes bond { 0%, 78%, 100% { transform: none; } 84% { transform: translateY(-16px) rotate(-6deg); } 90% { transform: translateY(0) rotate(3deg); } 95% { transform: translateY(-5px); } }
@keyframes agite { 0%, 75%, 100% { transform: rotate(0); } 80% { transform: rotate(-14deg) scale(1.1); } 85% { transform: rotate(12deg) scale(1.1); } 90% { transform: rotate(-8deg); } 95% { transform: rotate(4deg); } }
.crieur-compte {
  position: absolute; top: 6px; left: 10px; z-index: 1; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 14px; background: var(--brique); color: #fff !important;
  color: var(--marine); font: 800 .85rem/26px var(--texte); border: 3px solid #fff;
}
.crieur.lu .crieur-compte { background: #fff; color: var(--encre-douce) !important; border-color: #eadcbf; }
.crieur-panneau {
  width: min(360px, calc(100vw - 40px)); background: #fbf3e3; border: 3px solid #eadcbf; border-radius: 20px; padding: 16px 18px 12px;
  box-shadow: 0 8px 0 #e3d3ae, 0 20px 40px rgba(31, 35, 64, .2); transform-origin: bottom right; animation: crieurOuvre .4s var(--rebond);
}
@keyframes crieurOuvre { from { opacity: 0; transform: scale(.7) translateY(20px); } }
.crieur-tete { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-family: var(--titre); color: var(--marine); font-size: 1.15rem; }
.crieur-fermer { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--papier); color: var(--marine); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.crieur-panneau ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.crieur-panneau li { display: flex; gap: 10px; align-items: flex-start; background: var(--papier); border-radius: 14px; padding: 10px 12px; font-size: .92rem; line-height: 1.4; border-left: 4px solid var(--soleil); }
.crieur-panneau li a { font-weight: 800; }
.crieur-emoji { font-size: 1.3rem; line-height: 1.2; }
@media (max-width: 640px) { .crieur { right: 8px; bottom: 8px; } .crieur-bouton { width: 72px; height: 72px; } .crieur-compte { top: 8px; left: 12px; } }

/* ---------- En-tête ---------- */
.entete {
  background: #86c46a;
  position: sticky; top: 0; z-index: 50; transition: box-shadow .25s;
}
body.defile .entete { box-shadow: 0 6px 24px rgba(51, 36, 29, .1); }
/* Le chemin du logo qui serpente dans le bandeau */
.entete-chemin { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.entete .conteneur { position: relative; z-index: 1; }
.entete .conteneur { display: flex; align-items: center; gap: 14px; min-height: 78px; }

.marque { display: flex; align-items: center; text-decoration: none; margin-right: auto; align-self: flex-start; padding-top: 6px; }
.marque-logo {
  width: 108px; height: 108px; margin-bottom: -38px; display: block; border-radius: 50%; background: #fff;
  box-shadow: 0 8px 22px rgba(31, 35, 64, .16); transition: width .35s ease, height .35s ease, margin .35s ease, transform .5s var(--rebond);
}
.marque:hover .marque-logo { transform: rotate(-6deg) scale(1.04); }
body.defile .marque-logo { width: 68px; height: 68px; margin-bottom: -6px; }
.pied-marque .marque-logo { width: 120px; height: 120px; margin: 0; }

.statut {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  font-size: .85rem; font-weight: 800; text-decoration: none; white-space: nowrap; order: 2;
}
.statut.ouvert { background: var(--prairie-clair); color: var(--prairie-fonce); }
.statut.ferme { background: var(--tomate-clair); color: var(--tomate-fonce); }
.statut-point { width: 10px; height: 10px; border-radius: 50%; background: currentColor; position: relative; }
.statut.ouvert .statut-point::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid currentColor; animation: pouls 1.8s ease-out infinite; }
@keyframes pouls { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.statut-court { display: none; }
.statut:hover { color: inherit; filter: brightness(.97); }

.nav-principale { order: 3; }
@media (min-width: 1121px) {
  .nav-principale > ul { background: rgba(255, 255, 255, .94); border-radius: 999px; padding: 5px; box-shadow: 0 4px 14px rgba(31, 35, 64, .08); }
  .nav-principale a, .nav-principale button { border-radius: 999px; }
  .nav-principale .bouton-contact { margin-left: 4px; }
}
.nav-principale ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; align-items: center; }
.nav-principale a, .nav-principale button {
  display: block; padding: 9px 12px; border-radius: 12px; font: 800 .97rem var(--texte); color: var(--encre);
  text-decoration: none; background: none; border: 0; cursor: pointer; transition: background .2s, color .2s;
}
.nav-principale a:hover, .nav-principale button:hover { background: var(--soleil-clair); color: var(--brique); }
.nav-principale a[aria-current="page"], .sous-menu.actif > button { color: var(--brique); background: var(--soleil-clair); }
.nav-principale .bouton-contact { background: var(--brique); color: #fff; margin-left: 6px; border-radius: 999px; padding: 10px 18px; }
.nav-principale .bouton-contact:hover { background: var(--brique-fonce); color: #fff; transform: translateY(-2px); }

.sous-menu { position: relative; }
.sous-menu > button::after { content: ""; display: inline-block; width: 7px; height: 7px; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); margin-left: 8px; }
.sous-menu ul {
  position: absolute; top: calc(100% + 6px); left: -8px; min-width: 250px; background: var(--papier); border-radius: 18px;
  box-shadow: var(--ombre-forte); padding: 8px; flex-direction: column; align-items: stretch;
  opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s, transform .25s var(--rebond), visibility .2s;
}
.sous-menu:hover ul, .sous-menu:focus-within ul, .sous-menu.ouvert ul { opacity: 1; visibility: visible; transform: none; }
.sous-menu ul a:hover { padding-left: 18px; }

.bouton-menu {
  display: none; order: 3; align-items: center; gap: 8px; background: var(--brique); color: #fff; border: 0; border-radius: 999px;
  padding: 10px 16px; font: 800 1rem var(--texte); cursor: pointer;
}
.burger, .burger::before, .burger::after { display: block; width: 16px; height: 2.5px; background: #fff; border-radius: 2px; position: relative; transition: transform .25s; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -5px; } .burger::after { top: 5px; }
.menu-ouvert .burger { background: transparent; }
.menu-ouvert .burger::before { transform: translateY(5px) rotate(45deg); }
.menu-ouvert .burger::after { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 1120px) {
  .bouton-menu { display: inline-flex; }
  .nav-principale {
    display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--papier);
    padding: 8px 16px 20px; max-height: calc(100vh - 90px); overflow-y: auto; box-shadow: 0 20px 30px rgba(51,36,29,.12);
  }
  .nav-principale.ouvert { display: block; animation: deroule .3s ease; }
  @keyframes deroule { from { opacity: 0; transform: translateY(-10px); } }
  .nav-principale ul { flex-direction: column; align-items: stretch; }
  .sous-menu ul { position: static; box-shadow: none; padding: 0 0 0 14px; min-width: 0; opacity: 1; visibility: visible; transform: none; display: flex; }
  .sous-menu > button::after { display: none; }
  .sous-menu > button { color: var(--encre-douce); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; cursor: default; background: none !important; }
  .nav-principale .bouton-contact { margin: 10px 0 0; text-align: center; }
}
@media (max-width: 560px) {
  .statut-long { display: none; }
  .statut-court { display: inline; }
  .marque-logo, body.defile .marque-logo { width: 64px; height: 64px; margin-bottom: -10px; }
  .entete .conteneur { gap: 8px; min-height: 68px; }
  .bouton-menu { padding: 10px 13px; }
}

/* ---------- Boutons ---------- */
.boutons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.bouton {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; border-radius: 999px; border: 2px solid var(--brique);
  background: var(--brique); color: #fff; font-weight: 800; text-decoration: none; cursor: pointer; font-family: var(--texte); font-size: 1rem;
  transition: transform .25s var(--rebond), background .2s, box-shadow .2s; box-shadow: 0 6px 0 var(--brique-fonce);
}
.bouton:hover { background: var(--brique-fonce); border-color: var(--brique-fonce); color: #fff; transform: translateY(-3px); box-shadow: 0 9px 0 #5e2216; }
.bouton:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--brique-fonce); }
.bouton.secondaire { background: var(--papier); color: var(--brique); box-shadow: 0 6px 0 var(--bois); border-color: var(--brique); }
.bouton.secondaire:hover { background: var(--soleil-clair); box-shadow: 0 9px 0 var(--bois); }

/* ---------- Accueil : la planète ---------- */
.accueil-hero {
  position: relative; overflow: hidden; overflow: clip; padding: 16px 0 28px;
  background:
    radial-gradient(circle at 88% 12%, rgba(242,169,59,.45), transparent 26%),
    radial-gradient(circle at 10% 90%, rgba(217,88,124,.18), transparent 30%),
    linear-gradient(180deg, #bfe3f7 0%, #dff0fa 45%, var(--creme) 100%);
}
.hero-grille {
  display: grid; position: relative; z-index: 1; align-items: center; gap: 0 36px;
  grid-template-columns: min(520px, 54vh) minmax(0, 1fr);
  grid-template-areas: "titre titre" "planete cote";
}
.hero-titre { grid-area: titre; text-align: center; }
.hero-titre h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); margin-bottom: 0; }
.hero-titre .surtitre { margin-bottom: 6px; }
#planete { grid-area: planete; }
.hero-cote { grid-area: cote; }
.hero-consigne { font-weight: 800; color: var(--marine); margin-bottom: 8px; }
.accueil-hero .accroche { font-size: 1.05rem; margin: 16px 0 0; max-width: 32em; }
.accueil-hero .boutons { margin-top: 14px; }
.soleil { position: absolute; top: 40px; right: 8%; width: 90px; height: 90px; border-radius: 50%; background: var(--soleil); box-shadow: 0 0 0 18px rgba(242,169,59,.2), 0 0 0 40px rgba(242,169,59,.1); animation: briller 6s ease-in-out infinite; }
@keyframes briller { 50% { box-shadow: 0 0 0 26px rgba(242,169,59,.18), 0 0 0 56px rgba(242,169,59,.07); } }

#planete { position: relative; display: grid; justify-items: center; }
.planete-ciel { position: absolute; inset: 0 -40px; pointer-events: none; overflow: hidden; overflow: clip; }
.nuage { position: absolute; background: #fff; border-radius: 999px; opacity: .9; animation: derive linear infinite; }
.nuage::before, .nuage::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.nuage.n1 { width: 110px; height: 34px; top: 8%; left: -10%; animation-duration: 38s; }
.nuage.n1::before { width: 50px; height: 50px; top: -26px; left: 18px; } .nuage.n1::after { width: 38px; height: 38px; top: -18px; left: 56px; }
.nuage.n2 { width: 80px; height: 26px; top: 30%; left: -20%; animation-duration: 52s; animation-delay: -20s; opacity: .7; }
.nuage.n2::before { width: 38px; height: 38px; top: -20px; left: 12px; } .nuage.n2::after { width: 28px; height: 28px; top: -12px; left: 42px; }
.nuage.n3 { width: 130px; height: 38px; top: 55%; left: -30%; animation-duration: 64s; animation-delay: -40s; opacity: .55; }
.nuage.n3::before { width: 60px; height: 60px; top: -32px; left: 22px; } .nuage.n3::after { width: 44px; height: 44px; top: -20px; left: 70px; }
@keyframes derive { from { transform: translateX(0); } to { transform: translateX(780px); } }

.planete-scene { position: relative; display: grid; justify-items: center; width: 100%; }
.planete-svg { width: min(540px, 100%, 58vh); height: auto; position: relative; overflow: visible; filter: drop-shadow(0 18px 24px rgba(51,36,29,.15)); }
#monde { transform-origin: 300px 318px; transform-box: view-box; transition: transform 1.3s cubic-bezier(.65, 0, .35, 1); }
.pl-el { transition: opacity 1.1s ease; }
.pl-pole { cursor: pointer; }
.pl-pole { transform-origin: 0 0; transition: transform 1s var(--rebond); }
.pl-el:not(.actif) .pl-pole { transform: scale(.68); }
.pl-el.actif .pl-pole { animation: saut 1.1s var(--rebond) .9s both; }
@keyframes saut { 0% { transform: scale(.68); } 55% { transform: scale(1.14) translateY(-8px); } 100% { transform: scale(1.06); } }
.pl-el:not(.actif) .pl-pole:hover { transform: scale(.74) translateY(-4px); }
.ruban text { pointer-events: none; }

.planete-nav { display: flex; align-items: center; gap: 12px; margin-top: 2px; }
.pl-fleche {
  width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--papier); color: var(--brique);
  font: 800 1.8rem/1 var(--titre); cursor: pointer; box-shadow: var(--ombre); transition: transform .2s var(--rebond);
  position: absolute; top: 42%; z-index: 2;
}
.pl-fleche.gauche { left: 2%; }
.pl-fleche.droite { right: 2%; }
.pl-fleche:hover { transform: scale(1.12); }
.pl-points { display: flex; gap: 8px; }
.pl-point { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--c); background: var(--papier); padding: 0; cursor: pointer; transition: transform .25s var(--rebond), background .2s; }
.pl-point[aria-pressed="true"] { background: var(--c); transform: scale(1.35); }

.pole-carte {
  display: block; margin-top: 0; width: min(480px, 100%); min-height: 150px; background: var(--papier); border-radius: var(--rayon);
  padding: 12px 20px; text-decoration: none; color: var(--encre); box-shadow: var(--ombre); border-left: 8px solid var(--c);
  transition: transform .25s var(--rebond), box-shadow .25s;
}
.pole-carte:hover { transform: translateY(-4px); box-shadow: var(--ombre-forte); color: var(--encre); }
.pole-carte.change { animation: carteArrive .6s var(--rebond); }
@keyframes carteArrive { from { opacity: 0; transform: translateY(12px) scale(.97); } }
.pc-sous { display: block; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--c); }
.pc-nom { display: block; font-family: var(--titre); font-size: 1.4rem; line-height: 1.1; color: var(--encre); margin: 2px 0 2px; }
.pc-texte { display: block; color: var(--encre-douce); font-size: .97rem; line-height: 1.5; }
.pc-lien { display: inline-block; margin-top: 4px; font-weight: 800; color: var(--c); }

@media (max-width: 720px) {
  .hero-grille { grid-template-columns: minmax(0, 1fr); grid-template-areas: "titre" "planete" "cote"; }
  .hero-cote { text-align: center; }
  .hero-consigne { display: none; }
  .accueil-hero .pole-carte { margin-inline: auto; text-align: left; }
  .accueil-hero .accroche { margin-inline: auto; }
  .accueil-hero .boutons { justify-content: center; }
  .soleil { width: 60px; height: 60px; right: 6%; top: 20px; }
}

/* ---------- Séparateurs en collines ---------- */
.collines { display: block; width: 100%; height: 70px; margin-top: -1px; }
.collines.bas { margin-bottom: -1px; }

/* ---------- En-tête de page intérieure ---------- */
.titre-page {
  position: relative; padding: 44px 0 0; overflow: hidden; overflow: clip;
  background: linear-gradient(180deg, var(--accent-clair, var(--ciel-clair)) 0%, var(--accent-clair, var(--ciel-clair)) 70%, var(--creme) 100%);
}
.titre-page::before {
  content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; right: -120px; top: -160px;
  background: var(--accent, var(--soleil)); opacity: .18;
}
.titre-page .conteneur { position: relative; padding-bottom: 36px; }
.titre-page .conteneur.avec-illu { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: end; padding-bottom: 0; }
.titre-page .conteneur.avec-illu > *:not(.titre-illu) { grid-column: 1; }
.titre-page .conteneur.avec-illu > :last-child:not(.titre-illu) { padding-bottom: 36px; }
.titre-illu { grid-column: 2; grid-row: 1 / span 6; align-self: end; }
.scene-pole { width: 100%; height: auto; display: block; }
.scene-image { width: min(100%, 420px); height: auto; display: block; margin: 0 auto -6px; animation: batArrive .9s var(--rebond) both; }
.bat-saut { animation: batArrive .9s var(--rebond) both; }
@keyframes batArrive { from { opacity: 0; transform: translateY(40px); } }
.titre-page h1 { color: var(--accent-fonce, var(--brique-fonce)); }
.titre-page .chapo { font-size: 1.18rem; max-width: 40em; }
.fil-ariane { font-size: .9rem; color: var(--encre-douce); margin-bottom: 10px; font-weight: 600; }
.fil-ariane a { color: var(--encre-douce); }
@media (max-width: 760px) {
  .titre-page .conteneur.avec-illu { grid-template-columns: 1fr; }
  .titre-illu { grid-column: 1; grid-row: auto; max-width: 340px; justify-self: center; }
  .titre-page .conteneur.avec-illu > :last-child:not(.titre-illu) { padding-bottom: 0; }
  .titre-page .conteneur.avec-illu .chapo { margin-bottom: 0; }
}

/* ---------- Sections ---------- */
.section { padding: 64px 0; position: relative; }
.section.blanche { background: var(--papier); }
.section.prairie { background: var(--prairie-clair); }
.section.ciel { background: var(--ciel-clair); }
.section.soleil-fond { background: var(--soleil-clair); }
.section.rose-fond { background: var(--rose-clair); }
.section-titre { text-align: center; margin-bottom: 36px; }
.section-titre p { color: var(--encre-douce); max-width: 40em; margin-inline: auto; font-size: 1.1rem; }
.surtitre { display: inline-block; font-weight: 800; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--brique); background: var(--papier); padding: 4px 14px; border-radius: 999px; margin-bottom: 10px; box-shadow: var(--ombre); }

.grille { display: grid; gap: 22px; }
.grille.deux { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grille.trois { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grille.quatre { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ---------- Cartes ---------- */
.carte {
  background: var(--papier); border-radius: var(--rayon); padding: 26px; box-shadow: var(--ombre); position: relative; overflow: hidden; overflow: clip;
  border-top: 6px solid var(--accent, var(--brique));
}
.carte h3, .carte h4 { color: var(--accent-fonce, var(--brique-fonce)); }
.carte h4 { font-size: 1.2rem; margin-bottom: .3em; }
.carte p:last-child { margin-bottom: 0; }
a.carte {
  display: flex; flex-direction: column; text-decoration: none; color: var(--encre);
  transition: transform .35s var(--rebond), box-shadow .3s; will-change: transform;
}
a.carte::after {
  content: ""; position: absolute; width: 160px; height: 160px; border-radius: 50%; right: -60px; bottom: -70px;
  background: var(--accent-clair, var(--soleil-clair)); transition: transform .5s var(--rebond); z-index: 0;
}
a.carte > * { position: relative; z-index: 1; }
a.carte:hover { transform: translateY(-8px) rotate(-.6deg); box-shadow: var(--ombre-forte); color: var(--encre); }
a.carte:hover::after { transform: scale(1.6); }
a.carte .plus { font-weight: 800; color: var(--accent-fonce, var(--brique)); margin-top: auto; padding-top: 10px; }
a.carte .plus::after { content: ""; }

.icone {
  width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 14px;
  background: var(--accent, var(--brique)); color: #fff; transform: rotate(-6deg); transition: transform .4s var(--rebond);
  box-shadow: 0 6px 0 var(--accent-fonce, var(--brique-fonce));
}
.icone svg { width: 30px; height: 30px; }
a.carte:hover .icone { transform: rotate(6deg) scale(1.1); }

/* Thèmes de couleur par public */
.t-petite { --accent: var(--rose); --accent-fonce: var(--rose-fonce); --accent-clair: var(--rose-clair); }
.t-enfance { --accent: var(--soleil); --accent-fonce: var(--soleil-fonce); --accent-clair: var(--soleil-clair); }
.t-jeunesse { --accent: var(--ciel); --accent-fonce: var(--ciel-fonce); --accent-clair: var(--ciel-clair); }
.t-famille { --accent: var(--prairie); --accent-fonce: var(--prairie-fonce); --accent-clair: var(--prairie-clair); }
.t-adulte { --accent: var(--prune); --accent-fonce: var(--prune-fonce); --accent-clair: var(--prune-clair); }
.t-france { --accent: var(--menthe); --accent-fonce: var(--menthe-fonce); --accent-clair: var(--menthe-clair); }
.t-alimentaire { --accent: var(--tomate); --accent-fonce: var(--tomate-fonce); --accent-clair: var(--tomate-clair); }
.t-services { --accent: var(--brique); --accent-fonce: var(--brique-fonce); --accent-clair: #f8e3dc; }

/* ---------- Apparition au défilement ---------- */
.apparait { opacity: 0; transform: translateY(28px); transition: opacity .7s ease var(--delai, 0ms), transform .8s var(--rebond) var(--delai, 0ms); }
.apparait.visible { opacity: 1; transform: none; }
.tr-profil.apparait.visible, .tr-puce.apparait.visible { transition: opacity .6s ease var(--delai, 0ms), transform .3s var(--rebond), border-color .2s, box-shadow .2s; }
a.carte.apparait.visible { transition: opacity .7s ease var(--delai, 0ms), transform .35s var(--rebond), box-shadow .3s; }

/* ---------- Fiches (pages intérieures) ---------- */
.fiche { display: grid; grid-template-columns: 2fr 1fr; gap: 36px; align-items: start; }
@media (max-width: 860px) { .fiche { grid-template-columns: 1fr; } }
.encart {
  background: var(--papier); border-radius: var(--rayon); padding: 24px; box-shadow: var(--ombre);
  border-top: 8px solid var(--accent, var(--brique)); position: sticky; top: 100px;
}
/* Plusieurs encarts empilés (page Contact) : c'est la colonne entière qui reste accrochée, pas chaque encart */
@media (min-height: 820px) { .fiche > aside:not(.encart) { position: sticky; top: 100px; } }
.fiche > aside:not(.encart) .encart { position: static; }
@media (max-width: 860px) { .encart, .fiche > aside:not(.encart) { position: static; } }
.encart h3 { font-size: 1.25rem; }
.encart dl { margin: 0; }
.encart dt { font-weight: 800; color: var(--accent-fonce, var(--encre)); margin-top: 14px; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.encart dt:first-child { margin-top: 0; }
.encart dd { margin: 2px 0 0; color: var(--encre); }

.liste-coche { list-style: none; padding: 0; margin: 0 0 1em; }
.liste-coche li { padding-left: 34px; position: relative; margin-bottom: 10px; }
.liste-coche li::before {
  content: ""; position: absolute; left: 0; top: .25em; width: 22px; height: 22px; border-radius: 8px; transform: rotate(-6deg);
  background: var(--accent, var(--prairie)) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath d='M8 13.6 4.4 10l-1.4 1.4L8 16.4l9-9L15.6 6z'/%3E%3C/svg%3E") center/16px no-repeat;
}

ol.etapes { list-style: none; counter-reset: e; padding: 0; display: grid; gap: 12px; }
ol.etapes li { counter-increment: e; display: flex; gap: 14px; align-items: center; background: var(--papier); padding: 12px 16px; border-radius: 16px; box-shadow: var(--ombre); }
ol.etapes li::before { content: counter(e); flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent, var(--brique)); color: #fff; font: 800 1.1rem var(--titre); }

.tableau { width: 100%; border-collapse: collapse; background: var(--papier); border-radius: 16px; overflow: hidden; box-shadow: var(--ombre); }
.tableau th, .tableau td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--trait); vertical-align: top; }
.tableau th { background: var(--accent-clair, var(--soleil-clair)); font-family: var(--titre); color: var(--accent-fonce, var(--brique-fonce)); }
.tableau tr:last-child td { border-bottom: 0; }
.tableau-defile { overflow-x: auto; }

.documents { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.documents a {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 16px; background: var(--papier);
  border: 2px solid var(--trait); text-decoration: none; color: var(--encre); font-weight: 800; transition: transform .25s var(--rebond), border-color .2s;
}
.documents a:hover { border-color: var(--accent, var(--brique)); color: var(--accent-fonce, var(--brique)); transform: translateX(6px); }
.documents a::before { content: "PDF"; font-size: .7rem; font-weight: 800; color: #fff; background: var(--accent, var(--brique)); padding: 5px 7px; border-radius: 8px; letter-spacing: .04em; }

/* ---------- Actualités ---------- */
.actu .date { align-self: flex-start; font-weight: 800; font-size: .85rem; color: #fff; background: var(--accent, var(--brique)); padding: 4px 12px; border-radius: 999px; margin-bottom: 10px; }
.actu .etiquette { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-fonce, var(--encre-douce)); }

/* ---------- Trouve ton activité ---------- */
.trouve-section { background: var(--prairie-clair); position: relative; overflow: hidden; overflow: clip; padding-top: 30px; }
.trouve-section .section-titre { margin-bottom: 26px; }
.trouve-decor { position: absolute; inset: 0; pointer-events: none; }
.trouve-decor svg { position: absolute; }

/* Le panneau en bois crème cloué, comme les panneaux du logo */
.panneau-bois {
  position: relative; background: #fbf3e3; border: 3px solid #eadcbf; border-radius: 22px;
  padding: clamp(22px, 4vw, 40px); box-shadow: 0 10px 0 #e3d3ae, 0 22px 40px rgba(31, 35, 64, .12);
  background-image:
    radial-gradient(circle at 18px 18px, var(--marine) 4px, transparent 5px),
    radial-gradient(circle at calc(100% - 18px) 18px, var(--marine) 4px, transparent 5px),
    radial-gradient(circle at 18px calc(100% - 18px), var(--marine) 4px, transparent 5px),
    radial-gradient(circle at calc(100% - 18px) calc(100% - 18px), var(--marine) 4px, transparent 5px);
}
.tr-phrase { font-family: var(--titre); font-weight: 800; font-size: clamp(1.4rem, 3.2vw, 2.1rem); line-height: 1.35; color: var(--marine); margin: 0 0 22px; outline: none; }
.tr-trou { display: inline-block; min-width: 3.2em; border-bottom: 4px dashed var(--bois); color: transparent; }
.tr-trou.actif { border-color: var(--brique); animation: clignote 1.2s ease-in-out infinite; }
@keyframes clignote { 50% { border-color: var(--soleil); } }
.tr-mot {
  font: inherit; color: var(--brique); background: linear-gradient(transparent 60%, #ffd27a 60%, #ffd27a 92%, transparent 92%);
  border: 0; padding: 0 .1em; cursor: pointer; animation: motArrive .5s var(--rebond);
}
.tr-mot small { font-size: .6em; color: var(--encre-douce); }
.tr-mot:hover { color: var(--brique-fonce); text-decoration: underline wavy var(--brique) 2px; text-underline-offset: 6px; }
@keyframes motArrive { from { opacity: 0; transform: translateY(10px); display: inline-block; } }

/* Étape 1 : les profils illustrés */
/* 7 profils : tous sur une ligne en grand écran, 4 + 3 en écran moyen, 2 par ligne sur téléphone
   (les lignes incomplètes sont centrées pour garder un ensemble équilibré) */
.tr-profils { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.tr-profils > * { flex: 0 0 calc((100% - 6 * 14px) / 7); min-width: 0; }
@media (max-width: 1040px) { .tr-profils > * { flex-basis: calc((100% - 3 * 14px) / 4); } }
@media (max-width: 640px) { .tr-profils { gap: 10px; } .tr-profils > * { flex-basis: calc((100% - 10px) / 2); } }
.tr-profil {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 10px 10px 14px;
  background: var(--papier); border: 3px solid transparent; border-radius: 20px; cursor: pointer; font-family: var(--texte);
  color: var(--encre); text-decoration: none; box-shadow: 0 4px 0 #eadcbf; transition: transform .3s var(--rebond), border-color .2s, box-shadow .2s;
}
.tr-profil img { width: 100%; max-width: 150px; height: auto; transition: transform .4s var(--rebond); }
.tr-profil strong { font-family: var(--titre); font-size: clamp(1rem, 1.5vw, 1.2rem); line-height: 1.1; color: var(--marine); }
.tr-profil small { color: var(--encre-douce); font-weight: 700; }
.tr-profil:hover { transform: translateY(-6px) rotate(-1deg); border-color: var(--soleil); box-shadow: 0 10px 0 #eadcbf; color: var(--encre); }
.tr-profil:hover img { transform: scale(1.08) translateY(-4px); }
.tr-aider { background: var(--soleil-clair); }
.tr-aider small { color: var(--brique); }

/* Étapes 2 et 3 : des étiquettes colorées */
.tr-puces { display: flex; flex-wrap: wrap; gap: 12px; }
.tr-puce {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px 12px 14px; border-radius: 999px; border: 0;
  background: var(--c); color: #fff; font: 800 1.05rem var(--texte); cursor: pointer;
  box-shadow: 0 5px 0 rgba(0, 0, 0, .18); transition: transform .25s var(--rebond), box-shadow .2s;
}
.tr-puce[style*="#f5c935"] { color: var(--marine); }
.tr-puce:hover { transform: translateY(-4px) rotate(-2deg); box-shadow: 0 9px 0 rgba(0, 0, 0, .18); }
.tr-puce .tr-emoji { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.9); display: grid; place-items: center; font-size: 1.15rem; }

.tr-titre-res { color: var(--marine); }
.tr-resultats { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.tr-resultats .carte { padding: 20px; }
.tr-note { color: var(--encre-douce); }
.tr-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.tr-actions button { background: var(--papier); color: var(--marine); border: 2px solid #eadcbf; border-radius: 999px; padding: 8px 18px; font: 800 .95rem var(--texte); cursor: pointer; }
.tr-actions button:hover { border-color: var(--brique); color: var(--brique); }

/* ---------- Chiffres clés ---------- */
.bande-chiffres { background: var(--brique); color: #fff; position: relative; }
.bande-chiffres h2 { color: #fff; }
.chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 18px; text-align: center; }
.chiffres > div { background: rgba(255,255,255,.1); border-radius: var(--rayon); padding: 22px 12px; }
.chiffres strong { display: block; font-family: var(--titre); font-size: clamp(2.6rem, 6vw, 3.6rem); color: var(--soleil); line-height: 1; font-variant-numeric: tabular-nums; }
.chiffres span { font-weight: 700; opacity: .95; }
.section:not(.bande-chiffres) .chiffres > div { background: var(--papier); box-shadow: var(--ombre); }
.section:not(.bande-chiffres) .chiffres strong { color: var(--brique); }
.section:not(.bande-chiffres) .chiffres span { color: var(--encre-douce); }

/* ---------- Bus du jour ---------- */
.bus-bloc { background: var(--menthe-clair); border-radius: 32px; padding: clamp(22px, 4vw, 40px); }
.bus-bloc h2 { color: var(--menthe-fonce); }
.bus-exemple { margin: 0 0 10px; }
.bus-annonce .bus-titre { font-family: var(--titre); font-size: 1.5rem; line-height: 1.2; color: var(--encre); margin-bottom: 4px; }
.bus-annonce strong { color: var(--menthe-fonce); }
.bus-annonce .bouton { background: var(--menthe); border-color: var(--menthe); box-shadow: 0 6px 0 var(--menthe-fonce); }
.bus-annonce .bouton:hover { background: var(--menthe-fonce); border-color: var(--menthe-fonce); }
.bus-route { position: relative; height: 120px; margin: 30px 40px 6px; }
.bus-ligne { position: absolute; left: -12px; right: -12px; top: 34px; height: 22px; border-radius: 11px; background: #fbf3e3; box-shadow: 0 0 0 5px #86c46a; }
.bus-ligne::after { content: ""; position: absolute; left: 10px; right: 10px; top: 9px; border-top: 3px dotted #f5c935; }
.bus-arret { position: absolute; top: 34px; transform: translateX(-50%); text-align: center; width: 120px; }
.bus-point { display: block; width: 22px; height: 22px; margin: 0 auto; border-radius: 50%; background: var(--papier); border: 4px solid var(--menthe); }
.bus-arret.actif .bus-point { background: var(--menthe); box-shadow: 0 0 0 6px rgba(31,155,141,.25); }
.bus-jour { display: block; font-weight: 800; font-size: .8rem; text-transform: uppercase; color: var(--menthe-fonce); margin-top: 6px; }
.bus-commune { display: block; font-size: .85rem; line-height: 1.2; }
.bus-arret.actif .bus-commune { font-weight: 800; }
.bus-vehicule { position: absolute; top: -4px; left: var(--pos); width: 64px; transform: translateX(-50%); animation: busArrive 2s cubic-bezier(.3, .8, .4, 1) both, busRoule .5s ease-in-out 2s 3 alternate; }
@keyframes busArrive { from { left: -10%; } }
@keyframes busRoule { to { transform: translateX(-50%) translateY(-3px); } }
.bus-contact { font-size: .95rem; margin: 10px 0 0; }
@media (max-width: 640px) {
  .bus-route { margin: 24px 10px 6px; height: 130px; }
  .bus-arret { width: 64px; }
  .bus-commune { font-size: .72rem; }
}

/* ---------- Semaine & calendrier ---------- */
.semaine-section { background: linear-gradient(180deg, var(--ciel-clair) 0%, var(--creme) 100%); }
.semaine { position: relative; }
.sem-route { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 80px; }
.sem-jours { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.sem-jour { display: flex; flex-direction: column; align-items: center; padding: 0 6px; }
.sem-borne {
  width: 64px; height: 64px; margin-top: 8px; border-radius: 50%; background: var(--c); color: #fff;
  display: grid; place-content: center; text-align: center; line-height: 1; box-shadow: 0 5px 0 rgba(0,0,0,.18), 0 0 0 5px #fff;
  transition: transform .3s var(--rebond);
}
.sem-borne span { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; opacity: .95; }
.sem-borne strong { font: 800 1.6rem var(--titre); }
.sem-jour:hover .sem-borne { transform: translateY(-4px) rotate(-6deg); }
.sem-auj { margin-top: 10px; background: var(--brique); color: #fff; font-size: .75rem; font-weight: 800; padding: 2px 10px; border-radius: 999px; }
.sem-panneau {
  position: relative; width: 100%; margin-top: 14px; background: #fbf3e3; border: 2px solid #eadcbf; border-radius: 16px;
  padding: 16px 10px 12px; box-shadow: 0 6px 0 #e3d3ae;
}
/* Petit poteau qui relie la borne au panneau, et clous du panneau */
.sem-panneau::before { content: ""; position: absolute; top: -16px; left: 50%; width: 6px; height: 16px; margin-left: -3px; background: #c9a978; border-radius: 3px; }
.sem-panneau::after {
  content: ""; position: absolute; inset: 6px; pointer-events: none;
  background: radial-gradient(circle at 3px 3px, var(--marine) 2.5px, transparent 3px) 0 0 / 100% 100% no-repeat,
              radial-gradient(circle at calc(100% - 3px) 3px, var(--marine) 2.5px, transparent 3px) 0 0 / 100% 100% no-repeat;
}
.sem-jour.aujourdhui .sem-panneau { border-color: var(--soleil); box-shadow: 0 6px 0 #e8c64a, 0 14px 30px rgba(201, 57, 43, .15); transform: translateY(-4px); }
.sem-jour.aujourdhui .sem-borne { width: 74px; height: 74px; margin-top: 3px; animation: borne 2.4s ease-in-out infinite; }
@keyframes borne { 50% { transform: translateY(-5px); } }
.sem-vide { color: var(--encre-douce); margin: 6px 0; text-align: center; font-size: .9rem; font-weight: 700; }
@media (min-width: 641px) and (max-width: 900px) {
  .sem-jour { padding: 0 3px; }
  .sem-borne { width: 56px; height: 56px; margin-top: 12px; }
  .sem-jour.aujourdhui .sem-borne { width: 64px; height: 64px; margin-top: 8px; }
  .sem-borne strong { font-size: 1.35rem; }
  .sem-panneau { padding: 14px 5px 10px; }
  .ev-liste.compacte a { font-size: .8rem; padding: 6px 4px; }
  .ev-liste.compacte .ev-vignette { width: 44px; height: 44px; }
  .sem-vide { font-size: .8rem; }
}
@media (max-width: 640px) {
  .sem-route { display: none; }
  .sem-jours { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .sem-jours::before {
    content: ""; position: absolute; left: 38px; top: 20px; bottom: 20px; width: 22px; border-radius: 11px;
    background: linear-gradient(90deg, #86c46a 0 5px, #fbf3e3 5px 17px, #86c46a 17px);
  }
  .sem-jour { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: start; padding: 0; }
  .sem-borne { grid-row: 1 / span 2; justify-self: center; position: relative; }
  .sem-auj { grid-column: 2; justify-self: start; margin: 0 0 6px; }
  .sem-panneau { grid-column: 2; margin-top: 0; }
  .sem-panneau::before { display: none; }
}

.ev-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ev-liste a { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--encre); padding: 8px 10px; border-radius: 14px; background: var(--papier); border-left: 5px solid var(--accent); box-shadow: 0 2px 0 rgba(31,35,64,.06); transition: transform .2s var(--rebond); }
.ev-vignette { flex: none; width: 48px; height: 48px; border-radius: 50%; object-fit: cover; object-position: 50% 40%; background: var(--accent-clair); border: 2px solid var(--accent); }
.ev-texte { min-width: 0; }
.ev-liste a:hover { transform: translateX(4px); color: var(--encre); }
.ev-liste .ev-public { display: block; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--accent-fonce); }
.ev-liste strong { display: block; line-height: 1.25; }
.ev-liste .ev-horaire { display: block; font-size: .88rem; color: var(--encre-douce); }
.ev-liste.compacte a { padding: 7px 8px; font-size: .88rem; gap: 8px; flex-direction: column; text-align: center; border-left: 0; border-top: 4px solid var(--accent); }
.ev-liste.compacte .ev-vignette { width: 54px; height: 54px; }
@media (max-width: 640px) { .ev-liste.compacte a { flex-direction: row; text-align: left; border-top: 0; border-left: 5px solid var(--accent); } }
.ev-liste.compacte .ev-public { display: none; }

.agenda { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 900px) { .agenda { grid-template-columns: 1fr; } }
.cal { background: var(--papier); border-radius: var(--rayon); padding: 20px; box-shadow: var(--ombre); }
.cal-entete { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-entete h2 { margin: 0; text-transform: capitalize; font-size: 1.7rem; }
.cal-nav { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--soleil-clair); color: var(--brique); font: 800 1.6rem/1 var(--titre); cursor: pointer; transition: transform .2s var(--rebond); }
.cal-nav:hover { transform: scale(1.1); }
.cal-grille { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-jour { text-align: center; font-weight: 800; font-size: .8rem; color: var(--encre-douce); text-transform: uppercase; padding: 4px 0; }
.cal-case {
  min-width: 0; min-height: 84px; border: 2px solid var(--trait); border-radius: 14px; background: var(--papier); padding: 6px; text-align: left;
  display: flex; flex-direction: column; gap: 4px; cursor: pointer; font: inherit; color: var(--encre); transition: transform .2s var(--rebond), border-color .2s;
}
.cal-case.vide { border: 0; background: none; cursor: default; }
.cal-case:hover { transform: translateY(-2px); border-color: var(--bois); }
.cal-case.vacances { background: repeating-linear-gradient(-45deg, #fff, #fff 6px, var(--soleil-clair) 6px, var(--soleil-clair) 12px); }
.cal-case.aujourdhui .cal-num { background: var(--brique); color: #fff; }
.cal-case.choisi { border-color: var(--brique); box-shadow: 0 0 0 3px rgba(168,67,44,.2); }
.cal-num { font-weight: 800; font-size: .9rem; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; }
.cal-puces { display: flex; flex-direction: column; gap: 3px; }
.puce { display: block; font-size: .7rem; font-weight: 700; line-height: 1.2; padding: 2px 5px; border-radius: 6px; background: var(--accent); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-plus { font-size: .7rem; font-weight: 800; color: var(--encre-douce); }
.cal-legende { margin: 12px 0 0; font-size: .85rem; color: var(--encre-douce); display: flex; align-items: center; gap: 8px; }
.leg-vac { width: 18px; height: 18px; border-radius: 5px; border: 2px solid var(--trait); background: repeating-linear-gradient(-45deg, #fff, #fff 3px, var(--soleil-clair) 3px, var(--soleil-clair) 6px); }
.cal-detail { background: var(--papier); border-radius: var(--rayon); padding: 22px; box-shadow: var(--ombre); position: sticky; top: 100px; }
.cal-detail h3 { text-transform: capitalize; }
@media (max-width: 640px) {
  .cal { padding: 12px; }
  .cal-grille { gap: 3px; }
  .cal-case { min-height: 52px; padding: 4px; border-radius: 10px; align-items: center; }
  .cal-puces { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 3px; }
  .puce { width: 8px; height: 8px; padding: 0; border-radius: 50%; font-size: 0; }
  .cal-plus { display: none; }
  .cal-detail { position: static; }
}
.filtres { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.filtres button { border: 2px solid var(--accent, var(--trait)); background: var(--papier); border-radius: 999px; padding: 8px 16px; font: 800 .92rem var(--texte); cursor: pointer; color: var(--accent-fonce, var(--encre)); transition: transform .2s var(--rebond); }
.filtres button:hover { transform: translateY(-2px); }
.filtres button[aria-pressed="true"] { background: var(--accent, var(--brique)); border-color: var(--accent, var(--brique)); color: #fff; }

/* ---------- Témoignages ---------- */
.bulles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 26px 22px; }
.bulle { position: relative; }
.bulle blockquote {
  margin: 0 0 18px; background: var(--papier); padding: 22px 24px; border-radius: 26px 26px 26px 6px; box-shadow: var(--ombre);
  font-size: 1.05rem; position: relative; border: 3px solid var(--accent);
}
.bulle blockquote::before { content: "“"; position: absolute; top: -26px; left: 16px; font: 800 4.4rem/1 var(--titre); color: var(--accent); }
.bulle:nth-child(even) blockquote { border-radius: 26px 26px 6px 26px; }
.bulle figcaption { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.bulle:nth-child(even) figcaption { justify-content: flex-end; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font: 800 1.2rem var(--titre); }
.bulle figcaption small { display: block; font-weight: 600; color: var(--encre-douce); }

/* ---------- Instagram ---------- */
.insta { display: grid; grid-template-columns: 1fr 1.3fr; gap: 36px; align-items: center; }
@media (max-width: 860px) { .insta { grid-template-columns: 1fr; } }
.insta-grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.insta-tuile {
  aspect-ratio: 1; border-radius: 18px; display: grid; place-items: center; position: relative; overflow: hidden;
  background: var(--accent-clair); transition: transform .3s var(--rebond);
}
.insta-tuile:hover { transform: scale(1.04) rotate(-1deg); }
.insta-tuile svg { width: 80%; height: auto; }
.insta-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.insta-tuile span { position: absolute; left: 8px; bottom: 8px; font-size: .72rem; font-weight: 800; background: rgba(255,255,255,.9); padding: 2px 8px; border-radius: 999px; color: var(--accent-fonce); }
.bouton.insta-bouton { background: linear-gradient(45deg, #f2a93b, #e4572e, #d9587c, #8a4f8f); border-color: transparent; box-shadow: 0 6px 0 #64356a; }

/* ---------- Infos pratiques ---------- */
.bloc-infos { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; }
.horaires-liste { list-style: none; padding: 0; margin: 0; }
.horaires-liste li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 2px dotted var(--trait); }
.horaires-liste li:last-child { border-bottom: 0; }
.horaires-liste li.aujourdhui { color: var(--brique); font-weight: 800; }
.carte-plan { border: 0; width: 100%; height: 340px; border-radius: var(--rayon); box-shadow: var(--ombre); }

/* ---------- Formulaire ---------- */
.formulaire { display: grid; gap: 16px; }
.formulaire label { font-weight: 800; display: block; margin-bottom: 6px; }
.formulaire input, .formulaire select, .formulaire textarea {
  width: 100%; padding: 13px 15px; border: 2px solid var(--trait); border-radius: 14px; font: inherit; background: var(--papier); color: var(--encre); transition: border-color .2s, box-shadow .2s;
}
.formulaire input:focus, .formulaire select:focus, .formulaire textarea:focus { border-color: var(--ciel); outline: none; box-shadow: 0 0 0 4px var(--ciel-clair); }
.formulaire textarea { min-height: 150px; resize: vertical; }
.formulaire-retour { margin: 0; padding: 12px 16px; border-radius: 14px; font-weight: 800; }
.formulaire-retour.ok { background: var(--prairie-clair, #e4f3dc); color: #2f6b1f; }
.formulaire-retour.erreur { background: #fde4dc; color: #a3361a; }
.formulaire .note { font-size: .9rem; color: var(--encre-douce); }

/* ---------- Partenaires ---------- */
.logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.logos a, .logos div {
  display: grid; place-items: center; text-align: center; min-height: 100px; padding: 14px; background: var(--papier);
  border: 2px solid var(--trait); border-radius: 18px; font-weight: 800; color: var(--encre); text-decoration: none; font-size: .95rem;
  transition: transform .25s var(--rebond), border-color .2s;
}
.logos a:hover { border-color: var(--brique); color: var(--brique); transform: translateY(-4px); }

/* ---------- Appel à l'action ---------- */
.appel {
  background: linear-gradient(120deg, var(--brique), var(--tomate)); color: #fff; border-radius: 32px; padding: 40px;
  display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; position: relative; overflow: hidden;
}
.appel::after { content: ""; position: absolute; width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,.1); right: -60px; top: -100px; }
.appel > * { position: relative; z-index: 1; }
.appel h2 { color: #fff; margin: 0 0 6px; }
.appel p { margin: 0; opacity: .95; }
.appel .bouton { background: #fff; color: var(--brique); border-color: #fff; box-shadow: 0 6px 0 rgba(0,0,0,.18); }
.appel .bouton:hover { background: var(--soleil-clair); color: var(--brique-fonce); }

/* ---------- Mention « à compléter » ----------
   Repère visuel pour les informations que le centre social doit fournir.
   Pour masquer toutes ces mentions avant la mise en ligne,
   mettre "display: none" ci-dessous. */
.a-completer {
  display: inline-block; background: #fff3c4; color: #7a5a00; border: 1px dashed #d4a800;
  font-size: .8rem; font-weight: 800; padding: 2px 8px; border-radius: 6px; vertical-align: middle;
}

/* ---------- Pied de page ---------- */
.pied { background: var(--marine); color: #f6e7df; padding: 0 0 24px; position: relative; margin-top: 40px; }
.pied-collines { display: block; width: 100%; height: 90px; margin-top: -89px; position: relative; }
.pied .conteneur { padding-top: 24px; }
.pied a { color: #fff; }
.pied h2 { color: #fff; font-size: 1.2rem; }
.pied-marque { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.pied-marque h2 { margin: 0; font-size: 1.3rem; }
.pied .colonnes { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 860px) { .pied .colonnes { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .pied .colonnes { grid-template-columns: 1fr; } }
.pied ul { list-style: none; padding: 0; margin: 0; }
.pied li { margin-bottom: 6px; }
.pied li a { text-decoration: none; transition: padding .2s; }
.pied li a:hover { padding-left: 6px; text-decoration: underline; }
.pied .bas { border-top: 1px solid rgba(255,255,255,.2); margin-top: 32px; padding-top: 16px; font-size: .9rem; display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.reseaux { display: flex; gap: 10px; margin-top: 12px; }
.reseaux a { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.14); display: grid; place-items: center; transition: transform .25s var(--rebond), background .2s; }
.reseaux a:hover { background: rgba(255,255,255,.3); transform: translateY(-3px) rotate(-8deg); }
.reseaux svg { width: 20px; height: 20px; fill: #fff; }

/* ---------- Petites animations des illustrations ---------- */
.fumee { animation: fumee 3s ease-in-out infinite; }
.fumee.f2 { animation-delay: 1.5s; }
@keyframes fumee { 0%, 100% { opacity: .2; transform: translateY(4px); } 50% { opacity: .9; transform: translateY(-4px); } }
.ballon { animation: ballon 3s ease-in-out infinite; }
@keyframes ballon { 50% { transform: translateY(-5px); } }
.drapeau { animation: drapeau 1.4s ease-in-out infinite; transform-origin: 0 -98px; }
@keyframes drapeau { 50% { transform: scaleX(.8); } }

/* Utilitaires */
.centre { text-align: center; }
.mt { margin-top: 32px; }
.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Respect des réglages « réduire les animations » */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Formes décoratives autour de la planète (feuilles, gouttes, éclats) */
.planete-svg .forme { animation: flotte 5s ease-in-out var(--d, 0s) infinite alternate, eclot .8s var(--rebond) var(--d, 0s) both; transform-box: fill-box; transform-origin: center; }
@keyframes flotte { to { transform: translateY(-8px) rotate(8deg); } }
@keyframes eclot { from { opacity: 0; scale: 0; } }

/* Bandeau affiché pendant un aperçu depuis l'administration */
.bandeau-apercu { position: sticky; top: 0; z-index: 70; background: var(--marine); color: #fff; text-align: center; font-weight: 800; padding: 8px 16px; font-size: .95rem; }
.bandeau-apercu a { color: var(--soleil); }

/* Lien discret vers l'Espace équipe (pied de page) */
.pied .lien-equipe { white-space: nowrap; opacity: .85; }
.pied .lien-equipe:hover { opacity: 1; }

/* ---------- Photos d'actualité ---------- */
.actu.avec-photo { padding-top: 0; }
.actu-media { display: block; position: relative; margin: 0 -26px 16px; height: 170px; overflow: hidden; }
.actu-photo { display: block; width: 100%; height: 100%; object-fit: cover; }
.actu-visuel { display: grid; place-items: end center; height: 100%; padding-top: 10px;
  background: radial-gradient(circle at 50% 120%, var(--accent-clair, var(--soleil-clair)) 55%, transparent 56%), color-mix(in srgb, var(--accent-clair, var(--soleil-clair)) 45%, var(--papier)); }
.actu-visuel img { height: 100%; width: auto; max-width: 70%; object-fit: contain; transition: transform .4s var(--rebond); }
.actu-visuel.large img { max-width: 92%; }
a.actu:hover .actu-visuel img { transform: scale(1.06) rotate(-2deg); }
.actu-corps { display: flex; flex-direction: column; flex: 1; }
.actu-haut { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.actu-haut .date { margin-bottom: 0; }
.actu-badge { font-weight: 800; font-size: .8rem; padding: 4px 11px; border-radius: 999px; background: var(--soleil); color: var(--marine); box-shadow: 0 2px 0 rgba(0,0,0,.12); }
.actu-badge.en-cours { background: var(--prairie-fonce); color: #fff; }
.actu-badge.en-cours::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #fff; margin-right: 6px; vertical-align: 1px; animation: clignote 1.6s ease-in-out infinite; }
@keyframes clignote { 50% { opacity: .25; } }
.actu-media .actu-badge { position: absolute; top: 12px; left: 14px; }

/* Actualité mise en vedette (page Actualités & agenda) */
.actu.actu-vedette { display: grid; grid-template-columns: 1fr 1.1fr; padding: 0; border-top: 0; border-left: 8px solid var(--accent, var(--brique)); }
.actu-vedette .actu-media { margin: 0; height: 100%; min-height: 260px; }
.actu-vedette .actu-corps { padding: 30px 32px; }
.actu-vedette h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.1; margin: .2em 0 .35em; }
.actu-vedette p { font-size: 1.08rem; }
.actu-vedette .plus { align-self: flex-start; background: var(--accent, var(--brique)); color: #fff !important; padding: 10px 20px !important; border-radius: 999px; margin-top: 16px; box-shadow: 0 4px 0 var(--accent-fonce, var(--brique-fonce)); }
@media (max-width: 760px) {
  .actu.actu-vedette { grid-template-columns: 1fr; border-left: 0; border-top: 6px solid var(--accent, var(--brique)); }
  .actu-vedette .actu-media { min-height: 0; height: 200px; }
  .actu-vedette .actu-corps { padding: 20px 22px 24px; }
}

/* Onglets « Les actualités / Le calendrier » */
.onglets-page { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.onglets-page a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 16px; background: var(--papier); color: var(--marine); font-weight: 800; text-decoration: none; box-shadow: 0 4px 0 var(--trait); transition: transform .2s var(--rebond); }
.onglets-page a:hover { transform: translateY(-2px); }
.onglet-nombre { background: var(--brique); color: #fff; font-size: .8rem; min-width: 22px; height: 22px; border-radius: 999px; display: inline-grid; place-items: center; padding: 0 6px; }
.onglet-nombre:empty { display: none; }
.actus-section { background: linear-gradient(180deg, var(--soleil-clair), var(--creme) 70%); }

/* ---------- Galerie photos des pages (façon polaroïd) ---------- */
.galerie-section { background: var(--soleil-clair); }
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 26px 22px; }
.polaroid { margin: 0; background: #fff; padding: 10px 10px 14px; box-shadow: 0 8px 22px rgba(31, 35, 64, .16); transform: rotate(var(--r, 0deg));
  transition: transform .35s var(--rebond), box-shadow .3s; }
.polaroid:hover { transform: rotate(0deg) scale(1.04); box-shadow: 0 14px 30px rgba(31, 35, 64, .22); }
.polaroid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.polaroid figcaption { font-family: "Caveat", var(--titre); font-size: 1.25rem; font-weight: 700; text-align: center; color: var(--marine); margin-top: 8px; line-height: 1.2; }

/* ---------- Mode édition (ouvert depuis l'Espace équipe) ---------- */
.mode-edition .alerte, .mode-edition .crieur, .mode-edition .bandeau-apercu { display: none !important; }
.mode-edition .entete { position: relative; }
.mode-edition [data-edit] { outline: 2px dashed transparent; outline-offset: 4px; border-radius: 6px; cursor: text; transition: outline-color .15s, background .15s; }
.mode-edition [data-edit]:hover { outline-color: rgba(42, 150, 214, .6); background: rgba(224, 240, 251, .45); }
.mode-edition [data-edit]:focus { outline: 3px solid #2a96d6; background: rgba(255, 255, 255, .7); }
.mode-edition [data-edit].ed-modifie { outline-color: rgba(245, 201, 53, .9); }
.mode-edition [data-edit].ed-modifie:not(:focus) { box-shadow: inset 4px 0 0 #f5c935; }
.ed-barre {
  position: sticky; top: 0; z-index: 200; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between;
  background: var(--marine); color: #fff; padding: 8px 14px; font-family: var(--texte); font-size: .92rem; box-shadow: 0 4px 14px rgba(0,0,0,.2);
}
.ed-info { font-weight: 800; }
.ed-outils { display: flex; gap: 6px; flex-wrap: wrap; }
.ed-outils button { border: 0; border-radius: 8px; background: rgba(255,255,255,.14); color: #fff; padding: 6px 10px; font: 700 .9rem var(--texte); cursor: pointer; }
.ed-outils button:hover { background: rgba(255,255,255,.28); }

/* Liens vers une section (ex. services.html#mobilite) : la section ne se cache pas sous l'en-tête fixe */
[id] { scroll-margin-top: 130px; }
.actus-section .grille.trois { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .actus-section .grille.trois { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .actus-section .grille.trois { grid-template-columns: 1fr; } }

/* Édition : zones animées qui se modifient dans leur propre rubrique */
.ed-zone-lien {
  display: block; width: fit-content; max-width: 100%; margin: 0 auto 12px; padding: 10px 16px;
  border: 2px dashed #f5c935; border-radius: 14px; background: #fff4c7; color: #1c2a5e;
  font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; text-align: center;
}
.ed-zone-lien:hover { background: #ffe98a; }
.ed-zone { outline: 2px dashed rgba(245, 201, 53, .8); outline-offset: 6px; border-radius: 12px; }

/* Aperçu en direct dans l'Espace équipe */
html.apercu-direct { scroll-behavior: auto !important; }

/* =========================================================
   VISUELS (js/visuels.js) : une ou plusieurs images, sous la forme choisie
   ========================================================= */
.vis { margin: 28px 0; }
.vis-fig { margin: 0; }
.vis-fig img { display: block; width: 100%; height: auto; border-radius: var(--rayon); }
.vis-fig figcaption { margin-top: 8px; text-align: center; font-size: .92rem; color: var(--encre-douce); font-weight: 600; }
.vis-image { display: grid; gap: 22px; }
.vis-image .vis-fig img { box-shadow: var(--ombre); }

/* Bannière : bandeau large */
.vis-banniere .vis-fig img { aspect-ratio: 3 / 1; object-fit: cover; }

/* Carrousel */
.vis-carrousel { position: relative; }
.vis-piste { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--rayon); box-shadow: var(--ombre); scrollbar-width: none; background: #fff; }
.vis-piste::-webkit-scrollbar { display: none; }
.vis-piste:focus-visible { outline: 3px solid var(--marine); outline-offset: 3px; }
.vis-piste > .vis-fig { flex: 0 0 100%; scroll-snap-align: start; position: relative; }
.vis-piste .vis-fig img { aspect-ratio: 16 / 10; object-fit: cover; border-radius: 0; }
.vis-carrousel.vis-banniere .vis-piste .vis-fig img { aspect-ratio: 3 / 1; }
.vis-piste .vis-fig figcaption { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 26px 16px 30px; color: #fff; background: linear-gradient(transparent, rgba(20, 24, 50, .65)); }
.vis-prec, .vis-suiv {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: #fff; color: var(--marine); font: 800 1.7rem/1 var(--titre); box-shadow: 0 4px 14px rgba(31, 35, 64, .22); cursor: pointer; padding-bottom: 4px;
}
.vis-prec { left: 12px; } .vis-suiv { right: 12px; }
.vis-prec:hover, .vis-suiv:hover { background: var(--soleil); }
.vis-points { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.vis-points i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .6); box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); }
.vis-points i.actif { background: #fff; width: 22px; border-radius: 4px; }
@media (prefers-reduced-motion: no-preference) { .vis-points i { transition: width .25s, background .25s; } }

/* Mosaïque : la première image en grand */
.vis-mosaique { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.vis-mosaique .vis-fig img { aspect-ratio: 1; object-fit: cover; height: 100%; }
.vis-mosaique.n2 { grid-template-columns: 1fr 1fr; }
.vis-mosaique:not(.n2) .vis-fig:first-child { grid-column: span 2; grid-row: span 2; }
.vis-mosaique figcaption { font-size: .82rem; }
.vis-mosaique:not(.n2) .vis-fig:nth-child(3n+1):last-child:not(:first-child) { grid-column: span 3; }
.vis-mosaique:not(.n2) .vis-fig:nth-child(3n+1):last-child:not(:first-child) img { aspect-ratio: 3 / 1; }
.vis-mosaique:not(.n2) .vis-fig:nth-child(3n+2):last-child:not(:nth-child(2)) { grid-column: span 2; }
.vis-mosaique:not(.n2) .vis-fig:nth-child(3n+2):last-child:not(:nth-child(2)) img { aspect-ratio: 2 / 1; }

/* Polaroïd : reprend le style de la galerie */
.vis-polaroid { padding: 10px 4px; }

/* Ronds : portraits, logos */
.vis-ronds { display: flex; flex-wrap: wrap; justify-content: center; gap: 26px 30px; }
.vis-ronds .vis-fig { width: 150px; }
.vis-ronds .vis-fig img { aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 6px solid #fff; box-shadow: var(--ombre); }

/* À côté du texte */
.vis-cote { float: right; width: min(42%, 420px); margin: 4px 0 18px 32px; display: grid; gap: 14px; }
.vis-cote .vis-fig img { box-shadow: var(--ombre); }
.page-contenu::after { content: ""; display: block; clear: both; }
@media (max-width: 700px) {
  .vis-cote { float: none; width: 100%; margin: 0 0 22px; }
  .vis-ronds .vis-fig { width: 120px; }
  .vis-prec, .vis-suiv { width: 36px; height: 36px; font-size: 1.4rem; }
}

/* Dans une carte d'actualité : le visuel remplit le cadre de l'image */
.actu-media .vis { margin: 0; height: 100%; }
.actu-media .vis-fig, .actu-media .vis-fig img { height: 100%; }
.actu-media .vis-fig img { object-fit: cover; border-radius: 0; box-shadow: none; aspect-ratio: auto; }
.actu-media .vis-piste { height: 100%; border-radius: 0; box-shadow: none; }
.actu-media .vis-mosaique { gap: 3px; grid-template-rows: 1fr 1fr; }
.actu-media .vis-mosaique.n2 { grid-template-rows: 1fr; }
.actu-media .vis-mosaique .vis-fig:nth-child(n+4) { display: none; }
.actu-media .vis-image .vis-fig:nth-child(n+2) { display: none; }
.actu-media .vis-prec, .actu-media .vis-suiv { width: 32px; height: 32px; font-size: 1.3rem; }

/* Bloc de visuels d'une page ajoutée ou d'une galerie placée en haut */
.visuels-page { margin: 0 0 8px; }
/* Galeries : un carrousel ou des images en grand restent à une taille confortable */
.galerie-section .vis-carrousel:not(.vis-banniere), .galerie-section .vis-image { max-width: 860px; margin-left: auto; margin-right: auto; }
.galerie-section .vis { margin: 0; }

/* Vignettes personnalisées (rendez-vous, agenda, gazette) */
.vis-vignette { position: relative; display: inline-block; overflow: hidden; flex: none; }
.vis-vignette img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s ease; }
.vis-vignette img.actif { opacity: 1; }
.vis-vignette.ev-vignette { border-radius: 12px; object-fit: unset; }
.vis-vignette.ev-vignette.rond { border-radius: 50%; }
.alerte-mini { width: 1.5em; height: 1.5em; border-radius: 50%; vertical-align: -.4em; margin-right: .15em; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.alerte-mini:not(.rond) { border-radius: 6px; }
/* Gazette : visuels dans le panneau du livreur */
.crieur-panneau ul { max-height: min(62vh, 560px); overflow-y: auto; overscroll-behavior: contain; }
.crieur-visuels { display: block; margin-top: 8px; }
.crieur-visuels .vis-fig img { border-radius: 10px; max-height: 200px; width: 100%; object-fit: cover; }
.crieur-visuels .vis-carrousel .vis-fig img { max-height: none; }
.crieur-visuels .vis-ronds { gap: 6px; justify-content: flex-start; }
.crieur-visuels .vis-ronds .vis-fig { width: 50px; }
.crieur-visuels .vis-ronds .vis-fig img { border-radius: 50%; border-width: 3px; max-height: none; aspect-ratio: 1; }
.crieur-visuels .vis-image { gap: 6px; }
/* Quiz : visuels en haut de la carte résultat */
.tr-resultats .carte.avec-visuels { padding-top: 12px; }
.carte-visuels { display: block; margin: 0 -8px 12px; }
.carte-visuels .vis-fig img { border-radius: 12px; aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.carte-visuels .vis-image .vis-fig:nth-child(n+2) { display: none; }
.carte-visuels .vis-mosaique { gap: 4px; }
.carte-visuels .vis-mosaique .vis-fig img { aspect-ratio: 1; height: 100%; }
.carte-visuels .vis-mosaique .vis-fig:nth-child(n+4) { display: none; }
