/* Vigibarrage — feuille de style unique.
   Couleurs tirées du métier : eau de la retenue, latérite des digues, encre des plans. */

@font-face { font-family: "Barlow"; src: url("../fonts/barlow-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --encre: #14313B;        /* texte principal, fonds sombres */
  --texte-2: #4A5A60;      /* texte secondaire */
  --fond: #FFFFFF;
  --surface: #F1F4F3;      /* blocs en retrait */
  --trait: #D5DDDC;        /* bordures fines */
  --eau: #1F6E8C;          /* couleur principale : liens, boutons */
  --eau-fonce: #17566E;
  --terre: #8C5A2E;        /* accent rare : repères */
  --ok: #2E7D32;
  --surveiller: #A15C00;
  --urgence: #B3261E;
  --focus: #F2B705;

  --rayon: 6px;
  --largeur: 1120px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--encre);
  background: var(--fond);
}
img { max-width: 100%; display: block; }
a { color: var(--eau); text-underline-offset: 3px; }
a:hover { color: var(--eau-fonce); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 var(--s4); font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5.4vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 var(--s4); }

.conteneur { width: 100%; max-width: var(--largeur); margin: 0 auto; padding: 0 var(--s4); }
@media (min-width: 768px) { .conteneur { padding: 0 var(--s6); } }

