/* ==========================================================================
   NOVOPSY — feuille de style
   Charte issue du kit de marque Canva « 2026 — Novopsy »
   (logo de référence + template carrousel).
   ========================================================================== */

:root {
  /* --- couleurs de la charte ------------------------------------------- */
  --creme:            #f5ede4;   /* fond de marque */
  --creme-profond:    #ede2d5;   /* aplat secondaire */
  --vert:             #2e4034;   /* vert forêt — encre et aplats */
  --vert-clair:       #3d5545;   /* survol sur aplat vert */
  --terracotta:       #c97b5a;   /* accent — points, filets, chiffres */
  --terracotta-fonce: #9a5334;   /* accent lisible sur crème (texte) */
  --ocre:             #e0a458;   /* accent sur fond vert */
  --gris-chaud:       #5e5851;   /* texte courant secondaire */
  --blanc:            #fffcf8;   /* cartes */

  /* --- dérivés ---------------------------------------------------------- */
  --trait:        rgba(46, 64, 52, 0.14);
  --trait-fort:   rgba(46, 64, 52, 0.28);
  --ombre:        0 1px 2px rgba(46, 64, 52, .05), 0 8px 28px -12px rgba(46, 64, 52, .18);

  --rayon:        14px;
  --rayon-petit:  8px;
  --largeur:      68rem;
  --largeur-texte: 40rem;

  --sans: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  color: var(--vert);
  background: var(--creme);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

/* --- typographie --------------------------------------------------------- */
h1, h2, h3, h4 { line-height: 1.18; font-weight: 700; letter-spacing: -0.015em; margin: 0 0 .6rem; }
h1 { font-size: clamp(2.1rem, 1.3rem + 3.2vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 1.15rem + 1.5vw, 2.1rem); margin-top: 0; }
h3 { font-size: 1.16rem; letter-spacing: -0.005em; }
p  { margin: 0 0 1rem; }
a  { color: var(--terracotta-fonce); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--vert); }
strong { font-weight: 700; }

.surtitre {
  display: block;
  font-size: .8rem; font-weight: 700;
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--terracotta-fonce);
  margin: 0 0 .9rem;
}
.surtitre.clair { color: var(--ocre); }

.chapeau  { font-size: 1.18rem; color: var(--gris-chaud); max-width: 36em; }
.doux     { color: var(--gris-chaud); }
.petit    { font-size: .92rem; }
.mesure   { max-width: var(--largeur-texte); }

:where(a, button, summary, input, textarea):focus-visible {
  outline: 3px solid var(--terracotta-fonce);
  outline-offset: 2px;
  border-radius: 3px;
}

/* --- structure ----------------------------------------------------------- */
.enveloppe { max-width: var(--largeur); margin: 0 auto; padding: 0 1.4rem; }
.section   { padding: clamp(3.2rem, 6vw, 5.5rem) 0; }
.section + .section { border-top: 1px solid var(--trait); }
.section.vert   { background: var(--vert); color: var(--creme); border-top: none; }
.section.vert h2, .section.vert h3 { color: var(--creme); }
.section.vert .doux, .section.vert p { color: rgba(245, 237, 228, .82); }
.section.vert a:not(.bouton) { color: var(--ocre); }
.section.sable  { background: var(--creme-profond); border-top: none; }

.lien-evitement {
  position: absolute; left: -9999px;
  background: var(--vert); color: var(--creme);
  padding: .7rem 1rem; border-radius: var(--rayon-petit); z-index: 100;
}
.lien-evitement:focus { left: 1rem; top: 1rem; position: fixed; }

/* --- en-tête ------------------------------------------------------------- */
.bandeau {
  position: sticky; top: 0; z-index: 40;
  background: rgba(245, 237, 228, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--trait);
}
.bandeau .enveloppe {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.2rem; min-height: 72px; flex-wrap: wrap;
}
.logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--vert); }
.logo img { width: 32px; height: 32px; }
.logo .nom { font-weight: 700; font-size: 1.05rem; letter-spacing: .09em; }
.logo .fil { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--terracotta-fonce); display: block; line-height: 1.1; margin-top: 1px; }

