/* ============================================================
   theme.css — Design system partagé (style « index4 »)
   Source de vérité unique pour toutes les pages de contenu.
   Polices : Fraunces (titres) + IBM Plex Sans (corps) + IBM Plex Mono (eyebrows)
   ============================================================ */

:root {
  /* Palette index4 */
  --ink: #050d20;
  --navy: #0a1733;
  --navy-2: #0c1f47;
  --royal: #064dd9;
  --electric: #2f6bff;
  --gold: #c9a84c;
  --gold-bright: #e6c860;
  --gold-deep: #9a7a20;
  --paper: #f3f6fc;
  --cloud: #e4ecfa;
  --line: #d4def2;
  --body: #16213a;
  --muted: #54647e;
  --white: #ffffff;

  /* Alias de compatibilité (anciens tokens encore référencés en inline) */
  --blue: #064dd9;
  --blue-dark: #0a1733;
  --blue-mid: #1a3a7a;
  --blue-light: #e8f0fe;
  --grey-text: #54647e;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;

  --card-shadow: 0 1px 2px rgba(5, 13, 32, 0.05), 0 14px 38px rgba(5, 13, 32, 0.08);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--gold); color: var(--ink); }
a { color: inherit; }

/* ============ PRIMITIVES ============ */
.container { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
section { padding: clamp(76px, 9vw, 116px) 0; position: relative; }

h1 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: var(--white);
}
h2 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: clamp(32px, 4.6vw, 52px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin-bottom: 10px;
}
h2 em { font-style: italic; color: var(--royal); }
h3 {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
  line-height: 1.4;
}

/* Eyebrow / étiquette de section */
.section-label,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--royal);
  margin-bottom: 22px;
}
.section-label::before,
.eyebrow::before {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--gold);
  transform: rotate(45deg);
  flex-shrink: 0;
}
.center .eyebrow, .center .section-label { justify-content: center; }

/* Trait d'accent doré (remplace l'ancien .accent-line bleu) */
.accent-line {
  display: block;
  width: 64px;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), rgba(201, 168, 76, 0));
  border-radius: 2px;
  margin: 18px 0 44px;
}
.accent-line.center { margin-left: auto; margin-right: auto; background: linear-gradient(90deg, rgba(201,168,76,0), var(--gold), rgba(201,168,76,0)); }

/* Séparateur losange (optionnel) */
.divider-diamond { display: flex; align-items: center; justify-content: center; gap: 14px; width: 170px; margin: 22px auto 0; }
.dd-line { height: 1.5px; width: 56px; background: linear-gradient(90deg, transparent, var(--gold)); }
.dd-line.dd-right { background: linear-gradient(90deg, var(--gold), transparent); }
.dd-gem { width: 9px; height: 9px; flex-shrink: 0; background: var(--gold); transform: rotate(45deg); box-shadow: 0 0 0 4px rgba(201, 168, 76, 0.14); }

/* ============ BOUTONS ============ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--royal);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  padding: 17px 34px;
  border-radius: 4px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.2s;
  box-shadow: 0 10px 30px rgba(6, 77, 217, 0.32);
}
.btn-primary:hover { transform: translateY(-3px); background: var(--electric); box-shadow: 0 18px 42px rgba(47, 107, 255, 0.42); }
.btn-primary:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  padding: 17px 34px;
  border-radius: 4px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.2s;
  box-shadow: 0 10px 30px rgba(201, 168, 76, 0.38);
}
.btn-hero:hover { transform: translateY(-3px); background: var(--gold-bright); box-shadow: 0 18px 42px rgba(201, 168, 76, 0.5); }

.btn-ghost-gold {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--gold); color: var(--ink);
  font-family: var(--font-body); font-weight: 700; font-size: 15px;
  padding: 17px 34px; border-radius: 4px; text-decoration: none; border: none; cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  box-shadow: 0 10px 30px rgba(201, 168, 76, 0.38);
}
.btn-ghost-gold:hover { transform: translateY(-3px); background: var(--gold-bright); box-shadow: 0 18px 42px rgba(201, 168, 76, 0.5); }

.arrow { display: inline-block; transition: transform 0.25s var(--ease); }
.btn-primary:hover .arrow, .btn-hero:hover .arrow, .btn-ghost-gold:hover .arrow { transform: translateX(6px); }

/* ============ NAV ============ */
.top-bar { height: 4px; background: linear-gradient(90deg, var(--navy) 0%, var(--royal) 50%, var(--gold) 100%); }
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 36px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-left { display: flex; align-items: center; gap: 18px; }
.nav-logo { font-family: var(--font-display); font-weight: 600; font-size: 23px; color: var(--navy); text-decoration: none; letter-spacing: -0.02em; white-space: nowrap; }
.logo-accent { color: var(--gold-deep); font-style: italic; }
.nav-logo-short { display: inline; }
.nav-logo-long { display: none; }
@media (min-width: 769px) {
  .nav-logo-short { display: none; }
  .nav-logo-long { display: inline; }
}
.nav-divider { width: 1px; height: 32px; background: var(--line); flex-shrink: 0; }
.nav-ia-logo { height: 30px; width: auto; display: block; object-fit: contain; padding: 3px 4px; }
.nav-cta {
  display: inline-flex; align-items: center;
  background: var(--ink); color: var(--white);
  font-family: var(--font-mono); font-weight: 600; font-size: 12px;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 12px 22px; border-radius: 4px; text-decoration: none;
  transition: background 0.2s, transform 0.2s var(--ease); white-space: nowrap;
}
.nav-cta:hover { background: var(--royal); transform: translateY(-2px); }
.nav-cta-short { display: none; }
.nav-cta-long { display: inline; }

