/* =====================================================================
   style.css -- feuille de style partagee
   Ateliers Medation Numerique (Cedric Waltener / AFPA Gueret)

   Utilisee par : index.html, a-propos.html, prestations.html, stats.html
   PAS encore utilisee par : les 25 fiches et 17 quiz de ateliers/
   (voir le plan de migration dans README.md)

   Theme "Yggdrasil" : vert nature, fond creme en clair / anthracite en
   sombre. Le theme sombre suit prefers-color-scheme par defaut, et peut
   etre force via l'attribut data-theme="dark"/"light" sur <html>, pose
   par le bouton de theme (voir le script partage en bas de chaque page).
   ===================================================================== */

/* ---------- 1. Jetons de design (couleurs, ombres) ---------- */
:root {
  --bg: #f5f4f0;
  --bg-soft: #ece9e2;
  --card: #ffffff;
  --text: #211f1c;
  --muted: #6b6559;
  --border: #e2ded4;
  --accent: #35604f;
  --accent-2: #b6562f;
  --accent-3: #2b5d8a;
  --accent-soft: #e7f0ea;
  --badge-docx: #2b579a;
  --badge-pptx: #d24726;
  --badge-pdf: #a8341f;
  --badge-quiz: #35604f;
  --good: #2f7d4f;
  --bad: #b3432f;
  --font-scale: 1;
  --shadow: 0 1px 2px rgba(30,25,15,0.04), 0 8px 24px rgba(30,25,15,0.06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15181a;
    --bg-soft: #1b1f21;
    --card: #1e2224;
    --text: #eceae5;
    --muted: #a2a29c;
    --border: #2c3133;
    --accent: #83c1a6;
    --accent-2: #ef9169;
    --accent-3: #6ea8dc;
    --accent-soft: #22302a;
    --badge-docx: #7bb0ff;
    --badge-pptx: #ff9e78;
    --badge-pdf: #ff8177;
    --badge-quiz: #2f7d4f;
    --good: #6fcf97;
    --bad: #ef9169;
    --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 12px 28px rgba(0,0,0,0.35);
  }
}
:root[data-theme="dark"] {
  --bg: #15181a;
  --bg-soft: #1b1f21;
  --card: #1e2224;
  --text: #eceae5;
  --muted: #a2a29c;
  --border: #2c3133;
  --accent: #83c1a6;
  --accent-2: #ef9169;
  --accent-3: #6ea8dc;
  --accent-soft: #22302a;
  --badge-docx: #7bb0ff;
  --badge-pptx: #ff9e78;
  --badge-pdf: #ff8177;
  --badge-quiz: #2f7d4f;
  --good: #6fcf97;
  --bad: #ef9169;
  --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 12px 28px rgba(0,0,0,0.35);
}
:root[data-theme="light"] {
  --bg: #f5f4f0;
  --bg-soft: #ece9e2;
  --card: #ffffff;
  --text: #211f1c;
  --muted: #6b6559;
  --border: #e2ded4;
  --accent: #35604f;
  --accent-2: #b6562f;
  --accent-3: #2b5d8a;
  --accent-soft: #e7f0ea;
  --badge-docx: #2b579a;
  --badge-pptx: #d24726;
  --badge-pdf: #a8341f;
  --badge-quiz: #35604f;
  --good: #2f7d4f;
  --bad: #b3432f;
  --shadow: 0 1px 2px rgba(30,25,15,0.04), 0 8px 24px rgba(30,25,15,0.06);
}

/* ---------- 2. Reset + typographie de base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: calc(16px * var(--font-scale)); }
body {
  margin: 0;
  background:
    radial-gradient(1100px 750px at 6% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
    radial-gradient(900px 650px at 100% 26%, color-mix(in srgb, var(--accent-2) 9%, transparent), transparent 55%),
    radial-gradient(950px 800px at 10% 92%, color-mix(in srgb, var(--accent-3) 8%, transparent), transparent 58%),
    var(--bg);
  background-attachment: fixed, fixed, fixed, fixed;
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; }
a { color: inherit; }
/* Frein contre la copie/impression (dissuasion, pas une securite absolue) --
   utilise uniquement sur les pages qui portent la classe .no-select. Les
   liens de telechargement des ateliers (clic gauche normal) restent cliquables. */
