/* CERIEP — feuille de style unique
   Charte graphique v1.0 (octobre 2026) : Montserrat SemiBold + Inter,
   texte Vert Ardoise, accent unique Vert Feuille, encadrés brume.
   Polices auto-hébergées (sous-ensemble latin, woff2). */

@font-face { font-family: "Montserrat"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fonts/montserrat-semibold.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/inter-regular.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("/assets/fonts/inter-medium.woff2") format("woff2"); }

:root {
  --sauge: #7DB89A;
  --pastel: #A9CBE8;
  --ardoise: #24463F;
  --feuille: #3B7558;
  --gris: #5C6B67;
  --brume-verte: #EDF5F0;
  --brume-bleue: #EDF4FA;
  --ligne: #DCE6E1;
  --blanc: #FFFFFF;

  --font-titre: "Montserrat", Arial, sans-serif;
  --font-texte: "Inter", Arial, sans-serif;

  --mesure: 42rem;
  --largeur: 68rem;
  --gouttiere: 1rem;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--blanc);
  color: var(--ardoise);
  font-family: var(--font-texte);
  font-size: 1.0625rem;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--font-titre);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 1rem;
  text-wrap: balance;
}
h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem); }
h2 { font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.875rem); }
h3 { font-size: 1.125rem; margin-bottom: .5rem; }
h4 { font-family: var(--font-texte); font-weight: 500; font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gris); margin: 1.25rem 0 .5rem; }

p, ul, ol, dl { margin: 0 0 1rem; }
p:last-child, ul:last-child, ol:last-child, dl:last-child { margin-bottom: 0; }

a {
  color: var(--feuille);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .15em;
}
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--feuille);
  outline-offset: 3px;
}

img, svg { max-width: 100%; height: auto; display: block; }

.conteneur {
  width: min(100% - 2 * var(--gouttiere), var(--largeur));
  margin-inline: auto;
}
.mesure { max-width: var(--mesure); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.lien-evitement {
  position: absolute; top: -100%; left: 1rem;
  background: var(--ardoise); color: var(--blanc);
  padding: .5rem 1rem; z-index: 100; text-decoration: none;
}
.lien-evitement:focus { top: .5rem; }

/* En-tête */
.entete {
  position: sticky; top: 0; z-index: 10;
  background: var(--blanc);
  border-bottom: 1px solid var(--ligne);
}
.entete .conteneur {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem 2rem; flex-wrap: wrap;
  padding-block: .875rem;
}
.logo { display: block; }
.logo img { width: 132px; height: auto; }

.nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; align-items: center;
}
.nav a {
  color: var(--ardoise); text-decoration: none; display: inline-block;
  font-size: .9375rem; font-weight: 500; padding: .5rem 0; line-height: 1.2;
}
.nav a:hover { color: var(--feuille); text-decoration: underline; }

.bouton {
  display: inline-block;
  background: var(--feuille); color: var(--blanc);
  font-weight: 500; text-decoration: none;
  padding: .625rem 1.125rem; border-radius: 3px;
  border: 1px solid var(--feuille);
  cursor: pointer; font-family: inherit; font-size: .9375rem; line-height: 1.3;
}
.bouton:hover { background: var(--ardoise); border-color: var(--ardoise); text-decoration: none; }
.nav .bouton { padding: .5rem 1rem; }

/* Sections */
.section { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem); }
.section + .section { border-top: 1px solid var(--ligne); }
.section-fond { background: var(--brume-verte); border-top: 0 !important; }
.section-fond + .section { border-top: 0; }

.surtitre {
  font-family: var(--font-texte); font-weight: 500;
  font-size: .75rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gris); margin-bottom: .75rem;
}

/* Accroche — motif d'anneaux en filigrane (charte § 08 : symbole agrandi et recadré, 8 à 25 % d'opacité) */
.accroche { position: relative; overflow: hidden; padding-block: clamp(3.5rem, 2rem + 6vw, 7rem); }
.accroche::before {
  content: ""; position: absolute; z-index: 0; pointer-events: none;
  left: max(48rem, 60%); top: 50%; width: 44vw; max-width: 640px; aspect-ratio: 373 / 246;
  transform: translateY(-50%);
  background: url("/assets/ceriep-mark.svg") no-repeat center / contain;
  opacity: .12;
}
.accroche .conteneur { position: relative; z-index: 1; }
@media (max-width: 56rem) { .accroche::before { display: none; } }
.accroche h1 { max-width: 30ch; }
.accroche .definition { font-size: 1.1875rem; max-width: var(--mesure); color: var(--ardoise); }
.accroche .actions { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; margin-top: 2rem; }

/* Filet bicolore : une fois par page (charte, § 08) */
.filet {
  height: 3px; width: 6rem; margin: 1.75rem 0 0;
  background: linear-gradient(90deg, var(--sauge) 50%, var(--pastel) 50%);
}

/* Grilles */
.grille {
  display: grid; gap: 2rem 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  margin-top: 2.5rem;
}
.grille h3 { margin-top: 0; }
.grille p { color: var(--ardoise); }

/* Prestations */
.famille { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--ligne); font-size: 1.25rem; color: var(--feuille); }
.titre-prestation { font-family: var(--font-titre); font-weight: 600; font-size: 1.125rem; letter-spacing: 0; text-transform: none; color: var(--ardoise); margin: 0 0 .5rem; line-height: 1.25; }
.grille-prestations { grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); margin-top: 1.5rem; }
.grille-prestations ul { padding-left: 1.1rem; margin-bottom: 1rem; }
.grille-prestations li { margin-bottom: .375rem; }
.cadre-role { font-size: .9375rem; color: var(--gris); border-left: 3px solid var(--sauge); padding-left: .875rem; margin-top: 1rem; }

