:root {

  /* ──────────────────────────────────────────────
     Neutres (fond, texte, borders)
     ────────────────────────────────────────────── */
  --bg: #fff;
  --text: #1a1a1a;
  --muted: #6b6f76;
  --line: #ececf1;
  --alt: #f8f9fa;

  /* ──────────────────────────────────────────────
     Couleurs de marque (tricolore GrammaLab)
     ────────────────────────────────────────────── */
  --fr-blue: #0055A4;
  --fr-white: #fff;
  --fr-red: #EF4135;

  /* Rouge profond (cocarde, accents éditoriaux V3) */
  --color-france-red: #A32D2D;
  --color-primary: #1e4fbf;

  /* ──────────────────────────────────────────────
     Couleurs fonctionnelles — catégorisation pédagogique

     Convention :
       --c-X      = vif (icônes, borders actives)
       --c-X-soft = pastel (fonds doux)

     Mapping sémantique :
       sky    → Vocabulaire / diagnostic (aligné sur --fr-blue)
       peach  → Lezen (lecture)
       purple → Luisteren (oral)
       sage   → Kijken (vidéo)
       amber  → Schrijven (écriture)
     ────────────────────────────────────────────── */

  /* Vives */
  --c-sky: #0055A4;
  /* = --fr-blue, pour cohérence de marque */
  --c-peach: #ef4444;
  --c-purple: #8b5cf6;
  --c-sage: #10b981;
  --c-amber: #f59e0b;

  /* Pastel */
  --c-sky-soft: #e8f0ff;
  --c-peach-soft: #fdebea;
  --c-purple-soft: #f2ecff;
  --c-sage-soft: #d1fae5;
  --c-amber-soft: #fef3c7;
  /* ─────────────────────────────────────────────
     Couleurs des ClassGroup (8 choix)
     Famille Tailwind-600 alignée en saturation.
     Source de vérité unique pour les cards classe,
     les badges, les pastilles du color picker.
     ───────────────────────────────────────────── */
  --cls-sky: #0284c7;
  --cls-teal: #0d9488;
  --cls-sage: #4d7c5f;
  --cls-amber: #d97706;
  --cls-coral: #e85d4d;
  --cls-crimson: #be123c;
  --cls-purple: #7c3aed;
  --cls-slate: #475569;
}



* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  display: flex;
  flex-direction: column;
  background: transparent;
  line-height: 1.6;
  padding-top: 70px;
}

main {
  flex: 1;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

/* =========================================================
   2. NAVIGATION FIXE (Structure HTML Originale)
========================================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  z-index: 1000;
  background-color: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .08);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1400px;
  height: 100%;
  margin: 0 auto;
  padding: 0 2rem
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-hot-air-balloon {
  height: 50px;
  width: auto;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35))
}

.logo-wordmark {
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
  opacity: 0;
  animation: logo-fade-in 0.7s ease-out 0.2s forwards;
}

/* Au départ, tous les segments sont en noir */
.logo-wordmark__base {
  color: #0a0a0a;
}

.logo-wordmark__blue {
  color: #0a0a0a;
  animation: logo-color-to-blue 0.5s ease-out 1.0s forwards;
}

.logo-wordmark__red {
  color: #0a0a0a;
  animation: logo-color-to-red 0.5s ease-out 1.0s forwards;
}

@keyframes logo-fade-in {
  from {
    opacity: 0;
    transform: translateY(-2px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes logo-color-to-blue {
  to {
    color: var(--fr-blue);
  }
}

@keyframes logo-color-to-red {
  to {
    color: var(--fr-red);
  }
}

/* Accessibilité : pas d'animation pour les utilisateurs qui l'ont désactivée */
@media (prefers-reduced-motion: reduce) {
  .logo-wordmark {
    opacity: 1;
    animation: none;
  }

  .logo-wordmark__blue {
    color: var(--fr-blue);
    animation: none;
  }

  .logo-wordmark__red {
    color: var(--fr-red);
    animation: none;
  }
}

.main-navigation {
  position: absolute;
  left: 50%;
  transform: translateX(-50%)
}

.nav-list {
  display: flex;
  align-items: center;
  gap: .5rem;
  list-style: none;
  margin: 0;
  padding: 0
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: 6px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  color: var(--muted);
  transition: color .3s ease, background-color .3s ease
}

.nav-link:hover {
  color: var(--text);
  background-color: rgba(0, 0, 0, .05)
}

.nav-link.is-active {
  color: var(--text);
  background-color: rgba(0, 0, 0, .05)
}

.nav-link i {
  width: 18px;
  height: 18px;
  stroke-width: 1.8
}

.french-bar {
  height: 5px;
  width: 100%;
  background: linear-gradient(to right, #0055a4 33%, #fff 33% 66%, #ef4135 66%);
  display: block;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .08)
}

.auth-button.with-icon {
  position: relative;
  top: 1px;
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: 6px 1.2em;
  border: none;
  border-radius: 999px;
  background-color: var(--fr-blue);
  color: var(--fr-white);
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  transition: background-color .2s ease, transform .1s ease;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .1)
}

.auth-button.with-icon:hover {
  background-color: #004183;
  transform: translateY(-1px)
}

.auth-button.with-icon:active {
  transform: translateY(0)
}

.auth-button.with-icon i {
  width: 1.2em;
  height: 1.2em;
  stroke-width: 2
}

/* Lien "Mijn profiel" dans la nav — avatar rond + nom, sans cadre */
.auth-profile {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background-color 0.2s ease;
  max-width: 180px;
}

.auth-profile:hover {
  background-color: var(--alt);
  color: var(--fr-blue);
}

.auth-profile__avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--fr-blue);
  color: var(--fr-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.auth-profile__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #111;
  color: #fff;
  padding: 1rem 1.5rem;
  font-size: .95rem;
  z-index: 1000;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, .25);
  transition: transform .3s ease
}

.cookie-banner.hidden {
  display: none
}

.cookie-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .75rem
}

