/* =========================================================
   FLEXTURBO — HEADER PREMIUM V2
   Structure dédiée au template ft-header-*
   ========================================================= */

@media (min-width: 1025px) {

    .header-container.header-style-12 {
        background: #070707 !important;
        background-image: none !important;
        box-shadow: 0 8px 26px rgba(0, 0, 0, .20);
    }

    .header-style-12 .header-top {
        min-height: 34px;
        background: #030303 !important;
        border-bottom: 1px solid rgba(255, 255, 255, .07);
    }

    .header-style-12 .header-top,
    .header-style-12 .header-top a {
        color: #cfcfcf !important;
        font-size: 13px;
    }

    .header-style-12 .header-top a:hover {
        color: #ffffff !important;
    }

    .header-style-12 .ft-header-premium {
        padding: 22px 0 !important;
        background:
            radial-gradient(circle at 72% 30%, rgba(255, 255, 255, .045), transparent 34%),
            linear-gradient(120deg, #050505 0%, #151515 100%) !important;
    }

    .header-style-12 .ft-header-grid {
        display: grid;
        grid-template-columns: 240px minmax(360px, 1fr) 430px;
        gap: 28px;
        align-items: center;
    }

    .header-style-12 .ft-header-logo {
        min-width: 0;
        display: flex;
        align-items: center;
    }

    .header-style-12 .ft-header-logo .logo-container,
    .header-style-12 .ft-header-logo .logo {
        width: 100%;
    }

    .header-style-12 .ft-header-logo .logo img {
        display: block;
        width: auto !important;
        height: auto !important;
        max-width: 235px !important;
        max-height: 82px !important;
        object-fit: contain;
        filter: drop-shadow(0 7px 14px rgba(0, 0, 0, .34));
    }

    .header-style-12 .ft-header-search {
        min-width: 0;
    }

    .header-style-12 .ft-header-search .search-container,
    .header-style-12 .ft-header-search .block-search,
    .header-style-12 .ft-header-search .block-content,
    .header-style-12 .ft-header-search form {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
    }

    .header-style-12 .ft-header-search .field.search {
        width: calc(100% - 62px) !important;
    }

    .header-style-12 .ft-header-search #search {
        width: 100% !important;
        height: 50px !important;
        padding: 0 18px !important;
        background: #ffffff !important;
        color: #1d1d1d !important;
        border: 1px solid #e3e3e3 !important;
        border-radius: 9px 0 0 9px !important;
        font-size: 14px !important;
        box-shadow:
            0 10px 24px rgba(0, 0, 0, .24),
            inset 0 0 0 1px rgba(255, 255, 255, .35);
    }

    .header-style-12 .ft-header-search #search::placeholder {
        color: #8a8a8a !important;
        opacity: 1;
    }

    .header-style-12 .ft-header-search .actions {
        width: 62px !important;
    }

    .header-style-12 .ft-header-search .action.search {
        width: 62px !important;
        height: 50px !important;
        background: linear-gradient(180deg, #da0000 0%, #b90000 100%) !important;
        border-radius: 0 9px 9px 0 !important;
        box-shadow: 0 10px 20px rgba(201, 0, 0, .24);
        transition:
            background-color .2s ease,
            transform .2s ease;
    }

    .header-style-12 .ft-header-search .action.search:hover {
        background: #a90000 !important;
        transform: translateY(-1px);
    }

    .header-style-12 .ft-header-actions {
        min-width: 0;
        display: grid;
        grid-template-columns: minmax(210px, 1fr) 165px;
        gap: 14px;
        align-items: center;
    }

    .header-style-12 .ft-header-phone,
    .header-style-12 .ft-header-cart {
        min-width: 0;
    }

    .header-style-12 .ft-header-phone .cms-header {
        margin: 0 !important;
    }

    .header-style-12 .ft-header-phone .call-us-content {
        width: 100%;
        min-height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 6px 8px !important;
        box-sizing: border-box;
        background: rgba(255, 255, 255, .035);
        border: 1px solid rgba(255, 255, 255, .10);
        border-radius: 9px;
        box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
        overflow: hidden;
    }

    .header-style-12 .ft-header-phone .call-us-content img {
        display: block;
        width: 100%;
        max-width: 250px;
        height: auto;
        object-fit: contain;
    }

    .header-style-12 .ft-header-cart .minicart-header,
    .header-style-12 .ft-header-cart .minicart-wrapper {
        width: 100%;
        margin: 0 !important;
    }

    .header-style-12 .ft-header-cart .action.showcart {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 50px !important;
        padding: 6px 10px !important;
        box-sizing: border-box;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .025)) !important;
        border: 1px solid rgba(255, 255, 255, .13) !important;
        border-radius: 9px !important;
        box-shadow: 0 8px 18px rgba(0, 0, 0, .20);
        overflow: hidden;
        transition:
            background-color .2s ease,
            border-color .2s ease,
            transform .2s ease;
    }

    .header-style-12 .ft-header-cart .action.showcart:hover {
        background: rgba(255, 255, 255, .10) !important;
        border-color: rgba(255, 255, 255, .24) !important;
        transform: translateY(-1px);
    }

    .header-style-12 .ft-header-cart .action.showcart .text,
    .header-style-12 .ft-header-cart .action.showcart .counter-label,
    .header-style-12 .ft-header-cart .action.showcart .price-minicart {
        color: #ffffff !important;
    }

    .header-style-12 .header-bottom {
        background: linear-gradient(180deg, #d10000 0%, #b70000 100%) !important;
        border-top: 1px solid rgba(255, 255, 255, .08);
        border-bottom: 1px solid rgba(0, 0, 0, .18);
        box-shadow: 0 5px 16px rgba(0, 0, 0, .17);
    }

    .header-style-12 .desktop-menu .sm_megamenu_menu {
        display: flex;
        align-items: stretch;
        justify-content: center;
        flex-wrap: nowrap;
    }

    .header-style-12 .desktop-menu .sm_megamenu_menu > li > a {
        position: relative;
        display: flex !important;
        align-items: center;
        min-height: 58px;
        padding: 0 16px !important;
        color: #ffffff !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        letter-spacing: .12px;
        transition: background-color .2s ease;
    }

    .header-style-12 .desktop-menu .sm_megamenu_menu > li > a::after {
        content: "";
        position: absolute;
        left: 16px;
        right: 16px;
        bottom: 8px;
        height: 2px;
        background: #ffffff;
        transform: scaleX(0);
        transform-origin: center;
        transition: transform .2s ease;
    }

    .header-style-12 .desktop-menu .sm_megamenu_menu > li:hover > a,
    .header-style-12 .desktop-menu .sm_megamenu_menu > li.sm_megamenu_actived > a {
        background: #a50000 !important;
    }

    .header-style-12 .desktop-menu .sm_megamenu_menu > li:hover > a::after,
    .header-style-12 .desktop-menu .sm_megamenu_menu > li.sm_megamenu_actived > a::after {
        transform: scaleX(1);
    }

    .header-style-12 .header-bottom img {
        filter: drop-shadow(0 5px 9px rgba(0, 0, 0, .26));
    }
}

