:root {
  --color-primary:    #004C5C;
  --color-secondary:  #70B6C2;
  --color-accent:     #F9B234;
  --color-text:       #1A2B30;
  --color-text-muted: #5C7077;
  --color-bg:         #F5F7F8;
  --color-white:      #FFFFFF;
}

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

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.site-header {
  background: var(--color-white);
  border-bottom: 3px solid var(--color-primary);
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}
.logo-link { display: inline-block; }
.logo { height: 40px; display: block; }

/* Main */
.site-main { flex: 1; padding: 2rem; }

/* Footer */
.site-footer {
  background: var(--color-primary);
  color: var(--color-secondary);
  text-align: center;
  padding: 1rem;
  font-size: 0.85rem;
}

/* Card */
.card {
  background: var(--color-white);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Boutons */
.btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: opacity 0.15s;
}
.btn:hover { opacity: 0.88; }
.btn-primary {
  background: var(--color-accent);
  color: var(--color-text);
}
.btn-secondary {
  background: var(--color-primary);
  color: var(--color-white);
}
.btn-ghost {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
  transition: background 0.15s, color 0.15s;
}
.btn-ghost:hover {
  background: var(--color-primary);
  color: var(--color-white);
  opacity: 1;
}
.btn-sm {
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  border-radius: 20px;
}

/* Navigation admin */
.admin-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* Titres */
h1 { font-size: 1.75rem; color: var(--color-primary); margin-bottom: 1rem; }
h2 { font-size: 1.35rem; color: var(--color-primary); margin-bottom: 0.75rem; }

