/* Attribut HTML natif : priorité absolue */
[hidden] { display: none !important; }
.hidden { display: none !important; }

:root {
  --bg: #0f172a;
  --surface: #1e293b;
  --surface-hover: #334155;
  --primary: #38bdf8;
  --primary-dim: #0ea5e9;
  --success: #4ade80;
  --error: #f87171;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --radius: 1rem;
  --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Thème clair (non éblouissant) */
[data-theme="light"] {
  --bg: #f1f5f9;
  --surface: #e2e8f0;
  --surface-hover: #cbd5e1;
  --primary: #0ea5e9;
  --primary-dim: #0284c7;
  --text: #0f172a;
  --text-muted: #475569;
  --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}
[data-theme="light"] .header {
  background: rgba(241, 245, 249, 0.95);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .logo {
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  -webkit-background-clip: text;
  background-clip: text;
}
[data-theme="light"] .modal-backdrop {
  background: rgba(0, 0, 0, 0.4);
}
[data-theme="light"] .modal .modal-content {
  border-color: rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
}

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

/* Accessibilite: focus clavier visible */
button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.choice:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.4);
}

html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
  color-scheme: dark;
}

[data-theme="light"] {
  color-scheme: light;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
}

#app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.header-inner {
  max-width: 56rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  padding-top: max(0.75rem, env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.header-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  transition: background var(--transition);
}
.header-link:hover {
  background: var(--surface);
}
.header-link.install-btn {
  background: var(--primary);
  color: var(--bg);
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.header-link.install-btn:hover {
  filter: brightness(1.1);
}
.header-link.hidden {
  display: none !important;
}
#btn-a-propos.header-link {
  background: transparent;
  border: none;
}
#btn-a-propos.header-link:hover {
  background: var(--surface);
}
[data-theme="light"] #btn-a-propos.header-link:hover {
  background: var(--surface-hover);
}
.logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--primary), #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
}
.logo .logo-img {
  height: 3rem;
  width: auto;
  display: block;
  vertical-align: middle;
  -webkit-text-fill-color: initial;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
}
.icon-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: none;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition), background var(--transition);
}
.icon-btn:hover {
  background: var(--surface-hover);
  transform: scale(1.05);
}
.icon-btn.muted .icon { opacity: 0.5; }

/* Main */
.main {
  flex: 1;
  max-width: 56rem;
  margin: 0 auto;
  width: 100%;
  padding: 1rem;
}

#study-coach {
  display: none !important;
}

/* Stats card + footer dans la carte */
.stats-card {
  margin-top: 1.5rem;
}
.stats-footer {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0.2rem 0 0;
}
.stats-footer a {
  color: var(--primary);
  text-decoration: none;
}
.stats-footer a:hover {
  text-decoration: underline;
}

/* Screens */
.screen {
  display: none;
  animation: fadeIn 0.4s ease;
}
.screen.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Home */
.hero {
  text-align: center;
  margin-bottom: 2rem;
}
.hero-badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(129, 140, 248, 0.2));
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  50% { opacity: 0.9; }
}
@keyframes separatorFlow {
  0% {
    background-position: 0% 50%;
    filter: saturate(0.95);
  }
  50% {
    background-position: 100% 50%;
    filter: saturate(1.15);
  }
  100% {
    background-position: 0% 50%;
    filter: saturate(0.95);
  }
}
.hero h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}
.hero p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.5;
}

.home-theme-hub {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 0 0 1.25rem;
}

@keyframes homeFadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .home-new-modules-row,
  .home-spotlight-card,
  .home-theme-hub .theme-card {
    animation: homeFadeUp 0.42s ease backwards;
  }
  .home-spotlight-card:nth-child(1) { animation-delay: 0.06s; }
  .home-spotlight-card:nth-child(2) { animation-delay: 0.12s; }
  .home-theme-hub .theme-card:nth-child(1) { animation-delay: 0.16s; }
  .home-theme-hub .theme-card:nth-child(2) { animation-delay: 0.14s; }
  .home-theme-hub .theme-card:nth-child(3) { animation-delay: 0.18s; }
  .home-theme-hub .theme-card:nth-child(4) { animation-delay: 0.22s; }
  .home-theme-hub .theme-card:nth-child(n+5) { animation-delay: 0.26s; }
}

.category-card-new {
  border-color: rgba(56, 189, 248, 0.35);
  background: linear-gradient(150deg, rgba(14, 116, 144, 0.14), rgba(2, 132, 199, 0.08));
}
.module-new-badge {
  display: inline-block;
  margin-bottom: 0.45rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.22);
  color: #7dd3fc;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.theme-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  background: linear-gradient(150deg, rgba(14, 116, 144, 0.22), rgba(2, 132, 199, 0.1));
  border: 1px solid rgba(56, 189, 248, 0.26);
  border-radius: var(--radius);
  padding: 1rem;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
.theme-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.45);
  background: linear-gradient(150deg, rgba(14, 116, 144, 0.32), rgba(2, 132, 199, 0.16));
}
.theme-card h3 {
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
}
.theme-card p {
  color: var(--text-muted);
  margin-bottom: 0.55rem;
  font-size: 0.9rem;
  line-height: 1.35;
}
.theme-card .count {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.85rem;
}

.theme-card-new {
  border-color: rgba(56, 189, 248, 0.42);
  background: linear-gradient(150deg, rgba(14, 116, 144, 0.28), rgba(2, 132, 199, 0.12));
}
.theme-new-badge {
  display: inline-block;
  margin-bottom: 0.45rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.22);
  color: #7dd3fc;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.theme-card-quiz {
  background: linear-gradient(150deg, rgba(2, 132, 199, 0.26), rgba(6, 95, 70, 0.2));
}
.theme-card-vocabulaire {
  background: linear-gradient(150deg, rgba(20, 184, 166, 0.24), rgba(14, 116, 144, 0.18));
}
.theme-card-stats {
  background: linear-gradient(150deg, rgba(8, 145, 178, 0.26), rgba(14, 165, 233, 0.14));
}
.theme-card-stage-prep {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.14), rgba(56, 189, 248, 0.12));
  border-color: rgba(45, 212, 191, 0.35);
}
.theme-card-stage-prep h3,
.theme-card-stage-prep .count { color: #99f6e4; }
.theme-card-stage-prep p { color: rgba(153, 246, 228, 0.92); }
.theme-card-stage-prep:hover {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.24), rgba(56, 189, 248, 0.2));
}
[data-theme="light"] .theme-card-stage-prep,
[data-theme="light"] .theme-card-stage-prep h3,
[data-theme="light"] .theme-card-stage-prep .count { color: #0f766e; }
[data-theme="light"] .theme-card-stage-prep p { color: #115e59; }

.quiz-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.quiz-hub-grid > * {
  min-width: 0;
}
#quiz-hub-jeux { order: -20; }
#quiz-hub-nouveaux-qcm { order: -19; }
#quiz-hub-coeur { order: -18; }
.quiz-hub-grid .btn {
  min-height: 100%;
}

.situations-hub {
  position: relative;
  overflow: hidden;
  margin: 1rem 0 1.35rem;
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: calc(var(--radius) + 4px);
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.16), transparent 24rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.48));
  box-shadow: 0 14px 36px rgba(2, 6, 23, 0.18);
}
.situations-hub::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(125, 211, 252, 0.08), transparent 36%),
    radial-gradient(circle at 96% 0%, rgba(167, 139, 250, 0.12), transparent 14rem);
}
.situations-hub > * {
  position: relative;
  z-index: 1;
}
.situations-hub-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.situations-hub-head h3 {
  margin: 0.08rem 0 0.3rem;
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  letter-spacing: -0.02em;
}
.situations-hub-head > div > p:last-child {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.4;
  max-width: 42rem;
}
.situations-hub-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}
.situations-hub-metrics span {
  display: inline-flex;
  align-items: center;
  min-height: 1.65rem;
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(125, 211, 252, 0.2);
  color: #bae6fd;
  font-size: 0.74rem;
  font-weight: 700;
}
.situations-hub-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}
.situations-hub-grid .theme-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "icon title"
    "icon desc"
    "icon cta";
  align-content: start;
  column-gap: 0.85rem;
  min-height: 0;
  padding: 0.9rem 1rem;
  border-color: rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(10px);
}
.situations-hub-grid .theme-card:hover {
  border-color: rgba(125, 211, 252, 0.34);
  background: rgba(15, 23, 42, 0.52);
}
.situations-card-icon {
  grid-area: icon;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.45rem;
  height: 2.45rem;
  margin: 0.05rem 0 0;
  border-radius: 0.8rem;
  background: rgba(125, 211, 252, 0.12);
  border: 1px solid rgba(125, 211, 252, 0.22);
  font-size: 1.18rem;
}
.situations-hub-grid .theme-card h3 {
  grid-area: title;
  margin: 0 0 0.22rem;
  color: var(--text);
  font-size: 1rem;
}
.situations-hub-grid .theme-card p {
  grid-area: desc;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.35;
}
.situations-hub-grid .theme-card .count {
  grid-area: cta;
  margin-top: 0.6rem;
  color: #bae6fd;
  font-size: 0.82rem;
}
.situations-hub-note {
  margin: 0.85rem 0 0;
  padding: 0.65rem 0.75rem;
  border-radius: 0.85rem;
  background: rgba(20, 184, 166, 0.1);
  border: 1px solid rgba(45, 212, 191, 0.16);
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}
.situations-card {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.2), rgba(79, 70, 229, 0.14));
  border-color: rgba(167, 139, 250, 0.42);
}
.situations-card h3,
.situations-card .count { color: #c4b5fd; }
.situations-card p { color: rgba(221, 214, 254, 0.9); }
.situations-card:hover { background: linear-gradient(135deg, rgba(167, 139, 250, 0.3), rgba(79, 70, 229, 0.22)); }
[data-theme="light"] .situations-hub {
  border-color: rgba(14, 116, 144, 0.14);
  background:
    radial-gradient(circle at top left, rgba(224, 242, 254, 0.82), transparent 24rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(240, 249, 255, 0.78));
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}
[data-theme="light"] .situations-hub-grid .theme-card {
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(14, 116, 144, 0.12);
}
[data-theme="light"] .situations-hub-metrics span {
  background: rgba(224, 242, 254, 0.7);
  border-color: rgba(14, 116, 144, 0.16);
  color: #075985;
}
[data-theme="light"] .situations-card-icon {
  background: rgba(224, 242, 254, 0.82);
  border-color: rgba(14, 116, 144, 0.16);
}
[data-theme="light"] .situations-hub-grid .theme-card h3 { color: #0f172a; }
[data-theme="light"] .situations-hub-grid .theme-card p,
[data-theme="light"] .situations-hub-note { color: #475569; }
[data-theme="light"] .situations-hub-grid .theme-card .count { color: #0369a1; }
[data-theme="light"] .situations-hub-note {
  background: rgba(240, 253, 250, 0.82);
  border-color: rgba(13, 148, 136, 0.14);
}

@media (min-width: 900px) {
  .situations-hub {
    padding: 1.25rem;
  }

  .situations-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
  }
}

.module-paths {
  margin-bottom: 1rem;
}
.module-paths summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.95rem;
  margin-bottom: 0.55rem;
  color: var(--text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.module-paths summary::-webkit-details-marker {
  display: none;
}
.module-paths summary::after {
  content: 'Voir moins';
  font-size: 0.8rem;
  color: var(--primary);
}
.module-paths:not([open]) summary {
  margin-bottom: 0;
}
.module-paths:not([open]) summary::after {
  content: 'Voir plus';
}
.module-path-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}
.module-path-card {
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.5);
  color: var(--text);
  text-align: left;
  padding: 0.75rem 0.8rem;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition), background var(--transition);
}
.module-path-card strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
}
.module-path-card span {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.3;
}
.module-path-card:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(14, 116, 144, 0.2);
}
.modules-expand-wrap {
  margin-top: 0.7rem;
}
.modules-expand-wrap.hidden {
  display: none !important;
}

.module-path-result-label {
  margin: 0.2rem 0 0.6rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(34, 197, 94, 0.55);
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.18);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
}
.module-path-result-label.hidden {
  display: none !important;
}

.home-quiz-trainings-wrap {
  margin: 1.25rem 0 1.25rem;
  display: flex;
  justify-content: center;
}

#screen-quiz-hub #abreviations-card-wrap,
#screen-quiz-hub #history-section {
  display: none !important;
}

#screen-quiz-hub #study-coach:not(.hidden) {
  display: block !important;
  margin-top: 1.25rem;
}

#screen-quiz-hub.module-filter-active #study-coach {
  display: none !important;
}

#screen-quiz-hub #abreviations-card-wrap:not(.hidden) {
  display: block !important;
}

.module-path-clear-wrap {
  display: none;
  justify-content: center;
  margin: 0.35rem 0 0.85rem;
}
#screen-quiz-hub.module-filter-active .module-path-clear-wrap:not(.hidden) {
  display: flex !important;
}
#screen-quiz-hub.module-filter-active .quiz-hub-grid,
#screen-quiz-hub.module-filter-active .situations-hub,
#screen-quiz-hub.module-filter-active #badges-strip,
#screen-quiz-hub.module-filter-active .module-paths {
  display: none !important;
}
#screen-quiz-hub.module-filter-active .categories {
  max-width: 42rem;
  margin-inline: auto;
}
#screen-quiz-hub.module-filter-active .module-path-result-label {
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.screen-nav-bar {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}
.screen-nav-bar--floating {
  display: none !important;
}
.screen-back-btn {
  width: min(100%, 22rem);
  min-height: 2.75rem;
  font-weight: 700;
}

@media (max-width: 640px) {
  .module-paths {
    padding: 0.7rem 0.75rem;
    border: 1px solid rgba(56, 189, 248, 0.18);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.32);
  }
  .module-path-grid {
    grid-template-columns: 1fr;
    margin-top: 0.55rem;
  }
}

.theme-content-grid {
  display: grid;
  gap: 0.9rem;
}

.theme-info-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius);
  padding: 1rem;
}
.theme-info-card h3 {
  margin-bottom: 0.4rem;
  font-size: 1rem;
}
.theme-info-card p {
  color: var(--text-muted);
  line-height: 1.4;
}
/* Question preview cards */
.theme-qcard {
  padding: 0;
  overflow: hidden;
}
.theme-qcard details {
  margin: 0;
}
.theme-qcard summary {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 1rem;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
  list-style: none;
  user-select: none;
  transition: background 0.15s;
}
.theme-qcard summary::-webkit-details-marker { display: none; }
.theme-qcard summary::after {
  content: '▼';
  font-size: 0.65rem;
  color: var(--primary);
  margin-left: auto;
  flex-shrink: 0;
  margin-top: 0.25rem;
  transition: transform 0.2s;
}
.theme-qcard details[open] summary::after {
  transform: rotate(180deg);
}
.theme-qcard summary:hover {
  background: rgba(56, 189, 248, 0.07);
}
.qcard-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  margin-top: 0.1rem;
}
.qcard-answer {
  padding: 0.75rem 1rem 1rem 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(56, 189, 248, 0.05);
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.qcard-answer strong {
  color: var(--text);
}
[data-theme="light"] .qcard-answer {
  background: rgba(14, 165, 233, 0.06);
}
.theme-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 0.85rem;
}
.theme-actions .btn {
  min-width: 12.5rem;
}
.theme-actions .theme-quiz-mix {
  flex: 1 0 100%;
}
.theme-quiz-mix {
  margin: 0.55rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .theme-actions {
    justify-content: center;
  }
  .theme-actions .btn {
    width: min(100%, 18rem);
    min-width: min(100%, 18rem);
  }
}

