@charset "UTF-8";
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0a0a0a;
    color: #fff;
    min-height: 100vh;
}

/* Fond avec effet de grille */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(79, 70, 229, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 70, 229, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 0;
}

/* Header */
.header {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(79, 70, 229, 0.2);
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.logo {
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.gradient-btn {
    font-size: 1.2rem;
    font-weight: 900;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border: 2px solid;
    border-image: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) 1;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: inline-block;
}

.gradient-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.certified {
    display: none;
}

.certified-badge {
    display: none;
}

.instagram-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(188, 24, 136, 0.3);
}

.instagram-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(188, 24, 136, 0.5);
}

/* Navigation */
.nav-menu {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    display: block;
    padding: 0.7rem 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    white-space: nowrap;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background: rgba(79, 70, 229, 0.2);
    color: #fff;
}

/* Barre de recherche */
.search-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.search-container nav {
    flex: 1;
}

.search-box {
    position: relative;
    flex: 0 1 400px;
    min-width: 250px;
}

/* Bouton de filtre */
.filter-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(79, 70, 229, 0.3);
    border-radius: 25px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(79, 70, 229, 0.5);
    color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.filter-btn .icon {
    font-size: 1.2rem;
}

/* Animation pour les éléments masqués */
.tool-card.hidden {
    display: none !important;
}

.category-section.hidden {
    display: none !important;
}

.search-input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(79, 70, 229, 0.3);
    border-radius: 25px;
    color: white;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(79, 70, 229, 0.6);
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.2);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.1rem;
    pointer-events: none;
    z-index: 10;
}

.mobile-menu-btn {
    display: none;
    background: rgba(79, 70, 229, 0.2);
    border: 1px solid rgba(79, 70, 229, 0.3);
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: rgba(79, 70, 229, 0.3);
}

/* Container principal */
.container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 5% 6rem;
}

.page-title {
    text-align: center;
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, #4f46e5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4rem;
}

/* Section catégorie */
.category-section {
    margin-bottom: 5rem;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(79, 70, 229, 0.3);
}

/* Featured Header - Style spécial pour les nouveautés */
.featured-header {
    border-bottom: 2px solid rgba(255, 215, 0, 0.5);
    position: relative;
}

.featured-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        rgba(255, 215, 0, 0.8) 0%, 
        rgba(79, 70, 229, 0.5) 50%, 
        rgba(255, 215, 0, 0.8) 100%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.new-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ff6b00 100%);
    color: #000;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.category-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 4px 10px rgba(79, 70, 229, 0.3));
}

.category-title {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
}

/* Grille de liens */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Grille spéciale pour les nouveautés - 4 colonnes sur desktop */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 1200px) {
    .featured-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.tool-card {
    background: transparent;
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    min-height: 180px;
}

/* Style spécial pour les cartes featured */
.featured-card {
    background: transparent;
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.1);
}

.featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), transparent);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 12px 40px rgba(255, 215, 0, 0.3);
}

/* Badge NOUVEAU sur les cartes */
.new-game-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: linear-gradient(135deg, #ffd700 0%, #ff6b00 100%);
    color: #000;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1px;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.tool-image-container {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 10px;
    padding: 0.5rem;
    position: relative;
    z-index: 1;
}

.tool-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
    background: transparent;
    border-color: rgba(79, 70, 229, 0.5);
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.2);
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-name {
    font-size: 1.2rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.tool-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

.tool-link-icon {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.2rem;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.tool-card:hover .tool-link-icon {
    opacity: 1;
    transform: translateX(5px);
}

/* Footer */
.footer {
    background: rgba(10, 10, 10, 0.95);
    border-top: 1px solid rgba(79, 70, 229, 0.2);
    padding: 3rem 5%;
    text-align: center;
    position: relative;
    z-index: 1;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-text {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.footer-link {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: #7c3aed;
}

.footer-author {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* ===== MOBILE - FIX FINAL ===== */
@media (max-width: 768px) {
    .page-title {
        font-size: 2.5rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .featured-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* HEADER COMPACT */
    .header {
        padding: 0.6rem 3% !important;
    }

    .header-content {
        margin: 0;
    }

    .header-top {
        margin-bottom: 0.4rem !important;
        gap: 0.4rem;
    }

    .logo {
        font-size: 1.2rem !important;
    }

    .header-right {
        gap: 0.4rem;
    }

    .gradient-btn {
        font-size: 0.65rem !important;
        padding: 0.4rem 0.65rem !important;
    }

    .certified {
        display: none !important;
    }

    .instagram-btn {
        font-size: 0.65rem !important;
        padding: 0.4rem 0.65rem !important;
    }

    .mobile-menu-btn {
        display: block !important;
        padding: 0.4rem 0.65rem !important;
        font-size: 0.9rem !important;
    }

    /* SEARCH CONTAINER - MINIMAL */
    .search-container {
        width: 100% !important;
        margin-top: 0.4rem !important;
        margin-bottom: 0 !important;
        gap: 0.4rem !important;
        flex-direction: column !important;
        display: flex !important;
    }

    /* SEARCH BOX - FORCE POSITIONING */
    .search-box {
        order: 1 !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        position: relative !important;
        display: block !important;
        margin: 0 !important;
        height: auto !important;
    }

    .search-input {
        width: 100% !important;
        padding: 0.55rem 0.7rem 0.55rem 2rem !important;
        font-size: 0.85rem !important;
        margin: 0 !important;
        display: block !important;
        position: relative !important;
        z-index: 1 !important;
    }

    /* ICON - FORCE ABSOLUTE POSITIONING INSIDE SEARCH BOX */
    .search-icon {
        position: absolute !important;
        left: 0.7rem !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        font-size: 0.9rem !important;
        z-index: 10 !important;
        pointer-events: none !important;
        display: inline-block !important;
        margin: 0 !important;
    }

    /* NAV APRÈS SEARCH BOX */
    .search-container nav {
        order: 2 !important;
        width: 100% !important;
        margin: 0 !important;
    }

    /* MENU MOBILE */
    .nav-menu {
        display: none !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 0 !important;
        background: rgba(10, 10, 10, 0.98) !important;
        border-radius: 10px !important;
        overflow: hidden !important;
        margin: 0 !important;
    }

    .nav-menu.active {
        display: flex !important;
    }

    .nav-menu li {
        width: 100% !important;
        margin: 0 !important;
    }

    .nav-menu li a {
        border-radius: 0 !important;
        border-bottom: 1px solid rgba(79, 70, 229, 0.2) !important;
        padding: 0.75rem 1rem !important;
        font-size: 0.85rem !important;
        width: 100% !important;
        display: block !important;
    }

    .nav-menu li:last-child a {
        border-bottom: none !important;
    }

    /* CONTAINER */
    .container {
        padding: 1.5rem 3% 3rem !important;
    }

    .category-title {
        font-size: 1.5rem !important;
    }

    .new-badge {
        font-size: 0.65rem;
        padding: 0.25rem 0.6rem;
    }
}

@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none !important;
    }
}
