/* ============================
   GRILLE DES CATÉGORIES (3x3)
   ============================ */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

/* ============================
   CARTE CATÉGORIE
   ============================ */

@keyframes neonPulseBg {
    0% { box-shadow: 0 0 15px rgba(120,60,255,0.6); }
    50% { box-shadow: 0 0 35px rgba(120,60,255,1); }
    100% { box-shadow: 0 0 15px rgba(120,60,255,0.6); }
}

.category-card {
    background: radial-gradient(circle at 50% 30%, rgba(90, 40, 255, 0.35), rgba(10, 10, 20, 0.9));    border: 1px solid rgba(79,124,255,0.35);
    border-radius: 18px;
    padding: 25px;
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: 0.25s ease;
    box-shadow: 0 12px 35px rgba(79,124,255,0.35);
    animation: neonPulseBg 3s infinite ease-in-out;
}

/* Hover effet premium */
.category-card:hover {
    transform: translateY(-6px) scale(1.03);
    border-color: #4f7cff;
    box-shadow: 0 20px 45px rgba(79,124,255,0.55);
}

/* ============================
   ICÔNE (version propre)
   ============================ */
.category-icon img {
    width: 160px;
    height: 160px;
    object-fit: contain;
    display: block;
    margin: auto;
}

/* ============================
   TITRE DE CATÉGORIE
   ============================ */
.category-title {
    margin-top: -10px;
    text-align: center;
    font-weight: 600;
}

/* ============================
   LISTE DES PRODUITS
   ============================ */
.list-group-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    border-radius: 10px !important;
    margin-bottom: 8px;
    transition: 0.2s ease;
}

.list-group-item:hover {
    background: rgba(79,124,255,0.15);
    color: #4f7cff;
}

/* Icône flèche */
.list-group-item .svg-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ============================
   FOND COSMIQUE
   ============================ */
body {
    background: linear-gradient(135deg, #1a1446, #2b1f63, #0f0a2a);
    background-attachment: fixed;
    overflow-x: hidden;
    position: relative;
}

/* Couche de particules */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    pointer-events: none;
    z-index: -1;

    background-image:
        radial-gradient(2px 2px at 10% 20%, rgba(255,255,255,0.8), transparent),
        radial-gradient(2px 2px at 30% 80%, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 70% 40%, rgba(255,255,255,0.7), transparent),
        radial-gradient(2px 2px at 90% 10%, rgba(255,255,255,0.5), transparent),
        radial-gradient(2px 2px at 50% 90%, rgba(255,255,255,0.8), transparent),
        radial-gradient(2px 2px at 20% 60%, rgba(255,255,255,0.7), transparent),
        radial-gradient(2px 2px at 80% 50%, rgba(255,255,255,0.6), transparent),
        radial-gradient(2px 2px at 40% 30%, rgba(255,255,255,0.9), transparent);

    background-size: 600px 600px;
    animation: particlesMove 60s linear infinite;
}

@keyframes particlesMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-300px, -300px); }
}

/* ============================
   LOGIN / SIGNUP (inchangé)
   ============================ */
.page-login img.my-4,
.page-signup img.my-4 {
    margin-bottom: 0.5rem !important;
    margin-top: 0.5rem !important;
    height: 250px !important;
    width: auto !important;
}

.page-login .card { margin-top: -30px !important; }
.page-login .row.h-75 { margin-top: -40px !important; }

.page-signup .card { margin-top: -60px !important; }
.page-signup .row.h-75 { margin-top: -40px !important; }

/* ============================
   CARTES PRODUITS (fallback)
   ============================ */
.col-md-4.mb-3 {
    background: linear-gradient(145deg, #0d0f16, #1a1d29);
    border: 1px solid rgba(79,124,255,0.35);
    border-radius: 18px;
    padding: 25px;
    transition: 0.25s ease;
    cursor: pointer;
}

.col-md-4.mb-3:hover {
    transform: translateY(-6px) scale(1.03);
    border-color: #4f7cff;
    box-shadow: 0 20px 45px rgba(79,124,255,0.55);
    background: rgba(255,255,255,0.06);
}

.badge-vedette {
    position: absolute;
    top: 10px;
    right: 10px;

    background: linear-gradient(135deg, #4f7cff, #8f6bff);
    color: white;
    font-weight: 500; /* moins gras */
    font-family: 'Poppins', sans-serif; /* police plus fine et moderne */

    padding: 6px 14px;
    border-radius: 12px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;

    box-shadow:
        0 0 8px rgba(79,124,255,0.9),
        0 0 14px rgba(143,107,255,0.8),
        inset 0 0 6px rgba(255,255,255,0.3);

    animation: neonPulse 2.2s infinite ease-in-out;
    z-index: 10;
}

/* Animation néon douce */
@keyframes neonPulse {
    0% { box-shadow: 0 0 8px rgba(79,124,255,0.9), 0 0 14px rgba(143,107,255,0.8); }
    50% { box-shadow: 0 0 14px rgba(79,124,255,1), 0 0 22px rgba(143,107,255,1); }
    100% { box-shadow: 0 0 8px rgba(79,124,255,0.9), 0 0 14px rgba(143,107,255,0.8); }
}

/* Important pour positionner le badge */
.category-card {
    position: relative;
}

.subcategory-icons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 6px;
}

.subcategory-icons img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(120,60,255,0.7));
    transition: transform 0.2s ease;
}

.subcategory-icons img:hover {
    transform: scale(1.15);
}

.mini-game-icon {
    width: 32px;      /* TOUT PETIT */
    height: 32px;
    object-fit: contain;
    margin-right: 8px;
    opacity: 0.9;
    filter: drop-shadow(0 0 2px rgba(120,60,255,0.6));
    vertical-align: middle;
}

/* Grille responsive pour les catégories */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    justify-content: center;
}

/* Ajustement des cartes sur mobile */
@media (max-width: 768px) {
    .category-card {
        height: auto;
        padding: 20px;
    }
    .category-icon img {
        width: 50px;
        height: 50px;
    }
    .category-title {
        font-size: 1rem;
    }
}

/* Grille responsive avec animation */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    justify-content: center;
    transition: all 0.4s ease-in-out;
}

/* Animation douce des cartes */
.category-card {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px) scale(1.03);
    opacity: 0.95;
}

/* Réorganisation fluide sur redimensionnement */
@media (max-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 20px;
    }
    .category-card {
        padding: 15px;
    }
    .category-icon img {
        width: 45px;
        height: 45px;
    }
    .category-title {
        font-size: 0.95rem;
    }
}

.navbar-brand img {
    height: 170px !important; /* augmente la taille ici */
    object-fit: contain;
}

.navbar .container-fluid {
    justify-content: center !important;
}