/* Flash messages */
.flash {
  padding: 0.85rem 1.25rem;
  border-radius: 6px;
  margin-bottom: 1.25rem;
  font-weight: 500;
}
.flash--success { background: #d4edda; color: #155724; }
.flash--error   { background: #f8d7da; color: #721c24; }

/* ── Formulaires front-office ─────────────────────────────── */
.form-card { max-width: 520px; margin: 3rem auto; }
.form-intro { color: var(--color-text-muted); margin-bottom: 1.5rem; }

.form-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.form-group label {
  font-weight: 600;
  font-size: 0.95rem;
}
.form-group input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
  padding: 0.6rem 0.85rem;
  border: 1.5px solid #c8d4d8;
  border-radius: 6px;
  font-size: 1rem;
  background: var(--color-white);
  transition: border-color 0.15s;
}
.form-group input:focus {
  outline: none;
  border-color: var(--color-secondary);
}

.form-group--rgpd {
  background: #eef6f8;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--color-secondary);
}
.checkbox-label {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.9rem;
  line-height: 1.5;
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 0.2rem;
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
}
.checkbox-label a { color: var(--color-primary); }

.btn-block { display: block; width: 100%; text-align: center; margin-top: 1.5rem; padding: 0.85rem; }
.btn-lg    { padding: 0.9rem 2rem; font-size: 1.05rem; }

/* ── Questionnaire ────────────────────────────────────────── */
.questionnaire-wrap { max-width: 820px; margin: 0 auto; }
.questionnaire-header {
  margin-bottom: 2rem;
}
.questionnaire-header p { color: var(--color-text-muted); }

.theme-section {
  background: var(--color-white);
  border-radius: 10px;
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.theme-title {
  font-size: 1.15rem;
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-secondary);
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
}

.question-block {
  padding: 1rem 0;
  border-bottom: 1px solid #e8eef0;
}
.question-block:last-child { border-bottom: none; }
.question-block.unanswered {
  background: #fff2f2;
  border-radius: 6px;
  padding: 1rem;
  margin: 0 -1rem;
  border-left: 4px solid #c0392b;
}
.question-block.unanswered .question-libelle {
  color: #c0392b;
}
.unanswered-hint {
  font-size: .82rem;
  color: #c0392b;
  margin-top: .35rem;
  font-weight: 600;
}
.question-libelle {
  font-weight: 500;
  margin-bottom: 0.85rem;
  color: var(--color-text);
}

.radio-scale {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.scale-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 1.5px solid #d0dde1;
  background: var(--color-bg);
  transition: border-color 0.15s, background 0.15s;
  min-width: 80px;
  text-align: center;
  flex: 1;
}
.scale-option:hover { border-color: var(--color-secondary); background: #eef6f8; }
.scale-option input[type="radio"] { display: none; }
.scale-option:has(input:checked) {
  border-color: var(--color-primary);
  background: #e0f0f4;
}
.scale-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
}
.scale-label {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  line-height: 1.2;
}

.questionnaire-footer {
  text-align: center;
  padding: 2rem 0 1rem;
}

/* ── Résultats ────────────────────────────────────────────── */
.resultats-wrap { max-width: 900px; margin: 0 auto; }
.resultats-header { margin-bottom: 1.5rem; }
.resultats-subtitle { color: var(--color-text-muted); margin-top: 0.25rem; }

.resultats-body {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 680px) {
  .resultats-body { grid-template-columns: 1fr; }
}

.radar-card {
  display: flex;
  align-items: center;
  justify-content: center;
}
.scores-card h2 { margin-bottom: 1rem; }

.scores-table { width: 100%; border-collapse: collapse; }
.scores-table th { text-align: left; font-size: 0.85rem; color: var(--color-text-muted); padding-bottom: 0.5rem; }
.scores-table td { padding: 0.5rem 0; vertical-align: middle; font-size: 0.92rem; }
.scores-table td:first-child { padding-right: 1rem; white-space: nowrap; }
.scores-table td:nth-child(2) { white-space: nowrap; padding-right: 0.75rem; }

.score-bar {
  height: 8px;
  background: #dde8ec;
  border-radius: 4px;
  overflow: hidden;
  width: 100%;
  min-width: 80px;
}
.score-bar__fill {
  height: 100%;
  background: var(--color-secondary);
  border-radius: 4px;
  transition: width 0.6s ease;
}

.resultats-actions { text-align: center; padding-bottom: 2rem; }

/* ── Espace participant ──────────────────────────────────────────────────── */
.participant-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  background: var(--color-white);
  border-radius: 10px;
  padding: 1.25rem 1.75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border-left: 5px solid var(--color-secondary);
}
.participant-welcome {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0 0 0.1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.participant-header h1 { margin: 0; font-size: 1.5rem; }

.participant-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
.participant-aside { display: flex; flex-direction: column; gap: 1.5rem; }

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

.participant-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.participant-section-header h2 { margin: 0; }

/* ── Liste des évaluations participant ───────────────────────────────────── */
.eval-list { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-direction: column; gap: .75rem; }

.eval-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .875rem 1rem;
  background: #fff;
  border: 1.5px solid var(--color-border);
  border-left: 4px solid var(--color-secondary);
  border-radius: 8px;
  transition: box-shadow .15s;
}
.eval-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); }

.eval-date { flex: 1; font-size: .95rem; color: var(--color-text-muted); }

.eval-cta {
  font-size: .9rem;
  padding: .55rem 1.25rem;
  white-space: nowrap;
  border-radius: 20px;
  font-weight: 700;
  letter-spacing: .01em;
}

.eval-delete {
  background: none;
  border: none;
  cursor: pointer;
  color: #ccc;
  font-size: 1rem;
  padding: .25rem .4rem;
  border-radius: 4px;
  line-height: 1;
  transition: color .15s;
}
.eval-delete:hover { color: #b45309; }

/* ── Liste documents participant ─────────────────────────────────────────── */
.doc-list { list-style: none; padding: 0; margin: 0.75rem 0 0; display: flex; flex-direction: column; gap: 0.5rem; }
.doc-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 6px;
}
.doc-icon { font-size: 1.1rem; flex-shrink: 0; }
.doc-titre { font-weight: 600; text-decoration: none; color: var(--color-primary); flex: 1; }
.doc-titre:hover { text-decoration: underline; }
.doc-name { font-size: 0.8rem; color: var(--color-text-muted); white-space: nowrap; }
