/* --- IMPORTS DE POLICES --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

/* --- VARIABLES --- */
:root {
    --bg-ocean: #050b14;
    --bg-ocean-light: #0a1428;
    --text-pure: #ffffff;
    --text-muted: #8fa0b5;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --accent-blue: #2563eb;
    --accent-glow: rgba(37, 99, 235, 0.4);

    /* Raretés */
    --rare-cap: #ff2a5f; 
    --rare-lr:  #ffd700; 
    --rare-ur:  #b5179e; 
    --rare-ssr: #4cc9f0; 
    --rare-sr:  #06d6a0; 
    --rare-r:   #4361ee; 
    --rare-uc:  #adb5bd; 
    --rare-c:   #495057; 
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    user-select: none;
}

body {
    background-color: var(--bg-ocean);
    background-image: radial-gradient(circle at 50% 0%, var(--bg-ocean-light) 0%, var(--bg-ocean) 70%);
    color: var(--text-pure);
    height: 100vh;
    overflow-x: hidden; 
    overflow-y: auto;
    display: flex;
}

/* --- GLASSMORPHISM --- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
}

/* --- UI PRINCIPALE --- */
.sidebar {
    position: fixed;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 80px;
    padding: 30px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    border-radius: 40px;
    z-index: 100;
}

.nav-item {
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-item:hover, .nav-item.active {
    color: var(--text-pure);
    transform: scale(1.1);
    text-shadow: 0 0 15px var(--accent-glow);
}

.top-right-profile {
    position: fixed;
    top: 30px;
    right: 30px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: background 0.3s;
    z-index: 100;
}

.top-right-profile:hover {
    background: rgba(255, 255, 255, 0.08);
}

.tk-balance {
    font-weight: 600;
    color: #4ade80; 
    letter-spacing: 1px;
}

.bottom-left-help {
    position: fixed;
    bottom: 30px;
    left: 45px; 
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
}

.bottom-left-help:hover {
    background: var(--text-pure);
    color: var(--bg-ocean);
}

/* --- ZONE CENTRALE & PACK --- */
.main-stage {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: relative;
}

.pack-container {
    position: relative;
    width: 260px;
    height: 380px;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pack-container:hover {
    transform: translateY(-15px) scale(1.05);
}

.pack-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: var(--accent-blue);
    filter: blur(60px);
    opacity: 0.3;
    transition: opacity 0.5s;
    z-index: 1;
}

.pack-container:hover .pack-glow {
    opacity: 0.6;
}

.pack-visual {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 15px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), inset 0 0 20px rgba(255,255,255,0.05);
}

.logo-geogacha {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 2px;
    text-align: center;
}

.pack-price {
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-muted);
    background: rgba(0,0,0,0.4);
    padding: 5px 15px;
    border-radius: 20px;
}

/* --- CARTES 3D --- */
#cards-stage {
    display: none;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    z-index: 10;
}

.card-scene {
    width: 240px;
    height: 380px;
    perspective: 1000px; 
    cursor: pointer;
}

.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.card-scene.is-flipped .card-inner {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 15px;
    overflow: hidden;
}

.card-back {
    background: repeating-linear-gradient(45deg, rgba(255,255,255,0.02) 0px, rgba(255,255,255,0.02) 2px, transparent 2px, transparent 8px), linear-gradient(135deg, #0f172a, #020617);
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.card-back-logo {
    font-size: 50px;
    color: var(--accent-blue);
    filter: drop-shadow(0 0 15px rgba(37, 99, 235, 0.8));
    animation: pulseLogo 2s infinite alternate;
}

@keyframes pulseLogo {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.1); opacity: 1; filter: drop-shadow(0 0 25px rgba(37, 99, 235, 1)); }
}

