/* Photo du bandeau (voile : .page-head--photo, core/css/layout.css).
   Limitée à la rubrique : la feuille reste chargée quand on change de page. */
[data-route="about"] .page-head--photo { --ph-photo: url('/assets/heroes/le-centre.webp'); --ph-photo-sm: url('/assets/heroes/le-centre-1000.webp'); --ph-pos: center 45%; --ph-pos-sm: 30% center; }
/* ============================================================
   CENTRE — présentation, organigramme, cartes des projets, objectifs
   ============================================================ */
/* Teinte par défaut (les teintes .tone-* sont dans core/css/layout.css) */
:where(.stat, .org-node, .org-people, .flip, .goal) { --c: var(--c-blue); --s: var(--c-blue-soft); --i: var(--c-blue-ink); }

/* ---------- Présentation : accroche, chiffres clés, journée type ---------- */
.about-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: center; }
.about-hook { font-size: clamp(26px, 3vw, 34px); margin-bottom: 14px; }
.about-hook em { font-style: normal; color: var(--c-blue-ink); position: relative; z-index: 0; white-space: nowrap; }
.about-hook em::after {
  content: ""; position: absolute; left: -2px; right: -2px; bottom: 2px; height: 10px; z-index: -1;
  border-radius: 6px; background: var(--c-yellow); opacity: .6; transform-origin: left;
}
.is-in .about-hook em::after { animation: fun-grow .9s .3s ease-out both; }

.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stat { position: relative; background: var(--s); border-radius: 26px 26px 26px 8px; padding: 18px 18px 16px; }
.stat:nth-child(2) { border-radius: 26px 26px 8px 26px; }
.stat:nth-child(3) { border-radius: 26px 8px 26px 26px; }
.stat:nth-child(4) { border-radius: 8px 26px 26px 26px; }
.stat b { display: block; font-family: var(--f-display); font-weight: 800; font-size: 44px; line-height: 1; color: var(--i); font-variant-numeric: tabular-nums; }
.stat span { font-weight: 700; font-size: 15px; }
.is-in .stat { animation: fun-hop .7s cubic-bezier(.3, 1.6, .5, 1) both; }
.is-in .stat:nth-child(2) { animation-delay: .1s; }
.is-in .stat:nth-child(3) { animation-delay: .2s; }
.is-in .stat:nth-child(4) { animation-delay: .3s; }

.day-path { margin-top: 36px; }
.day-path h3 { font-size: 20px; margin-bottom: 16px; }
.day-track { position: relative; --step: .4s; }
.day-track ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); position: relative; }
.day-track ol::before { content: ""; position: absolute; left: 6%; right: 6%; top: 21px; border-top: 4px dashed var(--c-line); }
.day-track li { position: relative; text-align: center; padding: 0 4px; }
.day-dot { position: relative; z-index: 1; width: 46px; height: 46px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 3px solid var(--dc, var(--c-blue)); }
.day-dot svg { width: 26px; height: 26px; }
.day-track time { display: block; font-family: var(--f-display); font-weight: 800; font-size: 15px; }
.day-track small { display: block; font-size: 13px; color: var(--c-mute); line-height: 1.25; }
/* Le pointillé se dessine d'étape en étape ; chaque gommette saute quand il l'atteint */
/* La journée a son propre [data-reveal] : elle s'anime quand on y arrive, pas avec le haut de la page */
.day-path[data-reveal]:not(.is-in) li { opacity: 0; }
.day-path[data-reveal]:not(.is-in) ol::before { clip-path: inset(0 100% 0 0); }
.day-path.is-in ol::before { animation: about-draw calc(var(--step) * 7) .5s linear both; }
.day-path.is-in li { animation: fun-hop .45s both; animation-delay: calc(var(--n) * var(--step) + .35s); }
@keyframes about-draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
@keyframes about-draw-down { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }

