/* =========================================================================
   STG CONSEILS — feuille de style principale
   Organisation : 1 variables · 2 base · 3 utilitaires · 4 en-tête
   5 composants · 6 sections · 7 pied de page · 8 responsive · 9 impression
   Aucune dépendance externe. Modifier les variables de la section 1 suffit
   à faire évoluer la charte.
   ========================================================================= */

/* ---------- 1. Variables ---------- */
/* Charte issue de la maquette V10 « Charte » du 18/09/2026.
   Dominante marine, accent bleu, teal conservé comme couleur de marque.
   Tous les couples texte/fond de cette palette ont été vérifiés au niveau
   WCAG AA (voir recette, lot L5). */
:root {
  /* Couleurs de marque */
  --c-marine:         #1e2761;   /* dominante V10 */
  --c-marine-deep:    #173d68;
  --c-primary:        #1c7293;   /* accent bleu V10 */
  /* Teal de marque, reserve a la signature typographique « STG ». Contraste
     3,46:1 sur blanc : conforme AA uniquement en GRAND TEXTE au sens WCAG
     (>= 24px, ou >= 18,66px en graisse >= 700). Ne jamais l'utiliser pour du
     texte courant ni reduire la signature sous 20px en graisse 800. */
  --c-teal-marque:    #0097b2;
  --c-primary-dark:   #1e2761;   /* fonds de boutons et liens : 13,9:1 sur blanc */
  --c-primary-deep:   #173d68;
  --c-teal:           #0097b2;   /* couleur historique, conservée en accent */
  --c-light-blue:     #5ba3c2;
  --c-ink:            #1e2761;
  --c-ink-soft:       #1f2937;
  /* Gris secondaire assombri d'un cran : le #64748b de la maquette tombe à
     4,09:1 sur le fond teinté #e8eef9, sous le seuil AA de 4,5:1. Même famille
     chromatique, conformité AA sur tous les fonds du site (6,5:1 au pire). */
  --c-muted:          #475569;
  --c-line:           #e2e8f0;
  --c-bg:             #ffffff;
  --c-bg-soft:        #f8fafc;
  --c-bg-alt:         #f1f5f9;
  --c-bg-tint:        #e8eef9;
  --c-focus:          #b4531a;

  /* Typographie — Calibri est la police de la maquette ; Carlito en est
     l'équivalent métrique libre ; la pile système prend le relais ailleurs. */
  --font-base: Calibri, Carlito, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-xs:   0.8125rem;
  --fs-sm:   0.9375rem;
  --fs-base: 1.0625rem;
  --fs-md:   1.1875rem;
  --fs-lg:   1.5rem;
  --fs-xl:   2rem;
  --fs-2xl:  2.5rem;
  --fs-3xl:  3rem;
  --lh-tight: 1.2;
  --lh-base:  1.65;

  /* Espacements */
  --sp-1: 0.25rem;  --sp-2: 0.5rem;   --sp-3: 0.75rem;  --sp-4: 1rem;
  --sp-5: 1.5rem;   --sp-6: 2rem;     --sp-7: 3rem;     --sp-8: 4rem;
  --sp-9: 5.5rem;

  /* Formes */
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(30, 39, 97, .06), 0 2px 8px rgba(30, 39, 97, .05);
  --shadow:    0 4px 12px rgba(30, 39, 97, .07), 0 12px 32px rgba(30, 39, 97, .07);

  --wrap: 1140px;
  --wrap-narrow: 760px;
  --header-h: 76px;
}

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

html { -webkit-text-size-adjust: 100%; 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(--font-base);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--c-ink-soft);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--c-ink); line-height: var(--lh-tight); margin: 0 0 var(--sp-4); font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-md); }
h4 { font-size: var(--fs-base); }
p  { margin: 0 0 var(--sp-4); }
ul, ol { margin: 0 0 var(--sp-4); padding-left: 1.25em; }
li { margin-bottom: var(--sp-2); }
img, svg { max-width: 100%; height: auto; }
strong { color: var(--c-ink); }

