/* =========================================================
   Apprendre le français avec 欧老师
   Feuille de style globale
   ========================================================= */

:root {
  --bleu-france: #002654;
  --bleu-clair:  #2563eb;
  --rouge-france:#ef4135;
  --crème:       #fdfaf3;
  --sable:       #f4ead5;
  --encre:       #1f2937;
  --gris:        #6b7280;
  --gris-clair:  #e5e7eb;
  --or:          #c9a14a;
  --ombre:       0 4px 14px rgba(0, 0, 0, 0.08);
  --ombre-fort:  0 10px 30px rgba(0, 0, 0, 0.15);
  --rayon:       14px;
  --max-largeur: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans SC", "Inter", "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--encre);
  background: var(--crème);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Playfair Display", "Noto Serif SC", Georgia, serif;
  color: var(--bleu-france);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

a {
  color: var(--bleu-clair);
  text-decoration: none;
  transition: color .2s;
}
a:hover { color: var(--rouge-france); }

img { max-width: 100%; display: block; }

/* ---------- Conteneur ---------- */
.container {
  max-width: var(--max-largeur);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Barre de navigation (FaYu v2) ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(0, 0, 0, .06);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .02);
}
.navbar .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  max-width: var(--max-largeur);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--bleu-france);
  letter-spacing: -.005em;
}
.brand em {
  font-style: normal;
  font-family: "Noto Serif SC", "Playfair Display", serif;
  font-weight: 700;
  background: linear-gradient(135deg, var(--bleu-france), var(--bleu-clair));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}
/* Le « 法 » devient un médaillon élégant rouge/blanc (mascotte-ready) */
.brand .cn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff5f0 0%, #fce8e0 70%);
  color: var(--rouge-france);
  font-family: "Noto Serif SC", "Playfair Display", serif;
  font-size: 1rem;
  font-weight: 700;
  border: 1.5px solid rgba(239, 65, 53, .25);
  box-shadow: 0 2px 6px rgba(239, 65, 53, .12), inset 0 1px 0 rgba(255, 255, 255, .8);
  flex-shrink: 0;
  transition: transform .25s ease, box-shadow .25s ease;
}
.brand:hover .cn {
  transform: rotate(-6deg) scale(1.05);
  box-shadow: 0 4px 12px rgba(239, 65, 53, .22), inset 0 1px 0 rgba(255, 255, 255, .8);
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  align-items: center;
}
.nav-links li { display: flex; }
.nav-links a {
  color: var(--encre);
  font-weight: 500;
  font-size: .94rem;
  padding: 7px 14px;
  border-radius: 8px;
  transition: background .18s ease, color .18s ease;
  white-space: nowrap;
}
.nav-links a:hover {
  background: rgba(0, 38, 84, .06);
  color: var(--bleu-france);
}
.nav-links a.active {
  background: rgba(0, 38, 84, .08);
  color: var(--bleu-france);
  font-weight: 600;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 90px 0 80px;
  background:
    radial-gradient(circle at 80% 20%, rgba(239, 65, 53, .08), transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(0, 38, 84, .10), transparent 50%),
    var(--crème);
  overflow: hidden;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin-bottom: 18px;
}
.hero h1 .accent {
  color: var(--rouge-france);
  font-style: italic;
}
.hero h1 .cn-name {
  display: inline-block;
  color: var(--rouge-france);
  font-family: "Noto Serif SC", "Microsoft YaHei", serif;
}
.hero p.lead {
  font-size: 1.2rem;
  color: var(--gris);
  max-width: 620px;
  margin-bottom: 28px;
}
.hero .tag {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(0, 38, 84, .08);
  color: var(--bleu-france);
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: 18px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.hero-cta {
  display: inline-block;
  padding: 14px 28px;
  background: var(--bleu-france);
  color: white;
  border-radius: 10px;
  font-weight: 600;
  box-shadow: var(--ombre);
  transition: transform .2s, box-shadow .2s;
}
.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--ombre-fort);
  color: white;
}

