/* Digitalisation & Décisionnel — feuille de style du site
   Polices : IBM Plex Sans (texte) et IBM Plex Sans Condensed (titres), hébergées localement. */

@font-face { font-family: "Plex"; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex"; src: url("../fonts/ibm-plex-sans-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Plex"; src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex"; src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Condensed"; src: url("../fonts/ibm-plex-sans-condensed-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Plex Condensed"; src: url("../fonts/ibm-plex-sans-condensed-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --encre: #1a2533;
  --texte: #2b3542;
  --gris: #5b6676;
  --filet: #d5dbe2;
  --gres: #eef1f4;
  --papier: #ffffff;
  --rouge: #d3111c;
  --rouge-fonce: #a90d16;
  --rouge-clair: #fdeced;
  --bleu: #245789;
  --vert: #1f6b45;
  --vert-clair: #e8f3ec;

  --titres: "Plex Condensed", "Arial Narrow", sans-serif;
  --corps: "Plex", "Segoe UI", system-ui, sans-serif;

  --largeur: 74rem;
  --marge: clamp(1.25rem, 4vw, 3rem);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--corps);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--texte);
  background: var(--papier);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: lining-nums;
}

img { max-width: 100%; height: auto; }

a { color: var(--bleu); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--encre); }

:focus-visible { outline: 3px solid var(--bleu); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { color: var(--encre); margin: 0; }
h1, h2 { font-family: var(--titres); }
h1 { font-weight: 700; font-size: clamp(2.35rem, 5.2vw, 3.9rem); line-height: 1.04; letter-spacing: -0.012em; }
h2 { font-weight: 600; font-size: clamp(1.65rem, 3vw, 2.25rem); line-height: 1.12; }
h3 { font-family: var(--corps); font-weight: 600; font-size: 1.125rem; line-height: 1.35; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.evitement { position: absolute; left: -999px; top: 0; background: var(--encre); color: #fff; padding: .75rem 1rem; z-index: 100; }
.evitement:focus { left: 1rem; top: 1rem; }

/* ---------- En-tête ---------- */
.entete { position: sticky; top: 0; z-index: 50; background: var(--papier); border-bottom: 1px solid var(--filet); }
.entete__barre { max-width: var(--largeur); margin: 0 auto; padding: .75rem var(--marge); display: flex; align-items: center; gap: 2rem; }
.marque { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--encre); }
.marque__nom { font-family: var(--titres); font-weight: 600; font-size: 1.15rem; line-height: 1.1; }
.nav { display: flex; gap: 1.5rem; margin-left: auto; }
.nav a { color: var(--texte); text-decoration: none; font-size: .95rem; }
.nav a:hover { color: var(--encre); text-decoration: underline; }
@media (max-width: 1020px) { .nav { display: none; } .entete__barre .bouton { margin-left: auto; } }
@media (max-width: 520px) { .marque__nom { display: none; } }

/* ---------- Boutons et liens forts ---------- */
.bouton {
  display: inline-block; font: 600 1rem/1.2 var(--corps); color: #fff; background: var(--rouge);
  border: 0; border-radius: 3px; padding: .95rem 1.4rem; text-decoration: none; cursor: pointer;
}
.bouton:hover { background: var(--rouge-fonce); color: #fff; }
.bouton--petit { font-size: .9rem; padding: .6rem 1rem; white-space: nowrap; }
.lien-fort { font-weight: 600; color: var(--encre); }

/* ---------- Ouverture ---------- */
.ouverture {
  max-width: var(--largeur); margin: 0 auto; padding: clamp(3rem, 8vw, 6rem) var(--marge) clamp(3rem, 7vw, 5rem);
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.ouverture__texte { max-width: 36rem; }
.chapeau { font-size: 1.2rem; line-height: 1.55; margin-top: 1.5rem; color: var(--texte); }
.cible { color: var(--gris); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: 2rem; }
@media (max-width: 900px) { .ouverture { grid-template-columns: 1fr; } }

/* Le relevé : extrait de tableau de bord, élément signature de la page */
.releve { margin: 0; background: var(--gres); border-radius: 4px; padding: 1.5rem 1.5rem 1.35rem; }
.releve figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .9rem; }
.releve__titre { font-family: var(--titres); font-weight: 600; font-size: 1.2rem; color: var(--encre); }
.releve__note { font-size: .8rem; color: var(--gris); font-style: italic; }
.releve table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: .98rem; background: var(--papier); }
.releve th, .releve td { padding: .62rem .8rem; text-align: right; border-bottom: 1px solid var(--filet); }
.releve thead th { font-size: .8rem; font-weight: 500; color: var(--gris); background: var(--papier); border-bottom: 1px solid var(--encre); }
.releve th[scope="row"], .releve thead th:first-child { text-align: left; font-weight: 600; color: var(--encre); }
.releve th[scope="row"] span { display: block; font-weight: 400; font-size: .8rem; color: var(--gris); }
.releve tbody tr:last-child > * { border-bottom: 0; }
.releve__alerte > * { background: var(--rouge-clair); }
.releve__alerte th[scope="row"] { box-shadow: inset 4px 0 0 var(--rouge); }
.releve__alerte td:last-child { color: var(--rouge); font-weight: 600; }
.releve__message { margin-top: 1rem; font-size: .95rem; line-height: 1.5; padding-left: 1rem; border-left: 4px solid var(--rouge); }
.releve__message strong { color: var(--encre); }

@media (prefers-reduced-motion: no-preference) {
  .releve__alerte > * { animation: signal 1.6s ease-out .5s both; }
  .releve__message { animation: apparition .5s ease-out 1.4s both; }
  @keyframes signal { from { background: var(--papier); } 35% { background: #f9c9cc; } to { background: var(--rouge-clair); } }
  @keyframes apparition { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
}

@media (max-width: 520px) {
  .releve { padding: 1rem .9rem 1rem; }
  .releve figcaption { flex-direction: column; gap: .15rem; }
  .releve th, .releve td { padding: .55rem .5rem; }
  .releve thead th { white-space: nowrap; }
}

/* ---------- Blocs ---------- */
.bloc {
  max-width: var(--largeur); margin: 0 auto; padding: clamp(3rem, 7vw, 5rem) var(--marge);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 1.5rem clamp(2rem, 5vw, 4.5rem);
  border-top: 1px solid var(--filet);
}
.bloc__entete > p { color: var(--gris); margin-top: .9rem; max-width: 26rem; }
@media (min-width: 901px) { .bloc__entete { position: sticky; top: 6rem; align-self: start; } }
@media (max-width: 900px) { .bloc { grid-template-columns: 1fr; } }

.bloc--constat { border-top: 0; }
.prose { max-width: 40rem; }
.prose p { margin-bottom: 1.1em; }

/* Prestations */
.prestations { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.25rem 2.5rem; }
.prestations > div { border-top: 2px solid var(--encre); padding-top: 1rem; }
.prestations dt { font-family: var(--titres); font-weight: 600; font-size: 1.3rem; line-height: 1.2; color: var(--encre); margin-bottom: .5rem; }
.prestations dd { margin: 0; }
@media (max-width: 640px) { .prestations { grid-template-columns: 1fr; } }

.sous-titre { margin-top: 3rem; margin-bottom: 1rem; }
.indicateurs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--filet); }
.indicateurs li { padding: .8rem 1rem .8rem 0; border-bottom: 1px solid var(--filet); }
.indicateurs li:last-child { color: var(--rouge-fonce); font-weight: 500; }
@media (max-width: 640px) { .indicateurs { grid-template-columns: 1fr; } }

/* Étapes : une vraie séquence, d'où la numérotation */
.etapes { list-style: none; margin: 0; padding: 0; counter-reset: etape; }
.etapes li { counter-increment: etape; position: relative; padding: 0 0 2rem 3.75rem; }
.etapes li::before {
  content: counter(etape); position: absolute; left: 0; top: -.15rem; width: 2.4rem; height: 2.4rem;
  display: grid; place-items: center; border: 2px solid var(--encre); border-radius: 50%;
  font: 700 1.1rem/1 var(--titres); color: var(--encre); background: var(--papier);
}
.etapes li:not(:last-child)::after { content: ""; position: absolute; left: 1.15rem; top: 2.4rem; bottom: .2rem; width: 2px; background: var(--filet); }
.etapes li:nth-child(2)::before { background: var(--encre); color: #fff; }
.etapes h3 { margin-bottom: .35rem; }
.etapes p { max-width: 38rem; }
.etapes li:last-child { padding-bottom: 0; }

/* Tarifs */
.tarifs { width: 100%; max-width: 30rem; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tarifs caption { text-align: left; font-weight: 600; color: var(--encre); padding-bottom: .75rem; }
.tarifs th, .tarifs td { padding: .8rem 0; border-bottom: 1px solid var(--filet); text-align: left; }
.tarifs thead th { font-size: .85rem; font-weight: 500; color: var(--gris); border-bottom: 1px solid var(--encre); }
.tarifs td, .tarifs thead th:last-child { text-align: right; }
.tarifs td { font-family: var(--titres); font-weight: 600; font-size: 1.4rem; color: var(--encre); }
.tarifs-annexes { margin: 2rem 0 0; max-width: 40rem; }
.tarifs-annexes > div { display: flex; justify-content: space-between; gap: 1.5rem; padding: .6rem 0; border-bottom: 1px dashed var(--filet); }
.tarifs-annexes dd { margin: 0; font-weight: 600; color: var(--encre); white-space: nowrap; font-variant-numeric: tabular-nums; }
.remarque { margin-top: 1.75rem; max-width: 40rem; font-size: .95rem; color: var(--gris); }
@media (max-width: 520px) { .tarifs-annexes > div { flex-direction: column; gap: .15rem; } }

/* Engagements */
.engagements { list-style: none; margin: 0; padding: 0; max-width: 42rem; }
.engagements li { padding: 1rem 0 1rem 1.25rem; border-bottom: 1px solid var(--filet); position: relative; }
.engagements li::before { content: ""; position: absolute; left: 0; top: 1.55rem; width: .5rem; height: .5rem; background: var(--encre); }
.engagements strong { color: var(--encre); }

/* Contact */
.bloc--contact { background: var(--gres); box-shadow: 0 0 0 100vmax var(--gres); clip-path: inset(0 -100vmax); border-top: 0; }
.coordonnees { font-style: normal; margin-top: 1.5rem; line-height: 1.8; }
.formulaire { max-width: 40rem; }
.champs-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.25rem; }
@media (max-width: 640px) { .champs-duo { grid-template-columns: 1fr; } }
.champ { margin-bottom: 1.25rem; }
.champ label { display: block; font-weight: 500; color: var(--encre); margin-bottom: .35rem; }
.facultatif { font-weight: 400; color: var(--gris); font-size: .875rem; margin-left: .3rem; }
.champ input, .champ textarea {
  width: 100%; font: inherit; color: var(--encre); background: var(--papier);
  border: 1px solid #9aa5b3; border-radius: 3px; padding: .7rem .8rem;
}
.champ input:focus, .champ textarea:focus { outline: 3px solid var(--bleu); outline-offset: 0; border-color: var(--bleu); }
.champ textarea { resize: vertical; min-height: 9rem; }
.aide { font-size: .875rem; color: var(--gris); margin-top: .35rem; }
.champ--piege { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.mention-rgpd { font-size: .875rem; color: var(--gris); margin-bottom: 1.5rem; }

.avis { padding: 1rem 1.1rem; border-radius: 3px; margin-bottom: 1.5rem; max-width: 40rem; font-weight: 500; }
.avis--ok { background: var(--vert-clair); color: var(--vert); border-left: 4px solid var(--vert); }
.avis--erreur { background: var(--rouge-clair); color: var(--rouge-fonce); border-left: 4px solid var(--rouge); }

/* ---------- Pages de texte ---------- */
.page-texte { margin: 0 auto; padding: clamp(3rem, 7vw, 5rem) var(--marge); max-width: calc(44rem + 2 * var(--marge)); }
.page-texte h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 1.5rem; }
.page-texte h2 { font-size: 1.4rem; margin: 2.25rem 0 .75rem; }
.page-texte code { font-size: .9em; background: var(--gres); padding: .1em .3em; border-radius: 2px; }

/* ---------- Pied de page ---------- */
.pied { background: var(--encre); color: #c9d1db; margin-top: 0; }
.pied a { color: #fff; }
.pied__grille { max-width: var(--largeur); margin: 0 auto; padding: 3rem var(--marge) 1.5rem; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1.5rem 2rem; }
.pied__grille p { margin: 0 0 .4rem; }
.pied__nom { font-family: var(--titres); font-weight: 600; font-size: 1.2rem; color: #fff; }
.pied__note { max-width: var(--largeur); margin: 0 auto; padding: 1.25rem var(--marge) 2.5rem; font-size: .85rem; border-top: 1px solid rgba(255,255,255,.12); }
@media (max-width: 720px) { .pied__grille { grid-template-columns: 1fr; } }
