* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: #101d26;
  color: #9cbcc3;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 40px;
}

/* Navbar */
.navbar {
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background-color: #b91c1c;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  color: #90b2bc;
  text-decoration: none;
  font-size: 0.9rem;
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
}

.btn-kanji {
  background-color: #2e1065;
  color: #c084fc;
  border: 1px solid #581c87;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
}

/* Hero Section */
.hero-section {
  text-align: center;
  max-width: 800px;
  margin: 20px auto 10px auto;
  padding: 0 16px;
}

.hero-logo-rings {
  display: flex;
  justify-content: center;
  gap: -4px;
  margin-bottom: 12px;
}

.ring {
  width: 18px;
  height: 18px;
  border: 3px solid;
  border-radius: 50%;
  margin: 0 -3px;
}
.ring-cyan { border-color: #06b6d4; }
.ring-pink { border-color: #ec4899; }
.ring-yellow { border-color: #eab308; }

.hero-title {
  color: #f5b544;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.hero-subtitle {
  color: #90b2bc;
  font-size: 0.95rem;
  max-width: 580px;
  margin: 0 auto 20px auto;
  line-height: 1.4;
}

/* BARRE DE MÉTRO (chargement visuel animé par script.js) */
.metro-line-container {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 620px;
  margin: 20px auto;
  padding: 0 10px;
}

/* Couleur de chaque aura (à garder identique à BELTS dans results.js)
   blanc = Initiation 初, jaune = Acquisition 得, orange = Assimilation 解,
   vert = Consolidation 強, bleu = Progression 進, rouge = Autonomisation 自 */
.step-blanche { --c: #e2e8f0; }
.step-jaune   { --c: #eab308; }
.step-orange  { --c: #f97316; }
.step-verte   { --c: #22c55e; }
.step-bleue   { --c: #3b82f6; }
.step-marron  { --c: #ef4444; }
.metro-step.step-blanche.reached .step-circle { color: #ffffff; }

/* Rail gris + remplissage : left/width sont calculés par le JS
   pour aller du centre du 1er cercle au centre du dernier.
   (les valeurs left/right ci-dessous ne servent que de secours) */
.metro-track,
.metro-track-fill {
  position: absolute;
  top: 42px; /* centre des cercles : badge 16px + marge 8px + moitié du cercle 18px */
  left: 30px;
  height: 4px;
  border-radius: 2px;
  transform: translateY(-50%);
}

.metro-track {
  right: 30px;
  background-color: #233b48;
  z-index: 1;
}

.metro-track-fill {
  width: 0;
  background-repeat: no-repeat;
  background-position: left center;
  z-index: 2;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* Tête lumineuse qui « pousse » la barre pendant le chargement */
.metro-track-fill::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 12px 4px rgba(255, 255, 255, 0.55);
  transform: translateY(-50%);
  transition: opacity 0.5s ease;
}
.metro-track-fill.done::after { opacity: 0; }

.metro-step {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step-badge {
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #43646d;
  transition: color 0.3s;
  height: 16px;
  display: flex;
  align-items: center;
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #101d26;
  border: 2px solid #304f58;
  color: #43646d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: bold;
  transition: border-color 0.3s ease, color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.step-jp { font-size: 0.65rem; color: #43646d; margin-top: 8px; transition: color 0.3s; }
.step-fr { font-size: 0.7rem; color: #43646d; transition: color 0.3s; }

/* Étape « atteinte » : la barre est passée dessus */
.metro-step.reached .step-badge { color: var(--c); }
.metro-step.reached .step-circle {
  border-color: var(--c);
  color: var(--c);
  background-color: color-mix(in srgb, var(--c) 12%, #101d26);
  box-shadow: 0 0 12px color-mix(in srgb, var(--c) 45%, transparent);
  animation: step-pop 0.45s ease-out;
}
.metro-step.reached .step-fr { color: #90b2bc; }
.metro-step.reached .step-jp { color: #5f8590; }

@keyframes step-pop {
  0%   { transform: scale(0.85); }
  60%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .metro-step.reached .step-circle { animation: none; }
}

.metro-tagline {
  font-size: 0.85rem;
  color: #5f8590;
  margin-top: 10px;
  line-height: 1.5;
}
.metro-tagline strong { color: #cbd5e1; font-weight: 500; }

/* TABS DU QUIZ EN HAUT */
.quiz-tabs-bar {
  max-width: 680px;
  margin: 25px auto 0 auto;
}

.quiz-tabs-list {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.tab-item {
  background-color: #162530;
  border: 1px solid #253f4d;
  color: #43646d;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: all 0.2s;
}

.tab-item.active {
  border-color: #f5b544;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(245, 181, 68, 0.3);
}

.tab-item.completed {
  border-color: #10b981;
  color: #10b981;
  background-color: rgba(16, 185, 129, 0.05);
}

.tabs-progress-line {
  width: 100%;
  height: 4px;
  background-color: #182d37;
  border-radius: 2px;
  overflow: hidden;
}

.tabs-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, #f5b544, #e8973a);
  transition: width 0.3s ease;
}

/* CARTE DU QUIZ (MAIN CARD) */
.container {
  width: 100%;
  max-width: 700px;
  padding: 0 16px;
  margin-top: 15px;
}

.main-card {
  background-color: #162934;
  border: 1px solid #244250;
  border-radius: 16px;
  padding: 32px;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hidden { display: none !important; }

/* En-tête de la Question */
.quiz-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.quiz-section-title {
  color: #87acb8;
  font-size: 0.9rem;
  font-weight: 600;
}

.quiz-timer {
  background-color: #0f1e27;
  border: 1px solid #223d4b;
  color: #87acb8;
  padding: 4px 14px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.quiz-score-badge {
  color: #10b981;
  font-weight: 700;
  font-size: 0.9rem;
}

/* Zone Centrale de Question */
.question-body {
  text-align: center;
  margin-bottom: 30px;
}

.japanese-display {
  font-size: 3.8rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  letter-spacing: 2px;
  line-height: 1.2;
}

.japanese-display          { white-space: pre-line; text-wrap: balance; }
.japanese-display.is-long  { font-size: 2.6rem; }
.japanese-display.is-xlong { font-size: 2.1rem; }
.japanese-display.is-xxlong { font-size: 1.7rem; line-height: 1.5; }
.japanese-display .target {
  text-decoration: underline;
  text-decoration-color: #f5b544;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.18em;
}
@media (max-width: 520px) {
  .japanese-display          { font-size: 3rem; }
  .japanese-display.is-long  { font-size: 2.1rem; }
  .japanese-display.is-xlong { font-size: 1.35rem; letter-spacing: 0; }
  .japanese-display.is-xxlong { font-size: 1.05rem; letter-spacing: 0; }
}

.question-subtitle {
  color: #6c909b;
  font-size: 0.95rem;
}

/* Grille des réponses 2x2 */
.options-grid-2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.quiz-opt-btn {
  background-color: #1c3440;
  border: 1px solid #294d5d;
  color: #e2e8f0;
  padding: 18px 20px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.quiz-opt-btn:hover:not(:disabled) {
  border-color: #46626c;
  background-color: #234250;
}

.quiz-opt-btn.correct {
  border-color: #10b981 !important;
  background-color: rgba(16, 185, 129, 0.1) !important;
  color: #10b981 !important;
}

.quiz-opt-btn.wrong {
  border-color: #ef4444 !important;
  background-color: rgba(239, 68, 68, 0.1) !important;
  color: #ef4444 !important;
}

/* Écran d'Accueil / Transitions */
.center-align {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.big-kanji { font-size: 4rem; color: #ffffff; }
.welcome-title { color: #ffffff; font-size: 1.5rem; margin-bottom: 8px; }
.welcome-desc { color: #90b2bc; font-size: 0.95rem; max-width: 480px; margin-bottom: 20px; }

.btn-cta-start {
  background-color: #f5b544;
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

/* Écran de Fin de Section */
.section-complete-title {
  color: #ffffff;
  font-size: 1.4rem;
  margin-bottom: 24px;
}

.score-circle-container {
  position: relative;
  width: 140px;
  height: 140px;
  margin-bottom: 20px;
}

.score-circle-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.score-circle-bg {
  fill: none;
  stroke: #1c3440;
  stroke-width: 6;
}

.score-circle-progress {
  fill: none;
  stroke: #10b981;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 264;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.8s ease;
}

.score-circle-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.score-percent {
  font-size: 2rem;
  font-weight: 800;
  color: #10b981;
}

.score-ratio {
  font-size: 0.8rem;
  color: #5f8590;
}

.score-message-title {
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.score-message-sub {
  color: #6c909b;
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.btn-cta-continue {
  background-color: #f5b544;
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(245, 181, 68, 0.3);
}

.footer-copyright {
  text-align: center;
  font-size: 0.75rem;
  color: #43646d;
  margin-top: 30px;
}

.footer-copyright a {
  color: #f5b544;
  text-decoration: none;
}
/* =====================================================
   ÉCRAN DE RÉSULTATS (rendu par results.js)
   ===================================================== */
.score-circle-container.is-fail .score-circle-progress { stroke: #f59e0b; }
.score-circle-container.is-fail .score-percent { color: #f59e0b; }

#results-screen { width: 100%; }

.result-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.result-panel {
  width: 100%;
  background: linear-gradient(180deg, #193343 0%, #152c39 100%);
  border: 1px solid #284a5c;
  border-radius: 16px;
  padding: 32px 28px 28px;
  text-align: center;
}

.result-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #5f8590;
}

.result-title {
  color: #ffffff;
  font-size: 1.7rem;
  font-weight: 800;
  margin: 8px 0 4px;
}

.result-sub { color: #6c909b; font-size: 0.95rem; }

/* Radar */
.radar {
  width: 100%;
  max-width: 460px;
  margin: 10px auto 0;
}
.radar svg { display: block; width: 100%; height: auto; overflow: visible; }

.radar-ring { fill: none; stroke: #27485b; stroke-width: 1; }
.radar-axis { stroke: #234050; stroke-width: 1; }
.radar-tick { stroke: #90b2bc; stroke-width: 2; stroke-linecap: round; opacity: 0.75; }
.radar-shape {
  fill: rgba(59, 130, 246, 0.2);
  stroke: #3b82f6;
  stroke-width: 2.5;
  stroke-linejoin: round;
}
.radar-dot { stroke-width: 2; }
.radar-dot.ok   { fill: #22c55e; stroke: #bbf7d0; }
.radar-dot.low  { fill: #f59e0b; stroke: #fde68a; }
.radar-dot.none { fill: #162934; stroke: #5f8590; stroke-dasharray: 2 2; }

.radar-name  { font-size: 11.5px; font-weight: 700; letter-spacing: 0.09em; fill: #87acb8; }
.radar-value { font-size: 12.5px; font-weight: 700; }
.radar-value.ok   { fill: #22c55e; }
.radar-value.low  { fill: #fbbf24; }
.radar-value.none { fill: #5f8590; font-weight: 600; }

/* Le radar « se déploie » une fois à l'affichage */
.radar-data {
  transform-origin: 230px 200px;
  animation: radar-grow 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes radar-grow {
  from { transform: scale(0.15); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .radar-data { animation: none; }
}

.radar-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 4px 0 22px;
  font-size: 0.75rem;
  color: #5f8590;
}
.radar-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.legend-dot.ok { background: #22c55e; }
.legend-dot.none { border: 1.5px dashed #5f8590; }
.legend-tick { width: 10px; height: 2px; background: #90b2bc; display: inline-block; border-radius: 1px; }

/* Cartes point fort / à travailler / signification */
.result-insights {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}
.insight {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(13, 28, 38, 0.35);
  border: 1px solid #284a5c;
  border-radius: 12px;
  padding: 14px 16px;
}
.insight-icon {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  border: 1.5px solid;
}
.insight.ok   .insight-icon { color: #22c55e; border-color: rgba(34, 197, 94, 0.6);  background: rgba(34, 197, 94, 0.12); }
.insight.warn .insight-icon { color: #f59e0b; border-color: rgba(245, 158, 11, 0.6); background: rgba(245, 158, 11, 0.12); }
.insight.info .insight-icon { color: #38bdf8; border-color: rgba(56, 189, 248, 0.6); background: rgba(56, 189, 248, 0.12); }
.insight-title { color: #ffffff; font-weight: 700; font-size: 0.88rem; margin-bottom: 2px; }
.insight-text  { color: #90b2bc; font-size: 0.9rem; line-height: 1.5; }

/* Niveau actuel */
.result-level-block { margin-top: 30px; }
.result-level {
  font-size: clamp(2.4rem, 9vw, 3.4rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--lv);
  margin: 6px 0 10px;
}
.result-level-check { font-weight: 400; margin-left: 0.15em; }
.result-level-desc {
  color: #90b2bc;
  font-size: 1rem;
  line-height: 1.55;
  max-width: 460px;
  margin: 0 auto;
}
.result-level-desc strong { color: #ffffff; }

/* Parcours */
.result-path-block { margin-top: 28px; }
.result-path-line { color: #90b2bc; margin: 8px 0 16px; }
.result-path-line strong { color: #ffffff; }
.result-path {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
}
.path-node { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.path-circle {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 2px solid var(--c);
  color: var(--c);
  background: color-mix(in srgb, var(--c) 12%, #152c39);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.35rem;
}
.path-check {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #22c55e;
  color: #ffffff;
  font-size: 0.65rem;
  font-style: normal;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #152c39;
}
.path-spark { position: absolute; top: -9px; right: -7px; color: #facc15; font-style: normal; font-size: 0.95rem; }
.path-caption { font-size: 0.72rem; color: #5f8590; font-weight: 600; }
.path-node.is-next .path-caption { color: var(--c); }
.path-link {
  width: 40px;
  height: 2px;
  margin-top: 26px;
  border-radius: 1px;
  background: linear-gradient(to right, var(--from), var(--to));
}
.result-note { color: #5f8590; font-size: 0.8rem; margin-top: 12px; }

/* Bloc professeur + appel à l'action */
.result-promo {
  margin-top: 30px;
  text-align: left;
  padding: 22px;
  border-radius: 14px;
  border: 1px solid rgba(245, 181, 68, 0.3);
  background: linear-gradient(160deg, rgba(232, 161, 58, 0.13), rgba(110, 70, 190, 0.1));
}
.promo-eyebrow { font-size: 0.85rem; color: #90b2bc; margin-bottom: 8px; }
.promo-text { color: #cbd5e1; line-height: 1.55; margin-bottom: 10px; }

.sensei {
  display: flex;
  gap: 16px;
  align-items: center;
  background: rgba(13, 28, 38, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
}
.sensei-photo {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: #b91c1c;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
}
.sensei-kicker { font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: #5f8590; font-weight: 700; }
.sensei-ask   { color: #90b2bc; font-size: 0.85rem; }
.sensei-name  { color: #ffffff; font-size: 1.2rem; font-weight: 800; margin: 2px 0; }
.sensei-role  { color: #e2e8f0; font-size: 0.9rem; }
.sensei-works { color: #cbd5e1; font-size: 0.85rem; font-style: italic; margin: 2px 0; }
.sensei-more  { color: #90b2bc; font-size: 0.85rem; line-height: 1.45; }
.sensei-more a, .promo-discovery a { color: #e2e8f0; text-decoration: underline; text-underline-offset: 3px; }

.btn-result-cta {
  display: block;
  width: 100%;
  text-align: center;
  background: #e8a13a;
  color: #ffffff;
  font-weight: 700;
  padding: 14px 20px;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(232, 161, 58, 0.3);
  transition: filter 0.2s;
}
.btn-result-cta:hover { filter: brightness(1.08); }
.promo-note { color: #6c909b; font-size: 0.85rem; margin: 10px 0 16px; }
.promo-discovery {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
  color: #90b2bc;
  font-size: 0.9rem;
  line-height: 1.55;
}

/* Certificat, accordéons, bouton refaire */
.result-cert {
  color: #e2e8f0;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.result-accordion {
  width: 100%;
  border: 1px solid #284a5c;
  border-radius: 10px;
  background: rgba(13, 28, 38, 0.25);
}
.result-accordion summary {
  cursor: pointer;
  padding: 14px 16px;
  color: #ffffff;
  font-weight: 700;
}
.accordion-body {
  padding: 0 16px 16px;
  color: #90b2bc;
  font-size: 0.92rem;
  line-height: 1.55;
}
.btn-retry {
  background-color: #1c3440;
  border: 1px solid #294d5d;
  color: #e2e8f0;
  padding: 12px 26px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s;
}
.btn-retry:hover { background-color: #234250; }

@media (max-width: 520px) {
  .main-card { padding: 16px; }
  .result-panel { padding: 24px 14px 20px; }
  .result-promo { padding: 16px; }
  .sensei { flex-direction: column; align-items: flex-start; }
  /* Le radar est réduit à l'écran : on agrandit ses libellés pour qu'ils restent lisibles */
  .radar-name  { font-size: 14px; letter-spacing: 0.04em; }
  .radar-value { font-size: 15px; }
}


/* =====================================================
   INDICE, CHRONOMÈTRE, FURIGANA
   ===================================================== */
.btn-hint {
  margin-top: 12px;
  background: transparent;
  border: 1px dashed #365d70;
  color: #90b2bc;
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.btn-hint:hover { color: #e2e8f0; border-color: #5f8590; }

/* Bouton « Je ne sais pas » : discret, sous les réponses */
.dontknow-row { display: flex; justify-content: center; margin-top: 14px; }
.btn-dontknow {
  background: transparent;
  border: 1px solid #2c4a58;
  color: #7fa3ae;
  padding: 7px 18px;
  border-radius: 18px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.btn-dontknow:hover:not(:disabled) { color: #e2e8f0; border-color: #5f8590; background: rgba(95, 133, 144, 0.08); }
.btn-dontknow:disabled { opacity: 0.35; cursor: default; }
.quiz-opt-btn.dontknow-reveal { outline: 2px dashed rgba(16, 185, 129, 0.6); outline-offset: 2px; }

.hint-text {
  max-width: 460px;
  margin: 12px auto 0;
  padding: 10px 14px;
  background: rgba(250, 204, 21, 0.07);
  border: 1px solid rgba(250, 204, 21, 0.25);
  border-radius: 10px;
  color: #e2e8f0;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-line;
  text-align: left;
}

.quiz-timer { transition: color 0.3s, border-color 0.3s; min-width: 64px; text-align: center; }
.quiz-timer.warn   { color: #f59e0b; border-color: rgba(245, 158, 11, 0.5); }
.quiz-timer.danger { color: #f5b544; border-color: #f5b544; animation: timer-pulse 1s ease-in-out infinite; }
@keyframes timer-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 181, 68, 0); }
  50%      { box-shadow: 0 0 10px 2px rgba(245, 181, 68, 0.45); }
}
@media (prefers-reduced-motion: reduce) {
  .quiz-timer.danger { animation: none; }
}

/* Présentation du professeur : deux lignes simples, sans italique */
.sensei-works { font-style: normal; color: #90b2bc; }



/* =====================================================
   JAPONAIS : polices et glyphes japonais (et non chinois) pour tout texte lang="ja"
   ===================================================== */
:lang(ja), :lang(ja) * {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo",
               "Noto Sans JP", "Noto Sans CJK JP", "IPAexGothic", sans-serif;
}

/* Cercles de la ligne de métro et du parcours : le kanji est centré par script.js (centerGlyphs) */
.step-circle, .path-circle { line-height: 1; }
.glyph { display: inline-block; line-height: 1; position: relative; }

/* =====================================================
   FURIGANA
   ===================================================== */
ruby { ruby-position: over; ruby-align: center; }
ruby rt {
  font-size: clamp(11px, 0.4em, 22px);   /* jamais plus petit que 11 px, même quand la phrase est réduite */
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: #b8c4d8;
}
.japanese-display ruby rt { color: #a6c7d2; padding-bottom: 0.12em; }
.japanese-display.has-ruby { line-height: 2.05; }
.japanese-display.has-ruby.is-xxlong { line-height: 2.1; }
.quiz-opt-btn ruby rt { font-size: clamp(10px, 0.5em, 14px); color: #9bc1cc; }
.quiz-opt-btn { line-height: 1.75; }

/* =====================================================
   ONGLETS : 7 étapes, la barre défile sur petit écran
   ===================================================== */
.quiz-tabs-list { overflow-x: auto; scrollbar-width: none; padding: 2px 2px 4px; }
.quiz-tabs-list::-webkit-scrollbar { display: none; }
.tab-item { flex: none; white-space: nowrap; }

/* =====================================================
   MESSAGE À JULIEN
   ===================================================== */
.contact-card {
  width: 100%;
  text-align: left;
  padding: 22px;
  border: 1px solid #284a5c;
  border-radius: 14px;
  background: rgba(13, 28, 38, 0.3);
}
.contact-title { color: #ffffff; font-size: 1.15rem; margin-bottom: 6px; }
.contact-intro { color: #90b2bc; font-size: 0.9rem; line-height: 1.55; margin-bottom: 14px; }
.contact-field { display: block; color: #cbd5e1; font-size: 0.85rem; font-weight: 600; margin-bottom: 12px; }
.contact-field input,
.contact-field textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  background: #102530;
  border: 1px solid #294d5d;
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 0.95rem;
  font-weight: 400;
  resize: vertical;
}
.contact-field input:focus,
.contact-field textarea:focus { outline: 2px solid #f5b544; outline-offset: 1px; border-color: transparent; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.btn-contact {
  background: #e8a13a;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(232, 161, 58, 0.3);
}
.btn-contact:hover { filter: brightness(1.08); }
.btn-contact-secondary {
  background: #1c3440;
  color: #e2e8f0;
  border: 1px solid #294d5d;
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-contact-secondary:hover { background: #234250; }
.contact-note { color: #6c909b; font-size: 0.8rem; line-height: 1.5; margin-top: 12px; }
.contact-status { color: #22c55e; font-size: 0.85rem; margin-top: 8px; min-height: 1.2em; }
.contact-warning { color: #f59e0b; font-size: 0.8rem; margin-top: 8px; }

/* Mobile : la zone d'en-tête garde la largeur de l'écran (la barre d'onglets défile à l'intérieur) */
.hero-section { width: 100%; }
.quiz-tabs-bar { width: 100%; }

/* Mobile : la barre de navigation passe sur deux lignes au lieu de déborder de l'écran */
@media (max-width: 600px) {
  .navbar { flex-wrap: wrap; justify-content: space-between; gap: 10px 12px; padding: 12px 16px; }
  .nav-links { order: 3; width: 100%; justify-content: center; gap: 18px; }
}


/* =====================================================
   PHRASES À ORDONNER (★) ET TEXTES À TROUS
   ===================================================== */
.star { color: #facc15; text-shadow: 0 0 10px rgba(250, 204, 21, 0.55); }

.japanese-display.is-passage {
  text-align: left;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 2.5;
  margin-bottom: 14px;
  padding: 6px 4px;
}
.japanese-display.is-passage .blank {
  display: inline-block;
  min-width: 2.6em;
  margin: 0 0.15em;
  text-align: center;
  font-size: 0.9em;
  line-height: 1.5;
  color: #5f8590;
  border-bottom: 2px solid #43646d;
}
.japanese-display.is-passage .blank.on {
  color: #f5b544;
  border-bottom-color: #f5b544;
  background: rgba(245, 181, 68, 0.12);
  border-radius: 4px 4px 0 0;
  animation: blank-glow 1.6s ease-in-out infinite;
}
@keyframes blank-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 181, 68, 0); }
  50%      { box-shadow: 0 0 10px 1px rgba(245, 181, 68, 0.4); }
}
@media (prefers-reduced-motion: reduce) {
  .japanese-display.is-passage .blank.on { animation: none; }
}
@media (max-width: 520px) {
  .japanese-display.is-passage { font-size: 1.05rem; line-height: 2.6; }
}

/* Textes à trous : retour à la ligne naturel (pas d'équilibrage qui coupe un mot au milieu) */
.japanese-display.is-passage { text-wrap: wrap; line-break: strict; word-break: normal; }


/* =====================================================
   BOUTON MUET
   ===================================================== */
.sound-toggle {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 50;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #294d5d;
  background: rgba(22, 41, 52, 0.92);
  color: #e2e8f0;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: color 0.2s, border-color 0.2s, transform 0.15s;
}
.sound-toggle:hover { border-color: #5f8590; transform: scale(1.06); }
.sound-toggle:focus-visible { outline: 2px solid #f5b544; outline-offset: 3px; }
.sound-toggle[aria-pressed="true"] { color: #5f8590; }

/* =====================================================
   CHARGEMENT AVANT LE DIAGNOSTIC
   ===================================================== */
#reveal-screen { min-height: 330px; gap: 18px; }
.reveal-rings {
  position: relative;
  width: 104px;
  height: 104px;
  animation: reveal-spin 2.6s cubic-bezier(0.55, 0, 1, 0.6) forwards;   /* accélère, comme le son */
}
.reveal-rings i {
  position: absolute;
  width: 62px;
  height: 62px;
  border: 5px solid;
  border-radius: 50%;
  filter: drop-shadow(0 0 8px currentColor);
}
.reveal-rings i:nth-child(1) { left: 6px;  top: 10px; border-color: #06b6d4; color: #06b6d4; }
.reveal-rings i:nth-child(2) { left: 36px; top: 10px; border-color: #ec4899; color: #ec4899; }
.reveal-rings i:nth-child(3) { left: 21px; top: 36px; border-color: #eab308; color: #eab308; }
@keyframes reveal-spin { from { transform: rotate(0deg) scale(0.9); } to { transform: rotate(720deg) scale(1.08); } }

.reveal-title { color: #ffffff; font-size: 1.4rem; font-weight: 800; }
.reveal-bar {
  width: min(320px, 80%);
  height: 6px;
  border-radius: 3px;
  background: #1c3440;
  overflow: hidden;
}
.reveal-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(to right, #e2e8f0, #eab308, #f97316, #22c55e, #3b82f6, #ef4444);
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.6);
}
.reveal-sub { color: #90b2bc; font-size: 0.9rem; min-height: 1.3em; }
@media (prefers-reduced-motion: reduce) {
  .reveal-rings { animation: none; }
}

/* 9 onglets : ils tiennent sur une ligne sur ordinateur (sur téléphone la barre défile) */
.quiz-tabs-bar { max-width: 900px; }
.quiz-tabs-list { gap: 4px; }
.tab-item { padding: 6px 7px; font-size: 0.66rem; letter-spacing: 0.2px; }

/* =====================================================================
   DIRECTION ARTISTIQUE : « le verre d'eau et la feuille »
   Palette : eau (bleu-vert profond), lumière de lampe (ambre), feuille (vert vif).
   ===================================================================== */
:root {
  --water: #7dd3fc;
  --leaf: #94e05a;
  --amber: #f5b544;
  --amber-deep: #e8a13a;
  --ink-on-amber: #1b1405;
}

body {
  background-color: #0d1c24;
  background-image:
    radial-gradient(900px 520px at 50% -8%, rgba(125, 211, 252, 0.13), transparent 70%),
    radial-gradient(700px 480px at 108% 8%, rgba(245, 181, 68, 0.07), transparent 65%),
    radial-gradient(800px 600px at -10% 105%, rgba(94, 200, 150, 0.07), transparent 65%);
  background-attachment: fixed;
}

/* Panneaux « verre » */
.main-card,
.result-panel {
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(200, 235, 255, 0.06);
}
.main-card { border-color: rgba(125, 211, 252, 0.16); }

/* Boutons principaux : ambre, texte foncé (lisible) */
.btn-cta-start, .btn-cta-continue, .btn-result-cta, .btn-contact {
  background: linear-gradient(180deg, #f8c766, #e8a13a);
  color: var(--ink-on-amber);
  box-shadow: 0 6px 18px rgba(232, 161, 58, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-cta-start:hover, .btn-cta-continue:hover { filter: brightness(1.07); }

/* Logo rond en haut à gauche : une feuille sur un rond d'eau */
.logo-icon {
  width: 42px;
  height: 42px;
  background: radial-gradient(circle at 35% 30%, #1d4a55, #0f2a33);
  border: 2px solid rgba(148, 224, 90, 0.65);
  box-shadow: 0 0 14px rgba(148, 224, 90, 0.25), inset 0 0 8px rgba(125, 211, 252, 0.15);
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.logo-icon:hover { transform: rotate(-8deg) scale(1.06); box-shadow: 0 0 18px rgba(148, 224, 90, 0.45); }
.logo-icon svg { display: block; }

/* Logo de la page : la feuille sur l'eau */
.hero-mark { display: flex; justify-content: center; margin-bottom: 6px; }
.hero-mark .mark { width: 150px; height: auto; overflow: visible; }
.mark .mr { transform-box: fill-box; transform-origin: center; animation: mark-ripple 3.6s ease-out infinite; opacity: 0; }
.mark .mr2 { animation-delay: 1.2s; }
.mark .mr3 { animation-delay: 2.4s; }
@keyframes mark-ripple { 0% { transform: scale(0.28); opacity: 0.85; } 100% { transform: scale(1.05); opacity: 0; } }
.mark .mark-leaf { transform-box: fill-box; transform-origin: center; animation: leaf-bob 4.2s ease-in-out infinite; }

/* Le verre d'eau et la feuille */
.glass { display: block; width: 100%; height: auto; overflow: visible; }
.glass .glass-body,
.glass .glass-bowl,
.glass .glass-rim { fill: rgba(190, 225, 245, 0.1); stroke: rgba(226, 240, 250, 0.82); stroke-width: 2.2; stroke-linejoin: round; }
.glass .glass-rim { fill: rgba(190, 225, 245, 0.06); }
.glass .glass-shine { fill: none; stroke: rgba(255, 255, 255, 0.62); stroke-width: 3.2; stroke-linecap: round; }
.glass .glass-shine.sm { stroke-width: 2.4; }
.glass .wt { stop-color: color-mix(in srgb, var(--water) 72%, #ffffff); stop-opacity: 0.96; transition: stop-color 0.9s ease; }
.glass .wb { stop-color: color-mix(in srgb, var(--water) 62%, #06141c); stop-opacity: 0.96; transition: stop-color 0.9s ease; }
.glass .water-surface { fill: color-mix(in srgb, var(--water) 58%, #ffffff); stroke: rgba(255, 255, 255, 0.55); stroke-width: 1.2; transition: fill 0.9s ease; }
.glass .water-group { transform: translateY(calc((1 - var(--fill, 1)) * 34px)); }
.glass .ripple { fill: none; stroke: rgba(255, 255, 255, 0.7); stroke-width: 1.3; transform-box: fill-box; transform-origin: center; animation: glass-ripple 3.2s ease-out infinite; }
.glass .ripple.r2 { animation-delay: 1.6s; }
.glass .bubble { fill: rgba(255, 255, 255, 0.78); animation: bubble-up 4.2s ease-in infinite; }
.glass .leaf-float { transform-box: fill-box; transform-origin: center; animation: leaf-bob 3.6s ease-in-out infinite; }
.glass .aura { filter: drop-shadow(0 0 5px var(--water)); animation: aura-pulse 2.6s ease-in-out infinite; }

@keyframes leaf-bob { 0%, 100% { transform: translate(0, 0) rotate(-4deg); } 50% { transform: translate(2.5px, -1.6px) rotate(5deg); } }
@keyframes glass-ripple { 0% { transform: scale(0.3); opacity: 0.75; } 100% { transform: scale(1.06); opacity: 0; } }
@keyframes bubble-up { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 0.85; } 100% { transform: translateY(-38px); opacity: 0; } }
@keyframes aura-pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.95; } }

@media (prefers-reduced-motion: reduce) {
  .mark .mr, .mark .mark-leaf, .glass .ripple, .glass .bubble, .glass .leaf-float, .glass .aura { animation: none; }
  .mark .mr1 { opacity: 0.5; }
  .glass .aura { opacity: 0.7; }
}

.welcome-glass { width: 132px; margin: 0 auto 6px; }
.reveal-glass { width: 168px; }
.reveal-glass .glass .leaf-float { animation-duration: 0.9s; }
.reveal-glass .glass .ripple { animation-duration: 1.1s; }
.result-glass { width: 150px; margin: 0 auto 4px; }

/* Chargement : on retire l'ancienne animation d'anneaux */
.reveal-rings { display: none; }

/* Pied de page */
.footer-copyright p { margin: 0; }
.footer-legal { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; }
.footer-legal a { color: #7f93a3; text-decoration: none; }
.footer-legal a:hover { color: var(--amber); text-decoration: underline; }

/* Titre de la page */
.hero-title { text-shadow: 0 0 28px rgba(245, 181, 68, 0.18); }


/* =====================================================
   PAGES LÉGALES
   ===================================================== */
.legal-wrap { width: 100%; max-width: 820px; padding: 8px 16px 12px; }
.legal-card {
  background: linear-gradient(180deg, rgba(20, 44, 56, 0.92), rgba(15, 33, 43, 0.92));
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 16px;
  padding: 34px 34px 30px;
  color: #b7c6d2;
  line-height: 1.7;
  font-size: 0.97rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(200, 235, 255, 0.06);
}
.legal-card h1 { color: #ffffff; font-size: 1.8rem; font-weight: 800; margin-bottom: 4px; }
.legal-card h2 { color: #ffffff; font-size: 1.12rem; font-weight: 700; margin: 28px 0 8px; }
.legal-card p { margin: 0 0 10px; }
.legal-card ul { margin: 0 0 12px; padding-left: 1.3em; }
.legal-card li { margin-bottom: 5px; }
.legal-card a { color: var(--amber); }
.legal-card code { background: rgba(125, 211, 252, 0.1); border-radius: 4px; padding: 1px 6px; font-size: 0.88em; color: #cfeaf7; }
.legal-date { color: #7f93a3; font-size: 0.85rem; margin-bottom: 18px !important; }

.todo {
  background: rgba(245, 181, 68, 0.16);
  color: #ffd98f;
  border-radius: 4px;
  padding: 0 6px;
  font-weight: 600;
}
.legal-summary {
  background: rgba(148, 224, 90, 0.07);
  border: 1px solid rgba(148, 224, 90, 0.28);
  border-radius: 12px;
  padding: 14px 18px 8px;
  margin-bottom: 8px;
  color: #d3e6c4;
}
.legal-summary > strong:first-child { color: #ffffff; display: block; margin-bottom: 6px; }

.legal-table-wrap { overflow-x: auto; margin: 6px 0 14px; }
.legal-table { width: 100%; border-collapse: collapse; font-size: 0.87rem; min-width: 640px; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid rgba(125, 211, 252, 0.14); }
.legal-table th { color: #ffffff; font-weight: 700; background: rgba(125, 211, 252, 0.07); }

.storage-live { background: rgba(0, 0, 0, 0.2); border-radius: 10px; padding: 12px 16px 4px; margin-bottom: 12px; }

.legal-page .navbar { margin-bottom: 8px; }
.legal-page .nav-links a { color: #cfe3ee; }
@media (max-width: 600px) {
  .legal-card { padding: 24px 18px; }
  .legal-card h1 { font-size: 1.5rem; }
}

/* Finitions de la direction artistique */
.hero-mark .mark { width: 190px; }
.sensei-photo {
  background: radial-gradient(circle at 35% 30%, #2f7f4d, #14472c);
  border: 2px solid rgba(148, 224, 90, 0.65);
  box-shadow: 0 0 14px rgba(148, 224, 90, 0.22);
  color: #e8ffd2;
}


/* ===== En-tête identique à juudaichi.fr ===== */
.site-topbar {
  align-self: stretch;
  width: 100%;
  height: 70px;
  background-color: #2a3042;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  box-shadow: 0 0.75rem 1.5rem rgba(18, 38, 63, 0.03);
  position: relative;
  z-index: 10;
}
.site-topbar * { font-family: 'Poppins', sans-serif; }
.site-topbar-logo { display: flex; align-items: center; height: 100%; }
.site-topbar-logo img { height: 50px; width: auto; display: block; }
.site-topbar-links { display: flex; height: 100%; }
.site-topbar-links a {
  display: flex;
  align-items: center;
  padding: 0 1rem;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.site-topbar-links .tb-presentation:hover { background-color: #ECF0F1; color: #495057; }
.site-topbar-links .tb-cours:hover { background-color: #8A4FC4; }
.site-topbar-links .tb-reseaux:hover { background-color: #B92029; }
.site-topbar-links .tb-test:hover { background-color: #8A4FC4; }
.site-topbar-links .tb-test.is-active { box-shadow: inset 0 -3px 0 #fff; }
.site-topbar-connexion {
  background-color: #6E24B6;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.47rem 1rem;
  border-radius: 0.25rem;
  text-decoration: none;
  white-space: nowrap;
}
.site-topbar-connexion:hover { background-color: #8A4FC4; }
/* Comme sur juudaichi.fr : le menu central est masqué sur petit écran */
@media (max-width: 767.98px) {
  .site-topbar-links { display: none; }
  .site-topbar-connexion { font-size: 0.75rem; padding: 0.4rem 0.7rem; }
}


/* =====================================================================
   AMBIANCE « AURA DE NEN » : nuit indigo, aura verte/turquoise qui respire
   ===================================================================== */
body {
  background-color: #080a1a;
  background-image:
    radial-gradient(1100px 620px at 50% -10%, rgba(45, 212, 191, 0.16), transparent 68%),
    radial-gradient(760px 520px at 110% 20%, rgba(99, 102, 241, 0.14), transparent 65%),
    radial-gradient(820px 620px at -12% 100%, rgba(148, 224, 90, 0.09), transparent 65%),
    linear-gradient(180deg, #0b0f24 0%, #080a1a 60%, #06071a 100%);
  background-attachment: fixed;
}
/* L'aura : un halo diffus derrière le haut de page, qui « respire » lentement */
body::before {
  content: '';
  position: fixed;
  left: 50%;
  top: 70px;
  width: min(1100px, 140vw);
  height: 620px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(94, 234, 212, 0.20), rgba(148, 224, 90, 0.08) 55%, transparent 75%);
  filter: blur(30px);
  pointer-events: none;
  z-index: -1;
  animation: nen-breathe 7s ease-in-out infinite;
}
@keyframes nen-breathe {
  0%, 100% { opacity: 0.55; transform: translateX(-50%) scale(0.96); }
  50%      { opacity: 1;    transform: translateX(-50%) scale(1.04); }
}
@media (prefers-reduced-motion: reduce) { body::before { animation: none; opacity: 0.8; } }

/* Panneaux : verre sombre indigo, bord lumineux comme une aura */
.main-card {
  background-color: rgba(17, 22, 48, 0.82);
  border-color: rgba(94, 234, 212, 0.22);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 40px rgba(45, 212, 191, 0.07), inset 0 1px 0 rgba(200, 255, 245, 0.06);
  backdrop-filter: blur(6px);
}
.result-panel {
  background: linear-gradient(180deg, rgba(24, 30, 64, 0.92) 0%, rgba(17, 22, 48, 0.92) 100%);
  border-color: rgba(94, 234, 212, 0.2);
}
.tab-item { background-color: #121733; border-color: #262d57; color: #5b6694; }
.legal-card { background-color: rgba(17, 22, 48, 0.85); border-color: rgba(94, 234, 212, 0.18); }

/* Titre : 水見式 en vert d'aura, le reste en ambre */
.hero-title .hero-jp {
  color: #6ee7b7;
  text-shadow: 0 0 18px rgba(110, 231, 183, 0.45);
  letter-spacing: 0.04em;
  cursor: help;
}
.hero-title .hero-sep { color: #6ee7b7; opacity: 0.7; }

/* Bouton de compte (élève connecté) */
.site-topbar-account {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  padding: 0 8px;
}
.site-topbar-account img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.site-topbar-account:hover span { text-decoration: underline; }

/* Formulaire de demande d'entretien */
.contact-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.contact-status.is-error { color: #f59e0b; }
.contact-field input[type="email"] { width: 100%; }
a.result-cert { cursor: pointer; }

/* Kanji des auras : police japonaise unique (Noto Sans JP) pour un centrage identique partout */
.step-circle .glyph, .path-circle .glyph { font-family: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic UI', 'Meiryo', sans-serif; font-weight: 700; }

/* Barre des auras : effet « goutte » quand la barre atteint un cercle */
.step-circle { position: relative; }
.step-circle::before,
.step-circle::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid var(--c);
  opacity: 0;
  pointer-events: none;
}
.metro-step.reached .step-circle::before { animation: step-ripple 0.9s ease-out; }
.metro-step.reached .step-circle::after  { animation: step-ripple 0.9s ease-out 0.15s; }
.metro-step.reached .step-circle { animation: step-pop 0.5s cubic-bezier(.34,1.56,.64,1), step-flash 0.9s ease-out; }
@keyframes step-ripple {
  0%   { opacity: 0.9; transform: scale(1); }
  100% { opacity: 0;   transform: scale(2.3); }
}
@keyframes step-pop {
  0%   { transform: scale(0.7); }
  55%  { transform: scale(1.28); }
  100% { transform: scale(1); }
}
@keyframes step-flash {
  0%   { box-shadow: 0 0 0 color-mix(in srgb, var(--c) 0%, transparent); }
  30%  { box-shadow: 0 0 26px color-mix(in srgb, var(--c) 85%, transparent); }
  100% { box-shadow: 0 0 12px color-mix(in srgb, var(--c) 45%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
  .metro-step.reached .step-circle,
  .metro-step.reached .step-circle::before,
  .metro-step.reached .step-circle::after { animation: none; }
}
/* Cercles non atteints : teinte indigo assortie au fond */
.step-circle { background-color: #121735; border-color: #2a3263; color: #4a5486; }
.metro-step.reached .step-circle { background-color: color-mix(in srgb, var(--c) 14%, #121735); }
.metro-track { background-color: #1f2550; }

/* Titre du test (option A) : 水見式 en rouge Juudaichi, le reste en blanc Lemon Milk, comme le bandeau de l'accueil.
   Police : dépose le fichier dans fonts/ (LemonMilk-Medium.woff2 ou .otf). En attendant : Poppins en capitales. */
@font-face {
  font-family: 'Lemon Milk';
  src: url('fonts/LemonMilk-Medium.woff2') format('woff2'), url('fonts/LemonMilk-Medium.otf') format('opentype');
  font-weight: 500;
  font-display: swap;
}
.hero-title { color: #ffffff; text-shadow: none; }
.hero-title .hero-fr {
  font-family: 'Lemon Milk', 'Poppins', sans-serif;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #ffffff;
}
.hero-title .hero-jp {
  color: #e2474b;                                   /* rouge du bandeau (#b92929), éclairci pour rester lisible sur fond sombre */
  text-shadow: 0 0 18px rgba(185, 41, 41, 0.55);
}
.hero-title .hero-sep { color: #e2474b; opacity: 0.8; }

/* En-tête : bouton « Test de niveau » encadré, avec la feuille */
.site-topbar-links .tb-test {
  align-self: center;
  height: auto;
  gap: 8px;
  margin-left: 8px;
  padding: 6px 16px;
  border: 2px solid #94e05a;
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(148, 224, 90, 0.35);
}
.site-topbar-links .tb-test.is-active { box-shadow: 0 0 14px rgba(148, 224, 90, 0.5); }
.site-topbar-links .tb-test:hover { background-color: rgba(148, 224, 90, 0.16); box-shadow: 0 0 18px rgba(148, 224, 90, 0.6); }
.site-topbar-links .tb-test .tb-leaf { transition: transform 0.3s; flex-shrink: 0; }
.site-topbar-links .tb-test:hover .tb-leaf { transform: rotate(-15deg) scale(1.1); }
img.sensei-photo { width: 84px; height: 84px; }


/* ===== Menu mobile (bouton ☰) de l'en-tête ===== */
.site-topbar-right { display: flex; align-items: center; gap: 8px; }
.tb-burger {
  display: none;
  width: 42px;
  height: 38px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.tb-burger span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.site-topbar.menu-open .tb-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-topbar.menu-open .tb-burger span:nth-child(2) { opacity: 0; }
.site-topbar.menu-open .tb-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1199.98px) {
  .tb-burger { display: flex; }
  .site-topbar-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: auto;
    flex-direction: column;
    padding: 8px 16px 18px;
    background-color: #2a3042;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
    z-index: 20;
  }
  .site-topbar.menu-open .site-topbar-links { display: flex; }
  .site-topbar-links a {
    padding: 14px 4px;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .site-topbar-links a:hover { background: none; color: #c9b3ff; }
  .site-topbar-links .tb-test {
    justify-content: center;
    align-self: stretch;
    margin: 12px 0 0;
    padding: 10px 16px;
    border-bottom: 2px solid #94e05a;
  }
}
@media (max-width: 400px) {
  .site-topbar-logo img { height: 40px; }
}

/* Harmonisation avec l'en-tête de juudaichi.fr (mêmes tailles et graisses) */
.site-topbar { padding: 0 12px 0 0; }
.site-topbar-connexion { font-weight: 400; font-size: 13px; padding: 7.52px 16px; }
@media (min-width: 1200px) {
  .site-topbar-links a { font-size: 16.25px; font-weight: 600; padding: 0 16px; }
  .site-topbar-links .tb-test { padding: 6px 16px; margin-left: 8px; }
  .site-topbar-links .tb-presentation:hover { background-color: #ECF0F1; color: #495057; }
  .site-topbar-links .tb-live:hover { background-color: #8A4FC4; }
  .site-topbar-links .tb-cours:hover { background-color: #B92029; }
  .site-topbar-links .tb-reseaux:hover { background-color: #495057; }
}


/* =====================================================
   ÉCRAN D'OUVERTURE « PLONGÉE »
   ===================================================== */
.intro-gate {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(60% 50% at 50% 45%, rgba(45, 212, 191, 0.16), transparent 70%),
    radial-gradient(90% 70% at 50% 110%, rgba(110, 231, 183, 0.10), transparent 70%),
    #080a1a;
  color: #e6e9ff;
  text-align: center;
  clip-path: circle(150% at 50% 45%);
  transition: clip-path 1s cubic-bezier(.7, 0, .3, 1), opacity 0.6s ease;
}
.intro-gate.is-opening {
  clip-path: circle(0% at 50% 45%);
  pointer-events: none;
}
.intro-gate.is-opening .intro-inner { transform: scale(1.15); opacity: 0; }
.intro-gate.is-gone { opacity: 0; pointer-events: none; }
.intro-inner {
  position: relative;
  padding: 24px;
  transition: transform 0.9s ease, opacity 0.6s ease;
  animation: introIn 0.7s ease-out both;
}
.intro-glass { width: 110px; margin: 0 auto 10px; filter: drop-shadow(0 0 22px rgba(110, 231, 183, 0.35)); }
.intro-glass svg { width: 100%; height: auto; display: block; }
.intro-jp {
  font-family: 'Noto Sans JP', 'Poppins', sans-serif;
  font-weight: 700;
  font-size: clamp(2.6rem, 9vw, 4.2rem);
  letter-spacing: 0.08em;
  color: #e2474b;
  text-shadow: 0 0 24px rgba(226, 71, 75, 0.45);
  margin: 0;
}
.intro-fr {
  font-family: 'Poppins', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  font-size: 0.85rem;
  color: #9fb3d9;
  margin: 6px 0 0;
}
.intro-btn, .intro-note {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}
.intro-gate.needs-click .intro-btn,
.intro-gate.needs-click .intro-note { opacity: 1; transform: none; pointer-events: auto; }
.intro-btn {
  margin-top: 28px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: #fff;
  background: rgba(148, 224, 90, 0.12);
  border: 2px solid #94e05a;
  border-radius: 999px;
  padding: 12px 30px;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(148, 224, 90, 0.35);
  animation: introPulse 2.2s ease-in-out infinite;
}
.intro-btn:hover { background: rgba(148, 224, 90, 0.22); }
.intro-btn:focus-visible { outline: 2px solid #f5b544; outline-offset: 4px; }
.intro-note { font-size: 0.85rem; color: #8a93c4; margin: 14px 0 0; }
.intro-ripples { position: absolute; inset: 0; pointer-events: none; }
.intro-ripples span {
  position: absolute;
  left: 50%;
  top: 45%;
  width: 160px;
  height: 160px;
  margin: -80px 0 0 -80px;
  border-radius: 50%;
  border: 1px solid rgba(110, 231, 183, 0.35);
  animation: introRipple 3.6s ease-out infinite;
}
.intro-ripples span:nth-child(2) { animation-delay: 1.2s; }
.intro-ripples span:nth-child(3) { animation-delay: 2.4s; }
@keyframes introRipple {
  from { transform: scale(0.4); opacity: 0.9; }
  to { transform: scale(5); opacity: 0; }
}
@keyframes introIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes introPulse {
  0%, 100% { box-shadow: 0 0 14px rgba(148, 224, 90, 0.3); }
  50% { box-shadow: 0 0 26px rgba(148, 224, 90, 0.6); }
}
@media (prefers-reduced-motion: reduce) {
  .intro-gate { transition: opacity 0.3s ease; clip-path: none; }
  .intro-ripples span, .intro-btn, .intro-inner { animation: none; }
}

/* Auras : libellés plus longs que les anciennes couleurs */
.step-fr { margin-top: 6px; }
.metro-step .step-badge { white-space: nowrap; }
.result-level-kanji { font-family: 'Noto Sans JP', sans-serif; font-weight: 700; margin-right: 0.15em; }

/* Barre des auras : 6 colonnes de même largeur, cercles espacés régulièrement */
.metro-line-container { max-width: 680px; }
.metro-step { flex: 1 1 0; min-width: 0; }
/* Téléphone : noms des niveaux sur deux hauteurs (un sur deux décalé vers le haut) pour qu'ils respirent */
@media (max-width: 600px) {
  .metro-line-container { padding: 0 4px; margin-top: 38px; }
  .metro-step .step-badge { font-size: 0.66rem; letter-spacing: 0; margin-bottom: 6px; }
  .metro-step.step-jaune .step-badge,
  .metro-step.step-verte .step-badge,
  .metro-step.step-marron .step-badge { transform: translateY(-18px); }
  .step-fr { font-size: 0.68rem; }
}
@media (max-width: 360px) {
  .metro-step .step-badge { font-size: 0.6rem; }
}
/* Noms d'aura longs (Autonomisation) : le titre du résultat reste dans le cadre */
.result-level { font-size: clamp(1.7rem, 7.6vw, 3.2rem); overflow-wrap: anywhere; }

/* Propositions en romaji : JetBrains Mono (hébergée sur le site, licence SIL OFL), lettres de largeur fixe
   pour bien voir ookii / okii, kitte / kite… */
@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/jetbrains-mono-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
.quiz-opt-btn.opt-romaji {
  font-family: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

/* =====================================================
   VERRE DES RÉSULTATS : une animation par niveau atteint (classe fx-0 à fx-5, voir glassSVG)
   ===================================================== */
.glass .sparkle { fill: #fff; opacity: 0; transform-box: fill-box; transform-origin: center; animation: sparkle 2.4s ease-in-out infinite; }
@keyframes sparkle { 0%, 100% { opacity: 0; transform: scale(.3); } 45% { opacity: .95; transform: scale(1.15); } 60% { opacity: .7; transform: scale(.9); } }

/* 1 · Acquisition : la feuille tourne lentement sur elle-même */
.glass.fx-1 .leaf-float, .glass.fx-2 .leaf-float { animation: leaf-turn 9s linear infinite; }
@keyframes leaf-turn { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* 2 · Assimilation : plus de bulles et l'eau scintille (+ la feuille tourne) */
.glass.fx-2 .bubble { animation-duration: 3s; }

/* 3 · Consolidation : l'eau monte et ondule */
.glass.fx-3 .water-group { animation: water-rise 3.4s ease-in-out infinite; }
.glass.fx-3 .water-surface { transform-box: fill-box; transform-origin: center; animation: wave 1.7s ease-in-out infinite; }
.glass.fx-3 .leaf-float { animation: leaf-wave 1.7s ease-in-out infinite; }
@keyframes water-rise { 0%, 100% { transform: translateY(2px); } 50% { transform: translateY(-9px); } }
@keyframes wave { 0%, 100% { transform: scaleY(1) skewX(0deg); } 25% { transform: scaleY(1.35) skewX(6deg); } 75% { transform: scaleY(.75) skewX(-6deg); } }
@keyframes leaf-wave { 0%, 100% { transform: translate(-3px, 1px) rotate(-10deg); } 50% { transform: translate(3px, -3px) rotate(10deg); } }

/* 4 · Progression : un tourbillon entraîne la feuille */
.glass.fx-4 .swirl { transform-box: fill-box; transform-origin: center; animation: swirl 2.2s linear infinite; }
.glass.fx-4 .leaf-float { animation: leaf-orbit 3.2s linear infinite; }
@keyframes swirl { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }
@keyframes leaf-orbit { from { transform: rotate(0deg) translateX(13px) rotate(0deg); } to { transform: rotate(-360deg) translateX(13px) rotate(-200deg); } }

/* 5 · Autonomisation : l'eau bout à ras bord, fume et déborde goutte à goutte */
.glass.fx-5 .water-group { transform: translateY(-25px); }
.glass.fx-5 .bubble { animation: boil-bubble 1.1s ease-in infinite; }
.glass.fx-5 .water-surface { transform-box: fill-box; transform-origin: center; animation: boil-surface .5s ease-in-out infinite alternate; }
.glass.fx-5 .ripple { animation-duration: 1s; }
.glass.fx-5 .leaf-float { animation: leaf-jolt .55s ease-in-out infinite alternate; }
.glass.fx-5 .st { opacity: 0; animation: steam 2.6s ease-out infinite; }
.glass.fx-5 .st2 { animation-delay: .8s; }
.glass.fx-5 .st3 { animation-delay: 1.6s; }
.glass.fx-5 .drop { opacity: 0; animation: 2.7s ease-in infinite; }
.glass.fx-5 .dl { animation-name: drip-left; }
.glass.fx-5 .dr { animation-name: drip-right; }
@keyframes boil-bubble { 0% { transform: translateY(0) scale(.6); opacity: 0; } 20% { opacity: .95; } 100% { transform: translateY(-40px) scale(1.4); opacity: 0; } }
@keyframes boil-surface { from { transform: scaleY(.85) translateY(.5px); } to { transform: scaleY(1.25) translateY(-1px); } }
@keyframes leaf-jolt { from { transform: translate(-2px, 1px) rotate(-10deg); } to { transform: translate(2px, -2px) rotate(8deg); } }
@keyframes steam { 0% { opacity: 0; transform: translateY(6px); } 25% { opacity: .85; } 100% { opacity: 0; transform: translateY(-14px); } }
/* la goutte suit le flanc du verre (même courbe que la coupe), puis tombe */
@keyframes drip-left {
  0% { opacity: 0; transform: translate(0, 0) scale(.6); }
  8% { opacity: 1; transform: translate(-1px, 4px) scale(1); }
  30% { transform: translate(-1.5px, 26px); }
  52% { transform: translate(3px, 48px); }
  70% { opacity: 1; transform: translate(11px, 64px); }
  82% { opacity: 0; transform: translate(16px, 76px) scale(.8); }
  100% { opacity: 0; transform: translate(16px, 76px); }
}
@keyframes drip-right {
  0% { opacity: 0; transform: translate(0, 0) scale(.6); }
  8% { opacity: 1; transform: translate(1px, 4px) scale(1); }
  30% { transform: translate(1.5px, 26px); }
  52% { transform: translate(-3px, 48px); }
  70% { opacity: 1; transform: translate(-11px, 64px); }
  82% { opacity: 0; transform: translate(-16px, 76px) scale(.8); }
  100% { opacity: 0; transform: translate(-16px, 76px); }
}

/* verre classique : les gouttes descendent le long des flancs droits jusqu'au fond */
.glass.classique.fx-5 .dl { animation-name: drip-left-c; }
.glass.classique.fx-5 .dr { animation-name: drip-right-c; }
@keyframes drip-left-c {
  0% { opacity: 0; transform: translate(0, 0) scale(.6); }
  8% { opacity: 1; transform: translate(.4px, 4px) scale(1); }
  72% { opacity: 1; transform: translate(9px, 100px); }
  86% { opacity: 0; transform: translate(10px, 112px) scale(.8); }
  100% { opacity: 0; transform: translate(10px, 112px); }
}
@keyframes drip-right-c {
  0% { opacity: 0; transform: translate(0, 0) scale(.6); }
  8% { opacity: 1; transform: translate(-.4px, 4px) scale(1); }
  72% { opacity: 1; transform: translate(-9px, 100px); }
  86% { opacity: 0; transform: translate(-10px, 112px) scale(.8); }
  100% { opacity: 0; transform: translate(-10px, 112px); }
}

@media (prefers-reduced-motion: reduce) {
  .glass .sparkle, .glass[class*="fx-"] .leaf-float, .glass[class*="fx-"] .water-group, .glass[class*="fx-"] .water-surface,
  .glass .swirl, .glass .st, .glass .drop, .glass[class*="fx-"] .bubble { animation: none; }
  .glass .sparkle { opacity: .6; }
  .glass.fx-5 .st { opacity: .5; }
}
