/* ============================================================
   Hi'Company — feuille de style
   Palette : indigo profond + accent teal, neutres teintés bleu
   Typo    : Schibsted Grotesk (titres) / IBM Plex Sans (texte)
             IBM Plex Mono (étiquettes, données)
   ============================================================ */

/* ---------- Jetons : thème clair (état par défaut) ---------- */
:root {
  --bg:            #F3F5FB;
  --surface:       #FFFFFF;
  --surface-alt:   #ECEFF9;
  --text:          #111433;
  --text-soft:     #3A3F63;
  --muted:         #5C628A;
  --line:          #DCE0F0;
  --line-strong:   #C3C9E4;
  --accent:        #3B35D6;
  --accent-hover:  #2E29B8;
  --accent-weak:   #E7E6FD;
  --on-accent:     #FFFFFF;
  --signal:        #0E9E90;
  --ring:          #3B35D6;
  --shadow:        0 1px 2px rgba(17, 20, 51, .05), 0 12px 32px -18px rgba(17, 20, 51, .35);
  --net-line:      rgba(59, 53, 214, .16);
  --net-dot:       rgba(59, 53, 214, .42);

  --font-display: "Schibsted Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body:    "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace;

  --shell:   1180px;
  --gutter:  clamp(20px, 5vw, 56px);
  --section: clamp(72px, 9vw, 128px);
  --radius:  14px;
}

/* ---------- Jetons : thème sombre (OS sombre, sauf choix explicite clair) ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:           #090B1A;
    --surface:      #111428;
    --surface-alt:  #161A33;
    --text:         #E9EAF6;
    --text-soft:    #C3C7E0;
    --muted:        #969CBE;
    --line:         #242943;
    --line-strong:  #333959;
    --accent:       #8D88FF;
    --accent-hover: #A5A1FF;
    --accent-weak:  #1C1E44;
    --on-accent:    #0B0C1F;
    --signal:       #3FD3C0;
    --ring:         #8D88FF;
    --shadow:       0 1px 2px rgba(0, 0, 0, .4), 0 18px 40px -22px rgba(0, 0, 0, .9);
    --net-line:     rgba(141, 136, 255, .18);
    --net-dot:      rgba(141, 136, 255, .5);
  }
}

/* ---------- Jetons : choix explicite sombre ---------- */
:root[data-theme="dark"] {
  --bg:           #090B1A;
  --surface:      #111428;
  --surface-alt:  #161A33;
  --text:         #E9EAF6;
  --text-soft:    #C3C7E0;
  --muted:        #969CBE;
  --line:         #242943;
  --line-strong:  #333959;
  --accent:       #8D88FF;
  --accent-hover: #A5A1FF;
  --accent-weak:  #1C1E44;
  --on-accent:    #0B0C1F;
  --signal:       #3FD3C0;
  --ring:         #8D88FF;
  --shadow:       0 1px 2px rgba(0, 0, 0, .4), 0 18px 40px -22px rgba(0, 0, 0, .9);
  --net-line:     rgba(141, 136, 255, .18);
  --net-dot:      rgba(141, 136, 255, .5);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.08;
  text-wrap: balance;
  margin: 0;
}

h1 { font-size: clamp(2.45rem, 5.4vw, 4.05rem); font-weight: 800; letter-spacing: -0.032em; }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.7rem); letter-spacing: -0.028em; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1rem; letter-spacing: -0.01em; }

p  { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 200;
  background: var(--accent);
  color: var(--on-accent);
  padding: 10px 18px;
  border-radius: 8px;
}
.skip:focus { left: 16px; }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Éléments de texte partagés ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.lede, .section-lede {
  color: var(--text-soft);
  font-size: 1.1rem;
  max-width: 62ch;
}

.section-head { max-width: 760px; margin-bottom: clamp(44px, 6vw, 72px); }
.section-head h2 + .section-lede { margin-top: 20px; }

.mono-label {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 14px;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-body);
  font-size: .97rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: var(--surface); border-color: var(--accent); color: var(--accent); }

.btn-sm { padding: 10px 20px; font-size: .9rem; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 72px;
}

.brand { display: inline-flex; align-items: center; gap: 11px; margin-right: auto; }
.brand-mark { display: block; width: 28px; height: 28px; color: var(--accent); }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.mark-dot { fill: var(--signal); }
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: -0.03em;
}
.brand-apos { color: var(--signal); }

.site-nav { display: flex; gap: 30px; }
.site-nav a {
  font-size: .95rem;
  color: var(--muted);
  padding-block: 6px;
  border-bottom: 1px solid transparent;
  transition: color .16s ease, border-color .16s ease;
}
.site-nav a:hover { color: var(--text); border-bottom-color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}
.nav-toggle span { display: block; width: 18px; height: 1.5px; margin-inline: auto; background: var(--text); }

.menu-mobile { display: none; }

/* ---------- Héros ---------- */
.hero { position: relative; overflow: hidden; }

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  padding-block: clamp(72px, 11vw, 148px) clamp(56px, 7vw, 92px);
}

.hero-copy h1 { max-width: 16ch; }
.hero-copy .lede { margin-top: 26px; max-width: 54ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }

