/* ============================================================
   Death Leaves a Trace — alpha privée #1
   Deux polices, pas une de plus : Cinzel (titres, libellés, boutons)
   et IM Fell English (lecture). Le rouge est rare : c'est la trace.
   ============================================================ */

:root {
    --charbon: #16130f;
    --surface: #201b14;
    --trait: #3a3226;
    --encre: #e8dfc8;
    --encre-2: #b3a88e;
    --laiton: #c9a227;
    --sang: #c05243;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--charbon);
    color: var(--encre);
    font-family: "IM Fell English", Georgia, serif;
    font-size: 19px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--laiton); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--laiton); outline-offset: 3px; }
[hidden] { display: none !important; }

/* Texte lu par les lecteurs d'écran, invisible à l'œil. */
.masque {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Bandeau : la bannière officielle, logo compris ---------- */
.bandeau { position: relative; }
.bandeau img {
    width: 100%;
    height: auto;
    max-height: 60vh;
    object-fit: cover;
    object-position: center 42%;
}
/* Le selecteur de langue (23/09) : en haut a droite du bandeau, au-dessus du degrade. */
.langue {
    position: absolute;
    top: 14px;
    right: 16px;
    z-index: 2;
    display: flex;
    gap: 4px;
    font-family: Cinzel, Georgia, serif;
    font-size: .74rem;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.langue a, .langue span {
    padding: 6px 10px;
    border: 1px solid rgba(232, 223, 200, .35);
    background: rgba(22, 19, 15, .72);
    color: var(--encre);
    text-decoration: none;
}
.langue span { border-color: var(--laiton); color: var(--laiton); }
.langue a:hover, .langue a:focus-visible { border-color: var(--laiton); }
.bandeau::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 38%;
    background: linear-gradient(180deg, transparent, var(--charbon));
}

/* ---------- Colonne de lecture ---------- */
main { max-width: 760px; margin: 0 auto; padding: 0 24px 40px; }
section { padding: 56px 0; border-top: 1px solid var(--trait); }
section:first-child { border-top: none; padding-top: 20px; }

h1, h2, legend, .etiquette, .cle, .champ label, .bouton, .regles strong {
    font-family: Cinzel, Georgia, serif;
}
h1 {
    font-size: clamp(1.7rem, 5vw, 2.6rem);
    font-weight: 600;
    letter-spacing: .05em;
    line-height: 1.2;
    margin: 0 0 22px;
    text-wrap: balance;
}
h2 {
    font-size: clamp(1.25rem, 3vw, 1.6rem);
    font-weight: 600;
    letter-spacing: .06em;
    margin: 0 0 18px;
}
form h2 { margin-top: 44px; }
form h2:first-child { margin-top: 0; }
.etiquette {
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--laiton);
    margin: 0 0 14px;
}
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
.chapeau { font-size: 1.18rem; }
.attenue { color: var(--encre-2); }
.sceau { width: 64px; margin: 0 0 22px; }

/* ---------- Encart : l'alpha #1 n'est que la première ---------- */
.encart {
    border-left: 2px solid var(--laiton);
    background: rgba(201, 162, 39, .06);
    padding: 18px 22px;
    margin: 28px 0 0;
}
.encart strong {
    font-family: Cinzel, Georgia, serif;
    font-size: .78rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 6px;
}

/* ---------- Ce qu'il te faut ---------- */
.trois {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1px;
    background: var(--trait);
    border: 1px solid var(--trait);
}
.trois div { background: var(--charbon); padding: 20px; }
.cle {
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--laiton);
    display: block;
    margin-bottom: 8px;
}
.trois p { font-size: .98rem; color: var(--encre-2); }

/* ---------- Le bilan de l'alpha #1 (25/09) : six chiffres, dans la grille des « trois » ---------- */
.chiffres {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1px;
    background: var(--trait);
    border: 1px solid var(--trait);
    margin: 0 0 22px;
}
.chiffres div { background: var(--charbon); padding: 18px 20px; }
.chiffres dt {
    font-family: Cinzel, Georgia, serif;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--encre-2);
}
.chiffres dd {
    margin: 6px 0 0;
    font-family: Cinzel, Georgia, serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--laiton);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

/* ---------- Les retours : corrigé / sur l'établi ---------- */
.deux {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
    margin-top: 22px;
}
.liste { margin: 0; padding: 0 0 0 1.1em; }
.liste li { margin: 0 0 8px; }
.liste li::marker { color: var(--laiton); }
.deux > div:last-child .liste li { color: var(--encre-2); }
.deux > div:last-child .liste li::marker { color: var(--encre-2); }

/* ---------- La charte, en chiffres romains ---------- */
.regles { list-style: none; counter-reset: regle; padding: 0; margin: 26px 0 0; }
.regles li {
    counter-increment: regle;
    position: relative;
    padding: 16px 0 16px 60px;
    border-top: 1px solid var(--trait);
}
.regles li::before {
    content: counter(regle, upper-roman);
    position: absolute;
    left: 0;
    top: 16px;
    width: 42px;
    text-align: right;
    font-family: Cinzel, Georgia, serif;
    font-weight: 600;
    color: var(--laiton);
}
.regles strong { display: block; font-weight: 600; letter-spacing: .03em; }
.regles span { color: var(--encre-2); }
.cloture { margin-top: 22px; color: var(--encre-2); font-style: italic; }

