/* ═══════════════════════════════════════════════
   NADIA REY COACHING — Design System v3
   Palette: Élégance dorée minimaliste
═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Inter:wght@300;400;500;600&display=swap');

/* ── LIGHT THEME (default) ── */
:root {
  --bg-primary: #F7F3EE;
  --bg-secondary: #EFE7DD;
  --bg-card: #FFFFFF;
  --bg-sidebar: #2B2318;
  --bg-input: #FFFFFF;

  --text-primary: #2B2B2B;
  --text-secondary: #6B6B6B;
  --text-muted: #A09080;
  --text-inverse: #F7F3EE;
  --text-sidebar: rgba(247,243,238,0.55);
  --text-sidebar-active: #F7F3EE;

  --gold: #C6A15B;
  --gold-dark: #A68A64;
  --gold-pale: #F2E8D5;
  --gold-light: #E8D9BB;

  --border: #E8DED2;
  --border-strong: #D4C4B0;
  --border-focus: #C6A15B;

  --success: #4A9B7F;
  --warning: #C6A15B;
  --danger: #C0392B;
  --info: #6B8CAE;

  --shadow-xs: 0 1px 2px rgba(43,35,24,0.06);
  --shadow-sm: 0 2px 8px rgba(43,35,24,0.08);
  --shadow-md: 0 4px 20px rgba(43,35,24,0.10);
  --shadow-lg: 0 8px 40px rgba(43,35,24,0.14);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --sidebar-width: 220px;
  --panel-width: 600px;

  --transition: 0.2s ease;
}

/* ── DARK THEME ── */
[data-theme="dark"] {
  --bg-primary: #1C1A17;
  --bg-secondary: #241F19;
  --bg-card: #2B2520;
  --bg-sidebar: #161310;
  --bg-input: #2B2520;

  --text-primary: #F0E8DC;
  --text-secondary: #A09080;
  --text-muted: #6B5E50;
  --text-inverse: #1C1A17;
  --text-sidebar: rgba(240,232,220,0.45);
  --text-sidebar-active: #F0E8DC;

  --gold: #C6A15B;
  --gold-dark: #A68A64;
  --gold-pale: rgba(198,161,91,0.12);
  --gold-light: rgba(198,161,91,0.2);

  --border: rgba(240,232,220,0.08);
  --border-strong: rgba(240,232,220,0.15);
  --border-focus: #C6A15B;

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.35);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}
a { color: inherit; text-decoration: none; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }

/* ══════════════════════════════
   TYPOGRAPHY
══════════════════════════════ */
.t-display { font-family: var(--font-display); font-weight: 500; }
.t-display-italic { font-family: var(--font-display); font-style: italic; font-weight: 400; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.2; }
h1 { font-size: 32px; }
h2 { font-size: 24px; font-weight: 400; }
h3 { font-size: 20px; font-weight: 400; }
h4 { font-size: 16px; font-weight: 500; font-family: var(--font-body); }
p { color: var(--text-secondary); line-height: 1.65; }

/* ══════════════════════════════
   INPUTS
══════════════════════════════ */
input, textarea, select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-input);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, textarea:focus, select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(198,161,91,0.12);
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
input[readonly] { background: var(--bg-secondary); color: var(--text-secondary); cursor: default; }
textarea { resize: vertical; }
label { font-size: 11px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.07em; display: block; margin-bottom: 6px; }

/* ══════════════════════════════
   BUTTONS
══════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border: none; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all var(--transition); text-decoration: none;
  white-space: nowrap;
}
.btn-gold {
  background: var(--gold); color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(198,161,91,0.3);
}
.btn-gold:hover { background: var(--gold-dark); box-shadow: 0 4px 14px rgba(198,161,91,0.4); transform: translateY(-1px); }
.btn-dark { background: var(--text-primary); color: var(--text-inverse); }
.btn-dark:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg-secondary); border-color: var(--border-strong); }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid rgba(192,57,43,0.2); }
.btn-danger:hover { background: rgba(192,57,43,0.06); }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-full { width: 100%; }
.btn-icon { background: none; border: none; cursor: pointer; padding: 6px; border-radius: var(--radius-sm); color: var(--text-muted); transition: all var(--transition); display: inline-flex; align-items: center; justify-content: center; }
.btn-icon:hover { background: var(--bg-secondary); color: var(--text-primary); }
.btn-icon.danger:hover { background: rgba(192,57,43,0.08); color: var(--danger); }

/* ══════════════════════════════
   CARDS
══════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition);
}
.card:hover { box-shadow: var(--shadow-sm); }
.card-clickable { cursor: pointer; }
.card-clickable:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

/* ══════════════════════════════
   BRAND MARK
══════════════════════════════ */
.brand-mark {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--gold); color: #FFFFFF;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 14px; font-weight: 600;
  flex-shrink: 0; overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-mark.sm { width: 32px; height: 32px; font-size: 11px; }
.brand-mark.lg { width: 52px; height: 52px; font-size: 18px; }
.brand-mark.xl { width: 72px; height: 72px; font-size: 24px; }

