/* =====================================================
   SORAM — Correctifs Responsive Mobile
   À inclure APRÈS les autres feuilles de style
   ===================================================== */


/* ─────────────────────────────────────────────────────
   1. HEADER — fixé en haut sur mobile, z-index élevé
   ───────────────────────────────────────────────────── */

@media (max-width: 992px) {

    header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 9999 !important;
        background: var(--bg-dark-1, #262422) !important;
        padding: 8px 0 !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    }

    header .container {
        max-width: 100% !important;
        padding: 0 15px !important;
    }

    /* Logo : n'afficher que logo-mobile, masquer les deux autres */
    header .logo-main,
    header .logo-scroll {
        display: none !important;
    }

    header .logo-mobile {
        display: block !important;
        max-width: 110px !important;
    }

    /* Bouton burger visible */
    #menu-btn {
        display: block !important;
        float: right;
        cursor: pointer;
        z-index: 10001;
        position: relative;
        margin-top: 5px;
    }

    /* Cacher le bouton "Nous contacter" sur mobile */
    .menu_side_area a.btn-main {
        display: none !important;
    }

    /* Menu déroulant mobile */
    #mainmenu {
        position: fixed !important;
        top: 55px !important;
        left: 0 !important;
        width: 100% !important;
        background: rgba(30, 28, 26, 0.98) !important;
        padding: 15px 20px 40px !important;
        z-index: 9998 !important;
        max-height: calc(100vh - 55px);
        overflow-y: auto;
        border-top: 1px solid rgba(69, 167, 239, 0.3);
    }

    #mainmenu > li {
        display: block !important;
        float: none !important;
        width: 100% !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
        margin: 0 !important;
    }

    #mainmenu > li > a {
        display: block !important;
        padding: 12px 5px !important;
        font-size: 15px !important;
        color: #fff !important;
        width: 100% !important;
    }

    /* Sous-menus mobiles */
    #mainmenu li ul {
        position: static !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        width: 100% !important;
        background: rgba(0, 0, 0, 0.2) !important;
        border: none !important;
        padding: 0 !important;
        display: none;
    }

    #mainmenu li ul li a {
        padding: 8px 10px 8px 25px !important;
        font-size: 13px !important;
        color: rgba(255,255,255,0.75) !important;
        border-bottom: 1px solid rgba(255,255,255,0.05) !important;
        display: block !important;
        white-space: normal !important;
    }

    /* Icône chevron sur les items avec sous-menu */
    #mainmenu > li.has-child::after {
        float: right !important;
        padding-right: 5px !important;
        font-size: 12px !important;
        color: rgba(69, 167, 239, 0.8) !important;
        line-height: 3em !important;
    }

    /* Offset du contenu principal sous le header fixe */
    main,
    #mainContent,
    body > main {
        padding-top: 0 !important;
    }

    section.bg-dark-1.jarallax {
        padding-top: 55px !important;
        margin-top: 0 !important;
    }

    /* Btn extra (dots) caché sur mobile */
    #btn-extra {
        display: none !important;
    }
}


/* ─────────────────────────────────────────────────────
   2. CAROUSEL HERO — hauteur et layout mobile
   ───────────────────────────────────────────────────── */

