/* Styles communs aux 4 pages du site (accueil, études de cas, mentions légales) :
   police, couleurs et espacements, base, navbar et menu mobile, boutons, pied de page et contacts, tags.
   Chaque page garde dans sa balise <style> ce qui lui est propre ; ce fichier est chargé juste avant. */

@font-face { font-family: "Satoshi Variable"; src: url("../fonts/Satoshi-Variable.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }

:root {
  /* Couleurs : variables Primitives de la maquette Figma */
  --encre-900: #14151F;
  --encre-500: #3D405C;
  --encre-400: #5C608A;
  --encre-100: #D1D2E0;
  --peche-100: #FDF5F2;
  --indigo-500: #3645E2;
  --orchidee-500: #DF9FCA;
  --white: #FFFFFF;
  --white-20: rgba(255, 255, 255, .2);

  /* Rôles */
  --bg: var(--peche-100);
  --text: var(--encre-900);
  --text-2: var(--encre-400);
  --surface: var(--white);
  --surface-dark: var(--encre-900);
  --line: rgba(20, 21, 31, .15);   /* Divider Figma : encre/900 à 15 % */

  /* Typo : Satoshi Variable (hébergée avec le site, licence FFL dans fonts/) ; police système en secours */
  --font-title: "Satoshi Variable", "Satoshi", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Satoshi Variable", "Satoshi", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Rythme */
  --g: clamp(16px, 8.333vw, 120px);          /* marge latérale : 120 à 1440 */
  --sec: clamp(72px, 8.333vw, 120px);        /* marge haute et basse des sections */
  --gap-block: clamp(48px, 5.556vw, 80px);   /* titre → contenu → bouton */
  --card-gap: 24px;
  --r-card: 16px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-weight: 400; font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--indigo-500); outline-offset: 3px; border-radius: 4px; }
.on-dark :focus-visible { outline-color: var(--orchidee-500); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Conteneur : marge latérale de la maquette, jamais sous 16px, dégage aussi une barre système latérale */
:root { --sw: min(90vw, 150vh, 2560px); --cy: 43svh; } /* largeur du monogramme */
.wrap {
  width: 100%; max-width: 1440px; margin-inline: auto;
  padding-left: max(var(--g), env(safe-area-inset-left, 0px));
  padding-right: max(var(--g), env(safe-area-inset-right, 0px));
}

/* Styles de texte (titre/xl … texte/s) */
.t-label { font-weight: 500; font-size: 16px; line-height: 1.5; }
.t-l  { font-family: var(--font-title); font-weight: 700; letter-spacing: -.015em; font-size: clamp(30px, 2.778vw, 40px); line-height: 1.3; text-wrap: balance; }
.t-m  { font-family: var(--font-title); font-weight: 500; letter-spacing: -.01em; font-size: clamp(22px, 1.944vw, 28px); line-height: 1.3; }
:root { --encre-950: #0A0B10; }
main, body > footer { position: relative; z-index: 1; }

/* ---------- Navbar ---------- */
.nav {
  position: fixed; z-index: 50; left: 0; right: 0;
  top: calc(24px + env(safe-area-inset-top, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; justify-content: center; pointer-events: none;
}
.nav-pill {
  pointer-events: auto; width: min(996px, 100%);
  display: flex; align-items: center;
  padding: 8px 8px 8px 12px; border-radius: 1000px;
  background: transparent;
  transition: background-color .6s cubic-bezier(.22, .61, .36, 1);
}
.nav.is-scrolled .nav-pill {
  background: #fff;   /* Figma : blanc 100 % */
}
.brand { display: flex; align-items: center; margin-right: auto; color: var(--encre-900); transition: opacity .3s ease, visibility .3s, color .2s ease; }
.brand svg { width: 56px; height: 32px; margin-right: 16px; fill: currentColor; flex: none; transition: margin-left .6s cubic-bezier(.22, .61, .36, 1), opacity .4s ease; }
.brand span { font-weight: 700; }
/* Composant Logo Item : Hover = indigo/500 ; Pressed = indigo/500 à 80 % */
.brand:hover { color: var(--indigo-500); }
.brand:active { color: var(--indigo-500); opacity: .8; }
.nav-links { display: flex; gap: 32px; justify-content: center; }
.nav-pill > nav { margin-left: 32px; }
.nav-links a { font-weight: 500; padding: 8px 0; color: var(--encre-900); transition: color .2s ease, opacity .3s ease; }
/* Composant Menu Item : Hover = encre/500 ; Pressed = indigo/500 */
.nav-links a:hover { color: var(--encre-500); }
.nav-links a:active, .nav-links a.is-current { color: var(--indigo-500); }
.nav-cta { white-space: nowrap; }
.nav-cta-wrap { display: block; overflow: hidden; flex: none; margin-left: 32px; max-width: var(--cta-w, 160px); transition: max-width .6s cubic-bezier(.22, .61, .36, 1), margin .6s cubic-bezier(.22, .61, .36, 1), opacity .5s ease .1s, visibility 0s linear 0s; }
/* Figma « Web / Home » : seul le nom est visible à gauche (sans monogramme) et les liens à droite ; « Scroll » : pastille blanche, monogramme + bouton */
.nav:not(.is-scrolled) .brand svg { margin-left: -72px; opacity: 0; }   /* un seul paramètre animé : le nom glisse sans à-coup */
.nav:not(.is-scrolled) .nav-cta-wrap { max-width: 0; margin-left: 0; opacity: 0; visibility: hidden; transition: max-width .6s cubic-bezier(.22, .61, .36, 1), margin .6s cubic-bezier(.22, .61, .36, 1), opacity .22s ease 0s, visibility 0s linear .6s; }   /* à la fermeture le bouton s'efface d'abord, il n'est donc jamais vu rogné */
.nav-toggle, .mnav { display: none; }
@media (max-width: 760px) {
  /* Navbar mobile (Figma « Version=Mobile ») : pilule blanche pleine, marges 24, logo à gauche, icône menu à droite */
  .nav { padding-left: 24px; padding-right: 24px; }
  .nav-pill { padding: 8px 24px 8px 12px; background: #fff; }
  .nav-toggle { margin-left: 16px; }
  .nav-pill > nav, .nav-pill > .nav-cta-wrap { display: none; }
  .nav:not(.is-scrolled) .brand svg { margin-left: 0; opacity: 1; }
  .nav-toggle { display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--encre-900); }
  .nav-toggle svg { width: 24px; height: 24px; display: block; overflow: visible; }
  .nav-toggle path { fill: currentColor; }
  /* Menu plein écran (Figma « Mobile - Menu ») */
  .mnav { display: flex; position: fixed; inset: 0; z-index: 49; flex-direction: column; align-items: center; justify-content: center;
    background: #fff; opacity: 0; visibility: hidden; pointer-events: none; clip-path: circle(0% at calc(100% - 36px) 48px);
    transition: opacity .3s ease, clip-path .55s cubic-bezier(.65, 0, .35, 1), visibility 0s linear .55s; }
  .mnav.is-open { opacity: 1; visibility: visible; pointer-events: auto; clip-path: circle(150% at calc(100% - 36px) 48px);
    transition: opacity .2s ease, clip-path .6s cubic-bezier(.65, 0, .35, 1), visibility 0s; }
  .mnav ul { list-style: none; margin: 0; padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 54px; }
  .mnav li a { display: block; font-family: var(--font-title); font-weight: 500; font-size: 28px; line-height: 1.3; color: var(--encre-900); text-align: center; transition: color .2s ease; }
  .mnav li a:hover { color: var(--encre-500); }
  .mnav li a:active { color: var(--indigo-500); }
  .mnav li, .mnav .btn { opacity: 0; transform: translateY(16px); transition: opacity .25s ease, transform .25s ease; }
  .mnav.is-open li, .mnav.is-open .btn { opacity: 1; transform: none; transition: opacity .45s ease, transform .5s cubic-bezier(.2, .7, .2, 1); }
  .mnav.is-open li:nth-child(1) { transition-delay: .18s; } .mnav.is-open li:nth-child(2) { transition-delay: .25s; }
  .mnav.is-open li:nth-child(3) { transition-delay: .32s; } .mnav.is-open li:nth-child(4) { transition-delay: .39s; }
  .mnav.is-open .btn { transition-delay: .46s; }
  .mnav .btn { position: absolute; left: 50%; margin-left: calc(min(328px, 100vw - 64px) / -2); bottom: max(32px, env(safe-area-inset-bottom, 0px)); width: min(328px, calc(100vw - 64px)); }
  body.menu-open { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { .mnav, .mnav.is-open, .mnav li, .mnav .btn { transition: none !important; } }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 16px;
  height: 54px; border-radius: 1000px; white-space: nowrap;
  font-weight: 500; font-size: 18px; line-height: 1;
}
/* États repris des composants Figma « Button » (Default / Hover / Pressed) */
.btn { transition: background-color .2s ease, border-color .2s ease, color .2s ease, gap .2s ease, padding .2s ease; }
.btn-primary { background: var(--encre-900); color: var(--white); padding: 0 8px 0 24px; }
.btn-primary svg { width: 40px; height: 40px; flex: none; transition: opacity .2s ease; }
.btn-primary:hover { background: var(--indigo-500); gap: 18px; padding-right: 6px; }
.btn-primary:hover svg, .btn-primary:active svg { --arrow: var(--indigo-500); }
.btn-primary:active { background: var(--indigo-500); gap: 18px; padding-right: 6px; color: rgba(255, 255, 255, .8); }
.btn-primary:active svg { opacity: .8; }
/* Secondary : texte Regular ; Hover / Pressed = contour 2 px encre/900 (1 px + 1 px intérieur pour ne pas bouger le texte) ; Pressed = fond encre/900 à 10 % */
.btn-secondary { border: 1px solid var(--encre-900); color: var(--encre-900); padding: 0 24px; font-weight: 500; transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease; }
.btn-secondary:hover { border-color: var(--encre-900); color: var(--encre-900); box-shadow: inset 0 0 0 1px var(--encre-900); }
.btn-secondary:active { border-color: var(--encre-900); color: var(--encre-900); box-shadow: inset 0 0 0 1px var(--encre-900); background: rgba(20, 21, 31, .1); }
.btn-sm { height: 40px; padding: 0 20px; font-size: 16px; line-height: 1.5; background: var(--encre-900); color: var(--white); }
.btn-sm:hover { background: var(--indigo-500); }
.btn-sm:active { background: var(--indigo-500); color: rgba(255, 255, 255, .8); }
.btn-round { width: 54px; height: 54px; padding: 0; background: var(--encre-900); color: var(--white); flex: none; }
.btn-round svg { width: 24px; height: 24px; fill: currentColor; }
.btn-round:hover, .btn-round:active { background: var(--indigo-500); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
/* Footer : fond plein, il masque le monogramme fixe sous le visuel final */
.footer { background: transparent; }
.footer-stack { display: flex; flex-direction: column; align-items: center; gap: var(--gap-block); }
.cta-block { display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; max-width: 792px; }
.cta-block h2 { max-width: 588px; }   /* Figma : texte sur 588, le visuel (640) déborde */
.cta-block .slot { position: relative; width: min(640px, 100%); aspect-ratio: 16 / 10; }
.footer hr { width: 100%; border: 0; border-top: 1px solid var(--line); margin: 0; }
/* Footer Figma : deux cartes blanches (rayon 16, padding 32) entièrement cliquables, puis ligne © / Mentions légales */
.contacts { width: min(792px, 100%); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap-block); align-items: stretch; }
.contact { display: flex; align-items: center; gap: 16px; min-width: 0; padding: 32px; background: #fff; border-radius: 16px; color: inherit; text-decoration: none; }
.contact .btn-round { pointer-events: none; }   /* la carte entière est le lien ; le bouton rond suit son survol */
.contact:hover .btn-round, .contact:active .btn-round { background: var(--indigo-500); }
.contact:focus-visible { outline-offset: 4px; border-radius: 16px; }
.contact-txt { display: flex; flex-direction: column; gap: 8px; min-width: 0; white-space: nowrap; }
.contact-txt b { font-weight: 700; }
.legal { width: 100%; display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; }


.tags { display: flex; flex-wrap: wrap; gap: 12px; }
.tag { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border: 1px solid var(--encre-100); border-radius: 8px; font-weight: 500; font-size: 14px; line-height: 1; color: var(--encre-400); }