[data-theme="light"] .theme-card {
  background: linear-gradient(145deg, rgba(186, 230, 253, 0.9), rgba(224, 242, 254, 0.95));
  border-color: rgba(14, 116, 144, 0.2);
}
[data-theme="light"] .theme-card:hover {
  border-color: rgba(14, 116, 144, 0.35);
}
[data-theme="light"] .theme-info-card {
  border-color: rgba(15, 23, 42, 0.08);
}
[data-theme="light"] .module-path-card {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(14, 116, 144, 0.25);
}
[data-theme="light"] .module-path-card:hover {
  background: rgba(186, 230, 253, 0.55);
  border-color: rgba(14, 116, 144, 0.4);
}

.examen-blanc-wrap {
  margin-bottom: 1rem;
}
.examen-blanc-card {
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.15), rgba(56, 189, 248, 0.15));
  border-color: rgba(129, 140, 248, 0.4);
  color: #a5b4fc;
}
.examen-blanc-card h3,
.examen-blanc-card .count { color: #a5b4fc; }
.examen-blanc-card p { color: rgba(165, 180, 252, 0.9); }
.examen-blanc-card:hover {
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.25), rgba(56, 189, 248, 0.25));
}

.search-wrap {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  position: relative;
}
.search-wrap::after {
  content: '';
  display: block;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  max-width: 10rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0), rgba(56, 189, 248, 0.85), rgba(129, 140, 248, 0.85), rgba(34, 197, 94, 0.8), rgba(56, 189, 248, 0));
  background-size: 200% 100%;
  animation: separatorFlow 4.5s ease-in-out infinite;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.18);
}
.search-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.search-input {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  background: var(--surface);
  color: var(--text);
  caret-color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition);
}
[data-theme="light"] .search-wrap::after {
  background: linear-gradient(90deg, rgba(14, 165, 233, 0), rgba(14, 165, 233, 0.78), rgba(99, 102, 241, 0.72), rgba(16, 185, 129, 0.72), rgba(14, 165, 233, 0));
  box-shadow: 0 0 14px rgba(14, 165, 233, 0.12);
}
.search-input::placeholder {
  color: var(--text-muted);
}
.search-input:focus {
  outline: none;
  border-color: var(--primary);
}
.search-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  padding-left: 0.1rem;
}
.search-glossaire-result {
  display: block;
  margin-top: 0.5rem;
  padding: 0.6rem 0.75rem;
  font-size: 0.875rem;
  background: var(--surface);
  border-radius: var(--radius);
  border-left: 3px solid var(--primary);
}
.search-glossaire-result strong { color: var(--primary); }
.search-glossaire-result.hidden { display: none !important; }
.home-search-actions {
  margin-top: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.home-unified-search-wrap .search-glossaire-result p {
  margin: 0;
}
.home-unified-search-wrap .search-glossaire-result p + .btn,
.home-unified-search-wrap .search-glossaire-result .home-search-actions {
  margin-top: 0.55rem;
}
.home-question-actions {
  margin-top: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ---- Champ de recherche unifié (accueil) ---- */
.unified-search-row {
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
}

.unified-search-row .search-input {
  flex: 1;
  min-width: 0;
}

.unified-search-row .btn {
  white-space: nowrap;
  min-width: 7rem;
}

.home-question-source {
  margin-top: 0.45rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 480px) {
  .unified-search-row {
    flex-direction: column;
  }

  .unified-search-row .btn {
    width: 100%;
    min-width: 0;
  }
}
.abreviations-card-wrap {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}
.abreviations-card-wrap .category-card {
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.15), rgba(56, 189, 248, 0.15));
  border-color: rgba(129, 140, 248, 0.4);
  color: #a5b4fc;
}
.abreviations-card-wrap .category-card h3,
.abreviations-card-wrap .category-card .count { color: #a5b4fc; }
.abreviations-card-wrap .category-card p { color: rgba(165, 180, 252, 0.9); }
.abreviations-card-wrap .category-card:hover {
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.25), rgba(56, 189, 248, 0.25));
}
.abreviations-card-wrap:not(.hidden) {
  display: block !important;
}

/* Fiches de révision (accueil) */
.fiches-wrap {
  margin-bottom: 1.5rem;
}
.fiches-card {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.12), rgba(34, 197, 94, 0.12));
  border-color: rgba(52, 211, 153, 0.35);
  color: #6ee7b7;
}
.fiches-card h3,
.fiches-card .count { color: #6ee7b7; }
.fiches-card p { color: rgba(110, 231, 183, 0.9); }
.fiches-card:hover {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.22), rgba(34, 197, 94, 0.22));
}
[data-theme="light"] .fiches-card,
[data-theme="light"] .fiches-card h3,
[data-theme="light"] .fiches-card .count { color: #059669; }
[data-theme="light"] .fiches-card p { color: #047857; }

/* Écran Fiches de révision (même largeur que l’accueil : .main) */
#screen-fiches {
  padding: 0 0 3rem 0;
}
.stages-wrap {
  margin-bottom: 1.5rem;
}
.stage-prep-wrap {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  position: relative;
}
.stage-prep-wrap::after {
  content: '';
  display: block;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  max-width: 10rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(45, 212, 191, 0), rgba(45, 212, 191, 0.82), rgba(56, 189, 248, 0.82), rgba(251, 146, 60, 0.78), rgba(45, 212, 191, 0));
  background-size: 200% 100%;
  animation: separatorFlow 5s ease-in-out infinite;
  box-shadow: 0 0 14px rgba(45, 212, 191, 0.18);
}
[data-theme="light"] .stage-prep-wrap::after {
  background: linear-gradient(90deg, rgba(13, 148, 136, 0), rgba(13, 148, 136, 0.72), rgba(14, 165, 233, 0.72), rgba(249, 115, 22, 0.7), rgba(13, 148, 136, 0));
  box-shadow: 0 0 14px rgba(13, 148, 136, 0.12);
}
.stages-card {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(245, 158, 11, 0.12));
  border-color: rgba(251, 191, 36, 0.35);
  color: #fcd34d;
}
.stages-card h3, .stages-card .count { color: #fcd34d; }
.stages-card p { color: rgba(252, 211, 77, 0.9); }
.stages-card:hover { background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(245, 158, 11, 0.22)); }
[data-theme="light"] .stages-card, [data-theme="light"] .stages-card h3, [data-theme="light"] .stages-card .count { color: #b45309; }
[data-theme="light"] .stages-card p { color: #92400e; }
.stage-prep-card {
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.14), rgba(16, 185, 129, 0.1));
  border-color: rgba(45, 212, 191, 0.28);
  color: #99f6e4;
}
.stage-prep-card h3,
.stage-prep-card .count { color: #99f6e4; }
.stage-prep-card p { color: rgba(153, 246, 228, 0.92); }
.stage-prep-card:hover {
  background: linear-gradient(135deg, rgba(125, 211, 252, 0.24), rgba(16, 185, 129, 0.18));
}
[data-theme="light"] .stage-prep-card,
[data-theme="light"] .stage-prep-card h3,
[data-theme="light"] .stage-prep-card .count { color: #0f766e; }
[data-theme="light"] .stage-prep-card p { color: #115e59; }
.cases-wrap {
  margin-bottom: 1.5rem;
}

#screen-quiz-hub #cases-wrap {
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  position: relative;
}

#screen-quiz-hub #cases-wrap::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  max-width: 10rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0), rgba(56, 189, 248, 0.85), rgba(129, 140, 248, 0.85), rgba(34, 197, 94, 0.8), rgba(56, 189, 248, 0));
  background-size: 200% 100%;
  animation: separatorFlow 4.8s ease-in-out infinite;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.18);
  pointer-events: none;
}

[data-theme="light"] #screen-quiz-hub #cases-wrap::before {
  background: linear-gradient(90deg, rgba(14, 165, 233, 0), rgba(14, 165, 233, 0.78), rgba(99, 102, 241, 0.72), rgba(16, 185, 129, 0.72), rgba(14, 165, 233, 0));
  box-shadow: 0 0 14px rgba(14, 165, 233, 0.12);
}

.cases-card {
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.12), rgba(236, 72, 153, 0.1));
  border-color: rgba(244, 114, 182, 0.28);
  color: #f9a8d4;
}
.cases-card h3,
.cases-card .count { color: #f9a8d4; }
.cases-card p { color: rgba(249, 168, 212, 0.92); }
.cases-card:hover {
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.22), rgba(236, 72, 153, 0.18));
}
[data-theme="light"] .cases-card,
[data-theme="light"] .cases-card h3,
[data-theme="light"] .cases-card .count { color: #be185d; }
[data-theme="light"] .cases-card p { color: #9d174d; }
.transmissions-wrap {
  margin-bottom: 1.5rem;
}
.transmissions-card {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.12), rgba(20, 184, 166, 0.1));
  border-color: rgba(45, 212, 191, 0.28);
  color: #5eead4;
}
.transmissions-card h3,
.transmissions-card .count { color: #5eead4; }
.transmissions-card p { color: rgba(94, 234, 212, 0.92); }
.transmissions-card:hover {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.22), rgba(20, 184, 166, 0.18));
}
[data-theme="light"] .transmissions-card,
[data-theme="light"] .transmissions-card h3,
[data-theme="light"] .transmissions-card .count { color: #0f766e; }
[data-theme="light"] .transmissions-card p { color: #115e59; }
.priorisation-wrap {
  margin-bottom: 1.5rem;
}
.priorisation-card {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.14), rgba(249, 115, 22, 0.1));
  border-color: rgba(251, 146, 60, 0.28);
  color: #fdba74;
}
.priorisation-card h3,
.priorisation-card .count { color: #fdba74; }
.priorisation-card p { color: rgba(253, 186, 116, 0.92); }
.priorisation-card:hover {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.24), rgba(249, 115, 22, 0.18));
}
[data-theme="light"] .priorisation-card,
[data-theme="light"] .priorisation-card h3,
[data-theme="light"] .priorisation-card .count { color: #c2410c; }
[data-theme="light"] .priorisation-card p { color: #9a3412; }
.stats-card-wrap {
  margin-bottom: 1.5rem;
}
.dashboard-card {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.18), rgba(71, 85, 105, 0.16));
  border-color: rgba(148, 163, 184, 0.24);
  color: #cbd5e1;
}
.dashboard-card h3,
.dashboard-card .count { color: #e2e8f0; }
.dashboard-card p { color: rgba(226, 232, 240, 0.88); }
.dashboard-card:hover {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.28), rgba(71, 85, 105, 0.22));
}
[data-theme="light"] .dashboard-card,
[data-theme="light"] .dashboard-card h3,
[data-theme="light"] .dashboard-card .count { color: #334155; }
[data-theme="light"] .dashboard-card p { color: #475569; }
#screen-vocabulaire {
  padding: 0 0 3rem 0;
}
/* ── Entraînement morphologique card ──────────────────────────────── */
.vocabulaire-tools {
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-top: 3px solid var(--primary);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(14, 116, 144, 0.10) 0%, rgba(15, 23, 42, 0.30) 100%);
  padding: 1.25rem 1.375rem 1.125rem;
  margin: 0 0 1.375rem;
}
.vocabulaire-tools-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  user-select: none;
}
.vocabulaire-tools-summary::-webkit-details-marker { display: none; }
.vocabulaire-tools-summary::after {
  content: '';
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath d='M4 6l5 5 5-5' stroke='%2338bdf8' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transition: transform 0.2s ease;
}
.vocabulaire-tools[open] .vocabulaire-tools-summary::after {
  transform: rotate(180deg);
}
.vocabulaire-tools-summary-inner {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.vocabulaire-tools-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.vocabulaire-tools-body {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(56, 189, 248, 0.12);
}
.vocabulaire-tools-body > p {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}
[data-theme="light"] .vocabulaire-tools-summary::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath d='M4 6l5 5 5-5' stroke='%230e7490' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
[data-theme="light"] .vocabulaire-tools-body {
  border-top-color: rgba(14, 116, 144, 0.15);
}
.vocabulaire-tools-badge {
  display: inline-block;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.18rem 0.6rem;
  margin-bottom: 0.55rem;
}
.vocabulaire-tools-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
}
.vocabulaire-tool-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.vocabulaire-tool-field span {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.vocabulaire-tool-field select {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(15, 23, 42, 0.52);
  color: var(--text);
  padding: 0.55rem 2.25rem 0.55rem 0.75rem;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.vocabulaire-tool-field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.14);
}
.vocabulaire-tools-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.vocabulaire-tools-actions .btn {
  flex: 1 1 auto;
}
.vocabulaire-tool-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.vocabulaire-tool-hint::before {
  content: "ℹ";
  flex-shrink: 0;
  font-style: normal;
  opacity: 0.65;
  margin-top: 0.05rem;
}
[data-theme="light"] .vocabulaire-tools {
  background: linear-gradient(150deg, rgba(14, 116, 144, 0.06) 0%, rgba(226, 241, 250, 0.60) 100%);
  border-color: rgba(14, 116, 144, 0.22);
}
[data-theme="light"] .vocabulaire-tools-badge {
  background: rgba(14, 116, 144, 0.08);
  color: #0e7490;
  border-color: rgba(14, 116, 144, 0.25);
}
[data-theme="light"] .vocabulaire-tool-field select {
  background: rgba(248, 250, 252, 0.95);
  border-color: rgba(100, 116, 139, 0.28);
  color: #1e293b;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
[data-theme="light"] .vocabulaire-tool-field select:focus {
  border-color: #0e7490;
  box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.12);
}
@media (max-width: 640px) {
  #screen-vocabulaire .vocabulaire-tools {
    display: none;
  }
}
@media (max-width: 420px) {
  .vocabulaire-tools-filters {
    grid-template-columns: 1fr;
  }
}
.morpheme-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}
.morpheme-admin-card {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0.9rem 1rem;
}
.morpheme-admin-card h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}
.morpheme-admin-kpis p,
.morpheme-admin-list p {
  margin: 0.35rem 0;
}
.morpheme-admin-ok {
  color: #22c55e;
  font-weight: 700;
}
.morpheme-admin-alert {
  color: #fb923c;
  font-weight: 700;
}
.morpheme-admin-table-wrap {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 0.9rem 1rem;
}
.morpheme-admin-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.morpheme-admin-table th,
.morpheme-admin-table td {
  padding: 0.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  text-align: left;
}
.morpheme-admin-status-ok {
  color: #22c55e;
  font-weight: 700;
}
.morpheme-admin-status-ko {
  color: #f97316;
  font-weight: 700;
}
.vocabulaire-stats {
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.vocabulaire-list {
  display: grid;
  gap: 0.85rem;
}
.vocabulaire-item {
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-soft);
}
.vocabulaire-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-bottom: 0.55rem;
}
.vocabulaire-term {
  margin: 0;
  font-size: 1rem;
  color: var(--text);
}
.vocabulaire-kind {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  border: 1px solid transparent;
}
.vocabulaire-kind--vocabulaire {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.28);
  color: #34d399;
}
.vocabulaire-kind--prefixe {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.28);
  color: #60a5fa;
}
.vocabulaire-kind--suffixe {
  background: rgba(249, 115, 22, 0.14);
  border-color: rgba(249, 115, 22, 0.28);
  color: #fb923c;
}
.vocabulaire-kind--racine {
  background: rgba(168, 85, 247, 0.14);
  border-color: rgba(168, 85, 247, 0.28);
  color: #c084fc;
}
.vocabulaire-category {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.22);
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 700;
}
.vocabulaire-def {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
}
.vocabulaire-example {
  margin: 0.4rem 0 0;
  color: var(--text-muted);
  font-size: 0.86rem;
}
.vocabulaire-fiche-link {
  margin-top: 0.65rem;
  width: 100%;
  justify-content: center;
}
#screen-stages { padding: 0 0 3rem 0; }
.stages-sources { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.75rem; max-width: 36rem; margin-left: auto; margin-right: auto; line-height: 1.4; }
.stages-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
.stages-tab { padding: 0.5rem 1rem; font-size: 0.9rem; font-family: inherit; font-weight: 600; color: var(--text-muted); background: var(--surface); border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius); cursor: pointer; transition: color var(--transition), border-color var(--transition), background var(--transition); }
.stages-tab:hover { color: var(--text); }
.stages-tab.active { color: var(--primary); border-color: var(--primary); background: rgba(56, 189, 248, 0.08); }
.stages-panel { margin-bottom: 1.5rem; }
.stages-panel.hidden { display: none !important; }
.stages-panel-title { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--text); }
.stages-panel-desc { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1rem; }
.stages-checklist-block { border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1rem; background: var(--surface); }
.stages-checklist-legend { font-weight: 700; color: var(--primary); padding: 0 0.5rem; }
.stages-checklist-list { list-style: none; margin: 0.5rem 0 0; }
.stages-checklist-item { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.35rem 0; font-size: 0.9rem; cursor: pointer; }
.stages-checklist-item input { margin-top: 0.25rem; flex-shrink: 0; }
.stages-faq-item { margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid rgba(255,255,255,0.06); }
.stages-faq-item:last-child { border-bottom: none; }
.stages-faq-q { font-size: 1rem; color: var(--text); margin-bottom: 0.35rem; }
.stages-faq-a { font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; margin: 0; }
.stages-situation-card { background: var(--surface); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1rem; border: 1px solid rgba(255,255,255,0.06); }
.stages-situation-title { font-size: 1rem; color: var(--primary); margin-bottom: 0.5rem; }
.stages-situation-text, .stages-situation-conseils { font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; margin: 0 0 0.5rem; }
.stages-situation-conseils { margin-bottom: 0; }
.fiches-title {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  color: var(--text);
}
.fiches-intro {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.45;
}
/* Accordéon fiches */
.fiches-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.fiches-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.fiches-filter-chip {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.fiches-filter-chip.active,
.fiches-filter-chip:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.fiches-see-all-btn {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.85rem 1.25rem;
  background: transparent;
  border: 1px dashed rgba(148, 163, 184, 0.4);
  border-radius: var(--radius);
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s;
}
.fiches-see-all-btn:hover {
  background: rgba(56, 189, 248, 0.08);
}
.fiches-hero {
  padding-bottom: 0.75rem;
}
.fiches-hero h2 {
  font-size: 1.4rem;
}
.fiches-premium-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(110, 231, 183, 0.35);
  border-radius: 0.75rem;
  background: rgba(110, 231, 183, 0.08);
  text-align: left;
}
.fiches-premium-cta > div { display: grid; gap: 0.2rem; }
.fiches-premium-cta strong { color: #6ee7b7; }
.fiches-premium-cta span { color: rgba(226, 232, 240, 0.82); font-size: 0.88rem; }
.fiches-premium-cta .btn { flex-shrink: 0; }
[data-theme="light"] .fiches-premium-cta strong { color: #047857; }
[data-theme="light"] .fiches-premium-cta span { color: #334155; }
@media (max-width: 640px) {
  .fiches-premium-cta { align-items: stretch; flex-direction: column; }
  .fiches-premium-cta .btn { width: 100%; }
}
.fiche-accordion-item {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid transparent;
  overflow: hidden;
  transition: box-shadow 0.2s;
  scroll-margin-top: 1rem;
}
.fiche-accordion-item.fiche-accordion-open {
  box-shadow: var(--shadow);
}
@keyframes ficheHighlight {
  0%   { background: rgba(34, 197, 94, 0.65); box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.9), 0 0 20px 6px rgba(34, 197, 94, 0.45); transform: translateX(-5px) scale(1.025); }
  4%   { transform: translateX(5px)  scale(1.025); background: rgba(34, 197, 94, 0.2); }
  8%   { transform: translateX(-4px) scale(1.02);  background: rgba(34, 197, 94, 0.65); }
  12%  { transform: translateX(4px)  scale(1.02);  background: rgba(34, 197, 94, 0.2); }
  16%  { transform: translateX(-3px) scale(1.015); background: rgba(34, 197, 94, 0.65); }
  20%  { transform: translateX(3px)  scale(1.015); background: rgba(34, 197, 94, 0.2); }
  24%  { transform: translateX(-2px) scale(1.01);  background: rgba(34, 197, 94, 0.55); }
  28%  { transform: translateX(0)    scale(1);     background: rgba(34, 197, 94, 0.2); }
  38%  { background: rgba(34, 197, 94, 0.5);  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.7); }
  50%  { background: rgba(34, 197, 94, 0.2);  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.4); }
  62%  { background: rgba(34, 197, 94, 0.4);  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.5); }
  75%  { background: rgba(34, 197, 94, 0.15); box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.2); }
  100% { background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(129, 140, 248, 0.08)); box-shadow: none; transform: translateX(0) scale(1); }
}
.fiche-accordion-item--highlight .fiche-accordion-header {
  animation: ficheHighlight 3s ease-out forwards;
}
.fiche-accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(129, 140, 248, 0.08));
  border: none;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s;
  transform-origin: center;
}
.fiche-accordion-header:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(129, 140, 248, 0.14));
}
[data-theme="light"] .fiche-accordion-header {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(99, 102, 241, 0.1));
}
[data-theme="light"] .fiche-accordion-header:hover {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(99, 102, 241, 0.16));
}
.fiche-accordion-title {
  flex: 1;
}
.fiche-accordion-title-row {
  flex: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}