@media (max-width: 992px) {

    .slide-content {
        height: 420px !important;
    }

    .main-image img {
        object-fit: cover !important;
        object-position: center center !important;
    }

    /* Caption centrée horizontalement et verticalement */
    .image-caption {
        top: 50% !important;
        left: 50% !important;
        right: auto !important;
        transform: translate(-50%, -50%) !important;
        text-align: center !important;
        width: 88% !important;
        max-width: 88% !important;
        padding: 18px 16px !important;
        background-color: rgba(38, 36, 34, 0.78) !important;
        border-radius: 4px;
    }

    .SlTitle {
        font-size: 26px !important;
        line-height: 1.25 !important;
        margin-bottom: 8px !important;
        display: block !important;
    }

    .SlDesc {
        font-size: 13px !important;
        line-height: 1.5 !important;
        /* Limiter à 3 lignes sur mobile */
        display: -webkit-box !important;
        -webkit-line-clamp: 3 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    /* Flèches carousel */
    .carousel-nav {
        bottom: 12px !important;
        right: 12px !important;
        gap: 10px !important;
    }

    .nav-btn {
        width: 38px !important;
        height: 38px !important;
        font-size: 18px !important;
    }

    .carousel-dots {
        bottom: 12px !important;
    }

    .dot {
        width: 9px !important;
        height: 9px !important;
    }
}

/* Très petits écrans ≤ 480 px */
@media (max-width: 480px) {

    .slide-content {
        height: 320px !important;
    }

    .image-caption {
        width: 92% !important;
        padding: 12px 12px !important;
    }

    .SlTitle {
        font-size: 19px !important;
        line-height: 1.2 !important;
        margin-bottom: 5px !important;
    }

    .SlDesc {
        font-size: 11.5px !important;
        -webkit-line-clamp: 2 !important;
        line-height: 1.4 !important;
    }

    .nav-btn {
        width: 32px !important;
        height: 32px !important;
        font-size: 15px !important;
    }
}


/* ─────────────────────────────────────────────────────
   3. DRONE IMAGE & MARQUEE — éviter les débordements
   ───────────────────────────────────────────────────── */

@media (max-width: 992px) {

    /* Image drone sous le carousel */
    .relative.z-3 {
        overflow: hidden;
    }

    .relative.z-3 img {
        max-width: 80% !important;
        margin: 0 auto !important;
        display: block !important;
    }

    /* Texte marquee moins massif */
    .d-item-txt.fs-150 {
        font-size: 80px !important;
        line-height: 80px !important;
    }
}


/* ─────────────────────────────────────────────────────
   4. SECTIONS APPLICATIONS & SECTEURS — scroll horizontal
   ───────────────────────────────────────────────────── */

@media (max-width: 992px) {

    .app-item {
        width: 280px !important;
    }

    .sector-item {
        width: 240px !important;
    }

    /* Boutons nav flèches scroll - les décaler pour ne pas déborder */
    .nav-arrows.prev {
        left: 4px !important;
    }

    .nav-arrows.next {
        right: 4px !important;
    }
}

@media (max-width: 480px) {

    .app-item {
        width: 240px !important;
    }

    .sector-item {
        width: 210px !important;
    }
}


/* ─────────────────────────────────────────────────────
   5. SECTION ÉQUIPE / VISION — empilage vertical
   ───────────────────────────────────────────────────── */

@media (max-width: 992px) {

    .half-fluid .image {
        min-height: 250px !important;
    }
}


/* ─────────────────────────────────────────────────────
   6. FOOTER — lisibilité mobile
   ───────────────────────────────────────────────────── */

@media (max-width: 768px) {

    footer {
        padding: 50px 0 0 !important;
    }

    footer .widget {
        margin-bottom: 25px !important;
    }

    .subfooter .de-flex {
        display: block !important;
        text-align: center;
    }

    .subfooter ul {
        margin-top: 10px !important;
        padding: 0 !important;
    }

    .subfooter ul li {
        display: inline-block !important;
        margin: 0 5px !important;
    }
}

/* ─────────────────────────────────────────────────────
   7. MODAL DÉTAIL — overlay transparent, contenu visible
   ───────────────────────────────────────────────────── */

/* ── Desktop : fond flou, contenu de la page visible ── */
@media (min-width: 769px) {

    .detail-modal-overlay {
        background: rgba(0, 0, 0, 0.25) !important;
        backdrop-filter: blur(4px) brightness(0.75) !important;
        -webkit-backdrop-filter: blur(4px) brightness(0.75) !important;
    }

    .detail-modal {
        background: rgba(13, 17, 23, 0.97) !important;
        box-shadow:
            0 0 0 1px rgba(69, 167, 239, 0.3),
            0 30px 80px rgba(0, 0, 0, 0.6),
            0 0 60px rgba(69, 167, 239, 0.1) !important;
    }
}

/* ── Mobile : plein écran, pas de flou ── */
@media (max-width: 768px) {

    .detail-modal-overlay {
        background: rgba(0, 0, 0, 0.7) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    .detail-modal {
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh !important;
        max-height: 100vh !important;
        flex-direction: column !important;
        border-radius: 0 !important;
        border: none !important;
    }

    .modal-image-section {
        flex: 0 0 38% !important;
        width: 100% !important;
        max-height: 38vh !important;
    }

    .modal-content-section {
        max-height: none !important;
        flex: 1 !important;
    }
}


/* ─────────────────────────────────────────────────────
   8. COOKIE BANNER — mobile compact
   ───────────────────────────────────────────────────── */

@media (max-width: 600px) {

    #cookie-banner {
        padding: 12px 15px !important;
    }

    #cookie-banner p {
        font-size: 12px !important;
    }

    #cookie-accept,
    #cookie-refuse {
        padding: 8px 14px !important;
        font-size: 12px !important;
    }
}