/* ==========================================================================
   Équation Entrepreneuriale — feuille de style principale
   equation-entrepreneuriale.fr
   --------------------------------------------------------------------------
   Sommaire
   1.  Polices (auto-hébergées, pas d'appel à Google : conforme RGPD)
   2.  Variables (couleurs, typo, espacements)
   3.  Base / remise à zéro
   4.  Typographie
   5.  Liens et boutons
   6.  Mise en page (conteneurs, sections, grilles)
   7.  En-tête et navigation
   8.  Bandeau d'accueil et motif « équation »
   9.  Composants : offres, profil, citation, encadré
   10. Formulaire de contact
   11. Pied de page
   12. Utilitaires
   13. Accessibilité, mouvement réduit, impression
   ========================================================================== */


/* 1. POLICES
   Atkinson Hyperlegible Next : sans serif conçue par le Braille Institute
   pour distinguer clairement les lettres (l / I / 1, O / 0…) — lisible par
   le plus grand nombre, y compris en cas de basse vision.
   Déposer les fichiers .woff2 dans /fonts/. Tant qu'ils sont absents,
   le site bascule proprement sur la police système.
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/AtkinsonHyperlegibleNext-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/AtkinsonHyperlegibleNext-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/AtkinsonHyperlegibleNext-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/AtkinsonHyperlegibleNext-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}


/* 2. VARIABLES
   Contrastes mesurés sur fond blanc (WCAG 2.2 : 4,5:1 minimum pour le texte).
   -------------------------------------------------------------------------- */
:root {
  /* Gris anthracite — remplace le noir pour le texte */
  --anthracite:        #2D3136;  /* 13,0:1  texte courant            */
  --anthracite-doux:   #555C64;  /*  6,6:1  texte secondaire         */
  --gris-trait:        #D5D9DD;  /* filets, bordures (décoratif)     */
  --gris-fond:         #F3F5F6;  /* fonds de section alternés        */

  /* Bleu marine — titres, navigation, fonds sombres */
  --marine:            #1E3A5F;  /* 11,3:1                           */
  --marine-clair:      #E8EEF5;  /* fond teinté                      */

  /* Vert — issu du logo, sans dériver vers kaki ou sapin */
  --vert-logo:         #66BB6A;  /* couleur exacte du logo : aplats,
                                    filets, motifs. PAS pour du texte
                                    sur blanc (2,4:1)                 */
  --vert-texte:        #2A7C3A;  /*  5,1:1  liens, texte vert        */
  --vert-profond:      #22692F;  /*  6,6:1  survol, boutons          */
  --vert-pale:         #EAF5EB;  /* fond teinté                      */

  --blanc:             #FFFFFF;
  --fond:              #FCFDFC;

  /* Rôles */
  --texte:             var(--anthracite);
  --texte-secondaire:  var(--anthracite-doux);
  --titres:            var(--marine);
  --lien:              var(--vert-texte);
  --lien-survol:       var(--marine);
  --focus:             #1E3A5F;

  /* Typographie */
  --police: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible",
            system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
            Arial, sans-serif;

  /* Échelle modulaire 1,25 — fluide entre mobile et bureau */
  --t-xs:  0.875rem;
  --t-s:   1rem;
  --t-m:   clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);   /* texte courant */
  --t-l:   clamp(1.25rem, 1.15rem + 0.4vw, 1.5rem);
  --t-xl:  clamp(1.5rem, 1.3rem + 0.9vw, 2rem);
  --t-2xl: clamp(1.875rem, 1.5rem + 1.6vw, 2.75rem);
  --t-3xl: clamp(2.25rem, 1.7rem + 2.6vw, 3.75rem);

  /* Espacements */
  --e-1: 0.25rem;
  --e-2: 0.5rem;
  --e-3: 1rem;
  --e-4: 1.5rem;
  --e-5: 2.5rem;
  --e-6: 4rem;
  --e-7: 6rem;

  /* Mise en page */
  --largeur-max: 72rem;
  --largeur-texte: 38rem;     /* ~70 caractères par ligne */
  --rayon: 3px;               /* angles presque droits, comme le logo */
  --barre: 0.375rem;          /* épaisseur des barres du motif */
}