.card-front {
    background: rgba(10, 20, 40, 0.95);
    border: 1px solid var(--glass-border);
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ==================================================== */
/* NOUVEAUX EFFETS RARETÉS (Shine CAP, Pulsation LR/UR) */
/* ==================================================== */

/* CAP : Shine incrusté puissant */
.card-front[data-rarity="CAP"] { 
    box-shadow: 0 0 40px var(--rare-cap), inset 0 0 30px var(--rare-cap); 
    border: 2px solid var(--rare-cap); 
    animation: shineCAP 2s infinite alternate; 
}
@keyframes shineCAP { 
    0% { box-shadow: 0 0 20px var(--rare-cap), inset 0 0 10px white; } 
    100% { box-shadow: 0 0 60px var(--rare-cap), inset 0 0 40px white; border-color: white; } 
}

/* LR : Halo légendaire profond */
.card-front[data-rarity="LR"] { 
    box-shadow: 0 0 30px var(--rare-lr), inset 0 0 20px var(--rare-lr); 
    border: 2px solid var(--rare-lr); 
    animation: pulseLR 1.5s infinite alternate; 
}
@keyframes pulseLR { 
    0% { box-shadow: 0 0 15px var(--rare-lr); border-color: #ffaa00; } 
    100% { box-shadow: 0 0 50px var(--rare-lr), inset 0 0 30px var(--rare-lr); border-color: #ffeeaa; } 
}

/* UR : Brillant pulsatif sur les côtés */
.card-front[data-rarity="UR"] { 
    border: 2px solid var(--rare-ur); 
    animation: neonUR 1.5s infinite alternate; 
}
@keyframes neonUR { 
    0% { box-shadow: -5px 0 15px var(--rare-ur), 5px 0 15px var(--rare-ur); } 
    100% { box-shadow: -15px 0 30px var(--rare-ur), 15px 0 30px var(--rare-ur), inset 0 0 15px var(--rare-ur); } 
}

/* SSR & SR : Classique */
.card-front[data-rarity="SSR"] { box-shadow: 0 0 15px var(--rare-ssr); border-color: var(--rare-ssr); }
.card-front[data-rarity="SR"]  { box-shadow: 0 0 10px var(--rare-sr); border-color: var(--rare-sr); }

/* Balayage Holographique Universel (Désactivé pour CAP pour laisser briller le bord, actif sur LR et UR) */
.card-front[data-rarity="LR"]::after,
.card-front[data-rarity="UR"]::after {
    content: '';
    position: absolute;
    top: 0; left: -150%;
    width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    animation: holographique 3s infinite;
    z-index: 10;
    pointer-events: none;
}

@keyframes holographique {
    0% { left: -150%; }
    20% { left: 200%; }
    100% { left: 200%; }
}
/* ==================================================== */

/* Intérieur Carte */
.card-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: absolute;
    width: 100%;
    z-index: 2;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent);
}

.card-rarity { font-weight: 800; font-size: 18px; letter-spacing: 1px; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }
.card-image { width: 100%; height: 50%; object-fit: cover; border-bottom: 1px solid var(--glass-border); }
.card-body { padding: 15px; flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.card-title { font-size: 22px; font-weight: 800; text-transform: uppercase; line-height: 1.1; }
.card-country { font-size: 12px; color: var(--text-muted); letter-spacing: 1px; }

/* --- LE COCKPIT DES STATS --- */
.card-stats-container { display: flex; flex-direction: column; gap: 4px; margin-top: 5px; width: 100%; }
.card-stats-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; }
.card-stats-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }

.stat-item { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    background: rgba(0,0,0,0.4); 
    padding: 3px 1px; 
    border-radius: 6px; 
    border: 1px solid rgba(255,255,255,0.05); 
}
.stat-item span:first-child { 
    font-size: 8px;
    color: var(--text-muted); 
    letter-spacing: 0.5px; 
    margin-bottom: 1px;
    text-transform: uppercase;
}

.stat-val { font-weight: 800; font-size: 12px; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }

.val-atk { color: #ff4d4d; }
.val-def { color: #3b82f6; }
.val-aura { color: #ffd700; }
.val-vit, .val-ch { color: #e2e8f0; }

/* --- GAME FEEL --- */
#flashbang {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: #ffffff;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
}
.flash-active {
    animation: flashAnim 1.5s ease-out forwards;
}
@keyframes flashAnim {
    0% { opacity: 0; background: rgba(255, 255, 255, 0); }
    10% { opacity: 1; background: rgba(255, 255, 255, 0.4); } 
    100% { opacity: 0; background: rgba(255, 255, 255, 0); }
}

.shake-active {
    animation: screenShake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}
@keyframes screenShake {
    10%, 90% { transform: translate3d(-2px, 2px, 0); }
    20%, 80% { transform: translate3d(4px, -4px, 0); }
    30%, 50%, 70% { transform: translate3d(-8px, 6px, 0); }
    40%, 60% { transform: translate3d(8px, -6px, 0); }
}

/* --- ATLAS & VUES --- */
#atlas-globe {
    width: 100%;
    height: 600px; /* Fix indispensable pour Globe.gl */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

.view-btn {
    background: transparent; 
    color: var(--text-muted); 
    border: none; 
    padding: 10px 20px; 
    border-radius: 10px; 
    cursor: pointer; 
    font-size: 16px; 
    transition: all 0.3s ease;
}
.view-btn:hover { color: var(--text-pure); }
.view-btn.active { background: rgba(255,255,255,0.1); color: white; font-weight: bold; }

/* --- MODE LISTE --- */
.list-row {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    padding: 15px 30px;
    border-radius: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 10px;
}
.list-row:hover {
    background: rgba(255,255,255,0.08);
    transform: translateX(10px); 
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.list-col { flex: 1; display: flex; align-items: center; gap: 10px; }
.list-col-stats { display: flex; gap: 20px; font-size: 14px; color: var(--text-muted); }
.list-stat-val { color: var(--text-pure); font-weight: bold; }

/* --- HUD STATS & FILTRES --- */
.stat-box { 
    flex: 1; 
    background: rgba(0,0,0,0.3); 
    border: 1px solid rgba(255,255,255,0.05); 
    border-radius: 8px; 
    padding: 10px; 
}
.stat-box-header { 
    display: flex; 
    justify-content: space-between; 
    font-size: 12px; 
    margin-bottom: 8px; 
}
.stat-bar-bg { 
    width: 100%; 
    height: 4px; 
    background: rgba(255,255,255,0.1); 
    border-radius: 2px; 
    overflow: hidden; 
}
.stat-bar-fill { 
    height: 100%; 
    border-radius: 2px; 
    transition: width 1s ease-out; 
    box-shadow: 0 0 10px currentColor; 
}

.filter-input { 
    background: transparent; 
    border: none; 
    color: white; 
    outline: none; 
    flex: 1; 
    font-size: 14px; 
}
.filter-input::placeholder { color: var(--text-muted); }

.sort-btn { 
    background: transparent; 
    color: var(--text-muted); 
    border: 1px solid var(--glass-border); 
    padding: 5px 15px; 
    border-radius: 20px; 
    cursor: pointer; 
    font-size: 12px; 
    font-weight: 600; 
    transition: all 0.2s; 
}
.sort-btn:hover { background: rgba(255,255,255,0.05); color: var(--text-pure); }
.sort-btn.active { background: var(--text-pure); color: var(--bg-ocean); border-color: var(--text-pure); }

/* --- ANIMATIONS --- */
.card-scene.flying-to-atlas {
    animation: flyToAtlas 0.8s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards;
    z-index: 999; 
}

@keyframes flyToAtlas {
    0% { transform: scale(1) translate(0, 0); opacity: 1; }
    100% { transform: scale(0.1) translate(-100vw, -100vh); opacity: 0; }
}

.card-country img {
    width: 16px;
    height: 12px;
    vertical-align: middle;
    margin-right: 5px;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.5);
    border: 0.5px solid rgba(255,255,255,0.2);
}

#atlas-grid {
    display: none; /* Changé dynamiquement en JS */
    flex: 1;
    width: 100%;
    padding: 250px 80px 40px 120px;
    overflow-y: auto;
    position: relative;
    z-index: 5;
}

/* =========================================
   NOUVELLES INTERFACES (ATLAS, CHAT, THEME)
========================================= */

/* --- 1. SCROLLBAR GLOBALE (Style Application) --- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.1); border-radius: 10px; }
::-webkit-scrollbar-thumb { background: var(--text-muted, #475569); border-radius: 10px; opacity: 0.5; }
::-webkit-scrollbar-thumb:hover { background: var(--rare-ssr, #4cc9f0); }

/* --- 2. ANIMATIONS ATLAS (SCROLL) --- */
.stats-transition {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin 0.4s ease, padding 0.4s ease !important;
    max-height: 500px;
    overflow: hidden;
}

/* --- ANIMATIONS ATLAS --- */
.stats-transition {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin 0.3s ease, padding 0.3s ease !important;
    max-height: 150px; 
    overflow: hidden;
}

.stats-collapsed {
    max-height: 0 !important;
    opacity: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border: none !important;
    pointer-events: none;
}

/* LA BARRE DE RECHERCHE FLOU (FROSTED GLASS) */
.search-sticky {
    position: sticky;
    top: 0px;
    z-index: 90;
    /* Couleur très transparente pour laisser la place au flou */
    background: rgba(15, 23, 42, 0.4) !important; 
    /* Le fameux flou Apple */
    backdrop-filter: blur(15px) saturate(180%) !important; 
    -webkit-backdrop-filter: blur(15px) saturate(180%) !important;
    border-radius: 0 0 15px 15px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-top: none !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
    transition: all 0.3s ease;
}

/* LE DÉGRADÉ FONDU SOUS LA BARRE */
.search-sticky::after {
    content: '';
    position: absolute;
    bottom: -40px; /* Descend sous la barre */
    left: 0;
    width: 100%;
    height: 40px;
    /* Dégradé du sombre vers le transparent */
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.8) 0%, transparent 100%);
    pointer-events: none; /* Important : permet de cliquer sur les cartes en dessous */
    border-radius: 0 0 15px 15px;
}

