/* L'accueil « La salle » : le jour du site et une seule image, la salle d'un bar qui se remplit de 18:42 au coup d'envoi.
   Seuls transform et opacity bougent ; complète sans script. L'ambre : l'action du visiteur et sa place. */

/* La soirée : la salle reste, les moments passent. */
.veillee{
  --camp-a: #0F8B7E; --camp-a2: #FF7F66; --camp-b: #3A3FA8; --camp-b2: #C6E45A;
  --pose: 700ms; --lever: 160ms;
  max-width: calc(var(--page) + 2 * var(--gouttiere)); margin: 0 auto; padding: 0 var(--gouttiere);
}
.salle{ position: sticky; top: 0; z-index: 3; margin: 0 calc(-1 * var(--gouttiere)); padding: 6px var(--gouttiere) 4px; overflow-x: clip; background: var(--fond); border-bottom: 1px solid var(--trait); }
.salle__cadre{ position: relative; margin: 0; }
/* La scène a la taille du dessin : « ta place » s'y pose en pour cent. */
.salle__scene{ --haut: 28svh; position: relative; width: min(100%, var(--haut) * 298 / 232); margin: 0 auto; }
.salle__dessin{ display: block; width: 100%; height: auto; max-height: 28svh; overflow: visible; }
/* « ta place » : une étiquette de papier sur la chaise en pointillé, jamais l'ambre (il vient quand tu la gardes). */
.salle__toi{ position: absolute; left: 54.4%; top: 62.3%; transform: translate(13px, -34px); padding: 3px 9px; border-radius: 999px; background: var(--fond); color: var(--texte); font-size: 0.75rem; font-weight: 700; line-height: 1.2; white-space: nowrap; box-shadow: 0 2px 6px rgba(10, 11, 16, 0.25); pointer-events: none; }
.salle__toi::after{ content: ""; position: absolute; left: -2px; bottom: -14px; width: 1.5px; height: 22px; background: var(--fond); transform: rotate(35deg); transform-origin: top; }
/* L'heure de la salle et ce qu'elle attend, discrètes. */
.salle__heure{ position: absolute; left: 0; top: 2px; z-index: 1; margin: 0; padding: 0 8px 3px 0; border-radius: 0 10px 10px 0; background: var(--fond); font-size: 1.25rem; line-height: 1.1; font-weight: 680; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; color: var(--texte-doux); }
.salle__envoi{ display: block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0; color: var(--texte-discret); }
.veillee[data-etat="2100"] .salle__envoi{ display: none; }
.salle__heure span{ display: none; }
.veillee[data-etat="1842"] .h1842, .veillee[data-etat="1930"] .h1930, .veillee[data-etat="2015"] .h2015, .veillee[data-etat="2055"] .h2055, .veillee[data-etat="2100"] .h2100{ display: inline; }
body:not(.js) .salle__heure{ display: none; }
.salle__legende{ margin: 0; font-size: 0.75rem; line-height: 1.4; color: var(--texte-discret); text-align: right; }
/* Au téléphone, la salle colle en haut : le focus ou une ancre s'arrête sous elle (WCAG 2.4.11). Pas collée sous 641 px de
   haut, ni au-delà du tiers de l'écran (« salle-libre », posé par salle.js). */
@media (max-width: 959.98px) and (min-height: 641px){
  html:not(.salle-libre){ scroll-padding-top: calc(28svh + 2.2rem + 14px); }
  /* La barre du menu passe en bas quand elle sort par le haut de l'écran : cette marge ne la concerne pas. */
  html:not(.salle-libre) .menu{ view-timeline-inset: 0 auto; }
  html:not(.salle-libre) .veillee .attente{ scroll-margin-top: 12px; }
}
@media (max-height: 640px){ .salle{ position: static; } }
/* Au téléphone, en haut de page, la salle est plus grande et se pose à sa taille en défilant (place réservée : rien ne
   saute). Écran trop étroit, ou « réduire » : sa taille. */
