:root {
  --bleu: #1c1c4d;
  --bleu-mid: #29296b;
  --cyan: #29abe2;
  --cyan-dark: #1c8bbd;
  --cyan-light: #eaf7fd;
  --danger: #c0392b;
  --gris: #f6f7f9;
  --gris-bord: #e6e8ee;
  --texte: #171a2b;
  --texte-sec: #6b7280;
  --vert: #16a34a;
  --orange: #ea580c;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(16,24,40,0.04);
  --shadow-md: 0 2px 8px rgba(16,24,40,0.06);
  --shadow-lg: 0 8px 24px rgba(16,24,40,0.09);

  --font-body: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: "Manrope", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}

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

body {
  font-family: var(--font-body);
  background: #f4f5f8;
  color: var(--texte);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* État visible au clavier (Tab) sur tout élément interactif - absent auparavant, ce qui rendait
   la navigation clavier invisible (focus present mais jamais montré). */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2.5px solid var(--cyan); outline-offset: 2px; border-radius: 4px;
}

.topbar {
  background: white;
  padding: 12px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--gris-bord);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand-logo { height: 72px; width: auto; display: block; }
.subtitle { color: var(--texte-sec); font-size: 12.5px; margin-top: 2px; font-weight: 500; }

.main { max-width: 900px; margin: 0 auto; padding: 32px 20px 64px; }
.main-wide { max-width: 1160px; }

.flash-list { margin-bottom: 18px; }
.flash { padding: 11px 16px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 8px; font-weight: 500; }
.flash-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.flash-error { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }

.section-title { font-family: var(--font-display); font-size: 24px; color: var(--texte); margin-bottom: 5px; font-weight: 800; letter-spacing: -0.3px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.section-desc { font-size: 13.5px; color: var(--texte-sec); margin-bottom: 24px; overflow-wrap: anywhere; }

.detail-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 5px; }
.detail-header .btn { flex-shrink: 0; }
.points-badge {
  display: inline-block;
  background: var(--cyan);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  margin-left: 8px;
  vertical-align: middle;
}

.info-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gris-bord);
}
.info-card h3 { font-family: var(--font-display); font-size: 13.5px; font-weight: 800; color: var(--texte); letter-spacing: 0.2px; margin-bottom: 16px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
label { font-size: 12px; font-weight: 600; color: var(--texte-sec); }
input[type="text"], input[type="password"], input[type="date"], input[type="number"], input[type="email"], input[type="url"], textarea, select {
  border: 1.5px solid var(--gris-bord);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--texte);
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-light); }
input:disabled, textarea:disabled { background: var(--gris); color: var(--texte-sec); }
textarea { resize: vertical; min-height: 70px; }

.readonly-value { padding: 10px 13px; background: var(--gris); border-radius: var(--radius-sm); font-size: 13.5px; color: var(--texte); }

.note-input { width: 60px; text-align: center; flex-shrink: 0; }

.progress-bar {
  background: var(--bleu-mid);
  border-radius: 10px;
  padding: 0 12px;
  display: flex;
  margin-bottom: 22px;
  overflow-x: auto;
}
.prog-step {
  flex: 1;
  text-align: center;
  padding: 12px 6px;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}
.prog-step:hover { color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.06); }
.prog-step.active { color: white; border-bottom-color: var(--cyan); font-weight: 600; }
.prog-step.active:hover { color: white; background: none; }
.prog-step.done { color: #4ade80; }
.prog-step.done:hover { color: #6ee7a0; background: rgba(255,255,255,0.06); }

.fiche-section { display: none; }
.fiche-section.active { display: block; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 16px; }
.table-scroll table.critere-table { margin-bottom: 0; }

table.critere-table { width: 100%; border-collapse: collapse; background: white; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.06); margin-bottom: 16px; }
table.critere-table th, table.critere-table td { padding: 8px 12px; font-size: 13px; text-align: left; border-bottom: 1px solid var(--gris-bord); vertical-align: middle; }
table.critere-table th { background: var(--gris); font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--texte-sec); font-weight: 600; }
table.critere-table tr:last-child td { border-bottom: none; }
table.critere-table td:first-child, table.critere-table th:first-child { width: 32px; color: var(--texte-sec); font-weight: 600; }
table.critere-table td:nth-child(3), table.critere-table th:nth-child(3) { width: 64px; color: var(--texte-sec); font-size: 12px; white-space: nowrap; }
table.critere-table td:last-child, table.critere-table th:last-child { width: 64px; }
table.critere-table .note-input { width: 55px; padding: 6px 8px; }

/* Table "Questions" (Question + Réponse attendue) : texte long, contrairement au Barème des
   tableaux de critères ci-dessus - la 3e colonne doit pouvoir passer à la ligne, pas rester
   figée à 64px en nowrap. */
table.critere-table.table-questions { min-width: 560px; }
table.critere-table.table-questions td:nth-child(2), table.critere-table.table-questions td:nth-child(3) { white-space: normal; }
table.critere-table.table-questions td:nth-child(3), table.critere-table.table-questions th:nth-child(3) { width: 30%; }
table.critere-table.table-questions td:nth-child(4), table.critere-table.table-questions th:nth-child(4),
table.critere-table.table-questions td:nth-child(5), table.critere-table.table-questions th:nth-child(5) { width: 64px; text-align: center; }

