/* =========================================================================
   SimplyNorm — site vitrine
   Charte du logo SimplyNorm :
   brand #1E6FF0 · deep #1553B8 · navy #0F172A · sky #5B9BFF · accent #0F9D8A (dégradé du logo #1E6FF0 → #14C8B4)
   Titres et texte Inter, code IBM Plex Mono.
   ========================================================================= */

:root {
  --brand: #1E6FF0;
  --brand-deep: #1553B8;
  --navy: #0F172A;
  --sky: #5B9BFF;
  --alert: #0F9D8A;
  --danger: #E11D48;
  --danger-deep: #BE123C;
  --alert-deep: #0B7A6B;
  --ok: #10B981;
  --warn: #F59E0B;

  --bg: 246 248 251;
  --surface: 255 255 255;
  --muted: 241 244 249;
  --line: 226 232 240;
  --ink: 15 23 42;
  --sub: 90 101 120;
  --brand-soft: 234 240 252;

  /* Navigation et focus (repris de SmartCaisseIA, contrastes vérifiés WCAG AA) */
  --focus: #1553B8;                 /* 8,1:1 sur fond clair */
  --focus-halo: rgba(30, 111, 240, .28);
  --nav-hover-bg: 226 234 250;
  --nav-hover-fg: #0F172A;
  --nav-active-bg: 214 226 250;
  --nav-active-fg: #1553B8;         /* 6,6:1 sur le fond actif ; barre 4,4:1 */
  --nav-active-bar: #1E6FF0;

  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .06);
  --shadow-lg: 0 24px 60px -20px rgba(15, 23, 42, .35);
  --header-h: 68px;
  --gutter: clamp(16px, 4vw, 32px);
  --font-sans: Inter, system-ui, "Segoe UI", Roboto, sans-serif;
  --font-display: Inter, system-ui, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  color-scheme: light;
}