@media (max-width: 959.98px) and (min-height: 641px) and (min-aspect-ratio: 9/20) and (prefers-reduced-motion: no-preference){
  @supports (animation-timeline: scroll()){
    .veillee{ --pose-en-plus: 7svh; }
    .veillee .moment--ouverture{ padding-top: calc(14px + var(--pose-en-plus)); }
    html:not(.salle-libre) .salle{ border-bottom-color: transparent; }
    .salle__scene{ transform-origin: 50% 0; animation: salle-pose linear both; animation-timeline: scroll(root); animation-range: 0 var(--pose-en-plus); }
    .salle__legende{ animation: legende-pose linear both; animation-timeline: scroll(root); animation-range: 0 var(--pose-en-plus); }
    html:not(.salle-libre) .salle::before{ content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--trait); animation: salle-trait linear both; animation-timeline: scroll(root); animation-range: 0 var(--pose-en-plus); }
    html:not(.salle-libre) .salle::after{ animation: salle-trait linear both; animation-timeline: scroll(root); animation-range: 0 var(--pose-en-plus); }
  }
}
@keyframes salle-pose{ from{ transform: scale(1.18); } to{ transform: none; } }
@keyframes legende-pose{ from{ transform: translateY(5.04svh); } to{ transform: none; } }
@keyframes salle-trait{ from{ opacity: 0; } to{ opacity: 1; } }
@media (forced-colors: active){ .salle::before{ background: CanvasText; } }
.salle-libre .salle{ position: static; }
/* Sous la salle collée, le texte qui passe dessous s'efface en douceur au lieu d'une ligne coupée net. */
@media (max-width: 959.98px) and (min-height: 641px){
  html:not(.salle-libre) .salle::after{ content: ""; position: absolute; left: 0; right: 0; top: calc(100% + 1px); height: 32px; background: linear-gradient(var(--fond) 35%, rgba(250, 247, 241, 0)); pointer-events: none; }
}
@media (min-width: 960px){
  .veillee{ display: grid; grid-template-columns: 1.35fr 1fr; gap: 56px; align-items: start; }
  .salle{ grid-column: 1; grid-row: 1; height: 100svh; display: grid; align-items: center; margin: 0; padding: 24px 0; border: 0; }
  .salle__scene{ --haut: 72svh; }
  .salle__dessin{ max-height: 72svh; }
  .salle__heure{ font-size: 2rem; top: 0; }
  .moments{ grid-column: 2; grid-row: 1; }
}

/* La salle du soir, une maquette sur le papier : murs sombres et chauds, plancher de bois, appliques au blanc chaud.
   Le seul point fort du premier écran. */