/* ADAPTATION DU FONDU POUR LE MODE CLAIR */
body.light-mode .search-sticky {
    background: rgba(241, 245, 249, 0.6) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important;
}
body.light-mode .search-sticky::after {
    background: linear-gradient(to bottom, rgba(241, 245, 249, 0.9) 0%, transparent 100%);
}

/* --- 3. ACCORDÉONS (QUÊTES) --- */
.acc-container { background: rgba(0,0,0,0.4); border-radius: 15px; border: 1px solid var(--glass-border, rgba(255,255,255,0.1)); margin-bottom: 15px; overflow: hidden; }
.acc-header { padding: 20px; font-size: 18px; font-weight: bold; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: background 0.3s; user-select: none; }
.acc-header:hover { background: rgba(255,255,255,0.05); }
.acc-chevron { transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.acc-container.open .acc-chevron { transform: rotate(180deg); }
.acc-content { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.acc-container.open .acc-content { grid-template-rows: 1fr; }
.acc-inner { overflow: hidden; }
.acc-inner-pad { padding: 0 20px 20px 20px; display: flex; flex-direction: column; gap: 10px; }

/* --- 4. POINT ROUGE (NOTIFICATIONS) --- */
.notif-dot { position: absolute; top: 8px; right: 8px; width: 12px; height: 12px; background: #ff2a5f; border-radius: 50%; box-shadow: 0 0 8px #ff2a5f; pointer-events: none; z-index: 10; animation: pulse-notif 2s infinite; }
@keyframes pulse-notif { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 42, 95, 0.7); } 70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(255, 42, 95, 0); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 42, 95, 0); } }