/* ══════════════════════════════
   STATUS BADGE
══════════════════════════════ */
.status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: 20px;
  font-size: 11px; font-weight: 500; white-space: nowrap;
  background: var(--gold-pale); color: var(--gold-dark);
}
.status-pill.green { background: rgba(74,155,127,0.12); color: #2E7D5C; }
.status-pill.blue { background: rgba(107,140,174,0.12); color: #4A6F96; }

/* ══════════════════════════════
   PROGRESS BAR
══════════════════════════════ */
.prog-wrap { display: flex; flex-direction: column; gap: 6px; }
.prog-bar-track { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.prog-bar-fill { height: 100%; background: linear-gradient(90deg, var(--gold), #D4A843); border-radius: 2px; transition: width 0.5s ease; }
.prog-meta { display: flex; justify-content: space-between; align-items: center; }
.prog-pct { font-size: 13px; font-weight: 600; color: var(--gold); }
.prog-label { font-size: 12px; color: var(--text-muted); }

/* ══════════════════════════════
   FORM GROUPS
══════════════════════════════ */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.required { color: var(--gold); }
.error-msg { font-size: 12px; color: var(--danger); margin-top: 6px; min-height: 18px; }

/* ══════════════════════════════
   MODAL
══════════════════════════════ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(43,35,24,0.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 500; padding: 1rem;
}
.modal-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  width: 100%; max-width: 460px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh; overflow-y: auto;
}
.modal-box.wide { max-width: 580px; }
.modal-box h3 { font-family: var(--font-display); font-size: 22px; font-weight: 400; margin-bottom: 1.5rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 1.5rem; }

/* ══════════════════════════════
   APP LAYOUT
══════════════════════════════ */
.app-page { height: 100vh; overflow: hidden; }
.app-layout { display: flex; height: 100vh; }

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-width); flex-shrink: 0;
  background: var(--bg-sidebar);
  display: flex; flex-direction: column;
  padding: 0;
  transition: background var(--transition);
}
.sidebar-top { padding: 1.5rem 1.25rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.06); }
.sidebar-brand { display: flex; align-items: center; gap: 10px; }
.sidebar-brand-name { font-family: var(--font-display); font-size: 16px; color: #F0E8DC; line-height: 1.2; }
.sidebar-brand-sub { font-size: 10px; color: rgba(240,232,220,0.4); letter-spacing: 0.08em; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 1rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.06); margin-bottom: 0.5rem; cursor: pointer; transition: background var(--transition); }
.sidebar-user:hover { background: rgba(255,255,255,0.04); }
.sidebar-user-name { font-size: 13px; color: rgba(240,232,220,0.8); font-weight: 500; }
.sidebar-user-role { font-size: 11px; color: rgba(240,232,220,0.35); }
.sidebar-nav { flex: 1; padding: 0.5rem 0.75rem; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 12px;
  background: transparent; border: none;
  color: var(--text-sidebar);
  font-family: var(--font-body); font-size: 13px;
  border-radius: var(--radius-sm);
  cursor: pointer; transition: all var(--transition);
  text-align: left; position: relative;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: var(--text-sidebar-active); }
.nav-item.active { background: rgba(198,161,91,0.15); color: var(--gold-light); }
.nav-item svg { flex-shrink: 0; opacity: 0.7; }
.nav-item.active svg { opacity: 1; }
.nav-badge {
  margin-left: auto; background: var(--gold); color: #FFF;
  border-radius: 10px; padding: 1px 7px; font-size: 10px; font-weight: 600;
}
.sidebar-bottom { padding: 1rem 0.75rem; border-top: 1px solid rgba(255,255,255,0.06); display: flex; flex-direction: column; gap: 6px; }
.btn-theme-toggle {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 8px 12px;
  background: transparent; border: none;
  color: rgba(240,232,220,0.4); font-family: var(--font-body); font-size: 12px;
  border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition);
}
.btn-theme-toggle:hover { background: rgba(255,255,255,0.05); color: rgba(240,232,220,0.7); }
.btn-logout-sidebar {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 8px 12px;
  background: transparent; border: none;
  color: rgba(240,232,220,0.35); font-family: var(--font-body); font-size: 12px;
  border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition);
}
.btn-logout-sidebar:hover { background: rgba(192,57,43,0.12); color: rgba(220,100,80,0.9); }

/* ── MAIN CONTENT ── */
.main-content { flex: 1; overflow: hidden; display: flex; flex-direction: column; background: var(--bg-primary); }
.section { display: none !important; flex: 1; flex-direction: column; overflow: hidden; }
.section.active { display: flex !important; }
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem 2rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.page-header h2 { font-family: var(--font-display); font-size: 26px; font-weight: 400; color: var(--text-primary); }
.page-scroll { flex: 1; overflow-y: auto; padding: 1.5rem 2rem; }

/* ══════════════════════════════
   LOGIN PAGE
══════════════════════════════ */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--bg-primary);
  background-image: radial-gradient(ellipse 70% 60% at 15% 15%, rgba(198,161,91,0.07) 0%, transparent 70%),
                    radial-gradient(ellipse 50% 70% at 85% 85%, rgba(166,138,100,0.05) 0%, transparent 70%);
}
.login-container { width: 100%; max-width: 420px; padding: 2rem; }
.login-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 3rem 2.5rem; box-shadow: var(--shadow-lg); }
.login-logo { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-bottom: 2rem; }
.login-logo-mark { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--gold), var(--gold-dark)); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 22px; font-weight: 600; color: #FFF; box-shadow: 0 4px 20px rgba(198,161,91,0.35); }
.login-logo h1 { font-family: var(--font-display); font-size: 26px; font-weight: 500; color: var(--text-primary); text-align: center; line-height: 1.2; }
.login-logo p { font-size: 12px; color: var(--text-muted); letter-spacing: 0.12em; text-transform: uppercase; text-align: center; }
.login-divider { height: 1px; background: var(--border); margin: 1.75rem 0; }
.login-fields { display: flex; flex-direction: column; gap: 14px; }
.login-footer { text-align: center; font-size: 12px; color: var(--text-muted); margin-top: 1.25rem; }

