/* ---------------------------------------------------------------------------
   Bricolage Grotesque — police de titrage, HEBERGEE ICI.
   Aucun appel a un service tiers : pas une adresse IP de participant ne part
   chez Google (SPEC 16). Ne jamais remplacer par un CDN.
   --------------------------------------------------------------------------- */
@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/assets/fonts/bricolage-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('/assets/fonts/bricolage-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ---------------------------------------------------------------------------
   Concours de l'Avent — theme « noel »
   Telephone d'abord, reference 390 px. Palette et typographies : SPEC 10.
   Cette couche est une peau : le moteur ne connait que des editions.
   --------------------------------------------------------------------------- */

:root {
  --nuit:      #0B1B2B;
  --nuit2:     #12293D;
  --or:        #E9B44C;
  --or-pale:   #F3D79A;
  --sapin:     #1F6F4A;
  --neige:     #F7F9FB;
  --braise:    #C0392B;

  --texte:     rgba(247, 249, 251, .88);
  --texte-bas: rgba(247, 249, 251, .58);
  --filet:     rgba(233, 180, 76, .26);

  /* --titre : sans serif de titrage, franche et contemporaine. Georgia sonnait
     trop scolaire, et se lisait mal en petit corps. */
  --titre: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Bricolage Grotesque', system-ui, -apple-system, sans-serif;
  --sans:  system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --gouttiere: 1.25rem;
  --largeur:   36rem;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--nuit);
  color: var(--texte);
  font: 16px/1.65 var(--sans);
  overflow-x: hidden;
}

/* --- Fond ---------------------------------------------------------------- */

.voile {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(31, 111, 74, .16), transparent 70%),
    radial-gradient(70% 50% at 80% 100%, rgba(233, 180, 76, .08), transparent 70%),
    linear-gradient(180deg, var(--nuit) 0%, #091826 100%);
}

/* Le filigrane : un grand point d'interrogation, muet sur le thème de
   l'année, en attendant un parti pris définitif. */
.filigrane {
  position: fixed; left: 50%; top: 48%; z-index: -1;
  transform: translate(-50%, -50%);
  font: 700 min(175vw, 90rem)/1 var(--titre);
  color: rgba(233, 180, 76, .055);
  pointer-events: none; user-select: none;
}

/* La neige, en deux couches. Décorative et sans rapport avec le thème : elle
   survivra au changement d'édition, contrairement à la pellicule. */
.neige { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.flocon {
  position: absolute; top: -4vh; border-radius: 50%;
  background: var(--neige); animation: tomber linear infinite;
}
@keyframes tomber {
  0%   { transform: translate3d(0, -5vh, 0); }
  100% { transform: translate3d(var(--derive, 10px), 105vh, 0); }
}
@media (prefers-reduced-motion: reduce) { .neige { display: none; } }

/* --- Accessibilite ------------------------------------------------------- */

.saut {
  position: absolute; left: -9999px; top: 0;
  background: var(--or); color: var(--nuit); padding: .6rem 1rem; z-index: 10;
}
.saut:focus { left: .5rem; top: .5rem; }

:focus-visible {
  outline: 2px solid var(--or);
  outline-offset: 2px;
  border-radius: 2px;
}

/* --- En-tete et navigation ------------------------------------------------ */

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.entete {
  position: relative; z-index: 20;
  display: flex; align-items: center; gap: .7rem;
  padding: .75rem var(--gouttiere);
  border-bottom: 1px solid rgba(233, 180, 76, .18);
}

/* Le hamburger. Une case a cocher masquee tient l'etat du tiroir : aucun
   JavaScript, donc rien qui puisse tomber en panne. */
.bascule-menu { position: absolute; opacity: 0; width: 0; height: 0; }
.hamburger {
  flex: none; display: block; width: 26px; padding: 4px 0; cursor: pointer;
}
.hamburger span[aria-hidden] {
  display: block; height: 2px; margin: 4px 0; border-radius: 2px;
  background: var(--or-pale);
}
.bascule-menu:focus-visible + .entete .hamburger { outline: 2px solid var(--or); outline-offset: 3px; }

.marque {
  display: inline-flex; align-items: center; gap: .5rem; min-width: 0;
  color: var(--or-pale); text-decoration: none;
  font-family: var(--titre); font-weight: 700; font-size: .98rem; letter-spacing: -.01em;
}
.marque-logo { width: 24px; height: 24px; flex: none; display: block; }
.marque-texte { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Sous 26 rem, le titre serait tronqué en « Concours … » : le logo suffit à
   identifier le site, et la place revient au compte. */
@media (max-width: 26rem) { .marque-texte { display: none; } }

/* Le compte, a droite, et rien d'autre. */
.compte { margin-left: auto; display: flex; align-items: center; gap: .6rem; flex: none; }
.lien-compte { color: var(--texte-bas); text-decoration: none; font-size: .9rem; }
.lien-compte:hover { color: var(--or-pale); }

.menu-compte { position: relative; }
.menu-compte summary {
  display: flex; align-items: center; gap: .25rem; cursor: pointer; list-style: none;
}
.menu-compte summary::-webkit-details-marker { display: none; }
.nav-avatar { border-radius: 50%; background: #EEF3F7; display: block; }
/* Le chevron annonce qu'il y a quelque chose dessous. */
.chevron {
  width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid var(--or-pale);
}
.menu-compte[open] .chevron { transform: rotate(180deg); }
.menu-compte-contenu {
  position: absolute; right: 0; top: calc(100% + .55rem); z-index: 30;
  min-width: 11rem; padding: .8rem 1rem;
  background: var(--nuit2); border: 1px solid var(--filet); border-radius: 5px;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .8);
}
.menu-compte-contenu .pseudo {
  font-weight: 600; color: var(--or-pale);
  padding-bottom: .6rem; margin-bottom: .6rem;
  border-bottom: 1px solid rgba(247, 249, 251, .1);
}
.lien-bouton {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--texte); font: inherit;
}
.lien-bouton:hover { color: var(--or-pale); }

/* Le tiroir glisse depuis la gauche, par-dessus la page. */
.tiroir {
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 40;
  width: min(17rem, 80vw); padding: 4rem 1.5rem 2rem;
  background: var(--nuit2); border-right: 1px solid var(--filet);
  box-shadow: 14px 0 40px -18px rgba(0, 0, 0, .9);
  transform: translateX(-101%);
  transition: transform .22s ease;
  overflow-y: auto;
}
.tiroir a {
  display: block; padding: .8rem 0; text-decoration: none; color: var(--texte);
  border-bottom: 1px solid rgba(247, 249, 251, .07);
}
.tiroir a:hover { color: var(--or-pale); }
.tiroir a[aria-current="page"] { color: var(--or); }
.tiroir .fermer {
  position: absolute; top: .9rem; right: 1.1rem;
  font-size: 1.7rem; line-height: 1; color: var(--texte-bas); cursor: pointer;
}

/* Le voile ferme le tiroir quand on touche a cote. */
.voile-menu {
  position: fixed; inset: 0; z-index: 35; display: none;
  background: rgba(5, 14, 24, .6);
}
.bascule-menu:checked ~ .tiroir { transform: none; }
.bascule-menu:checked ~ .voile-menu { display: block; }

@media (prefers-reduced-motion: reduce) { .tiroir { transition: none; } }

/* Au-dela de la tablette, les liens tiennent en clair : replier serait une
   regression. */
@media (min-width: 62rem) {
  .hamburger, .voile-menu { display: none; }
  .tiroir {
    position: static; transform: none; width: auto; padding: 0;
    background: none; border: 0; box-shadow: none; overflow: visible;
    display: flex; align-items: center; gap: 1.4rem;
    margin-left: 1.4rem;
  }
  .tiroir .fermer { display: none; }
  .tiroir a { padding: .2rem 0; border: 0; font-size: .92rem; color: var(--texte-bas); }
  .tiroir a[aria-current="page"] { color: var(--or); border-bottom: 1px solid var(--or); }
  .entete { flex-wrap: nowrap; }
}

/* Sur grand ecran, le tiroir devenu barre doit se placer dans l'en-tete. */
@media (min-width: 62rem) {
  body { display: block; }
  .entete { display: flex; }
}

/* --- Structure ----------------------------------------------------------- */

main {
  flex: 1;
  width: 100%; max-width: var(--largeur);
  margin: 0 auto;
  padding: 2rem var(--gouttiere) 3rem;
}
/* Seule la page calendrier s'élargit : elle est faite de vignettes, les autres
   sont du texte, et du texte trop large se lit mal. */
main.large { max-width: 900px; }
main.tres-large { max-width: 1280px; }

.pied {
  padding: 1.5rem var(--gouttiere) 2rem;
  text-align: center;
  color: var(--texte-bas); font-size: .82rem;
  border-top: 1px solid rgba(233, 180, 76, .14);
}

.page-centre { text-align: center; }

/* --- Titres et texte ----------------------------------------------------- */

h1 {
  font-family: var(--titre); font-weight: 700;
  font-size: 1.6rem; font-size: clamp(1.6rem, 6.4vw, 2.2rem); letter-spacing: -.015em; line-height: 1.15;
  color: var(--neige); margin-bottom: 1rem;
}
h2 {
  font-family: var(--titre); font-weight: 700;
  font-size: 1.2rem; letter-spacing: -.01em; color: var(--or-pale); margin-bottom: .5rem;
}
.texte { margin-bottom: .9rem; }
.texte:last-child { margin-bottom: 0; }
a { color: var(--or); }

/* --- Accueil ------------------------------------------------------------- */

.hero { text-align: center; }

/* Le logo de l'edition, comme sur la page d'attente. */
.logo {
  display: block; margin: 0 auto 1.5rem;
  width: clamp(64px, 17vw, 86px); height: auto;
  filter: drop-shadow(0 6px 22px rgba(0, 0, 0, .6))
          drop-shadow(0 0 18px rgba(233, 180, 76, .18));
}

.bienvenue {
  font-family: var(--titre); font-weight: 700; letter-spacing: -.02em;
  font-size: 2.4rem; font-size: clamp(2.4rem, 11vw, 3.6rem); line-height: 1;
  color: var(--or); margin-bottom: .9rem;
  text-shadow: 0 3px 26px rgba(0, 0, 0, .55);
}
.hero h1 { margin-bottom: .7rem; }
.theme { color: var(--or-pale); }
.accroche { font-family: var(--titre); font-weight: 400; color: var(--texte); }

/* Le photogramme 35 mm : signature visuelle de l'edition. */
.photogramme {
  position: relative;
  margin: 2.2rem 0 1.9rem;
  padding: 1.3rem 2rem;
  background: linear-gradient(180deg, rgba(18, 41, 61, .9), rgba(9, 24, 38, .94));
  border: 1px solid rgba(233, 180, 76, .32);
  border-radius: 3px;
  box-shadow: 0 20px 55px -22px rgba(0, 0, 0, .95), inset 0 0 60px rgba(233, 180, 76, .06);
}
.perfos {
  position: absolute; top: 0; bottom: 0; width: 1.5rem;
  display: flex; flex-direction: column; justify-content: space-evenly; align-items: center;
  padding: .5rem 0;
}
.perfos-g { left: 0; }
.perfos-d { right: 0; }
.perfos i {
  display: block; width: .5rem; height: .78rem; border-radius: 2px;
  background: rgba(11, 27, 43, .9); border: 1px solid var(--filet);
}

.compte { display: flex; justify-content: center; }
.compte > div {
  display: flex; flex-direction: column; align-items: center;
  flex: 1 1 0; min-width: 0; padding: 0 .15rem;
}
.valeur {
  font-weight: 700; font-size: 2.1rem; font-size: clamp(2.1rem, 11vw, 3.4rem); line-height: 1;
  letter-spacing: -.035em; color: var(--or-pale); font-variant-numeric: tabular-nums;
}
.label {
  margin-top: .5rem; font-size: .58rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--texte-bas); white-space: nowrap;
}
.ouvert { font-family: var(--serif); font-size: 1.4rem; color: var(--or-pale); }

