/* =========================================================
   Club informatique — formation.pixidam.com
   Feuille de style unique. Pensée pour des seniors :
   gros texte, fort contraste, gros boutons, rien de caché.
   ========================================================= */

:root {
  --papier: #fbf6ec;
  --carte: #ffffff;
  --encre: #1c1b19;
  --encre-douce: #4a4640;
  --jaune: #f6c744;
  --jaune-pale: #fdf0c4;
  --bleu: #1f4e8c;
  --bleu-fonce: #163a69;
  --vert: #1e6b34;
  --vert-pale: #e3f3e6;
  --rouge: #a8231b;
  --rouge-pale: #fbe6e4;
  --bord: #d9d0bf;
  --rayon: 14px;
  --ombre: 0 2px 0 rgba(0, 0, 0, .08), 0 6px 18px rgba(0, 0, 0, .06);
}

/* Taille du texte réglable par le bouton « A+ » (voir site.js) */
html { font-size: 125%; }                 /* 20 px de base */
html[data-taille="grand"] { font-size: 143.75%; }  /* 23 px */
html[data-taille="tres-grand"] { font-size: 162.5%; } /* 26 px */

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font-family: "Segoe UI", "Noto Sans", "DejaVu Sans", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--bleu); text-underline-offset: .18em; }
a:hover { color: var(--bleu-fonce); }

:focus-visible {
  outline: 4px solid var(--bleu);
  outline-offset: 3px;
  border-radius: 6px;
}

.conteneur { max-width: 1100px; margin: 0 auto; padding: 0 1.1rem; }

.lien-evitement {
  position: absolute; left: -9999px; top: 0;
  background: var(--encre); color: #fff; padding: .6rem 1rem; z-index: 10;
}
.lien-evitement:focus { left: 1rem; top: 1rem; }

/* ---------- En-tête ---------- */
.entete {
  background: var(--encre);
  color: #fff;
  border-bottom: 6px solid var(--jaune);
}
.entete .conteneur {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-top: .8rem; padding-bottom: .8rem; flex-wrap: wrap;
}
.marque {
  display: flex; align-items: center; gap: .7rem;
  color: #fff; text-decoration: none; font-weight: 700; font-size: 1.05rem;
  line-height: 1.25;
}
.marque:hover { color: var(--jaune); }
.marque svg { flex: none; width: 2.2rem; height: 2.2rem; }
.marque small { display: block; font-weight: 400; font-size: .8rem; opacity: .85; }

.taille-texte {
  display: flex; align-items: center; gap: .4rem; font-size: .85rem;
}
.taille-texte button {
  min-width: 3rem; min-height: 2.6rem;
  font: inherit; font-weight: 700;
  background: #fff; color: var(--encre);
  border: 2px solid #fff; border-radius: 10px; cursor: pointer;
}
.taille-texte button:hover { background: var(--jaune); border-color: var(--jaune); }

/* ---------- Titres et textes ---------- */
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6rem; }
h1 { font-size: 2rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }

main { padding: 1.6rem 0 3rem; }

.fil { margin: 0 0 1.2rem; font-size: .95rem; }
.fil a { font-weight: 600; }

/* ---------- Accueil ---------- */
.bandeau {
  background: var(--jaune);
  border: 3px solid var(--encre);
  border-radius: var(--rayon);
  padding: 1.6rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 6px 6px 0 var(--encre);
}
.bandeau h1 { font-size: 2.1rem; margin-bottom: .5rem; }
.bandeau .accroche { font-size: 1.2rem; margin-bottom: 1.2rem; }

.infos-pratiques {
  display: grid; gap: .8rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  margin: 0; padding: 0; list-style: none;
}
.infos-pratiques li {
  background: #fff; border: 2px solid var(--encre); border-radius: 12px;
  padding: .8rem 1rem; display: flex; gap: .7rem; align-items: center;
}
.infos-pratiques .icone { font-size: 1.6rem; line-height: 1; }
.infos-pratiques strong { display: block; }

.section { margin-bottom: 2.4rem; }

.etapes {
  display: grid; gap: 1rem; counter-reset: etape;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  list-style: none; padding: 0; margin: 0;
}
.etapes li {
  background: var(--carte); border: 2px solid var(--bord); border-radius: var(--rayon);
  padding: 1rem 1.1rem 1rem 4rem; position: relative; counter-increment: etape;
}
.etapes li::before {
  content: counter(etape);
  position: absolute; left: 1rem; top: 1rem;
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: var(--bleu); color: #fff; font-weight: 700;
  display: grid; place-items: center;
}