a { color: var(--c-primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--c-primary-deep); }

:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ---------- 3. Utilitaires ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--sp-5); }
.wrap--narrow { max-width: var(--wrap-narrow); }
/* Colonne de texte alignée sur la grille principale : une colonne étroite
   centrée au milieu d'une page dont tout le reste est aligné à gauche
   produit un décalage visible. */
.wrap--text > * { max-width: 68ch; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--sp-4); top: -100px; z-index: 200;
  background: var(--c-marine); color: #fff; padding: var(--sp-3) var(--sp-5);
  border-radius: var(--radius-sm); text-decoration: none; font-weight: 600;
  transition: top .15s ease;
}
.skip-link:focus { top: var(--sp-3); color: #fff; }

.eyebrow {
  display: inline-block; font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase; color: var(--c-primary);
  margin: 0 0 var(--sp-3); line-height: 1.35;
}
.lede { font-size: var(--fs-md); color: var(--c-muted); max-width: 62ch; }

/* ---------- 4. En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--c-line);
}
.site-header__inner {
  display: flex; align-items: center; gap: var(--sp-5);
  min-height: var(--header-h);
}
.brand {
  display: inline-flex; align-items: center; gap: var(--sp-3);
  font-weight: 700; font-size: 1.0625rem; letter-spacing: .06em;
  color: var(--c-ink); text-decoration: none; white-space: nowrap;
}
/* Signature typographique. Décision du Chef de projet du 10/10/2026 : le logo
   matriciel est retiré de l'interface au profit du nom de marque en texte.
   « STG » en teal de marque, « CONSEILS » en marine sur fond clair. */
.brand__nom {
  display: inline-flex; align-items: baseline; gap: .42em;
  font-size: 1.5rem; font-weight: 800; line-height: 1.1;
  letter-spacing: .04em; text-transform: uppercase;
}
.brand__stg { color: var(--c-teal-marque); }
.brand__conseils { color: var(--c-marine); font-size: .62em; letter-spacing: .22em; font-weight: 700; }
.brand:hover { color: var(--c-primary-dark); }

.nav-toggle {
  display: none; align-items: center; gap: var(--sp-2);
  margin-left: auto; padding: var(--sp-2) var(--sp-3);
  font: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--c-ink);
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle__bars { position: relative; display: block; width: 18px; height: 2px; background: var(--c-ink); }
.nav-toggle__bars::before, .nav-toggle__bars::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--c-ink);
}
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after  { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after  { top: 0; transform: rotate(-45deg); }

.main-nav { margin-left: auto; }
.main-nav__list { display: flex; align-items: center; gap: var(--sp-5); list-style: none; margin: 0; padding: 0; }
.main-nav__list li { margin: 0; }
.main-nav__link {
  display: inline-block; padding: var(--sp-2) 0; font-size: var(--fs-sm); font-weight: 600; white-space: nowrap;
  color: var(--c-ink-soft); text-decoration: none; border-bottom: 2px solid transparent;
}
.main-nav__link:hover { color: var(--c-primary-dark); border-bottom-color: var(--c-line); }
.main-nav__link[aria-current="page"] { color: var(--c-primary); border-bottom-color: var(--c-primary); }
.header-cta { flex-shrink: 0; }

.main-nav__cta { display: none; }

/* ---------- 5. Composants ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: .8125rem 1.375rem; font-size: var(--fs-sm); font-weight: 600; line-height: 1.2;
  border-radius: var(--radius-pill); border: 1px solid transparent;
  text-decoration: none; cursor: pointer; transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
/* Fond en bleu foncé et non en bleu de marque : le bleu #0097b2 avec du texte
   blanc plafonne à 3,46:1, sous le seuil WCAG AA de 4,5:1 pour du texte normal.
   Le bleu de marque reste utilisé pour les filets, fonds clairs et accents. */
.btn--primary { background: var(--c-primary-dark); color: #fff; }
.btn--primary:hover { background: var(--c-primary-deep); color: #fff; }
.btn--ghost { background: #fff; color: var(--c-primary-dark); border-color: var(--c-line); }
.btn--ghost:hover { border-color: var(--c-primary); color: var(--c-primary-deep); }
.btn--link { padding: 0; border-radius: 0; background: none; color: var(--c-primary); font-weight: 600; }
.btn--link:hover { text-decoration: underline; }

.card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-lg);
  padding: var(--sp-5); box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--c-primary);
}
.card--teal   { border-left-color: var(--c-teal); }
.card--light  { border-left-color: var(--c-light-blue); }
.card--marine { border-left-color: var(--c-marine); }
.card h3 { margin-bottom: var(--sp-2); }
.card p:last-child { margin-bottom: 0; }
.card--link:hover { box-shadow: var(--shadow); }

.grid { display: grid; gap: var(--sp-5); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.panel-title {
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--c-muted); margin-bottom: var(--sp-3);
}

.stat { text-align: left; }
.stat__value { display: block; font-size: var(--fs-2xl); font-weight: 700; color: var(--c-marine); line-height: 1.1; }
.stat__label { display: block; font-size: var(--fs-sm); color: var(--c-muted); }

/* La grille ne s'active que si une photographie est présente : sans elle,
   le texte doit occuper toute la largeur et non la colonne de 200 px. */
.profile { display: block; max-width: 68ch; }
.profile:has(.profile__photo) { display: grid; grid-template-columns: 200px minmax(0,1fr); gap: var(--sp-6); align-items: start; max-width: none; }
.profile__photo {
  width: 200px; height: 240px; object-fit: cover;
  border-radius: var(--radius-lg); border: 1px solid var(--c-line); background: var(--c-bg-tint);
}
.profile__role { font-size: var(--fs-sm); color: var(--c-muted); margin-bottom: var(--sp-4); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  position: relative; padding-left: var(--sp-5); margin-bottom: var(--sp-4);
  border-left: 2px solid var(--c-line);
}
.timeline li:last-child { margin-bottom: 0; }
.timeline__period { display: block; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c-primary-dark); }
.timeline__place { display: block; font-weight: 600; color: var(--c-ink); }
.timeline__detail { display: block; font-size: var(--fs-sm); color: var(--c-muted); }

