/* ============================================================
   CodeBlanc — Feuille de style
   Palette : blanc cassé + noir/gris + bleu accent
   ============================================================ */

:root {
  /* Fonds — blanc cassé chaud */
  --bg:            #F8F7F4;
  --bg-alt:        #F1EFEA;
  --surface:       #FFFFFF;
  --dark:          #14161C;

  /* Texte — noir vers gris */
  --ink:           #17181C;
  --ink-2:         #45474F;
  --ink-3:         #8A8D96;
  --ink-inv:       #F5F6F8;

  /* Bleu accent + variantes — marine profond */
  --blue:          #1E3A8A;
  --blue-dark:     #142864;
  --blue-soft:     #E7ECF7;
  --blue-tint:     #F3F5FB;

  /* Lignes */
  --line:          #E4E1D9;
  --line-strong:   #D6D2C8;

  /* Divers */
  --radius:        14px;
  --radius-sm:     10px;
  --shadow-sm:     0 1px 2px rgba(20,22,28,.04), 0 2px 8px rgba(20,22,28,.04);
  --shadow-md:     0 10px 30px rgba(20,22,28,.08);
  --shadow-blue:   0 10px 26px rgba(30,58,138,.30);
  --maxw:          1120px;
  --ease:          cubic-bezier(.22,.61,.36,1);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink-2);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { color: var(--ink); line-height: 1.15; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.2rem; letter-spacing: -.01em; }

/* ===== Layout helpers ===== */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 780px; }
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 680px; margin-bottom: 52px; }
.section-lead { color: var(--ink-2); font-size: 1.1rem; margin-top: 14px; }

.eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 14px;
}
.eyebrow-light { color: #8FB0FF; }
.accent { color: var(--blue); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: .98rem;
  cursor: pointer; border: 1.5px solid transparent; transition: all .2s var(--ease);
  white-space: nowrap;
}
.btn-lg { padding: 15px 30px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: var(--shadow-blue); }
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248,247,244,.82);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.scrolled { border-color: var(--line); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark {
  height: 26px; width: auto; display: block;
  color: #0C1720; flex: 0 0 auto;
}
.logo-text { font-weight: 700; font-size: 1.2rem; color: var(--ink); letter-spacing: -.02em; }
.logo-text strong { color: var(--blue); font-weight: 800; }

.nav { display: flex; gap: 32px; }
.nav a { color: var(--ink-2); font-weight: 500; font-size: .96rem; transition: color .2s; }
.nav a:hover { color: var(--ink); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .25s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  display: none; flex-direction: column; gap: 4px;
  padding: 8px 24px 20px; background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.nav-mobile a { padding: 12px 4px; color: var(--ink-2); font-weight: 500; border-bottom: 1px solid var(--line); }
.nav-mobile a.btn { border: none; margin-top: 12px; color: #fff; }
.nav-mobile.open { display: flex; }

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden;
  padding: 96px 0 88px;
  background:
    radial-gradient(60% 90% at 85% -10%, var(--blue-soft) 0%, transparent 60%),
    radial-gradient(50% 70% at 0% 0%, #fff 0%, transparent 55%);
}
.hero h1 { margin-bottom: 22px; max-width: 15ch; }
.hero-sub { font-size: 1.18rem; max-width: 56ch; color: var(--ink-2); margin-bottom: 34px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 44px; }
.hero-badges {
  display: flex; flex-wrap: wrap; gap: 14px 36px; list-style: none; padding: 0;
  border-top: 1px solid var(--line); padding-top: 26px;
}
.hero-badges li { font-size: .95rem; color: var(--ink-3); }
.hero-badges strong { color: var(--ink); font-weight: 700; }

/* ===== Grids & Cards ===== */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 30px 28px;
  box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--ink-2); font-size: 1rem; }

.card-service { position: relative; }
.card-num {
  display: inline-block; font-size: .82rem; font-weight: 700; letter-spacing: .1em;
  color: var(--blue); background: var(--blue-soft);
  padding: 4px 10px; border-radius: 999px; margin-bottom: 16px;
}

/* ===== Technologies ===== */
.tech-groups { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.tech-group h3 { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 16px; }
.tech-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 9px; }
.tech-list li {
  background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  font-size: .92rem; font-weight: 500; padding: 7px 14px; border-radius: 999px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.tech-list li:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

/* ===== Steps ===== */
.steps { list-style: none; padding: 0; display: grid; gap: 4px; max-width: 820px; }
.step { display: flex; gap: 22px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: 0; }
.step-num {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 1.1rem;
  color: var(--blue); background: var(--blue-soft); border: 1.5px solid var(--blue);
}
.step h3 { margin-bottom: 6px; }
.step p { color: var(--ink-2); }

/* ===== Split (marque blanche, dark) ===== */
.section-dark { background: var(--dark); }
.section-dark h2 { color: #fff; }
.section-dark p { color: #B6BAC6; }
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.split-text h2 { margin-bottom: 18px; }

.check-list { list-style: none; padding: 0; margin-top: 24px; display: grid; gap: 14px; }
.check-list li { position: relative; padding-left: 32px; color: #C7CBD6; }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--blue); color: #fff; font-size: .75rem; font-weight: 700;
  display: grid; place-items: center;
}

.split-panel { display: flex; justify-content: center; }
.flow {
  width: 100%; max-width: 360px; display: grid; gap: 6px; text-align: center;
  background: #1B1E27; border: 1px solid #2A2E3A; border-radius: var(--radius);
  padding: 30px 26px; box-shadow: var(--shadow-md);
}
.flow-node {
  padding: 16px; border-radius: var(--radius-sm); font-weight: 600; color: #fff;
  background: #242834; border: 1px solid #333846;
}
.flow-node span { display: block; font-weight: 400; font-size: .82rem; color: #9AA0AE; margin-top: 3px; }
.flow-node-you { background: rgba(58,92,180,.22); border-color: #3A5CB4; }
.flow-node-me { background: var(--blue); border-color: var(--blue); box-shadow: var(--shadow-blue); }
.flow-node-me span { color: #D6E1FF; }
.flow-arrow { color: #4B5160; font-size: 1.1rem; }

/* ===== FAQ ===== */
.faq { display: grid; gap: 12px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 4px 22px; transition: border-color .2s, box-shadow .2s;
}
.faq-item[open] { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 18px 0; font-weight: 600; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; color: var(--blue); font-size: 1.5rem; font-weight: 400;
  transition: transform .25s var(--ease); line-height: 1;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--ink-2); padding: 0 0 20px; margin-top: -4px; }

/* ===== Contact form ===== */
.contact-form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label { font-size: .9rem; font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 12px 14px; transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft);
}
.field textarea { resize: vertical; }
.form-note { font-size: .85rem; color: var(--ink-3); text-align: center; margin-top: 4px; }

/* ===== Footer ===== */
.site-footer { background: var(--dark); color: #B6BAC6; padding: 88px 0 32px; }

/* Grande accroche */
.footer-cta { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; padding-bottom: 56px; margin-bottom: 56px; border-bottom: 1px solid #262A35; }
.footer-cta h2 { color: #fff; font-size: clamp(1.8rem, 4vw, 3rem); max-width: 16ch; letter-spacing: -.02em; }
.footer-cta .accent { color: #6E8FE8; }

/* Colonnes */
.footer-cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 56px; }
.footer-brand .logo { margin-bottom: 16px; }
.footer-brand .logo-mark { height: 26px; width: auto; color: #fff; }
.footer-brand .logo-text { color: #fff; }
.footer-brand p { font-size: .96rem; color: #8B90A0; max-width: 34ch; line-height: 1.7; }
.footer-brand .footer-mail { display: inline-block; margin-top: 18px; color: #fff; font-weight: 600; border-bottom: 1px solid #3A5CB4; padding-bottom: 2px; transition: border-color .2s; }
.footer-brand .footer-mail:hover { border-color: #6E8FE8; }
.footer-col h4 { color: #fff; font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 18px; }
.footer-col a { display: block; color: #A9AEBC; font-size: .95rem; padding: 7px 0; transition: color .2s, transform .2s; }
.footer-col a:hover { color: #fff; transform: translateX(3px); }

/* Barre basse */
.footer-bottom { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center; padding-top: 30px; border-top: 1px solid #262A35; }
.footer-bottom p { font-size: .85rem; color: #6C7180; }
.footer-made { font-size: .85rem; color: #6C7180; }

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .tech-groups { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 720px) {
  .section { padding: 68px 0; }
  .nav, .header-actions { display: none; }
  .nav-toggle { display: flex; }
  .grid-3 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 60px; }
}

.footer-legal { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-legal a { color: #8B90A0; font-size: .85rem; transition: color .2s; }
.footer-legal a:hover { color: #fff; }

/* ===== Pages légales ===== */
.legal-hero { background: var(--bg-alt); border-bottom: 1px solid var(--line); padding: 56px 0 48px; }
.legal-back { display: inline-flex; align-items: center; gap: 6px; color: var(--blue); font-weight: 600; font-size: .92rem; margin-bottom: 22px; }
.legal-back:hover { text-decoration: underline; }
.legal-hero .eyebrow { margin-bottom: 12px; }
.legal-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin-bottom: 14px; }
.legal-hero .updated { color: var(--ink-3); font-size: .92rem; }
.legal-hero .lead { color: var(--ink-2); font-size: 1.1rem; max-width: 60ch; margin-top: 16px; }

.legal-layout { display: grid; grid-template-columns: 230px 1fr; gap: 56px; padding: 56px 0 96px; align-items: start; }
.legal-toc { position: sticky; top: 96px; }
.legal-toc p { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.legal-toc a { display: block; color: var(--ink-2); font-size: .92rem; padding: 6px 0 6px 14px; border-left: 2px solid var(--line); transition: color .2s, border-color .2s; }
.legal-toc a:hover { color: var(--blue); border-color: var(--blue); }
.legal-toc a.active { color: var(--blue); border-color: var(--blue); font-weight: 600; }

.legal-content { max-width: 720px; }
.legal-content section { padding-top: 8px; margin-bottom: 40px; scroll-margin-top: 92px; }
.legal-content section + section { border-top: 1px solid var(--line); padding-top: 36px; }
.legal-content h2 { font-size: 1.4rem; margin-bottom: 14px; display: flex; align-items: baseline; gap: 12px; }
.legal-content h2 .num { color: var(--blue); font-size: .95rem; font-weight: 700; }
.legal-content h3 { font-size: 1.05rem; margin: 22px 0 8px; }
.legal-content p, .legal-content li { color: var(--ink-2); line-height: 1.75; }
.legal-content p + p { margin-top: 12px; }
.legal-content ul { padding-left: 20px; margin: 12px 0; display: grid; gap: 9px; }
.legal-content a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.legal-content .todo { background: #FFF7E6; border: 1px solid #F2D98A; color: #7A5A00; padding: 2px 7px; border-radius: 5px; font-size: .92em; font-weight: 600; }
.legal-content table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .95rem; }
.legal-content th, .legal-content td { text-align: left; padding: 11px 14px; border: 1px solid var(--line); vertical-align: top; }
.legal-content th { background: var(--bg-alt); font-weight: 600; color: var(--ink); }
.legal-note { background: var(--blue-tint); border: 1px solid var(--blue-soft); border-radius: var(--radius-sm); padding: 18px 20px; margin: 20px 0; font-size: .96rem; }

@media (max-width: 820px) {
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 32px; }
  .legal-layout { grid-template-columns: 1fr; gap: 8px; }
  .legal-toc { display: none; }
}