.grille-seances {
  display: grid; gap: 1.2rem;
  grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
  list-style: none; padding: 0; margin: 0;
}
.carte-seance {
  background: var(--carte);
  border: 3px solid var(--encre);
  border-radius: var(--rayon);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--ombre);
}
.carte-seance .vignette { aspect-ratio: 16 / 9; background: var(--jaune-pale); border-bottom: 3px solid var(--encre); }
.carte-seance .vignette img { width: 100%; height: 100%; object-fit: cover; }
.carte-seance .vignette.vide {
  display: grid; place-items: center; font-size: 3.4rem; font-weight: 800; color: var(--encre-douce);
}
.carte-seance .corps { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.carte-seance .numero {
  font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--bleu);
}
.carte-seance h3 { margin: 0; }
.carte-seance p { margin: 0; color: var(--encre-douce); }
.carte-seance .actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: .6rem; padding-top: .4rem; }
.carte-seance.a-venir { border-style: dashed; box-shadow: none; }
.etiquette {
  display: inline-block; align-self: flex-start;
  background: #ece6d9; color: var(--encre); border-radius: 999px;
  padding: .2rem .8rem; font-size: .85rem; font-weight: 600;
}
.score-memo { font-size: .9rem; color: var(--vert); font-weight: 600; }

/* ---------- Boutons ---------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3.2rem; padding: .6rem 1.3rem;
  font: inherit; font-weight: 700; text-decoration: none; text-align: center;
  border-radius: 12px; border: 3px solid var(--encre);
  background: var(--bleu); color: #fff; cursor: pointer;
  box-shadow: 3px 3px 0 var(--encre);
}
.bouton:hover { background: var(--bleu-fonce); color: #fff; }
.bouton:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--encre); }
.bouton.secondaire { background: #fff; color: var(--encre); }
.bouton.secondaire:hover { background: var(--jaune-pale); color: var(--encre); }
.bouton.jaune { background: var(--jaune); color: var(--encre); }
.bouton.jaune:hover { background: #f1b919; }
.bouton[disabled] { opacity: .4; cursor: not-allowed; box-shadow: none; transform: none; }

/* ---------- Page de séance ---------- */
.titre-seance .surtitre { font-weight: 700; color: var(--bleu); text-transform: uppercase; letter-spacing: .04em; font-size: .9rem; margin-bottom: .2rem; }
.barre-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.2rem 0 1.6rem; }

.visionneuse {
  background: var(--carte); border: 3px solid var(--encre); border-radius: var(--rayon);
  padding: .8rem; box-shadow: var(--ombre);
}
.visionneuse figure { margin: 0; }
.visionneuse .cadre {
  position: relative; background: #111; border-radius: 8px; overflow: hidden;
  aspect-ratio: 16 / 9; display: grid; place-items: center;
  touch-action: pan-y;
}
.visionneuse .cadre img { width: 100%; height: 100%; object-fit: contain; }

.navigation-diapos {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  margin-top: .8rem; flex-wrap: wrap;
}
.navigation-diapos .compteur { font-weight: 700; font-size: 1.1rem; text-align: center; flex: 1; min-width: 9rem; }
.navigation-diapos .bouton { min-width: 9.5rem; }

.outils-diapos { display: flex; justify-content: center; gap: .6rem; margin-top: .6rem; flex-wrap: wrap; }