.lien-evitement { position: absolute; left: -9999px; top: 0; background: var(--encre); color: #fff; padding: var(--s3) var(--s4); z-index: 100; }
.lien-evitement:focus { left: var(--s4); top: var(--s4); }

/* ---------- Boutons ---------- */
.bouton {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: 0 var(--s5);
  font: inherit; font-weight: 600; font-size: 1rem;
  border: 2px solid var(--eau); border-radius: var(--rayon);
  background: var(--eau); color: #fff; text-decoration: none; cursor: pointer;
}
.bouton:hover { background: var(--eau-fonce); border-color: var(--eau-fonce); color: #fff; }
.bouton--clair { background: transparent; color: var(--eau); }
.bouton--clair:hover { background: var(--surface); color: var(--eau-fonce); }
.bouton--sur-photo { background: #fff; border-color: #fff; color: var(--encre); }
.bouton--sur-photo:hover { background: #E8EEED; border-color: #E8EEED; color: var(--encre); }
.bouton--contour-blanc { background: transparent; border-color: #fff; color: #fff; }
.bouton--contour-blanc:hover { background: rgba(255,255,255,.12); color: #fff; }
.bouton[disabled] { opacity: .6; cursor: wait; }

/* ---------- En-tête ---------- */
.entete { border-bottom: 1px solid var(--trait); background: #fff; position: relative; z-index: 10; }
.entete__barre { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); min-height: 72px; }
.entete__logo img { height: 44px; width: auto; }
.entete__nav { display: none; }
.entete__nav a { color: var(--encre); text-decoration: none; font-weight: 500; }
.entete__nav a:hover { color: var(--eau); text-decoration: underline; }
.entete__actions { display: flex; align-items: center; gap: var(--s4); }
.entete__connexion { font-weight: 600; text-decoration: none; }
.entete__menu-bouton { min-height: 44px; min-width: 44px; border: 1px solid var(--trait); border-radius: var(--rayon); background: #fff; font: inherit; font-weight: 600; color: var(--encre); padding: 0 var(--s3); }
.entete__tiroir { border-top: 1px solid var(--trait); padding: var(--s3) 0 var(--s4); }
.entete__tiroir a { display: block; padding: var(--s3) 0; color: var(--encre); font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--surface); }
.entete .bouton { min-height: 44px; padding: 0 var(--s4); }
.seulement-large { display: none; }
@media (min-width: 900px) {
  .entete__nav { display: flex; gap: var(--s5); }
  .entete__menu-bouton, .entete__tiroir { display: none !important; }
  .seulement-large { display: inline-flex; }
}

/* ---------- Bandeau principal ----------
   Photo et texte côte à côte : la digue de Kossou reste entièrement visible, sans voile. */
.bandeau { background: var(--encre); color: #fff; display: grid; }
.bandeau__media { position: relative; margin: 0; min-height: 240px; }
.bandeau__photo { width: 100%; height: 100%; object-fit: cover; object-position: 40% 60%; aspect-ratio: 4 / 3; }
.bandeau__credit { position: absolute; right: 0; bottom: 0; margin: 0; padding: var(--s1) var(--s2); font-size: .75rem; color: #E4ECEB; background: rgba(12,33,41,.7); }
.bandeau__credit a { color: #fff; }
.bandeau__contenu { padding: var(--s6) var(--s4) var(--s7); }
.bandeau h1 { color: #fff; }
.bandeau__texte { font-size: 1.15rem; color: #D9E3E2; max-width: 34em; }
.bandeau__actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }
@media (min-width: 900px) {
  .bandeau { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); min-height: 560px; }
  .bandeau__media { order: 2; }
  .bandeau__photo { position: absolute; inset: 0; aspect-ratio: auto; }
  .bandeau__contenu { align-self: center; padding: var(--s8) var(--s7) var(--s8) max(var(--s6), calc((100vw - var(--largeur)) / 2 + var(--s6))); }
  .bandeau h1 { font-size: clamp(2.2rem, 3.4vw, 3.1rem); }
}

/* ---------- Sections ---------- */
.section { padding: var(--s8) 0; }
.section--surface { background: var(--surface); }
.section__intro { max-width: 40em; color: var(--texte-2); font-size: 1.1rem; }

.deux-colonnes { display: grid; gap: var(--s6); }
@media (min-width: 900px) { .deux-colonnes { grid-template-columns: 5fr 6fr; gap: var(--s8); align-items: start; } }

.liste-points { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--trait); }
.liste-points li { padding: var(--s4) 0; border-bottom: 1px solid var(--trait); }
.liste-points strong { display: block; font-size: 1.1rem; margin-bottom: var(--s1); }
.liste-points span { color: var(--texte-2); }

/* Étapes d'une inspection : vraie suite, donc numérotée */
.etapes { list-style: none; margin: 0; padding: 0; counter-reset: etape; }
.etapes li { counter-increment: etape; position: relative; padding: 0 0 var(--s5) 56px; }
.etapes li::before {
  content: counter(etape); position: absolute; left: 0; top: -2px;
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--encre); color: #fff; font-weight: 700;
}
.etapes li:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 40px; bottom: 6px; width: 2px; background: var(--trait); }
.etapes h3 { margin-bottom: var(--s1); }
.etapes p { color: var(--texte-2); margin: 0; }

.photo-legendee { margin: 0; }
.photo-legendee img { border-radius: var(--rayon); width: 100%; height: auto; }
.photo-legendee figcaption { font-size: .85rem; color: var(--texte-2); margin-top: var(--s2); }

/* Profils : lignes, pas de cartes identiques */
.profils { display: grid; gap: 0; border-top: 2px solid var(--encre); }
.profil { display: grid; gap: var(--s2); padding: var(--s5) 0; border-bottom: 1px solid var(--trait); }
.profil h3 { margin: 0; }
.profil__role { font-size: .95rem; color: var(--terre); font-weight: 600; }
.profil p { margin: 0; color: var(--texte-2); }
@media (min-width: 768px) { .profil { grid-template-columns: 260px 1fr; gap: var(--s6); align-items: baseline; } }

.citation-methode { border-left: 4px solid var(--terre); padding: var(--s2) 0 var(--s2) var(--s5); margin: 0; }
.citation-methode p { font-size: 1.3rem; font-weight: 500; line-height: 1.4; margin-bottom: var(--s2); }
.citation-methode footer { color: var(--texte-2); font-size: .95rem; }

.appel { background: var(--encre); color: #fff; }
.appel .conteneur { display: grid; gap: var(--s4); padding-top: var(--s7); padding-bottom: var(--s7); }
.appel h2 { color: #fff; margin: 0; }
.appel p { color: #D6DEE0; margin: 0; }
@media (min-width: 900px) { .appel .conteneur { grid-template-columns: 1fr auto; align-items: center; } }

/* ---------- Espace connecté sur l'accueil ---------- */
.espace { background: var(--surface); border-bottom: 1px solid var(--trait); padding: var(--s6) 0; }
.espace h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.encart { border: 1px solid var(--trait); border-left: 4px solid var(--eau); background: #fff; padding: var(--s4) var(--s5); border-radius: var(--rayon); max-width: 46em; }
.encart--attente { border-left-color: var(--surveiller); }
.encart--refus { border-left-color: var(--urgence); }
#liste .encart { margin-bottom: var(--s4); max-width: 60em; }
.encart p:last-child { margin-bottom: 0; }

/* ---------- Pied de page ---------- */
.pied { background: #0F262E; color: #C9D5D4; padding: var(--s7) 0 var(--s5); font-size: .95rem; }
.pied a { color: #E4ECEB; }
.pied__grille { display: grid; gap: var(--s6); }
.pied__logo img { height: 44px; width: auto; }
.pied h2 { font-size: 1rem; color: #fff; margin-bottom: var(--s3); }
.pied ul { list-style: none; padding: 0; margin: 0; }
.pied li { margin-bottom: var(--s2); }
.pied__credits { font-size: .85rem; }
.pied--simple { padding: var(--s5) 0; }
.pied--simple .pied__bas { border-top: 0; margin-top: 0; padding-top: 0; }
.pied__bas { border-top: 1px solid rgba(255,255,255,.15); margin-top: var(--s6); padding-top: var(--s4); font-size: .85rem; }
@media (min-width: 900px) { .pied__grille { grid-template-columns: 1.2fr 1fr 1.6fr; } }

/* ---------- Formulaires et parcours d'inscription ---------- */
.parcours { padding: var(--s6) 0 var(--s8); }
.parcours__colonne { max-width: 620px; }
.retour { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; margin-bottom: var(--s4); }
.etape-indication { color: var(--texte-2); font-size: .95rem; margin-bottom: var(--s2); }
.parcours h1 { font-size: clamp(1.7rem, 4.4vw, 2.5rem); }
.aide { color: var(--texte-2); margin-bottom: var(--s5); }

.champ { margin-bottom: var(--s5); }
.champ label, .champ legend { display: block; font-weight: 600; margin-bottom: var(--s2); }
.champ .indice { display: block; color: var(--texte-2); font-weight: 400; margin: calc(-1 * var(--s1)) 0 var(--s2); font-size: .95rem; }
.champ input[type=text], .champ input[type=email], .champ input[type=tel], .champ input[type=password], .champ input[type=number], .champ select {
  width: 100%; min-height: 48px; padding: var(--s2) var(--s3);
  font: inherit; color: var(--encre); background: #fff;
  border: 2px solid #7C8B8F; border-radius: var(--rayon);
}
.champ input:focus, .champ select:focus { border-color: var(--encre); outline: 3px solid var(--focus); outline-offset: 0; }
.champ--erreur input, .champ--erreur select { border-color: var(--urgence); }
.message-erreur { display: block; color: var(--urgence); font-weight: 600; margin-bottom: var(--s2); }
.message-erreur[hidden] { display: none; }
fieldset { border: 0; padding: 0; margin: 0; }
.court { max-width: 12em; }
.double { display: grid; gap: 0 var(--s4); }
@media (min-width: 600px) { .double { grid-template-columns: 1fr 1fr; } }

.choix { display: grid; gap: var(--s3); }
.choix__option { position: relative; }
.choix__option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choix__option label {
  display: grid; grid-template-columns: 1fr; gap: var(--s1);
  padding: var(--s4); border: 2px solid var(--trait); border-radius: var(--rayon); cursor: pointer; font-weight: 400; margin: 0;
  background: #fff;
}
.choix__option label:hover { border-color: #9AA9AC; }
.choix__option input:checked + label { border-color: var(--eau); background: #EEF5F8; box-shadow: inset 0 0 0 1px var(--eau); }
.choix__option input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.choix__titre { font-weight: 700; font-size: 1.1rem; }
.choix__detail { color: var(--texte-2); font-size: .95rem; }
.choix--simple .choix__option label { grid-template-columns: 1fr; padding: var(--s3) var(--s4); font-weight: 600; }

.verification { margin: 0 0 var(--s5); border-top: 1px solid var(--trait); }
.verification div { display: grid; gap: var(--s1); padding: var(--s3) 0; border-bottom: 1px solid var(--trait); }
.verification dt { font-weight: 600; }
.verification dd { margin: 0; color: var(--texte-2); overflow-wrap: anywhere; }
@media (min-width: 600px) { .verification div { grid-template-columns: 220px 1fr auto; gap: var(--s4); align-items: baseline; } }

.case { display: flex; gap: var(--s3); align-items: flex-start; }
.case input { width: 24px; height: 24px; margin-top: 2px; flex: none; }
.case label { font-weight: 400; margin: 0; }

.alerte { padding: var(--s4); border: 2px solid var(--urgence); border-radius: var(--rayon); margin-bottom: var(--s5); background: #FBEDEB; }
.alerte--succes { border-color: var(--ok); background: #EDF6EE; }
.alerte h2 { font-size: 1.1rem; margin-bottom: var(--s2); }
.alerte p:last-child { margin-bottom: 0; }

.afficher-mdp { background: none; border: 0; color: var(--eau); font: inherit; font-weight: 600; padding: var(--s2) 0; cursor: pointer; }

.lien-sous-formulaire { margin-top: var(--s5); }
.photo-connexion { display: none; }
@media (min-width: 900px) { .photo-connexion { display: block; } }

.titre-isole { margin-top: var(--s6); }

/* ---------- Pages de texte ---------- */
.texte-long { max-width: 46em; padding: var(--s6) 0 var(--s8); }
.texte-long h2 { margin-top: var(--s6); }

/* Texte lu par les lecteurs d'écran mais invisible */
.visuellement-cache { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
#titre-etape:focus { outline: none; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