.dark {
  --bg: 7 13 26;
  --surface: 13 22 40;
  --muted: 19 30 52;
  --line: 32 45 70;
  --ink: 230 236 245;
  --sub: 148 163 184;
  --brand-soft: 22 38 74;
  --focus: #A8C8FF;                 /* 10:1 sur fond sombre */
  --focus-halo: rgba(91, 155, 255, .35);
  --nav-hover-bg: 30 46 80;
  --nav-hover-fg: #F1F5FD;
  --nav-active-bg: 36 60 112;
  --nav-active-fg: #E3ECFF;         /* 9,1:1 sur le fond actif ; barre 3,7:1 */
  --nav-active-bar: #5B9BFF;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

/* ---------- 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-sans);
  font-size: 16px;
  line-height: 1.6;
  color: rgb(var(--ink));
  background: rgb(var(--bg));
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-wrap: break-word;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.02em; line-height: 1.12; margin: 0; }
p { margin: 0; }
code, .mono { font-family: var(--font-mono); font-size: .86em; }
code { background: rgb(var(--brand-soft)); color: var(--brand); padding: .1em .4em; border-radius: 6px; word-break: break-word; }
.dark code { color: var(--sky); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; box-shadow: 0 0 0 6px var(--focus-halo); }
/* Zones toujours sombres : contour clair, visible dans les deux thèmes */
.hero :focus-visible, .section-navy :focus-visible, .cta-card :focus-visible, .cell-dark :focus-visible, .legal-hero :focus-visible { outline-color: #CFDCF8; box-shadow: 0 0 0 6px rgba(207, 220, 248, .25); }
::selection { background: var(--brand); color: #fff; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent;
  font: 600 15px/1 var(--font-sans); cursor: pointer; white-space: nowrap;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s ease; }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 22px -10px rgba(30, 111, 240, .9); }
.btn-primary:hover { background: var(--brand-deep); transform: translateY(-1px); }
.btn-ghost { border-color: rgba(255, 255, 255, .28); color: #fff; background: rgba(255, 255, 255, .06); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255, 255, 255, .14); }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }

.icon-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 12px;
  border: 1px solid rgb(var(--line)); background: rgb(var(--surface)); color: rgb(var(--ink)); cursor: pointer;
}
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.i-moon { display: none; }
.dark .i-sun { display: none; }
.dark .i-moon { display: block; }

.link { color: var(--brand); font-weight: 600; }
.dark .link { color: var(--sky); }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  padding-top: env(safe-area-inset-top);
  background: rgb(var(--bg) / .72); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s, background .2s;
}
.site-header.scrolled { border-bottom-color: rgb(var(--line)); background: rgb(var(--bg) / .9); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-dark { display: none; }
.dark .logo-light { display: none; }
.dark .logo-dark { display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: var(--navy); }
.dark .brand-text strong { color: #fff; }
.brand-text small { font-size: 11px; letter-spacing: .04em; color: #868E96; }
.dark .brand-text small { color: #7FE3D6; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) { position: relative; padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: 15px; color: rgb(var(--sub)); transition: color .15s ease, background-color .15s ease; }
.nav a:not(.btn):hover { color: var(--nav-hover-fg); background: rgb(var(--nav-hover-bg)); }
.nav a:not(.btn):focus-visible { color: var(--nav-hover-fg); background: rgb(var(--nav-hover-bg)); outline-offset: 2px; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--nav-active-bar); transform: scaleX(0); transition: transform .2s ease; }
.nav a.is-active:not(.btn), .nav a[aria-current]:not(.btn) { color: var(--nav-active-fg); background: rgb(var(--nav-active-bg)); font-weight: 600; }
.nav a.is-active:not(.btn)::after, .nav a[aria-current]:not(.btn)::after { transform: scaleX(1); }
.icon-btn:hover { border-color: var(--nav-active-bar); color: var(--nav-active-fg); background: rgb(var(--nav-hover-bg)); }
.nav-cta { margin-left: 8px; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-cta, .burger { display: none; }

.burger span { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .25s, opacity .25s; }
.burger { gap: 4px; align-content: center; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; color: #fff; background: var(--navy); padding: clamp(48px, 9vw, 110px) 0 clamp(64px, 9vw, 120px); }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.tiles {
  position: absolute; inset: -40px;
  background-image:
    linear-gradient(rgba(91, 155, 255, .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 155, 255, .09) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 30%, transparent 75%);
}
.glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; }
.glow-a { width: 520px; height: 520px; background: var(--brand); top: -160px; right: -80px; }
.glow-b { width: 280px; height: 280px; background: var(--alert); bottom: -140px; left: 20%; opacity: .28; }

.hero-grid > *, .arch-grid > *, .sec-grid > *, .faq-grid > *, .cta-card > * { min-width: 0; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 12px/1 var(--font-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin-bottom: 18px; }
.dark .eyebrow { color: var(--sky); }
.eyebrow-light, .dark .eyebrow-light { color: #7FE3D6; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--alert); box-shadow: 0 0 0 4px rgba(15, 157, 138, .2); }
.hero h1 { font-size: clamp(36px, 6.2vw, 68px); font-weight: 800; letter-spacing: -.035em; }
.hl { background: linear-gradient(100deg, #fff 0%, var(--sky) 55%, #7FE3D6 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { margin-top: 22px; font-size: clamp(17px, 1.6vw, 19px); color: #C4D2F1; max-width: 560px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.chips { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(175, 195, 238, .22); color: #DDE9FF; background: rgba(255, 255, 255, .04); }

/* Maquette navigateur */
.hero-visual { position: relative; padding: 24px 0; }
.window { background: #fff; color: #0F172A; border-radius: 18px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .08); overflow: hidden; transform: perspective(1400px) rotateY(-6deg) rotateX(3deg); transition: transform .6s ease; }
.hero-visual:hover .window { transform: perspective(1400px) rotateY(0) rotateX(0); }
.window-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: #F1F4F9; border-bottom: 1px solid #E2E8F0; }
.window-bar > span { width: 10px; height: 10px; border-radius: 50%; background: #D5DCE7; }
.window-bar > span:first-child { background: #FF6159; } .window-bar > span:nth-child(2) { background: #FFBD2E; } .window-bar > span:nth-child(3) { background: #28C941; }
.window-url { margin-left: 10px; flex: 1; min-width: 0; font: 500 11.5px var(--font-mono); color: #5A6578; background: #fff; border: 1px solid #E2E8F0; border-radius: 8px; padding: 5px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.window-body { padding: 18px; background: #F6F8FB; }
.app-top { display: flex; justify-content: space-between; align-items: center; }
.app-org { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; }
.app-org em { font-style: normal; font: 500 10.5px var(--font-mono); background: #EAF0FC; color: var(--brand); padding: 2px 6px; border-radius: 6px; }
.app-avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font-size: 11px; font-weight: 600; }
.app-hello { margin: 14px 0 12px; font: 700 17px var(--font-display); }
.app-hello span { display: block; font: 500 12px var(--font-sans); color: #5A6578; }
.launcher { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile-app { position: relative; background: #fff; border: 1px solid #E2E8F0; border-radius: 12px; padding: 12px 8px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; text-align: center; transition: transform .2s, box-shadow .2s; }
.tile-app img { width: 38px; height: 38px; }
.tile-app b { position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--alert); color: #fff; font-size: 10.5px; display: grid; place-items: center; }
.tile-app:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tile-admin .gear { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: #EAF0FC; color: var(--brand); font-size: 20px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.kpi { background: #fff; border: 1px solid #E2E8F0; border-radius: 12px; padding: 10px 12px; }
.kpi small { display: block; font-size: 10.5px; color: #5A6578; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi strong { font: 800 20px var(--font-display); }
.kpi i { display: block; height: 4px; border-radius: 4px; background: #EAF0FC; margin-top: 6px; position: relative; overflow: hidden; }
.kpi i::after { content: ""; position: absolute; inset: 0; width: var(--w); background: var(--brand); border-radius: inherit; }
.kpi i.red::after { background: var(--danger); }

.float-card { position: absolute; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .96); color: #0F172A; box-shadow: var(--shadow-lg); font-size: 13px; animation: bob 6s ease-in-out infinite; }
.float-card strong { display: block; font-size: 13px; }
.float-card small { color: #5A6578; font-size: 11.5px; }
.float-a { left: -28px; bottom: -26px; }
.float-b { right: -18px; top: 0; animation-delay: -3s; }
.badge-ok { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; font-weight: 700; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--alert); box-shadow: 0 0 0 0 rgba(15, 157, 138, .6); animation: pulse 2s infinite; flex-shrink: 0; }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(15, 157, 138, 0); } 100% { box-shadow: 0 0 0 0 rgba(15, 157, 138, 0); } }

/* ---------- Chiffres ---------- */
.stats { position: relative; margin-top: -44px; z-index: 2; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgb(var(--line)); border: 1px solid rgb(var(--line)); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); padding: 0; }
.container.stats-grid { max-width: calc(1200px - 2 * var(--gutter)); width: calc(100% - 2 * var(--gutter)); }
.stat { background: rgb(var(--surface)); padding: 24px 22px; }
.stat strong { display: block; font: 800 clamp(30px, 3.4vw, 40px)/1 var(--font-display); color: var(--brand); letter-spacing: -.03em; }
.dark .stat strong { color: var(--sky); }
.stat span { display: block; margin-top: 8px; font-size: 14px; color: rgb(var(--sub)); line-height: 1.4; }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-muted { background: rgb(var(--muted)); }
.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2, .arch-copy h2, .sec-grid h2, .cta h2 { font-size: clamp(28px, 4.2vw, 46px); font-weight: 800; }
.sub { margin-top: 16px; font-size: clamp(16px, 1.4vw, 18px); color: rgb(var(--sub)); }

/* ---------- Briques ---------- */
.modules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.module {
  --accent: var(--brand);
  position: relative; background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); border-radius: var(--radius-lg);
  padding: 26px; display: flex; flex-direction: column; gap: 14px; overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.module::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .35s ease; }
.module:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.module:hover::before { transform: scaleX(1); }
.module-head { display: flex; align-items: center; gap: 14px; }
.module-head img { border-radius: 12px; flex-shrink: 0; }
.module h3 { font-size: 21px; }
.ver { font: 500 12px var(--font-mono); color: rgb(var(--sub)); }
.module p { color: rgb(var(--sub)); font-size: 15px; }
.module ul { list-style: none; padding: 0; margin: auto 0 0; display: grid; gap: 8px; font-size: 14.5px; }
.module li { position: relative; padding-left: 22px; }
.module li::before { content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); opacity: .85; }
.module-more { border-style: dashed; background: transparent; }
.module-more .plus { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: rgb(var(--brand-soft)); color: var(--brand); font: 700 26px var(--font-display); }
.module-more .link { margin-top: auto; }

/* ---------- Bento ---------- */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.cell { background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 10px; transition: transform .25s, box-shadow .25s; }
.cell:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cell-wide { grid-column: span 2; }
.cell h3 { font-size: 18px; }
.cell p { font-size: 14.5px; color: rgb(var(--sub)); }
.cell-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgb(var(--brand-soft)); color: var(--brand); margin-bottom: 4px; }
.dark .cell-icon { color: var(--sky); }
.cell-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.org-switch { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }
.org { font: 500 12px var(--font-mono); padding: 6px 10px; border-radius: 8px; border: 1px solid rgb(var(--line)); color: rgb(var(--sub)); }
.org.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.cell-dark { background: var(--navy); border-color: var(--navy); color: #fff; }
.cell-dark p { color: #C4D2F1; }
.cell-dark .cell-icon { background: rgba(91, 155, 255, .16); color: var(--sky); }
.log { margin-top: auto; padding-top: 8px; display: grid; gap: 6px; font-size: 13px; color: #DDE9FF; }
.log > div { padding: 7px 10px; border-radius: 8px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .06); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log .mono { color: var(--sky); margin-right: 6px; }
.log em { font-style: normal; color: #FF8A8A; }

/* ---------- Architecture ---------- */
.arch-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 32px 0 0; display: grid; gap: 18px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; }
.steps li::before { content: counter(s, decimal-leading-zero); grid-row: span 2; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgb(var(--brand-soft)); color: var(--brand); font: 500 13px var(--font-mono); }
.steps b { font-family: var(--font-display); font-size: 17px; }
.steps span { color: rgb(var(--sub)); font-size: 15px; }

.stack { display: flex; flex-direction: column; align-items: stretch; }
.layer { border-radius: var(--radius-lg); padding: 20px 22px; border: 1px solid rgb(var(--line)); background: rgb(var(--surface)); box-shadow: var(--shadow); }
.layer small { display: block; font: 600 11px var(--font-sans); letter-spacing: .12em; text-transform: uppercase; color: rgb(var(--sub)); }
.layer strong { display: block; font: 700 18px var(--font-display); margin: 4px 0 12px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills span { font-size: 12.5px; padding: 4px 10px; border-radius: 999px; background: rgb(var(--muted)); border: 1px solid rgb(var(--line)); }
.layer-api { background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%); color: #fff; border: 0; box-shadow: 0 24px 50px -24px rgba(30, 111, 240, .9); }
.layer-api small { color: #C9D7F5; }
.layer-api .pills span { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .18); }
.bricks { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.bricks img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .25); transition: transform .2s; }
.bricks img:hover { transform: translateY(-3px); }
.layer-db { background: var(--navy); color: #fff; border-color: var(--navy); }
.layer-db small { color: #7FE3D6; }
.layer-db .pills span { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); }
.connector { position: relative; height: 54px; display: grid; place-items: center; }
.connector::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: repeating-linear-gradient(to bottom, var(--brand) 0 6px, transparent 6px 12px); background-size: 2px 12px; animation: flow 1s linear infinite; }
.connector span { position: relative; font: 500 11.5px var(--font-mono); padding: 4px 10px; border-radius: 8px; background: rgb(var(--bg)); border: 1px solid rgb(var(--line)); color: rgb(var(--sub)); text-align: center; }
@keyframes flow { to { background-position: 0 12px; } }

/* ---------- Sécurité (navy) ---------- */
.section-navy { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.section-navy::after { content: ""; position: absolute; width: 480px; height: 480px; border-radius: 50%; background: var(--brand); filter: blur(120px); opacity: .35; right: -120px; bottom: -200px; pointer-events: none; }
.sec-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.checks { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 14px; }
.checks li { position: relative; padding-left: 36px; color: #C4D2F1; }
.checks li b { color: #fff; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: rgba(91, 155, 255, .18); color: var(--sky); }

.phone-wrap { display: grid; place-items: center; }
.phone { width: 270px; max-width: 100%; aspect-ratio: 9 / 18.5; border-radius: 40px; padding: 10px; background: linear-gradient(160deg, #26324d, #0a1226); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8), inset 0 0 0 1px rgba(255, 255, 255, .12); position: relative; transform: rotate(-4deg); }
.phone-notch { position: absolute; top: 18px; left: 50%; translate: -50% 0; width: 84px; height: 22px; border-radius: 12px; background: #050a16; z-index: 2; }
.phone-screen { height: 100%; border-radius: 31px; background: #F6F8FB; color: #0F172A; padding: 46px 12px 0; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.ph-top { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.ph-top b { font-family: var(--font-display); }
.ph-top span { margin-left: auto; font: 500 10px var(--font-mono); background: #EAF0FC; color: var(--brand); padding: 2px 6px; border-radius: 6px; }
.ph-search { font-size: 12px; color: #8792A6; background: #fff; border: 1px solid #E2E8F0; border-radius: 10px; padding: 8px 10px; }
.ph-item { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #E2E8F0; border-radius: 12px; padding: 9px 10px; }
.ph-item > div { min-width: 0; flex: 1; }
.ph-item b { display: block; font: 500 11px var(--font-mono); color: var(--brand); }
.ph-item small { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-item em { font-style: normal; font-size: 10px; font-weight: 600; padding: 3px 7px; border-radius: 999px; background: #EAF0FC; color: var(--brand); }
.ph-item em.em-red { background: #FFE4EA; color: var(--danger-deep); }
.ph-item em.em-green { background: #DCF5EC; color: #047857; }
.st { width: 4px; align-self: stretch; border-radius: 4px; flex-shrink: 0; }
.st-blue { background: var(--brand); } .st-red { background: var(--danger); } .st-green { background: var(--ok); }
.ph-tab { margin-top: auto; margin-inline: -12px; display: flex; justify-content: space-around; padding: 10px 0 18px; background: #fff; border-top: 1px solid #E2E8F0; color: #8792A6; font-size: 18px; }
.ph-tab .on { color: var(--brand); }

/* ---------- Déploiement ---------- */
.deploy { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.deploy-card { background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); border-radius: var(--radius-lg); padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.deploy-card h3 { font-size: 24px; }
.deploy-card p { color: rgb(var(--sub)); font-size: 15px; }
.deploy-card-main { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow-lg); }
.tag { align-self: flex-start; font: 600 11px var(--font-sans); letter-spacing: .08em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: rgb(var(--brand-soft)); color: var(--brand); }
.dark .tag { color: var(--sky); }
.tag-red, .dark .tag-red { background: rgba(15, 157, 138, .1); color: var(--alert); }

/* ---------- Timeline ---------- */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; display: grid; gap: 14px; }
.timeline::before { content: ""; position: absolute; left: 27px; top: 10px; bottom: 10px; width: 2px; background: rgb(var(--line)); }
.timeline li { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: start; }
.timeline .v { position: relative; z-index: 1; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font: 700 16px var(--font-display); background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); color: var(--brand); }
.dark .timeline .v { color: var(--sky); }
.timeline li > div { background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); border-radius: var(--radius); padding: 16px 20px; }
.timeline h3 { font-size: 17px; }
.timeline p { color: rgb(var(--sub)); font-size: 15px; margin-top: 4px; }
.timeline .current .v { background: var(--alert); border-color: var(--alert); color: #fff; box-shadow: 0 10px 24px -10px rgba(15, 157, 138, .8); }
.timeline .current > div { border-color: var(--alert); }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
.faq { display: grid; gap: 10px; }
.faq details { background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); border-radius: var(--radius); padding: 0 20px; transition: border-color .2s; }
.faq details[open] { border-color: var(--brand); }
.faq summary { list-style: none; cursor: pointer; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-weight: 600; padding: 14px 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex-shrink: 0; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: rgb(var(--brand-soft)); color: var(--brand); font: 600 18px var(--font-sans); transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 18px; color: rgb(var(--sub)); }

/* ---------- Contact ---------- */
.cta { padding-top: 0; }
.cta-card { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 56px); padding: clamp(24px, 5vw, 56px); border-radius: 28px; background: radial-gradient(120% 120% at 0% 0%, #1553B8 0%, #0F172A 60%); color: #fff; position: relative; overflow: hidden; }
.cta-copy p:not(.eyebrow) { margin-top: 16px; color: #C4D2F1; font-size: 17px; }
.cta-mark { display: grid; grid-template-columns: repeat(2, 44px); gap: 6px; margin-top: 36px; }
.cta-mark i { height: 44px; border-radius: 11px; background: var(--brand); animation: tile 4s ease-in-out infinite; }
.cta-mark i:nth-child(2) { background: var(--brand-deep); animation-delay: .4s; }
.cta-mark i:nth-child(3) { background: #DDE9FF; animation-delay: .8s; }
.cta-mark i:nth-child(4) { background: var(--alert); animation-delay: 1.2s; position: relative; }
.cta-mark i:nth-child(4)::after { content: ""; position: absolute; inset: 0; margin: auto; width: 14px; height: 14px; border-radius: 50%; background: #fff; }
@keyframes tile { 0%, 100% { transform: none; } 50% { transform: translateY(-4px); } }

.form { display: grid; gap: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 20px; padding: clamp(18px, 3vw, 28px); backdrop-filter: blur(8px); }
.form label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: #DDE9FF; }
.form input[type="text"], .form input[type="email"], .form textarea {
  width: 100%; font: 400 16px var(--font-sans); color: #fff; background: rgba(7, 13, 26, .45);
  border: 1px solid rgba(175, 195, 238, .25); border-radius: 12px; padding: 12px 14px; min-height: 48px; transition: border-color .15s, box-shadow .15s;
}
.form textarea { resize: vertical; min-height: 96px; }
.form input::placeholder, .form textarea::placeholder { color: #8FA3CC; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px rgba(91, 155, 255, .3); }
.form input.invalid { border-color: #FF6B6B; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-size: 13px; font-weight: 600; color: #DDE9FF; margin-bottom: 8px; padding: 0; }
.checkpills { display: flex; flex-wrap: wrap; gap: 8px; }
.checkpills label { display: inline-flex; cursor: pointer; }
.checkpills input { position: absolute; opacity: 0; pointer-events: none; }
.checkpills span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(175, 195, 238, .3); font-weight: 500; font-size: 14px; color: #DDE9FF; transition: all .15s; }
.checkpills input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.checkpills input:focus-visible + span { outline: 2px solid var(--sky); outline-offset: 2px; }
.form-note { font-size: 13px; color: #8FA3CC; text-align: center; }
.form-note:empty { display: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; } /* champ piège anti-robot */
.form-status { padding: 10px 14px; border-radius: 12px; border: 1px solid transparent; font-size: 14px; }
.form-status.info { color: #DDE9FF; background: rgba(91, 155, 255, .14); border-color: rgba(91, 155, 255, .35); }
.form-status.ok { color: #A7F3D0; background: rgba(16, 185, 129, .14); border-color: rgba(16, 185, 129, .4); }
.form-status.err { color: #FFB4B4; background: rgba(15, 157, 138, .14); border-color: rgba(255, 107, 107, .45); }
.btn:disabled { opacity: .7; cursor: not-allowed; transform: none; }

/* ---------- Pied de page ---------- */
.footer { border-top: 1px solid rgb(var(--line)); padding: 48px 0 calc(28px + env(safe-area-inset-bottom)); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer h4 { margin: 0 0 12px; font: 600 13px var(--font-sans); text-transform: uppercase; letter-spacing: .1em; color: rgb(var(--sub)); }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 15px; }
.footer ul a { color: rgb(var(--ink)); }
.footer ul a:hover { color: var(--nav-active-fg); text-decoration: underline; text-underline-offset: 3px; }
.footer ul a[aria-current] { color: var(--nav-active-fg); font-weight: 600; }
.footer-brand p { color: rgb(var(--sub)); font-size: 14.5px; max-width: 340px; margin-top: 14px; }
.by-rcg { display: inline-flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 13px; color: rgb(var(--sub)); }
.by-rcg img { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; background: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; margin-top: 36px; padding-top: 20px; border-top: 1px solid rgb(var(--line)); font-size: 13px; color: rgb(var(--sub)); }
.form-note a { color: #CFDCF8; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Pages légales (reprises de SmartCaisseIA) ---------- */
.legal-hero { background: linear-gradient(160deg, #0F172A 0%, #14305F 60%, #1553B8 140%); color: #fff; padding: clamp(36px, 7vw, 72px) 0 clamp(36px, 6vw, 60px); }
.legal-hero h1 { color: #fff; font-size: clamp(30px, 4.6vw, 48px); font-weight: 800; margin-bottom: .3em; }
.legal-hero p { color: #c9d4ea; }
.breadcrumb { font: 500 12.5px var(--font-mono); color: #9fb0d4; margin-bottom: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb a { color: #cfdcf8; }
.breadcrumb a:hover { text-decoration: underline; }
.legal-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); padding-top: clamp(32px, 5vw, 56px); padding-bottom: clamp(48px, 8vw, 96px); align-items: start; }
.legal-toc { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 2px; font-size: 14px; }
.legal-toc strong { font: 600 11.5px var(--font-sans); text-transform: uppercase; letter-spacing: .08em; color: rgb(var(--sub)); margin-bottom: 8px; }
.legal-toc a { color: rgb(var(--sub)); padding: 8px 10px; border-radius: 8px; border-left: 2px solid transparent; }
.legal-toc a:hover { color: var(--nav-hover-fg); background: rgb(var(--nav-hover-bg)); }
.legal-toc a[aria-current="page"] { color: var(--nav-active-fg); border-left-color: var(--nav-active-bar); background: rgb(var(--nav-active-bg)); font-weight: 600; }
.legal-body { max-width: 760px; }
.legal-body section { padding-bottom: 8px; margin-bottom: 28px; border-bottom: 1px solid rgb(var(--line)); }
.legal-body section:last-of-type { border-bottom: 0; }
.legal-body h2 { font-size: clamp(20px, 2.4vw, 25px); margin-bottom: .6em; }
.legal-body p, .legal-body li { color: rgb(var(--ink) / .86); margin-bottom: 1em; }
.legal-body ul { padding-left: 1.2em; }
.legal-body li { margin-bottom: .4em; }
.legal-body a:not(.btn) { color: var(--nav-active-fg); text-decoration: underline; text-underline-offset: 2px; }
.legal-body dl { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 10px 20px; margin: 0 0 1em; }
.legal-body dt { font-weight: 600; color: rgb(var(--sub)); }
.legal-body dd { margin: 0; }
.legal-body .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1em; border: 1px solid rgb(var(--line)); border-radius: var(--radius); }
.legal-body table { width: 100%; border-collapse: collapse; font-size: .92em; min-width: 520px; }
.legal-body th, .legal-body td { text-align: left; padding: 10px 14px; border-bottom: 1px solid rgb(var(--line)); vertical-align: top; }
.legal-body th { background: rgb(var(--muted)); font-weight: 600; }
.legal-body tr:last-child td { border-bottom: 0; }
.legal-meta { font: 500 12.5px var(--font-mono); color: rgb(var(--sub)); margin-bottom: 24px !important; }
mark.todo { background: color-mix(in srgb, var(--warn) 22%, transparent); color: inherit; padding: 1px 6px; border-radius: 5px; border: 1px dashed var(--warn); font-size: .95em; }

/* ---------- Apparition au défilement ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
.js .window.reveal.in { transform: perspective(1400px) rotateY(-6deg) rotateX(3deg); }
.js .hero-visual:hover .window.reveal.in { transform: perspective(1400px) rotateY(0) rotateX(0); }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 1080px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .modules { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  :root { --header-h: 62px; }
  .header-cta, .burger { display: inline-grid; }
  .header-cta { display: inline-flex; min-height: 40px; padding: 0 14px; font-size: 14px; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; margin: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px max(var(--gutter), env(safe-area-inset-left)) calc(20px + env(safe-area-inset-bottom));
    background: rgb(var(--surface)); border-bottom: 1px solid rgb(var(--line)); box-shadow: var(--shadow-lg);
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav a:not(.btn) { padding: 14px 12px; font-size: 17px; color: rgb(var(--ink)); border-radius: 8px; }
  .nav a:not(.btn)::after { display: none; }
  .nav a:not(.btn):focus-visible { outline-offset: -2px; }
  .nav a.is-active:not(.btn), .nav a[aria-current]:not(.btn) { box-shadow: inset 4px 0 0 var(--nav-active-bar); padding-left: 16px; }
  .nav-cta { margin: 10px 0 0; min-height: 52px; }
  .site-header.menu-open { background: rgb(var(--surface)); border-bottom-color: rgb(var(--line)); }

  .hero-grid, .arch-grid, .sec-grid, .faq-grid, .cta-card { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { text-align: left; }
  .hero-visual { max-width: 560px; width: 100%; margin: 0 auto; }
  .window, .js .window.reveal.in { transform: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .deploy { grid-template-columns: 1fr; }
  .deploy-card-main { order: -1; }
  .phone { transform: rotate(-2deg); }
  .section-head { margin-bottom: 32px; }
}

@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .legal-layout { grid-template-columns: minmax(0, 1fr); }
  .legal-toc { position: static; display: flex; overflow-x: auto; gap: 6px; padding-bottom: 6px; scrollbar-width: none; }
  .legal-toc::-webkit-scrollbar { display: none; }
  .legal-toc strong { display: none; }
  .legal-toc a { white-space: nowrap; border: 1px solid rgb(var(--line)); border-radius: 999px; padding: 10px 14px; }
  .legal-toc a[aria-current="page"] { border-color: var(--nav-active-bar); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding-bottom: 80px; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .chips li { font-size: 12.5px; }
  .modules, .bento { grid-template-columns: 1fr; }
  .cell-wide { grid-column: auto; }
  .module, .cell { padding: 20px; }
  .float-a { left: -6px; bottom: -6px; }
  .float-b { right: -6px; top: -4px; }
  .float-card { padding: 8px 12px; }
  .float-card small { display: none; }
  .window-body { padding: 14px; }
  .launcher { gap: 8px; }
  .tile-app { font-size: 11px; padding: 10px 4px 8px; }
  .tile-app img, .tile-admin .gear { width: 32px; height: 32px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .hide-xs { display: none; }
  .stat { padding: 18px 16px; }
  .stat span { font-size: 13px; }
  .row2 { grid-template-columns: 1fr; }
  .timeline::before { left: 21px; }
  .timeline li { grid-template-columns: 44px 1fr; gap: 12px; }
  .timeline .v { width: 44px; height: 44px; border-radius: 13px; font-size: 14px; }
  .timeline li > div { padding: 14px 16px; }
  .connector { height: 46px; }
  .connector span { font-size: 10.5px; max-width: 92%; }
  .layer { padding: 18px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .legal-body dl { grid-template-columns: 1fr; gap: 2px; }
  .legal-body dd { margin-bottom: 12px; }
  .cta-card { border-radius: 22px; margin-inline: calc(-1 * var(--gutter) + 8px); }
}

@media (max-width: 380px) {
  .footer-grid { grid-template-columns: 1fr; }
  .brand-text small { display: none; }
  .header-cta { display: none; }
  .hero h1 { font-size: 33px; }
  .stats-grid { grid-template-columns: 1fr; }
  .launcher { grid-template-columns: repeat(2, 1fr); }
  .float-b { display: none; }
}

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

@media print {
  .site-header, .hero-bg, .float-card, .form { display: none; }
  .hero, .section-navy, .cta-card { background: #fff; color: #000; }
}
