/* ─── Variables FACTOxRH ─────────────────────────────────────────────────── */
:root {
  --primary:   #132852;
  --secondary: #fbb03b;
  --accent:    #F59D33;
  --success:   #27ae60;
  --danger:    #e74c3c;
  --warning:   #e67e22;
  --text:      #2c3e50;
  --muted:     #7f8c8d;
  --bg:        #f5f7fa;
  --white:     #ffffff;
  --border:    #e0e4ea;
  --radius:    12px;
  --shadow:    0 4px 24px rgba(19,40,82,0.10);
  --shadow-sm: 0 2px 8px rgba(19,40,82,0.07);
}

/* ─── Reset & Base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; padding: 0; }

/* ─── Containers ────────────────────────────────────────────────────────── */
.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px 40px;
}
.container-sm  { max-width: 480px; }
.container-large { max-width: 860px; }

/* ─── Brand bar ─────────────────────────────────────────────────────────── */
.brand-bar {
  height: 5px;
  background: linear-gradient(90deg, var(--secondary), var(--primary), var(--secondary));
  border-radius: 0 0 4px 4px;
  margin-bottom: 32px;
}

/* ─── Logo ───────────────────────────────────────────────────────────────── */
.logo-wrap { text-align: center; margin-bottom: 24px; }
.logo      { max-width: 200px; height: auto; display: inline-block; }
.logo-sm   { max-width: 140px; }

/* ─── Typographie ────────────────────────────────────────────────────────── */
.titre-principal {
  color: var(--primary);
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}
.sous-titre {
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 28px;
}
h2 { color: var(--primary); font-size: 1.3rem; font-weight: 600; }
h3 { color: var(--primary); font-size: 1.1rem; font-weight: 600; }