@media (min-width: 1025px) and (max-width: 1366px) {

    .header-style-12 .ft-header-grid {
        grid-template-columns: 205px minmax(300px, 1fr) 370px;
        gap: 20px;
    }

    .header-style-12 .ft-header-logo .logo img {
        max-width: 200px !important;
    }

    .header-style-12 .ft-header-actions {
        grid-template-columns: minmax(185px, 1fr) 145px;
        gap: 10px;
    }

    .header-style-12 .ft-header-phone .call-us-content img {
        max-width: 215px;
    }

    .header-style-12 .desktop-menu .sm_megamenu_menu > li > a {
        padding-left: 12px !important;
        padding-right: 12px !important;
        font-size: 12px !important;
    }
}

/* Le mobile reste géré par le thème d’origine */
@media (max-width: 1024px) {
    .header-mobile {
        position: relative;
        z-index: 20;
    }
}
/* =========================================================
   FLEXTURBO — CORRECTIF STRUCTURE HEADER PREMIUM
   ========================================================= */

@media (min-width:1025px){

    /* Neutralise les anciennes contraintes du thème */
    .header-style-12 .ft-header-premium .l-content,
    .header-style-12 .ft-header-premium .r-content,
    .header-style-12 .ft-header-premium .content{
        float:none !important;
        width:auto !important;
        max-width:none !important;
        display:block !important;
        margin:0 !important;
        padding:0 !important;
    }

    .header-style-12 .ft-header-grid{
        width:100% !important;
        display:grid !important;
        grid-template-columns:240px minmax(360px,1fr) 520px !important;
        gap:26px !important;
        align-items:center !important;
    }

    .header-style-12 .ft-header-search,
    .header-style-12 .ft-header-actions{
        width:100% !important;
        max-width:none !important;
    }

    .header-style-12 .ft-header-search .block-search{
        float:none !important;
        width:100% !important;
        max-width:none !important;
        position:relative !important;
    }

    .header-style-12 .ft-header-search .block-search .block-content,
    .header-style-12 .ft-header-search form{
        display:flex !important;
        width:100% !important;
    }

    .header-style-12 .ft-header-search .field.search{
        float:none !important;
        flex:1 1 auto !important;
        width:auto !important;
        min-width:0 !important;
    }

    .header-style-12 .ft-header-search .actions{
        float:none !important;
        flex:0 0 62px !important;
        width:62px !important;
    }

    .header-style-12 .ft-header-actions{
        display:grid !important;
        grid-template-columns:300px 186px !important;
        gap:14px !important;
    }

    /* Menu sur une seule ligne */
    .header-style-12 .desktop-menu,
    .header-style-12 .horizontal-block{
        width:100% !important;
        overflow:visible !important;
    }

    .header-style-12 .desktop-menu .sm_megamenu_menu{
        display:flex !important;
        flex-wrap:nowrap !important;
        align-items:stretch !important;
        justify-content:center !important;
        width:100% !important;
        white-space:nowrap !important;
    }

    .header-style-12 .desktop-menu .sm_megamenu_menu > li{
        float:none !important;
        display:block !important;
        flex:0 0 auto !important;
    }

    .header-style-12 .desktop-menu .sm_megamenu_menu > li > a{
        display:flex !important;
        align-items:center !important;
        min-height:58px !important;
        height:58px !important;
        padding:0 14px !important;
        line-height:1.2 !important;
        white-space:nowrap !important;
    }

    /* Évite le texte sur deux lignes */
    .header-style-12 .desktop-menu .sm_megamenu_menu > li > a span,
    .header-style-12 .desktop-menu .sm_megamenu_menu > li > a{
        white-space:nowrap !important;
    }
}

