/* =========================================================
   PRESTACOM — Design System
   Direction: "Global Dynamique" — navy nuit + orange flamme
   Type: Space Grotesk (display) / Instrument Sans (corps) / Space Mono (data)
   ========================================================= */

:root {
  /* Palette */
  --ink:        #0A0F1A;   /* fond bleu nuit */
  --ink-2:      #0D1422;   /* panneaux */
  --ink-3:      #111A2B;   /* cartes */
  --line:       #1E2A40;   /* hairlines */
  --line-soft:  #182238;
  --flame:      #FF6B2C;   /* accent unique */
  --flame-soft: #FF8A4C;
  --paper:      #F5F3EE;   /* blanc chaud */
  --mist:       #8A97AD;   /* texte secondaire */
  --mist-dim:   #5A6884;

  /* Type */
  --display: "Space Grotesk", system-ui, sans-serif;
  --body:    "Instrument Sans", system-ui, sans-serif;
  --mono:    "Space Mono", ui-monospace, monospace;

  /* Layout */
  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 14px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: var(--flame); color: var(--ink); }

/* ---------- Utilities ---------- */
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.mono { font-family: var(--mono); font-weight: 400; letter-spacing: 0.02em; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.22em;
  color: var(--flame);
}
.eyebrow .sep { width: 34px; height: 1px; background: currentColor; opacity: 0.5; display: inline-block; }
.eyebrow .coord { color: var(--mist); }

.section { padding-block: clamp(80px, 12vw, 160px); }
.section-head { max-width: 780px; margin-bottom: clamp(48px, 7vw, 84px); }
.section-title {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(30px, 5vw, 54px); line-height: 1.05; letter-spacing: -0.02em;
  margin-top: 20px; text-wrap: balance;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--flame); color: var(--ink); padding: 10px 16px; border-radius: 8px;
  font-family: var(--mono); font-size: 13px; transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

/* Visible keyboard focus */
:focus-visible { outline: 2px solid var(--flame); outline-offset: 3px; border-radius: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--display); font-weight: 500; font-size: 15px; letter-spacing: 0.01em;
  padding: 15px 28px; border-radius: 999px;
  transition: transform 0.35s var(--ease), background 0.3s, color 0.3s, border-color 0.3s;
  will-change: transform;
}
.btn-sm { padding: 10px 20px; font-size: 14px; }
.btn-block { width: 100%; padding-block: 17px; }
.btn-primary { background: var(--flame); color: var(--ink); }
.btn-primary:hover { background: var(--flame-soft); transform: translateY(-2px); }
.btn-ghost { border: 1px solid var(--line); color: var(--paper); }
.btn-ghost:hover { border-color: var(--flame); color: var(--flame); transform: translateY(-2px); }

/* ---------- Brand wordmark ---------- */
.brand { display: inline-flex; align-items: center; font-family: var(--display); font-weight: 600; font-size: 24px; letter-spacing: -0.01em; }
.brand-word { color: var(--paper); }
.brand-pill {
  background: var(--flame); color: var(--ink);
  padding: 1px 9px 3px; border-radius: 999px; margin-left: 3px; line-height: 1;
}

/* ========================================================
   HEADER
   ======================================================== */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding-block: 18px;
  transition: background 0.4s, border-color 0.4s, padding 0.4s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line-soft);
  padding-block: 12px;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.nav { display: flex; gap: 30px; }
.nav a {
  font-size: 15px; color: var(--mist); position: relative; padding-block: 4px;
  transition: color 0.25s;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 1px;
  background: var(--flame); transition: width 0.3s var(--ease);
}
.nav a:hover { color: var(--paper); }
.nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 18px; }
.lang-switch { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 13px; color: var(--mist-dim); }
.lang-switch button { padding: 2px 4px; transition: color 0.2s; }
.lang-switch button.is-active { color: var(--flame); }
.lang-switch button:hover { color: var(--paper); }