.fiche-legal-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.66rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #f8fafc;
  background: linear-gradient(135deg, #0f766e, #0ea5e9);
  white-space: nowrap;
}
.fiche-accordion-icon {
  flex-shrink: 0;
  font-size: 0.7rem;
  color: var(--primary);
  transition: transform 0.25s ease;
}
.fiche-accordion-open .fiche-accordion-icon {
  transform: rotate(180deg);
}
.fiche-accordion-body {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}
.fiche-accordion-body[hidden] {
  display: none;
}
.fiche-accordion-inner {
  padding: 1rem 1.25rem 1.25rem;
}
.fiche-section {
  margin-bottom: 1.25rem;
}
.fiche-section:last-child {
  margin-bottom: 0;
}
.fiche-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.fiche-section-body {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
}
.fiche-section-body p {
  margin-bottom: 0.75rem;
}
.fiche-section-body p:last-child {
  margin-bottom: 0;
}
.fiche-section-body ul,
.fiche-section-body ol {
  margin: 0.5rem 0 0.75rem 1.25rem;
  padding: 0;
}
.fiche-section-body li {
  margin-bottom: 0.35rem;
}
.fiche-principles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
}
.fiche-principles-grid > div {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 0.6rem;
  background: rgba(148, 163, 184, 0.08);
}
.fiche-principles-grid strong {
  color: var(--primary);
}
.fiche-principles-grid span {
  font-size: 0.85em;
}
.fiche-quiz-actions {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}
.fiche-quiz-btn {
  width: 100%;
  justify-content: center;
}
.fiches-loading,
.fiches-error,
.fiches-empty {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 1rem 0;
}
.fiches-error { color: var(--error); }
.fiches-search-wrap { margin-bottom: 1.25rem; }
.fiches-footer { margin-top: 1rem; }
.fiches-footer .stats-footer:first-of-type { margin-top: 0.5rem; }
.abreviations-card-wrap.hidden {
  display: none !important;
}
.search-input-wrap {
  position: relative;
}
.search-input-wrap::before {
  content: '🔍';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  pointer-events: none;
  z-index: 1;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.no-results {
  text-align: center;
  color: var(--text-muted);
  padding: 1.5rem;
}
.no-results.hidden,
.categories.hidden {
  display: none !important;
}
.install-ios-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.install-ios-banner.hidden {
  display: none !important;
}
.install-ios-dismiss {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  border-radius: 50%;
  line-height: 1;
  transition: background var(--transition);
}
.install-ios-dismiss:hover {
  background: var(--surface-hover);
}

.categories {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.category-card {
  display: block;
  padding: 1.25rem 1.25rem;
  min-height: 2.75rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition);
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
.category-card:hover {
  background: var(--surface-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.category-card:active {
  transform: translateY(0);
}
.category-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.category-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.category-card .count {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
}
.category-card .progression-badge {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.coach-card {
  margin: 0 0 1.5rem;
  padding: 1.2rem 1.25rem;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(59, 130, 246, 0.08), rgba(129, 140, 248, 0.1));
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: var(--radius);
  position: relative;
}
.coach-card.hidden { display: none !important; }
.coach-card::before,
.coach-card::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  max-width: 10rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0), rgba(56, 189, 248, 0.85), rgba(129, 140, 248, 0.85), rgba(34, 197, 94, 0.8), rgba(56, 189, 248, 0));
  background-size: 200% 100%;
  animation: separatorFlow 4.8s ease-in-out infinite;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.18);
  pointer-events: none;
}
.coach-card::before {
  top: -0.85rem;
}
.coach-card::after {
  bottom: -0.85rem;
}
[data-theme="light"] .coach-card::before,
[data-theme="light"] .coach-card::after {
  background: linear-gradient(90deg, rgba(14, 165, 233, 0), rgba(14, 165, 233, 0.78), rgba(99, 102, 241, 0.72), rgba(16, 185, 129, 0.72), rgba(14, 165, 233, 0));
  box-shadow: 0 0 14px rgba(14, 165, 233, 0.12);
}
.coach-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.coach-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.coach-header h3 {
  font-size: 1.1rem;
  color: var(--text);
}
.coach-readiness {
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(15, 23, 42, 0.28);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
}
.coach-summary {
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.9rem;
}
.coach-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}
.coach-metric {
  background: rgba(15, 23, 42, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.8rem;
  padding: 0.8rem 0.9rem;
}
.coach-metric-label {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}
.coach-metric-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.coach-focus {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.coach-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.22);
  color: var(--text);
  font-size: 0.78rem;
}
.coach-chip strong {
  color: var(--primary);
}
.coach-spotlight {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.coach-spotlight.hidden { display: none !important; }
.coach-spotlight-card {
  padding: 0.85rem 0.9rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.coach-spotlight-label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}
.coach-spotlight-value {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.coach-spotlight-detail {
  display: block;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.4;
}
.coach-plan {
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: 0.95rem;
  background: rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.coach-plan.hidden { display: none !important; }
.coach-plan-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}
.coach-plan-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.coach-plan-header h4 {
  font-size: 0.98rem;
  color: var(--text);
}
.coach-plan-badge {
  flex-shrink: 0;
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--text);
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
}
.coach-plan-list {
  display: grid;
  gap: 0.7rem;
}
.coach-plan-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.9rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.coach-plan-copy {
  min-width: 0;
}
.coach-plan-kicker {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.2rem;
}
.coach-plan-item h5 {
  font-size: 0.94rem;
  color: var(--text);
  margin-bottom: 0.18rem;
}
.coach-plan-item p {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted);
}
.coach-plan-btn {
  min-width: 150px;
  flex-shrink: 0;
}
.coach-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.coach-actions .btn {
  min-width: 190px;
}

/* Historique des scores (accueil) */
.history-section {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border-radius: var(--radius);
}
.history-section.hidden { display: none !important; }
.history-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.history-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}
.btn-history-reset {
  font-size: 0.75rem;
  padding: 0.35rem 0.6rem;
  background: transparent;
  border: 1px solid var(--text-muted);
  border-radius: 0.5rem;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  transition: color var(--transition), border-color var(--transition);
}
.btn-history-reset:hover {
  color: var(--primary);
  border-color: var(--primary);
}
.history-list {
  list-style: none;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.history-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.history-item:last-child { border-bottom: none; }
.history-name { font-weight: 600; color: var(--text); }
.history-score { color: var(--primary); }
.history-date { font-size: 0.8rem; opacity: 0.9; }
.history-mode {
  font-size: 0.72rem;
  padding: 0.1rem 0.4rem;
  border-radius: 0.25rem;
  background: rgba(56, 189, 248, 0.12);
  color: rgba(56, 189, 248, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.18);
  white-space: nowrap;
}

.stats-bar {
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
}
.stats-bar.hidden {
  display: none !important;
}

/* Quiz */
.quiz-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.back-btn {
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border: none;
  border-radius: 0.5rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background var(--transition);
}
.back-btn:hover {
  background: var(--surface-hover);
}
.quiz-progress {
  flex: 1;
  min-width: 120px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.progress-bar {
  flex: 1;
  height: 8px;
  background: var(--surface);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), #818cf8);
  border-radius: 999px;
  transition: width var(--transition);
}
.quiz-score {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.quiz-score span:first-of-type { color: var(--success); }
.quiz-score span:last-of-type { color: var(--error); }
.quiz-session-meta {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
}
.quiz-session-meta--atelier {
  color: #fef3c7;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(20, 184, 166, 0.16));
  border-color: rgba(251, 191, 36, 0.42);
}
.quiz-session-meta.hidden { display: none !important; }

.quiz-questions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.question-block {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  animation: slideUp 0.35s ease;
}
.question-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 0.85rem;
}
.question-difficulty {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.68rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.question-difficulty--easy {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(34, 197, 94, 0.22);
}
.question-difficulty--intermediate {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.22);
}
.question-difficulty--advanced {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.22);
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.question-block h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.45;
}
.case-context {
  margin-bottom: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 0.85rem;
  background: rgba(15, 23, 42, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.case-kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.45rem;
}
.case-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.35rem;
}
.case-text {
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}
.case-source {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.choices {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.choice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1rem;
  min-height: 2.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid transparent;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}
.choice:hover:not(.disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(56, 189, 248, 0.4);
}
.choice .radio {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
  flex-shrink: 0;
  transition: all var(--transition);
}
.choice.selected .radio {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.3);
}
.choice.correct .radio { border-color: var(--success); background: var(--success); }
.choice.wrong .radio { border-color: var(--error); background: var(--error); }
.choice.correct { border-color: var(--success); background: rgba(74, 222, 128, 0.1); }
.choice.wrong { border-color: var(--error); background: rgba(248, 113, 113, 0.1); }
.choice.disabled { pointer-events: none; opacity: 0.8; }

.feedback {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.06);
  animation: slideUp 0.35s ease;
}
.feedback.hidden { display: none !important; }
.feedback-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}
.feedback-content p { margin-bottom: 0.75rem; line-height: 1.5; }
.feedback-content p,
.feedback .explanation {
  flex: 1 0 100%;
}
.feedback-content > .btn {
  min-width: 12.5rem;
}
.feedback-journal {
  flex: 1 0 100%;
  padding: 0.9rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.25);
  display: grid;
  gap: 0.55rem;
}
.feedback-journal.hidden { display: none !important; }
.feedback-journal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.feedback-journal-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}
.feedback-journal-input {
  width: 100%;
  resize: vertical;
  min-height: 4.25rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.45);
  color: var(--text);
  padding: 0.6rem 0.7rem;
  font: inherit;
}
.feedback-journal-input:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.45);
  outline-offset: 1px;
}
.feedback-journal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}
.feedback-journal-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.feedback .explanation {
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  border-left: 3px solid var(--primary);
}
.feedback .explanation ul {
  margin: 0.55rem 0 0 1.1rem;
}
.feedback .explanation li {
  margin-bottom: 0.3rem;
}
.feedback .explanation .feedback-legal-ref {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.65rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #e0f2fe;
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.95), rgba(59, 130, 246, 0.9));
  letter-spacing: 0.01em;
}
.feedback .explanation .feedback-legal-ref--csp {
  background: linear-gradient(135deg, rgba(22, 101, 52, 0.95), rgba(5, 150, 105, 0.9));
}
.feedback .explanation .feedback-legal-ref--penal {
  background: linear-gradient(135deg, rgba(124, 45, 18, 0.95), rgba(220, 38, 38, 0.88));
}
.feedback .explanation .feedback-legal-ref--loi {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.95), rgba(14, 116, 144, 0.9));
}
.feedback .explanation .feedback-legal-link {
  border: none;
  border-radius: 999px;
  padding: 0.16rem 0.52rem;
  font-size: 0.69rem;
  font-weight: 700;
  color: #0c4a6e;
  background: #e0f2fe;
  cursor: pointer;
}
.feedback .explanation .feedback-legal-link:hover {
  background: #bae6fd;
}

