/* quiz.css — quiz sur le modèle du « Premier de la classe » : ardoise à la craie dans un cadre en bois, habillée pour Noël */
.quiz { position: absolute; inset: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: calc(64px + env(safe-area-inset-top)) 16px calc(18px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, var(--fond), color-mix(in srgb, var(--fond) 80%, var(--secondaire))); color: var(--encre); }
.quiz__tete { display: flex; align-items: center; gap: 12px; }
.quiz__tuile { flex: none; width: 42px; height: 42px; border-radius: 12px; background: var(--primaire); color: var(--secondaire); display: grid; place-items: center; font: italic 800 15px var(--police-titre); box-shadow: 0 0 0 2px var(--secondaire); }
.quiz__titre { flex: 1; min-width: 0; }
.quiz__titre b { display: block; font: 800 16px/1.15 var(--police-titre); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quiz__titre small { display: block; font-size: 12px; font-weight: 600; opacity: .7; margin-top: 2px; }
.quiz__pts { font: 800 20px/1 var(--police-titre); color: var(--primaire); white-space: nowrap; }
.quiz__pts small { font-size: 12px; opacity: .6; font-weight: 600; }
.quiz__segments { display: flex; gap: 4px; }
.quiz__segments i { flex: 1; height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--encre) 15%, transparent); transition: background .22s; }
.quiz__segments i.ok { background: #2e9e5b; } .quiz__segments i.ko { background: #e5484d; } .quiz__segments i.ici { background: var(--secondaire); }
.quiz__ardoise-zone { position: relative; }
.quiz__ardoise {
  position: relative; padding: 14px 16px 14px; border: 10px solid #8b5e3c; border-radius: 12px; color: #f4f1e8;
  background: radial-gradient(ellipse 80% 70% at 30% 20%, #2f5a49 0%, #23473a 60%, #1c3a2f 100%);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.25), 0 14px 28px rgba(60,40,20,.28);
}
.quiz__ligne1 { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.quiz__niveau { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px; border: 1.5px solid rgba(244,241,232,.55); font: 700 12px var(--police-titre); white-space: nowrap; }
.quiz__etoiles { color: #f2d88a; letter-spacing: 1px; }
.quiz__anneau { position: relative; width: 50px; height: 50px; flex: none; }
.quiz__anneau svg { display: block; width: 50px; height: 50px; transform: rotate(-90deg); }
.quiz__anneau-fond { fill: none; stroke: rgba(244,241,232,.18); stroke-width: 5; }
.quiz__anneau-v { fill: none; stroke: #f2d88a; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 138.2; stroke-dashoffset: 0; }
.quiz__sec { position: absolute; inset: 0; display: grid; place-items: center; font: 800 17px var(--police-titre); font-variant-numeric: tabular-nums; }
.quiz__anneau--urgent .quiz__anneau-v { stroke: #ff8a8a; } .quiz__anneau--urgent .quiz__sec { color: #ff8a8a; }
.quiz__image { margin-top: 10px; display: flex; justify-content: center; }
.quiz__image img { max-height: 110px; max-width: 100%; border-radius: 10px; }
.quiz__image[hidden] { display: none; }
.quiz__question { font: 700 clamp(26px, 8vw, 34px)/1.15 'Caveat', var(--police-titre), cursive; margin: 10px 0 6px; text-wrap: pretty; text-shadow: 0 0 1px rgba(255,255,255,.4); }
.quiz__etat { min-height: 28px; display: flex; align-items: center; font: 700 20px/1 'Caveat', cursive; color: rgba(244,241,232,.6); }
.quiz__etat--bonne { color: #a8e6b8; font-size: 26px; } .quiz__etat--faux { color: #ffb3b3; font-size: 26px; }
.quiz__rebord { height: 8px; margin: 0 18px; background: #6e4a2e; border-radius: 0 0 6px 6px; box-shadow: 0 4px 8px rgba(60,40,20,.25); display: flex; align-items: flex-start; gap: 10px; padding-left: 24px; }
.quiz__rebord i { display: block; width: 22px; height: 5px; margin-top: -3px; border-radius: 3px; background: #f4f1e8; }
.quiz__rebord i + i { width: 14px; background: #f2d88a; }
.quiz__reponses { display: grid; gap: 10px; margin-top: 4px; }
.quiz__rep { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 10px 14px; border-radius: 16px; text-align: left; background: #fff; border: 2px solid rgba(22,19,26,.08); box-shadow: 0 2px 6px rgba(60,40,20,.08); font: 600 17px/1.3 var(--police-texte); color: #16131a; cursor: pointer; transition: background-color .14s, border-color .14s, opacity .22s, transform .1s; }
.quiz__rep:active { transform: scale(.98); }
.quiz__rep:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.quiz__l { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font: 800 15px var(--police-titre); background: color-mix(in srgb, var(--primaire) 12%, #fff); color: var(--primaire); }
.quiz__rt { flex: 1; }
.quiz__rep--bonne { background: #e4f5ea; border-color: #2e9e5b; } .quiz__rep--bonne .quiz__l { background: #2e9e5b; color: #fff; }
.quiz__rep--faux { background: #fdecea; border-color: #e5484d; } .quiz__rep--faux .quiz__l { background: #e5484d; color: #fff; }
.quiz__rep--eteint { opacity: .5; }
.quiz__rep[disabled] { cursor: default; }
/* fin : la note entourée en rouge */
.quiz--bilan > :not(.quiz__fin) { display: none; }
.quiz__fin { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding-top: 6px; }
.quiz__fin[hidden] { display: none; }
.quiz__fin-mat { font: 700 12px var(--police-titre); letter-spacing: .12em; text-transform: uppercase; color: var(--primaire); }
.quiz__note { margin-top: 14px; }
.quiz__note span { display: inline-block; font: 700 84px/.9 'Caveat', cursive; color: #c62828; padding: 12px 28px 6px; border: 4px solid #c62828; border-radius: 50%; transform: rotate(-6deg); background: #fff; animation: mc-pop .4s cubic-bezier(.2, 1.4, .4, 1); }
.quiz__note small { font-size: 34px; }
.quiz__appr { font: 700 28px/1.15 'Caveat', cursive; color: var(--primaire); margin: 16px 0 0; }
.quiz__detail { font-size: 15px; font-weight: 600; margin: 0; opacity: .75; }
.quiz__corr { width: 100%; text-align: left; margin-top: 10px; }
.quiz__corr summary { padding: 14px 18px; border-radius: 16px; background: #fff; box-shadow: 0 2px 8px rgba(22,19,26,.06); font: 700 15px var(--police-titre); color: var(--primaire); cursor: pointer; }
.quiz__corr > div { background: #fff; border-radius: 14px; padding: 12px 14px; margin-top: 8px; font-size: 14px; line-height: 1.45; display: grid; gap: 2px; }
.quiz__corr .ok { color: #1f7a4a; font-weight: 600; } .quiz__corr .non { color: #8a8492; } .quiz__corr em { color: #57515f; font-size: 13px; }
.quiz__parfait { font: 700 22px 'Caveat', cursive; color: #2e9e5b; margin: 8px 0 0; }
.quiz__suite { width: 100%; margin-top: 14px; }
@media (prefers-reduced-motion: reduce) { .quiz__rep, .quiz__segments i { transition: none; } .quiz__note span { animation: none; } }
