/* ============================================================
   Lerteco — L'agilité libérée
   Feuille de style unique — charte graphique officielle
   ============================================================ */

/* --- Montserrat auto-hébergée, police VARIABLE (licence SIL OFL) ---
   Un seul fichier par style couvre toutes les graisses (font-weight: 100 900).
   Sous-ensemble latin : couvre tout le français (Œ/œ, €) et la ponctuation
   typographique. 8 fichiers (364 Ko) → 2 fichiers (65 Ko). */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/montserrat.woff2') format('woff2');
}
@font-face {
  font-family: 'Montserrat';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/montserrat-italic.woff2') format('woff2');
}

/* --- Variables charte --- */
:root {
  color-scheme: light;
  --vert: #a5db75;
  --vert-fonce: #80c448;
  --jaune: #ffee52;
  --bleu: #9ce5ff;
  --bleu-clair: #eef8ff;
  --encre: #1d1d1b;
  --encre-adouci: #4a4a48;
  --gris-bord: #e6e6e6;
  --blanc: #ffffff;
  --fond-header: rgba(255, 255, 255, 0.88);
  --largeur-max: 68rem;
}

/* --- Suivi du réglage système quand le visiteur n'a rien choisi ---
   Parité avec prk : même logique à 4 blocs, le choix explicite (data-theme,
   déclaré après dans la feuille) prime toujours sur la préférence du
   navigateur — y compris sans JavaScript (le bootstrap ne s'exécute pas). */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --blanc: #262624;
    --encre: #e0e0da;
    --encre-adouci: #b9b9b6;
    --gris-bord: #4a4a47;
    --bleu-clair: #2d2d29;
    --fond-header: rgba(38, 38, 36, 0.88);
  }
}

/* --- Thème sombre ---
   Les couleurs de marque (vert/jaune/bleu) ne changent pas ;
   seules les surfaces, encres et bordures s'inversent. */
[data-theme="sombre"] {
  color-scheme: dark;
  --blanc: #262624;        /* fond principal */
  --encre: #e0e0da;        /* texte : blanc légèrement grisé, moins agressif */
  --encre-adouci: #b9b9b6; /* texte secondaire */
  --gris-bord: #4a4a47;    /* bordures */
  --bleu-clair: #2d2d29;   /* fond des sections alternées : anthracite neutre */
  --fond-header: rgba(38, 38, 36, 0.88); /* header translucide */
}

/* --- Thème clair explicite : réaffirmé pour primer sur le média query
   `prefers-color-scheme: dark` quand le visiteur a choisi « clair » --- */
[data-theme="clair"] {
  color-scheme: light;
  --blanc: #ffffff;
  --encre: #1d1d1b;
  --encre-adouci: #4a4a48;
  --gris-bord: #e6e6e6;
  --bleu-clair: #eef8ff;
  --fond-header: rgba(255, 255, 255, 0.88);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Montserrat', 'Helvetica', 'Arial', sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--encre);
  background: var(--blanc);
  transition: background-color 0.25s ease, color 0.25s ease;
}

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

h1, h2, h3 {
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 1rem;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1rem; }

a {
  color: var(--encre);
  text-decoration-color: var(--vert-fonce);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover { text-decoration-color: var(--jaune); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--encre);
  outline-offset: 2px;
}

/* Surlignage signature de la charte : rectangle vert derrière le texte */
.hl {
  box-shadow: inset 0 -0.34em 0 var(--vert);
}

/* --- Utilitaires --- */
.container {
  max-width: var(--largeur-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section { padding: 4.5rem 0; }
.section--alt { background: var(--bleu-clair); }
.section--vert { background: var(--vert); }
.section__titre { margin-bottom: 2.5rem; }
.chapo {
  font-size: 1.15rem;
  color: var(--encre-adouci);
  max-width: 46rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--encre);
  color: var(--blanc);
  padding: 0.75rem 1.25rem;
  z-index: 100;
}
.skip-link:focus { left: 0; color: var(--blanc); }

/* Les cibles d'ancre (#coaching, #contenu…) ne passent pas sous l'en-tête collant */
[id] { scroll-margin-top: 6rem; }

/* --- Boutons --- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.9rem;
  background: var(--vert);
  color: #1d1d1b; /* texte foncé sur fond vert dans les deux thèmes */
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--vert);
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover {
  background: var(--vert-fonce);
  border-color: var(--vert-fonce);
  transform: translateY(-2px);
  box-shadow: 6px 6px 0 var(--jaune);
}
/* Bouton secondaire plein, jaune charte — identique dans les deux thèmes,
   sans bordure visible (même couleur que le fond, comme le primaire vert) */
