/*===================================*\
  RESPONSIVE 2026 : correctifs téléphone / tablette / portable / grand écran.
  Chargé en dernier (fin de _Layout), donc il complète les autres feuilles.
\*===================================*/

/* ---------- Menu mobile : bouton de langue propre (globe + code sur une ligne) ---------- */
@media (max-width: 991.98px) {
    .x26-lang-ready .navbar-list .dropdownLn > .fa-globe,
    .x26-lang-ready .navbar-list .dropdownLn .dropdown-listLn {
        display: none !important;
    }

    .x26-lang-ready .navbar-list .dropdownLn {
        display: flex !important;
        justify-content: center;
        align-items: center;
        height: auto;
        padding-block: 6px;
    }

    .x26-lang {
        display: inline-flex !important;
        align-items: center;
        gap: 7px;
        margin: 0 auto;
        padding: 7px 14px;
        border: 0;
        border-radius: 999px;
        background: hsl(240, 10%, 95%);
        color: hsl(240, 14%, 12%);
        font: 600 1.4rem/1 var(--x26-font-round, inherit);
        cursor: pointer;
    }

        .x26-lang i,
        .x26-lang .x26-lang__code {
            display: inline-flex !important;
            align-items: center;
            margin: 0;
            line-height: 1;
            color: hsl(240, 8%, 35%);
        }

        .x26-lang .x26-lang__code { color: inherit; }
}

/* ---------- Accueil : maquette de l'application en miniature sur téléphone ---------- */
/* Sous 760px on garde la vraie maquette (barre latérale + cartes flottantes) mais réduite. */
@media (max-width: 760px) {
    .hx-main-hero .hx-hero-visual {
        display: flex;
        justify-content: center;
        overflow: visible;
    }

    .hx-main-hero .hx-par {
        flex: none;
        width: 800px;
        max-width: none;
        zoom: 0.81;
    }

        .hx-main-hero .hx-par .hx-side.hx-hide-sm {
            display: flex !important;
        }

        .hx-main-hero .hx-par .hx-float.hx-hide-sm {
            display: flex !important;
        }
}

@media (max-width: 679.98px) { .hx-main-hero .hx-par { zoom: 0.68; } }
@media (max-width: 579.98px) { .hx-main-hero .hx-par { zoom: 0.56; } }
@media (max-width: 479.98px) { .hx-main-hero .hx-par { zoom: 0.47; } }
@media (max-width: 419.98px) { .hx-main-hero .hx-par { zoom: 0.43; } }
@media (max-width: 374.98px) { .hx-main-hero .hx-par { zoom: 0.37; } }

/* ---------- Accueil : chiffres clés en grille compacte (téléphone 2×2, tablette 4 colonnes) ---------- */
@media (max-width: 991.98px) {
    .hx-band-stats .hx-mini {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 0;
        margin: 0;
    }

    .hx-band-stats .hx-mc {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        min-width: 0;
        padding: 14px 8px 12px;
        border: 1px solid rgba(7, 8, 12, 0.06);
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.7);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        text-align: center;
    }

    .hx-band-stats .hx-mc__top {
        display: flex !important;
        justify-content: center;
        width: auto;
        margin: 0 0 4px;
    }

    .hx-band-stats .hx-mc__avs,
    .hx-band-stats .hx-mc__ring,
    .hx-band-stats .hx-mc__bars,
    .hx-band-stats .hx-mc__globe {
        display: none !important;
    }

    .hx-band-stats .hx-mc__num {
        margin: 0;
        font-size: 2.2rem !important;
        line-height: 1.1;
    }

    .hx-band-stats .hx-mc__lbl {
        margin: 0;
        font-size: 1.25rem !important;
        line-height: 1.3;
    }
}

