/* ====================================
   Header & Navigation - En-tête et menu principal
   ==================================== */

/* Site Header - Structure principale */
.site-header {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    background: var(--surface-strong);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    overflow: visible;
    margin-bottom: clamp(8px, 1.3vw, 11px);
}

.site-header__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: clamp(12px, 2.5vw, 20px);
    padding: clamp(16px, 3vw, 20px);
    background: var(--surface-strong);
    border-radius: 16px 16px 0 0;
}

.site-header__nav {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: clamp(8px, 2vw, 12px) clamp(12px, 3vw, 20px);
    background: linear-gradient(135deg, rgba(33, 189, 208, 0.03) 0%, rgba(41, 84, 145, 0.03) 100%);
    border-top: 1px solid var(--border-soft);
    border-radius: 0 0 16px 16px;
    position: relative;
    z-index: 100;
    overflow: visible;
}

/* Brand / Logo */
.site-header__brand {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.site-header__brand img {
    height: clamp(64px, 10vw, 80px);
    width: auto;
    max-width: 160px;
}

/* Centre - Tagline et assistance */
.site-header__center {
    flex: 1 1 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    padding: 0 clamp(8px, 1.5vw, 16px);
    max-width: 600px;
}

.site-header__tagline {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-body);
    font-weight: 600;
    letter-spacing: 0.01em;
}

.site-header__assist {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    font-size: 0.92rem;
    color: var(--text-heading);
    font-weight: 600;
}

.site-header__assist a {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
}

.site-header__assist a:hover {
    color: var(--primary-dark);
}

.site-header__assist-divider {
    color: rgba(31, 37, 71, 0.35);
}

.site-header__assist-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.site-header__assist-whatsapp::before {
    content: '';
    width: 16px;
    height: 16px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%2325D366"><path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z"/></svg>') center/contain no-repeat;
    display: inline-block;
}

/* Actions - Liens et panier */
.site-header__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex: 0 0 auto;
    min-width: clamp(200px, 24vw, 280px);
}

.site-header__linklist {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: clamp(16px, 3vw, 24px);
    justify-content: flex-end;
}

.site-header__link-item {
    position: relative;
    font-size: 0.9rem;
    font-weight: 600;
}

.site-header__link-item a {
    color: var(--text-heading);
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-header__link-item a i {
    color: #295491;
    font-size: 24px;
    transition: all 0.3s ease;
    font-weight: 400;
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
}

/* Icônes SVG panier */
.icon-cart {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    transition: all 0.3s ease;
    color: #21bdd0;
    display: inline-block;
}

.icon-cart-outline {
    stroke-width: 35;
    stroke: #295491;
}

/* Icônes SVG localisation */
.icon-location {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    transition: all 0.3s ease;
    color: #21bdd0;
    display: inline-block;
}

.icon-location-outline {
    stroke-width: 35;
    stroke: #295491;
}

/* Localisation outline devient solid au survol */
.site-header__link-item a:hover .icon-location-outline {
    fill: #21bdd0;
    stroke: none;
}

/* Force les icônes à être en mode regular (outline) */
.site-header__link-item a i.far {
    font-family: "Font Awesome 5 Free";
    font-weight: 400;
}

/* Icônes outline (far) se transforment en solid (fas) au survol */
.site-header__link-item a:hover i.far {
    font-weight: 900;
}

/* Panier outline devient solid au survol */
.site-header__cart-link:hover .icon-cart-outline {
    fill: currentColor;
    stroke: none;
}

.site-header__link-item a:hover {
    color: var(--primary-dark);
}

.site-header__link-item a:hover i,
.site-header__link-item a:hover .icon-cart {
    color: var(--primary-dark);
}

.site-header__cart-link .cart-count {
    font-size: 0.85rem;
    margin-left: 4px;
}

/* Panier avec items : icône se remplit automatiquement */
.site-header__cart-link.has-items {
    color: var(--primary-dark);
}

.site-header__cart-link.has-items i.far {
    font-weight: 900;
}

.site-header__cart-link.has-items i,
.site-header__cart-link.has-items .icon-cart {
    color: var(--primary-dark);
}

.mini-cart-preview {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    display: none;
    width: clamp(240px, 30vw, 320px);
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--border-strong);
    background: var(--surface-strong);
    box-shadow: var(--shadow-md);
    z-index: 1000;
}

.mini-cart-preview p {
    margin: 0 0 8px;
    font-size: 0.78rem;
    color: var(--text-body);
}

.mini-cart-preview__total {
    font-weight: 700;
    color: var(--text-heading);
}

.mini-cart-preview__empty {
    margin: 0;
    font-size: 0.78rem;
    color: rgba(68, 81, 111, 0.76);
}

.mini-cart-preview img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    margin-right: 8px;
    vertical-align: middle;
}