@media (min-width:1025px) and (max-width:1366px){

    .header-style-12 .ft-header-grid{
        grid-template-columns:205px minmax(300px,1fr) 450px !important;
        gap:18px !important;
    }

    .header-style-12 .ft-header-actions{
        grid-template-columns:250px 170px !important;
        gap:10px !important;
    }

    .header-style-12 .desktop-menu .sm_megamenu_menu > li > a{
        padding-left:10px !important;
        padding-right:10px !important;
        font-size:11px !important;
    }
}
/* =========================================================
   Repositionnement du turbo décoratif
   ========================================================= */

@media (min-width:1025px){

    /* le menu devient le repère */
    .header-style-12 .header-bottom{
        position:relative;
        overflow:visible;
    }

    /* turbo décoratif */
    .header-style-12 .header-bottom img{
        position:absolute !important;
        right:340px !important;
        top:-22px !important;
        width:88px !important;
        height:auto !important;
        z-index:20;
        pointer-events:none;
        filter:drop-shadow(0 8px 14px rgba(0,0,0,.35));
    }

}
/* Masquer le turbo décoratif du menu */
.header-style-12 .horizontal-block > .custom-item,
.header-style-12 .horizontal-block .nav-custom-items,
.header-style-12 .horizontal-block [class*="custom-item"] img {
    display: none !important;
}
/* =========================================================
   FLEXTURBO — MENU PREMIUM
   ========================================================= */

