/* outils.esiptv.online — style sombre à fort contraste.
   Couleurs écrites en dur (pas de variables CSS) pour rester lisible
   sur les navigateurs de Smart TV un peu anciens. */

html { font-size: 18px; -webkit-text-size-adjust: 100%; }
html.tv { font-size: 24px; }
body {
  margin: 0;
  background: #0a0d12;
  color: #f4f6f8;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; }

a { color: #ffc54d; }
a:hover { color: #ffffff; }

/* Focus toujours visible, y compris à 3 m de l'écran */
a:focus, button:focus, summary:focus {
  outline: 4px solid #ffffff;
  outline-offset: 4px;
}
a:focus:not(:focus-visible), button:focus:not(:focus-visible), summary:focus:not(:focus-visible) { outline: none; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 4px solid #ffffff;
  outline-offset: 4px;
}
html.tv a:focus, html.tv button:focus, html.tv summary:focus { outline: 6px solid #ffffff; outline-offset: 6px; }

.evitement {
  position: absolute; left: -999em; top: 0;
  background: #ffb224; color: #111111; padding: 0.6rem 1rem; font-weight: 700; z-index: 10;
}
.evitement:focus { left: 0.5rem; top: 0.5rem; }

.entete, main, .pied {
  max-width: 1100px;
  margin: 0 auto;
  padding-left: 1.2rem;
  padding-right: 1.2rem;
}
html.tv .entete, html.tv main, html.tv .pied { max-width: 92%; }

.entete {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #2a3441;
}
.marque { margin: 0; font-size: 1.15rem; }
.marque-nom { font-weight: 800; letter-spacing: 0.04em; color: #ffb224; }
.marque-sous { color: #b6c0cc; margin-left: 0.3em; }
.lien-discret { color: #b6c0cc; font-size: 0.85rem; text-decoration: none; padding: 0.4rem 0.2rem; }
.lien-discret:hover { text-decoration: underline; }

.test { padding: 1.6rem 0 1rem; }
h1 { font-size: 2rem; line-height: 1.15; margin: 0 0 0.5rem; }
h2 { font-size: 1.35rem; margin: 2rem 0 0.8rem; }
.chapo { font-size: 1.1rem; color: #d5dce4; margin: 0 0 1.2rem; max-width: 42em; }

.avis {
  border-left: 4px solid #55647a;
  background: #141a22;
  padding: 0.7rem 1rem;
  margin: 1rem 0;
  color: #d5dce4;
  max-width: 46em;
}
.avis strong { color: #ffffff; }
.avis-alerte { border-left-color: #ffb224; }

.actions { margin: 1.2rem 0; }
.bouton {
  font: inherit;
  font-size: 1.3rem;
  font-weight: 700;
  min-height: 3.4rem;
  min-width: 14rem;
  padding: 0.8rem 2rem;
  border-radius: 0.6rem;
  border: 3px solid transparent;
  cursor: pointer;
  margin: 0 0.8rem 0.6rem 0;
}
.bouton-principal { background: #ffb224; color: #111111; }
.bouton-principal:hover { background: #ffc54d; }
.bouton-secondaire { background: #0a0d12; color: #ffffff; border-color: #f4f6f8; }
.bouton-secondaire:hover { background: #1c2430; }
.bouton[disabled] { background: #2a3441; color: #8f9bab; cursor: not-allowed; }

/* Progression */
.progression { margin: 1.2rem 0; }
.etapes { list-style: none; margin: 0 0 0.8rem; padding: 0; display: flex; flex-wrap: wrap; }
.etape {
  flex: 1 1 14rem;
  margin: 0 0.6rem 0.6rem 0;
  padding: 0.6rem 0.9rem;
  background: #141a22;
  border: 2px solid #2a3441;
  border-radius: 0.5rem;
  color: #b6c0cc;
}
.etape-nom { display: block; font-weight: 700; color: #f4f6f8; }
.etape-etat { font-size: 0.9rem; }
.etape.encours { border-color: #ffb224; }
.etape.encours .etape-etat { color: #ffb224; font-weight: 700; }
.etape.termine { border-color: #4ade80; }
.etape.termine .etape-etat { color: #4ade80; }
.etape.indisponible { border-color: #ff8a80; }
.etape.indisponible .etape-etat { color: #ff8a80; }

.barre { height: 0.7rem; background: #2a3441; border-radius: 0.35rem; overflow: hidden; }
.barre-niveau { height: 100%; width: 0; background: #ffb224; transition: width 0.25s linear; }

.annonce { min-height: 1.5em; margin: 0.6rem 0; font-weight: 700; color: #ffffff; }

/* Résultats */
.titre-resultats { margin-top: 1.2rem; }
.resultats { display: flex; flex-wrap: wrap; margin: 0 -0.4rem; }
.resultat {
  width: calc(50% - 0.8rem);
  margin: 0.4rem;
  padding: 1rem 1rem 0.9rem;
  background: #141a22;
  border: 2px solid #2a3441;
  border-radius: 0.7rem;
}
.resultat h3 { margin: 0; font-size: 1rem; font-weight: 700; color: #d5dce4; }
.valeur { margin: 0.2rem 0 0.1rem; line-height: 1.1; white-space: nowrap; }
.nombre { font-size: 2.6rem; font-weight: 800; color: #ffffff; font-variant-numeric: tabular-nums; }
.unite { font-size: 1.05rem; font-weight: 700; color: #ffb224; }
.resultat.indisponible .nombre { font-size: 1.3rem; color: #ff8a80; }
.resultat.indisponible .valeur { white-space: normal; }
.resultat.indisponible .unite { display: none; }
.resultat.vide .nombre { color: #6b7a8f; }
.resultat.provisoire .nombre { color: #b6c0cc; }
.detail { margin: 0; font-size: 0.85rem; color: #b6c0cc; }

.messages { list-style: none; padding: 0; margin: 1rem 0 0; max-width: 46em; }
.messages li {
  border-left: 4px solid #ff8a80;
  background: #1d1517;
  padding: 0.6rem 1rem;
  margin-bottom: 0.5rem;
}
.messages li.info { border-left-color: #55647a; background: #141a22; }

.precision { margin: 1.2rem 0 0.4rem; color: #f4f6f8; max-width: 46em; }
.note { margin: 0; font-size: 0.9rem; color: #b6c0cc; max-width: 46em; }

/* FAQ */
.faq { padding-bottom: 1rem; max-width: 46em; }
html.tv .faq { max-width: none; }
details { border-top: 1px solid #2a3441; }
details:last-child { border-bottom: 1px solid #2a3441; }
summary { cursor: pointer; padding: 0.9rem 0.3rem; font-weight: 700; font-size: 1.05rem; }
details p { margin: 0 0.3rem 0.9rem; color: #d5dce4; }

.pied { padding-top: 1rem; padding-bottom: 2rem; color: #b6c0cc; font-size: 0.9rem; border-top: 1px solid #2a3441; margin-top: 1rem; }

@media (min-width: 900px) {
  h1 { font-size: 2.6rem; }
  .resultat { width: calc(25% - 0.8rem); }
  .nombre { font-size: 3rem; }
}
@media (max-width: 420px) {
  html { font-size: 16px; }
  .bouton { width: 100%; margin-right: 0; }
  .nombre { font-size: 2.1rem; }
  .unite { font-size: 0.9rem; }
}
html.tv .nombre { font-size: 3.4rem; }
html.tv .unite { font-size: 1.3rem; }

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