/* ============================================================
   PROGRAMME MOUTAMBOU — Fiche d'évaluation PMF-001
   Style sobre, institutionnel. Aucun dégradé.
   ============================================================ */

:root {
  --vert:        #005E40;
  --vert-fonce:  #00432E;
  --vert-clair:  #DFEBE7;
  --vert-voile:  #A5C6BC;
  --ocre:        #B55600;
  --orange:      #F6921E;
  --encre:       #1A1A1A;
  --gris:        #5A5A5A;
  --gris-clair:  #8A8A8A;
  --bordure:     #D9D9D9;
  --bordure-f:   #BBBBBB;
  --fond:        #F4F5F4;
  --blanc:       #FFFFFF;
  --rouge:       #B02B2B;
}

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

body {
  font-family: "Georgia", "Times New Roman", serif;
  color: var(--encre);
  background: var(--fond);
  line-height: 1.55;
  font-size: 16px;
}

/* ---- En-tête MOUTAMBOU ---- */
.entete {
  background: var(--blanc);
  border-bottom: 3px solid var(--vert);
}
.entete-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  gap: 22px;
}
.entete img { height: 64px; width: auto; display: block; }
.entete-logo { display: inline-flex; align-items: center; text-decoration: none; transition: opacity .15s ease; }
.entete-logo:hover { opacity: .8; }
.entete-titres {
  border-left: 2px solid var(--vert-voile); padding-left: 20px;
  text-decoration: none; color: inherit; transition: opacity .15s ease;
}
a.entete-titres:hover { opacity: .75; }
a.entete-titres:hover h1 { text-decoration: underline; text-underline-offset: 3px; }
.entete-titres .surtitre {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--gris); font-weight: 700;
}
.entete-titres h1 {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 20px; color: var(--vert); font-weight: 700; margin-top: 2px;
}

/* ---- Conteneur ---- */
.wrap { max-width: 860px; margin: 0 auto; padding: 30px 28px 60px; }

.intro {
  background: var(--blanc);
  border: 1px solid var(--bordure);
  border-top: 4px solid var(--vert);
  padding: 26px 30px;
  margin-bottom: 26px;
}
.intro h2 {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 17px; color: var(--encre); margin-bottom: 6px;
}
.intro .ref { color: var(--ocre); font-weight: 700; }
.intro p { color: var(--gris); font-size: 14.5px; margin-top: 4px; }
.intro .cohorte {
  margin-top: 14px; font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 13px; color: var(--vert-fonce); font-weight: 600;
}

/* ---- Barre de progression ---- */
.progress-bar {
  position: sticky; top: 0; z-index: 50;
  background: var(--blanc);
  border: 1px solid var(--bordure);
  border-radius: 2px;
  padding: 12px 16px;
  margin-bottom: 22px;
  display: flex; align-items: center; gap: 12px;
}
.progress-track { flex: 1; height: 6px; background: var(--vert-clair); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--vert); width: 0%; transition: width .3s ease; }
.progress-label {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 12px; color: var(--gris); white-space: nowrap; font-weight: 600;
}

/* ---- Étapes ---- */
.etape { display: none; }
.etape.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.carte {
  background: var(--blanc);
  border: 1px solid var(--bordure);
  margin-bottom: 22px;
}
.carte-titre {
  font-family: "Helvetica Neue", Arial, sans-serif;
  background: var(--vert);
  color: var(--blanc);
  font-size: 15px; font-weight: 700;
  padding: 13px 22px;
  letter-spacing: .3px;
}
.carte-corps { padding: 8px 22px 18px; }
.consigne {
  font-size: 14px; color: var(--gris); font-style: italic;
  padding: 12px 0 4px;
}

/* ---- Identité participant ---- */
.champ { margin: 16px 0; }
.champ label {
  display: block;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 13px; font-weight: 600; color: var(--encre); margin-bottom: 6px;
}
.champ input[type=text] {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--bordure-f); border-radius: 2px;
  font-family: inherit; font-size: 15px; color: var(--encre);
  background: var(--blanc);
}
.champ input[type=text]:focus { outline: none; border-color: var(--vert); }

/* ---- Grille de notation ---- */
.grille { width: 100%; border-collapse: collapse; margin: 8px 0; }
.grille thead th {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 11.5px; font-weight: 700; color: var(--encre);
  padding: 10px 4px; text-align: center; vertical-align: bottom;
  border-bottom: 2px solid var(--vert);
  line-height: 1.25;
}
.grille thead th:first-child { text-align: left; width: 38%; }
.grille tbody td { padding: 11px 4px; border-bottom: 1px solid var(--bordure); text-align: center; }
.grille tbody td:first-child {
  text-align: left; font-size: 14px; color: var(--encre); padding-right: 10px;
}
.grille tbody tr:hover { background: var(--fond); }

/* radio personnalisé sobre */
.radio-cell { position: relative; }
.radio-cell input { position: absolute; opacity: 0; cursor: pointer; }
.radio-cell .dot {
  display: inline-block; width: 20px; height: 20px;
  border: 1.5px solid var(--bordure-f); border-radius: 50%;
  vertical-align: middle; transition: all .12s ease; cursor: pointer;
}
.radio-cell input:checked + .dot {
  border-color: var(--vert); background: var(--vert);
  box-shadow: inset 0 0 0 3px var(--blanc);
}
.radio-cell:hover .dot { border-color: var(--vert); }