@media (max-width: 640px) {
  .feedback-content {
    justify-content: center;
  }
  .feedback-content > .btn {
    width: min(100%, 18rem);
    min-width: min(100%, 18rem);
  }
}

.feedback.correct .feedback-content { border-left: 4px solid var(--success); padding-left: 1rem; margin-left: -1rem; }
.feedback.wrong .feedback-content { border-left: 4px solid var(--error); padding-left: 1rem; margin-left: -1rem; }

/* Results */
.results-card {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.06);
  animation: scaleIn 0.5s ease;
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
.results-emoji {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: bounce 0.6s ease;
}
@keyframes bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}
.results-card h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}
.results-score {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.results-message {
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}
.results-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.7rem;
  margin: 0 auto 1rem;
  max-width: 40rem;
}
.results-overview.hidden { display: none !important; }
.results-overview-card {
  text-align: left;
  padding: 0.9rem;
  border-radius: 0.9rem;
  background: rgba(15, 23, 42, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.results-overview-label {
  display: block;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.results-overview-value {
  display: block;
  font-size: 1.1rem;
  color: var(--text);
  font-weight: 800;
  margin-bottom: 0.2rem;
}
.results-overview-detail {
  display: block;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.4;
}
.results-insights {
  margin: 0 auto 1rem;
  max-width: 34rem;
  text-align: left;
  padding: 1rem;
  border-radius: 0.9rem;
  background: rgba(15, 23, 42, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.results-insights.hidden { display: none !important; }
.results-insights p {
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0.45rem;
}
.results-insights p:last-child {
  margin-bottom: 0;
}
.results-insights strong {
  color: var(--text);
}
.results-next-steps,
.results-module-recap {
  margin: 0 auto 1rem;
  max-width: 40rem;
  text-align: left;
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.results-next-steps.hidden,
.results-module-recap.hidden { display: none !important; }
.results-next-header,
.results-module-recap-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}
.results-next-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.quiz-learn-hero {
  margin-bottom: 1.25rem;
}
.quiz-learn-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.quiz-learn-title {
  font-size: 1.55rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.quiz-learn-intro {
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 42rem;
}
.quiz-learn-grid {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}
@media (min-width: 720px) {
  .quiz-learn-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.quiz-learn-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.1rem;
}
.quiz-learn-card h3 {
  font-size: 0.95rem;
  margin-bottom: 0.55rem;
  color: var(--text);
}
.quiz-learn-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.45rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.quiz-learn-fiches-section h3 {
  font-size: 0.95rem;
  margin-bottom: 0.65rem;
  color: var(--text);
}
.quiz-learn-fiches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.25rem;
}
.quiz-learn-fiche-btn {
  text-align: left;
}
.quiz-learn-fiches-empty {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}
.quiz-learn-actions {
  display: flex;
  justify-content: flex-start;
  padding-bottom: 1.5rem;
}
.results-next-header h3,
.results-module-recap-header h3 {
  font-size: 1rem;
  color: var(--text);
}
.results-next-badge {
  flex-shrink: 0;
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--text);
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
}
.results-next-list,
.results-module-recap-list {
  display: grid;
  gap: 0.7rem;
}
.results-next-item,
.results-module-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 0.9rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.results-next-copy,
.results-module-copy {
  min-width: 0;
}
.results-next-copy strong,
.results-module-copy strong {
  display: block;
  color: var(--text);
  margin-bottom: 0.18rem;
}
.results-next-copy span,
.results-module-copy span {
  display: block;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted);
}
.results-next-btn {
  min-width: 150px;
  flex-shrink: 0;
}
.results-module-meta {
  flex-shrink: 0;
  min-width: 108px;
  text-align: right;
}
.results-module-value {
  display: block;
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 0.3rem;
}
.results-module-bar {
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}
.results-module-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #818cf8);
  border-radius: 999px;
}

.stats-hero {
  margin-bottom: 1.25rem;
}
.stats-hero--compact h2 {
  margin-bottom: 0.35rem;
}
.stats-hero-summary {
  margin: 0;
  max-width: 38rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.stats-plan-panel,
.stats-section-card {
  margin-bottom: 1rem;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.stats-detail {
  margin-top: 0.25rem;
}
.stats-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.stats-section-header h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--text);
}
.stats-section-card--journal .stats-section-header {
  margin-bottom: 0.55rem;
}
.stats-plan-panel {
  border-radius: 16px;
}
.stats-plan-panel--clean {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.stats-plan-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}
.stats-plan-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 0.2rem;
}
.stats-plan-header h3 {
  font-size: 1rem;
  color: var(--text);
  margin: 0;
}
.stats-plan-badge {
  flex-shrink: 0;
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
}
.stats-plan-list {
  display: grid;
  gap: 0.65rem;
}
.stats-plan-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 0.9rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.stats-plan-copy {
  min-width: 0;
}
.stats-plan-copy strong {
  display: block;
  color: var(--text);
  margin-bottom: 0.15rem;
}
.stats-plan-copy span {
  display: block;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted);
}
.stats-plan-btn {
  min-width: 132px;
  flex-shrink: 0;
}
.stats-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.stats-overview--primary .stats-overview-card {
  padding: 0.95rem 1rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
  border-radius: 14px;
}
.stats-overview-card,
.stats-panel {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 1rem 1.1rem;
}
.stats-section-card .stats-item {
  padding: 0.85rem 0.9rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.stats-section-card .stats-list {
  gap: 0.65rem;
}
.stats-tabs {
  display: flex;
  gap: 0.45rem;
  margin: 0 0 1rem;
  padding: 0.3rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}
.stats-tab-panel {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.stats-module-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.85rem;
}
.stats-overview-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}
.stats-overview-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}
.stats-overview-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.76rem;
  color: var(--text-muted);
}
.stats-tab {
  flex: 1 1 0;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.stats-tab.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
}
.stats-tab-count {
  opacity: 0.75;
  font-size: 0.78rem;
}
.stats-module-filter {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.stats-module-filter.is-active {
  color: var(--text);
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.12);
}
.stats-list--modules {
  display: grid;
  gap: 0.55rem;
}
.stats-item-value--muted {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
}
.stats-item-note {
  font-style: italic;
}
.stats-item-meta {
  opacity: 0.8;
}
.stats-inline-actions--compact {
  margin: 0.55rem 0 0.75rem;
}
.btn-sm {
  padding: 0.38rem 0.7rem;
  font-size: 0.82rem;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.9rem;
}
.stats-panel h3 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}
.stats-panel-collapsible details {
  width: 100%;
}
.stats-panel-collapsible summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.stats-panel-collapsible summary::-webkit-details-marker {
  display: none;
}
.stats-panel-collapsible summary::after {
  content: 'Voir plus';
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
}
.stats-panel-collapsible details[open] summary::after {
  content: 'Voir moins';
}
.stats-summary-chip {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.82rem;
}
.stats-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.stats-inline-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-bottom: 0.55rem;
}
.stats-inline-actions .btn {
  min-width: 11rem;
}
.stats-journal-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.stats-journal-sort {
  border-radius: 0.65rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.45);
  color: var(--text);
  padding: 0.4rem 0.55rem;
  font-size: 0.82rem;
}
.stats-list-empty {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.stats-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 0.8rem;
  border-radius: 0.8rem;
  background: rgba(15, 23, 42, 0.22);
}
.stats-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.stats-item-title {
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
}
.stats-item-value {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
}
.stats-item-sub {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.4;
}
.stats-item-bar {
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}
.stats-item-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #818cf8);
  border-radius: 999px;
}
.stats-actions {
  margin-top: 1.1rem;
}

.settings-hero {
  margin-bottom: 1.5rem;
}
.settings-panel {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 1rem 1.1rem;
  margin-bottom: 0.9rem;
}
.settings-panel h3 {
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 0.35rem;
}
.settings-panel p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}
.settings-row {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.settings-row + .settings-row {
  margin-top: 0.95rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.settings-row-split {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}
.settings-copy {
  min-width: 0;
}
.settings-field-label {
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
}
.settings-time-input {
  color-scheme: dark;
  width: 100%;
  border-radius: 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: color-mix(in srgb, var(--surface) 85%, #0f172a 15%);
  color: var(--text);
  padding: 0.65rem 0.8rem;
  font-family: inherit;
  font-weight: 600;
}
.settings-time-input::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.2);
  opacity: 0.9;
}
.settings-time-input:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-color: rgba(56, 189, 248, 0.7);
}
.settings-select {
  appearance: auto;
  -webkit-appearance: menulist;
  -moz-appearance: auto;
  color-scheme: dark;
  width: 100%;
  border-radius: 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: color-mix(in srgb, var(--surface) 85%, #0f172a 15%);
  color: var(--text);
  padding: 0.65rem 0.8rem;
  font-family: inherit;
  font-weight: 600;
}
.settings-select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-color: rgba(56, 189, 248, 0.7);
}
.settings-select option {
  background: #0f172a;
  color: #f1f5f9;
}
.settings-native-control {
  min-height: 3rem;
}
[data-theme="light"] .settings-time-input {
  color-scheme: light;
  border: 1px solid rgba(15, 23, 42, 0.18);
  background: #ffffff;
  color: #0f172a;
}
[data-theme="light"] .settings-time-input::-webkit-calendar-picker-indicator {
  filter: none;
  opacity: 1;
}
[data-theme="light"] .settings-select {
  color-scheme: light;
  border: 1px solid rgba(15, 23, 42, 0.18);
  background: #ffffff;
  color: #0f172a;
}
[data-theme="light"] .settings-select option {
  background: #ffffff;
  color: #0f172a;
}

/* ── Visually hidden (for hidden native selects/inputs still used by JS) ──── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Custom time picker ───────────────────────────────────────────────────── */
.settings-custom-time {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: color-mix(in srgb, var(--surface) 85%, #0f172a 15%);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 0.9rem;
  padding: 0.6rem 1.2rem;
}
.settings-time-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}
.settings-time-display {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
  min-width: 2.2rem;
  text-align: center;
  letter-spacing: 0.02em;
}
.settings-time-arrow {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 0.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.35rem 0.7rem;
  border-radius: 0.5rem;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.settings-time-arrow:hover {
  background: rgba(56, 189, 248, 0.18);
}
.settings-time-arrow:active {
  background: rgba(56, 189, 248, 0.3);
}
.settings-time-colon {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-muted);
  line-height: 1;
  align-self: center;
  margin-bottom: 0.1rem;
}
[data-theme="light"] .settings-custom-time {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.18);
}

