/* ==========================================================================
   FibrLink – feuille de style (thème clair, mobile-first, sans dépendance)
   Univers : fibre optique – 12 brins colorés, impulsions lumineuses.
   ========================================================================== */

:root {
  --bg: #F7FAFE;
  --bg-2: #EEF4FC;
  --surface: #FFFFFF;
  --line: #E2E9F3;
  --line-strong: #CBD6E6;
  --text: #0B1A33;
  --text-2: #46546E;
  --text-3: #75829A;
  --blue: #1F5BFF;
  --blue-2: #1646D6;
  --blue-soft: #EAF0FF;
  --cyan: #00B4C6;
  --cyan-2: #00D4E4;
  --cyan-soft: #E3F8FA;
  --ok: #14A06A;
  --ok-soft: #E7F7F0;
  --error: #D5374B;
  --error-soft: #FFF1F3;
  --grad: linear-gradient(100deg, var(--blue) 0%, #2F7BFF 55%, var(--cyan) 100%);
  --grad-btn: linear-gradient(100deg, #1A4FE8 0%, #2D72FF 100%);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(11, 26, 51, .05), 0 2px 8px rgba(11, 26, 51, .04);
  --shadow: 0 1px 2px rgba(11, 26, 51, .04), 0 12px 32px -12px rgba(11, 26, 51, .14);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --header-h: 66px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* 12 brins de fibre */
  --f1: #E53935; --f2: #1E63E9; --f3: #2EAD4B; --f4: #F2B705;
  --f5: #8E44C9; --f6: #C9D2DE; --f7: #FF8A1F; --f8: #8A96A8;
  --f9: #8B5A2B; --f10: #1B1F2A; --f11: #1FC7C1; --f12: #FF6FAE;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-2); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.015em; color: var(--text); }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid rgba(31, 91, 255, .45); outline-offset: 3px; border-radius: 8px; }

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--blue); color: #fff; padding: 10px 16px; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Boutons ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  border: 0; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 15px; letter-spacing: .03em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), filter .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform .2s var(--ease); }
.btn-primary {
  color: #fff;
  background: var(--grad-btn);
  box-shadow: 0 8px 22px -8px rgba(31, 91, 255, .55);
}
/* Reflet lumineux qui traverse le bouton, comme une impulsion dans la fibre */
.btn-primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 35%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-20deg);
  animation: sweep 4.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes sweep { 0%, 55% { left: -40%; } 85%, 100% { left: 120%; } }
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(31, 91, 255, .6); }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-primary:active { transform: translateY(0); }
.btn-sm { min-height: 40px; padding: 8px 18px; font-size: 12.5px; }
.btn-lg { min-height: 56px; padding: 16px 30px; font-size: 15px; white-space: nowrap; }
.btn-block { width: 100%; }
@media (max-width: 380px) { .btn-lg { white-space: normal; padding: 14px 18px; font-size: 14px; } }
.btn[disabled] { cursor: wait; filter: saturate(.7) brightness(.95); transform: none; }
.btn[disabled]::after { animation-duration: 1.2s; animation-timing-function: linear; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s, background .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); background: rgba(255, 255, 255, .94); box-shadow: 0 6px 20px -14px rgba(11, 26, 51, .25); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; flex-shrink: 0; }
.brand-logo { width: 148px; height: auto; }
.logo-fibr, .logo-link {
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 30px; font-weight: 800; letter-spacing: 1.5px;
}
.logo-fibr { fill: var(--text); }
.logo-halo { animation: halo 3.2s ease-in-out infinite; }
@keyframes halo { 0%, 100% { opacity: .35; } 50% { opacity: .9; } }

.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav a { position: relative; color: var(--text-2); text-decoration: none; font-size: 15px; font-weight: 600; transition: color .2s; }
.main-nav a:hover { color: var(--text); }
.header-cta { display: none; }

.nav-toggle {
  margin-left: auto;
  width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 12px;
  background: var(--surface); cursor: pointer;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s, opacity .25s; }
.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); }