@media (min-width:1025px){

    .header-style-12 .header-bottom{
        position:relative;
        background:
            linear-gradient(180deg,#c90000 0%,#a90000 100%) !important;
        border-top:1px solid rgba(255,255,255,.12);
        border-bottom:1px solid rgba(0,0,0,.35);
        box-shadow:
            0 6px 18px rgba(0,0,0,.22),
            inset 0 1px 0 rgba(255,255,255,.10);
    }

    .header-style-12 .header-bottom::before{
        content:"";
        position:absolute;
        left:0;
        right:0;
        top:0;
        height:2px;
        background:linear-gradient(
            90deg,
            transparent 0%,
            rgba(255,255,255,.55) 50%,
            transparent 100%
        );
        opacity:.65;
        pointer-events:none;
    }

    .header-style-12 .desktop-menu .sm_megamenu_menu{
        min-height:60px;
        display:flex !important;
        align-items:stretch !important;
        justify-content:center !important;
        flex-wrap:nowrap !important;
    }

    .header-style-12 .desktop-menu .sm_megamenu_menu > li{
        position:relative;
        float:none !important;
        display:flex !important;
        align-items:stretch;
    }

    .header-style-12 .desktop-menu .sm_megamenu_menu > li:not(:last-child)::after{
        content:"";
        position:absolute;
        right:0;
        top:18px;
        bottom:18px;
        width:1px;
        background:rgba(255,255,255,.13);
    }

    .header-style-12 .desktop-menu .sm_megamenu_menu > li > a{
        position:relative;
        display:flex !important;
        align-items:center !important;
        justify-content:center;
        height:60px !important;
        min-height:60px !important;
        padding:0 22px !important;
        color:#fff !important;
        font-size:12.5px !important;
        font-weight:700 !important;
        letter-spacing:.18px;
        line-height:1.2 !important;
        text-transform:uppercase;
        white-space:nowrap !important;
        background:transparent !important;
        transition:
            background-color .22s ease,
            color .22s ease;
    }

    .header-style-12 .desktop-menu .sm_megamenu_menu > li > a::before{
        content:"";
        position:absolute;
        left:18px;
        right:18px;
        bottom:0;
        height:3px;
        background:#fff;
        transform:scaleX(0);
        transform-origin:center;
        transition:transform .22s ease;
    }

    .header-style-12 .desktop-menu .sm_megamenu_menu > li:hover > a,
    .header-style-12 .desktop-menu .sm_megamenu_menu > li.sm_megamenu_actived > a{
        background:rgba(0,0,0,.16) !important;
        color:#fff !important;
    }

    .header-style-12 .desktop-menu .sm_megamenu_menu > li:hover > a::before,
    .header-style-12 .desktop-menu .sm_megamenu_menu > li.sm_megamenu_actived > a::before{
        transform:scaleX(1);
    }

    .header-style-12 .desktop-menu .sm_megamenu_menu > li > a .icon_items{
        margin-right:7px;
        opacity:.9;
    }

    .header-style-12 .desktop-menu .sm_megamenu_dropdown_6columns{
        margin-top:0 !important;
        border:1px solid rgba(0,0,0,.08);
        border-radius:0 0 10px 10px;
        box-shadow:0 18px 38px rgba(0,0,0,.22);
        overflow:hidden;
    }
}

@media (min-width:1025px) and (max-width:1366px){

    .header-style-12 .desktop-menu .sm_megamenu_menu > li > a{
        padding-left:15px !important;
        padding-right:15px !important;
        font-size:11.5px !important;
    }
}
/* =========================================================
   CORRECTIF MEGAMENU — largeur et colonnes
   ========================================================= */

@media (min-width:1025px){

    .header-style-12 .sm_megamenu_wrapper_horizontal_menu{
        position:static !important;
    }

    .header-style-12 .sm_megamenu_menu > li{
        position:static !important;
    }

    .header-style-12 .sm_megamenu_dropdown_6columns{
        left:50% !important;
        right:auto !important;
        width:1170px !important;
        max-width:calc(100vw - 40px) !important;
        transform:translateX(-50%) !important;
        padding:28px 34px !important;
        box-sizing:border-box !important;
        overflow:visible !important;
        border-radius:0 0 12px 12px !important;
        background:#fff !important;
    }

    .header-style-12 .sm_megamenu_dropdown_6columns .sm_megamenu_col_1,
    .header-style-12 .sm_megamenu_dropdown_6columns .sm_megamenu_col_2,
    .header-style-12 .sm_megamenu_dropdown_6columns .sm_megamenu_col_3,
    .header-style-12 .sm_megamenu_dropdown_6columns .sm_megamenu_col_4,
    .header-style-12 .sm_megamenu_dropdown_6columns .sm_megamenu_col_5,
    .header-style-12 .sm_megamenu_dropdown_6columns .sm_megamenu_col_6{
        float:left !important;
        width:16.666666% !important;
        padding:0 9px !important;
        box-sizing:border-box !important;
    }

    .header-style-12 .sm_megamenu_dropdown_6columns a{
        display:block !important;
        width:100% !important;
        min-width:0 !important;
        padding:12px 18px !important;
        box-sizing:border-box !important;
        white-space:nowrap !important;
        overflow:visible !important;
        text-overflow:clip !important;
    }
}
/* =========================================================
   CORRECTION DÉFINITIVE DES COLONNES DU MÉGAMENU
   ========================================================= */

@media (min-width:1025px){

    .header-style-12 .sm_megamenu_dropdown_6columns > .sm_megamenu_col_6,
    .header-style-12 .sm_megamenu_dropdown_6columns .sm_megamenu_col_6{
        float:none !important;
        display:block !important;
        width:100% !important;
        padding:0 !important;
        box-sizing:border-box !important;
    }

    .header-style-12 .sm_megamenu_dropdown_6columns .sm_megamenu_col_1{
        float:left !important;
        display:block !important;
        width:16.666666% !important;
        padding:0 9px !important;
        box-sizing:border-box !important;
    }

    .header-style-12 .sm_megamenu_dropdown_6columns .sm_megamenu_col_2{
        width:33.333333% !important;
    }

    .header-style-12 .sm_megamenu_dropdown_6columns .sm_megamenu_col_3{
        width:50% !important;
    }

    .header-style-12 .sm_megamenu_dropdown_6columns .sm_megamenu_col_4{
        width:66.666666% !important;
    }

    .header-style-12 .sm_megamenu_dropdown_6columns .sm_megamenu_col_5{
        width:83.333333% !important;
    }

    .header-style-12 .sm_megamenu_dropdown_6columns a{
        display:block !important;
        width:auto !important;
        height:auto !important;
        min-height:0 !important;
        padding:12px 18px !important;
        line-height:1.35 !important;
        white-space:normal !important;
        overflow:visible !important;
        text-overflow:clip !important;
    }

    .header-style-12 .sm_megamenu_dropdown_6columns::after{
        content:"";
        display:block;
        clear:both;
    }
}
/* =========================================================
   FLEXTURBO — RECHERCHE ET PANIER PREMIUM
   ========================================================= */

@media (min-width:1025px){

    /* Fond central du header */
    .header-style-12 .ft-header-premium{
        background:
            radial-gradient(circle at 65% 0%,rgba(255,255,255,.055),transparent 38%),
            linear-gradient(115deg,#050505 0%,#111111 55%,#080808 100%) !important;
        border-bottom:1px solid rgba(255,255,255,.06);
    }

    /* Barre de recherche */
    .header-style-12 .ft-header-search .block-search{
        border-radius:8px !important;
        box-shadow:
            0 12px 30px rgba(0,0,0,.32),
            0 0 0 1px rgba(255,255,255,.08);
    }

    .header-style-12 .ft-header-search #search{
        height:50px !important;
        padding-left:20px !important;
        background:linear-gradient(180deg,#ffffff 0%,#f7f7f7 100%) !important;
        border:0 !important;
        border-radius:8px 0 0 8px !important;
        color:#181818 !important;
        font-size:14px !important;
        font-weight:500 !important;
        letter-spacing:.1px;
        box-shadow:none !important;
    }

    .header-style-12 .ft-header-search #search:focus{
        background:#fff !important;
        box-shadow:inset 0 0 0 2px rgba(204,0,0,.22) !important;
    }

    .header-style-12 .ft-header-search .action.search{
        height:50px !important;
        background:linear-gradient(180deg,#e00000 0%,#b60000 100%) !important;
        border:0 !important;
        border-radius:0 8px 8px 0 !important;
        box-shadow:
            inset 1px 0 0 rgba(0,0,0,.12),
            0 8px 18px rgba(190,0,0,.24);
    }

    .header-style-12 .ft-header-search .action.search:hover{
        background:linear-gradient(180deg,#f00000 0%,#c30000 100%) !important;
    }

    /* Bloc N° Cristal conservé */
    .header-style-12 .ft-header-phone .call-us-content{
        background:rgba(255,255,255,.035) !important;
        border:1px solid rgba(255,255,255,.10) !important;
        border-radius:8px !important;
        box-shadow:
            inset 0 1px 0 rgba(255,255,255,.06),
            0 8px 20px rgba(0,0,0,.24);
    }

    /* Panier */
    .header-style-12 .ft-header-cart .action.showcart{
        position:relative;
        background:
            linear-gradient(180deg,rgba(255,255,255,.075),rgba(255,255,255,.025)) !important;
        border:1px solid rgba(255,255,255,.13) !important;
        border-radius:8px !important;
        box-shadow:
            inset 0 1px 0 rgba(255,255,255,.06),
            0 8px 20px rgba(0,0,0,.24);
    }

    .header-style-12 .ft-header-cart .action.showcart::before{
        background:#c90000 !important;
        border-radius:6px !important;
        box-shadow:0 5px 12px rgba(201,0,0,.25);
    }

    .header-style-12 .ft-header-cart .action.showcart:hover{
        background:rgba(255,255,255,.10) !important;
        border-color:rgba(255,255,255,.24) !important;
    }

    .header-style-12 .ft-header-cart .action.showcart .text{
        font-size:12px !important;
        font-weight:700 !important;
        letter-spacing:.35px;
        text-transform:uppercase;
    }

    .header-style-12 .ft-header-cart .counter-label,
    .header-style-12 .ft-header-cart .price-minicart{
        font-size:12px !important;
        color:#bcbcbc !important;
    }
}
/* Correction largeur N° Cristal et panier */
@media (min-width: 1200px) {
    .header-style-12 .ft-header-grid {
        grid-template-columns: 240px minmax(320px, 1fr) 500px !important;
    }

    .header-style-12 .ft-header-actions {
        grid-template-columns: 300px 186px !important;
        gap: 14px !important;
    }

    .header-style-12 .ft-header-phone .call-us-content,
    .header-style-12 .ft-header-cart .action.showcart {
        overflow: visible !important;
    }
}

/* Ajustement final du mini-panier desktop */
@media (min-width:1025px) {
    .header-style-12 .ft-header-actions {
        grid-template-columns: 240px 180px !important;
    }

    .header-style-12 .ft-header-cart .action.showcart {
        white-space: nowrap !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .header-style-12 .ft-header-cart .action.showcart .text,
    .header-style-12 .ft-header-cart .counter-label,
    .header-style-12 .ft-header-cart .price-minicart {
        white-space: nowrap !important;
    }
}

/* Correctif bouton panier header-12 : espace pour l'icône */
@media (min-width: 1025px) {
    .header-style-12 .ft-header-cart .action.showcart {
        padding-left: 56px !important;
        padding-right: 14px !important;
        white-space: nowrap !important;
    }
}

/* Correctif bouton panier header-12 v2 : éviter troncature texte */
@media (min-width: 1025px) {
    .header-style-12 .ft-header-cart .action.showcart {
        overflow: visible !important;
        width: auto !important;
        min-width: 165px !important;
    }
    .header-style-12 .ft-header-actions {
        grid-template-columns: 240px 210px !important;
    }
}
