/* =====================================================================
   MY IUGB BUS — site vitrine
   Thèmes sombre et clair pilotés par <html data-theme="dark|light">
   ===================================================================== */

:root {
  --gold: #ffc300;
  --gold-deep: #e0a800;
  --navy: #0b1b33;
  --navy-2: #12284b;
  --ink: #060d1a;
  --radius: 18px;
  --radius-lg: 26px;
  --container: 1180px;
  --font: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

:root,
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #070d19;
  --bg-alt: #0a1324;
  --surface: #0e1a2f;
  --surface-2: #13223c;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #c9d3e1;
  --muted: #8d9ab0;
  --heading: #ffffff;
  --accent-text: #ffc300;
  --chip-bg: rgba(255, 195, 0, 0.1);
  --chip-text: #ffd24d;
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
  --shadow-soft: 0 12px 30px -18px rgba(0, 0, 0, 0.6);
  --glow: rgba(255, 195, 0, 0.12);
  --grid-line: rgba(255, 255, 255, 0.035);
  --nav-bg: rgba(7, 13, 25, 0.78);
}

:root[data-theme='light'] {
  color-scheme: light;
  --bg: #f6f7fa;
  --bg-alt: #eef1f6;
  --surface: #ffffff;
  --surface-2: #f3f5f9;
  --border: #e2e7ef;
  --border-strong: #cfd7e3;
  --text: #3a4659;
  --muted: #637087;
  --heading: #0b1b33;
  --accent-text: #9a6f00;
  --chip-bg: #0b1b33;
  --chip-text: #ffc300;
  --shadow: 0 30px 60px -30px rgba(11, 27, 51, 0.35);
  --shadow-soft: 0 12px 30px -20px rgba(11, 27, 51, 0.3);
  --glow: rgba(255, 195, 0, 0.22);
  --grid-line: rgba(11, 27, 51, 0.045);
  --nav-bg: rgba(246, 247, 250, 0.82);
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-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;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { color: var(--heading); margin: 0; line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }
svg.icon { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: min(var(--container), 100% - 40px); margin-inline: auto; }
.section { padding: clamp(72px, 10vw, 120px) 0; position: relative; }
.section--alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-text); margin-bottom: 14px;
}
.eyebrow::before { content: ''; width: 18px; height: 2px; border-radius: 2px; background: var(--gold); }
.section-head.center .eyebrow::before { display: none; }
.h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; }
.lead { margin-top: 16px; font-size: clamp(16px, 1.6vw, 18px); color: var(--muted); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 24px; border-radius: 14px;
  font: 700 15px/1 var(--font); cursor: pointer; border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--gold); color: var(--navy); box-shadow: 0 10px 24px -12px rgba(255, 195, 0, 0.7); }