/* ============ HERO DE PAGE ============ */
#page-hero {
  background:
    radial-gradient(ellipse at 82% 0%, rgba(47, 107, 255, 0.40) 0%, transparent 52%),
    radial-gradient(ellipse at 0% 100%, rgba(201, 168, 76, 0.12) 0%, transparent 46%),
    linear-gradient(160deg, #050d20 0%, #0a1733 55%, #0a1f4d 100%);
  padding: clamp(64px, 8vw, 104px) 0 clamp(72px, 9vw, 110px);
  overflow: hidden;
}
#page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at 50% 35%, #000 35%, transparent 82%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 35%, #000 35%, transparent 82%);
}
#page-hero .container { position: relative; z-index: 1; }
.breadcrumb {
  display: flex; align-items: center; justify-content: flex-start; gap: 8px;
  margin-bottom: 28px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.55);
  background: transparent; border: none; padding: 0; position: static; backdrop-filter: none;
}
.breadcrumb a { color: rgba(255, 255, 255, 0.65); text-decoration: none; }
.breadcrumb a:hover { color: var(--white); }
#page-hero h1 {
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: var(--white);
  margin-bottom: 22px;
}
#page-hero h1 em { font-style: italic; font-weight: 500; color: var(--gold); }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 22px;
}
.hero-eyebrow::before { content: ''; width: 10px; height: 10px; background: var(--gold); transform: rotate(45deg); flex-shrink: 0; }
.hero-lead { font-size: 19px; color: rgba(255, 255, 255, 0.7); line-height: 1.75; margin-bottom: 34px; max-width: 560px; }
.hero-lead strong { color: var(--white); font-weight: 600; }
.hero-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 28px; }
.hero-trust-item { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.02em; color: rgba(255, 255, 255, 0.55); }
.hero-trust-item svg { width: 14px; height: 14px; stroke: var(--gold); fill: none; stroke-width: 2.8; flex-shrink: 0; }