body.no-select {
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

/* ---------- 3. Elements d'interface fixes (toutes pages) ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%; z-index: 60;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  transition: width .1s linear;
}
.icon-btn {
  flex: 0 0 auto; width: 2.6rem; height: 2.6rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--card); box-shadow: var(--shadow);
  cursor: pointer; font-size: 1.05rem; display: flex; align-items: center; justify-content: center;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.icon-btn:hover { transform: translateY(-2px); border-color: var(--accent); }
.icon-btn.active { background: var(--accent); border-color: var(--accent); }
/* Variante bouton de theme flottant, utilisee sur les pages secondaires
   (sur l'accueil, le bouton de theme vit dans la barre de recherche collante) */
.icon-btn.icon-btn-floating { position: fixed; top: 1.1rem; right: 1.1rem; z-index: 50; }

.back-to-top {
  position: fixed; bottom: 1.4rem; right: 1.1rem; z-index: 50;
  width: 2.8rem; height: 2.8rem; border-radius: 999px;
  background: var(--accent); color: #fff; border: none; box-shadow: var(--shadow);
  cursor: pointer; font-size: 1.2rem; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease;
}
.back-to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { filter: brightness(1.1); }

/* ---------- 4. Apparition au defilement ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- 5. En-tete des pages secondaires (a-propos, prestations, stats) ---------- */
header {
  position: relative;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  padding: 1.6rem 1.5rem 1.8rem;
}
.wrap { max-width: 900px; margin: 0 auto; }
.back {
  display: inline-block; margin-bottom: 0.9rem;
  color: var(--accent); text-decoration: none; font-size: 0.9rem; font-weight: 500;
}
.back:hover { text-decoration: underline; }
.eyebrow {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.6rem;
}
header h1 { margin: 0.3rem 0 0.4rem; font-size: clamp(1.7rem, 4.5vw, 2.4rem); }
.sub { color: var(--muted); font-size: 1rem; margin: 0 0 1.2rem; max-width: 620px; }
.toplinks { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.toplinks a {
  color: var(--text); text-decoration: none; font-size: 0.83rem; font-weight: 500;
  border: 1px solid var(--border); background: var(--card); padding: 0.45rem 0.95rem; border-radius: 999px;
  transition: border-color .15s ease, transform .15s ease;
}
.toplinks a:hover { border-color: var(--accent); transform: translateY(-1px); }
.toplinks a.current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- 6. Zone principale ---------- */
main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 2rem;
}
/* Variante plus etroite (confort de lecture) pour les pages de contenu texte */
main.narrow { max-width: 900px; padding: 2.4rem 1.5rem 3rem; }

/* ---------- 7. Cartes (composant partage) ---------- */
.card {
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.3rem 1.35rem;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 4px 10px rgba(0,0,0,.06), 0 0 0 1px var(--accent), 0 12px 32px color-mix(in srgb, var(--accent) 22%, transparent);
}
.card h3 { margin: 0 0 0.7rem; font-size: 1rem; font-weight: 600; }
.card p { margin: 0; font-size: 0.9rem; line-height: 1.7; color: var(--muted); }
.card strong { color: var(--text); }
.card > * { position: relative; z-index: 1; }

.about-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.about-grid .card .icon { font-size: 1.5rem; display: block; margin-bottom: 0.5rem; }
/* Ambiance technique ADRN : icones a lueur bleue plutot que verte, pour distinguer
   visuellement les prestations materiel des prestations mediation numerique. */
.adrn-card .icon { filter: drop-shadow(0 0 8px color-mix(in srgb, var(--accent-3) 55%, transparent)); }
.adrn-card:hover { border-color: var(--accent-3); box-shadow: 0 4px 10px rgba(30,25,15,0.08), 0 0 26px color-mix(in srgb, var(--accent-3) 30%, transparent); }
.adrn-subheading { margin: 2rem 0 1rem; font-size: 1.3rem; text-align: center; }
#pricesLockNotice { display: none; }
main.prices-locked #pricesLockNotice { display: block; }
main.prices-locked .card-price-check { display: none; }
main.prices-locked #devisTotal { display: none; }
.card-price-check {
  display: flex; align-items: center; gap: 0.5rem; cursor: pointer;
  margin-top: 0.7rem; padding: 0.3rem 0.75rem; border-radius: 999px; width: fit-content;
  background: color-mix(in srgb, var(--accent-3) 14%, transparent); color: var(--accent-3);
  font-weight: 600; font-size: 0.85rem; transition: background .15s ease;
}
.card-price-check + .card-price-check { margin-top: 0.5rem; }
.card-price-check input { accent-color: var(--accent-3); width: 1rem; height: 1rem; margin: 0; cursor: pointer; }
.card-price-check:hover { background: color-mix(in srgb, var(--accent-3) 24%, transparent); }
#devisTotal { transition: border-color .2s ease, background .2s ease; }
.about-more-link { text-align: center; margin: 1.3rem 0 0; }
.about-more-link a { color: var(--accent); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.about-more-link a:hover { text-decoration: underline; }

/* Encart mis en avant (ex. tarifs sur devis) */
.devis-note {
  background: color-mix(in srgb, var(--accent) 8%, var(--card));
  border: 1.5px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  border-radius: 14px; padding: 1.3rem 1.5rem; text-align: center;
  box-shadow: var(--shadow); margin-top: 0.4rem;
}
.devis-note p { margin: 0; font-size: 0.95rem; color: var(--text); }
.devis-note .price { font-size: 1.3rem; font-weight: 600; color: var(--accent); font-family: "Fraunces", Georgia, serif; display: block; margin-bottom: 0.4rem; }
.devis-note a { color: var(--accent); }

/* ---------- 8. Boutons et liens en pilule ---------- */
.cta-btn {
  display: inline-block; margin: 1.5rem 0 0; font-family: "Inter", sans-serif;
  font-weight: 600; font-size: 0.98rem; color: #fff; text-decoration: none;
  background: var(--accent); padding: 0.85rem 1.8rem; border-radius: 999px;
  box-shadow: var(--shadow); transition: transform .18s ease, filter .18s ease;
}
.cta-btn:hover { transform: translateY(-2px); filter: brightness(1.08); }

.meta-links { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.meta-links a {
  color: var(--text); text-decoration: none; font-size: 0.85rem; font-weight: 500;
  border: 1px solid var(--border); background: var(--card);
  padding: 0.5rem 1.05rem; border-radius: 999px;
  transition: border-color .15s ease, transform .15s ease;
}
.meta-links a:hover { border-color: var(--accent); transform: translateY(-1px); }

.catnav { max-width: 1280px; margin: 0 auto; padding: 0; display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; position: relative; z-index: 2; }
.catnav a { font-size: 0.8rem; text-decoration: none; color: var(--muted); background: var(--card); border: 1px solid var(--border); padding: 0.4rem 0.85rem; border-radius: 999px; box-shadow: var(--shadow); }
.catnav a:hover { color: var(--accent); }
.catnav a.active { color: #fff; background: var(--accent); border-color: var(--accent); }

/* ---------- 9. Hero (page d'accueil) ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; background: var(--bg-soft); border-bottom: 1px solid var(--border); padding: 4.5rem 1.5rem 3.5rem; }
.hero::before {
  content: ""; position: absolute; inset: -20%; z-index: -1;
  background:
    radial-gradient(38% 45% at 12% 8%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 70%),
    radial-gradient(32% 40% at 88% 12%, color-mix(in srgb, var(--accent-2) 45%, transparent), transparent 70%),
    radial-gradient(40% 50% at 50% 100%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%);
  filter: blur(60px) saturate(130%); opacity: 0.55;
  animation: heroBreathe 14s ease-in-out infinite;
}
@keyframes heroBreathe {
  0%, 100% { filter: blur(60px) saturate(130%); opacity: 0.55; }
  50% { filter: blur(75px) saturate(160%); opacity: 0.72; }
}
@media (prefers-reduced-motion: reduce) { .hero::before { animation: none; } }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(circle, color-mix(in srgb, var(--text) 18%, transparent) 1px, transparent 1.4px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 100% at 50% 0%, #000 40%, transparent 90%);
          mask-image: radial-gradient(ellipse 70% 100% at 50% 0%, #000 40%, transparent 90%);
  opacity: 0.5;
}
.hero-inner { max-width: 760px; margin: 0 auto; text-align: center; position: relative; }
.hero .eyebrow { margin-bottom: 1rem; }
.hero h1 { margin: 0 0 0.9rem; font-weight: 600; font-size: clamp(2rem, 5vw, 2.9rem); letter-spacing: -0.01em; }
.hero p { color: var(--muted); margin: 0 auto; max-width: 620px; font-size: 1.02rem; }
.hero-tagline {
  color: var(--accent) !important; font-family: "Fraunces", Georgia, serif; font-weight: 600;
  font-size: 1.15rem !important; margin: 0 0 0.6rem !important; text-shadow: 0 0 18px color-mix(in srgb, var(--accent) 45%, transparent);
}

.stats { display: flex; justify-content: center; gap: 1rem; margin: 2.1rem 0 1.6rem; flex-wrap: wrap; }
.stats div { text-align: center; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 0.9rem 1.6rem; box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease; }
.stats div:hover { transform: translateY(-2px); border-color: var(--accent); }
.stats strong { display: block; font-family: "Fraunces", serif; font-size: 1.7rem; color: var(--accent); }
.stats span { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

.translate-box {
  margin-top: 1.1rem; display: inline-flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; justify-content: center;
  border: 1px solid var(--border); background: var(--card); padding: 0.4rem 0.9rem; border-radius: 999px;
}
.translate-label { font-size: 0.85rem; color: var(--muted); font-weight: 500; }
#google_translate_element .goog-te-gadget { font-family: "Inter", sans-serif !important; font-size: 0; }
#google_translate_element .goog-te-gadget > span > a { font-size: 0.85rem !important; }
#google_translate_element select {
  font-family: "Inter", sans-serif; font-size: 0.85rem; color: var(--text);
  background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px; padding: 0.2rem 0.5rem;
}
.goog-logo-link, .goog-te-gadget span { display: none !important; }

.qr-box {
  position: absolute; top: 1.3rem; right: 1.3rem; z-index: 5;
  display: inline-flex; flex-direction: column; align-items: center; gap: 0.35rem;
  border: 1px solid var(--border); background: var(--card); padding: 0.6rem 0.7rem 0.55rem; border-radius: 14px;
  box-shadow: var(--shadow);
}
.qr-label { font-size: 0.66rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.qr-box img { display: block; border-radius: 6px; background: #fff; padding: 4px; width: 84px; height: 84px; }
.qr-caption { font-size: 0.6rem; color: var(--muted); max-width: 100px; text-align: center; line-height: 1.3; }
/* Sur les pages avec <header> (quiz, fiches, pages secondaires), le
   contenu remplit toute la largeur (pas de coin libre comme sur le hero
   de l'accueil) : le QR reste donc dans le flux normal, sous le
   selecteur de langue, plutot qu'en badge flottant. */
header .qr-box { position: static; margin: 0.9rem 0 0; }
@media (max-width: 760px) {
  .qr-box { position: static; margin: 1.1rem auto 0; }
}

.hero-corner-right {
  position: absolute; top: 1.3rem; right: 1.3rem; z-index: 5;
  display: flex; flex-direction: column; align-items: flex-end; gap: 0.6rem;
}
.hero-corner-right .qr-box { position: static; }
.inscription-badge {
  position: absolute; top: 1.3rem; left: 1.3rem; z-index: 5;
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: "Inter", sans-serif; font-weight: 700; font-size: 1.15rem;
  color: #fff; text-decoration: none; background: var(--accent);
  border: 1px solid var(--border); padding: 1rem 1.6rem; border-radius: 999px;
  box-shadow: var(--shadow); transition: transform .15s ease, filter .15s ease;
}
.inscription-badge:hover { transform: translateY(-2px); filter: brightness(1.08); }
.acct-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: "Inter", sans-serif; font-weight: 700; font-size: 0.85rem;
  color: #fff; text-decoration: none; background: var(--accent);
  border: 1px solid var(--border); padding: 0.55rem 0.95rem; border-radius: 999px;
  box-shadow: var(--shadow); transition: transform .15s ease, filter .15s ease;
}
.acct-badge:hover { transform: translateY(-2px); filter: brightness(1.08); }
@media (max-width: 760px) {
  .hero-corner-right { position: static; align-items: center; margin: 0 auto 1.2rem; }
  .inscription-badge { position: static; display: flex; width: fit-content; margin: 0 auto 1.2rem; font-size: 1.05rem; padding: 0.85rem 1.4rem; }
}

.hero-art { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; color: var(--accent); opacity: 0.5; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--accent) 40%, transparent)); }
.hero-art .warm { color: var(--accent-2); }
.hero-art .blue { color: var(--accent-3); }
@media (max-width: 760px) { .hero-art .hide-mobile { display: none; } }