/* ── Custom frequency chips ───────────────────────────────────────────────── */
.settings-freq-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.settings-palette-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.settings-freq-chip {
  flex: 1 1 auto;
  min-height: 2.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  text-align: center;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.settings-freq-chip:hover {
  border-color: rgba(56, 189, 248, 0.5);
  color: var(--text);
}
.settings-freq-chip.active {
  border-color: rgba(56, 189, 248, 0.85);
  background: rgba(56, 189, 248, 0.2);
  color: var(--primary);
}

.settings-palette-chip {
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.settings-palette-chip:hover,
.settings-palette-chip.active {
  border-color: var(--border-strong);
  background: var(--primary-soft);
  color: var(--primary);
}

.settings-palette-swatch {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 1px var(--border);
}

.settings-palette-swatch--green {
  background: #5dc9c6;
}

.settings-palette-swatch--blue {
  background: #38bdf8;
}

/* ── Custom theme dropdown ────────────────────────────────────────────────── */
.settings-custom-dropdown {
  position: relative;
}
.settings-dropdown-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 3rem;
  padding: 0.65rem 0.9rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: color-mix(in srgb, var(--surface) 85%, #0f172a 15%);
  color: var(--text);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-align: left;
  transition: border-color var(--transition), background var(--transition);
}
.settings-dropdown-btn:hover {
  border-color: rgba(56, 189, 248, 0.5);
}
.settings-dropdown-btn[aria-expanded="true"] {
  border-color: rgba(56, 189, 248, 0.7);
}
.settings-dropdown-arrow {
  color: var(--text-muted);
  font-size: 1rem;
  margin-left: 0.5rem;
  flex-shrink: 0;
  transition: transform var(--transition);
}
.settings-dropdown-btn[aria-expanded="true"] .settings-dropdown-arrow {
  transform: rotate(180deg);
}
.settings-dropdown-list {
  position: absolute;
  z-index: 200;
  left: 0;
  right: 0;
  top: calc(100% + 0.35rem);
  background: var(--surface);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 0.8rem;
  padding: 0.3rem;
  margin: 0;
  list-style: none;
  max-height: 14rem;
  overflow-y: auto;
  box-shadow: var(--shadow);
}
.settings-dropdown-list[hidden] {
  display: none;
}
.settings-dropdown-opt {
  padding: 0.6rem 0.85rem;
  border-radius: 0.5rem;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background var(--transition), color var(--transition);
}
.settings-dropdown-opt:hover {
  background: var(--surface-hover);
  color: var(--text);
}
.settings-dropdown-opt.active {
  color: var(--primary);
  background: rgba(56, 189, 248, 0.12);
}
[data-theme="light"] .settings-dropdown-btn {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.18);
}
[data-theme="light"] .settings-dropdown-list {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
}
.settings-counter-wrap {
  display: grid;
  gap: 0.45rem;
}
.settings-weekdays {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.settings-weekdays.hidden {
  display: none !important;
}
.settings-weekday-chip {
  min-width: 2.8rem;
  height: 1.95rem;
  padding: 0 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.settings-weekday-chip:hover {
  border-color: rgba(56, 189, 248, 0.5);
  color: var(--text);
}
.settings-weekday-chip.active {
  border-color: rgba(56, 189, 248, 0.85);
  background: rgba(56, 189, 248, 0.2);
  color: var(--primary);
}
.settings-counter {
  display: grid;
  grid-template-columns: 2.1rem minmax(0, 1fr) 2.1rem;
  align-items: center;
  gap: 0.45rem;
}
.settings-counter-btn {
  height: 2.1rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: rgba(56, 189, 248, 0.1);
  color: var(--primary);
  font-family: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
}
.settings-counter-btn:hover {
  background: rgba(56, 189, 248, 0.2);
}
.settings-number-input {
  width: 100%;
  max-width: 100%;
  border-radius: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.32);
  color: var(--text);
  padding: 0.5rem 0.65rem;
  font-family: inherit;
  text-align: center;
  font-weight: 600;
}
.settings-quick-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.settings-quick-count {
  min-width: 2.5rem;
  height: 1.9rem;
  padding: 0 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.settings-quick-count:hover {
  border-color: rgba(56, 189, 248, 0.5);
  color: var(--text);
}
.settings-quick-count.active {
  border-color: rgba(56, 189, 248, 0.85);
  background: rgba(56, 189, 248, 0.2);
  color: var(--primary);
}
.settings-start-link {
  width: 100%;
}
.settings-note {
  font-size: 0.82rem;
}
.settings-note-warning {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-left: 3px solid var(--accent);
  border-radius: 0.35rem;
  padding: 0.55rem 0.75rem;
  color: var(--text);
  line-height: 1.5;
}
.app-usage-notice {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-muted, rgba(148, 163, 184, 0.95));
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-left: 3px solid var(--accent);
  border-radius: 0.35rem;
  padding: 0.5rem 0.7rem;
  margin: 0;
}
.app-usage-notice--compact {
  font-size: 0.78rem;
  padding: 0.45rem 0.6rem;
}
#quiz-privacy-notice[hidden],
#modal-limit-notice[hidden] {
  display: none !important;
}
.quiz-privacy-notice {
  margin: 0 0 0.75rem;
}
.theme-card .app-usage-notice {
  margin-top: 0.35rem;
}
.settings-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  color: var(--text);
  font-weight: 700;
  font-size: 0.85rem;
  user-select: none;
}
.settings-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.settings-switch-track {
  position: relative;
  width: 2.6rem;
  height: 1.5rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.5);
  transition: background var(--transition), border-color var(--transition);
}
.settings-switch-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: #fff;
  transition: transform var(--transition);
}
.settings-switch input:checked + .settings-switch-track {
  background: rgba(56, 189, 248, 0.35);
  border-color: rgba(56, 189, 248, 0.85);
}
.settings-switch input:checked + .settings-switch-track::after {
  transform: translateX(1.1rem);
}
.settings-switch-label {
  color: var(--text);
}
.settings-version {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}
.settings-version-label {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.settings-version-value {
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.01em;
  text-align: right;
}

.results-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}
.results-actions .btn { min-width: 200px; }
.btn-secondary {
  background: var(--surface);
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-secondary:hover { background: rgba(56, 189, 248, 0.1); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.5rem;
  border-radius: 0.75rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 25px -5px rgba(56, 189, 248, 0.3); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #818cf8);
  color: var(--bg);
}
.btn-primary:active { transform: translateY(0); }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover { background: rgba(56, 189, 248, 0.1); }
.btn-success {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
  border-color: transparent;
}
.btn-success:hover { background: linear-gradient(135deg, #15803d, #16a34a); }
.btn-option-active {
  background: rgba(56, 189, 248, 0.14);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.18);
}

/* Horizontal button groups: consistent spacing and responsive alignment */
.theme-actions,
.coach-actions,
.stats-actions,
.modal-actions,
.modal-actions-grid,
.modal-difficulty-row,
.home-search-actions {
  gap: 0.85rem;
}

/* Floating return notification from fiches to current quiz */
.quiz-return-notice {
  position: fixed;
  left: 50%;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 130;
  width: min(92vw, 24rem);
  padding: 0.55rem;
  border-radius: 0.9rem;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.34);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(8px);
}
.quiz-return-notice.hidden {
  display: none !important;
}
.quiz-return-notice .btn {
  width: 100%;
  min-width: 0;
}

@media (max-width: 640px) {
  .btn:not(.icon-btn) {
    width: min(100%, 24rem);
    min-width: 0;
    margin-inline: auto;
  }

  .fiches-filter-chips {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .fiches-filter-chip {
    width: min(100%, 24rem);
    text-align: center;
  }

  .theme-actions,
  .coach-actions,
  .stats-actions,
  .modal-actions,
  .modal-actions-grid,
  .modal-difficulty-row,
  .home-search-actions {
    justify-content: center;
  }
  .theme-actions .btn,
  .coach-actions .btn,
  .stats-actions .btn,
  .modal-actions .btn,
  .modal-actions-grid .btn,
  .modal-difficulty-row .btn,
  .home-search-actions .btn {
    width: min(100%, 18rem);
    min-width: min(100%, 18rem);
  }
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal.hidden { display: none !important; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% 10%, rgba(14, 116, 144, 0.26), transparent 46%), rgba(3, 8, 20, 0.68);
  backdrop-filter: blur(4px);
  cursor: pointer;
}
.modal .modal-content {
  position: relative;
  background: var(--surface);
  background: linear-gradient(165deg, color-mix(in srgb, var(--surface) 88%, #ffffff 12%), color-mix(in srgb, var(--surface) 96%, #000000 4%));
  border-radius: 1.1rem;
  padding: 1.35rem 1.35rem 1.1rem;
  max-width: 26rem;
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.24);
  box-shadow: 0 22px 60px rgba(2, 8, 23, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: modalSlideIn 0.2s ease-out;
}
.modal h2 {
  font-size: 1.18rem;
  margin-bottom: 0.45rem;
  letter-spacing: -0.01em;
}
.modal-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 1rem;
  line-height: 1.45;
}
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}
.modal-picker-content {
  max-width: 28rem;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, #ffffff 8%), var(--surface));
  color: var(--text);
}

/* ---- Force Update Modal ---- */
#modal-force-update {
  z-index: 9999;
}
.modal-force-update-content {
  text-align: center;
  padding: 2.5rem 2rem;
  max-width: 22rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.modal-force-update-icon {
  font-size: 3rem;
  line-height: 1;
}
.modal-force-update-content h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}
.modal-force-update-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}
/* ---- /Force Update Modal ---- */
.modal-picker-actions {
  max-height: min(55vh, 24rem);
  overflow-y: auto;
  align-content: flex-start;
  justify-content: stretch;
}
.modal-picker-actions .btn {
  width: 100%;
  min-height: 3rem;
}
.modal-option-group {
  width: 100%;
}
.modal-option-title {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.modal-actions-grid,
.modal-difficulty-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.modal-option-group--difficulty {
  padding-top: 0.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.modal-actions .btn {
  width: var(--modal-actions-button-width, auto);
  max-width: 100%;
}
.modal-close {
  position: absolute;
  top: 0.62rem;
  right: 0.62rem;
  width: 2.05rem;
  height: 2.05rem;
  border: none;
  background: rgba(15, 23, 42, 0.52);
  color: var(--text-muted);
  font-size: 1.35rem;
  cursor: pointer;
  border-radius: 999px;
  line-height: 1;
  border: 1px solid rgba(148, 163, 184, 0.25);
}
.modal-close:hover {
  color: var(--text);
  background: rgba(56, 189, 248, 0.22);
  border-color: rgba(56, 189, 248, 0.35);
}
[data-theme="light"] .modal-close {
  background: rgba(255, 255, 255, 0.8);
}
[data-theme="light"] .modal-close:hover {
  background: rgba(14, 165, 233, 0.18);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Glossaire : adapté à tous les petits écrans, pleine hauteur, scrollable */
#modal-glossaire {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  min-height: 100dvh;
  min-height: 100vh;
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
}
#modal-glossaire.hidden {
  display: none !important;
}
#modal-glossaire .modal-backdrop {
  display: none;
}
#modal-glossaire .modal-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin: 0;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
  max-width: none;
  width: 100%;
  height: 100%;
  max-height: 100dvh;
  max-height: 100vh;
  background: var(--bg);
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
[data-theme="light"] #modal-glossaire .modal-content {
  border: none;
}
#modal-glossaire .modal-close {
  position: fixed;
  top: max(0.75rem, env(safe-area-inset-top));
  right: 1rem;
  z-index: 2;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
[data-theme="light"] #modal-glossaire .modal-close {
  border-color: rgba(0, 0, 0, 0.1);
}
.modal-glossaire-content {
  flex: 1;
  min-height: 0;
  overflow-y: visible;
}
.modal-glossaire-content h2 {
  margin-right: 2.5rem;
  padding-right: 0.5rem;
}
.glossaire-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-bottom: 1rem;
}
.glossaire-item {
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.45;
  scroll-margin-top: 1rem;
  transform-origin: center;
  transition: background 0.2s;
}
.glossaire-item strong { color: var(--primary); }
@keyframes glossaireHighlight {
  0%   { background: rgba(34, 197, 94, 0.65); box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.9), 0 0 20px 6px rgba(34, 197, 94, 0.45); transform: translateX(-5px) scale(1.025); }
  4%   { transform: translateX(5px) scale(1.025); background: rgba(34, 197, 94, 0.2); }
  8%   { transform: translateX(-4px) scale(1.02); background: rgba(34, 197, 94, 0.65); }
  12%  { transform: translateX(4px) scale(1.02); background: rgba(34, 197, 94, 0.2); }
  16%  { transform: translateX(-3px) scale(1.015); background: rgba(34, 197, 94, 0.65); }
  20%  { transform: translateX(3px) scale(1.015); background: rgba(34, 197, 94, 0.2); }
  24%  { transform: translateX(-2px) scale(1.01); background: rgba(34, 197, 94, 0.55); }
  28%  { transform: translateX(0) scale(1); background: rgba(34, 197, 94, 0.2); }
  38%  { background: rgba(34, 197, 94, 0.5); box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.7); }
  50%  { background: rgba(34, 197, 94, 0.2); box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.4); }
  62%  { background: rgba(34, 197, 94, 0.4); box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.5); }
  75%  { background: rgba(34, 197, 94, 0.15); box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.2); }
  100% { background: rgba(0, 0, 0, 0.2); box-shadow: none; transform: translateX(0) scale(1); }
}
.glossaire-item--highlight {
  animation: glossaireHighlight 3s ease-out forwards;
}
@media (max-width: 480px) {
  .main {
    padding: 0.75rem;
  }
  .hero {
    margin-bottom: 1.5rem;
  }
  .category-card {
    padding: 1rem;
    min-height: 0;
  }
  .coach-header {
    flex-direction: column;
  }
  .coach-plan-header,
  .coach-plan-item,
  .results-next-header,
  .results-module-recap-header,
  .results-next-item,
  .results-module-item {
    flex-direction: column;
    align-items: stretch;
  }
  .coach-plan-badge,
  .coach-plan-btn,
  .coach-actions .btn,
  .results-next-btn,
  .results-next-badge,
  .results-module-meta {
    width: 100%;
  }
  .results-module-meta {
    min-width: 0;
    text-align: left;
  }
  .stats-plan-header,
  .stats-plan-item {
    flex-direction: column;
    align-items: stretch;
  }
  .stats-plan-badge,
  .stats-plan-btn {
    width: 100%;
  }
  .settings-row-split,
  .settings-version {
    flex-direction: column;
    align-items: flex-start;
  }
  .settings-switch {
    margin-top: 0.2rem;
  }
  .settings-time-input {
    width: 100%;
  }
  .settings-select {
    width: 100%;
  }
  .settings-number-input {
    width: 100%;
  }
  .settings-start-link {
    width: 100%;
  }
  .stats-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stats-overview-card,
  .stats-panel,
  .stats-plan-panel {
    padding: 0.9rem;
  }
  .stats-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .results-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #modal-glossaire .modal-content {
    padding: max(0.75rem, env(safe-area-inset-top)) 0.75rem max(0.75rem, env(safe-area-inset-bottom));
  }
  #modal-glossaire .modal-close {
    right: 0.75rem;
  }
}
@media (min-width: 769px) {
  #modal-glossaire {
    align-items: center;
    justify-content: center;
    padding: 1rem;
  }
  #modal-glossaire .modal-backdrop {
    display: block;
  }
  #modal-glossaire .modal-content {
    flex: none;
    max-width: 28rem;
    max-height: 85vh;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
  }
  [data-theme="light"] #modal-glossaire .modal-content {
    border-color: rgba(0, 0, 0, 0.08);
  }
  #modal-glossaire .modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: transparent;
    border: none;
  }
}

/* Modal À propos (description, explication, fonctionnement) */
#modal-onboarding.hidden { display: none !important; }
.modal-onboarding-content {
  max-width: 28rem;
}
.onboarding-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.35rem;
}
.onboarding-body {
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0.5rem 0 1rem;
}
.onboarding-dots {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  margin-bottom: 1rem;
}
.onboarding-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
}
.onboarding-dot.is-active {
  background: var(--primary);
  transform: scale(1.15);
}
.onboarding-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.onboarding-actions .btn { min-width: 7.5rem; }

#modal-a-propos.hidden { display: none !important; }
#modal-a-propos .modal-backdrop { display: none; }
#modal-a-propos .modal-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin: 0;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
  max-width: none;
  width: 100%;
  height: 100%;
  max-height: 100dvh;
  max-height: 100vh;
  background: var(--bg);
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
#modal-a-propos .modal-close {
  position: fixed;
  top: max(0.75rem, env(safe-area-inset-top));
  right: 1rem;
  z-index: 2;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
[data-theme="light"] #modal-a-propos .modal-close { border-color: rgba(0, 0, 0, 0.1); }
.modal-a-propos-content h2 { margin-right: 2.5rem; padding-right: 0.5rem; }
.a-propos-body { flex: 1; padding-bottom: 1rem; }
.a-propos-section { margin-top: 1.25rem; }
.a-propos-section:first-child { margin-top: 0.5rem; }
.a-propos-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 0.5rem;
}
.a-propos-section p,
.a-propos-section ul,
.a-propos-section ol {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text);
  margin: 0 0 0.5rem;
}
.a-propos-section ul,
.a-propos-section ol {
  padding-left: 1.25rem;
}
.a-propos-section li { margin-bottom: 0.35rem; }
.official-sources-list a {
  overflow-wrap: anywhere;
}
.a-propos-version {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted, rgba(255, 255, 255, 0.65));
}
[data-theme="light"] .a-propos-version { color: rgba(0, 0, 0, 0.55); }
.a-propos-section code {
  font-size: 0.85em;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
}
[data-theme="light"] .a-propos-section code { background: rgba(0, 0, 0, 0.06); }
@media (min-width: 769px) {
  #modal-a-propos { align-items: center; justify-content: center; padding: 1rem; }
  #modal-a-propos .modal-backdrop { display: block; }
  #modal-a-propos .modal-content {
    flex: none;
    max-width: 32rem;
    max-height: 85vh;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
  }
  [data-theme="light"] #modal-a-propos .modal-content { border-color: rgba(0, 0, 0, 0.08); }
  #modal-a-propos .modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: transparent;
    border: none;
  }
}

/* Toast */
/* Notification en haut pour ne pas gêner le bouton « Question suivante » */
.toast {
  position: fixed;
  top: 4rem;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  padding: 0.75rem 1.25rem;
  background: rgba(21, 128, 61, 0.92);
  border: 1px solid rgba(34, 197, 94, 0.55);
  border-radius: 0.75rem;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.25), var(--shadow);
  color: #f0fdf4;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1000;
  max-width: 90vw;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}
.toast--error {
  background: rgba(153, 27, 27, 0.92);
  border-color: rgba(239, 68, 68, 0.55);
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.25), var(--shadow);
  color: #fef2f2;
}
[data-theme="light"] .toast {
  background: rgba(22, 163, 74, 0.96);
  border-color: rgba(22, 163, 74, 0.6);
  color: #fff;
}
[data-theme="light"] .toast--error {
  background: rgba(220, 38, 38, 0.96);
  border-color: rgba(220, 38, 38, 0.6);
  color: #fff;
}

/* Pull-to-refresh (petits écrans) */
.pull-refresh-indicator {
  position: fixed;
  top: 3.5rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 1rem;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-muted);
  z-index: 999;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.pull-refresh-indicator.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-0.5rem);
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1rem;
  z-index: 90;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--primary);
  color: var(--bg);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: var(--shadow);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  opacity: 0;
  visibility: hidden;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}
.back-to-top:hover {
  transform: scale(1.05);
}
.back-to-top:active {
  transform: scale(0.98);
}
.back-to-top.hidden {
  display: none !important;
}
.back-to-top {
  bottom: max(1rem, env(safe-area-inset-bottom));
  right: max(1rem, env(safe-area-inset-right));
}

/* Bouton retour contextuel — rectangle fixe, haut collé au bas du header (top via JS) */
button#floating-return-pill.floating-return-pill {
  position: fixed;
  right: 0;
  z-index: 110;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: min(18rem, calc(100vw - 0.5rem));
  min-height: 2rem;
  padding: 0.45rem 0.85rem;
  margin: 0;
  border: none;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
  color: #f0fdf4;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35), 0 2px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: none;
  transform: translate3d(110%, 0, 0);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
