/* ApexTrack — design system
   Inspiration : apple.com — typographie géante SF Pro, sections alternées noir/ivoire,
   espacement généreux, mockups iPhone réalistes, animations au scroll.
   Zéro dépendance : tout est en CSS / SVG / HTML. */

:root {
    /* Palette */
    --black:        #000000;
    --black-deep:   #0a0a0a;
    --ink:          #1d1d1f;
    --ivory:        #f5f5f7;
    --white:        #ffffff;
    --gray-50:      #fbfbfd;
    --gray-100:     #f5f5f7;
    --gray-300:     #d2d2d7;
    --gray-500:     #86868b;
    --gray-700:     #424245;

    --accent:       #ff6b00;
    --accent-2:     #ff9b3a;
    --accent-deep:  #c84800;
    --blue:         #2997ff;
    --green:        #30d158;
    --red:          #ff453a;

    /* Typo */
    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
                 "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, "SF Mono", "Menlo", monospace;

    --radius-sm: 10px;
    --radius-md: 18px;
    --radius-lg: 28px;
    --radius-xl: 40px;

    --easing: cubic-bezier(0.28, 0.11, 0.32, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
*::selection { background: var(--accent); color: white; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background: var(--black);
    color: var(--ivory);
    line-height: 1.47;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    font-feature-settings: "ss01", "cv11";
}

img, svg { display: block; max-width: 100%; }

a {
    color: var(--blue);
    text-decoration: none;
    transition: opacity 0.2s var(--easing);
}
a:hover { opacity: 0.78; }

/* ============================================================
   Navigation — flottante, centrée, pill arrondie.
   Détachée du haut de la fenêtre (top: 14px), largeur intrinsèque
   au contenu, ombrée et blurée pour un effet glass premium.
   ============================================================ */
.nav {
    position: sticky;
    top: 14px;
    z-index: 1000;
    margin: 14px auto 0;
    width: fit-content;
    max-width: calc(100% - 28px);
    padding: 0;
    border-radius: 999px;
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    background: rgba(20, 20, 22, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow:
        0 14px 40px -10px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}
.nav-inner {
    height: 52px;
    padding: 0 22px 0 18px;
    display: flex;
    align-items: center;
    gap: 32px;
}
/* Place le logo à gauche, les liens à droite, séparés par un espace flexible */
.nav-brand { margin-right: 4px; }
.nav-links { margin-left: auto; }
@media (max-width: 640px) {
    .nav-inner { padding: 0 18px 0 14px; gap: 14px; height: 48px; }
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ivory);
    font-weight: 600;
    font-size: 16px;
    letter-spacing: -0.01em;
}
.nav-brand:hover { opacity: 1; color: var(--ivory); }
.nav-brand-mark {
    width: 24px; height: 24px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--accent-2), var(--accent-deep));
    display: grid;
    place-items: center;
    box-shadow: 0 2px 12px rgba(255, 107, 0, 0.5);
}
.nav-brand-mark svg { width: 14px; height: 14px; color: white; }

/* Detoured AT logo (transparent PNG) in the navbar. */
.nav-logo {
    height: 22px;
    width: auto;
    object-fit: contain;
    display: block;
}
@media (max-width: 640px) {
    .nav-logo { height: 20px; }
}

.nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
    font-size: 12px;
}
.nav-links a {
    color: rgba(245, 245, 247, 0.82);
    font-weight: 400;
}
.nav-links a:hover { color: var(--ivory); opacity: 1; }

@media (max-width: 640px) {
    .nav-links { gap: 16px; font-size: 11px; }
    .nav-links li:nth-child(n+4) { display: none; }
}

/* ============================================================
   Conteneur + sections alternées
   ============================================================ */
.container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 22px;
}
.container-narrow {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 22px;
}

.section { padding: 130px 0; position: relative; }
.section-tight { padding: 90px 0; }
@media (max-width: 740px) {
    .section { padding: 88px 0; }
    .section-tight { padding: 64px 0; }
}

.section-light  { background: var(--ivory); color: var(--ink); }
.section-light h1, .section-light h2, .section-light h3, .section-light h4 { color: var(--ink); }
.section-light p { color: var(--gray-700); }