.hero-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: clamp(56px, 8vw, 96px);
  background: var(--line);
  border-block: 1px solid var(--line);
}
.hero-pillars li {
  background: var(--bg);
  padding: 28px 28px 30px;
}
.hero-pillars p { color: var(--muted); font-size: .97rem; max-width: 34ch; }

.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-weak);
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 14px;
}

/* ---------- Services ---------- */
.services { padding-block: var(--section); }

.service {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 88px);
  padding-block: clamp(44px, 6vw, 68px);
  border-top: 1px solid var(--line);
}
.service:last-child { border-bottom: 1px solid var(--line); }

.service-aside { position: sticky; top: 104px; align-self: start; }
.service-aside h3 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); }
.service-aside p { margin-top: 16px; color: var(--muted); font-size: .99rem; }

.offer-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.offer-list li {
  background: var(--surface);
  padding: 22px 24px 24px;
  transition: background .18s ease;
}
.offer-list li:hover { background: var(--surface-alt); }
.offer-list h4 { color: var(--text); }
.offer-list p { margin-top: 8px; color: var(--muted); font-size: .92rem; line-height: 1.55; }

.deliverables {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: .82rem;
  line-height: 1.8;
  color: var(--muted);
}
.deliverables span {
  display: inline-block;
  color: var(--signal);
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: .7rem;
  margin-right: 10px;
}

/* ---------- Méthode ---------- */
.method { padding-block: var(--section); background: var(--surface-alt); }

/* 4 etapes ordonnees : une colonne par etape, pour que la sequence se lise en ligne */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 40px);
}
.steps li { position: relative; padding-top: 26px; border-top: 2px solid var(--accent); }
.steps h3 { margin-top: 14px; font-size: 1.16rem; }
.steps p { margin-top: 12px; color: var(--muted); font-size: .95rem; }

.step-no {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .14em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* ---------- Expertises ---------- */
.expertise { padding-block: var(--section); }

/* 6 familles, 3 colonnes : la grille reste toujours pleine, jamais de case vide */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.expertise-col { background: var(--surface); padding: 26px 24px 28px; }
.expertise-col h3 {
  font-size: .8rem;
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--signal);
}
.expertise-col ul { margin-top: 16px; display: flex; flex-direction: column; gap: 9px; }
.expertise-col li { color: var(--text-soft); font-size: .95rem; }

/* ---------- Pourquoi nous ---------- */
.why { padding-block: var(--section); background: var(--surface-alt); }

.why-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(26px, 3.5vw, 40px);
}
.why-list li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 30px 32px;
  box-shadow: var(--shadow);
}
.why-list h3 { font-size: 1.14rem; }
.why-list p { margin-top: 12px; color: var(--muted); font-size: .95rem; }

/* ---------- Contact ---------- */
.contact { padding-block: var(--section); }

.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(36px, 6vw, 84px);
  align-items: start;
}

.contact-copy h2 + .section-lede { margin-top: 20px; }

.contact-coords { margin: 36px 0 0; display: flex; flex-direction: column; gap: 18px; }
.contact-coords div { display: flex; flex-direction: column; gap: 3px; }
.contact-coords dt {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-coords dd { margin: 0; font-size: 1.02rem; }
.contact-coords a { border-bottom: 1px solid var(--line-strong); }
.contact-coords a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 36px);
  box-shadow: var(--shadow);
}
.field { display: flex; flex-direction: column; gap: 7px; }
.field-full { grid-column: 1 / -1; }
.field label {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: .97rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 11px 13px;
  width: 100%;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-weak);
}
.contact-form .btn { grid-column: 1 / -1; justify-self: start; }
.form-note { grid-column: 1 / -1; font-size: .88rem; color: var(--signal); min-height: 1.2em; }
.form-note[data-state="error"] { color: #D4453F; }

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 44px; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px 40px;
}
.footer-brand { margin-right: auto; }
.footer-brand p { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 22px; }
.site-footer nav a { font-size: .92rem; color: var(--muted); }
.site-footer nav a:hover { color: var(--accent); }
.copyright { width: 100%; color: var(--muted); font-size: .82rem; font-family: var(--font-mono); }

/* ---------- Apparition au défilement ---------- */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity .6s ease, transform .6s cubic-bezier(.22, .68, .36, 1);
}

/* ---------- Adaptatif ---------- */
@media (max-width: 900px) {
  .site-nav, .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .menu-mobile { display: block; border-top: 1px solid var(--line); background: var(--surface); }
  .menu-mobile[hidden] { display: none; }
  .menu-mobile a {
    display: block;
    padding: 14px var(--gutter);
    border-bottom: 1px solid var(--line);
    color: var(--text-soft);
    font-size: .98rem;
  }
  .service { grid-template-columns: 1fr; }
  .service-aside { position: static; }
  .contact-inner { grid-template-columns: 1fr; }
  .expertise-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .hero-pillars { grid-template-columns: 1fr; }
  .contact-form { grid-template-columns: 1fr; }
  .expertise-grid { grid-template-columns: 1fr; }
  .why-list { grid-template-columns: 1fr; }
  .offer-list { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal.is-visible { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
}
