/* Verificateur de site FastSolve.
 *
 * Palette volontairement sobre : l'accent est une encre bleu nuit, tres proche
 * du noir. C'est un choix fonctionnel autant qu'esthetique : les quatre
 * couleurs de note (vert, ambre, orange, rouge) doivent etre les seules taches
 * de couleur de la page. Un accent vif entrerait en concurrence avec elles et
 * rendrait les jauges illisibles d'un coup d'oeil.
 */

:root {
  --accent: #16233a;
  --accent-sombre: #0b1424;
  --accent-clair: #dde3ec;
  --fond: #eef0f4;
  --surface: #ffffff;
  --encre: #16202e;
  --encre-douce: #55627a;
  --bordure: #d5dbe5;
  --bon: #15803d;
  --moyen: #a16207;
  --faible: #c2410c;
  --critique: #b91c1c;
  --inconnu: #7c8798;
  --rayon: 14px;
  --ombre: 0 1px 2px rgba(16, 26, 43, 0.06), 0 8px 24px rgba(16, 26, 43, 0.07);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.4em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); letter-spacing: -0.01em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 0.9em; }
a { color: var(--accent); }

/* -------------------------------------------------- structure */

.entete {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: var(--accent);
  color: #fff;
}
.marque { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.marque__nom { font-weight: 650; letter-spacing: -0.01em; }
.marque__signature { font-size: 0.78rem; color: #b9c4d6; }
.entete__retour { color: #d6dded; font-size: 0.85rem; text-decoration: none; border-bottom: 1px solid #4a5871; }
.entete__retour:hover { color: #fff; }

.contenu { max-width: 940px; margin: 0 auto; padding: clamp(20px, 4vw, 40px) clamp(16px, 4vw, 24px) 48px; }

.pied {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 24px) 40px;
  color: var(--encre-douce);
  font-size: 0.82rem;
}

.section { margin: 32px 0 0; }
.section--methode { border-top: 1px solid var(--bordure); padding-top: 20px; }

/* -------------------------------------------------- accueil */

.accroche {
  background: var(--surface);
  border-radius: var(--rayon);
  box-shadow: var(--ombre);
  padding: clamp(22px, 4vw, 36px);
}
.accroche--sobre { box-shadow: none; background: transparent; padding: 0; }
.accroche__chapeau { color: var(--encre-douce); max-width: 62ch; }

.formulaire-analyse { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 22px 0 10px; }
.champ { display: flex; flex-direction: column; gap: 6px; flex: 1 1 320px; }
.champ__intitule { font-size: 0.82rem; font-weight: 600; color: var(--encre-douce); }
.champ__saisie {
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--bordure);
  border-radius: 10px;
  background: #fff;
  color: inherit;
  min-width: 0;
}
.champ__saisie:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }

.bouton {
  font: inherit;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
.bouton--principal { background: var(--accent); color: #fff; }
.bouton--principal:hover { background: var(--accent-sombre); }
.bouton--principal[disabled] { opacity: 0.65; cursor: progress; }
.bouton--secondaire { background: #fff; color: var(--accent); border-color: var(--bordure); }
.bouton--secondaire:hover { border-color: var(--accent); }

.note-rassurance { color: var(--encre-douce); font-size: 0.85rem; margin: 6px 0 0; max-width: 66ch; }

.alerte { border-radius: 10px; padding: 10px 14px; margin: 12px 0 0; font-size: 0.92rem; }
.alerte--erreur { background: #fdecec; color: #8d1b1b; border: 1px solid #f3c8c8; }

.liste-mesures { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 0; margin: 16px 0 0; }
.carte-mesure { background: var(--surface); border: 1px solid var(--bordure); border-radius: 12px; padding: 14px; }
.carte-mesure h3 { margin: 0 0 2px; }
.carte-mesure p { margin: 0; color: var(--encre-douce); font-size: 0.85rem; }

.liens-secondaires { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 0.9rem; color: var(--encre-douce); }
.lien-bouton { font: inherit; background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; }

/* -------------------------------------------------- attente */

.attente { background: var(--surface); border-radius: var(--rayon); box-shadow: var(--ombre); padding: clamp(24px, 5vw, 44px); text-align: center; }
.attente__cible { font-weight: 600; margin: 0 0 6px; }
.attente__rond {
  width: 46px; height: 46px; margin: 0 auto 18px;
  border: 4px solid var(--accent-clair);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: tourner 0.9s linear infinite;
}
@keyframes tourner { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .attente__rond { animation: none; } }
.attente__etapes { display: inline-block; text-align: left; color: var(--encre-douce); font-size: 0.9rem; margin: 8px 0 0; }

/* -------------------------------------------------- rapport */

.entete-rapport { margin-bottom: 18px; }
.entete-rapport__surtitre { color: var(--encre-douce); font-size: 0.82rem; margin: 0 0 2px; text-transform: lowercase; }
.entete-rapport__adresse { color: var(--encre-douce); font-size: 0.88rem; word-break: break-all; margin: 0; }

.bandeau { background: #fff8e6; border: 1px solid #efd9a4; color: #6b4c06; border-radius: 10px; padding: 12px 14px; font-size: 0.9rem; margin-bottom: 18px; }
.bandeau--refus { background: #eef1f6; border-color: var(--bordure); color: var(--encre); display: flex; flex-direction: column; gap: 4px; }

.grille-notes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.carte-note {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-left: 4px solid var(--inconnu);
  border-radius: 12px;
  padding: 16px;
}
.carte-note--bon { border-left-color: var(--bon); }
.carte-note--moyen { border-left-color: var(--moyen); }
.carte-note--faible { border-left-color: var(--faible); }
.carte-note--critique { border-left-color: var(--critique); }
.carte-note__jauge { flex: 0 0 96px; }
.carte-note__texte { min-width: 0; }
.carte-note__texte h2 { margin: 2px 0 2px; }
.carte-note__base { color: var(--encre-douce); font-size: 0.78rem; margin: 0 0 8px; }
.carte-note__constat { margin: 0; font-weight: 550; }
.carte-note__autres { margin: 6px 0 0; color: var(--encre-douce); font-size: 0.85rem; }
.carte-note__ras { margin: 0; color: var(--bon); font-weight: 550; }
.carte-note__vide { margin: 0; color: var(--encre-douce); font-size: 0.9rem; }

.anneau { width: 96px; height: 96px; display: block; }
.anneau__fond { fill: none; stroke: var(--accent-clair); stroke-width: 11; }
.anneau__jauge { fill: none; stroke-width: 11; stroke-linecap: round; stroke: var(--inconnu); }
.anneau--bon .anneau__jauge { stroke: var(--bon); }
.anneau--moyen .anneau__jauge { stroke: var(--moyen); }
.anneau--faible .anneau__jauge { stroke: var(--faible); }
.anneau--critique .anneau__jauge { stroke: var(--critique); }
/* Anneau d'une categorie non mesuree : pointille et gris, jamais un zero. */
.anneau--vide .anneau__fond { stroke-dasharray: 5 7; stroke: #c8cfda; }
.anneau__valeur { font-size: 30px; font-weight: 650; fill: var(--encre); font-family: inherit; }
.anneau__pourcent { font-size: 16px; fill: var(--encre-douce); }
.anneau__vide { font-size: 34px; fill: var(--inconnu); font-family: inherit; }

.appel { margin: 26px 0 0; background: var(--accent); color: #fff; border-radius: var(--rayon); padding: clamp(18px, 3vw, 26px); }
.appel h2 { color: #fff; }
.appel p { color: #ccd5e4; }
.appel__boutons { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; }
.appel .bouton--principal { background: #fff; color: var(--accent); }
.appel .bouton--principal:hover { background: #e7ecf5; }
.appel .bouton--secondaire { background: transparent; color: #fff; border-color: #56637c; }
.appel .bouton--secondaire:hover { border-color: #fff; }

.note-methode { color: var(--encre-douce); font-size: 0.82rem; max-width: 74ch; }
.note-methode--discret { font-size: 0.78rem; }

/* -------------------------------------------------- criteres */

.tableau-criteres { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--bordure); border-radius: 12px; overflow: hidden; }
.tableau-criteres th { text-align: left; font-weight: 500; padding: 10px 14px; border-bottom: 1px solid var(--bordure); }
.tableau-criteres td { padding: 10px 14px; border-bottom: 1px solid var(--bordure); white-space: nowrap; color: var(--encre-douce); }
.tableau-criteres tr:last-child th, .tableau-criteres tr:last-child td { border-bottom: 0; }
.poids { text-align: right; font-variant-numeric: tabular-nums; }

/* -------------------------------------------------- adaptations */

@media (max-width: 860px) {
  .grille-notes { grid-template-columns: 1fr; }
  .liste-mesures { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .liste-mesures { grid-template-columns: 1fr; }
  .carte-note { gap: 12px; }
  .carte-note__jauge { flex-basis: 76px; }
  .anneau { width: 76px; height: 76px; }
  .formulaire-analyse .bouton { width: 100%; }
}

@media print {
  .entete__retour, .appel, .liens-secondaires, .attente__rond { display: none !important; }
  body { background: #fff; }
  .entete { background: #fff; color: var(--encre); border-bottom: 2px solid var(--accent); }
  .marque__signature { color: var(--encre-douce); }
  .carte-note, .accroche { box-shadow: none; break-inside: avoid; }
  .grille-notes { grid-template-columns: repeat(2, 1fr); }
}