/* ---------- Cartes de categories (accueil) ---------- */
/* Style neon bleu fixe demande explicitement par l'utilisateur pour cette
   section, y compris en mode clair (ne suit pas les tokens --accent/--card
   du reste du site, c'est voulu). */
.cat-overview { margin: 0 0 2.2rem; }
.cat-overview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.cat-tile {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.4rem;
  padding: 20px; border-radius: 12px; text-decoration: none;
  background: #0d0d0d; border: 1px solid #003d55; color: #fff;
  box-shadow: 0 0 10px rgba(0, 170, 255, 0.1);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.cat-tile-icon { font-size: 40px; margin-bottom: 10px; }
.cat-tile h3 { margin: 10px 0 5px; font-size: 1.2rem; color: #fff; }
.cat-tile p { margin: 0; font-size: 0.9rem; color: #cccccc; line-height: 1.5; }
.cat-tile:hover, .cat-tile:focus-visible {
  transform: translateY(-5px); border-color: #00aaff;
  box-shadow: 0 0 15px #00aaff;
}

/* ---------- Bloc "Parcours debutant" (accueil) : meme style neon fixe ---------- */
.neon-block {
  margin: 0 0 2.2rem; padding: 1.8rem 1.6rem; border-radius: 16px;
  background: #0d0d0d; border: 1px solid #003d55; color: #fff;
  box-shadow: 0 0 10px rgba(0, 170, 255, 0.1);
}
.neon-block h2 { margin: 0 0 0.4rem; color: #fff; }
.neon-block > p { margin: 0 0 1.2rem; color: #cccccc; }
.parcours-list { list-style: none; margin: 0 0 1.4rem; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.parcours-list li {
  background: rgba(255,255,255,0.04); border: 1px solid #003d55; border-radius: 10px;
  padding: 0.65rem 0.9rem; color: #e5e5e5; font-size: 0.95rem;
}
.btn-neon {
  display: inline-block; padding: 0.75rem 1.6rem; border-radius: 999px;
  background: #00aaff; color: #0d0d0d; font-weight: 700; text-decoration: none;
  box-shadow: 0 0 14px rgba(0, 170, 255, 0.55);
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn-neon:hover, .btn-neon:focus-visible {
  transform: translateY(-3px); box-shadow: 0 0 22px #00aaff;
}
.faq-item { padding: 0.9rem 0; border-bottom: 1px solid #003d55; }
.faq-item:last-child { padding-bottom: 0; border-bottom: none; }
.faq-item h3 { margin: 0 0 0.35rem; color: #fff; font-size: 1rem; }
.faq-item p { margin: 0; color: #cccccc; font-size: 0.92rem; line-height: 1.5; }

/* ---------- Separation visuelle Prestations ADRN dans les menus ---------- */
.adrn-nav-link { margin-left: 0.9rem; }
.toplinks a.adrn-nav-link:hover, .toplinks a.adrn-nav-link:focus-visible,
.meta-links a.adrn-nav-link:hover, .meta-links a.adrn-nav-link:focus-visible,
.catnav a.adrn-nav-link:hover, .catnav a.adrn-nav-link:focus-visible {
  border-color: var(--accent-3); color: var(--accent-3);
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent-3) 45%, transparent);
}

/* ---------- Encart Prestations ADRN (accueil) ---------- */
.adrn-callout {
  display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap;
  margin: 0 0 2.2rem; padding: 1.2rem 1.4rem; border-radius: 16px;
  background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.adrn-callout-icon { font-size: 2rem; flex: none; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--accent-3) 55%, transparent)); }
.adrn-callout-text { flex: 1; min-width: 220px; }
.adrn-callout-text h2 { margin: 0 0 0.3rem; font-size: 1.1rem; }
.adrn-callout-text p { margin: 0; font-size: 0.85rem; color: var(--muted); line-height: 1.5; }
.adrn-callout-btn { background: var(--accent-3); flex: none; }

/* ---------- Encart Numerique pour les enfants (accueil) ---------- */
.kids-callout {
  display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap;
  margin: 0 0 2.2rem; padding: 1.2rem 1.4rem; border-radius: 16px;
  background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.kids-callout-icon { font-size: 2rem; flex: none; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--accent) 55%, transparent)); }
.kids-callout-text { flex: 1; min-width: 220px; }
.kids-callout-text h2 { margin: 0 0 0.3rem; font-size: 1.1rem; }
.kids-callout-text p { margin: 0; font-size: 0.85rem; color: var(--muted); line-height: 1.5; }
.kids-callout-btn { background: var(--accent); flex: none; }

/* ---------- Comment ca marche (accueil) ---------- */
.how-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.3rem; margin-top: 1rem; text-align: center; }
.how-step { padding: 0.4rem; }
.how-num {
  display: inline-flex; align-items: center; justify-content: center; width: 2.2rem; height: 2.2rem;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-family: "Fraunces", Georgia, serif;
  font-weight: 700; box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 45%, transparent); margin-bottom: 0.5rem;
}
.how-icon { display: block; font-size: 1.6rem; margin-bottom: 0.4rem; }
.how-step h3 { margin: 0.2rem 0 0.4rem; font-size: 0.96rem; }
.how-step p { margin: 0; font-size: 0.82rem; color: var(--muted); line-height: 1.55; }

.page-watermark { display: flex; justify-content: center; padding: 1rem 0 0.5rem; }
.page-watermark img {
  width: min(45vw, 340px); height: auto; opacity: 0.12; pointer-events: none; user-select: none;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 55%, transparent 90%);
          mask-image: radial-gradient(circle at 50% 50%, #000 55%, transparent 90%);
}
@media (prefers-color-scheme: dark) { .page-watermark img { opacity: 0.5; mix-blend-mode: screen; } }
:root[data-theme="dark"] .page-watermark img { opacity: 0.5; mix-blend-mode: screen; }
@media (max-width: 640px) { .page-watermark img { width: min(60vw, 220px); } }

.site-mesh { position: fixed; inset: 0; z-index: -1; width: 100vw; height: 100vh; color: var(--border); pointer-events: none; }
.site-mesh .accent-star { color: var(--accent); }
.site-mesh .warm-star { color: var(--accent-2); }
.site-mesh .blue-star { color: var(--accent-3); }
.site-mesh .bg-stars { color: var(--border); }
.site-mesh .zodiac circle { filter: drop-shadow(0 0 2.5px currentColor); }
.site-mesh .zodiac path { opacity: 0.35; }
.site-mesh .sparkle { filter: drop-shadow(0 0 4px currentColor); }
.site-mesh .twinkle { animation: twinkle 5s ease-in-out infinite; filter: drop-shadow(0 0 2px currentColor); transform-origin: center; }
@keyframes twinkle { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.85; } }
@media (prefers-reduced-motion: reduce) { .site-mesh circle { animation: none; } }

/* ---------- 10. Barre collante de recherche + navigation (accueil) ---------- */
.sticky-toolbar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 1.5rem;
}
.search-wrap { max-width: 640px; margin: 0 auto 0.8rem; padding: 0; position: relative; z-index: 2; display: flex; align-items: center; gap: 0.5rem; }
.search-input-inner { position: relative; flex: 1 1 auto; min-width: 0; }
.search-input-inner input {
  width: 100%; font-family: "Inter", sans-serif; font-size: 0.92rem;
  padding: 0.75rem 1.1rem; border-radius: 999px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); box-shadow: var(--shadow);
  outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.search-input-inner input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.search-input-inner input::placeholder { color: var(--muted); }
