/**
 * page-photos.css - Styles galerie photos (interface transparente)
 */

/* === NAVIGATION PAR ANNÉE === */
.year-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0 10px;
}

.year-tab {
    background: rgba(255,255,255,0.1);
    color: white;
    padding: 10px 18px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 75px;
    border: 1px solid transparent;
    display: block;
    font-size: 0.95em;
    font-weight: 500;
}

.year-tab:hover {
    background: rgba(255,255,255,0.2);
    color: white;
    text-decoration: none;
    border-color: rgba(255,255,255,0.3);
}

.year-tab.active {
    background: #5ebd00;
    color: white;
    border-color: #66cc03;
    box-shadow: 0 3px 10px rgba(94, 189, 0, 0.4);
}

.year-tab .year {
    font-size: 1.1em;
    font-weight: bold;
    display: block;
    line-height: 1.2;
}

.year-tab .count {
    font-size: 0.75em;
    opacity: 0.8;
    margin-top: 2px;
    display: block;
}

.year-stats {
    text-align: center;
    background: rgba(94, 189, 0, 0.1);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid rgba(94, 189, 0, 0.3);
    margin-bottom: 30px;
    font-size: 1.1em;
}

.year-stats strong {
    color: #5ebd00;
}

/* === AUTHENTIFICATION === */
.gallery-auth {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: white;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    margin: 20px 0;
}

.gallery-auth h2 {
    margin-bottom: 20px;
    color: white;
}

.gallery-auth p {
    margin-bottom: 25px;
    opacity: 0.9;
}

.btn-gallery {
    background: white;
    color: #4a90e2;
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-gallery:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    text-decoration: none;
    color: #357abd;
}

/* === ALBUMS GRID === */
.album-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    height: 100%;
    min-height: 350px;
}

.album-card:hover {
    transform: translateY(-5px);
    text-decoration: none;
    color: inherit;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.album-thumbnail {
    height: 200px;
    object-fit: cover;
    object-position: 50% 40%;
    width: 100%;
    transition: transform 0.3s ease;
    border-radius: 0;
}

.album-card:hover .album-thumbnail {
    transform: scale(1.05);
}

.photo-counter {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.5);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 1em;
    font-weight: 600;
}

.empty-album {
    opacity: 0.6;
    position: relative;
}

.empty-album::after {
    content: "Vide";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(108, 117, 125, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
}

/* === PHOTOS GRID === */
.photo-grid-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 15px;
}

.photo-grid-item img {
    transition: transform 0.3s ease;
}

.photo-grid-item:hover img {
    transform: scale(1.05);
}

.photo-thumbnail {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

/* === LIGHTBOX CUSTOMIZATION === */
.lb-nav {
    display: block !important;
}

.lb-prev, .lb-next {
    display: block !important;
    opacity: 0;
    transition: opacity 0.3s;
}

.lb-prev:hover, .lb-next:hover {
    opacity: 1 !important;
}

.lb-data .lb-details {
    width: 85%;
}

.lb-data .lb-caption {
    font-size: 13px;
    font-weight: normal;
    line-height: 1.4;
}

/* === AUTRES ANIMATIONS (Conservées) === */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .album-thumbnail, .photo-thumbnail {
        height: 200px; /* Plus haut sur mobile comme demandé */
    }

    .album-card {
        min-height: 300px;
    }

    .gallery-auth {
        padding: 25px 15px;
    }

    .photo-counter {
        font-size: 0.7em;
        padding: 3px 6px;
    }

    /* Navigation année responsive */
    .year-tabs {
        overflow-x: auto;
        justify-content: center;
        padding: 0 10px;
        gap: 8px;
    }

    .year-tab {
        flex-shrink: 0;
        min-width: 65px;
        padding: 7px 14px;
        font-size: 0.9em;
    }

    .year-tab .year {
        font-size: 1em;
    }

    .year-tab .count {
        font-size: 0.7em;
    }

    .year-stats {
        font-size: 1em;
        padding: 12px 15px;
    }
}

@media (max-width: 576px) {
    .album-thumbnail {
        height: 200px; /* Maintien de la hauteur sur très petits écrans */
    }

    .photo-thumbnail {
        height: 150px;
    }

    /* Boutons années très compacts sur mobile */
    .year-tabs {
        gap: 3px;
        margin-bottom: 15px;
        padding: 0 5px;
    }

    .year-tab {
        min-width: 48px;
        padding: 5px 8px;
        border-radius: 15px;
        flex-shrink: 0;
        font-size: 0.8em;
    }

    .year-tab .year {
        font-size: 0.9em;
        line-height: 1.1;
    }

    .year-tab .count {
        font-size: 0.65em;
        margin-top: 1px;
    }
}

/* === DARK MODE COMPATIBILITY === */
@media (prefers-color-scheme: dark) {
    .gallery-auth {
        background: linear-gradient(135deg, #2563eb, #1d4ed8);
    }
}

/* === PRINT STYLES === */
@media print {
    .album-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* === ACCESSIBILITÉ === */
.btn-gallery:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.album-card:focus-within {
    outline: 2px solid #5ebd00;
    outline-offset: 2px;
}

/* Indicateur de chargement pour les images */
.album-thumbnail[src=""],
.photo-thumbnail[src=""] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* === UTILITIES === */
.photos-loading {
    text-align: center;
    color: white;
    padding: 40px;
}

.lazy-placeholder {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 2em;
}

/* === OPTIMISATIONS PERFORMANCE === */
.album-thumbnail, .photo-thumbnail {
    will-change: transform;
}

.album-card {
    contain: layout style paint;
}