/* 3. BASE
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--police);
  font-size: var(--t-m);
  line-height: 1.6;
  color: var(--texte);
  background: var(--fond);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}

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

hr {
  border: 0;
  height: 1px;
  background: var(--gris-trait);
  margin: var(--e-5) 0;
}


/* 4. TYPOGRAPHIE
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  color: var(--titres);
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 var(--e-3);
  text-wrap: balance;
}

h1 { font-size: var(--t-3xl); letter-spacing: -0.015em; }
h2 { font-size: var(--t-2xl); letter-spacing: -0.01em; margin-bottom: var(--e-4); }
h3 { font-size: var(--t-l); font-weight: 600; }
h4 { font-size: var(--t-m); font-weight: 600; }

/* Titre de section : barre verte à gauche, reprise des « bras » du logo */
.titre-section {
  position: relative;
  padding-top: calc(var(--e-3) + var(--barre));
}
.titre-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 2.75rem;
  height: var(--barre);
  background: var(--vert-logo);
}

p, ul, ol, dl, blockquote { margin: 0 0 var(--e-3); }
p, li { max-width: var(--largeur-texte); text-wrap: pretty; }

.chapo {
  font-size: var(--t-l);
  line-height: 1.5;
  color: var(--texte-secondaire);
  max-width: 34rem;
}

strong, b { font-weight: 700; color: var(--anthracite); }
small, .petit { font-size: var(--t-xs); }

ul { padding-left: 1.25rem; }
ul li::marker { color: var(--vert-texte); }
li + li { margin-top: var(--e-2); }


/* 5. LIENS ET BOUTONS
   -------------------------------------------------------------------------- */
a {
  color: var(--lien);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.15s, text-decoration-thickness 0.15s;
}
a:hover {
  color: var(--lien-survol);
  text-decoration-thickness: 2px;
}

