/* ===== Thème clair (défaut) : turquoise & blanc ===== */
:root {
  --primary: #0aa6ac;          /* turquoise principal */
  --primary-dark: #067a80;     /* nuance foncée (survols, topbar) */
  --primary-deep: #05565b;     /* texte sur fonds turquoise clair */
  --primary-light: #d7f4f5;    /* fonds de badges et surlignages */
  --accent: #e8a13a;           /* ambre : boutons d'action */
  --accent-strong: #cf8a25;
  --accent-light: #fdf0dd;
  --bg: #ffffff;
  --bg-soft: #f2fbfb;
  --card: #ffffff;
  --text: #1d3336;
  --muted: #5f7a7d;
  --border: #d9ecec;
  --red: #c0392b;
  --ok-bg: #ddf5ee;
  --ok-text: #0f7a5c;
  --err-bg: #fdeaea;
  --err-text: #b02a2a;
  --done-bg: #ddf5ee;
  --done-text: #0f7a5c;
  --wait-bg: #fdf0dd;
  --wait-text: #8a5c03;
  --topbar-grad: linear-gradient(120deg, #0aa6ac 0%, #067a80 100%);
  --hero-grad: linear-gradient(130deg, #0cb5bb, #067a80, #05565b, #0aa6ac);
  --shadow-hover: 0 8px 22px rgba(10, 166, 172, 0.22);
  --radius: 12px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

a { color: var(--primary-dark); }

/* ===== Animations ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes gradShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* Apparition au défilement (classe posée par app.js) */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ===== Barre du haut ===== */
.topbar {
  background: var(--topbar-grad);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 2px 10px rgba(5, 86, 91, 0.25);
}
.brand { display: flex; align-items: center; text-decoration: none; transition: transform 0.15s ease; }
.brand:hover { transform: scale(1.03); }
.logo { height: 38px; width: auto; display: block; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-login { color: #e2fbfc; text-decoration: none; font-size: 0.95rem; font-weight: 600; }
.topbar-login:hover { color: #fff; text-decoration: underline; }
.inline-form { display: inline; margin: 0; }

/* Bouton menu (trois barres) */
.hamburger {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: background 0.15s ease;
}
.hamburger:hover { background: rgba(255, 255, 255, 0.26); }
.hamburger span {
  display: block;
  width: 20px;
  height: 2.5px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Panneau dépliable (droite) */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 60, 63, 0.5);
  z-index: 90;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.drawer-overlay.show { opacity: 1; }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(290px, 84vw);
  background: var(--card);
  z-index: 100;
  box-shadow: -8px 0 26px rgba(5, 60, 63, 0.25);
  transform: translateX(105%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--topbar-grad);
  color: #fff;
}
.drawer-close {
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
}
.drawer-close:hover { background: rgba(255, 255, 255, 0.3); }
.drawer-nav { display: flex; flex-direction: column; padding: 10px; gap: 2px; overflow-y: auto; }
.drawer-nav a {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  padding: 12px 14px;
  border-radius: 10px;
  transition: background 0.15s ease, transform 0.12s ease;
}
.drawer-nav a:hover { background: var(--primary-light); transform: translateX(3px); }
.drawer-sub { font-size: 0.78rem; color: var(--muted); font-weight: 400; }
.drawer-nav hr { border: none; border-top: 1px solid var(--border); margin: 8px 4px; width: auto; align-self: stretch; }
.drawer-logout {
  width: 100%;
  text-align: left;
  font: inherit;
  font-weight: 600;
  color: var(--err-text);
  background: none;
  border: none;
  padding: 12px 14px;
  border-radius: 10px;
  cursor: pointer;
}
.drawer-logout:hover { background: var(--err-bg); }

/* ===== Structure ===== */
.container { max-width: 900px; margin: 0 auto; padding: 20px 16px 40px; }
.footer { text-align: center; color: var(--muted); font-size: 0.85rem; padding: 16px; }

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.page-head h1 { margin: 6px 0; font-size: 1.5rem; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== Cartes ===== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  transition: box-shadow 0.15s ease;
}
.empty { text-align: center; padding: 40px 18px; }
.notice-card { border-left: 4px solid var(--accent); background: var(--accent-light); }
.notice-card h2 { margin: 0 0 6px; font-size: 1.05rem; }
.notice-card p { margin: 4px 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.sub-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.sub-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--primary); }
.sub-card h2 { font-size: 1.1rem; margin: 10px 0 4px; }
.sub-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.sub-meta { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }

/* ===== Badges & puces ===== */
.badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}
.badge-schreiben { background: var(--primary-light); color: var(--primary-deep); }
.badge-sprechen { background: var(--accent-light); color: var(--wait-text); }
.badge-mentor { background: var(--primary-dark); color: #fff; }
.badge-level { background: var(--accent); color: #3a2703; }
.chip {
  display: inline-block;
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--muted);
}
.chip-warn { background: var(--err-bg); color: var(--err-text); border-color: transparent; }
.chip-done { background: var(--done-bg); color: var(--done-text); border-color: transparent; }
.chip-wait { background: var(--wait-bg); color: var(--wait-text); border-color: transparent; }

/* ===== Formulaires ===== */
.stack { display: flex; flex-direction: column; gap: 14px; }
label { font-weight: 600; font-size: 0.92rem; display: flex; flex-direction: column; gap: 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], textarea, select {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10, 166, 172, 0.22);
}
input[type="file"] { font: inherit; color: var(--text); }
textarea { resize: vertical; }
.field-row { display: flex; gap: 12px; }
.field-row label { flex: 1; }

.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 44px; }
.pw-eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.pw-eye:hover { background: var(--primary-light); }

.type-choice { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin: 0; }
.type-choice legend { font-weight: 600; font-size: 0.92rem; padding: 0 4px; }
.radio-line { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 400; margin: 6px 0; }
.radio-line input { width: auto; margin-top: 4px; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filters select { width: auto; }

.auth-card, .form-card { max-width: 480px; margin: 24px auto; }
.form-card { max-width: 560px; }
.center { text-align: center; }
.muted { color: var(--muted); font-weight: 400; }

/* ===== Boutons ===== */
.btn {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(5, 86, 91, 0.18); }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #3a2703; }
.btn-accent:hover { background: var(--accent-strong); }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-outline { background: transparent; }
.btn-ghost { background: transparent; border-color: transparent; color: inherit; box-shadow: none; }
.btn-ghost:hover { box-shadow: none; }
.topbar .btn-ghost { color: #e2fbfc; }
.btn-sm { padding: 6px 10px; font-size: 0.85rem; }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn-link { background: none; border: none; cursor: pointer; font-size: 0.95rem; padding: 0; color: inherit; }
.btn-hero-ghost { background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.55); color: #fff; }
.btn-hero-ghost:hover { background: rgba(255,255,255,0.26); }

/* ===== Flash ===== */
.flash {
  max-width: 900px;
  margin: 12px auto 0;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.95rem;
  animation: slideDown 0.3s ease both;
}
.flash-ok { background: var(--ok-bg); color: var(--ok-text); }
.flash-err { background: var(--err-bg); color: var(--err-text); }

/* ===== Accueil public (style vitrine) ===== */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--hero-grad);
  background-size: 300% 300%;
  animation: gradShift 12s ease infinite;
  color: #fff;
  text-align: center;
  border-radius: 0 0 26px 26px;
  padding: 56px 22px 48px;
  margin: -20px -16px 24px;
}
.hero::before, .hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  background: rgba(255, 255, 255, 0.09);
  animation: floatBlob 9s ease-in-out infinite;
}
.hero::before { width: 210px; height: 210px; top: -70px; right: -60px; }
.hero::after { width: 150px; height: 150px; bottom: -50px; left: -40px; animation-delay: 4.5s; }
.hero-inner { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; }
.hero h1 { font-size: 2rem; line-height: 1.25; margin: 0 0 14px; font-weight: 800; }
.hero .hl { color: var(--accent-strong); color: #ffc95e; }
.hero .hl-soft { color: #9ff0f3; font-weight: 700; }
.hero-sub { max-width: 590px; margin: 0 auto 22px; color: #d8f6f7; font-size: 1.05rem; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 22px; }
.btn .arrow { display: inline-block; transition: transform 0.15s ease; }
.btn:hover .arrow { transform: translateX(4px); }

@keyframes floatBlob {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(18px) scale(1.07); }
}

.exam-chips { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.exam-chip {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  transition: transform 0.15s ease, background 0.15s ease;
}
.exam-chip:hover { transform: scale(1.08); background: rgba(255, 255, 255, 0.3); }

.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.pillar { text-align: center; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.pillar:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.pillar-icon { font-size: 2.1rem; margin-bottom: 6px; animation: pop 3.5s ease infinite; }
.pillar:nth-child(2) .pillar-icon { animation-delay: 1.2s; }
.pillar:nth-child(3) .pillar-icon { animation-delay: 2.4s; }
.pillar h3 { margin: 4px 0 8px; font-size: 1.05rem; }
.landing-cta { margin: 24px 0; }

/* ===== Photos ===== */
.photo-list { display: flex; flex-direction: column; gap: 18px; }
.photo-item { margin: 0; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.photo-item img { max-width: 100%; border-radius: 8px; border: 1px solid var(--border); transition: transform 0.15s ease; }
.photo-item a:hover img { transform: scale(1.01); }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs img { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }

/* ===== Audio ===== */
.audio-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
.audio-row audio { flex: 1; min-width: 220px; }

/* ===== Enregistreur ===== */
.recorder {
  border: 1px dashed var(--primary);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-soft);
}
.rec-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rec-timer { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--muted); }
.recorder audio { width: 100%; }
.alt-upload summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; }
.alt-upload input { margin-top: 8px; }

/* ===== Commentaires ===== */
.comments h2 { font-size: 1.2rem; margin-top: 28px; }
.comment { padding: 14px 16px; animation: fadeUp 0.4s ease both; }
.comment-mentor { border-left: 4px solid var(--accent); }
.comment-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 0.92rem; }
.comment-head .inline-form { margin-left: auto; }
.comment-body { white-space: pre-wrap; margin: 8px 0 2px; }
.comment-form-card { margin-top: 18px; }
.note-card { border-left: 4px solid var(--primary); }
.note-card p { white-space: pre-wrap; margin: 4px 0 0; }
.note-card h3 { margin: 0 0 4px; font-size: 0.95rem; color: var(--muted); }

/* ===== Conseils & contrôle qualité photo ===== */
.photo-tips {
  border: 1px dashed var(--primary);
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--bg-soft);
  margin-bottom: 4px;
}
.photo-tips summary { cursor: pointer; font-weight: 600; color: var(--primary-deep); }
.photo-tips ol { margin: 10px 0 4px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 0.92rem; }
.thumb-box { display: flex; flex-direction: column; gap: 4px; width: 130px; }
.thumb-box img { width: 130px; height: 130px; object-fit: cover; border-radius: 8px; border: 2px solid var(--border); }
.thumb-box.thumb-bad img { border-color: var(--accent); }
.thumb-note { font-size: 0.72rem; line-height: 1.35; color: var(--wait-text); }
.thumb-note.thumb-ok { color: var(--ok-text); }

/* ===== Test de qualification mentor ===== */
.test-card { max-width: 640px; }
.countdown-bar {
  position: sticky;
  top: 64px;
  z-index: 30;
  background: var(--primary-light);
  color: var(--primary-deep);
  border: 1px solid var(--primary);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 1.05rem;
  margin-bottom: 14px;
}
.countdown-bar.countdown-warn { background: var(--err-bg); color: var(--err-text); border-color: var(--err-text); }
.cloze { white-space: pre-wrap; line-height: 2.1; font-size: 1.02rem; }
.cloze-input {
  display: inline-block;
  width: 130px;
  padding: 4px 8px;
  margin: 0 2px;
  border: 1.5px solid var(--primary);
  border-radius: 6px;
  font: inherit;
  background: var(--bg-soft);
}
.cloze-review .cloze-answer {
  display: inline-block;
  padding: 1px 8px;
  margin: 0 2px;
  border-radius: 6px;
  font-weight: 600;
}
.cloze-answer.ok { background: var(--done-bg); color: var(--done-text); }
.cloze-answer.ko { background: var(--err-bg); color: var(--err-text); }
.cloze-answer.ko small { font-weight: 400; }
.score-line { display: flex; align-items: center; gap: 16px; }

/* ===== Livres ===== */
.book-card { text-align: center; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.book-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.book-card h2 { font-size: 1.02rem; margin: 10px 0 4px; }
.book-cover {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--bg-soft);
}
.book-cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  height: 140px;
  border: 1px dashed var(--border);
}
.book-admin-row { display: flex; align-items: center; gap: 12px; }
.book-thumb { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; font-size: 1.6rem; }

