:root {
    --bg-color: #111;
    --text-color: #eee;
    --gap: 10px; /* Retour à l'espace demandé */
    --radius: 12px; /* Coins arrondis */
}

/* Base */
body {
    margin: 0;
    background: var(--bg-color);
    color: var(--text-color);
    font-family: 'Segoe UI', sans-serif;
    -webkit-user-select: none;
    user-select: none;
}

/* Scrollbar cachée */
body::-webkit-scrollbar { display: none; }
body { -ms-overflow-style: none; scrollbar-width: none; }

/* HEADER */
header {
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(5px);
    z-index: 100;
    border-bottom: 1px solid #222;
}

.author-name {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 1px;
    text-transform: uppercase;
        text-align: left;

}
.author-sub {
    font-size: 0.8rem;
}

/* SELECT */
.select-wrapper { position: relative; }
select {
    appearance: none;
    background-color: #1a1a1a;
    border: 1px solid #444;
    color: #ddd;
    padding: 10px 40px 10px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    min-width: 150px;
    
}
.custom-arrow {
    position: absolute;
    right: 15px; top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    pointer-events: none;
    color: #888;
}

/* GRID (Design restauré) */
.grid {
    display: grid;
    gap: var(--gap);
    padding: var(--gap);
    grid-template-columns: repeat(4, 1fr);
}
@media (min-width: 768px) { .grid { grid-template-columns: repeat(8, 1fr); } }
@media (min-width: 1600px) { .grid { grid-template-columns: repeat(8, 1fr); } }

.grid-item {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    cursor: pointer;
    border-radius: var(--radius); /* Coins arrondis ici */
    position: relative;
    background: #1a1a1a;
    transition: transform 0.2s;
}

.grid-item:hover { transform: translateY(-3px); }

.grid-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
    display: block;
}
.grid-item:hover img { transform: scale(1.1); }

/* Play Icon */
.play-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 40px; height: 40px;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    border: 2px solid #fff;
    pointer-events: none;
}
.play-icon::after {
    content: '▶';
    color: #fff;
    position: absolute;
    top: 50%; left: 55%;
    transform: translate(-50%, -50%);
    font-size: 14px;
}



.pswp-caption-content {
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100%;
    text-align: center;
    color: #fff;
    font-size: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.9);
    pointer-events: none;
}

.pswp-video-container {
    width: 100%; height: 100%;
    display: flex; justify-content: center; align-items: center;
}
.pswp-video-container video {
    max-width: 100%; max-height: 100%;
    box-shadow: 0 5px 30px rgba(0,0,0,0.5);
}


/* Cache uniquement le gros bouton de lecture natif sur iOS au chargement, mais affiche la barre de contrôles */
.pswp-video-container video::-webkit-media-controls-start-playback-button {
    display: none !important;
    -webkit-appearance: none;
}


/* RESPONSIVE */
@media (max-width: 768px) {
    header { flex-direction: row; justify-content: space-between; align-items: center;   padding: 5px 5px; }
    .select-wrapper, select { width: 100%; }
    .pswp-caption-content {font-size: 0.7rem;}
    .grid { gap: 4px;}
    .pswp__button--arrow--prev {
        transform: scale(0.5);
        left: -25px;
    }
    .pswp__button--arrow--next {
        transform: scale(0.5);
        right: -25px;
    }
    .pswp__button--arrow--prev svg,
    .pswp__button--arrow--next svg {
       opacity: .4 !important; 
       fill: rgba(100,100,100, 0.6);
       
    }
    .author-name { text-align: left;}
    select {
    appearance: none;
    background-color: #1a1a1a;
    border: 1px solid #444;
    color: #ddd;
    padding: 5px 40px 5px 5px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    min-width: 150px;
}
    
    
}


/* PhotoSwipe : laisse le JS gérer les dimensions, on corrige juste le rendu */
.pswp__img {
    object-fit: contain !important;
}





