body {
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image:
        linear-gradient(rgba(203, 213, 225, 0.45) 1px, transparent 1px),
        linear-gradient(90deg, rgba(203, 213, 225, 0.45) 1px, transparent 1px);
    background-size: 60px 60px;
    transform: rotate(-12deg);
    pointer-events: none;
    z-index: -1;
}

.hero {
    text-align: center;
    padding: 110px 0 48px;
    background: rgba(248, 250, 252, 0.6);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image:
        linear-gradient(rgba(226, 232, 240, 0.4) 1px, transparent 1px),
        linear-gradient(90deg, rgba(226, 232, 240, 0.4) 1px, transparent 1px);
    background-size: 60px 60px;
    transform: rotate(-15deg);
    opacity: 0.5;
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
    max-width: 1600px;
}

.hero h1,
.subtitle {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero h1 {
    font-size: 3.25rem;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-main);
    margin-bottom: 20px;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto;
    font-weight: 400;
    line-height: 1.6;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s backwards;
}

.cta-group {
    margin: 28px 0;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s backwards;
}

.hero-visual {
    margin-top: 40px;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s backwards;
}

.hero-visual img {
    border: 1px solid var(--border-color);
    background: white;
    transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}

/* Screenshot hero : limité en hauteur pour ne pas écraser le viewport */
.hero-screenshot {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 20px 60px -15px rgba(0, 0, 0, 0.15);
}

.hero-visual:hover img {
    transform: translateY(-8px) scale(1.01);
    box-shadow: var(--shadow-xl);
}

.feature-section {
    padding: 72px 0;
    overflow-x: clip;
}

.feature-section .container {
    width: 90%;
    max-width: 1600px;
    padding: 0 40px;
    margin: 0 auto;
}

.feature-section {
    background: rgba(248, 250, 252, 0.6);
}

.feature-block {
    display: flex;
    align-items: stretch;
    gap: 48px;
}

.feature-block.reverse {
    flex-direction: row-reverse;
}

.feature-content {
    flex: 28;
    max-width: 500px;
}

.feature-visual {
    flex: 72;
    min-width: 0;
}

.feature-figure {
    margin: 0;
}

/* Vidéos dans feature-block : s'étendent sur toute la hauteur du bloc texte */
.feature-block .feature-visual,
.feature-block .feature-figure,
.feature-block .feature-video-wrapper {
    height: 100%;
}

.feature-block .feature-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feature-video-wrapper {
    position: relative;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    background: white;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.feature-video-wrapper:hover {
    transform: scale(1.01);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.12);
}

.feature-video {
    width: 100%;
    display: block;
    border-radius: 0;
    border: none;
    box-shadow: none;
}

.video-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.video-play-btn {
    width: 64px;
    height: 64px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding-left: 4px; /* centrage optique du triangle */
    transition: background 0.2s ease, transform 0.2s ease;
}

.feature-video-wrapper:hover .video-play-btn {
    background: rgba(15, 23, 42, 0.92);
    transform: scale(1.08);
}

.feature-screenshot {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
    background: white;
    transition: transform var(--transition-base);
    display: block;
    cursor: zoom-in;
}

.feature-screenshot:hover {
    transform: scale(1.02);
}

.feature-img-caption {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
    margin: 6px 0 0;
    display: block;
}

.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 88vh;
    border-radius: 8px;
    object-fit: contain;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

.lightbox-video {
    display: none;
    width: 95vw;
    max-width: none;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    background: #000;
    cursor: default;
}

.lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 1;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.22);
}

.video-expand-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s, background 0.2s;
    z-index: 3;
}

.feature-video-wrapper:hover .video-expand-btn {
    opacity: 1;
}

.video-expand-btn:hover {
    background: rgba(15, 23, 42, 0.85);
}

/* Direction du slide via CSS variable — ne touche pas transform directement
   (spécificité 0,2,0 max → facilement surchargée par .feature-animate et .in-view) */
.feature-block:not(.reverse) .feature-content { --feature-slide-x: 30px; }
.feature-block:not(.reverse) .feature-visual  { --feature-slide-x: -30px; }
.feature-block.reverse .feature-visual        { --feature-slide-x: 30px; }
.feature-block.reverse .feature-content       { --feature-slide-x: -30px; }