/* ============ FONDS DE SECTION (utilitaires) ============ */
.bg-soft { background: linear-gradient(160deg, #f4f7fd 0%, #edf1fb 100%); }
.bg-paper { background: var(--paper); }
.bg-cloud { background: var(--cloud); }
.bg-dots { position: relative; overflow: hidden; background: var(--white); }
.bg-dots::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(6, 77, 217, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
.bg-dots > .container { position: relative; z-index: 1; }

/* ============ GRILLE DE CONTENU ============ */
.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.content-grid p { font-size: 16.5px; color: #334155; line-height: 1.85; margin-bottom: 16px; }
.content-grid p:last-child { margin-bottom: 0; }

/* ============ CARTES ============ */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 8px; }
.card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 32px 28px;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
  overflow: hidden;
}
.card::after {
  content: '';
  position: absolute; left: 0; top: 0; height: 4px; width: 100%;
  background: linear-gradient(90deg, var(--royal), var(--gold));
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.card:hover { transform: translateY(-7px); box-shadow: 0 24px 54px rgba(5, 13, 32, 0.15); border-color: transparent; }
.card:hover::after { transform: scaleX(1); }
.card-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, var(--royal), var(--electric));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 8px 20px rgba(6, 77, 217, 0.28);
  transition: transform 0.35s var(--ease);
}
.card:hover .card-icon { transform: rotate(-8deg) scale(1.06); }
.card-icon svg { width: 24px; height: 24px; stroke: var(--white); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 17px; font-weight: 700; color: var(--navy); margin-bottom: 8px; line-height: 1.35; }
.card p { font-size: 14px; color: var(--muted); line-height: 1.65; }

/* Cartes service (4 colonnes) + lien de carte */
.cards-services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 8px; }
.card-service { background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 28px; transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.card-service:hover { transform: translateY(-6px); box-shadow: 0 22px 50px rgba(5, 13, 32, 0.12); }
.svc-ico { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 14px; background: linear-gradient(135deg, var(--royal), var(--electric)); box-shadow: 0 10px 22px rgba(6, 77, 217, 0.3); margin-bottom: 18px; }
.svc-ico svg { width: 27px; height: 27px; stroke: var(--white); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card-service h3 { font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.card-service p { font-size: 13.5px; color: var(--muted); line-height: 1.7; }
.card-link, .card-action-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 14px;
  color: var(--royal); font-family: var(--font-mono); font-weight: 600; font-size: 12.5px; letter-spacing: 0.02em;
  text-decoration: none; transition: gap 0.2s var(--ease);
}
.card-link:hover, .card-action-link:hover { gap: 10px; }
.card-service-more {
  grid-column: span 2;
  background: linear-gradient(150deg, #0a1733 0%, #0c1f47 100%);
  border-color: transparent;
}
.card-service-more h3, .card-service-more p { color: var(--white); }
.card-service-more .svc-ico { background: linear-gradient(135deg, var(--gold-deep), var(--gold-bright)); box-shadow: 0 10px 22px rgba(201, 168, 76, 0.34); }
.card-service-more .svc-ico svg { stroke: var(--ink); }
.more-list { list-style: none; margin-top: 14px; display: grid; gap: 9px; }
.more-list li { display: flex; align-items: flex-start; gap: 11px; font-size: 13.5px; color: rgba(255, 255, 255, 0.78); line-height: 1.55; }
.more-list li em { color: rgba(255, 255, 255, 0.5); font-style: italic; }
.more-list svg { width: 18px; height: 18px; stroke: var(--gold); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; margin-top: 1px; }

/* Titre de section centré + sous-titre (style index4) */
.center { text-align: center; }
.lead-under { font-size: 18px; color: var(--muted); max-width: 600px; margin-top: 20px; line-height: 1.7; }
.center .lead-under { margin-left: auto; margin-right: auto; }

/* ============ LISTE D'ÉTAPES ============ */
.steps-list { list-style: none; display: flex; flex-direction: column; gap: 24px; }
.step-item { display: flex; gap: 20px; align-items: flex-start; }
.step-num {
  flex-shrink: 0; width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--royal), var(--electric));
  color: var(--white); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 16px; font-weight: 700;
  box-shadow: 0 8px 18px rgba(6, 77, 217, 0.28);
}
.step-text h3 { font-size: 16px; margin-bottom: 4px; }
.step-text p { font-size: 14px; color: var(--muted); line-height: 1.65; }

/* ============ FAQ ============ */
#faq { background: linear-gradient(160deg, #f4f7fd 0%, #edf1fb 100%); }
.faq-header { text-align: center; margin-bottom: 56px; }
.faq-subtitle { font-size: 17px; color: var(--muted); max-width: 560px; margin: 16px auto 0; line-height: 1.65; }
.faq-list { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--white); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; transition: box-shadow 0.25s, border-color 0.25s; }
.faq-item.open { border-color: rgba(201, 168, 76, 0.55); box-shadow: 0 10px 32px rgba(5, 13, 32, 0.09); }
.faq-question {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 23px 28px; background: none; border: none; cursor: pointer; text-align: left;
  font-family: var(--font-body); font-size: 16.5px; font-weight: 600; color: var(--navy); gap: 16px;
  transition: color 0.2s;
}
.faq-item.open .faq-question { color: var(--royal); }
.faq-question:focus-visible { outline: 3px solid var(--royal); outline-offset: -3px; }
.faq-chevron { width: 20px; height: 20px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.3s var(--ease); }
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.35s var(--ease); }
.faq-answer-inner { padding: 16px 28px 24px; font-size: 15px; color: #475569; line-height: 1.85; border-top: 1px solid var(--line); }

/* ============ CTA FINAL ============ */
#cta-section {
  background:
    radial-gradient(ellipse at 80% 0%, rgba(47, 107, 255, 0.35) 0%, transparent 55%),
    linear-gradient(150deg, #0a1733 0%, #0c1f47 60%, #064dd9 140%);
  border-top: 4px solid var(--gold);
  padding: clamp(76px, 9vw, 104px) 0;
  text-align: center;
  overflow: hidden;
}
#cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 30px 30px;
  pointer-events: none;
}
#cta-section .container { position: relative; z-index: 1; }
#cta-section h2 { color: var(--white); margin-bottom: 16px; }
#cta-section p { color: rgba(255, 255, 255, 0.72); font-size: 17px; margin-bottom: 34px; max-width: 500px; margin-left: auto; margin-right: auto; }
#cta-section .btn-primary { background: var(--gold); color: var(--ink); box-shadow: 0 10px 30px rgba(201, 168, 76, 0.38); }
#cta-section .btn-primary:hover { background: var(--gold-bright); box-shadow: 0 18px 42px rgba(201, 168, 76, 0.5); }
.cta-trust { margin-top: 18px; font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.02em; color: rgba(255, 255, 255, 0.6); }