.navigation { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.navigation a {
  color: var(--vert); text-decoration: none;
  font-size: .95rem; font-weight: 500;
  padding: .25rem 0; border-bottom: 2px solid transparent;
}
.navigation a:hover { border-bottom-color: var(--terracotta); }
.navigation a[aria-current="page"] { border-bottom-color: var(--terracotta); font-weight: 700; }

/* Sur petit écran, la navigation tient sur une ligne qui défile,
   et l'en-tête cesse d'être collant pour ne pas manger la hauteur utile. */
@media (max-width: 46rem) {
  .bandeau { position: static; }
  .bandeau .enveloppe { min-height: 0; padding-top: .85rem; padding-bottom: 0; }
  .navigation {
    width: 100%; flex-wrap: nowrap; overflow-x: auto;
    gap: 1.2rem; padding-bottom: .5rem;
    scrollbar-width: none; -ms-overflow-style: none;
  }
  .navigation::-webkit-scrollbar { display: none; }
  .navigation a { white-space: nowrap; }
}

/* --- boutons ------------------------------------------------------------- */
.bouton {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--vert); color: var(--creme);
  font-weight: 600; font-size: .98rem;
  padding: .78rem 1.5rem; border-radius: 999px;
  text-decoration: none; border: 2px solid var(--vert);
  transition: background .18s ease, transform .18s ease;
}
.bouton:hover { background: var(--vert-clair); color: var(--creme); transform: translateY(-1px); }
.bouton.creux { background: transparent; color: var(--vert); }
.bouton.creux:hover { background: rgba(46, 64, 52, .07); color: var(--vert); }
.bouton.clair { background: var(--ocre); border-color: var(--ocre); color: var(--vert); }
.bouton.clair:hover { background: #eab873; border-color: #eab873; color: var(--vert); }
.actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.6rem; }

/* --- héros --------------------------------------------------------------- */
.heros { position: relative; overflow: hidden; padding: clamp(3.5rem, 7vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem); }
.heros .filigrane {
  position: absolute; right: -14%; top: 50%; transform: translateY(-50%);
  width: min(62vw, 620px); opacity: .07; pointer-events: none;
}
.heros .contenu { position: relative; max-width: 46rem; }
.heros h1 { margin-bottom: 1.1rem; }
.heros .chapeau { font-size: clamp(1.1rem, 1rem + .5vw, 1.32rem); }

/* --- grilles et cartes --------------------------------------------------- */
.grille { display: grid; gap: 1.2rem; }
.grille.deux  { grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.grille.trois { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }

.carte {
  background: var(--blanc);
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  padding: 1.6rem 1.5rem;
  box-shadow: var(--ombre);
}
.carte h3 { margin-bottom: .45rem; }
.carte p:last-child { margin-bottom: 0; }
.carte .pastille {
  display: block; width: 10px; height: 10px; border-radius: 50%;
  background: var(--terracotta); margin-bottom: 1rem;
}
.section.vert .carte {
  background: rgba(245, 237, 228, .06);
  border-color: rgba(245, 237, 228, .18);
  box-shadow: none;
}

/* --- liste d'étapes numérotées ------------------------------------------- */
.etapes { list-style: none; margin: 2rem 0 0; padding: 0; counter-reset: etape; }
.etapes > li {
  counter-increment: etape;
  display: grid; grid-template-columns: 4.2rem 1fr; gap: 0 1.4rem;
  padding: 1.5rem 0; border-top: 1px solid var(--trait);
}
.etapes > li::before {
  content: "0" counter(etape);
  font-size: 2.1rem; font-weight: 700; color: var(--terracotta);
  line-height: 1; letter-spacing: -0.02em;
}
.etapes h3 { margin: .2rem 0 .35rem; }
.etapes p  { margin: 0; color: var(--gris-chaud); max-width: 34em; }
@media (max-width: 33rem) {
  .etapes > li { grid-template-columns: 1fr; gap: .5rem; }
}

/* --- listes à puces rondes ----------------------------------------------- */
.liste-points { list-style: none; padding: 0; margin: 1rem 0; }
.liste-points li { position: relative; padding-left: 1.6rem; margin-bottom: .6rem; }
.liste-points li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--terracotta);
}
.section.vert .liste-points li::before { background: var(--ocre); }