.cookie-content a {
  color: #66aaff;
  text-decoration: underline
}

.cookie-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center
}

.btn-cookie {
  background: #fff;
  border: none;
  color: #111;
  font-weight: 600;
  padding: .5rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s ease
}

.btn-cookie.accept {
  background: #4caf50;
  color: #fff
}

.btn-cookie.reject {
  background: #e53935;
  color: #fff
}

.btn-cookie:hover {
  opacity: .9
}

@media(min-width:768px) {
  .cookie-content {
    flex-direction: row;
    justify-content: space-between;
    text-align: left
  }
}

/* ========================================================= 
  3. MESSAGES & ALERTES 
========================================================= */
.auth-message {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: .9rem 1.2rem;
  margin: 1.5rem auto;
  max-width: 700px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .06);
  transition: opacity .8s ease, transform .8s ease
}

.auth-message.success {
  background-color: #e7f0fb;
  color: #1e3a8a;
  border: 1px solid #bcd4f7
}

.auth-message.error {
  background-color: #f8e9e9;
  color: #8b1c1c;
  border: 1px solid #e0b4b4
}

.auth-message.fade-out {
  opacity: 0;
  transform: translateY(-10px);
  visibility: hidden
}

.auth-icon {
  width: 20px;
  height: 20px
}

.login-warning {
  position: fixed;
  top: 6rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background-color: #ffe4e1;
  color: #b00020;
  border-left: 4px solid #b00020;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
  padding: 1rem 1.25rem;
  font-size: .95rem;
  max-width: 420px;
  display: none;
  justify-content: space-between;
  align-items: center;
  animation: fadeInUp .5s ease
}

.login-warning-content {
  display: flex;
  gap: .75rem;
  align-items: center;
  flex: 1
}

.login-link {
  color: #b00020;
  font-weight: bold;
  text-decoration: underline
}

.login-warning-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  margin-left: 1rem
}

/* =========================================================
   4. HERO — version optimisée (desktop)
========================================================= */
.hero {
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  height: 38vh;
  min-height: 320px;
  background: url("../img/hero_img_grammalab.e860a269e6ae.webp") center/cover no-repeat;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 1
}

.hero__content {
  position: relative;
  z-index: 3;
  padding: 2rem;
  max-width: 900px
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: .5rem;
  font-weight: 700;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, .9)
}

.hero p {
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  text-shadow: 1px 1px 6px rgba(0, 0, 0, .75);
  opacity: 1;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin-top: 0.25rem;
}

.hero__highlight {
  position: relative;
  display: inline-block;
}

.hero__highlight::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.05em;
  height: 4px;
  background: linear-gradient(to right,
      var(--fr-blue) 33%,
      #fff 33% 66%,
      var(--fr-red) 66%);
  border-radius: 2px;
  transform-origin: left center;
  animation: tricolor-deploy 0.7s cubic-bezier(0.65, 0, 0.35, 1) 0.3s both;
}

@keyframes tricolor-deploy {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__highlight::after {
    animation: none;
  }
}

@keyframes float-desktop {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(-20px)
  }
}

/* =========================================================
   5. MODULES
========================================================= */
.module {
  padding: 2rem 0
}

.module__header {
  text-align: center;
  margin-bottom: 2rem
}

.module__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800
}

.module__subtitle {
  max-width: 760px;
  margin: .75rem auto 1.25rem;
  color: var(--muted)
}

.btn {
  display: inline-block;
  padding: .9rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none
}

.btn--primary {
  background: #000;
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
  transition: filter .2s ease
}

.btn--primary:hover {
  filter: brightness(1.08)
}

/* =========================================================
   6. PROGRESS BAR
========================================================= */
.progress {
  position: relative;
  margin: 1.25rem auto;
  max-width: 760px;
  height: 16px;
  background: #eee;
  border-radius: 999px;
  overflow: hidden
}

.progress__bar {
  position: absolute;
  inset: 0;
  width: var(--p, 0);
  background: var(--blue, #0a459f);
  transition: width .35s ease
}

.progress__label {
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: .85rem;
  color: #333
}

/* =========================================================
   7. ONGLETS (Klas)
========================================================= */
.tabs__bar {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 1rem 0 2rem
}

.tab {
  border: 1px solid #e5e5e5;
  background: #fff;
  color: #111;
  font-weight: 600;
  font-size: .95rem;
  padding: .55rem 1.2rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s ease
}

.tab:hover {
  border-color: #ccc;
  background: #f9f9f9
}

.tab.is-active {
  background: #111;
  color: #fff;
  border-color: #111;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .08)
}

/* =========================================================
   8. GRAMMATICA
========================================================= */
#grammatica .chapters {
  max-width: 900px;
  margin: 0 auto
}