/* ══════════════════════════════
   COACH — DASHBOARD
══════════════════════════════ */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 1.5rem; }
.stat-card { padding: 1.25rem 1.5rem; }
.stat-num { font-family: var(--font-display); font-size: 40px; font-weight: 500; line-height: 1; color: var(--text-primary); }
.stat-num.gold { color: var(--gold); }
.stat-num.green { color: var(--success); }
.stat-num.muted { color: var(--text-muted); }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.dashboard-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.col-title { font-family: var(--font-display); font-size: 18px; font-weight: 400; color: var(--text-primary); margin-bottom: 1rem; }
.action-card { display: flex; align-items: center; gap: 12px; padding: 14px; cursor: pointer; margin-bottom: 8px; transition: all var(--transition); }
.action-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.action-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--gold); color: #FFF; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 13px; flex-shrink: 0; overflow: hidden; }
.action-avatar img { width: 100%; height: 100%; object-fit: cover; }
.action-info { flex: 1; min-width: 0; }
.action-name { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.action-next { font-size: 12px; color: var(--gold); margin-top: 1px; }
.action-status-col { margin-left: auto; flex-shrink: 0; }

/* ══════════════════════════════
   COACH — ACCOMPAGNÉS LIST
══════════════════════════════ */
.filter-bar { display: flex; gap: 8px; padding: 1rem 2rem; border-bottom: 1px solid var(--border); flex-shrink: 0; flex-wrap: wrap; }
.filter-pill { padding: 6px 16px; background: transparent; border: 1px solid var(--border); border-radius: 20px; font-size: 12px; font-family: var(--font-body); cursor: pointer; color: var(--text-secondary); transition: all var(--transition); }
.filter-pill:hover { background: var(--gold-pale); border-color: var(--gold); color: var(--gold-dark); }
.filter-pill.active { background: var(--text-primary); color: var(--text-inverse); border-color: var(--text-primary); }
.acc-list { flex: 1; overflow-y: auto; padding: 1.25rem 2rem; display: flex; flex-direction: column; gap: 8px; }
.acc-row {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; cursor: pointer;
  transition: all var(--transition);
}
.acc-row:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.acc-info { flex: 1; min-width: 0; }
.acc-name { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.acc-program { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.acc-meta { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.acc-prog-col { min-width: 100px; }
.acc-action-text { font-size: 12px; color: var(--gold); max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ══════════════════════════════
   SIDE PANEL
══════════════════════════════ */
.side-panel {
  position: fixed; top: 0; right: 0;
  width: var(--panel-width); height: 100vh;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  z-index: 300; display: none; flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.panel-backdrop { position: fixed; inset: 0; background: rgba(43,35,24,0.4); z-index: 299; display: none; backdrop-filter: blur(2px); }
.panel-head { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.panel-identity { display: flex; align-items: center; gap: 14px; }
.panel-close { background: none; border: none; font-size: 18px; cursor: pointer; color: var(--text-muted); width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: all var(--transition); }
.panel-close:hover { background: var(--bg-secondary); color: var(--text-primary); }
.panel-tabs { display: flex; border-bottom: 1px solid var(--border); flex-shrink: 0; overflow-x: auto; padding: 0; }
.ptab { padding: 11px 16px; background: none; border: none; border-bottom: 2px solid transparent; font-family: var(--font-body); font-size: 12px; font-weight: 500; color: var(--text-muted); cursor: pointer; white-space: nowrap; transition: all var(--transition); letter-spacing: 0.03em; }
.ptab:hover { color: var(--text-primary); }
.ptab.active { color: var(--gold-dark); border-bottom-color: var(--gold); }
.panel-body { flex: 1; overflow-y: auto; padding: 1.5rem; }
.ptab-content { display: none; }
.ptab-content.active { display: block; }

/* ── FICHE SECTIONS ── */
.fiche-section { margin-bottom: 1.75rem; padding-bottom: 1.75rem; border-bottom: 1px solid var(--border); }
.fiche-section:last-child { border-bottom: none; margin-bottom: 0; }
.fiche-section h4 { font-family: var(--font-display); font-size: 17px; font-weight: 400; color: var(--text-primary); margin-bottom: 1rem; }

/* ── EMOTIONS ── */
.emo-grid { display: flex; flex-direction: column; gap: 10px; }
.emo-row { display: grid; grid-template-columns: 80px 1fr 36px; align-items: center; gap: 10px; font-size: 13px; color: var(--text-secondary); }
.emo-track { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.emo-fill { height: 100%; border-radius: 3px; transition: width 0.5s; }
.emo-fill.positive { background: var(--success); }
.emo-fill.warning { background: var(--gold); }
.emo-val { font-size: 12px; color: var(--text-muted); text-align: right; }

/* ── MODULES PANEL ── */
.module-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; transition: all var(--transition); }
.module-item.unlocked { border-color: rgba(74,155,127,0.3); background: rgba(74,155,127,0.03); }
.module-item.locked { background: var(--bg-secondary); opacity: 0.75; }
.module-head { display: flex; align-items: center; gap: 10px; }
.module-lock { font-size: 14px; flex-shrink: 0; }
.module-title-area { flex: 1; }
.module-order { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.module-title-area strong { font-size: 13px; color: var(--text-primary); }
.module-btns { display: flex; gap: 4px; }
.module-desc-text { font-size: 13px; color: var(--text-secondary); margin-top: 8px; padding-left: 24px; line-height: 1.5; }
.module-ex-tag { display: inline-flex; font-size: 11px; color: var(--gold-dark); background: var(--gold-pale); padding: 3px 10px; border-radius: 10px; margin-top: 6px; margin-left: 24px; }

/* ── RESSOURCES PANEL ── */
.ressource-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; }
.ressource-icon { font-size: 22px; }
.ressource-info { flex: 1; }
.ressource-info strong { font-size: 13px; color: var(--text-primary); display: block; }
.ressource-info span { font-size: 12px; color: var(--text-muted); }
.ressource-btns { display: flex; gap: 6px; flex-shrink: 0; }

/* ── JOURNAL PANEL ── */
.journal-entry { padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; }
.journal-entry-date { font-size: 11px; color: var(--text-muted); text-transform: capitalize; margin-bottom: 6px; }
.journal-entry-text { font-size: 13px; color: var(--text-primary); line-height: 1.65; }
.coach-comment-block { margin-top: 12px; padding: 10px 14px; background: var(--gold-pale); border-radius: var(--radius-sm); font-size: 13px; line-height: 1.5; color: var(--text-primary); }
.coach-comment-label { font-weight: 600; color: var(--gold-dark); margin-right: 6px; font-size: 12px; }
.comment-input-row { display: flex; gap: 8px; margin-top: 10px; }
.comment-input-row input { flex: 1; }

/* ── HISTORIQUE ── */
.hist-timeline { display: flex; flex-direction: column; }
.hist-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; }
.hist-dot-col { display: flex; flex-direction: column; align-items: center; }
.hist-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--border); border: 2px solid var(--border-strong); flex-shrink: 0; margin-top: 2px; }
.hist-item.done .hist-dot { background: var(--success); border-color: var(--success); }
.hist-line { width: 2px; height: 20px; background: var(--border); margin-top: 2px; }
.hist-item.done .hist-line { background: var(--success); }
.hist-label { font-size: 13px; color: var(--text-muted); padding-top: 1px; }
.hist-item.done .hist-label { color: var(--text-primary); font-weight: 500; }

/* ══════════════════════════════
   MESSAGES / CHAT
══════════════════════════════ */
.chat-layout { display: flex; flex: 1; overflow: hidden; }
.chat-list { width: 260px; flex-shrink: 0; border-right: 1px solid var(--border); display: flex; flex-direction: column; background: var(--bg-card); }
.chat-list-top { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.chat-list-top h3 { font-family: var(--font-display); font-size: 19px; font-weight: 400; }
.chat-threads { flex: 1; overflow-y: auto; }
.thread-row { display: flex; align-items: center; gap: 10px; padding: 12px 1rem; cursor: pointer; border-bottom: 1px solid var(--border); transition: background var(--transition); position: relative; }
.thread-row:hover { background: var(--bg-secondary); }
.thread-row.active { background: var(--gold-pale); }
.thread-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--gold); color: #FFF; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 13px; flex-shrink: 0; overflow: hidden; position: relative; }
.thread-avatar img { width: 100%; height: 100%; object-fit: cover; }
.thread-info { flex: 1; min-width: 0; }
.thread-name { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.thread-preview { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unread-badge { position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--gold); color: #FFF; font-size: 9px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.chat-window { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.chat-empty-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-muted); gap: 12px; }
.chat-empty-state p { font-family: var(--font-display); font-size: 17px; font-style: italic; }
.chat-topbar { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); background: var(--bg-card); flex-shrink: 0; }
.chat-topbar-left { display: flex; align-items: center; gap: 12px; }
.chat-topbar-name { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.chat-topbar-sub { font-size: 12px; color: var(--text-muted); }
.chat-messages { flex: 1; overflow-y: auto; padding: 1.25rem; display: flex; flex-direction: column; gap: 10px; background: var(--bg-primary); }
.chat-input-row { padding: 1rem 1.25rem; border-top: 1px solid var(--border); display: flex; gap: 10px; align-items: flex-end; background: var(--bg-card); flex-shrink: 0; }
.chat-input-row textarea { flex: 1; resize: none; min-height: 42px; max-height: 110px; border-radius: 21px; padding: 11px 18px; font-size: 13px; background: var(--bg-secondary); border-color: transparent; }
.chat-input-row textarea:focus { border-color: var(--border-focus); background: var(--bg-card); }
.send-btn { width: 42px; height: 42px; border-radius: 50%; background: var(--gold); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #FFF; flex-shrink: 0; transition: all var(--transition); box-shadow: 0 2px 8px rgba(198,161,91,0.3); }
.send-btn:hover { background: var(--gold-dark); transform: scale(1.05); }
.msg-group { display: flex; flex-direction: column; gap: 3px; }
.msg-group.mine { align-items: flex-end; }
.msg-group.theirs { align-items: flex-start; }
.msg-sender-name { font-size: 11px; color: var(--text-muted); padding: 0 4px; }
.bubble { max-width: 72%; padding: 10px 16px; font-size: 13.5px; line-height: 1.55; border-radius: 18px; }
.bubble.mine { background: var(--gold); color: #FFF; border-radius: 18px 18px 4px 18px; }
.bubble.theirs { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border); border-radius: 18px 18px 18px 4px; }
.msg-time { font-size: 10px; color: var(--text-muted); padding: 0 4px; }
.date-sep { text-align: center; font-size: 11px; color: var(--text-muted); padding: 8px 0; display: flex; align-items: center; gap: 10px; }
.date-sep::before, .date-sep::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.ticks { display: inline-flex; align-items: center; margin-left: 4px; }
.ticks-sent { color: rgba(255,255,255,0.5); }
.ticks-read { color: rgba(255,255,255,0.95); }
.btn-fiche-link { padding: 6px 14px; background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 12px; font-weight: 500; color: var(--text-secondary); cursor: pointer; font-family: var(--font-body); transition: all var(--transition); }
.btn-fiche-link:hover { background: var(--gold-pale); border-color: var(--gold); color: var(--gold-dark); }

/* ══════════════════════════════
   ACCOMPAGNÉ — DASHBOARD
══════════════════════════════ */
.acc-dashboard { flex: 1; overflow-y: auto; padding: 2rem; display: flex; flex-direction: column; gap: 1.5rem; }
.acc-header { margin-bottom: 0.5rem; }
.acc-greeting { font-family: var(--font-display); font-size: 32px; font-weight: 400; color: var(--text-primary); margin-bottom: 4px; }
.acc-greeting em { font-style: italic; color: var(--gold-dark); }
.acc-date-line { font-size: 13px; color: var(--text-muted); }
.acc-subtitle { font-size: 14px; color: var(--text-secondary); margin-top: 6px; }

/* Main progress card */
.progress-main-card { padding: 1.75rem 2rem; }
.progress-main-card .prog-title { font-family: var(--font-display); font-size: 17px; font-weight: 400; color: var(--text-primary); margin-bottom: 1.25rem; }
.prog-status-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; flex-wrap: wrap; gap: 8px; }
.prog-big-pct { font-family: var(--font-display); font-size: 44px; font-weight: 500; color: var(--gold); line-height: 1; }

/* Action card */
.action-main-card { padding: 1.75rem 2rem; border-left: 3px solid var(--gold); }
.action-main-card .action-label { font-size: 11px; font-weight: 600; color: var(--gold); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; }
.action-main-card .action-title { font-family: var(--font-display); font-size: 20px; font-weight: 400; color: var(--text-primary); margin-bottom: 8px; }
.action-main-card .action-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 1.25rem; }
.action-main-card .action-cta { }

/* Mini timeline (3 states) */
.mini-timeline { display: flex; align-items: center; gap: 0; }
.mini-step { display: flex; align-items: center; flex: 1; }
.mini-step-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); border: 2px solid var(--border-strong); flex-shrink: 0; }
.mini-step-dot.done { background: var(--success); border-color: var(--success); }
.mini-step-dot.current { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 4px rgba(198,161,91,0.2); }
.mini-step-line { flex: 1; height: 2px; background: var(--border); }
.mini-step-line.done { background: var(--success); }
.mini-step-info { display: flex; flex-direction: column; align-items: center; gap: 4px; }

/* Quick access cards */
.quick-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.quick-card { padding: 1.25rem; cursor: pointer; transition: all var(--transition); display: flex; flex-direction: column; gap: 8px; }
.quick-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--gold); }
.quick-card-icon { font-size: 24px; }
.quick-card-title { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.quick-card-info { font-size: 12px; color: var(--text-muted); line-height: 1.4; }

/* ══════════════════════════════
   ACCOMPAGNÉ — PARCOURS
══════════════════════════════ */
.parcours-locked-msg { text-align: center; padding: 4rem 2rem; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.parcours-locked-msg .lock-icon { font-size: 56px; }
.parcours-locked-msg h3 { font-family: var(--font-display); font-size: 24px; font-weight: 400; }
.parcours-locked-msg p { font-size: 14px; color: var(--text-secondary); max-width: 380px; line-height: 1.65; }
.parcours-modules-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; padding: 1.5rem 2rem; overflow-y: auto; }
.module-card-acc { border-radius: var(--radius); padding: 1.5rem; display: flex; flex-direction: column; gap: 10px; transition: all var(--transition); }
.module-card-acc.unlocked { background: var(--bg-card); border: 1px solid var(--border); cursor: pointer; }
.module-card-acc.unlocked:hover { border-color: var(--gold); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.module-card-acc.locked { background: var(--bg-secondary); border: 1px dashed var(--border); opacity: 0.6; }
.mc-step { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }
.mc-lock-icon { font-size: 22px; }
.mc-title { font-size: 15px; font-weight: 500; color: var(--text-primary); }
.mc-desc-text { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.mc-ex-badge { font-size: 11px; color: var(--gold-dark); background: var(--gold-pale); padding: 3px 10px; border-radius: 10px; width: fit-content; }
.parc-prog-header { padding: 1.5rem 2rem 0; }
.parc-prog-label { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }

/* ══════════════════════════════
   RESSOURCES ACCOMPAGNÉ
══════════════════════════════ */
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.res-card { padding: 1.5rem; display: flex; flex-direction: column; gap: 10px; transition: all var(--transition); }
.res-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.res-card-icon { font-size: 36px; }
.res-card-title { font-size: 15px; font-weight: 500; color: var(--text-primary); }
.res-card-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; flex: 1; }
.res-empty { text-align: center; padding: 4rem 2rem; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.res-empty .res-empty-icon { font-size: 48px; }
.res-empty h3 { font-family: var(--font-display); font-size: 22px; font-weight: 400; }
.res-empty p { font-size: 14px; color: var(--text-muted); max-width: 340px; line-height: 1.6; }

/* ══════════════════════════════
   JOURNAL ACCOMPAGNÉ
══════════════════════════════ */
.journal-compose-area { padding: 1.5rem 2rem; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.journal-compose-area h4 { font-family: var(--font-display); font-size: 18px; font-weight: 400; margin-bottom: 12px; }
.journal-compose-area textarea { margin-bottom: 10px; }
.journal-entries-list { flex: 1; overflow-y: auto; padding: 1.25rem 2rem; display: flex; flex-direction: column; gap: 12px; }
.journal-card { padding: 1.25rem 1.5rem; }
.journal-card-date { font-size: 11px; color: var(--text-muted); text-transform: capitalize; margin-bottom: 8px; }
.journal-card-text { font-size: 14px; color: var(--text-primary); line-height: 1.65; }
.journal-coach-reply { margin-top: 14px; padding: 12px 16px; background: var(--gold-pale); border-radius: var(--radius-sm); }
.journal-coach-reply-label { font-size: 11px; font-weight: 600; color: var(--gold-dark); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.journal-coach-reply-text { font-size: 13px; color: var(--text-primary); line-height: 1.55; }

/* ══════════════════════════════
   PROFIL PAGE
══════════════════════════════ */
.profil-page-content { flex: 1; overflow-y: auto; padding: 2rem; max-width: 680px; }
.profil-photo-section { display: flex; align-items: center; gap: 1.5rem; padding: 1.75rem; margin-bottom: 1.5rem; }
.profil-photo-wrap { position: relative; width: 80px; height: 80px; flex-shrink: 0; }
.profil-photo-wrap .brand-mark { width: 80px; height: 80px; font-size: 26px; }
.photo-edit-btn { position: absolute; bottom: 0; right: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: #FFF; border: 2px solid var(--bg-card); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 12px; transition: all var(--transition); }
.photo-edit-btn:hover { background: var(--gold-dark); transform: scale(1.1); }
.profil-photo-info h4 { font-size: 16px; font-weight: 500; color: var(--text-primary); margin-bottom: 4px; }
.profil-photo-info p { font-size: 13px; color: var(--text-muted); }
.settings-section { padding: 1.5rem; margin-bottom: 1.25rem; }
.settings-section h4 { font-family: var(--font-display); font-size: 17px; font-weight: 400; margin-bottom: 1.25rem; color: var(--text-primary); }
.setting-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
.setting-row:last-child { border-bottom: none; }
.setting-info { display: flex; flex-direction: column; gap: 3px; }
.setting-label { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.setting-desc { font-size: 12px; color: var(--text-muted); }
.lang-select { width: auto; padding: 6px 12px; font-size: 13px; }
.theme-toggle { display: flex; gap: 6px; }
.theme-btn { padding: 6px 14px; border: 1px solid var(--border); border-radius: 20px; font-size: 12px; font-family: var(--font-body); cursor: pointer; background: transparent; color: var(--text-secondary); transition: all var(--transition); }
.theme-btn.active { background: var(--text-primary); color: var(--text-inverse); border-color: var(--text-primary); }

/* ══════════════════════════════
   PROFIL FORM (multi-step)
══════════════════════════════ */
.form-page { min-height: 100vh; display: flex; align-items: flex-start; justify-content: center; padding: 2rem; background: var(--bg-primary); }
.form-card { width: 100%; max-width: 620px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 2.5rem; box-shadow: var(--shadow-lg); margin-bottom: 2rem; }
.form-card-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 1.75rem; padding-bottom: 1.75rem; border-bottom: 1px solid var(--border); }
.form-card-logo h2 { font-family: var(--font-display); font-size: 24px; font-weight: 400; }
.form-card-logo p { font-size: 13px; color: var(--text-muted); margin-top: 3px; line-height: 1.45; }
.form-progress-row { display: flex; align-items: center; gap: 14px; margin-bottom: 2rem; }
.form-prog-track { flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.form-prog-fill { height: 100%; background: var(--gold); border-radius: 2px; transition: width 0.35s ease; }
.form-prog-label { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.form-step { display: none; }
.form-step.active { display: block; }
.form-step h3 { font-family: var(--font-display); font-size: 22px; font-weight: 400; margin-bottom: 1.25rem; color: var(--text-primary); }
.form-hint { font-size: 13px; color: var(--text-muted); margin-bottom: 1rem; font-style: italic; }
.radio-group { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-group.col { flex-direction: column; gap: 8px; }
.radio-label { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; color: var(--text-primary); }
.radio-label input { width: auto; accent-color: var(--gold); }
.slider-list { display: flex; flex-direction: column; gap: 1.25rem; }
.slider-row { display: flex; flex-direction: column; gap: 8px; }
.slider-row .slider-label { font-size: 13px; font-weight: 500; color: var(--text-primary); display: flex; justify-content: space-between; }
.slider-val-display { color: var(--gold); font-weight: 600; }
.form-nav-row { display: flex; justify-content: space-between; align-items: center; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }

/* ══════════════════════════════
   INPUT RANGE
══════════════════════════════ */
input[type=range] { -webkit-appearance: none; height: 4px; background: var(--border); border-radius: 2px; outline: none; padding: 0; border: none; cursor: pointer; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--gold); cursor: pointer; box-shadow: 0 1px 4px rgba(198,161,91,0.4); }

/* ══════════════════════════════
   UTILITIES
══════════════════════════════ */
.hidden { display: none !important; }
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.gap-8 { gap: 8px; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4rem 2rem; gap: 14px; text-align: center; }
.empty-state .es-icon { font-size: 48px; opacity: 0.6; }
.empty-state h3 { font-family: var(--font-display); font-size: 22px; font-weight: 400; }
.empty-state p { font-size: 14px; color: var(--text-muted); max-width: 360px; line-height: 1.6; }

/* ══════════════════════════════
   SECTION NAV BAR (arrows)
══════════════════════════════ */
.section-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg-card);
}
.page-header-inner h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  color: var(--text-primary);
}
.section-nav-arrows {
  display: flex;
  gap: 6px;
}
.nav-arrow-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.nav-arrow-btn:hover {
  background: var(--gold-pale);
  border-color: var(--gold);
  color: var(--gold-dark);
}

/* ══════════════════════════════
   NADIA PHOTO IN CHAT
══════════════════════════════ */
#nadia-chat-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* ══════════════════════════════
   LIVRAISON 2 — NEW ELEMENTS
══════════════════════════════ */

/* Ptab badge */
.ptab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; border-radius: 8px;
  background: var(--gold); color: #fff;
  font-size: 9px; font-weight: 700; padding: 0 4px;
  margin-left: 4px; vertical-align: middle;
}

/* Library modal */
.library-search { margin-bottom: 1rem; }
.library-categories {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 1rem;
}
.lib-cat-btn {
  padding: 4px 12px; border-radius: 20px; font-size: 12px;
  font-family: var(--font-body); cursor: pointer;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-secondary); transition: all var(--transition);
}
.lib-cat-btn:hover, .lib-cat-btn.active {
  background: var(--gold-pale); border-color: var(--gold);
  color: var(--gold-dark);
}
.library-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; max-height: 380px; overflow-y: auto;
  padding-right: 4px; margin-bottom: 1rem;
}
.lib-module-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; cursor: pointer;
  transition: all var(--transition);
}
.lib-module-card:hover {
  border-color: var(--gold); background: var(--gold-pale);
  transform: translateY(-1px);
}
.lib-module-card-title {
  font-size: 13px; font-weight: 500; color: var(--text-primary);
  margin-bottom: 4px;
}
.lib-module-card-cat {
  font-size: 11px; color: var(--text-muted);
}
.lib-module-card-desc {
  font-size: 12px; color: var(--text-secondary);
  margin-top: 6px; line-height: 1.45;
}

/* Module drag handle */
.module-drag-handle {
  cursor: grab; color: var(--text-muted); padding: 0 4px;
  font-size: 14px; flex-shrink: 0;
}
.module-drag-handle:active { cursor: grabbing; }
.module-item.dragging {
  opacity: 0.5; border: 2px dashed var(--gold);
}
.module-item.drag-over {
  border-color: var(--gold); background: var(--gold-pale);
}

/* Exercice answers (coach view) */
.ex-answer-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 12px;
}
.ex-answer-module {
  font-size: 11px; font-weight: 600; color: var(--gold-dark);
  text-transform: uppercase; letter-spacing: .07em; margin-bottom: 4px;
}
.ex-answer-question {
  font-size: 13px; font-weight: 500; color: var(--text-primary);
  margin-bottom: 10px; font-style: italic;
}
.ex-answer-text {
  font-size: 14px; color: var(--text-primary); line-height: 1.65;
  padding: 12px 14px; background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}
.ex-answer-date {
  font-size: 11px; color: var(--text-muted); margin-top: 8px;
}
.ex-empty {
  text-align: center; padding: 2rem; color: var(--text-muted);
  font-size: 13px; font-style: italic;
}

/* Quiz options in modal */
.quiz-option-row {
  display: flex; gap: 8px; align-items: center; margin-bottom: 8px;
}
.quiz-option-row input { flex: 1; }

/* Module order buttons */
.module-order-btns {
  display: flex; flex-direction: column; gap: 2px; flex-shrink: 0;
}
.order-btn {
  background: none; border: 1px solid var(--border);
  border-radius: 4px; cursor: pointer; padding: 2px 6px;
  font-size: 10px; color: var(--text-muted);
  transition: all var(--transition); line-height: 1;
}
.order-btn:hover {
  background: var(--gold-pale); border-color: var(--gold);
  color: var(--gold-dark);
}

/* Quiz display in accompagné view */
.quiz-block {
  margin-top: 14px; padding: 14px;
  background: var(--bg-secondary); border-radius: var(--radius);
  border: 1px solid var(--border);
}
.quiz-block-title {
  font-size: 12px; font-weight: 600; color: var(--gold-dark);
  text-transform: uppercase; letter-spacing: .07em; margin-bottom: 10px;
}
.quiz-option-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 14px; margin-bottom: 6px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer;
  font-family: var(--font-body); font-size: 13px; color: var(--text-primary);
  text-align: left; transition: all var(--transition);
}
.quiz-option-btn:hover { border-color: var(--gold); background: var(--gold-pale); }
.quiz-option-btn.selected {
  border-color: var(--gold); background: var(--gold-pale);
  color: var(--gold-dark); font-weight: 500;
}
.quiz-submit-btn { margin-top: 10px; }

