/* ============================================================
   Co-Écoute — Design System v2
   Mobile-first · Inter font · Modern SaaS aesthetic
   ============================================================ */

/* ── Custom Properties ─────────────────────────────────────── */
:root {
  --primary:       #6366f1;
  --primary-dark:  #4f46e5;
  --primary-light: #818cf8;
  --primary-glow:  rgba(99,102,241,.18);
  --primary-bg:    #eef2ff;

  --success:    #10b981;
  --success-bg: #ecfdf5;
  --warning:    #f59e0b;
  --warning-bg: #fffbeb;
  --danger:     #ef4444;
  --danger-bg:  #fef2f2;
  --info:       #3b82f6;
  --info-bg:    #eff6ff;

  --text:        #0f172a;
  --text-muted:  #64748b;
  --text-light:  #94a3b8;

  --bg:          #f8fafc;
  --bg-card:     #ffffff;
  --bg-subtle:   #f1f5f9;
  --border:      #e2e8f0;
  --border-strong: #cbd5e1;

  --radius:    14px;
  --radius-sm:  9px;
  --radius-xs:  5px;

  --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
  --shadow:    0 1px 3px rgba(15,23,42,.08), 0 6px 20px rgba(99,102,241,.07);
  --shadow-md: 0 4px 16px rgba(15,23,42,.1), 0 12px 40px rgba(99,102,241,.1);
  --shadow-lg: 0 20px 60px rgba(15,23,42,.15), 0 8px 24px rgba(99,102,241,.12);

  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --header-h: 64px;
  --container: 1100px;
  --container-narrow: 560px;

  --av-0: #6366f1; --av-1: #10b981; --av-2: #f59e0b;
  --av-3: #ef4444; --av-4: #3b82f6; --av-5: #8b5cf6;

  --transition: .18s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
input, select, textarea, button { font: inherit; }
ul { list-style: none; }
h1,h2,h3,h4 { font-weight: 700; line-height: 1.25; letter-spacing: -.02em; }

/* ── Layout ─────────────────────────────────────────────────── */
.site-main { flex: 1; padding: 40px 0 80px; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: var(--container-narrow); }
.container--wide { max-width: 1200px; }

/* ── Header ─────────────────────────────────────────────────── */
.site-header {
  background: #fff;
  height: var(--header-h);
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 var(--border), 0 4px 16px rgba(15,23,42,.04);
}
.header-inner { display: flex; align-items: center; gap: 16px; height: 100%; }
.site-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 17px; font-weight: 800; letter-spacing: -.03em;
  color: var(--text); text-decoration: none; flex-shrink: 0;
}
.site-logo svg {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  border-radius: 10px; padding: 6px;
}
.site-logo svg path, .site-logo svg circle { stroke: white; fill: none; }
.header-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-link {
  color: var(--text-muted); font-size: 14px; font-weight: 500;
  padding: 6px 14px; border-radius: 8px; text-decoration: none;
  transition: all var(--transition);
}
.nav-link:hover { background: var(--bg-subtle); color: var(--text); }
.nav-link--cta {
  background: var(--primary); color: white !important;
  padding: 7px 16px;
}
.nav-link--cta:hover { background: var(--primary-dark); box-shadow: 0 4px 14px var(--primary-glow); }
.nav-link--ghost { color: var(--text-light); }
.nav-link--ghost:hover { color: var(--danger); background: var(--danger-bg); }