.search-count { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); font-size: 0.75rem; color: var(--muted); pointer-events: none; }

.card.search-hide, section.category.search-hide { display: none !important; }
.card mark, .search-no-results mark { background: color-mix(in srgb, var(--accent) 35%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.search-no-results { text-align: center; color: var(--muted); padding: 3rem 1rem 1rem; font-size: 0.95rem; display: none; }
.search-no-results.show { display: block; }
.all-workshops-list { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; max-width: 760px; margin: 1.4rem auto 0; }
.all-workshops-list p { flex-basis: 100%; margin: 0 0 0.2rem; font-size: 0.82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.all-workshops-list button {
  font-family: "Inter", sans-serif; font-size: 0.85rem; color: var(--text); background: var(--card);
  border: 1px solid var(--border); border-radius: 999px; padding: 0.5rem 1rem; cursor: pointer;
  box-shadow: var(--shadow); transition: transform .15s ease, border-color .15s ease;
}
.all-workshops-list button:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }
@keyframes cardFlash {
  0%, 100% { box-shadow: var(--shadow); }
  30% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 45%, transparent), var(--shadow); }
}
.card.flash { animation: cardFlash 1.1s ease; }
@media (prefers-reduced-motion: reduce) { .card.flash { animation: none; } }

.fav-star {
  position: absolute; top: 0.7rem; right: 0.7rem; z-index: 3;
  background: none; border: none; cursor: pointer; font-size: 1.2rem; line-height: 1;
  color: var(--muted); padding: 0.15rem; transition: transform .15s ease, color .15s ease;
}
.fav-star:hover { transform: scale(1.2); color: #e0a52c; }
.fav-star.is-fav { color: #e0a52c; }
.card.fav-filter-hide { display: none !important; }
.fav-empty { text-align: center; color: var(--muted); padding: 3rem 1rem; font-size: 0.95rem; display: none; }
.fav-empty.show { display: block; }

.site-intro { max-width: 720px; margin: 0.4rem auto 2.4rem; padding: 1.7rem 1.9rem; text-align: left; }
.site-intro.card {
  background: color-mix(in srgb, var(--accent) 7%, var(--card));
  border: 1.5px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 14px 32px rgba(0,0,0,.14);
}
.site-intro.card:hover { transform: none; border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.site-intro h2 { margin: 0 0 1rem; font-size: 1.15rem; font-weight: 600; text-align: center; }
.site-intro p { margin: 0 0 0.9rem; }
.site-intro p:last-child { margin-bottom: 0; }

/* ---------- 11. Grille des ateliers (accueil) ---------- */
section.category { margin-bottom: 3.6rem; scroll-margin-top: 1.5rem; }
.category-head { display: flex; align-items: baseline; gap: 0.7rem; margin-bottom: 1.4rem; padding-bottom: 0.9rem; border-bottom: 2px solid var(--border); }
.category-head .icon { font-size: 1.4rem; }
.category-head h2 { margin: 0; font-size: 1.3rem; font-weight: 600; }
.category-head p { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.88rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1rem; }
.grid .card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.grid .card li.item { display: flex; align-items: center; gap: 0.2rem; margin: 0 -0.35rem; }
.grid .card a {
  display: flex; align-items: center; gap: 0.55rem; color: var(--text); text-decoration: none;
  font-size: 0.88rem; padding: 0.28rem 0.35rem; border-radius: 7px;
  transition: background .15s ease, color .15s ease;
}
.grid .card a:hover { background: var(--accent-soft); color: var(--accent); }
.grid .card a.main-link { flex: 1; min-width: 0; }
.grid .card a.dl-link { flex: none; font-size: 0.75rem; color: var(--muted); padding: 0.28rem 0.45rem; }
.grid .card a.dl-link:hover { color: var(--accent); }
.lock-fiche.is-locked .main-link, .lock-fiche.is-locked .dl-link { opacity: 0.45; pointer-events: none; cursor: not-allowed; }
.lock-fiche.is-locked::after {
  content: "🔒 Débloqué à " attr(data-lock-pct) " % niveau avancé du quiz"; display: block;
  font-size: 0.7rem; color: var(--muted); margin: 0.1rem 0 0.2rem;
}
.grid .card h3 { margin: 0 0 0.9rem; font-size: 1.03rem; }

.badge { flex: none; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.03em; color: #fff; padding: 0.14rem 0.4rem; border-radius: 5px; }
.badge.docx { background: var(--badge-docx); }
.badge.pptx { background: var(--badge-pptx); }
.badge.pdf  { background: var(--badge-pdf); }
.badge.quiz { background: var(--badge-quiz); }
.quiz-count { flex: none; font-size: 0.68rem; color: var(--muted); margin-left: auto; white-space: nowrap; }

.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, var(--accent), transparent 40%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .25s ease; pointer-events: none;
}
.card:hover::before { opacity: 1; }
.card-tilt-glow {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(220px circle at var(--mx,50%) var(--my,50%), color-mix(in srgb, var(--accent) 20%, transparent), transparent 60%);
  opacity: 0; transition: opacity .25s ease; z-index: 0;
}
.card:hover .card-tilt-glow { opacity: 1; }

/* ---------- 12. Widget statistiques (apercu accueil + page stats.html) ---------- */
.stats-total { display: flex; gap: 2.5rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.stats-total div strong { display: block; font-family: "Fraunces", Georgia, serif; font-size: 1.6rem; color: var(--accent); }
.stats-total div span { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stats-list { padding: 0.3rem 1.4rem; }
.stats-loading { text-align: center; color: var(--muted); padding: 1.5rem; font-size: 0.9rem; }
.stats-row { display: flex; align-items: center; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--border); }
.stats-row:last-child { border-bottom: none; }
.stats-row .stats-icon { font-size: 1.1rem; flex: none; width: 1.5rem; text-align: center; }
.stats-row .stats-info { flex: 1; min-width: 0; }
.stats-row .stats-info a { color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.stats-row .stats-info a:hover { color: var(--accent); }
.stats-row .stats-barwrap { background: var(--bg-soft); border-radius: 999px; height: 7px; margin-top: 0.35rem; overflow: hidden; }
.stats-row .stats-bar { background: var(--accent); height: 100%; border-radius: 999px; transition: width .4s ease; }
.stats-row .stats-count { flex: none; font-family: "Fraunces", Georgia, serif; font-weight: 600; color: var(--accent); min-width: 2.2rem; text-align: right; }

/* ---------- 12bis. Progression et badges (compte.html) ---------- */
.progress-overall { margin: 0.2rem 0 1.1rem; }
.progress-overall .progress-label { display: flex; justify-content: space-between; gap: 0.6rem; font-size: 0.85rem; color: var(--muted); margin-bottom: 0.4rem; }
.progress-overall .stats-barwrap { height: 10px; }
.progress-status { flex: none; font-size: 0.72rem; font-weight: 700; padding: 0.22rem 0.55rem; border-radius: 999px; background: var(--bg-soft); color: var(--muted); white-space: nowrap; }
.progress-status.status-mastered { background: var(--accent-soft); color: var(--accent); }
.progress-status.status-passed { background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--good); }
.badges-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.7rem; margin-top: 0.2rem; }
.badge-tile { display: flex; gap: 0.7rem; align-items: center; padding: 0.7rem 0.85rem; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-soft); }
.badge-tile .badge-icon { font-size: 1.6rem; flex: none; width: 2.1rem; text-align: center; filter: grayscale(1); opacity: 0.4; }
.badge-tile.earned { background: var(--accent-soft); border-color: var(--accent); }
.badge-tile.earned .badge-icon { filter: none; opacity: 1; }
.badge-tile .badge-info { min-width: 0; }
.badge-tile .badge-name { font-weight: 600; font-size: 0.87rem; color: var(--text); }
.badge-tile.earned .badge-name { color: var(--accent); }
.badge-tile .badge-desc { font-size: 0.76rem; color: var(--muted); margin-top: 0.1rem; line-height: 1.4; }
.acct-encouragement { margin: 0.9rem 0 0; padding: 0.7rem 1rem; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 0.88rem; font-weight: 600; }

/* ---------- 12ter. Vue d'ensemble moderateur (leaderboard, popularite, matrice) ---------- */
.leaderboard-row { display: flex; align-items: center; gap: 0.8rem; padding: 0.55rem 0; border-bottom: 1px solid var(--border); }
.leaderboard-row:last-child { border-bottom: none; }
.leaderboard-rank { flex: none; width: 1.8rem; font-family: "Fraunces", Georgia, serif; font-weight: 700; color: var(--accent); text-align: center; }
.leaderboard-row.rank-1 .leaderboard-rank { font-size: 1.2rem; }
.leaderboard-name { flex: 1; min-width: 0; font-weight: 600; font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leaderboard-meta { flex: none; font-size: 0.78rem; color: var(--muted); text-align: right; }
.inscrits-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.4rem 0.8rem; }
.inscrits-list li { padding: 0.4rem 0.7rem; border-radius: 8px; background: var(--bg-soft); font-size: 0.86rem; font-weight: 600; }

.matrix-wrap { overflow-x: auto; }
.matrix-table { border-collapse: collapse; font-size: 0.8rem; }
.matrix-table th, .matrix-table td { padding: 0.3rem 0.4rem; text-align: center; border-bottom: 1px solid var(--border); white-space: nowrap; }
.matrix-table thead th { color: var(--muted); font-weight: 600; font-size: 0.95rem; }
.matrix-table th:first-child, .matrix-table td:first-child {
  text-align: left; position: sticky; left: 0; background: var(--card);
  font-size: 0.82rem; font-weight: 600; padding-right: 0.8rem; z-index: 1;
}
.matrix-cell { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; border-radius: 6px; background: var(--bg-soft); }
.matrix-cell.status-mastered { background: var(--accent-soft); }
.matrix-cell.status-passed { background: color-mix(in srgb, var(--good) 18%, transparent); }
.matrix-cell.status-none { opacity: 0.35; }
.matrix-table tbody tr:nth-child(even) td:not(:first-child) { background: var(--bg-soft); }
.matrix-table tbody tr:hover td:not(:first-child) { background: var(--accent-soft); }

/* ---------- 12quater. Refonte visuelle du tableau de bord moderateur ---------- */
.mod-subnav { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0.9rem 0 1.4rem; }
.mod-subnav a {
  font-size: 0.82rem; font-weight: 600; padding: 0.4rem 0.9rem; border-radius: 999px;
  background: var(--bg-soft); color: var(--text); text-decoration: none; border: 1px solid var(--border);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.mod-subnav a:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }

.mod-memo summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 0.55rem; font-weight: 600; font-size: 0.94rem; }
.mod-memo summary::-webkit-details-marker { display: none; }
.mod-memo summary::before { content: '▸'; color: var(--accent); font-size: 0.8rem; transition: transform .15s ease; display: inline-block; }
.mod-memo[open] summary::before { transform: rotate(90deg); }
.mod-memo .mod-memo-body { margin-top: 0.9rem; font-size: 0.88rem; }
.mod-memo .mod-memo-body p { margin: 0.9rem 0 0.3rem; }
.mod-memo .mod-memo-body p:first-child { margin-top: 0; }
.mod-memo .mod-memo-body ul { margin: 0.3rem 0 0.8rem; padding-left: 1.2rem; line-height: 1.65; }

.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.8rem; margin-bottom: 1.2rem; }
.kpi-tile {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 1rem 1.1rem;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 0.3rem; position: relative; overflow: hidden;
}
.kpi-tile::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--accent); }
.kpi-tile.kpi-quizzes::before { background: var(--accent-3); }
.kpi-tile.kpi-favs::before { background: var(--accent-2); }
.kpi-tile.kpi-anon::before { background: var(--muted); }
.kpi-tile.kpi-test::before { background: var(--accent-2); }
.kpi-tile.kpi-mastered::before { background: var(--accent); }
.kpi-tile.kpi-badges::before { background: var(--accent-2); }
.kpi-icon { font-size: 1.25rem; }
.kpi-value { font-family: "Fraunces", Georgia, serif; font-size: 1.9rem; font-weight: 700; color: var(--text); line-height: 1; }
.kpi-label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; align-items: stretch; margin-bottom: 1rem; }
.grid-2 .card { display: flex; flex-direction: column; }