@media (max-width: 899px) {
  .main-nav {
    position: fixed; left: 0; right: 0; top: var(--header-h);
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -18px rgba(11, 26, 51, .25);
    padding: 6px 20px 18px;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .main-nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .main-nav li a { display: block; padding: 14px 4px; font-size: 17px; border-bottom: 1px solid var(--line); }
  .main-nav li:last-child a { border-bottom: 0; color: var(--blue); font-weight: 700; }
}
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .main-nav ul { display: flex; gap: 30px; }
  .main-nav a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; border-radius: 2px;
    background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
  }
  .main-nav a:hover::after { transform: scaleX(1); }
  .header-cta { display: inline-flex; margin-left: 14px; }
  .brand-logo { width: 164px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 36px 0 56px; isolation: isolate; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(640px 420px at 88% 18%, rgba(31, 91, 255, .10), transparent 70%),
    radial-gradient(520px 380px at 8% 92%, rgba(0, 180, 198, .10), transparent 70%),
    linear-gradient(180deg, #FFFFFF 0%, var(--bg) 100%);
}
.hero-bg::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(31, 91, 255, .16) 1px, transparent 1.2px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 10%, transparent 70%);
  mask-image: radial-gradient(ellipse at 70% 40%, #000 10%, transparent 70%);
}
.hero-fibers { position: absolute; inset: 0; width: 100%; height: 100%; }
.bg-fiber { fill: none; stroke: rgba(31, 91, 255, .10); stroke-width: 2; }
.bg-pulse {
  fill: none; stroke: var(--cyan-2); stroke-width: 2.5; stroke-linecap: round;
  stroke-dasharray: 7 93; stroke-dashoffset: 100; opacity: .7;
  animation: travel 9s linear infinite;
}
.bgp-2 { animation-duration: 11s; animation-delay: -4s; stroke: var(--blue); opacity: .45; }
.bgp-3 { animation-duration: 13s; animation-delay: -7s; }
@keyframes travel { to { stroke-dashoffset: 0; } }

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

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-sm);
  font-size: 12.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--blue);
  margin-bottom: 20px;
}
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(0, 180, 198, .55); } 70% { box-shadow: 0 0 0 10px rgba(0, 180, 198, 0); } 100% { box-shadow: 0 0 0 0 rgba(0, 180, 198, 0); } }

.hero h1 { font-size: clamp(2.05rem, 7.6vw, 3.7rem); font-weight: 800; margin-bottom: 20px; }
.text-gradient { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(1.06rem, 2.6vw, 1.25rem); color: var(--text); font-weight: 600; margin-bottom: 10px; }
.lead-sub { color: var(--text-2); max-width: 36em; }
.hero-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; margin-top: 26px; }
.hero-actions .btn { width: 100%; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14.5px; color: var(--text-2);
}
.hero-pill::before { content: ""; width: 22px; height: 3px; border-radius: 3px; background: var(--grad); }
.hero-pill strong { color: var(--text); }