/* ── Page Hero ──────────────────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
  padding: 48px 0 40px;
  margin-bottom: 40px;
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-hero__title { font-size: clamp(22px, 4vw, 36px); font-weight: 800; color: white; margin-bottom: 8px; position: relative; }
.page-hero__subtitle { color: rgba(255,255,255,.75); font-size: 16px; position: relative; }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.card--hero {
  text-align: center; padding: 56px 36px;
  background: linear-gradient(180deg, #fff 60%, #f8faff 100%);
}
.card--hero h2 { font-size: 28px; font-weight: 800; margin: 16px 0 10px; color: var(--text); }
.card--hero p { color: var(--text-muted); margin-bottom: 28px; font-size: 16px; }
.card--wide { max-width: none; }
.card--narrow { max-width: 440px; margin-left: auto; margin-right: auto; }
.card--empty {
  background: var(--bg-subtle);
  border-style: dashed; border-color: var(--border-strong);
  text-align: center; padding: 48px 28px;
}
.card--success { border-color: #6ee7b7; background: var(--success-bg); }
.card--team { border-color: #c7d2fe; border-width: 2px; }
.card--share { background: var(--primary-bg); border-color: #c7d2fe; }
.card-icon { font-size: 48px; margin-bottom: 16px; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.card-header h3 { font-size: 16px; font-weight: 700; }
.card-divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ── Hero logo icon ─────────────────────────────────────────── */
.hero-icon {
  width: 72px; height: 72px; border-radius: 20px; margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 32px rgba(99,102,241,.3);
}
.hero-icon svg { width: 36px; height: 36px; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 10px 22px; border-radius: 9px;
  font-weight: 600; font-size: 14px; cursor: pointer;
  border: 1.5px solid transparent; transition: all var(--transition);
  text-decoration: none !important; white-space: nowrap;
  letter-spacing: -.01em;
}
.btn--primary {
  background: var(--primary);
  color: white; box-shadow: 0 1px 2px rgba(99,102,241,.3);
}
.btn--primary:hover { background: var(--primary-dark); box-shadow: 0 4px 16px var(--primary-glow); transform: translateY(-1px); }
.btn--success { background: var(--success); color: white; }
.btn--success:hover { background: #059669; transform: translateY(-1px); }
.btn--warning { background: var(--warning); color: white; }
.btn--warning:hover { background: #d97706; }
.btn--danger { background: var(--danger); color: white; }
.btn--danger:hover { background: #dc2626; transform: translateY(-1px); }
.btn--ghost {
  background: transparent; color: var(--primary);
  border-color: var(--border-strong);
}
.btn--ghost:hover { background: var(--primary-bg); border-color: var(--primary-light); }
.btn--secondary {
  background: var(--bg-subtle); color: var(--text);
  border-color: var(--border);
}
.btn--secondary:hover { background: var(--border); }
.btn--lg { padding: 14px 32px; font-size: 16px; border-radius: 11px; }
.btn--sm { padding: 6px 14px; font-size: 13px; border-radius: 7px; }
.btn--xs { padding: 3px 9px; font-size: 12px; border-radius: 6px; background: var(--bg-subtle); border: 1px solid var(--border); color: var(--text-muted); }
.btn--xs:hover { background: var(--danger-bg); color: var(--danger); border-color: #fca5a5; }
.btn-icon-inline { position:absolute; right:6px; top:50%; transform:translateY(-50%); background:none; border:none; cursor:pointer; font-size:16px; color:var(--text-muted); padding:2px 4px; line-height:1; }
.btn-icon-inline:hover { color:var(--text); }
.radio-option { display:inline-flex; align-items:center; gap:8px; padding:8px 14px; border:1.5px solid var(--border); border-radius:var(--radius-sm); cursor:pointer; font-size:14px; transition:border-color var(--transition),background var(--transition); }
.radio-option:hover { border-color:var(--primary); background:var(--primary-glow); }
.radio-option input[type=radio] { accent-color:var(--primary); width:15px; height:15px; }
.btn--full { width: 100%; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ── Forms ──────────────────────────────────────────────────── */
.form { display: flex; flex-direction: column; gap: 22px; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr auto auto; align-items: end; } }
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-group--grow { flex: 1; }
.form-group--info p { font-size: 13px; color: var(--text-muted); padding: 10px 0; }
.form-label { font-size: 13px; font-weight: 600; color: var(--text); letter-spacing: -.005em; }
.form-input {
  padding: 11px 15px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: white;
  font-size: 15px; color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}
.form-input::placeholder { color: var(--text-light); }
.form-textarea { resize: vertical; min-height: 90px; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z' fill='%2364748b'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 36px; cursor: pointer; }
.form-select--sm { padding: 7px 32px 7px 10px; font-size: 14px; }
.form-hint { font-size: 12px; color: var(--text-muted); }
.required { color: var(--danger); }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; margin-top: 8px; }
.input-group { display: flex; gap: 8px; align-items: center; }
.inline-form { display: flex; flex-direction: column; gap: 8px; }
.date-shortcuts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.multi-calendar { width: min(100%, 420px); border: 1px solid var(--border); border-radius: 14px; padding: 16px; background: #fff; box-shadow: var(--shadow-sm); }
.multi-calendar__header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; text-transform: capitalize; }
.multi-calendar__header strong { min-width: 140px; text-align: center; }
.multi-calendar__header .btn { width: 34px; height: 34px; padding: 0; font-size: 22px; line-height: 1; }
.multi-calendar__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.multi-calendar__weekday { display: flex; align-items: center; justify-content: center; min-width: 0; font-size: 11px; color: var(--text-muted); font-weight: 700; padding: 4px 0; }
.multi-calendar__day { display: flex; align-items: center; justify-content: center; width: 100%; min-width: 0; aspect-ratio: 1; border: 0; border-radius: 9px; background: transparent; color: var(--text); cursor: pointer; font: inherit; font-size: 14px; }
.multi-calendar__day:hover { background: #eef2ff; }
.multi-calendar__day--selected, .multi-calendar__day--selected:hover { background: var(--primary); color: #fff; font-weight: 700; }
.multi-calendar__day:focus-visible, .selected-date__remove:focus-visible { outline: 2px solid #343cc2; outline-offset: 2px; }
.selected-dates { display: flex; flex-wrap: wrap; gap: 8px; min-height: 32px; align-items: center; }
.selected-date { display: inline-flex; align-items: center; gap: 8px; padding: 5px 8px 5px 12px; border-radius: 999px; background: #eef2ff; color: var(--text); font-size: 13px; }
.selected-date__remove { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 18px; line-height: 1; padding: 0 2px; }
.selected-date__remove:hover { color: #b42318; }

/* ── Alerts ─────────────────────────────────────────────────── */
.alert {
  padding: 14px 16px; border-radius: var(--radius-sm); font-size: 14px;
  border: 1px solid; margin-bottom: 16px; font-weight: 500;
  display: flex; align-items: flex-start; gap: 10px;
}
.alert::before { flex-shrink: 0; font-size: 16px; }
.alert--error { background: var(--danger-bg); border-color: #fca5a5; color: #b91c1c; }
.alert--error::before { content: '⚠️'; }
.alert--success { background: var(--success-bg); border-color: #6ee7b7; color: #065f46; }
.alert--success::before { content: '✓'; font-weight: 800; color: var(--success); }
.alert--info { background: var(--info-bg); border-color: #93c5fd; color: #1d4ed8; }
.alert--info::before { content: 'ℹ'; }
.alert--warning { background: var(--warning-bg); border-color: #fcd34d; color: #92400e; }
.alert--warning::before { content: '⚡'; }

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600;
  letter-spacing: .01em;
}
.badge--success { background: var(--success-bg); color: #065f46; border: 1px solid #6ee7b7; }
.badge--warning { background: var(--warning-bg); color: #92400e; border: 1px solid #fcd34d; }
.badge--info { background: var(--info-bg); color: #1d4ed8; border: 1px solid #93c5fd; }
.badge--neutral { background: var(--bg-subtle); color: var(--text-muted); border: 1px solid var(--border); }
.badge--primary { background: var(--primary-bg); color: var(--primary-dark); border: 1px solid #c7d2fe; }
.badge--archived { background: #f3f4f6; color: #6b7280; border: 1px solid #d1d5db; }
.badge--lg { padding: 6px 16px; font-size: 14px; }

/* ── Info Grid (home) ───────────────────────────────────────── */
.info-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 28px; }
@media (min-width: 640px) { .info-grid { grid-template-columns: repeat(3, 1fr); } }
.info-card {
  display: flex; align-items: flex-start; gap: 14px;
  background: white; border-radius: var(--radius); padding: 20px;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.info-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.info-card__icon {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  background: var(--primary-bg);
}
.info-card__body h3 { font-size: 14px; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.info-card__body p { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.session-meta { display: flex; gap: 8px; justify-content: center; margin: 12px 0; flex-wrap: wrap; }

/* ── Steps (home) ───────────────────────────────────────────── */
.steps { display: flex; flex-direction: column; gap: 0; }
.step { display: flex; gap: 16px; padding-bottom: 20px; position: relative; }
.step:not(:last-child)::before {
  content: ''; position: absolute; left: 19px; top: 40px;
  width: 2px; height: calc(100% - 20px);
  background: linear-gradient(to bottom, var(--border-strong), var(--border));
}
.step__num {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--primary); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; z-index: 1;
  box-shadow: 0 4px 12px var(--primary-glow);
}
.step__body { padding-top: 8px; }
.step__body h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.step__body p { font-size: 14px; color: var(--text-muted); }

/* ── Availability Grid ──────────────────────────────────────── */
.avail-table-wrapper { overflow-x: auto; margin: 16px -28px; padding: 0 28px; }
.avail-table { border-collapse: separate; border-spacing: 4px; min-width: 100%; }
.avail-th { font-size: 12px; font-weight: 700; color: var(--text-muted); padding: 8px 4px; text-align: center; white-space: nowrap; letter-spacing: .02em; }
.avail-th--time { text-align: left; min-width: 64px; }
.avail-time { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; padding: 0 8px 0 0; white-space: nowrap; font-weight: 600; }
.avail-checkbox { position: absolute; opacity: 0; width: 0; height: 0; }
.avail-cell-wrap { padding: 2px; }
.avail-cell {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 38px; border-radius: 8px; cursor: pointer;
  background: var(--bg-subtle); border: 1.5px solid var(--border);
  transition: all .12s ease; user-select: none;
}
.avail-cell:hover { background: var(--primary-bg); border-color: var(--primary-light); transform: scale(1.06); }
.avail-cell--selected {
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  border-color: transparent; color: white;
  box-shadow: 0 3px 10px var(--primary-glow);
}
.avail-cell--selected:hover { opacity: .9; transform: scale(1.06); }
.avail-check-icon { font-size: 14px; opacity: 0; transition: opacity .1s; }
.avail-cell--selected .avail-check-icon { opacity: 1; }
.avail-cell--example { width: 90px; height: 34px; font-size: 12px; font-weight: 600; }
.avail-legend { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.avail-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 24px; flex-wrap: wrap;
  padding-top: 20px; border-top: 1px solid var(--border);
}
.avail-counter { font-size: 14px; color: var(--text-muted); }
.avail-counter strong { color: var(--primary); font-size: 22px; font-weight: 800; }
.avail-buttons { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Slot Tags ──────────────────────────────────────────────── */
.slot-group { margin-bottom: 16px; }
.slot-group__title { font-size: 11px; font-weight: 700; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .06em; }
.slot-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.slot-tag {
  padding: 4px 12px; border-radius: 99px; font-size: 13px; font-weight: 500;
  background: var(--bg-subtle); border: 1px solid var(--border); color: var(--text-muted);
}
.slot-tag--common {
  background: var(--success-bg); border-color: #6ee7b7; color: #065f46;
  font-weight: 600;
}

/* ── Team Grid ──────────────────────────────────────────────── */
.team-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 720px) { .team-grid { grid-template-columns: 1fr 1fr; } }

/* ── Member List ────────────────────────────────────────────── */
.member-list { display: flex; flex-direction: column; gap: 14px; }
.member-list--compact { gap: 10px; }
.member-item { display: flex; align-items: center; gap: 14px; }
.member-item--sm { gap: 10px; }
.member-avatar {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 800; color: white;
  background: var(--av-0); box-shadow: 0 3px 10px rgba(0,0,0,.12);
}
.member-avatar[style*="--avatar-index: 0"] { background: var(--av-0); }
.member-avatar[style*="--avatar-index: 1"] { background: var(--av-1); }
.member-avatar[style*="--avatar-index: 2"] { background: var(--av-2); }
.member-avatar[style*="--avatar-index: 3"] { background: var(--av-3); }
.member-avatar[style*="--avatar-index: 4"] { background: var(--av-4); }
.member-avatar[style*="--avatar-index: 5"] { background: var(--av-5); }
.member-avatar--sm { width: 32px; height: 32px; font-size: 13px; border-radius: 8px; }
.member-name { font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.member-email { font-size: 12px; color: var(--text-muted); }
.member-info { display: flex; flex-direction: column; gap: 2px; }

/* ── Share URL ──────────────────────────────────────────────── */
.share-url { display: flex; gap: 8px; align-items: center; }
.share-url .form-input { flex: 1; font-size: 13px; font-family: var(--font-mono); color: var(--text-muted); background: var(--bg-subtle); }

/* ── Admin Dashboard ────────────────────────────────────────── */
.dashboard-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; gap: 12px; flex-wrap: wrap; }
.dashboard-header h2 { font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.dashboard-tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 2px solid var(--border); }
.tab-btn { background: none; border: none; cursor: pointer; padding: 8px 18px; font-size: 14px; font-weight: 600; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -2px; border-radius: var(--radius) var(--radius) 0 0; transition: color var(--transition), border-color var(--transition); }
.tab-btn:hover { color: var(--text); }
.tab-btn--active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-count { display: inline-flex; align-items: center; justify-content: center; background: var(--bg-subtle); border-radius: 99px; font-size: 11px; font-weight: 700; padding: 1px 7px; margin-left: 5px; color: var(--text-muted); }
.sessions-list { display: flex; flex-direction: column; gap: 16px; }
.session-card {
  background: white; border-radius: var(--radius); border: 1px solid var(--border);
  padding: 22px 24px; box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.session-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.session-card--archived { opacity: .75; }
.session-card--archived:hover { opacity: 1; }
.session-card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.session-card__title { font-size: 17px; font-weight: 700; margin-bottom: 4px; letter-spacing: -.02em; }
.session-card__title a { color: var(--text); }
.session-card__title a:hover { color: var(--primary); }
.session-card__meta { font-size: 13px; color: var(--text-muted); }
.session-card__stats { display: flex; gap: 24px; margin-bottom: 18px; }
.stat { text-align: center; }
.stat__value { display: block; font-size: 28px; font-weight: 800; color: var(--primary); letter-spacing: -.04em; }
.stat__label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 600; }
.session-card__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Admin Session View ─────────────────────────────────────── */
.session-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.session-header h2 { font-size: 24px; font-weight: 800; margin: 4px 0 6px; letter-spacing: -.03em; }
.link-back {
  font-size: 13px; color: var(--text-muted); display: inline-flex;
  align-items: center; gap: 4px; margin-bottom: 6px; font-weight: 500;
}
.link-back:hover { color: var(--primary); }
.link-back::before { content: '←'; }
.action-cards { display: grid; grid-template-columns: 1fr; gap: 20px; margin-bottom: 28px; }
@media (min-width: 640px) { .action-cards { grid-template-columns: 1fr 1fr; } }
.action-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 14px; color: var(--text); }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.session-meta-list { display: flex; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.meta-item { font-size: 13px; color: var(--text-muted); }

/* ── Unassigned Students Block ──────────────────────────────── */
.unassigned-card { background: #fffbeb; border-color: #fcd34d; padding: 0; }
.unassigned-details { }
.unassigned-summary {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 24px; cursor: pointer; list-style: none;
  font-size: 14px; font-weight: 600; color: #92400e;
  user-select: none;
}
.unassigned-summary::-webkit-details-marker { display: none; }
.unassigned-summary::after { content: '▸'; margin-left: auto; font-size: 12px; transition: transform .2s; }
details[open] > .unassigned-summary::after { transform: rotate(90deg); }
.unassigned-list { list-style: none; margin: 0; padding: 0 24px 16px; display: flex; flex-direction: column; gap: 6px; }
.unassigned-item { display: flex; align-items: baseline; gap: 10px; padding: 8px 12px; background: white; border: 1px solid #fcd34d; border-radius: 6px; font-size: 13px; }
.unassigned-name { font-weight: 600; color: var(--text); white-space: nowrap; }
.unassigned-email { color: var(--text-muted); }
@media (max-width: 480px) { .unassigned-item { flex-direction: column; gap: 2px; } }

/* ── Progress Bar ───────────────────────────────────────────── */
.progress-card { margin-bottom: 28px; }
.progress-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.progress-header h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.progress-bar-wrap { background: var(--bg-subtle); border-radius: 99px; height: 8px; overflow: hidden; margin-bottom: 6px; }
.progress-bar { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--primary), #8b5cf6); transition: width .5s cubic-bezier(.4,0,.2,1); }

/* ── Teams Grid (admin) ─────────────────────────────────────── */
.teams-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-top: 16px; }
.team-block {
  background: var(--bg-subtle); border-radius: var(--radius-sm);
  padding: 18px; border: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.team-block:hover { box-shadow: var(--shadow); }
.team-block__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.team-block__header h4 { font-size: 14px; font-weight: 700; }

/* ── Data Table ─────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; margin: 0 -28px; padding: 0 28px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); padding: 10px 14px; border-bottom: 2px solid var(--border); text-align: left; }
.data-table td { padding: 13px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-subtle); }
.data-table tr.row--no-team td { background: #fffbeb; }
.data-table tr.row--no-team:hover td { background: #fef3c7; }
.data-table th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.data-table th.sortable:hover { color: var(--text-primary, #111); }
.data-table th.sortable--active { color: var(--primary, #4f46e5); }
.sort-icon { display: inline-block; width: 1em; font-style: normal; }

/* ── Student Filters ────────────────────────────────────────── */
.students-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.students-card-header h3 { margin: 0; }
.students-filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.form-input--sm { padding: 6px 10px; font-size: 13px; min-width: 220px; }
.filter-toggle { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); cursor: pointer; white-space: nowrap; user-select: none; }
.filter-toggle input[type="checkbox"] { accent-color: var(--primary); width: 15px; height: 15px; cursor: pointer; }
.filter-toggle:hover { color: var(--text); }
@media (max-width: 640px) { .students-card-header { flex-direction: column; } .form-input--sm { min-width: 0; width: 100%; } }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: white; border-top: 1px solid var(--border);
  padding: 20px 0;
}
.site-footer p { font-size: 13px; color: var(--text-light); text-align: center; }

/* ── Utilities ──────────────────────────────────────────────── */
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 13px; }
.text-center { text-align: center; }
.text-success { color: var(--success); font-weight: 600; }
.link { color: var(--primary); font-weight: 500; }
.link:hover { color: var(--primary-dark); text-decoration: underline; }
.divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 480px) {
  .card { padding: 20px 18px; }
  .card--hero { padding: 40px 20px; }
  .site-header { height: 56px; }
  .page-hero { padding: 28px 0 20px; }
  .avail-cell { width: 36px; height: 30px; }
  .btn--lg { padding: 12px 22px; font-size: 15px; }
  .session-header { flex-direction: column; }
  .dashboard-header { flex-direction: column; align-items: flex-start; }
}

/* ── PWA Install Prompt ─────────────────────────────────────── */
#pwa-install {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--text); color: white;
  padding: 14px 20px; border-radius: 12px;
  box-shadow: var(--shadow-md); display: none;
  align-items: center; gap: 12px; z-index: 1000;
  font-size: 14px; font-weight: 600;
  animation: slideUp .3s cubic-bezier(.4,0,.2,1);
}
#pwa-install.visible { display: flex; }
#pwa-install button { background: white; color: var(--text); border: none; padding: 6px 12px; border-radius: 6px; font-weight: 700; cursor: pointer; }

/* ── Skeleton / loading states ──────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-subtle) 25%, #e8edf5 50%, var(--bg-subtle) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes slideUp { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.card { animation: fadeIn .3s ease both; }

/* ── Disponibilités section ─────────────────────────────────── */
.avail-filters {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-bottom: 16px;
}
.avail-filters .form-input { flex: 1; min-width: 180px; max-width: 280px; }
.avail-filters .form-select { min-width: 200px; }
.avail-count { font-size: 13px; color: var(--text-muted); margin-left: auto; }
.slot-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.slot-tag {
  display: inline-block;
  font-size: 11.5px; font-weight: 500;
  padding: 2px 8px; border-radius: 20px;
  background: var(--primary-bg); color: var(--primary-dark);
  border: 1px solid rgba(99,102,241,.2);
  white-space: nowrap;
}
.avail-table td { vertical-align: top; }
.avail-empty { text-align: center; padding: 24px 12px; color: var(--text-muted); font-size: 14px; }

/* ── Modal export Excel ─────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal-box {
  background: var(--bg);
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0,0,0,.22);
  padding: 28px 32px;
  max-width: 440px; width: 100%;
  animation: fadeIn .2s ease both;
}
.modal-box h3 { margin: 0 0 6px; font-size: 17px; }
.modal-box > .text-muted { margin: 0 0 18px; font-size: 13.5px; }
.export-options { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.export-option {
  display: flex; align-items: flex-start; gap: 12px;
  cursor: pointer;
  padding: 12px 14px;
  border-radius: 9px;
  border: 1px solid var(--border);
  transition: background .15s, border-color .15s;
}
.export-option:hover { background: var(--bg-subtle); border-color: var(--primary); }
.export-option input[type="checkbox"] {
  margin-top: 2px; width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--primary);
}
.export-option span { display: flex; flex-direction: column; gap: 2px; }
.export-option strong { font-size: 14px; }
.export-option .text-sm { font-size: 12.5px; line-height: 1.4; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ── Live indicator ─────────────────────────────────────────── */
@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,.55); opacity: 1; }
  50%       { box-shadow: 0 0 0 6px rgba(16,185,129,0); opacity: .85; }
}
@keyframes statFlash {
  0%   { background: rgba(16,185,129,.22); border-radius: 4px; }
  100% { background: transparent; }
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--success);
  background: var(--success-bg);
  border: 1px solid rgba(16,185,129,.25);
  border-radius: 999px;
  padding: 2px 9px 2px 7px;
  line-height: 1;
  user-select: none;
}
.live-badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
  animation: livePulse 1.6s ease-in-out infinite;
}
.live-badge--offline {
  color: var(--text-muted);
  background: var(--bg-subtle);
  border-color: var(--border);
}
.live-badge--offline .live-badge__dot {
  background: var(--text-light);
  animation: none;
}
.stat-flash {
  animation: statFlash .6s ease-out forwards;
}
@keyframes rowFlash {
  0%   { background: rgba(16,185,129,.28); }
  100% { background: transparent; }
}
.row--new {
  animation: rowFlash 2s ease-out forwards;
}
.row-flash {
  animation: rowFlash var(--flash-duration, 1.2s) ease-out forwards;
}
tr[data-responded="0"] {
  opacity: .55;
  color: var(--text-muted);
  transition: opacity .4s ease, color .4s ease;
}
@media (prefers-reduced-motion: reduce) {
  .row--new { animation: none; background: rgba(16,185,129,.15); }
  .row-flash { animation: none; background: rgba(16,185,129,.15); }
}