#grammatica summary {
  display: grid;
  grid-template-columns: 1fr max-content;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  cursor: pointer;
  list-style: none;
  position: relative
}

#grammatica summary::-webkit-details-marker {
  display: none
}

#grammatica summary::after {
  content: "▸";
  position: absolute;
  right: .75rem;
  top: 50%;
  translate: 0 -50%;
  font-size: 1rem;
  color: #bbb;
  transition: transform .2s
}

#grammatica details[open]>summary::after {
  transform: rotate(90deg) translateY(-.05rem)
}

#grammatica .chapter__head {
  background: #f7f9ff;
  border: 1px solid #e2e8f6;
  border-radius: 12px;
  font-weight: 700
}

#grammatica .chapter+.chapter {
  margin-top: .75rem
}

#grammatica .chapter__meta {
  justify-self: end;
  color: #666
}

#grammatica .lessons {
  margin: .25rem 0 0 2rem;
  padding: 0;
  list-style: none;
  border-left: 2px solid #e9eefb
}

#grammatica .lesson {
  width: 100%;
  margin: .35rem 0;
  display: grid;
  grid-template-columns: 1fr max-content max-content;
  align-items: center;
  gap: .9rem;
  padding: .85rem 1.25rem;
  background: #fff;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background .2s, border-color .2s, transform .15s
}

#grammatica .lesson:hover {
  background: #f9fbff;
  border-color: #dfe6f5;
  transform: translateX(3px)
}

#grammatica .lesson__title {
  font-weight: 600
}

#grammatica .lesson__time {
  color: #666;
  font-size: .9rem;
  justify-self: end
}

#grammatica .lesson__progress {
  font-weight: 700;
  justify-self: end
}

/* =========================================================
   9. VAARDIGHEDEN
========================================================= */
#vaardigheden .thema-container {
  max-width: 900px;
  margin: 0 auto;
  margin-bottom: 5rem
}

#vaardigheden .thema__head {
  background: #f0f4ff;
  border: 1px solid #d0d9f5;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background .2s
}

#vaardigheden .thema__head:hover {
  background: #e6edff
}

#vaardigheden .sub__head {
  margin-top: .5rem;
  margin-left: 1rem;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: .8rem 1rem;
  display: grid;
  grid-template-columns: auto 1fr max-content;
  align-items: center;
  gap: .75rem;
  cursor: pointer
}

#vaardigheden .sub__icon i {
  color: #0d6efd;
  font-size: 1.1rem
}

#vaardigheden .tasklist {
  margin: .25rem 0 0 2rem;
  padding: 0;
  list-style: none;
  border-left: 2px solid #eee
}

#vaardigheden .task {
  width: 100%;
  margin: .35rem 0;
  display: grid;
  grid-template-columns: auto 1fr max-content max-content;
  align-items: center;
  gap: .75rem;
  padding: .7rem 1rem;
  background: #fff;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: background .2s, border-color .2s, transform .15s
}

#vaardigheden .task:hover {
  background: #f9fbff;
  border-color: #dfe6f5;
  transform: translateX(3px)
}

#vaardigheden .task__text {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis
}

#vaardigheden .task__time {
  color: #666;
  font-size: .85rem;
  justify-self: end
}

#vaardigheden .task__progress {
  font-weight: 700;
  justify-self: end
}

/* =========================================================
   10. LIENS TRICOLORES
========================================================= */
.link-tricolor {
  position: relative;
  text-decoration: none;
  color: #0055a4;
  font-weight: 650;
  display: inline-block;
  transition: color .3s ease
}

.link-tricolor.is-active::before {
  content: none !important
}

.link-tricolor:visited {
  color: #003366
}

.link-tricolor::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #0055a4, #fff, #ef4135);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s ease
}

.link-tricolor:hover::after {
  transform: scaleX(1);
  transform-origin: left
}

.link-tricolor:hover {
  color: #2563EB
}

/* =========================================================
   11. ACCESSIBILITÉ & AUTRES
========================================================= */
@media (prefers-reduced-motion:reduce) {

  *,
  *::before,
  *::after {
    transition: none !important
  }
}

.game-progress {
  text-align: center;
  margin-top: 1rem
}

#progress-bar-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  background: white;
  padding: .5rem 0
}

#progress-bar {
  position: relative;
  width: 100%;
  height: 20px;
  background-color: #f3f4f6;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .1)
}

#progress-bar .progress-fill {
  height: 100%;
  width: 0;
  background-color: #3b82f6;
  transition: width .4s ease-in-out;
  border-radius: 10px 0 0 10px
}

#progress-bar #progress-text {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: .9rem;
  color: #1f2937;
  pointer-events: none;
  z-index: 2
}

.qcm-question {
  margin-bottom: 2rem;
  padding: 1rem 1.25rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background-color: #f9fafb;
  transition: background-color .4s ease, border-color .4s ease
}