button#floating-return-pill.floating-return-pill.is-hidden {
  visibility: hidden;
  pointer-events: none;
}
button#floating-return-pill.floating-return-pill.is-visible {
  visibility: visible;
  pointer-events: auto;
}
button#floating-return-pill.floating-return-pill:hover {
  filter: brightness(1.05);
}
button#floating-return-pill.floating-return-pill:active {
  filter: brightness(0.94);
}
button#floating-return-pill .floating-return-pill-icon {
  flex-shrink: 0;
  font-size: 0.95rem;
  line-height: 1;
}
button#floating-return-pill .floating-return-pill-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 480px) {
  button#floating-return-pill.floating-return-pill {
    max-width: min(15rem, calc(100vw - 0.35rem));
    padding: 0.4rem 0.7rem;
    font-size: 0.72rem;
  }
  button#floating-return-pill .floating-return-pill-icon {
    font-size: 0.88rem;
  }
}

/* Responsive : tout écran, tout support, tout navigateur */
@media (max-width: 480px) {
  html { font-size: 15px; }
  .header-inner,
  .main { padding-left: 0.75rem; padding-right: 0.75rem; }
  .hero h2 { font-size: 1.5rem; }
  .category-card,
  .question-block,
  .feedback { padding: 1rem; }
  .choice { padding: 0.875rem 1rem; min-height: 2.75rem; }
  .back-btn,
  .btn { min-height: 2.75rem; padding: 0.625rem 1rem; }
  .icon-btn { min-width: 2.75rem; min-height: 2.75rem; }
  /* Page Fiches – petits écrans */
  #screen-fiches .hero h2 { font-size: 1.35rem; }
  #screen-fiches .hero p { font-size: 0.9rem; }
  .fiche-accordion-header { padding: 0.875rem 1rem; }
  .fiche-accordion-title { font-size: 0.9rem; line-height: 1.35; }
  .fiche-accordion-inner { padding: 0.875rem 1rem 1rem; }
  .fiche-section-title { font-size: 0.875rem; }
  .fiche-section-body { font-size: 0.85rem; line-height: 1.5; }
  .fiche-section-body ul,
  .fiche-section-body ol { margin-left: 1rem; }
}
@media (max-width: 360px) {
  html { font-size: 14px; }
  .main { padding: 0.65rem; }
  .hero h2 { font-size: 1.35rem; }
  .stats-overview { grid-template-columns: 1fr; }
  .category-card h3,
  .question-block h3 { font-size: 1rem; }
  /* Page Fiches – très petits écrans */
  #screen-fiches .hero h2 { font-size: 1.2rem; }
  #screen-fiches .hero p { font-size: 0.85rem; }
  .fiche-accordion-title { font-size: 0.85rem; }
  .fiche-section-body { font-size: 0.8125rem; }
}
@media (pointer: fine) {
  .choice:hover:not(.disabled) { min-height: auto; }
  .category-card:hover { min-height: auto; }
}

/* Confetti placeholder (handled in JS) */
.confetti {
  position: fixed;
  pointer-events: none;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
}

/* ─── DEAS roadmap, Daily 5, badges ─── */
.daily-streak-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(251, 146, 60, 0.15);
  border: 1px solid rgba(251, 146, 60, 0.35);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}
.daily-streak-badge:empty { display: none; }
.theme-card-daily { border-color: rgba(59, 130, 246, 0.35); }

.home-new-modules-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 0 0 1rem;
}
.home-new-modules-row.hidden {
  display: none !important;
}
.home-module-spotlight {
  margin: 0;
  height: 100%;
}
#home-jeux-spotlight { order: -20; }
#home-qcm-spotlight { order: -19; }
#home-pharma-spotlight { order: 1; }
#home-pv-spotlight { order: 2; }
@media (min-width: 721px) {
  .home-new-modules-row.home-new-modules-row--odd > .home-module-spotlight--wide {
    grid-column: 1 / -1;
  }
}
@media (max-width: 720px) {
  .home-new-modules-row {
    grid-template-columns: 1fr;
  }
}

.home-spotlights {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0 0 1.25rem;
}
.home-spotlight-card {
  margin: 0;
  padding: 1rem 1.15rem;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
}
.home-spotlight-card--daily5 {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.16), rgba(251, 191, 36, 0.1));
  border: 1px solid rgba(59, 130, 246, 0.32);
}
.home-spotlight-card--daily5.home-spotlight-card--done {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(59, 130, 246, 0.08));
  border-color: rgba(16, 185, 129, 0.35);
}
.home-spotlight-card--situations {
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.18), rgba(14, 116, 144, 0.14));
  border: 1px solid rgba(167, 139, 250, 0.42);
}
.home-spotlight-card--situations .home-spotlight-card-desc {
  color: rgba(221, 214, 254, 0.92);
}
[data-theme="light"] .home-spotlight-card--situations {
  background: linear-gradient(135deg, rgba(237, 233, 254, 0.82), rgba(224, 242, 254, 0.82));
  border-color: rgba(109, 40, 217, 0.3);
}
[data-theme="light"] .home-spotlight-card--situations .home-spotlight-card-desc { color: #5b21b6; }
.home-spotlight-card--deas {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(99, 102, 241, 0.12));
  border: 1px solid rgba(16, 185, 129, 0.38);
}
.home-spotlight-card--deas.home-spotlight-card--done {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(16, 185, 129, 0.1));
  border-color: rgba(251, 191, 36, 0.4);
}
.home-spotlight-card-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}
.home-spotlight-card-copy {
  flex: 1 1 16rem;
  min-width: 0;
}
.home-spotlight-card-copy h3 {
  margin: 0.15rem 0 0.45rem;
  font-size: 1.25rem;
}
.home-spotlight-card-desc {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  opacity: 0.92;
}
.home-spotlight-card--deas .home-spotlight-card-desc {
  margin-bottom: 0.65rem;
}
.home-spotlight-card-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
  flex-shrink: 0;
}
.home-spotlight-card-actions .btn {
  min-width: 11.5rem;
}
.home-deas-roadmap-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 22rem;
}
.home-deas-roadmap-progress-bar {
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.12);
  overflow: hidden;
}
.home-deas-roadmap-progress-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #10b981, #6366f1);
  transition: width 0.35s ease;
}
.home-deas-roadmap-progress-text {
  font-size: 0.82rem;
  opacity: 0.85;
}

.home-feature-alert {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.14), rgba(59, 130, 246, 0.1));
  border: 1px solid rgba(251, 191, 36, 0.35);
}
.home-feature-alert.hidden { display: none !important; }
.home-feature-alert-body { flex: 1; min-width: 0; }
.home-feature-alert-badge {
  display: inline-block;
  margin-bottom: 0.35rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.25);
  border: 1px solid rgba(251, 191, 36, 0.45);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.home-feature-alert-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
}
.home-feature-alert-text {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
  line-height: 1.45;
  opacity: 0.92;
}
.home-feature-alert-link {
  display: inline-block;
  text-decoration: none;
  color: inherit;
}
.home-feature-alert-link .count {
  font-weight: 600;
  color: var(--accent, #38bdf8);
}
.home-feature-alert-link:hover .count {
  text-decoration: underline;
}
.home-feature-alert-dismiss {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border: none;
  background: transparent;
  color: var(--text-muted, rgba(148, 163, 184, 0.9));
  font-size: 1.35rem;
  cursor: pointer;
  border-radius: 50%;
  line-height: 1;
  transition: background 0.15s ease;
}
.home-feature-alert-dismiss:hover {
  background: rgba(148, 163, 184, 0.15);
}

.badges-strip {
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 14px;
  background: var(--card-bg, rgba(15, 23, 42, 0.4));
  border: 1px solid var(--border, rgba(148, 163, 184, 0.2));
}
.badges-strip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.badges-strip-header h3 { margin: 0; font-size: 1rem; }
.badges-count { font-size: 0.85rem; opacity: 0.75; }
.badges-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
  font-size: 0.82rem;
}
.badge-chip[title] { cursor: help; }

.deas-roadmap-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.deas-roadmap-summary-card {
  padding: 0.85rem;
  border-radius: 12px;
  background: var(--card-bg, rgba(15, 23, 42, 0.4));
  border: 1px solid var(--border, rgba(148, 163, 184, 0.2));
  text-align: center;
}
.deas-roadmap-summary-card strong { display: block; font-size: 1.35rem; }
.deas-roadmap-summary-card--action {
  width: 100%;
  cursor: pointer;
  color: inherit;
  font: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.deas-roadmap-summary-card--action:hover {
  border-color: rgba(56, 189, 248, 0.45);
  transform: translateY(-1px);
}
.deas-roadmap-steps {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.deas-roadmap-step {
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid var(--border, rgba(148, 163, 184, 0.2));
  background: var(--card-bg, rgba(15, 23, 42, 0.35));
}
.deas-roadmap-step.is-complete { border-color: rgba(16, 185, 129, 0.45); }
.deas-roadmap-step.is-next {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.25);
}
.deas-roadmap-next-label {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--primary);
}
.deas-roadmap-timeline {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 0.5rem 0 1rem;
  margin-bottom: 0.25rem;
}
.deas-timeline-node {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  min-width: 3.2rem;
  font-size: 0.72rem;
  opacity: 0.55;
}
.deas-timeline-node.is-done { opacity: 1; }
.deas-timeline-dot {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  border: 2px solid rgba(148, 163, 184, 0.5);
  background: transparent;
}
.deas-timeline-node.is-done .deas-timeline-dot {
  background: rgba(16, 185, 129, 0.85);
  border-color: rgba(16, 185, 129, 0.85);
}
.deas-roadmap-pipeline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.35rem;
  margin: 0.5rem 0 0.65rem;
  font-size: 0.82rem;
}
.deas-pipe-step {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
}
.deas-pipe-icon {
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}
.deas-pipe-label {
  font-weight: 600;
}
.deas-pipe-step.is-done {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
}
.deas-pipe-arrow { display: none; }
.deas-roadmap-intro {
  max-width: 42rem;
  margin: 0 auto 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  font-size: 0.88rem;
  line-height: 1.55;
}
.deas-roadmap-intro p {
  margin: 0.25rem 0;
}
.deas-roadmap-module-full {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.35;
}
.deas-roadmap-step-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.deas-roadmap-step-header h3 { margin: 0; font-size: 1rem; }
.deas-roadmap-bloc {
  font-size: 0.75rem;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.deas-roadmap-mastery {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}
.deas-roadmap-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}
.deas-roadmap-actions .btn-sm { padding: 0.35rem 0.65rem; font-size: 0.82rem; }

.branching-context {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.08);
  border-left: 3px solid rgba(59, 130, 246, 0.5);
  font-size: 0.95rem;
  line-height: 1.5;
}
.branching-ending {
  padding: 1rem;
  border-radius: 14px;
  margin-top: 1rem;
}
.branching-ending.is-good { background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.35); }
.branching-ending.is-bad { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3); }
.branching-ending h4 { margin: 0 0 0.5rem; }
.branching-ending ul { margin: 0.5rem 0 0; padding-left: 1.2rem; }

.badges-screen-summary {
  text-align: center;
  margin: 0 0 1rem;
  font-size: 0.95rem;
  opacity: 0.85;
}
.badges-screen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.badge-card {
  padding: 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.35);
  text-align: center;
  opacity: 0.55;
}
.badge-card.is-earned {
  opacity: 1;
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.08);
}
.badge-card-emoji { font-size: 1.75rem; display: block; margin-bottom: 0.35rem; }
.badge-card-title { font-size: 0.88rem; font-weight: 700; margin: 0 0 0.25rem; }
.badge-card-desc { font-size: 0.75rem; opacity: 0.85; margin: 0; line-height: 1.35; }

.results-deas-debrief {
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.08);
  text-align: left;
}
.results-deas-debrief.hidden { display: none !important; }
.results-deas-debrief-header h3 { margin: 0.15rem 0 0.5rem; font-size: 1rem; }
.results-deas-debrief-summary { margin: 0 0 0.75rem; font-size: 0.95rem; }
.results-deas-debrief-buckets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.deas-bucket-card {
  padding: 0.65rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.2);
  text-align: center;
}
.deas-bucket-card.is-pass { border-color: rgba(16, 185, 129, 0.4); }
.deas-bucket-card.is-fail { border-color: rgba(239, 68, 68, 0.35); }
.deas-bucket-label { display: block; font-size: 0.72rem; opacity: 0.8; margin-bottom: 0.2rem; }
.deas-bucket-pct { font-size: 1.1rem; font-weight: 700; }
.deas-bucket-detail { display: block; font-size: 0.72rem; opacity: 0.75; margin-top: 0.15rem; }
.results-deas-debrief-reco { margin: 0; font-size: 0.9rem; font-style: italic; opacity: 0.9; }

/* Pharmacologie hub */
.theme-card-pharmacologie {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(59, 130, 246, 0.12));
  border-color: rgba(16, 185, 129, 0.35);
}
.theme-card-coeur {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.18), rgba(249, 115, 22, 0.12));
  border-color: rgba(244, 63, 94, 0.34);
}
.theme-card-coeur h3,
.theme-card-coeur .count { color: #fecdd3; }
.theme-card-coeur p { color: rgba(255, 228, 230, 0.92); }
.theme-card-coeur:hover {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.26), rgba(249, 115, 22, 0.2));
}
[data-theme="light"] .theme-card-coeur,
[data-theme="light"] .theme-card-coeur h3,
[data-theme="light"] .theme-card-coeur .count { color: #be123c; }
[data-theme="light"] .theme-card-coeur p { color: #9f1239; }
#screen-pharmacologie-hub {
  padding-top: 0.25rem;
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
}
.pharma-hub-hero {
  margin-bottom: 1.35rem;
  text-align: center;
}
.pharma-hub-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
  text-align: center;
  width: 100%;
}
.pharma-hub-title-line {
  display: block;
  width: 100%;
  text-align: center;
  font-size: clamp(1.55rem, 4.5vw, 2rem);
  font-weight: 700;
  line-height: 1.15;
}
.pharma-hub-title-sub {
  font-size: clamp(1.15rem, 3.5vw, 1.5rem);
  font-weight: 600;
  color: var(--text);
  opacity: 0.92;
  max-width: none;
}
.pharma-hub-lead {
  margin: 0 auto;
  max-width: 32rem;
  color: var(--text-muted);
  font-size: clamp(0.88rem, 2.5vw, 0.95rem);
  line-height: 1.5;
  text-align: center;
}
.pharma-hub-panel {
  position: relative;
  margin: 0 0 1.5rem;
  padding: 1.25rem 1.2rem 1.2rem;
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(16, 185, 129, 0.14) 0%, rgba(14, 165, 233, 0.08) 45%, rgba(15, 23, 42, 0.35) 100%);
  border: 1px solid rgba(16, 185, 129, 0.28);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.pharma-hub-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -20%, rgba(16, 185, 129, 0.18), transparent 70%);
  pointer-events: none;
}
.pharma-hub-panel-head,
.pharma-hub-panel-body {
  position: relative;
  z-index: 1;
}
.pharma-hub-panel-head {
  text-align: center;
  margin-bottom: 1.1rem;
}
.pharma-hub-panel-badge {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6ee7b7;
}
.pharma-hub-panel-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.05rem, 2.8vw, 1.2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.pharma-hub-panel-lead {
  margin: 0 auto;
  max-width: 28rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-muted);
}
.pharma-hub-rules {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}
.pharma-hub-rule {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.88rem;
  line-height: 1.45;
}
.pharma-hub-rule-num {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.35), rgba(14, 165, 233, 0.25));
  border: 1px solid rgba(16, 185, 129, 0.45);
  font-size: 0.78rem;
  font-weight: 800;
  color: #a7f3d0;
}
.pharma-hub-rule-text {
  flex: 1;
  min-width: 0;
}
.pharma-hub-panel-divider {
  height: 1px;
  margin: 1.1rem 0;
  background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.45), transparent);
}
.pharma-hub-role-block {
  text-align: center;
}
.pharma-hub-role-title {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.pharma-hub-role-tags {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
}
.pharma-hub-role-tags li {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  line-height: 1.3;
  background: rgba(15, 23, 42, 0.32);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: var(--text);
}
.pharmacologie-hub-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}
@media (min-width: 540px) {
  .pharmacologie-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}