/* ─── Boutons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 11px 24px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  text-align: center;
  text-decoration: none;
  line-height: 1.4;
}
.btn-primary  { background: var(--primary); color: var(--white); }
.btn-primary:hover  { background: #1d3a6e; color: var(--white); transform: translateY(-1px); }
.btn-secondary { background: var(--secondary); color: var(--primary); }
.btn-secondary:hover { background: var(--accent); }
.btn-success  { background: var(--success); color: var(--white); }
.btn-success:hover  { background: #229954; color: var(--white); }
.btn-outline  { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover  { background: var(--primary); color: var(--white); }
.btn-text     { background: none; border: none; color: var(--muted); font-size: 0.9rem; padding: 6px 0; cursor: pointer; }
.btn-text:hover { color: var(--primary); }
.btn-full     { width: 100%; display: block; }
.btn-sm       { padding: 6px 14px; font-size: 0.85rem; }

/* ─── Alertes ─────────────────────────────────────────────────────────────── */
.alerte {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 0.95rem;
}
.alerte-danger  { background: #fdedec; border-left: 4px solid var(--danger); color: #922b21; }
.alerte-success { background: #eafaf1; border-left: 4px solid var(--success); color: #1e8449; }
.alerte-info    { background: #ebf5fb; border-left: 4px solid #3498db; color: #1a5276; }
.alerte-warning { background: #fef9e7; border-left: 4px solid var(--warning); color: #9a7d0a; }
.alerte-icone   { font-size: 1.1rem; flex-shrink: 0; }

/* ─── Info box ────────────────────────────────────────────────────────────── */
.info-box {
  background: #f0f4ff;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
}
.info-box h2 { font-size: 1.05rem; margin-bottom: 12px; }
.info-box ul li { padding: 5px 0; color: #555; font-size: 0.9rem; }
.info-box ul li::before { content: '✓ '; color: var(--success); font-weight: 700; }
.info-box-success { background: #eafaf1; border-color: var(--success); }

/* ─── Card token ──────────────────────────────────────────────────────────── */
.card-token {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 24px;
}
.card-token h2 { margin-bottom: 8px; }
.card-token > p { color: var(--muted); margin-bottom: 20px; font-size: 0.95rem; }

/* ─── Formulaires ─────────────────────────────────────────────────────────── */
.form-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}
.form-field label {
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 6px;
  font-size: 0.9rem;
}
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="number"],
.form-field input[type="date"],
.form-field textarea,
.form-field select,
.form-input,
.form-select {
  padding: 11px 14px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  transition: border-color 0.2s;
  background: var(--white);
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus { border-color: var(--primary); outline: none; }
.form-field textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }
.form-select-sm { padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; font-family: inherit; }
.form-inline { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.form-field-inline { flex: 1; min-width: 120px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 640px) {
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
}

/* ─── Toggle ──────────────────────────────────────────────────────────────── */
.toggle-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-weight: 500;
}
input[type="checkbox"] { width: 44px; height: 24px; appearance: none; background: var(--border); border-radius: 12px; cursor: pointer; transition: background 0.2s; position: relative; flex-shrink: 0; }
input[type="checkbox"]:checked { background: var(--primary); }
input[type="checkbox"]::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: left 0.2s; }
input[type="checkbox"]:checked::after { left: 23px; }

/* ─── Astuce ──────────────────────────────────────────────────────────────── */
.astuce {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 16px;
  text-align: center;
}

/* ─── Familles preview ────────────────────────────────────────────────────── */
.familles-preview { margin-bottom: 24px; }
.familles-preview h3 { color: var(--primary); font-size: 1rem; margin-bottom: 12px; text-align: center; }
.familles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.famille-badge {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
  transition: border-color 0.2s;
}
.famille-badge:hover { border-color: var(--secondary); }
.famille-icone { display: block; font-size: 1.5rem; margin-bottom: 4px; }
.famille-titre { font-size: 0.75rem; color: var(--primary); font-weight: 500; line-height: 1.3; }
@media (max-width: 480px) { .familles-grid { grid-template-columns: repeat(2, 1fr); } }

/* ─── Questionnaire ───────────────────────────────────────────────────────── */
.questionnaire-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px 0;
  border-bottom: 2px solid var(--border);
}
.questionnaire-meta h1 { font-size: 1.4rem; margin-bottom: 2px; }
.badge-entreprise { background: #e8f0fe; color: var(--primary); padding: 3px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 500; }
.confidentialite-badge { margin-left: auto; background: #eafaf1; color: var(--success); padding: 6px 14px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; }

/* Barre de progression */
.progress-bar-wrap { margin-bottom: 28px; }
.progress-labels { display: flex; gap: 4px; margin-bottom: 8px; }
.progress-label {
  flex: 1;
  text-align: center;
  font-size: 1.3rem;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.2s;
  opacity: 0.4;
}
.progress-label.active { opacity: 1; background: #e8f0fe; transform: scale(1.1); }
.progress-label.done   { opacity: 0.7; }
.progress-bar { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--secondary), var(--primary)); transition: width 0.4s ease; border-radius: 4px; }
.progress-text { text-align: right; font-size: 0.8rem; color: var(--muted); margin-top: 4px; }

/* Étapes */
.etape { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.famille-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  border-left: 5px solid;
  padding: 16px 20px;
  background: var(--white);
  border-radius: var(--radius);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.famille-grand-icone { font-size: 2rem; flex-shrink: 0; }
.famille-titre { font-size: 1.2rem; color: var(--primary); font-weight: 700; margin-bottom: 4px; }
.famille-desc { color: var(--muted); font-size: 0.9rem; }

/* Questions */
.questions-liste { display: flex; flex-direction: column; gap: 16px; }
.question-bloc {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
  transition: border-color 0.2s;
}
.question-bloc.question-manquante { border-color: var(--danger); animation: shake 0.3s ease; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-4px)} 75%{transform:translateX(4px)} }
.question-texte { font-weight: 500; color: var(--text); margin-bottom: 14px; line-height: 1.5; }
.question-aide { background: #f8f9fa; border-left: 3px solid var(--secondary); padding: 10px 14px; font-size: 0.85rem; color: #555; border-radius: 0 6px 6px 0; margin-bottom: 10px; }
.btn-aide {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--secondary); color: var(--primary); font-size: 0.75rem;
  font-weight: 700; border: none; cursor: pointer; margin-left: 6px; vertical-align: middle; flex-shrink: 0;
}

/* Likert */
.likert-groupe {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.likert-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex: 1;
  min-width: 60px;
}
.likert-option input { display: none; }
.likert-cercle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  background: var(--bg);
}
.likert-num { font-weight: 600; color: var(--muted); font-size: 1rem; }
.likert-label { font-size: 0.7rem; color: var(--muted); text-align: center; font-weight: 500; }
.likert-option.selected .likert-cercle { background: var(--primary); border-color: var(--primary); }
.likert-option.selected .likert-num { color: var(--white); }
.likert-option.selected .likert-label { color: var(--primary); font-weight: 600; }
.likert-option:hover .likert-cercle { border-color: var(--primary); background: #e8f0fe; }
@media (max-width: 480px) {
  .likert-groupe { gap: 4px; }
  .likert-cercle { width: 40px; height: 40px; }
  .likert-label { font-size: 0.6rem; }
}

/* Actions d'étape */
.etape-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Select & radio demo */
.select-wrap select { width: 100%; padding: 10px; border: 2px solid var(--border); border-radius: 8px; font-family: inherit; }
.radio-groupe { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-option { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 8px 14px; border: 2px solid var(--border); border-radius: 8px; font-size: 0.9rem; }
.radio-option input { width: 16px; height: 16px; }
.radio-option:has(input:checked) { border-color: var(--primary); background: #e8f0fe; }

/* Overlay chargement */
#overlay-chargement {
  position: fixed; inset: 0;
  background: rgba(19,40,82,0.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 999;
}
.spinner-wrap { text-align: center; color: var(--white); }
.spinner {
  width: 48px; height: 48px;
  border: 4px solid rgba(255,255,255,0.3);
  border-top-color: var(--secondary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #2c3e50;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
  white-space: nowrap;
}
.toast.visible { transform: translateX(-50%) translateY(0); }

/* ─── Page merci ──────────────────────────────────────────────────────────── */
.merci-content { text-align: center; padding: 40px 20px; }
.merci-icone { font-size: 5rem; margin-bottom: 16px; }
.merci-content h1 { color: var(--primary); font-size: 1.8rem; margin-bottom: 12px; }
.merci-sous-titre { color: var(--muted); font-size: 1rem; margin-bottom: 24px; }
.merci-message { background: var(--white); border-radius: var(--radius); padding: 20px; margin: 20px 0; text-align: left; color: #555; font-size: 0.95rem; box-shadow: var(--shadow-sm); }

/* ─── Admin login ─────────────────────────────────────────────────────────── */
.card-login {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 20px;
}
.otp-info { color: var(--muted); font-size: 0.9rem; margin-bottom: 16px; }
.otp-inputs { display: flex; gap: 10px; margin-bottom: 20px; justify-content: center; }
.otp-digit {
  width: 52px; height: 64px;
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  border: 2px solid var(--border);
  border-radius: 10px;
  color: var(--primary);
  background: var(--white);
  transition: border-color 0.2s;
}
.otp-digit:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(19,40,82,0.1); }

/* ─── Admin layout ────────────────────────────────────────────────────────── */
.admin-nav {
  background: var(--primary);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
  flex-wrap: wrap;
}
.admin-nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-title { color: var(--secondary); font-weight: 700; font-size: 1rem; }
.logo-nav { height: 36px; width: auto; background: #fff; border-radius: 6px; padding: 4px 8px; display: block; }
.admin-nav-links { display: flex; gap: 4px; flex: 1; }
.nav-link { color: rgba(255,255,255,0.7); padding: 7px 14px; border-radius: 7px; font-size: 0.9rem; font-weight: 500; transition: all 0.2s; }
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,0.15); color: var(--white); text-decoration: none; }
.admin-nav-user { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav-email { color: rgba(255,255,255,0.5); font-size: 0.8rem; }

.admin-main { max-width: 1100px; margin: 0 auto; padding: 28px 20px 60px; }
.admin-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.admin-header h1 { font-size: 1.6rem; color: var(--primary); }
.admin-subtitle { color: var(--muted); font-size: 0.95rem; }
.header-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* KPIs */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
@media (max-width: 768px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
.kpi-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--border);
}
.kpi-active { border-top-color: var(--success); }
.kpi-locked { border-top-color: var(--muted); opacity: 0.8; }
.kpi-val { font-size: 2rem; font-weight: 700; color: var(--primary); }
.kpi-label { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }

/* Tables */
.table-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 20px;
}
.table-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 10px;
}
.table-card-header h2 { font-size: 1rem; }
.table-responsive { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th { background: #f8f9fa; color: var(--primary); padding: 11px 16px; text-align: left; font-weight: 600; border-bottom: 2px solid var(--border); }
.admin-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #f8f9fa; }
.table-sub { font-size: 0.8rem; color: var(--muted); }
.table-empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.table-filters { display: flex; gap: 6px; }
.filtre-btn { padding: 5px 14px; border: 1px solid var(--border); border-radius: 20px; font-size: 0.82rem; cursor: pointer; background: none; color: var(--muted); font-family: inherit; text-decoration: none; display: inline-block; transition: all 0.2s; }
.filtre-btn.active, .filtre-btn:hover { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* Badges statut */
.badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }
.badge-lg { font-size: 0.95rem; padding: 6px 14px; }
.badge-active   { background: #eafaf1; color: var(--success); }
.badge-brouillon { background: #f8f9fa; color: var(--muted); }
.badge-fermee   { background: #fdedec; color: var(--danger); }
.badge-archivee { background: #f0f0f0; color: #666; }
.badge-yes      { color: var(--success); font-weight: 600; }
.badge-no       { color: var(--muted); }

/* Participation */
.participation-cell { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.part-chiffres { font-weight: 600; font-size: 0.9rem; }
.mini-progress { width: 60px; height: 6px; background: var(--border); border-radius: 3px; }
.mini-fill { height: 100%; background: var(--primary); border-radius: 3px; }
.part-pct { font-size: 0.8rem; color: var(--muted); }
.seuil-alerte { cursor: help; }
.date-cell { font-size: 0.85rem; color: var(--muted); }
.actions-cell { display: flex; gap: 6px; }
.btn-icon { font-size: 1.1rem; cursor: pointer; text-decoration: none; padding: 4px; border-radius: 4px; transition: background 0.15s; }
.btn-icon:hover { background: #e8f0fe; }

/* Admin form */
.admin-form { max-width: 800px; }
.form-section {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.form-section-titre { font-size: 1.1rem; color: var(--primary); font-weight: 700; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--border); }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }
.form-field-toggle { flex-direction: row; align-items: center; gap: 12px; flex-wrap: wrap; }
.champ-demo-row { position: relative; padding: 12px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 12px; }
#demo-config { margin-top: 16px; }
.btn-delete-champ { position: absolute; top: 8px; right: 8px; background: none; border: none; color: var(--danger); cursor: pointer; font-size: 1rem; padding: 4px 8px; }

/* Tokens */
.token-url-cell { display: flex; align-items: center; gap: 8px; }
.token-url { font-family: monospace; font-size: 0.75rem; color: var(--muted); word-break: break-all; }
.btn-copy { background: none; border: 1px solid var(--border); border-radius: 4px; cursor: pointer; padding: 3px 6px; font-size: 0.85rem; }
.btn-copy:hover { background: #e8f0fe; }
.qr-mini { width: 48px; height: 48px; border: 1px solid var(--border); border-radius: 4px; }
.qr-link { display: block; }
.row-utilise { opacity: 0.6; }
.pagination { display: flex; gap: 6px; padding: 16px 20px; justify-content: center; }
.page-btn { padding: 6px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 0.85rem; color: var(--primary); text-decoration: none; }
.page-btn.active, .page-btn:hover { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* Rapports */
.rapports-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .rapports-grid { grid-template-columns: 1fr; } }
.rapport-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rapport-icone { font-size: 2.5rem; }
.rapport-desc { color: var(--muted); font-size: 0.9rem; flex: 1; }
.rapport-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.rapport-badge { padding: 4px 10px; border-radius: 20px; font-size: 0.78rem; background: #f0f0f0; color: #555; }
.badge-confidential { background: #fdedec; color: var(--danger); }
.badge-client { background: #e8f0fe; color: var(--primary); }

/* Résultats */
.charts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
@media (max-width: 640px) { .charts-grid { grid-template-columns: 1fr; } }
.chart-card { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.chart-card h2 { font-size: 1rem; margin-bottom: 16px; }
.chart-wrap { position: relative; height: 280px; }
.niveau-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; }
.score-bar-mini { height: 8px; background: var(--border); border-radius: 4px; }
.score-fill-mini { height: 8px; border-radius: 4px; }

/* Scores récap */
.scores-recap { display: grid; grid-template-columns: 200px 1fr; gap: 20px; padding: 20px; align-items: start; }
.score-global-box { border: 3px solid; border-radius: var(--radius); padding: 20px; text-align: center; }
.score-global-val { font-size: 3rem; font-weight: 700; }
.score-global-label { font-size: 0.85rem; color: var(--muted); }
.scores-familles { display: flex; flex-direction: column; gap: 10px; }
.score-famille-mini { display: grid; grid-template-columns: 24px 1fr 60px; gap: 8px; align-items: center; }
.icone-mini { font-size: 1rem; }
.titre-mini { font-size: 0.85rem; font-weight: 500; }
.val-mini { font-size: 0.85rem; font-weight: 700; text-align: right; }
.bar-mini { height: 6px; background: var(--border); border-radius: 3px; grid-column: 1 / -1; }
.bar-mini div { height: 6px; border-radius: 3px; }

/* ─── Pied de page ─────────────────────────────────────────────────────────── */
.pied-page {
  text-align: center;
  padding: 24px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
  margin-top: 32px;
}
.pied-page a { color: var(--muted); }
.pied-questionnaire { padding-top: 16px; }

/* ─── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .admin-nav { padding: 10px 16px; }
  .admin-main { padding: 16px 12px 40px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .table-card-header { flex-direction: column; }
  .scores-recap { grid-template-columns: 1fr; }
  .questionnaire-header { flex-wrap: wrap; }
}