@media (min-width: 600px) and (max-width: 991.98px) {
    .hx-band-stats .hx-mini {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* ---------- Accueil : téléphone de la démo plus petit sur mobile ---------- */
@media (max-width: 575.98px) {
    .cd-phone { zoom: 0.84; }
    .cd-wrap { gap: 28px; }
}

@media (max-width: 374.98px) {
    .cd-phone { zoom: 0.76; }
}

/* ---------- Nous Sommes : chiffres 2×2, portable qui tient dans l'écran, étapes en frise verticale ---------- */
@media (max-width: 767.98px) {
    .cp-hero .stats-wrapper {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 18px;
    }

        .cp-hero .stats-wrapper > div {
            width: auto !important;
            max-width: none !important;
            margin: 0 !important;
            padding-inline: 8px;
            border-inline-start: 0 !important;
        }

            .cp-hero .stats-wrapper > div:nth-child(2n) {
                border-inline-start: 1px solid hsla(240, 12%, 10%, 0.08) !important;
            }

    /* Portable : plus étroit, base qui ne dépasse plus */
    .cp-video {
        width: 100%;
        padding-inline: 4%;
    }

    .cp-screen__bezel {
        padding: 9px;
        border-radius: 12px 12px 6px 6px;
    }

    .cp-screen__base {
        height: 10px;
        margin: 0 -3%;
    }

    .cp-screen .cp-nav {
        top: calc(50% - 16px);
        width: 30px;
        height: 30px;
        font-size: 1.2rem;
    }

    .cp-nav--prev { left: 14px; }
    .cp-nav--next { right: 14px; }

    /* Étapes 01 → 04 : icône à gauche, texte à droite, reliées par une ligne verticale */
    .cp-steps.section.service.pt-0 { padding-top: 40px !important; }

    .cp-steps .grid-list {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        gap: 0 !important;
        max-width: 520px;
        margin-inline: auto;
    }

    .cp-steps .service-card,
    .cp-steps .service-card:hover {
        position: relative;
        display: grid !important;
        grid-template-columns: 48px minmax(0, 1fr);
        column-gap: 16px;
        align-items: start;
        padding: 0 0 28px !important;
        text-align: start;
    }

        .cp-steps .service-card::before {
            grid-column: 2;
            grid-row: 1;
            margin: 0 0 2px;
            font-size: 1.4rem !important;
            letter-spacing: 0.04em;
            color: hsla(240, 12%, 10%, 0.4);
        }

        .cp-steps .service-card .card-icon {
            grid-column: 1;
            grid-row: 1 / span 3;
            width: 48px !important;
            min-width: 48px;
            height: 48px !important;
            margin: 0 !important;
            border-radius: 14px;
        }

        .cp-steps .service-card .h3 {
            grid-column: 2;
            margin: 0 0 6px;
            font-size: 1.9rem;
        }

        .cp-steps .service-card .card-text {
            grid-column: 2;
            max-width: none;
            margin: 0;
            font-size: 1.45rem;
            line-height: 1.65;
        }

        .cp-steps .service-card:not(:last-child)::after {
            content: "";
            position: absolute;
            top: 56px;
            bottom: 8px;
            left: 23px;
            right: auto;
            width: 2px;
            height: auto;
            border-radius: 2px;
            background: linear-gradient(180deg, hsla(240, 12%, 10%, 0.16), hsla(240, 12%, 10%, 0.04));
        }

    [dir="rtl"] .cp-steps .service-card:not(:last-child)::after {
        left: auto;
        right: 23px;
    }
}

/* Tablette : étapes en 2 colonnes centrées */
@media (min-width: 768px) and (max-width: 991.98px) {
    .cp-steps .grid-list {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 40px 32px !important;
    }
}

/* ---------- Menu mobile : panneau collé sous la barre, bords arrondis ---------- */
@media (max-width: 991.98px) {
    .header > .container {
        position: static !important;
    }

    .header .navbar {
        top: 100% !important;
        left: 12px !important;
        right: 12px !important;
        width: auto !important;
        max-width: none !important;
        height: auto !important;
        margin: 0 !important;
        padding: 14px 10px 20px !important;
        border: 1px solid hsla(240, 12%, 10%, 0.06) !important;
        border-top: 0 !important;
        border-radius: 0 0 20px 20px !important;
        background: #FFFFFF !important;
        box-shadow: 0 18px 36px -18px hsla(221, 30%, 20%, 0.28) !important;
    }
}

/* ---------- Accueil : héros, chiffres, téléphone et vitrine alignés sur le conteneur du site
   (mêmes bords gauche/droite que le logo, les cartes et les autres sections) ---------- */
@media (min-width: 992px) {
    .hx-main-hero .hx-wrap,
    .cd-wrap {
        box-sizing: border-box;
        max-width: 1100px !important;
        margin-inline: auto !important;
        padding-inline: 15px !important;
    }

    #NosProduits .grid-listP {
        max-width: none !important;
        margin-inline: 0 !important;
    }
}

@media (min-width: 1370px) {
    .hx-main-hero .hx-wrap,
    .cd-wrap {
        max-width: 1400px !important;
    }
}
