/* =========================================================
   RESPONSIVE SBI
   - toutes les règles mobile/tablette du site
   - placé après style.css, sbi-background.css et sbi-signals.css
   ========================================================= */

.mobile-menu-toggle,
.section-why-sbi {
    display: none;
}

.sbi-qualiopi-section {
    padding-top: clamp(3rem, 5vw, 5rem);
    padding-bottom: clamp(3rem, 5vw, 5rem);
    background: transparent;
}

.qualiopi-panel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(210px, 0.72fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
    padding: clamp(1.5rem, 4vw, 2.6rem);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background:
        linear-gradient(135deg, rgba(12, 19, 34, 0.9), rgba(4, 7, 13, 0.96)),
        radial-gradient(circle at 85% 10%, rgba(0, 81, 255, 0.16), transparent 42%);
    overflow: hidden;
}

.qualiopi-panel::after {
    content: "";
    position: absolute;
    right: -2rem;
    bottom: -2rem;
    width: 9rem;
    height: 9rem;
    border: 1px solid rgba(0, 81, 255, 0.22);
    transform: rotate(45deg);
    pointer-events: none;
}

.qualiopi-badge {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    padding: 0.7rem;
    border: 1px solid rgba(177, 218, 255, 0.28);
    background: rgba(255, 255, 255, 0.98);
    box-shadow:
        0 0 24px rgba(0, 81, 255, 0.12),
        inset 0 0 0 1px rgba(10, 20, 35, 0.06);
}

.qualiopi-badge img {
    display: block;
    width: min(100%, 23rem);
    height: auto;
}

.qualiopi-content {
    position: relative;
    z-index: 1;
}

.qualiopi-content p {
    max-width: 620px;
    margin-top: 1rem;
    color: var(--text-muted);
}

@media (max-width: 1180px) {
    .calculator-cta-box {
        margin-top: 0;
    }

    .calculator-panel {
        grid-template-columns: 1fr;
    }

    .calculator-panel-main {
        padding: 1.9rem 1.8rem 1.6rem;
    }

    .calculator-panel-side {
        margin-left: 0;
        padding: 1.6rem;
        min-height: 150px;
        clip-path: none;
        border-top: 1px solid rgba(0, 81, 255, 0.24);
    }

    .calculator-panel-side::before {
        display: none;
    }
}

@media (max-width: 1024px) {
    .grid-parcours {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .features-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2rem;
    }

    .founder-block {
        flex-direction: column;
    }

    .founder-img-wrapper {
        width: 100%;
    }

    .founder-block .quote-content {
        width: 100%;
    }

    .sbi-signal-hero {
        right: -1.5rem;
    }
}

@media (max-width: 991px) {
    .sbi-football-field {
        width: min(92vw, 820px);
        opacity: 0.12;
    }
}