/* Illustration de section (un seul visuel, largeur contenue, blanc autour) */
.illustration { margin: 1.5rem 0 0; max-width: 56rem; }
.illustration img { width: 100%; height: auto; border-radius: 3mm; }

/* Méthode */
.etapes { list-style: none; counter-reset: etape; padding: 0; margin: 2.5rem 0 0; display: grid; gap: 1.75rem; }
.etapes li { counter-increment: etape; display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; align-items: start; }
.etapes li::before {
  content: counter(etape, decimal-leading-zero);
  font-family: var(--font-titre); font-weight: 600; font-size: 1.125rem;
  color: var(--feuille); padding-top: .15rem;
}
.etapes h3 { margin-top: 0; }

/* Encadré brume */
.encadre {
  background: var(--brume-bleue);
  border-radius: 3mm; padding: 1.5rem 1.75rem;
  margin-top: 2rem; max-width: var(--mesure);
}
.encadre dt { font-weight: 500; }
.encadre dd { margin: 0 0 .75rem; }
.encadre dd:last-child { margin-bottom: 0; }

/* FAQ */
.faq { max-width: var(--mesure); margin-top: 2rem; border-top: 1px solid var(--ligne); }
.faq details { border-bottom: 1px solid var(--ligne); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 1rem 2rem 1rem 0; position: relative;
  font-family: var(--font-titre); font-weight: 600; font-size: 1.0625rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: .25rem; top: .9rem;
  color: var(--feuille); font-size: 1.375rem; line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq .reponse { padding: 0 0 1.25rem; }

/* Contact */
.contact-grille {
  display: grid; gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  margin-top: 2rem;
}
.formulaire { display: grid; gap: 1.25rem; }
.champ { display: grid; gap: .375rem; }
.champ label { font-weight: 500; font-size: .9375rem; }
.champ input, .champ textarea {
  font: inherit; color: var(--ardoise);
  padding: .625rem .75rem;
  border: 1px solid var(--gris); border-radius: 3px;
  background: var(--blanc); width: 100%;
}
.champ textarea { min-height: 8rem; resize: vertical; }
.champ-cache { position: absolute; left: -9999px; }
.consentement { display: grid; grid-template-columns: auto 1fr; gap: .625rem; align-items: start; font-size: .875rem; color: var(--gris); }
.consentement input { margin: .3rem 0 0; width: 1rem; height: 1rem; accent-color: var(--feuille); }
.mention { font-size: .875rem; color: var(--gris); }
.coordonnees dt { font-weight: 500; }
.coordonnees dd { margin: 0 0 1rem; }

/* Relances vers le contact */
.relance { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--ligne); max-width: var(--mesure); }
.relance p:first-child { font-weight: 500; }
.relance p:last-child { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
.relance-ou { font-size: .9375rem; color: var(--gris); }
.relance-ou a, .mention a, .consentement a { display: inline-block; padding: .125rem 0; }
.envoi { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }

/* Barre d'appel fixe, mobile uniquement (l'en-tête n'y est pas collant) */
.cta-mobile { display: none; }

/* Pied de page */
.pied {
  background: var(--ardoise); color: var(--blanc);
  padding-block: 2.5rem; font-size: .9375rem;
}
.pied a { color: var(--blanc); display: inline-block; padding: .25rem 0; }
.pied .conteneur { display: grid; gap: 1.5rem; }
.pied .logo img { width: 120px; }
.pied .lang { font-size: .875rem; }
.pied p { margin: 0; }
.pied .mentions { color: #D7E2DD; font-size: .875rem; line-height: 1.7; }

/* Pages secondaires (mentions légales, confirmation) */
.page-simple { padding-block: clamp(2.5rem, 2rem + 3vw, 4.5rem); }
.page-simple h2 { margin-top: 2.5rem; font-size: 1.375rem; }
.page-simple h3 { margin-top: 1.5rem; }
.page-simple dl dt { font-weight: 500; }
.page-simple dl dd { margin: 0 0 .5rem; }

@media (max-width: 40rem) {
  /* En-tête sur deux lignes : il n'est plus collant, sinon il masque les ancres */
  .entete { position: static; }
  html { scroll-padding-top: 1rem; }
  .nav ul { gap: .25rem 1rem; }
  .nav a { font-size: .875rem; }
  .etapes li { grid-template-columns: 2.25rem 1fr; }
  .cta-mobile {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--feuille); color: var(--blanc); text-align: center; text-decoration: none;
    font-weight: 500; font-size: .9375rem; padding: .875rem 1rem;
    padding-bottom: calc(.875rem + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255,255,255,.25);
  }
  .cta-mobile:hover { background: var(--ardoise); }
  /* Le formulaire est atteint : la barre n'a plus d'objet */
  body:has(#contact:target) .cta-mobile { display: none; }
  .pied { padding-bottom: 5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media print {
  .entete, .lien-evitement, .formulaire, .cta-mobile, .relance { display: none; }
  body { color: #000; }
  a { color: #000; }
}

/* Remplace les styles en ligne (interdits par la CSP) */
.espace-haut { margin-top: 1rem; }
.retour { margin-top: 2.5rem; }