/* ---- Questions radio en liste ---- */
.question-bloc { margin: 22px 0; }
.question-label {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 14px; font-weight: 600; color: var(--encre); margin-bottom: 10px;
}
.options-liste { display: flex; flex-direction: column; gap: 2px; }
.option-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border: 1px solid transparent; border-radius: 2px;
  cursor: pointer; font-size: 14.5px;
}
.option-item:hover { background: var(--fond); }
.option-item input { position: absolute; opacity: 0; }
.option-item .dot {
  width: 18px; height: 18px; border: 1.5px solid var(--bordure-f);
  border-radius: 50%; flex-shrink: 0; transition: all .12s ease;
}
.option-item input:checked + .dot {
  border-color: var(--vert); background: var(--vert);
  box-shadow: inset 0 0 0 3px var(--blanc);
}
.option-item:has(input:checked) { background: var(--vert-clair); }

/* ---- Textareas ---- */
.question-bloc textarea {
  width: 100%; min-height: 84px; padding: 11px 13px;
  border: 1px solid var(--bordure-f); border-radius: 2px;
  font-family: inherit; font-size: 15px; line-height: 1.5; resize: vertical;
}
.question-bloc textarea:focus { outline: none; border-color: var(--vert); }

/* ---- Navigation ---- */
.nav-boutons { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.btn {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 14px; font-weight: 600; letter-spacing: .3px;
  padding: 13px 28px; border: none; border-radius: 2px;
  cursor: pointer; transition: background .15s ease;
}
.btn-primaire { background: var(--vert); color: var(--blanc); }
.btn-primaire:hover { background: var(--vert-fonce); }
.btn-secondaire { background: var(--blanc); color: var(--vert); border: 1.5px solid var(--vert); }
.btn-secondaire:hover { background: var(--vert-clair); }
.btn-envoyer { background: var(--ocre); color: var(--blanc); }
.btn-envoyer:hover { background: #8f4400; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* ---- Alerte validation ---- */
.alerte {
  background: #FBEAEA; border: 1px solid var(--rouge); color: var(--rouge);
  padding: 12px 16px; border-radius: 2px; font-size: 14px; margin-bottom: 16px;
  display: none;
}
.alerte.visible { display: block; }

/* ---- Pied ICES ---- */
.pied {
  border-top: 1px solid var(--bordure);
  margin-top: 40px; padding: 22px 28px;
  text-align: center;
}
.pied .ondes { height: 18px; margin-bottom: 14px; }
.pied .ices-info {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 12px; color: var(--gris); line-height: 1.6;
}
.pied .ices-info strong { color: var(--encre); }
.pied .ices-info a { color: var(--vert); text-decoration: none; }

/* ---- Page de remerciement / synthèse ---- */
.synthese-hero {
  background: var(--vert); color: var(--blanc);
  padding: 40px 30px; text-align: center;
}
.synthese-hero .check {
  width: 56px; height: 56px; border: 2.5px solid var(--blanc);
  border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 28px; margin-bottom: 16px;
}
.synthese-hero h2 { font-family: "Helvetica Neue", Arial, sans-serif; font-size: 22px; }
.synthese-hero p { font-size: 15px; opacity: .9; margin-top: 8px; }

.score-bloc {
  background: var(--blanc); border: 1px solid var(--bordure);
  border-top: 4px solid var(--ocre);
  padding: 30px; text-align: center; margin: 24px 0;
}
.score-chiffre {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 52px; font-weight: 700; color: var(--vert); line-height: 1;
}
.score-chiffre span { font-size: 24px; color: var(--gris-clair); }
.score-libelle {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 16px; font-weight: 600; color: var(--ocre); margin-top: 8px;
  text-transform: uppercase; letter-spacing: 1px;
}
.score-jauge { height: 10px; background: var(--vert-clair); border-radius: 5px; margin: 20px auto 0; max-width: 360px; overflow: hidden; }
.score-jauge-fill { height: 100%; background: var(--vert); }

.recap {
  background: var(--blanc); border: 1px solid var(--bordure); margin-bottom: 22px;
}
.recap h3 {
  font-family: "Helvetica Neue", Arial, sans-serif;
  background: var(--vert-clair); color: var(--vert-fonce);
  padding: 12px 22px; font-size: 14px;
}
.recap-ligne {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 11px 22px; border-bottom: 1px solid var(--bordure); font-size: 14px;
}
.recap-ligne:last-child { border-bottom: none; }
.recap-ligne .val { font-weight: 600; color: var(--vert); text-align: right; }

/* ---- Responsive ---- */
@media (max-width: 680px) {
  body { font-size: 15px; }
  .entete-inner { flex-direction: column; align-items: flex-start; gap: 14px; padding: 18px 18px; }
  .entete-titres { border-left: none; padding-left: 0; border-top: 2px solid var(--vert-voile); padding-top: 12px; }
  .wrap { padding: 20px 16px 50px; }
  .carte-corps { padding: 8px 14px 14px; }
  /* Grille -> cartes empilées sur mobile */
  .grille, .grille thead, .grille tbody, .grille tr, .grille td, .grille th { display: block; }
  .grille thead { display: none; }
  .grille tbody td { border: none; text-align: left; padding: 4px 0; }
  .grille tbody tr {
    border: 1px solid var(--bordure); margin-bottom: 14px; padding: 12px;
  }
  .grille tbody td:first-child {
    font-weight: 700; font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--bordure); margin-bottom: 8px;
  }
  .grille tbody td.radio-cell {
    display: flex; align-items: center; gap: 12px; padding: 9px 2px;
    border-bottom: 1px solid var(--vert-clair);
  }
  .grille tbody td.radio-cell:last-child { border-bottom: none; }
  .grille tbody td.radio-cell label { display: inline-flex; order: -1; }
  .grille tbody td.radio-cell::before {
    content: attr(data-label);
    font-family: "Helvetica Neue", Arial, sans-serif; font-size: 13.5px; color: var(--encre); flex: 1;
  }
  .score-chiffre { font-size: 42px; }
}
