/* =========================================================
   Gestimatech — Site éditeur (virage SaaS)
   Feuille de style partagée. Direction « encre + or ».
   Mobile-first. Palette éditeur (distincte de la construction).
   ========================================================= */

/* ---------- Reset léger ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }

/* ---------- Variables ---------- */
:root {
  /* Couleurs — encre (fond de marque) */
  --ink:      #0b1f4d;
  --ink-2:    #081633;
  --ink-3:    #0e1c3f;
  /* Bleu (action / produit) */
  --blue:     #3f74ff;
  --blue-deep:#1e56e0;
  --sky:      #aebcdd;
  /* Or (valeur / humain) */
  --gold:     #f3cd52;
  --gold-deep:#8f620d;   /* or fonce lisible sur fonds clairs (WCAG AA >= 4.5:1) */
  /* Neutres (fonds clairs) */
  --paper:    #ffffff;
  --paper-2:  #f4f6fb;
  --cream:    #f8f5ec;
  --line:     #e4e9f3;
  --line-2:   #d7deea;
  /* Texte sur clair */
  --text:     #0f1830;
  --text-soft:#47536e;
  --text-mut: #6b7690;
  /* Texte sur encre */
  --on-ink:      #eaf0fc;
  --on-ink-soft: #b7c4e0;

  /* Typo */
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --mono:  'JetBrains Mono', 'Cascadia Code', Consolas, monospace;
  --sans:  'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;

  /* Mesure & rythme */
  --container: 1120px;
  --pad-x: clamp(20px, 5vw, 40px);
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px -4px rgba(9,25,60,.25);
  --shadow-md: 0 14px 34px -20px rgba(9,25,60,.45);
  --shadow-lg: 0 30px 60px -30px rgba(6,16,44,.6);
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- Base ---------- */
body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.08;
  letter-spacing: -.015em; text-wrap: balance; }

/* ---------- Accessibilité ---------- */
.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;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 999;
  background: var(--gold); color: var(--ink-2); padding: 10px 16px;
  border-radius: 8px; font-weight: 700; text-decoration: none;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--pad-x); }
.section { padding-block: clamp(56px, 9vw, 104px); }

.eyebrow {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--gold-deep); font-weight: 600;
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; opacity: .6; }
.on-ink .eyebrow { color: var(--gold); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--sans); font-weight: 700; font-size: .96rem;
  padding: 14px 26px; border-radius: 11px; border: 1.5px solid transparent;
  text-decoration: none; transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue-deep); color: #fff; box-shadow: 0 14px 30px -12px rgba(30,86,224,.7); }
