/* Header TCG Dark v2 — Sulli Card Lab */

.scl-header {
    background: rgba(8,6,18,0.96) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(167,139,250,0.1) !important;
    position: sticky !important;
    top: 0; z-index: 9999;
    transition: box-shadow 0.3s ease;
}
.scl-header.scrolled { box-shadow: 0 4px 32px rgba(0,0,0,0.7) !important; }
.scl-header::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(192,132,252,0.3) 30%, rgba(96,165,250,0.3) 50%, rgba(52,211,153,0.2) 70%, transparent 100%);
    pointer-events: none;
}
.scl-header__inner {
    max-width: 1200px; margin: 0 auto; padding: 0 32px;
    height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
}

/* Anti-étirement logo — ABSOLU */
.scl-header__logo-wrap img,
.scl-header__logo-wrap .custom-logo,
.scl-header__logo-wrap a img,
.custom-logo-link img,
.ast-site-logo img {
    width: auto !important;
    max-width: 52px !important;
    max-height: 52px !important;
    height: auto !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block !important;
}
.custom-logo-link { display: flex !important; align-items: center !important; line-height: 1 !important; }

.scl-header__logo-fallback { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.scl-header__logo-icon {
    width: 38px; height: 38px; background: #7C3AED; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Cinzel', serif; font-weight: 700; font-size: 13px; color: white;
    box-shadow: 0 0 16px rgba(124,58,237,0.4); flex-shrink: 0;
}
.scl-header__logo-text-wrap { display: flex; flex-direction: column; }
.scl-header__site-name {
    font-family: 'Cinzel', serif; font-weight: 700; font-size: 15px;
    background: linear-gradient(135deg, #C084FC 0%, #60A5FA 35%, #34D399 65%, #F472B6 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    line-height: 1.1; letter-spacing: 0.06em;
}
.scl-header__tagline {
    font-size: 9px; color: #A78BFA; letter-spacing: 0.12em;
    text-transform: uppercase; font-family: 'Space Mono', monospace;
}

/* Nav desktop */
.scl-nav { flex: 1; display: flex; justify-content: center; }
.scl-nav__list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.scl-nav__list > li { position: relative; }
.scl-nav__list > li > a {
    font-family: 'DM Sans', sans-serif; font-size: 13.5px; font-weight: 400;
    color: #9B98B8; padding: 8px 12px; border-radius: 6px;
    transition: color 0.2s, background 0.2s; display: block; white-space: nowrap;
}
.scl-nav__list > li > a:hover,
.scl-nav__list > .current-menu-item > a { color: #F8F5FF; background: rgba(124,58,237,0.1); }

.scl-nav__list > .menu-item-notre-histoire > a {
    background: linear-gradient(135deg, #C084FC, #60A5FA);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; font-weight: 500;
}
.scl-nav__list > .menu-item-configurateur > a {
    background: #7C3AED !important; color: #fff !important; -webkit-text-fill-color: #fff !important;
    border-radius: 6px !important; padding: 7px 16px !important; font-weight: 500 !important;
    border: 1px solid rgba(167,139,250,0.3);
}
.scl-nav__list > .menu-item-configurateur > a:hover { background: #6D28D9 !important; box-shadow: 0 0 20px rgba(124,58,237,0.4) !important; }

.scl-nav__list .sub-menu {
    position: absolute; top: calc(100% + 6px); left: 0;
    background: #0D0A1A; border: 1px solid rgba(167,139,250,0.22);
    border-radius: 10px; box-shadow: 0 8px 40px rgba(0,0,0,0.6);
    padding: 8px; min-width: 200px; list-style: none; margin: 0;
    opacity: 0; pointer-events: none; transform: translateY(-6px);
    transition: opacity 0.2s, transform 0.2s; z-index: 100;
}
.scl-nav__list > li:hover > .sub-menu { opacity: 1; pointer-events: all; transform: translateY(0); }
.scl-nav__list .sub-menu li a { display: block; padding: 9px 12px; font-size: 13px; color: #9B98B8; border-radius: 6px; transition: background 0.15s, color 0.15s; }
.scl-nav__list .sub-menu li a:hover { background: rgba(124,58,237,0.12); color: #F8F5FF; }

/* Actions */
.scl-header__actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.scl-header__cart { position: relative; display: flex; align-items: center; color: #9B98B8; padding: 7px; border-radius: 6px; transition: color 0.2s, background 0.2s; }
.scl-header__cart:hover { color: #F8F5FF; background: rgba(124,58,237,0.1); }
.scl-header__cart-count {
    position: absolute; top: 0; right: 0; background: #6B6880; color: #080612;
    width: 16px; height: 16px; border-radius: 50%; font-size: 9px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.scl-header__cart-count.has-items { background: #F59E0B; box-shadow: 0 0 8px rgba(245,158,11,0.5); }

/* Burger */
.scl-burger { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; width: 36px; height: 36px; }
.scl-burger span { display: block; width: 20px; height: 1.5px; background: #9B98B8; border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.scl-burger.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.scl-burger.active span:nth-child(2) { opacity: 0; }
.scl-burger.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Drawer */
.scl-drawer {
    position: fixed; top: 0; right: 0; width: min(340px, 92vw); height: 100%;
    background: #0D0A1A; border-left: 1px solid rgba(167,139,250,0.22); z-index: 10001;
    transform: translateX(100%); transition: transform 0.32s cubic-bezier(0.4,0,0.2,1);
    overflow-y: auto; overscroll-behavior: contain;
}
.scl-drawer.open { transform: translateX(0); }
.scl-drawer__inner { padding: 24px 28px 48px; }
.scl-drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; padding-bottom: 16px; border-bottom: 1px solid rgba(167,139,250,0.08); }
.scl-drawer__title { font-family: 'Cinzel', serif; font-size: 14px; background: linear-gradient(135deg, #C084FC, #60A5FA); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; letter-spacing: 0.08em; }
.scl-drawer__close { width: 32px; height: 32px; background: #120F22; border: 1px solid rgba(167,139,250,0.1); border-radius: 6px; color: #9B98B8; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.2s; }
.scl-drawer__close:hover { background: #1A1630; color: #F8F5FF; }
.scl-drawer__menu { list-style: none; margin: 0; padding: 0; }
.scl-drawer__menu li a { display: block; padding: 13px 4px; font-size: 16px; font-family: 'DM Sans', sans-serif; color: #9B98B8; border-bottom: 1px solid rgba(167,139,250,0.07); transition: color 0.2s, padding-left 0.2s; }
.scl-drawer__menu li a:hover { color: #F8F5FF; padding-left: 8px; }
.scl-drawer__menu .sub-menu { list-style: none; padding-left: 16px; }
.scl-drawer__menu .sub-menu a { font-size: 14px; }
.scl-drawer__btns { margin-top: 28px; display: flex; flex-direction: column; gap: 10px; }

.scl-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.72); backdrop-filter: blur(2px); z-index: 10000; opacity: 0; pointer-events: none; transition: opacity 0.32s ease; }
.scl-overlay.visible { opacity: 1; pointer-events: all; }
body.drawer-open { overflow: hidden; }

/* Boutons */
.scl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: 'DM Sans', sans-serif !important; font-size: 14px; font-weight: 500; border-radius: 6px; padding: 11px 24px; cursor: pointer; transition: all 0.25s ease; border: none; text-decoration: none; white-space: nowrap; line-height: 1; }
.scl-btn-primary { background: #7C3AED !important; color: #fff !important; border: 1px solid rgba(167,139,250,0.3) !important; box-shadow: 0 4px 20px rgba(124,58,237,0.3) !important; }
.scl-btn-primary:hover { background: #6D28D9 !important; box-shadow: 0 6px 30px rgba(124,58,237,0.5) !important; transform: translateY(-1px); color: #fff !important; }
.scl-btn-outline { background: transparent !important; color: #A78BFA !important; border: 1px solid rgba(167,139,250,0.35) !important; }
.scl-btn-outline:hover { background: rgba(124,58,237,0.1) !important; color: #F8F5FF !important; }
.scl-btn-holo { background: linear-gradient(135deg, #C084FC 0%, #60A5FA 35%, #34D399 65%, #F472B6 100%) !important; color: #080612 !important; font-weight: 600 !important; }
.scl-btn-holo:hover { transform: translateY(-2px); box-shadow: 0 8px 40px rgba(124,58,237,0.4) !important; color: #080612 !important; }

/* Responsive */
@media (max-width: 1024px) { .scl-nav { display: none; } .scl-burger { display: flex; } .scl-header__inner { padding: 0 20px; } }
@media (max-width: 480px) { .scl-header__inner { padding: 0 16px; height: 60px; } }


/* ============================================================
   PATCH v3.2 — Menu mobile : croix visible sans casser l'animation existante
   ============================================================ */
.scl-drawer__close svg {
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    stroke: currentColor !important;
    pointer-events: none !important;
}
.scl-drawer__close {
    font-size: 0 !important;
}
.scl-burger:focus-visible,
.scl-drawer__close:focus-visible {
    outline: 2px solid rgba(167,139,250,0.75) !important;
    outline-offset: 3px !important;
}


/* ============================================================
   PATCH v3.4 — Croix de fermeture mobile toujours visible
   ============================================================ */
.scl-drawer__close {
    position: relative !important;
    color: #F8F5FF !important;
    background: #120F22 !important;
    border-color: rgba(167,139,250,0.28) !important;
}

.scl-drawer__close svg {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

.scl-drawer__close::before,
.scl-drawer__close::after {
    content: '' !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    width: 17px !important;
    height: 2px !important;
    border-radius: 999px !important;
    background: currentColor !important;
    transform-origin: center !important;
    pointer-events: none !important;
}

.scl-drawer__close::before {
    transform: translate(-50%, -50%) rotate(45deg) !important;
}

.scl-drawer__close::after {
    transform: translate(-50%, -50%) rotate(-45deg) !important;
}