/* ===== Formations verrouillées & paiement ===== */
.course-locked { opacity: 0.78; }
.course-locked:hover { transform: none; box-shadow: none; }
.course-full-msg { font-weight: 600; color: var(--wait-text); background: var(--wait-bg); border-radius: 8px; padding: 10px 12px; }
.payment-methods { display: flex; flex-direction: column; gap: 10px; margin: 10px 0 14px; }
.payment-method {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--bg-soft);
}
.pm-icon { font-size: 1.6rem; }
.pm-number { font-size: 1.15rem; font-weight: 800; letter-spacing: 1px; color: var(--primary-deep); }
.price-line { font-size: 1.2rem; font-weight: 800; color: var(--primary-dark); margin: 4px 0 10px; }

/* ===== Leçons du jour ===== */
.lesson-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
  border-left: 4px solid var(--accent);
  background: var(--accent-light);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.lesson-banner:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.lesson-banner-icon { font-size: 2rem; }
.lesson-phase h2 { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; margin: 0 0 10px; }
.phase-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.phase-num-accent { background: var(--accent); }
.lesson-text { white-space: pre-wrap; }
.lesson-answer-text {
  white-space: pre-wrap;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.lesson-exercise { border-left: 4px solid var(--accent); }
.exercise-actions { margin-top: 14px; border-top: 1px dashed var(--border); padding-top: 12px; }

/* ===== Dépliants des manuels ===== */
.manual-group summary {
  cursor: pointer;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
}
.manual-group summary::-webkit-details-marker { display: none; }
.manual-group summary::after { content: '▾'; margin-left: auto; color: var(--muted); transition: transform 0.2s ease; }
.manual-group[open] summary::after { content: '▴'; }
.manual-body { margin-top: 14px; }

/* ===== Formations ===== */
.course-card { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.course-card h2 { font-size: 1.15rem; margin: 8px 0 2px; }
.course-exams { font-size: 0.85rem; margin: 0 0 8px; }
.course-points { margin: 0 0 14px; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 0.92rem; }

/* ===== Administration & statistiques ===== */
.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.admin-row:last-child { border-bottom: none; }
.admin-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.assign-form { display: flex; align-items: center; gap: 6px; }
.assign-form select { width: auto; padding: 6px 8px; }

.stats-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.stat-card { text-align: center; }
.stat-value { font-size: 2.2rem; font-weight: 800; color: var(--primary); }
.stat-warn .stat-value { color: var(--accent-strong); }
.stat-label { font-weight: 600; }

/* ===== Navigation mobile (bas d'écran) ===== */
.bottom-nav { display: none; }

/* ===== Mobile ===== */
@media (max-width: 720px) {
  .page-head h1 { font-size: 1.25rem; }
  .actions .btn { flex: 1; }
  .container { padding: 14px 10px 30px; }
  .card { padding: 14px; }
  .logo { height: 30px; }
  .hero { padding: 40px 16px 36px; margin: -14px -10px 20px; }
  .hero h1 { font-size: 1.5rem; }
  .nav-desktop { display: none; }
  .field-row { flex-direction: column; gap: 14px; }

  body.with-bottomnav { padding-bottom: 74px; }
  body.with-bottomnav .footer { padding-bottom: 8px; }
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--card);
    border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    justify-content: space-around;
  }
  .bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: var(--muted);
    font-size: 1.25rem;
    line-height: 1.1;
    padding: 4px 10px;
    border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
  }
  .bottom-nav a span { font-size: 0.68rem; font-weight: 600; }
  .bottom-nav a:active { background: var(--primary-light); color: var(--primary-dark); transform: scale(0.95); }
}