.appel {
  margin-top: 2rem; padding: 1.3rem var(--gouttiere);
  background: var(--nuit2); border-left: 3px solid var(--sapin); border-radius: 0 4px 4px 0;
  text-align: left;
}
.appel p:last-child { margin-top: 1rem; }

.rendezvous {
  margin-top: 2.3rem; padding-top: 1.5rem;
  border-top: 1px solid var(--filet);
  font-family: var(--titre); font-weight: 700; font-size: 1.05rem; color: var(--or);
}

/* --- Regles -------------------------------------------------------------- */

.regles dt {
  font-family: var(--serif); font-size: 1.1rem; color: var(--or);
  margin-top: 1.6rem;
}
.regles dt:first-child { margin-top: 0; }
.regles dd { margin-top: .3rem; }
.regles strong { color: var(--or-pale); font-weight: 600; }

/* --- Formulaires --------------------------------------------------------- */

.formulaire { margin-top: 1.75rem; }

.champ { margin-bottom: 1.35rem; }
.champ label { display: block; font-weight: 600; margin-bottom: .35rem; }
.champ-case { display: flex; align-items: center; gap: .55rem; }
.champ-case label { margin: 0; font-weight: 400; }
.champ-case input { width: 1.15rem; height: 1.15rem; accent-color: var(--or); }

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
.formulaire select {
  width: 100%;
  padding: .75rem .85rem;
  font: inherit;
  color: var(--neige);
  background: var(--nuit2);
  border: 1px solid var(--filet);
  border-radius: 4px;
}
input:focus, .formulaire select:focus { border-color: var(--or); }

/* Une liste déroulante laissée au navigateur est minuscule et blanche au milieu
   d'une page sombre. On lui donne l'allure des autres champs, chevron compris. */
.formulaire select {
  appearance: none; -webkit-appearance: none;
  padding-right: 2.4rem; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E9B44C' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .8rem center;
  background-size: 1.1rem;
}
.formulaire select option { background: var(--nuit2); color: var(--neige); }
/* Edge et Chrome imposent leur propre fond blanc aux champs qu'ils ont
   remplis. On le neutralise, sinon l'adresse e-mail apparaît en clair sur
   fond blanc au milieu d'une page sombre. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--neige);
  -webkit-box-shadow: 0 0 0 1000px var(--nuit2) inset;
  caret-color: var(--neige);
  transition: background-color 100000s ease-in-out 0s;
}
input[aria-invalid="true"] { border-color: var(--braise); }

.aide { display: block; margin-top: .35rem; font-size: .85rem; color: var(--texte-bas); }
.erreur { display: block; margin-top: .35rem; font-size: .87rem; color: #F08B80; }
.erreur::before { content: "\2716\00a0"; }

/* Champ de mot de passe avec bouton d'affichage */
.mdp { position: relative; display: block; }
.mdp input { padding-right: 5.4rem; }
.mdp-oeil {
  position: absolute; top: 50%; right: .4rem; transform: translateY(-50%);
  padding: .4rem .6rem; border: 0; border-radius: 3px; cursor: pointer;
  background: transparent; color: var(--or); font: 600 .82rem var(--sans);
}
.mdp-oeil:hover { color: var(--or-pale); text-decoration: underline; }

fieldset { border: 0; }
legend { font-weight: 600; margin-bottom: .35rem; }

.vignettes {
  display: flex; flex-wrap: wrap; margin: .7rem 0 0 -.45rem;
  max-height: 21rem; overflow-y: auto;      /* la galerie ne noie pas le formulaire */
  padding: .25rem 0 .25rem .05rem;
}
/* Largeur fixe : la galerie ne s'etire jamais, meme si le navigateur ignore
   les dispositions modernes. Cinq colonnes en 390 px. */