.btn--jaune {
  background: var(--jaune);
  border-color: var(--jaune);
  color: #1d1d1b;
}
.btn--jaune:hover {
  background: var(--jaune); /* reste jaune : décalage + ombre seulement */
  border-color: var(--jaune);
  color: #1d1d1b;
  box-shadow: 6px 6px 0 var(--bleu); /* cycle charte : jaune → ombre bleue */
}
/* --- Basculeur de thème --- */
.theme-toggle {
  background: none;
  border: 2px solid var(--gris-bord);
  padding: 0.45rem;
  cursor: pointer;
  color: var(--encre);
  line-height: 0;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.theme-toggle:hover {
  border-color: var(--vert-fonce);
  transform: rotate(15deg);
}
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle__lune { display: inline; }
.theme-toggle__soleil { display: none; }
[data-theme="sombre"] .theme-toggle__lune { display: none; }
[data-theme="sombre"] .theme-toggle__soleil { display: inline; }

/* --- En-tête --- */
/* Collant : suit le défilement ; dès qu'on quitte le haut de page, fond
   translucide flouté + ombre douce (patron inspiré du site prk). */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--blanc);
  border-bottom: 1px solid var(--gris-bord);
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.site-header.scrolled {
  background: var(--fond-header);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.09);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.site-logo img { height: 58px; width: auto; }
/* Le menu pousse le basculeur de thème complètement à droite */
.site-nav { margin-left: auto; }

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  align-items: center;
}
.site-nav a {
  text-decoration: none;
  font-weight: 600;
  padding: 0.4rem 0;
  box-shadow: inset 0 -3px 0 transparent;
  transition: box-shadow 0.15s ease;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  box-shadow: inset 0 -3px 0 var(--vert);
}
.site-nav .nav-cta {
  padding: 0.55rem 1.3rem;
  box-shadow: none;
}
/* Le bouton Contact garde le comportement des .btn au survol,
   pas le soulignement vert des liens de navigation */
.site-nav a.nav-cta:hover {
  box-shadow: 6px 6px 0 var(--jaune);
}
.site-nav a.nav-cta[aria-current="page"] {
  box-shadow: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.6rem;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--encre);
  position: relative;
  transition: transform 0.2s ease;
  content: "";
}
.nav-toggle span::before { position: absolute; top: -8px; }
.nav-toggle span::after { position: absolute; top: 8px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 52rem) {
  .nav-toggle { display: block; margin-left: auto; }
  .site-nav { margin-left: 0; }
  .site-nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--blanc);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem 1.25rem 1.25rem;
    border-bottom: 1px solid var(--gris-bord);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  }
  .site-nav ul.nav--open { display: flex; }
  .site-nav li { width: 100%; }
  .site-nav a { display: block; padding: 0.8rem 0; }
  .site-nav .nav-cta { margin-top: 0.5rem; text-align: center; }
}

/* --- Hero --- */
.hero {
  padding: 4.5rem 0 5rem;
  background:
    linear-gradient(var(--blanc), var(--blanc)) padding-box;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}
.hero__visuel img {
  width: 100%;
  max-width: 340px;
  justify-self: end;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}
.hero .chapo { margin-bottom: 0; }

@media (max-width: 52rem) {
  .hero .container { grid-template-columns: 1fr; }
  .hero__visuel img { justify-self: start; max-width: 220px; }
  .hero__visuel { order: -1; }
}

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