.qcm-question.correct {
  border-left: 4px solid #10b981;
  background-color: #e6f9ec;
  animation: fadeInCorrect .4s ease
}

.qcm-question.incorrect {
  border-left: 4px solid #ef4444;
  background-color: #fef2f2;
  animation: fadeInIncorrect .4s ease
}

@keyframes fadeInCorrect {
  from {
    background-color: #f0fdf4;
    transform: scale(.98)
  }

  to {
    background-color: #e6f9ec;
    transform: scale(1)
  }
}

@keyframes fadeInIncorrect {
  from {
    background-color: #fef2f2;
    transform: scale(.98)
  }

  to {
    background-color: #fef2f2;
    transform: scale(1)
  }
}

.qcm-question p {
  margin-bottom: .75rem;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.5
}

.translation {
  font-style: italic;
  color: #6b7280
}

.qcm-question li {
  display: flex;
  align-items: center;
  margin-bottom: .5rem
}

.qcm-question label {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  width: 100%;
  padding: .4rem .6rem;
  border-radius: 8px;
  transition: background-color .3s ease;
  cursor: pointer
}

.qcm-question input[type=radio] {
  flex-shrink: 0;
  transform: scale(1.2);
  margin-top: 2px
}

.qcm-question p .translation {
  display: block;
  font-weight: 500;
  font-size: .95rem;
  color: #6b7280;
  font-style: italic;
  margin-top: .25rem
}

.option-text {
  flex: 1;
  min-width: 0;
  font-size: 1rem;
  line-height: 1.4
}

.option-text.correct {
  color: #16a34a;
  font-weight: bold
}

.correct-answer {
  font-weight: 600;
  color: #2563eb;
  border: 2px solid #2563eb;
  border-radius: 8px;
  padding: .4em .6em;
  background-color: #eff6ff
}

.option-text.incorrect {
  color: #dc2626;
  font-weight: bold
}

.qcm-question.incorrect {
  border: 3px solid #dc2626;
  background-color: #fee2e2;
  box-shadow: 0 0 8px rgba(220, 38, 38, .5)
}

.option-feedback {
  display: inline-flex;
  align-items: center;
  margin-left: .5rem;
  font-size: 1.2em;
  transition: opacity .3s ease, transform .3s ease
}

.option-feedback i {
  vertical-align: middle
}

[data-explanation] {
  margin-top: 1rem;
  background-color: #eef2f7;
  padding: .75rem;
  border-radius: 8px;
  border-left: 4px solid #3b82f6;
  font-size: .95rem;
  animation: fadeInExplanation .3s ease
}

@keyframes fadeInExplanation {
  from {
    opacity: 0;
    transform: translateY(4px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

#quiz-score {
  margin-top: 1.25rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #111827
}

#quiz-root .btn {
  font-size: 1rem;
  padding: .5rem 1.25rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color .3s ease
}

#quiz-root .btn-primary {
  background-color: #3b82f6;
  color: white;
  border: none
}

#quiz-root .btn-outline-secondary {
  background-color: white;
  color: #374151;
  border: 1px solid #cbd5e1
}

#quiz-root .btn:hover {
  opacity: .9
}

#quiz-root #progress-bar {
  position: relative;
  width: 100%;
  height: 18px;
  margin: 1.5rem 0 1rem 0;
  background-color: #f3f4f6;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .1)
}

#quiz-root #progress-bar .progress-fill {
  height: 100%;
  width: 0;
  transition: width .4s ease-in-out;
  background: linear-gradient(90deg, #0055a4 0%, #fff 50%, #ef4135 100%);
  background-size: 300% 100%;
  animation: tricolorFlow 3s linear infinite;
  border-radius: 12px 0 0 12px
}

#quiz-root #progress-bar #progress-text {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: .85rem;
  color: #374151;
  z-index: 2;
  pointer-events: none
}

@keyframes tricolorFlow {
  0% {
    background-position: 0% 0%
  }

  100% {
    background-position: 300% 0%
  }
}

/* =========================================================
   FOOTER
========================================================= */
.footer {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: 4rem;
  padding: 1.75rem 2rem 1.25rem;
  background: #111;
  color: #ccc;
  font-size: .9rem;
  line-height: 1.4;
}

.footer__inner {
  max-width: 1100px;
  margin: 0 auto;
}

/* ── Top : brand + credit ── */
.footer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  padding-bottom: 1rem;
  border-bottom: 1px solid #2a2a2a;
}

.footer__brand {
  flex: 1;
  min-width: 200px;
}

.footer__wordmark {
  margin: 0;
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
}

.footer__wordmark-base {
  color: #fff;
}

.footer__wordmark-blue {
  color: #4d8fd1;
}

.footer__wordmark-red {
  color: var(--fr-red);
}

.footer__tagline {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  color: #888;
}

.footer__credit {
  text-align: right;
  min-width: 200px;
}

.footer__credit-label {
  margin: 0;
  font-size: 0.75rem;
  color: #888;
}

.footer__credit-name {
  margin: 0.15rem 0 0;
  font-size: 0.9rem;
}