/* ⚠️ `display` écrase l'attribut `hidden` du navigateur : sans la règle
   ci-dessous, masquer une vignette n'a AUCUN effet. Le filtre par famille
   semblait mort pour cette seule raison. */
.vignette[hidden] { display: none; }
.vignette {
  display: block; cursor: pointer;
  flex: 0 0 auto; width: 60px; margin: 0 0 .45rem .45rem;
}
.vignette input { position: absolute; opacity: 0; width: 0; height: 0; }
.vignette img {
  width: 100%; height: auto; display: block; box-sizing: border-box;
  border-radius: 50%;                       /* le portrait est detoure en rond */
  border: 2px solid transparent;
  background: #EEF3F7;                      /* fond clair : les cheveux sombres ressortent */
}
.vignette input:checked + img { border-color: var(--or); box-shadow: 0 0 0 3px rgba(233, 180, 76, .3); }
.vignette input:focus-visible + img { outline: 2px solid var(--or); outline-offset: 3px; }

/* Vignette deja prise par quelqu'un d'autre. */
.vignette-prise { cursor: not-allowed; }
.vignette-prise img { filter: grayscale(1); opacity: .32; }

.nav-avatar { background: #EEF3F7; }

/* --- Boutons et messages ------------------------------------------------- */

.bouton {
  display: inline-block;
  padding: .78rem 1.5rem;
  font: 600 1rem/1 var(--sans);
  color: var(--nuit); background: var(--or);
  border: 0; border-radius: 4px; cursor: pointer; text-decoration: none;
}
.bouton:hover { background: var(--or-pale); }

.lien-discret { display: inline-block; margin-left: 1rem; color: var(--texte-bas); }
.lien-bas { margin-top: 1.75rem; color: var(--texte-bas); font-size: .92rem; }

.message {
  padding: .85rem 1rem; margin-bottom: 1.5rem;
  border-left: 3px solid var(--sapin); border-radius: 0 4px 4px 0;
  background: rgba(31, 111, 74, .18);
}
.message-erreur { border-left-color: var(--braise); background: rgba(192, 57, 43, .18); }
.message-info   { border-left-color: var(--or);     background: rgba(233, 180, 76, .12); }

.bandeau-demo {
  padding: .6rem 1rem; margin-bottom: 1.5rem; text-align: center;
  font-size: .85rem; letter-spacing: .04em;
  color: var(--nuit); background: var(--or-pale); border-radius: 4px;
}

.code-erreur {
  font-weight: 700; font-size: 3.2rem; line-height: 1;
  color: var(--or); font-variant-numeric: tabular-nums; margin-bottom: .5rem;
}

/* --- Ecrans plus larges -------------------------------------------------- */

@media (min-width: 40rem) {
  body { font-size: 17px; }
  main { padding-top: 3rem; }
}

/* --- Mouvement ----------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .photogramme { animation: scintiller 7s ease-in-out infinite; }
  @keyframes scintiller {
    0%, 100% { filter: brightness(1); }
    47%      { filter: brightness(1.05); }
    52%      { filter: brightness(.98); }
  }
  .bouton, .nav a, .vignette img { transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
}

/* ---------------------------------------------------------------------------
   Calendrier — la grille des portes cintrées
   --------------------------------------------------------------------------- */

.score-perso {
  margin: 1.2rem 0 1.6rem; font-weight: 700; font-size: 1.6rem;
  color: var(--or-pale); font-variant-numeric: tabular-nums;
}
.score-max { font-weight: 400; font-size: 1rem; color: var(--texte-bas); }

/* Trois portes en portrait, davantage à mesure que l'écran s'élargit — mais
   six au plus : au-delà elles rétréciraient au lieu de respirer. */
.grille { margin: 1.4rem 0 0 -.55rem; list-style: none; font-size: 0; }
.case {
  display: inline-block; vertical-align: top;
  width: 33.333%; padding: 0 0 .9rem .55rem;
  font-size: 1rem;
}
@media (min-width: 34rem) { .case { width: 25%; } }
@media (min-width: 48rem) { .case { width: 20%; } }
@media (min-width: 62rem) { .case { width: 16.666%; } }

/* La date, au-dessus de la porte. Hauteur fixe, sinon le « 1er » décale la
   rangée entière. */
.date {
  display: block; text-align: center; white-space: nowrap;
  height: 22px; line-height: 22px; margin-bottom: 5px;
  font-size: .95rem; letter-spacing: .01em; color: rgba(247, 249, 251, .72);
}
.date sup { vertical-align: baseline; font-size: .78em; }

/* La porte : plein cintre en haut, base droite. Une porte est plus haute que
   large — rapport visé, environ deux tiers. Le rembourrage supérieur suit
   l'arrondi pour que le chiffre ne monte pas dans le cintre. */
.porte {
  position: relative; display: flex; overflow: hidden;
  flex-direction: column; align-items: center; justify-content: center;
  aspect-ratio: 2 / 3; min-height: 150px;
  /* Plus de marge à droite qu'à gauche : la poignée y loge sans chevaucher le
     texte. Une vraie porte n'est pas symétrique non plus. */
  padding: 17% 1.15rem .6rem .35rem;
  text-align: center; text-decoration: none; color: var(--texte);
  border: 3px solid var(--filet);
  border-radius: 50% 50% 5px 5px / 34% 34% 5px 5px;
  background: linear-gradient(175deg, rgba(24,52,74,.98), rgba(9,24,38,.98));
}
/* Textes agrandis : le concours se joue d'un âge à l'autre, et ce qui se lit
   mal à cinquante ans ne se lit pas du tout à soixante-dix. */
.porte-num {
  display: block; position: relative; z-index: 3;
  font-weight: 700; font-size: 3rem; line-height: 1;
  color: var(--or-pale); font-variant-numeric: tabular-nums;
}
.porte-etat {
  display: block; position: relative; z-index: 3; margin-top: .3rem;
  font-size: .95rem; letter-spacing: .02em; line-height: 1.2;
  color: rgba(247, 249, 251, .78);
}
.porte-points {
  display: block; position: relative; z-index: 3; margin-top: .1rem;
  font-weight: 700; font-size: 1.4rem; color: #7FD3A5;
}
/* Rainure du panneau, en retrait de la bordure. */
.panneau {
  position: absolute; left: 7px; right: 7px; top: 7px; bottom: 7px; z-index: 1;
  border: 2px solid rgba(233,180,76,.18);
  border-radius: 50% 50% 3px 3px / 32% 32% 3px 3px;
}
/* La poignée est à droite : les gonds sont donc à gauche, et la lumière
   filtre par la droite. */
.poignee {
  position: absolute; right: 13px; top: 74%; z-index: 3;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--or); opacity: .85;
  box-shadow: 0 0 0 2px rgba(11, 27, 43, .6);
}
.marque2 {
  position: absolute; top: 8px; left: 50%; margin-left: -11px; z-index: 4;
  font-weight: 700; font-size: .6rem; color: var(--nuit);
  background: var(--or); padding: 1px 5px; border-radius: 2px;
}
.lueur { position: absolute; right: 0; top: 0; bottom: 0; z-index: 2; width: 0; }

/* --- Les six états. Le mot porte l'information, la couleur la renforce. --- */

.porte-locked { opacity: .4; }

.porte-open {
  border-color: var(--or);
  box-shadow: 0 0 16px -4px rgba(233,180,76,.5);
}
.porte-open .porte-num { color: var(--or); }
.porte-open .lueur {
  width: 26px; border-radius: 0 60% 5px 0 / 0 34% 5px 0;
  background: linear-gradient(270deg, rgba(255,214,130,.9), rgba(233,180,76,.25) 55%, rgba(233,180,76,0));
}