.site-header__cart:hover .mini-cart-preview,
.site-header__cart:focus-within .mini-cart-preview {
    display: block;
}

.site-header__meta {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    line-height: 24px;
    height: 24px;
}

/* Barre de recherche */
.site-header__search {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface-contrast);
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    padding: 8px 8px 8px 20px;
    width: 100%;
    max-width: 560px;
    box-shadow: var(--shadow-sm);
    margin: 0 auto;
}

.site-header__search input {
    flex: 1 1 auto;
    border: 0;
    background: transparent;
    font-size: 0.9rem;
    color: var(--text-heading);
    padding: 6px 4px;
    outline: none;
}

.site-header__search input::placeholder {
    color: #607089;
}

.site-header__search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #607089;
    cursor: pointer;
    transition: all 0.3s ease;
}

.site-header__search button:hover {
    background: rgba(177, 177, 177, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.site-header__search button:focus-visible {
    outline: 2px solid rgba(96, 112, 137, 0.3);
    outline-offset: 2px;
}

.site-header__search button svg {
    width: 18px;
    height: 18px;
}

/* Menu principal */
#templatemo_menu {
    float: none !important;
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow: visible;
}

#templatemo_menu > ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: clamp(5px, 2vw, 11px);
    overflow: visible;
}

#templatemo_menu > ul > li {
    float: none !important;
    position: relative;
    display: flex;
    align-items: center;
}

#templatemo_menu > ul > li > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-heading);
    text-decoration: none;
    transition: all 0.2s ease;
    background: transparent;
    white-space: nowrap;
}

#templatemo_menu > ul > li > a .menu-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

#templatemo_menu > ul > li > a:hover .menu-icon {
    transform: scale(1.1);
}

#templatemo_menu > ul > li > a:hover,
#templatemo_menu > ul > li > a.selected {
    background: rgba(41, 84, 145, 0.08);
    color: var(--text-heading) !important;
    box-shadow: 0 2px 8px rgba(41, 84, 145, 0.1);
}

/* Sous-menus */
#templatemo_menu ul li ul {
    margin-top: 0;
    padding: 14px 0;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    background: var(--surface-strong);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    position: absolute;
    min-width: 220px;
    max-width: 320px;
}

#templatemo_menu ul li ul li {
    float: none;
}

#templatemo_menu ul li ul li a {
    display: block;
    padding: 8px 20px;
    color: var(--text-body);
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#templatemo_menu ul li ul li a:hover {
    background: rgba(41, 84, 145, 0.06);
    color: var(--text-heading);
}

/* Bouton "Plus" pour menu débordant */
.menu-more-btn {
    position: relative;
}

.menu-more-btn > a {
    background: rgba(41, 84, 145, 0.08) !important;
    border: 1px solid var(--border-soft);
    font-weight: 700 !important;
}

.menu-more-btn > a:hover {
    background: rgba(41, 84, 145, 0.15) !important;
}

.menu-more-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    padding: 10px 0;
    background: var(--surface-strong);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    min-width: 200px;
    max-width: 280px;
    z-index: 1001;
    list-style: none;
}

.menu-more-dropdown li {
    display: block !important;
    float: none !important;
}

.menu-more-dropdown li > a {
    display: block !important;
    padding: 8px 16px !important;
    font-size: 0.85rem !important;
    gap: 6px !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.menu-more-dropdown li > a:hover {
    background: rgba(41, 84, 145, 0.06) !important;
}

.menu-more-dropdown li > a .menu-icon {
    width: 20px !important;
    height: 20px !important;
}

/* Hero Banner */
.site-hero {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.site-hero__nav {
    display: none !important;
}

.site-hero__banner {
    margin: 0 0 clamp(8px, 1.3vw, 11px) 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(12px, 2.5vw, 18px);
}

/* Double bannière : partage horizontal 50/50 */
.site-hero__banner:has(> :nth-child(2)) {
    grid-template-columns: 1fr 1fr;
}

.site-hero__banner > * {
    width: 100%;
}

/* Responsive - Menu écrans moyens (1024px - 1280px) */
@media (max-width: 1280px) {
    #templatemo_menu > ul {
        gap: clamp(3px, 1.5vw, 8px);
    }
    
    #templatemo_menu > ul > li > a {
        font-size: clamp(0.75rem, 1.2vw, 0.85rem);
        padding: 4px clamp(8px, 1.5vw, 10px);
        gap: 6px;
    }
    
    #templatemo_menu > ul > li > a .menu-icon {
        width: clamp(32px, 5vw, 36px);
        height: clamp(32px, 5vw, 36px);
    }
}

