/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: black;
    color: #ffffff;
    line-height: 1.6;
    height: 100vh;
    overflow: hidden;
}

/* Ancien style - maintenant inutile */
/*.container {
/* Fond dégradé pour la vue grille - maintenant inutile car appliqué partout */
/*.container {
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* Header avec mini-nav */
header {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ff6b6b, #ffd93d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0;
}

.mini-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
}

.nav-btn {
    padding: 0.5rem;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.nav-btn svg {
    width: 16px;
    height: 16px;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.nav-btn.active {
    background: linear-gradient(135deg, #ff6b6b, #ffd93d);
    color: #000;
    font-weight: 600;
}

.tagline {
    display: none;
}

/* Container TikTok style avec scroll accéléré */
#categories-container {
    height: 100vh;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(255, 217, 61, 0.1));
}

#sites-display.sites-grid {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* S'assurer que le conteneur prend toute la largeur */
    width: 100%;
    /* Pas de padding ou margin pour le scroll snap */
    padding: 0;
    margin: 0;
}

/* S'assurer que le conteneur fonctionne sur tous les écrans */
@media (min-width: 769px) {
    #sites-display.sites-grid {
        height: 100vh;
        overflow-y: scroll;
        scroll-snap-type: y mandatory;
        scroll-behavior: smooth;
    }
}

@media (min-width: 1025px) {
    #sites-display.sites-grid {
        height: 100vh;
        overflow-y: scroll;
        scroll-snap-type: y mandatory;
        scroll-behavior: smooth;
    }
}

/* Vue grille (3 colonnes) avec max-width 960px */
#sites-display.sites-grid.grid-view {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 8rem 2rem 2rem 2rem; /* Ajout de padding en haut pour le header */
    overflow-y: auto;
    scroll-snap-type: none;
    height: auto;
    max-height: 100vh; /* Limiter la hauteur pour permettre le scroll */
    max-width: 960px;
    margin: 0 auto;

}

/* Barre de scroll fine et visible pour la vue grille */
#sites-display.sites-grid.grid-view::-webkit-scrollbar {
    width: 6px;
}

#sites-display.sites-grid.grid-view::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

#sites-display.sites-grid.grid-view::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ff6b6b, #ffd93d);
    border-radius: 3px;
}

#sites-display.sites-grid.grid-view::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ff5252, #ffc107);
}

/* Pour Firefox */
#sites-display.sites-grid.grid-view {
    scrollbar-width: thin;
    scrollbar-color: #ff6b6b rgba(255, 255, 255, 0.1);
}

.sites-grid.grid-view .site-card {
    height: auto;
    min-height: 200px;
    padding: 0;
    border: none;
    box-shadow: none;
}

.sites-grid.grid-view .site-card-content {
    max-width: 100%;
    width: 100%;
    height: 100%;
    background: rgba(20, 20, 20, 0.5); /* Fond appliqué ici */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 0;
    overflow: hidden; /* Pour que le border-radius s'applique à l'image */
}

.sites-grid.grid-view .cover-image {
    height: 150px;
    border-radius: 0; /* Le parent gère le radius */
}

.sites-grid.grid-view .cover-text {
    font-size: 3rem;
}

.sites-grid.grid-view .site-info {
    padding: 1rem;
}

.sites-grid.grid-view .site-name {
    font-size: 1.2rem;
}

.sites-grid.grid-view .site-description {
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 2;
}

.sites-grid.grid-view .rating-container {
    margin-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* Responsive grille */
@media (max-width: 768px) {
    .sites-grid.grid-view {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
}

@media (max-width: 1024px) {
    .sites-grid.grid-view {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Card TikTok style */
.site-card {
    height: 100vh;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    backdrop-filter: blur(10px);
    /* S'assurer que les cartes prennent toute la largeur */
    width: 100%;
    min-width: 100%;
    /* Forcer l'affichage d'une seule carte */
    flex-shrink: 0;
}

.site-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4);
    border-color: rgba(255, 107, 107, 0.8);
    border-width: 2px;
}

.site-header {
    text-align: center;
    margin-bottom: 1rem;
}

.site-card-content {
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 0;
    max-width: 500px;
    width: 95%;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.cover-image {
    width: 100%;
    height: 500px;
    background-size: cover;
    background-position: center;
    border-radius: 25px 25px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%);
    border-radius: 25px 25px 0 0;
}

.cover-text {
    font-size: 8rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.site-info {
    padding: 2rem;
}

.site-name {
    font-weight: 700;
    color: #fff;
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
}

.category-tag {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.site-description {
    color: #ccc;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Système d'étoiles */
.rating-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-bottom: 1rem;
    gap: 0.5rem;
}

.stars {
    display: flex;
    gap: 2px;
}

.star {
    color: #ffd93d;
    font-size: 1rem;
}

.star.empty {
    color: #444;
}

.rating-text {
    color: #ccc;
    font-size: 0.9rem;
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #666;
}

/* Scrollbar TikTok style */
.sites-grid::-webkit-scrollbar {
    display: none;
}

.sites-grid {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Indicateur de scroll */
.scroll-indicator {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    animation: fadeIn 1s ease-in-out;
}

.scroll-icon {
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 8px;
}

.scroll-wheel {
    width: 4px;
    height: 10px;
    background: linear-gradient(135deg, #ff6b6b, #ffd93d);
    border-radius: 2px;
    animation: scrollAnimation 2s infinite;
}

.scroll-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

@keyframes scrollAnimation {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(20px);
        opacity: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.scroll-indicator.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

/* Responsive TikTok */
@media (max-width: 768px) {
    .site-card-content {
        max-width: 95%;
        width: 100%;
        margin: 1rem;
    }
    
    .cover-image {
        height: 250px;
    }
    
    .cover-image::after {
        font-size: 2rem;
    }
    
    .site-name {
        font-size: 1.5rem;
    }
    
    .site-description {
        font-size: 1rem;
    }
    
    header {
        top: 10px;
        left: 10px;
        padding: 0.75rem 1rem;
    }
    
    header h1 {
        font-size: 1.25rem;
    }
}

/* Assurer le bon fonctionnement sur les écrans larges */
@media (min-width: 769px) {
    .site-card {
        height: 100vh;
        width: 100%;
        min-width: 100%;
    }
    
    #sites-display.sites-grid {
        height: 100vh;
        overflow-y: scroll;
    }
}

@media (min-width: 1025px) {
    .site-card {
        height: 100vh;
        width: 100%;
        min-width: 100%;
    }
    
    #sites-display.sites-grid {
        height: 100vh;
        overflow-y: scroll;
    }
}
