/* ==========================================================
   Thalos IA — feuille de style
   Système : bleu marine (confiance) + orange (action)
   ========================================================== */

:root {
  /* Couleurs */
  --navy-950: #0B1220;
  --navy-900: #0F172A;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748B;
  --slate-300: #CBD5E1;
  --slate-200: #E2E8F0;
  --slate-100: #F1F5F9;
  --bg: #F8FAFC;
  --surface: #FFFFFF;

  --blue-700: #1D4ED8;
  --blue-600: #2563EB;
  --blue-100: #DBEAFE;
  --blue-50: #EFF6FF;
  --blue-300: #93C5FD;

  --orange-500: #F97316;
  --orange-600: #EA580C;
  --orange-700: #C2410C;
  --orange-50: #FFF7ED;

  --green-600: #16A34A;

  /* Texte sémantique */
  --text: var(--navy-900);
  --text-body: var(--slate-700);
  --text-muted: var(--slate-500);

  /* Typo */
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Rayons et ombres */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, .08), 0 2px 4px -2px rgba(15, 23, 42, .05);
  --shadow-lg: 0 24px 48px -16px rgba(15, 23, 42, .18), 0 8px 16px -8px rgba(15, 23, 42, .08);

  /* Mouvement */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --dur: 220ms;

  --header-h: 68px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

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

h1, h2, h3 {
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 800;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--blue-600); }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

.i {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:focus-visible {
  outline: 3px solid var(--blue-600);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--navy-900);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: var(--r-md);
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  touch-action: manipulation;
  transition: background-color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              transform var(--dur) var(--ease-out);
}
.btn:active { transform: scale(.98); }

/* Orange + texte marine : contraste 6.4:1 */
.btn-cta {
  background: var(--orange-500);
  color: var(--navy-900);
  box-shadow: 0 6px 16px -6px rgba(249, 115, 22, .55);
}
.btn-cta:hover {
  background: var(--orange-600);
  box-shadow: 0 10px 22px -8px rgba(234, 88, 12, .6);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--slate-200);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { border-color: var(--slate-300); background: var(--slate-100); }
.btn-ghost .i { transition: transform var(--dur) var(--ease-out); }
.btn-ghost:hover .i { transform: translateX(3px); }

.btn-sm { min-height: 44px; padding: 0 18px; font-size: .9375rem; border-radius: var(--r-sm); }
.btn-lg { min-height: 58px; padding: 0 30px; font-size: 1.0625rem; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(248, 250, 252, .85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur), box-shadow var(--dur);
}
.site-header.is-scrolled {
  border-bottom-color: var(--slate-200);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1875rem;
  letter-spacing: -0.01em;
  min-height: 44px;
}
.brand strong { font-weight: 800; color: var(--blue-600); }
.brand-mark { width: 32px; height: 32px; flex-shrink: 0; }

.main-nav { display: none; gap: 4px; }
.main-nav a {
  color: var(--slate-600);
  text-decoration: none;
  font-weight: 500;
  font-size: .9375rem;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  transition: color var(--dur), background-color var(--dur);
}
.main-nav a:hover { color: var(--text); background: var(--slate-100); }

/* ---------- Eyebrow / titres de section ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue-700);
  margin-bottom: 16px;
}
.eyebrow .i { width: 16px; height: 16px; }
.eyebrow-light { color: var(--blue-300); }

.section { padding: 80px 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--slate-200); }

.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.625rem); }
.section-sub { margin-top: 16px; font-size: 1.125rem; color: var(--slate-600); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 48px 0 72px;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  /* grille discrète */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, .045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, .045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 40%, transparent 100%);
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 640px;
  height: 640px;
  right: -200px;
  top: -160px;
  background: radial-gradient(circle, rgba(37, 99, 235, .14), transparent 65%);
  pointer-events: none;
}

.hero-grid { display: grid; gap: 48px; align-items: center; }

.hero h1 {
  font-size: clamp(2.25rem, 1.4rem + 3.6vw, 3.75rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
}
.hl { color: var(--blue-600); }

.lead {
  margin-top: 20px;
  font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem);
  color: var(--slate-600);
  max-width: 560px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.reassure {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 24px;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--slate-600);
}
.reassure li { display: inline-flex; align-items: center; gap: 6px; }
.reassure .i { width: 18px; height: 18px; color: var(--green-600); stroke-width: 2.5; }

/* Carte workflow */
.hero-visual { position: relative; }

.flow-card {
  background: var(--surface);
  border: 1px solid var(--slate-200);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  max-width: 480px;
  margin: 0 auto;
}