.mod-user-card { margin-bottom: 1rem; transition: box-shadow .18s ease; }
.mod-user-card.mod-user-anon { border-style: dashed; opacity: 0.88; }
.mod-user-card.mod-user-testsession { border-style: dashed; border-color: var(--accent-2); opacity: 0.75; }
.mod-user-card:hover { box-shadow: 0 4px 10px rgba(30,25,15,0.07), 0 18px 32px rgba(30,25,15,0.1); }
.person-head { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.avatar-circle {
  flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; color: #fff; font-weight: 700; font-size: 0.9rem; font-family: "Fraunces", Georgia, serif;
}
.person-id { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 0.1rem; }
.person-id strong { font-size: 0.98rem; }
.person-chips { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.mod-chip { font-size: 0.74rem; font-weight: 700; padding: 0.25rem 0.6rem; border-radius: 999px; background: var(--bg-soft); color: var(--muted); white-space: nowrap; }
.mod-chip.chip-accent { background: var(--accent-soft); color: var(--accent); }
.mod-progress-row { display: flex; align-items: center; gap: 0.6rem; margin: 0.75rem 0 0.5rem; }
.mod-progress-row .stats-barwrap { flex: 1; max-width: 260px; height: 8px; }
.mod-badges-row { margin: 0.1rem 0 0.6rem; font-size: 1.05rem; line-height: 1.4; }
.mod-fav-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.3rem 0 0.7rem; }
.mod-chip-fav { background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 0.74rem; padding: 0.25rem 0.6rem; border-radius: 999px; }
.mod-history { margin: 0.5rem 0 0; padding-left: 1.2rem; font-size: 0.85rem; color: var(--muted); line-height: 1.75; }
.mod-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem; padding-top: 0.8rem; border-top: 1px solid var(--border); }