.bouton {
  display: inline-flex;
  align-items: center;
  gap: var(--e-2);
  min-height: 2.875rem;          /* cible tactile confortable */
  padding: 0.7rem 1.4rem;
  font: inherit;
  font-size: var(--t-s);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  color: var(--blanc);
  background: var(--vert-profond);
  border: 2px solid var(--vert-profond);
  border-radius: var(--rayon);
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.bouton:hover {
  color: var(--blanc);
  background: var(--marine);
  border-color: var(--marine);
  text-decoration: none;
}

.bouton--contour {
  color: var(--marine);
  background: transparent;
  border-color: var(--marine);
}
.bouton--contour:hover { color: var(--blanc); background: var(--marine); }

/* Sur fond marine */
.fond-marine .bouton {
  color: var(--anthracite);
  background: var(--vert-logo);
  border-color: var(--vert-logo);
}
.fond-marine .bouton:hover {
  color: var(--marine);
  background: var(--blanc);
  border-color: var(--blanc);
}


/* 6. MISE EN PAGE
   -------------------------------------------------------------------------- */
.conteneur {
  width: 100%;
  max-width: var(--largeur-max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.section { padding-block: clamp(3rem, 7vw, 6rem); }
.section--grise  { background: var(--gris-fond); }
.section--verte  { background: var(--vert-pale); }

.fond-marine {
  background: var(--marine);
  color: #E6ECF3;                 /* 10,1:1 sur marine */
}
.fond-marine h1, .fond-marine h2, .fond-marine h3 { color: var(--blanc); }
.fond-marine a { color: #A8DBAA; }  /* vert clair : 7,4:1 sur marine */
.fond-marine a:hover { color: var(--blanc); }

/* Grille : deux colonnes décalées (texte étroit + contenu) */
.grille-2 {
  display: grid;
  gap: var(--e-5);
}
@media (min-width: 52rem) {
  .grille-2 { grid-template-columns: 5fr 7fr; gap: var(--e-6); align-items: start; }
  .grille-2--inverse { grid-template-columns: 7fr 5fr; }
}

.grille-3 {
  display: grid;
  gap: var(--e-5) var(--e-4);
}
@media (min-width: 48rem) {
  .grille-3 { grid-template-columns: repeat(3, 1fr); }
}


/* 7. EN-TÊTE ET NAVIGATION
   -------------------------------------------------------------------------- */
.entete {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(252, 253, 252, 0.96);
  border-bottom: 1px solid var(--gris-trait);
}
@supports (backdrop-filter: blur(6px)) {
  .entete { background: rgba(252, 253, 252, 0.88); backdrop-filter: blur(6px); }
}

.entete__interieur {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--e-3) var(--e-4);
  padding-block: var(--e-3);
}

.marque {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--marine);
  text-decoration: none;
  font-weight: 700;
  font-size: var(--t-m);
  line-height: 1.15;
}
.marque:hover { color: var(--marine); }
.marque img { width: auto; height: 2.75rem; }

.nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--e-1) var(--e-4);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav li + li { margin-top: 0; }
.nav a {
  display: inline-block;
  padding-block: var(--e-2);
  color: var(--anthracite);
  font-size: var(--t-s);
  font-weight: 600;
  text-decoration: none;
  border-bottom: var(--barre) solid transparent;
}
.nav a:hover { color: var(--marine); border-bottom-color: var(--gris-trait); }
.nav a[aria-current="page"] { color: var(--marine); border-bottom-color: var(--vert-logo); }

@media (max-width: 40rem) {
  .entete { position: static; }
  .nav { width: 100%; }
  .nav ul { gap: 0 0.9rem; }
  .nav a { font-size: 0.9375rem; }
}


/* 8. BANDEAU D'ACCUEIL ET MOTIF « ÉQUATION »
   L'élément signature du site : les trois dimensions posées comme une
   équation, alignées sur des barres vertes qui reprennent le logo.
   -------------------------------------------------------------------------- */
.accueil {
  padding-block: clamp(3.5rem, 9vw, 7.5rem) clamp(3rem, 7vw, 5.5rem);
}
.accueil h1 { max-width: 20ch; margin-bottom: var(--e-4); }

.equation {
  list-style: none;
  margin: var(--e-5) 0 0;
  padding: 0;
  display: grid;
  gap: var(--e-2);
  max-width: 34rem;
  font-size: var(--t-l);
  font-weight: 600;
  color: var(--marine);
}
.equation li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  align-items: center;
  max-width: none;
  margin: 0;
}
/* opérateur (+, +, =) */
.equation__op {
  color: var(--vert-texte);
  font-weight: 700;
  text-align: center;
}
/* chaque terme posé sur une barre, longueurs décalées comme dans le logo */
.equation__terme {
  padding: 0.35rem 0 0.35rem 1rem;
  border-left: var(--barre) solid var(--vert-logo);
}
.equation li:nth-child(2) .equation__terme { margin-left: 1.25rem; }
.equation li:nth-child(3) .equation__terme { margin-left: 0.5rem; }
.equation__resultat {
  margin-top: var(--e-2);
  padding: 0.6rem 1rem;
  background: var(--vert-pale);
  border-left: var(--barre) solid var(--vert-texte);
  color: var(--anthracite);
}

.accueil__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--e-3);
  margin-top: var(--e-5);
}


/* 9. COMPOSANTS
   -------------------------------------------------------------------------- */

/* Offre / expertise : un filet vert au-dessus, pas de carte ombrée */
.offre {
  padding-top: var(--e-4);
  border-top: var(--barre) solid var(--vert-logo);
}
.offre h3 { margin-bottom: var(--e-2); }
.offre p { color: var(--texte-secondaire); }
.offre ul { font-size: var(--t-s); }

/* Profil (page « À propos ») */
.profil {
  display: grid;
  gap: var(--e-4);
  align-items: start;
}
@media (min-width: 44rem) {
  .profil { grid-template-columns: 13rem 1fr; gap: var(--e-5); }
}
.profil__photo {
  width: 100%;
  max-width: 13rem;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--rayon);
  background: var(--marine-clair);
  box-shadow: calc(var(--barre) * 2) calc(var(--barre) * 2) 0 var(--vert-logo);
}
.profil__role {
  font-size: var(--t-l);
  font-weight: 600;
  color: var(--vert-texte);
  margin-bottom: var(--e-4);
}

/* Liste de repères (expérience, formation…) */
.reperes {
  display: grid;
  gap: var(--e-3);
  margin: var(--e-4) 0 0;
}
@media (min-width: 40rem) {
  .reperes { grid-template-columns: 11rem 1fr; gap: var(--e-3) var(--e-4); }
}
.reperes dt { font-weight: 700; color: var(--marine); }
.reperes dd { margin: 0; max-width: var(--largeur-texte); }

