/* Mégadanse v2, retours client (round 2) : profondeur partout.
   Fond visible sur toutes les pages, cartes blanches flottantes à ombres profondes,
   inclinaison 3D + reflet (cartes3d.js), titres en relief, boutons enfonçables, frise des événements. */

:root {
  /* Relief des titres : face noire, tranche rouge qui s'assombrit, ombre portée lointaine. */
  --relief: 0.012em 0.012em 0 var(--rouge), 0.024em 0.024em 0 #c10f1d, 0.036em 0.036em 0 #ad0d1a,
    0.048em 0.048em 0 #960c17, 0.06em 0.06em 0 var(--rouge-sombre), 0.072em 0.072em 0 #5e0810,
    0.1em 0.16em 0.12em rgb(0 0 0 / 0.38), 0.16em 0.3em 0.5em rgb(40 0 4 / 0.35);
  --halo-rouge: 0 0 1px rgb(0 0 0 / 0.6), 0 2px 8px rgb(0 0 0 / 0.55), 0 0 18px rgb(208 17 31 / 0.95), 0 0 38px rgb(208 17 31 / 0.6);
  /* Même relief pour un texte blanc posé sur les rayons. */
  --relief-blanc: 0.012em 0.012em 0 #e9e9e9, 0.024em 0.024em 0 #cfcfcf, 0.036em 0.036em 0 var(--rouge-sombre),
    0.048em 0.048em 0 #5e0810, 0.06em 0.06em 0 #3d050a, 0.1em 0.16em 0.14em rgb(0 0 0 / 0.5);
}

/* ---------- En-tête : barre complète toujours fixe, noire et opaque en permanence (ordre d'Alex) ---------- */
.entete {
  top: 0; left: 0; width: 100%; transform: none; border-radius: 0; border: 0;
  padding: 10px max(14px, calc((100% - 1520px) / 2)) 10px max(14px, calc((100% - 1520px) / 2 + 4px));
  background: var(--noir);
  -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none;
  transition: box-shadow 0.4s var(--ease), padding 0.4s var(--ease);
}
.entete.defile {
  padding-top: 6px; padding-bottom: 6px;
  box-shadow: inset 0 -1px 0 rgb(255 255 255 / 0.08), 0 3px 0 -1px var(--rouge), 0 18px 40px -14px rgb(0 0 0 / 0.75);
}
.entete .btn-menu, .entete .nav-ligne a[aria-current='page'] {
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.3), 0 3px 0 var(--rouge-sombre), 0 8px 16px -6px rgb(0 0 0 / 0.6);
}
@media (max-width: 520px) {
  .entete { top: 0; width: 100%; padding: 8px 10px; }
  .entete.defile { padding-top: 5px; padding-bottom: 5px; }
}