/* ---------- 13. Pied de page ---------- */
footer {
  text-align: center; color: var(--muted); font-size: 0.83rem;
  padding: 2.5rem 1.5rem 3.5rem; border-top: 1px solid var(--border); margin-top: 1rem;
}
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }
.footlinks { display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1rem; font-size: 0.88rem; font-weight: 500; }
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 0.6rem; margin-bottom: 1rem; }
.footer-logo { width: 2rem; height: 2rem; border-radius: 8px; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--accent) 40%, transparent)); }
.footer-slogan { font-family: "Fraunces", Georgia, serif; font-weight: 600; color: var(--text); font-size: 1rem; }

/* ---------- 14. Media queries ---------- */
@media (max-width: 640px) {
  .hero { padding: 3.2rem 1.2rem 2.6rem; }
  main { padding-top: 2.4rem; }
  .stats { gap: 1.6rem; }
}

/* ---------- 15. Pages de quiz (ateliers/*_quiz.html) ----------
   Reprend uniquement les classes deja utilisees dans les pages de quiz
   existantes (aucune classe nouvelle), toutes deja pilotees par les
   variables de couleur ci-dessus -- rien en dur. Pas encore reliee aux
   pages de quiz elles-memes (voir le plan de migration, README.md) :
   cette section prepare le terrain pour la migration pilote. */

/* Bouton de theme flottant, nom de classe historique des pages de quiz
   (equivalent a .icon-btn.icon-btn-floating utilise sur les pages recentes) */
.theme-toggle {
  position: fixed; top: 1.1rem; right: 1.1rem; z-index: 50;
  width: 2.5rem; height: 2.5rem; border-radius: 999px;
  background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow);
  cursor: pointer; font-size: 1.1rem; display: flex; align-items: center; justify-content: center;
  transition: transform .2s ease, border-color .2s ease;
}
.theme-toggle:hover { transform: scale(1.08) rotate(12deg); border-color: var(--accent); }
.theme-toggle.acct-toggle { right: 3.9rem; text-decoration: none; color: var(--text); }
.icon-btn-text { font-family: "Inter", sans-serif; font-weight: 800; font-size: 0.68rem; letter-spacing: -0.02em; }

