/* ==========================================================================
   Feuille de style unique — mobile first, sans framework.
   ========================================================================== */

:root {
  --vert:        #165b53;
  --vert-fonce:  #0f4640;
  --vert-clair:  #e8f0ee;
  --sable:       #f6f4ef;
  --encre:       #22262b;
  --gris:        #5a6169;
  --gris-clair:  #e6e8e7;
  --ambre:       #b8730f;
  --ambre-fond:  #fdf6e8;
  --rouge:       #9c2c1e;
  --rouge-fond:  #fdeeeb;
  --rayon:       8px;
  --ombre:       0 1px 3px rgba(20, 30, 28, .08), 0 8px 24px rgba(20, 30, 28, .05);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--encre);
  background: #fff;
}

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

.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 18px; }

a { color: var(--vert); }
a:hover { color: var(--vert-fonce); }

/* ---------- En-tete / pied ---------- */

.site-header {
  border-bottom: 1px solid var(--gris-clair);
  background: #fff;
  position: sticky; top: 0; z-index: 20;
}
.site-header .wrap {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  align-items: center; justify-content: space-between;
  padding-top: 12px; padding-bottom: 12px;
}
.site-header .logo {
  font-weight: 700; font-size: 17px; text-decoration: none; color: var(--vert);
  letter-spacing: -.01em;
}
.site-header nav { display: flex; gap: 16px; font-size: 14.5px; }
.site-header nav a { color: var(--gris); text-decoration: none; }
.site-header nav a:hover { color: var(--vert); }

.site-footer {
  margin-top: 56px; padding: 26px 0;
  border-top: 1px solid var(--gris-clair);
  background: var(--sable);
  font-size: 14px; color: var(--gris);
}
.site-footer a { color: var(--gris); }

.breadcrumb { font-size: 13.5px; color: var(--gris); padding-top: 14px; }
.breadcrumb a { color: var(--gris); text-decoration: none; }

/* ---------- Typographie ---------- */

.article { padding-top: 20px; padding-bottom: 10px; }

h1 {
  font-size: 30px; line-height: 1.22; letter-spacing: -.02em;
  margin: 18px 0 14px; font-weight: 700;
}
h2 {
  font-size: 22px; line-height: 1.3; letter-spacing: -.01em;
  margin: 38px 0 12px; font-weight: 700; color: var(--vert-fonce);
  padding-bottom: 7px; border-bottom: 1px solid var(--gris-clair);
}
h3 { font-size: 18px; line-height: 1.35; margin: 26px 0 8px; font-weight: 700; }
h4 { font-size: 16.5px; margin: 0 0 6px; font-weight: 700; }

p { margin: 0 0 14px; }
.chapo { font-size: 19px; color: #3b4148; line-height: 1.6; }
.micro { font-size: 13.5px; color: var(--gris); line-height: 1.55; }
.note {
  background: var(--vert-clair); border-left: 3px solid var(--vert);
  padding: 11px 14px; border-radius: 0 var(--rayon) var(--rayon) 0; font-size: 15px;
}

ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 7px; }

