/* style_moderne.css */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

body { 
    font-family: 'Poppins', sans-serif; 
    /* Le fond est géré par la div .dynamic-background, ici on garde une couleur de repli */
    background-color: #eef2f5; 
    color: #333; 
    overflow-x: hidden;
}

/* --- FOND DYNAMIQUE --- */
.dynamic-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-size: cover;
    background-position: center top;
    /* Petit effet de zoom et flou pour le style */
    filter: blur(4px);
    transform: scale(1.05); 
}

.dynamic-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Le fameux filtre gris/blanc qui laisse deviner l'image */
    background: rgba(240, 242, 245, 0.85); 
    /* Dégradé subtil pour que le bas soit plus uni */
    background: linear-gradient(to bottom, rgba(240, 242, 245, 0.80) 0%, rgba(240, 242, 245, 0.95) 100%);
}

/* SÉCURITÉ MODALE */
.modal { display: none; }
.modal.show { display: block; }

/* --- ZONE FIXE (HEADER + FILTRES) --- */
.sticky-top-bar {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: rgba(244, 246, 249, 0.95); /* Légèrement transparent pour l'effet */
    backdrop-filter: blur(10px); /* Effet verre dépoli moderne */
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

/* Hero Section - NOUVELLE COULEUR */
.hero-section { 
    background: linear-gradient(135deg, #025e7c 0%, #014055 100%); /* Bleu pétrole profond */
    color: white; 
    padding: 8px 0; 
    margin-bottom: 0; 
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* BOUTON ADMIN HEADER */
.admin-header-btn {
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.3rem;
    transition: all 0.3s ease;
    text-decoration: none;
    padding: 5px;
    display: inline-block;
    vertical-align: middle;
}
.admin-header-btn:hover {
    color: #fff;
    transform: rotate(90deg);
    text-shadow: 0 0 10px rgba(255,255,255,0.6);
}

/* Titre principal */
.hero-title { 
    font-size: 1.2rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    margin: 0;
    line-height: 1.1;
    white-space: nowrap;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}
.hero-subtitle {
    font-size: 0.75rem;
    opacity: 0.8;
    white-space: nowrap;
    color: #dbe9ee;
}
.hero-title a:hover { opacity: 0.9; }

/* --- BARRE DES NOUVEAUTÉS --- */
.recent-purchases-container {
    background: rgba(0, 0, 0, 0.2); /* Plus sombre pour contraster avec le header */
    border-radius: 8px;
    padding: 5px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 5px; 
    max-width: 100%;
    border: 1px solid rgba(255,255,255,0.1);
}

.recent-label {
    font-size: 0.7em;
    font-weight: bold;
    text-transform: uppercase;
    opacity: 0.9;
    color: #fff;
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    border-left: 1px solid rgba(255,255,255,0.3);
    padding-left: 4px;
    height: 80px; 
    text-align: center;
    flex-shrink: 0;
}

.recent-item {
    position: relative;
    transition: transform 0.2s;
    display: block;
    flex-shrink: 0;
}
.recent-item:hover {
    transform: scale(1.15);
    z-index: 10;
}
.recent-thumb {
    width: 70px; 
    height: 94px; 
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}
.recent-badge {
    position: absolute;
    bottom: -6px;
    right: -6px;
    font-size: 0.6em;
    padding: 2px 5px;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    font-weight: 600;
}
/* Badges spécifiques pour s'accorder au thème */
.bg-warning.text-dark { background-color: #ffc107 !important; color: #333 !important; } /* Séries */
.bg-info.text-dark { background-color: #5bc0de !important; color: white !important; } /* OneShot */

/* --- RESPONSIVE MOBILE (Nouveautés) --- */
@media (max-width: 768px) {
    .recent-purchases-container {
        display: flex;
        justify-content: flex-start;
        overflow-x: auto;
        width: 100vw;
        margin-left: -12px;
        margin-right: -12px;
        padding-left: 15px;
        padding-right: 15px;
        border-radius: 0;
        background: rgba(0, 0, 0, 0.15);
        scrollbar-width: none;
        -ms-overflow-style: none;
        border: none;
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    .recent-purchases-container::-webkit-scrollbar { display: none; }
    .recent-thumb { width: 60px; height: 80px; }
    .recent-label { height: 70px; font-size: 0.6em; margin-right: 5px; }
}

/* Navigation compacte */
.nav-pills .nav-link { 
    padding: 5px 15px; 
    font-size: 0.85em; 
    color: #495057;
}
.nav-pills .nav-link.active {
    background-color: #025e7c; /* Bleu pétrole */
    color: white !important;
}

/* Barre de recherche */
.search-modern input { 
    border-radius: 50px; 
    padding: 5px 20px; 
    border: 1px solid #ced4da; 
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05); 
    transition: all 0.3s ease; 
    font-size: 0.9em;
    height: 36px;
    background-color: #f8f9fa;
}
.search-modern input:focus { 
    box-shadow: 0 0 0 3px rgba(2, 94, 124, 0.15); 
    border-color: #025e7c; 
    background-color: #fff;
    outline: none; 
}

/* Filtres */
.filter-bar-wrapper { 
    background: transparent; /* Transparent pour laisser voir le fond à travers le sticky header */
    padding: 6px 0; 
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.filter-btn-group { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-bottom: 0; }
.filter-btn { 
    background: rgba(255,255,255,0.8); 
    border: 1px solid #d1d9e0; 
    color: #555; 
    padding: 2px 9px; 
    border-radius: 4px; 
    font-size: 0.8em; 
    cursor: pointer; 
    transition: all 0.2s; 
    text-decoration: none; 
    font-weight: 500;
}
.filter-btn:hover, .filter-btn.active { 
    background: #025e7c; 
    color: white; 
    border-color: #025e7c; 
    box-shadow: 0 2px 5px rgba(2, 94, 124, 0.2);
}

/* Contenu Principal - Cartes */
.album-card { 
    border: none; 
    border-radius: 12px; 
    overflow: hidden; 
    background: white; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.06); /* Ombre plus douce */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease; 
    height: 100%; 
    position: relative; 
    z-index: 1;
}

.series-stack::before { content: ""; position: absolute; top: 4px; left: 4px; right: -4px; bottom: -4px; background: #fff; border-radius: 12px; box-shadow: 1px 1px 3px rgba(0,0,0,0.1); z-index: -1; border: 1px solid #eee; }
.series-stack::after { content: ""; position: absolute; top: 8px; left: 8px; right: -8px; bottom: -8px; background: #fff; border-radius: 12px; box-shadow: 1px 1px 3px rgba(0,0,0,0.1); z-index: -2; border: 1px solid #eee; }

.album-card:hover { transform: translateY(-8px); box-shadow: 0 15px 35px rgba(0,0,0,0.12); z-index: 10; }

.album-cover-wrapper { position: relative; overflow: hidden; padding-top: 140%; background: #e0e0e0; }
.album-cover { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.album-card:hover .album-cover { transform: scale(1.08); }

.album-details { padding: 12px 10px; text-align: center; }
.album-serie { font-size: 0.9em; text-transform: uppercase; color: #025e7c; font-weight: 700; margin-bottom: 3px; line-height: 1.25; }
.count-badge { font-size: 0.7em; background-color: #f0f2f5; color: #6c757d; padding: 3px 8px; border-radius: 12px; display: inline-block; margin-top: 4px; font-weight: 500; border: 1px solid #e9ecef; }

/* Séparateurs */
.alphabet-separator { 
    width: 100%; 
    padding: 10px 0; 
    margin: 30px 0 15px 0; 
    border-bottom: 2px solid rgba(2, 94, 124, 0.2); 
    color: #025e7c; 
    font-size: 1.4rem; 
    font-weight: 700; 
    display: flex; 
    align-items: center; 
}
.alphabet-separator span { 
    background: rgba(255,255,255,0.9); /* Fond semi-transparent pour l'effet */
    padding: 0 20px 0 10px; 
    border-radius: 0 10px 10px 0;
}

/* Titres de section (H4) */
h4.text-primary { color: #025e7c !important; }

/* Modale */
.modal-content { border-radius: 10px; overflow: hidden; border: none; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.modal-header { background-color: #025e7c; color: white; border-bottom: none; }
.btn-close { filter: invert(1); opacity: 0.8; }
.modal-album-item { display: flex; align-items: flex-start; padding: 15px; border-bottom: 1px solid #eee; transition: background 0.2s; }
.modal-album-item:last-child { border-bottom: none; }
.modal-album-item:hover { background-color: #f8fbff; }
.modal-album-cover { width: 80px; height: 110px; object-fit: cover; border-radius: 6px; margin-right: 20px; box-shadow: 0 4px 6px rgba(0,0,0,0.15); cursor: zoom-in; }
.modal-album-info { flex-grow: 1; }
.modal-album-title { font-weight: 700; color: #333; font-size: 1.1em; margin-bottom: 5px; }

/* Dédicaces */
.dedicace-gallery { display: flex; gap: 10px; margin-top: 10px; }
.dedicace-thumb { width: 50px; height: 50px; object-fit: cover; border-radius: 4px; border: 2px solid #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.2); cursor: zoom-in; transition: transform 0.2s; }
.dedicace-thumb:hover { transform: scale(1.1); border-color: #025e7c; }

/* Badges Dédicaces */
.badge.bg-primary { background-color: #025e7c !important; } /* Bleu pétrole pour dédicace */
.badge.bg-danger { background-color: #dc3545 !important; } /* Rouge pour signé (inchangé) */

/* Lightbox */
#lightbox { display: none; position: fixed; z-index: 10000; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); justify-content: center; align-items: center; cursor: zoom-out; opacity: 0; transition: opacity 0.3s ease; backdrop-filter: blur(5px); }
#lightbox.active { opacity: 1; }
#lightbox img { max-width: 90%; max-height: 90%; box-shadow: 0 0 30px rgba(0,0,0,0.7); border-radius: 4px; object-fit: contain; }
#lightbox-close { position: absolute; top: 20px; right: 30px; color: white; font-size: 40px; cursor: pointer; text-shadow: 0 2px 5px rgba(0,0,0,0.5); }

/* --- FOOTER & ADMIN --- */
.main-footer {
    background-color: #fff;
    color: #6c757d;
    padding: 40px 0;
    margin-top: 50px;
    border-top: 1px solid #eee;
    text-align: center;
    font-size: 0.9em;
    position: relative;
    z-index: 1;
}

.admin-link {
    color: #6c757d;
    font-weight: 500;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.3s;
    cursor: pointer;
    padding: 6px 12px;
    border: 1px solid transparent;
}
.admin-link:hover {
    color: #025e7c;
    background-color: #f8f9fa;
    border-color: #dee2e6;
    border-radius: 30px;
}