/* ══════════════════════════════
   NOTIFICATIONS CENTER (coach)
══════════════════════════════ */
.notif-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background var(--transition);
  position: relative;
}
.notif-item:hover { background: var(--bg-secondary); }
.notif-item.read { opacity: 0.6; }
.notif-icon { font-size: 22px; flex-shrink: 0; margin-top: 2px; }
.notif-body { flex: 1; }
.notif-text { font-size: 13px; color: var(--text-primary); line-height: 1.5; }
.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.notif-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold); flex-shrink: 0; margin-top: 6px;
}

/* Notifications accompagné */
.notif-acc-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
  position: relative;
}
.notif-acc-item.read { opacity: 0.55; }

/* ══════════════════════════════
   BOUTIQUE (coach admin)
══════════════════════════════ */
.boutique-admin-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px; border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 10px;
  background: var(--bg-card);
}
.boutique-admin-thumb {
  width: 52px; height: 68px; object-fit: cover;
  border-radius: 6px; flex-shrink: 0;
}
.boutique-admin-thumb-placeholder {
  width: 52px; height: 68px; border-radius: 6px;
  background: var(--bg-secondary); display: flex;
  align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
}
.boutique-admin-info { flex: 1; min-width: 0; }
.boutique-admin-title { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.boutique-admin-cat { font-size: 11px; color: var(--gold-dark); margin: 2px 0; }
.boutique-admin-desc { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.boutique-admin-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ══════════════════════════════
   BOUTIQUE (accompagné view)
══════════════════════════════ */
.boutique-cats {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.boutique-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.boutique-card {
  display: flex; flex-direction: column;
  overflow: hidden; transition: all var(--transition);
}
.boutique-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.boutique-cover {
  width: 100%; height: 200px; object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
}
.boutique-cover-placeholder {
  width: 100%; height: 200px;
  background: var(--gold-pale);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.boutique-card-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.boutique-cat-label { font-size: 10px; font-weight: 600; color: var(--gold-dark); text-transform: uppercase; letter-spacing: .07em; }
.boutique-title { font-size: 14px; font-weight: 500; color: var(--text-primary); line-height: 1.3; }
.boutique-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.5; flex: 1; }
.boutique-price { font-size: 16px; font-weight: 600; color: var(--gold); }

/* ══════════════════════════════
   SOCIAL LINKS
══════════════════════════════ */
.social-section { padding: 1.5rem; }
.social-section h4 { font-family: var(--font-display); font-size: 17px; font-weight: 400; margin-bottom: 1rem; color: var(--text-primary); }
.social-links-grid { display: flex; flex-direction: column; gap: 10px; }
.social-link-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); transition: all var(--transition); text-decoration: none; color: var(--text-primary); }
.social-link-row:hover { border-color: var(--gold); background: var(--gold-pale); }
.social-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.social-name { font-size: 13px; font-weight: 500; }
.social-handle { font-size: 12px; color: var(--text-muted); }
.social-edit-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.social-edit-row input { flex: 1; }

/* Suggestions */
.suggestions-compose { padding: 1.5rem; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.suggestions-list { flex: 1; overflow-y: auto; padding: 1rem 1.5rem; }
.suggestion-item { padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; }
.suggestion-date { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; }
.suggestion-text { font-size: 13px; color: var(--text-primary); line-height: 1.6; }
.suggestion-reply { margin-top: 10px; padding: 10px 12px; background: var(--gold-pale); border-radius: var(--radius-sm); font-size: 13px; }

/* ══════════════════════════════
   RESPONSIVE MOBILE
══════════════════════════════ */




/* ══════════════════════════════════════════════
   ALL SCREENS — GLOBAL FIXES
══════════════════════════════════════════════ */

/* Nadia avatar */
#nadia-chat-avatar img { width:100%; height:100%; object-fit:cover; border-radius:50%; }

/* Ticks always gold */
.ticks { color: #C6A15B !important; }
.ticks svg path { stroke: #C6A15B !important; }

/* Desktop/Mobile helpers */
.desktop-only { display: flex; flex-direction: column; }
.mobile-only { display: none; }

/* Thread unread badge */
.thread-unread-badge {
  position: absolute; top: -2px; right: -2px;
  min-width: 16px; height: 16px; border-radius: 8px;
  background: var(--gold); color: #fff;
  font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
}
.thread-row { position: relative; }

/* Mobile back button hidden by default */
.mobile-back-btn { display: none; }

/* Privacy buttons — FIXED */
.privacy-btn {
  padding: 8px 16px;
  border-radius: 20px;
  border: 2px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  opacity: 1 !important;
}
.privacy-btn.active-shared {
  background: var(--gold) !important;
  border-color: var(--gold) !important;
  color: #fff !important;
  font-weight: 600 !important;
  opacity: 1 !important;
}
.privacy-btn.active-private {
  background: #2B2B2B !important;
  border-color: #2B2B2B !important;
  color: #fff !important;
  font-weight: 600 !important;
  opacity: 1 !important;
}

/* Stars */
.prog-stars { font-size: 28px; letter-spacing: 3px; margin: 8px 0 4px; }

/* Section label */
.section-label {
  font-size: 11px; font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 12px;
}

/* Privacy badges */
.priv-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; padding: 2px 8px; border-radius: 10px; margin-left: 6px;
}
.priv-shared { background: var(--gold-pale); color: var(--gold-dark); }
.priv-private { background: var(--bg-secondary); color: var(--text-muted); border: 1px solid var(--border); }

/* Declic elements */
.declic-timer, .declic-counter {
  padding: 8px 12px; border-radius: 10px;
  font-size: 13px; margin-bottom: 8px;
}
.declic-timer { background: rgba(236,72,153,0.1); color: #EC4899; border: 1px solid rgba(236,72,153,0.2); }
.declic-counter { background: var(--gold-pale); color: var(--gold-dark); }

/* Shine animation — FIXED, actually moves */
@keyframes shine {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.btn-shine {
  background: linear-gradient(90deg, #A68A64 0%, #e8c97a 30%, #C6A15B 50%, #e8c97a 70%, #A68A64 100%) !important;
  background-size: 200% auto !important;
  animation: shine 2s linear infinite !important;
  color: #fff !important;
  border: none !important;
}
.btn-shine:hover { opacity: 0.9; }

/* Plus menu */
.plus-menu {
  position: fixed;
  bottom: 70px; right: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 8px;
  z-index: 300;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  min-width: 180px;
}
.plus-menu.hidden { display: none; }
.plus-menu-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 12px;
  background: none; border: none;
  border-radius: 10px; cursor: pointer;
  font-size: 14px; color: var(--text-primary);
  font-family: var(--font-body);
  text-align: left;
  transition: background 0.1s;
}
.plus-menu-item:hover { background: var(--bg-secondary); }
.plus-menu-item svg { color: var(--text-muted); flex-shrink: 0; }

/* Desktop plus menu repositioned */
@media (min-width: 769px) {
  .plus-menu {
    position: fixed;
    bottom: auto;
    top: auto;
    left: 220px;
    right: auto;
  }
  .sidebar {
    position: relative !important;
    height: 100% !important;
    width: 200px !important;
    flex-direction: column !important;
  }
}

/* ══════════════════════════════════════════════
   MOBILE (max-width: 768px)
══════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Layout */
  .app-layout { flex-direction: column; height: 100vh; }
  .main-content { flex: 1; overflow: hidden; position: relative; min-height: 0; }

  /* Sections — use position:fixed for reliable iOS scroll */
  .section { display: none !important; }
  .section.active {
    display: flex !important;
    flex-direction: column;
    position: fixed !important;
    top: 0 !important; left: 0 !important;
    right: 0 !important; bottom: 60px !important;
    overflow: hidden;
    background: var(--bg-primary);
    z-index: 10;
  }

  /* Sidebar → Bottom nav */
  .sidebar {
    position: fixed !important;
    bottom: 0; left: 0; right: 0; top: auto !important;
    width: 100% !important; height: 60px !important;
    flex-direction: row !important; padding: 0 !important;
    z-index: 200;
    border-top: 2px solid rgba(198,161,91,0.3);
    background: #1C1A17 !important;
  }
  .sidebar-top, .sidebar-brand, .sidebar-bottom,
  .sidebar-user, .desktop-only { display: none !important; }
  .mobile-only { display: flex !important; }

  .sidebar-nav {
    flex-direction: row !important;
    overflow-x: auto !important; overflow-y: hidden !important;
    padding: 0 !important; gap: 0 !important;
    width: 100%; flex: 1;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .sidebar-nav::-webkit-scrollbar { display: none; }

  .nav-item {
    flex-direction: column !important; gap: 2px !important;
    padding: 6px 4px !important; min-width: 60px !important;
    font-size: 9px !important; border-radius: 0 !important;
    align-items: center !important; justify-content: center !important;
    flex: 1 1 0 !important; height: 60px !important;
    color: rgba(240,232,220,0.5) !important;
    background: transparent !important; overflow: hidden; position: relative;
  }
  .nav-item.active { color: #C6A15B !important; background: rgba(198,161,91,0.08) !important; }
  .nav-item svg { width: 18px !important; height: 18px !important; flex-shrink: 0; }
  .nav-item span {
    font-size: 9px !important; text-align: center !important;
    line-height: 1.1 !important; max-width: 60px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .nav-badge {
    position: absolute !important; top: 4px !important; right: 4px !important;
    min-width: 14px !important; height: 14px !important;
    font-size: 8px !important; padding: 0 3px !important;
  }

  /* Dashboard scrolls */
  #tab-dashboard.active {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  .acc-dashboard { padding: 1rem !important; gap: 0.75rem !important; padding-bottom: 20px !important; }
  .acc-greeting { font-size: 22px !important; }
  .acc-date-line { font-size: 12px !important; }
  .progress-main-card, .action-main-card { padding: 1rem !important; }
  .prog-stars { font-size: 22px !important; }
  .action-title { font-size: 16px !important; line-height: 1.3; }
  .action-desc { font-size: 12px !important; }
  .quick-cards { grid-template-columns: repeat(3,1fr) !important; gap: 6px !important; }
  .quick-card { padding: 8px 6px !important; }
  .quick-card-icon { font-size: 18px !important; }
  .quick-card-title { font-size: 10px !important; }
  .quick-card-info { display: none !important; }

  /* Stats coach */
  .stats-grid { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
  .stat-num { font-size: 28px !important; }
  .dashboard-two-col { grid-template-columns: 1fr !important; }

  /* Page headers */
  .page-header { padding: 0.75rem 1rem !important; flex-shrink: 0; }
  .page-header h2 { font-size: 20px !important; }

  /* Scrollable pages */
  .page-scroll, #ressources-content, #boutique-content,
  #social-content, .profil-page-content, .suggestions-compose {
    overflow-y: auto !important; -webkit-overflow-scrolling: touch !important;
    padding: 1rem !important; flex: 1; min-height: 0;
  }

  /* Messages accompagné — position:absolute input bar */
  #tab-messages.active { overflow: hidden !important; }
  #tab-messages .chat-topbar { flex-shrink: 0 !important; }
  #tab-messages .chat-messages {
    flex: 1 !important; overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important; padding-bottom: 70px !important;
  }
  #tab-messages .chat-input-row {
    position: absolute !important; bottom: 0 !important; left: 0 !important; right: 0 !important;
    display: flex !important; padding: 10px 12px !important;
    background: var(--bg-card) !important; border-top: 1px solid var(--border) !important;
    gap: 8px !important; align-items: flex-end !important; z-index: 10 !important;
  }
  #tab-messages .chat-input-row textarea { font-size: 16px !important; min-height: 42px !important; flex: 1 !important; }
  #tab-messages .send-btn { width: 42px !important; height: 42px !important; flex-shrink: 0 !important; }

  /* Messages coach */
  #section-messages.active { overflow: hidden !important; }
  .chat-layout { flex-direction: column !important; height: 100% !important; }
  .chat-list { width: 100% !important; height: 100% !important; border-right: none !important; overflow-y: auto !important; }
  #chat-window {
    display: none !important;
    position: fixed !important; top: 0 !important; left: 0 !important;
    right: 0 !important; bottom: 60px !important;
    z-index: 150 !important; background: var(--bg-primary) !important;
    flex-direction: column !important; overflow: hidden !important;
  }
  #chat-window.mobile-open { display: flex !important; }
  #chat-window .chat-topbar { flex-shrink: 0 !important; }
  #chat-window .chat-messages {
    flex: 1 !important; overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important; padding-bottom: 70px !important;
  }
  #chat-window .chat-input-row {
    position: absolute !important; bottom: 0 !important; left: 0 !important; right: 0 !important;
    display: flex !important; padding: 10px 12px !important;
    background: var(--bg-card) !important; border-top: 1px solid var(--border) !important;
    gap: 8px !important; align-items: flex-end !important; z-index: 10 !important;
  }
  #chat-window .chat-input-row textarea { font-size: 16px !important; min-height: 42px !important; flex: 1 !important; }
  #chat-window .send-btn { width: 42px !important; height: 42px !important; }
  .mobile-back-btn { display: flex !important; }

  /* Journal */
  #tab-journal.active { overflow: hidden !important; }
  .journal-compose-area {
    flex-shrink: 0 !important; padding: 0.75rem 1rem !important;
    border-bottom: 1px solid var(--border);
  }
  .journal-compose-area textarea { font-size: 16px !important; }
  .journal-privacy-row {
    display: flex !important; flex-wrap: nowrap !important;
    align-items: center !important; gap: 8px !important; margin: 10px 0 !important;
  }
  .privacy-btn { flex: 1 !important; text-align: center !important; padding: 8px 8px !important; font-size: 12px !important; }
  .journal-entries-list {
    flex: 1 !important; overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 0.75rem 1rem !important;
    padding-bottom: 20px !important;
    min-height: 0 !important;
  }

  /* Parcours */
  #tab-parcours.active { overflow-y: auto !important; -webkit-overflow-scrolling: touch !important; }
  .parcours-modules-grid { grid-template-columns: 1fr 1fr !important; padding: 0.75rem !important; gap: 8px !important; }
  .mc-title { font-size: 12px !important; }

  /* Ressources */
  .res-grid { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }

  /* Boutique */
  .boutique-grid { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
  .boutique-cover, .boutique-cover-placeholder { height: 130px !important; }
  .boutique-card-body { padding: 8px !important; }
  .boutique-title { font-size: 12px !important; }
  .boutique-cats { flex-wrap: wrap; gap: 6px; }

  /* Profil */
  .profil-photo-section { flex-direction: column !important; align-items: center !important; text-align: center !important; padding: 1.25rem !important; }
  .profil-photo-info { text-align: center !important; }

  /* Panel */
  .side-panel { width: 100vw !important; }
  .panel-backdrop { display: none !important; }
  .panel-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .panel-tabs::-webkit-scrollbar { display: none; }

  /* Modal */
  .modal-backdrop { align-items: flex-end !important; padding: 0 !important; }
  .modal-box { border-radius: 20px 20px 0 0 !important; max-height: 85vh !important; overflow-y: auto; }

  /* Filter/list */
  .filter-bar { flex-wrap: wrap; gap: 6px; padding: 0.75rem 1rem; }
  .acc-list { padding: 0.75rem 1rem; }
  .acc-row { padding: 10px !important; }
  .acc-meta { flex-wrap: wrap; gap: 6px; }
  .acc-action-text { display: none; }

  /* Floating AI button - right side, above nav bar */
  #ai-float-btn { bottom: 72px !important; right: 16px !important; left: auto !important; }
  #ai-float-panel { bottom: 132px !important; right: 8px !important; left: 8px !important; width: auto !important; max-height: 60vh !important; }
}

@media (max-width: 400px) {
  .nav-item { min-width: 52px !important; }
  .parcours-modules-grid { grid-template-columns: 1fr !important; }
}

/* ── DESKTOP FIXES ── */
@media (min-width: 769px) {
  /* Messages tab on desktop */
  #tab-messages.active {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    overflow: hidden !important;
    position: relative !important;
  }
  #tab-messages .chat-messages {
    flex: 1 !important;
    overflow-y: auto !important;
    padding-bottom: 80px !important;
  }
  #tab-messages .chat-input-row {
    position: absolute !important;
    bottom: 0 !important; left: 0 !important; right: 0 !important;
    display: flex !important;
    padding: 12px 16px !important;
    background: var(--bg-card) !important;
    border-top: 1px solid var(--border) !important;
    gap: 10px !important;
    align-items: flex-end !important;
    z-index: 10 !important;
  }
  #tab-messages .chat-input-row textarea {
    flex: 1 !important;
    min-height: 42px !important;
    max-height: 120px !important;
  }
  #tab-messages .send-btn {
    width: 42px !important;
    height: 42px !important;
    flex-shrink: 0 !important;
  }
}

