/* ========================================
   GALERIES - STYLES MODERNES
   ======================================== */

/* === VARIABLES CSS === */
:root {
    --primary-color: #f39c12;
    --primary-dark: #e67e22;
    --background-dark: #2c2c2c;
    --background-darker: #1a1a1a;
    --background-card: #333;
    --text-primary: #fff;
    --text-secondary: #ccc;
    --border-color: #444;
    --shadow-light: rgba(255, 255, 255, 0.1);
    --shadow-dark: rgba(0, 0, 0, 0.3);
    --transition-smooth: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --transition-fast: all 0.3s ease;
}

/* === RESET ET BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(243, 156, 18, 0.3); }
    50% { box-shadow: 0 0 40px rgba(243, 156, 18, 0.6); }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* === HERO SECTION === */
.galeries-main {
    min-height: 100vh;
    padding-top: 80px;
}

.hero-section {
    background: linear-gradient(135deg, var(--background-darker) 0%, var(--background-dark) 100%);
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(243, 156, 18, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(243, 156, 18, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    letter-spacing: -2px;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: var(--text-secondary);
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
}

/* === GALLERIES GRID === */
.galleries-grid {
    padding: 80px 0;
    background: var(--background-dark);
}

.galleries-grid .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
    align-items: start;
}

/* === GALLERY CARDS === */
.gallery-card {
    background: var(--background-card);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition-smooth);
    cursor: pointer;
    position: relative;
    animation: fadeInUp 0.8s ease-out;
    border: 1px solid var(--border-color);
}

.gallery-card:nth-child(2) { animation-delay: 0.1s; }
.gallery-card:nth-child(3) { animation-delay: 0.2s; }
.gallery-card:nth-child(4) { animation-delay: 0.3s; }
.gallery-card:nth-child(5) { animation-delay: 0.4s; }

.gallery-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 
        0 25px 50px var(--shadow-dark),
        0 0 0 1px var(--primary-color);
    border-color: var(--primary-color);
}

/* === IMAGE CONTAINER === */
.gallery-image-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.gallery-cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
    filter: brightness(0.8);
}

.gallery-card:hover .gallery-cover-image {
    transform: scale(1.1);
    filter: brightness(0.6) grayscale(0.3);
}

.gallery-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--background-darker), var(--background-card));
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-icon {
    font-size: 4rem;
    opacity: 0.5;
}

/* === OVERLAY === */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.3) 40%,
        rgba(0, 0, 0, 0.8) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    opacity: 0;
    transition: var(--transition-fast);
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

/* === GALLERY INFO === */
.gallery-info {
    margin-bottom: 20px;
    transform: translateY(20px);
    transition: var(--transition-fast);
}

.gallery-card:hover .gallery-info {
    transform: translateY(0);
}

.gallery-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.gallery-description {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.gallery-meta {
    display: flex;
    align-items: center;
    gap: 15px;
}

.photo-count {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 500;
    background: rgba(243, 156, 18, 0.2);
    padding: 5px 12px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

/* === GALLERY ACTIONS === */
.gallery-actions {
    transform: translateY(30px);
    transition: var(--transition-fast);
}

.gallery-card:hover .gallery-actions {
    transform: translateY(0);
}

.btn-view-gallery {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.btn-view-gallery::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-view-gallery:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(243, 156, 18, 0.4);
}

.btn-view-gallery:hover::before {
    left: 100%;
}

.btn-view-gallery svg {
    transition: transform 0.3s ease;
}

.btn-view-gallery:hover svg {
    transform: translateX(5px);
}

/* === PRIVATE GALLERIES INFO === */
.private-galleries-info {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--background-darker), var(--background-dark));
}

.private-info-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    transition: var(--transition-fast);
}

.private-info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px var(--shadow-dark);
    border-color: rgba(243, 156, 18, 0.3);
}

.private-info-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

.private-info-content h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

.private-info-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 25px;
    line-height: 1.6;
}

.btn-private-access {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn-private-access::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-private-access:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(243, 156, 18, 0.4);
}

.btn-private-access:hover::before {
    left: 100%;
}

/* === NO GALLERIES === */
.no-galleries {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
}

.no-galleries-content {
    max-width: 400px;
    margin: 0 auto;
}

.no-galleries-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-galleries h3 {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.no-galleries p {
    color: var(--text-secondary);
    opacity: 0.8;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 1200px) {
    .galleries-grid .container {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .galleries-grid .container {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .gallery-card {
        margin: 0 10px;
    }
    
    .gallery-image-container {
        height: 250px;
    }
    
    .gallery-overlay {
        padding: 20px;
    }
    
    .gallery-title {
        font-size: 1.5rem;
    }
    
    .private-info-card {
        padding: 30px 20px;
        margin: 0 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-section {
        padding: 60px 0 40px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .galleries-grid {
        padding: 40px 0;
    }
    
    .gallery-image-container {
        height: 200px;
    }
    
    .gallery-overlay {
        padding: 15px;
    }
    
    .private-galleries-info {
        padding: 40px 0;
    }
}

/* === ACCESSIBILITÉ === */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === AMÉLIORATION CONTRASTE === */
@media (prefers-contrast: high) {
    :root {
        --border-color: #666;
        --text-secondary: #ddd;
    }
    
    .gallery-overlay {
        background: linear-gradient(
            to bottom,
            transparent 0%,
            rgba(0, 0, 0, 0.5) 40%,
            rgba(0, 0, 0, 0.9) 100%
        );
    }
}

/* === LOADING STATES === */
.gallery-card.loading {
    pointer-events: none;
    opacity: 0.7;
}

.gallery-card.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 1.5s infinite;
}