.footer__credit-link {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid #4d8fd1;
  padding-bottom: 1px;
  transition: border-color 0.2s ease, color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.footer__credit-link:hover {
  color: #fff;
  border-bottom-color: var(--fr-red);
}

.footer__credit-arrow {
  font-size: 0.85em;
  color: #888;
  transition: transform 0.2s ease, color 0.2s ease;
}

.footer__credit-link:hover .footer__credit-arrow {
  color: #fff;
  transform: translate(1px, -1px);
}

/* ── Bottom : copyright + legal + Freepik (sur une seule ligne) ── */
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-top: 0.85rem;
}

.footer__copyright {
  margin: 0;
  font-size: 0.75rem;
  color: #666;
}

.footer__legal {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer__legal a {
  color: #888;
  text-decoration: none;
  font-size: 0.75rem;
  transition: color 0.2s ease;
}

.footer__legal a:hover {
  color: #fff;
}

.footer__site {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer__site a {
  color: #888;
  text-decoration: none;
  font-size: 0.75rem;
  transition: color 0.2s ease;
}

.footer__site a:hover {
  color: #fff;
}

.footer__attribution {
  margin: 0;
  font-size: 0.7rem;
  color: #555;
}

.footer__attribution a {
  color: #666;
  text-decoration: underline;
  text-decoration-color: #333;
  transition: color 0.2s ease;
}

.footer__attribution a:hover {
  color: #888;
}

/* ── Mobile compact (<720px) ── */
@media (max-width: 719px) {
  .footer {
    padding: 1rem 1rem 0.75rem;
    margin-top: 2rem;
    text-align: center;
  }

  /* footer__inner devient flex column pour pouvoir réordonner */
  .footer__inner {
    display: flex;
    flex-direction: column;
  }

  /* footer__top "transparent" : ses enfants brand + credit deviennent
     des flex items directs de footer__inner, ce qui nous permet de
     placer credit en bas avec order. La bordure du top disparaît,
     remplacée par border-top sur footer__bottom. */
  .footer__top {
    display: contents;
  }

  .footer__brand {
    order: 1;
  }

  .footer__bottom {
    order: 2;
  }

  .footer__attribution {
    order: 3;
  }

  .footer__credit {
    order: 4;
  }

  /* Niveau 1 : brand compact */
  .footer__brand {
    min-width: 0;
    text-align: center;
  }

  .footer__wordmark {
    font-size: 0.9rem;
  }

  .footer__tagline {
    font-size: 0.7rem;
    margin-top: 0.15rem;
  }

  /* Niveau 2 : copyright + nav avec séparateurs · */
  .footer__bottom {
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding-top: 0.6rem;
    margin-top: 0.4rem;
    border-top: 1px solid #2a2a2a;
  }

  .footer__copyright {
    font-size: 0.7rem;
    margin: 0;
  }

  .footer__site,
  .footer__legal {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
  }

  .footer__site a,
  .footer__legal a {
    font-size: 0.7rem;
  }

  /* Séparateurs · entre liens (CSS-only via pseudo) */
  .footer__site a+a::before,
  .footer__legal a+a::before {
    content: "·";
    color: #555;
    margin-right: 0.4rem;
  }

  /* Niveau 3 : attribution Freepik + credit Annabel, ultra-discrets en bas */
  .footer__attribution {
    font-size: 0.65rem;
    color: #555;
    margin: 0.5rem 0 0;
    text-align: center;
  }

  .footer__credit {
    min-width: 0;
    text-align: center;
    margin: 0.1rem 0 0;
    font-size: 0.65rem;
    color: #555;
  }

  .footer__credit-label,
  .footer__credit-name {
    display: inline;
    margin: 0;
    font-size: 0.65rem;
    color: #555;
  }

  .footer__credit-label::after {
    content: " : ";
  }

  .footer__credit-link {
    color: #888;
    border-bottom: 0;
  }

  .footer__credit-arrow {
    display: none;
  }
}

/* ── Très petits écrans (<400px) — encore plus compact ── */
@media (max-width: 400px) {
  .footer {
    padding: 0.75rem 0.75rem 0.5rem;
  }

  .footer__wordmark {
    font-size: 0.85rem;
  }

  .footer__tagline,
  .footer__copyright,
  .footer__site a,
  .footer__legal a {
    font-size: 0.65rem;
  }

  .footer__attribution,
  .footer__credit,
  .footer__credit-label,
  .footer__credit-name {
    font-size: 0.6rem;
  }
}

#reflection-form {
  margin-top: 4rem
}

#reflection-form .intro {
  margin-top: .5rem;
  color: #4a5568;
  text-align: left;
  font-size: 1rem
}

#reflection-form .card {
  background: linear-gradient(to right, #e0f7fa, #b2ebf2);
  border-radius: 12px;
  border: 1px solid #facc15;
  padding: 2rem;
  margin-top: 2rem;
  margin-bottom: 4rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, .08)
}

#reflection-form .slider-grid {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 1rem;
  align-items: center
}

#reflection-form .slider-grid label {
  font-weight: 600;
  margin-bottom: 1rem;
  display: block;
  text-align: left
}

#reflection-form input[type=range] {
  width: 100%;
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(to right, #e53e3e, #ecc94b, #38a169);
  outline: none;
  margin: .5rem 0 2rem
}