.s-sol{ fill: #A57A55; }
.s-mur-d{ fill: #5B3A2E; }
.s-mur-g{ fill: #472C23; }
.s-plinthe{ fill: #3A241C; }
.s-porte{ fill: #3C261E; }
.s-socle-d{ fill: #5E3F2B; }
.s-socle-g{ fill: #74503A; }
.s-lampe{ fill: #FFF8E8; stroke: rgba(10, 11, 16, 0.25); stroke-width: 0.5; }
.s-lueur{ opacity: 1; }
.s-flaque{ opacity: 0.55; }
.s-comptoir-dessus{ fill: #C99766; }
.s-comptoir-face{ fill: #7E5234; }
.s-comptoir-bout{ fill: #6A4329; }
.s-table{ fill: #FFFFFF; stroke: rgba(10, 11, 16, 0.28); stroke-width: 0.8; }
.s-pied{ stroke: rgba(10, 11, 16, 0.35); stroke-width: 1.2; }
.s-chaise{ fill: rgba(255, 255, 255, 0.55); stroke: rgba(10, 11, 16, 0.4); stroke-width: 0.9; }
.g-corps{ fill: var(--c1); stroke: rgba(10, 11, 16, 0.3); stroke-width: 0.5; }
.g-echarpe{ fill: var(--c2); }
.g-tete{ fill: var(--tete); }
.g-jambes{ fill: #3A3B48; }
.gens.a{ --c1: var(--camp-a); --c2: var(--camp-a2); }
.gens.b{ --c1: var(--camp-b); --c2: var(--camp-b2); }
.gens.t1{ --tete: #2E2723; }
.gens.t2{ --tete: #7A5238; }
.gens.t3{ --tete: #C69C7B; }
.g-liseret{ fill: none; stroke: #F4ECD9; stroke-opacity: 0.5; stroke-width: 0.85; stroke-linecap: round; }
.s-nuit{ fill: var(--nuit); }
.s-nuits{ opacity: 0; }
.s-ecran{ fill: #15161D; stroke: #0A0B10; stroke-width: 1; }
/* L'écran passe l'avant-match dès 18:42 ; au coup d'envoi, il éclaire seul. */
.s-jeu{ opacity: 0.8; }
.s-jeu-a{ fill: var(--camp-a); }
.s-jeu-a2{ fill: var(--camp-a2); }
.s-jeu-b{ fill: var(--camp-b); }
.s-jeu-b2{ fill: var(--camp-b2); }
.s-jeu-ligne{ fill: #FFFFFF; opacity: 0.9; }
.s-halo{ opacity: 0; }
.s-veilleuse{ opacity: 0; }
.s-coule{ opacity: 0; }
.s-contre{ opacity: 0; }
/* Ta place : en pointillé, à l'ambre cerclé quand gardée, cochée à l'arrivée. À 20:55 et 21:00 elle s'efface, jamais le point
   le plus clair d'une salle sombre. */
.toi{ fill: rgba(255, 255, 255, 0.85); stroke: var(--texte); stroke-width: 1.2; stroke-dasharray: 2.4 1.8; }
.veillee:is([data-etat="2055"], [data-etat="2100"]) .toi{ fill: none; stroke: #F4ECD9; stroke-opacity: 0.5; }
.toi-plein{ fill: var(--ambre); stroke: var(--goutte); stroke-width: 0.8; opacity: 0; }
.toi-anneau{ fill: none; stroke: var(--ambre); stroke-width: 1.6; opacity: 0; }
.toi-coche{ fill: none; stroke: var(--nuit); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.place-gardee :is(.toi-plein, .toi-anneau){ opacity: 1; }
.place-gardee .veillee:is([data-etat="2055"], [data-etat="2100"]) .toi-coche{ opacity: 1; }

/* Les transitions ne jouent qu'une fois la salle à son premier état (salle.js pose « pret ») : à l'arrivée, rien ne bouge. */
/* Les gens se posent : ils arrivent d'un cran plus haut, sans glisser. À chaque heure, ceux de son heure et des heures d'avant. */
.gens{ opacity: 0; transform: translateY(-3px); }
.veillee[data-etat="1842"] .s1,
.veillee[data-etat="1930"] :is(.s1, .s2),
.veillee[data-etat="2015"] :is(.s1, .s2, .s3),
.veillee[data-etat="2055"] :is(.s1, .s2, .s3, .s4),
.veillee[data-etat="2100"] :is(.s1, .s2, .s3, .s4),
body:not(.js) :is(.s1, .s2, .s3){ opacity: 1; transform: none; }
/* Les lumières : pleines et chaudes de 18:42 à 20:15, baissées à 20:55 ; au coup d'envoi l'écran du fond s'allume aux couleurs
   des deux clubs. */
.veillee[data-etat="2055"] .s-nuits{ opacity: 0.22; }
.veillee[data-etat="2100"] .s-nuits{ opacity: 0.84; }
.veillee[data-etat="2100"] .s-veilleuse{ opacity: 0.6; }
.veillee[data-etat="2055"] :is(.s-lueur, .s-flaque){ opacity: 0.55; }
.veillee[data-etat="2100"] :is(.s-lueur, .s-flaque){ opacity: 0.1; }
.veillee[data-etat="2100"] .s-jeu{ opacity: 1; }
.veillee[data-etat="2100"] .s-coule{ opacity: 0.35; }
.veillee[data-etat="2100"] .s-halo{ opacity: 0.35; }
.veillee[data-etat="2100"] .s-contre{ opacity: 1; }
.pret .gens{ transition: opacity var(--pose) var(--sortie-douce), transform var(--pose) var(--sortie-douce); }
.pret :is(.s-nuits, .s-veilleuse, .s-jeu, .s-halo, .s-coule, .s-contre, .s-lueur, .s-flaque, .toi-plein, .toi-anneau, .toi-coche){ transition: opacity var(--pose) var(--sortie-douce); }
.pret .gens.r2{ transition-delay: 90ms; }
.pret .gens.r3{ transition-delay: 200ms; }

/* Les moments. */
.moment{ padding: 56px 0 8px; }
.moment--ouverture{ padding-top: 14px; }
.moment--fin{ padding-bottom: 96px; }
@media (min-width: 960px){
  .moment{ min-height: 72svh; display: flex; flex-direction: column; justify-content: center; padding: 64px 0; }
  /* Ancré en haut, pas centré : un message sous le champ ne fait pas remonter le formulaire. */
  .moment--ouverture{ min-height: calc(100svh - 72px); justify-content: flex-start; padding-top: max(64px, 18svh); }
}
.moment__heure{ margin: 0 0 8px; font-size: 0.9375rem; font-weight: 700; color: var(--texte-discret); }
.moment--ouverture .moment__heure{ display: none; }
.moment__titre{ margin: 0; font-size: clamp(1.875rem, 1.5rem + 1.6vw, 2.75rem); line-height: 1.05; font-weight: 730; letter-spacing: -0.03em; font-variation-settings: "opsz" 30; text-wrap: balance; }
/* Le titre se tait devant la salle. */
.moment__titre--un{ font-size: clamp(1.75rem, 1.3rem + 2vw, 3rem); line-height: 1.02; font-weight: 700; letter-spacing: -0.03em; font-variation-settings: "opsz" 32; }
.moment__titre--un span{ display: inline-block; }
.chapo{ margin: 10px 0 0; font-size: clamp(1.0625rem, 1.02rem + 0.3vw, 1.25rem); line-height: 1.45; color: var(--texte-doux); max-width: 34em; }

/* 18:42 : l'inscription, dans le premier écran. */
.moment--ouverture .attente{ margin: 18px 0 0; max-width: 30rem; }
.moment--ouverture .attente__etiquette{ margin: 8px 0 6px 4px; }
.moment--ouverture .attente__villes legend{ margin-bottom: 4px; font-size: 0.875rem; }
.moment--ouverture .attente__ville span{ min-height: 44px; }
@media (max-width: 559.98px){
  .moment--ouverture .attente__ligne{ gap: 8px; }
  .moment--ouverture .attente__champ, .moment--ouverture .attente__bouton{ height: 52px; }
}
/* Au téléphone, le bouton loge dans le champ (une pastille, pas une bande) ; trop étroit (texte agrandi), ils s'empilent. */
.moment--ouverture .attente{ container-type: inline-size; }
/* La pilule fait comme sur ordinateur : le contour de focus et le bord d'erreur (en tirets en couleurs forcées) sont les siens. */
@media (max-width: 559.98px){
  @container (min-width: 20rem){
    .moment--ouverture .attente__ligne{ flex-direction: row; gap: 0; padding: 4px; border-radius: 999px; background: var(--carte); border: 1px solid var(--champ-bord); box-shadow: var(--ombre-carte); }
    .moment--ouverture .attente__ligne .attente__champ{ height: 44px; min-width: 0; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; }
    .moment--ouverture .attente__ligne .attente__champ:focus-visible{ outline: none; }
    .moment--ouverture .attente__ligne:has(.attente__champ:focus-visible){ outline: 2px solid var(--focus); outline-offset: 2px; }
    .moment--ouverture .attente__ligne:has(.attente__champ[aria-invalid="true"]){ padding: 3px; border: 2px solid var(--erreur); }
    .moment--ouverture .attente__ligne .attente__bouton{ flex: 0 0 auto; height: 44px; padding: 0 20px; border-radius: 999px; }
  }
  @container (min-width: 20rem){ @media (forced-colors: active){
    .moment--ouverture .attente__ligne:has(.attente__champ[aria-invalid="true"]){ padding: 2px; border: 3px dashed CanvasText; }
  } }
}

/* 19:30 : ce soir, et la semaine en sept piles. */
.planche{ position: absolute; width: 0; height: 0; overflow: hidden; }
.soir{ list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--trait); }
.match{ display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; min-height: 52px; padding: 6px 0; border-bottom: 1px solid var(--trait); text-decoration: none; }
.match__heure{ flex: 0 0 3.2em; color: var(--texte-doux); }
.match__paire{ display: flex; gap: 3px; }
.match__paire .insigne{ width: 28px; height: 28px; }
.match__nom{ flex: 1 1 9em; min-width: 0; font-weight: 640; line-height: 1.2; }
.match__bars{ flex: 1 0 100%; font-size: 0.875rem; color: var(--texte-discret); }
.match:hover .match__nom{ text-decoration: underline; text-underline-offset: 0.18em; }
.soir__suite{ margin: 14px 0 0; }
.lien-trait{ display: inline-flex; align-items: center; min-height: 44px; font-weight: 640; text-underline-offset: 0.2em; }
.sept{ display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 16px; margin-top: 22px; padding: 12px 0; text-decoration: none; border-radius: 12px; }
.sept__jours{ display: grid; grid-template-columns: repeat(auto-fit, minmax(2.4em, 1fr)); align-items: end; gap: 10px 6px; max-width: 24rem; font-size: 0.75rem; }
.sept__jour{ display: grid; justify-items: center; gap: 2px; color: var(--texte-discret); }
.sept__pile{ width: 24px; height: auto; }
.sept__pile use{ opacity: 1; }
.sept__sol{ fill: var(--champ-bord); }
.sept__nom{ text-transform: none; }
.sept__n{ font-weight: 700; color: var(--texte-doux); }
.sept__texte{ display: grid; margin-top: 6px; }
.sept__texte b{ font-weight: 700; }
.sept__lien{ font-size: 0.9375rem; color: var(--texte-doux); text-decoration: underline; text-underline-offset: 0.2em; }
.sept:hover .sept__lien{ color: var(--texte); }

/* 20:15 : le geste. */
.maintien{ margin-top: 22px; display: grid; gap: 8px; max-width: 26rem; }
.tenir{
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 58px; padding: 0 20px;
  border-radius: 999px; border: 1.5px solid var(--texte); background: var(--carte); color: var(--texte); font: inherit; font-weight: 700; font-size: 1.0625rem;
  cursor: pointer; touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; transition: transform var(--lever) var(--sortie-douce);
}
.tenir:active{ transform: scale(0.985); }
.tenir__niveau{ position: absolute; inset: 0; background: var(--ambre); transform: scaleX(0); transform-origin: left center; transition: transform 380ms var(--sortie-douce); }
.tenir.se-remplit .tenir__niveau{ transform: scaleX(1); transition: transform 1400ms linear; }
.tenir.plein .tenir__niveau{ transform: scaleX(1); }
.tenir.plein{ border-color: var(--ambre); }
.tenir__mot{ position: relative; color: var(--nuit); }
.maintien__aide{ margin: 0; font-size: 0.875rem; color: var(--texte-discret); }
.maintien__statut{ margin: 0; min-height: 1.5em; font-weight: 700; }
/* Sans script, le geste ne fait rien : le bouton s'atténue et l'aide le dit, au lieu de promettre le doigt et la souris. */
.maintien__sans{ display: none; }
body:not(.js) .tenir{ cursor: default; opacity: 0.6; }
body:not(.js) .maintien__avec{ display: none; }
body:not(.js) .maintien__sans{ display: inline; }

/* 20:55 : le sous-bock, un disque de carton qui se retourne. */
.sousbock{ margin: 26px 0 0; }
.sousbock__scene{ position: relative; width: min(176px, 100%); aspect-ratio: 1; perspective: 800px; }
.sousbock__tour{ position: absolute; inset: 4.5%; transform-style: preserve-3d; transform: rotateY(180deg) rotateZ(-6deg); }
.sousbock__face, .sousbock__dos{ position: absolute; inset: 0; width: 100%; height: 100%; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.sousbock__dos{ transform: rotateY(180deg); }
.veillee[data-etat="2055"] .sousbock__tour, .veillee[data-etat="2100"] .sousbock__tour, body:not(.js) .sousbock__tour{ transform: rotateY(0) rotateZ(-6deg); }
.pret .sousbock__tour{ transition: transform 900ms var(--sortie-douce); }
.sousbock__ombre{ position: absolute; left: 22px; right: 22px; bottom: -2px; height: 12px; border-radius: 50%; background: rgba(10, 11, 16, 0.18); filter: blur(5px); }
.sousbock figcaption{ margin: 12px 0 0; font-size: 0.875rem; color: var(--texte-discret); max-width: 28em; }
.sb-carton{ fill: #E9DFC8; stroke: #CDBF9E; stroke-width: 1.2; }
.sb-a{ fill: var(--camp-a); }
.sb-a2{ fill: var(--camp-a2); }
.sb-b{ fill: var(--camp-b); }
.sb-b2{ fill: var(--camp-b2); }
.sb-centre{ fill: #F4ECD9; }
.sb-filet{ fill: none; stroke: #CDBF9E; stroke-width: 1; stroke-dasharray: 2 3; }
.sb-filet-dos{ fill: none; stroke: #D6C9AA; stroke-width: 1.2; }
.sb-heure{ fill: var(--nuit); font-size: 25px; font-weight: 760; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.sb-clubs{ fill: var(--nuit); font-size: 9.5px; font-weight: 640; }
.sb-date{ fill: #5C5F6B; font-size: 9px; font-weight: 600; }

/* 21:00 : le coup d'envoi, et la porte pour les bars. */
.fin__action{ margin: 22px 0 0; }
.bouton-trait{ display: inline-flex; align-items: center; min-height: 52px; padding: 0 24px; border-radius: 999px; border: 1.5px solid var(--texte); font-weight: 680; text-decoration: none; }
.bouton-trait:hover{ background: var(--texte); color: var(--fond); }

/* Réduire les animations : les états changent sans fondu ni pose, le sous-bock se retourne d'un coup. */
@media (prefers-reduced-motion: reduce){
  .pret .gens, .pret :is(.s-nuits, .s-veilleuse, .s-jeu, .s-halo, .s-coule, .s-contre, .s-lueur, .s-flaque, .toi-plein, .toi-anneau, .toi-coche), .pret .sousbock__tour, .tenir__niveau, .tenir.se-remplit .tenir__niveau{ transition: none !important; }
  .gens{ transform: none; }
}