.menu-toggle { display: none; width: 40px; height: 40px; flex-direction: column; justify-content: center; align-items: center; gap: 6px; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--paper); transition: transform 0.3s var(--ease), opacity 0.3s; }
.menu-toggle.open span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 90;
  background: var(--ink); backdrop-filter: blur(20px);
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
  padding: 0 var(--gutter);
  transform: translateY(-100%); transition: transform 0.5s var(--ease);
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu a { font-family: var(--display); font-size: 30px; font-weight: 500; padding: 10px 0; color: var(--paper); }
.mobile-menu a.btn { font-size: 16px; margin-top: 20px; align-self: flex-start; }

/* ========================================================
   HERO
   ======================================================== */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: 120px; padding-bottom: 80px; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.route-svg { width: 100%; height: 100%; }
.glow-blob { animation: floatGlow 14s ease-in-out infinite; transform-origin: center; }
@keyframes floatGlow { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-40px, 30px); } }

.route-arc { fill: none; stroke: var(--flame); stroke-width: 1.5; opacity: 0.55;
  stroke-dasharray: 1; stroke-dashoffset: 1; }
.route-arc.arc-2 { stroke: var(--mist); opacity: 0.25; }
.loaded .route-arc { animation: drawArc 2.6s var(--ease) forwards; }
.loaded .route-arc.arc-2 { animation-delay: 0.3s; }
@keyframes drawArc { to { stroke-dashoffset: 0; } }
.route-node { fill: var(--flame); opacity: 0; }
.loaded .route-node { animation: popNode 0.5s var(--ease) forwards; }
.loaded .n1 { animation-delay: 1.2s; } .loaded .n2 { animation-delay: 2.2s; } .loaded .n3 { animation-delay: 2.4s; }
@keyframes popNode { from { opacity: 0; } to { opacity: 1; } }

.hero-inner { position: relative; z-index: 1; }
.hero-title {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(44px, 8.5vw, 108px); line-height: 0.98; letter-spacing: -0.035em;
  margin: 24px 0 32px; max-width: 15ch;
}
.hero-title .line { display: block; }
.hero-title .accent { color: var(--flame); }
.hero-sub { max-width: 52ch; font-size: clamp(17px, 2vw, 21px); color: var(--mist); line-height: 1.6; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }

.scroll-hint { position: absolute; bottom: 34px; left: var(--gutter); display: inline-flex; align-items: center; gap: 12px; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--mist-dim); z-index: 1; }
.scroll-line { width: 60px; height: 1px; background: var(--line); position: relative; overflow: hidden; }
.scroll-line::after { content: ""; position: absolute; inset: 0; width: 24px; background: var(--flame); animation: scrollDash 2.2s var(--ease) infinite; }
@keyframes scrollDash { 0% { transform: translateX(-30px); } 100% { transform: translateX(70px); } }

/* ========================================================
   STATS
   ======================================================== */
.stats { border-block: 1px solid var(--line-soft); padding-block: clamp(48px, 6vw, 76px); background: var(--ink-2); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { text-align: left; }
.stat-num { font-family: var(--display); font-weight: 500; font-size: clamp(40px, 6vw, 68px); line-height: 1; letter-spacing: -0.03em; color: var(--paper); }
.stat-num .u { color: var(--flame); }
.stat-label { display: block; margin-top: 12px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--mist); }
.stats-note { margin-top: 34px; font-size: 12px; color: var(--mist-dim); }

/* ========================================================
   SERVICES
   ======================================================== */