/* Plein écran */
.visionneuse:fullscreen { background: #000; border: 0; border-radius: 0; padding: 1rem; display: flex; flex-direction: column; justify-content: center; }
.visionneuse:fullscreen .cadre { aspect-ratio: auto; height: calc(100vh - 9rem); background: #000; }
.visionneuse:fullscreen .compteur { color: #fff; }
.visionneuse:fullscreen .outils-diapos .bouton { background: #fff; color: var(--encre); }
.visionneuse:-webkit-full-screen { background: #000; width: 100%; height: 100%; padding: 1rem; }

.retranscription {
  margin-top: 1.4rem;
  background: var(--jaune-pale); border: 2px solid var(--encre); border-radius: var(--rayon);
  padding: 1.2rem 1.3rem;
}
.retranscription .petit-titre { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--encre-douce); margin-bottom: .3rem; }
.retranscription h2 { margin-bottom: .8rem; }
.retranscription p:last-child, .retranscription ul:last-child { margin-bottom: 0; }
.retranscription ul { padding-left: 1.3rem; margin: 0 0 1rem; }
.retranscription li { margin-bottom: .35rem; }

.fin-seance {
  margin-top: 1.4rem; background: var(--vert-pale); border: 2px solid var(--vert);
  border-radius: var(--rayon); padding: 1.2rem 1.3rem;
}
.fin-seance[hidden] { display: none; }

.sommaire { margin-top: 1.6rem; }
.sommaire summary {
  cursor: pointer; font-weight: 700; font-size: 1.15rem;
  background: var(--carte); border: 2px solid var(--encre); border-radius: 12px;
  padding: .8rem 1.1rem; list-style-position: inside;
}
.sommaire ol { margin: .8rem 0 0; padding: 0; list-style: none; display: grid; gap: .4rem; }
.sommaire li button {
  width: 100%; text-align: left; font: inherit; cursor: pointer;
  background: var(--carte); color: var(--encre); border: 2px solid var(--bord); border-radius: 10px;
  padding: .55rem .9rem; display: flex; gap: .8rem; align-items: baseline;
}
.sommaire li button:hover { border-color: var(--bleu); }
.sommaire li button[aria-current="true"] { border-color: var(--bleu); background: #e8eef7; font-weight: 700; }
.sommaire .num { font-weight: 700; color: var(--bleu); min-width: 1.8rem; }

/* ---------- Quiz ---------- */
.quiz {
  background: var(--carte); border: 3px solid var(--encre); border-radius: var(--rayon);
  padding: 1.4rem 1.4rem 1.6rem; box-shadow: var(--ombre); max-width: 860px;
}
.progression-texte { font-weight: 700; color: var(--bleu); margin-bottom: .4rem; }
.progression {
  height: 14px; background: #ece6d9; border-radius: 999px; overflow: hidden; margin-bottom: 1.4rem;
  border: 2px solid var(--encre);
}
.progression span { display: block; height: 100%; width: 0; background: var(--jaune); transition: width .3s; }
.quiz .question { font-size: 1.4rem; margin-bottom: 1.2rem; }

.choix { list-style: none; padding: 0; margin: 0 0 1.2rem; display: grid; gap: .7rem; }
.choix button {
  width: 100%; text-align: left; font: inherit; cursor: pointer;
  display: flex; gap: .9rem; align-items: center;
  background: #fff; color: var(--encre);
  border: 3px solid var(--encre); border-radius: 12px;
  padding: .8rem 1rem; min-height: 3.6rem;
}
.choix button:hover:not([disabled]) { background: var(--jaune-pale); }
.choix .lettre {
  flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800;
  background: var(--encre); color: #fff;
}
.choix .marque-reponse { margin-left: auto; font-weight: 800; font-size: 1.3rem; }
.choix button[disabled] { cursor: default; }
.choix button.juste { background: var(--vert-pale); border-color: var(--vert); }
.choix button.juste .lettre { background: var(--vert); }
.choix button.faux { background: var(--rouge-pale); border-color: var(--rouge); }
.choix button.faux .lettre { background: var(--rouge); }
.choix button.estompe { opacity: .55; }

.retour-reponse { border-radius: 12px; padding: 1rem 1.2rem; margin-bottom: 1.2rem; border: 2px solid; }
.retour-reponse.juste { background: var(--vert-pale); border-color: var(--vert); }
.retour-reponse.faux { background: var(--rouge-pale); border-color: var(--rouge); }
.retour-reponse .verdict { font-weight: 800; font-size: 1.2rem; margin-bottom: .4rem; }
.retour-reponse.juste .verdict { color: var(--vert); }
.retour-reponse.faux .verdict { color: var(--rouge); }
.retour-reponse p { margin-bottom: .5rem; }
.retour-reponse p:last-child { margin-bottom: 0; }

.resultat { text-align: center; }
.resultat .score { font-size: 3.2rem; font-weight: 800; line-height: 1.1; margin: .4rem 0 .6rem; }
.resultat .score small { font-size: 1.4rem; font-weight: 600; color: var(--encre-douce); }
.resultat .actions { display: flex; justify-content: center; flex-wrap: wrap; gap: .8rem; margin-top: 1.4rem; }

/* ---------- Pied de page ---------- */
.pied {
  border-top: 3px solid var(--encre); background: #f3ecdd; padding: 1.4rem 0 2rem; font-size: .9rem;
}
.pied p { margin-bottom: .4rem; }

/* ---------- Petits écrans ---------- */
@media (max-width: 640px) {
  h1 { font-size: 1.6rem; }
  .bandeau { padding: 1.2rem 1rem; box-shadow: 4px 4px 0 var(--encre); }
  .bandeau h1 { font-size: 1.65rem; }
  .navigation-diapos .compteur { order: -1; flex-basis: 100%; }
  .navigation-diapos .bouton { flex: 1; min-width: 0; }
  .quiz { padding: 1rem; }
  .quiz .question { font-size: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

@media print {
  .entete, .pied, .barre-actions, .navigation-diapos, .outils-diapos, .sommaire { display: none; }
}

/* Texte lu par les lecteurs d'écran mais invisible à l'écran */
.visuellement-cache {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