.flow-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 16px;
  border-bottom: 1px solid var(--slate-200);
  margin-bottom: 16px;
}
.flow-kicker { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.flow-title { font-weight: 700; color: var(--text); font-size: 1.0625rem; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .8125rem;
  font-weight: 600;
  color: #166534;
  background: #DCFCE7;
  padding: 6px 12px;
  border-radius: 999px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-600);
  box-shadow: 0 0 0 0 rgba(22, 163, 74, .5);
  animation: pulse 2s infinite;
}

.flow-steps { display: grid; gap: 14px; position: relative; }
.flow-steps::before {
  /* fil qui relie les étapes */
  content: "";
  position: absolute;
  left: 31px;
  top: 28px;
  bottom: 28px;
  width: 2px;
  background: repeating-linear-gradient(to bottom, var(--slate-300) 0 5px, transparent 5px 10px);
}

.flow-step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--slate-200);
  border-radius: var(--r-md);
  animation: activate 8s infinite;
}
.flow-step:nth-child(2) { animation-delay: 2s; }
.flow-step:nth-child(3) { animation-delay: 4s; }
.flow-step:nth-child(4) { animation-delay: 6s; }

.flow-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--slate-200);
  color: var(--blue-600);
}

.flow-text { display: grid; min-width: 0; flex: 1; }
.flow-text strong { color: var(--text); font-size: .9375rem; font-weight: 700; line-height: 1.3; }
.flow-text small { color: var(--text-muted); font-size: .8125rem; }

.chip {
  font-size: .75rem;
  font-weight: 600;
  color: var(--slate-600);
  background: var(--surface);
  border: 1px solid var(--slate-200);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.chip-ai { color: var(--orange-700); background: var(--orange-50); border-color: #FED7AA; }

.flow-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 4px 0;
  border-top: 1px solid var(--slate-200);
  font-size: .875rem;
  font-weight: 500;
  color: var(--slate-600);
}
.flow-foot .i { width: 16px; height: 16px; color: var(--blue-600); }

.stack-note { text-align: center; margin-top: 16px; font-size: .875rem; color: var(--text-muted); }
.stack-note strong { color: var(--slate-700); }

@keyframes activate {
  0%, 30%, 100% {
    border-color: var(--slate-200);
    background: var(--bg);
    box-shadow: none;
  }
  4%, 24% {
    border-color: var(--blue-600);
    background: var(--blue-50);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
  }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .5); }
  70% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

/* ---------- Avant / Après ---------- */
.compare { display: grid; gap: 20px; }

.compare-card {
  position: relative;
  padding: 28px;
  border-radius: var(--r-lg);
  border: 1px solid var(--slate-200);
  background: var(--surface);
}
.compare-card h3 { font-size: 1.375rem; margin: 14px 0 20px; }

.compare-card.after {
  border-color: var(--blue-100);
  background: linear-gradient(160deg, var(--blue-50), var(--surface) 70%);
  box-shadow: var(--shadow-md);
}

.compare-list { display: grid; gap: 14px; }
.compare-list li { display: flex; gap: 12px; align-items: flex-start; }