/* --- Cartes --- */
.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}
.card {
  flex: 1 1 16.5rem;
  max-width: 21.5rem;
  border: 1px solid var(--gris-bord);
  border-top: 6px solid var(--vert);
  padding: 1.75rem;
  background: var(--blanc);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:nth-child(3n + 2) { border-top-color: var(--jaune); }
.card:nth-child(3n) { border-top-color: var(--bleu); }
.card h3 { margin-bottom: 0.6rem; }
.card p { color: var(--encre-adouci); margin-bottom: 0; }

/* Survol commun à toutes les cartes (liens ou simples articles) :
   soulèvement + ombre pleine décalée */
.card:hover {
  transform: translateY(-4px);
  box-shadow: 8px 8px 0 var(--jaune);
}
/* L'ombre au survol suit la rotation des couleurs, décalée d'un cran :
   jamais la même couleur que le liseré supérieur de la carte */
.card:nth-child(3n + 2):hover { box-shadow: 8px 8px 0 var(--bleu); }
.card:nth-child(3n):hover { box-shadow: 8px 8px 0 var(--vert); }

/* Cartes cliquables (accueil) : lien bloc sans soulignement */
a.card {
  display: block;
  color: inherit;
  text-decoration: none;
}
a.card:hover h3 { text-decoration: underline; text-decoration-color: var(--vert); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* --- Blocs services détaillés --- */
.service-detail {
  display: grid;
  grid-template-columns: 0.35fr 1fr;
  gap: 2rem;
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--gris-bord);
}
.service-detail:last-of-type { border-bottom: 0; }
.service-detail__num {
  font-size: 2.5rem;
  font-weight: 700;
  box-shadow: inset 0 -0.34em 0 var(--jaune);
  justify-self: start;
  align-self: start;
  padding: 0 0.2rem;
}
.service-detail ul { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.service-detail li { margin-bottom: 0.4rem; }

@media (max-width: 52rem) {
  .service-detail { grid-template-columns: 1fr; gap: 0.75rem; }
}

/* --- Bandeau CTA --- */
.bandeau {
  background: var(--vert);
  color: #1d1d1b; /* lisible sur le vert dans les deux thèmes */
  padding: 3.5rem 0;
  text-align: center;
}
.bandeau h2 { margin-bottom: 0.75rem; }
.bandeau p { max-width: 40rem; margin: 0 auto 1.75rem; }
.bandeau .btn {
  background: var(--jaune); /* jaune charte : lisible sur le vert dans les deux thèmes */
  border-color: var(--jaune);
  color: #1d1d1b;
}
.bandeau .btn:hover { box-shadow: 6px 6px 0 var(--bleu); }

/* --- Page propos --- */
.propos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 52rem) { .propos-grid { grid-template-columns: 1fr; } }
.encart {
  background: var(--bleu-clair);
  border-left: 6px solid var(--vert);
  padding: 1.75rem;
}
.encart p:last-child { margin-bottom: 0; }

/* --- Formulaire de contact --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 52rem) { .contact-grid { grid-template-columns: 1fr; } }

.formulaire .champ { margin-bottom: 1.4rem; }
.formulaire label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.formulaire input[type="text"],
.formulaire input[type="email"],
.formulaire textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--gris-bord);
  font: inherit;
  color: inherit;
  background: var(--blanc);
}
.formulaire input:focus,
.formulaire textarea:focus {
  border-color: var(--vert-fonce);
}
.formulaire textarea { min-height: 9rem; resize: vertical; }
.formulaire .consentement {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--encre-adouci);
}
.formulaire .consentement input { margin-top: 0.25rem; }
.formulaire .requis { color: #b3541e; }

/* Champ piège anti-robots (honeypot) : invisible pour les humains */
.champ--hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.alerte {
  border-left: 6px solid var(--vert);
  background: var(--bleu-clair);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}
.alerte--erreur { border-left-color: var(--jaune); }

/* --- Mentions légales / confidentialité --- */
.page-legal h2 { font-size: 1.3rem; margin-top: 2.5rem; }
.page-legal address { font-style: normal; }
.a-completer {
  background: var(--jaune);
  color: #1d1d1b;
  padding: 0 0.3em;
  font-weight: 600;
}

/* --- Pied de page (toujours sombre, quel que soit le thème) --- */
.site-footer {
  background: #1d1d1b;
  color: #f4f4f2;
  padding: 3.5rem 0 0;
  margin-top: 0;
}
.site-footer a { color: #ffffff; text-decoration-color: rgba(255, 255, 255, 0.45); }
.site-footer a:hover { text-decoration-color: var(--vert); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}
@media (max-width: 52rem) { .footer-grid { grid-template-columns: 1fr; } }
.footer-logo img { height: 64px; width: auto; margin-bottom: 1rem; }
.site-footer h2 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  box-shadow: inset 0 -0.34em 0 rgba(165, 219, 117, 0.55);
  display: inline-block;
  margin-bottom: 1rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.5rem; }
.footer-baseline { color: #cfcfcd; font-style: italic; }
.footer-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding: 1.25rem 0;
  font-size: 0.875rem;
  color: #b9b9b7;
}
.footer-bar .container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  justify-content: space-between;
}
.footer-bar ul { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-bar li { margin: 0; }

/* --- 404 --- */
.page-404 { text-align: center; padding: 6rem 0; }
.page-404 .code {
  font-size: 6rem;
  font-weight: 700;
  margin: 0;
  box-shadow: inset 0 -0.34em 0 var(--jaune);
  display: inline-block;
  padding: 0 1rem;
}