.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-4); }
.steps li { counter-increment: step; position: relative; padding-left: 3rem; margin: 0; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 0;
  font-size: var(--fs-sm); font-weight: 700; color: var(--c-primary-dark);
  background: var(--c-bg-tint); border-radius: var(--radius-pill);
  width: 2.25rem; height: 2.25rem; display: grid; place-items: center;
}
.steps__title { display: block; font-weight: 700; color: var(--c-ink); }

/* ---------- 6. Sections ---------- */
.section { padding-block: var(--sp-8); }
.section--tight { padding-block: var(--sp-7); }
.section--soft { background: var(--c-bg-soft); }
.section--alt  { background: var(--c-bg-alt); }
.section__head { max-width: 68ch; margin-bottom: var(--sp-6); }

.hero { padding-block: var(--sp-8) var(--sp-7); background: linear-gradient(180deg, var(--c-bg-tint), #fff 72%); }
.hero--page { padding-block: var(--sp-7) var(--sp-6); }
.hero--page .wrap > * { max-width: 68ch; }
.hero--page h1 { max-width: 20ch; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: var(--sp-7); align-items: start; }
.hero h1 { font-size: var(--fs-3xl); margin-bottom: var(--sp-5); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-5); }
.hero__panel { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius-lg); padding: var(--sp-6); box-shadow: var(--shadow-sm); }
.hero__stats { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--sp-5); margin-bottom: var(--sp-5); }
.method { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.method li {
  margin: 0; padding: var(--sp-1) var(--sp-3); font-size: var(--fs-xs); font-weight: 600;
  color: var(--c-primary-deep); background: var(--c-bg-tint); border-radius: var(--radius-pill);
}

.cta-band { background: var(--c-bg-tint); border-radius: var(--radius-lg); padding: var(--sp-7) var(--sp-6); text-align: center; }
.cta-band h2 { margin-bottom: var(--sp-3); }
.cta-band .lede { margin-inline: auto; margin-bottom: var(--sp-5); }

/* ---------- 7. Pied de page ---------- */
.site-footer { background: var(--c-marine); color: #c8d6e2; padding-block: var(--sp-7) var(--sp-5); margin-top: var(--sp-8); }
.site-footer h2, .site-footer h3 { color: #fff; }
.site-footer a { color: #c8d6e2; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--sp-6); }
.site-footer__title { font-size: var(--fs-xs); font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #8aa2b5; margin-bottom: var(--sp-3); }
.site-footer ul { list-style: none; margin: 0; padding: 0; font-size: var(--fs-sm); }
.site-footer li { margin-bottom: var(--sp-2); }
.brand__nom--pied { margin: 0 0 var(--sp-4); font-size: 1.5rem; }
.brand__nom--pied .brand__conseils { color: #fff; }
.site-footer__brand { font-weight: 700; letter-spacing: .06em; color: #fff; font-size: var(--fs-md); }
.site-footer__bottom {
  display: flex; flex-wrap: wrap; gap: var(--sp-4); justify-content: space-between;
  margin-top: var(--sp-6); padding-top: var(--sp-4); border-top: 1px solid rgba(255,255,255,.14);
  font-size: var(--fs-xs); color: #8aa2b5;
}

/* ---------- 8. Responsive ---------- */
@media (min-width: 1100px) and (max-width: 1240px) {
  .main-nav__list { gap: var(--sp-4); }
  .main-nav__link { font-size: var(--fs-xs); }
}

@media (max-width: 1023px) {
  :root { --fs-3xl: 2.375rem; --fs-2xl: 2rem; --fs-xl: 1.625rem; }
  .hero__grid { grid-template-columns: 1fr; gap: var(--sp-6); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1099px) {
  .nav-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .main-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--c-line);
    box-shadow: var(--shadow); padding: var(--sp-4) 0 var(--sp-5);
    margin-left: 0;
  }
  .main-nav[hidden] { display: none; }
  .main-nav__list { flex-direction: column; align-items: stretch; gap: 0; padding-inline: var(--sp-5); }
  .main-nav__link { display: block; padding: var(--sp-3) 0; border-bottom: 1px solid var(--c-line); font-size: var(--fs-base); }
  .main-nav__link:hover { border-bottom-color: var(--c-line); }
  .main-nav__cta { display: block; margin-top: var(--sp-4); }
  .main-nav__cta .btn { width: 100%; }
}

@media (max-width: 767px) {
  .profile { grid-template-columns: 1fr; }
  .profile__photo { width: 160px; height: 192px; }
}

@media (max-width: 639px) {
  .brand__nom { font-size: 1.25rem; gap: .36em; }
  :root { --fs-3xl: 1.9375rem; --fs-2xl: 1.75rem; --fs-xl: 1.4375rem; --sp-8: 2.75rem; --sp-9: 3.5rem; }
  .wrap { padding-inline: var(--sp-4); }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .hero__stats { grid-template-columns: 1fr 1fr; }
  .hero__actions .btn { width: 100%; }
  .site-footer__grid { grid-template-columns: 1fr; gap: var(--sp-5); }
  .cta-band { padding: var(--sp-6) var(--sp-4); }
}


/* --- Pages d'expertise --- */
.deliverables { list-style: none; margin: 0; padding: 0; }
.deliverables li { position: relative; padding-left: 1.75rem; margin-bottom: var(--sp-3); }
.deliverables li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: .5rem; height: .5rem; border-radius: 2px; background: var(--c-primary);
}
.outcome {
  border-left: 4px solid var(--c-teal);
  background: var(--c-bg-soft); border-radius: var(--radius);
  padding: var(--sp-5) var(--sp-5) var(--sp-5) var(--sp-6);
}
.outcome p:last-child { margin-bottom: 0; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--sp-6); align-items: start; }
.related { display: flex; flex-wrap: wrap; gap: var(--sp-3); list-style: none; margin: 0; padding: 0; }
.related li { margin: 0; }
.related a {
  display: inline-block; padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-sm); font-weight: 600; text-decoration: none;
  color: var(--c-primary-dark); background: #fff;
  border: 1px solid var(--c-line); border-radius: var(--radius-pill);
}
.related a:hover { border-color: var(--c-primary); color: var(--c-primary-deep); }

@media (max-width: 767px) {
  .split { grid-template-columns: 1fr; gap: var(--sp-5); }
}


/* --- Pages juridiques --- */
.legal { max-width: 74ch; }
.legal h2 { margin-top: var(--sp-7); font-size: var(--fs-lg); }
.legal h2:first-of-type { margin-top: 0; }
.legal h3 { margin-top: var(--sp-5); font-size: var(--fs-base); color: var(--c-ink-soft); }
.legal ul { padding-left: 1.1em; }
.legal address { font-style: normal; margin-bottom: var(--sp-4); }
.legal__date {
  display: inline-block; font-size: var(--fs-xs); font-weight: 600;
  color: var(--c-muted); background: var(--c-bg-alt);
  padding: var(--sp-1) var(--sp-3); border-radius: var(--radius-pill);
  margin-bottom: var(--sp-5);
}
.table-scroll { overflow-x: auto; margin-bottom: var(--sp-5); }
.table-scroll table { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: var(--fs-sm); }
.table-scroll caption { text-align: left; font-size: var(--fs-xs); color: var(--c-muted); padding-bottom: var(--sp-2); }
.table-scroll th, .table-scroll td {
  border: 1px solid var(--c-line); padding: var(--sp-3); text-align: left; vertical-align: top;
}
.table-scroll th { background: var(--c-bg-alt); color: var(--c-ink); font-weight: 700; }


/* --- Analyses --- */
.article { max-width: 72ch; }
.article h2 { margin-top: var(--sp-7); font-size: var(--fs-lg); }
.article h3 { margin-top: var(--sp-5); font-size: var(--fs-base); color: var(--c-ink-soft); }
.article ul { padding-left: 1.1em; }
.article__meta { font-size: var(--fs-sm); color: var(--c-muted); margin-bottom: var(--sp-5); }
.article__lede { font-size: var(--fs-md); color: var(--c-ink-soft); margin-bottom: var(--sp-6); }
.callout {
  border-left: 4px solid var(--c-primary); background: var(--c-bg-soft);
  border-radius: var(--radius); padding: var(--sp-5); margin-block: var(--sp-5);
}
.callout p:last-child { margin-bottom: 0; }
.callout__title { display: block; font-weight: 700; color: var(--c-ink); margin-bottom: var(--sp-2); }


/* --- Page Contact : envoi direct par courriel ---
   Décision du Chef de projet du 10/10/2026 : le formulaire et tout le code PHP
   associé ont été supprimés. Les styles de champs, de pièges anti-robots et de
   messages de validation ont été retirés avec eux. */
.contact-direct {
  background: var(--c-bg-tint); border: 1px solid var(--c-line);
  border-radius: var(--radius-lg); padding: var(--sp-6);
  margin-bottom: var(--sp-7);
}
.contact-direct > :last-child { margin-bottom: 0; }
.contact-direct__adresse {
  font-size: var(--fs-lg); font-weight: 700; word-break: break-word;
  margin-block: var(--sp-3) var(--sp-5);
}
.contact-direct__adresse a { color: var(--c-primary-deep); }
.contact-direct__delai { font-size: var(--fs-sm); color: var(--c-ink-soft); margin-top: var(--sp-5); }

/* ---------- 9. Impression ---------- */
@media print {
  .site-header, .site-footer, .skip-link, .hero__actions, .cta-band { display: none !important; }
  body { color: #000; font-size: 11pt; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
}

.table-scroll:focus-visible { outline: 3px solid var(--c-focus, #1C7293); outline-offset: 2px; }