/* Visuel câble 12 fibres */
.hero-visual { max-width: 560px; width: 100%; margin: 0 auto; }
.route-svg { width: 100%; height: auto; }
.splice-halo { animation: breathe 5s ease-in-out infinite; transform-origin: 280px 220px; }
@keyframes breathe { 0%, 100% { opacity: .55; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.04); } }
.sheath { stroke: url(#sheath-g); stroke-width: 20; stroke-linecap: round; }
.sheath-shine { stroke: rgba(255, 255, 255, .22); stroke-width: 3; stroke-linecap: round; }
.strand-casing { fill: none; stroke: #D9E1EC; stroke-width: 5.5; }
.strand { fill: none; stroke-width: 3.2; stroke-linecap: round; }
.strand-pulse {
  fill: none; stroke: #FFFFFF; stroke-width: 3.2; stroke-linecap: round;
  stroke-dasharray: 9 91; stroke-dashoffset: 100;
  animation: travel 3.2s linear infinite;
}
.sp-1 { animation-delay: -0.1s; }  .sp-2 { animation-delay: -1.7s; } .sp-3 { animation-delay: -0.9s; }
.sp-4 { animation-delay: -2.5s; }  .sp-5 { animation-delay: -0.4s; } .sp-6 { animation-delay: -2.1s; stroke: var(--cyan-2); }
.sp-7 { animation-delay: -1.3s; }  .sp-8 { animation-delay: -2.9s; } .sp-9 { animation-delay: -0.7s; }
.sp-10 { animation-delay: -1.9s; } .sp-11 { animation-delay: -2.7s; } .sp-12 { animation-delay: -1.1s; }
.box-body { fill: #FFFFFF; stroke: var(--line-strong); stroke-width: 1.5; }
.box-slot { fill: var(--bg-2); }
.led { fill: var(--cyan); animation: blink 1.6s ease-in-out infinite; }
.led-2 { fill: #2EAD4B; animation-delay: .8s; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.node-label { fill: var(--text); font: 800 18px var(--font); text-anchor: middle; }
.node-sub { fill: var(--text-3); font: 600 12.5px var(--font); text-anchor: middle; }
.fc-bg { fill: #FFFFFF; stroke: var(--line); }
.fc-check { fill: var(--ok-soft); stroke: var(--ok); stroke-width: 1.5; }
.fc-tick { fill: none; stroke: var(--ok); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fc-text { fill: var(--text); font: 700 14px var(--font); }
.float-card { animation: float 6s ease-in-out infinite; }
.fc-2 { animation-delay: -2s; }
.fc-3 { animation-delay: -4s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

@media (min-width: 560px) {
  .hero-actions { flex-direction: row; align-items: center; }
  .hero-actions .btn { width: auto; }
}
@media (min-width: 900px) {
  .hero { padding: 70px 0 96px; }
  .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 40px; }
}

/* ---------- Séparateur fibre ---------- */
.fiber-divider {
  position: relative; height: 2px; overflow: hidden;
  background: linear-gradient(90deg, transparent, var(--line-strong) 15%, var(--line-strong) 85%, transparent);
}
.fiber-divider::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -20%; width: 18%;
  background: linear-gradient(90deg, transparent, var(--cyan-2), var(--blue), transparent);
  animation: divider 6s linear infinite;
}
@keyframes divider { to { left: 110%; } }

/* ---------- Sections ---------- */
.section { padding: 72px 0; position: relative; }
.section-alt { background: var(--bg-2); }
.section-head { max-width: 720px; margin-bottom: 36px; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12.5px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--blue); margin-bottom: 12px;
}
.kicker::before { content: ""; width: 26px; height: 3px; border-radius: 3px; background: var(--grad); }
.section h2 { font-size: clamp(1.7rem, 5vw, 2.55rem); font-weight: 800; }
.section-intro { color: var(--text-2); font-size: 1.05rem; }

/* Compétences : chaque badge est une "fibre" colorée */
.skills { list-style: none; padding: 0; margin: 0 0 36px; display: flex; flex-wrap: wrap; gap: 10px; }
.skills li {
  --c: var(--f2);
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px 10px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 15px; font-weight: 600; color: var(--text);
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s;
}
.skills li::before {
  content: ""; width: 20px; height: 6px; border-radius: 6px; flex-shrink: 0;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(11, 26, 51, .08);
}
.skills li:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.skills li:nth-child(12n+1) { --c: var(--f1); }  .skills li:nth-child(12n+2) { --c: var(--f2); }
.skills li:nth-child(12n+3) { --c: var(--f3); }  .skills li:nth-child(12n+4) { --c: var(--f4); }
.skills li:nth-child(12n+5) { --c: var(--f5); }  .skills li:nth-child(12n+6) { --c: var(--f6); }
.skills li:nth-child(12n+7) { --c: var(--f7); }  .skills li:nth-child(12n+8) { --c: var(--f8); }
.skills li:nth-child(12n+9) { --c: var(--f9); }  .skills li:nth-child(12n+10) { --c: var(--f10); }
.skills li:nth-child(12n+11) { --c: var(--f11); } .skills li:nth-child(12n+12) { --c: var(--f12); }

.info-cards { display: grid; gap: 16px; }
.info-card {
  position: relative; overflow: hidden;
  padding: 26px 24px 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.info-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--grad); opacity: .85;
}
.info-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.info-card p { color: var(--text-2); margin: 0; }
.info-card-accent { background: linear-gradient(160deg, #FFFFFF 30%, var(--blue-soft)); border-color: #D3DEFF; }
.info-card .big-figure {
  font-size: 2.5rem; font-weight: 800; line-height: 1.05; margin-bottom: 4px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.info-icon {
  width: 46px; height: 46px; border-radius: 14px; margin-bottom: 14px;
  display: grid; place-items: center;
  color: var(--blue); background: var(--blue-soft);
}
.info-icon svg { width: 22px; height: 22px; }
@media (min-width: 760px) { .info-cards { grid-template-columns: repeat(3, 1fr); } }

/* Timeline : une fibre qui s'allume d'étape en étape */
.timeline { list-style: none; padding: 0; margin: 0 0 28px; display: grid; position: relative; }
.timeline::before, .timeline::after {
  content: ""; position: absolute; left: 27px; top: 28px; bottom: 28px; width: 3px; border-radius: 3px;
}
.timeline::before { background: var(--line-strong); }
.timeline::after {
  background: linear-gradient(180deg, var(--cyan-2), var(--blue));
  transform: scaleY(0); transform-origin: top;
  transition: transform 1.6s var(--ease) .2s;
}
.timeline.is-visible::after { transform: scaleY(1); }
.step { display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-content: start; position: relative; padding-bottom: 30px; z-index: 1; }
.step:last-child { padding-bottom: 0; }
.step-num {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 800; font-size: 17px; color: var(--blue);
  background: var(--surface); border: 2px solid #CFDBFF;
  box-shadow: 0 0 0 6px var(--bg-2), var(--shadow);
  transition: background .4s, color .4s, border-color .4s;
}
.step.is-visible .step-num { background: var(--blue); color: #fff; border-color: var(--blue); }
.step:nth-child(2).is-visible .step-num { transition-delay: .5s; }
.step:nth-child(3).is-visible .step-num { transition-delay: .9s; }
.step:nth-child(4).is-visible .step-num { transition-delay: 1.3s; background: linear-gradient(135deg, var(--blue), var(--cyan)); }
.step h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: .07em; margin: 15px 0 6px; }
.step p { color: var(--text-2); margin: 0; }
.fine-print { font-size: 13.5px; color: var(--text-3); margin: 0; }

@media (min-width: 900px) {
  .timeline { grid-template-columns: repeat(4, 1fr); gap: 22px; }
  .timeline::before, .timeline::after { left: 28px; right: calc(25% - 44px); top: 27px; bottom: auto; width: auto; height: 3px; }
  .timeline::after { background: linear-gradient(90deg, var(--cyan-2), var(--blue)); transform: scaleX(0); transform-origin: left; }
  .timeline.is-visible::after { transform: scaleX(1); }
  .step { grid-template-columns: 1fr; gap: 0; padding: 0; }
  .step h3 { margin-top: 22px; }
}

/* ---------- Formulaire ---------- */
.section-form { background: linear-gradient(180deg, var(--bg) 0%, #FFFFFF 100%); }
.req { color: var(--blue); font-weight: 800; }
.opt, .hint { color: var(--text-3); font-weight: 500; font-size: .9em; }
.hint { display: block; margin-top: 2px; }

/* Progression "fibre" */
.form-progress {
  position: sticky; top: calc(var(--header-h) + 8px); z-index: 10;
  margin: 0 0 20px; padding: 14px 16px 10px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
}
.fp-track { position: absolute; left: calc(16px + (100% - 32px) / 8); right: calc(16px + (100% - 32px) / 8); top: 28px; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.fp-light {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 4px;
  background: linear-gradient(90deg, var(--cyan-2), var(--blue));
  transition: width .5s var(--ease);
}
.fp-light::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40px; right: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .9));
  animation: glint 1.6s ease-in-out infinite;
}
@keyframes glint { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
.fp-steps { position: relative; list-style: none; margin: 0; padding: 0; display: flex; justify-content: space-between; }
.fp-steps li { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 25%; }
.fp-dot {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: var(--text-3);
  background: #fff; border: 2px solid var(--line-strong);
  transition: all .3s var(--ease);
}
.fp-name { font-size: 12px; font-weight: 600; color: var(--text-3); }
.fp-steps li.is-done .fp-dot { color: #fff; background: var(--blue); border-color: var(--blue); box-shadow: 0 0 0 4px rgba(31, 91, 255, .15); }
.fp-steps li.is-done .fp-name { color: var(--text); }
.fp-label { margin: 6px 0 0; text-align: center; font-size: 12.5px; color: var(--text-3); }
@media (min-width: 640px) { .fp-name { font-size: 13px; } }

.form-card {
  position: relative;
  margin: 0 0 18px; padding: 22px 18px 8px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  min-width: 0;
}
.form-card-title {
  display: flex; align-items: center; gap: 12px;
  font-size: 1.12rem; font-weight: 800; color: var(--text); padding: 0; margin-bottom: 18px;
  float: left; width: 100%;
}
.form-card-title + * { clear: both; }
.form-step {
  width: 34px; height: 34px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center;
  font-size: 15px; color: #fff; background: var(--grad);
}
.form-card-help { color: var(--text-2); font-size: 14.5px; }

.grid-2 { display: grid; gap: 0 18px; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .form-card { padding: 28px 28px 12px; }
}

.field { margin-bottom: 18px; min-width: 0; }
.field label, .field .label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 8px; color: var(--text); }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"], textarea {
  width: 100%; min-height: 52px;
  padding: 13px 15px;
  font: inherit; font-size: 16px; /* 16px : pas de zoom automatique sur iPhone */
  color: var(--text);
  background: #FBFCFE;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s, background .2s;
  -webkit-appearance: none; appearance: none;
}
input[type="date"] { display: block; }
input::placeholder, textarea::placeholder { color: #9AA6B8; }
textarea { resize: vertical; min-height: 130px; line-height: 1.5; }
input:hover, textarea:hover { border-color: #B4C3D8; }
input:focus, textarea:focus { outline: none; background: #fff; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(31, 91, 255, .14); }
.field.has-error input, .field.has-error textarea { border-color: var(--error); background: #FFFBFB; }
.field-error { color: var(--error); font-size: 14px; font-weight: 600; margin: 7px 0 0; }
.field-error:empty { display: none; }
.char-count { font-size: 13px; color: var(--text-3); text-align: right; margin: 6px 0 0; }
.char-count.is-near { color: #B7791F; font-weight: 600; }

/* Chips (radio / checkbox) */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; margin: 0 !important; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 46px; padding: 10px 16px;
  border: 1.5px solid var(--line-strong); border-radius: 12px;
  background: #fff;
  font-size: 15px; font-weight: 600; color: var(--text-2);
  transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
  user-select: none;
}
.chips-check .chip span::before {
  content: ""; width: 19px; height: 19px; border-radius: 6px; flex-shrink: 0;
  border: 1.5px solid var(--line-strong); background: #fff;
  transition: background .15s, border-color .15s;
}
.chip:hover span { border-color: #9FB4D8; color: var(--text); }
.chip input:focus-visible + span { outline: 3px solid rgba(31, 91, 255, .4); outline-offset: 2px; }
.chip input:checked + span {
  border-color: var(--blue); color: var(--blue-2);
  background: var(--blue-soft);
  box-shadow: 0 0 0 3px rgba(31, 91, 255, .08);
}
.chips-check .chip input:checked + span::before {
  border-color: var(--blue);
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
}
.chips-yesno .chip { flex: 1 1 0; max-width: 180px; }
.chips-yesno .chip span { width: 100%; justify-content: center; }
.field.has-error .chip span { border-color: #F0A7B1; }

/* Documents */
.docs { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.doc { position: relative; min-width: 0; }
.doc-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.doc-drop {
  display: flex !important; align-items: center; gap: 14px;
  min-height: 74px; padding: 14px 14px 14px 16px; margin: 0 !important;
  border: 1.5px dashed #B9C7DC; border-radius: 16px;
  background: #FBFCFE;
  cursor: pointer; font-weight: 400 !important;
  transition: border-color .2s, background .2s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
}
.doc-drop:hover, .doc.is-dragover .doc-drop { border-color: var(--blue); background: var(--blue-soft); }
.doc-input:focus-visible + .doc-drop { outline: 3px solid rgba(31, 91, 255, .4); outline-offset: 2px; }
.doc-icon {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px;
  background: var(--blue-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 16V5m0 0l-4 4m4-4l4 4M5 19h14' fill='none' stroke='%231F5BFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/22px no-repeat;
}
.doc-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.doc-title { font-weight: 700; font-size: 15px; color: var(--text); line-height: 1.35; }
.doc-status { font-size: 13.5px; color: var(--text-3); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-action {
  flex-shrink: 0; font-size: 12.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: #fff; padding: 9px 14px; border-radius: 999px; background: var(--grad-btn);
}
.doc.is-filled .doc-drop { border-style: solid; border-color: #9ADBBE; background: var(--ok-soft); }
.doc.is-filled .doc-icon {
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%2314A06A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/22px no-repeat;
  box-shadow: inset 0 0 0 1.5px #9ADBBE;
}
.doc.is-filled .doc-status { color: var(--ok); font-weight: 700; }
.doc.is-filled .doc-action { display: none; }
.doc.has-error .doc-drop { border-color: var(--error); background: var(--error-soft); }
.doc-tools { display: flex; gap: 8px; margin-top: 8px; }
.doc-btn {
  display: inline-flex !important; align-items: center; justify-content: center;
  min-height: 40px; padding: 8px 14px; margin: 0 !important;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: #fff; color: var(--text-2);
  font: inherit; font-size: 14px !important; font-weight: 700; cursor: pointer;
}
.doc-btn:hover { color: var(--blue); border-color: var(--blue); }
.doc-remove:hover { border-color: var(--error); color: var(--error); }
.docs-total { font-size: 13px; color: var(--text-3); margin: 0 0 14px; }
.docs-total.is-over { color: var(--error); font-weight: 700; }

/* Consentement */
.form-card-submit { padding-top: 22px; padding-bottom: 22px; }
.consent { display: grid !important; grid-template-columns: 26px 1fr; gap: 12px; cursor: pointer; font-weight: 500 !important; font-size: 14.5px !important; color: var(--text-2) !important; line-height: 1.55; margin: 0 !important; }
.consent input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.consent-box {
  width: 26px; height: 26px; border-radius: 8px; margin-top: 1px;
  border: 1.5px solid #AFC0D8; background: #fff;
  transition: background .15s, border-color .15s;
}
.consent input:checked + .consent-box {
  border-color: var(--blue);
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px no-repeat;
}
.consent input:focus-visible + .consent-box { outline: 3px solid rgba(31, 91, 255, .4); outline-offset: 2px; }
.field.has-error .consent-box { border-color: var(--error); }
.consent-more { font-size: 13.5px; color: var(--text-3); margin: 12px 0 20px; }

.btn-loading { display: inline-flex; align-items: center; gap: 10px; text-transform: none; letter-spacing: 0; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.upload-progress { margin-top: 12px; }
.upload-progress-bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.upload-progress-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan-2), var(--blue)); transition: width .2s; }

.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.alert { padding: 14px 16px; border-radius: 14px; margin-bottom: 18px; font-size: 15px; font-weight: 500; }
.alert-error { background: var(--error-soft); border: 1px solid #F5B8C1; color: #9E1F31; }

/* Confirmation */
.confirmation {
  position: relative; overflow: hidden;
  text-align: center; padding: 48px 22px 40px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: rise .5s var(--ease) both;
}
.confirmation::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--f1), var(--f2), var(--f3), var(--f4), var(--f5), var(--f7), var(--f11), var(--f12));
}
.confirmation:focus { outline: none; }
.confirmation h2 { font-size: clamp(1.7rem, 5vw, 2.3rem); margin-bottom: 18px; }
.confirmation p { color: var(--text-2); max-width: 34em; margin-left: auto; margin-right: auto; }
.confirmation p:nth-of-type(1) { color: var(--text); font-weight: 700; font-size: 1.1rem; }
.confirmation .fine-print { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.confirm-icon { width: 80px; height: 80px; margin: 0 auto 18px; color: var(--ok); border-radius: 50%; background: var(--ok-soft); padding: 6px; }
.check-path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .6s .2s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Footer ---------- */
.site-footer { position: relative; border-top: 1px solid var(--line); padding: 44px 0 36px; background: var(--bg-2); }
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 3px;
  background: linear-gradient(90deg, var(--f1), var(--f2), var(--f3), var(--f4), var(--f5), var(--f6), var(--f7), var(--f8), var(--f9), var(--f10), var(--f11), var(--f12));
  opacity: .8;
}
.footer-inner { display: grid; gap: 14px; justify-items: start; }
.footer-logo { width: 150px; height: auto; }
.footer-tagline { color: var(--text-2); max-width: 36em; margin: 0; font-size: 15px; }
.footer-links { list-style: none; padding: 0; margin: 6px 0 0; display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--text-2); font-size: 14.5px; font-weight: 600; }
.footer-links a:hover { color: var(--blue); }
.copyright { color: var(--text-3); font-size: 13.5px; margin: 0; }

/* ---------- Pages légales ---------- */
.legal { padding: 48px 0 72px; }
.legal h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 800; margin-bottom: 8px; }
.legal .updated { color: var(--text-3); font-size: 14px; margin-bottom: 36px; }
.legal h2 { font-size: 1.25rem; margin: 36px 0 12px; }
.legal p, .legal li { color: var(--text-2); }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.todo {
  display: inline-block; padding: 1px 8px; border-radius: 6px;
  background: #FFF7E0; border: 1px dashed #E2B23C; color: #8A6100; font-weight: 700; font-size: .95em;
}
.back-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 28px; font-weight: 700; text-decoration: none; }
.legal-header .header-inner { justify-content: space-between; }

/* ---------- Apparition progressive ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .timeline.reveal { transform: none; opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .strand-pulse, .bg-pulse, .btn-primary::after, .fiber-divider::after { display: none; }
}

/* Petits écrans : la barre de progression n'affiche que les lettres */
@media (max-width: 479px) {
  .fp-name { display: none; }
  .fp-steps li.is-done .fp-dot { box-shadow: 0 0 0 3px rgba(31, 91, 255, .15); }
}