@media (min-width: 900px) {
  .pharmacologie-hub-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
  }
  .pharma-hub-panel {
    padding: 1.5rem 1.65rem 1.4rem;
  }
  .pharma-hub-rules {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }
  .pharma-hub-rule:last-child {
    grid-column: 1 / -1;
  }
}
.pharma-hub-module-card {
  min-height: 100%;
  height: 100%;
}
.pharma-hub-module-card .pharma-hub-icon {
  display: block;
  font-size: 1.75rem;
  line-height: 1;
  margin-bottom: 0.45rem;
}
.pharma-hub-module-card h3 {
  font-size: clamp(1rem, 2.5vw, 1.1rem);
}
.pharma-hub-module-card p {
  flex: 1;
}
@media (max-width: 479px) {
  #screen-pharmacologie-hub .pharma-hub-hero {
    margin-bottom: 1rem;
  }
  #screen-pharmacologie-hub .hero-badge {
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
  }
  .pharma-hub-panel {
    padding: 1rem 0.95rem;
    margin-bottom: 1.15rem;
  }
  .pharma-hub-rule {
    padding: 0.65rem 0.75rem;
    font-size: 0.84rem;
  }
  .pharma-hub-role-tags li {
    font-size: 0.76rem;
    padding: 0.35rem 0.65rem;
  }
}
@media (max-width: 360px) {
  .pharma-hub-title-line {
    font-size: 1.4rem;
  }
  .pharma-hub-title-sub {
    font-size: 1.08rem;
  }
  .pharma-hub-lead {
    font-size: 0.84rem;
  }
}
[data-theme="light"] .pharma-hub-panel {
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.1) 0%, rgba(14, 165, 233, 0.06) 50%, rgba(255, 255, 255, 0.92) 100%);
  border-color: rgba(16, 185, 129, 0.22);
  box-shadow: 0 4px 20px rgba(14, 116, 144, 0.08);
}
[data-theme="light"] .pharma-hub-panel-badge {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
}
[data-theme="light"] .pharma-hub-rule {
  background: rgba(255, 255, 255, 0.75);
  border-color: rgba(14, 116, 144, 0.12);
}
[data-theme="light"] .pharma-hub-rule-num {
  color: #047857;
  background: rgba(16, 185, 129, 0.15);
}
[data-theme="light"] .pharma-hub-role-tags li {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(14, 116, 144, 0.15);
}

/* Paramètres vitaux hub */
.theme-card-parametres-vitaux {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.12), rgba(99, 102, 241, 0.12));
  border-color: rgba(6, 182, 212, 0.35);
}

#screen-coeur-hub {
  padding-top: 0.25rem;
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
}

.coeur-hub-hero {
  margin-bottom: 1.35rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.16), rgba(249, 115, 22, 0.12));
  border-color: rgba(244, 63, 94, 0.25);
}

.theme-card-prelevement {
  background: linear-gradient(150deg, rgba(20, 184, 166, 0.24), rgba(8, 145, 178, 0.18));
  border-color: rgba(45, 212, 191, 0.36);
}

.theme-card-prelevement h3,
.theme-card-prelevement .count { color: #67e8f9; }

.theme-card-prelevement p { color: rgba(207, 250, 254, 0.9); }

.theme-card-prelevement:hover {
  background: linear-gradient(150deg, rgba(20, 184, 166, 0.34), rgba(8, 145, 178, 0.24));
}

[data-theme="light"] .theme-card-prelevement,
[data-theme="light"] .theme-card-prelevement h3,
[data-theme="light"] .theme-card-prelevement .count { color: #0e7490; }

[data-theme="light"] .theme-card-prelevement p { color: #155e75; }

.theme-card-jeu-deas {
  background: linear-gradient(150deg, rgba(14, 165, 233, 0.2), rgba(22, 163, 74, 0.15));
  border-color: rgba(125, 211, 252, 0.34);
}

.theme-card-jeu-deas h3,
.theme-card-jeu-deas .count { color: #93c5fd; }

.theme-card-jeu-deas p { color: rgba(219, 234, 254, 0.9); }

.theme-card-jeu-deas:hover {
  background: linear-gradient(150deg, rgba(14, 165, 233, 0.3), rgba(22, 163, 74, 0.22));
}

[data-theme="light"] .theme-card-jeu-deas,
[data-theme="light"] .theme-card-jeu-deas h3,
[data-theme="light"] .theme-card-jeu-deas .count { color: #0369a1; }

[data-theme="light"] .theme-card-jeu-deas p { color: #075985; }

.theme-card-recent-qcm {
  background: linear-gradient(150deg, rgba(34, 197, 94, 0.2), rgba(14, 165, 233, 0.14));
  border-color: rgba(74, 222, 128, 0.34);
}

.theme-card-recent-qcm h3,
.theme-card-recent-qcm .count { color: #86efac; }

.theme-card-recent-qcm p { color: rgba(220, 252, 231, 0.9); }

.theme-card-recent-qcm:hover {
  background: linear-gradient(150deg, rgba(34, 197, 94, 0.3), rgba(14, 165, 233, 0.22));
}

[data-theme="light"] .theme-card-recent-qcm,
[data-theme="light"] .theme-card-recent-qcm h3,
[data-theme="light"] .theme-card-recent-qcm .count { color: #15803d; }

[data-theme="light"] .theme-card-recent-qcm p { color: #166534; }

#screen-jeux-hub,
#screen-nouveaux-qcm-hub {
  padding-top: 0.25rem;
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
}

.jeux-hub-hero {
  margin-bottom: 1.35rem;
  text-align: center;
}

.jeux-hub-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  margin: 0 0 0.65rem;
  text-align: center;
  width: 100%;
}

.jeux-hub-title-line {
  display: block;
  width: 100%;
}

.jeux-hub-title-sub {
  font-size: clamp(1.35rem, 5vw, 2.4rem);
  color: var(--primary);
}

.jeux-hub-lead {
  max-width: 44rem;
  margin-left: auto;
  margin-right: auto;
}

.jeux-hub-panel {
  margin: 0 0 1.35rem;
  padding: 1rem;
  border: 1px solid rgba(45, 212, 191, 0.24);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.12), rgba(14, 165, 233, 0.1));
}

.jeux-hub-panel-head {
  margin-bottom: 0.85rem;
}

.jeux-hub-panel-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.14);
  border: 1px solid rgba(45, 212, 191, 0.28);
  color: #99f6e4;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.jeux-hub-panel-title {
  margin: 0.45rem 0 0.35rem;
}

.jeux-hub-panel-lead {
  margin: 0;
  color: var(--text-muted);
}

.jeux-hub-rules {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.jeux-hub-rule {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.75rem;
  border-radius: calc(var(--radius) - 2px);
  background: rgba(15, 23, 42, 0.28);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.jeux-hub-rule-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.16);
  color: #99f6e4;
  font-weight: 800;
  font-size: 0.78rem;
}

.jeux-hub-rule-text {
  font-size: 0.9rem;
  line-height: 1.35;
}

.jeux-hub-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.1rem;
}

@media (min-width: 540px) {
  .jeux-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .jeux-hub-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
  }

  .jeux-hub-panel {
    padding: 1.5rem 1.65rem 1.4rem;
  }

  .jeux-hub-rules {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.jeux-hub-module-card {
  min-height: 100%;
}

.module-hub-type-badge {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 0.45rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.34);
  color: #fde68a;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.jeux-hub-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 0.55rem;
  border-radius: 0.75rem;
  background: rgba(45, 212, 191, 0.16);
  border: 1px solid rgba(45, 212, 191, 0.28);
  font-size: 1.25rem;
}

[data-theme="light"] .jeux-hub-panel {
  border-color: rgba(13, 148, 136, 0.22);
  background: linear-gradient(135deg, rgba(240, 253, 250, 0.8), rgba(240, 249, 255, 0.82));
}

[data-theme="light"] .jeux-hub-panel-badge,
[data-theme="light"] .jeux-hub-rule-num {
  color: #0f766e;
}

[data-theme="light"] .module-hub-type-badge {
  background: rgba(254, 243, 199, 0.78);
  border-color: rgba(217, 119, 6, 0.28);
  color: #92400e;
}

[data-theme="light"] .jeux-hub-rule {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(13, 148, 136, 0.16);
}
#screen-parametres-vitaux-hub {
  padding-top: 0.25rem;
  max-width: 72rem;
  margin-left: auto;
  margin-right: auto;
}
.pv-hub-hero {
  margin-bottom: 1.35rem;
  text-align: center;
}
.pv-hub-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  margin: 0 0 0.65rem;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  line-height: 1.15;
}
.pv-hub-title-line { display: block; }
.pv-hub-title-sub {
  font-size: clamp(1rem, 3vw, 1.25rem);
  font-weight: 600;
  opacity: 0.88;
}
.pv-hub-lead {
  max-width: 38rem;
  margin: 0 auto;
  font-size: 0.92rem;
  line-height: 1.45;
  opacity: 0.88;
}
.pv-hub-panel {
  position: relative;
  overflow: hidden;
  margin-bottom: 1.35rem;
  padding: 1.15rem 1.2rem 1.1rem;
  border-radius: 14px;
  border: 1px solid rgba(6, 182, 212, 0.22);
  background: linear-gradient(145deg, rgba(6, 182, 212, 0.08), rgba(99, 102, 241, 0.06));
}
.pv-hub-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(6, 182, 212, 0.12), transparent 55%);
  pointer-events: none;
}
.pv-hub-panel-head,
.pv-hub-panel-body { position: relative; z-index: 1; }
.pv-hub-panel-head { margin-bottom: 0.85rem; }
.pv-hub-panel-badge {
  display: inline-block;
  margin-bottom: 0.45rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(6, 182, 212, 0.18);
  color: #0e7490;
}
.pv-hub-panel-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}
.pv-hub-panel-lead {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.4;
  opacity: 0.85;
}
.pv-hub-quote {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-left: 4px solid rgba(6, 182, 212, 0.65);
  border-radius: 0 10px 10px 0;
  background: rgba(15, 23, 42, 0.22);
}
.pv-hub-quote p { margin: 0 0 0.35rem; font-size: 0.9rem; line-height: 1.45; }
.pv-hub-quote p:last-child { margin-bottom: 0; }
.pv-hub-rules {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pv-hub-rule {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.28);
  border: 1px solid rgba(148, 163, 184, 0.12);
}
.pv-hub-rule-num {
  flex-shrink: 0;
  width: 1.55rem;
  height: 1.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(6, 182, 212, 0.25);
  color: #67e8f9;
}
.pv-hub-rule-text { font-size: 0.84rem; line-height: 1.4; }
.pv-hub-panel-divider {
  height: 1px;
  margin: 1rem 0 0.85rem;
  background: rgba(148, 163, 184, 0.18);
}
.pv-hub-role-block { margin: 0; }
.pv-hub-role-title {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  opacity: 0.8;
}
.pv-hub-role-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pv-hub-role-tags li {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  line-height: 1.3;
  background: rgba(15, 23, 42, 0.32);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: var(--text);
}
.parametres-vitaux-hub-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}
@media (min-width: 540px) {
  .parametres-vitaux-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}
@media (min-width: 900px) {
  .parametres-vitaux-hub-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
  }
  .pv-hub-panel { padding: 1.5rem 1.65rem 1.4rem; }
  .pv-hub-rules {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }
  .pv-hub-rule:last-child { grid-column: 1 / -1; }
}
.pv-hub-module-card {
  min-height: 100%;
  height: 100%;
}
.pv-hub-module-card .pv-hub-icon {
  display: block;
  font-size: 1.75rem;
  line-height: 1;
  margin-bottom: 0.45rem;
}
.pv-hub-module-card h3 { font-size: clamp(1rem, 2.5vw, 1.1rem); }
.pv-hub-module-card p { flex: 1; }
[data-theme="light"] .pv-hub-quote { background: rgba(255, 255, 255, 0.75); }
[data-theme="light"] .pv-hub-rule { background: rgba(255, 255, 255, 0.65); }
[data-theme="light"] .pv-hub-role-tags li {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(6, 182, 212, 0.15);
}

/* Accueil professionnel */
#screen-home {
  --home-primary: #5dc9c6;
  --home-primary-strong: #79d8d4;
  --home-primary-soft: rgba(23, 107, 120, 0.18);
  --home-surface: #17252d;
  --home-surface-raised: #1c2d36;
  --home-border: rgba(148, 183, 190, 0.2);
  --home-border-strong: rgba(93, 201, 198, 0.42);
  --home-muted: #a8bac0;
  --home-shadow: 0 10px 30px rgba(2, 12, 18, 0.18);
  padding-bottom: clamp(1rem, 4vw, 2.5rem);
}

[data-theme="light"] #screen-home {
  --home-primary: #176b78;
  --home-primary-strong: #125762;
  --home-primary-soft: #eaf5f6;
  --home-surface: #ffffff;
  --home-surface-raised: #ffffff;
  --home-border: #dfe7e9;
  --home-border-strong: rgba(23, 107, 120, 0.36);
  --home-muted: #5d6b72;
  --home-shadow: 0 8px 24px rgba(23, 32, 42, 0.07);
}

[data-palette="blue"] #screen-home {
  --home-primary: #38bdf8;
  --home-primary-strong: #7dd3fc;
  --home-primary-soft: rgba(56, 189, 248, 0.14);
  --home-surface: #1e293b;
  --home-surface-raised: #263449;
  --home-border: rgba(148, 163, 184, 0.2);
  --home-border-strong: rgba(56, 189, 248, 0.42);
  --home-muted: #94a3b8;
  --home-shadow: 0 10px 30px rgba(2, 6, 23, 0.22);
}

[data-theme="light"][data-palette="blue"] #screen-home {
  --home-primary: #0ea5e9;
  --home-primary-strong: #0284c7;
  --home-primary-soft: rgba(14, 165, 233, 0.12);
  --home-surface: #ffffff;
  --home-surface-raised: #ffffff;
  --home-border: rgba(15, 23, 42, 0.1);
  --home-border-strong: rgba(14, 165, 233, 0.38);
  --home-muted: #475569;
  --home-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

#screen-home .home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(19rem, 0.9fr);
  gap: clamp(1.5rem, 5vw, 3rem);
  align-items: center;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  padding: clamp(2rem, 7vw, 4.5rem) clamp(1.25rem, 5vw, 3.5rem);
  border: 1px solid var(--home-border-strong);
  border-radius: clamp(1.1rem, 3vw, 1.6rem);
  background:
    radial-gradient(circle at 72% 16%, color-mix(in srgb, var(--home-primary) 26%, transparent), transparent 22rem),
    radial-gradient(circle at 8% 80%, rgba(129, 140, 248, 0.16), transparent 18rem),
    linear-gradient(145deg, color-mix(in srgb, var(--home-surface) 92%, #ffffff 8%), color-mix(in srgb, var(--bg) 88%, #000000 12%));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28), var(--home-shadow);
  text-align: left;
  overflow: hidden;
}

#screen-home .home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent, color-mix(in srgb, var(--home-primary) 14%, transparent), transparent);
  opacity: 0.38;
  pointer-events: none;
}