#reflection-form input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2563eb;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 0 2px rgba(0, 0, 0, .3)
}

#reflection-form input[type=range]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2563eb;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 0 2px rgba(0, 0, 0, .3)
}

#reflection-form .slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: .9rem;
  color: #4a5568;
  margin: 2rem 0 1rem 25%
}

#reflection-form .reflection-open-question {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 1rem;
  align-items: start;
  margin-top: 1.5rem
}

#reflection-form .reflection-open-question label {
  font-weight: 700;
  text-align: left
}

#reflection-form textarea {
  width: 100%;
  padding: .75rem;
  font-size: 1rem;
  border: 1px solid #cbd5e0;
  border-radius: 8px;
  resize: vertical;
  font-family: inherit
}

#reflection-form button[type=submit] {
  margin-top: 2rem;
  padding: .6rem 2rem;
  background-color: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .2s ease-in-out
}

#reflection-form button[type=submit]:hover {
  background-color: #1e40af
}

/* =========================================================
   12. RESPONSIVE MENU BURGER
========================================================= */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: .5rem;
  z-index: 1002
}

.menu-toggle i {
  width: 28px;
  height: 28px
}

.menu-toggle .icon-close {
  display: none
}

body.nav-open .menu-toggle .icon-menu {
  display: none
}

body.nav-open .menu-toggle .icon-close {
  display: block
}

.nav-logo-mobile {
  display: none
}

@media (max-width:1024px) {
  .menu-toggle {
    display: block
  }

  .main-navigation {
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease, transform .3s ease;
    transform: translateY(-20px)
  }

  .main-navigation {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    overflow-y: auto;
    z-index: 1001
  }

  .nav-logo-mobile {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    margin-bottom: 1.5rem
  }

  .nav-logo-mobile .logo-hot-air-balloon {
    height: 50px
  }

  .nav-logo-mobile .logo-text {
    height: 28px
  }

  .nav-list {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    width: 100%;
    max-width: 300px;
    padding: 0;
    margin: 0
  }

  .nav-link {
    font-size: 1.2rem
  }

  .header-auth {
    position: fixed;
    top: 0.75rem;
    right: 4.5rem;
    /* laisse la place pour le bouton burger à droite */
    z-index: 1100;
    margin: 0;
    padding: 0;
    border: none;
    width: auto;
    max-width: none;
    text-align: left;
  }

  body.nav-open .main-navigation {
    opacity: 1;
    visibility: visible;
    transform: translateY(0)
  }

  .site-logo {
    transition: opacity .3s ease, visibility .3s ease
  }

  body.nav-open .site-logo {
    visibility: hidden;
    opacity: 0
  }
}

@media (max-width:768px) {
  .hero {
    position: relative;
    min-height: 280px;
    height: 50dvh;
    padding: 1.25rem 1rem;
    background-position: center 46%;
    overflow: hidden
  }
}

/* =========================================================
   13. DASHBOARD (Gebruikersoverzicht)
========================================================= */
.dashboard-header {
  text-align: center;
  margin-bottom: 3rem
}

.dashboard-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--fr-blue);
  margin-bottom: .5rem
}

.dashboard-header p {
  color: var(--muted);
  font-size: 1.05rem
}

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem
}

.dashboard-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem 1rem;
  text-align: center;
  background: var(--alt);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .05);
  transition: transform .2s ease, box-shadow .2s ease
}

.dashboard-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .08)
}

.dashboard-card h5 {
  font-weight: 700;
  margin-bottom: .25rem
}

.dashboard-card p {
  margin: .25rem 0;
  color: var(--muted)
}

.dashboard-card strong {
  color: var(--text)
}

.dashboard-card .fs-4 {
  color: var(--fr-blue)
}

.dashboard-card a {
  margin-top: .5rem
}

.dashboard-section {
  margin-bottom: 4rem
}

.dashboard-section h2 {
  font-weight: 800;
  font-size: 1.8rem;
  margin-bottom: .5rem
}

.dashboard-section small {
  color: var(--muted)
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  font-size: .95rem
}

.dashboard-table th,
.dashboard-table td {
  padding: .65rem .75rem;
  border-bottom: 1px solid var(--line)
}

.dashboard-table thead {
  background: var(--alt);
  font-weight: 700
}

.dashboard-table tbody tr:hover {
  background-color: #f9fafb
}

.dashboard-section canvas {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .03)
}

.dashboard-reflectie {
  margin-top: 2rem;
  background: var(--alt);
  border-left: 4px solid var(--fr-blue);
  padding: 1.25rem;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .04)
}

.dashboard-reflectie footer {
  margin-top: .5rem;
  font-size: .85rem;
  color: var(--muted)
}

.dashboard-export {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem
}

.dashboard-export a {
  flex: 1 1 200px;
  text-align: center
}

@media (max-width:768px) {
  .dashboard-header h1 {
    font-size: 1.8rem
  }

  .dashboard-section h2 {
    font-size: 1.4rem
  }

  .dashboard-table {
    font-size: .9rem
  }
}

.quiz-actions {
  display: flex;
  gap: .8rem;
  justify-content: center;
  margin-top: 2rem
}