.porte-answered { border-style: dashed; }

.porte-hit { border-color: rgba(127,211,165,.55); }
.porte-hit .lueur {
  width: 11px; border-radius: 0 60% 5px 0 / 0 34% 5px 0;
  background: linear-gradient(270deg, rgba(127,211,165,.75), rgba(127,211,165,0));
}

.porte-miss { border-color: rgba(192,57,43,.55); opacity: .88; }
.porte-miss .lueur {
  width: 11px; border-radius: 0 60% 5px 0 / 0 34% 5px 0;
  background: linear-gradient(270deg, rgba(192,57,43,.8), rgba(192,57,43,0));
}

.porte-gaveup { opacity: .6; border-style: dashed; }
.porte-skipped { opacity: .5; }

/* Une case sans question : la grille de décembre en a 24, le prototype n'en
   remplit que sept. */
.porte-empty {
  opacity: .2; border-style: dashed; background: none; cursor: default;
}
.porte-empty .porte-num { color: var(--texte-bas); }

.prochaine {
  margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px solid var(--filet);
  color: var(--texte-bas); font-size: .92rem;
}
.prochaine span { color: var(--or-pale); font-weight: 700; font-variant-numeric: tabular-nums; }

/* --- Le bilan de fin de parcours, au-dessus de la grille --- */

.bilan {
  margin: 1.4rem 0; padding: 1.3rem var(--gouttiere);
  background: var(--nuit2); border-left: 3px solid var(--sapin);
  border-radius: 0 4px 4px 0;
}
.bilan h2 { color: var(--or); margin-bottom: .5rem; }
.bilan p { margin-bottom: 1rem; }
.bilan p:last-child { margin-bottom: 0; }
/* Rapport et recommencer sont facultatifs : des liens, pas des boutons. */
.bilan-secondaire { font-size: .9rem; color: var(--texte-bas); }
.bilan-secondaire a { color: var(--texte-bas); }
.bilan-secondaire a:hover { color: var(--or-pale); }
.bilan-secondaire .sep { margin: 0 .5rem; opacity: .5; }

.bouton-large { display: block; width: 100%; text-align: center; padding: .95rem 1.5rem; }
.retour-grand { margin-top: 1.6rem; }

/* ---------------------------------------------------------------------------
   Page question
   --------------------------------------------------------------------------- */

.fil { margin-bottom: 1rem; font-size: .9rem; }
.fil a { color: var(--texte-bas); text-decoration: none; }
.fil a:hover { color: var(--or-pale); }

.en-jeu {
  display: flex; align-items: center; flex-wrap: wrap; gap: .6rem;
  margin-bottom: 1.4rem; font-weight: 700; font-size: 1.25rem; color: var(--or);
}
.marque-double {
  font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--nuit); background: var(--or); padding: .18rem .5rem; border-radius: 3px;
}

/* Les images s'empilent, la plus récente en tête. */
.pile { margin-bottom: 1.6rem; }
.cliche { margin-bottom: 1rem; }
.cliche img {
  width: 100%; height: auto; display: block; border-radius: 4px;
  border: 1px solid var(--filet); background: var(--nuit2);
}
.cliche figcaption {
  margin-top: .35rem; font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--texte-bas);
}

/* La révélation demande une confirmation explicite : le repli s'ouvre, il ne
   déclenche rien. Fonctionne sans JavaScript. */
.reveler {
  border: 1px solid var(--filet); border-radius: 4px;
  padding: .9rem 1.1rem; margin-bottom: 1.6rem; background: var(--nuit2);
}
.reveler summary {
  cursor: pointer; font-weight: 600; color: var(--or);
  list-style: none;
}
.reveler summary::-webkit-details-marker { display: none; }
.reveler summary::before { content: "▸ "; }
.reveler[open] summary::before { content: "▾ "; }
.reveler .texte { margin: .8rem 0; font-size: .95rem; }
.bouton-sobre { background: var(--braise); color: var(--neige); }
.bouton-sobre:hover { background: #d8564a; }

.plancher { color: var(--texte-bas); font-style: italic; margin-bottom: 1.4rem; }

/* La sortie élégante. Elle fait face à « Valider ma réponse » : les deux
   closent la question. Confirmée comme une révélation. */
.ligne-actions {
  display: flex; align-items: stretch; gap: .6rem;
}
/* Les deux boutons ferment la question : ils se font face, à égalité de
   largeur et de hauteur. */
.ligne-actions > * { flex: 1 1 0; min-width: 0; }
.ligne-actions .bouton {
  display: flex; align-items: center; justify-content: center;
  padding: .7rem .6rem; font-size: .92rem; text-align: center;
}
.renoncer { margin: 0; }
.renoncer summary {
  display: flex; align-items: center; justify-content: center; height: 100%;
  cursor: pointer; list-style: none; text-align: center;
  padding: .7rem .6rem; border-radius: 4px;
  border: 1px solid var(--filet); background: transparent;
  color: var(--texte-bas); font: 600 .88rem/1.25 var(--sans);
}
.renoncer summary::-webkit-details-marker { display: none; }
.renoncer summary:hover { color: var(--or-pale); border-color: var(--or); }
.renoncer .texte {
  margin: 1rem 0; font-size: .9rem; color: var(--texte-bas); text-align: center;
}
.renoncer form { text-align: center; }
.renoncer[open] {
  flex: 1 1 100%; margin-top: 0;
  padding: 1rem 1.1rem; border: 1px solid var(--filet); border-radius: 4px;
  background: var(--nuit2);
}
.renoncer[open] summary { border: 0; padding: 0 0 .3rem; color: var(--or); height: auto; }
/* Une fois dépliée, la confirmation prend toute la largeur : la ligne se
   réorganise d'elle-même. */
.ligne-actions:has(.renoncer[open]) { flex-wrap: wrap; }

.verdict-mot { font-weight: 700; font-size: 1.15rem; color: var(--neige); }
.verdict-gaveup { border-left-color: var(--texte-bas); }
.titre-film {
  margin-top: .7rem; font-family: var(--serif); font-size: 1.05rem; color: var(--or-pale);
}

.reponse { margin-top: 0; }

.verdict {
  padding: 1rem 1.15rem; border-radius: 0 4px 4px 0; margin-bottom: 1.4rem;
  border-left: 3px solid var(--or); background: var(--nuit2);
}
.verdict-hit { border-left-color: #7FD3A5; background: rgba(31,111,74,.2); }
.verdict-miss { border-left-color: var(--braise); background: rgba(192,57,43,.16); }
.verdict-skipped { border-left-color: var(--texte-bas); }
.verdict .rappel { margin-top: .5rem; font-size: .92rem; color: var(--texte-bas); }

@media (min-width: 30rem) {
  .grille > li { width: 25%; }
}

/* Le décompte. Vingt-quatre heures par porte, ici comme en décembre : il doit
   se lire d'un coup d'œil, c'est une échéance. */
.chrono {
  margin: 0 0 1.5rem; padding: .8rem 1rem;
  background: var(--nuit2); border-left: 3px solid var(--or);
  border-radius: 0 4px 4px 0; text-align: center;
}
.chrono-quoi {
  display: block; font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--texte-bas);
}
.chrono-valeur {
  display: block; margin-top: .15rem;
  font-weight: 700; font-size: 2rem; line-height: 1.1;
  color: var(--or-pale); font-variant-numeric: tabular-nums; letter-spacing: .01em;
}

/* Une case sans question : la grille de décembre a 24 portes, le prototype
   n'en remplit que sept. */
.porte-empty {
  opacity: .18; border-style: dashed; cursor: default; min-height: 6.2rem;
}
.porte-empty .porte-num { color: var(--texte-bas); }

.bilan-seance { margin-top: 1.8rem; }
.bilan-seance .aide { margin: .6rem 0 1rem; }

/* Le recommencement, replié à l'intérieur du bilan. */
.recommencer { margin-top: 1rem; }
.recommencer summary {
  cursor: pointer; list-style: none; color: var(--texte-bas); font-size: .9rem;
}
.recommencer summary::-webkit-details-marker { display: none; }
.recommencer summary::before { content: "▸ "; }
.recommencer[open] summary::before { content: "▾ "; }
.recommencer .aide { margin: .7rem 0; }
.recommencer .formulaire { margin-top: .5rem; }

/* ---------------------------------------------------------------------------
   Classement
   --------------------------------------------------------------------------- */

.groupe { margin-top: 1.8rem; }
.groupe h2 {
  display: flex; align-items: baseline; gap: .6rem;
  padding-bottom: .5rem; margin-bottom: .8rem;
  border-bottom: 1px solid var(--filet);
}
.groupe .effectif {
  font: 400 .8rem/1 var(--sans); color: var(--texte-bas);
  padding: .2rem .5rem; border-radius: 10px; background: var(--nuit2);
}
.groupe-tete h2 { color: var(--or); }
.groupe-peloton h2 { color: var(--or-pale); }
.groupe-retardataires h2 { color: var(--texte-bas); }

.coureurs { list-style: none; }
.coureurs li {
  display: flex; align-items: center; gap: .7rem;
  padding: .45rem 0;
}
.coureurs li.moi {
  font-weight: 700; color: var(--or-pale);
  margin: 0 -.6rem; padding: .45rem .6rem;
  background: rgba(233, 180, 76, .1); border-radius: 4px;
}
.mini-avatar { border-radius: 50%; background: #EEF3F7; flex: none; }

.classement-note { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--filet); }

/* Le classement final : tout est montré, plus rien à cacher. */
.tableau-large { overflow-x: auto; margin-top: 1.4rem; }
.classement-final { width: 100%; border-collapse: collapse; font-size: .92rem; }
.classement-final th {
  text-align: left; padding: .5rem .45rem; white-space: nowrap;
  font-size: .68rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--texte-bas); border-bottom: 1px solid var(--filet);
}
.classement-final td {
  padding: .5rem .45rem; border-bottom: 1px solid rgba(247, 249, 251, .07);
}
.classement-final .n { text-align: right; font-variant-numeric: tabular-nums; }
.classement-final .rang { font-weight: 700; color: var(--or-pale); }
.classement-final .forte { font-weight: 700; color: var(--or-pale); }
.classement-final tr.moi { background: rgba(233, 180, 76, .1); }