.services-list { border-top: 1px solid var(--line); }
.svc {
  display: grid; grid-template-columns: 90px minmax(0, 1fr) 220px; gap: 32px; align-items: start;
  padding: clamp(28px, 4vw, 46px) 0; border-bottom: 1px solid var(--line);
  transition: background 0.4s;
}
.svc:hover { background: linear-gradient(90deg, color-mix(in srgb, var(--flame) 6%, transparent), transparent 60%); }
.svc-index { font-size: 14px; color: var(--flame); padding-top: 8px; }
.svc-body h3 { font-family: var(--display); font-weight: 500; font-size: clamp(24px, 3.2vw, 34px); letter-spacing: -0.02em; margin-bottom: 12px; }
.svc-body p { color: var(--mist); max-width: 60ch; }
.svc-tags { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; }
.svc-tags span { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mist); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; transition: border-color 0.3s, color 0.3s; }
.svc:hover .svc-tags span { border-color: color-mix(in srgb, var(--flame) 40%, var(--line)); }

/* ========================================================
   WHY
   ======================================================== */
.why { background: var(--ink-2); border-block: 1px solid var(--line-soft); }
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.why-item { background: var(--ink-2); padding: clamp(28px, 4vw, 48px); transition: background 0.4s; }
.why-item:hover { background: var(--ink-3); }
.why-item h3 { font-family: var(--display); font-weight: 500; font-size: clamp(20px, 2.6vw, 27px); letter-spacing: -0.01em; margin-bottom: 14px; position: relative; padding-left: 22px; }
.why-item h3::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 10px; height: 1px; background: var(--flame); }
.why-item p { color: var(--mist); }

/* ========================================================
   METHOD
   ======================================================== */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: none; }
.step { position: relative; padding-top: 34px; border-top: 1px solid var(--line); }
.step-num { position: absolute; top: -14px; left: 0; font-size: 13px; color: var(--flame); background: var(--ink); padding-right: 12px; }
.step h3 { font-family: var(--display); font-weight: 500; font-size: clamp(20px, 2.4vw, 26px); margin-bottom: 10px; }
.step p { color: var(--mist); font-size: 15.5px; }

/* ========================================================
   PRESENCE
   ======================================================== */
.presence { background: var(--ink-2); border-block: 1px solid var(--line-soft); overflow: hidden; }
.presence-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
.presence-text { color: var(--mist); max-width: 46ch; margin-top: 24px; }
.presence-list { list-style: none; margin-top: 40px; display: flex; flex-direction: column; gap: 0; }
.presence-list li { display: flex; flex-direction: column; gap: 4px; padding: 20px 0; border-top: 1px solid var(--line); }
.presence-list li:last-child { border-bottom: 1px solid var(--line); }
.pl-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--flame); }
.pl-place { color: var(--paper); font-size: 16px; }

.presence-map { position: relative; }
.map-svg { width: 100%; height: auto; }
.meridians ellipse, .meridians line { fill: none; stroke: var(--line); stroke-width: 1; }
.map-route { fill: none; stroke: var(--flame); stroke-width: 1.5; opacity: 0.7; stroke-dasharray: 1; stroke-dashoffset: 1; }
.map-route.r2 { opacity: 0.45; } .map-route.r3 { opacity: 0.55; }
.in-view .map-route { animation: drawArc 2.4s var(--ease) forwards; }
.in-view .map-route.r2 { animation-delay: 0.25s; } .in-view .map-route.r3 { animation-delay: 0.5s; }
.map-node circle { fill: var(--flame); }
.map-node.hq circle { fill: var(--flame); }
.map-node text { fill: var(--mist); font-size: 12px; letter-spacing: 0.1em; text-anchor: middle; }
.map-node.hq text { fill: var(--paper); }
.map-node .pulse { fill: none; stroke: var(--flame); stroke-width: 1.5; transform-origin: 170px 360px; animation: pulse 2.6s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(4); opacity: 0; } }