/* ---------- Plus de panneaux pleins : les rayons restent visibles ---------- */
.panneau, .panneau-encre { background: transparent; box-shadow: none; border-radius: 0; color: var(--encre); }
/* Plus d'étiquettes noires ni de pastilles : texte blanc lumineux à halo rouge, écrit lettre par lettre (motion.js). */
.surtitre { padding: 0; border-radius: 0; background: none; box-shadow: none; color: var(--blanc); text-shadow: none; }
.surtitre::before { box-shadow: 0 0 10px var(--rouge), 0 0 2px rgb(0 0 0 / 0.6); }
:is(.welcome-text, .intro-card, .card-item, .pour-plus-infos, .team-card, .day-card, .history-season) .surtitre { color: var(--rouge); text-shadow: none; }
:is(.welcome-text, .intro-card, .card-item, .pour-plus-infos, .team-card, .day-card, .history-season) .surtitre::before { box-shadow: none; }
.surtitre::before { width: 18px; }
.appel .surtitre { padding: 0; background: none; box-shadow: none; color: var(--blanc); }
.titre-section, .welcome-text h2 { color: #0b0909; text-shadow: none; }
.titre-section { display: inline-block; max-width: 100%; }


/* Accueil : texte de bienvenue posé dans une carte. */
.welcome-text { padding: clamp(24px, 4.5vw, 64px); border-radius: var(--r-grand); background: var(--blanc); }
.welcome-text h2 { text-shadow: none; }

/* Prochain événement : carte blanche, scène sombre pour le flyer. */
.next-event { background: var(--blanc); color: var(--encre); }
.next-event h3 { color: #0b0909; }
.next-event p { color: #2b2523; }
.decompte div { background: var(--rouge); border: 0; color: var(--blanc); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.3), 0 4px 0 var(--rouge-sombre), 0 12px 20px -8px rgb(0 0 0 / 0.5); }
.decompte span { color: rgb(255 255 255 / 0.85); }

/* Disciplines géantes : lettres pleines en relief sur les rayons. */
.disc-liste, .disc-liste li { border-color: rgb(255 255 255 / 0.35); }
.disc-liste a { color: var(--blanc); -webkit-text-stroke: 0; text-shadow: none; }
.disc-liste a:hover, .disc-liste a:focus-visible { text-shadow: none; }
.disc-liste .disc-num { padding: 4px 9px; border-radius: 8px; background: var(--encre); color: var(--blanc); text-shadow: none; }

/* Textes posés directement sur le fond (pages intérieures). */
.history-link, .page .panneau .conteneur > p:not([class]) {
  display: inline-block; padding: 10px 16px; border-radius: 14px; background: var(--blanc); box-shadow: 0 12px 26px -12px rgb(0 0 0 / 0.55);
}

/* ---------- Pied : verre sombre, les rayons transparaissent en haut ---------- */
.pied {
  background: linear-gradient(180deg, rgb(13 11 11 / 0.35) 0%, rgb(13 11 11 / 0.82) 32%, rgb(13 11 11 / 0.94) 100%);
  box-shadow: 0 -40px 80px -40px rgb(0 0 0 / 0.6);
}

/* ---------- Cartes : blanches, flottantes, ombres en couches qui suivent l'inclinaison ---------- */
:is(.intro-card, .card-item, .day-card, .team-card, .history-season, .next-event, .pour-plus-infos, .appel, .welcome-text, .document-btn) {
  --rx: 0deg; --ry: 0deg; --sx: 0; --sy: 0; --gx: 50%; --gy: 50%; --go: 0; --tz: 0px;
  position: relative;
  box-shadow:
    0 1px 1px rgb(40 0 4 / 0.08),
    calc(var(--sx) * 3px) calc(3px + var(--sy) * 3px) 6px rgb(40 0 4 / 0.1),
    calc(var(--sx) * 10px) calc(12px + var(--sy) * 10px) 22px -4px rgb(40 0 4 / 0.2),
    calc(var(--sx) * 26px) calc(32px + var(--sy) * 24px) 56px -10px rgb(30 0 3 / 0.45),
    calc(var(--sx) * 48px) calc(64px + var(--sy) * 40px) 110px -30px rgb(122 10 18 / 0.6);
}
:is(.card-item, .team-card):hover { transform: none; }
/* Même spécificité que les :hover d'origine (.card-item:hover…) et déclarée après : l'inclinaison l'emporte. */
:is(.intro-card, .card-item, .day-card, .team-card, .history-season, .next-event, .pour-plus-infos, .appel, .welcome-text, .document-btn).carte-inclinee {
  transform: perspective(1100px) rotateX(var(--rx)) rotateY(var(--ry)) translateZ(var(--tz));
  transition: none !important; z-index: 4;
}
/* Reflet qui suit le pointeur (pseudo-élément libre de chaque carte ; .appel garde ::after pour le couple). */
:is(.intro-card, .card-item, .day-card, .team-card, .history-season, .next-event, .pour-plus-infos, .welcome-text, .document-btn)::after,
.appel::before {
  content: ''; position: absolute; inset: 0; z-index: 5; border-radius: inherit; pointer-events: none;
  background: radial-gradient(farthest-corner circle at var(--gx) var(--gy), rgb(255 255 255 / 0.42), rgb(255 255 255 / 0) 36%, rgb(70 0 10 / 0.1) 100%);
  opacity: var(--go);
}
.album-card .photo::after { z-index: 2; }

/* ---------- Boutons en relief, qui s'enfoncent au clic ---------- */
.btn {
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.35), inset 0 -3px 0 rgb(0 0 0 / 0.2),
    0 5px 0 var(--rouge-sombre), 0 10px 18px -4px rgb(0 0 0 / 0.45), 0 26px 40px -18px rgb(122 10 18 / 0.7);
  transition: color 0.35s var(--ease), border-color 0.35s, translate 0.12s var(--ease), box-shadow 0.12s var(--ease);
}
.btn-ligne { box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.25), 0 5px 0 rgb(255 255 255 / 0.55), 0 12px 22px -6px rgb(0 0 0 / 0.5); }
.appel .btn { box-shadow: inset 0 -3px 0 rgb(0 0 0 / 0.12), 0 5px 0 #bdbdbd, 0 14px 22px -8px rgb(0 0 0 / 0.5); }
.btn:active { translate: 0 4px; box-shadow: inset 0 2px 4px rgb(0 0 0 / 0.3), 0 1px 0 var(--rouge-sombre), 0 4px 8px -2px rgb(0 0 0 / 0.45); }
.document-btn:active { translate: 0 3px; }

/* ---------- Menu plein écran : liens en relief, avancent au survol ---------- */
.menu-liste li { padding-bottom: 0.14em; margin-bottom: -0.14em; }
.menu-liste a { text-shadow: none; }
.menu-ouvert .menu-liste a:hover, .menu-ouvert .menu-liste a:focus-visible { transform: translateX(0.18em) scale(1.03); }
.menu-liste a:hover, .menu-liste a[aria-current='page'] { text-shadow: none; }

/* ---------- Équipe : portrait rond net (≤ 120 px, photos sources 140 × 120), anneau rouge ---------- */
.team-card { padding-top: 28px; }
.team-card .photo {
  width: 120px; height: 120px; aspect-ratio: auto; margin: 0 auto; border-radius: 50%; overflow: hidden;
  box-shadow: 0 0 0 4px var(--blanc), 0 0 0 8px var(--rouge), 0 0 0 10px var(--rouge-sombre), 0 16px 30px -8px rgb(0 0 0 / 0.55);
}
.team-card .photo::after { content: none; }
.team-card .photo img { object-position: 50% 30%; filter: none; }
.team-card:hover .photo img { transform: none; }
.team-card .info { padding-top: 22px; text-align: center; }
.team-card h3 { margin: 0 0 8px; color: #0b0909; text-shadow: none; font-size: 2.3rem; }
.team-card .lieu-jour { text-align: left; }
.team-card .flyer-thumb { text-align: left; }

/* Équipe : grille régulière, toutes les cartes de même taille (lignes égales, place réservée), textes longs tronqués. */
.team-grid { grid-auto-rows: 1fr; align-items: stretch; }
.team-card { display: flex; flex-direction: column; min-width: 0; }
.team-card .photo { flex: none; }
.team-card .photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.team-card .info { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.team-card .info > p:first-of-type { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; }
.team-card .lieu-jour { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; line-clamp: 4; overflow-wrap: anywhere; }
.team-card .flyer-thumb { margin-top: auto; }
.team-card .flyer-txt { min-width: 0; }
.team-card .flyer-txt p { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; }
.team-card .flyer-thumb img { flex: none; }
.team-card, .team-card h3, .team-card .lieu-jour, .team-card .flyer-thumb { transition: background-color 0.35s, color 0.35s, box-shadow 0.35s, border-color 0.35s; }
/* Survol/focus : noir opaque, texte blanc, bord rouge inset, rien de translucide ni de reflet. */
.team-card:hover, .team-card:focus-within { background: var(--noir); color: var(--blanc); outline: 0; box-shadow: inset 0 0 0 3px var(--rouge); }
.team-card:hover::after, .team-card:focus-within::after { content: none; }
.team-card:hover h3, .team-card:focus-within h3 { color: var(--blanc); }
.team-card:hover .lieu-jour, .team-card:focus-within .lieu-jour { border-left-color: var(--rouge); }
.team-card:hover .flyer-thumb, .team-card:focus-within .flyer-thumb { background: #2b2626; }
.team-card:hover .flyer-txt a, .team-card:focus-within .flyer-txt a { color: var(--blanc); }

/* ---------- Événements : frise rouge qui se dessine, grande date, arrivées de chaque côté ---------- */
.events-timeline { --axe: 28px; gap: clamp(40px, 7vw, 96px); padding-bottom: 20px; }
.events-timeline::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: var(--axe); width: 4px; margin-left: -2px; border-radius: 4px;
  background: linear-gradient(var(--rouge), var(--rouge-sombre)); box-shadow: 0 0 18px rgb(255 42 56 / 0.6);
}
.events-timeline.frise-active::before { content: none; }
.frise-ligne { position: absolute; top: 0; left: var(--axe); width: 40px; height: 100%; margin-left: -20px; overflow: visible; pointer-events: none; }
.frise-ligne path { fill: none; stroke: var(--rouge); stroke-width: 4; stroke-linecap: round; }
.frise-ligne .frise-halo { stroke: var(--rouge-vif); stroke-width: 12; opacity: 0.35; filter: blur(6px); }
.frise-tete {
  position: absolute; top: 0; left: var(--axe); z-index: 3; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
  background: var(--blanc); box-shadow: 0 0 0 5px var(--rouge), 0 0 26px 8px rgb(255 42 56 / 0.8); pointer-events: none;
}
.timeline-item { position: relative; display: grid; gap: 16px; padding-left: calc(var(--axe) + 34px); perspective: 1400px; }
.frise-noeud {
  position: absolute; top: 34px; left: var(--axe); z-index: 2; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%;
  background: var(--encre); box-shadow: 0 0 0 4px var(--blanc), 0 0 0 7px var(--rouge), 0 8px 18px rgb(0 0 0 / 0.5);
}
.frise-date { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; font-family: var(--f-titre); font-style: italic; font-weight: 800; text-transform: uppercase; line-height: 0.85; }
.frise-jour { order: -1; font-size: clamp(4.6rem, 3rem + 7vw, 10rem); color: #0b0909; text-shadow: none; }
.frise-mois { font-size: clamp(1.3rem, 1rem + 1.2vw, 2.2rem); padding: 6px 12px; border-radius: 10px; background: var(--rouge); color: var(--blanc); box-shadow: 0 4px 0 var(--rouge-sombre), 0 12px 22px -8px rgb(0 0 0 / 0.5); }
.frise-semaine { font-family: var(--f-texte); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.2em; color: var(--blanc); text-shadow: 0 2px 10px rgb(0 0 0 / 0.6); }
.timeline-card { grid-template-columns: 1fr !important; }
.timeline-card .photo { order: 0 !important; }
@media (min-width: 900px) {
  .events-timeline { --axe: 50%; }
  .events-timeline::before { left: 50%; }
  .timeline-item { grid-template-columns: 1fr 1fr; gap: 0 clamp(70px, 9vw, 140px); padding-left: 0; align-items: start; }
  .frise-noeud { top: 60px; }
  .timeline-item > .timeline-card { grid-column: 1; grid-row: 1; }
  .timeline-item > .frise-date { grid-column: 2; grid-row: 1; align-self: start; margin-top: 18px; flex-direction: column; align-items: flex-start; }
  .timeline-item:nth-child(even) > .timeline-card { grid-column: 2; }
  .timeline-item:nth-child(even) > .frise-date { grid-column: 1; align-items: flex-end; text-align: right; }
}

/* Les cartes qui arrivent de côté (frise, cascade 3D) ne doivent jamais créer de défilement horizontal,
   même pendant leur animation. clip (et non hidden) : position sticky reste fonctionnelle. */
#contenu { overflow-x: clip; }

/* Intertitres posés directement sur les rayons (hors cartes, tableaux, formulaires) : même relief que les titres. */
.page .panneau :is(h2, h3):not(.sr-only):not(:is(.intro-card, .card-item, .day-card, .team-card, .history-season, table, form, .document-btn, .lightbox) *) {
  color: #0b0909; text-shadow: none;
}

/* ---------- Vignettes « relief à étages » : couches décalées selon l'inclinaison (--sx/--sy de cartes3d.js) ---------- */
/* La photo vient vers le pointeur et grossit, le titre suit à mi-distance, le texte bouge à peine. */
/* Décalage en % de la photo (5 %) sous un agrandissement de 12 % : le bord ne se découvre jamais, même en médaillon. */
.carte-inclinee .couche-photo { transform: translate3d(calc(var(--sx) * -5%), calc(var(--sy) * -5%), 0) scale(1.12); }
.carte-inclinee .couche-titre { transform: translate3d(calc(var(--sx) * -10px), calc(var(--sy) * -10px), 0); }
.carte-inclinee .couche-texte { transform: translate3d(calc(var(--sx) * -4px), calc(var(--sy) * -4px), 0); }

/* Équipe : titre du flyer, lisible d'un coup d'œil (couleur héritée : suit le noir/blanc de la carte). */
/* Titre et texte en entier, jamais coupés par « … » : aucune info du flyer perdue (les cartes s'égalisent sur la plus haute). */
.team-card .flyer-titre { display: block; overflow-wrap: break-word; color: inherit; font-size: 1rem; line-height: 1.2; font-weight: 800; }
.team-card .flyer-txt p { display: block; -webkit-line-clamp: unset; line-clamp: none; overflow: visible; margin-top: 2px; line-height: 1.25; }
/* Équipe : lignes de flyer dans le langage du site (piste B d'Alex, 2026-10-31 ; le gris clair faisait tache) :
   cadre noir, texte blanc, miniature à liseré rouge, lien en pilule blanche (rouge au survol). */
.team-card .flyer-thumb { background: var(--noir); color: var(--blanc); }
.team-card .flyer-thumb img { box-shadow: 0 0 0 2px var(--rouge); }
.team-card .flyer-txt a.lien-flyer, .team-card:hover .flyer-txt a.lien-flyer, .team-card:focus-within .flyer-txt a.lien-flyer {
  display: inline-block; margin-top: 6px; padding: 5px 14px; border-radius: 999px;
  background: var(--blanc); color: var(--noir); font-weight: 800; font-size: 0.85rem; text-decoration: none;
  transition: background-color 0.25s, color 0.25s;
}
.team-card .flyer-txt a.lien-flyer:hover, .team-card .flyer-txt a.lien-flyer:focus-visible { background: var(--rouge); color: var(--blanc); }