.btn-primary:hover { background: #1b4ecb; box-shadow: 0 18px 36px -12px rgba(30,86,224,.85); }
.btn-ghost { border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--blue-deep); color: var(--blue-deep); }
.on-ink .btn-ghost { color: #fff; border-color: transparent; border-bottom: 1.5px solid var(--gold); border-radius: 0; padding: 14px 4px; }
.on-ink .btn-ghost:hover { color: var(--gold); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8,22,51,.82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none;
  font-family: var(--serif); font-weight: 700; font-size: 1.2rem; color: #fff; }
.brand b { color: var(--gold); font-weight: 700; }
.brand img { width: 30px; height: 30px; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 44px; /* cible tactile confortable */
  font-family: var(--mono); font-size: .74rem; letter-spacing: .04em; text-transform: uppercase;
  color: var(--sky); text-decoration: none; padding: 6px 12px; border-radius: 8px;
  transition: color .15s var(--ease), background .15s var(--ease);
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-links a[aria-current="page"] { color: var(--gold); } /* page courante */
.nav-links .nav-cta {
  color: #fff; background: var(--blue-deep); font-family: var(--sans); font-weight: 700;
  font-size: .82rem; letter-spacing: 0; text-transform: none; padding: 9px 16px; margin-left: 6px;
}
.nav-links .nav-cta:hover { background: #1b4ecb; }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; color: #fff; }
.nav-toggle svg { width: 26px; height: 26px; }

/* ---------- Sections encre (fond de marque) ---------- */
.on-ink { background: var(--ink); color: var(--on-ink); }
.on-ink h1, .on-ink h2, .on-ink h3 { color: #fff; }

/* Hero */
.hero { position: relative; overflow: hidden; color: var(--on-ink);
  background:
    radial-gradient(32% 42% at 82% 8%, rgba(243,205,82,.30), transparent 66%),
    radial-gradient(40% 48% at 98% -6%, rgba(245,170,60,.16), transparent 60%),
    radial-gradient(26% 36% at 66% 26%, rgba(255,214,120,.11), transparent 66%),
    linear-gradient(158deg, var(--ink) 0%, var(--ink-2) 100%);
}
.nebula { position: absolute; inset: -4%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(17% 22% at 76% 14%, rgba(255,226,145,.26), transparent 70%),
    radial-gradient(14% 19% at 88% 24%, rgba(245,150,50,.15), transparent 72%);
  filter: blur(14px); mix-blend-mode: screen;
  animation: drift 24s ease-in-out infinite;
}
@keyframes drift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  50%  { transform: translate3d(-16px,12px,0) scale(1.06); }
  100% { transform: translate3d(0,0,0) scale(1); }
}
.hero > .container { position: relative; z-index: 2; padding-block: clamp(64px, 11vw, 128px); }
.hero .lead {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.1rem, 2.1vw, 1.4rem); color: var(--sky);
  margin: 14px 0 12px; max-width: 24ch; line-height: 1.35;
}
.hero h1 { font-size: clamp(2.3rem, 6vw, 4rem); max-width: 16ch; margin-bottom: 26px; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero .hero-sub { font-size: clamp(1.02rem, 1.6vw, 1.15rem); color: #cdd7ee;
  max-width: 48ch; margin-bottom: 34px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; }

/* Hero « déclaration » (phrase longue) — pages Histoire / Vision */
.hero--statement h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); max-width: 22ch; }
.hero--statement .lead { max-width: 46ch; margin: 18px 0 0; }

/* ---------- Manifeste (blocs éditoriaux sur fond clair) ---------- */
.manifesto { background: var(--cream); }
.manifesto .container { max-width: 820px; }
.stanza { padding-block: clamp(30px, 5vw, 48px); border-top: 1px solid rgba(11,31,77,.10); }
.stanza:first-child { border-top: 0; }
.stanza .mark { font-family: var(--mono); font-size: .72rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--gold-deep); display: block; margin-bottom: 14px; }
.stanza h2 { font-size: clamp(1.5rem, 3.2vw, 2.15rem); color: var(--ink); margin-bottom: 14px; }
.stanza p { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--text-soft); max-width: 60ch; }
.stanza .proof { font-family: var(--serif); font-style: italic; color: var(--ink);
  font-size: 1.25rem; margin-top: 18px; }

/* ---------- Section produits (clair, grille discrète) ---------- */
.products { background: var(--paper); position: relative; }
.products::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image:
    linear-gradient(var(--paper-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--paper-2) 1px, transparent 1px);
  background-size: 38px 38px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 80%);
          mask-image: linear-gradient(180deg, #000, transparent 80%); }
.products > .container { position: relative; z-index: 1; }
.section-head { margin-bottom: 34px; max-width: 60ch; }
.section-head .eyebrow { margin-bottom: 12px; }
.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); color: var(--ink); }
.cards { display: grid; grid-template-columns: 1fr; gap: 18px; }
.card {
  position: relative; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 26px 26px 30px; box-shadow: var(--shadow-sm);
  transition: transform .18s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-2); }
.card .rail { position: absolute; left: 0; top: 24px; bottom: 24px; width: 3px; border-radius: 3px;
  background: linear-gradient(var(--gold), var(--blue)); }
.card .tag { font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--blue-deep); }
.card h3 { font-size: 1.4rem; color: var(--ink); margin: 8px 0 8px; }
.card p { color: var(--text-soft); margin-bottom: 18px; }
.card .go { font-family: var(--sans); font-weight: 700; font-size: .92rem; color: var(--blue-deep);
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.card .go:hover { gap: 10px; }

/* ---------- Section humain (clair, chaleureux) ---------- */
.people { background: var(--paper-2); }
.people .container { max-width: var(--container); }
.people-grid { display: grid; grid-template-columns: 1fr; gap: 30px; align-items: center; }
.people-photo { margin: 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.people-photo img { width: 100%; height: auto; display: block; }
.people-text { max-width: 60ch; }
.people h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); color: var(--ink); margin-bottom: 16px; }
.people p { font-size: clamp(1.05rem, 1.5vw, 1.18rem); color: var(--text-soft); max-width: 60ch; margin-bottom: 20px; }
@media (min-width: 760px) { .people-grid { grid-template-columns: 0.82fr 1fr; gap: 48px; } }