/* ---------- Section ---------- */
section { padding: 70px 0; }
.section-title {
  text-align: center;
  margin-bottom: 12px;
  font-size: 2rem;
}
.section-subtitle {
  text-align: center;
  color: var(--gris);
  margin-bottom: 50px;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Cartes de niveaux ---------- */
.levels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.level-card {
  position: relative;
  background: white;
  border-radius: var(--rayon);
  overflow: hidden;
  box-shadow: var(--ombre);
  transition: transform .25s, box-shadow .25s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.level-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--ombre-fort);
  color: inherit;
}
.level-card .visual {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 4.5rem;
  font-weight: 700;
  color: white;
  letter-spacing: .03em;
  position: relative;
}
.level-card .visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(255,255,255,.18));
}
.level-card.a1 .visual { background: linear-gradient(135deg, #002654, #2563eb); }
.level-card.a2 .visual { background: linear-gradient(135deg, #2563eb, #06b6d4); }
.level-card.b1 .visual { background: linear-gradient(135deg, #c9a14a, #ef4135); }
.level-card.b2 .visual { background: linear-gradient(135deg, #ef4135, #be185d); }
.level-card.c1 .visual { background: linear-gradient(135deg, #1f2937, #6b7280); }

.level-card .body {
  padding: 22px 24px 26px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.level-card .body h3 { margin-bottom: 6px; font-size: 1.25rem; }
.level-card .body .desc {
  color: var(--gris);
  font-size: .95rem;
  margin-bottom: 14px;
  flex: 1;
}
.level-card .badge {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
}
.level-card .badge.dispo {
  background: #d1fae5;
  color: #065f46;
}
.level-card .badge.bientot {
  background: #fef3c7;
  color: #92400e;
}
.level-card.bientot {
  opacity: .85;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- À propos ---------- */
.about {
  background: var(--sable);
}
.about .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about h2 { margin-bottom: 16px; }
.about p { margin-bottom: 14px; color: var(--encre); }
.about .photo {
  background: linear-gradient(135deg, var(--bleu-france), var(--rouge-france));
  height: 380px;
  border-radius: var(--rayon);
  box-shadow: var(--ombre-fort);
  overflow: hidden;
  position: relative;
}
.about .photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.about .photo .photo-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px 18px;
  background: linear-gradient(to top, rgba(0, 38, 84, 0.85), transparent);
  color: white;
  font-family: "Playfair Display", serif;
  font-size: 1.05rem;
  font-style: italic;
  letter-spacing: .02em;
  text-align: left;
}
.about .photo .photo-caption .cn {
  font-family: "Noto Serif SC", serif;
  color: #fde68a;
  margin-left: 6px;
}
@media (max-width: 800px) {
  .about .container { grid-template-columns: 1fr; gap: 30px; }
  .about .photo { height: 320px; }
}

/* ---------- Contact / Footer ---------- */
.contact {
  background: var(--bleu-france);
  color: white;
  text-align: center;
}
.contact h2 { color: white; }
.contact p { color: rgba(255,255,255,.8); margin-bottom: 20px; }
.contact .placeholder {
  display: inline-block;
  padding: 16px 28px;
  background: rgba(255,255,255,.1);
  border: 1px dashed rgba(255,255,255,.4);
  border-radius: var(--rayon);
  color: rgba(255,255,255,.85);
  font-style: italic;
}

/* ---------- Carte Xiaohongshu (小红书) ---------- */
.xhs-card {
  display: inline-grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  background: white;
  color: var(--encre);
  border-radius: 18px;
  padding: 28px 32px;
  margin: 0 auto;
  text-align: left;
  text-decoration: none;
  box-shadow: 0 12px 36px rgba(0, 0, 0, .25);
  border-top: 5px solid #ff2442;
  transition: transform .2s ease, box-shadow .2s ease;
  max-width: 720px;
  width: 100%;
}
.xhs-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 44px rgba(0, 0, 0, .35);
}

.xhs-info { min-width: 0; }
.xhs-platform {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.xhs-badge {
  display: inline-block;
  background: #ff2442;
  color: white;
  font-family: "Noto Sans SC", sans-serif;
  font-weight: 700;
  font-size: .92rem;
  padding: 4px 12px;
  border-radius: 6px;
  letter-spacing: .04em;
}
.xhs-platform-en {
  color: var(--gris);
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 600;
}
.xhs-name {
  font-family: "Playfair Display", "Noto Serif SC", serif;
  font-size: 1.6rem;
  color: var(--bleu-france);
  margin: 0 0 4px;
  line-height: 1.2;
}
.xhs-handle {
  color: var(--gris);
  font-size: .92rem;
  margin: 0 0 8px;
  font-family: "Inter", "Noto Sans SC", sans-serif;
}
.xhs-handle strong {
  color: var(--encre);
  font-family: "Courier New", monospace;
  letter-spacing: .04em;
}
.xhs-bio {
  color: var(--encre);
  font-family: "Noto Sans SC", "Inter", sans-serif;
  font-size: 1rem;
  margin: 0 0 18px;
}
.xhs-cta {
  display: inline-block;
  background: #ff2442;
  color: white;
  font-weight: 700;
  font-size: .95rem;
  padding: 9px 18px;
  border-radius: 999px;
  letter-spacing: .02em;
  transition: background .15s ease, transform .15s ease;
}
.xhs-card:hover .xhs-cta {
  background: #d91031;
  transform: translateX(4px);
}

.xhs-qr {
  text-align: center;
  flex-shrink: 0;
}
.xhs-qr img {
  width: 180px;
  height: 180px;
  border-radius: 10px;
  border: 1px solid var(--gris-clair);
  background: white;
  padding: 6px;
  display: block;
}
.xhs-qr-hint {
  margin-top: 8px;
  color: var(--gris);
  font-size: .82rem;
  font-family: "Noto Sans SC", sans-serif;
}

@media (max-width: 640px) {
  .xhs-card {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 24px 22px;
    text-align: center;
  }
  .xhs-platform { justify-content: center; }
  .xhs-qr img { width: 160px; height: 160px; margin: 0 auto; }
}

footer {
  padding: 30px 0;
  background: #0a1530;
  color: rgba(255,255,255,.55);
  font-size: .9rem;
  text-align: center;
}
footer .cn { color: var(--rouge-france); font-weight: 600; }

/* ---------- Responsive nav ---------- */
@media (max-width: 760px) {
  .navbar .inner {
    padding: 8px 14px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .brand {
    font-size: .92rem;
    gap: 9px;
  }
  .brand .cn { width: 30px; height: 30px; font-size: .9rem; }
  /* Sur mobile, on cache le long titre — on ne garde que le médaillon + 欧老师 */
  .brand > span:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
    font-size: .9rem;
  }
  .nav-links {
    gap: 2px;
    width: 100%;
    justify-content: flex-end;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a {
    font-size: .85rem;
    padding: 6px 10px;
  }
  .nav-links .nav-cta { padding: 6px 12px; font-size: .82rem; }
  .lang-toggle { min-width: 38px; height: 28px; padding: 0 9px; font-size: .78rem; }

  .hero { padding: 60px 0 50px; }
  section { padding: 50px 0; }
}
@media (max-width: 430px) {
  .brand > span:nth-child(2) { max-width: 130px; }
}

/* =========================================================
   Pages d'authentification (inscription / connexion / compte)
   ========================================================= */

.auth-page {
  min-height: calc(100vh - 70px);
  background:
    radial-gradient(ellipse at top left, rgba(0, 38, 84, 0.05), transparent 55%),
    radial-gradient(ellipse at bottom right, rgba(239, 65, 53, 0.05), transparent 55%),
    var(--crème);
  padding: 60px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: white;
  border: 1px solid var(--gris-clair);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  padding: 36px 32px 32px;
}

.auth-card.wide { max-width: 720px; }

.auth-card h1 {
  font-size: 1.8rem;
  margin-bottom: 6px;
}

.auth-card .auth-sub {
  color: var(--gris);
  font-size: .98rem;
  margin-bottom: 28px;
}

.auth-form .field {
  margin-bottom: 18px;
}
.auth-form label {
  display: block;
  font-weight: 600;
  font-size: .95rem;
  color: var(--encre);
  margin-bottom: 6px;
}
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
  width: 100%;
  padding: 11px 14px;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--gris-clair);
  border-radius: 8px;
  background: var(--crème);
  color: var(--encre);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.auth-form input:focus {
  outline: none;
  border-color: var(--bleu-france);
  background: white;
  box-shadow: 0 0 0 3px rgba(0, 38, 84, .12);
}

.auth-form .hint {
  display: block;
  margin-top: 4px;
  color: var(--gris);
  font-size: .82rem;
}

.auth-form .lang-radio {
  display: flex;
  gap: 10px;
}
.auth-form .lang-radio label {
  flex: 1;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--gris-clair);
  border-radius: 8px;
  background: var(--crème);
  text-align: center;
  cursor: pointer;
  font-weight: 500;
  transition: border-color .2s, background .2s, color .2s;
}
.auth-form .lang-radio input { display: none; }
.auth-form .lang-radio input:checked + span {
  color: var(--bleu-france);
}
.auth-form .lang-radio label:has(input:checked) {
  border-color: var(--bleu-france);
  background: white;
  box-shadow: 0 0 0 2px rgba(0, 38, 84, .08);
}

.auth-form .btn-primary {
  width: 100%;
  margin-top: 8px;
  padding: 13px 24px;
  background: var(--bleu-france);
  color: white;
  font-weight: 600;
  font-size: 1rem;
  font-family: inherit;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: var(--ombre);
  transition: transform .15s, box-shadow .15s, background .15s;
}
.auth-form .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--ombre-fort);
  background: #001b3d;
}
.auth-form .btn-primary:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

.auth-form .form-error {
  display: none;
  margin-bottom: 18px;
  padding: 11px 14px;
  background: rgba(239, 65, 53, .08);
  border: 1px solid rgba(239, 65, 53, .25);
  border-radius: 8px;
  color: #b91c1c;
  font-size: .92rem;
}
.auth-form .form-error.visible { display: block; }

.auth-foot {
  margin-top: 22px;
  text-align: center;
  color: var(--gris);
  font-size: .92rem;
}
.auth-foot a {
  font-weight: 600;
}

/* Bouton CTA dans la navbar (inscription, etc.) */
.nav-links .nav-cta {
  display: inline-block;
  padding: 8px 18px;
  background: var(--bleu-france);
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .01em;
  transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
  box-shadow: 0 2px 8px rgba(0, 38, 84, .18);
}
.nav-links .nav-cta:hover {
  background: var(--rouge-france);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(239, 65, 53, .28);
}

/* Pictogramme « 我的空间 » injecté par devoirs-badge.js : on l'enjolive */
.nav-links a[href*="compte"],
.nav-links a[href*="/app/student"],
.nav-links a[href*="/app/admin"] {
  font-weight: 600;
  color: var(--bleu-france);
}

/* Bouton de bascule de langue (zh ↔ en) dans la navbar */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--gris-clair);
  background: white;
  color: var(--bleu-france);
  font-weight: 600;
  font-size: .85rem;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.lang-toggle:hover {
  border-color: var(--bleu-france);
  background: var(--crème);
}

/* =========================================================
   Page compte / dashboard
   ========================================================= */

.account-grid {
  display: grid;
  gap: 22px;
  margin-top: 22px;
}
.account-row {
  display: grid;
  grid-template-columns: minmax(140px, 200px) 1fr;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--gris-clair);
}
.account-row:last-child { border-bottom: 0; }
.account-row .label {
  color: var(--gris);
  font-size: .92rem;
}
.account-row .value {
  color: var(--encre);
  font-weight: 500;
  word-break: break-word;
}
.account-row .value strong {
  color: var(--bleu-france);
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  background: white;
  color: var(--bleu-france);
  border: 1px solid var(--bleu-france);
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, color .15s;
}
.btn-secondary:hover {
  background: var(--bleu-france);
  color: white;
}
.btn-danger {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  background: white;
  color: var(--rouge-france);
  border: 1px solid var(--rouge-france);
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, color .15s;
}
.btn-danger:hover {
  background: var(--rouge-france);
  color: white;
}

.role-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.role-badge.student { background: #d1fae5; color: #065f46; }
.role-badge.teacher { background: #fef3c7; color: #92400e; }

@media (max-width: 560px) {
  .account-row { grid-template-columns: 1fr; gap: 4px; padding: 10px 0; }
  .auth-card { padding: 28px 22px 26px; }
}

/* =========================================================
   Carte "expression du jour" sur compte.html
   ========================================================= */

.idiom-card {
  background:
    linear-gradient(135deg, rgba(0, 38, 84, 0.04), transparent 60%),
    linear-gradient(225deg, rgba(239, 65, 53, 0.04), transparent 60%),
    #fff;
  border: 1px solid var(--gris-clair);
  border-left: 4px solid var(--rouge-france);
  border-radius: var(--rayon);
  padding: 22px 26px;
  margin-bottom: 26px;
  box-shadow: var(--ombre);
}
.idiom-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gris);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 10px;
}
.idiom-icon { font-size: 1rem; }
.idiom-fr {
  font-family: "Playfair Display", "Noto Serif SC", serif;
  font-size: 1.5rem;
  color: var(--bleu-france);
  font-style: italic;
  margin-bottom: 16px;
  line-height: 1.3;
}
.idiom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px 24px;
  margin-bottom: 14px;
}
.idiom-grid > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.idiom-key {
  font-size: .78rem;
  color: var(--gris);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.idiom-val { color: var(--encre); font-size: .98rem; }
.idiom-example {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px dashed var(--gris-clair);
  color: var(--encre);
  font-size: .95rem;
}
.idiom-example-label {
  color: var(--gris);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-right: 4px;
}

/* =========================================================
   Widget "remarque sur cette leçon" (lesson-feedback.js)
   ========================================================= */

.lesson-feedback {
  margin: 50px auto 30px;
  max-width: var(--max-largeur);
  padding: 0 24px;
}
.lesson-feedback-inner {
  background: white;
  border: 1px solid var(--gris-clair);
  border-radius: var(--rayon);
  padding: 22px 26px;
  box-shadow: var(--ombre);
}
.lesson-feedback .lf-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.lesson-feedback .lf-head h3 {
  font-size: 1.1rem;
  margin: 0;
}
.lesson-feedback .lf-icon { font-size: 1.4rem; }
.lesson-feedback .lf-locked {
  color: var(--gris);
  margin: 0;
}
.lesson-feedback .lf-locked a {
  font-weight: 600;
  margin-left: 4px;
}
.lesson-feedback .lf-toggle {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  background: white;
  color: var(--bleu-france);
  border: 1px solid var(--bleu-france);
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: .92rem;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.lesson-feedback .lf-toggle:hover {
  background: var(--bleu-france);
  color: white;
}
.lesson-feedback .lf-textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: .96rem;
  border: 1px solid var(--gris-clair);
  border-radius: 8px;
  background: var(--crème);
  color: var(--encre);
  resize: vertical;
  min-height: 90px;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.lesson-feedback .lf-textarea:focus {
  outline: none;
  border-color: var(--bleu-france);
  background: white;
  box-shadow: 0 0 0 3px rgba(0, 38, 84, .12);
}
.lesson-feedback .lf-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  justify-content: flex-end;
}
.lesson-feedback .lf-cancel,
.lesson-feedback .lf-submit {
  padding: 9px 18px;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
  border: 1px solid;
  transition: background .15s, color .15s;
}
.lesson-feedback .lf-cancel {
  background: white;
  color: var(--gris);
  border-color: var(--gris-clair);
}
.lesson-feedback .lf-cancel:hover {
  background: var(--gris-clair);
  color: var(--encre);
}
.lesson-feedback .lf-submit {
  background: var(--bleu-france);
  color: white;
  border-color: var(--bleu-france);
}
.lesson-feedback .lf-submit:hover {
  background: var(--rouge-france);
  border-color: var(--rouge-france);
}
.lesson-feedback .lf-submit:disabled {
  opacity: .6;
  cursor: not-allowed;
}
.lesson-feedback .lf-status {
  margin: 10px 0 0;
  color: #b91c1c;
  font-size: .9rem;
}
.lesson-feedback .lf-thanks {
  margin: 0;
  padding: 10px 14px;
  background: rgba(34, 197, 94, .08);
  border: 1px solid rgba(34, 197, 94, .25);
  border-radius: 8px;
  color: #15803d;
  font-size: .95rem;
}

/* =========================================================
   Section "Synchroniser" et "Remarques" sur prof.html
   ========================================================= */

.prof-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
}
.btn-sync {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: white;
  color: var(--bleu-france);
  border: 1px solid var(--bleu-france);
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: .92rem;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.btn-sync:hover {
  background: var(--bleu-france);
  color: white;
}
.btn-sync:disabled { opacity: .6; cursor: not-allowed; }
.sync-status {
  color: var(--gris);
  font-size: .88rem;
}

.prof-feedback-section {
  margin-top: 36px;
  background: white;
  border: 1px solid var(--gris-clair);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  padding: 22px 26px 26px;
}
.prof-feedback-section h2 {
  font-size: 1.4rem;
  margin-bottom: 4px;
}
.prof-feedback-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.prof-feedback-filters {
  display: flex;
  gap: 6px;
}
.prof-feedback-filters button {
  padding: 5px 12px;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--gris-clair);
  color: var(--gris);
  font: inherit;
  font-size: .85rem;
  cursor: pointer;
  transition: all .15s;
}
.prof-feedback-filters button.active {
  background: var(--bleu-france);
  border-color: var(--bleu-france);
  color: white;
}
.prof-feedback-filters .badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .08);
  font-size: .72rem;
}
.prof-feedback-filters button.active .badge {
  background: rgba(255, 255, 255, .25);
}

.feedback-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.feedback-item {
  border: 1px solid var(--gris-clair);
  border-left-width: 4px;
  border-radius: 10px;
  padding: 14px 16px;
  background: var(--crème);
}
.feedback-item.is-new      { border-left-color: var(--rouge-france); }
.feedback-item.is-read     { border-left-color: var(--or); }
.feedback-item.is-resolved { border-left-color: #16a34a; opacity: .85; }

.feedback-item .fb-header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: baseline;
  font-size: .88rem;
  margin-bottom: 8px;
}
.feedback-item .fb-user { font-weight: 600; color: var(--encre); }
.feedback-item .fb-lesson a { font-weight: 500; }
.feedback-item .fb-date { color: var(--gris); }
.feedback-item .fb-status-pill {
  margin-left: auto;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.feedback-item.is-new      .fb-status-pill { background: rgba(239, 65, 53, .12); color: #b91c1c; }
.feedback-item.is-read     .fb-status-pill { background: rgba(201, 161, 74, .15); color: #92400e; }
.feedback-item.is-resolved .fb-status-pill { background: rgba(34, 197, 94, .12); color: #15803d; }

.feedback-item .fb-message {
  background: white;
  border: 1px solid var(--gris-clair);
  border-radius: 8px;
  padding: 10px 14px;
  white-space: pre-wrap;
  color: var(--encre);
  font-size: .96rem;
  margin-bottom: 10px;
}
.feedback-item .fb-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.feedback-item .fb-actions button {
  padding: 6px 14px;
  border-radius: 999px;
  font: inherit;
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--gris-clair);
  background: white;
  color: var(--encre);
  transition: all .15s;
}
.feedback-item .fb-actions button:hover { border-color: var(--bleu-france); color: var(--bleu-france); }
.feedback-item .fb-actions button.danger:hover { border-color: var(--rouge-france); color: var(--rouge-france); }
.feedback-item .fb-actions button.success:hover { border-color: #16a34a; color: #15803d; }

.feedback-empty {
  padding: 30px 16px;
  text-align: center;
  color: var(--gris);
  font-style: italic;
}

/* ════════════════════════════════════════════════════════════════════
   NAVBAR v2 — premium, injectée par devoirs-badge.js sur les pages
   qui ont encore l'ancienne <nav class="navbar"> en HTML.
   Sur les pages qui l'utilisent en dur (index_cn, A1/index, ...),
   ces règles fonctionnent aussi sans modification.
   ════════════════════════════════════════════════════════════════════ */
.navbar-v2 {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, .05);
}
/* ─── Tinte par public : sino (rouge pâle) vs anglo (bleu pâle) ─── */
html[lang="fr"] .navbar-v2,
html[lang="zh"] .navbar-v2,
html[lang="zh-CN"] .navbar-v2 {
  background: rgba(254, 242, 242, .88);
  border-bottom-color: rgba(239, 65, 53, .12);
}
html[lang="en"] .navbar-v2 {
  background: rgba(239, 246, 255, .88);
  border-bottom-color: rgba(0, 38, 84, .14);
}
.navbar-v2 .inner {
  max-width: 1200px; margin: 0 auto;
  padding: 12px 24px;
  display: flex; align-items: center; gap: 20px;
}
.navbar-v2 .brand {
  display: flex; align-items: center; gap: 11px;
  text-decoration: none; color: var(--encre);
  font-weight: 700; font-size: 1rem; flex-shrink: 0;
}
.navbar-v2 .brand .mascot-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #fef9e7, #fde68a);
  padding: 2px; box-shadow: 0 3px 10px rgba(212, 175, 55, .25);
  flex-shrink: 0; overflow: hidden;
}
.navbar-v2 .brand .mascot-avatar img {
  width: 100%; height: 100%; border-radius: 50%;
  object-fit: cover; object-position: center 20%;
}
.navbar-v2 .brand .wordmark { display: flex; flex-direction: column; line-height: 1.1; }
.navbar-v2 .brand .wordmark .top {
  font-family: "Playfair Display", "Noto Serif SC", serif;
  font-weight: 800; letter-spacing: -.01em;
  font-size: 1.08rem; color: var(--bleu-france);
}
.navbar-v2 .brand .wordmark .sub {
  font-size: .72rem; color: var(--gris);
  letter-spacing: .08em; text-transform: uppercase;
  font-weight: 500; margin-top: 1px;
}
.navbar-v2 .menu {
  display: flex; gap: 2px; list-style: none;
  padding: 0; margin: 0 auto 0 24px;
}
.navbar-v2 .menu li { display: flex; }
.navbar-v2 .menu a {
  display: inline-block; padding: 7px 13px;
  color: var(--encre); font-size: .92rem; font-weight: 500;
  text-decoration: none; border-radius: 8px;
  transition: all .15s ease;
  white-space: nowrap;
}
.navbar-v2 .menu a:hover { background: rgba(0, 38, 84, .06); color: var(--bleu-france); }
.navbar-v2 .menu a.current { background: rgba(0, 38, 84, .08); color: var(--bleu-france); font-weight: 600; }
.navbar-v2 .right { display: flex; align-items: center; gap: 8px; }
.navbar-v2 .lang-pill {
  display: inline-flex; background: rgba(0, 0, 0, .04);
  border-radius: 999px; padding: 2px; font-size: .8rem;
}
.navbar-v2 .lang-pill a {
  padding: 5px 11px; border-radius: 999px;
  color: var(--gris); text-decoration: none;
  font-weight: 600; transition: all .15s ease;
}
.navbar-v2 .lang-pill a.active {
  background: white; color: var(--bleu-france);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
}
.navbar-v2 .lang-pill a:not(.active):hover { color: var(--encre); }
.navbar-v2 .nav-cta-signin {
  padding: 7px 16px; color: var(--gris);
  font-size: .92rem; font-weight: 500;
  border-radius: 999px; text-decoration: none;
  transition: all .15s ease;
}
.navbar-v2 .nav-cta-signin:hover { color: var(--bleu-france); background: rgba(0, 38, 84, .06); }
.navbar-v2 .nav-cta-signup {
  padding: 7px 18px; background: var(--bleu-france);
  color: white; border-radius: 999px;
  font-weight: 600; font-size: .92rem;
  text-decoration: none; transition: all .15s ease;
  box-shadow: 0 2px 8px rgba(0, 38, 84, .2);
}
.navbar-v2 .nav-cta-signup:hover {
  background: var(--rouge-france); transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(239, 65, 53, .3);
}
.navbar-v2 .nav-cta-logout {
  padding: 6px 12px;
  color: var(--rouge-france);
  font-size: .82rem; font-weight: 600;
  border-radius: 999px; text-decoration: none;
  transition: all .15s ease;
  opacity: .75;
}
.navbar-v2 .nav-cta-logout:hover { opacity: 1; background: rgba(239, 65, 53, .08); }
.navbar-v2 .nav-burger {
  display: none; width: 36px; height: 36px;
  border: none; background: rgba(0, 0, 0, .04);
  border-radius: 10px; cursor: pointer;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 4px; padding: 0;
}
.navbar-v2 .nav-burger span { display: block; width: 18px; height: 2px; background: var(--encre); border-radius: 2px; }

@media (max-width: 920px) {
  .navbar-v2 .menu { display: none; }
  .navbar-v2 .right { gap: 4px; }
  .navbar-v2 .nav-burger { display: inline-flex; }
  .navbar-v2 .brand .wordmark .sub { display: none; }
  .navbar-v2 .nav-cta-signin,
  .navbar-v2 .nav-cta-logout { display: none; }
}

.nav-mobile {
  position: fixed; inset: 0;
  background: rgba(255, 255, 255, .98);
  backdrop-filter: blur(20px); z-index: 200;
  display: none; flex-direction: column; padding: 24px;
}
.nav-mobile.open { display: flex; }
.nav-mobile .close {
  align-self: flex-end; width: 40px; height: 40px;
  background: rgba(0,0,0,.04); border: 0; border-radius: 10px;
  font-size: 1.4rem; cursor: pointer;
}
.nav-mobile a {
  font-family: "Playfair Display", "Noto Serif SC", serif;
  font-size: 1.6rem; color: var(--encre);
  text-decoration: none; padding: 14px 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.nav-mobile a:last-child { border-bottom: 0; }