.visits { display: inline-block; font-size: 0.8rem; color: var(--muted); background: var(--card); border: 1px solid var(--border); padding: 0.25rem 0.7rem; border-radius: 999px; margin-bottom: 0.7rem; }
.lang-select-wrap { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.lang-select-wrap select { font-family: "Inter", sans-serif; font-size: 0.85rem; border: 1px solid var(--border); background: var(--card); color: var(--text); padding: 0.4rem 0.7rem; border-radius: 999px; max-width: 220px; }
.lang-loading { font-size: 0.8rem; color: var(--muted); display: none; }
.lang-loading.show { display: inline; }
html[dir="rtl"] .text-card, html[dir="rtl"] .qcard { text-align: right; }

#levelScreen .level-btn { display: block; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 1.2rem 1.4rem; margin-bottom: 0.9rem; cursor: pointer; box-shadow: var(--shadow); }
html[dir="rtl"] #levelScreen .level-btn { text-align: right; }
#levelScreen .level-btn:hover { border-color: var(--accent); }
#levelScreen .level-btn strong { display: block; font-family: "Fraunces", Georgia, serif; font-size: 1.1rem; color: var(--accent); margin-bottom: 0.2rem; }
#levelScreen .level-btn span { font-size: 0.88rem; color: var(--muted); }

#scoreBanner { display: none; border-radius: 14px; padding: 1.3rem 1.6rem; margin-bottom: 1.8rem; font-family: "Fraunces", Georgia, serif; font-size: 1.15rem; font-weight: 600; box-shadow: var(--shadow); }
#scoreBanner.show { display: block; }
#scoreBanner.tier-low { background: color-mix(in srgb, var(--bad) 16%, var(--card)); color: var(--bad); border: 1px solid var(--bad); }
#scoreBanner.tier-mid { background: color-mix(in srgb, var(--accent-2) 16%, var(--card)); color: var(--accent-2); border: 1px solid var(--accent-2); }
#scoreBanner.tier-high { background: color-mix(in srgb, var(--good) 16%, var(--card)); color: var(--good); border: 1px solid var(--good); }
#scoreBanner p { margin: 0.4rem 0 0; font-size: 0.92rem; font-weight: 400; color: var(--text); font-family: "Inter", sans-serif; }

.confetti-piece { position: fixed; top: -10px; z-index: 999; border-radius: 2px; pointer-events: none; animation: confettiFall linear forwards; }
@keyframes confettiFall {
  to { transform: translateY(110vh) rotate(540deg); opacity: 0.3; }
}
@media (prefers-reduced-motion: reduce) {
  .confetti-piece { display: none; }
}

.qcard { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 1.5rem 1.7rem; margin-bottom: 1.1rem; box-shadow: var(--shadow); }
.qcard .qnum { color: var(--accent); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.4rem; }
.qcard .qtext { font-size: 1.05rem; font-weight: 600; margin: 0 0 1rem; }
.qkeys { display: flex; align-items: center; gap: 0.4rem; margin: 0 0 1.1rem; }
.qkeys .key-plus { color: var(--muted); font-weight: 700; font-size: 0.95rem; }
.opt { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.65rem 0.8rem; border-radius: 10px; border: 2px solid var(--border); margin-bottom: 0.55rem; cursor: pointer; transition: border-color .15s, background .15s; }
.opt:hover { border-color: var(--accent); }
.opt.selected { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--card)); }
.opt input { margin-top: 0.2rem; accent-color: var(--accent); width: 1.1rem; height: 1.1rem; }
.opt span { font-size: 0.95rem; }
.opt.correct { border-color: var(--good); background: color-mix(in srgb, var(--good) 12%, var(--card)); }
.opt.incorrect { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 12%, var(--card)); }
.explain { display: none; margin-top: 0.8rem; padding: 0.8rem 1rem; border-radius: 10px; background: var(--bg-soft); font-size: 0.88rem; color: var(--muted); border-left: 3px solid var(--accent); }
html[dir="rtl"] .explain { border-left: none; border-right: 3px solid var(--accent); }
.explain.show { display: block; }
.speak-btn {
  margin: 0.4rem 0 0.6rem; width: 2.3rem; height: 2.3rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-soft); color: var(--text);
  cursor: pointer; font-size: 1.05rem; display: flex; align-items: center; justify-content: center;
  transition: border-color .15s ease, transform .15s ease;
}
.speak-btn:hover { border-color: var(--accent); transform: translateY(-1px); }

.actions { display: flex; gap: 0.8rem; margin-top: 1.6rem; flex-wrap: wrap; }
button.primary { font-family: "Inter", sans-serif; font-weight: 600; font-size: 0.95rem; background: var(--accent); color: #fff; border: none; border-radius: 999px; padding: 0.75rem 1.6rem; cursor: pointer; }
button.primary:hover { opacity: 0.9; }
button.secondary { font-family: "Inter", sans-serif; font-weight: 600; font-size: 0.95rem; background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 999px; padding: 0.75rem 1.6rem; cursor: pointer; }
button.secondary:hover { border-color: var(--accent); color: var(--accent); }

/* Compte rendu visuel du quiz (tableau + synthese apres validation).
   Selecteurs par identifiant uniquement -- aucune nouvelle classe globale,
   couleurs pilotees par --good/--bad (memes jetons que .opt.correct/
   .opt.incorrect juste au-dessus). */
#recapSynthesis { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 1.3rem 1.6rem; margin-bottom: 1.2rem; box-shadow: var(--shadow); }
#recapSynthesis p { margin: 0 0 0.5rem; font-size: 0.95rem; color: var(--text); }
#recapSynthesis ul { margin: 0.3rem 0 0; padding-left: 1.3rem; color: var(--muted); font-size: 0.9rem; }
#recapSynthesis li { margin-bottom: 0.25rem; }
#recapTableWrap { overflow-x: auto; margin-bottom: 1.6rem; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
#recapTable { width: 100%; border-collapse: collapse; font-size: 0.88rem; background: var(--card); }
#recapTable th { background: var(--bg-soft); color: var(--text); text-align: left; padding: 0.7rem 0.9rem; font-weight: 600; border-bottom: 2px solid var(--border); white-space: nowrap; }
#recapTable td { padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: top; }
#recapTable tr:last-child td { border-bottom: none; }
.recap-why { margin-top: 0.35rem; font-size: 0.85em; color: var(--muted); font-style: italic; }

/* ---------- 16. Fiches (ateliers/*.html, hors quiz) ----------
   Reprend uniquement les classes deja utilisees dans les fiches
   existantes (aucune classe nouvelle), toutes deja pilotees par les
   variables de couleur ci-dessus. Pas encore reliee aux fiches
   elles-memes (voir le plan de migration, README.md). */

.lang-switch { margin-top: 1rem; display: inline-flex; gap: 0.35rem; flex-wrap: wrap; }
.lang-switch button { font-family: "Inter", sans-serif; font-size: 0.78rem; font-weight: 600; border: 1px solid var(--border); background: var(--card); color: var(--muted); padding: 0.3rem 0.65rem; border-radius: 999px; cursor: pointer; }
.lang-switch button:hover { border-color: var(--accent); color: var(--accent); }
.lang-switch button.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.slides { display: flex; flex-direction: column; gap: 1.1rem; margin-bottom: 2.5rem; }
.slide { border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); background: var(--card); }
.slide img { display: block; width: 100%; height: auto; }
.slide { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.slide.in-view { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .slide { opacity: 1; transform: none; transition: none; } }

.text-toggle {
  display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer;
  background: var(--card); border: 1px solid var(--border); border-radius: 999px;
  padding: 0.5rem 1.1rem; font-size: 0.88rem; color: var(--text); font-weight: 500;
  margin-bottom: 1rem; list-style: none;
}
.text-toggle:hover { border-color: var(--accent); color: var(--accent); }
.text-toggle::-webkit-details-marker { display: none; }
.text-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 2rem 2.1rem; }
.text-card p { margin: 0 0 1rem; font-size: 0.97rem; line-height: 1.75; color: var(--text); }
.text-card p:last-child { margin-bottom: 0; }
.text-card p.lead { font-family: "Fraunces", Georgia, serif; font-size: 1.25rem; font-weight: 600; color: var(--accent); margin-bottom: 1.3rem; }
.text-card p.dim { color: var(--muted); font-size: 0.9rem; }
.text-card .divider { border: none; border-top: 1px dashed var(--border); margin: 1.5rem 0; }