/* ---------- Section mission (encre, clôture) ---------- */
.mission { position: relative; overflow: hidden; }
.mission h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); max-width: 20ch; margin-bottom: 18px; }
.mission p { color: var(--on-ink-soft); font-size: clamp(1.05rem, 1.6vw, 1.2rem); max-width: 52ch; margin-bottom: 30px; }
.mission > .container { position: relative; z-index: 2; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-2); color: var(--on-ink-soft); padding-block: 40px; }
.foot-grid { display: flex; flex-wrap: wrap; gap: 24px 40px; align-items: flex-start; justify-content: space-between; }
.site-footer .brand { font-size: 1.1rem; margin-bottom: 8px; }
.foot-nap { font-size: .9rem; line-height: 1.7; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; /* cible tactile */
  font-family: var(--mono); font-size: .74rem; letter-spacing: .04em; text-transform: uppercase;
  color: var(--sky); text-decoration: none; }
.foot-links a:hover { color: #fff; }
.foot-legal { width: 100%; border-top: 1px solid rgba(255,255,255,.08); margin-top: 26px; padding-top: 18px;
  font-family: var(--mono); font-size: .68rem; color: #8a97b0; letter-spacing: .03em; }

/* =========================================================
   Responsive — desktop (min-width)
   ========================================================= */
@media (min-width: 760px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .foot-nap { max-width: 40ch; }
}

/* Menu mobile (max-width) */
@media (max-width: 759px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--ink-2); border-bottom: 1px solid rgba(255,255,255,.1);
    padding: 14px var(--pad-x) 22px; transform: translateY(-8px); opacity: 0; pointer-events: none;
    visibility: hidden; /* retire les liens du parcours clavier quand le menu est ferme */
    transition: opacity .18s var(--ease), transform .18s var(--ease), visibility 0s .18s;
  }
  .nav-links.is-open { opacity: 1; transform: translateY(0); pointer-events: auto;
    visibility: visible; transition: opacity .18s var(--ease), transform .18s var(--ease), visibility 0s 0s; }
  .nav-links a { font-size: .9rem; padding: 12px 10px; }
  .nav-links .nav-cta { margin: 8px 0 0; text-align: center; justify-content: center; }
}

/* =========================================================
   Signature de marque — « le renversement »
   Décline le logo (chevron bleu ^ qui monte + chevron or v qui
   descend) en trame discrète sur les fonds encre, + un grand
   glyphe filigrane qui clôt la section mission. Zéro photo.
   ========================================================= */
.on-ink { position: relative; }
.on-ink::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("../img/pattern-chevrons.svg");
  background-position: center top; background-size: 66px 66px;
  opacity: .55;
  -webkit-mask-image: radial-gradient(135% 115% at 50% -12%, #000 22%, transparent 78%);
          mask-image: radial-gradient(135% 115% at 50% -12%, #000 22%, transparent 78%);
}
/* Le contenu reste au-dessus de la trame */
.on-ink > .container { position: relative; z-index: 2; }

/* Grand glyphe « renversement » en filigrane — clôture de la mission */
.mission::after {
  content: ""; position: absolute; z-index: 1; pointer-events: none;
  right: -3%; bottom: -6%; width: clamp(210px, 32vw, 440px); aspect-ratio: 1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M20,45L50,17L80,45' fill='none' stroke='%233f74ff' stroke-width='6.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M20,55L50,83L80,55' fill='none' stroke='%23f3cd52' stroke-width='6.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
  opacity: .14;
}

/* ---------- Pages légales (prose) ---------- */
.legal { background: var(--paper); }
.legal .container { max-width: 780px; }
.legal .updated { font-family: var(--mono); font-size: .78rem; color: var(--text-mut); margin-bottom: 18px; }
.legal .lead { font-size: 1.1rem; color: var(--text); margin-bottom: 8px; }
.legal h2 { font-size: clamp(1.25rem, 2.6vw, 1.6rem); color: var(--ink); margin: 38px 0 12px; }
.legal p { color: var(--text-soft); font-size: 1.02rem; margin-bottom: 14px; }
.legal ul { margin: 0 0 18px 1.1em; color: var(--text-soft); }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--blue-deep); text-decoration: underline; }
.legal .table-wrap { overflow-x: auto; margin: 8px 0 22px; }
.legal table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 460px; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { color: var(--ink); font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.legal td { color: var(--text-soft); }
.legal .disclaimer { margin-top: 30px; padding: 16px 18px; background: var(--paper-2); border-radius: var(--radius); font-size: .9rem; color: var(--text-mut); }

/* ---------- Préférences de mouvement ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important;
      transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .nebula { animation: none; }
}