code {
  background: var(--sable); padding: 1px 5px; border-radius: 4px;
  font-size: .88em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.tag {
  display: inline-block; font-size: 12.5px; font-weight: 600;
  color: var(--vert); background: var(--vert-clair);
  padding: 2px 8px; border-radius: 20px; vertical-align: middle;
}

.disclaimer {
  margin-top: 34px; padding: 14px 16px;
  background: var(--ambre-fond); border-left: 3px solid var(--ambre);
  border-radius: 0 var(--rayon) var(--rayon) 0;
  font-size: 13.5px; line-height: 1.55; color: #5c4a2c;
}

.erreur-box {
  background: var(--rouge-fond); border-left: 3px solid var(--rouge);
  padding: 12px 15px; border-radius: 0 var(--rayon) var(--rayon) 0;
  color: #6d2418; font-size: 15px;
}

/* ---------- Boutons ---------- */

.btn {
  display: inline-block; background: var(--vert); color: #fff;
  text-decoration: none; font-weight: 600; font-size: 16px;
  padding: 13px 24px; border-radius: var(--rayon);
  border: 0; cursor: pointer; transition: background .15s ease;
  font-family: inherit;
}
.btn:hover { background: var(--vert-fonce); color: #fff; }
.btn.big { font-size: 17.5px; padding: 16px 28px; width: 100%; text-align: center; }

/* ---------- Accueil ---------- */

.hero { background: var(--vert); color: #fff; padding: 46px 0 50px; }
.hero h1 { margin-top: 0; color: #fff; font-size: 32px; }
.hero .chapo { color: #cfe3df; }
.hero .btn { background: #fff; color: var(--vert); margin-top: 8px; }
.hero .btn:hover { background: var(--vert-clair); }
.hero .micro { color: #a9cbc5; margin-top: 12px; }

.cols3, .cols2 { display: grid; gap: 6px 34px; margin-top: 34px; }
.cols3 h2, .cols2 h2 { font-size: 18px; margin-top: 22px; }
.cols3 ul, .cols3 ol, .cols2 ul { font-size: 15.5px; }

/* ---------- Contenu d'article ---------- */

.facts {
  list-style: none; padding: 0; margin: 20px 0 26px;
  display: grid; gap: 1px; background: var(--gris-clair);
  border: 1px solid var(--gris-clair); border-radius: var(--rayon); overflow: hidden;
}
.facts li {
  background: #fff; padding: 9px 14px; margin: 0; font-size: 15px;
  display: flex; justify-content: space-between; gap: 12px;
}
.facts strong { color: var(--gris); font-weight: 600; font-size: 13.5px; text-transform: uppercase; letter-spacing: .03em; }

.exos { list-style: none; padding: 0; counter-reset: exo; }
.exos > li {
  counter-increment: exo;
  background: var(--sable); border-radius: var(--rayon);
  padding: 16px 18px 12px; margin-bottom: 14px;
  border-left: 3px solid var(--vert);
}
.exos > li h4::before {
  content: counter(exo) ". "; color: var(--vert); font-weight: 700;
}
.exos p { font-size: 15.5px; }
.exos .erreur { color: #7c4a1a; font-size: 14.5px; }
.exos .variantes { color: #3f5a55; font-size: 14.5px; margin-bottom: 4px; }

.planning { width: 100%; border-collapse: collapse; margin: 16px 0 22px; font-size: 15px; }
.planning th, .planning td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--gris-clair); vertical-align: top; }
.planning thead th { background: var(--vert); color: #fff; font-size: 13.5px; text-transform: uppercase; letter-spacing: .04em; border: 0; }
.planning tbody th { font-weight: 600; white-space: nowrap; }
.planning tbody tr:nth-child(even) { background: #fafbfa; }

.repas { list-style: none; padding: 0; }
.repas li {
  padding: 11px 0; border-bottom: 1px solid var(--gris-clair); font-size: 15.5px;
}
.repas em { color: var(--gris); font-style: normal; font-size: 14.5px; }

.courses { display: grid; gap: 4px 30px; margin-bottom: 20px; }
.courses h3 { font-size: 15.5px; margin: 18px 0 6px; color: var(--vert-fonce); }
.courses ul { font-size: 15px; }

.erreurs { list-style: none; padding: 0; }
.erreurs li {
  background: var(--sable); border-radius: var(--rayon);
  padding: 14px 16px; margin-bottom: 11px; font-size: 15.5px;
}
.erreurs strong { color: var(--vert-fonce); }

.related { list-style: none; padding: 0; }
.related li { margin-bottom: 0; }
.related a {
  display: block; padding: 11px 14px; margin-bottom: 8px;
  background: var(--sable); border-radius: var(--rayon);
  text-decoration: none; font-size: 15px; color: var(--encre);
  border-left: 3px solid transparent; transition: border-color .15s, background .15s;
}
.related a:hover { border-left-color: var(--vert); background: var(--vert-clair); }

.hub { list-style: none; padding: 0; columns: 1; }
.hub li { margin-bottom: 5px; font-size: 15px; break-inside: avoid; }

/* ---------- Appel a l'action ---------- */

.cta {
  margin: 40px 0 10px; padding: 26px 22px;
  background: var(--vert); color: #fff; border-radius: 12px;
  box-shadow: var(--ombre);
}
.cta h2 { color: #fff; border: 0; margin-top: 0; padding: 0; font-size: 21px; }
.cta p { color: #cfe3df; font-size: 16px; }
.cta .prix { color: #fff; font-weight: 700; font-size: 18px; margin-bottom: 18px; }
.cta .btn { background: #fff; color: var(--vert); }
.cta .btn:hover { background: var(--vert-clair); }
.cta .micro { color: #a9cbc5; margin-top: 12px; margin-bottom: 0; }

/* ---------- Formulaire ---------- */

.form-section { padding-top: 28px; }

fieldset.step {
  border: 1px solid var(--gris-clair); border-radius: 12px;
  padding: 18px 18px 8px; margin: 0 0 16px;
}
fieldset.step legend {
  font-weight: 700; font-size: 17px; padding: 0 8px;
  display: flex; align-items: center; gap: 9px;
}
fieldset.step legend .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 25px; height: 25px; border-radius: 50%;
  background: var(--vert); color: #fff; font-size: 13.5px; font-weight: 700;
}

.choices { display: grid; gap: 9px; margin-top: 6px; }

.choice {
  display: block; position: relative;
  border: 1.5px solid var(--gris-clair); border-radius: var(--rayon);
  padding: 12px 14px 12px 44px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.choice:hover { border-color: #b9c6c3; }
.choice input {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; accent-color: var(--vert); cursor: pointer;
}
.choice .t { display: block; font-weight: 600; font-size: 16px; }
.choice .d { display: block; font-size: 13.5px; color: var(--gris); margin-top: 1px; }
.choice:has(input:checked) { border-color: var(--vert); background: var(--vert-clair); }
.choice input:focus-visible { outline: 2px solid var(--vert); outline-offset: 3px; }

.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.field input {
  width: 100%; font: inherit; font-size: 16px;
  padding: 12px 14px; border: 1.5px solid var(--gris-clair);
  border-radius: var(--rayon); background: #fff; color: var(--encre);
}
.field input:focus { outline: 0; border-color: var(--vert); }

.check {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 14px; line-height: 1.5; color: #3b4148; margin-bottom: 13px;
}
.check input { margin-top: 3px; width: 17px; height: 17px; flex: 0 0 auto; accent-color: var(--vert); }

/* piege a robots : invisible pour l'humain, present pour le DOM */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.merci h1 { margin-top: 34px; }

/* ---------- Tableau de bord ---------- */

.kpis {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
  margin: 22px 0 26px;
}
.kpis > div {
  background: var(--sable); border-radius: var(--rayon); padding: 14px 16px;
  border-left: 3px solid var(--vert);
}
.kpis .n { display: block; font-size: 24px; font-weight: 700; color: var(--vert-fonce); line-height: 1.2; }
.kpis .l { display: block; font-size: 13px; color: var(--gris); margin-top: 2px; }

.log { list-style: none; padding: 0; font-size: 12.5px; }
.log li { margin-bottom: 4px; word-break: break-all; }
.ok { color: #1c6b3f; font-weight: 600; }
.ko { color: var(--rouge); font-weight: 600; }

/* ---------- Ecrans larges ---------- */

@media (min-width: 700px) {
  body { font-size: 17.5px; }
  h1 { font-size: 36px; }
  .hero h1 { font-size: 42px; }
  .hero { padding: 64px 0 68px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .cols3 { grid-template-columns: repeat(3, 1fr); }
  .cols2 { grid-template-columns: repeat(2, 1fr); }
  .courses { grid-template-columns: 1fr 1fr; }
  .choices { grid-template-columns: 1fr 1fr; }
  .hub { columns: 2; column-gap: 30px; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .btn.big { width: auto; }
}

@media (min-width: 1000px) {
  .wrap { max-width: 820px; }
}

/* ---------- Impression ---------- */

@media print {
  .site-header, .site-footer, .cta, .related, .breadcrumb, form { display: none !important; }
  body { font-size: 11pt; }
  a { color: inherit; text-decoration: none; }
  .exos > li, .erreurs li { break-inside: avoid; }
}

/* ---------- Accessibilite ---------- */

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

:focus-visible { outline: 2px solid var(--vert); outline-offset: 2px; }