/* La sortie de secours, en cours de partie : discrète mais toujours atteignable. */
.recommencer.secours { margin: 1.4rem 0 0; }
.recommencer.secours summary { color: var(--texte-bas); font-size: .88rem; }

/* « L'essentiel » — la page que tout le monde lira, contrairement aux règles. */
.essentiel .regles dt { font-size: 1.15rem; }
.essentiel .renvoi {
  margin-top: 1.8rem; padding: .9rem 1.1rem;
  background: var(--nuit2); border-left: 3px solid var(--or);
  border-radius: 0 4px 4px 0; color: var(--texte-bas);
}
.essentiel .formulaire { margin-top: 1.6rem; }

/* ---------------------------------------------------------------------------
   Administration
   --------------------------------------------------------------------------- */

/* ⚠️ JAMAIS deux rangées d'onglets : la barre défile plutôt que de se replier.
   Le libellé, lui, s'efface quand la place manque — voir plus bas. */
.onglets {
  display: flex; flex-wrap: nowrap; gap: 4px;
  border-bottom: 2px solid var(--filet); margin: 1.4rem 0 1.6rem;
  /* ⚠️ `overflow-x: auto` seul autorise aussi le défilement vertical : une
     barre apparaissait à droite pour deux pixels de trop. */
  overflow-x: auto; overflow-y: hidden; scrollbar-width: thin;
}
.onglets::-webkit-scrollbar { height: 4px; }
.onglets::-webkit-scrollbar-thumb { background: var(--filet); border-radius: 2px; }
.onglets a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: .45rem; }
.onglets svg { width: 20px; height: 20px; flex: 0 0 auto; }

/* Le libellé n'apparaît que si la barre entière tient sur une ligne. Les marges
   se resserrent alors : sans cela, les neuf onglets débordaient de 1 230 px. */
.etiquette { display: none; }
@media (min-width: 80rem) {
  .etiquette { display: inline; font-size: .88rem; letter-spacing: -.01em; }
  .onglets a { padding-left: .5rem; padding-right: .5rem; gap: .3rem; }
  .onglets { gap: 1px; }
}
.onglets a {
  padding: .6rem 1rem; text-decoration: none; color: var(--texte-bas);
  font-weight: 600; border-radius: 5px 5px 0 0; position: relative; top: 2px;
}
.onglets a:hover { color: var(--or-pale); }
.onglets a.actif { color: var(--nuit); background: var(--or); }
.pastille {
  display: inline-block; margin-left: .4rem; padding: .05rem .45rem;
  border-radius: 11px; background: var(--braise); color: #fff;
  font-size: .78rem; font-weight: 700;
}
.onglets a.actif .pastille { background: var(--nuit); color: var(--or); }

.cartes { display: flex; flex-wrap: wrap; margin: 0 0 .6rem -.7rem; }
.carte {
  flex: 1 1 8rem; margin: 0 0 .7rem .7rem; padding: .8rem 1rem;
  background: var(--nuit2); border-radius: 6px; border-left: 3px solid var(--or);
}
.carte.alerte { border-left-color: var(--braise); }
.carte .chiffre {
  display: block; font: 700 1.9rem/1 var(--titre);
  color: var(--or-pale); letter-spacing: -.02em;
}
.carte .quoi { font-size: .82rem; color: var(--texte-bas); }