.btn--primary:hover { background: #ffcd26; }
.btn--ghost { background: transparent; color: var(--heading); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--surface); }
.btn--sm { height: 40px; padding: 0 16px; font-size: 14px; border-radius: 11px; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background-color 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: var(--nav-bg); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-color: var(--border); }
.nav__inner { height: 74px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 17px; color: var(--heading); letter-spacing: -0.01em; }
.brand img { height: 38px; width: auto; }
.brand span b { color: var(--accent-text); font-weight: 800; }
.nav__links { display: flex; gap: 26px; margin-left: auto; }
.nav__links a { font-size: 14px; font-weight: 600; color: var(--muted); transition: color 0.2s; }
.nav__links a:hover { color: var(--heading); }
.nav__actions { display: flex; align-items: center; gap: 10px; }
.seg { display: flex; padding: 3px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); }
.seg button {
  height: 30px; min-width: 36px; padding: 0 9px; border: 0; border-radius: 8px; background: transparent;
  font: 700 12px/1 var(--font); color: var(--muted); cursor: pointer;
}
.seg button[aria-pressed='true'] { background: var(--navy); color: var(--gold); }
:root[data-theme='dark'] .seg button[aria-pressed='true'] { background: var(--gold); color: var(--navy); }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--heading);
}
.icon-btn .icon { width: 18px; height: 18px; }
.theme-icon-light, :root[data-theme='light'] .theme-icon-dark { display: none; }
:root[data-theme='light'] .theme-icon-light { display: block; }
.nav__menu-btn { display: none; }
.mobile-menu { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 140px 0 90px; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(700px 480px at 78% 38%, var(--glow), transparent 70%),
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 56px 56px;
  mask-image: linear-gradient(to bottom, #000 60%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent);
}
.hero__grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; background: var(--chip-bg); color: var(--chip-text);
}
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2); }
.hero h1 { margin-top: 22px; font-size: clamp(40px, 5.6vw, 66px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.04; }
.hero h1 .accent { color: var(--accent-text); }
.hero .lead { max-width: 520px; margin-top: 22px; font-size: clamp(16px, 1.7vw, 19px); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.facts { display: grid; grid-template-columns: repeat(4, auto); gap: 28px; margin-top: 46px; padding-top: 28px; border-top: 1px solid var(--border); max-width: 560px; }
.fact strong { display: block; font-size: 22px; font-weight: 800; color: var(--heading); letter-spacing: -0.02em; }
.fact span { font-size: 13px; color: var(--muted); }

.hero__devices { position: relative; height: clamp(520px, 52vw, 680px); }
.hero__devices .device--samsung { position: absolute; left: 4%; top: 13%; --w: clamp(210px, 19vw, 262px); z-index: 1; }
.hero__devices .device--iphone { position: absolute; right: 6%; top: 0; --w: clamp(238px, 21.5vw, 300px); z-index: 2; }

/* =====================================================================
   Téléphones (répliques fidèles en CSS, écrans = vraies captures de l'app)
   ===================================================================== */
.device { position: relative; width: var(--w); filter: drop-shadow(0 40px 50px rgba(0, 0, 0, 0.35)); }
:root[data-theme='light'] .device { filter: drop-shadow(0 40px 45px rgba(11, 27, 51, 0.28)); }
.device__body { position: relative; border-radius: calc(var(--w) * var(--r)); padding: calc(var(--w) * var(--metal)); background: var(--frame); }
.device__bezel { border-radius: calc(var(--w) * (var(--r) - var(--metal))); padding: calc(var(--w) * var(--bezel)); background: #050505; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.device__screen {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  border-radius: calc(var(--w) * (var(--r) - var(--metal) - var(--bezel)));
  background: var(--status-bg);
}
.device__screen img { width: 100%; height: auto; }
.device__glass {
  position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 28%, transparent 42%);
}
.device__btn { position: absolute; width: calc(var(--w) * 0.012); background: var(--frame-btn); border-radius: 2px; }
.device__btn.l { left: calc(var(--w) * -0.009); border-radius: 2px 0 0 2px; }
.device__btn.r { right: calc(var(--w) * -0.009); border-radius: 0 2px 2px 0; }

/* Écrans selon le thème du site */
.shot-light, :root[data-theme='light'] .shot-dark { display: none; }
:root[data-theme='light'] .shot-light { display: block; }
.device { --status-bg: #08101f; --status-fg: #fff; }
:root[data-theme='light'] .device { --status-bg: #ffffff; --status-fg: #0b1b33; }

/* Barre d'état */
.status { position: relative; flex: none; display: flex; align-items: center; justify-content: space-between; color: var(--status-fg); font-weight: 700; }
.status svg { fill: currentColor; }

/* iPhone 17 Pro Max — 440 × 956 pt, cadre aluminium Bleu intense, Dynamic Island */
.device--iphone {
  --r: 0.17; --metal: 0.016; --bezel: 0.03;
  --frame: linear-gradient(145deg, #3d4f6e 0%, #1d2a42 22%, #3b4d6b 48%, #1a263c 74%, #33445f 100%);
  --frame-btn: linear-gradient(90deg, #2a3954, #45577a);
}
.device--iphone .status { height: calc(var(--w) * 0.908 * 62 / 440); padding: 0 calc(var(--w) * 0.085) 0 calc(var(--w) * 0.11); font-size: calc(var(--w) * 0.049); }
.device--iphone .status__icons { display: flex; gap: calc(var(--w) * 0.016); align-items: center; }
.device--iphone .status__icons svg { height: calc(var(--w) * 0.036); width: auto; }
.island {
  position: absolute; z-index: 3; left: 50%; transform: translateX(-50%);
  top: calc(var(--w) * 0.908 * 11 / 440); width: calc(var(--w) * 0.908 * 0.29); height: calc(var(--w) * 0.908 * 36 / 440);
  border-radius: 999px; background: #000;
}
.island::after { content: ''; position: absolute; right: 18%; top: 50%; width: 22%; aspect-ratio: 1; height: auto; transform: translateY(-50%); border-radius: 50%; background: radial-gradient(circle at 35% 35%, #1d2433, #05070b 70%); }
.device--iphone .b1 { top: 17%; height: 5.5%; }   /* bouton Action */
.device--iphone .b2 { top: 25.5%; height: 9.5%; } /* volume + */
.device--iphone .b3 { top: 37%; height: 9.5%; }   /* volume − */
.device--iphone .b4 { top: 28%; height: 14%; }    /* bouton latéral */
.device--iphone .b5 { top: 58%; height: 7%; width: calc(var(--w) * 0.01); } /* Commande de l'appareil photo */

/* Samsung Galaxy S26 — écran plat 19,5:9, caméra perforée centrée, cadre Armor Aluminium */
.device--samsung {
  --r: 0.115; --metal: 0.012; --bezel: 0.022;
  --frame: linear-gradient(145deg, #5b6068 0%, #2c2f35 25%, #50555d 50%, #24272c 75%, #4a4f57 100%);
  --frame-btn: linear-gradient(90deg, #33363c, #5a5f67);
}
.device--samsung .status { height: calc(var(--w) * 0.932 * 32 / 384); padding: 0 calc(var(--w) * 0.06); font-size: calc(var(--w) * 0.038); font-weight: 600; }
.device--samsung .status__icons { display: flex; gap: calc(var(--w) * 0.014); align-items: center; }
.device--samsung .status__icons svg { height: calc(var(--w) * 0.032); width: auto; }
.punch {
  position: absolute; z-index: 3; left: 50%; transform: translateX(-50%);
  top: calc(var(--w) * 0.932 * 9 / 384); width: calc(var(--w) * 0.932 * 13 / 384); aspect-ratio: 1;
  border-radius: 50%; background: radial-gradient(circle at 35% 35%, #1f2633, #000 65%);
  box-shadow: 0 0 0 calc(var(--w) * 0.003) rgba(255, 255, 255, 0.05);
}
.device--samsung .b1 { top: 20%; height: 12%; } /* volume */
.device--samsung .b2 { top: 35%; height: 7%; }  /* marche / arrêt */

/* ---------- Bandeau d'engagement ---------- */
.trust { border-block: 1px solid var(--border); background: var(--surface); }
.trust__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 40px; padding: 26px 0; }
.trust p { font-size: 14px; color: var(--muted); }
.trust p strong { color: var(--heading); }
.trust__items { display: flex; flex-wrap: wrap; gap: 14px 30px; }
.trust__items span { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--heading); }
.trust__items .icon { width: 18px; height: 18px; color: var(--accent-text); }

/* ---------- Cartes ---------- */
.cards { display: grid; gap: 18px; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
.card {
  position: relative; padding: 28px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-soft);
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.card h3 { font-size: 19px; font-weight: 700; margin-top: 18px; }
.card p { margin-top: 10px; font-size: 15px; color: var(--muted); }
.icon-box {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: var(--chip-bg); color: var(--chip-text);
}
.icon-box .icon { width: 22px; height: 22px; }
.card--key { border-color: rgba(255, 195, 0, 0.45); }
.card--key .tag {
  position: absolute; top: 22px; right: 22px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-text);
}

/* ---------- Section avec téléphone ---------- */
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 7vw, 100px); align-items: center; }
.split--rev .split__media { order: 2; }
.split__media { display: flex; justify-content: center; position: relative; }
.split__media::before { content: ''; position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; background: var(--glow); filter: blur(60px); top: 15%; }
.split__media .device { --w: clamp(240px, 24vw, 300px); }
.features { display: grid; gap: 6px; margin-top: 8px; }
.feature { display: flex; gap: 16px; padding: 18px; border-radius: 16px; transition: background-color 0.2s; }
.feature:hover { background: var(--surface); }
.feature h3 { font-size: 17px; font-weight: 700; }
.feature p { margin-top: 4px; font-size: 15px; color: var(--muted); }

/* ---------- Règle des 30 secondes (bandeau de marque) ---------- */
.rule { background: linear-gradient(160deg, #0b1b33 0%, #0d2241 55%, #0a1730 100%); color: #c9d3e1; overflow: hidden; }
.rule::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 400px at 85% 20%, rgba(255, 195, 0, 0.12), transparent 70%);
}
.rule h2, .rule h3 { color: #fff; }
.rule .eyebrow { color: var(--gold); }
.rule .lead, .rule .feature p { color: #9fb0c8; }
.rule .feature:hover { background: rgba(255, 255, 255, 0.04); }
.rule .icon-box { background: rgba(255, 195, 0, 0.12); color: var(--gold); }
.rule .split__media::before { background: rgba(255, 195, 0, 0.14); }
.timer-badge {
  display: inline-flex; align-items: baseline; gap: 10px; margin-top: 26px; padding: 14px 20px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
}
.timer-badge strong { font-size: 34px; font-weight: 800; color: var(--gold); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.timer-badge span { font-size: 14px; color: #9fb0c8; }

/* ---------- Trajet ---------- */
.route { position: relative; padding: 34px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-soft); }
.route__line { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.route__line::before { content: ''; position: absolute; left: 8.33%; right: 8.33%; top: 15px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--gold-deep), var(--gold)); }
.route__step { position: relative; text-align: center; }
.route__dot { width: 32px; height: 32px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 3px solid var(--gold); position: relative; z-index: 1; }
.route__dot::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--navy); }
:root[data-theme='dark'] .route__dot::after { background: var(--gold); }
.route__step.end .route__dot { background: var(--navy); }
.route__step.end .route__dot::after { background: var(--gold); }
.route__step.pass .route__dot { width: 22px; height: 22px; margin-top: 5px; border-width: 2px; }
.route__step.pass .route__dot::after { display: none; }
.route__step strong { display: block; margin-top: 14px; font-size: 15px; color: var(--heading); }
.route__step span { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.route__meta { display: flex; flex-wrap: wrap; gap: 12px 36px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--border); }
.route__meta div { font-size: 14px; color: var(--muted); }
.route__meta strong { display: block; font-size: 22px; color: var(--heading); font-weight: 800; }

/* ---------- Étapes ---------- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { position: relative; padding: 30px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-size: 13px; font-weight: 800; letter-spacing: 0.1em; color: var(--accent-text);
}
.step .icon-box { margin-top: 18px; }
.step h3 { font-size: 19px; margin-top: 18px; }
.step p { margin-top: 10px; font-size: 15px; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin-inline: auto; display: grid; gap: 12px; }
.faq details { border-radius: 16px; background: var(--surface); border: 1px solid var(--border); padding: 0 22px; transition: border-color 0.2s; }
.faq details[open] { border-color: var(--border-strong); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 0; font-weight: 700; font-size: 16px; color: var(--heading);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform 0.25s var(--ease); color: var(--muted); }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq details p { padding: 0 0 22px; font-size: 15px; color: var(--muted); }

/* ---------- Appel final ---------- */
.cta { padding: clamp(40px, 6vw, 64px); border-radius: 30px; text-align: center; position: relative; overflow: hidden;
  background: linear-gradient(150deg, #0b1b33, #12284b); color: #c9d3e1; }
.cta::before { content: ''; position: absolute; inset: 0; background: radial-gradient(500px 300px at 50% 0%, rgba(255, 195, 0, 0.16), transparent 70%); }
.cta > * { position: relative; }
.cta h2 { color: #fff; }
.cta .lead { color: #9fb0c8; max-width: 560px; margin-inline: auto; }
.cta__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.cta .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, 0.2); }
.cta .btn--ghost:hover { background: rgba(255, 255, 255, 0.06); }
.install { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 640px; margin: 34px auto 0; text-align: left; }
.install div { padding: 16px 18px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08); font-size: 14px; color: #b7c3d6; }
.install strong { display: block; color: #fff; margin-bottom: 4px; }

/* ---------- Pied de page ---------- */
.footer { padding: 56px 0 30px; border-top: 1px solid var(--border); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer p, .footer li { font-size: 14px; color: var(--muted); }
.footer h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--heading); margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer a:hover { color: var(--heading); }
.footer__bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }

/* ---------- Apparition au défilement ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: none; }
}

/* ---------- Adaptation aux écrans ---------- */
@media (max-width: 1080px) {
  .nav__links { display: none; }
  .cards--4 { grid-template-columns: repeat(2, 1fr); }
  .facts { gap: 20px; }
}
/* Tablettes en portrait, téléphones en paysage : une seule colonne */
@media (max-width: 900px) {
  .hero__grid, .split { grid-template-columns: 1fr; }
  .split--rev .split__media { order: 0; }
  .hero { padding-top: 120px; }
  .hero__devices { height: 600px; max-width: 560px; margin: 10px auto 0; width: 100%; }
}
@media (max-width: 760px) {
  .nav__actions .btn, .nav__actions .seg { display: none; }
  .nav__menu-btn { display: grid; }
  .mobile-menu.is-open {
    display: grid; gap: 4px; position: absolute; top: 74px; left: 12px; right: 12px; padding: 12px;
    border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  }
  .mobile-menu a { padding: 12px 14px; border-radius: 10px; font-weight: 600; color: var(--heading); }
  .mobile-menu a:hover { background: var(--surface-2); }
  .mobile-menu .row { display: flex; justify-content: space-between; align-items: center; padding: 8px 6px 4px; }
  .cards--3, .cards--4, .steps { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .hero__devices { height: 470px; }
  .hero__devices .device--iphone { --w: 210px; right: 2%; }
  .hero__devices .device--samsung { --w: 180px; left: 0; }
  .route { padding: 24px; }
  .route__line { grid-template-columns: 1fr; gap: 18px; }
  .route__line::before { left: 15px; right: auto; top: 16px; bottom: 16px; width: 3px; height: auto; }
  .route__step { display: grid; grid-template-columns: 32px 1fr; column-gap: 16px; text-align: left; align-items: center; }
  .route__step .route__dot { margin: 0; grid-row: span 2; }
  .route__step.pass .route__dot { margin: 0 5px; }
  .route__step strong { margin-top: 0; }
  .install, .footer__grid { grid-template-columns: 1fr; }
}

/* ---------- Utilitaires (aucun style en ligne : compatible CSP stricte) ---------- */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.section-head--tight { margin-bottom: 20px; }
.section-head--tighter { margin-bottom: 10px; }
.rule__inner { position: relative; z-index: 1; }
.split__media .device--rule { --w: clamp(230px, 22vw, 280px); }
.footer__text { margin-top: 14px; max-width: 340px; }
.logo-light, :root[data-theme='light'] .logo-dark { display: none; }
:root[data-theme='light'] .logo-light { display: block; }

/* ---------- Ajustements ---------- */
.icon-box { flex: none; }
/* Mode clair : titre en bleu marine souligné d'un trait jaune, plus lisible qu'un texte doré sur fond clair */
:root[data-theme='light'] .hero h1 .accent {
  color: var(--navy);
  background: linear-gradient(transparent 64%, rgba(255, 195, 0, 0.6) 64%, rgba(255, 195, 0, 0.6) 92%, transparent 92%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
@media (max-width: 760px) {
  .hero__devices { height: 440px; margin-top: 30px; }
}

/* ---------- Personnages (étudiants MY IUGB BUS) ---------- */
.character { position: relative; height: auto; pointer-events: none; user-select: none; filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.35)); }
:root[data-theme='light'] .character { filter: drop-shadow(0 18px 20px rgba(11, 27, 51, 0.18)); }
@keyframes character-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.float { animation: character-float 6s ease-in-out infinite; }
.float--late { animation-delay: -3s; }

/* Le constat : le personnage se tient au-dessus des cartes, à droite du titre */
.problem-top { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 30px; }
.problem-top .section-head { margin-bottom: clamp(36px, 5vw, 56px); }
.character--problem { width: clamp(110px, 12vw, 150px); margin-right: 6%; margin-bottom: -6px; z-index: 2; }

/* Appel final : deux étudiantes de part et d'autre de la carte */
.cta-stage { position: relative; }
.cta-stage .character { position: absolute; bottom: 0; z-index: 2; }
.character--left { left: 2%; width: clamp(150px, 15vw, 200px); }
.character--right { right: 2%; width: clamp(150px, 15vw, 200px); }

@media (max-width: 1080px) {
  .cta-stage .character { display: none; }
}
@media (max-width: 760px) {
  .problem-top { grid-template-columns: 1fr 96px; gap: 12px; }
  .character--problem { width: 96px; margin-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .float { animation: none; }
}

/* =====================================================================
   Téléphones interactifs : vraie interface de l'application
   ===================================================================== */
.app-ui { display: flex; flex-direction: column; background: var(--status-bg); }
.device--iphone .app-ui { height: calc(var(--w) * 0.908 * 894 / 440); }
.device--samsung .app-ui { height: calc(var(--w) * 0.932 * 800 / 384); }
.app-ui__header, .app-ui__nav img { flex: none; width: 100%; height: auto; display: block; }
.app-ui__body {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; cursor: grab; outline: none;
}
.app-ui__body::-webkit-scrollbar { display: none; }
.app-ui__body:focus-visible { box-shadow: inset 0 0 0 2px var(--gold); }
.app-ui__body img { width: 100%; height: auto; display: block; }
.app-ui__nav { position: relative; flex: none; }
.app-ui__tabs { position: absolute; inset: 0; }
.app-ui__tabs button {
  position: absolute; top: 0; bottom: 0; padding: 0; border: 0; background: transparent; cursor: pointer;
  border-radius: 10px; -webkit-tap-highlight-color: transparent;
}
.app-ui__tabs button:hover { background: rgba(255, 195, 0, 0.08); }
.app-ui__tabs button:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.app-ui img { transition: opacity 0.18s ease; }
.app-ui img.is-loading { opacity: 0.35; }
.app-static { width: 100%; height: auto; display: block; }

.devices-hint {
  position: absolute; left: 0; right: 0; bottom: -6px; display: flex; justify-content: center; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--muted);
}
@media (max-width: 760px) {
  .devices-hint { bottom: -14px; font-size: 12px; }
}

/* Le téléphone touché ou survolé passe au premier plan */
.hero__devices .device--samsung { left: 0; }
.hero__devices .device--iphone { right: 1%; }
.hero__devices .device { transition: transform 0.35s var(--ease), filter 0.35s var(--ease); }
.hero__devices .device.is-front { z-index: 3; transform: translateY(-6px); }
@media (max-width: 760px) {
  .hero__devices .device--samsung { left: -2%; }
  .hero__devices .device--iphone { right: -2%; }
}

/* =====================================================================
   Adaptation complète à toutes les tailles d'écran
   ===================================================================== */
/* Petits portables et tablettes en paysage (900–1080 px) : deux colonnes plus compactes */
@media (min-width: 901px) and (max-width: 1080px) {
  .hero { padding: 120px 0 70px; }
  .hero__grid { gap: 28px; }
  .hero h1 { font-size: clamp(38px, 5vw, 52px); }
  .hero__devices { height: 560px; }
  .hero__devices .device--iphone { --w: 236px; }
  .hero__devices .device--samsung { --w: 204px; }
  .facts { grid-template-columns: repeat(2, auto); }
}

/* Téléphones en paysage (peu de hauteur) */
@media (max-height: 500px) and (orientation: landscape) {
  .hero { padding-top: 100px; }
  .nav__inner { height: 62px; }
  .mobile-menu.is-open { top: 62px; max-height: calc(100vh - 74px); overflow-y: auto; }
}

/* Très petits écrans (moins de 360 px) */
@media (max-width: 359px) {
  .container { width: calc(100% - 28px); }
  .brand span { font-size: 15px; }
  .brand img { height: 32px; }
  .nav__actions { gap: 6px; }
  .hero h1 { font-size: 34px; }
  .facts { grid-template-columns: 1fr 1fr; gap: 16px; }
  .fact strong { font-size: 19px; }
  .problem-top { grid-template-columns: 1fr; }
  .character--problem { display: none; }
  .card, .step { padding: 22px; }
  .hero__devices { height: 400px; }
  .hero__devices .device--iphone { --w: 180px; }
  .hero__devices .device--samsung { --w: 156px; }
  .route { padding: 18px; }
  .cta { padding: 32px 20px; }
}

/* Grands écrans (à partir de 1800 px) : contenu plus large et plus grand */
@media (min-width: 1800px) {
  :root { --container: 1400px; }
  body { font-size: 17px; }
  .hero { padding: 170px 0 120px; }
  .hero h1 { font-size: 80px; }
  .hero .lead { max-width: 600px; font-size: 21px; }
  .h2 { font-size: 52px; }
  .lead { font-size: 19px; }
  .section-head { max-width: 760px; }
  .hero__devices { height: 780px; }
  .hero__devices .device--iphone { --w: 350px; }
  .hero__devices .device--samsung { --w: 304px; }
  .split__media .device { --w: 340px; }
  .split__media .device--rule { --w: 320px; }
  .card h3, .step h3 { font-size: 21px; }
  .card p, .step p, .feature p { font-size: 16px; }
  .character--problem { width: 170px; }
  .character--left, .character--right { width: 230px; }
}
@media (min-width: 2400px) {
  :root { --container: 1600px; }
  .hero h1 { font-size: 92px; }
  .hero__devices { height: 880px; }
  .hero__devices .device--iphone { --w: 400px; }
  .hero__devices .device--samsung { --w: 346px; }
}