/* --- citation ------------------------------------------------------------ */
.citation {
  margin: 0; padding: 1.4rem 0 1.4rem 1.6rem;
  border-left: 3px solid var(--terracotta);
  font-size: 1.24rem; line-height: 1.5; font-weight: 600; max-width: 32em;
}
.citation footer { font-size: .9rem; font-weight: 400; color: var(--gris-chaud); margin-top: .7rem; }

/* --- encadrés ------------------------------------------------------------ */
.encadre {
  border-left: 3px solid var(--terracotta-fonce);
  background: rgba(201, 123, 90, .1);
  padding: 1rem 1.2rem; border-radius: 0 var(--rayon-petit) var(--rayon-petit) 0;
  margin: 1.6rem 0; font-size: .96rem;
}
.encadre strong { display: block; margin-bottom: .2rem; }
.encadre p:last-child { margin-bottom: 0; }

/* --- tableau d'informations --------------------------------------------- */
.tableau { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: .98rem; }
.tableau th, .tableau td { text-align: left; padding: .85rem .4rem; border-bottom: 1px solid var(--trait); vertical-align: top; }
.tableau th { font-weight: 600; width: 45%; }
.tableau td { color: var(--gris-chaud); }

/* Liste sans puces dans une cellule de tableau (formations). */
.liste-nue { list-style: none; margin: 0; padding: 0; }
.liste-nue li + li { margin-top: .9rem; }
.liste-nue strong { color: var(--vert); }
.liste-nue .sous { display: block; font-size: .88rem; margin-top: .1rem; }

/* --- deux colonnes (texte + portrait) ------------------------------------ */
.duo { display: grid; gap: clamp(1.8rem, 4vw, 3.5rem); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 52rem) { .duo { grid-template-columns: 1.35fr 1fr; } }
.portrait {
  background: var(--creme-profond);
  border: 1px solid var(--trait);
  border-radius: var(--rayon);
  aspect-ratio: 4 / 5;
  display: grid; place-items: center; text-align: center;
  padding: 1.5rem; color: var(--gris-chaud); font-size: .9rem;
}

/* --- détails / questions fréquentes -------------------------------------- */
details {
  border-bottom: 1px solid var(--trait);
  padding: 1.05rem 0;
}
details summary {
  cursor: pointer; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: "+"; color: var(--terracotta-fonce); font-size: 1.5rem;
  line-height: 1; font-weight: 400; flex: none;
}
details[open] summary::after { content: "–"; }
details .reponse { padding-top: .7rem; color: var(--gris-chaud); max-width: 42em; }
details .reponse p:last-child { margin-bottom: 0; }

/* --- appel à l'action ---------------------------------------------------- */
.appel { text-align: center; }
.appel .actions { justify-content: center; }
.appel p { margin-left: auto; margin-right: auto; }

/* --- pied de page -------------------------------------------------------- */
.pied { background: var(--vert); color: rgba(245, 237, 228, .78); padding: 3.2rem 0 2rem; font-size: .93rem; }
.pied a { color: rgba(245, 237, 228, .9); text-decoration: none; }
.pied a:hover { color: var(--ocre); text-decoration: underline; }
.pied .colonnes { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.pied h4 { color: var(--creme); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .8rem; }
.pied ul { list-style: none; margin: 0; padding: 0; }
.pied li { margin-bottom: .45rem; }
.pied .logo { color: var(--creme); }
.pied .logo .fil { color: var(--ocre); }
.pied .bas {
  margin-top: 2.4rem; padding-top: 1.3rem;
  border-top: 1px solid rgba(245, 237, 228, .16);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: .86rem;
}

/* --- bandeau d'urgence --------------------------------------------------- */
.urgence {
  background: var(--creme-profond);
  border-top: 1px solid var(--trait);
  padding: 1.3rem 0; font-size: .93rem; color: var(--gris-chaud);
}
.urgence strong { color: var(--vert); }