.admin table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.admin th {
  text-align: left; padding: .55rem .45rem; white-space: nowrap;
  font-size: .7rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--texte-bas); border-bottom: 2px solid var(--filet);
}
.admin td { padding: .6rem .45rem; border-bottom: 1px solid rgba(247,249,251,.08); }
.admin td.n, .admin th.n { text-align: right; font-variant-numeric: tabular-nums; }
.admin tr.moi { background: rgba(233,180,76,.1); }
.barre {
  display: inline-block; width: 110px; height: 9px; vertical-align: middle;
  border-radius: 5px; background: rgba(247,249,251,.12); overflow: hidden;
}
.barre i { display: block; height: 100%; background: var(--or); }
.barre.rouge i { background: var(--braise); }
.ok-txt { color: #7FD3A5; }
.alerte-txt { color: #F08B80; }

/* Un cas d'arbitrage : tout ce qu'il faut pour trancher en trois secondes. */
.cas {
  background: var(--nuit2); border-left: 3px solid var(--or); border-radius: 0 6px 6px 0;
  padding: 1rem 1.2rem; margin-bottom: 1rem;
}
.cas .qui { font-weight: 700; color: var(--or-pale); margin-bottom: .6rem; }
.cas dl { margin-bottom: .9rem; }
.cas dt { color: var(--texte-bas); font-size: .88rem; margin-top: .4rem; }
.cas dd { margin-left: 0; }
.ligne-boutons { display: flex; gap: .6rem; flex-wrap: wrap; }
.bouton-vert { background: #7FD3A5; color: var(--nuit); }
.bouton-rouge { background: var(--braise); color: var(--neige); }

/* Interrupteurs de nomination. */
.sw-forme { display: inline; }
.sw {
  position: relative; display: inline-block; width: 46px; height: 25px;
  background: rgba(247,249,251,.18); border: 0; border-radius: 13px;
  cursor: pointer; vertical-align: middle; padding: 0;
}
.sw i {
  position: absolute; top: 3px; left: 3px; width: 19px; height: 19px;
  border-radius: 50%; background: var(--neige);
}
.sw.on { background: var(--or); }
.sw.on i { left: 24px; background: var(--nuit); }
.sw.fige { opacity: .45; cursor: not-allowed; }

.reglages .champ-case { align-items: flex-start; flex-wrap: wrap; }
.reglages .champ-case .aide { flex: 1 0 100%; margin-left: 1.7rem; }

/* Entrée de menu inerte, avec son explication. */
.tiroir .inerte { display: block; padding: .8rem 0; color: rgba(247,249,251,.3);
  border-bottom: 1px solid rgba(247,249,251,.07); cursor: not-allowed; }
.tiroir .inerte small { display: block; font-size: .72rem; }
@media (min-width: 62rem) {
  .tiroir .inerte { padding: .2rem 0; border: 0; font-size: .92rem; }
  .tiroir .inerte small { display: none; }
}

/* Onglet Messages — les textes à copier vers Signal. */
.message-signal {
  background: var(--nuit2); border-left: 3px solid var(--filet);
  border-radius: 0 6px 6px 0; padding: 1rem 1.2rem; margin-bottom: 1rem;
}
.message-signal.etat-a_envoyer { border-left-color: var(--or); }
.message-signal.etat-envoye { border-left-color: #7FD3A5; opacity: .7; }
.message-signal header {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: .6rem; margin-bottom: .7rem;
}
.message-signal h2 { margin: 0; font-size: 1.1rem; }
.message-signal .etat {
  font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  padding: .15rem .5rem; border-radius: 3px;
  background: rgba(247,249,251,.12); color: var(--texte-bas);
}
.etat-a_envoyer .etat { background: var(--or); color: var(--nuit); }
.etat-envoye .etat { background: rgba(127,211,165,.25); color: #7FD3A5; }
.message-signal .quand { margin-left: auto; font-size: .85rem; color: var(--texte-bas); }
.texte-signal {
  white-space: pre-wrap; word-break: break-word;
  background: var(--nuit); border: 1px solid var(--filet); border-radius: 4px;
  padding: .8rem 1rem; margin-bottom: .9rem;
  font: inherit; color: var(--texte);
}

/* Les messages déjà envoyés, repliés hors de la liste courante. */
.replies { margin-top: 1.6rem; padding-top: 1.2rem; border-top: 1px solid var(--filet); }
.replies summary { cursor: pointer; color: var(--texte-bas); font-weight: 600; }
.replies summary::-webkit-details-marker { display: none; }
.replies summary::before { content: "\25b8  "; }
.replies[open] summary::before { content: "\25be  "; }
.replies > .aide { margin: .6rem 0 1rem; }

/* ---------------------------------------------------------------------------
   Mon parcours — une carte par porte.
   Le tableau a six colonnes ne tenait pas sur un telephone.
   --------------------------------------------------------------------------- */

.carte-porte {
  margin-bottom: 1rem; padding: .9rem 1.1rem; border-radius: 8px;
  background: var(--nuit2); border-left: 5px solid var(--filet);
}
.carte-tete {
  display: flex; align-items: baseline; justify-content: space-between; gap: .8rem;
  padding-bottom: .6rem; margin-bottom: .8rem;
  border-bottom: 1px solid rgba(247, 249, 251, .1);
}
.porte-no { font: 700 1.4rem/1 var(--titre); letter-spacing: -.02em; color: var(--or-pale); }
.porte-no small { font: 400 .78rem/1 var(--sans); color: var(--texte-bas); margin-right: .3rem; }
.carte-verdict { text-align: right; white-space: nowrap; }
.carte-verdict .etat { font-weight: 700; font-size: 1rem; }
.carte-verdict .pts {
  font: 700 1.4rem/1 var(--titre); margin-left: .5rem; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.carte-verdict .unite { color: var(--texte-bas); font-size: .8rem; margin-left: .2rem; }

.carte-corps { display: flex; gap: 1rem; align-items: flex-start; }
.carte-photo { flex: 0 0 200px; display: block; }
.carte-photo img { width: 100%; height: auto; display: block; border-radius: 5px; }
.carte-corps dl { flex: 1 1 auto; min-width: 0; }
.carte-corps .ligne { display: flex; gap: .7rem; margin-bottom: .25rem; }
.carte-corps dt {
  flex: 0 0 6.5rem; color: var(--texte-bas); font-size: .86rem; padding-top: .1rem;
}
.carte-corps dd { flex: 1 1 auto; min-width: 0; margin: 0; }
.carte-corps .vo { color: var(--texte-bas); font-size: .9rem; }
.algo {
  margin-top: .6rem; padding-top: .55rem;
  border-top: 1px dashed rgba(247, 249, 251, .12);
  font-size: .86rem; color: var(--texte-bas);
}

/* Quatre etats. Le filet porte la couleur ; jamais d'aplat, qui ecraserait le
   theme sombre. Le mot reste affiche : la couleur ne porte rien seule. */
.carte-porte.gagne { border-left-color: #7FD3A5; }
.gagne .saisie, .gagne .etat, .gagne .pts { color: #7FD3A5; }
.carte-porte.perdu { border-left-color: var(--braise); }
.perdu .saisie, .perdu .etat, .perdu .pts { color: #F08B80; }
.carte-porte.attente { border-left-color: var(--or); }
.attente .etat { color: var(--or); }
.attente .pts { color: var(--texte-bas); }
.carte-porte.abandon { border-left-color: var(--texte-bas); }
.abandon .etat, .abandon .pts { color: var(--texte-bas); }

.total-parcours {
  display: flex; justify-content: flex-end; align-items: baseline; gap: 1rem;
  margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--filet);
}
.total-parcours .mot { font: 700 1.3rem/1 var(--titre); color: var(--texte-bas); }
.total-parcours .val {
  font: 700 1.9rem/1 var(--titre); color: var(--or); font-variant-numeric: tabular-nums;
}

/* Telephone : la photo passe au-dessus, les libelles se resserrent. */
@media (max-width: 35rem) {
  .carte-corps { display: block; }
  .carte-photo { width: 100%; margin-bottom: .8rem; }
  .carte-corps dt { flex: 0 0 5.4rem; font-size: .8rem; }
}

.droits .chapeau { color: var(--or-pale); }
.purge { margin-top: .8rem; }

.pied a { color: var(--texte-bas); }
.pied a:hover { color: var(--or-pale); }

/* Bannissement. */
.admin tr.banni { opacity: .55; }
.pastille-ban {
  display: inline-block; padding: .1rem .5rem; border-radius: 3px;
  background: rgba(192,57,43,.3); color: #F08B80;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em;
}
.lien-bouton.danger { color: #F08B80; }
.lien-bouton.danger:hover { color: var(--braise); }

/* Saisie du contenu. */
.bloc-saisie {
  background: var(--nuit2); border-radius: 6px; padding: 1.1rem 1.2rem; margin-bottom: 1.4rem;
}
.rangee { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.rangee .champ { flex: 1 1 14rem; }
.rangee .champ-court { flex: 0 0 7rem; }
textarea {
  width: 100%; padding: .7rem .8rem; border-radius: 4px;
  background: var(--nuit); border: 1px solid var(--filet); color: var(--texte);
  font: inherit; resize: vertical;
}
textarea:focus { border-color: var(--or); }
.ligne-porte, .ligne-images { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.ligne-porte select {
  padding: .4rem .5rem; border-radius: 4px; font: inherit;
  background: var(--nuit); border: 1px solid var(--filet); color: var(--texte);
}
/* Défini une seule fois : deux déclarations de la même classe se sont
   côtoyées jusqu'au 25 août, la seconde l'emportant en silence. */
.bouton-mince { padding: .42rem 1rem; font-size: .87rem; }
.case-double { font-size: .85rem; color: var(--texte-bas); white-space: nowrap; }
.depot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 4px; cursor: pointer;
  border: 1px dashed var(--filet); color: var(--texte-bas); font-size: .8rem;
}
.depot.rempli { border-style: solid; border-color: #7FD3A5; color: #7FD3A5; }
.depot input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.lien-discret { margin-left: .8rem; color: var(--texte-bas); font-size: .9rem; }

/* En délibération : la porte est fermée, les points sont acquis, mais le
   verdict attend l'organisateur. Doré comme l'attente, jamais vert. */
.carte-porte.delibere { border-left-color: var(--or); }
.delibere .saisie { color: var(--or-pale); }
.delibere .etat, .delibere .pts { color: var(--or); }
.porte-review { border-color: var(--or); }
.porte-review .porte-etat { color: var(--or); }
.porte-review .porte-points { color: var(--or-pale); }

/* Bandeau de consultation : on ne doit pas confondre le parcours d'un autre
   avec le sien. */
.bandeau-consultation {
  display: flex; align-items: center; gap: .7rem; flex-wrap: wrap;
  margin-bottom: 1.2rem; padding: .7rem 1rem;
  background: var(--nuit2); border-left: 3px solid var(--or);
  border-radius: 0 4px 4px 0; font-size: .92rem;
}
.bandeau-consultation a { margin-left: auto; color: var(--or-pale); }

/* ---------------------------------------------------------------------------
   Le palmarès — la page que quarante personnes regarderont en même temps.
   --------------------------------------------------------------------------- */

.palmares-titre {
  text-align: center; font-size: 2rem;
  font-size: clamp(2rem, 8vw, 2.8rem); letter-spacing: -.03em;
}
.palmares-sous { text-align: center; color: var(--texte-bas); margin-bottom: .3rem; }

/* --- Le vainqueur, seul et centré --- */
.vainqueur {
  position: relative; overflow: hidden;
  margin: 1.6rem 0 0; padding: 1.5rem 1.4rem 1.6rem; text-align: center;
  border-radius: 12px; border: 1px solid var(--filet);
  background: linear-gradient(180deg, rgba(233, 180, 76, .14), var(--nuit2) 70%);
}
.vainqueur .feu { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.vainqueur .titre, .vainqueur .haut, .vainqueur .nom,
.vainqueur .pts, .vainqueur .coupe-note { position: relative; }
.vainqueur .titre {
  font: 700 .78rem/1 var(--sans); letter-spacing: .2em;
  text-transform: uppercase; color: var(--or);
}
.vainqueur .haut {
  display: flex; align-items: center; justify-content: center;
  gap: 1.2rem; margin: .6rem 0 .3rem; flex-wrap: wrap;
}
.vainqueur .coupe { width: 110px; height: auto; cursor: pointer; }
.vainqueur .ava { width: 104px; height: 104px; border-radius: 50%; background: #EEF3F7; }
.vainqueur .nom {
  font: 700 2rem/1.1 var(--titre); font-size: clamp(1.8rem, 8vw, 2.4rem);
  color: var(--or-pale); letter-spacing: -.02em; margin: .3rem 0;
}
.vainqueur .pts { color: var(--texte); }
.vainqueur .coupe-note { margin-top: .4rem; font-size: .92rem; color: var(--texte-bas); }

/* --- Le podium --- */
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 1rem; margin-top: 1.4rem; }
.podium .marche { flex: 0 1 13rem; text-align: center; min-width: 0; }
.podium .med { width: 74px; height: auto; display: block; margin: 0 auto .5rem; }
.podium .marche .ava {
  width: 88px; height: 88px; border-radius: 50%; background: #EEF3F7;
  display: block; margin: 0 auto .5rem;
}
.podium .nom { font: 700 1.2rem/1.2 var(--titre); color: var(--neige); }
.podium .score {
  font: 700 1.8rem/1 var(--titre); color: var(--or-pale); margin-top: .2rem;
  font-variant-numeric: tabular-nums;
}
.podium .detail { font-size: .84rem; color: var(--texte-bas); margin-top: .1rem; }
.podium .bloc {
  margin-top: .7rem; border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, var(--nuit2), rgba(18, 41, 61, .55));
  border: 3px solid var(--filet); border-bottom: 0;
  display: flex; align-items: center; justify-content: center;
  font: 700 2.6rem/1 var(--titre);
}
/* Chaque chiffre porte le métal de sa place. */
.podium .m1 .bloc { height: 150px; color: #E9B44C; border-color: rgba(233, 180, 76, .75); }
.podium .m2 .bloc { height: 112px; color: #C9D2DA; border-color: rgba(201, 210, 218, .55); }
.podium .m3 .bloc { height: 86px;  color: #B08A5A; border-color: rgba(176, 138, 90, .55); }
/* Un socle horizontal ferme le podium et le pose. */
.socle {
  height: 14px; border-radius: 3px; max-width: 44rem; margin: 0 auto;
  border: 3px solid var(--filet); border-top: 0;
  background: linear-gradient(180deg, rgba(233, 180, 76, .5), rgba(233, 180, 76, .18));
}
.egalite {
  margin-top: .9rem; font-size: .86rem; color: var(--texte-bas); text-align: center;
}

/* --- Deux podiums de catégorie, en panneaux distincts --- */
.duo { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.colonne {
  flex: 1 1 18rem; min-width: 0; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--filet); background: var(--nuit2);
}
.colonne h3 {
  font: 700 1rem/1 var(--titre); color: var(--nuit); background: var(--or);
  text-align: center; padding: .6rem 0; margin: 0;
}
.colonne .dedans { padding: 1.1rem .8rem 1.2rem; }
.podium.petit { gap: .5rem; margin-top: .9rem; }
.podium.petit .marche { flex: 1 1 0; }
.podium.petit .med { width: 52px; }
.podium.petit .marche .ava { width: 62px; height: 62px; }
.podium.petit .nom { font-size: 1rem; }
.podium.petit .score { font-size: 1.35rem; }
.podium.petit .bloc { font-size: 1.9rem; }
.podium.petit .m1 .bloc { height: 92px; }
.podium.petit .m2 .bloc { height: 70px; }
.podium.petit .m3 .bloc { height: 54px; }
.colonne .socle { max-width: none; }

.palmares-renvoi { text-align: center; margin-top: 1.8rem; }
.palmares .classement-final .rang { font: 700 1.05rem/1 var(--titre); color: var(--or-pale); }

@media (max-width: 30rem) {
  .podium .marche { flex: 1 1 0; }
  .podium .med { width: 52px; }
  .podium .marche .ava { width: 60px; height: 60px; }
  .podium .nom { font-size: .95rem; }
  .podium .score { font-size: 1.3rem; }
  .podium .detail { display: none; }
  .podium .bloc { font-size: 1.9rem; }
}

/* Remonter en haut. Discret, il ne paraît qu'une fois la page défilée. */
.remonter {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 30;
  width: 3rem; height: 3rem; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--filet); background: var(--nuit2); color: var(--or);
  font: 700 1.5rem/1 var(--sans);
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .7);
}
.remonter:hover { background: var(--or); color: var(--nuit); border-color: var(--or); }
.remonter[hidden] { display: none; }
@media (min-width: 62rem) { .remonter { right: 1.6rem; bottom: 1.6rem; } }

/* Les distinctions du palmarès. */
.distinctions { display: flex; flex-wrap: wrap; margin: 0 0 0 -.8rem; }
.distinction {
  flex: 1 1 14rem; margin: 0 0 .8rem .8rem; padding: .9rem 1.1rem;
  background: var(--nuit2); border-radius: 8px; border-left: 4px solid var(--or);
}
.distinction .quoi { font-size: .84rem; color: var(--texte-bas); }
.distinction .val {
  display: block; margin-top: .15rem;
  font: 700 1.1rem/1.3 var(--titre); color: var(--or-pale);
}

/* Le logo de l'accueil : il remplace le grand favicon. Il tient toute la
   largeur utile sur téléphone et ne dépasse jamais sa taille naturelle. */
.logo-accueil {
  display: block; width: 100%; max-width: 640px; height: auto;
  margin: 0 auto 1.4rem;
}
@media (min-width: 62rem) { .logo-accueil { max-width: 760px; } }

/* Le palmarès des éditions. */
.edition {
  background: var(--nuit2); border-radius: 10px; border-left: 4px solid var(--or);
  padding: 1rem 1.2rem; margin-bottom: 1rem;
}
.edition header { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.edition .annee {
  font: 700 1.9rem/1 var(--titre); color: var(--or); letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.edition .gagnant { display: block; font-size: 1.2rem; color: var(--or-pale); }
.edition .theme { font-size: .88rem; color: var(--texte-bas); }
.edition details { margin-top: .8rem; }
.edition summary { cursor: pointer; color: var(--texte-bas); font-size: .9rem; }
.edition summary::-webkit-details-marker { display: none; }
.edition summary::before { content: "\25b8  "; }
.edition details[open] summary::before { content: "\25be  "; }
.classement-annee { width: 100%; border-collapse: collapse; margin-top: .7rem; }
.classement-annee td { padding: .4rem .5rem; border-bottom: 1px solid rgba(247,249,251,.08); }
.classement-annee td.rang {
  width: 2.2rem; font: 700 1rem/1 var(--titre); color: var(--or-pale);
  font-variant-numeric: tabular-nums;
}
.classement-annee td.n { text-align: right; font-variant-numeric: tabular-nums; }
.classement-annee tr.premier td { color: var(--or-pale); font-weight: 700; }

/* Le podium d'une édition passée : même gabarit qu'au 25 décembre, en plus
   sobre — ni avatar ni détail de départage pour les années anciennes. */
.podium-edition { margin-top: 1rem; }
.podium-edition .podium { margin-top: .6rem; }
.podium-edition .marche .nom { font-size: .95rem; }
/* Le socle doit courir sous TOUTES les marches : à 26 rem il s'arrêtait avant
   la première et la dernière, et le podium semblait posé sur rien. */
.podium-edition .socle { max-width: none; }

/* Une porte fermée sans points affiche un zéro à la place des points gagnés :
   c'est ce qui garde l'alignement d'une porte à l'autre. Rouge si l'on a perdu,
   doré si l'on a renoncé — la couleur dit lequel des deux. */
.porte-zero { color: #F08B80; }
.porte-zero-abandon { color: var(--or); }

/* Onglets de la galerie d'avatars. Les familles se déduisent du préfixe du nom
   de fichier : ajouter une famille ne demande qu'un nommage. */
.familles { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0 .8rem; }
.famille {
  padding: .38rem .8rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--filet); background: transparent;
  color: var(--texte-bas); font: 600 .85rem/1 var(--sans);
}
.famille:hover { color: var(--or-pale); border-color: var(--or); }
.famille.active { background: var(--or); color: var(--nuit); border-color: var(--or); }

/* Écrire à l'organisateur, et le courrier reçu. */
.envoi, .courrier { margin-bottom: .9rem; }
.envoi { background: var(--nuit2); border-radius: 8px; padding: .8rem 1rem; }
.envoi header, .courrier-tete {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .5rem;
}
.motif {
  font-size: .72rem; letter-spacing: .06em; text-transform: uppercase;
  padding: .12rem .5rem; border-radius: 3px; font-weight: 700;
  background: rgba(247, 249, 251, .12); color: var(--texte-bas);
}
.motif-correction  { background: rgba(233, 180, 76, .22); color: var(--or); }
.motif-plainte     { background: rgba(192, 57, 43, .25); color: #F08B80; }
.motif-suggestion  { background: rgba(31, 111, 74, .3); color: #7FD3A5; }
.motif-commentaire { background: rgba(247, 249, 251, .14); color: var(--texte); }
.envoi .quand, .courrier .quand { margin-left: auto; font-size: .85rem; color: var(--texte-bas); }
.envoi .corps, .courrier .corps { white-space: pre-wrap; }
.courrier .sujet { font-size: 1.05rem; }
.courrier-traite { opacity: .6; }
.contexte {
  margin: .6rem 0; padding: .6rem .8rem; border-radius: 5px;
  background: var(--nuit); font-size: .9rem;
}
.contexte dt { color: var(--texte-bas); font-size: .82rem; margin-top: .3rem; }
.contexte dd { margin: 0; }
.mes-envois { margin-top: 1.6rem; }

/* Les petites lignes du contrat : le pastiche ne fonctionne que si la forme
   imite le modèle — petit, italique, discret. */
.petites-lignes {
  display: block; margin-top: 1rem;
  font-size: .8rem; font-style: italic; line-height: 1.45;
  color: rgba(247, 249, 251, .5);
}

/* Les boutons larges de fin de parcours : rentrer, envoyer, recommencer. */
.bouton-bleu { background: #3E7CB1; color: var(--neige); }
.bouton-bleu:hover { background: #4E92CC; }
.bouton-vert-plein { background: #2E8B63; color: var(--neige); }
.bouton-vert-plein:hover { background: #37A576; }
.bilan .formulaire { margin: 0; }
/* Le texte explicatif respire sous son bouton, et le bouton suivant garde sa
   distance : collés, les trois blocs se lisaient comme un seul. */
.bilan .formulaire + .aide { margin: .5rem 0 1.4rem; }
.bilan .bouton-large { margin-bottom: .2rem; }

/* Qui a chargé une page récemment. Le libellé dit « a chargé », pas « en
   ligne » : le web ne sait pas dire quand un navigateur se ferme. */
.presence {
  display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
  margin: 0 0 1rem; padding: .7rem 1rem;
  background: var(--nuit2); border-left: 3px solid #7FD3A5; border-radius: 0 5px 5px 0;
  font-size: .9rem;
}
.presence .quoi { color: var(--texte-bas); }
.present { display: inline-flex; align-items: center; gap: .35rem; }

/* ---------------------------------------------------------------------------
   Taille des textes — trois crans, retenus d'une visite à l'autre.
   Toute la feuille étant en `rem`, agir sur la racine suffit : la mise en page
   suit d'elle-même. Cela ne remplace pas le zoom du navigateur ; c'est un
   confort pour qui ne sait pas s'en servir.
   --------------------------------------------------------------------------- */
html[data-taille="grande"]      { font-size: 112.5%; }
html[data-taille="tres-grande"] { font-size: 125%; }

.tailles {
  display: flex; align-items: center; justify-content: center; gap: .3rem;
  margin: 2rem 0 .4rem; color: var(--texte-bas); font-size: .85rem;
}
.tailles-quoi { margin-right: .3rem; }
.taille {
  width: 2rem; height: 2rem; border-radius: 5px; cursor: pointer;
  border: 1px solid var(--filet); background: transparent; color: var(--texte-bas);
  font-family: var(--titre); line-height: 1;
}
.taille:nth-of-type(1) { font-size: .8rem; }
.taille:nth-of-type(2) { font-size: 1rem; }
.taille:nth-of-type(3) { font-size: 1.25rem; }
.taille:hover { color: var(--or-pale); border-color: var(--or); }
.taille.active { background: var(--or); color: var(--nuit); border-color: var(--or); }

/* L'appui long sur une image du quiz ne déclenche plus « Enregistrer l'image ».
   ⚠️ C'est un CONFORT, pas une protection : la vraie parade reste éditoriale —
   recadrage serré et filigrane nominatif (SPEC 11). */
img[src^="/image/"],
img[src^="/administration/image/"] {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
}
.formulaire select:disabled {
  opacity: .55; cursor: not-allowed;
  background-image: none;                 /* pas de chevron sur un champ inactif */
}