#screen-home .home-hero-copy,
#screen-home .home-hero-preview {
  position: relative;
  z-index: 1;
}

#screen-home .home-eyebrow,
#screen-home .home-section-kicker {
  margin: 0 0 0.55rem;
  color: var(--home-primary);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#screen-home .home-hero h2 {
  max-width: 14ch;
  margin: 0;
  font-size: 3.6rem;
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1.04;
  text-wrap: balance;
}

#screen-home .home-hero h2::first-line {
  color: var(--text);
}

#screen-home .home-hero-lead {
  max-width: 38rem;
  margin: 1rem 0 0;
  color: var(--home-muted);
  font-size: 1.1rem;
  line-height: 1.65;
}

#screen-home .home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

#screen-home .home-hero-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 1.8rem 0 0;
}

#screen-home .home-hero-proof div {
  min-width: 0;
  padding-left: 0.85rem;
  border-left: 1px solid var(--home-border-strong);
}

#screen-home .home-hero-proof dt {
  color: var(--text);
  font-weight: 800;
  font-size: 0.92rem;
}

#screen-home .home-hero-proof dd {
  margin: 0.2rem 0 0;
  color: var(--home-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

#screen-home .home-hero-preview {
  display: grid;
  gap: 0.9rem;
}

#screen-home .home-preview-card {
  padding: clamp(1rem, 3vw, 1.35rem);
  border: 1px solid var(--home-border-strong);
  border-radius: 1rem;
  background:
    linear-gradient(150deg, color-mix(in srgb, var(--bg) 76%, transparent), color-mix(in srgb, var(--home-surface-raised) 86%, transparent)),
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--home-primary) 18%, transparent), transparent 12rem);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

#screen-home .home-preview-header,
#screen-home .home-preview-footer,
#screen-home .home-preview-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

#screen-home .home-preview-kicker {
  color: var(--text);
  font-weight: 850;
}

#screen-home .home-preview-level {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: var(--home-primary-soft);
  color: var(--home-primary);
  font-size: 0.76rem;
  font-weight: 800;
}

#screen-home .home-preview-question {
  margin: 1.1rem 0 0.8rem;
  color: var(--text);
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.35;
}

#screen-home .home-preview-answers {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

#screen-home .home-preview-answers li {
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--home-border);
  border-radius: 0.65rem;
  color: var(--home-muted);
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  font-size: 0.86rem;
}

#screen-home .home-preview-answers .is-correct {
  border-color: rgba(74, 222, 128, 0.5);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.76), rgba(16, 185, 129, 0.58));
  color: #ffffff;
  font-weight: 800;
}

#screen-home .home-preview-footer {
  margin-top: 1rem;
  color: var(--home-muted);
  font-size: 0.78rem;
}

#screen-home .home-preview-points {
  color: var(--home-primary);
  font-weight: 850;
}

#screen-home .home-preview-progress {
  height: 0.35rem;
  margin-top: 0.65rem;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--home-muted) 14%, transparent);
}

#screen-home .home-preview-progress span {
  display: block;
  width: 60%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--home-primary), var(--home-primary-strong));
}

#screen-home .home-preview-stats {
  padding: 0.85rem 1rem;
  border: 1px solid var(--home-border);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--home-surface-raised) 76%, transparent);
}

#screen-home .home-preview-stats div {
  min-width: 0;
  text-align: center;
}

#screen-home .home-preview-stats strong,
#screen-home .home-preview-stats span {
  display: block;
}

#screen-home .home-preview-stats strong {
  color: var(--home-primary);
  font-size: 1.3rem;
}

#screen-home .home-preview-stats span {
  margin-top: 0.2rem;
  color: var(--home-muted);
  font-size: 0.72rem;
}

#screen-home .home-hero-actions .btn {
  min-height: 3rem;
  text-decoration: none;
}

#screen-home .btn-primary {
  background: var(--home-primary);
  color: #061316;
  box-shadow: none;
}

#screen-home .btn-primary:hover {
  background: var(--home-primary-strong);
  box-shadow: 0 7px 18px rgba(23, 107, 120, 0.22);
}

[data-theme="light"] #screen-home .btn-primary {
  color: #ffffff;
}

#screen-home .btn-outline {
  border: 1px solid var(--home-border-strong);
  background: transparent;
  color: var(--home-primary);
}

#screen-home .btn-outline:hover {
  background: var(--home-primary-soft);
  box-shadow: none;
}

#screen-home .home-search-section,
#screen-home .home-section {
  margin-top: clamp(2.5rem, 7vw, 4.5rem);
}

#screen-home #home-free-section + .home-search-section {
  margin-top: clamp(3rem, 8vw, 5rem);
}

#screen-home .home-search-section {
  margin-top: 0;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid var(--home-border);
  border-radius: 1rem;
  background: var(--home-surface);
}

#screen-home #home-free-section + .home-search-section {
  margin-top: clamp(3rem, 8vw, 5rem);
}

#screen-home .home-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: 1.1rem;
}

#screen-home .home-section-header--compact {
  margin-bottom: 0.85rem;
}

#screen-home .home-section-header h2 {
  margin: 0;
  font-size: 1.85rem;
  letter-spacing: 0;
  line-height: 1.15;
}

#screen-home .home-section-header > p {
  max-width: 31rem;
  margin: 0;
  color: var(--home-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  text-align: right;
}

#screen-home .home-unified-search-wrap {
  margin: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
}

#screen-home .home-unified-search-wrap::after {
  display: none;
}

#screen-home .home-unified-search-wrap .search-label {
  color: var(--home-muted);
}

#screen-home .home-unified-search-wrap .search-input {
  min-height: 3.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--home-border);
  border-radius: 0.8rem;
  background: var(--bg);
}

[data-theme="light"] #screen-home .home-unified-search-wrap .search-input {
  background: #f7f9fa;
}

#screen-home .home-unified-search-wrap .search-input:focus {
  border-color: var(--home-primary);
  box-shadow: 0 0 0 3px var(--home-primary-soft);
}

#screen-home .home-unified-search-wrap .search-hint {
  margin-top: 0.55rem;
  color: var(--home-muted);
  line-height: 1.45;
}

#screen-home .home-unified-search-wrap .search-glossaire-result {
  border: 1px solid var(--home-border);
  border-left: 3px solid var(--home-primary);
  background: var(--home-surface-raised);
}

#screen-home .home-today-grid,
#screen-home .home-training-grid,
#screen-home .home-theme-hub,
#screen-home .home-new-modules-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr));
  gap: 1rem;
}

#screen-home .home-spotlight-card {
  min-width: 0;
  margin: 0;
  padding: clamp(1.1rem, 3vw, 1.4rem);
  border: 1px solid var(--home-border);
  border-radius: 1rem;
  background: var(--home-surface);
  box-shadow: var(--home-shadow);
}

#screen-home .home-spotlight-card--daily5 {
  border-color: var(--home-border-strong);
  background: var(--home-surface);
}

#screen-home .home-spotlight-card--daily5.home-spotlight-card--done,
#screen-home .home-spotlight-card--deas.home-spotlight-card--done {
  border-color: rgba(22, 163, 74, 0.48);
  background: var(--home-surface);
}

#screen-home .home-spotlight-card--deas {
  border-color: var(--home-border);
  background: var(--home-surface);
}

#screen-home .home-spotlight-card-inner {
  height: 100%;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
}

#screen-home .home-card-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

#screen-home .home-spotlight-card-copy {
  flex: 1;
}

#screen-home .home-spotlight-card-copy h3 {
  margin: 0.15rem 0 0.55rem;
  font-size: 1.22rem;
  letter-spacing: 0;
}

#screen-home .coach-eyebrow {
  color: var(--home-primary);
}

#screen-home .home-spotlight-card-desc {
  color: var(--home-muted);
  font-size: 0.9rem;
  line-height: 1.55;
  opacity: 1;
}

#screen-home .home-spotlight-card-actions {
  width: 100%;
  align-items: stretch;
  margin-top: auto;
}

#screen-home .home-spotlight-card-actions .btn {
  width: 100%;
  min-width: 0;
}

#screen-home .daily-streak-badge {
  padding: 0.25rem 0.5rem;
  border-color: rgba(217, 119, 6, 0.34);
  background: rgba(217, 119, 6, 0.12);
  font-size: 0.76rem;
}

#screen-home .home-deas-roadmap-progress-wrap {
  max-width: none;
  margin-top: 0.85rem;
}

#screen-home .home-deas-roadmap-progress-bar {
  height: 0.5rem;
  background: rgba(148, 163, 184, 0.18);
}

#screen-home .home-deas-roadmap-progress-fill {
  background: var(--home-primary);
}

#screen-home .home-deas-roadmap-progress-text {
  color: var(--home-muted);
}

#screen-home .home-training-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  min-height: 7rem;
  padding: 1rem;
  border: 1px solid var(--home-border);
  border-radius: 1rem;
  background: var(--home-surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

#screen-home .home-training-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.75rem;
  background: var(--home-primary-soft);
  color: var(--home-primary);
}

#screen-home .home-training-icon svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

#screen-home .home-training-card strong,
#screen-home .home-training-card small {
  display: block;
}

#screen-home .home-training-card strong {
  margin-bottom: 0.3rem;
  font-size: 0.98rem;
}

#screen-home .home-training-card small {
  color: var(--home-muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

#screen-home .home-card-arrow {
  color: var(--home-primary);
  font-size: 1.15rem;
}

#screen-home .home-training-card {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.free-content-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--home-border-strong, rgba(93, 201, 198, 0.34));
  border-radius: 999px;
  background: var(--home-primary-soft, rgba(93, 201, 198, 0.12));
  color: var(--home-primary, #5dc9c6);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.category-card > .free-content-badge {
  margin-bottom: 0.55rem;
}

#screen-home .search-submit-btn {
  width: 3.25rem;
  min-width: 3.25rem;
  max-width: 3.25rem;
  padding-inline: 0;
  flex: 0 0 3.25rem;
  white-space: nowrap;
}

#screen-home .search-submit-icon {
  margin-right: 0.35rem;
}

#screen-home .unified-search-row .search-submit-btn {
  width: 3.25rem;
  min-width: 3.25rem;
  max-width: 3.25rem;
  flex: 0 0 3.25rem;
  padding-inline: 0;
}

@media (max-width: 480px) {
  #screen-home .home-section-header {
    gap: 0.7rem;
    margin-bottom: 0.9rem;
  }

  #screen-home .home-training-grid {
    gap: 0.75rem;
  }

  #screen-home .home-training-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.65rem;
    min-height: 6.5rem;
    padding: 0.85rem;
  }

  #screen-home .home-training-card .free-content-badge {
    grid-column: 2;
    grid-row: 2;
    margin-top: 0.1rem;
  }

  #screen-home .home-training-card .home-card-arrow {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

}

#screen-home .home-theme-hub {
  margin: 0;
}

#screen-home .home-theme-hub .theme-card {
  min-height: 9.5rem;
  padding: 1rem;
  border: 1px solid var(--home-border);
  border-radius: 1rem;
  background: var(--home-surface);
  box-shadow: none;
}

#screen-home .home-theme-hub .theme-card:hover {
  border-color: var(--home-border-strong);
  background: var(--home-surface-raised);
}

#screen-home .home-theme-hub .theme-card h3 {
  color: var(--text);
}

#screen-home .home-theme-hub .theme-card p {
  color: var(--home-muted);
  line-height: 1.5;
}

#screen-home .home-theme-hub .theme-card .count {
  color: var(--home-primary);
}

#screen-home .home-quiz-trainings-wrap {
  justify-content: flex-start;
  margin: 1rem 0 0;
}

#screen-home .home-new-modules-row {
  margin: 0;
}

#screen-home .home-new-modules-row.home-new-modules-row--odd > .home-module-spotlight--wide {
  grid-column: auto;
}

#screen-home .home-module-spotlight {
  min-height: 100%;
}

#screen-home .home-feature-alert {
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--home-border);
  border-radius: 1rem;
  background: transparent;
}

#screen-home .home-feature-alert-badge {
  margin-bottom: 0.5rem;
  border-color: rgba(93, 201, 198, 0.34);
  background: var(--home-primary-soft);
  color: var(--home-primary);
  font-size: 0.65rem;
}

#screen-home .home-feature-alert-title {
  font-size: 0.96rem;
}

#screen-home .home-feature-alert-text {
  color: var(--home-muted);
  font-size: 0.82rem;
  line-height: 1.5;
  opacity: 1;
}

#screen-home .home-feature-alert-link .count {
  color: var(--home-primary);
  font-size: 0.8rem;
}

#screen-home .home-feature-alert-dismiss {
  min-width: 2.5rem;
  min-height: 2.5rem;
}

#screen-home .footer-unified {
  margin-top: clamp(2.5rem, 7vw, 4.5rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--home-border);
}

@media (hover: hover) and (pointer: fine) {
  #screen-home .home-training-card:hover,
  #screen-home .home-theme-hub .theme-card:hover,
  #screen-home .home-feature-alert:hover {
    transform: translateY(-2px);
    border-color: var(--home-border-strong);
  }
}

@media (max-width: 640px) {
  #screen-home .home-hero {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding-block: 2rem;
  }

  #screen-home .home-hero h2 {
    font-size: 2rem;
  }

  #screen-home .home-hero-lead {
    font-size: 1rem;
  }

  #screen-home .home-hero-proof {
    grid-template-columns: 1fr;
    gap: 0.65rem;
    margin-top: 1.25rem;
  }

  #screen-home .home-hero-proof div {
    padding-left: 0.7rem;
  }

  #screen-home .home-preview-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-inline: 0.75rem;
  }

  #screen-home .home-preview-stats strong {
    font-size: 1.05rem;
  }

  #screen-home .home-preview-stats span {
    font-size: 0.66rem;
  }

  #screen-home .home-section-header h2 {
    font-size: 1.45rem;
  }

  #screen-home .home-hero-actions,
  #screen-home .home-hero-actions .btn,
  #screen-home .unified-search-row {
    width: 100%;
  }

  #screen-home .unified-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  #screen-home .search-submit-btn {
    width: auto;
    min-width: 3.25rem;
    max-width: 3.25rem;
    flex-basis: 3.25rem;
  }

  #screen-home .home-section-header {
    display: block;
  }

  #screen-home .home-section-header > p {
    margin-top: 0.55rem;
    text-align: left;
  }

  #screen-home .home-training-card {
    min-height: 6.25rem;
  }
}

@media (min-width: 641px) and (max-width: 920px) {
  #screen-home .home-hero {
    grid-template-columns: 1fr;
  }

  #screen-home .home-hero h2 {
    max-width: 18ch;
    font-size: 3rem;
  }
}

@media (min-width: 768px) {
  #screen-home .home-today-grid,
  #screen-home .home-training-grid,
  #screen-home .home-new-modules-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #screen-home .home-theme-hub {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #screen-home .home-training-grid .home-training-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  #screen-home *,
  #screen-home *::before,
  #screen-home *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Illustrations fiches paramètres vitaux */
.fiche-section-body .pv-illustration {
  margin: 0.75rem 0 1rem;
  padding: 0;
  text-align: center;
}
.fiche-section-body .pv-illustration img {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  margin: 0 auto;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: #fff;
  object-fit: contain;
}
.fiche-section-body .pv-illustration figcaption {
  margin-top: 0.45rem;
  font-size: 0.78rem;
  line-height: 1.35;
  opacity: 0.78;
  font-style: italic;
}
.fiche-section-body .pv-table {
  width: 100%;
  margin: 0.75rem 0 1rem;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.fiche-section-body .pv-table th,
.fiche-section-body .pv-table td {
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  text-align: left;
}
.fiche-section-body .pv-table thead th {
  background: rgba(6, 182, 212, 0.12);
  font-weight: 700;
}