/* ============ FOOTER ============ */
footer { background: var(--ink); border-top: 4px solid var(--gold); padding: 68px 40px 32px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 40px; max-width: 1080px; margin: 0 auto 40px; }
.footer-col h4 { font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--white); margin-bottom: 12px; }
.footer-col p, .footer-col a { font-size: 13px; color: #8295b5; line-height: 1.9; text-decoration: none; display: block; }
.footer-col a:hover { color: rgba(255, 255, 255, 0.9); }
.footer-link { display: inline; text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.footer-bottom { max-width: 1080px; margin: 0 auto; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.07); text-align: center; font-size: 11px; color: rgba(255, 255, 255, 0.3); line-height: 1.8; }

/* ============ LIEN INTERNE INLINE ============ */
.page-link { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; text-decoration-color: rgba(201, 168, 76, 0.5); transition: color 0.15s; }
.page-link:hover { color: var(--royal); }

/* ============ SCROLL REVEAL (page-content.js) ============ */
.fade-up { opacity: 0; transform: translateY(38px); transition: opacity 0.75s var(--ease), transform 0.75s var(--ease); }
.fade-up.visible { opacity: 1; transform: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  nav { padding: 16px 22px; }
  .content-grid { grid-template-columns: 1fr; gap: 40px; }
  .cards-3 { grid-template-columns: 1fr 1fr; }
  .cards-services { grid-template-columns: 1fr 1fr; }
  .card-service-more { grid-column: span 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section-label, .eyebrow, .hero-eyebrow { flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .nav-cta-short { display: inline; }
  .nav-cta-long { display: none; }
  .cards-3 { grid-template-columns: 1fr; }
  .cards-services { grid-template-columns: 1fr; }
  .card-service-more { grid-column: span 1; }
  .footer-grid { grid-template-columns: 1fr; }

  /* Nav compacte sur petit écran (évite que le bouton déborde) */
  nav { padding: 12px 14px; }
  .nav-left { gap: 10px; }
  .nav-logo { font-size: 16px; }
  .nav-ia-logo { height: 17px; }
  .nav-cta { padding: 9px 13px; font-size: 10.5px; letter-spacing: 0.04em; }

  /* Marges latérales un peu plus serrées */
  .container { padding: 0 20px; }

  /* Eyebrows : interlettrage réduit pour un rendu propre */
  .section-label, .eyebrow, .hero-eyebrow { font-size: 11px; letter-spacing: 0.1em; gap: 8px; margin-bottom: 18px; }

  /* Hero de page : titre fluide qui ne déborde jamais */
  #page-hero { padding: 52px 0 60px; }
  #page-hero h1 { font-size: clamp(29px, 8.5vw, 42px); }
  .hero-lead { font-size: 16.5px; }
  .breadcrumb { font-size: 11px; flex-wrap: wrap; }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .fade-up { opacity: 1; transform: none; }
}
