/* Command Center Matchmaker : application web.
   Un seul élément audacieux, le billet d'engagement (chaque partie) ; le
   reste est sobre : listes réglées, une seule famille d'angles (le chanfrein
   des boutons principaux et du talon du billet). La couleur d'une faction
   est une information : elle n'apparaît qu'à côté d'un joueur. */

@font-face { font-family: "Chakra Petch"; font-weight: 600; font-display: swap; src: url("/statique/polices/chakra-petch-600.woff2") format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-weight: 700; font-display: swap; src: url("/statique/polices/chakra-petch-700.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("/statique/polices/plex-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: italic; font-display: swap; src: url("/statique/polices/plex-400-italique.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600 700; font-display: swap; src: url("/statique/polices/plex-600.woff2") format("woff2"); }

/* Thème du soir (par défaut) : la palette « HUD » de commandcenter.be. */
:root {
  --fond: #0a0e14;
  --papier: #0f1520;
  --encre: #e8eef4;
  --encre-douce: #9bb0c4;
  --trait: #243244;
  --trait-fort: #3d5270;
  --signal: #3fd0ff;
  --signal-texte: #06121a;
  --signal-vif: #3fd0ff;
  --signal-fond: #0e2a38;
  --ambre: #ffb020;
  --ambre-fond: #2a1e07;
  --rouge: #ff8a80;
  --rouge-fond: #3a1714;
  --vert: #3ee08f;
  --vert-fond: #0d2a1d;
  --talon: #15283d;
  --talon-texte: #e8eef4;
  --terran: #5b93ff;
  --protoss: #f2c14e;
  --zerg: #c07bff;
  --halo: drop-shadow(0 0 8px rgb(63 208 255 / 0.55));
  --titres: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --texte: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --chanfrein: polygon(0 0, calc(100% - 0.6rem) 0, 100% 0.6rem, 100% 100%, 0.6rem 100%, 0 calc(100% - 0.6rem));
  color-scheme: dark;
}

/* Thème du jour : papier gris-bleu clair, mêmes accents. */
:root[data-theme="jour"] {
  --fond: #e9eef2;
  --papier: #ffffff;
  --encre: #16233b;
  --encre-douce: #4a5a73;
  --trait: #c9d3dd;
  --trait-fort: #8e9cb0;
  --signal: #076e99;
  --signal-texte: #ffffff;
  --signal-vif: #3fd0ff;
  --signal-fond: #dcf2fb;
  --ambre: #8a5300;
  --ambre-fond: #ffe7b8;
  --rouge: #b3261e;
  --rouge-fond: #fbe1de;
  --vert: #1f6b3a;
  --vert-fond: #ddf1e3;
  --talon: #16233b;
  --talon-texte: #ffffff;
  --terran: #3b6ea5;
  --protoss: #a8841a;
  --zerg: #7b3fa0;
  --halo: none;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--fond);
  background-image:
    radial-gradient(1100px 560px at 8% -8%, rgb(63 208 255 / 0.09), transparent 60%),
    radial-gradient(900px 700px at 105% 35%, rgb(192 123 255 / 0.06), transparent 60%);
  background-attachment: fixed;
  color: var(--encre);
  font: 400 1rem/1.55 var(--texte);
  font-kerning: normal;
}
img, svg { max-width: 100%; }
:root[data-theme="jour"] body { background-image: none; }
a { color: var(--signal); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--signal-vif); outline-offset: 2px; }
.visuellement-cache {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.saut { position: absolute; left: 1rem; top: -4rem; z-index: 50; background: var(--papier); padding: 0.6rem 1rem; }
.saut:focus { top: 1rem; }

/* ----- Typographie --------------------------------------------------------- */
h1, h2, h3, legend, .titre { font-family: var(--titres); font-weight: 600; letter-spacing: 0.005em; line-height: 1.2; }
h1 { font-size: 1.95rem; margin: 0.2rem 0 1rem; overflow-wrap: break-word; text-wrap: balance; }
h2 { font-size: 1.4rem; margin: 2.2rem 0 0.75rem; }
h3 { font-size: 1.15rem; margin: 1.4rem 0 0.4rem; }
p { margin: 0 0 0.8rem; max-width: 68ch; }
small, .petit { font-size: 0.85rem; color: var(--encre-douce); }
.chiffres { font-family: var(--titres); font-variant-numeric: tabular-nums; }
.intro { font-size: 1.1rem; color: var(--encre-douce); max-width: 60ch; }

/* ----- Coque : bandeau en haut et onglets en bas sur téléphone, rail à gauche sur ordinateur ----- */
.coque { min-height: 100vh; }
.bandeau {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 1rem;
  background: var(--fond);
  border-bottom: 1px solid var(--trait);
}
.marque { display: flex; align-items: center; gap: 0.6rem; color: var(--encre); text-decoration: none; font: 700 1.15rem/1 var(--titres); }
.marque svg { width: 2.2rem; height: 2.2rem; flex: none; filter: var(--halo); }
.marque-nom small { display: block; margin-bottom: 0.2rem; font: 700 0.68rem/1 var(--titres); text-transform: uppercase; letter-spacing: 0.18em; color: var(--encre-douce); }
.cloche { margin-left: auto; position: relative; display: inline-flex; padding: 0.4rem; color: var(--encre); border-radius: 4px; }
.cloche svg { width: 1.5rem; height: 1.5rem; flex: none; }
.cloche .libelle { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cloche .compte {
  position: absolute; top: -0.1rem; right: -0.25rem; min-width: 1.2rem; padding: 0 0.3rem;
  background: var(--ambre-fond); color: var(--ambre); border: 1.5px solid var(--ambre);
  font: 700 0.75rem/1.1rem var(--titres); text-align: center; border-radius: 0.6rem;
}
.navigation {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--papier); border-top: 1px solid var(--trait);
  padding-bottom: env(safe-area-inset-bottom);
}
.navigation a {
  display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
  padding: 0.5rem 0.2rem 0.45rem; color: var(--encre-douce); text-decoration: none;
  font: 600 0.72rem/1.1 var(--titres);
}
.navigation a svg { width: 1.45rem; height: 1.45rem; }
.navigation a[aria-current="page"] { color: var(--encre); box-shadow: inset 0 3px 0 var(--ambre); }
.navigation .large { display: none; }
.compte-actif { display: none; }
main { max-width: 46rem; margin: 0 auto; padding: 1.2rem 1rem 6.5rem; }

@media (min-width: 60rem) {
  .coque { display: grid; grid-template-columns: 15.5rem minmax(0, 1fr); }
  .bandeau {
    position: sticky; top: 0; align-self: start; max-height: 100vh; overflow-y: auto;
    flex-direction: column; align-items: stretch; gap: 1.2rem;
    padding: 1.4rem 1rem; border-bottom: 0;
  }
  .navigation {
    position: static; display: flex; flex-direction: column; gap: 0.15rem;
    background: transparent; border: 0; padding: 0;
  }
  .navigation a, .cloche {
    display: flex; flex-direction: row; align-items: center; gap: 0.7rem; padding: 0.6rem 0.7rem;
    font: 600 1rem/1.1 var(--titres); color: var(--encre-douce); text-decoration: none; border-radius: 4px;
  }
  .navigation a:hover, .cloche:hover, .theme:hover { color: var(--signal); background: color-mix(in srgb, var(--signal) 12%, transparent); }
  .navigation a[aria-current="page"], .cloche[aria-current="page"] { color: var(--encre); background: var(--papier); box-shadow: inset 3px 0 0 var(--ambre); }
  .navigation .large { display: flex; }
  .cloche { margin: -1.05rem 0 0; }
  .cloche svg { width: 1.45rem; height: 1.45rem; }
  .cloche .libelle { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .cloche .compte { position: static; margin-left: auto; }
  .compte-actif { display: block; margin: 0; padding: 0 0.7rem; font-size: 0.85rem; color: var(--encre-douce); overflow-wrap: anywhere; }
  main { padding: 2.2rem 2rem 4rem; margin: 0; max-width: 52rem; min-height: 100vh; border-left: 1px solid var(--trait); }
}

.essai {
  margin: 0; max-width: none; padding: 0.35rem 1rem; text-align: center; font-size: 0.82rem;
  background: var(--ambre-fond); color: var(--ambre); border-bottom: 1px solid var(--ambre);
}

/* ----- Boutons --------------------------------------------------------------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0.55rem 1.1rem;
  font: 600 1rem/1.2 var(--titres); letter-spacing: 0.01em;
  color: var(--encre); background: transparent;
  border: 2px solid var(--encre); border-radius: 4px; cursor: pointer; text-decoration: none;
}
.bouton:hover { background: color-mix(in srgb, currentColor 14%, transparent); }
.bouton-principal { background: var(--signal); color: var(--signal-texte); border-color: var(--signal); border-radius: 0; clip-path: var(--chanfrein); padding-inline: 1.4rem; }
.bouton-principal:hover { background: var(--encre); border-color: var(--encre); color: var(--fond); }
.bouton-danger:hover { background: var(--rouge-fond); }
.bouton-principal:focus-visible { clip-path: none; }
.bouton-danger { color: var(--rouge); border-color: var(--rouge); }
.bouton-discret { border-color: transparent; padding-inline: 0.4rem; text-decoration: underline; text-underline-offset: 0.2em; }
.bouton-discret:hover { background: transparent; text-decoration-thickness: 2px; }
.bouton[disabled] { opacity: 0.5; cursor: not-allowed; }
.bouton-large { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin: 0.8rem 0 0; }
.actions form { margin: 0; }
form.en-ligne { display: inline; }

/* ----- Messages (retours d'action et messages du bot) ---------------------------- */
.flash, .msg {
  margin: 0 0 1.2rem; padding: 0.85rem 1rem; background: var(--papier);
  border-left: 4px solid var(--signal); border-radius: 0 4px 4px 0;
}
.flash p:last-child, .msg p:last-child { margin-bottom: 0; }
.flash-ok, .msg-ok { border-left-color: var(--vert); }
.flash-erreur, .msg-erreur { border-left-color: var(--rouge); background: var(--rouge-fond); }
.msg-attente { border-left-color: var(--ambre); }
.msg-fini { border-left-color: var(--trait-fort); }
.msg h3 { margin-top: 0; }
.msg blockquote, .fil blockquote { margin: 0.4rem 0; padding-left: 0.8rem; border-left: 3px solid var(--trait); color: var(--encre-douce); }
.msg ul { padding-left: 1.2rem; margin: 0.3rem 0 0.8rem; }
.msg hr { border: 0; border-top: 1px solid var(--trait); margin: 0.8rem 0; }

/* ----- Joueur : bande de faction ------------------------------------------------------ */
.commandant { display: inline-flex; flex-direction: column; padding-left: 0.6rem; border-left: 4px solid var(--trait-fort); line-height: 1.25; }
.commandant b { font: 600 1.05rem/1.25 var(--titres); overflow-wrap: break-word; }
.commandant small { font-size: 0.82rem; }
.f-terran { border-left-color: var(--terran); }
.f-protoss { border-left-color: var(--protoss); }
.f-zerg { border-left-color: var(--zerg); }

/* ----- Billet d'engagement ---------------------------------------------------------------- */
.billet {
  --encoche: 0.7rem;
  --l: 7.2rem;
  display: grid; grid-template-columns: var(--l) minmax(0, 1fr);
  margin: 0 0 1.4rem; background: var(--papier); color: var(--encre); text-decoration: none;
  -webkit-mask: radial-gradient(circle var(--encoche) at var(--l) 0, #0000 98%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle var(--encoche) at var(--l) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle var(--encoche) at var(--l) 0, #0000 98%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle var(--encoche) at var(--l) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
}
.billet-talon {
  display: flex; flex-direction: column; justify-content: center; gap: 0.1rem;
  padding: 1rem 0.9rem; background: var(--talon); color: var(--talon-texte);
  border-right: 2px dashed color-mix(in srgb, var(--talon-texte) 35%, transparent);
}
.billet-jour { font: 600 0.95rem/1.1 var(--titres); opacity: 0.85; }
.billet-heure { font: 700 2.35rem/1 var(--titres); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.billet-categorie { margin-top: 0.45rem; font: 600 0.78rem/1.2 var(--titres); color: var(--signal-vif); }
.billet-categorie.c-classee { color: #ffb020; }
.billet { outline: 1px solid var(--trait); outline-offset: -1px; }
.billet-categorie.c-tournoi { color: #ffd76a; }
.billet-corps { display: grid; gap: 0.7rem; padding: 1rem 1.1rem 1rem 1.3rem; min-width: 0; }
.billet-lieu b { display: block; font: 600 1.15rem/1.25 var(--titres); }
.billet-camps { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 0.6rem; }
.billet-camps .contre { font: 600 0.85rem/1 var(--titres); color: var(--encre-douce); }
.billet-statut { font-size: 0.85rem; color: var(--encre-douce); }
.billet-statut.attente { color: var(--ambre); font-weight: 700; }
a.billet:hover .billet-lieu b { text-decoration: underline; }
@media (max-width: 26rem) {
  .billet { --l: 6.3rem; }
  .billet-talon { padding: 1rem 0.7rem; }
  .billet-heure { font-size: 1.85rem; }
  .billet-camps { grid-template-columns: 1fr; }
  .billet-camps .contre { padding-left: 0.7rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .billet.arrive { animation: arrive 420ms cubic-bezier(.2, .8, .2, 1) both; }
  @keyframes arrive { from { opacity: 0; transform: translateY(8px); } }
}

/* ----- Listes réglées -------------------------------------------------------------------------- */
.liste { list-style: none; margin: 0 0 1rem; padding: 0; border-top: 1px solid var(--trait); }
.liste > li { padding: 0.95rem 0; border-bottom: 1px solid var(--trait); }
.ligne { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.4rem 1rem; align-items: start; }
.ligne .quand { font: 600 1.05rem/1.3 var(--titres); }
.ligne .details { color: var(--encre-douce); font-size: 0.92rem; }
.ligne .actions { margin-top: 0; justify-content: flex-end; }
@media (max-width: 34rem) { .ligne { grid-template-columns: 1fr; } .ligne .actions { justify-content: flex-start; } }
.vide { padding: 1.2rem 0; color: var(--encre-douce); }
.etiquette { display: inline-block; font: 600 0.78rem/1.4 var(--titres); padding: 0 0.45rem; border: 1.5px solid currentColor; border-radius: 3px; margin-right: 0.3rem; }
.etiquette.classee { color: var(--ambre); }
.etiquette.tournoi { color: var(--protoss); }
.etiquette.amicale { color: var(--signal); }
.etiquette.attente { color: var(--ambre); }

/* ----- Formulaires ------------------------------------------------------------------------------- */
form { margin: 0 0 1rem; }
fieldset { border: 0; padding: 0; margin: 0 0 1.6rem; min-width: 0; }
legend { font-size: 1.15rem; margin-bottom: 0.25rem; padding: 0; }
.aide { display: block; font-size: 0.88rem; color: var(--encre-douce); margin: 0 0 0.6rem; }
label { display: block; }
.champ { margin-bottom: 1rem; }
.champ > span { display: block; font-weight: 700; margin-bottom: 0.3rem; }
.champ > .aide { font-weight: 400; }
input[type="text"], input[type="email"], input[type="time"], input[type="search"], select, textarea {
  width: 100%; max-width: 32rem; padding: 0.65rem 0.75rem; font: inherit; color: var(--encre);
  background: var(--papier); border: 1.5px solid var(--trait-fort); border-radius: 4px;
}
textarea { min-height: 6rem; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--signal); }
.choix { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 0.5rem; }
.choix.etroit { grid-template-columns: repeat(auto-fill, minmax(min(100%, 11.5rem), 1fr)); }
.option {
  position: relative; display: flex; gap: 0.6rem; align-items: flex-start;
  padding: 0.7rem 0.8rem; background: var(--papier); border: 1.5px solid var(--trait); border-radius: 4px; cursor: pointer;
}
.option input { margin: 0.2rem 0 0; accent-color: var(--signal); flex: none; width: 1.1rem; height: 1.1rem; }
.option b { display: block; font: 600 1rem/1.25 var(--titres); overflow-wrap: break-word; hyphens: manual; }
.option > span { min-width: 0; }
.option small { display: block; margin-top: 0.15rem; }
.option:has(input:checked) { border-color: var(--signal); background: var(--signal-fond); }
.option:has(input:focus-visible) { outline: 3px solid var(--signal-vif); outline-offset: 2px; }
.option.f-terran, .option.f-protoss, .option.f-zerg { border-left-width: 5px; }

/* Jours et heures : chaque jour coché fait apparaître son heure. */
.jours { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.4rem; }
.jour {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 0.6rem;
  background: var(--papier); border: 1.5px solid var(--trait); border-radius: 4px; padding: 0.55rem 0.7rem;
}
.jour label { display: flex; align-items: baseline; gap: 0.5rem; cursor: pointer; }
.jour input[type="checkbox"] { accent-color: var(--signal); width: 1.05rem; height: 1.05rem; flex: none; }
.jour .date { font: 600 1rem/1.2 var(--titres); }
.jour .date small { font: inherit; color: var(--encre-douce); }
.jour .heure { display: none; grid-column: 2; grid-row: 1 / span 2; }
.jour .heure input { width: 7.2rem; padding: 0.4rem 0.5rem; }
.jour .indice { grid-column: 1; display: block; font-size: 0.8rem; color: var(--encre); margin: 0.15rem 0 0 1.55rem; }
.jour .indice.ferme { color: var(--encre-douce); }
.jour:has(input[type="checkbox"]:checked) { border-color: var(--signal); background: var(--signal-fond); }
.jour:has(input[type="checkbox"]:checked) .heure { display: block; }
.jour:has(input[type="checkbox"]:disabled) { opacity: 0.55; }
.jour.semaine-nouvelle { margin-top: 0.7rem; }
/* Assez de place : un calendrier, une semaine par ligne (lundi à dimanche). */
@media (min-width: 44rem) {
  .jours { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.4rem; }
  .jour { display: block; padding: 0.5rem 0.55rem 0.6rem; }
  .jour .date small { display: block; font-size: 0.82rem; }
  .jour .date { font-size: 1.15rem; }
  .jour .heure { margin-top: 0.45rem; }
  .jour .heure input { width: 100%; padding: 0.35rem 0.3rem; }
  .jour .heure input::-webkit-calendar-picker-indicator { display: none; }
  .jour .indice { margin: 0.3rem 0 0; }
  .jour.semaine-nouvelle { margin-top: 0; }
  .jour.j2 { grid-column-start: 2; } .jour.j3 { grid-column-start: 3; } .jour.j4 { grid-column-start: 4; }
  .jour.j5 { grid-column-start: 5; } .jour.j6 { grid-column-start: 6; } .jour.j7 { grid-column-start: 7; }
}

/* Disponibilités habituelles : tableau des jours et moments. */
.dispos { border-collapse: collapse; width: 100%; max-width: 32rem; }
.dispos th { font: 600 0.85rem/1.2 var(--titres); padding: 0.3rem; text-align: center; color: var(--encre-douce); }
.dispos th[scope="row"] { text-align: left; }
.dispos td { padding: 0.2rem; text-align: center; }
.dispos label { display: grid; place-items: center; height: 2.4rem; border: 1.5px solid var(--trait); border-radius: 4px; background: var(--papier); cursor: pointer; }
.dispos input { width: 1.1rem; height: 1.1rem; accent-color: var(--signal); }
.dispos label:has(input:checked) { background: var(--signal-fond); border-color: var(--signal); }

/* Accueil guidé : une étape à la fois quand le script est là. */
.progression { font: 600 0.9rem/1 var(--titres); color: var(--encre-douce); margin: 0 0 1rem; }
.progression .barre { display: block; height: 4px; margin-top: 0.5rem; background: var(--trait); }
.progression .barre i { display: block; height: 100%; width: 0; background: var(--signal); transition: width 200ms; }
.js [data-etapes] .etape:not(.courante) { display: none; }

/* ----- Discussion d'une partie -------------------------------------------------------------------------- */
.fil { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.6rem; }
.bulle { max-width: 85%; padding: 0.55rem 0.8rem; border-radius: 4px; background: var(--papier); border: 1px solid var(--trait); }
.bulle .auteur { display: block; font: 600 0.82rem/1.3 var(--titres); color: var(--encre-douce); }
.bulle.moi { justify-self: end; background: var(--signal-fond); border-color: var(--signal); }
.bulle.bot { max-width: 100%; justify-self: stretch; background: transparent; border-style: dashed; font-size: 0.92rem; }
.bulle.bot h3 { margin: 0.2rem 0 0.3rem; font-size: 1rem; }
.bulle :target, .bulle:target { scroll-margin-top: 5rem; }
.bulle p { margin-bottom: 0.3rem; }

/* ----- Accueil public ---------------------------------------------------------------------------------- */
.une { margin: 0.5rem 0 2rem; }
.une h1 { font-size: clamp(2rem, 6vw, 3rem); line-height: 1.05; max-width: 16ch; }
.tableau { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--encre); }
.tableau li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1rem; padding: 0.8rem 0; border-bottom: 1px solid var(--trait); align-items: baseline; }
.tableau .heure { font: 700 1.6rem/1 var(--titres); font-variant-numeric: tabular-nums; }
.tableau .heure small { display: block; font: 600 0.82rem/1.3 var(--titres); color: var(--encre-douce); }
.etapes { counter-reset: etape; list-style: none; padding: 0; display: grid; gap: 1rem; }
.etapes li { counter-increment: etape; display: grid; grid-template-columns: 2.4rem 1fr; gap: 0.8rem; }
.etapes li::before { content: counter(etape); font: 700 1.6rem/1.2 var(--titres); color: var(--signal); }

/* ----- Classement ---------------------------------------------------------------------------------------- */
.rangs { width: 100%; border-collapse: collapse; margin-bottom: 1.4rem; }
.rangs th { text-align: left; font: 600 0.85rem/1.2 var(--titres); color: var(--encre-douce); padding: 0.4rem 0.5rem; border-bottom: 2px solid var(--encre); }
.rangs td { padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--trait); vertical-align: middle; }
.rangs td.n { font: 700 1.1rem/1 var(--titres); font-variant-numeric: tabular-nums; width: 2.5rem; }
.rangs td.elo { font: 700 1.15rem/1 var(--titres); font-variant-numeric: tabular-nums; text-align: right; }
.rangs tr.moi td { background: var(--signal-fond); }
.onglets-page { display: flex; gap: 0.4rem; flex-wrap: wrap; margin: 0 0 1.2rem; }
.onglets-page a { padding: 0.4rem 0.8rem; border: 1.5px solid var(--trait-fort); border-radius: 4px; text-decoration: none; color: var(--encre); font: 600 0.95rem/1.2 var(--titres); }
.onglets-page a[aria-current] { background: var(--encre); color: var(--fond); border-color: var(--encre); }

/* ----- Visite guidée ------------------------------------------------------------------------------------- */
.visite-bulle {
  position: absolute; z-index: 40; max-width: 19rem; padding: 0.9rem 1rem;
  background: var(--talon); color: var(--talon-texte); border-radius: 4px;
  border: 1px solid color-mix(in srgb, var(--talon-texte) 30%, transparent);
}
.visite-bulle p { margin: 0 0 0.6rem; }
.visite-bulle .bouton { color: var(--talon-texte); border-color: var(--talon-texte); min-height: 2.3rem; padding: 0.3rem 0.8rem; }
.visite-bulle .bouton:hover { background: rgb(255 255 255 / 0.16); }
.visite-cible { outline: 3px solid var(--signal-vif) !important; outline-offset: 4px; border-radius: 4px; }

@media print {
  .bandeau, .navigation, .actions, .essai { display: none !important; }
  main { padding: 0; }
}

/* ----- Pages sans navigation (visiteurs, connexion, lien avec Discord, erreurs) ---------------- */
.simple main { margin: 0 auto; padding-bottom: 3rem; }
.simple .cloche { font: 600 1rem/1.1 var(--titres); text-decoration: none; padding: 0.5rem 0.2rem; }
@media (min-width: 60rem) {
  .simple .coque { display: block; }
  .simple .bandeau {
    position: static; max-height: none; flex-direction: row; align-items: center;
    max-width: 52rem; margin: 0 auto; padding: 1rem 2rem; border-bottom: 0;
  }
  .simple .cloche { margin: 0; padding: 0.5rem 0.2rem; }
  .simple .cloche:hover { background: transparent; text-decoration: underline; }
  .simple main { border-left: 0; min-height: 0; padding-top: 1.4rem; }
}

/* ----- Annonces, défis, parties ------------------------------------------------------ */
.ligne blockquote { margin: 0.45rem 0 0; padding-left: 0.7rem; border-left: 3px solid var(--trait); color: var(--encre-douce); font-style: italic; max-width: 60ch; }
.ligne .actions select { width: auto; max-width: 15rem; padding: 0.5rem 0.6rem; }
.adversaire { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; margin: 0 0 1.6rem; padding: 0.9rem 1rem; background: var(--papier); border-radius: 4px; }
.adversaire .details { margin: 0; color: var(--encre-douce); }
.recherche-joueur { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: flex-end; }
.recherche-joueur .champ { flex: 1 1 14rem; margin: 0; }
.etiquette.victoire { color: var(--vert); }
.etiquette.defaite { color: var(--rouge); }
.resultat { margin: 0 0 1.6rem; padding: 1rem 1.1rem 0.4rem; background: var(--papier); border-top: 3px solid var(--ambre); }
.resultat h2 { margin-top: 0; }
.resume-resultat { font: 600 1.1rem/1.35 var(--titres); }
.envoi textarea { min-height: 4.5rem; }

/* ----- Les trois cotes du joueur ------------------------------------------------------ */
.cotes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0 0 0.6rem; border-top: 2px solid var(--encre); }
.cotes div { padding: 0.7rem 0.8rem 0.6rem 0; border-bottom: 1px solid var(--trait); }
.cotes div + div { padding-left: 0.8rem; border-left: 1px solid var(--trait); }
.cotes dt { font: 600 0.82rem/1.2 var(--titres); color: var(--encre-douce); }
.cotes dd { margin: 0.2rem 0 0; }
.cotes dd b { display: block; font-size: 1.7rem; line-height: 1.1; font-weight: 700; }
.cotes dd small { display: block; }

/* ----- Thème du soir / thème du jour --------------------------------------------------- */
.theme {
  display: none; align-items: center; gap: 0.7rem; padding: 0.4rem; border: 0; border-radius: 4px;
  background: transparent; color: var(--encre-douce); cursor: pointer; font: 600 1rem/1.1 var(--titres);
}
.js .theme { display: inline-flex; }
.theme svg { width: 1.45rem; height: 1.45rem; flex: none; }
.theme .libelle { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:root:not([data-theme="jour"]) .theme .vers-soir, :root[data-theme="jour"] .theme .vers-jour { display: none; }
.bandeau .theme { margin-left: auto; order: 2; }
.bandeau .cloche { margin-left: 0.15rem; order: 3; }
@media (min-width: 60rem) {
  .bandeau .theme { margin: -1.05rem 0 0; order: 0; padding: 0.6rem 0.7rem; width: 100%; }
  .bandeau .cloche { margin-left: 0; order: 0; }
  .theme .libelle { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .compte-actif { order: 1; }
  .simple .bandeau .theme { margin: 0 0 0 auto; width: auto; }
  .simple .theme .libelle { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* ----- Pied de page : langue --------------------------------------------------------- */
.pied { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--trait); }
.langues { display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; }
.langues a { color: var(--encre-douce); font: 600 0.9rem/1.6 var(--titres); text-decoration: none; }
.langues a:hover { color: var(--signal); }
.langues a[aria-current] { color: var(--encre); box-shadow: inset 0 -2px 0 var(--ambre); }

/* ----- Message d'une action : bouton pour le fermer ------------------------------------ */
.flash { position: relative; padding-right: 2.8rem; }
.flash .fermer {
  display: none; position: absolute; top: 0.45rem; right: 0.45rem; width: 2rem; height: 2rem;
  border: 0; border-radius: 4px; background: transparent; color: var(--encre-douce); font: 600 1.35rem/1 var(--titres); cursor: pointer;
}
.js .flash .fermer { display: block; }
.flash .fermer:hover { color: var(--encre); background: color-mix(in srgb, currentColor 14%, transparent); }

/* ----- Tableau de bord : à faire ------------------------------------------------------- */
.a-faire h2 { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.4rem; }
.a-faire .nombre {
  min-width: 1.6rem; padding: 0 0.45rem; border-radius: 0.8rem; text-align: center;
  background: var(--ambre); color: var(--fond); font: 700 0.95rem/1.6rem var(--titres);
}
.a-faire .liste { border-top-color: var(--ambre); }

/* ----- Notifications : une ligne chacune, le message complet à déplier ----------------- */
.titre-actions { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; }
.titre-actions form { margin: 0; }
.notifs { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--encre); }
.notif { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.6rem; padding: 0.8rem 0 0.8rem 0.9rem; border-bottom: 1px solid var(--trait); border-left: 3px solid transparent; }
.notif.ton-ok { border-left-color: var(--vert); }
.notif.ton-erreur { border-left-color: var(--rouge); }
.notif.ton-attente { border-left-color: var(--ambre); }
.notif.ton-fini { border-left-color: var(--trait-fort); }
.notif-titre { margin: 0; font: 600 1.02rem/1.3 var(--titres); }
.notif.non-lue .notif-titre::before { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; margin: 0 0.45rem 0.12rem 0; border-radius: 50%; background: var(--signal); box-shadow: 0 0 6px var(--signal); }
.extrait { margin: 0.15rem 0 0; color: var(--encre-douce); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notif-pied { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; margin: 0.35rem 0 0; font-size: 0.85rem; color: var(--encre-douce); }
.notif-pied a { font-weight: 600; }
.notif details { margin-top: 0.3rem; font-size: 0.88rem; }
.notif summary { cursor: pointer; color: var(--encre-douce); width: fit-content; }
.notif-complet { margin-top: 0.4rem; padding: 0.6rem 0.8rem; background: var(--papier); border-radius: 4px; }
.notif-complet p:last-child { margin-bottom: 0; }
.notif form { margin: 0; }
.notif .effacer {
  width: 2rem; height: 2rem; border: 0; border-radius: 4px; background: transparent; cursor: pointer;
  color: var(--encre-douce); font: 600 1.3rem/1 var(--titres);
}
.notif .effacer:hover { color: var(--rouge); background: var(--rouge-fond); }

/* ----- Confirmation dans la page (aussi dans Discord, où les fenêtres du navigateur sont bloquées) */
dialog.confirmation {
  max-width: min(28rem, calc(100vw - 2rem)); padding: 1.2rem 1.3rem; border: 1px solid var(--trait-fort);
  border-left: 4px solid var(--ambre); border-radius: 0 4px 4px 0; background: var(--papier); color: var(--encre);
}
dialog.confirmation::backdrop { background: rgb(6 10 16 / 0.7); }
dialog.confirmation p { margin: 0 0 0.4rem; font-size: 1.05rem; }

/* ----- Matchmaker App dans Discord (activité) ---------------------------------------------------- */
.activite main { padding-top: 0.5rem; }
.activite .attente { margin: 3rem 0; text-align: center; color: var(--encre-douce); font: 600 1.05rem/1.4 var(--titres); }
@media (prefers-reduced-motion: no-preference) {
  .activite .attente { animation: veille 1.6s ease-in-out infinite; }
  @keyframes veille { 50% { opacity: 0.45; } }
}
.activite-lien { margin: 1.5rem 0; padding: 1.2rem 1.3rem; background: var(--papier); border-left: 4px solid var(--signal); border-radius: 0 4px 4px 0; }
.activite-lien h1 { margin-top: 0; }
.activite-lien .petit { margin: 1rem 0 0; color: var(--encre-douce); font-size: 0.9rem; }
