/* ================= Signature : thème parchemin, encre et sang =================
   Règles : aucune ombre, ni portée ni sur le texte (box-shadow ne sert qu'à tracer un liseré, inset ou sans décalage),
   aucun flou, aucun arrondi (seule exception : les bulles de la messagerie). */

/* ---------- polices, servies par le site (alphabet latin, accents compris ; licences : fonts/LICENCES.txt) ---------- */
@font-face { font-family: "Yellowtail"; font-weight: 400; font-display: swap; src: url("../fonts/yellowtail-400-cmxc5at.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-weight: 500 700; font-display: swap; src: url("../fonts/playfair-display-500-700-XKXZKVG.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-style: italic; font-weight: 500; font-display: swap; src: url("../fonts/playfair-display-italique-500-OQVCl69.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("../fonts/barlow-400-l053MFU.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url("../fonts/barlow-500-VMkGyYA.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("../fonts/barlow-600-fSS6XKm.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-display: swap; src: url("../fonts/barlow-700-7Gl9FFm.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 800; font-display: swap; src: url("../fonts/barlow-800-qGwOy0V.woff2") format("woff2"); }

:root {
    --paper: #e9dab7;
    --blood-bright: #c0142b;
    --blood: #7d1220;                                  /* sang séché : l'encre rouge du traité */
    --ink: #0d0a09;
    --cream: #f6efe1;
    --muted: #8d8073;
    --line: rgba(255, 255, 255, .1);
    --trait: 1px solid rgba(255, 255, 255, .07);       /* liseré clair des cadres */
    --bord-rouge: 1px solid #a31123;                   /* bordure des boutons */
    --fond-barre: linear-gradient(#100c0b, #1a1413);   /* barre de navigation et carte du logo */
    --nav-h: 74px;
    /* l'unité des grands écrans : 1 px jusqu'à 1920 px de large, puis proportionnelle à la largeur (1,6 px au plus).
       Les cases s'y mesurent, les polices gardent leur taille ; sous la largeur d'une case, elle prend toute la place. */
    --g: clamp(1px, .0521vw, 1.6px);
    /* le menu du compte et la fiche de profil, réduits de 25 % */
    --u: calc(.75 * var(--g));
    /* la feuille du traité (connexion, inscription, mot de passe oublié, création de table) */
    --feuille: calc(470 * var(--g));
    /* le parchemin du traité et des pages de livre, et son grain (bruit SVG, sans flou) */
    --parchemin: radial-gradient(120% 80% at 18% 0%, rgba(255, 252, 242, .55), transparent 58%), radial-gradient(90% 70% at 88% 100%, rgba(146, 116, 74, .22), transparent 60%), linear-gradient(158deg, #f0e5c9, #e4d6b2 52%, #d9c9a2);
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
    --serif: "Playfair Display", Georgia, serif;
    --sans: "Barlow", system-ui, sans-serif;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--cream); font-family: var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
section[id] { scroll-margin-top: calc(var(--nav-h) + 16px); }
:focus-visible { outline: 2px solid #e0364b; outline-offset: 3px; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
/* lien d'évitement : visible seulement au clavier */
.evitement { position: absolute; z-index: 60; left: 16px; top: -60px; padding: 10px 16px; background: var(--blood-bright); color: #fff; font-weight: 600; }
.evitement:focus { top: 12px; }

/* ---------- barre de navigation ---------- */
.nav { position: sticky; top: 0; z-index: 50; height: var(--nav-h); display: flex; align-items: center; gap: 8px; padding: 0 28px; background: var(--fond-barre); border-bottom: var(--trait); }
.brand { flex: none; display: flex; align-items: center; margin-left: 4px; }
/* le S du logo dans son cadre : un seul filet d'or */
.brand-cadre { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid rgba(232, 176, 106, .4); transition: border-color .2s; }
.brand-cadre img { width: auto; height: 34px; }
.brand:hover .brand-cadre, .brand:focus-visible .brand-cadre { border-color: rgba(232, 176, 106, .85); }
/* le S du logo, en tête des parchemins et sur les couvertures de livres */
.sceau { display: block; width: auto; height: 76px; margin: 4px auto 18px; }

.links { display: flex; align-items: center; font: 500 14px var(--serif); letter-spacing: .2em; text-transform: uppercase; color: #ded4c6; }
.links a { position: relative; padding: 10px 16px; transition: color .25s, background .25s; }
.links a:hover, .links a:focus-visible { color: #fff; background: rgba(192, 20, 43, .14); }
/* le point qui sépare deux liens */
.links a + a::before { content: ""; position: absolute; left: -1.5px; top: 50%; width: 3px; height: 3px; background: #6c5f55; }
/* la page en cours : texte blanc souligné de sang (ombre nette, sans flou) */
.links a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px var(--blood-bright); }

/* les icônes (Reicon, templates/_icone.html.twig) : la couleur du texte, la taille réglée par chaque bouton */
.icone { flex: none; display: inline-block; vertical-align: middle; }

/* bouton du menu des petits écrans : l'icône du menu, puis celle de la fermeture une fois ouvert */
.burger { display: none; position: relative; width: 42px; height: 42px; padding: 0; border: var(--bord-rouge); background: transparent; color: var(--cream); cursor: pointer; }
.burger svg { width: 22px; height: 22px; }
.burger .refermer, .burger[aria-expanded="true"] .ouvrir { display: none; }
.burger[aria-expanded="true"] .refermer { display: inline-block; }

.nav-right { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.nav-right form { margin: 0; }


.login, .voir-plus { height: 42px; padding: 0 24px; display: inline-flex; align-items: center; white-space: nowrap; border: var(--bord-rouge); background: transparent; color: var(--cream); font: 600 14px/1 var(--sans); cursor: pointer; transition: background .25s; }
.login:hover, .login:focus-visible, .voir-plus:hover, .voir-plus:focus-visible { background: rgba(163, 17, 35, .22); }
.login:active, .voir-plus:active { translate: 0 1px; }
.login[aria-current="page"] { background: rgba(163, 17, 35, .22); }

/* ---------- messages flash : bandeau sous la barre, liseré rouge pour les erreurs ---------- */
.flash { margin: 0; padding: 14px 28px; background: #15100f; border-bottom: var(--trait); border-left: 3px solid var(--muted); font-size: 15px; color: #ece2d3; }
.flash-error { background: #2a1215; border-left-color: var(--blood-bright); color: #f2c4cb; }

/* ---------- héros ---------- */
.hero { position: relative; min-height: calc(100svh - var(--nav-h)); padding: 40px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; isolation: isolate; overflow: hidden; background: var(--paper); }
/* le fond d'encre : il n'intercepte jamais les clics */
.fluide { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; pointer-events: none; }
.vignette { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(70% 60% at 50% 45%, transparent 40%, rgba(30, 20, 16, .35)); }

/* le logo sur une tache d'encre : noire au cœur, le sang diffuse sur ses bords ; multipliée avec le fond, elle boit le grain du papier */
.card { position: relative; z-index: 2; width: min(calc(580 * var(--g)), 100%); padding: 56px 32px 50px; text-align: center; animation: rise 1s cubic-bezier(.2, .7, .2, 1) both; }
.tache-heros { position: absolute; z-index: 1; top: 50%; left: 50%; mix-blend-mode: multiply; animation: presage-vient 1s both; width: calc(1125 * var(--g)); aspect-ratio: 1333 / 705; background: url("../images/tache-heros-IWCnn3i.webp") center / 100% 100% no-repeat; translate: -54% -54%; pointer-events: none; }

.title { position: relative; display: inline-block; max-width: 100%; margin: 0; font: 400 clamp(49px, 8.4vw, 114px)/.95 var(--sans); }
.title img { display: block; width: calc(470 * var(--g)); max-width: 100%; height: auto; }
/* « Alpha » en gros et gras, en diagonale, centré sur le e final : le P touche le e */
.alpha { position: absolute; left: calc(100% - 1em); bottom: .5em; translate: -50% 0; transform: rotate(-28deg); font: 800 .3em/1 var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--blood-bright); white-space: nowrap; }


.actions { display: flex; justify-content: center; flex-wrap: wrap; gap: calc(10 * var(--g)); margin-top: calc(24 * var(--g)); }
/* boutons pleins, sans dégradé : Jouer rouge qui passe au noir, Discord noir qui s'allume en rouge */
.btn { position: relative; isolation: isolate; width: calc(186 * var(--g)); max-width: 100%; height: calc(44 * var(--g)); display: inline-flex; align-items: center; justify-content: center; color: #fff; font: 700 calc(12 * var(--g))/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; transition: transform .2s; }
/* le pinceau de la maquette : un plein pour Jouer, un contour pour Discord ; le mot suit le ventre du coup de pinceau */
.btn::before { content: ""; position: absolute; z-index: -1; inset: 0; background: url("../images/pinceau-discord-dFUKXQF.webp") center / 100% 100% no-repeat; transition: filter .2s; }
.btn-play { width: calc(198 * var(--g)); padding-left: calc(15 * var(--g)); }
.btn-play::before { background-image: url("../images/pinceau-jouer-zgoPlwV.webp"); }
.btn:hover { transform: translateY(-2px); }
.btn:hover::before, .btn:focus-visible::before { filter: brightness(1.25); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid #e0364b; outline-offset: 3px; }
.btn[aria-disabled="true"] { cursor: default; }
.btn[aria-disabled="true"]:hover { transform: none; }
.btn[aria-disabled="true"]:hover::before { filter: none; }

/* l'invitation à défiler : blanche, posée dans le fondu noir de la bande suivante */
.scroll { position: absolute; z-index: 2; bottom: 34px; left: 50%; translate: -50% 0; display: flex; flex-direction: column; align-items: center; gap: 12px; font: 700 13px/1 var(--sans); letter-spacing: .26em; text-transform: uppercase; white-space: nowrap; color: #fff; }
.scroll svg { width: 24px; height: 24px; color: #fff; animation: bob 2.2s ease-in-out infinite; }

@keyframes rise { from { opacity: 0; transform: translateY(26px) scale(.985); } }
@keyframes bob { 50% { transform: translateY(7px); } }

/* ---------- sections sous l'accueil ---------- */
.section { position: relative; padding: 96px 24px; }
.dedans { width: min(calc(1060 * var(--g)), 100%); margin: 0 auto; }

/* la bande noire, raccordée au parchemin par deux fondus */
.section.noir { padding: 120px 24px 130px; background: var(--ink); }
.section.noir::before, .section.noir::after { content: ""; position: absolute; left: 0; right: 0; height: 110px; pointer-events: none; }
.section.noir::before { top: -110px; background: linear-gradient(transparent, var(--ink)); }
.section.noir::after { bottom: -110px; background: linear-gradient(var(--ink), transparent); }

/* le voile sombre qui met le fond d'encre en retrait derrière le texte */
.section.voile::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(rgba(9, 7, 6, .7), rgba(13, 9, 8, .58) 45%, rgba(9, 7, 6, .7)); }
.section.voile > .dedans { position: relative; z-index: 2; }

.s-titre { margin: 0 0 22px; font: 600 clamp(27px, 3.4vw, 40px)/1.18 var(--serif); }
.s-texte { max-width: 62ch; margin: 0; font-size: 16px; line-height: 1.75; color: #c9bcac; }

/* apparition au défilement */
.apparait { opacity: 0; transform: translateY(26px); transition: opacity .7s, transform .7s cubic-bezier(.2, .7, .2, 1); }
.apparait.vu { opacity: 1; transform: none; }

/* ---------- actualité ---------- */
/* cadre et articles opaques : le fond d'encre ne transparaît pas sous le texte */
.actus { padding: 46px 42px 48px; background: #0f0c0b; border: 1px solid var(--line); }
.actus-entete { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.actus-entete :is(h1, h2) { margin: 0; font: 600 clamp(26px, 3.2vw, 36px)/1.1 var(--serif); }
.tout, .suite { display: inline-flex; align-items: center; gap: 8px; font: 600 12px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; white-space: nowrap; }
.tout { padding-bottom: 4px; color: #b3a698; transition: color .25s; }
.tout:hover { color: var(--cream); }
.tout svg, .suite svg { width: 15px; height: 15px; transition: transform .3s; }
.tout:hover svg { transform: translateX(4px); }
.actus-trait { height: 1px; margin: 0 0 34px; border: 0; background: linear-gradient(90deg, var(--blood-bright), rgba(192, 20, 43, .25) 38%, rgba(255, 255, 255, .07) 70%, transparent); }

.fil { display: grid; gap: 18px; }
/* « Voir plus » : même habit que Connexion, centré sous la liste */
.voir-plus { display: flex; margin: 26px auto 0; }
.actu { position: relative; display: flex; flex-direction: column; padding: 28px 30px 30px; background: linear-gradient(165deg, #251d19, #110d0b); border: 1px solid rgba(255, 255, 255, .08); transition: transform .35s cubic-bezier(.2, .7, .2, 1), border-color .35s; }
.actu:hover { transform: translateY(-4px); border-color: rgba(192, 20, 43, .45); }
/* toute la carte est cliquable, sans imbriquer de liens */
.lien-total::after { content: ""; position: absolute; inset: 0; }

/* l'article épinglé, signalé par un liseré rouge */
.actu.epingle { margin-bottom: 40px; padding: 36px 38px 38px; border-color: rgba(192, 20, 43, .42); background: radial-gradient(120% 100% at 0 0, rgba(125, 18, 32, .28), transparent 62%), linear-gradient(165deg, #2c211c, #120d0c); }
.actu.epingle::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(var(--blood-bright), rgba(125, 18, 32, .15)); }
.actu.epingle h3 { margin-bottom: 16px; font-size: clamp(24px, 2.8vw, 31px); }
.actu.epingle .chapo { display: block; font-size: 15.5px; }
.actu.epingle .chapo + .chapo { margin-top: 13px; }
/* son corps, en entier sous le chapô, sur le fond sombre de la carte ; ses liens passent au-dessus du lien de la carte */
.actu-corps { margin-top: 22px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .08); }
.actu-corps > * { margin: 0 0 13px; }
.actu-corps > :last-child { margin-bottom: 0; }
.actu-corps :is(p, li, blockquote) { font-size: 15.5px; line-height: 1.7; color: #b3a698; }
/* plus fort que .actu h3, le titre de la carte */
.actu .actu-corps :is(h2, h3) { margin: 24px 0 13px; font: 600 19px/1.3 var(--serif); color: var(--cream); }
.actu .actu-corps h3 { font-size: 17px; }
.actu .actu-corps > :first-child { margin-top: 0; }
.actu-corps :is(strong, b) { color: #ece2d3; }
.actu-corps ul, .actu-corps ol { padding-left: 20px; }
.actu-corps li { margin-bottom: 6px; }
.actu-corps li::marker { color: var(--blood-bright); }
.actu-corps a { position: relative; z-index: 1; color: #e8899a; text-decoration: underline; text-underline-offset: 3px; }
.actu-corps hr { border: 0; border-top: 1px solid rgba(255, 255, 255, .08); }

.fil-titre { display: flex; align-items: center; gap: 16px; margin: 0 0 20px; font: 600 11.5px/1 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--muted); }
.fil-titre::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; font: 600 11px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.punaise, .etiquette { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; letter-spacing: .16em; background: rgba(192, 20, 43, .16); border: 1px solid rgba(192, 20, 43, .4); color: #e8899a; }
.punaise { background: rgba(192, 20, 43, .24); border-color: rgba(192, 20, 43, .55); color: #f2a3b0; }
.punaise svg { width: 13px; height: 13px; }

.actu h3 { margin: 0 0 12px; font: 600 clamp(21px, 2.3vw, 27px)/1.3 var(--serif); transition: color .25s; }
.actu:hover h3 { color: #fff; }
/* le résumé est coupé à cinq lignes, sauf sur l'épinglé */
.chapo { margin: 0; font-size: 14.5px; line-height: 1.7; color: #b3a698; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.suite { margin-top: 20px; color: #d8687a; }
.actu:hover .suite svg { transform: translateX(5px); }

/* les cartes montent une par une quand la section arrive */
.actus .actu { opacity: 0; transform: translateY(22px); }
.actus.vu .actu { opacity: 1; transform: none; transition: opacity .7s, transform .7s cubic-bezier(.2, .7, .2, 1), border-color .35s; }
.actus.vu .fil .actu:nth-child(1) { transition-delay: .15s; }
.actus.vu .fil .actu:nth-child(2) { transition-delay: .25s; }
.actus.vu .fil .actu:nth-child(3) { transition-delay: .35s; }

/* ---------- le traité : connexion et inscription ---------- */
/* en fenêtre : <dialog> plein écran, voile sombre sans flou, la page derrière ne défile plus */
.traite-voile { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 24px; border: 0; background: rgba(8, 5, 4, .8); color: inherit; overflow-y: auto; }
.traite-voile[open] { display: flex; }
.traite-voile::backdrop { background: transparent; }
html:has(.traite-voile[open]) { overflow: hidden; }
.traite-cadre { position: relative; width: min(var(--feuille), 100%); margin: auto; }
.fermer { position: absolute; z-index: 2; top: 14px; right: 14px; width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; background: transparent; color: #6d5637; font-size: 21px; line-height: 1; cursor: pointer; transition: background .2s, color .2s; }
.fermer:hover { background: rgba(122, 17, 35, .14); color: var(--blood); }
/* en page : la feuille posée sur le fond d'encre */
.traite-page { position: relative; min-height: calc(100svh - var(--nav-h)); display: grid; place-items: center; padding: 48px 24px; isolation: isolate; overflow: hidden; background: var(--paper); }
.traite-page > turbo-frame, .traite-page > .traite { position: relative; z-index: 1; display: block; width: min(var(--feuille), 100%); }

/* la feuille : un parchemin, ombre nette décalée */
.traite { position: relative; padding: 40px 40px 34px; color: #2a1e16; background: var(--parchemin); outline: 1px solid rgba(90, 66, 38, .35); animation: rise .3s cubic-bezier(.2, .7, .2, 1) both; }
.traite::before, .traite::after { content: ""; position: absolute; pointer-events: none; }
/* le grain du papier, puis le liseré d'encre qui encadre le traité */
.traite::before { inset: 0; opacity: .3; mix-blend-mode: multiply; background: var(--grain); }
.traite::after { inset: 12px; border: 1px solid rgba(70, 48, 26, .35); }
.traite > * { position: relative; z-index: 1; }

.f-entete { margin-bottom: 24px; text-align: center; }
.f-preambule { margin: 0 0 10px; font: 600 10.5px/1 var(--sans); letter-spacing: .34em; text-transform: uppercase; color: #8a6d45; }
.f-titre { margin: 0 0 8px; font: 700 25px/1.2 var(--serif); color: #241a12; }
.f-sous { max-width: 34ch; margin: 0 auto; font: italic 500 14px/1.55 var(--serif); color: #5c452c; }
.f-sous:empty { display: none; }   /* l'inscription n'a pas de sous-titre */

/* ---------- pages de texte (règlement, mentions, confidentialité) : la feuille élargie ----------
   Un seul rythme : texte 16 px, interligne 1,7, 12 px dans un bloc, --ecart entre deux blocs.
   Un filet (sommaire, articles, seing) se place au milieu de l'écart : --ecart de chaque côté. */
.traite.clauses { --ecart: 28px; z-index: 1; width: min(calc(760 * var(--g)), 100%); padding: 56px 64px 48px; }
.clauses > * { margin-block: 0; }
.clauses > * + * { margin-top: var(--ecart); }
.clauses :is(section p, li, dl, .sommaire ol, .clauses-preambule, .clauses-fin, .seing p) { font-size: 16px; line-height: 1.7; color: #3a2a1a; }
.clauses .f-sous { max-width: 52ch; font-size: 16px; line-height: 1.7; }
.clauses section > * { margin: 0 0 12px; }
.clauses section > :last-child, .clauses li:last-child { margin-bottom: 0; }
.clauses li { margin: 0 0 12px; }
.clauses ul { padding-left: 20px; }
.clauses li::marker { color: var(--blood); }
.clauses h2 { font: 700 20px/1.3 var(--serif); color: #241a12; }
.clauses h2 span { display: block; margin-bottom: 6px; font: 600 10.5px/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--blood); }
.clauses :is(section, .clauses-fin) a { color: #8a3040; text-decoration: underline; text-underline-offset: 3px; }
.clauses :is(section, .clauses-fin) a:hover { color: var(--blood); }
.clauses dl { display: grid; grid-template-columns: max-content 1fr; gap: 12px 18px; }
.clauses dt { font-weight: 600; }
.clauses dd { margin: 0; }
.clauses-preambule { font-family: var(--serif); font-style: italic; font-weight: 500; }
.clauses-fin { text-align: center; font-family: var(--serif); font-style: italic; }
/* le livret de règles, dans la fenêtre de la partie : le Markdown de l'utilisateur, mis sur le parchemin */
.livret-cadre { width: min(calc(760 * var(--g)), 100%); }
.traite.livret { --ecart: 18px; width: 100%; padding: 48px 56px 44px; }
.livret :is(p, li, td, th) { font-size: 15.5px; line-height: 1.65; color: #3a2a1a; }
.livret h1 { font: 700 34px/1.1 var(--serif); letter-spacing: .02em; color: #241a12; }
.livret h2 { margin-top: 34px; padding-top: 18px; border-top: 1px solid rgba(70, 48, 26, .3); }
.livret h3 { font: 600 12px/1.3 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--blood); }
.livret strong { color: #241a12; }
.livret ol { padding-left: 22px; }
.livret li::marker { color: var(--blood); }
.livret table { width: 100%; border-collapse: collapse; }
.livret :is(th, td) { padding: 7px 10px; border: 1px solid rgba(70, 48, 26, .35); text-align: left; vertical-align: top; }
.livret th { font: 600 11.5px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #7a5f3c; background: rgba(255, 250, 235, .3); }
/* coordonnée légale manquante : repère visible, à remplir dans config/packages/twig.yaml */
.a-completer { padding: 0 4px; border: 1px dashed var(--blood); background: rgba(163, 17, 35, .08); color: var(--blood); font-style: italic; }

/* le sommaire, entre deux filets */
.sommaire { padding-block: var(--ecart); border-block: 1px solid rgba(70, 48, 26, .3); }
.sommaire ol { columns: 2; column-gap: 32px; margin: 0; padding-left: 22px; font-family: var(--sans); font-weight: 500; }
.sommaire li { margin: 0; break-inside: avoid; }
.sommaire li::marker { color: var(--blood); }
.sommaire a { color: #5c452c; text-decoration: underline; text-decoration-color: rgba(70, 48, 26, .3); text-underline-offset: 3px; transition: color .2s; }
.sommaire a:hover { color: var(--blood); }
.sommaire-titre { margin: 0 0 12px; text-align: center; font: 600 10.5px/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: #8a6d45; }

/* ---------- le règlement : présentation solennelle ---------- */
.solennel .f-titre { font-size: clamp(30px, 4.2vw, 40px); }
/* filet de sang et son losange, comme sous le logo de l'accueil */
.ornement { position: relative; width: min(320px, 70%); height: 1px; margin: 16px auto; background: linear-gradient(90deg, transparent, var(--blood) 20%, var(--blood-bright) 50%, var(--blood) 80%, transparent); }
.ornement::after { content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; background: var(--blood-bright); transform: translate(-50%, -50%) rotate(45deg); }
/* la lettrine du préambule, haute de trois lignes exactement */
.solennel .clauses-preambule::first-letter { initial-letter: 3; margin-right: 10px; font-style: normal; font-weight: 600; color: var(--blood); }
@supports not (initial-letter: 3) {
    .solennel .clauses-preambule::first-letter { float: left; margin-top: 6px; font-size: 4.6em; line-height: .8; }
}
/* la table des articles, en chiffres romains */
.solennel .sommaire ol { padding-left: 36px; list-style: upper-roman; }
.solennel .sommaire li::marker { font: italic 500 16px var(--serif); }
/* chaque article : son numéro romain en marge ; entre deux articles, un filet qui s'efface aux bords */
.solennel { counter-reset: article; }
.solennel section { position: relative; padding-left: 76px; counter-increment: article; }
.solennel section::before { content: counter(article, upper-roman); position: absolute; left: 0; top: 0; width: 56px; text-align: right; font: italic 500 40px/1 var(--serif); color: var(--blood); }
.solennel section + section { padding-top: var(--ecart); background: linear-gradient(90deg, transparent, rgba(125, 18, 32, .4) 25%, rgba(125, 18, 32, .4) 75%, transparent) 0 0 / 100% 1px no-repeat; }
.solennel section + section::before { top: var(--ecart); }
/* le seing, à droite comme au bas d'un acte ; le paraphe se trace quand il paraît */
.seing { padding-top: var(--ecart); text-align: right; background: linear-gradient(90deg, transparent, rgba(70, 48, 26, .35)) 0 0 / 100% 1px no-repeat; }
.seing p { margin: 0; font-family: var(--serif); font-style: italic; color: #7a5f3c; }
.seing .seing-nom { display: inline-block; margin: 12px 10px 0 0; font: 400 38px/1 "Yellowtail", cursive; color: #17110c; transform: rotate(-4deg); }
.seing-paraphe { display: block; width: 200px; height: 26px; margin: 6px 0 0 auto; overflow: visible; fill: none; stroke: #17110c; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .8; stroke-dasharray: 320; stroke-dashoffset: 320; transition: stroke-dashoffset 1.2s cubic-bezier(.4, .1, .3, 1) .3s; }
.seing.vu .seing-paraphe { stroke-dashoffset: 0; }

/* les onglets : deux mentions portées en marge, soulignées de sang */
.onglets { display: grid; grid-template-columns: 1fr 1fr; margin: 22px 0 24px; border-bottom: 1px solid rgba(70, 48, 26, .3); }
.onglet { position: relative; padding: 11px 8px 12px; text-align: center; color: #806b48; font: 600 11.5px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; transition: color .22s; }
.onglet::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: -1px; height: 2px; background: var(--blood); transform: scaleX(0); transition: transform .28s cubic-bezier(.2, .7, .2, 1); }
.onglet:hover, .onglet[aria-selected="true"] { color: #241a12; }
.onglet[aria-selected="true"]::after { transform: none; }

/* les champs : des lignes à remplir à la plume */
.champ { margin-bottom: 17px; }
/* le libellé du champ, pas la case à cocher, qui est aussi un label */
.champ > label:not(.case, .bascule) { display: block; margin-bottom: 6px; font: 700 10.5px/1.2 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: #7a5f3c; }
.saisie { position: relative; }
.champ :is([type="text"], [type="email"], [type="password"], [type="number"], select) { width: 100%; height: 40px; padding: 0 4px; border: 0; border-bottom: 1px solid rgba(70, 48, 26, .45); background: transparent; color: #1f1610; font: 400 16px/1 var(--serif); outline: none; transition: border-color .2s, background .2s; }
.champ input::placeholder { color: #9b8462; font-style: italic; }
.champ :is(input, select):focus { border-bottom-color: var(--blood); background: rgba(255, 250, 235, .4); }
.champ select { cursor: pointer; }
/* le débat : un temps de quatre signes (« 3:45 ») ; la liste prend sa taille, pas toute la ligne */
.champ select[name="council_seconds"] { display: block; width: auto; min-width: 0; padding-right: 6px; }
/* la précision du libellé, en minuscules italiques */
.champ > label i { font: italic 500 11px var(--serif); letter-spacing: 0; text-transform: none; color: #8a6d45; }
.champ.faux input { border-bottom-color: #a3122a; }
.saisie input { padding-right: 46px; }
/* l'œil : l'icône est un masque, le bouton garde toute sa surface */
.oeil { position: absolute; right: 0; top: 50%; translate: 0 -50%; width: 36px; height: 36px; padding: 0; border: 0; background: transparent; color: #8a6d45; cursor: pointer; }
.oeil::before { content: ""; position: absolute; inset: 9px; background: currentColor; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'%3E%3Cpath fill-rule='evenodd' d='M12 8.25C9.92893 8.25 8.25 9.92893 8.25 12C8.25 14.0711 9.92893 15.75 12 15.75C14.0711 15.75 15.75 14.0711 15.75 12C15.75 9.92893 14.0711 8.25 12 8.25ZM9.75 12C9.75 10.7574 10.7574 9.75 12 9.75C13.2426 9.75 14.25 10.7574 14.25 12C14.25 13.2426 13.2426 14.25 12 14.25C10.7574 14.25 9.75 13.2426 9.75 12Z'/%3E%3Cpath fill-rule='evenodd' d='M12 3.25C7.48587 3.25 4.44529 5.9542 2.68057 8.24686L2.64874 8.2882C2.24964 8.80653 1.88206 9.28392 1.63269 9.8484C1.36564 10.4529 1.25 11.1117 1.25 12C1.25 12.8883 1.36564 13.5471 1.63269 14.1516C1.88206 14.7161 2.24964 15.1935 2.64875 15.7118L2.68057 15.7531C4.44529 18.0458 7.48587 20.75 12 20.75C16.5141 20.75 19.5547 18.0458 21.3194 15.7531L21.3512 15.7118C21.7504 15.1935 22.1179 14.7161 22.3673 14.1516C22.6344 13.5471 22.75 12.8883 22.75 12C22.75 11.1117 22.6344 10.4529 22.3673 9.8484C22.1179 9.28391 21.7504 8.80652 21.3512 8.28818L21.3194 8.24686C19.5547 5.9542 16.5141 3.25 12 3.25ZM3.86922 9.1618C5.49864 7.04492 8.15036 4.75 12 4.75C15.8496 4.75 18.5014 7.04492 20.1308 9.1618C20.5694 9.73159 20.8263 10.0721 20.9952 10.4545C21.1532 10.812 21.25 11.2489 21.25 12C21.25 12.7511 21.1532 13.188 20.9952 13.5455C20.8263 13.9279 20.5694 14.2684 20.1308 14.8382C18.5014 16.9551 15.8496 19.25 12 19.25C8.15036 19.25 5.49864 16.9551 3.86922 14.8382C3.43064 14.2684 3.17374 13.9279 3.00476 13.5455C2.84684 13.188 2.75 12.7511 2.75 12C2.75 11.2489 2.84684 10.812 3.00476 10.4545C3.17374 10.0721 3.43063 9.73159 3.86922 9.1618Z'/%3E%3C/svg%3E") center / contain no-repeat; }
.oeil:hover, .oeil[aria-pressed="true"] { color: #3a2a1a; }

.alerte { margin: 0 0 15px; padding: 9px 13px; border-left: 2px solid var(--blood); background: rgba(163, 17, 35, .09); font: 500 12.5px/1.45 var(--sans); color: var(--blood); }
.aide { margin: 6px 2px 0; font-size: 11.5px; font-style: italic; color: #8a6d45; }
.erreur { margin: 6px 2px 0; font-size: 12px; color: #9d1329; }

/* la jauge de solidité, tracée à l'encre */
.jauge { display: flex; gap: 4px; margin-top: 8px; }
.jauge i { flex: 1; height: 2px; background: rgba(70, 48, 26, .2); transition: background .25s; }
.jauge[data-force="1"] i:nth-child(1) { background: #a3122a; }
.jauge[data-force="2"] i:nth-child(-n+2) { background: #a86a1c; }
.jauge[data-force="3"] i:nth-child(-n+3) { background: #8a7412; }
.jauge[data-force="4"] i { background: #3f6b40; }

.ligne { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 24px; font-size: 12.5px; }
.case { display: flex; align-items: flex-start; gap: 9px; color: #5c452c; font: 400 12.5px/1.35 var(--sans); cursor: pointer; }
.case input { appearance: none; flex: none; width: 16px; height: 16px; margin: 1px 0 0; border: 1px solid rgba(70, 48, 26, .5); background: rgba(255, 252, 242, .5); cursor: pointer; transition: background .18s, border-color .18s; }
.case input:checked { border-color: rgba(125, 18, 32, .6); background: rgba(255, 252, 242, .5) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%237d1220'%3E%3Cpath d='M21.5303 5.46967C21.8232 5.76256 21.8232 6.23744 21.5303 6.53033L9.53033 18.5303C9.23744 18.8232 8.76256 18.8232 8.46967 18.5303L2.46967 12.5303C2.17678 12.2374 2.17678 11.7626 2.46967 11.4697C2.76256 11.1768 3.23744 11.1768 3.53033 11.4697L9 16.9393L20.4697 5.46967C20.7626 5.17678 21.2374 5.17678 21.5303 5.46967Z'/%3E%3C/svg%3E") center / 14px no-repeat; }
.champ.faux .case input { border-color: #a3122a; }
.lien { color: #8a3040; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.lien:hover { color: var(--blood); }
/* pages du mot de passe oublié : un paragraphe sous l'en-tête, puis le retour à la connexion */
.f-texte { margin: 0; text-align: center; font: italic 500 15px/1.6 var(--serif); color: #5c452c; }
.f-retour { margin: 22px 0 0; text-align: center; font-size: 14px; }

/* le bloc de signature : on signe le traité, le paraphe se trace au survol */
.signer { display: block; width: 100%; padding: 14px 18px 12px; text-align: center; color: #241a12; border: 1px solid rgba(70, 48, 26, .45); background: linear-gradient(rgba(255, 252, 242, .5), rgba(226, 212, 180, .35)); cursor: pointer; transition: border-color .25s, background .25s; }
.signer:hover, .signer:focus-visible { border-color: rgba(125, 18, 32, .65); background: linear-gradient(rgba(255, 252, 242, .7), rgba(232, 214, 178, .5)); }
.signer:active { translate: 0 1px; }
.signer-trace { position: relative; display: inline-block; padding: 2px 14px 0; }
.signer-mot { display: block; margin-top: 2px; font: 400 42px/1.05 "Yellowtail", "Brush Script MT", cursive; color: #17110c; transform: rotate(-4deg); transform-origin: left center; transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.signer:hover .signer-mot { transform: rotate(-4deg) scale(1.04); }
.signer-paraphe { position: absolute; left: 0; bottom: -6px; width: 100%; height: 26px; overflow: visible; fill: none; stroke: #17110c; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; opacity: .85; stroke-dasharray: 320; stroke-dashoffset: 320; transition: stroke-dashoffset .75s cubic-bezier(.4, .1, .3, 1); }
.signer:is(:hover, :focus-visible) .signer-paraphe { stroke-dashoffset: 0; }
.signer-ligne { display: block; height: 1px; margin: 14px 6px 7px; background: rgba(70, 48, 26, .55); }
.signer-legende { display: block; font: italic 500 11px/1 var(--serif); color: #7a5f3c; }

.separateur { display: flex; align-items: center; gap: 14px; margin: 22px 0 16px; font: italic 500 11px/1 var(--serif); color: #8a6d45; }
.separateur::before, .separateur::after { content: ""; flex: 1; height: 1px; background: rgba(70, 48, 26, .28); }
.discord { width: 100%; height: 44px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid rgba(70, 48, 26, .4); background: transparent; color: #3a2a1a; font: 600 11.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.discord svg { width: 18px; height: 18px; }
.discord small { font-size: 10px; letter-spacing: .1em; text-transform: none; font-style: italic; }
.discord:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- la page Jouer ---------- */
.page-jouer { position: relative; isolation: isolate; overflow: hidden; min-height: calc(100svh - var(--nav-h)); padding: 34px 24px 70px; background: linear-gradient(#e9dab7, #d9c8a6); }
.page-jouer > .dedans { position: relative; z-index: 1; width: min(calc(1080 * var(--g)), 100%); margin: 0 auto; }
/* la carte sombre : opaque, liseré clair, ombre nette décalée */
.carte-jeu { padding: 30px 32px 28px; background: linear-gradient(155deg, #2e241f, #140f0d); border: var(--trait); }
.tables-entete { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.tables-titres { flex: 1; min-width: 0; }
.tables-titres h1 { margin: 0; font: 600 27px/1.2 var(--serif); color: var(--cream); }
.tables-sous { margin: 6px 0 0; font: 500 12.5px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
/* créer : le rouge plein du bouton Jouer, qui passe au noir au survol */
.creer { height: 42px; padding: 0 22px; border: var(--bord-rouge); background: var(--blood-bright); color: #fff; font: 600 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; cursor: pointer; transition: background .25s, transform .2s; }
.creer:hover, .creer:focus-visible { background: rgba(13, 10, 9, .4); transform: translateY(-1px); }
.creer:active { transform: translateY(1px); }

/* une seule grille : chaque ligne emprunte ses colonnes à la liste (subgrid), tout s'aligne */
.tables-liste { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto auto auto; gap: 6px 16px; }
.table-ligne { position: relative; display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; padding: 8px 12px 8px 20px; background: rgba(226, 212, 178, .1); border: 1px solid rgba(226, 212, 178, .2); animation: ligne-nait .45s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--rang, 0) * 45ms); transition: background .2s, border-color .2s, transform .2s; }
.table-ligne:hover { background: rgba(226, 212, 178, .16); border-color: rgba(226, 212, 178, .32); transform: translateY(-1px); }
/* le filet sur la tranche gauche */
.table-ligne::before { content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 3px; background: rgba(226, 212, 178, .6); }
@keyframes ligne-nait { from { opacity: 0; transform: translateY(9px); } }
.table-ident { display: flex; align-items: center; gap: 10px; min-width: 0; }
.table-ident b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 16.5px/1.2 var(--sans); color: #f0e8da; }
.table-hote { justify-self: center; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 16.5px/1.2 var(--sans); color: #cfc2b0; }
.table-tags { justify-self: center; display: flex; flex-wrap: wrap; gap: 7px; min-width: 0; }
.table-places { justify-self: end; display: flex; align-items: center; gap: 9px; }
.table-places svg { width: 17px; height: 17px; color: #a89a8b; }
.table-places b { white-space: nowrap; font: 600 16.5px/1 var(--sans); color: #e8dfd0; }
.table-places.pleine b { color: #e3b95c; }
.table-places.pleine svg { color: #e3b95c; }
/* les étiquettes : état de la table, accès */
.puce { display: inline-flex; align-items: center; padding: 3px 11px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .09); color: #d9cdbd; font: 600 13.5px/1.3 var(--sans); white-space: nowrap; }
.puce.attente { background: rgba(212, 164, 60, .15); border-color: rgba(212, 164, 60, .45); color: #e3b95c; }
.puce.en-cours { background: rgba(79, 157, 82, .15); border-color: rgba(79, 157, 82, .4); color: #8fc992; }
/* le point vivant d'une partie en cours, carré comme le reste */
.puce.en-cours::before { content: ""; width: 5px; height: 5px; margin-right: 6px; background: #63b567; animation: pouls 1.6s ease-in-out infinite; }
@keyframes pouls { 50% { opacity: .35; } }
/* accès : privée en sang, publique en bleu (couleurs de la maquette) ; « Sur invitation » en simple filet */
.puce.private { background: rgba(192, 20, 43, .14); border-color: rgba(192, 20, 43, .4); color: #e8899a; }
.puce.public { background: rgba(90, 140, 190, .16); border-color: rgba(110, 160, 205, .45); color: #9dc0e0; }
.puce.invitation-seule { background: transparent; border-color: rgba(255, 255, 255, .28); color: #d9cdbd; }
.table-tags .puce { padding: 4px 13px; font-size: 15px; }
/* chaque type de partie a sa couleur : sur la ligne, sa tranche, son étiquette et son filtre */
.puce.mode-folie { background: rgba(13, 10, 9, .5); border-color: rgba(255, 255, 255, .25); color: #e8dfd0; }
.puce.mode-classique { background: rgba(226, 212, 178, .14); border-color: rgba(226, 212, 178, .34); color: #e4d7bd; }
.puce.mode-reflexion { background: rgba(125, 18, 32, .3); border-color: rgba(192, 20, 43, .5); color: #f0b3bd; }
.table-ligne.cat-folie { background: rgba(13, 10, 9, .42); border-color: rgba(255, 255, 255, .1); }
.table-ligne.cat-folie:hover { background: rgba(13, 10, 9, .56); border-color: rgba(255, 255, 255, .16); }
.table-ligne.cat-folie::before { background: rgba(246, 239, 225, .4); }
.table-ligne.cat-classique { background: rgba(226, 212, 178, .2); border-color: rgba(226, 212, 178, .26); }
.table-ligne.cat-classique:hover { background: rgba(226, 212, 178, .27); border-color: rgba(226, 212, 178, .34); }
.table-ligne.cat-classique::before { background: rgba(226, 212, 178, .7); }
.table-ligne.cat-reflexion { background: rgba(125, 18, 32, .26); border-color: rgba(192, 20, 43, .36); }
.table-ligne.cat-reflexion:hover { background: rgba(125, 18, 32, .34); border-color: rgba(192, 20, 43, .48); }
.table-ligne.cat-reflexion::before { background: rgba(192, 20, 43, .8); }

/* les filtres : un onglet par type, avec son compte ; Classé viendra plus tard */
.filtres { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filtre { height: 32px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, .13); background: rgba(255, 255, 255, .04); color: #b3a698; font: 600 10.5px/1 var(--sans); letter-spacing: .13em; text-transform: uppercase; cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.filtre:hover:not(:disabled), .filtre[aria-selected="true"] { color: var(--cream); }
.filtre-nb, .bientot { margin-left: 8px; padding: 2px 6px; background: rgba(255, 255, 255, .12); font-size: 9px; letter-spacing: .1em; }
.filtre[data-mode=""][aria-selected="true"] { background: rgba(192, 20, 43, .2); border-color: rgba(192, 20, 43, .55); }
.filtre[data-mode="folie"] { background: rgba(13, 10, 9, .36); border-color: rgba(255, 255, 255, .17); color: #cfc4b4; }
.filtre[data-mode="folie"][aria-selected="true"] { background: rgba(13, 10, 9, .62); border-color: rgba(255, 255, 255, .32); color: var(--cream); }
.filtre[data-mode="classique"] { background: rgba(226, 212, 178, .13); border-color: rgba(226, 212, 178, .34); color: #e4d7bd; }
.filtre[data-mode="classique"][aria-selected="true"] { background: rgba(226, 212, 178, .3); border-color: rgba(226, 212, 178, .6); color: var(--cream); }
.filtre[data-mode="reflexion"] { background: rgba(192, 20, 43, .15); border-color: rgba(192, 20, 43, .4); color: #e8899a; }
.filtre[data-mode="reflexion"][aria-selected="true"] { background: rgba(192, 20, 43, .32); border-color: rgba(192, 20, 43, .7); color: var(--cream); }
.filtre:disabled { opacity: .4; cursor: default; }
.mode-note { margin: 0 0 16px; font-size: 14px; line-height: 1.5; color: #b7aa9a; }

/* le choix du type de partie, sur le parchemin : des cases carrées, celle retenue passe au sang */
.choix { margin: 0 0 17px; padding: 0; border: 0; }
.choix legend { margin-bottom: 8px; padding: 0; font: 700 10.5px/1.2 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: #7a5f3c; }
.choix-pilules { display: flex; flex-wrap: wrap; gap: 6px; }
.choix-pilule { position: relative; padding: 8px 14px; border: 1px solid rgba(70, 48, 26, .45); color: #5c452c; font: 600 11.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.choix-pilule input { position: absolute; opacity: 0; pointer-events: none; }
.choix-pilule:hover { border-color: var(--blood); color: var(--blood); }
.choix-pilule:has(:checked) { background: var(--blood); border-color: var(--blood); color: #f6efe1; }
.choix-pilule:has(:focus-visible) { outline: 2px solid #e0364b; outline-offset: 3px; }
.choix-pilule:has(:disabled) { opacity: .45; cursor: not-allowed; }
.choix-pilule:has(:disabled):hover { border-color: rgba(70, 48, 26, .45); color: #5c452c; }

/* le choix de la composition, sur le parchemin : compteur d'Ombres, capital, cartes à cocher camp par camp */
.traite-cadre:has(.composition) { width: min(calc(720 * var(--g)), 100%); }
.compo-tete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.compteur { display: inline-flex; align-items: center; gap: 10px; }
.compteur-nom { font: 700 10.5px/1.2 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: #7a5f3c; }
/* le stepper : la bande de nombres glisse de --k cases dans sa fenêtre ; --i est le rang de chaque case.
   Une voisine se réduit de moitié vers le centre : elle tient dans le demi-cran qui reste de chaque côté */
.stepper { --u: calc(30 * var(--e, 1px)); flex: none; overflow: hidden; width: calc(2 * var(--u)); height: calc(30 * var(--e, 1px)); border: 1px solid rgba(70, 48, 26, .45); background: rgba(255, 250, 235, .35); pointer-events: none; transition: scale .2s; }
.stepper:active { scale: .94; }
.stepper:has(:focus-visible) { outline: 2px solid #e0364b; outline-offset: 2px; }
.stepper-bande { display: grid; grid-auto-columns: var(--u); height: 100%; translate: calc((.5 - var(--k)) * var(--u)); transition: translate .2s; }
.stepper input { grid-area: 1 / calc(var(--i) + 1); z-index: 2; width: var(--u); height: 100%; margin: 0; opacity: 0; }
.stepper label {
    --ecart: calc(var(--i) - var(--k));
    --sens: clamp(-1, var(--ecart), 1);
    --retrait: min(1, max(var(--ecart), -1 * var(--ecart)));
    grid-area: 1 / calc(var(--i) + 1);
    display: grid; place-content: center;
    font: 700 calc(16 * var(--e, 1px))/1 var(--sans); font-variant-numeric: tabular-nums; color: #241a12;
    opacity: calc(1 - var(--retrait) * .5);
    transform-origin: calc(50% * (1 - var(--sens)));
    scale: calc(1 - var(--retrait) * .5);
    user-select: none; cursor: pointer; transition: scale .2s, opacity .2s;
}
.stepper input:not(:checked) + label { pointer-events: auto; }
.stepper input:disabled + label { opacity: .2; cursor: not-allowed; }
@media (pointer: coarse) { .stepper { --u: 46px; height: 40px; } }
.capital-choix { margin: 0; font: 600 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #7a5f3c; }
.capital-choix b { margin-left: 6px; font-size: 15px; letter-spacing: 0; font-variant-numeric: tabular-nums; color: #2a1e16; }
.capital-choix b.depasse { color: var(--blood); }
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.onglets.camps { grid-template-columns: repeat(3, 1fr); margin: 14px 0; }
button.onglet { border: 0; background: transparent; cursor: pointer; }
.cartes-choix { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(104 * var(--g)), 1fr)); gap: 8px; }
.carte-choix { position: relative; display: grid; align-content: start; gap: 3px; padding: 6px; border: 1px solid rgba(70, 48, 26, .35); background: rgba(255, 250, 235, .25); cursor: pointer; transition: border-color .2s, background .2s; }
.carte-choix input { position: absolute; opacity: 0; pointer-events: none; }
.carte-choix img { display: block; width: 100%; height: auto; margin-bottom: 3px; }
.carte-choix:hover { border-color: var(--blood); }
.carte-choix:has(:checked) { border-color: var(--blood); background: rgba(163, 17, 35, .12); box-shadow: inset 0 0 0 1px var(--blood); }
.carte-choix:has(:focus-visible) { outline: 2px solid #e0364b; outline-offset: 2px; }
.carte-nom { font: 600 12px/1.2 var(--sans); color: #2a1e16; }
.carte-cout, .carte-famille { font: 500 10.5px/1.2 var(--sans); color: #7a5f3c; }
.carte-famille { font-style: italic; }
/* l'interrupteur à deux options : rouge à gauche, noir à droite. D'après Shoh2008 (Uiverse.io), avec ses arrondis et son relief,
   choisis par l'utilisateur pour cet interrupteur (04/11/2026) */
.bascule { --b: calc(.76 * var(--e, 1px)); display: inline-flex; align-items: center; gap: calc(7 * var(--e, 1px)); font: 600 calc(11.5 * var(--e, 1px))/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: #5c452c; cursor: pointer; }
.bascules { display: flex; flex-wrap: wrap; justify-content: space-between; gap: calc(10 * var(--e, 1px)) calc(12 * var(--e, 1px)); margin-top: calc(14 * var(--e, 1px)); }
.bascule:has(:checked) .bascule-off, .bascule:not(:has(:checked)) .bascule-on { opacity: .45; }
.bascule input[type="checkbox"] {
    flex: none; width: calc(75 * var(--b)); height: calc(25 * var(--b)); margin: 0; padding: 0 calc(25 * var(--b)) 0 0; border: 0; border-radius: calc(25 * var(--b)); cursor: pointer; appearance: none; transition: .25s;
    background-image: linear-gradient(hsla(0, 0%, 0%, .1), hsla(0, 0%, 100%, .1)), linear-gradient(to right, #f66 50%, #000 50%);
    background-size: 100% 100%, 200% 100%;
    background-position: 0 0, calc(15 * var(--b)) 0;
    box-shadow: inset 0 1px 4px hsla(0, 0%, 0%, .5), inset 0 0 10px hsla(0, 0%, 0%, .5), 0 0 0 1px hsla(0, 0%, 0%, .1), 0 -1px 2px 2px hsla(0, 0%, 0%, .25), 0 2px 2px 2px hsla(0, 0%, 100%, .75);
}
.bascule input[type="checkbox"]::after {
    content: ""; display: block; width: calc(50 * var(--b)); height: calc(25 * var(--b)); border-radius: calc(25 * var(--b));
    background-color: #eee;
    background-image: linear-gradient(hsla(0, 0%, 100%, .1), hsla(0, 0%, 0%, .1));
    box-shadow: inset 0 1px 1px 1px #fff, inset 0 -1px 1px 1px hsla(0, 0%, 0%, .25), 0 1px 3px 1px hsla(0, 0%, 0%, .5), 0 0 2px hsla(0, 0%, 0%, .25);
}
.bascule input[type="checkbox"]:checked { padding: 0 0 0 calc(25 * var(--b)); background-position: 0 0, calc(35 * var(--b)) 0; }
.bascule input[type="checkbox"]:focus-visible { outline: 2px solid #e0364b; outline-offset: 4px; }

/* le « ? » d'un titre : l'explication paraît au survol, au toucher ou au clavier */
.question { position: relative; display: inline-block; margin-left: 6px; vertical-align: middle; }
.question button { display: grid; place-items: center; width: calc(16 * var(--e, 1px)); height: calc(16 * var(--e, 1px)); padding: 0; border: 1px solid rgba(70, 48, 26, .6); border-radius: 50%; background: transparent; color: #5c452c; font: 700 calc(11 * var(--e, 1px))/1 var(--sans); cursor: help; transition: border-color .2s, color .2s; }
.question:is(:hover, :focus-within) button { border-color: var(--blood); color: var(--blood); }
.question-texte { position: absolute; z-index: 10; top: calc(100% + 8px); left: 0; display: none; width: calc(330 * var(--e, 1px)); max-width: calc(100vw - 90px); padding: 11px 13px; background: #241a12; color: #f6efe1; font: 400 calc(13 * var(--e, 1px))/1.45 var(--sans); letter-spacing: 0; text-transform: none; }
.question:is(:hover, :focus-within) .question-texte { display: block; }
.question-texte span { display: block; }
.question-texte span + span { margin-top: 6px; }
.question-texte b { color: #f3d29a; }

/* la confirmation d'un geste grave */
.confirmer { display: grid; gap: 20px; text-align: center; }
.confirmer-texte { margin: 0; font: 500 16px/1.5 var(--serif); color: #241a12; }
.confirmer-gestes { display: flex; justify-content: center; gap: 10px; }
.confirmer-gestes .choix-pilule { background: transparent; }
.confirmer-gestes .choix-pilule.grave { background: var(--blood); border-color: var(--blood); color: #f6efe1; }
.confirmer-gestes .choix-pilule.grave:hover { background: var(--blood-bright); }

/* le refus d'un geste, en haut de la fenêtre et hors de son défilement */
.table-alerte { position: fixed; z-index: 20; top: 34px; left: 50%; translate: -50%; width: max-content; max-width: calc(100vw - 48px); margin: 0; padding: 11px 20px; border: 1px solid #f6efe1; background: var(--blood-bright); color: #fff; font: 600 calc(14 * var(--e, 1px))/1.35 var(--sans); text-align: center; }

/* un rôle qui demande plus de joueurs : dit sur sa carte, qui s'éteint tant que la table est trop petite */
.carte-min { font: 600 10.5px/1.2 var(--sans); color: #6b4f2a; }
.carte-choix.trop-tot { cursor: not-allowed; }
.carte-choix.trop-tot img { opacity: .4; }
.carte-choix.trop-tot .carte-min { color: var(--blood); }

/* ouvrir une table : une colonne sur petit écran ; à partir de 1000 px, 65 % de la largeur de la page,
   et chaque taille suit --e, qui vaut 1 px à 1440 de large */
.traite-cadre:has(.table-form) { width: 100%; }
.traite:has(.table-form) { padding: 30px 36px; }
.traite:has(.table-form) .f-entete { margin-bottom: 16px; }
.table-reglages { display: grid; gap: 18px; margin-bottom: 18px; }
.table-reglages .champ { margin: 0; }
.table-reglages .choix-pilules { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.table-reglages .choix-pilule { text-align: center; }
/* les compositions toutes prêtes : la plus longue sur toute la largeur, les autres en dessous */
.table-reglages .presets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.table-reglages .presets > :first-child { grid-column: 1 / -1; }
.table-form .compo-tete { justify-content: flex-start; gap: 14px 32px; }
.table-form .compteur-nom { white-space: nowrap; }
/* le capital, au bout de la ligne de Type de partie */
.choix legend:has(.capital-choix) { display: flex; align-items: center; width: 100%; }
.choix legend .capital-choix { margin-left: auto; letter-spacing: .08em; }
.table-form .signer { margin-top: 18px; }
.table-form .signer-legende { display: none; }
.table-form .signer-ligne { margin-bottom: 0; }
.composition { min-width: 0; }
@media (max-width: 560px) {
    .traite-voile:has(.composition) { padding: 10px; }
    .traite:has(.composition) { padding: 28px 20px 24px; }
    .onglets.camps .onglet { padding-inline: 2px; font-size: 10.5px; letter-spacing: .06em; }
    .question { position: static; }
    .question-texte { top: auto; right: 0; width: auto; max-width: none; margin-top: 24px; }
}
@media (min-width: 1000px) {
    .traite-voile:has(.table-form) { overflow: hidden; }
    /* une fenêtre très haute ne laisse pas de vide sous les cartes : la hauteur suit --e, et le tout se centre */
    .traite-cadre:has(.table-form) { --e: clamp(.7px, min(.0694vw, .128vh), 2px); width: 65vw; height: min(100%, calc(690 * var(--e))); margin: auto; }
    .traite-cadre:has(.table-form) .table-alerte { position: absolute; top: calc(16 * var(--e)); }
    .traite:has(.table-form) { display: flex; flex-direction: column; height: 100%; padding: calc(26 * var(--e)) calc(28 * var(--e)); }
    .traite:has(.table-form) .f-entete { margin-bottom: calc(12 * var(--e)); }
    .traite:has(.table-form) .f-titre { margin: 0; font-size: calc(30 * var(--e)); }
    .table-form { flex: 1; min-height: 0; display: grid; grid-template: "reglages composition" auto "signer composition" minmax(0, 1fr) / calc(350 * var(--e)) minmax(0, 1fr); gap: calc(14 * var(--e)) calc(24 * var(--e)); }
    .table-reglages { grid-area: reglages; align-content: start; margin: 0; }
    .table-reglages .choix-pilules { gap: calc(8 * var(--e)); }
    .table-form .choix legend { margin-bottom: calc(10 * var(--e)); font-size: calc(12.5 * var(--e)); }
    .table-form .compteur-nom { min-width: 0; font-size: calc(12.5 * var(--e)); }
    .table-form .compteur { gap: calc(10 * var(--e)); }
    .table-form .compo-tete { justify-content: space-between; gap: calc(12 * var(--e)); margin: 0; }
    .table-form .capital-choix { font-size: calc(12.5 * var(--e)); }
    .table-form .capital-choix b { font-size: calc(15 * var(--e)); }
    .table-form .choix-pilule { display: grid; place-items: center; min-height: calc(30 * var(--e)); padding: 0 calc(12 * var(--e)); font-size: calc(12.5 * var(--e)); }
    .table-reglages .presets { gap: calc(8 * var(--e)); }
    .table-form .onglets.camps { margin: calc(12 * var(--e)) 0; }
    .table-form .onglet { padding: calc(11 * var(--e)) calc(8 * var(--e)) calc(12 * var(--e)); font-size: calc(12.5 * var(--e)); }
    .table-form .composition { grid-area: composition; min-width: 0; min-height: 0; display: flex; flex-direction: column; margin: 0; }
    .table-form .cartes-choix { flex: 1; min-height: 0; align-content: start; gap: calc(8 * var(--e)); grid-template-columns: repeat(auto-fill, minmax(calc(92 * var(--e)), 1fr)); padding: 2px; overflow-y: auto; scrollbar-width: thin; }
    .table-form .carte-choix { gap: calc(3 * var(--e)); padding: calc(6 * var(--e)); }
    .table-form .carte-choix img { aspect-ratio: 5 / 4; object-fit: cover; margin-bottom: calc(3 * var(--e)); }
    .table-form .carte-nom { font-size: calc(12 * var(--e)); }
    .table-form :is(.carte-cout, .carte-famille, .carte-min) { font-size: calc(10.5 * var(--e)); }
    .table-form .carte-venir { top: calc(3 * var(--e)); left: calc(3 * var(--e)); font-size: calc(8.5 * var(--e)); }
    .table-form .signer { grid-area: signer; align-self: start; margin: 0; padding: calc(8 * var(--e)) calc(14 * var(--e)) calc(9 * var(--e)); }
    .table-form .signer-mot { font-size: calc(36 * var(--e)); }
    .table-form .signer-ligne { margin-top: calc(9 * var(--e)); }
}
/* pas encore jouable : se compose, ne se lance pas */
.carte-image { position: relative; display: block; }
.carte-venir { position: absolute; top: 4px; left: 4px; padding: 2px 6px; background: #2a1e16; color: #f6efe1; font: 600 9.5px/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.carte-choix.a-venir img, .compo-role.a-venir img { opacity: .5; }
.a-venir-note { color: #e8899a; }
/* rejoindre : voile noir constant, bord de sang */
.rejoindre { height: 42px; padding: 0 24px; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; border: var(--bord-rouge); background: rgba(13, 10, 9, .45); color: var(--cream); font: 600 16px/1 var(--sans); cursor: pointer; transition: background .25s; }
.rejoindre:hover, .rejoindre:focus-visible { background: rgba(163, 17, 35, .3); }
.rejoindre:active { translate: 0 1px; }
.tables-vide { margin: 0; padding: 30px 20px; text-align: center; border: 1px dashed rgba(255, 255, 255, .16); font-size: 14px; font-style: italic; color: #9b8f81; }
/* entrer par invitation, sous la liste */
.invitation { margin-bottom: 22px; padding-bottom: 22px; border-bottom: var(--trait); }
.invitation label { display: block; margin-bottom: 10px; font: 600 11.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.invitation-saisie { display: flex; gap: 12px; }
.invitation input { flex: 1; min-width: 0; height: 42px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, .13); background: rgba(255, 255, 255, .04); color: var(--cream); font: 400 15px/1 var(--sans); outline: none; transition: border-color .25s, background .25s; }
.invitation input::placeholder { color: #8e8479; }
.invitation input:focus { border-color: rgba(192, 20, 43, .6); background: rgba(255, 255, 255, .06); }
/* déjà assis à une table : l'entrée est fermée */
.invitation :disabled { opacity: .45; cursor: not-allowed; }
.invitation .rejoindre:disabled:hover { background: rgba(13, 10, 9, .45); }

/* ---------- la salle d'attente : la charpente de la partie ---------- */
/* la table occupe tout l'écran : le fond ne se devine plus qu'en lisière */
.page-partie { position: relative; isolation: isolate; overflow: hidden; min-height: calc(100svh - var(--nav-h)); padding: 10px 12px 14px; background: linear-gradient(#c3b190, #9e8e74); }
.page-partie > .dedans { position: relative; z-index: 1; width: 100%; margin: 0 auto; }
/* bannière et plateau partagent trois colonnes : départ et registre, table, colonne de droite */
.partie-entete, .partie-grille { display: grid; grid-template-columns: var(--col-g, calc(236 * var(--g))) minmax(0, 1fr) var(--col-d, calc(306 * var(--g))); background: linear-gradient(155deg, #2e241f, #140f0d); border: var(--trait); }
.partie-entete { align-items: center; padding: 13px 0; }
.partie-grille { border-top: 0; }
.quitter-zone, .entete-centre, .entete-reglages { padding: 0 22px; }
.quitter-zone form, .entete-reglages form, .voix-gestes, .invitation-ligne form { margin: 0; }
.quitter { display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 16px; border: var(--bord-rouge); background: rgba(163, 17, 35, .15); color: var(--cream); font: 600 13px/1 var(--sans); cursor: pointer; transition: background .2s; }
.quitter:hover, .quitter:focus-visible { background: rgba(163, 17, 35, .32); }
.quitter svg, .reglages-partie svg { width: 18px; height: 18px; }
.entete-centre { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-left: 1px solid rgba(255, 255, 255, .08); border-right: 1px solid rgba(255, 255, 255, .08); }
.partie-titre { min-width: 0; }
.partie-titre h1 { margin: 0 0 8px; font: 600 clamp(20px, 2.2vw, 25px)/1.1 var(--serif); color: var(--cream); }
.puces { display: flex; flex-wrap: wrap; gap: 6px; }
.partie-phase { flex: none; text-align: right; }
.partie-phase b { display: block; font: 700 27px/1.1 var(--serif); font-variant-numeric: tabular-nums; color: var(--cream); }
.partie-phase span { display: block; margin-top: 5px; font: 500 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.entete-reglages { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.reglages-partie { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .04); color: #b3a698; cursor: pointer; transition: color .2s, background .2s, border-color .2s; }
.reglages-partie:hover, .reglages-partie:focus-visible { color: var(--cream); background: rgba(255, 255, 255, .1); }

/* le plateau : trois volets séparés de filets, sans fond propre */
.page-partie .carte-jeu { padding: 18px 20px; background: none; border: 0; }
.recap-carte { border-right: 1px solid rgba(255, 255, 255, .08); }
.flanc { border-left: 1px solid rgba(255, 255, 255, .08); }
.flanc > .carte-jeu + .carte-jeu { border-top: 1px solid rgba(255, 255, 255, .08); }
/* les poignées : un filet qu'on tire pour régler la largeur des colonnes (bureau seulement) */
.recap-carte, .flanc { position: relative; }
.poignee { position: absolute; z-index: 4; top: 0; bottom: 0; left: -5px; width: 9px; padding: 0; border: 0; background: transparent; cursor: col-resize; touch-action: none; }
.poignee.a-droite { left: auto; right: -5px; }
.poignee::before { content: ""; position: absolute; top: 0; bottom: 0; left: 4px; width: 1px; background: transparent; transition: background .2s; }
.poignee:hover::before, .poignee:focus-visible::before, .poignee.tire::before { background: rgba(192, 20, 43, .55); }
/* les volets repliables : seul le titre reste */
.replier { flex: none; width: 24px; height: 22px; padding: 0; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .04); color: #b3a698; font: 600 12px/1 var(--sans); cursor: pointer; transition: color .2s, background .2s; }
.replier:hover, .replier:focus-visible { background: rgba(255, 255, 255, .1); color: var(--cream); }
.volet .titre-ligne { align-items: center; }
.volet .salon-mention { margin-left: auto; }
.volet.plie > :not(.titre-ligne) { display: none; }
.volet.plie .titre-ligne { margin-bottom: 0; }
.capital { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 12px; font: 500 12.5px/1.3 var(--sans); color: #b7aa9a; }
.capital b { color: var(--cream); }
/* les réglages en cours de partie, pas encore branchés */
.reglages-partie:disabled { opacity: .45; cursor: not-allowed; }
/* le menu Voter : la liste des vivants, la voix posée marquée d'un point */
.vote-zone { position: relative; }
.vote-bouton { width: 100%; margin: 0 0 10px; }
/* au-dessus de la table, le menu s'ouvre vers le haut, par-dessus ce qui précède */
.vote-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 4px); z-index: 7; display: none; gap: 4px; padding: 8px; border: 1px solid rgba(255, 255, 255, .16); background: #17100e; }
.vote-zone.ouvert .vote-menu { display: grid; }
.vote-menu form { margin: 0; }
.vote-menu button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; background: transparent; color: #ddd2c4; font: 500 14px/1.2 var(--sans); text-align: left; cursor: pointer; }
.vote-menu button:hover, .vote-menu button:focus-visible { background: rgba(192, 20, 43, .2); }
.vote-menu .point { flex: none; width: 8px; height: 8px; background: var(--blood-bright); }
.vote-menu .point.vide { background: rgba(255, 255, 255, .14); }
.titre-ligne { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.profil-titre { margin: 0; font: 600 11px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: #c9bcac; }
.salon-mention { font: italic 400 12px/1 var(--sans); color: #8d7f70; }
.voix-aide { margin: 10px 0 0; font-size: 13px; line-height: 1.5; color: #b7aa9a; }

/* le registre : un réglage par ligne */
.attente-liste { margin: 0; font: 400 13px/1.35 var(--sans); color: #d5c9ba; }
.attente-liste div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dotted rgba(255, 255, 255, .1); }
.attente-liste div:last-child { border-bottom: 0; }
.attente-liste dt { color: #9d8d7d; }
.attente-liste dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--cream); }

/* la table : une ligne par signataire, puis les places libres en pointillé */
.voix-liste { display: grid; gap: 4px; }
.voix { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 10px; background: rgba(13, 10, 9, .38); border: 1px solid rgba(255, 255, 255, .07); font: 500 15px/1.3 var(--sans); color: #e8dfd0; }
.voix-nom { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hote-marque { margin-left: 6px; color: #e0a3ad; }
.etat-attente { margin-left: auto; font: italic 400 12px/1 var(--sans); color: #8d7f70; }
.renvoi { width: 24px; height: 24px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(255, 255, 255, .14); background: transparent; color: #9d8d7d; font: 700 14px/1 var(--sans); cursor: pointer; transition: color .18s, background .18s, border-color .18s; }
.renvoi:hover, .renvoi:focus-visible { color: #f0c3c8; border-color: rgba(192, 20, 43, .5); background: rgba(163, 17, 35, .2); }
.voix.place-libre { background: transparent; border-style: dashed; color: #7d7165; font-style: italic; padding-left: 29px; }

/* « prêt » : la marque carrée s'allume en vert ; « Je suis prêt » vire au vert une fois déclaré */
.prets-compte { font: 600 10.5px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #9d8d7d; }
.marque-pret { flex: 0 0 auto; width: 9px; height: 9px; border: 1px solid rgba(255, 255, 255, .28); transition: background .2s, border-color .2s; }
.voix.pret .marque-pret { border-color: #7a9a5e; background: #8fbf68; outline: 2px solid rgba(143, 191, 104, .22); }
.voix.pret .voix-nom { color: #fff; }
.attente-boutons { display: grid; gap: 8px; margin-top: 12px; }
.attente-boutons form { margin: 0; display: grid; }
.pret-bouton[aria-pressed="true"] { background: #4c6c36; border-color: rgba(143, 191, 104, .5); }
/* la sonnette de l'hôte, et le bandeau qu'elle allume chez les retardataires */
.sonner { height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid rgba(255, 255, 255, .16); background: transparent; color: #d0c2b1; font: 600 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.sonner svg { width: 15px; height: 15px; }
.sonner:hover, .sonner:focus-visible { border-color: rgba(224, 163, 173, .55); color: #fff; background: rgba(163, 17, 35, .16); }
.sonner:disabled { opacity: .38; cursor: not-allowed; background: transparent; border-color: rgba(255, 255, 255, .16); color: #d0c2b1; }
.sonnette-bandeau { margin: 12px 0 0; padding: 10px 12px; background: #2a1215; border: 1px solid rgba(192, 20, 43, .5); border-left: 3px solid var(--blood-bright); font: 500 13px/1.45 var(--sans); color: #f2c4cb; }
.sonnette-bandeau.sonne { animation: sonne .18s steps(2) 6; }
@keyframes sonne { 50% { translate: 3px 0; border-left-color: #fff; } }

/* la composition : les cartes des rôles, leur nombre en pastille carrée */
.compo { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(56 * var(--g)), 1fr)); gap: 10px; }
.compo-role { position: relative; display: block; }
.compo-role img { display: block; width: 100%; height: auto; }
.compo-role .nb { position: absolute; right: -6px; bottom: -6px; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 4px; background: #1a1310; border: 1px solid rgba(232, 176, 106, .5); font: 600 10px/1 var(--sans); color: #e8b06a; }
/* les rôles tombés, sous un filet, en grisaille */
.compo-morts { margin-top: 13px; padding-top: 13px; border-top: 1px solid rgba(255, 255, 255, .1); }
.compo-morts img { filter: grayscale(1) brightness(.45); }
.compo-morts .nb { border-color: rgba(255, 255, 255, .22); color: #9b8f81; }
/* devant le pseudo, le rôle qu'on connaît : violet pour une Ombre, ambre sinon */
.voix .revele { margin-right: 5px; font-style: normal; font-weight: 600; color: #e8b06a; }
.voix .revele.ombres { color: #b79ae0; }
.page-partie .voir-plus { width: 100%; justify-content: center; margin: 12px 0 0; }
.voir-plus:disabled { opacity: .4; cursor: not-allowed; }

/* les invitations : le lien, puis copier et révoquer */
.invitation-ligne { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; margin-bottom: 8px; }
.invitation-ligne input { min-width: 0; height: 32px; padding: 0 8px; border: 1px solid rgba(255, 255, 255, .13); background: rgba(255, 255, 255, .04); color: #d5c9ba; font: 400 12px/1 var(--sans); }
.mini { height: 32px; padding: 0 10px; border: 1px solid rgba(255, 255, 255, .16); background: transparent; color: #d0c2b1; font: 600 11px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.mini:hover, .mini:focus-visible { border-color: rgba(224, 163, 173, .55); color: #fff; background: rgba(163, 17, 35, .16); }
/* le lien vient d'être copié */
.mini.copie, .reglages-partie.copie { border-color: var(--blood-bright); color: var(--cream); }

/* le lancement : éteint tant que la table n'est pas prête */
.lancer-bouton { width: 100%; height: 44px; }
.creer:disabled { opacity: .38; cursor: not-allowed; transform: none; }
.creer:disabled:hover { background: var(--blood-bright); }

/* ---------- la partie et la salle d'attente : même charpente, les trois colonnes à hauteur d'écran ---------- */
.page-partie .partie-grille { min-height: calc(100svh - var(--nav-h) - 120px); }
/* la salle : titres plus serrés (le volet de la composition porte aussi « Modifier les paramètres ») */
.page-attente .titre-ligne { gap: 6px 10px; }
.page-attente .titre-ligne .profil-titre { flex: 0 1 auto; min-width: 0; letter-spacing: .18em; }
/* l'hôte revoit les conditions depuis le volet de la composition */
.page-partie .regler-partie { width: auto; height: 24px; margin: 0 0 0 auto; padding: 0 9px; gap: 5px; font-size: 11px; }
.regler-partie svg { width: 13px; height: 13px; transition: rotate .35s; }
.regler-partie:hover svg, .regler-partie:focus-visible svg { rotate: 60deg; }
.recap-carte { display: flex; flex-direction: column; min-height: 0; }
.encart { padding: 11px 12px; background: rgba(13, 10, 9, .38); border: 1px solid rgba(255, 255, 255, .07); }

/* le récapitulatif : les morts, tour après tour, et à sa clôture les voix, les totaux et le verdict du conseil */
.recap-case { max-height: 320px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent; }
.recap-case p { margin: 0 0 7px; font: 400 12.5px/1.5 var(--sans); color: #b7aa9a; }
.recap-case p:last-child { margin-bottom: 0; }
.recap-case time, .mot time { margin-right: 8px; font-size: .8em; font-weight: 400; font-variant-numeric: tabular-nums; color: #7d7165; }
.recap-case b { font-weight: 600; color: #d9cdbd; }
.recap-case .recap-vide { font-style: italic; color: #8d8073; }
.recap-case .recap-tour { margin: 14px 0 8px; font: 600 10.5px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: #e8b06a; }
.recap-case .recap-tour:first-child { margin-top: 0; }
.recap-case .recap-retrait { color: #8d8073; }
.recap-case .recap-verdict { color: #e8899a; }
.recap-case .recap-verdict b { color: #f0a9b4; }
.recap-case .recap-ombres, .recap-case .recap-ombres b { color: #cbb2ea; }

/* le choix des Ombres : leur violet (celui de la maquette), des cases carrées */
.conclave { margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(150, 110, 200, .28); }
.conclave .profil-titre { color: #b79ae0; }
.rebours-ombres { margin: 0 0 6px; text-align: center; font: 700 52px/1 var(--serif); font-variant-numeric: tabular-nums; color: #c9a4e6; }
.rebours-ombres.presse { color: #e08cb0; animation: pouls 1s ease-in-out infinite; }
.rebours-ombres-sous, .rebours-sous { margin: 0 0 13px; text-align: center; font: 500 10.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.cibles { display: grid; gap: 4px; }
.cibles form, .voix form { margin: 0; display: flex; }
.cible { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 1px solid transparent; background: transparent; text-align: left; font: 500 14px/1.3 var(--sans); color: #e8dfd0; cursor: pointer; transition: background .15s, border-color .15s; }
.cible:hover, .cible:focus-visible { background: rgba(150, 110, 200, .16); border-color: rgba(150, 110, 200, .4); }
.rond-ombre { flex: none; width: 17px; height: 17px; display: grid; place-items: center; border: 2px solid rgba(150, 110, 200, .55); }
.cible.choisie { background: rgba(150, 110, 200, .2); border-color: rgba(150, 110, 200, .6); }
.cible.choisie .rond-ombre { background: #9a6fd0; border-color: #b79ae0; }
.cible.choisie .rond-ombre::after { content: ""; width: 5px; height: 5px; background: #fff; }
.cible-nom { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conclave-aide { margin: 11px 0 0; font-size: 12px; font-style: italic; line-height: 1.5; color: #8d8073; }

/* l'arrêt à la parité : un filet rouge, le compte des voix, un bouton plein largeur qui reste enfoncé une fois voté */
.arret { margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(200, 60, 60, .35); }
.arret form { margin: 0; }
.arret-compte { font: 600 12px/1 var(--sans); font-variant-numeric: tabular-nums; color: var(--muted); }
.arret-bouton { width: 100%; height: 40px; border: var(--bord-rouge); background: transparent; color: #e8dfd0; font: 600 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; cursor: pointer; transition: background .2s; }
.arret-bouton:hover, .arret-bouton:focus-visible { background: rgba(200, 60, 60, .18); }
.arret-bouton[aria-pressed="true"] { background: var(--blood-bright); color: #fff; }

/* le fil du conseil, dans la taille choisie (--chat-taille, posée sur <html>) */
.journal-carte { display: flex; flex-direction: column; min-height: 0; }
.taille-lettres { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
.taille-lettres .a { font-weight: 600; line-height: 1; color: #8d8073; }
.taille-lettres .a.min { font-size: 10px; }
.taille-lettres .a.max { font-size: 16px; }
.taille-lettres input { width: 96px; height: 4px; margin: 0; appearance: none; background: rgba(255, 255, 255, .16); cursor: pointer; }
.taille-lettres input::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; background: var(--blood-bright); border: 1px solid rgba(255, 255, 255, .4); }
.taille-lettres input::-moz-range-thumb { width: 12px; height: 12px; border-radius: 0; background: var(--blood-bright); border: 1px solid rgba(255, 255, 255, .4); }
.taille-lettres .valeur { min-width: 40px; font: 600 10.5px/1 var(--sans); font-variant-numeric: tabular-nums; color: #8d8073; }
.journal-fil { flex: 1; min-height: 240px; max-height: 62vh; overflow-y: auto; padding: 0; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent; }
.mot { margin: 0; padding: 6px 12px; font: 400 13.5px/1.55 var(--sans); font-size: var(--chat-taille, 13.5px); color: #f4efe7; }
.mot + .mot { margin-top: 2px; }
.mot b { font-weight: 600; color: #fff; }
/* la parole : le fond ne change qu'au changement d'orateur (comme la maquette) */
.mot.g0 { background: rgba(255, 255, 255, .07); }
.mot.g1 { background: rgba(255, 255, 255, .025); }
/* les annonces parlent un cran plus fort que la table */
.mot.systeme, .mot.vote, .mot.ombres, .mot.perso { font-weight: 600; font-size: calc(var(--chat-taille, 13.5px) + 2px); }
/* sans fond de couleur : seule la police dit qui parle (choix de l'utilisateur) */
.mot.systeme, .mot.systeme b { color: #e8c48e; }
/* les voix du conseil : en rouge, grasses, bien visibles */
.mot.vote { color: #ff5c70; }
.mot.vote b { color: inherit; }
/* les Ombres frappent : le meurtre en violet, plus grand que le reste */
.mot.ombres { font-style: italic; color: #c9a0f2; }
.mot.ombres b { color: inherit; }
.mot.ombres.mortelle { font-size: calc(var(--chat-taille, 13.5px) * 1.4); line-height: 1.45; }
/* ce qui ne regarde que vous : en gris */
.mot.perso { color: #a59c91; }
.mot.perso b { color: inherit; }
/* la parole : le nom de l'orateur en tête ; le murmure des Ombres, en violet */
.mot.parole b { margin-right: 4px; color: #e8b06a; }
.mot.murmure { color: #d8c4f0; }
.mot.murmure b { color: #c9a4e6; }
/* le message des Ombres : leurs phrases en cours d'écriture, puis le message lu à toute la table */
.mot.manifeste { font-style: italic; color: #c9a0f2; }
.mot.manifeste b { font-style: normal; color: #dcc2fa; }
.manifeste-tours ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.manifeste-tours li { display: flex; align-items: baseline; gap: 8px; padding: 6px 10px; background: rgba(13, 10, 9, .38); border: 1px solid rgba(150, 110, 200, .2); font: 500 13px/1.3 var(--sans); color: #e2d6f0; }
.manifeste-tours li time { margin-left: auto; font-size: 11.5px; font-variant-numeric: tabular-nums; color: #8d8073; }
.manifeste-tours li i { font-size: 11.5px; color: #b79ae0; }
.manifeste-tours li.mien { border-color: #9a6fd0; }
.manifeste-tours li.ecrit { opacity: .6; }
.journal-saisie.manifeste input[name="message"] { border-color: rgba(150, 110, 200, .7); font-style: italic; }
.journal-saisie.manifeste button { border-color: #9a6fd0; background: rgba(140, 90, 190, .2); }
.journal-saisie { flex: none; display: flex; align-items: flex-end; gap: 9px; margin-top: 12px; }
.journal-saisie :is(input, textarea)[name="message"] { flex: 1; min-width: 0; height: 40px; padding: 0 16px; border: 1px solid rgba(255, 255, 255, .13); background: rgba(255, 255, 255, .04); color: var(--cream); font: 400 13.5px/1 var(--sans); outline: none; transition: border-color .25s, background .25s; }
/* la zone des messages privés : le texte passe à la ligne, elle grandit avec lui (contrôleur parole), puis défile */
.journal-saisie textarea[name="message"] { display: block; height: auto; min-height: 40px; max-height: 132px; padding: 8px 16px; resize: none; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent; font-size: 14.5px; line-height: 1.45; overflow-wrap: anywhere; }
.journal-saisie :is(input, textarea)[name="message"]::placeholder { color: #8e8479; }
.journal-saisie :is(input, textarea)[name="message"]:focus { border-color: rgba(192, 20, 43, .6); background: rgba(255, 255, 255, .06); }
.journal-saisie button { flex: none; height: 40px; padding: 0 20px; border: 1px solid #a31123; background: transparent; color: var(--cream); font: 600 13px/1 var(--sans); cursor: pointer; transition: background .25s; }
.journal-saisie button:hover, .journal-saisie button:focus-visible { background: rgba(163, 17, 35, .22); }
.journal-saisie.murmure input[name="message"]:focus { border-color: rgba(150, 110, 200, .7); }
.journal-saisie.murmure button { border-color: rgba(150, 110, 200, .7); }
.journal-silence { margin: 12px 0 0; font: italic 400 13px/1.4 var(--sans); color: #8d8073; }
/* le présage : tout s'assombrit, un mot pour la victime seule (sans flou, comme le reste du site) */
.presage { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 30px; background: radial-gradient(60% 60% at 50% 50%, rgba(30, 8, 14, .55), rgba(6, 4, 4, .88)); pointer-events: none; animation: presage-vient .5s ease both; }
.presage[hidden] { display: none; }
.presage p { max-width: 22ch; margin: 0; text-align: center; font: 600 clamp(28px, 4.4vw, 52px)/1.25 var(--serif); color: #f0e8da; animation: presage-souffle 1.5s ease-in-out infinite; }
.presage small { display: block; margin-top: 18px; font: 500 12px/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: #e0839a; }
@keyframes presage-vient { from { opacity: 0; } }
@keyframes presage-souffle { 50% { opacity: 1; transform: scale(1.02); } 0%, 100% { opacity: .82; } }
.fin-partie { margin: 12px 0 0; padding: 12px 14px; border: 1px solid rgba(232, 176, 106, .4); background: rgba(232, 176, 106, .08); font: 500 15px/1.5 var(--sans); color: var(--cream); }

/* votre rôle et la composition : des cartes qui ouvrent leur fiche */
.carte-role, button.compo-role { padding: 0; border: 0; background: none; cursor: pointer; transition: transform .2s; }
.carte-role { display: block; width: min(calc(150 * var(--g)), 100%); margin: 0 auto; }
.carte-role img { display: block; width: 100%; height: auto; }
.carte-role:hover, .carte-role:focus-visible, button.compo-role:hover, button.compo-role:focus-visible { transform: translateY(-2px); }

/* le compte à rebours ; les dix dernières secondes s'alarment */
.rebours { margin: 0; text-align: center; font: 700 32px/1 var(--serif); font-variant-numeric: tabular-nums; color: var(--cream); }
.rebours.presse { color: var(--blood-bright); animation: pouls 1s ease-in-out infinite; }
.rebours + .rebours-sous { margin: 7px 0 0; }

/* la table : le soupçon à gauche, le pseudo, le bulletin de vote ; vous, en or */
.voix.moi { border-color: rgba(232, 176, 106, .55); background: rgba(232, 176, 106, .08); }
.voix.moi .voix-nom { color: #f3d29a; }
.vous { flex: none; padding: 3px 6px; border: 1px solid #e8b06a; background: rgba(232, 176, 106, .16); font: 700 10.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #f3c27a; }
/* parti en cours de partie : son rôle, dévoilé à tous */
.depart { flex: none; font: 600 10.5px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--blood-bright); }
.voix.morte { color: #8d8073; }
.voix.morte .voix-nom { text-decoration: line-through; }
/* les morts, rangés sous les vivants par cause */
.voix-groupe { margin: 14px 0 6px; font: 600 10.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: #8d8073; }
.voix-groupe + .voix-liste .voix { background: rgba(13, 10, 9, .2); }
/* le bulletin de vote, juste après le pseudo : glissé dans l'urne, il désigne le joueur ; posé, il passe au sang */
.sceau-vote { flex: none; width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(224, 54, 75, .55); background: rgba(192, 20, 43, .1); color: #f0a9b4; cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .15s; }
.sceau-vote svg { width: 18px; height: 18px; }
.sceau-vote:hover, .sceau-vote:focus-visible { background: rgba(192, 20, 43, .32); border-color: #e0364b; color: #fff; transform: translateY(-1px); }
.sceau-vote.actif { background: var(--blood-bright); border-color: #ff5d70; color: #fff; }
/* les voix reçues : un compte, pas de noms */
.nb-voix { flex: none; min-width: 22px; height: 22px; display: inline-grid; place-items: center; padding: 0 5px; background: rgba(192, 20, 43, .28); border: 1px solid rgba(224, 54, 75, .6); font: 700 12px/1 var(--sans); font-variant-numeric: tabular-nums; color: #ffd0d6; }

/* le carnet de soupçons, à gauche du pseudo : une petite carte par joueur, et son choix de rôles */
.soupcon-zone { position: relative; flex: none; }
.soupcon { display: block; width: 26px; height: 26px; padding: 0; border: 1px dashed rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .03) center / cover no-repeat; color: #8d8073; font: 600 12px/1 var(--sans); cursor: pointer; transition: border-color .15s; }
.soupcon:hover, .soupcon:focus-visible { border-color: rgba(232, 176, 106, .55); }
.soupcon.pose { border-style: solid; border-color: rgba(232, 176, 106, .5); }
.soupcon.pose.s-ombre { border-color: rgba(150, 110, 200, .65); }
.soupcon-menu { position: absolute; left: 0; top: calc(100% + 4px); z-index: 6; display: flex; gap: 6px; padding: 7px; background: #17100e; border: 1px solid rgba(255, 255, 255, .13); }
.soupcon-menu button { width: 32px; height: 32px; padding: 0; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .04); color: #b3a698; font: 600 14px/1 var(--sans); cursor: pointer; transition: border-color .15s, transform .15s; }
.soupcon-menu img { display: block; width: 100%; height: 100%; object-fit: cover; }
.soupcon-menu button:hover, .soupcon-menu button:focus-visible { border-color: rgba(232, 176, 106, .6); transform: translateY(-1px); }

/* les pouvoirs du Martyr et du Parasite */
.capacite form { display: grid; gap: 8px; margin-top: 10px; }
.capacite label { font: 600 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #9d8d7d; }
.capacite select { height: 38px; padding: 0 8px; border: 1px solid rgba(255, 255, 255, .16); background: #1a1310; color: var(--cream); font: 400 14px/1 var(--sans); }
.capacite .creer { margin-top: 4px; }

/* la fiche d'un rôle */
.fenetre-role { position: relative; width: min(calc(430 * var(--g)), 100%); margin: auto; padding: 34px 32px 30px; text-align: center; background: linear-gradient(168deg, #251c18, #110c0b); border: var(--trait); animation: rise .3s cubic-bezier(.2, .7, .2, 1) both; }
.fenetre-role .fermer { color: #9a8b7d; }
.fenetre-role .fermer:hover { background: rgba(192, 20, 43, .2); color: var(--cream); }
.role-image { display: block; width: calc(150 * var(--g)); height: calc(150 * var(--g)); margin: 0 auto 18px; border: 1px solid rgba(232, 176, 106, .35); }
.fenetre-role h2 { margin: 0 0 9px; font: 600 25px/1.2 var(--serif); color: var(--cream); }
.fenetre-role .puces { justify-content: center; margin-bottom: 14px; }
.role-detail { margin: 0; font-size: 15px; line-height: 1.65; color: #c9bcac; }

/* ---------- le catalogue des rôles : des cartes posées sur le parchemin ---------- */
.catalogue-roles .roles-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(118 * var(--g)), 1fr)); gap: 22px 18px; margin: 18px 0 0; padding: 0; list-style: none; }
.catalogue-roles .roles-grille li { margin: 0; }
.role-carte { display: grid; justify-items: center; gap: 4px; width: 100%; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; text-align: center; transition: transform .2s; }
.role-carte img { display: block; width: 100%; height: auto; margin-bottom: 6px; border: 1px solid rgba(70, 48, 26, .45); }
.role-carte:hover, .role-carte:focus-visible { transform: translateY(-3px); }
.role-carte-nom { font: 600 15px/1.25 var(--serif); color: #241a12; }
.role-carte-etat { font: 600 9.5px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: #8a6d45; }

/* ---------- le compte : un bouton dans la barre, et son menu ---------- */
/* l'avatar : un carré qui porte la silhouette, en attendant les photos de profil */
.avatar { position: relative; flex: none; width: 32px; height: 32px; border: 1px solid rgba(255, 255, 255, .14); background: #2a201b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%237d6f63'%3E%3Cpath fill-rule='evenodd' d='M12.0001 1.25C9.37678 1.25 7.25013 3.37665 7.25013 6C7.25013 8.62335 9.37678 10.75 12.0001 10.75C14.6235 10.75 16.7501 8.62335 16.7501 6C16.7501 3.37665 14.6235 1.25 12.0001 1.25ZM8.75013 6C8.75013 4.20507 10.2052 2.75 12.0001 2.75C13.7951 2.75 15.2501 4.20507 15.2501 6C15.2501 7.79493 13.7951 9.25 12.0001 9.25C10.2052 9.25 8.75013 7.79493 8.75013 6Z'/%3E%3Cpath fill-rule='evenodd' d='M12.0001 12.25C9.68658 12.25 7.55506 12.7759 5.97558 13.6643C4.41962 14.5396 3.25013 15.8661 3.25013 17.5L3.25007 17.602C3.24894 18.7638 3.24752 20.222 4.52655 21.2635C5.15602 21.7761 6.03661 22.1406 7.22634 22.3815C8.4194 22.6229 9.97436 22.75 12.0001 22.75C14.0259 22.75 15.5809 22.6229 16.7739 22.3815C17.9637 22.1406 18.8443 21.7761 19.4737 21.2635C20.7527 20.222 20.7513 18.7638 20.7502 17.602L20.7501 17.5C20.7501 15.8661 19.5807 14.5396 18.0247 13.6643C16.4452 12.7759 14.3137 12.25 12.0001 12.25ZM4.75013 17.5C4.75013 16.6487 5.37151 15.7251 6.71098 14.9717C8.02693 14.2315 9.89541 13.75 12.0001 13.75C14.1049 13.75 15.9733 14.2315 17.2893 14.9717C18.6288 15.7251 19.2501 16.6487 19.2501 17.5C19.2501 18.8078 19.2098 19.544 18.5265 20.1004C18.156 20.4022 17.5366 20.6967 16.4763 20.9113C15.4194 21.1252 13.9744 21.25 12.0001 21.25C10.0259 21.25 8.58087 21.1252 7.52393 20.9113C6.46366 20.6967 5.84425 20.4022 5.47372 20.1004C4.79045 19.544 4.75013 18.8078 4.75013 17.5Z'/%3E%3C/svg%3E") center / 62% no-repeat; }
.avatar.grand { width: calc(46 * var(--u)); height: calc(46 * var(--u)); }
.avatar.enorme { width: calc(92 * var(--u)); height: calc(92 * var(--u)); border-width: 2px; }
.compte { position: relative; }
.compte-bouton { height: 42px; display: inline-flex; align-items: center; gap: 10px; padding: 0 14px 0 4px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .04); color: var(--cream); font: 600 14px/1 var(--sans); cursor: pointer; transition: border-color .2s, background .2s; }
.compte-bouton:hover, .compte-bouton:focus-visible, .compte.ouvert .compte-bouton { border-color: rgba(192, 20, 43, .55); background: rgba(255, 255, 255, .07); }
.compte-nom { max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chevron { width: 13px; height: 13px; color: #9a8b7d; transition: transform .25s; }
.compte.ouvert .chevron { transform: rotate(180deg); }
.menu-compte { position: absolute; top: calc(100% + 12px); right: 0; z-index: 30; width: calc(352 * var(--u)); background: linear-gradient(168deg, #251c18, #120d0b); border: 1px solid rgba(255, 255, 255, .1); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s, transform .2s, visibility .2s; }
.compte.ouvert .menu-compte { opacity: 1; visibility: visible; transform: none; }
.pc-tete { display: flex; align-items: center; gap: calc(14 * var(--u)); padding: calc(20 * var(--u)) calc(18 * var(--u)); border-bottom: 1px solid rgba(255, 255, 255, .08); background: linear-gradient(150deg, rgba(125, 18, 32, .22), transparent 70%); }
.pc-ident { flex: 1; min-width: 0; }
.pc-ident b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 18px/1.2 var(--serif); color: var(--cream); }
.pc-ident span { display: block; margin-top: 4px; font-size: 12px; color: #9a8b7d; }
/* l'engrenage des paramètres, aligné sur l'avatar */
.pc-reglages { flex: none; width: calc(42 * var(--u)); height: calc(42 * var(--u)); display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .04); color: #b3a698; transition: color .2s, border-color .2s, background .2s; }
.pc-reglages svg, .profil-reglages svg { width: calc(20 * var(--u)); height: calc(20 * var(--u)); }
.pc-reglages:hover, .pc-reglages:focus-visible { border-color: rgba(192, 20, 43, .5); background: rgba(192, 20, 43, .14); color: var(--cream); }
/* l'expérience : le grade, les chiffres et la jauge */
.xp { padding: calc(16 * var(--u)) calc(18 * var(--u)) calc(18 * var(--u)); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.xp-ligne { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.grade { display: inline-flex; align-items: center; gap: 8px; padding: 5px 11px; white-space: nowrap; border: 1px solid rgba(232, 176, 106, .35); background: rgba(232, 176, 106, .12); font: 600 11px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #e8b06a; }
.grade::before { content: ""; width: 6px; height: 6px; background: #e8b06a; transform: rotate(45deg); }
.xp-chiffres { white-space: nowrap; font: 600 12px/1 var(--sans); color: #b3a698; }
.jauge-xp { height: 7px; overflow: hidden; background: rgba(255, 255, 255, .07); }
.jauge-xp i { display: block; height: 100%; background: linear-gradient(90deg, #8f0d1c, #c8152e 55%, #e8b06a); }
.xp-suite { margin: 9px 0 0; font-size: 11.5px; color: #7d7165; }
/* amis et messages, en deux onglets */
.pc-onglets { display: grid; grid-template-columns: 1fr 1fr; gap: calc(6 * var(--u)); padding: calc(12 * var(--u)) calc(12 * var(--u)) calc(6 * var(--u)); }
.pc-onglet { display: inline-flex; align-items: center; justify-content: center; gap: calc(8 * var(--u)); padding: calc(10 * var(--u)) calc(6 * var(--u)); border: 1px solid transparent; background: transparent; color: #8d8073; font: 600 11.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.pc-onglet:hover { color: #c9bcac; }
.pc-onglet[aria-selected="true"] { border-color: rgba(255, 255, 255, .09); background: rgba(255, 255, 255, .06); color: var(--cream); }
.pastille { min-width: 19px; padding: 0 6px; background: rgba(255, 255, 255, .12); font-size: 10.5px; line-height: 18px; letter-spacing: 0; color: #c9bcac; }
.pc-liste { max-height: calc(244 * var(--u)); overflow-y: auto; padding: calc(4 * var(--u)) calc(8 * var(--u)) calc(10 * var(--u)); }
.pc-vide { margin: 0; padding: calc(14 * var(--u)) calc(11 * var(--u)); font-size: 13px; font-style: italic; color: #8d8073; }
.pc-pied { padding: calc(12 * var(--u)); border-top: 1px solid rgba(255, 255, 255, .08); background: rgba(0, 0, 0, .2); }
.pc-pied form { margin: 0; }
.pc-profil { height: calc(46 * var(--u)); display: flex; align-items: center; justify-content: center; background: linear-gradient(#c8152e, #8f0d1c 60%, #6d0d18); color: #fff; font: 600 12.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; transition: transform .18s; }
.pc-profil:hover, .pc-profil:focus-visible { transform: translateY(-1px); }
.pc-quitter { width: 100%; height: calc(40 * var(--u)); margin-top: calc(8 * var(--u)); display: flex; align-items: center; justify-content: center; gap: 9px; border: 0; background: transparent; color: #a29384; font: 600 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; cursor: pointer; transition: background .15s, color .15s; }
.pc-quitter svg { width: 16px; height: 16px; }
.pc-quitter:hover, .pc-quitter:focus-visible { background: rgba(192, 20, 43, .14); color: #f0899a; }

/* ---------- la fiche d'un joueur : en fenêtre, ou en page ---------- */
.fenetre-profil { position: relative; width: min(calc(780 * var(--u)), 100%); min-height: calc(220 * var(--u)); margin: auto; background: linear-gradient(168deg, #251c18, #110c0b); border: 1px solid rgba(255, 255, 255, .09); animation: rise .3s cubic-bezier(.2, .7, .2, 1) both; }
.fenetre-profil .fermer { color: #9a8b7d; }
/* le temps que la fiche arrive */
#profil:empty::before { content: "Ouverture de la fiche…"; display: block; padding: 40px 30px; font-style: italic; color: #8d8073; }
.fenetre-profil .fermer:hover { background: rgba(192, 20, 43, .2); color: var(--cream); }
.page-profil { min-height: calc(100svh - var(--nav-h)); display: grid; place-items: center; padding: 48px 24px; background: linear-gradient(#c3b190, #9e8e74); }
.page-profil .fiche-profil { width: min(calc(780 * var(--u)), 100%); background: linear-gradient(168deg, #251c18, #110c0b); border: 1px solid rgba(255, 255, 255, .09); }
.fiche-profil { position: relative; }
/* la fiche à la taille de la maquette : 780 sur un écran de 1920, et les mesures qu'elle contient suivent */
.fenetre-profil, .fiche-profil { --u: var(--g); }
/* les paramètres, en haut de la fiche, à gauche de la croix */
.profil-reglages { position: absolute; z-index: 2; top: calc(20 * var(--u)); right: calc(62 * var(--u)); height: calc(38 * var(--u)); display: inline-flex; align-items: center; gap: calc(9 * var(--u)); padding: 0 calc(16 * var(--u)); border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .05); color: #b3a698; font: 600 11.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; transition: color .2s, border-color .2s, background .2s; }
.profil-reglages svg { width: calc(17 * var(--u)); height: calc(17 * var(--u)); }
.profil-reglages:hover, .profil-reglages:focus-visible { border-color: rgba(192, 20, 43, .5); background: rgba(192, 20, 43, .16); color: var(--cream); }
.page-profil .profil-reglages { right: calc(20 * var(--u)); }
.profil-tete { display: flex; align-items: center; gap: calc(20 * var(--u)); padding: calc(20 * var(--u)) calc(30 * var(--u)) calc(18 * var(--u)); border-bottom: 1px solid rgba(255, 255, 255, .08); background: radial-gradient(90% 140% at 12% 0%, rgba(125, 18, 32, .35), transparent 62%), linear-gradient(rgba(255, 255, 255, .04), transparent); }
.profil-ident { flex: 1; min-width: 0; }
.profil-ident :is(h1, h2) { margin: 0; padding-right: calc(110px + 94 * var(--u)); overflow-wrap: anywhere; font: 600 24px/1.1 var(--serif); color: var(--cream); }
.profil-ident .xp { padding: calc(9 * var(--u)) 0 0; border: 0; }
.profil-ident .xp-ligne { margin-bottom: 6px; }
.depuis { margin: 3px 0 0; font-size: 12px; color: #8d8073; }
.profil-corps { padding: calc(22 * var(--u)) calc(30 * var(--u)) calc(28 * var(--u)); }
/* les chiffres : une ligne, séparée par des filets (l'ombre nette sert de filet et se coupe aux bords) */
/* les filets entre les cases : bordures haute et gauche de chaque case, celles du bord coupées par le cadre */
.stats { display: flex; flex-wrap: wrap; margin: 0; overflow: hidden; border: 1px solid rgba(255, 255, 255, .07); background: rgba(255, 255, 255, .035); }
.stat { flex: 1 1 0; min-width: calc(100 * var(--u)); display: flex; flex-direction: column; gap: calc(9 * var(--u)); padding: calc(11 * var(--u)) calc(8 * var(--u)) calc(10 * var(--u)); text-align: center; margin: -1px 0 0 -1px; border-top: 1px solid rgba(255, 255, 255, .06); border-left: 1px solid rgba(255, 255, 255, .06); }
/* le chiffre en tête, même quand le libellé tient sur deux lignes */
.stat dd { order: -1; margin: 0; font: 700 20px/1.1 var(--serif); color: var(--cream); }
.stat dt { font: 600 9px/1.3 var(--sans); letter-spacing: .13em; text-transform: uppercase; color: #8d8073; }
.profil-corps .titre-ligne { margin: calc(28 * var(--u)) 0 calc(13 * var(--u)); }
.profil-corps .titre-ligne:first-of-type { margin-top: calc(16 * var(--u)); }
.profil-corps .profil-titre { flex: 1; display: flex; align-items: center; gap: 14px; color: #8d8073; }
.profil-corps .profil-titre::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, .09); }
.lien-tout { font: 600 9.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: #8d8073; }
.lien-tout:hover, .lien-tout:focus-visible { color: var(--cream); text-decoration: underline; text-underline-offset: 4px; }
/* l'historique : le rôle tenu, la table, la date et l'issue */
.parties { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.partie { display: flex; flex-wrap: wrap; align-items: center; gap: calc(8 * var(--u)) calc(12 * var(--u)); padding: calc(9 * var(--u)) calc(12 * var(--u)); border: 1px solid rgba(226, 212, 178, .26); background: rgba(226, 212, 178, .2); transition: background .2s, border-color .2s; }
.partie:hover, .partie:focus-visible { border-color: rgba(226, 212, 178, .34); background: rgba(226, 212, 178, .27); }
.partie-carte { flex: none; width: calc(44 * var(--u)); height: calc(44 * var(--u)); display: grid; place-items: center; border: 1px solid rgba(232, 176, 106, .28); background: #1a1310; font: 600 16px/1 var(--serif); color: #8d8073; }
.partie-role { flex: none; min-width: 84px; font: 600 15px/1.2 var(--serif); color: var(--cream); }
.partie .puces { flex: 1 1 auto; gap: 5px; }
.partie .puce { height: 18px; padding: 0 8px; font: 500 9.5px/1 var(--sans); }
.puce.survie { background: rgba(79, 157, 82, .13); border-color: rgba(79, 157, 82, .35); color: #8fc992; }
.puce.fin { background: rgba(192, 20, 43, .12); border-color: rgba(192, 20, 43, .32); color: #e8899a; }
.partie-quand { flex: none; margin-left: auto; font: 600 12px/1 var(--sans); color: #c9bcac; }
.issue { flex: none; min-width: 72px; height: 18px; display: inline-flex; align-items: center; justify-content: center; padding: 0 8px; font: 600 8.5px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.issue.en-cours { border: 1px solid rgba(79, 157, 82, .45); background: rgba(79, 157, 82, .16); color: #8fc992; }
.issue.terminee { border: 1px solid rgba(255, 255, 255, .22); color: #b3a698; }
.issue.gagne { border: 1px solid rgba(79, 157, 82, .45); background: rgba(79, 157, 82, .16); color: #8fc992; }
.issue.perdu { border: 1px solid rgba(192, 20, 43, .4); background: rgba(192, 20, 43, .14); color: #e8899a; }
.profil-vide { margin: 0; font-size: 14px; color: #a89a8b; }
/* Mes parties : la carte part du haut de la page, et se feuillette par pages */
.page-historique { place-items: start center; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: calc(22 * var(--u)); }
.pagination-rang { font: 600 11px/1 var(--sans); letter-spacing: .12em; color: #8d8073; }
.profil-vide a { color: #e8b06a; text-decoration: underline; text-underline-offset: 3px; }
/* un nom de joueur ouvre sa fiche */
.voix-nom a { color: inherit; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: text-decoration-color .2s; }
.voix-nom a:hover, .voix-nom a:focus-visible { text-decoration-color: currentColor; }

/* ---------- les paramètres du compte : le menu des rubriques à gauche, la rubrique ouverte à droite ----------
   Sous 860 px, une seule colonne : /compte n'est que le menu, chaque rubrique s'ouvre seule avec son retour. */
.traite-page > .reglages { position: relative; z-index: 1; display: grid; grid-template-columns: calc(300 * var(--g)) minmax(0, 1fr); gap: calc(24 * var(--g)); align-items: start; width: min(calc(980 * var(--g)), 100%); }
.traite.reglages-menu { padding: 30px 22px 24px; }
.reglages-menu ul { margin: 0; padding: 0; list-style: none; }
.rm-tete { display: flex; align-items: center; gap: 12px; padding: 0 12px 20px; border-bottom: 1px solid rgba(70, 48, 26, .3); color: #241a12; }
.rm-tete .avatar { width: 46px; height: 46px; }
.rm-ident { display: grid; gap: 4px; min-width: 0; }
.rm-ident b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 17px/1.2 var(--serif); }
.rm-ident span { font: 600 10.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: #8a6d45; transition: color .2s; }
.rm-tete:hover .rm-ident span, .rm-tete:focus-visible .rm-ident span { color: var(--blood); }
.rm-titre { margin: 22px 12px 4px; font: 700 25px/1.2 var(--serif); color: #241a12; }
.rm-groupe { margin: 20px 12px 6px; font: 600 10.5px/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: #8a6d45; }
.rm-lien { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 11px 12px; border: 0; border-left: 2px solid transparent; background: transparent; color: #3a2a1a; font: 500 15px/1.3 var(--sans); text-align: left; cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.rm-lien svg { flex: none; width: 16px; height: 16px; color: #8a6d45; transition: color .2s, transform .2s; }
.rm-lien:hover, .rm-lien:focus-visible { background: rgba(125, 18, 32, .07); color: #241a12; }
.rm-lien:hover svg, .rm-lien:focus-visible svg { color: var(--blood); transform: translateX(2px); }
.rm-lien.ouvert { border-left-color: var(--blood); background: rgba(125, 18, 32, .1); color: #241a12; font-weight: 600; }
.rm-lien.ouvert svg { color: var(--blood); }
.rm-lien.grave { color: var(--blood); }
.reglages-menu .rm-pied { margin-top: 20px; padding-top: 12px; border-top: 1px solid rgba(70, 48, 26, .3); }
.traite.clauses.reglages-volet { width: 100%; padding: 44px 52px 40px; }
.rv-entete .f-titre { margin-bottom: 6px; font-size: 25px; text-align: left; }
.rv-entete .f-sous { max-width: none; margin: 0; }
.rv-retour { display: none; align-items: center; gap: 6px; font: 600 11px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #7a5f3c; }
.rv-retour svg { width: 15px; height: 15px; }
.rv-retour:hover, .rv-retour:focus-visible { color: var(--blood); }
.rv-intertitre { margin: 0 0 6px; font: 600 10.5px/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--blood); }
.clauses section > .rv-intertitre:not(:first-child) { margin-top: 22px; }
.clauses section > .rv-note { margin-top: 18px; font-size: 14px; line-height: 1.55; color: #6b5338; }
.reglages-volet .parametres { max-width: calc(440 * var(--g)); }
@media (max-width: 860px) {
    .traite-page > .reglages { grid-template-columns: minmax(0, 1fr); width: min(calc(560 * var(--g)), 100%); }
    .reglages.accueil .reglages-volet, .reglages:not(.accueil) .reglages-menu { display: none; }
    .reglages.accueil .rm-lien.ouvert:not(:hover, :focus-visible) { border-left-color: transparent; background: transparent; font-weight: 500; }
    .reglages.accueil .rm-lien.ouvert svg { color: #8a6d45; }
    .rv-retour { display: inline-flex; }
    .traite.clauses.reglages-volet { padding: 36px 32px 32px; }
}
@media (max-width: 480px) {
    .traite.clauses.reglages-volet, .traite.reglages-menu { padding: 32px 22px 26px; }
}

.registre-compte form { max-width: calc(440 * var(--g)); }
.registre-compte :is(.aide, .erreur) { font-size: 12px; line-height: 1.45; }
.registre-compte .aide { color: #8a6d45; }
.registre-compte .erreur { color: #9d1329; }
.registre-compte .alerte { font-size: 13px; line-height: 1.45; color: var(--blood); }
/* les boutons des paramètres : petits, à la largeur de leur mot */
.registre-compte .signer { display: inline-block; width: auto; margin-top: 18px; padding: 8px 12px 6px; }
.registre-compte .signer-trace { padding: 2px 2px 0; }
.registre-compte .signer-ligne { margin: 8px 0 4px; }
.registre-compte .signer-mot { font-size: 26px; }
.registre-compte .f-sous a { color: #8a3040; text-decoration: underline; text-underline-offset: 3px; }
/* le départ : même bouton, à l'encre de sang */
.signer.grave .signer-mot { color: var(--blood); }
.signer.grave { border-color: rgba(125, 18, 32, .5); }

/* ---------- le Lore : l'étagère des livres fermés ---------- */
.page-lore { min-height: calc(100svh - var(--nav-h)); padding: calc(40 * var(--g)) 24px 56px; background: radial-gradient(70% 60% at 50% 30%, #3a2a20, #120d0b 75%); }
/* le titre de la page, pour les lecteurs d'écran et les moteurs : les livres parlent pour lui à l'écran */
.pour-lecteur { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* les reliures : le cuir de chaque livre */
.reliure-bordeaux { --cuir: #6a1824; --cuir-sombre: #34090f; }
.reliure-nuit { --cuir: #2a3550; --cuir-sombre: #0f1424; }
.reliure-mousse { --cuir: #3d4c2b; --cuir-sombre: #182013; }
.reliure-fauve { --cuir: #7a4d26; --cuir-sombre: #3b230f; }
/* les couvertures peintes : le titre et le dos sont dans l'image, recadrée sur le livre ; l'étagère a sa version réduite, sinon le navigateur fait grésiller le grain du cuir */
.couverture-signature { --couverture: url("../images/livres/signature-gfsunJm.webp"); --etagere: url("../images/livres/signature-etagere-AQFhIPP.webp"); --dos: url("../images/livres/signature-dos-QF1Trnt.webp"); }
.couverture-legendes { --couverture: url("../images/livres/legendes-NQNOTus.webp"); --etagere: url("../images/livres/legendes-etagere-ntIaCJz.webp"); --dos: url("../images/livres/legendes-dos-io7Occ0.webp"); }
.couverture-creatures { --couverture: url("../images/livres/creatures-xz5o6Mt.webp"); --etagere: url("../images/livres/creatures-etagere-1rOTd2E.webp"); --dos: url("../images/livres/creatures-dos-x8AQ9IK.webp"); }
.couverture-la-derniere-guerre { --couverture: url("../images/livres/la-derniere-guerre-7yWnI-R.webp"); --etagere: url("../images/livres/la-derniere-guerre-etagere-Xi5aFwT.webp"); --dos: url("../images/livres/la-derniere-guerre-dos-6QJFZ5-.webp"); }
.livre-ferme:is(.couverture-signature, .couverture-legendes, .couverture-creatures, .couverture-la-derniere-guerre) { aspect-ratio: 2 / 3; background: var(--etagere) center / 102% 102% no-repeat; clip-path: inset(0 round 6px); }
.livre-ferme:is(.couverture-signature, .couverture-legendes, .couverture-creatures, .couverture-la-derniere-guerre) :is(.livre-tranche, .couv-cadre),
.livre-ferme:is(.couverture-signature, .couverture-legendes, .couverture-creatures, .couverture-la-derniere-guerre)::before,
.livre-ferme:is(.couverture-signature, .couverture-legendes, .couverture-creatures, .couverture-la-derniere-guerre)::after { display: none; }
.livre:is(.couverture-signature, .couverture-legendes, .couverture-creatures, .couverture-la-derniere-guerre) .face.couverture { background: var(--couverture) center / 102% 102% no-repeat; }
.livre:is(.couverture-signature, .couverture-legendes, .couverture-creatures, .couverture-la-derniere-guerre) .face.dos { background: var(--dos) center / 102% 102% no-repeat; }
/* un livre peint a ses propres bords : ni le liseré des pages, ni les coins noirs de son image */
.livre:is(.couverture-signature, .couverture-legendes, .couverture-creatures, .couverture-la-derniere-guerre) .face:is(.couverture, .dos) { clip-path: inset(0 round 6px); }
.livre:is(.couverture-signature, .couverture-legendes, .couverture-creatures, .couverture-la-derniere-guerre) :is(.fb-holder.static, .fb-face):has(> .face:is(.couverture, .dos)),
.livre:is(.couverture-signature, .couverture-legendes, .couverture-creatures, .couverture-la-derniere-guerre) .fb-stage.single:has(.fb-holder.static > .face:is(.couverture, .dos)) { outline: 0; }
.livre:is(.couverture-signature, .couverture-legendes, .couverture-creatures, .couverture-la-derniere-guerre) .face:is(.couverture, .dos) .couv-cadre,
.livre:is(.couverture-signature, .couverture-legendes, .couverture-creatures, .couverture-la-derniere-guerre) .face:is(.couverture, .dos)::before { display: none; }
/* l'étagère : les livres debout, côte à côte */
.etagere { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: calc(40 * var(--g)) calc(48 * var(--g)); max-width: calc(1100 * var(--g)); margin: 0 auto; padding: 0; list-style: none; }
.etagere-vide { font: italic 500 16px var(--serif); color: #c9bcac; }
.livre-ferme { position: relative; display: block; width: calc(210 * var(--g)); max-width: 40vw; aspect-ratio: .7; container-type: inline-size; background: linear-gradient(150deg, var(--cuir), var(--cuir-sombre)); }
.livre-ferme::before { content: ""; position: absolute; inset: 0; opacity: .25; mix-blend-mode: multiply; background: var(--grain); pointer-events: none; }
/* la tranche des pages, côté ouverture */
.livre-ferme::after { content: ""; position: absolute; top: 4px; bottom: 4px; right: -6px; width: 6px; background: repeating-linear-gradient(#efe3c4 0 2px, #cdb98f 2px 3px); }
.livre-ferme:focus-visible { outline: 2px solid #c9a35a; outline-offset: -4px; }
.livre-tranche { position: absolute; z-index: 1; top: 0; bottom: 0; left: 0; width: 9%; background: linear-gradient(90deg, rgba(0, 0, 0, .45), rgba(255, 255, 255, .08) 60%, rgba(0, 0, 0, .25)); }
/* la couverture : cadre doré, sceau, titre gravé */
.couv-cadre { position: absolute; z-index: 1; inset: 8% 9% 8% 15%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5cqi; padding: 6cqi; border: 1px solid #c9a35a; outline: 1px solid rgba(201, 163, 90, .45); outline-offset: 1.6cqi; text-align: center; color: #d9b86c; }
.couv-cadre .sceau { height: 20cqi; margin: 0; }
.couv-titre { font: 700 11cqi/1.15 var(--serif); }
.couv-filet { width: 46%; height: 1px; background: #c9a35a; }
.couv-sous { font: italic 500 5.4cqi/1.4 var(--serif); color: #cdb27a; }

/* ---------- le Lore : le livre ouvert ---------- */
/* une page de 380 × 530 (à 1920 px), réduite si l'écran manque de place */
.page-livre { --page-w: min(calc(380 * var(--g)), 44vw, (100svh - var(--nav-h) - 170px) * 380 / 530); --page-h: calc(var(--page-w) * 530 / 380); display: grid; justify-items: center; align-content: start; gap: 22px; padding-top: 24px; overflow-x: hidden; }
.livre-barre { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; width: min(calc(2 * var(--page-w)), 100%); }
.page-livre[data-livre-affichage-value="simple"] .livre-barre { width: min(max(var(--page-w), 460px), 100%); }
.livre-rang { font: 600 11px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #b3a698; }
.livre-fleches { display: flex; gap: 8px; }
.livre-fleches .replier { width: 36px; height: 32px; font-size: 20px; }
.livre-fleches .replier:disabled { opacity: .35; cursor: default; }
/* sans JavaScript : les pages, l'une sous l'autre */
.livre:not(.assemble) { display: grid; gap: 22px; width: min(640px, 100%); }
.livre:not(.assemble) .face { position: relative; min-height: 420px; }
.livre:not(.assemble) .interieur { display: none; }
/* assemblé : flipbook-engine.js plie la page au coin ; fermé, le livre se centre sur sa couverture.
   Ni ombre ni flou : un liseré détache le livre, et seul un dégradé dans le papier modèle le pli */
.livre.assemble { position: relative; width: 100%; }
/* la boîte à la taille d'une page, où l'on mesure ce qui y tient */
.livre.livre-gabarit { position: absolute; visibility: hidden; overflow: hidden; width: var(--page-w); height: var(--page-h); }
.livre.attente { visibility: hidden; }
.fb-stage { position: relative; margin-inline: auto; }
.fb-stage.single { outline: 1px solid rgba(70, 48, 26, .55); }
.fb-book { position: absolute; left: 0; top: 0; height: var(--fb-h); transform-origin: 0 0; touch-action: pan-y; user-select: none; transition: transform .6s cubic-bezier(.3, .7, .2, 1); }
.fb-book.single { overflow: hidden; }
.fb-book.notrans { transition: none; }
.fb-holder { position: absolute; left: 0; top: 0; width: var(--fb-w); height: var(--fb-h); transform-origin: 0 0; }
.fb-holder.static { outline: 1px solid rgba(70, 48, 26, .55); }
.fb-book.single .fb-holder.static { outline: 0; }
[data-fb="L"], [data-fb="R"], [data-fb="under"] { z-index: 1; }
[data-fb="front"] { z-index: 2; }
.fb-backwrap { position: absolute; inset: 0; z-index: 3; }
.fb-hard { position: absolute; left: 0; top: 0; z-index: 3; width: var(--fb-w); height: var(--fb-h); }
.fb-face { position: absolute; inset: 0; outline: 1px solid rgba(70, 48, 26, .55); }
[data-fb="hardB"] { transform: scaleX(-1); }
.fb-shade { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.fb-pool { display: none; }
.fb-page { position: absolute; inset: 0; }
/* le creux de la reliure, côté intérieur */
.fb-page::after { content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.fb-page[data-side="R"]::after { background: linear-gradient(90deg, rgba(60, 40, 20, .3), rgba(60, 40, 20, .08) 3.5%, transparent 11%); }
.fb-page[data-side="L"]::after { background: linear-gradient(270deg, rgba(60, 40, 20, .3), rgba(60, 40, 20, .08) 3.5%, transparent 11%); }
.fb-page.blank { background: var(--parchemin); }
@media (prefers-reduced-motion: reduce) {
    .fb-book { transition: none; }
}

/* une page : le parchemin du traité, l'ombre de la reliure côté intérieur */
.livre .face { box-sizing: border-box; overflow: hidden; padding: calc(var(--page-w) * .1) calc(var(--page-w) * .1) calc(var(--page-w) * .13); color: #2a1e16; background: var(--parchemin); font: 400 max(13.5px, calc(var(--page-w) * .032))/1.62 var(--sans); }
.livre .face::before { content: ""; position: absolute; inset: 0; opacity: .3; mix-blend-mode: multiply; background: var(--grain); pointer-events: none; }
.livre .face > * { position: relative; }
/* la couverture et le dos, dans le cuir de la reliure */
.livre .face:is(.couverture, .dos) { padding: 0; container-type: inline-size; background: linear-gradient(150deg, var(--cuir), var(--cuir-sombre)); }
.livre .face:is(.couverture, .dos) .couv-cadre { position: absolute; }
.livre .dos .couv-cadre { inset: 8% 15% 8% 9%; }
/* la page de garde : titre et table des matières */
.livre .garde { display: flex; flex-direction: column; align-items: center; text-align: center; }
.garde-titre { margin: 0; font: 700 1.9em/1.15 var(--serif); color: #241a12; }
.garde-table { margin: .4em 0 .6em; font: 600 .7em/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: #8a6d45; }
.sommaire-livre { width: 100%; margin: 0; padding: 0; list-style: none; text-align: left; }
.sommaire-livre button { width: 100%; display: flex; justify-content: space-between; gap: 10px; padding: .4em 0; border: 0; border-bottom: 1px dotted rgba(70, 48, 26, .4); background: none; color: #3a2a1a; font: 500 .95em/1.3 var(--serif); text-align: left; cursor: pointer; }
.sommaire-livre button:hover, .sommaire-livre button:focus-visible { color: var(--blood); }
.sommaire-livre button span { color: #8a6d45; font-style: italic; }
.garde-fin { justify-content: center; }
.garde-fin-texte, .garde-avenir { max-width: 22ch; margin: .8em 0 0; font: italic 500 1.05em/1.5 var(--serif); color: #5c452c; }
/* l'en-tête d'une page */
.page-tete { margin-bottom: 1em; padding-bottom: .6em; border-bottom: 1px solid rgba(125, 18, 32, .35); }
.page-surtitre { margin: 0 0 .45em; font: 600 .66em/1.2 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--blood); }
.page-tete h2 { margin: 0; font: 700 1.5em/1.2 var(--serif); color: #241a12; }
.page-legende { margin: .35em 0 0; font: italic 500 .95em/1.4 var(--serif); color: #7a5f3c; }
/* le corps : paragraphes, listes, citations */
.page-corps p, .page-corps ul, .page-corps ol, .page-corps dl { margin: 0 0 .8em; }
.page-corps ul, .page-corps ol { padding-left: 1.2em; }
.page-corps li { margin-bottom: .35em; }
.page-corps li::marker { color: var(--blood); }
.page-corps blockquote { margin: 1em 0; padding: .1em 0 .1em 1em; border-left: 2px solid var(--blood); font: italic 500 1em/1.5 var(--serif); }
.page-corps blockquote p:last-child { margin: 0; font-size: .85em; color: #7a5f3c; }
.page-recit:not(.page-suivante) .page-corps > p:first-child::first-letter { initial-letter: 2; margin-right: .3em; font: 700 1em var(--serif); color: var(--blood); }
@supports not (initial-letter: 2) {
    .page-recit:not(.page-suivante) .page-corps > p:first-child::first-letter { float: left; margin-top: .1em; font-size: 3em; line-height: .8; }
}
/* une fiche : le portrait du rôle, puis l'état civil */
.page-portrait { float: right; width: 34%; height: auto; margin: 0 0 .6em .9em; border: 1px solid rgba(70, 48, 26, .45); }
.page-corps dl { display: grid; grid-template-columns: max-content 1fr; gap: .25em .8em; font-size: .92em; }
.page-corps dt { font-weight: 600; color: #7a5f3c; }
.page-corps dd { margin: 0; }
/* une déposition : la parole d'un témoin, et son paraphe */
.page-deposition .page-corps { font-family: var(--serif); font-style: italic; }
.page-paraphe { margin: .4em 0 0; text-align: right; font: 400 1.8em/1 "Yellowtail", cursive; color: #17110c; transform: rotate(-3deg); }
/* la chronologie : une ligne de temps à l'encre de sang */
.page-chronologie .page-corps ol { margin: 0; padding: 0 0 0 1em; list-style: none; border-left: 2px solid rgba(125, 18, 32, .45); }
.page-chronologie .page-corps { font-size: .93em; line-height: 1.5; }
.page-chronologie .page-corps li { position: relative; margin-bottom: .45em; }
.page-chronologie .page-corps li::before { content: ""; position: absolute; left: calc(-1em - 5px); top: .45em; width: 8px; height: 8px; background: var(--blood); transform: rotate(45deg); }
.page-chronologie .page-corps li b { display: block; font-family: var(--serif); color: #241a12; }
/* le folio, au pied de la page */
.folio { margin: 1.2em 0 0; text-align: center; font: italic 500 .8em var(--serif); color: #8a6d45; }

/* ---------- pied de page ---------- */
.pied { padding: 40px 24px 46px; background: var(--ink); border-top: var(--trait); }
.pied .dedans { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.pied-liens { display: flex; flex-wrap: wrap; gap: 22px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: #a29384; }
.pied-liens a:hover { color: var(--cream); }
.pied small { font-size: 12.5px; color: #7d7165; }

/* ---------- adaptatif ---------- */
@media (max-width: 1080px) {
    /* les liens passent dans le menu déplié */
    .burger { display: grid; place-items: center; order: 1; }
    .links { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; background: #120e0d; border-bottom: var(--trait); }
    .nav.ouvert .links { display: flex; }
    .links a { padding: 18px 28px; }
    .links a + a { border-top: var(--trait); }
    .links a + a::before { display: none; }
    /* salle d'attente : le registre passe au-dessus, la table et la colonne de droite côte à côte */
    .partie-entete { grid-template-columns: auto minmax(0, 1fr) auto; }
    .partie-grille { grid-template-columns: minmax(0, 1fr) 300px; }
    .poignee { display: none; }   /* colonnes empilées : plus rien à tirer */
    .recap-carte { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
}
@media (max-width: 760px) {
    /* le livre passe en page simple : la page prend la largeur de l'écran */
    .page-livre { --page-w: calc(100vw - 32px); --page-h: max(420px, 100svh - var(--nav-h) - 130px); padding-inline: 16px; }
    /* une seule colonne : bannière empilée, puis registre, table et colonne de droite */
    .partie-entete { grid-template-columns: minmax(0, 1fr); row-gap: 14px; }
    .entete-centre { flex-direction: column; align-items: flex-start; border: 0; }
    .partie-phase { text-align: left; }
    .entete-reglages { justify-content: flex-start; }
    .partie-grille { grid-template-columns: minmax(0, 1fr); }
    .flanc { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .08); }
}
@media (max-width: 860px) {
    .actu { padding: 24px 22px 26px; }
    .actu.epingle { padding: 28px 24px 30px; }
    .actu h3 { font-size: 20px; }
    .chapo { -webkit-line-clamp: 4; }
    /* trop étroit pour les colonnes partagées : chaque table se replie */
    .tables-liste { grid-template-columns: 1fr; }
    .table-ligne { display: flex; flex-wrap: wrap; gap: 10px 14px; }
    .table-ident { flex: 1 1 100%; }
    .table-places { margin-left: auto; }
}
@media (max-width: 640px) {
    .nav { gap: 16px; padding: 0 16px; }
    .page-jouer { padding: 20px 16px 48px; }
    .page-partie { padding: 8px 8px 12px; }
    .carte-jeu { padding: 22px 18px; }
    .tables-entete { flex-direction: column; align-items: stretch; }
    .invitation-saisie { flex-direction: column; }
    .invitation input { flex: none; }
    .links a { padding: 18px 16px; }   /* aligné sur la marque */
    .nav-right { gap: 8px; }
    .login { padding: 0 12px; }
    /* le compte se réduit à son avatar ; la fiche serre ses marges */
    .compte-nom, .chevron { display: none; }
    .compte-bouton { padding: 0 4px; }
    .menu-compte { width: min(calc(352 * var(--u)), calc(100vw - 32px)); }
    .page-profil { padding: 16px; }
    .profil-reglages { top: 16px; right: 56px; padding: 0 12px; font-size: 10.5px; }
    .page-profil .profil-reglages { right: 16px; }
    .profil-tete { flex-wrap: wrap; padding: 64px 18px 18px; }
    .profil-ident :is(h1, h2) { padding-right: 0; }
    .profil-corps { padding: 18px 18px 22px; }
    .section { padding: 64px 16px; }
    .card { padding: 48px 22px 44px; }
    /* en colonne, la carte est haute : la tache se dresse */
    .tache-heros { width: 800px; translate: -50% -50%; transform: rotate(90deg); }
    .title { margin-right: .3em; }   /* recentre le titre avec son « Alpha » */
    .actions { flex-direction: column; align-items: center; gap: 14px; }
    .scroll { display: none; }
    .actus { padding: 28px 18px 30px; }
    .actus-entete { flex-direction: column; align-items: flex-start; gap: 10px; }
    .actu, .actu.epingle { padding: 20px 18px 22px; }
    .pied .dedans { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
    .traite-voile, .traite-page { padding: 16px; }
    .traite, .traite.clauses { padding: 32px 22px 26px; }
    .traite::after { inset: 8px; }
    .sommaire ol { columns: 1; }
    .solennel section { padding-left: 44px; }
    .solennel section::before { width: 32px; font-size: 28px; }
    .ligne { flex-direction: column; align-items: flex-start; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, .actus .actu { animation: none !important; transition: none !important; }
    .apparait, .actus .actu { opacity: 1; transform: none; }
}

/* les paramètres du joueur, sur le parchemin : la glissière du volume, carrée, et l'essai */
.parametres input[type="range"] { width: 100%; height: 4px; margin: 12px 0 6px; appearance: none; background: rgba(42, 30, 22, .25); cursor: pointer; }
.parametres input[type="range"]::-webkit-slider-thumb { appearance: none; width: 16px; height: 16px; background: var(--blood); border: 1px solid #2a1e16; }
.parametres input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 0; background: var(--blood); border: 1px solid #2a1e16; }
.parametres .mini { margin-top: 6px; border-color: #7a5f3c; color: #2a1e16; }
.parametres .mini:hover, .parametres .mini:focus-visible { background: var(--blood); border-color: var(--blood); color: #fff; }
/* un pseudo du fil ou du récapitulatif ouvre la fiche du joueur */
.mot b a, .recap-case b a { color: inherit; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: text-decoration-color .2s; }
.mot b a:hover, .mot b a:focus-visible, .recap-case b a:hover, .recap-case b a:focus-visible { text-decoration-color: currentColor; }

/* les icônes des petits boutons : fermer, renvoyer, plier, compter, tourner les pages */
.fermer svg { width: 18px; height: 18px; }
.renvoi svg, .soupcon-menu button svg { width: 13px; height: 13px; }
.replier { display: inline-grid; place-items: center; }
.replier svg { width: 12px; height: 12px; }
.livre-fleches .replier svg { width: 18px; height: 18px; }
/* le volet ouvert propose de se plier (moins), plié de se déplier (plus) */
.replier .deplie, .replier[aria-expanded="false"] .replie { display: none; }
.replier[aria-expanded="false"] .deplie { display: inline-block; }

/* l'Actualité : la liste de tous les articles, puis un article en grand sur le parchemin */
.page-actualites .section.voile { min-height: calc(100svh - var(--nav-h)); }
.actus-vide { margin: 0; font: italic 400 15px/1.6 var(--serif); color: #8d8073; }
.article-chapo p { font-family: var(--serif); font-style: italic; }
.article-corps { margin-top: var(--ecart); }

/* la page Règles : le livret (le même que dans la table), puis les rôles, l'un sous l'autre */
.page-regles { gap: 28px; align-content: start; clip-path: inset(0); }
/* la page la plus longue du site : une toile aussi haute qu'elle étirait les taches en grandes traînées ; le fond
   d'encre y garde la taille de l'écran, fixe derrière la lecture, et la découpe de la page (clip-path) le tient hors du pied */
.page-regles > .fluide { position: fixed; top: var(--nav-h); left: 0; width: 100%; height: calc(100svh - var(--nav-h)); }
.page-regles > .traite { scroll-margin-top: calc(var(--nav-h) + 16px); }
.traite-page > .traite.livret { width: min(calc(760 * var(--g)), 100%); }
.regles-sommaire { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.regles-sommaire a { padding: 9px 16px; border: 1px solid rgba(70, 48, 26, .45); background: rgba(255, 250, 235, .55); font: 600 11.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #3a2a1a; transition: background .2s, color .2s, border-color .2s; }
.regles-sommaire a:hover, .regles-sommaire a:focus-visible { border-color: var(--blood); background: var(--blood); color: #fff; }

/* le Lore fermé : les livres restent scellés, « À venir » au-dessus de chacun */
.etagere li { display: grid; justify-items: center; gap: 10px; }
.livre-avenir { margin: 0; padding: 5px 12px; border: 1px solid rgba(232, 176, 106, .45); background: rgba(13, 10, 9, .45); font: 600 10.5px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: #e8b06a; }
.livre-ferme.scelle { cursor: default; }
/* Postuler : les postes, puis la candidature, sur le parchemin des pages de texte */
.clauses .postes { display: grid; grid-template-columns: 1fr; gap: 14px; }
.postes > div { display: grid; gap: 3px; }
.postes dt { font: 600 18px/1.2 var(--serif); color: #241a12; }
.candidature fieldset.champ { margin: 0 0 17px; padding: 0; border: 0; }
.candidature legend { margin-bottom: 8px; padding: 0; font: 700 10.5px/1.2 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: #7a5f3c; }
.postes-choix { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 8px; }
.poste-choix { position: relative; display: grid; align-content: start; gap: 3px; padding: 10px 12px 10px 36px; border: 1px solid rgba(70, 48, 26, .35); background: rgba(255, 250, 235, .35); cursor: pointer; transition: border-color .2s, background .2s; }
.poste-choix:hover, .poste-choix:has(input:checked) { border-color: var(--blood); background: rgba(125, 18, 32, .07); }
/* la case du poste : carrée, comme toutes celles du site */
.poste-choix input { position: absolute; left: 12px; top: 12px; appearance: none; width: 14px; height: 14px; margin: 0; border: 1px solid rgba(70, 48, 26, .5); background: rgba(255, 252, 242, .5); cursor: pointer; }
.poste-choix input:checked { background: var(--blood); box-shadow: inset 0 0 0 3px #f3ead4; }
.poste-choix b { font: 600 15px/1.2 var(--serif); color: #241a12; }
.poste-choix span { font-size: 12.5px; line-height: 1.4; color: #5c452c; }
.champ textarea { width: 100%; min-height: 150px; padding: 8px 10px; border: 1px solid rgba(70, 48, 26, .45); background: rgba(255, 250, 235, .3); color: #1f1610; font: 400 15px/1.55 var(--serif); resize: vertical; outline: none; transition: border-color .2s, background .2s; }
.champ textarea:focus { border-color: var(--blood); background: rgba(255, 250, 235, .45); }
.champ textarea::placeholder { color: #9b8462; font-style: italic; }
.candidature .signer { margin-top: 22px; }

/* le Forum, pas encore ouvert : la feuille scellée « À venir », comme les livres du Lore */
.forum-avenir { text-align: center; }
.forum-avenir .livre-avenir { display: inline-block; margin-bottom: 18px; border-color: rgba(125, 18, 32, .45); background: transparent; color: var(--blood); }

/* amis et messages, dans le menu du compte : une ligne par joueur ou conversation */
.ami { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; color: var(--cream); transition: background .2s; }
.ami:hover, .ami:focus-visible, .ami[aria-current="page"] { background: rgba(255, 255, 255, .06); }
.ami-nom { flex: 1; min-width: 0; display: grid; gap: 2px; overflow: hidden; font: 600 13.5px/1.25 var(--sans); }
.ami-nom small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 11.5px/1.3 var(--sans); color: #8d8073; }
.ami.non-lu .ami-nom small { color: #d8cdbf; }
.msg-heure { flex: none; font-size: 11px; color: #7d7165; }
.msg-nonlu, .compte-alerte { flex: none; width: 9px; height: 9px; background: var(--blood-bright); }
/* un emplacement remis à jour en direct : sans boîte à lui, vide il ne décale rien */
.direct { display: contents; }
/* la présence : un carré détaché de l'avatar par un liseré, vert en ligne, doré à une table ; le contrôleur en-ligne n'allume que les amis présents */
.presence { display: none; }
.avatar .presence { position: absolute; right: -3px; bottom: -3px; width: 11px; height: 11px; border: 2px solid #17100e; background: #8fbf68; }
.avatar .presence.en-partie { background: #e8b06a; }
.avatar.enorme .presence { width: 16px; height: 16px; }
.boite-tete small { font: 400 11.5px/1.3 var(--sans); }
small.presence.en-ligne { color: #8fbf68; }
small.presence.en-partie { color: #e8b06a; }
.pastille.rouge { background: var(--blood-bright); color: #fff; }
.ami form { margin: 0; }
.ami-geste { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid rgba(255, 255, 255, .14); background: transparent; color: #c9bcac; cursor: pointer; transition: border-color .2s, background .2s, color .2s; }
.ami-geste svg { width: 13px; height: 13px; }
.ami-geste:hover, .ami-geste:focus-visible { border-color: rgba(224, 163, 173, .55); background: rgba(163, 17, 35, .16); color: #fff; }
.ami-geste.oui { border-color: var(--blood-bright); color: #fff; }

/* les gestes d'amitié sur la fiche d'un autre joueur */
.profil-gestes { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: calc(14 * var(--u)); }
.profil-gestes form { margin: 0; }
.profil-gestes .creer { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; }
.profil-attente { font: italic 500 13px/1 var(--serif); color: #b3a698; }

/* la boîte de messages : les conversations à gauche, le fil à droite, sur fond de parchemin */
.traite-page > .boite { position: relative; z-index: 1; display: grid; grid-template-columns: calc(300 * var(--g)) minmax(0, 1fr); gap: calc(16 * var(--g)); width: min(calc(980 * var(--g)), 100%); height: min(calc(640 * var(--g)), calc(100svh - var(--nav-h) - 64px)); }
.boite-liste, .boite-fil { min-height: 0; display: flex; flex-direction: column; background: linear-gradient(168deg, #251c18, #110c0b); border: 1px solid rgba(255, 255, 255, .09); color: var(--cream); }
.boite-liste { gap: 2px; padding: 16px 10px; overflow-y: auto; }
.boite-titre { margin: 2px 8px 12px; font: 600 24px/1.2 var(--serif); }
.boite-fil { padding: 14px 18px 16px; }
.boite-tete { flex: none; display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.boite-tete h2 { margin: 0; font: 600 19px/1.2 var(--serif); }
.boite-retour { display: none; place-items: center; width: 30px; height: 30px; color: #c9bcac; }
.boite-retour svg { width: 16px; height: 16px; }
/* la colonne inversée cale le fil sur le dernier message, sans script */
.boite-messages { flex: 1; min-height: 0; display: flex; flex-direction: column-reverse; overflow-y: auto; padding: 14px 4px 4px 0; }
.boite-messages ol { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
/* les bulles sont le seul arrondi du site (demande de l'utilisateur) : l'autre à gauche, soi à droite */
.bulle { justify-self: start; max-width: 78%; padding: 9px 14px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 16px 16px 16px 4px; background: rgba(255, 255, 255, .05); outline: none; }
.bulle.moi { justify-self: end; border-color: rgba(192, 20, 43, .5); border-radius: 16px 16px 4px 16px; background: rgba(125, 18, 32, .3); }
.bulle p { margin: 0; font-size: 14.5px; line-height: 1.5; color: #ece2d3; overflow-wrap: anywhere; white-space: pre-wrap; }
/* le jour et l'heure n'apparaissent qu'au survol (ou au toucher : la bulle prend le focus) */
.bulle time { display: block; max-height: 0; overflow: hidden; font-size: 10.5px; line-height: 1.4; color: #8d8073; opacity: 0; transition: max-height .15s, margin-top .15s, opacity .15s; }
.bulle:is(:hover, :focus, :focus-within) time { max-height: 18px; margin-top: 3px; opacity: 1; }
.bulle.moi time { text-align: right; color: #c79aa2; }
.boite-vide { margin: auto; padding: 16px; font: italic 500 14.5px/1.5 var(--serif); text-align: center; color: #8d8073; }
.boite-messages .boite-vide { margin: 0; }
@media (max-width: 760px) {
    .traite-page > .boite { grid-template-columns: minmax(0, 1fr); }
    .boite.accueil .boite-fil, .boite:not(.accueil) .boite-liste { display: none; }
    .boite-retour { display: grid; }
}
.pc-tout { display: block; padding: 10px 8px 4px; text-align: center; font: 600 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #e8899a; }
.pc-tout:hover, .pc-tout:focus-visible { color: #fff; }

/* bloquer et signaler : sur la fiche, dans la boîte, et la liste des Paramètres */
a.mini { display: inline-flex; align-items: center; }
.boite-signaler { margin-left: auto; font: 600 10.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #8d8073; transition: color .2s; }
.boite-signaler:hover, .boite-signaler:focus-visible { color: #e8899a; }
.signalement select { width: 100%; }
.signalement .signer { margin-top: 18px; }
.signalement-bloquer { margin: 16px 0 0; font-size: 13.5px; line-height: 1.5; text-align: center; color: #5c452c; }
.signalement-bloquer a { color: #8a3040; text-decoration: underline; text-underline-offset: 3px; }
.bloques { display: grid; gap: 8px; padding: 0; list-style: none; }
.bloques li { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 8px 12px; border: 1px solid rgba(70, 48, 26, .3); }
.bloques form { margin: 0; }
.bloques .mini { border-color: #7a5f3c; color: #2a1e16; }
.bloques .mini:hover, .bloques .mini:focus-visible { background: var(--blood); border-color: var(--blood); color: #fff; }

/* le menu « Plus » de la fiche : bloquer, signaler */
.profil-plus { position: relative; }
.profil-plus .mini { display: inline-flex; align-items: center; gap: 7px; }
.profil-plus .chevron { width: 11px; height: 11px; transition: transform .2s; }
.profil-plus.ouvert .chevron { transform: rotate(180deg); }
.profil-plus-menu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 7; display: none; min-width: 130px; padding: 4px; border: 1px solid rgba(255, 255, 255, .16); background: #17100e; }
.profil-plus.ouvert .profil-plus-menu { display: grid; gap: 2px; }
.profil-plus-menu :is(a, button) { display: block; width: 100%; padding: 8px 10px; border: 0; background: transparent; color: #ddd0c0; font: 500 13px/1.2 var(--sans); text-align: left; cursor: pointer; transition: background .15s, color .15s; }
.profil-plus-menu :is(a, button):hover, .profil-plus-menu :is(a, button):focus-visible { background: rgba(192, 20, 43, .2); color: #fff; }

/* la barre de messages : fixée en bas à droite, le pop-up monte d'elle, façon messagerie */
.dock { position: fixed; left: 24px; bottom: 0; z-index: 40; width: min(340px, calc(100vw - 32px)); background: #17100e; border: 1px solid rgba(255, 255, 255, .14); border-bottom: 0; color: var(--cream); }
.dock-barre { display: flex; align-items: center; gap: 10px; width: 100%; height: 44px; padding: 0 14px; border: 0; background: linear-gradient(#251c18, #17100e); color: var(--cream); cursor: pointer; transition: background .2s; }
.dock-barre:hover, .dock-barre:focus-visible { background: linear-gradient(#32251f, #1d1512); }
.dock-titre { flex: 1; font: 600 15px/1 var(--serif); text-align: left; }
.dock-barre .chevron { width: 13px; height: 13px; transform: rotate(180deg); transition: transform .2s; }
.dock.ouvert .dock-barre .chevron { transform: none; }
.dock-corps { display: flex; flex-direction: column; height: 0; overflow: hidden; transition: height .22s ease; }
.dock.ouvert .dock-corps { height: min(460px, calc(100svh - var(--nav-h) - 60px)); border-top: 1px solid rgba(255, 255, 255, .08); }
.dock-corps turbo-frame { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 10px 12px 12px; }
.dock-liste { flex: 1; min-height: 0; overflow-y: auto; }
.dock .boite-retour { display: grid; }
.dock .boite-tete { padding-bottom: 8px; }
.dock .boite-tete h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.dock .bulle { max-width: 86%; }
.dock .journal-saisie { margin-top: 8px; }
.dock .journal-saisie button { padding: 0 12px; }
.boite-erreur { flex: none; margin: 8px 0 0; font-size: 13px; color: #f2a3b0; }
@media (max-width: 760px) {
    .dock { right: 0; left: 0; width: auto; border-inline: 0; }
    .dock.ouvert .dock-corps { height: calc(100svh - var(--nav-h) - 44px); }
    /* fermée, la barre ne couvre pas le bas de page : un simple onglet à droite */
    .dock:not(.ouvert) { right: auto; width: 150px; border-right: 1px solid rgba(255, 255, 255, .14); }
}

/* en pleine partie, pas de messagerie : elle revient avec la fin de la partie */
.messagerie-fermee .dock { display: none; }