/* ---------- Organigramme ---------- */
.org-tree { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; }
.org-tier { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; width: 100%; }
.org-tier + .org-tier::before { content: ""; width: 4px; height: 26px; border-radius: 4px; background: var(--c-line); }
.org-node {
  width: min(300px, 100%); background: #fff; border: 3px solid var(--c); border-radius: 20px; padding: 12px 18px;
  text-align: center; font: inherit; color: inherit; display: grid; justify-items: center; gap: 2px;
}
button.org-node { cursor: pointer; transition: transform .2s; }
button.org-node:hover { transform: translateY(-3px) rotate(-1deg); }
button.org-node::after { content: "+"; font-weight: 800; font-size: 18px; line-height: 1; color: var(--i); }
button.org-node[aria-expanded="true"] { background: var(--s); }
button.org-node[aria-expanded="true"]::after { content: "−"; }
.org-node.tone-kids { --c: var(--c-black); --i: #fff; background: var(--c-black); color: #fff; }
.org-role { font-family: var(--f-display); font-weight: 800; font-size: 19px; line-height: 1.15; color: var(--i); }
.org-who { font-size: 14px; color: var(--c-mute); }
.tone-kids .org-who { color: #fff; opacity: .85; }
.org-count { margin-top: 4px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: var(--s); color: var(--i); border-radius: var(--r-pill); padding: 1px 10px; }
.org-people { margin: 18px 0 6px; width: 100%; max-width: 900px; }
.org-people[hidden] { display: none; }
.org-badges { list-style: none; margin: 0; padding: 4px 0 8px; display: flex; flex-wrap: wrap; justify-content: center; gap: 22px 14px; }
.org-badge { flex: 0 0 150px; display: grid; justify-items: center; align-content: start; text-align: center; animation: fun-pop .45s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(var(--n) * .06s); }
.org-photo { width: 116px; height: 116px; font-family: var(--f-display); font-weight: 800; font-size: 40px; color: var(--i); border-radius: 50%; border: 6px solid var(--c); background: var(--s); box-shadow: 0 6px 0 rgba(14, 12, 12, .08); overflow: hidden; display: grid; place-items: center; }
.org-photo img { width: 100%; height: 100%; object-fit: cover; }
/* Sans photo : initiales ; sans nom (animatrices de la démo) : gommette ballon */
.org-picto-ball { background: var(--s) center / 54% no-repeat; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' stroke='%230E0C0C' stroke-width='2.5' stroke-linejoin='round' stroke-linecap='round'%3E%3Ccircle cx='24' cy='24' r='17' fill='%23fff'/%3E%3Cpath d='M24 15l7 5-3 8h-8l-3-8z' fill='%230E0C0C'/%3E%3C/svg%3E"); }
.org-badge:hover .org-photo { animation: fun-jump .5s ease-out; }
.org-ribbon { position: relative; margin-top: -14px; max-width: 100%; background: var(--c); color: #fff; font-weight: 800; font-size: 12.5px; line-height: 1.3; padding: 3px 12px; border-radius: 6px; transform: rotate(-3deg); }
.org-badge b { font-family: var(--f-display); font-size: 18px; line-height: 1.15; margin-top: 8px; }
.org-badge small { font-size: 13px; color: var(--c-mute); font-weight: 700; margin-top: 2px; }
.org-strip-nav { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 4px; }
.org-strip-nav[hidden] { display: none; }
.org-strip-nav button { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--c-black); background: #fff; font-size: 20px; font-weight: 800; line-height: 1; cursor: pointer; }
.org-strip-nav button:disabled { opacity: .35; cursor: default; }
.org-strip-nav span { font-weight: 800; font-size: 14px; color: var(--c-mute); min-width: 90px; text-align: center; }
.org-honorary { text-align: center; color: var(--c-mute); font-size: 15px; margin: 22px 0 0; }
.org-honorary b { color: var(--c-ink); }
.is-in .org-tier { animation: fun-hop .5s both; animation-delay: calc(var(--n) * .12s); }

/* ---------- Cartes des projets qui se retournent ---------- */
.project-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.flip { perspective: 1000px; scroll-margin-top: 140px; }
.flip-in { display: grid; height: 100%; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.4, 1.4, .5, 1); }
.flip.is-flipped .flip-in { transform: rotateY(180deg); }
.flip-face { grid-area: 1 / 1; min-height: 300px; border: 3px solid var(--c); border-radius: 24px; padding: 22px; display: flex; flex-direction: column; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip-front { background: var(--s); align-items: center; justify-content: center; text-align: center; gap: 12px; }
.flip-front h3 { font-size: 26px; }
.flip-front p { margin: 0; color: var(--c-mute); font-size: 15px; }
.flip-sticker { width: 78px; height: 78px; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.flip-sticker svg { width: 48px; height: 48px; }
.flip-front { cursor: pointer; }
.flip-front:focus-visible { outline: 3px solid var(--c); outline-offset: 4px; }
.flip-back { background: #fff; transform: rotateY(180deg); gap: 14px; align-items: center; justify-content: flex-start; text-align: center; outline: 0; }
.flip-back h3 { font-size: 22px; color: var(--i); }
.flip-back ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 15px; text-align: left; }
.flip-back li { display: flex; gap: 8px; }
.flip-back li::before { content: ""; flex: 0 0 10px; height: 10px; margin-top: 7px; border-radius: 50%; background: var(--c); }
.flip-back .doc-actions { justify-content: center; margin-top: auto; }
.flip-back .btn { background: var(--c); border-color: var(--c); color: #fff; }
.flip-back .btn:hover { background: var(--i); border-color: var(--i); }
.flip.tone-yellow .flip-back .btn { color: var(--c-black); }

/* ---------- Lecteur d'un document, aux couleurs de sa carte ---------- */
.reader { border: 3px solid var(--c); }
.reader .modal-head { background: var(--s); border-bottom: 3px dashed var(--c); justify-content: flex-start; }
.reader .modal-head h2 { color: var(--i); font-size: 26px; margin-right: auto; }
.reader .modal-close { background: #fff; }
.reader .flip-sticker { flex: 0 0 auto; width: 54px; height: 54px; }
.reader .flip-sticker svg { width: 34px; height: 34px; }
.reader .prose h2 { color: var(--i); display: flex; gap: 10px; align-items: baseline; }
.reader .prose h2::before { content: ""; flex: 0 0 12px; height: 12px; border-radius: 50%; background: var(--c); transform: translateY(-2px); }
.reader .prose li::marker { color: var(--c); }
.reader .modal-foot { background: var(--s); }

/* ---------- Sous-navigation de la page : pastilles à gommette ---------- */

/* ---------- Objectifs pédagogiques en gommettes ---------- */
.goals { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.goal { height: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 20px 18px 18px; border-radius: 26px 26px 26px 8px; background: var(--s); border: 3px solid transparent; color: var(--i); font-family: var(--f-display); font-weight: 700; font-size: 19px; line-height: 1.15; transition: transform .25s, border-color .25s; }
.goal:nth-child(4n+2) { border-radius: 26px 26px 8px 26px; }
.goal:nth-child(4n+3) { border-radius: 26px 8px 26px 26px; }
.goal:nth-child(4n) { border-radius: 8px 26px 26px 26px; }
.goal:hover { transform: translateY(-5px) rotate(-1deg); border-color: var(--c); }
.goal-sticker { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 50%; background: #fff; border: 3px solid var(--c); display: grid; place-items: center; }
.goal-sticker svg { width: 34px; height: 34px; }
.flip:hover .flip-sticker, .goal:hover .goal-sticker { animation: fun-jump .5s ease-out; }
.is-in .goal { animation: fun-hop .6s cubic-bezier(.3, 1.6, .5, 1) backwards; animation-delay: calc(var(--n) * .08s); }
@media (prefers-reduced-motion: reduce) { .goal { transition: none; } .goal:hover { transform: none; } .is-in .goal, .goal:hover .goal-sticker { animation: none; } }


@media (max-width: 860px) {
  .about-hero { grid-template-columns: minmax(0, 1fr); }
  .project-cards { grid-template-columns: minmax(0, 1fr); }
  .goals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flip-face { min-height: 260px; }
  .day-track ol { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .day-track ol::before { left: 21px; right: auto; top: 10px; bottom: 10px; border-top: 0; border-left: 4px dashed var(--c-line); }
  .day-track li { display: grid; grid-template-columns: 46px 1fr; gap: 12px; align-items: center; text-align: left; }
  .day-dot { margin: 0; }
  .day-track time, .day-track small { display: inline; }
  .day-track small { margin-left: 8px; font-size: 14px; }
  .day-path.is-in ol::before { animation-name: about-draw-down; }
}
/* Téléphone : les badges d'un étage défilent sur une ligne (le suivant dépasse) */
@media (max-width: 600px) {
  .org-badges { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-inline: 4px; scroll-padding-inline: 4px; }
  .org-badges::-webkit-scrollbar { display: none; }
  .org-badge { flex-basis: 44%; scroll-snap-align: start; }
  .org-ribbon { white-space: nowrap; font-size: 12px; padding: 3px 9px; }
  .org-photo { width: 104px; height: 104px; }
}
@media (max-width: 420px) {
  .stat b { font-size: 36px; }
  .goal { font-size: 16px; padding: 14px 12px; }
  .goal-sticker { width: 46px; height: 46px; }
  .goal-sticker svg { width: 28px; height: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .flip-in { transition: none; }
  .day-path.is-in ol::before, .day-path.is-in li { animation: none; }
}

.doc-actions { display: flex; gap: 10px; flex-wrap: wrap; }
