/* Règles de décompte : section de la fiche du jeu et page de décompte. Tokens dans tokens.css. */

html { scroll-behavior: smooth; }
.front { --surface-2: oklch(0.25 0.022 285); --filet: oklch(0.30 0.02 285); }

/* ---------- Face de dé : le barème d'une règle ---------- */
/* Pleine = barème fixe ; détourée = ça dépend de la carte ou de la partie. La forme porte l'info, pas la teinte. */
.valeur { flex: none; width: 64px; height: 56px; border-radius: var(--radius-de); display: flex; flex-direction: column; align-items: center; justify-content: center; font: 800 17px/1 var(--font-chiffres); letter-spacing: -0.5px; text-align: center; }
.valeur small { display: block; font: 600 10px/12px var(--font-texte); letter-spacing: 0; margin-top: 2px; }
.valeur.fixe { background: var(--ambre); color: var(--nuit); }
.valeur.variable { color: var(--score); border: 2px solid var(--score); }
.valeur-egalite, .egalite .valeur { background: var(--vert); color: var(--nuit); font-size: 24px; }

/* ---------- Fiche : « Points de règle pris en compte » ---------- */
.regles { display: flex; flex-direction: column; gap: 20px; margin-top: 12px; }
.regles-intro { display: flex; flex-direction: column; gap: 12px; }
.regles-intro p { margin: 0; max-width: 46ch; }
.cle { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 13px; line-height: 18px; color: var(--encre-douce); }
.cle li { display: flex; align-items: center; gap: 8px; }
.cle i { flex: none; width: 14px; height: 14px; border-radius: var(--radius-de); }
.cle .fixe { background: var(--ambre); }
.cle .variable { border: 2px solid var(--score); }
.regles-liste { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.liste { display: flex; flex-direction: column; gap: 8px; }
.regle { border-radius: 16px; background: var(--surface); }
.regle summary { list-style: none; display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 10px 14px 10px 10px; cursor: pointer; border-radius: 16px; }
.regle summary::-webkit-details-marker { display: none; }
.regle summary:hover { background: var(--surface-2); }
.regle-nom { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.regle-nom strong { font-weight: 600; line-height: 20px; }
.regle-nom span { font-size: 13px; line-height: 18px; color: var(--encre-douce); }
.regle-nom .xt-puce { min-height: 20px; font-size: 12px; line-height: 20px; margin-left: 6px; vertical-align: 1px; color: var(--encre); }
.regles-extensions { margin: 8px 0 -4px; font-size: 15px; font-weight: 600; }
.chevron { width: 20px; height: 20px; color: var(--encre-douce); transition: transform .2s; }
.regle[open] .chevron { transform: rotate(180deg); }
.regle-detail { padding: 4px 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.regle-detail p { margin: 0; font-size: 15px; line-height: 22px; max-width: 58ch; }
.exemple { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 12px; padding: 10px 12px; border-radius: 12px; background: var(--fond); font-size: 14px; line-height: 20px; }
.exemple b { font: 700 14px/20px var(--font-chiffres); color: var(--score); white-space: nowrap; }
.regle-detail .selon { font-size: 13px; line-height: 18px; color: var(--encre-douce); }
.selon strong { color: var(--encre); font-weight: 600; }
.egalite { display: flex; align-items: flex-start; gap: 14px; padding: 12px 14px 12px 10px; border-radius: 16px; border: 2px dashed var(--filet); }
.egalite p { margin: 0; font-size: 14px; line-height: 20px; }
.egalite strong { display: block; font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.vers-page { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border-radius: 16px; background: var(--bleu); color: var(--nuit) !important; text-decoration: none; font-weight: 600; line-height: 20px; }
.vers-page span { font-weight: 400; font-size: 13px; display: block; line-height: 18px; }
.vers-page svg { width: 22px; height: 22px; flex: none; }
.regles-intro .vers-page { display: none; }

/* ---------- Page de décompte ---------- */
.tete-decompte { display: flex; flex-direction: column; gap: 24px; }
.tete-texte { display: flex; flex-direction: column; gap: 14px; }
.grand-titre { margin: 0; font: 800 38px/1 var(--font-display); letter-spacing: -1.4px; text-wrap: balance; }
.reponse { margin: 0; font-size: 18px; line-height: 27px; max-width: 46ch; }
.bouton-compter { align-self: flex-start; display: inline-flex; align-items: center; min-height: 48px; padding: 0 20px; border-radius: 12px; background: var(--accent); color: var(--nuit) !important; font-weight: 700; text-decoration: none; }

/* Le bloc de score, signature de la page : chaque ligne mène à sa règle */
.bloc { background: var(--creme); color: var(--nuit); border-radius: 20px; padding: 8px 8px 14px; }
.bloc table { width: 100%; border-collapse: collapse; }
.bloc caption { text-align: left; padding: 10px 10px 8px; font-size: 13px; line-height: 18px; }
.bloc th, .bloc td { padding: 0 10px; height: 42px; text-align: left; font-weight: 500; font-size: 15px; line-height: 18px; border-top: 1.5px solid color-mix(in oklab, var(--nuit) 18%, transparent); }
.bloc thead th { border-top: 0; height: 30px; font: 800 15px var(--font-display); }
.bloc .pts { width: 62px; text-align: right; font: 700 16px var(--font-chiffres); }
.bloc thead .pts { font: 800 15px var(--font-display); }
.bloc tbody a { color: var(--nuit) !important; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.bloc tfoot th, .bloc tfoot td { height: 56px; border-top: 3px solid var(--nuit); font: 800 18px var(--font-display); }
.bloc tfoot .pts { font: 800 26px var(--font-chiffres); letter-spacing: -1px; }
.bloc-issue { margin: 8px 10px 0; padding: 10px 12px; border-radius: 12px; background: var(--vert); font-size: 14px; line-height: 20px; font-weight: 600; }

.corps-decompte { display: flex; flex-direction: column; gap: 32px; margin-top: 12px; }
.sommaire { display: none; }
.article { display: flex; flex-direction: column; gap: 40px; min-width: 0; }
.point { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 16px; }
.point-tete { display: flex; align-items: center; gap: 14px; }
.point p { margin: 0; max-width: 62ch; }
.point .exemple { max-width: 62ch; background: var(--surface); }
.tableau { width: 100%; max-width: 62ch; border-collapse: collapse; background: var(--surface); border-radius: 16px; overflow: hidden; }
.tableau th, .tableau td { padding: 10px 12px; text-align: left; font-size: 14px; line-height: 20px; font-weight: 500; border-top: 1px solid var(--filet); }
.tableau thead th { border-top: 0; font-weight: 600; color: var(--encre-douce); font-size: 13px; }
.tableau .pts { text-align: right; font: 700 15px var(--font-chiffres); color: var(--score); }
.tableau thead .pts { font: 600 13px var(--font-texte); color: var(--encre-douce); }
.tableau .bareme { color: var(--score); font-weight: 600; }
.calcul { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 16px; background: var(--surface); max-width: 62ch; font-size: 15px; line-height: 22px; }
.calcul strong { font-weight: 600; }
.faq { display: flex; flex-direction: column; gap: 18px; }
.faq h3 { margin: 0 0 2px; font: 600 16px/22px var(--font-texte); }
.autres { display: flex; flex-wrap: wrap; gap: 8px; }
.autres a { padding: 8px 14px; border-radius: var(--radius-pill); background: var(--surface); color: var(--encre) !important; text-decoration: none; font-size: 14px; }

/* ---------- Bureau ---------- */
@media (min-width: 760px) {
    .regles, .corps-decompte { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 20px 48px; align-items: start; }
    .regles-intro, .sommaire { position: sticky; top: 24px; }
    .regles-intro .vers-page { display: flex; }
    .vers-page-bas { display: none; }
    .regle-detail { padding-left: 88px; }
    .sommaire { display: flex; flex-direction: column; }
    .sommaire a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; padding: 0 12px; border-radius: 10px; color: var(--encre-douce) !important; text-decoration: none; font-size: 14px; }
    .sommaire a:hover { background: var(--surface); color: var(--encre) !important; }
    .sommaire b { font: 700 13px var(--font-chiffres); color: var(--score); }
}
@media (min-width: 960px) {
    .tete-decompte { display: grid; grid-template-columns: minmax(0, 1fr) 500px; gap: 56px; align-items: center; }
    .grand-titre { font-size: 60px; letter-spacing: -2.4px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .chevron { transition: none; }
}