/* État initial : lit la variable (spécificité 0,1,0) */
.feature-animate {
    opacity: 0;
    transform: translateX(var(--feature-slide-x, 0px));
    transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
                transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* État visible : spécificité 0,3,0 > 0,1,0 — surcharge garantie */
.feature-section.in-view .feature-animate {
    opacity: 1;
    transform: translateX(0);
}

.feature-content h2 {
    font-size: 2.5rem;
    margin-bottom: 24px;
    line-height: 1.2;
    color: var(--text-main);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.feature-content p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.7;
}

.clean-list {
    list-style: none;
    padding: 0;
}

.clean-list li {
    margin-bottom: 16px;
    font-size: 1rem;
    color: var(--text-secondary);
    position: relative;
    padding-left: 32px;
    line-height: 1.6;
}

.clean-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 20px;
    height: 20px;
    background-color: var(--primary-light);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clean-list li::after {
    content: '✓';
    position: absolute;
    left: 5px;
    top: 4px;
    color: var(--primary-color);
    font-weight: 900;
    font-size: 0.875rem;
}

.clean-list li strong {
    color: #111827;
    font-weight: 700;
}

.feature-paras {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 8px;
}

.feature-para strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.feature-para p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
}

.feature-paras-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* Fix centrage screenshot dans le contexte stacked — même approche que .hero-screenshot */
.feature-block-stacked .feature-figure {
    width: 100%;
}

.feature-block-stacked .feature-screenshot {
    display: block;
    margin: 0 auto;
    width: 100%;
}

.hero-source {
    position: absolute;
    bottom: -24px;
    right: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    margin: 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 480px;
    margin: 0 auto;
}

.section-header-centered {
    text-align: center;
    margin-bottom: 56px;
}

.section-header-centered .section-title {
    margin-bottom: 16px;
}

.how-it-works {
    padding: 64px 0;
    background: rgba(248, 250, 252, 0.6);
}

.how-it-works .section-title {
    margin-bottom: 40px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
}


.step-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.step-card p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.security-section {
    padding: 56px 0;
    background: linear-gradient(135deg, #0f172a 0%, var(--primary-color) 100%);
}

.security-grid {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
}

.security-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    flex: 1;
    min-width: 220px;
    max-width: 300px;
    padding: 0 32px;
}

.security-item:first-of-type { padding-left: 0; }
.security-item:last-of-type  { padding-right: 0; }

.security-icon-wrap {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.85);
}