.quiz-actions button {
  position: relative;
  font-weight: 600;
  border-radius: 10px;
  padding: .6rem 1.2rem;
  cursor: pointer;
  transition: .2s
}

.btn--danger {
  background: #f9fafb;
  border: 2px solid #d1d5db;
  color: #111
}

.btn--neutral {
  background: #fff;
  border: 2px solid #cbd5e1;
  color: #1e293b
}

.btn--primary {
  background: var(--fr-blue);
  color: #fff;
  border: none
}

.btn--primary:hover {
  background: #004183
}

.btn--danger:hover {
  background: #f3f4f6
}

.btn--neutral:hover {
  background: #f1f5f9
}

button[disabled] {
  opacity: .5;
  cursor: not-allowed
}

.tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  color: #fff;
  padding: .4rem .7rem;
  border-radius: 6px;
  font-size: .85rem;
  white-space: nowrap;
  transition: opacity .2s
}

.quiz-actions button:hover .tooltip {
  visibility: visible;
  opacity: 1
}

/* =========================================================
 customisation des messages d'alerte ou d'erreur
========================================================= */
.custom-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9999
}

.custom-modal.hidden {
  display: none
}

.custom-modal-content {
  background: #fff;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.25);
  text-align: center;
  max-width: 400px;
  width: 90%;
  font-family: 'Poppins', sans-serif
}

.custom-modal-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem
}

/* Container */
#progress-capsules {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

/* ============================
   WRAPPER VOICE — centrage + largeur
============================ */
.voice-wrapper {
  max-width: 720px;
  margin: 1.5rem auto 3rem;
}

/* Header plus compact */
.voice-header h2 {
  font-size: 1.6rem;
}

.voice-header p {
  margin-top: 0.25rem;
}

/* Cartes principales (mode, trainer, end) */
.voice-card {
  background: var(--alt);
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.07);
}

/* Mode selection : focus + légère mise en avant */
.voice-mode {
  margin-top: 0.5rem;
}

/* Trainer plus compact */
.voice-trainer {
  margin-top: 1.4rem;
}

/* Progress bar compact */
.voice-progress {
  height: 18px;
  border-radius: 999px;
  overflow: hidden;
  background: #e5e7eb;
}

.voice-progress .progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

/* ============================
   PROGRESS CAPSULES
============================ */
#progress-capsules {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin: 0;
}

.progress-capsule {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d1d5db;
  border: 1px solid #9ca3af;
  cursor: pointer;
  transition: transform 0.15s ease-out, background 0.2s;
}

.progress-capsule:hover {
  transform: scale(1.18);
}

.capsule-green {
  background: #16a34a !important;
  border-color: #15803d;
}

.capsule-orange {
  background: #f97316 !important;
  border-color: #ea580c;
}

.capsule-red {
  background: #dc2626 !important;
  border-color: #b91c1c;
}

.progress-capsule.active {
  outline: 2px solid #1d4ed8;
  outline-offset: 2px;
}

/* ============================
   MICROPHONE BUTTON — A3 compact
============================ */
#mic-button {
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: #111;
  color: #fff;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background 0.25s, transform 0.2s;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}

#mic-button:hover {
  transform: scale(1.06);
}

#mic-button i {
  font-size: 2rem;
}

#mic-button.is-listening {
  background: #dc2626;
  animation: pulse-recording 1.4s infinite ease-in-out;
}

@keyframes pulse-recording {
  0% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.45);
  }

  70% {
    box-shadow: 0 0 0 16px rgba(220, 38, 38, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
  }
}

/* ============================
   FEEDBACK SIMPLE
============================ */
#feedback-area {
  text-align: center;
  margin-top: 0.8rem;
}

#feedback-simple-score {
  font-size: 1rem;
  letter-spacing: 0.3px;
}

/* ============================
   FEEDBACK DÉTAILLÉ
============================ */
.feedback-details {
  transition: max-height 0.25s ease, opacity 0.25s ease;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  background: #fafafa;
  border-radius: 10px;
  padding: 0 1rem;
  border: 1px solid #e5e7eb;
}

.feedback-details.open {
  max-height: 1800px;
  opacity: 1;
  padding: 1rem;
}

.feedback-details h6 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 0.4rem;
}

.feedback-details>*+* {
  margin-top: 0.7rem;
}

.feedback-detail-text,
.feedback-match-info {
  font-size: 0.92rem;
  line-height: 1.45;
  color: #374151;
}

.feedback-details ul {
  margin: 0.2rem 0 0.5rem 1rem;
  padding-left: 0;
}

.feedback-details li {
  font-size: 0.92rem;
  margin-bottom: 0.25rem;
}

/* Bouton "Meer details" */
#toggle-details {
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  border-radius: 8px;
  position: relative;
}

#toggle-details::after {
  content: "▾";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  font-size: 0.8rem;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

#toggle-details.active::after {
  transform: translateY(-50%) rotate(180deg);
}

/* ============================
   ACCORDION Bootstrap — compact
============================ */
.accordion-button {
  padding: 0.55rem 1rem;
  font-size: 0.92rem;
  background: #f9fafb;
}

