/* ============================================================
   Worklab Diagnostic — Charte graphique officielle
   Police  : Nunito (Google Fonts)
   Bleu    : #1226AA  — couleur principale
   Corail  : #FF8672  — accent / alertes
   Vert eau: #3BD4AE  — succès / progression
   Jaune   : #ECD925  — surlignage décoratif
   Vert cl : #D2EA8E  — décoratif
   Rose    : #FFBE9F  — décoratif
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200;0,300;0,400;0,600;0,700;0,800;0,900;1,400&display=swap');

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

:root {
  --bleu:      #1226AA;
  --bleu-dark: #0C1A7A;
  --corail:    #FF8672;
  --vert-eau:  #3BD4AE;
  --jaune:     #ECD925;
  --vert-cl:   #D2EA8E;
  --rose:      #FFBE9F;
  --gris:      #F5F6FA;
  --gris2:     #E6E8F0;
  --txt:       #1226AA;   /* bleu = seule couleur de texte institutionnel */
  --txt-dark:  #0C1570;
  --txt-body:  #1A2050;
  --shadow:    0 4px 24px rgba(18,38,170,.10);
}

body {
  font-family: 'Nunito', Arial, sans-serif;
  font-weight: 400;
  background: var(--gris);
  color: var(--txt-body);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
}

/* ── Bandeau ── */
.bandeau {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  display: block;
}

/* ── Conteneur ── */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 16px 60px;
}