.security-text strong {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.security-text span {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.6;
}

.security-divider {
    width: 1px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    align-self: center;
    flex-shrink: 0;
}

.landing-pricing {
    padding: 100px 0;
    background: rgba(248, 250, 252, 0.6);
}

.landing-pricing-cards {
    max-width: 840px;
    margin-left: auto;
    margin-right: auto;
}

.final-cta {
    text-align: center;
    padding: 60px 20px;
    background: rgba(248, 250, 252, 0.6);
}

.final-cta h2 {
    font-size: 2.75rem;
    margin-bottom: 20px;
    color: var(--text-main);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.final-cta p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.final-cta-quote {
    font-size: 1.35rem !important;
    font-style: italic;
    color: var(--text-main) !important;
    margin-bottom: 36px !important;
}

.btn-large {
    padding: 18px 48px;
    font-size: 1.125rem;
}

.feature-block-stacked {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 48px;
    width: 100%;
}

.feature-block-stacked .feature-content {
    width: 100%;
    max-width: 950px;
    margin: 0 auto;
    text-align: left;
    flex: none;
}

.feature-block-stacked .feature-visual {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    flex: none;
}

.feature-block-stacked .feature-animate {
    --feature-slide-x: 0px;
    transform: translateY(24px);
    opacity: 0;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.feature-section.in-view .feature-block-stacked .feature-animate {
    opacity: 1;
    transform: translateY(0);
}

.feature-group-header {
    text-align: center;
    padding: 56px 0 0;
    background: rgba(248, 250, 252, 0.6);
}

.feature-group-label {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary-color);
}

.feature-group-label::before,
.feature-group-label::after {
    content: '';
    display: block;
    width: 48px;
    height: 1px;
    background: var(--border-color);
}

/* Écrans à hauteur réduite (768p ou moins) */
@media (max-height: 800px) {
    .hero {
        padding: 100px 0 40px;
    }

    .hero h1 {
        font-size: 3rem;
        margin-bottom: 16px;
    }

    .subtitle {
        font-size: 1.05rem;
        line-height: 1.5;
    }

    .cta-group {
        margin: 24px 0;
    }

    .hero-visual {
        margin-top: 32px !important;
    }
}

@media (max-width: 900px) {
    .feature-paras {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .feature-section {
        padding: 70px 0;
    }

    .feature-block,
    .feature-block.reverse {
        flex-direction: column;
        gap: 48px;
        text-align: center;
    }


    /* Sur mobile : annuler le slide X → animation réduite à un fade-in */
    .feature-section {
        --feature-slide-x: 0px;
    }

    .clean-list {
        text-align: left;
        display: inline-block;
    }

    .hero h1 {
        font-size: 2.75rem;
    }

    .feature-content h2,
    .feature-block-title {
        font-size: 2rem;
        text-align: center;
    }

    .final-cta h2 {
        font-size: 2.25rem;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        max-width: 520px;
        margin: 0 auto;
    }

    .how-it-works .section-title,
    .section-title {
        font-size: 2rem;
    }

    .security-grid {
        flex-direction: column;
        gap: 32px;
    }

    .security-divider {
        display: none;
    }

    .security-item {
        padding: 0;
        max-width: none;
    }
}

@media (max-width: 640px) {
    .hero {
        padding: 60px 0 40px;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .subtitle {
        font-size: 1.05rem;
    }

    .feature-section {
        padding: 60px 0;
    }

    .feature-content h2,
    .feature-block-title {
        font-size: 1.75rem;
    }

    .final-cta h2 {
        font-size: 1.875rem;
    }
}

/* H2 sorti du flex block — style identique à .feature-content h2 */
.feature-block-title {
    font-size: 2.5rem;
    margin-bottom: 36px;
    line-height: 1.2;
    color: var(--text-main);
    font-weight: 800;
    letter-spacing: -0.03em;
}

/* Grands écrans (27") : min-height pour compenser le h2 sorti du flex */
@media (min-width: 1441px) {
    .feature-block {
        min-height: 460px;
    }
}

/* Écrans moyens (13" laptop) — vidéo alignée au début des bullets, ratio naturel */
@media (min-width: 901px) and (max-width: 1440px) {
    .feature-content {
        flex: 40;
        max-width: none;
    }

    .feature-visual {
        flex: 60;
    }

    .feature-block {
        align-items: center;
    }

    .feature-block .feature-visual,
    .feature-block .feature-figure,
    .feature-block .feature-video-wrapper {
        height: auto;
    }

    .feature-block .feature-video {
        height: auto;
    }

    .feature-block-stacked .feature-video-wrapper {
        max-width: 1080px;
        margin: 0 auto;
    }
}

/* --- OVERSIZED SCREENSHOTS (Bleeding Edge) — Grands écrans uniquement --- */
@media (min-width: 1600px) {
    /* Image déborde de 35% vers l'extérieur de l'écran (blocs côte-à-côte uniquement, pas stacked ni vidéos) */
    .feature-block .feature-visual .feature-screenshot {
        width: 135%;
        max-width: none;
    }

    /* Vidéos : débordement vers l'extérieur uniquement (pas vers le texte) */
    /* Bloc normal (vidéo droite) : déborde vers la droite ✓ */
    .feature-block:not(.reverse) .feature-video-wrapper {
        width: 112%;
    }

    /* Bloc reverse (vidéo gauche) : translateX repousse l'excédent vers la gauche
       9.1% = 10/110 — exactement l'excédent de width: 110% */
    .feature-block.reverse .feature-video-wrapper {
        width: 112%;
        transform: translateX(-10.7%);
    }

    /* Blocs normaux (image droite) : le débordement part vers la droite ✓ */

    /* Blocs reverse (image gauche) : translateX(-26%) repousse le surplus vers la gauche
       26% de 135% ≈ 35% de .feature-visual = exactement l'excédent */
    .feature-block.reverse .feature-screenshot {
        transform: translateX(-26%);
    }

    /* Hover reverse : lift vertical sans casser le décalage horizontal */
    .feature-block.reverse .feature-screenshot:hover {
        transform: translateX(-26%) translateY(-5px);
    }
}