.elim-card {
  background: #fff8f7;
  border: 1.5px solid #fecaca;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.elim-label { flex: 1; font-size: 13px; font-weight: 500; color: #991b1b; }
.elim-obs { flex: 1.5; }
.elim-obs input { font-size: 12px; }

.score-recap {
  background: var(--bleu);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.score-item { flex: 1; min-width: 120px; }
.score-item .num { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: white; font-variant-numeric: tabular-nums; }
.score-item .denom { font-size: 16px; color: rgba(255,255,255,0.5); }
.score-item .lbl { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 2px; }

.jury-card { background: white; border-radius: 10px; padding: 16px 20px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.jury-card h4 { font-size: 13px; font-weight: 600; margin-bottom: 12px; color: var(--bleu); }
.radio-group { display: flex; gap: 16px; margin-bottom: 10px; }
.radio-opt { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.radio-opt input { cursor: pointer; accent-color: var(--cyan); width: auto; }

.nav-btns { display: flex; justify-content: space-between; margin-top: 28px; gap: 10px; }

/* Barre Retour/Suivant du parcours par étapes (fiche.html) : en fin de contenu, elle défile
   avec la page (elle n'est plus collée en bas de l'écran, où elle masquait le cadre de signature). */
.wizard-nav {
  position: static;
  padding: 14px 0;
}
.btn {
  padding: 10px 24px; border-radius: var(--radius-sm); border: none; font-size: 13.5px;
  font-weight: 700; cursor: pointer; font-family: var(--font-display); transition: all 0.15s;
  text-decoration: none; display: inline-block;
}
.btn:hover { filter: brightness(0.97); }
.btn:active { filter: brightness(0.93); }
.btn-prev, .btn-secondary { background: white; color: var(--texte); border: 1.5px solid var(--gris-bord); }
.btn-prev:hover, .btn-secondary:hover { background: var(--gris); filter: none; }
.btn-next, .btn-primary { background: var(--cyan); color: white; }
.btn-next:hover, .btn-primary:hover { background: var(--cyan-dark); filter: none; }
.btn-pdf { background: var(--bleu); color: white; padding: 12px 30px; font-size: 14px; }
.btn-pdf:hover { background: var(--bleu-mid); filter: none; }
.btn-danger { background: #fef2f2; color: #991b1b; border: 1.5px solid #fca5a5; }
.btn-danger:hover { background: #fee2e2; filter: none; }
.btn:disabled { background: #d1d5db; color: #6b7280; cursor: not-allowed; filter: none; }

.admin-nav {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin-bottom: 32px; border-bottom: 1.5px solid var(--gris-bord); flex-wrap: wrap;
}
.nav-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.nav-tab {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px;
  font-size: 13.5px; font-weight: 600; color: var(--texte-sec); text-decoration: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0; border-bottom: 2.5px solid transparent; margin-bottom: -1.5px;
  transition: color 0.15s, border-color 0.15s, background 0.15s; white-space: nowrap;
}
.nav-tab:hover { background: var(--gris); }
.nav-tab svg { flex-shrink: 0; opacity: 0.7; }
.nav-tab:hover { color: var(--texte); }
.nav-tab.active { color: var(--bleu); border-bottom-color: var(--cyan); background: transparent; }
.nav-tab.active svg { opacity: 1; }

.nav-actions { display: flex; align-items: center; justify-content: flex-end; gap: 18px; padding-bottom: 12px; min-height: 52px; margin-left: auto; }
.nav-cta { display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px; font-size: 13px; }
.nav-logout {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
  color: var(--texte-sec); text-decoration: none; transition: color 0.15s;
}
.nav-logout:hover { color: #991b1b; }
.nav-user {
  display: inline-flex; align-items: center; gap: 10px; min-width: 0;
  padding: 5px 6px 5px 6px; background: var(--gris); border: 1px solid var(--gris-bord); border-radius: 999px;
}
.nav-user-logout { margin: 0 0 0 4px; padding-left: 8px; border-left: 1px solid var(--gris-bord); display: flex; }
.nav-user-logout button {
  width: 32px; height: 32px; border-radius: 50%; border: 0; background: transparent; cursor: pointer;
  display: grid; place-items: center; color: var(--texte-sec); transition: background .15s, color .15s;
}
.nav-user-logout button:hover { background: #fee2e2; color: #991b1b; }
.nav-user-text { padding-right: 2px; }
.nav-avatar {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--cyan), var(--bleu)); color: white; font-size: 14px; font-weight: 800;
  box-shadow: 0 4px 10px -4px rgba(28,28,77,.5);
}
.nav-user-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.nav-user-text strong { font-size: 13.5px; color: var(--bleu); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.nav-user-text small { font-size: 11px; font-weight: 600; color: var(--texte-sec); white-space: nowrap; }
.nav-sep { width: 1px; height: 26px; background: var(--gris-bord); flex-shrink: 0; }
@media (max-width: 720px) { .nav-user-text small { display: none; } .nav-sep { display: none; } }

table.eval-table {
  width: 100%; border-collapse: collapse; background: white; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid var(--gris-bord);
}
table.eval-table th, table.eval-table td { padding: 14px 16px; text-align: left; font-size: 13.5px; border-bottom: 1px solid var(--gris-bord); }
table.eval-table th { background: transparent; color: var(--texte-sec); font-weight: 700; text-transform: uppercase; font-size: 10.5px; letter-spacing: 0.5px; border-bottom: 1.5px solid var(--gris-bord); }
table.eval-table tr:last-child td { border-bottom: none; }
table.eval-table code { background: var(--gris); padding: 3px 7px; border-radius: 6px; font-size: 12px; color: var(--bleu); }
table.eval-table tbody tr.eval-row { cursor: pointer; transition: background 0.15s; }
table.eval-table tbody tr.eval-row:hover { background: var(--cyan-light); }
table.eval-table .row-actions { display: flex; gap: 6px; white-space: nowrap; }

.stats-row { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.stat-card {
  flex: 1; min-width: 90px; background: white; border-radius: var(--radius-sm); padding: 10px 14px;
  box-shadow: var(--shadow-sm); cursor: pointer; border: 1.5px solid var(--gris-bord); border-top: 3px solid var(--gris-bord);
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.stat-card:hover { transform: translateY(-1px); }
.stat-card.active { background: var(--cyan-light); }
.stat-card .num { font-family: var(--font-display); font-size: 19px; font-weight: 800; color: var(--texte); letter-spacing: -0.3px; font-variant-numeric: tabular-nums; }
.stat-card .lbl { font-size: 11px; color: var(--texte-sec); margin-top: 2px; font-weight: 600; }

.stat-card-all { border-top-color: var(--bleu); }
.stat-card-all .num { color: var(--bleu); }
.stat-card-all.active { border-color: var(--bleu); }
.stat-card-vide { border-top-color: #9aa0ab; }
.stat-card-vide .num { color: #9aa0ab; }
.stat-card-vide.active { border-color: #9aa0ab; }
.stat-card-pre_rempli { border-top-color: #d97706; }
.stat-card-pre_rempli .num { color: #d97706; }
.stat-card-pre_rempli.active { border-color: #d97706; }
.stat-card-en_cours { border-top-color: #2563eb; }
.stat-card-en_cours .num { color: #2563eb; }
.stat-card-en_cours.active { border-color: #2563eb; }
.stat-card-termine { border-top-color: var(--vert); }
.stat-card-termine .num { color: var(--vert); }
.stat-card-termine.active { border-color: var(--vert); }

.dash-toolbar { margin-bottom: 14px; display: flex; flex-direction: column; gap: 10px; }
.search-box-wrap { position: relative; max-width: 420px; }
.search-box-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--texte-sec); pointer-events: none; }
.search-box {
  width: 100%; max-width: 420px; border: 1.5px solid var(--gris-bord); border-radius: var(--radius-sm);
  padding: 11px 14px 11px 36px; font-size: 13.5px; font-family: inherit; background: white; transition: border-color 0.15s, box-shadow 0.15s;
}
.search-box:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-light); }

/* Sections repliables (statistiques, filtres avancés) : masquées par défaut pour ne pas
   surcharger l'écran des utilisateurs peu à l'aise avec l'informatique. */
.collapsible { margin-bottom: 20px; }
.collapsible summary {
  cursor: pointer; font-size: 13px; font-weight: 700; color: var(--texte-sec);
  padding: 10px 16px; background: white; border: 1.5px solid var(--gris-bord); border-radius: var(--radius-sm);
  list-style: none; user-select: none; transition: all 0.15s; display: inline-block;
}
.collapsible summary::-webkit-details-marker { display: none; }
.collapsible summary::after { content: "›"; display: inline-block; margin-left: 8px; transition: transform 0.15s; font-weight: 700; }
.collapsible[open] summary::after { transform: rotate(90deg); }
.collapsible summary:hover { border-color: var(--cyan); color: var(--cyan-dark); background: var(--cyan-light); }
.collapsible[open] summary { border-radius: var(--radius-sm) var(--radius-sm) 0 0; margin-bottom: 0; display: block; }
.collapsible .charts-row { margin-top: 10px; margin-bottom: 0; }
.collapsible-inline { display: inline-block; }
.collapsible-inline[open] { display: block; }
.collapsible-inline .dash-filters {
  margin-top: 10px; padding: 14px 16px; background: white; border: 1.5px solid var(--gris-bord);
  border-top: none; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.bulk-actions-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--cyan-light); border: 1.5px solid var(--cyan); border-radius: var(--radius-sm);
  padding: 10px 14px; margin-bottom: 12px; font-size: 13px; color: var(--bleu);
}

.action-btn {
  border: 1.5px solid var(--gris-bord); background: white; border-radius: 8px; padding: 7px 12px;
  font-size: 12px; font-weight: 600; color: var(--texte); cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: all 0.15s;
}
.action-btn:hover { background: var(--cyan-light); border-color: var(--cyan); color: var(--cyan-dark); }
.action-btn-danger { color: #991b1b; }
.action-btn-danger:hover { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }

.empty-state { text-align: center; padding: 48px 20px; color: var(--texte-sec); font-size: 13.5px; }
.empty-state svg { display: block; margin: 0 auto 12px; color: var(--gris-bord); }

.text-danger { color: #991b1b; }

.charts-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.charts-row-single { grid-template-columns: 1fr; }
.status-bars { display: flex; flex-direction: column; gap: 14px; }
.status-bar-row { display: grid; grid-template-columns: 100px 1fr 36px; align-items: center; gap: 12px; font-size: 13px; font-weight: 600; color: var(--texte); }
.status-bar-track { background: var(--gris); border-radius: 8px; height: 20px; overflow: hidden; }
.status-bar-fill { height: 100%; border-radius: 8px; transition: width 0.3s; }
.status-bar-fill.st-vide { background: #9aa0ab; }
.status-bar-fill.st-pre_rempli { background: #d97706; }
.status-bar-fill.st-en_cours { background: #2563eb; }
.status-bar-fill.st-termine { background: var(--vert); }
.status-bar-count { text-align: right; font-weight: 800; color: var(--texte); font-size: 14px; }

.evolution-chart { display: flex; align-items: flex-end; gap: 10px; height: 130px; padding-top: 16px; }
.evolution-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.evolution-bar-wrap { flex: 1; display: flex; align-items: flex-end; width: 100%; justify-content: center; }
.evolution-bar { width: 55%; min-width: 16px; background: var(--cyan); border-radius: 4px 4px 0 0; transition: height 0.3s; }
.evolution-value { font-size: 11px; font-weight: 600; color: var(--texte); }
.evolution-label { font-size: 11px; color: var(--texte-sec); }

.dash-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.dash-filters select, .dash-filters input[type="date"] { padding: 9px 12px; font-size: 12px; width: auto; }
.filter-label { font-size: 11px; color: var(--texte-sec); white-space: nowrap; }

table.eval-table th.sortable { cursor: pointer; user-select: none; }
table.eval-table th.sortable:hover { color: var(--cyan-dark); }
table.eval-table th.sortable .sort-arrow { display: inline-block; margin-left: 4px; opacity: 0.35; }
table.eval-table th.sortable.sort-asc .sort-arrow, table.eval-table th.sortable.sort-desc .sort-arrow { opacity: 1; color: var(--cyan); }

.stale-flag { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; color: #c2410c; font-size: 11px; font-weight: 600; }

.role-status-dots { display: inline-flex; gap: 3px; margin-left: 6px; vertical-align: middle; }
.role-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 19px; height: 19px; border-radius: 50%; font-size: 8.5px; font-weight: 700;
  border: 1.5px solid transparent; cursor: default; line-height: 1;
}
.role-chip.rc-vide { background: var(--gris); color: var(--texte-sec); opacity: 0.7; }
.role-chip.rc-en_cours { background: #fef3c7; color: #92400e; border-color: #f59e0b; }
.role-chip.rc-termine { background: #dcfce7; color: #166534; border-color: #16a34a; }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.pagination-info { font-size: 12px; color: var(--texte-sec); }
.pagination-btns { display: flex; gap: 8px; align-items: center; }
.pagination-btns button { border: 1.5px solid var(--gris-bord); background: white; border-radius: var(--radius-sm); padding: 7px 13px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.15s; }
.pagination-btns button:hover:not(:disabled) { background: var(--cyan-light); border-color: var(--cyan); color: var(--cyan-dark); }
.pagination-btns button:disabled { opacity: 0.4; cursor: not-allowed; }
.pagination-btns .page-indicator { font-size: 12px; color: var(--texte-sec); padding: 0 4px; white-space: nowrap; }

@media (max-width: 700px) {
  .charts-row { grid-template-columns: 1fr; }
}

.badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; white-space: nowrap; border: 1.5px solid transparent; }
.badge::before { margin-right: 5px; font-weight: 800; }
.badge-vide { background: #e2e8f0; color: #475569; border-color: #cbd5e1; }
.badge-vide::before { content: "○"; }
.badge-pre_rempli { background: #fde68a; color: #92400e; border-color: #fbbf24; }
.badge-pre_rempli::before { content: "✎"; }
.badge-en_cours { background: #bfdbfe; color: #1e40af; border-color: #93c5fd; }
.badge-en_cours::before { content: "●"; }
.badge-termine { background: #bbf7d0; color: #166534; border-color: #86efac; }
.badge-termine::before { content: "✓"; }

.role-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 10px; }
.role-card {
  background: white; border-radius: var(--radius); padding: 20px; border: 1px solid var(--gris-bord);
  text-align: center; display: flex; flex-direction: column; align-items: center;
}
.role-card-label { font-size: 15px; font-weight: 700; color: var(--texte); margin-bottom: 8px; }
.role-card-signataire { font-size: 12px; color: var(--texte-sec); margin-top: 8px; }

.sig-pad {
  width: 100%; max-width: 600px; height: 160px; border: 1.5px dashed var(--gris-bord);
  border-radius: var(--radius-sm); background: white; touch-action: none; cursor: crosshair; display: block;
}
.sig-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.sig-hint { font-size: 12px; color: var(--texte-sec); }
.sig-saved-note {
  margin-top: 12px; padding: 10px 14px; font-size: 13px; line-height: 1.45; font-weight: 500;
  background: #ecfdf5; border: 1.5px solid #a7f3d0; color: #065f46; border-radius: var(--radius-sm);
}
.sig-saved-note[hidden] { display: none; }

.code-box {
  background: var(--gris); border: 1.5px dashed var(--gris-bord); border-radius: var(--radius-sm);
  padding: 12px 16px; font-family: ui-monospace, monospace; font-size: 15px; font-weight: 600; color: var(--bleu);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.code-box span { word-break: break-all; overflow-wrap: anywhere; min-width: 0; }
.code-box button { flex-shrink: 0; }

.access-box { max-width: 420px; margin: 80px auto; background: white; border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow-md); border: 1px solid var(--gris-bord); }
.access-box h2 { font-family: var(--font-display); margin-bottom: 8px; color: var(--texte); font-size: 20px; font-weight: 800; }
.access-box p { color: var(--texte-sec); font-size: 13px; margin-bottom: 24px; }
.access-box form .form-group { margin-bottom: 16px; }

.actions-row { display: flex; gap: 8px; flex-wrap: wrap; }

.locked-banner {
  background: #ecfdf5; border: 1.5px solid #a7f3d0; color: #065f46;
  border-radius: var(--radius-sm); padding: 12px 16px; font-size: 13px; margin-bottom: 20px;
}

.link-wrap { word-break: break-all; overflow-wrap: anywhere; }

.toast-backdrop {
  position: fixed; inset: 0; z-index: 999; background: rgba(23, 26, 43, 0.35);
  opacity: 0; animation: toast-backdrop-in 0.25s ease forwards, toast-backdrop-out 0.3s ease forwards 3.1s;
}
@keyframes toast-backdrop-in { to { opacity: 1; } }
@keyframes toast-backdrop-out { to { opacity: 0; } }

.toast {
  position: fixed; top: 50%; left: 50%; z-index: 1000;
  background: white; color: var(--texte); border: 1px solid var(--gris-bord);
  box-shadow: var(--shadow-lg); border-radius: var(--radius); text-align: center;
  padding: 22px 32px; font-size: 16px; font-weight: 600; max-width: 90vw;
  opacity: 0; transform: translate(-50%, -50%) scale(0.94);
  animation: toast-in 0.25s ease forwards, toast-out 0.3s ease forwards 3.1s;
}
/* Popup de bienvenue : emoji main qui salue, au-dessus du message */
.toast-welcome { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 44px; }
.wave-emoji {
  display: inline-block; font-size: 52px; line-height: 1; transform-origin: 70% 75%;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", sans-serif;
  animation: wave-hand 1.5s ease-in-out 0.3s 2;
}
.toast-welcome-text { font-family: var(--font-display); font-size: 18px; font-weight: 800; color: var(--bleu); }
@keyframes wave-hand {
  0%, 100% { transform: rotate(0deg); }
  10% { transform: rotate(16deg); }
  20% { transform: rotate(-10deg); }
  30% { transform: rotate(16deg); }
  40% { transform: rotate(-8deg); }
  50% { transform: rotate(12deg); }
  60% { transform: rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) { .wave-emoji { animation: none; } }

@keyframes toast-in { to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes toast-out { to { opacity: 0; transform: translate(-50%, -50%) scale(0.94); } }

.guide-card { background: white; border-color: var(--gris-bord); border-left: 4px solid var(--cyan); padding: 16px 24px; margin-bottom: 12px; }
.guide-card h3 { color: var(--bleu); margin-bottom: 10px; }

/* Bandeau chiffré (ex. note moyenne) : remplace les blocs bleus construits en style inline. */
.stat-banner {
  background: var(--bleu); border-radius: 10px; padding: 14px 18px; margin-top: 16px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.stat-banner .stat-banner-num { color: white; font-size: 18px; font-weight: 700; font-family: var(--font-display); }
.stat-banner .stat-banner-sub { color: #c8c8dc; font-size: 12px; margin-top: 2px; }
.guide-steps { list-style: none; counter-reset: guide-step; display: flex; flex-direction: column; gap: 6px; }
/* Le numéro est positionné en absolu : avec un li en flex, chaque <strong>/<em> du texte devenait
   une colonne séparée et les mots se retrouvaient espacés. */
.guide-steps li { counter-increment: guide-step; position: relative; padding-left: 36px; min-height: 24px; font-size: 13.5px; color: var(--texte); line-height: 1.5; overflow-wrap: anywhere; }
.guide-steps li::before {
  content: counter(guide-step); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%;
  background: var(--cyan); color: white; font-size: 12px; font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}

.guide-toc { display: flex; flex-direction: column; gap: 8px; }
.guide-toc a { font-size: 13.5px; font-weight: 600; color: var(--cyan-dark); text-decoration: none; }
.guide-toc a:hover { text-decoration: underline; }
.guide-toc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 24px; }
.guide-lead { font-size: 13.5px; line-height: 1.5; color: var(--texte); margin-bottom: 12px; }
.guide-table-wrap { overflow-x: auto; margin-bottom: 14px; }
.guide-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.guide-table th, .guide-table td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--gris-bord); vertical-align: top; }
.guide-table th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--texte-sec); background: var(--gris); }
.guide-table td:first-child { font-weight: 700; color: var(--bleu); white-space: nowrap; }
.faq-item { border-bottom: 1px solid var(--gris-bord); }
.faq-item:last-child { border-bottom: none; }
.faq-item summary { cursor: pointer; padding: 12px 4px; font-size: 13.5px; font-weight: 600; color: var(--texte); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-weight: 700; color: var(--cyan-dark); flex-shrink: 0; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { font-size: 13px; line-height: 1.5; color: var(--texte-sec); padding: 0 4px 14px; }
@media (max-width: 700px) { .guide-table td:first-child { white-space: normal; } }
.guide-card { scroll-margin-top: 80px; }

.share-links-intro { font-size: 12.5px; color: var(--texte-sec); margin-bottom: 16px; line-height: 1.5; }

.share-links-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }

.share-link-card {
  background: var(--gris); border: 1.5px solid var(--gris-bord); border-radius: 12px;
  padding: 16px 18px; display: flex; flex-direction: column; gap: 12px;
}

.share-link-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.share-link-role { display: flex; align-items: center; gap: 10px; min-width: 0; }
.share-link-avatar {
  width: 34px; height: 34px; border-radius: 50%; color: white; display: flex; flex-shrink: 0;
  align-items: center; justify-content: center; font-weight: 700; font-size: 11px; letter-spacing: 0.3px;
}
.share-link-avatar.avatar-pro { background: var(--bleu); }
.share-link-avatar.avatar-prof { background: var(--cyan-dark); }
.share-link-avatar.avatar-med { background: #16a34a; }
.share-link-name { font-weight: 700; font-size: 14px; color: var(--bleu); }
.share-link-sub { font-size: 11.5px; color: var(--texte-sec); margin-top: 1px; }

.share-link-url-row {
  display: flex; align-items: center; gap: 8px; background: white;
  border: 1.5px dashed var(--gris-bord); border-radius: 9px; padding: 9px 10px 9px 12px;
}
.share-link-icon { color: var(--texte-sec); flex-shrink: 0; }
.share-link-url {
  flex: 1; min-width: 0; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 11.5px; color: var(--texte-sec); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.icon-btn {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; border: 1.5px solid var(--gris-bord);
  background: white; color: var(--texte); border-radius: 7px; padding: 6px 10px; font-size: 11.5px;
  font-weight: 600; font-family: inherit; cursor: pointer; white-space: nowrap; transition: all 0.15s;
}
.icon-btn:hover { background: var(--cyan-light); border-color: var(--cyan); color: var(--cyan-dark); }
.icon-btn.copied { background: #dcfce7; border-color: #86efac; color: #166534; }

.share-link-mail-row { display: flex; gap: 8px; flex-wrap: wrap; }
.share-link-mail-row .role-email-input { flex: 1; min-width: 160px; font-size: 12px; padding: 8px 10px; }
.share-link-mail-row .mail-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; font-size: 12px; white-space: nowrap;
}

.share-link-done-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  font-size: 12px; color: var(--vert, #166534);
}
.share-link-done-row .btn { padding: 7px 14px; font-size: 12px; white-space: nowrap; }

.share-links-footer {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--gris-bord);
  font-size: 12px; color: var(--texte-sec);
}
.share-links-footer a { color: var(--cyan-dark); font-weight: 600; text-decoration: none; white-space: nowrap; }
.share-links-footer a:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .share-links-grid { grid-template-columns: 1fr; }
  .share-links-footer { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
  .topbar { padding: 14px 16px; }
  .brand-logo { height: 44px; }
  .main { padding: 20px 12px 50px; }
  .form-grid { grid-template-columns: 1fr; }
  .admin-nav { align-items: stretch; }
  .nav-tabs { gap: 16px; }
  .nav-actions { width: 100%; justify-content: space-between; padding-bottom: 10px; }
  .nav-cta span { display: none; }
  .nav-logout span { display: none; }
  table.eval-table { font-size: 12px; }
  .stats-row { gap: 8px; }
  .stat-card { min-width: 80px; padding: 10px 12px; }
  .search-box, .search-box-wrap { max-width: none; }
  .role-grid { grid-template-columns: 1fr; }

  .info-card { padding: 16px; }
  table.critere-table th, table.critere-table td { padding: 8px 6px; font-size: 12px; }
  table.critere-table .note-input { width: 46px; padding: 6px 4px; }

  .score-recap { gap: 10px; padding: 16px; }
  .score-item { flex: 1 1 40%; min-width: 0; }
  .score-item .num { font-size: 22px; }
  .score-item .denom { font-size: 13px; }

  .elim-card { flex-direction: column; gap: 8px; padding: 12px 14px; }
  .elim-obs, .elim-label { flex: none; width: 100%; }

  .nav-btns { flex-wrap: wrap; }
  .nav-btns .actions-row { flex: 1; justify-content: flex-end; }

  .wizard-nav { padding-top: 10px; padding-bottom: 10px; }
}

/* Alertes de retard (évaluateurs n'ayant pas validé après 7 jours) */
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--danger); color: white; font-size: 11px; font-weight: 800; line-height: 1;
}
.alert-panel {
  background: #fff7ed; border: 1.5px solid #fdba74; border-left: 5px solid var(--orange);
  border-radius: var(--radius); padding: 16px 20px; margin-bottom: 22px;
}
.alert-panel-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.alert-panel-icon {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--orange); color: white;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-family: var(--font-display);
}
.alert-panel-title { font-family: var(--font-display); font-weight: 800; font-size: 15px; color: #9a3412; }
.alert-panel-sub { font-size: 12.5px; color: #9a3412; margin-top: 2px; }
.alert-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.alert-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: white; border: 1px solid #fed7aa; border-radius: var(--radius-sm); padding: 10px 14px;
}
.alert-item-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.alert-item .action-btn { text-decoration: none; }
.alert-item-name { font-weight: 700; font-size: 14px; color: var(--bleu); text-decoration: none; }
.alert-item-name:hover { text-decoration: underline; }
.alert-item-meta { font-size: 12px; color: var(--texte-sec); overflow-wrap: anywhere; }
.alert-item-meta code { background: var(--gris); padding: 1px 6px; border-radius: 5px; font-size: 11.5px; color: var(--bleu); }
.alert-item-roles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.alert-role { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 20px; background: #fee2e2; color: #991b1b; }
.alert-role-started { background: #fef3c7; color: #92400e; }
@media (max-width: 700px) { .alert-item .action-btn { width: 100%; justify-content: center; } }

/* Bandeau d'information (géré depuis l'onglet « Bandeau » de l'admin) */
.site-banner {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 40px;
  font-size: 14px; line-height: 1.45; border-bottom: 1px solid transparent;
}
.site-banner-info { background: var(--cyan-light); border-color: #bde6f7; color: var(--bleu); }
.site-banner-attention { background: #fff7ed; border-color: #fdba74; color: #9a3412; }
.site-banner-icon {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; margin-top: 1px;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800;
  font-family: var(--font-display); color: white; background: var(--cyan-dark);
}
.site-banner-attention .site-banner-icon { background: var(--orange); }
.site-banner-text { white-space: pre-line; overflow-wrap: anywhere; min-width: 0; }
.info-card .site-banner { border: 1px solid; border-radius: var(--radius-sm); padding: 12px 16px; }
.info-card .site-banner-info { border-color: #bde6f7; }
.info-card .site-banner-attention { border-color: #fdba74; }
.field-hint { font-size: 12px; color: var(--texte-sec); }
.switch-row { display: flex; align-items: center; gap: 10px; min-height: 42px; font-size: 13.5px; font-weight: 500; color: var(--texte); cursor: pointer; }
.switch-row input { width: 20px; height: 20px; accent-color: var(--cyan); cursor: pointer; }
@media (max-width: 700px) { .site-banner { padding: 12px max(16px, env(safe-area-inset-left)); font-size: 14px; } }

/* ===== Responsive téléphone (complément) ===== */
html { -webkit-text-size-adjust: 100%; overflow-y: scroll; scrollbar-gutter: stable; }
img { max-width: 100%; }

@media (max-width: 700px) {
  /* Encoches / barre d'accueil iOS (viewport-fit=cover) */
  .topbar { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .main { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); padding-bottom: max(50px, calc(env(safe-area-inset-bottom) + 24px)); }
  .wizard-nav { padding-bottom: max(10px, env(safe-area-inset-bottom)); }

  /* 16px minimum : évite le zoom automatique d'iOS au focus d'un champ */
  input[type="text"], input[type="password"], input[type="date"], input[type="number"],
  input[type="email"], input[type="url"], textarea, select, .search-box,
  .share-link-mail-row .role-email-input, .dash-filters select, .dash-filters input[type="date"] { font-size: 16px; }
  .elim-obs input { font-size: 16px; }

  /* Zones tactiles confortables (≈44px) */
  .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; text-align: center; }
  .btn-pdf { padding: 12px 20px; }
  .action-btn, .icon-btn, .pagination-btns button { min-height: 40px; }
  .nav-tab { min-height: 44px; }
  input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; flex-shrink: 0; }
  .radio-opt { min-height: 36px; }
  .radio-group { flex-wrap: wrap; }

  /* Navigation admin : onglets défilants, actions sur une ligne */
  .nav-tabs { flex-wrap: nowrap; overflow-x: auto; gap: 4px; width: 100%; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .nav-tabs::-webkit-scrollbar { display: none; }
  .nav-tab { padding: 9px 12px; }
  .admin-nav { margin-bottom: 20px; gap: 0; }
  .nav-actions { padding: 10px 0; }
  .nav-cta span { display: inline; }
  .nav-cta { flex: 1; justify-content: center; }

  .section-title { font-size: 20px; }
  .detail-header .btn { width: 100%; }
  .actions-row > .btn, .actions-row > form { flex: 1 1 100%; }
  .actions-row > form .btn { width: 100%; }
  .nav-btns .btn { flex: 1; }

  .access-box { margin: 28px auto; padding: 24px 20px; }
  .toast { padding: 18px 22px; font-size: 15px; }
  .sig-pad { height: 180px; }
  .sig-row .btn { flex: 1; }

  .stats-row .stat-card { flex: 1 1 calc(50% - 8px); }
  .status-bar-row { grid-template-columns: 80px 1fr 30px; gap: 8px; }
  .code-box { flex-direction: column; align-items: stretch; font-size: 14px; }
  .code-box button { width: 100%; }
  .stat-banner .stat-banner-num { font-size: 16px; }

  /* Filtres : champs pleine largeur */
  .dash-filters { flex-direction: column; align-items: stretch; }
  .dash-filters select, .dash-filters input[type="date"], .dash-filters .action-btn { width: 100%; justify-content: center; margin-left: 0 !important; }
  .bulk-actions-bar .action-btn { flex: 1 1 100%; justify-content: center; margin-left: 0 !important; }
  .collapsible-inline, .collapsible summary { display: block; }
  .pagination { justify-content: center; }
  .pagination-info { width: 100%; text-align: center; }

  /* Tableau des évaluations → une carte par évaluation */
  #evalTable { display: block; background: transparent; border: none; box-shadow: none; }
  #evalTable thead { display: none; }
  #evalTable tbody { display: block; }
  #evalTable tr.eval-row {
    display: block; position: relative; background: white; border: 1px solid var(--gris-bord);
    border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 14px 14px 12px 50px; margin-bottom: 10px;
  }
  #evalTable tr.eval-row:active { background: var(--cyan-light); }
  #evalTable tr.eval-row td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 3px 0; border: none; font-size: 13px; }
  #evalTable tr.eval-row td::before { content: attr(data-label); font-size: 11px; font-weight: 700; color: var(--texte-sec); text-transform: uppercase; letter-spacing: 0.4px; flex-shrink: 0; }
  #evalTable tr.eval-row td:nth-child(1) { position: absolute; left: 14px; top: 14px; padding: 0; }
  #evalTable tr.eval-row td:nth-child(1)::before, #evalTable tr.eval-row td:nth-child(2)::before { content: none; }
  #evalTable tr.eval-row td:nth-child(2) { font-size: 15px; font-weight: 700; color: var(--texte); padding-bottom: 6px; }
  #evalTable tr.eval-row td:nth-child(3) { text-align: right; }
  #evalTable tr.eval-row td:nth-child(6) { flex-wrap: wrap; justify-content: flex-end; }
  #evalTable tr.eval-row td:nth-child(6)::before { margin-right: auto; }
  #evalTable tr.eval-row td:nth-child(9) { justify-content: flex-end; padding-top: 8px; }
  #evalTable tr.eval-row td:nth-child(9)::before { content: none; }

  /* Tableau des comptes : actions empilées */
  table.eval-table .row-actions { flex-wrap: wrap; justify-content: flex-end; }
  table.eval-table th, table.eval-table td { padding: 12px 12px; }
}

/* ===== Responsive complet (compléments) ===== */
.info-card, .share-link-card, .role-card, .form-group { min-width: 0; }
.share-link-card, .share-link-url-row, .share-link-mail-row { max-width: 100%; }
body { overflow-x: hidden; }

@media (max-width: 700px) {
  /* Un enfant de grille peut sinon s'élargir au-delà de l'écran (1fr = minmax(auto, 1fr)) */
  .share-links-grid { grid-template-columns: minmax(0, 1fr); }
  .share-link-head { flex-wrap: wrap; }
  .share-link-url-row { flex-wrap: wrap; }
  .share-link-url { flex-basis: 100%; order: 2; }
  .share-link-mail-row .role-email-input { min-width: 0; flex: 1 1 100%; }
  .share-link-mail-row .mail-btn { flex: 1 1 100%; justify-content: center; }
  .share-link-done-row .btn { width: 100%; }
  .share-links-footer a { white-space: normal; }
  .stat-banner { flex-direction: column; align-items: flex-start; }
  .role-card .btn { width: 100%; }

  /* Tableaux « Questions » : une carte par question au lieu d'un tableau qui défile de côté */
  .table-scroll { overflow-x: visible; }
  table.critere-table.table-questions { min-width: 0; display: block; background: transparent; box-shadow: none; border-radius: 0; }
  table.critere-table.table-questions thead { display: none; }
  table.critere-table.table-questions tbody { display: block; }
  table.critere-table.table-questions tr {
    display: block; background: white; border: 1px solid var(--gris-bord); border-radius: var(--radius-sm);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06); margin-bottom: 10px; padding: 10px 12px;
  }
  table.critere-table.table-questions td,
  table.critere-table.table-questions td:first-child,
  table.critere-table.table-questions td:nth-child(n) {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
    width: auto; padding: 5px 0; border: none; text-align: left; white-space: normal; font-size: 13px;
  }
  table.critere-table.table-questions td::before {
    content: attr(data-label); flex: 0 0 38%; max-width: 38%; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.3px; color: var(--texte-sec);
  }
  table.critere-table.table-questions td:nth-child(2) { font-weight: 600; }
  table.critere-table.table-questions td:nth-child(2)::before { font-weight: 700; }
  table.critere-table.table-questions td > * { flex-shrink: 0; }

  /* Barre d'étapes : défilement fluide, étape active centrée */
  .progress-bar { scroll-snap-type: x proximity; }
  .prog-step { scroll-snap-align: center; padding: 12px 10px; }

  /* Boutons d'action des fiches : pleine largeur, empilés */
  .nav-btns .actions-row { flex-direction: column; width: 100%; }
  .nav-btns .actions-row .btn, .nav-btns .actions-row select { width: 100%; }
  .wizard-nav .btn-prev, .wizard-nav .btn-next { flex: 1; }
  .wizard-nav:has(.actions-row) { flex-direction: column-reverse; }

  .score-recap .score-item { flex: 1 1 calc(50% - 10px); }
  .points-badge { margin-left: 0; }
}

@media (max-width: 380px) {
  .main { padding-left: 10px; padding-right: 10px; }
  .info-card { padding: 14px 12px; }
  .section-title { font-size: 18px; }
  .brand-logo { height: 38px; }
  .badge { font-size: 11px; padding: 3px 10px; }
}

/* Tablettes : on garde des marges confortables et des grilles de cartes à 2 colonnes */
@media (min-width: 701px) and (max-width: 1000px) {
  .main { padding-left: 24px; padding-right: 24px; }
  .role-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .topbar { padding-left: 24px; padding-right: 24px; }
  /* Le tableau des évaluations ne rentre pas toujours : il défile au lieu d'être coupé */
  table.eval-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.eval-table th, table.eval-table td { padding: 12px 10px; font-size: 13px; }
  table.eval-table .row-actions .action-btn span { display: none; }
}

/* ---- En-tête moderne ---- */
.topbar { background: rgba(255,255,255,0.82); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid rgba(230,232,238,0.9); box-shadow: 0 1px 0 rgba(255,255,255,0.8) inset, 0 8px 24px -16px rgba(28,28,77,0.25); padding: 10px 40px; }
.topbar > div:first-child { display: flex; align-items: center; gap: 18px; min-width: 0; }
.brand-logo { height: 58px; transition: transform .2s ease; }
a:hover > .brand-logo { transform: scale(1.04); }
.subtitle { margin: 0; padding: 6px 14px; font-size: 12px; font-weight: 700; letter-spacing: .2px; color: var(--bleu); background: var(--cyan-light); border: 1px solid rgba(41,171,226,0.25); border-radius: 999px; white-space: nowrap; }
@media (max-width: 720px) { .topbar { padding: 8px 16px; } .brand-logo { height: 44px; } .subtitle { display: none; } }
.subtitle:empty { display: none; }

/* =========================================================
   Administration modernisée (toutes les pages .main-wide + connexion)
   ========================================================= */
body:has(.main-wide), body:has(.admin-login) {
  background:
    radial-gradient(900px 420px at 100% -5%, rgba(41,171,226,.13), transparent 60%),
    radial-gradient(700px 420px at -5% 15%, rgba(99,102,241,.08), transparent 60%),
    #f4f6fb;
  background-attachment: fixed;
}
.main-wide { max-width: 1240px; padding-top: 28px; }

/* Navigation : contrôle segmenté */
.main-wide .admin-nav {
  background: rgba(255,255,255,.85); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--gris-bord); border-radius: 16px; padding: 6px; margin-bottom: 28px; align-items: center;
  box-shadow: 0 6px 20px -12px rgba(28,28,77,.25);
}
.main-wide .nav-tabs { gap: 4px; }
.main-wide .nav-tab { border-radius: 11px; border-bottom: none; margin-bottom: 0; padding: 9px 15px; }
.main-wide .nav-tab:hover { background: var(--gris); }
.main-wide .nav-tab.active { background: linear-gradient(135deg, var(--bleu), var(--bleu-mid)); color: white; box-shadow: 0 6px 14px -6px rgba(28,28,77,.6); }
.main-wide .nav-tab.active svg { opacity: 1; }
.main-wide .nav-actions { padding: 0 6px 0 0; min-height: 0; gap: 14px; }
.main-wide .nav-badge { background: #ef4444; color: white; border-radius: 999px; font-size: 10.5px; font-weight: 800; padding: 1px 7px; line-height: 1.5; }
.main-wide .nav-tab.active .nav-badge { background: white; color: #b91c1c; }
.main-wide .nav-logout { padding: 8px 12px; border-radius: 10px; }
.main-wide .nav-logout:hover { background: #fef2f2; }

/* Titres */
.main-wide .section-title { font-size: 30px; letter-spacing: -0.8px; color: var(--bleu); margin-bottom: 6px; }
.main-wide .section-desc { font-size: 14px; margin-bottom: 26px; }

/* Cartes */
.main-wide .info-card {
  border-radius: 18px; padding: 26px; border: 1px solid var(--gris-bord);
  box-shadow: 0 1px 2px rgba(16,24,40,.03), 0 10px 28px -18px rgba(28,28,77,.22);
}
.main-wide .info-card h3 { font-size: 14px; color: var(--bleu); letter-spacing: .1px; margin-bottom: 18px; }
.main-wide .guide-card { border-left: 4px solid var(--cyan); }

/* Boutons */
.main-wide .btn { border-radius: 11px; padding: 11px 22px; }
.main-wide .btn-primary {
  background: linear-gradient(135deg, var(--cyan), #3b82f6);
  box-shadow: 0 8px 18px -8px rgba(41,171,226,.65); transition: transform .15s, box-shadow .15s;
}
.main-wide .btn-primary:hover { background: linear-gradient(135deg, var(--cyan), #3b82f6); filter: brightness(1.05); transform: translateY(-1px); box-shadow: 0 12px 22px -8px rgba(41,171,226,.7); }
.main-wide .btn-secondary { background: white; }
.main-wide .btn-secondary:hover { border-color: var(--cyan); color: var(--cyan-dark); background: var(--cyan-light); }
.main-wide .action-btn { border-radius: 10px; }

/* Formulaires */
.main-wide input[type="text"], .main-wide input[type="password"], .main-wide input[type="date"],
.main-wide input[type="number"], .main-wide input[type="email"], .main-wide input[type="url"],
.main-wide textarea, .main-wide select { border-radius: 11px; padding: 11px 14px; background: #fcfdff; }
.main-wide input:focus, .main-wide textarea:focus, .main-wide select:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(41,171,226,.16); background: white; }
.main-wide label { color: var(--bleu); font-weight: 700; }
.main-wide .readonly-value { border-radius: 11px; }

/* Tableaux */
.main-wide table.eval-table { border-radius: 18px; border: 1px solid var(--gris-bord); box-shadow: 0 1px 2px rgba(16,24,40,.03), 0 10px 28px -18px rgba(28,28,77,.22); }
.main-wide table.eval-table thead th { background: #f8fafc; color: var(--texte-sec); padding: 14px 16px; border-bottom: 1px solid var(--gris-bord); }
.main-wide table.eval-table td { padding: 15px 16px; border-bottom: 1px solid #eef0f5; }
.main-wide table.eval-table tbody tr:hover { background: #f5fbfe; }
.main-wide table.eval-table code { background: var(--cyan-light); color: var(--cyan-dark); font-weight: 700; padding: 4px 9px; border-radius: 8px; }

/* Statistiques */
.main-wide .stats-row { gap: 12px; margin-bottom: 26px; }
.main-wide .stat-card {
  border-radius: 16px; padding: 16px 18px; border: 1px solid var(--gris-bord); border-top-width: 1px;
  position: relative; overflow: hidden; box-shadow: 0 8px 22px -16px rgba(28,28,77,.3);
}
.main-wide .stat-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--gris-bord); }
.main-wide .stat-card-all::before { background: var(--bleu); }
.main-wide .stat-card-vide::before { background: #9aa0ab; }
.main-wide .stat-card-pre_rempli::before { background: #d97706; }
.main-wide .stat-card-en_cours::before { background: #2563eb; }
.main-wide .stat-card-termine::before { background: var(--vert); }
.main-wide .stat-card .num { font-size: 28px; letter-spacing: -1px; }
.main-wide .stat-card .lbl { font-size: 12px; }
.main-wide .stat-card:hover { transform: translateY(-2px); }
.main-wide .search-box { border-radius: 12px; padding: 12px 14px 12px 38px; }
.main-wide .collapsible summary { border-radius: 11px; }
.main-wide .badge { border-radius: 999px; }
.main-wide .role-card { border-radius: 18px; }
.main-wide .status-bar-track, .main-wide .status-bar-fill { border-radius: 999px; }
.main-wide .evolution-bar { background: linear-gradient(180deg, var(--cyan), #6366f1); border-radius: 6px 6px 0 0; }
.main-wide .pagination-btns button { border-radius: 10px; }
.main-wide .stat-banner, .main-wide .score-recap { border-radius: 16px; background: linear-gradient(135deg, var(--bleu), var(--bleu-mid)); }

/* Connexion administration */
.admin-login { max-width: none; padding: 0 20px 40px; }
.admin-login .access-box {
  margin: 8vh auto 0; max-width: 430px; padding: 40px 36px; border-radius: 24px;
  background: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 28px 60px -16px rgba(28,28,77,.28), 0 0 0 1px var(--gris-bord);
}
.admin-login .access-box h2 { font-size: 26px; letter-spacing: -.6px; color: var(--bleu); }
.admin-login .access-box label { color: var(--bleu); font-weight: 700; }
.admin-login .access-box input { border-radius: 12px; padding: 13px 14px; }
.admin-login .access-box input:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(41,171,226,.16); }
.admin-login .access-box .btn { padding: 14px; border-radius: 12px; font-size: 15px; background: linear-gradient(135deg, var(--cyan), #3b82f6); box-shadow: 0 10px 22px -8px rgba(41,171,226,.65); }
.admin-login .access-box .btn:hover { filter: brightness(1.05); transform: translateY(-1px); }

@media (max-width: 720px) {
  .main-wide .section-title { font-size: 24px; }
  .main-wide .admin-nav { border-radius: 14px; }
  .main-wide .info-card { padding: 20px 16px; border-radius: 16px; }
  .admin-login .access-box { margin-top: 24px; padding: 28px 20px; }
}
/* ---- Statut : suivi du jury lisible ---- */
.statut-cell { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.statut-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stale-flag { margin-left: 0; padding: 3px 9px; border-radius: 999px; background: #fff1e6; border: 1px solid #fdba74; color: #c2410c; font-size: 11.5px; font-weight: 700; }
.jury-row { display: flex; gap: 6px; flex-wrap: wrap; }
.jury-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 7px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid transparent; line-height: 1.4; white-space: nowrap; }
.jury-pill .jp-ico { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; font-size: 9.5px; line-height: 1; }
.jury-pill.jp-termine { background: #ecfdf5; color: #166534; border-color: #a7f3d0; }
.jury-pill.jp-termine .jp-ico { background: #16a34a; color: white; }
.jury-pill.jp-en_cours { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.jury-pill.jp-en_cours .jp-ico { background: #f59e0b; color: white; }
.jury-pill.jp-vide { background: #f3f4f6; color: #6b7280; border-color: #e5e7eb; }
.jury-pill.jp-vide .jp-ico { background: #d1d5db; color: white; }
.jury-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; font-size: 12.5px; color: var(--texte-sec); margin: 0 0 12px; padding: 10px 14px; background: white; border: 1px solid var(--gris-bord); border-radius: 12px; }
.jury-legend strong { color: var(--bleu); }
.jury-legend-names { margin-left: auto; font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 720px) { .jury-legend-names { margin-left: 0; width: 100%; } }
/* Code personnel de l'évaluateur (fiche admin) */
.role-code-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; padding: 10px 12px; background: var(--cyan-light); border: 1px dashed rgba(41,171,226,.5); border-radius: 12px; }
.role-code-label { font-size: 11.5px; font-weight: 700; color: var(--bleu); text-transform: uppercase; letter-spacing: .4px; }
.role-code { font-size: 17px; font-weight: 800; letter-spacing: 1.5px; color: var(--bleu); background: white; padding: 4px 12px; border-radius: 8px; border: 1px solid var(--gris-bord); }
/* Retard : la pastille « depuis X j » clignote pour attirer l'œil */
.stale-flag { animation: stale-blink 1.1s ease-in-out infinite; }
@keyframes stale-blink {
  0%, 100% { background: #fff1e6; border-color: #fdba74; color: #c2410c; box-shadow: 0 0 0 0 rgba(234,88,12,.55); }
  50% { background: #ea580c; border-color: #ea580c; color: white; box-shadow: 0 0 0 6px rgba(234,88,12,0); }
}
@media (prefers-reduced-motion: reduce) { .stale-flag { animation: none; } }
/* ---- Page Relances ---- */
.rel-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.rel-kpi { background: white; border: 1px solid var(--gris-bord); border-radius: 16px; padding: 16px 20px; box-shadow: 0 8px 22px -16px rgba(28,28,77,.3); }
.rel-kpi .num { font-family: var(--font-display); font-size: 30px; font-weight: 800; color: var(--bleu); letter-spacing: -1px; }
.rel-kpi .lbl { font-size: 12.5px; color: var(--texte-sec); font-weight: 600; }
.rel-kpi-warn .num { color: #c2410c; }
.rel-card.rel-late { border-left: 4px solid #ea580c; }
.rel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.rel-name { font-family: var(--font-display); font-size: 18px; font-weight: 800; color: var(--bleu); text-decoration: none; }
.rel-name:hover { color: var(--cyan-dark); }
.rel-meta { font-size: 12.5px; color: var(--texte-sec); margin-top: 2px; }
.rel-age { font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 999px; background: var(--gris); color: var(--texte-sec); }
.rel-age-late { background: #fff1e6; border: 1px solid #fdba74; color: #c2410c; animation: stale-blink 1.1s ease-in-out infinite; }
.rel-rows { display: flex; flex-direction: column; gap: 10px; }
.rel-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 14px; background: #f8fafc; border: 1px solid #eef0f5; border-radius: 14px; }
.rel-who { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rel-role { font-weight: 800; color: var(--bleu); font-size: 14px; }
.rel-sub { font-size: 12px; color: var(--texte-sec); }
.rel-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.main-wide .rel-email { width: 230px; padding: 9px 12px; font-size: 12.5px; }
.rel-btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; font-size: 12.5px; }
@media (max-width: 720px) { .rel-summary { grid-template-columns: 1fr; } .main-wide .rel-email { width: 100%; } .rel-actions { width: 100%; } .rel-btn { flex: 1; justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .rel-age-late { animation: none; } }
/* Ajout manuel de l'infirmière */
.add-nurse { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 16px; padding: 16px 18px; border: 1.5px dashed rgba(41,171,226,.6); border-radius: 16px; background: var(--cyan-light); }
.add-nurse-title { font-family: var(--font-display); font-weight: 800; color: var(--bleu); font-size: 15px; }
.add-nurse-sub { font-size: 13px; color: var(--texte-sec); margin-top: 3px; max-width: 560px; line-height: 1.5; }
.remove-nurse { margin-top: 10px; }
.link-btn { background: none; border: none; padding: 0; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--texte-sec); text-decoration: underline; cursor: pointer; }
.link-btn:hover { color: #991b1b; }
/* ===== Tableau de bord : résumé sobre (statuts cliquables + barre de répartition) ===== */
.dash-summary { background: white; border: 1px solid var(--gris-bord); border-radius: 16px; padding: 18px 20px; margin-bottom: 18px; }
.dash-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.kpi {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
  padding: 10px 14px; background: transparent; border: 1px solid transparent; border-radius: 12px;
  font-family: inherit; cursor: pointer; transition: background .15s, border-color .15s;
}
.kpi:hover { background: var(--gris); }
.kpi.active { background: var(--gris); border-color: var(--bleu); }
.kpi-num { font-family: var(--font-display); font-size: 28px; font-weight: 800; line-height: 1; color: var(--bleu); font-variant-numeric: tabular-nums; }
.kpi-lbl { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--texte-sec); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot.st-vide, .dash-split .st-vide { background: #9aa0ab; }
.dot.st-pre_rempli, .dash-split .st-pre_rempli { background: #d97706; }
.dot.st-en_cours, .dash-split .st-en_cours { background: #2563eb; }
.dot.st-termine, .dash-split .st-termine { background: var(--vert); }
.dash-split { display: flex; gap: 2px; height: 10px; margin-top: 16px; border-radius: 999px; overflow: hidden; background: var(--gris); }
.dash-split span { display: block; height: 100%; min-width: 6px; }
.dash-note { margin-top: 10px; font-size: 13px; color: var(--texte-sec); }
.dash-note strong { color: var(--texte); }

/* Barre d'outils : recherche + boutons sur une seule ligne */
.main-wide .dash-toolbar { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.main-wide .dash-toolbar .search-box-wrap { flex: 1 1 320px; max-width: 460px; }
.main-wide .dash-toolbar .search-box { padding-left: 40px; }
.main-wide .dash-toolbar .search-box-icon { left: 14px; }
.main-wide .dash-toolbar .collapsible { margin-bottom: 0; }
.main-wide .dash-toolbar .collapsible summary { padding: 11px 16px; }
.main-wide .dash-toolbar .collapsible-inline[open] { flex: 1 1 100%; }

@media (max-width: 720px) {
  .dash-kpis { grid-template-columns: 1fr 1fr; }
  .dash-kpis .kpi:first-child { grid-column: 1 / -1; }
  .main-wide .dash-toolbar .search-box-wrap { flex-basis: 100%; max-width: none; }
}

/* Relances : l'en-tête de chaque évaluation est cliquable */
a.rel-head-link { text-decoration: none; color: inherit; margin: -6px -8px 8px; padding: 6px 8px; border-radius: 12px; transition: background .15s; }
a.rel-head-link:hover { background: var(--gris); }
a.rel-head-link:hover .rel-name { color: var(--cyan-dark); text-decoration: underline; }
.rel-head-right { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rel-open { font-size: 12.5px; font-weight: 700; color: var(--bleu); opacity: .7; transition: opacity .15s; }
a.rel-head-link:hover .rel-open { opacity: 1; }

/* ---- Pied de page de l'espace administration ---- */
.admin-footer { border-top: 1px solid var(--gris-bord); background: rgba(255,255,255,.7); margin-top: 8px; padding: 22px 20px 26px; font-size: 12.5px; color: var(--texte-sec); }
.admin-footer-inner { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 28px; }
.admin-footer-brand { display: flex; flex-direction: column; gap: 2px; }
.admin-footer-brand strong { color: var(--bleu); font-size: 13px; }
.admin-footer-contact { flex: 1 1 320px; line-height: 1.6; }
.admin-footer a { color: var(--cyan-dark); text-decoration: none; font-weight: 600; }
.admin-footer a:hover { text-decoration: underline; }
.admin-footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
@media (max-width: 640px) {
  .admin-footer { padding: 18px 16px 22px; }
  .admin-footer-inner { flex-direction: column; align-items: flex-start; }
  .admin-footer-contact { flex: 0 0 auto; }
}