/* ── En-tête ── */
.header {
  background: var(--bleu);
  color: #fff;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.header h1 {
  font-size: 1.15rem;
  font-weight: 800;   /* Nunito Black */
  letter-spacing: .01em;
}
.header small { font-weight: 300; font-size: .82rem; opacity: .85; display: block; margin-top: 2px; }
.header .step-badge {
  background: var(--jaune);
  color: var(--bleu);
  font-weight: 800;
  font-size: .75rem;
  padding: 4px 12px;
  border-radius: 14px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Barre de progression ── */
.progress-bar-wrap { background: var(--gris2); height: 5px; }
.progress-bar {
  height: 5px;
  background: linear-gradient(90deg, var(--bleu), var(--vert-eau));
  transition: width .5s ease;
}

/* ── Carte ── */
.card {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 32px 36px;
  margin-top: 28px;
  border-top: 4px solid var(--bleu);
}
.card-title {
  font-size: 1.3rem;
  font-weight: 900;   /* Nunito Black */
  color: var(--bleu);
  margin-bottom: 6px;
}
.card-subtitle {
  color: #555;
  margin-bottom: 24px;
  font-size: .93rem;
  font-weight: 400;
}

/* ── Formulaire ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label {
  font-weight: 700;
  font-size: .85rem;
  color: var(--bleu);
  letter-spacing: .02em;
}
.form-group input, .form-group select {
  border: 1.5px solid var(--gris2);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: .95rem;
  font-family: 'Nunito', sans-serif;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
  color: var(--txt-body);
}
.form-group input:focus, .form-group select:focus {
  outline: none;
  border-color: var(--bleu);
  box-shadow: 0 0 0 3px rgba(18,38,170,.10);
}
.required-star { color: var(--corail); }

/* ── Boutons ── */
.btn-primary {
  display: inline-block;
  background: var(--bleu);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 13px 32px;
  font-size: 1rem;
  font-weight: 800;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  transition: background .2s, transform .1s;
  margin-top: 20px;
  text-decoration: none;
  letter-spacing: .01em;
}
.btn-primary:hover  { background: var(--bleu-dark); }
.btn-primary:active { transform: scale(.98); }

.btn-secondary {
  display: inline-block;
  background: var(--gris2);
  color: var(--bleu);
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  font-size: .9rem;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  cursor: pointer;
  text-decoration: none;
  margin-top: 10px;
}
.btn-secondary:hover { background: #d8daf0; }

/* ── Table Drivers ── */
.q-table { width: 100%; border-collapse: collapse; }
.q-table thead th {
  background: var(--bleu);
  color: #fff;
  padding: 11px 8px;
  font-size: .78rem;
  font-weight: 700;
  text-align: center;
}
.q-table thead th:first-child { text-align: left; padding-left: 16px; }
.q-table tbody tr { border-bottom: 1px solid var(--gris2); }
.q-table tbody tr:hover { background: #F0F2FF; }
.q-table tbody tr.answered { background: #F0FBF8; }
.q-table tbody td {
  padding: 11px 8px;
  vertical-align: middle;
  text-align: center;
}
.q-table tbody td:first-child {
  text-align: left;
  padding-left: 16px;
  font-size: .88rem;
  width: 52%;
}
.q-num { display: inline-block; min-width: 24px; font-weight: 800; color: var(--bleu); }

.radio-wrap { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.radio-wrap input[type="radio"] {
  width: 18px; height: 18px; cursor: pointer;
  accent-color: var(--bleu);
}

.col-header { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.col-header .score { font-size: 1rem; font-weight: 800; }
.col-header .label { font-size: .65rem; line-height: 1.2; font-weight: 400; }

/* ── Questions Circadien ── */
.circ-question {
  margin-bottom: 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--gris2);
}
.circ-question:last-of-type { border-bottom: none; }
.circ-question h3 {
  font-size: .98rem;
  font-weight: 800;
  color: var(--bleu);
  margin-bottom: 14px;
}
.circ-options { display: flex; flex-direction: column; gap: 9px; }
.circ-option {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--gris);
  border: 1.5px solid transparent;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.circ-option:hover { border-color: var(--bleu); background: #ECEEFF; }
.circ-option input[type="radio"] { accent-color: var(--bleu); width: 17px; height: 17px; flex-shrink: 0; }
.circ-option span { font-size: .92rem; }
.circ-option:has(input:checked) {
  border-color: var(--bleu);
  background: #ECEEFF;
}
.circ-option input:checked ~ span { font-weight: 700; color: var(--bleu); }

/* ── Résultats ── */
.results-section { margin-bottom: 0; }
.results-section h2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--bleu);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gris2);
}

/* Barres drivers */
.driver-bar-wrap { margin-bottom: 20px; }
.driver-bar-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: .9rem;
}
.driver-bar-label span:first-child { font-weight: 800; color: var(--bleu); }
.driver-bar-label span:last-child { color: #888; font-size: .82rem; font-weight: 400; }
.driver-bar-bg { background: var(--gris2); border-radius: 20px; height: 14px; overflow: hidden; }
.driver-bar-fill {
  height: 14px;
  border-radius: 20px;
  transition: width 1.1s ease;
}
.driver-bar-fill.high   { background: linear-gradient(90deg, var(--bleu), var(--corail)); }
.driver-bar-fill.medium { background: linear-gradient(90deg, var(--bleu), var(--vert-eau)); }
.driver-bar-fill.low    { background: var(--vert-cl); }

/* Badge circadien */
.circadien-badge {
  display: inline-block;
  background: var(--bleu);
  color: #fff;
  padding: 12px 26px;
  border-radius: 40px;
  font-size: 1.1rem;
  font-weight: 800;
  margin: 14px 0 6px;
}
.circadien-score { font-size: .88rem; color: #777; font-weight: 400; margin-top: 4px; }

/* Tableaux */
.recap-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.recap-table th {
  background: var(--bleu); color: #fff;
  padding: 10px 14px; text-align: left;
  font-weight: 700;
}
.recap-table td { padding: 10px 14px; border-bottom: 1px solid var(--gris2); }
.recap-table tr:last-child td { border-bottom: none; }

/* Alerte / info */
.alert-info {
  background: #EEF0FF;
  border-left: 4px solid var(--bleu);
  padding: 14px 18px;
  border-radius: 0 8px 8px 0;
  font-size: .88rem;
  font-weight: 400;
  margin-top: 12px;
  color: var(--txt-body);
}
.alert-error {
  background: #FFF0EE;
  border-left: 4px solid var(--corail);
  padding: 14px 18px;
  border-radius: 0 8px 8px 0;
  font-size: .88rem;
  margin-top: 12px;
  color: #8B2000;
}

/* Surlignage jaune Worklab */
.highlight-jaune {
  background: var(--jaune);
  padding: 0 4px;
  border-radius: 3px;
  font-weight: 700;
}

/* ── Admin ── */
.admin-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.admin-table th {
  background: var(--bleu); color: #fff;
  padding: 10px 12px; text-align: left;
  font-weight: 700; white-space: nowrap;
}
.admin-table td { padding: 9px 12px; border-bottom: 1px solid var(--gris2); }
.admin-table tr:hover td { background: #F0F2FF; }
.btn-sm {
  background: var(--bleu); color: #fff;
  border: none; padding: 4px 12px;
  border-radius: 5px; font-size: .78rem;
  cursor: pointer; text-decoration: none;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
}
.badge { display: inline-block; padding: 3px 9px; border-radius: 10px; font-size: .73rem; font-weight: 800; }
.badge-matin  { background: var(--vert-cl); color: var(--bleu); }
.badge-soir   { background: var(--rose);    color: #7A2000; }
.badge-neutre { background: #EEF0FF;        color: var(--bleu); }
.tag { display: inline-block; background: #EEF0FF; color: var(--bleu); padding: 2px 8px; border-radius: 8px; font-size: .73rem; font-weight: 700; margin-right: 3px; }

/* Décoration Worklab — trait pointillé */
.dotted-divider {
  border: none;
  border-top: 2px dashed var(--gris2);
  margin: 24px 0;
}

/* Accent barre jaune sur titre */
.titre-accent {
  display: inline;
  background: linear-gradient(to bottom, transparent 60%, var(--jaune) 60%);
}

/* ── Pied de page ── */
.footer {
  text-align: center;
  padding: 20px;
  font-size: .78rem;
  font-weight: 300;
  color: #aaa;
  margin-top: 40px;
}

/* ── Responsive ── */
@media (max-width: 620px) {
  .card { padding: 20px 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .q-table thead th { font-size: .66rem; padding: 8px 3px; }
  .q-table tbody td { font-size: .8rem; padding: 8px 3px; }
  .col-header .label { display: none; }
  .header h1 { font-size: .95rem; }
}