.mark {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 50%;
  margin-top: 1px;
}
.mark .i { width: 15px; height: 15px; stroke-width: 2.75; }
.before .mark { background: var(--slate-100); color: var(--slate-500); }
.before .compare-list li { color: var(--slate-600); }
.after .mark { background: var(--blue-600); color: #fff; }
.after .compare-list li { color: var(--text); font-weight: 500; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .8125rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
}
.pill .i { width: 16px; height: 16px; }
.pill-muted { background: var(--slate-100); color: var(--slate-600); }
.pill-blue { background: var(--blue-600); color: #fff; }
.pill-orange { background: var(--orange-50); color: var(--orange-700); border: 1px solid #FED7AA; }

/* ---------- Étapes ---------- */
.steps { display: grid; gap: 20px; counter-reset: none; }

.step {
  padding: 28px;
  border-radius: var(--r-lg);
  background: var(--bg);
  border: 1px solid var(--slate-200);
  transition: border-color var(--dur), box-shadow var(--dur), transform var(--dur) var(--ease-out);
}
.step:hover { border-color: var(--blue-100); box-shadow: var(--shadow-md); transform: translateY(-2px); }

.step-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.step-num {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--blue-600);
  font-variant-numeric: tabular-nums;
}
.step h3 { font-size: 1.25rem; margin-bottom: 10px; }
.step p { color: var(--slate-600); }

.tag {
  font-size: .8125rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--slate-100);
  color: var(--slate-700);
}
.tag-free { background: #DCFCE7; color: #166534; }

.steps-note { margin-top: 28px; color: var(--slate-600); font-weight: 500; }

/* ---------- Cas d'usage ---------- */
.case {
  display: grid;
  gap: 28px;
  padding: 32px;
  border-radius: var(--r-lg);
  background: var(--navy-900);
  color: #CBD5E1;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.case::after {
  content: "";
  position: absolute;
  inset: auto -120px -160px auto;
  width: 420px;
  height: 420px;
  z-index: -1;
  background: radial-gradient(circle, rgba(37, 99, 235, .35), transparent 65%);
}
.case h3 { color: #fff; font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem); margin: 16px 0 12px; }
.case p { font-size: 1.0625rem; max-width: 560px; }
.case .pill-orange { background: rgba(249, 115, 22, .14); color: #FDBA74; border-color: rgba(249, 115, 22, .3); }

.case-flow { display: grid; gap: 8px; align-content: center; }
.case-flow li:not(.case-arrow) {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #fff;
  font-weight: 600;
}
.case-flow li:not(.case-arrow) .i { color: var(--blue-300); }
.case-arrow { display: grid; place-items: center; color: #64748B; }
.case-arrow .i { width: 18px; height: 18px; }

.uses { display: grid; gap: 20px; }

.use {
  padding: 28px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--slate-200);
  transition: border-color var(--dur), box-shadow var(--dur), transform var(--dur) var(--ease-out);
}
.use:hover { border-color: var(--blue-100); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.use-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--blue-50);
  color: var(--blue-600);
  margin-bottom: 18px;
}
.use-icon .i { width: 24px; height: 24px; }
.use h3 { font-size: 1.1875rem; margin-bottom: 8px; }
.use p { color: var(--slate-600); }

.sectors {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 40px;
}
.sectors-label { font-weight: 700; color: var(--text); }
.sector-list { display: flex; flex-wrap: wrap; gap: 8px; }
.sector-list li {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--slate-200);
  font-size: .9375rem;
  font-weight: 500;
  color: var(--slate-700);
}

/* ---------- Bandeau CTA ---------- */
.cta-band {
  position: relative;
  padding: 88px 0;
  background: var(--navy-950);
  color: #CBD5E1;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 60% 80% at 50% 50%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 60% 80% at 50% 50%, #000 30%, transparent 100%);
}
.cta-band::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 50%;
  width: 760px;
  height: 760px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(37, 99, 235, .28), transparent 60%);
}

.cta-inner { max-width: 760px; }
.cta-band h2 { color: #fff; font-size: clamp(1.875rem, 1.2rem + 2.6vw, 2.875rem); }
.cta-band h2 + p { margin: 18px auto 32px; font-size: 1.125rem; max-width: 600px; }
.cta-alt { margin-top: 20px; font-size: .9375rem; }
.cta-alt a { color: #fff; font-weight: 600; text-underline-offset: 3px; }
.cta-alt a:hover { color: var(--blue-300); }
.cta-band :focus-visible { outline-color: var(--blue-300); }

/* ---------- Pied de page ---------- */
.site-footer {
  background: var(--navy-950);
  border-top: 1px solid rgba(255, 255, 255, .08);
  color: #94A3B8;
  padding: 40px 0;
  font-size: .9375rem;
}
.footer-inner { display: grid; gap: 28px; }
.brand-light { color: #fff; }
.brand-light strong { color: var(--blue-300); }
.footer-brand p { margin-top: 6px; }
.footer-links { display: grid; gap: 10px; }
.footer-links li { display: flex; align-items: center; gap: 10px; }
.footer-links .i { width: 18px; height: 18px; color: #64748B; }
.site-footer a { color: #E2E8F0; text-underline-offset: 3px; }
.site-footer a:hover { color: #fff; }
.site-footer :focus-visible { outline-color: var(--blue-300); }
.footer-legal { display: grid; gap: 6px; }

/* ---------- Apparition au défilement ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .uses { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .main-nav { display: flex; }
  .compare { grid-template-columns: 1fr 1fr; }
  .section { padding: 104px 0; }
  .footer-inner { grid-template-columns: 1.4fr 1fr auto; align-items: start; }
  .footer-legal { text-align: right; }
}

@media (min-width: 960px) {
  .hero { padding: 72px 0 104px; }
  .hero-grid { grid-template-columns: 1.1fr .9fr; gap: 56px; }
  .flow-card { margin: 0 0 0 auto; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .case { grid-template-columns: 1.3fr 1fr; padding: 44px; align-items: center; }
}

@media (max-width: 420px) {
  .header-inner .btn-sm { padding: 0 14px; font-size: .875rem; }
  .brand { font-size: 1.0625rem; }
  .hero-actions .btn { width: 100%; }
  .chip { display: none; }
  .compare-card, .step, .use { padding: 22px; }
  .case { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