/* Écrans moyens étroits (900px - 1024px) */
@media (max-width: 1024px) and (min-width: 721px) {
    .site-header__nav {
        padding: 6px 10px;
    }
    
    #templatemo_menu > ul {
        gap: 2px;
        max-width: 100%;
    }
    
    #templatemo_menu > ul > li > a {
        font-size: clamp(0.7rem, 1.8vw, 0.78rem);
        padding: 3px 6px;
        gap: 4px;
    }
    
    #templatemo_menu > ul > li > a .menu-icon {
        width: 28px;
        height: 28px;
    }
}

/* Écrans très étroits (768px - 900px) */
@media (max-width: 900px) and (min-width: 721px) {
    #templatemo_menu > ul {
        gap: 1px;
    }
    
    #templatemo_menu > ul > li > a {
        font-size: 0.68rem;
        padding: 2px 5px;
        gap: 3px;
    }
    
    #templatemo_menu > ul > li > a .menu-icon {
        width: 24px;
        height: 24px;
    }
}

/* Responsive - Bannières mobile */
@media (max-width: 768px) {
    .site-hero__banner {
        gap: 8px;
    }
    
    /* Masquer les boutons CTA sur mobile */
    .uc-sv-banner__cta,
    .uc-impression-banner__cta {
        display: none !important;
    }
    
    /* Normaliser la hauteur des deux bannières */
    .uc-sv-banner__inner,
    .uc-impression-banner__inner {
        cursor: pointer !important;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
        padding: 10px 8px !important;
        gap: 8px !important;
        min-height: 70px !important;
        max-height: 70px !important;
        align-items: center !important;
    }
    
    .uc-sv-banner__inner:active,
    .uc-impression-banner__inner:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
    
    /* Icônes identiques */
    .uc-sv-banner__icon,
    .uc-impression-banner__icon {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        flex-shrink: 0 !important;
    }
    
    .uc-sv-banner__icon svg,
    .uc-impression-banner__icon svg {
        width: 16px !important;
        height: 16px !important;
    }
    
    /* Texte identique et compact */
    .uc-sv-banner__content,
    .uc-impression-banner__content {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }
    
    .uc-sv-banner__title,
    .uc-impression-banner__title {
        font-size: 0.8rem !important;
        line-height: 1.2 !important;
        margin-bottom: 2px !important;
    }
    
    .uc-sv-banner__subtitle,
    .uc-impression-banner__subtitle {
        font-size: 0.65rem !important;
        line-height: 1.2 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }
}

/* Responsive - Header mobile */
@media (max-width: 720px) {
    .site-header {
        border-radius: 12px;
        margin-bottom: 8px;
    }

    .site-header__top {
        padding: 8px 12px 10px;
        gap: 0;
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto auto;
        align-items: start;
        background: transparent;
        border-radius: 0;
    }

    /* Ligne 1: Logo à gauche + Icônes à droite */
    .site-header__brand {
        grid-column: 1;
        grid-row: 1;
        align-self: center;
    }

    .site-header__brand img {
        height: 50px;
        max-width: 140px;
    }

    .site-header__actions {
        grid-column: 2;
        grid-row: 1;
        flex-direction: row;
        gap: 12px;
        min-width: auto;
        align-items: center;
        align-self: center;
    }

    .site-header__linklist {
        gap: 12px;
        margin: 0;
    }

    .site-header__link-item a i {
        font-size: 1.4rem;
    }

    .site-header__meta {
        display: none;
    }

    /* Ligne 2: Texte centré sur toute la largeur */
    .site-header__center {
        grid-column: 1 / -1;
        grid-row: 2;
        padding: 0;
        gap: 2px;
        margin-top: 6px;
    }

    .site-header__tagline {
        font-size: 0.84rem;
        line-height: 1.1;
    }

    .site-header__assist {
        font-size: 0.900rem;
        gap: 3px;
        flex-direction: column;
        line-height: 1.2;
    }

    .site-header__assist-divider {
        display: none;
    }

    .site-header__assist-whatsapp::before {
        width: 11px;
        height: 11px;
    }

    /* Ligne 3: Barre de recherche */
    .site-header__search {
        grid-column: 1 / -1;
        grid-row: 3;
        width: 7.5cm;
        padding: 0;
        margin-top: 8px;
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
    }

    .site-header__search input {
        font-size: 0.82rem;
        padding: 8px 12px;
        width: 100%;
        box-sizing: border-box;
    }

    .site-header__search button {
        width: 32px;
        height: 32px;
    }

    .site-header__search button svg {
        width: 15px;
        height: 15px;
    }

    /* Navigation du header masquée */
    .site-header__nav {
        display: none !important;
    }
}

/* Responsive - Tablettes */
@media (max-width: 1024px) {
    .site-header__top {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    .site-header__actions {
        align-items: center;
        width: 100%;
    }

    .site-header__center {
        width: 100%;
    }

    .site-header__linklist {
        flex-wrap: wrap;
        justify-content: center;
    }

    .site-header__meta {
        align-self: center;
    }
}
