/**
 * club-life.css — Page "Vie du club" (vie-du-club.html) : une expérience de
 * navigation en 3D où chaque catégorie d'événements est représentée par une
 * "planète" en orbite autour d'un noyau central ; cliquer dessus déclenche
 * une transition de "vol" (zoom caméra + distorsion) vers un écran de
 * destination listant les événements de cette catégorie sous forme de
 * "terminal". Toutes les animations respectent prefers-reduced-motion
 * (voir tout en bas du fichier).
 */
:root {
  --paper: #f5eddf; --paper-2: #eadbc5; --ink: #3b2b23; --brown: #654638;
  --blue: #4267a9; --muted: #766457; --line: rgba(59,43,35,.16);
  --cream: rgba(255,250,241,.38);
  --font: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; max-width: 100%; overflow-x: clip; background: var(--paper); color: var(--ink); font-family: var(--font); line-height: 1.5; }
button, a { font: inherit; }
a { color: inherit; }
.wrap { width: min(1220px,calc(100% - 40px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -80px; background: var(--ink); color: #fff; padding: 12px; z-index: 200; }
.skip:focus { top: 16px; }

/* En-tête et introduction */
.header { position: sticky; top: 0; z-index: 120; border-top: 4px solid var(--blue); border-bottom: 1px solid var(--line); background: rgba(245,237,223,.92); backdrop-filter: blur(12px); }
.header__inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.brand__mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--blue); color: #fff; }
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); font-size: .7rem; }
.nav { display: flex; align-items: center; justify-content: flex-end; gap: 18px; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-size: .8rem; font-weight: 750; text-transform: uppercase; }
.nav a:hover, .nav a[aria-current=page] { color: var(--blue); }
.nav-more { position: relative; }
.nav-more summary { display: flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; font-size: .8rem; font-weight: 750; text-transform: uppercase; color: var(--ink); }
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more summary::after { content: "⌄"; font-size: 1rem; line-height: 1; transition: transform .2s ease; }
.nav-more[open] summary { color: var(--blue); }
.nav-more[open] summary::after { transform: rotate(180deg); }
.nav-more__menu { position: absolute; z-index: 12; top: calc(100% + 12px); right: -10px; display: grid; min-width: 175px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,252,246,.98); box-shadow: 0 15px 32px rgba(51,35,25,.14); }
.nav-more__menu a { padding: 9px 10px; border-radius: 8px; font-size: .73rem; }
.nav-more__menu a:hover { background: rgba(45,99,183,.08); }
.intro { padding-block: 46px 24px; }
.eyebrow, .destination__eyebrow, .event-detail__eyebrow { margin: 0; color: var(--blue); font-size: .74rem; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.intro h1 { margin: 12px 0 18px; font-size: clamp(3rem,7vw,6.5rem); font-weight: 850; letter-spacing: -.06em; line-height: .84; text-transform: uppercase; }
.intro h1 span { color: var(--blue); }
.lead { max-width: 760px; margin: 0; color: var(--muted); font-size: clamp(1rem,2vw,1.2rem); }
.experience__controls { display: flex; align-items: center; justify-content: flex-start; padding-block: 8px 14px; }
.experience__controls p { margin: 0; color: var(--muted); font-size: .78rem; }
.gate > div, .event-detail__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.control { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 15px; border: 1px solid rgba(59,43,35,.25); background: rgba(255,250,241,.7); color: var(--ink); font-weight: 750; text-decoration: none; cursor: pointer; transition: transform .2s ease,background .2s ease; }
.control:hover { background: #fffaf1; transform: translateY(-2px); }
.control--primary { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Scène 3D : caméra de fond, orbite et planètes-catégories */
.viewport { position: relative; height: min(760px,78vh); min-height: 610px; overflow: hidden; border-block: 1px solid var(--line); perspective: 1200px; background: var(--paper); }
.dojo-image { position: absolute; inset: -5%; width: 110%; height: 110%; object-fit: cover; animation: camera 18s ease-in-out infinite alternate; filter: saturate(.93) contrast(1.02); }
/* .is-warping : état déclenché au clic sur une planète, avant la
   transition vers .destination (zoom + flou, "saut" visuel). */
.viewport.is-warping .dojo-image { animation: none; transition: transform 1.05s cubic-bezier(.16,.8,.18,1),filter .8s ease; transform: scale(1.62) translate3d(0,-2%,0); filter: saturate(1.08) contrast(1.08) blur(5px); }
.cinema-shade { position: absolute; inset: 0; background: linear-gradient(180deg,rgba(48,30,20,.09),transparent 30%,rgba(50,31,18,.17)); pointer-events: none; }
.volumetric { position: absolute; left: 1%; top: -10%; width: 57%; height: 77%; background: linear-gradient(128deg,rgba(255,220,155,.3),transparent 58%); clip-path: polygon(0 0,54% 0,100% 100%,25% 100%); filter: blur(18px); opacity: .58; animation: light 7s ease-in-out infinite; pointer-events: none; }
.dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 6; }
.world { position: absolute; inset: 0; z-index: 10; transform-style: preserve-3d; transition: transform .16s ease-out; }
.viewport.is-warping .world { transform: translateZ(520px) scale(2.15) !important; opacity: 0; filter: blur(10px); transition: transform 1.05s cubic-bezier(.12,.82,.18,1),opacity .72s ease,filter .72s ease; }
.orbit { position: absolute; left: 50%; top: 51%; width: min(760px,84vw); height: 360px; border: 1px solid rgba(255,250,241,.65); border-radius: 50%; transform: translate(-50%,-50%) rotateX(65deg); box-shadow: 0 0 45px rgba(255,250,241,.2); }
.orbit:before, .orbit:after { content: ""; position: absolute; border: 1px solid rgba(255,250,241,.38); border-radius: 50%; }
.orbit:before { inset: 18%; }
.orbit:after { inset: 34%; }
.viewport.is-arriving .orbit { animation: orbit-arrival 2.9s cubic-bezier(.16,.8,.18,1) both; }
/* .core : le noyau central (retour à l'accueil de la scène). */
.core { position: absolute; left: 50%; top: 51%; z-index: 22; display: grid; place-items: center; width: 170px; height: 170px; border: 1px solid rgba(255,250,241,.72); border-radius: 50%; background: rgba(255,250,241,.78); box-shadow: 0 24px 70px rgba(59,43,35,.25); backdrop-filter: blur(13px); text-align: center; transform: translate(-50%,-50%) translateZ(95px); animation: core 4.5s ease-in-out infinite; font: inherit; color: var(--ink); cursor: pointer; }
.viewport.is-arriving .core { animation: core-arrival 2.8s cubic-bezier(.16,.8,.18,1) both; }
.core strong { display: block; font-size: 1.5rem; }
.core span { display: block; margin-top: 5px; color: var(--muted); }
.core small { display: block; margin-top: 5px; color: var(--muted); font-size: .82rem; }
.core:disabled { cursor: default; opacity: .86; }
/* .planet : une catégorie d'événements, positionnée en JS le long de l'orbite. */
.planet { position: absolute; left: 50%; top: 51%; width: 168px; min-height: 96px; padding: 15px; border: 1px solid rgba(255,250,241,.72); border-radius: 50px; background: rgba(255,250,241,.76); color: var(--ink); box-shadow: 0 22px 65px rgba(59,43,35,.22); backdrop-filter: blur(11px); font-weight: 800; cursor: pointer; transform: translate(-50%,-50%); will-change: left,top,transform,opacity; transition: background .25s ease; }
.planet:hover, .planet:focus-visible { background: rgba(237,227,210,.94); }
.planet--grades:after { display: none; }
.viewport.is-arriving .planet { filter: drop-shadow(0 0 18px rgba(66,103,169,.4)); }
.viewport__status { position: absolute; left: 50%; bottom: 22px; z-index: 40; margin: 0; padding: 7px 14px; border-radius: 99px; background: rgba(255,250,241,.68); color: var(--ink); backdrop-filter: blur(9px); white-space: nowrap; transform: translateX(-50%); }
/* Effets ponctuels déclenchés en JS lors d'une interaction (onde au survol,
   flash au moment du "saut" vers une destination). */
.wave { position: absolute; left: 50%; top: 51%; z-index: 21; width: 40px; height: 40px; border: 1px solid rgba(66,103,169,.7); border-radius: 50%; opacity: 0; pointer-events: none; transform: translate(-50%,-50%); }
.wave.play { animation: wave .8s ease-out; }
.portal-flash { position: absolute; left: 50%; top: 51%; z-index: 45; width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle,rgba(255,250,241,.9) 0 8%,rgba(66,103,169,.45) 30%,transparent 72%); opacity: 0; pointer-events: none; transform: translate(-50%,-50%) scale(0); }
.viewport.is-warping .portal-flash { animation: portal 1.05s cubic-bezier(.12,.82,.18,1) forwards; }

/* Boîte de confirmation avant de "voyager" vers une catégorie. */
.gate { position: absolute; left: 50%; top: 50%; z-index: 75; width: min(470px,88%); padding: 32px; border: 1px solid rgba(152,113,75,.34); background: rgba(255,250,241,.95); box-shadow: 0 30px 90px rgba(74,45,28,.28); text-align: center; opacity: 0; pointer-events: none; transform: translate(-50%,-50%) scale(.88); transition: opacity .3s ease,transform .45s ease; }
.gate.is-visible { opacity: 1; pointer-events: auto; transform: translate(-50%,-50%) scale(1); }
.gate h2 { margin: 0; }
.gate p { color: var(--muted); }
.gate > div { justify-content: center; }

/* Écran de destination : liste des événements de la catégorie choisie,
   présentés comme les lignes d'un "terminal". */
.destination { position: absolute; inset: 0; z-index: 70; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; background: linear-gradient(180deg,rgba(255,250,241,.08),rgba(244,229,207,.14)); color: var(--ink); text-align: center; opacity: 0; pointer-events: none; clip-path: circle(0 at 50% 51%); transform: scale(1.22); transition: opacity .35s ease,transform .75s cubic-bezier(.16,.8,.18,1),clip-path .85s cubic-bezier(.16,.8,.18,1); }
.destination.is-visible { opacity: 1; pointer-events: auto; clip-path: circle(150% at 50% 51%); transform: scale(1); }
.destination__eyebrow { color: var(--brown); text-shadow: 0 1px 8px #fffaf1; }
.destination > h2 { margin: 4px 0 20px; font-size: clamp(2.5rem,6vw,5.2rem); line-height: .9; letter-spacing: -.06em; text-shadow: 0 2px 18px #fffaf1; }
.terminal { position: relative; width: min(980px,96%); overflow: hidden; border: 1px solid rgba(255,250,241,.58); background: var(--cream); box-shadow: 0 24px 65px rgba(74,45,28,.16); backdrop-filter: blur(5px); color: #3e291f; text-align: left; text-shadow: 0 1px 7px rgba(255,250,241,.95); }
.terminal:before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle,rgba(86,59,39,.14) 1px,transparent 1.5px); background-size: 5px 5px; opacity: .16; pointer-events: none; }
.terminal__head { position: relative; display: flex; justify-content: space-between; gap: 16px; padding: 16px 21px; border-bottom: 1px solid rgba(86,59,39,.2); background: rgba(255,250,241,.12); letter-spacing: .08em; }
.terminal-row { position: relative; display: grid; width: 100%; grid-template-columns: 95px minmax(180px,1.35fr) minmax(150px,.8fr) 105px; gap: 14px; align-items: center; padding: 15px 21px; border: 0; border-bottom: 1px solid rgba(86,59,39,.17); background: transparent; color: inherit; text-align: left; cursor: pointer; transition: background .35s ease,transform .45s ease; }
.terminal-row:hover, .terminal-row:focus-visible { background: rgba(255,250,241,.45); }
.terminal-row.is-highlighted { background: rgba(255,250,241,.31); transform: translateX(9px); }
.terminal-row strong { font-weight: 850; }
.terminal-row time, .terminal-row span { min-width: 0; }
.terminal-status { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.terminal-status:before { content: ""; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 11px var(--blue); }
.terminal-status.is-upcoming:before { background: var(--blue); box-shadow: 0 0 11px var(--blue); }
.terminal-status.is-today:before { background: #dc8a21; box-shadow: 0 0 11px rgba(220,138,33,.82); }
.terminal-status.is-live:before { background: #24a148; box-shadow: 0 0 13px rgba(36,161,72,.9); animation: status-led-live 1.25s ease-in-out infinite; }
.terminal-status.is-cancelled:before { background: #c62828; box-shadow: 0 0 11px rgba(198,40,40,.82); }
.terminal-status.is-past:before { background: #77706b; box-shadow: 0 0 8px rgba(119,112,107,.55); }
.terminal-status.is-warning:before { background: #b06c00; box-shadow: 0 0 10px rgba(176,108,0,.7); }
@keyframes status-led-live { 0%,100% { opacity: .62; transform: scale(.86); } 50% { opacity: 1; transform: scale(1.2); } }
@media (prefers-reduced-motion: reduce) { .terminal-status.is-live:before { animation: none; } }
.terminal-empty { position: relative; padding: 36px 20px; text-align: center; }
.terminal-empty a { color: var(--blue); }
.destination__copy { max-width: 720px; margin: 15px 0 12px; padding: 6px 13px; border: 1px solid rgba(255,250,241,.36); border-radius: 99px; background: rgba(255,250,241,.28); color: #4f372c; text-shadow: 0 1px 8px #fffaf1; }
.destination__back { background: rgba(255,250,241,.72); }

/* Détail d'un événement choisi dans le terminal. */
.event-detail { position: absolute; left: 50%; top: 50%; z-index: 82; width: min(620px,90%); padding: 30px; border: 1px solid rgba(152,113,75,.34); background: rgba(255,250,241,.95); box-shadow: 0 35px 100px rgba(74,45,28,.28); backdrop-filter: blur(14px); color: var(--ink); text-align: left; opacity: 0; pointer-events: none; transform: translate(-50%,-44%) scale(.92); transition: opacity .3s ease,transform .45s cubic-bezier(.2,.8,.2,1); }
.event-detail.is-visible { opacity: 1; pointer-events: auto; transform: translate(-50%,-50%) scale(1); }
.event-detail h3 { margin: 4px 0 18px; font-size: clamp(1.8rem,5vw,3.3rem); line-height: 1; letter-spacing: -.04em; }
.event-detail dl { display: grid; grid-template-columns: 105px 1fr; gap: 10px; margin: 0 0 20px; }
.event-detail dt { color: var(--muted); }
.event-detail dd { margin: 0; }
.event-detail > p:not(.event-detail__eyebrow) { color: var(--brown); }
.event-detail__image { display: block; width: 100%; max-height: 220px; margin: 0 0 18px; object-fit: cover; border-radius: 12px; }
.event-detail__image[hidden] { display: none; }

.source { padding-block: 24px 54px; color: var(--muted); font-size: .86rem; }
.source a { color: var(--blue); }
.noscript { position: absolute; z-index: 100; inset: 20px; padding: 24px; background: #fffaf1; }
.footer { padding: 27px 0; background: var(--ink); color: #d8c7b3; }
.footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer nav { display: flex; gap: 16px; }
.footer a { text-decoration: none; }
.footer a:hover { color: #fff; }
body.is-sensory .viewport { animation: atmosphere 6s ease-in-out infinite; }

@keyframes camera { from { transform: scale(1) translate3d(-.5%,0,0); } to { transform: scale(1.105) translate3d(1.3%,-1.2%,0); } }
@keyframes light { 50% { opacity: .78; transform: translateX(28px) scaleX(1.08); } }
@keyframes core { 50% { transform: translate(-50%,-50%) translateZ(120px) scale(1.05); } }
@keyframes core-arrival {
  0% { opacity: 0; transform: translate(-50%,-50%) translateZ(0) scale(.32); }
  28% { opacity: 1; transform: translate(-50%,-50%) translateZ(150px) scale(1.16); }
  58% { transform: translate(-50%,-50%) translateZ(115px) scale(.96); }
  100% { transform: translate(-50%,-50%) translateZ(95px) scale(1); }
}
@keyframes orbit-arrival {
  0%, 18% { opacity: 0; transform: translate(-50%,-50%) rotateX(65deg) scale(.08); }
  72% { opacity: .85; }
  100% { opacity: 1; transform: translate(-50%,-50%) rotateX(65deg) scale(1); }
}
@keyframes wave { 0% { opacity: .8; } to { opacity: 0; width: 760px; height: 760px; } }
@keyframes portal {
  0% { opacity: 0; transform: translate(-50%,-50%) scale(0); }
  20% { opacity: .85; }
  72% { opacity: .45; }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(75); }
}
@keyframes pulse { 50% { opacity: .35; box-shadow: none; } }
@keyframes atmosphere { 50% { filter: saturate(1.08) brightness(1.035); } }

@media (max-width: 900px) {
  .header__inner { align-items: flex-start; flex-direction: column; padding-block: 14px; }
  .nav { justify-content: flex-start; }
  .intro { grid-template-columns: 1fr; }
  .intro__note { padding-left: 0; padding-top: 18px; border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 700px) {
  .wrap { width: min(100% - 24px,1220px); }
  .nav { gap: 12px; }
  .nav a { font-size: .72rem; }
  .intro { padding-top: 42px; }
  .experience__controls { align-items: flex-start; flex-direction: column; }
  .viewport { height: 760px; min-height: 680px; }
  .dojo-image { left: -15%; width: 130%; }
  .planet { width: 138px; min-height: 86px; padding: 11px; }
  .core { width: 138px; height: 138px; }
  .destination { justify-content: flex-start; padding: 18px 8px max(18px, env(safe-area-inset-bottom)); overflow-y: auto; }
  .destination > h2 { margin-bottom: 15px; }
  .terminal-row { grid-template-columns: 70px minmax(135px,1fr); gap: 6px; padding: 12px 14px; }
  .terminal-row span:nth-child(3), .terminal-row span:nth-child(4) { grid-column: 2; }
  .terminal { width: 100%; max-height: 430px; overflow-y: auto; }
  .terminal__head { position: sticky; top: 0; z-index: 3; padding: 13px 14px; background: rgba(255,250,241,.9); }
  .destination__copy { border-radius: 12px; }
  .viewport__status { max-width: 88%; white-space: normal; text-align: center; }
  .event-detail { max-height: 88dvh; overflow-y: auto; padding: 23px; }
  .event-detail dl { grid-template-columns: 85px 1fr; }
  .gate { max-height: 86dvh; overflow-y: auto; padding: 24px 20px; }
}
/* Désactive toutes les animations/transitions pour qui le demande. */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
  .world { transform: none !important; }
}