/* --- 5. MODE CLAIR (LIGHT THEME) --- */
body.light-mode {
    --bg-ocean: #cbd5e1; 
    --text-pure: #1e293b; 
    --text-muted: #475569;
    --glass-bg: rgba(241, 245, 249, 0.75); 
    --glass-border: rgba(0, 0, 0, 0.15);
    background: var(--bg-ocean);
}
body.light-mode .glass-panel, body.light-mode .sidebar, body.light-mode .top-right-profile, body.light-mode .bottom-left-help {
    background: var(--glass-bg); border-color: var(--glass-border); box-shadow: 0 8px 32px 0 rgba(0,0,0,0.05); color: var(--text-pure);
}
body.light-mode input { background: rgba(0,0,0,0.05) !important; color: var(--text-pure) !important; border: 1px solid rgba(0,0,0,0.2) !important; }
body.light-mode .list-row { background: rgba(255,255,255,0.7) !important; border-color: rgba(0,0,0,0.1); }
body.light-mode .acc-container { background: rgba(255,255,255,0.7); border-color: rgba(0,0,0,0.1); }
body.light-mode .acc-header:hover { background: rgba(0,0,0,0.05); }
body.light-mode .card-front { background: #e2e8f0; color: #0f172a; border: 1px solid rgba(0,0,0,0.1); }
body.light-mode .pack-container { border-color: rgba(0,0,0,0.1); }
body.light-mode .view-section h2 { text-shadow: none; color: var(--text-pure); }
body.light-mode .nav-item:hover, body.light-mode .nav-item.active { background: rgba(0,0,0,0.05); color: #000; }
body.light-mode .notif-dot { border-color: #cbd5e1; }
body.light-mode .search-sticky { 
    background: rgba(255, 255, 255, 0.4) !important; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important; 
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}

/* =========================================
   SCROLLBAR, ANIMATIONS ATLAS & NOTIF
========================================= */

/* --- 1. SCROLLBAR GLOBALE --- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.1); border-radius: 10px; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 10px; opacity: 0.5; }
::-webkit-scrollbar-thumb:hover { background: var(--rare-ssr); }

/* --- 2. ANIMATION ATLAS (DISPARITION STATS) --- */
.stats-transition {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin 0.3s ease, padding 0.3s ease !important;
    max-height: 150px; 
    overflow: hidden;
}

.stats-collapsed {
    max-height: 0 !important;
    opacity: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border: none !important;
    pointer-events: none;
}

/* --- 3. BARRE DE RECHERCHE (FROSTED GLASS & SANS TACHE D'OMBRE) --- */
.search-sticky {
    position: relative;
    /* Fond un peu plus opaque pour masquer les cartes proprement */
    background: rgba(5, 11, 20, 0.8) !important; 
    /* Flou iOS-like maintenu */
    backdrop-filter: blur(15px) saturate(180%) !important; 
    -webkit-backdrop-filter: blur(15px) saturate(180%) !important;
    border-radius: 0 0 15px 15px !important;
    /* Bordure plus douce */
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-top: none !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
    transition: all 0.3s ease;
}

/* Le pseudo-élément ::after est supprimé ici */

/* ADAPTATION DU FONDU POUR LE MODE CLAIR */
body.light-mode .search-sticky {
    /* Fond plus opaque aussi en mode clair */
    background: rgba(241, 245, 249, 0.8) !important;
    border-color: rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important;
}

/* Le dégradé qui fond sur les cartes vers le bas */
.search-sticky::after {
    content: '';
    position: absolute;
    top: 100%; /* S'attache juste en dessous de la barre */
    left: 0;
    width: 100%;
    height: 60px; /* Taille de la zone de flou/fondu */
    background: linear-gradient(to bottom, rgba(5, 11, 20, 0.9) 0%, transparent 100%);
    pointer-events: none;
    border-radius: 0 0 15px 15px;
}

/* --- 4. POINT ROUGE (NOTIFICATIONS) --- */
.notif-dot { 
    position: absolute; 
    top: -2px; 
    right: -5px; 
    width: 12px; 
    height: 12px; 
    background: #ff2a5f; 
    border-radius: 50%; 
    box-shadow: 0 0 8px #ff2a5f; 
    border: 2px solid var(--bg-ocean); 
    pointer-events: none; 
    z-index: 10; 
    animation: pulse-notif 2s infinite; 
}
@keyframes pulse-notif { 
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 42, 95, 0.7); } 
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(255, 42, 95, 0); } 
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 42, 95, 0); } 
}

/* --- 5. ADAPTATION MODE CLAIR --- */
body.light-mode .search-sticky {
    background: rgba(241, 245, 249, 0.7) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important;
}
body.light-mode .search-sticky::after {
    background: linear-gradient(to bottom, rgba(241, 245, 249, 0.9) 0%, transparent 100%);
}
body.light-mode .notif-dot { border-color: #cbd5e1; }