/* Quiz TRIA : sobre, à la charte Sumotori (noir, blanc, rouge, Jost + Lato), pensé pour le téléphone. */
:root {
	--rouge: #ed1c24;          /* traits, aplats décoratifs */
	--rouge-texte: #d9171f;    /* texte et boutons : 5,1:1 avec le blanc */
	--vert: #1d7a3e;
	--vert-fond: #eaf6ee;
	--rouge-fond: #fdecec;
	--encre: #111;
	--gris: #5c5c5c;
	--ligne: #e3e3e3;
	--titre: "Jost", "Futura", "Century Gothic", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: #fff; color: var(--encre); font: 400 1.0625rem/1.6 "Lato", system-ui, sans-serif; }
a { color: var(--rouge-texte); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--encre); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; } /* titres focalisés par le script pour les lecteurs d'écran */

.tete { display: flex; justify-content: space-between; align-items: center; max-width: 720px; margin: 0 auto; padding: 16px; border-bottom: 1px solid var(--ligne); }
.marque { font-family: var(--titre); font-weight: 700; font-size: 1.25rem; letter-spacing: .04em; }
.marque span { color: var(--rouge-texte); }
.progres { font-size: .875rem; font-weight: 700; color: var(--gris); }

.ecran { max-width: 720px; margin: 0 auto; padding: 24px 16px 48px; outline: none; }
h1, h2, h3 { font-family: var(--titre); font-weight: 700; line-height: 1.2; }
h1 { font-size: 2.25rem; margin: 0 0 8px; }
h2 { font-size: 1.5rem; margin: 0 0 20px; }
h3 { font-size: 1.125rem; margin: 0 0 6px; }
.trait { display: block; width: 40px; height: 4px; background: var(--rouge); margin: 0 0 16px; }
.etiquette { display: inline-block; font-size: .8125rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gris); margin: 0 0 8px; }
.sous { color: var(--gris); margin: 0 0 28px; }

.barre { height: 4px; background: var(--ligne); margin: 0 0 24px; }
.barre span { display: block; height: 100%; background: var(--rouge); transition: width .3s; }

.choix { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 10px; }
.choix button { display: flex; gap: 12px; align-items: flex-start; width: 100%; min-height: 56px; padding: 14px 16px; border: 2px solid var(--ligne); border-radius: 10px; background: #fff; color: var(--encre); font: inherit; text-align: left; cursor: pointer; }
.choix button:hover:not(:disabled) { border-color: var(--encre); }
.choix button:disabled { cursor: default; }
.lettre { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #f2f2f2; font-weight: 700; font-size: .875rem; }
.choix .juste { border-color: var(--vert); background: var(--vert-fond); }
.choix .juste .lettre { background: var(--vert); color: #fff; }
.choix .faux { border-color: var(--rouge-texte); background: var(--rouge-fond); }
.choix .faux .lettre { background: var(--rouge-texte); color: #fff; }
.choix .eteint { opacity: .55; }

.retour { border-left: 4px solid var(--vert); padding: 4px 0 4px 16px; margin: 0 0 24px; }
.retour.rate { border-color: var(--rouge-texte); }
.retour h3 { outline: none; }
.retour p { margin: 0 0 10px; }
.piege { font-weight: 700; }
.sources { font-size: .9375rem; color: var(--gris); }

.bouton { display: inline-block; min-height: 52px; padding: 14px 28px; border: 0; border-radius: 10px; background: var(--rouge-texte); color: #fff; font: 700 1.0625rem/1.4 "Lato", sans-serif; cursor: pointer; text-decoration: none; }
.bouton:hover { background: #b51219; }
.bouton.second { background: #fff; color: var(--encre); border: 2px solid var(--encre); }

.score { font-family: var(--titre); font-weight: 700; font-size: 4rem; line-height: 1; margin: 0 0 8px; }
.score small { font-size: 1.5rem; color: var(--gris); }
.debat { margin: 32px 0; padding: 20px; background: #f7f7f7; border-radius: 10px; }
.debat ul { margin: 0 0 16px; padding-left: 20px; }
.debat details summary { cursor: pointer; font-weight: 700; color: var(--rouge-texte); }
.debat details p { margin: 10px 0 0; }

/* Page de résultats (lisible aussi projetée) */
.resultats { max-width: 960px; }
.resultats h2 { margin: 40px 0 16px; }
.chiffres { display: flex; flex-wrap: wrap; gap: 12px 40px; }
.chiffres p { margin: 0; color: var(--gris); }
.chiffres strong { display: block; font-family: var(--titre); font-size: 3rem; line-height: 1.1; color: var(--encre); }
.histo { display: grid; grid-template-columns: repeat(11, 1fr); gap: 6px; align-items: end; height: 180px; }
.histo__col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.histo__barre { width: 100%; min-height: 2px; background: var(--rouge); border-radius: 4px 4px 0 0; }
.histo__nb { font-size: .875rem; font-weight: 700; }
.histo__score { font-size: .875rem; color: var(--gris); border-top: 1px solid var(--ligne); width: 100%; text-align: center; padding-top: 4px; }
.res-q { padding: 20px 0; border-top: 1px solid var(--ligne); }
.res-choix { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.res-choix li { display: grid; grid-template-columns: 1fr 90px; grid-template-areas: "texte nb" "barre barre"; gap: 4px 12px; }
.res-choix__texte { grid-area: texte; }
.res-choix__nb { grid-area: nb; text-align: right; font-weight: 700; }
.res-choix__nb small { color: var(--gris); font-weight: 400; }
.res-choix__barre { grid-area: barre; height: 10px; background: #f0f0f0; border-radius: 5px; overflow: hidden; }
.res-choix__barre span { display: block; height: 100%; background: #9a9a9a; }
.res-choix .ok .res-choix__texte { font-weight: 700; color: var(--vert); }
.res-choix .ok .res-choix__barre span { background: var(--vert); }

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

/* Prénom (accueil) et classement (résultats) */
.prenom { display: grid; gap: 8px; max-width: 360px; }
.prenom label { font-weight: 700; }
.prenom input { min-height: 52px; padding: 12px 14px; border: 2px solid #8a8a8a; border-radius: 10px; font: inherit; }
.prenom input:focus { border-color: var(--encre); outline: none; }
.prenom .bouton { margin-top: 8px; justify-self: start; }
.classement { width: 100%; border-collapse: collapse; font-size: 1.125rem; }
.classement th, .classement td { padding: 10px 8px; border-bottom: 1px solid var(--ligne); text-align: left; }
.classement th { font-size: .8125rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gris); }
.classement td:nth-child(n+3), .classement th:nth-child(n+3) { text-align: right; white-space: nowrap; }
.classement .rang { width: 48px; font-family: var(--titre); font-weight: 700; color: var(--gris); }
.classement tr:nth-child(-n+3) .rang { color: var(--rouge-texte); }
.classement .nom { font-weight: 700; overflow-wrap: anywhere; }
