:root {
  --bleu: #0b3c5d;
  --bleu-clair: #e8eef3;
  --orange: #e8a33d;
  --vert: #10c16b;
  --rouge: #d64545;
  --texte: #1d2733;
  --gris: #64717e;
  --fond: #f6f8fa;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Jost, Roboto, Helvetica, Arial, sans-serif;
  color: var(--texte);
  background: var(--fond);
  line-height: 1.55;
}

h1 { font-size: 30px; line-height: 1.2; margin: 0 0 12px; color: var(--bleu); }
h2 { font-size: 22px; margin: 0 0 12px; color: var(--bleu); }
h3 { font-size: 17px; margin: 18px 0 8px; color: var(--bleu); }
p { margin: 0 0 12px; }
a { color: var(--bleu); }

.bandeau {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding: 14px 22px; background: var(--bleu); color: #fff;
}
.bandeau a { color: #fff; text-decoration: none; }
.marque { display: flex; flex-direction: column; line-height: 1.1; }
.marque-nom { font-size: 19px; font-weight: 700; letter-spacing: .3px; }
.marque-point { color: var(--orange); }
.marque-sous { font-size: 12px; opacity: .85; }
.bandeau-nav a { margin-left: 16px; font-size: 14px; opacity: .9; }
.bandeau-nav a:hover { opacity: 1; text-decoration: underline; }

main { max-width: 1000px; margin: 0 auto; padding: 26px 18px 60px; }

.pied {
  background: #fff; border-top: 1px solid #e2e8ee; padding: 22px 18px 40px;
  font-size: 13px; color: var(--gris); text-align: center;
}
.petit { font-size: 13px; color: var(--gris); }
.mention { margin-top: 8px; }
.centre { text-align: center; }

.carte {
  background: #fff; border: 1px solid #e2e8ee; border-radius: 12px;
  padding: 22px; margin: 18px 0;
}
.heros { padding: 16px 0 4px; }
.chapeau { font-size: 17px; color: #35414d; }

.barre { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.barre input {
  flex: 1 1 260px; padding: 14px 16px; font-size: 16px;
  border: 1px solid #cfd8e0; border-radius: 10px; background: #fff;
}
.barre input:focus { outline: 2px solid var(--bleu); border-color: var(--bleu); }
.barre button, .bouton-lien {
  padding: 14px 22px; font-size: 16px; font-weight: 600; cursor: pointer;
  border: 0; border-radius: 10px; background: var(--orange); color: #40260a;
  text-decoration: none; display: inline-block;
}
.barre button:disabled { opacity: .6; cursor: progress; }
.barre button:hover:not(:disabled), .bouton-lien:hover { filter: brightness(1.05); }
.cf-turnstile { flex: 1 1 100%; min-height: 65px; }

.invisible { display: none !important; }
.invisible-texte { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.erreur { color: var(--rouge); font-weight: 600; }

.jauge { height: 10px; background: var(--bleu-clair); border-radius: 6px; overflow: hidden; }
.jauge-remplie { height: 100%; width: 2%; background: var(--bleu); transition: width .4s ease; }

.etapes { list-style: none; padding: 0; margin: 16px 0 0; }
.etape { padding: 6px 0 6px 26px; position: relative; font-size: 15px; color: var(--gris); }
.etape:before {
  content: "○"; position: absolute; left: 4px; color: #c3ccd4;
}
.etape.encours { color: var(--bleu); font-weight: 600; }
.etape.encours:before { content: "◐"; color: var(--bleu); }
.etape.ok { color: #2c7a52; }
.etape.ok:before { content: "✔"; color: var(--vert); }

.score-bloc { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.cadran { position: relative; width: 168px; height: 168px; flex: 0 0 168px; }
.cadran svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.cadran-fond { fill: none; stroke: var(--bleu-clair); stroke-width: 10; }
.cadran-arc { fill: none; stroke: var(--orange); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.cadran-arc.vert { stroke: var(--vert); }
.cadran-arc.orange { stroke: var(--orange); }
.cadran-arc.rouge { stroke: var(--rouge); }
.cadran-valeur {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  gap: 2px; font-size: 42px; font-weight: 700; color: var(--bleu);
}
.cadran-sur { font-size: 16px; color: var(--gris); font-weight: 500; }
.score-texte { flex: 1 1 320px; }

.piliers { list-style: none; padding: 0; margin: 10px 0; }
.piliers li { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed #e2e8ee; }
.pilier-points { font-weight: 700; }
.pilier-points.vert { color: #17a35c; }
.pilier-points.orange { color: #c4821f; }
.pilier-points.rouge { color: var(--rouge); }

.alertes { margin-top: 22px; border-top: 1px solid #e2e8ee; padding-top: 18px; }
.liste-alertes { list-style: none; padding: 0; }
.liste-alertes li {
  display: flex; gap: 10px; align-items: center; padding: 10px 0;
  border-bottom: 1px dashed #e2e8ee;
}
.gravite {
  font-size: 12px; text-transform: uppercase; letter-spacing: .4px; font-weight: 700;
  padding: 3px 8px; border-radius: 6px; background: var(--bleu-clair); color: var(--bleu);
  min-width: 78px; text-align: center;
}
.alerte.critique .gravite, .etiquette.critique { background: #fbe6e6; color: var(--rouge); }
.alerte.moyen .gravite, .etiquette.moyen { background: #fdf0dc; color: #a8681a; }
.alerte.faible .gravite, .etiquette.faible { background: #eaf6ef; color: #2c7a52; }
.flou { filter: blur(4px); user-select: none; }
.alerte.masquee .flou { filter: blur(5px); }

.constats { list-style: none; padding: 0; }
.constat { border-left: 4px solid var(--bleu); padding: 4px 0 12px 16px; margin: 0 0 18px; }
.constat.critique { border-color: var(--rouge); }
.constat.moyen { border-color: var(--orange); }
.constat.faible { border-color: var(--vert); }
.constat-tete { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.constat-tete h3 { margin: 0; }
.etiquette {
  font-size: 12px; text-transform: uppercase; font-weight: 700; letter-spacing: .4px;
  padding: 3px 8px; border-radius: 6px;
}

.tableau { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0 18px; }
.tableau th, .tableau td { text-align: left; padding: 7px 10px; border-bottom: 1px solid #eef2f6; vertical-align: top; }
.tableau th { color: var(--gris); font-weight: 600; width: 38%; }
.ok { color: #17a35c; font-weight: 600; }
.manque { color: var(--rouge); font-weight: 700; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.limites { padding-left: 20px; color: #35414d; }

.trois-colonnes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 26px; }
.trois-colonnes article { background: #fff; border: 1px solid #e2e8ee; border-radius: 12px; padding: 18px; }
.trois-colonnes h3 { margin-top: 0; }
.trois-colonnes p { font-size: 14px; color: #35414d; margin: 0; }

.entete-rapport { padding: 10px 0 0; }
.appel { border-left: 4px solid var(--orange); }

/* En-tete de rapport : mise a jour du test */
.entete-ligne { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.entete-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.bouton-secondaire {
  background: #fff;
  color: var(--bleu);
  border: 2px solid var(--bleu);
  border-radius: 8px;
  padding: 11px 18px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.bouton-secondaire:hover { background: var(--bleu-clair); }
.bouton-secondaire:disabled { opacity: 0.55; cursor: progress; }
.lien-discret { font-size: 14px; color: var(--gris); }
#etat-maj { margin: 10px 0 0; color: var(--bleu); }
#etat-maj.invisible { display: none; }

.bouton-large, .actions-larges button, .actions-larges .bouton-lien {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  font-size: 18px;
  padding: 16px 18px;
  margin: 10px 0;
}
.actions-larges { display: flex; flex-direction: column; gap: 4px; }
.resultat-niveau2 { border-top: 1px solid #e2e8ee; padding-top: 12px; margin-top: 12px; }
.resultat-verification {
  background: #fff6e8;
  border-left: 4px solid #e8a33d;
  color: #1d2733;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  padding: 14px 16px;
  margin: 12px 0;
}

@media (max-width: 760px) {
  h1 { font-size: 24px; }
  .duo, .trois-colonnes { grid-template-columns: 1fr; }
  .barre { flex-direction: column; }
  .barre input { flex: 0 0 auto; width: 100%; height: auto; }  /* en colonne, flex-basis servait de hauteur */
  .barre button, .barre .bouton-lien { width: 100%; }
  main { padding: 16px 12px 48px; }
  .carte { padding: 16px; }
  .cadran { width: 132px; height: 132px; flex-basis: 132px; }
  .cadran-valeur { font-size: 34px; }
  .bandeau { flex-direction: column; align-items: flex-start; }
  .bandeau-nav a { margin: 0 14px 0 0; }
  .entete-actions { align-items: stretch; width: 100%; }
  .bouton-secondaire { width: 100%; }
}

/* Cases de consentement sous le formulaire d'e-mail */
.consentements { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.consentement { display: flex; gap: 9px; align-items: flex-start; font-size: 13px;
  line-height: 1.4; cursor: pointer; }
.consentement input { width: 18px; height: 18px; margin: 1px 0 0; flex: 0 0 auto; }

/* Version publiee, en bas de page : pour savoir ce qui est reellement en ligne. */
.pied .version { margin: 12px 0 0; font-size: 10px; line-height: 1.3; color: #9aa3ad;
  letter-spacing: .02em; }

/* Historique des notes du rapport : tableau, de la plus recente a la plus ancienne. */
.enveloppe-tableau { overflow-x: auto; margin: 12px 0 16px; }
.tableau-versions { width: 100%; border-collapse: collapse; font-size: 13px; }
.tableau-versions th, .tableau-versions td { padding: 8px 10px; text-align: right;
  border-bottom: 1px solid #eef2f6; white-space: nowrap; }
.tableau-versions thead th { color: var(--gris); font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid #dde5ec; }
.tableau-versions th[scope="row"] { text-align: left; font-weight: 500; }
.tableau-versions tbody tr:last-child th, .tableau-versions tbody tr:last-child td { border-bottom: none; }
/* Version en ligne : fond distinct et filet orange, pour la reperer sans libelle. */
.tableau-versions .version-courante { background: #fff4e0; }
.tableau-versions .version-courante th[scope="row"],
.tableau-versions .version-courante td { border-bottom-color: #f2ddb8; }
.tableau-versions .version-courante th[scope="row"] { font-weight: 600;
  box-shadow: inset 3px 0 0 var(--orange); }
.tableau-versions .note { font-variant-numeric: tabular-nums; font-weight: 600; }
.tableau-versions .mouvements { display: block; font-size: 11px; color: var(--gris);
  font-weight: 400; }
/* La colonne des variations porte du texte libre : elle doit pouvoir se replier,
   sinon le tableau depasse la largeur de la page et impose un defilement. */
.tableau-versions .variation { white-space: normal; text-align: left; min-width: 180px;
  max-width: 260px; }
.tableau-versions .stable { color: var(--gris); }

/* Notes du tableau d'evolution, en pastille ronde. Memes seuils de couleur que le rapport
   (80 vert, 50 orange) : une note ne doit pas changer de couleur d'une page a l'autre.
   Texte encre foncee sur l'orange, comme le bouton du site : le blanc y manque de contraste. */
.tableau-versions .pastille-note { display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 13px;
  font-variant-numeric: tabular-nums; }
.tableau-versions .pastille-note.vert { background: var(--vert); }
.tableau-versions .pastille-note.orange { background: var(--orange); color: #40260a; }
.tableau-versions .pastille-note.rouge { background: var(--rouge); }
.tableau-versions .pastille-note.vide { background: #eef2f6; color: var(--gris); }
.tableau-versions .note { font-weight: 400; }

/* Mise a jour forcee d'un rapport : tout ce qui est sous le bouton passe en retrait
   (flou + voile sombre) pendant le recalcul. Sans cela, l'ancien rapport continue d'avoir
   l'air d'etre la donnee du jour alors qu'on est en train de le recalculer. */
#contenu-rapport {
  position: relative;
  transition: filter .25s ease;
}

#contenu-rapport::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(11, 60, 93, .38); /* = --bleu a 38 % */
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

#contenu-rapport.en-mise-a-jour {
  filter: blur(2.5px);
  pointer-events: none;
}

#contenu-rapport.en-mise-a-jour::after {
  opacity: 1;
}