.memo-section { margin-bottom: 1.8rem; }
.memo-section:last-child { margin-bottom: 0; }
.memo-section h4 { font-family: "Fraunces", Georgia, serif; font-size: 1.08rem; font-weight: 600; margin: 0 0 0.9rem; color: var(--accent); display: flex; align-items: center; gap: 0.5rem; }
.memo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0.6rem; }
.memo-item { display: flex; align-items: baseline; gap: 0.65rem; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 0.7rem 0.9rem; }
.memo-item .memo-desc { font-size: 0.88rem; line-height: 1.4; color: var(--text); }
kbd { display: inline-block; background: var(--card); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; padding: 0.15rem 0.5rem; font-family: "Inter", monospace; font-size: 0.82rem; font-weight: 700; color: var(--accent); white-space: nowrap; flex-shrink: 0; }

.exo-block { margin-bottom: 1.8rem; }
.exo-block:last-child { margin-bottom: 0; }
.exo-block h4 { font-family: "Fraunces", Georgia, serif; font-size: 1.08rem; font-weight: 600; margin: 0 0 0.4rem; color: var(--accent); display: flex; align-items: center; gap: 0.5rem; }
.exo-block .exo-intro { font-size: 0.88rem; color: var(--muted); margin: 0 0 0.7rem; }
.exo-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.exo-list li { display: flex; align-items: flex-start; gap: 0.65rem; font-size: 0.93rem; line-height: 1.55; color: var(--text); }
.exo-list li::before { content: "☐"; font-size: 1.15rem; color: var(--accent); flex-shrink: 0; line-height: 1.5; }
.exo-list li kbd { margin: 0 0.1rem; }

.a11y-controls { display: inline-flex; gap: 0.35rem; margin-top: 0.6rem; }
.a11y-controls button { font-family: "Inter", sans-serif; font-weight: 700; font-size: 0.85rem; border: 1px solid var(--border); background: var(--card); color: var(--text); width: 2.1rem; height: 2.1rem; border-radius: 999px; cursor: pointer; }
.a11y-controls button:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Fiche d'inscription ---------- */
.reg-form { display: flex; flex-direction: column; gap: 1.2rem; }
.reg-field { display: flex; flex-direction: column; gap: 0.4rem; }
.reg-field label { font-weight: 600; font-size: 0.92rem; color: var(--text); }
.reg-field .req { color: var(--accent-2); }
.reg-field input, .reg-field select, .reg-field textarea {
  font-family: "Inter", sans-serif; font-size: 0.95rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
  padding: 0.7rem 0.9rem; transition: border-color .15s ease, box-shadow .15s ease;
}
.reg-field input:focus, .reg-field select:focus, .reg-field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.reg-field textarea { resize: vertical; min-height: 120px; font-family: inherit; }
.reg-hint { font-size: 0.82rem; color: var(--muted); margin: -0.4rem 0 0.6rem; }
.reg-success {
  display: none; background: color-mix(in srgb, var(--good) 12%, var(--card));
  border: 1.5px solid var(--good); border-radius: 14px; padding: 1.1rem 1.3rem;
  color: var(--text); font-size: 0.95rem; margin-top: 1.2rem;
}
.reg-success.show { display: block; }
.reg-error {
  display: none; background: color-mix(in srgb, var(--bad) 12%, var(--card));
  border: 1.5px solid var(--bad); border-radius: 14px; padding: 1.1rem 1.3rem;
  color: var(--text); font-size: 0.95rem; margin-top: 1.2rem;
}
.reg-error.show { display: block; }

/* ---------- Mon compte ---------- */
.acct-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.4rem; border-bottom: 1px solid var(--border); }
.acct-tab {
  font-family: "Inter", sans-serif; font-weight: 600; font-size: 0.92rem;
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--muted); padding: 0.6rem 0.2rem; margin-bottom: -1px; cursor: pointer;
}
.acct-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.acct-tab:hover { color: var(--accent); }
.acct-email { font-size: 0.95rem; margin: 0 0 0.9rem; }
.acct-empty { color: var(--muted); font-size: 0.92rem; }
#favoritesCard h3, #historyCard h3 { margin: 0 0 1rem; font-size: 1.05rem; }
.acct-history-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.acct-history-table th {
  text-align: left; padding: 0.5rem 0.7rem; color: var(--muted); font-weight: 600;
  border-bottom: 1px solid var(--border); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em;
}
.acct-history-table td { padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--border); }
.acct-history-table tr:last-child td { border-bottom: none; }
.stats-list-wrap { overflow-x: auto; }

@media print {
  body { background: #fff !important; color: #000 !important; }
  .lang-switch, .a11y-controls, .text-toggle, footer, .back { display: none !important; }
  details { display: block !important; }
  .slide { box-shadow: none !important; border: 1px solid #ccc !important; break-inside: avoid; margin-bottom: 0.6rem !important; }
  .text-card { border: none !important; box-shadow: none !important; padding: 0 !important; background: #fff !important; }
  .text-card p, .text-card p.lead { color: #000 !important; }
  .wrap, main { max-width: 100% !important; }
  header { border-bottom: 2px solid #000 !important; background: #fff !important; }
}

#printReport { display: none; }
@media print {
  body.printing-report > *:not(#printReport) { display: none !important; }
  body.printing-report #printReport {
    display: block !important; background: #fff !important; color: #000 !important;
    font-family: "Inter", sans-serif; padding: 0;
  }
  #printReport h1 { font-family: "Fraunces", Georgia, serif; font-size: 18px; margin: 0 0 4px; }
  #printReport p.meta { font-size: 11px; color: #555; margin: 0 0 14px; }
  #printReport table { width: 100%; border-collapse: collapse; font-size: 11px; }
  #printReport th, #printReport td { border: 1px solid #999; padding: 4px 6px; text-align: left; }
  #printReport th { background: #eee; }
}