@media (max-width: 768px) {
    .fade-in,
    .signature-text,
    .sbi-diagonal-overlay__line,
    .sbi-diagonal-overlay__line::before,
    .sbi-diagonal-overlay__line::after,
    .sbi-background-root *,
    .sbi-background-root *::before,
    .sbi-background-root *::after,
    .card-badge::after,
    .quote-mark {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }


    /* 8.0P.10d : on garde les animations mobiles légères qui signent la DA SBI.
       Les éclats de verre et les signaux/assistants restent actifs, tandis que
       les particules et la parallaxe lourde restent coupées. */
    .shard,
    .shard-glint,
    .shard-glint::before,
    .shard-glint::after,
    .sbi-signal,
    .sbi-signal-dot,
    .sbi-signal-dot::before,
    .sbi-signal-dot::after {
        will-change: transform, opacity;
    }

    .shard {
        transform: translateZ(0);
    }

    #parallax-lines,
    #parallax-field {
        transform: none !important;
    }

    .sbi-bg-parallax,
    .sbi-field-parallax,
    .sbi-particle,
    .sbi-line {
        will-change: auto !important;
    }

    .sbi-particle,
    .sbi-line {
        display: none !important;
    }

    .site-header {
        padding: 0 1.25rem;
        gap: 1rem;
    }

    .logo-container,
    .header-logo-link {
        min-width: 0;
    }

    .header-logo-link {
        gap: 0.65rem;
    }

    .header-logo {
        height: 38px;
        max-width: 86px;
    }

    .header-brand {
        display: block;
        height: 28px;
        width: auto;
        max-width: min(38vw, 142px);
        object-fit: contain;
    }

    .header-actions {
        flex: 0 0 auto;
        gap: 1rem;
    }

    .header-actions .nav-link {
        font-size: 0.86rem;
        white-space: nowrap;
    }

    .header-actions .btn-primary {
        display: none;
    }

    .main-nav {
        display: none;
    }

    .site-header.is-mobile-menu-open {
        background: rgba(2, 5, 10, 0.985);
        border-bottom-color: rgba(0, 81, 255, 0.36);
        box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45);
    }

    .site-header.is-mobile-menu-open .main-nav,
    .site-header.is-mobile-menu-open .header-actions {
        position: fixed;
        left: 0;
        right: 0;
        z-index: 999;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        padding: 1.25rem;
        background:
            linear-gradient(180deg, rgba(2, 5, 10, 0.985), rgba(4, 9, 18, 0.98)),
            radial-gradient(circle at 88% 0%, rgba(0, 81, 255, 0.18), transparent 42%);
        border-bottom: 1px solid rgba(0, 81, 255, 0.2);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }

    .site-header.is-mobile-menu-open .main-nav {
        top: 78px;
        gap: 0.15rem;
    }

    .site-header.is-mobile-menu-open .header-actions {
        top: calc(78px + 9.55rem);
        gap: 0.85rem;
        padding-top: 0;
    }

    .site-header.is-mobile-menu-open .main-nav .nav-link,
    .site-header.is-mobile-menu-open .header-actions .nav-link,
    .site-header.is-mobile-menu-open .header-actions .btn-primary {
        display: flex;
        min-height: 46px;
        align-items: center;
        justify-content: space-between;
        padding: 0.85rem 1rem;
        border: 1px solid rgba(126, 181, 255, 0.18);
        background: rgba(255, 255, 255, 0.026);
        color: #fff;
    }

    .site-header.is-mobile-menu-open .header-actions .search-btn {
        display: none;
    }

    .site-header.is-mobile-menu-open .header-actions .btn-primary {
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
        justify-content: center;
        background: var(--sbi-blue);
        border-color: var(--sbi-blue);
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-gradient-overlay {
        width: 100%;
    }

    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .hero-buttons .btn-primary {
        width: min(100%, 17rem);
    }

    .hero-buttons .btn-ghost {
        justify-content: center;
    }

    .hero-subtitle {
        max-width: min(100%, 21rem);
        margin-left: auto;
        margin-right: auto;
    }

    .features-bar {
        grid-template-columns: 1fr;
        align-items: center;
    }

    .feature-item strong,
    .feature-item p {
        white-space: normal;
    }

    .newsletter-box {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-section {
        height: auto;
        min-height: 100vh;
    }

    .hero-large-logo {
        max-width: 350px;
        transform: translateX(0);
        margin-top: 2rem;
    }

    .display-amount {
        font-size: 3.35rem;
    }

    .cta-description {
        max-width: none;
    }

    .benefit-tag {
        width: 100%;
        justify-content: flex-start;
    }

    .btn-calc-neon {
        font-size: 0.96rem;
        padding: 1rem 1rem;
        padding-right: 2.35rem;
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%);
    }

    .sbi-football-field {
        width: 118vw;
        opacity: 0.095;
    }

    .sbi-football-field::after {
        opacity: 0.38;
    }

    .sbi-signal-hero {
        position: relative;
        top: auto;
        right: auto;
        margin: 1rem auto 1.2rem;
        justify-content: center;
        display: inline-flex;
    }

    .sbi-signal-panel,
    .sbi-signal-founder .sbi-signal-panel {
        position: relative;
        margin-left: 0.85rem;
        opacity: 0;
        transform: translateX(-10px) scale(0.96);
        animation: none;
        pointer-events: none;
        white-space: normal;
        text-align: left;
        transition:
            opacity 0.32s ease,
            transform 0.36s cubic-bezier(0.22, 1, 0.36, 1),
            border-color 0.32s ease,
            box-shadow 0.32s ease;
    }

    .sbi-signal.is-revealed .sbi-signal-panel,
    .sbi-signal:hover .sbi-signal-panel,
    .sbi-signal:focus-visible .sbi-signal-panel {
        opacity: 1;
        transform: translateX(0) scale(1);
        pointer-events: auto;
    }

    .sbi-signal-founder .sbi-signal-panel {
        transform: translateX(10px) scale(0.96);
    }

    .sbi-signal-founder.is-revealed .sbi-signal-panel,
    .sbi-signal-founder:hover .sbi-signal-panel,
    .sbi-signal-founder:focus-visible .sbi-signal-panel {
        opacity: 1;
        transform: translateX(0) scale(1);
        pointer-events: auto;
    }

    .sbi-signal-panel::before {
        display: none;
    }

    .sbi-signal-founder {
        top: auto;
        right: 1rem;
        bottom: -1.25rem;
    }

    .sbi-signal-founder .sbi-signal-panel {
        display: inline-flex;
    }
}