/* Message edit button + auto-resize textarea */
.msg-edit-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 11px;
  opacity: 0.5;
  padding: 0 2px;
  transition: opacity .15s;
}
.msg-edit-btn:hover { opacity: 1; }
.chat-input-row textarea {
  resize: none;
  overflow-y: auto;
  max-height: 120px;
  min-height: 42px;
  line-height: 1.4;
  transition: height .1s;
}

/* Context menu items */
.ctx-menu-item {
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 8px;
  transition: background .15s;
}
.ctx-menu-item:hover { background: var(--bg-secondary); }

/* Message reactions */
.msg-reaction {
  display: inline-block;
  font-size: 14px;
  margin-left: 6px;
  vertical-align: middle;
}

/* Typing indicator dots */
.typing-dots {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}
.typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typing-bounce 1.2s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* Preserve line breaks in message bubbles */
.bubble {
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── RICH TEXT EDITOR ── */
.rte-btn {
  padding: 4px 8px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-card);
  cursor: pointer;
  color: var(--text-primary);
  transition: background .1s;
}
.rte-btn:hover { background: var(--bg-secondary); }
.rte-sep { width: 1px; background: var(--border); margin: 2px 2px; }
#m-content-editor:empty:before { content: attr(placeholder); color: var(--text-muted); pointer-events: none; }
#m-content-editor:focus { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(198,161,91,.15); }

/* ── MODULE MODAL ACCOMPAGNÉ ── */
#ex-modal-content { font-size: 15px; line-height: 1.85; color: var(--text-primary); }
#ex-modal-content h3 { font-size: 17px; margin: 1rem 0 .5rem; }
#ex-modal-content h4 { font-size: 15px; margin: .75rem 0 .4rem; }
#ex-modal-content ul, #ex-modal-content ol { padding-left: 1.5rem; margin: .5rem 0; }
#ex-modal-content li { margin-bottom: .25rem; }

/* Module card */
.module-card-acc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all .15s;
}
.module-card-acc.unlocked:hover { border-color: var(--gold); }
.module-card-acc.locked { opacity: .6; cursor: default; }