.accordion-button:not(.collapsed) {
  color: #1f2937;
  background-color: #eef2ff;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.accordion-item {
  border-radius: 10px !important;
  margin-bottom: 0.4rem;
  border: 1px solid #e5e7eb;
}

.accordion-body {
  padding: 0.75rem 1rem 0.9rem 1rem;
  background: #fff;
}

.rules-box,
.tips-box,
.whisper-box,
.segments-box {
  background: #f3f4f6;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.rules-box ul,
.tips-box ul,
.whisper-box ul {
  margin-left: 1.2rem !important;
}

/* ============================
   RESPONSIVE
============================ */
@media (max-width: 576px) {
  .voice-wrapper {
    margin-top: 1rem;
    padding-inline: 0.5rem;
  }

  #mic-button {
    width: 70px;
    height: 70px;
  }

  .voice-header h2 {
    font-size: 1.4rem;
  }
}

html {
  background: linear-gradient(180deg,
      #ffffff 0%,
      #f3f5ff 40%,
      #f8f3f3 100%) no-repeat fixed;
  min-height: 100vh;
}

/* ──────────────────────────────────────────────
   Cocarde tricolore — avatar utilisateur (header)
   PR V3 : visible sur fond clair ET sur hero bleu pâle.
   ────────────────────────────────────────────── */
.user-menu__avatar {
  position: relative;
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.4px;
}

/* ─────────────────────────────────────────────
   Mapping ClassGroup.color → variable CSS
   Usage en template :
     <div class="cls-card cls-color--{{ class.color }}">
   Puis dans le CSS du composant :
     .cls-card__icon-circle { background: var(--cls-color); }
     .cls-card { border-left: 3px solid var(--cls-color); }
   ───────────────────────────────────────────── */
.cls-color--sky {
  --cls-color: var(--cls-sky);
  --cls-color-soft: color-mix(in srgb, var(--cls-sky) 12%, transparent);
}

.cls-color--teal {
  --cls-color: var(--cls-teal);
  --cls-color-soft: color-mix(in srgb, var(--cls-teal) 12%, transparent);
}

.cls-color--sage {
  --cls-color: var(--cls-sage);
  --cls-color-soft: color-mix(in srgb, var(--cls-sage) 12%, transparent);
}

.cls-color--amber {
  --cls-color: var(--cls-amber);
  --cls-color-soft: color-mix(in srgb, var(--cls-amber) 12%, transparent);
}

.cls-color--coral {
  --cls-color: var(--cls-coral);
  --cls-color-soft: color-mix(in srgb, var(--cls-coral) 12%, transparent);
}

.cls-color--crimson {
  --cls-color: var(--cls-crimson);
  --cls-color-soft: color-mix(in srgb, var(--cls-crimson) 12%, transparent);
}

.cls-color--purple {
  --cls-color: var(--cls-purple);
  --cls-color-soft: color-mix(in srgb, var(--cls-purple) 12%, transparent);
}

.cls-color--slate {
  --cls-color: var(--cls-slate);
  --cls-color-soft: color-mix(in srgb, var(--cls-slate) 12%, transparent);
}

/* ── Anneau de progression d'un badge (vocab/_badge_ring.html) ──
   Six segments SVG, un par étape ; --c-sky pour les étapes faites,
   gris pour les autres ; étoile --c-peach à l'obtention. Présentatif,
   réutilisable sur tout badge et sur leur liste (page du badge,
   carte badge du catalogue). Dans main.css : global. ─────── */
.badge-ring {
  position: relative;
  flex: none;
  width: 200px;
  height: 200px;
}

.badge-ring__svg {
  display: block;
  width: 100%;
  height: 100%;
}

.badge-ring__seg {
  fill: none;
  stroke: var(--line);
  stroke-width: 6;
  stroke-linecap: butt;
}

.badge-ring__seg--done {
  stroke: var(--c-sky);
}

/* Le disque intérieur : rayon 44 moins la moitié du trait et un écart,
   soit un diamètre d'environ 76 % du composant. */
.badge-ring__image,
.badge-ring__center {
  position: absolute;
  inset: 12%;
  width: 76%;
  height: 76%;
  border-radius: 50%;
}

.badge-ring__image {
  object-fit: cover;
  background: var(--bg);
}

.badge-ring__center {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-sky-soft);
  color: var(--c-sky);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}

.badge-ring__star {
  position: absolute;
  right: 4%;
  bottom: 4%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26%;
  height: 26%;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--text) 18%, transparent);
}

.badge-ring__star svg {
  width: 62%;
  height: 62%;
  color: var(--c-peach);
  fill: var(--c-peach);
}

/* Taille réduite (carte badge du catalogue) : 128 px, à toute largeur. */
.badge-ring--sm {
  width: 128px;
  height: 128px;
}

.badge-ring--sm .badge-ring__center {
  font-size: 2rem;
}

@media (max-width: 680px) {
  .badge-ring {
    width: 140px;
    height: 140px;
    margin: 0 auto;
  }

  .badge-ring--sm {
    width: 128px;
    height: 128px;
    margin: 0;
  }

  .badge-ring__center {
    font-size: 2.2rem;
  }

  .badge-ring--sm .badge-ring__center {
    font-size: 2rem;
  }
}