/* ========================================================
   CONTACT
   ======================================================== */
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 88px); align-items: start; }
.contact-lead { color: var(--mist); max-width: 44ch; margin-top: 24px; }
.contact-direct { list-style: none; margin-top: 44px; display: flex; flex-direction: column; gap: 0; }
.contact-direct li { display: flex; flex-direction: column; gap: 3px; padding: 18px 0; border-top: 1px solid var(--line); }
.contact-direct li:last-child { border-bottom: 1px solid var(--line); }
.cd-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--mist-dim); }
.contact-direct a { color: var(--paper); transition: color 0.2s; width: fit-content; }
.contact-direct a:hover { color: var(--flame); }

.contact-form { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(26px, 3.5vw, 40px); }
.field { margin-bottom: 22px; }
.field label { display: block; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--mist); margin-bottom: 9px; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--ink); color: var(--paper);
  border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px;
  font-family: var(--body); font-size: 16px; transition: border-color 0.25s, background 0.25s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238A97AD' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 44px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--flame); background: var(--ink-3); }
.field-error { display: none; margin-top: 7px; font-family: var(--mono); font-size: 12px; color: var(--flame-soft); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--flame); }
.field.invalid .field-error { display: block; }

.form-status { margin-top: 16px; font-family: var(--mono); font-size: 13px; min-height: 1em; }
.form-status.ok { color: var(--flame); }

/* ========================================================
   FOOTER
   ======================================================== */
.site-footer { border-top: 1px solid var(--line); padding-top: clamp(56px, 7vw, 88px); padding-bottom: 30px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 40px; align-items: start; }
.footer-slogan { color: var(--mist); margin-top: 16px; font-style: italic; max-width: 28ch; }
.footer-nav { display: flex; flex-direction: column; gap: 12px; }
.footer-nav a { color: var(--mist); width: fit-content; transition: color 0.2s; }
.footer-nav a:hover { color: var(--flame); }
.footer-contact { display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: var(--mist); }
.footer-contact a:hover { color: var(--flame); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--mist-dim); }

/* ========================================================
   REVEAL ANIMATION
   ======================================================== */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.hero .reveal { transition-duration: 1s; }
/* staggered hero lines */
.hero-title .line:nth-child(1) { transition-delay: 0.05s; }
.hero-title .line:nth-child(2) { transition-delay: 0.15s; }
.hero-title .line:nth-child(3) { transition-delay: 0.25s; }
.hero-sub { transition-delay: 0.35s; }
.hero-cta { transition-delay: 0.45s; }

/* ========================================================
   RESPONSIVE
   ======================================================== */
@media (max-width: 960px) {
  .nav { display: none; }
  .menu-toggle { display: flex; }
  .header-actions .btn-primary { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 40px 28px; }
  .presence-inner, .contact-inner { grid-template-columns: 1fr; }
  .presence-map { order: -1; max-width: 440px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }

  /* Hero: eyebrow sur deux lignes nettes, sans escalier */
  .hero { padding-top: 104px; }
  .eyebrow { flex-wrap: wrap; gap: 8px 12px; font-size: 11px; letter-spacing: 0.16em; }
  .hero .eyebrow { flex-direction: column; align-items: flex-start; gap: 8px; }
  .hero .eyebrow .sep { display: none; }
  .hero-title { margin-bottom: 26px; }
  .hero-sub { font-size: 17px; }

  /* Hero: boutons empilés pleine largeur (plus de texte sur 2 lignes) */
  .hero-cta { flex-direction: column; align-items: stretch; gap: 12px; margin-top: 34px; }
  .hero-cta .btn { width: 100%; padding-block: 16px; }

  .svc { grid-template-columns: 40px 1fr; gap: 12px 16px; }
  .svc-index { padding-top: 6px; }
  .svc-tags { grid-column: 1 / -1; padding-top: 4px; }
  .why-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 34px; }
  .stats-grid { gap: 28px 20px; }
  .contact-form { padding: 22px 18px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 6px; }
}

@media (max-width: 380px) {
  :root { --gutter: 18px; }
  .brand { font-size: 21px; }
  .hero-title { font-size: 40px; }
  .section-title { font-size: 28px; }
}