/* Citation */
.citation {
  margin: 0;
  padding: var(--e-2) 0 var(--e-2) var(--e-4);
  border-left: var(--barre) solid var(--vert-logo);
  font-size: var(--t-xl);
  line-height: 1.35;
  font-weight: 600;
  color: var(--marine);
}
.citation p { max-width: 30ch; }
.citation cite {
  display: block;
  margin-top: var(--e-3);
  font-size: var(--t-s);
  font-style: normal;
  font-weight: 400;
  color: var(--texte-secondaire);
}

/* Encadré d'information */
.encadre {
  padding: var(--e-4);
  background: var(--marine-clair);
  border-radius: var(--rayon);
}
.encadre > :last-child { margin-bottom: 0; }


/* 10. FORMULAIRE DE CONTACT
   -------------------------------------------------------------------------- */
.champ { margin-bottom: var(--e-4); max-width: var(--largeur-texte); }

.champ label {
  display: block;
  margin-bottom: var(--e-2);
  font-size: var(--t-s);
  font-weight: 600;
  color: var(--anthracite);
}
.champ .aide {
  display: block;
  margin-top: var(--e-1);
  font-size: var(--t-xs);
  color: var(--texte-secondaire);
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font: inherit;
  font-size: var(--t-s);
  color: var(--anthracite);
  background: var(--blanc);
  border: 2px solid #8A9199;     /* 3,3:1 — contraste requis pour un champ */
  border-radius: var(--rayon);
}
textarea { min-height: 9rem; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--anthracite-doux); }
input:focus, select:focus, textarea:focus { border-color: var(--marine); }

.champ--erreur input,
.champ--erreur textarea { border-color: #B3261E; }
.message-erreur { color: #B3261E; font-size: var(--t-xs); font-weight: 600; margin-top: var(--e-1); }


/* 11. PIED DE PAGE
   -------------------------------------------------------------------------- */
.pied {
  padding-block: var(--e-6) var(--e-5);
  font-size: var(--t-s);
}
.pied__grille {
  display: grid;
  gap: var(--e-5);
}
@media (min-width: 48rem) {
  .pied__grille { grid-template-columns: 2fr 1fr 1fr; }
}
.pied img { height: 3.5rem; width: auto; margin-bottom: var(--e-3); }
.pied h2 { font-size: var(--t-m); margin-bottom: var(--e-3); }
.pied ul { list-style: none; padding: 0; }
.pied li + li { margin-top: var(--e-1); }
.pied__mentions {
  margin-top: var(--e-5);
  padding-top: var(--e-4);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: var(--t-xs);
  color: #C9D3DE;                 /* 7,8:1 sur marine */
  max-width: none;
}


/* 12. UTILITAIRES
   -------------------------------------------------------------------------- */
.texte-centre   { text-align: center; }
.texte-vert     { color: var(--vert-texte); }
.texte-marine   { color: var(--marine); }
.texte-second   { color: var(--texte-secondaire); }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-5 { margin-top: var(--e-5); }

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


/* 13. ACCESSIBILITÉ, MOUVEMENT RÉDUIT, IMPRESSION
   -------------------------------------------------------------------------- */

/* Lien d'évitement : visible au clavier uniquement */
.lien-evitement {
  position: absolute;
  top: -100px;
  left: var(--e-3);
  z-index: 100;
  padding: var(--e-2) var(--e-3);
  background: var(--marine);
  color: var(--blanc);
  font-weight: 600;
  border-radius: 0 0 var(--rayon) var(--rayon);
}
.lien-evitement:focus { top: 0; color: var(--blanc); }

/* Focus clavier bien visible, double anneau lisible sur tous les fonds */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--vert-pale);
}
.fond-marine :focus-visible {
  outline-color: var(--vert-logo);
  box-shadow: none;
}

::selection { background: #CDE8CE; color: var(--anthracite); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Contraste renforcé demandé par le système */
@media (prefers-contrast: more) {
  :root {
    --texte-secondaire: var(--anthracite);
    --vert-texte: var(--vert-profond);
    --gris-trait: #8A9199;
  }
}

@media print {
  .entete, .nav, .lien-evitement, .accueil__actions, form { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .fond-marine { background: none; color: #000; }
  .fond-marine h2, .fond-marine a { color: #000; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
  .section { padding-block: 1rem; }
}