@media (max-width: 560px) {
    .site-header {
        padding: 0 1rem;
    }

    .header-logo {
        height: 36px;
        max-width: 74px;
    }

    .header-actions {
        gap: 0.85rem;
    }

    .header-actions .nav-link {
        display: none;
    }

    .section-parcours .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .grid-parcours {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .parcours-card {
        aspect-ratio: 16 / 11;
    }

    .calculator-panel {
        min-height: auto;
    }

    .calculator-panel-main {
        padding: 1.5rem 1.2rem 1.35rem;
    }

    .calculator-panel-side {
        min-height: 128px;
        padding: 1rem;
    }

    .display-amount {
        font-size: 3.05rem;
    }

    .btn-calc-neon {
        font-size: 0.9rem;
        gap: 0.55rem;
    }

    .sbi-signal-panel {
        max-width: 210px;
        font-size: 0.72rem;
        padding: 0.65rem 0.85rem;
    }
}

/* =========================================================
   MOBILE MOCKUP ALIGNMENT
   ========================================================= */

@media (max-width: 768px) {
    .site-header {
        height: 78px;
        padding: 0 1.25rem;
        background: rgba(2, 5, 10, 0.96);
    }

    .header-actions {
        display: none;
    }

    .mobile-menu-toggle {
        position: absolute;
        top: 20px;
        right: 1.25rem;
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-end;
        gap: 6px;
        flex: 0 0 38px;
        width: 38px;
        height: 38px;
        color: #fff;
        z-index: 1;
    }

    .mobile-menu-toggle span {
        display: block;
        width: 28px;
        height: 2px;
        background: currentColor;
        box-shadow: 0 0 8px rgba(255, 255, 255, 0.28);
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .mobile-menu-toggle span:nth-child(2) {
        width: 24px;
    }

    .mobile-menu-toggle::before {
        content: "";
        position: absolute;
        right: 0;
        top: 10px;
        width: 28px;
        height: 18px;
        border-top: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        filter: drop-shadow(0 0 7px rgba(255, 255, 255, 0.32));
    }

    .mobile-menu-toggle::after {
        content: "";
        position: absolute;
        right: 0;
        top: 18px;
        width: 24px;
        height: 2px;
        background: currentColor;
        filter: drop-shadow(0 0 7px rgba(255, 255, 255, 0.32));
    }

    .mobile-menu-toggle.is-active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .mobile-menu-toggle.is-active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.is-active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .mobile-menu-toggle.is-active::before,
    .mobile-menu-toggle.is-active::after {
        opacity: 0;
    }

    .hero-section {
        height: auto;
        min-height: auto;
        padding-top: 78px;
    }

    .hero-grid {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        min-height: calc(100svh - 78px);
        text-align: left;
        padding-top: 1.1rem;
        padding-bottom: 2.75rem;
        isolation: isolate;
    }

    .hero-content {
        order: 2;
        position: relative;
        z-index: 2;
        width: 100%;
    }

    .hero-visual {
        order: 1;
        position: relative;
        z-index: 1;
        height: clamp(252px, 72vw, 292px);
        margin: 0 auto 0.5rem;
        justify-content: center;
        align-items: center;
        overflow: visible;
    }

    .hero-large-logo {
        width: min(70vw, 272px);
        max-width: none;
        transform: none;
        margin: 0 auto;
        filter:
            drop-shadow(0 0 18px rgba(0, 81, 255, 0.42))
            drop-shadow(0 18px 30px rgba(0, 0, 0, 0.5));
    }

    .hero-surtitle {
        margin-bottom: 0.75rem;
    }

    .sbi-signal-hero {
        display: inline-flex;
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        margin: 0.9rem 0 1.2rem;
        justify-content: flex-start;
    }

    .sbi-signal-hero .sbi-signal-panel {
        max-width: 210px;
    }

    .hero-title {
        font-size: clamp(2.7rem, 11.2vw, 3.35rem);
        line-height: 1.04;
        margin-bottom: 1.35rem;
        letter-spacing: 0;
    }

    .hero-subtitle {
        max-width: min(100%, 20.5rem);
        margin-left: 0;
        margin-right: 0;
        margin-bottom: 1.75rem;
        text-align: left;
    }

    .hero-buttons {
        justify-content: flex-start;
        align-items: flex-start;
    }

    .hero-buttons .btn-primary {
        width: min(100%, 15.8rem);
    }

    .hero-buttons .btn-ghost {
        justify-content: flex-start;
    }

    .hero-section > .features-bar {
        display: none;
    }

    .section-why-sbi {
        display: block;
        padding-top: 4.25rem;
        padding-bottom: 4.5rem;
    }

    .section-why-sbi .features-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
        gap: 1.5rem 1.15rem;
        margin-top: 2rem;
        border: 0;
        padding-top: 0;
        padding-bottom: 0;
    }

    .section-why-sbi .features-bar::before,
    .section-why-sbi .features-bar::after {
        content: none;
    }

    .section-why-sbi .feature-item {
        display: grid;
        gap: 0.65rem;
    }

    .section-why-sbi .feature-icon {
        width: 42px;
        height: 42px;
        border: 1px solid rgba(255, 255, 255, 0.11);
        background: rgba(255, 255, 255, 0.025);
        box-shadow:
            inset 0 0 18px rgba(0, 81, 255, 0.14),
            0 0 18px rgba(0, 81, 255, 0.14);
    }

    .section-why-sbi .feature-item strong {
        font-size: 0.82rem;
        line-height: 1.22;
    }

    .section-why-sbi .feature-item p {
        font-size: 0.76rem;
        line-height: 1.35;
    }

    .qualiopi-panel {
        grid-template-columns: 1fr;
        gap: 1.35rem;
        padding: 1.45rem;
    }

    .qualiopi-badge {
        justify-items: stretch;
        padding: 0.55rem;
    }

    .qualiopi-content p {
        font-size: 0.9rem;
        line-height: 1.55;
    }

    .sbi-signal-founder {
        top: 1rem;
        right: 1rem;
        bottom: auto;
    }
}

@media (max-width: 560px) {
    .site-header {
        padding: 0 1rem;
    }

    .header-logo {
        height: 38px;
        max-width: 92px;
    }

    .mobile-menu-toggle {
        right: 1rem;
    }

    .section-parcours .section-header {
        display: contents;
    }

    .section-parcours {
        display: flex;
        flex-direction: column;
    }

    .section-parcours .section-header > div {
        order: 1;
    }

    .section-parcours .link-blue {
        order: 3;
        margin-top: 1rem;
        padding: 0.9rem 1.1rem;
        width: 100%;
        justify-content: center;
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: #fff;
        background: rgba(255, 255, 255, 0.018);
    }

    .grid-parcours {
        order: 2;
        display: flex;
        gap: 1.15rem;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        padding-bottom: 1rem;
        margin-right: -1rem;
    }

    .grid-parcours::-webkit-scrollbar {
        display: none;
    }

    .parcours-card {
        flex: 0 0 min(82vw, 320px);
        aspect-ratio: 1 / 1;
        scroll-snap-align: start;
    }
}

@media (max-width: 768px) {
    .site-header.is-mobile-menu-open {
        height: auto;
        min-height: 78px;
        flex-wrap: wrap;
        align-items: flex-start;
        align-content: flex-start;
        padding-bottom: 1.1rem;
    }

    .site-header.is-mobile-menu-open .logo-container {
        order: 1;
        display: flex;
        align-items: center;
        height: 78px;
    }

    .site-header.is-mobile-menu-open .main-nav,
    .site-header.is-mobile-menu-open .header-actions {
        position: static;
        inset: auto;
        flex: 0 0 100%;
        display: flex;
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .site-header.is-mobile-menu-open .main-nav {
        order: 2;
        max-height: calc(100svh - 220px);
        overflow-y: auto;
        gap: 0.28rem;
        padding-right: 0.1rem;
    }

    .site-header.is-mobile-menu-open .header-actions {
        order: 3;
        margin-top: 0.85rem;
        gap: 0.75rem;
    }

    .site-header.is-mobile-menu-open .header-actions .search-btn {
        display: none;
    }

    .site-header.is-mobile-menu-open .main-nav .nav-link,
    .site-header.is-mobile-menu-open .header-actions .nav-link,
    .site-header.is-mobile-menu-open .header-actions .btn-primary {
        min-height: 48px;
    }
}

@media (max-width: 768px) {
    /* SBI 8.0P.13 - raccord stats -> Qualiopi compact, sans découpe des panneaux */
    .section-stats {
        overflow: visible !important;
        padding-bottom: 3.45rem !important;
        margin-bottom: 0 !important;
    }

    .section-stats .stats-grid {
        gap: 1.25rem;
    }

    .section-stats .calculator-cta-box {
        margin-bottom: 0 !important;
    }

    .section-stats + .section-qualiopi,
    .section-stats + .sbi-qualiopi-section {
        margin-top: -2.15rem !important;
        padding-top: 3.75rem !important;
        overflow: visible !important;
    }

    .section-stats + .section-qualiopi .qualiopi-shell,
    .section-stats + .sbi-qualiopi-section .qualiopi-shell {
        margin-top: 0 !important;
    }
}
