/* =========================================================
   1. TOKENS & RESET
========================================================= */
:root {
  --container: 1100px;
  --bg: #fff;
  --text: #1a1a1a;
  --muted: #6b6f76;
  --line: #ececf1;
  --alt: #f8f9fa;
  --fr-blue: #0055A4;
  --fr-white: #fff;
  --fr-red: #EF4135;
  --nav-active: #1d4ed8;
  --nav-hover: #2563eb
}

* {
  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: var(--bg);
  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(--alt);
  background-image: linear-gradient(rgba(248, 249, 250, .85), rgba(248, 249, 250, .85)), url('../img/fond_banner2.png');
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .08);
  transition: all .3s ease
}

body.at-top .site-header {
  background-color: transparent;
  background-image: none;
  border-bottom: 1px solid transparent;
  box-shadow: none
}

.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;
  opacity: 1;
  transform: translateY(0);
  transition: opacity .4s ease, transform .4s ease
}

body.at-top .site-logo {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none
}

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

.logo-text {
  height: 28px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .4))
}

.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
}

.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: 60vh;
  min-height: 420px;
  background: url("../img/hero_img_grammalab.png") 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, .55);
  z-index: 1
}

.hero__logo-balloon {
  position: absolute;
  top: 2rem;
  left: 3rem;
  width: 300px;
  max-width: 60%;
  z-index: 2;
  opacity: .9;
  animation: float-desktop 5s ease-in-out infinite;
  pointer-events: none
}

.hero__logo-text {
  display: block;
  max-width: 480px;
  width: 100%;
  margin: 0 auto 1rem;
  z-index: 3;
  position: relative;
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, .35)) brightness(1.05) contrast(1.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: .95
}

@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 {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: 4rem;
  padding: 2rem 1rem;
  background: #111;
  color: #ccc;
  text-align: center;
  font-size: .9rem;
  line-height: 1.6
}

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

.footer a {
  color: #ccc;
  text-decoration: underline;
  text-decoration-color: #E74C3C;
  transition: color .3s ease
}

.footer a:hover {
  color: #fff
}

.footer-icon {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  margin: -3px 6px 0 6px;
  filter: invert(1) brightness(100);
  opacity: .9;
  transition: opacity .2s ease, transform .2s ease
}

.footer-icon:hover {
  opacity: 1;
  transform: scale(1.05)
}

#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,
  .header-auth {
    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;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: 90%;
    max-width: 300px;
    text-align: center;
    z-index: 1002;
    margin-top: 0;
    padding-top: 1rem;
    border-top: 1px solid var(--line)
  }

  .auth-button.with-icon {
    width: 100%;
    justify-content: center
  }

  body.nav-open .main-navigation,
  body.nav-open .header-auth {
    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: 230px;
    height: 60dvh;
    padding: 1.25rem 1rem;
    background-position: center 46%;
    overflow: hidden
  }

  .hero__logo-balloon {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translate(-50%, 0);
    width: 180px;
    opacity: .9;
    z-index: 2;
    animation: float-mobile 5s ease-in-out infinite;
    pointer-events: none
  }

  @keyframes float-mobile {

    0%,
    100% {
      transform: translate(-50%, 0)
    }

    25% {
      transform: translate(-50%, -8px)
    }

    50% {
      transform: translate(-50%, -15px)
    }

    75% {
      transform: translate(-50%, -8px)
    }
  }
}

/* =========================================================
   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: #2563eb;
  color: #fff;
  border: none
}

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

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

.btn--primary:hover {
  background: #1d4ed8
}

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;
  }
}