.section-dark   { background: var(--black); color: var(--ivory); }
.section-graphite { background: linear-gradient(180deg, #1a1a1c, #0a0a0a); color: var(--ivory); }

/* ============================================================
   Home page — fond noir uniforme et sobre. Certaines sections
   passent en graphite (~#101013) avec fondu haut/bas pour créer
   un changement de contraste sans aucune cassure visible.
   ============================================================ */
body.home {
    background: #000;
    color: var(--ivory);
}

/* Annule les fonds opaques sur les sections de la home — la couleur
   vient soit du body (noir pur), soit d'un ton incrusté ci-dessous. */
body.home .section,
body.home .section-tight,
body.home .hero,
body.home .cta {
    background: transparent !important;
    color: var(--ivory);
}

/* Forcer la couleur de texte ivory même si une section avait section-light */
body.home .section-light,
body.home .section-light h1,
body.home .section-light h2,
body.home .section-light h3,
body.home .section-light h4 { color: var(--ivory); }
body.home .section-light p { color: rgba(245, 245, 247, 0.78); }
body.home .section-light .eyebrow { color: var(--accent-2); }
body.home .section-light .gradient-text {
    background: linear-gradient(180deg, #ffffff 0%, #888 130%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Ton « graphite » : section plus claire que le noir, avec un fondu
   noir → graphite → graphite → noir sur 12 % en haut et en bas.
   Aucune transition brutale ; le bord se confond avec le fond. */
body.home .tone-graphite {
    background: linear-gradient(
        180deg,
        #000 0%,
        #0e0e11 12%,
        #0e0e11 88%,
        #000 100%
    ) !important;
}

/* Variante avec une lumière chaude centrée, pour la dernière section CTA */
body.home .tone-warm {
    background:
        radial-gradient(ellipse 60% 80% at 50% 50%, rgba(255, 107, 0, 0.08), transparent 70%),
        linear-gradient(
            180deg,
            #000 0%,
            #0c0c0e 18%,
            #0c0c0e 82%,
            #000 100%
        ) !important;
}

/* Hero garde un halo orange discret en haut, rien de plus */
body.home .hero {
    background:
        radial-gradient(ellipse 75% 55% at 50% -5%, rgba(255, 107, 0, 0.10), transparent 65%),
        #000 !important;
}
body.home .hero-bg { display: none; }

/* Bento : en mode home, cards en noir-gris très foncé */
body.home .bento-cell {
    background: rgba(20, 20, 22, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--ivory);
}
body.home .bento-cell h3 { color: var(--ivory); }
body.home .bento-cell p  { color: rgba(245, 245, 247, 0.66); }
body.home .bento-icon {
    background: rgba(255, 107, 0, 0.14);
    color: var(--accent-2);
}
body.home .bento-cell-accent {
    background: linear-gradient(135deg, var(--accent-deep), var(--accent));
    border: 0;
}
body.home .bento-cell-accent h3,
body.home .bento-cell-accent p { color: white; }
body.home .bento-cell-accent .bento-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Stats geantes : valeurs en blanc, labels en gris doux */
body.home .stat-value { color: var(--ivory); }
body.home .stat-label { color: var(--gray-500); }

/* Marquee : items en gris moyen sur fond noir */
body.home .marquee-item { color: rgba(255, 255, 255, 0.32); }

/* Eyebrow plus subtil sur fond noir partout */
body.home .eyebrow { color: var(--accent-2); }

/* Footer dark mode pour la home */
body.home + footer,
body.home footer {
    background: #000;
    color: var(--gray-500);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
body.home footer h4 { color: var(--ivory); }
body.home footer a  { color: rgba(245, 245, 247, 0.66); }
body.home footer a:hover { color: var(--ivory); opacity: 1; }
body.home footer .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--gray-500);
}
body.home footer p[style*="gray-500"] { color: rgba(245, 245, 247, 0.55) !important; }
body.home footer .nav-brand-mark + * { color: var(--ivory) !important; }
body.home footer div[style*="color:var(--ink)"] { color: var(--ivory) !important; }

/* Le hero-bg explicite n'est plus utile sur la home (l'ambient body suffit),
   on le neutralise pour éviter d'empiler les gradients */
body.home .hero-bg { display: none; }

/* Showcase visual : enlever le fond opaque pour qu'il fonde dans la home */
body.home .showcase-visual {
    background: linear-gradient(135deg, rgba(26, 26, 28, 0.55), rgba(10, 10, 12, 0.55));
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ============================================================
   Typographie — gros, gros, gros (style Apple)
   ============================================================ */
h1, h2, h3, h4 {
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.05;
    color: var(--ivory);
}
.section-light h1, .section-light h2, .section-light h3, .section-light h4 { color: var(--ink); }

.headline-xl {
    font-size: clamp(48px, 8.4vw, 96px);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.04;
}
.headline-lg {
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
}
.headline-md {
    font-size: clamp(32px, 4.4vw, 48px);
    font-weight: 600;
    letter-spacing: -0.025em;
    line-height: 1.1;
}
.headline-sm {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.subhead {
    font-size: clamp(18px, 2vw, 22px);
    font-weight: 400;
    line-height: 1.45;
    color: rgba(245, 245, 247, 0.78);
    max-width: 640px;
}
.section-light .subhead { color: var(--gray-700); }

.eyebrow {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-2);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 18px;
}
.section-light .eyebrow { color: var(--accent-deep); }

/* Headline gradient text — un seul effet, sobre */
.gradient-text {
    background: linear-gradient(180deg, #ffffff 0%, #888 130%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.section-light .gradient-text {
    background: linear-gradient(180deg, #1d1d1f 0%, #555 130%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ============================================================
   Boutons App Store-style — pill, definis
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 22px;
    border-radius: 980px;
    font-size: 15px;
    font-weight: 500;
    border: 0;
    cursor: pointer;
    transition: all 0.2s var(--easing);
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary {
    background: var(--blue);
    color: white;
}
.btn-primary:hover { background: #147ce5; color: white; opacity: 1; }

.btn-ghost {
    background: transparent;
    color: var(--blue);
}
.btn-ghost:hover { opacity: 0.78; }
.btn-ghost::after {
    content: "›";
    font-weight: 400;
    transform: translateY(-1px);
}

.section-dark .btn-ghost { color: var(--blue); }

/* App Store badge officiel */
.btn-appstore {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 22px;
    background: black;
    border-radius: 12px;
    border: 1px solid #2a2a2c;
    color: white;
    height: 56px;
    transition: transform 0.2s var(--easing);
}
.btn-appstore:hover { transform: translateY(-2px); color: white; opacity: 1; }
.btn-appstore svg.apple { width: 28px; height: 28px; }
.btn-appstore-text small {
    display: block;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1;
    margin-bottom: 4px;
}
.btn-appstore-text strong {
    font-size: 20px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.01em;
}

.btn-row {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 28px;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
    text-align: center;
    padding: 100px 0 60px;
    position: relative;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 107, 0, 0.18), transparent 60%),
        radial-gradient(ellipse 60% 40% at 50% 100%, rgba(41, 151, 255, 0.10), transparent 60%);
}
.hero-inner { position: relative; z-index: 1; }

.hero h1 {
    margin-bottom: 16px;
}
.hero .subhead {
    margin: 0 auto;
    color: rgba(245, 245, 247, 0.86);
}
.hero .btn-row { justify-content: center; }
.hero .price-line {
    color: var(--gray-500);
    font-size: 14px;
    margin-top: 20px;
}

/* iPhone hero artwork */
.hero-artwork {
    margin: 64px auto 0;
    display: flex;
    justify-content: center;
    gap: 24px;
    perspective: 1400px;
}
.hero-artwork .iphone:nth-child(1) { transform: translateY(20px) rotateY(8deg) rotateZ(-2deg); }
.hero-artwork .iphone:nth-child(2) { transform: translateY(-10px); z-index: 2; }
.hero-artwork .iphone:nth-child(3) { transform: translateY(20px) rotateY(-8deg) rotateZ(2deg); }

@media (max-width: 740px) {
    .hero-artwork { gap: 10px; transform: scale(0.78); margin-top: 36px; }
}
@media (max-width: 480px) {
    .hero-artwork .iphone:nth-child(1),
    .hero-artwork .iphone:nth-child(3) { display: none; }
    .hero-artwork { transform: scale(0.9); }
}

/* ============================================================
   iPhone mockup réaliste — Dynamic Island, bezels, glow
   ============================================================ */
.iphone {
    width: 240px;
    aspect-ratio: 196/402;
    background: linear-gradient(145deg, #2a2a2c, #1a1a1c);
    border-radius: 44px;
    padding: 9px;
    box-shadow:
        0 0 0 1.5px #3a3a3c,
        0 30px 80px -20px rgba(0, 0, 0, 0.9),
        0 0 100px -10px rgba(255, 107, 0, 0.18);
    position: relative;
    transition: transform 0.5s var(--easing);
}
.iphone-screen {
    width: 100%;
    height: 100%;
    border-radius: 36px;
    overflow: hidden;
    background: var(--black);
    position: relative;
    display: flex;
    flex-direction: column;
}
.iphone-island {
    position: absolute;
    top: 9px;
    left: 50%;
    transform: translateX(-50%);
    width: 86px;
    height: 22px;
    background: black;
    border-radius: 100px;
    z-index: 10;
}
.iphone-statusbar {
    position: absolute;
    top: 9px;
    left: 0; right: 0;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
    z-index: 5;
    color: white;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: -0.02em;
}
.iphone-statusbar .icons {
    display: flex;
    gap: 4px;
    align-items: center;
}
.iphone-statusbar svg { width: 14px; height: 9px; }

/* Contenu écran iPhone — pages d'app simulées */
.app-screen {
    flex: 1;
    padding: 42px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background:
        radial-gradient(ellipse at top, rgba(255, 107, 0, 0.18), transparent 50%),
        linear-gradient(180deg, #050505 0%, #000 100%);
    color: white;
    font-size: 9px;
    overflow: hidden;
}
.app-screen-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-top: 4px;
}
.app-card {
    background: rgba(255, 255, 255, 0.05);
    border: 0.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 10px 12px;
}
.app-metric-huge {
    font-size: 34px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
    line-height: 1;
}
.app-metric-unit {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    margin-top: 4px;
}
.app-metric-label {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}
.app-row {
    display: flex;
    gap: 8px;
}
.app-row .app-card { flex: 1; }
.app-chip {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 600;
    background: rgba(255, 107, 0, 0.18);
    color: var(--accent-2);
}
.app-progress {
    height: 4px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    margin-top: 6px;
}
.app-progress > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    width: 72%;
    border-radius: 99px;
}

.app-hero-img {
    height: 70px;
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(255, 107, 0, 0.4), transparent 60%),
        linear-gradient(45deg, #1a1a1c, #2a2a2c);
    border: 0.5px solid rgba(255, 255, 255, 0.08);
    position: relative;
}
.app-hero-img::after {
    content: "";
    position: absolute;
    inset: 24px 30px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), transparent);
    border-radius: 4px;
    transform: skewX(-15deg);
}

.app-sparkline {
    height: 36px;
    background:
        linear-gradient(180deg, transparent 60%, rgba(255, 107, 0, 0.18) 100%);
    border-radius: 6px;
    position: relative;
}
.app-sparkline::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 80% 30%, var(--accent-2) 2px, transparent 2.5px);
}

/* ============================================================
   Bento grid — features modernes
   ============================================================ */
.bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(180px, auto);
    gap: 16px;
    margin-top: 60px;
}
@media (max-width: 900px) {
    .bento { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
    .bento { grid-template-columns: 1fr; }
}

.bento-cell {
    background: var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 280px;
    position: relative;
    overflow: hidden;
    transition: transform 0.4s var(--easing);
}
.section-dark .bento-cell {
    background: #1a1a1c;
    color: var(--ivory);
}
.bento-cell:hover { transform: translateY(-2px); }
.bento-cell h3 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}
.section-dark .bento-cell h3 { color: var(--ivory); }
.bento-cell p {
    font-size: 15px;
    color: var(--gray-700);
    line-height: 1.45;
}
.section-dark .bento-cell p { color: rgba(245, 245, 247, 0.66); }

.bento-cell-wide   { grid-column: span 2; }
.bento-cell-tall   { grid-row: span 2; }
.bento-cell-accent {
    background: linear-gradient(135deg, var(--accent-deep), var(--accent));
    color: white;
}
.bento-cell-accent h3, .bento-cell-accent p { color: white; }

@media (max-width: 900px) {
    .bento-cell-wide, .bento-cell-tall { grid-column: span 2; grid-row: span 1; }
}
@media (max-width: 520px) {
    .bento-cell-wide, .bento-cell-tall { grid-column: span 1; }
}

.bento-icon {
    width: 48px; height: 48px;
    border-radius: 14px;
    background: rgba(255, 107, 0, 0.12);
    color: var(--accent-deep);
    display: grid;
    place-items: center;
    margin-bottom: 18px;
}
.section-dark .bento-icon {
    background: rgba(255, 107, 0, 0.18);
    color: var(--accent-2);
}
.bento-cell-accent .bento-icon { background: rgba(255, 255, 255, 0.2); color: white; }
.bento-icon svg { width: 22px; height: 22px; }

.bento-visual {
    margin-top: 18px;
    border-radius: 16px;
    height: 130px;
    background: rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}
.section-dark .bento-visual { background: rgba(255, 255, 255, 0.04); }

/* ============================================================
   Stats row — gros chiffres
   ============================================================ */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 36px;
    text-align: center;
    margin-top: 56px;
}
@media (max-width: 640px) {
    .stats { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
.stat-value {
    font-size: clamp(48px, 6vw, 72px);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1;
    color: var(--ivory);
    font-variant-numeric: tabular-nums;
}
.section-light .stat-value { color: var(--ink); }
.stat-label {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 12px;
    letter-spacing: 0.01em;
}

/* ============================================================
   Showcase row — section feature avec image à côté
   ============================================================ */
.showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}
.showcase-reverse { direction: rtl; }
.showcase-reverse > * { direction: ltr; }
@media (max-width: 900px) {
    .showcase, .showcase-reverse { grid-template-columns: 1fr; direction: ltr; gap: 48px; }
}
.showcase h2 { margin-bottom: 20px; }
.showcase-visual {
    aspect-ratio: 1;
    border-radius: var(--radius-xl);
    background: var(--gray-100);
    overflow: hidden;
    position: relative;
    display: grid;
    place-items: center;
}
.section-dark .showcase-visual {
    background: linear-gradient(135deg, #1a1a1c, #0a0a0a);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Marquee de marques — animation infinie */
.marquee {
    overflow: hidden;
    padding: 36px 0;
    -webkit-mask-image: linear-gradient(90deg, transparent, black 15%, black 85%, transparent);
    mask-image: linear-gradient(90deg, transparent, black 15%, black 85%, transparent);
    width: 100%;
    white-space: nowrap;
}
.marquee-track {
    display: flex;
    gap: 80px;
    animation: marquee 45s linear infinite;
    width: max-content;
    align-items: center;
    will-change: transform;
    backface-visibility: hidden;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
    flex-shrink: 0;
    /* Fixed slot so every brand occupies the same space: even spacing (cleaner)
       AND a stable track width so the -50% loop seam stays pixel-exact even as
       logos / wordmark fallbacks resolve. */
    width: 112px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.section-light .marquee-item { color: var(--gray-300); }

/* Real brand logos. Any colored logo is normalized to a monochrome white via the
   filter so the wall reads as one cohesive set regardless of source artwork. */
.marquee-item .brand-logo {
    height: 36px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.70;
    transition: opacity 0.3s var(--easing), transform 0.3s var(--easing);
}
.marquee-item:hover .brand-logo {
    opacity: 1;
    transform: scale(1.05);
    filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

/* Fallback when a logo file is missing — a clean wordmark instead of a broken image. */
.marquee-wordmark {
    color: rgba(255, 255, 255, 0.34);
    font-size: 14px;
    font-weight: 700;
    font-style: normal;
    letter-spacing: 0.02em;
    white-space: nowrap;
    text-transform: uppercase;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}
body.home .marquee-wordmark { color: rgba(255, 255, 255, 0.30); }

@keyframes marquee {
    0% { transform: translateX(0); }
    /* -50% of the full (2-copy) track width + half a gap = exactly one copy,
       so item 22 lands precisely where item 1 started → seamless loop. */
    100% { transform: translateX(calc(-50% - 40px)); }
}

@media (prefers-reduced-motion: reduce) {
    .marquee-track { animation: none; }
    .marquee {
        overflow-x: auto;
        -webkit-mask-image: none;
        mask-image: none;
    }
}


/* ============================================================
   Closing CTA
   ============================================================ */
.cta {
    text-align: center;
    padding: 130px 0;
}

/* ============================================================
   Footer
   ============================================================ */
footer {
    background: var(--ivory);
    color: var(--gray-700);
    padding: 56px 0 32px;
    font-size: 12px;
    border-top: 1px solid var(--gray-300);
}
footer .container { max-width: 1024px; }
footer .footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 48px;
    margin-bottom: 36px;
}
@media (max-width: 740px) {
    footer .footer-grid { grid-template-columns: 1fr 1fr; }
}
footer h4 {
    font-size: 12px;
    color: var(--ink);
    text-transform: none;
    margin-bottom: 14px;
    font-weight: 600;
}
footer ul { list-style: none; }
footer li { margin-bottom: 8px; }
footer a { color: var(--gray-700); }
footer a:hover { color: var(--ink); opacity: 1; text-decoration: underline; }
footer .footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--gray-300);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--gray-500);
}

/* ============================================================
   Pages légales — wrapper en blanc, plus aéré
   ============================================================ */
.legal-page {
    background: var(--ivory);
    color: var(--ink);
    min-height: calc(100vh - 48px);
    padding: 72px 0 96px;
}
.legal-page h1 {
    color: var(--ink);
    font-size: clamp(40px, 5.5vw, 56px);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}
.legal-page .updated {
    color: var(--gray-500);
    font-size: 14px;
    margin-bottom: 48px;
}
.legal-page h2 {
    color: var(--ink);
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 56px 0 16px;
}
.legal-page h3 {
    color: var(--ink);
    font-size: 18px;
    font-weight: 600;
    margin: 28px 0 10px;
}
.legal-page p, .legal-page li {
    color: var(--gray-700);
    font-size: 17px;
    line-height: 1.55;
    margin-bottom: 14px;
}
.legal-page ul, .legal-page ol {
    margin: 14px 0 22px;
    padding-left: 22px;
}
.legal-page li { margin-bottom: 8px; }

.toc {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    padding: 22px 26px;
    margin: 28px 0 48px;
}
.toc strong {
    color: var(--ink);
    display: block;
    margin-bottom: 14px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
    columns: 2;
    column-gap: 32px;
}
.toc li {
    margin-bottom: 8px;
    font-size: 15px;
    break-inside: avoid;
}
.toc a { color: var(--blue); }
@media (max-width: 640px) {
    .toc ul { columns: 1; }
}

.callout {
    background: rgba(41, 151, 255, 0.08);
    border-left: 3px solid var(--blue);
    border-radius: var(--radius-sm);
    padding: 18px 22px;
    margin: 24px 0;
    font-size: 15px;
    color: var(--ink);
}
.callout strong { color: var(--blue); }

.danger-callout {
    background: rgba(255, 69, 58, 0.08);
    border-left: 3px solid var(--red);
    border-radius: var(--radius-sm);
    padding: 18px 22px;
    margin: 24px 0;
    font-size: 15px;
    color: var(--ink);
}
.danger-callout strong { color: var(--red); }

/* FAQ */
.faq-item {
    border-bottom: 1px solid var(--gray-300);
    padding: 24px 0;
}
.faq-item:first-of-type { border-top: 1px solid var(--gray-300); }
.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 18px;
    color: var(--ink);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "+";
    font-size: 26px;
    font-weight: 300;
    color: var(--gray-500);
    line-height: 1;
    transition: transform 0.2s var(--easing);
}
.faq-item[open] summary::after { content: "−"; }
.faq-item[open] summary { margin-bottom: 14px; }
.faq-item p { font-size: 16px; color: var(--gray-700); }

/* Steps numérotés */
.steps {
    counter-reset: step;
    list-style: none;
    padding: 0;
    margin: 24px 0;
}
.steps li {
    counter-increment: step;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    padding: 22px 26px 22px 72px;
    margin-bottom: 12px;
    position: relative;
    color: var(--gray-700);
    font-size: 16px;
}
.steps li::before {
    content: counter(step);
    position: absolute;
    left: 22px;
    top: 22px;
    width: 32px; height: 32px;
    background: var(--ink);
    color: var(--white);
    border-radius: 50%;
    font-weight: 600;
    font-size: 14px;
    display: grid;
    place-items: center;
}

/* ============================================================
   Animation scroll fade-in (CSS only, via IntersectionObserver inline)
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s var(--easing), transform 0.8s var(--easing);
    will-change: opacity, transform;
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .iphone, .hero-artwork .iphone:nth-child(n) { transform: none !important; }
}