/* ---------- Formulaires ---------- */
.champ { margin: 0 0 22px; }
.champ label {
    display: block;
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    margin: 0 0 8px;
}
.champ label .attenue { text-transform: none; letter-spacing: .04em; font-weight: 500; }
input[type="text"], textarea {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--trait);
    border-radius: 2px;
    color: var(--encre);
    font: inherit;
    font-size: 1.05rem;
    padding: 11px 14px;
}
input[type="text"]:focus, textarea:focus {
    outline: none;
    border-color: var(--laiton);
    box-shadow: 0 0 0 1px var(--laiton);
}
textarea { min-height: 110px; resize: vertical; }
.aide { font-size: .92rem; color: var(--encre-2); margin: 6px 0 0; }
.coche { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0; cursor: pointer; }
.engagement {
    border-left: 2px solid var(--sang);
    background: rgba(192, 82, 67, .06);
    padding: 4px 18px;
    margin: 26px 0 30px;
}

fieldset { border: none; margin: 0 0 30px; padding: 0; min-width: 0; }
legend { font-size: 1.02rem; font-weight: 600; letter-spacing: .03em; padding: 0; margin: 0 0 6px; }
fieldset > .aide { margin: 0 0 12px; }
.choix { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 10px; }
.choix label { display: flex; gap: 9px; align-items: center; cursor: pointer; }

/* Cases et boutons radio dessinés aux couleurs du jeu : les natifs sont blancs vifs. */
.coche input, .choix input {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    margin: 0;
    flex: none;
    display: inline-grid;
    place-content: center;
    background: var(--surface);
    border: 1px solid var(--encre-2);
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.coche input { border-radius: 2px; margin-top: 6px; }
.choix input { border-radius: 50%; }
.coche input::before, .choix input::before {
    content: "";
    transform: scale(0);
    transition: transform .12s;
}
.coche input::before {
    width: 11px;
    height: 11px;
    background: var(--charbon);
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
.choix input::before { width: 8px; height: 8px; border-radius: 50%; background: var(--laiton); }
.coche input:hover, .choix input:hover { border-color: var(--laiton); }
.coche input:checked { background: var(--laiton); border-color: var(--laiton); }
.choix input:checked { border-color: var(--laiton); }
.coche input:checked::before, .choix input:checked::before { transform: scale(1); }

.bouton {
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--encre);
    background: rgba(22, 19, 15, .6);
    border: 1px solid var(--encre-2);
    padding: 15px 34px;
    cursor: pointer;
    transition: border-color .25s, color .25s;
}
.bouton:hover:not(:disabled) { border-color: var(--laiton); color: var(--laiton); }
.bouton:disabled { opacity: .5; cursor: wait; }
.erreur { border-left: 2px solid var(--sang); padding: 4px 0 4px 14px; margin: 18px 0 0; }
.piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Dix étoiles, dessinées sans police ---------- */
.note { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.etoiles { display: flex; gap: 4px; }
.etoiles input, .crans input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.etoiles label { width: 26px; height: 26px; cursor: pointer; }
.etoiles label::before {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    background: var(--trait);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%,
        50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    transition: background .12s;
}
.etoiles label.allume::before { background: var(--laiton); }
.etoiles input:focus-visible + label { outline: 2px solid var(--laiton); outline-offset: 2px; }
.valeur {
    font-family: Cinzel, Georgia, serif;
    font-size: .82rem;
    letter-spacing: .1em;
    color: var(--encre-2);
    min-width: 5ch;
}

/* ---------- Échelle à deux pôles : trop loin ou trop proche de T4C ---------- */
.echelle { max-width: 540px; }
.crans { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin-top: 10px; }
.crans label {
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--trait);
    font-family: Cinzel, Georgia, serif;
    font-size: .74rem;
    color: var(--encre-2);
    cursor: pointer;
}
.crans input:checked + label { background: var(--laiton); border-color: var(--laiton); color: var(--charbon); }
.crans input:focus-visible + label { outline: 2px solid var(--laiton); outline-offset: 2px; }
.bornes {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    font-size: .88rem;
    color: var(--encre-2);
    margin-top: 8px;
}
.bornes span:nth-child(2) { text-align: center; }
.bornes span:nth-child(3) { text-align: right; }

/* ---------- Confirmation ---------- */
.confirmation:focus { outline: none; }

/* ---------- Pied de page ---------- */
footer { border-top: 1px solid var(--trait); padding: 40px 24px 36px; text-align: center; }
footer img { width: 40px; margin: 0 auto 16px; opacity: .6; }
footer .studio {
    font-family: Cinzel, Georgia, serif;
    font-size: .7rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--encre-2);
    margin: 0 0 10px;
}
footer .mention { font-size: .88rem; color: var(--encre-2); opacity: .75; max-width: 56ch; margin: 0 auto; }
footer .mention + .mention { margin-top: 10px; }

@media (max-width: 560px) {
    body { font-size: 17px; }
    main { padding: 0 18px 32px; }
    section { padding: 44px 0; }
    .etoiles { gap: 3px; }
    .etoiles label { width: 22px; height: 22px; }
    .crans label { height: 30px; font-size: .68rem; }
}
