/* Galerie section - Charte graphique moderne et chaleureuse - Accent caramel #a67c52 */
@font-face {
    font-family: 'ThirstyScriptExtraBoldDemo';
    src: url('../fonts/ThirstyScriptExtraBoldDemo.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

.galerie {
    padding: 6rem 1.5rem;
    background-color: #fdf6f0;
    position: relative;
    overflow: hidden;
}

.galerie-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.galerie::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(166, 124, 82, 0.08) 0%, rgba(166, 124, 82, 0) 70%);
    z-index: 1;
}

.galerie-title {
    font-family: 'ThirstyScriptExtraBoldDemo', cursive;
    color: #1e1e1e;
    font-size: 3.2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
    animation: fadeIn 1s ease-out;
}

.galerie-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, #a67c52, #e8d8c3);
    margin: 0.8rem auto 0;
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(166, 124, 82, 0.2);
    transition: width 0.3s ease;
}

.galerie-text {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.galerie-info {
    text-align: center;
    margin-bottom: 2rem;
}

.galerie-info p {
    color: #666;
    font-size: 0.95rem;
    background: white;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.galerie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.galerie-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 250px;
}

.galerie-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.galerie-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.galerie-empty {
    text-align: center;
    color: #999;
    font-size: 1.2rem;
    padding: 3rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Pagination */
.galerie-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.pagination-btn {
    background: #a67c52;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(166, 124, 82, 0.3);
}

.pagination-btn:hover {
    background: #8b6441;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(166, 124, 82, 0.4);
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-decoration: none;
    color: #666;
    background: white;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination-number:hover {
    background: #a67c52;
    color: white;
    border-color: #a67c52;
    transform: scale(1.1);
}

.pagination-current {
    background: #a67c52;
    color: white;
    border-color: #a67c52;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(166, 124, 82, 0.3);
}

.pagination-dots {
    color: #999;
    font-weight: bold;
    padding: 0 0.5rem;
}

.galerie-item:hover .galerie-item-title {
    bottom: 0;
}

.galerie-btn-container {
    text-align: center;
    margin-top: 3rem;
}

.galerie-btn {
    display: inline-block;
    padding: 12px 28px;
    background-color: #a67c52;
    color: #ffffff;
    font-family: 'Rubik', 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 15px rgba(166, 124, 82, 0.3);
}

.galerie-btn::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.7s ease;
    z-index: -1;
}

.galerie-btn:hover {
    background-color: #8a6642;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    color: #ffffff;
}

.galerie-btn:hover::before {
    left: 120%;
}

.galerie-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(166, 124, 82, 0.3);
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 80%;
    max-height: 80vh;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: -40px;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background-color: rgba(255, 255, 255, 0.4);
    transform: rotate(90deg);
}

.lightbox-caption {
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    text-align: center;
    color: #ffffff;
    font-size: 1.1rem;
    padding: 10px;
}

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-prev {
    left: -80px;
}

.lightbox-next {
    right: -80px;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background-color: rgba(166, 124, 82, 0.5);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Media Queries */
@media (max-width: 992px) {
    .galerie {
        padding: 5rem 1.5rem;
    }
    
    .galerie-title {
        font-size: 2.8rem;
    }
    
    .galerie-text {
        font-size: 1.1rem;
    }

    .lightbox-content {
        max-width: 90%;
    }
}

@media (max-width: 768px) {
    .galerie {
        padding: 4rem 1.5rem;
    }
    
    .galerie-title {
        font-size: 2.5rem;
    }
    
    .galerie-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1.5rem;
    }
    
    .galerie-item {
        height: 200px;
    }
    
    .galerie-pagination {
        gap: 0.5rem;
    }
    
    .pagination-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .pagination-number {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .lightbox-prev, .lightbox-next {
        width: 40px;
        height: 40px;
    }
    
    .lightbox-prev {
        left: -60px;
    }
    
    .lightbox-next {
        right: -60px;
    }
}

@media (max-width: 576px) {
    .galerie {
        padding: 3.5rem 1rem;
    }
    
    .galerie-title {
        font-size: 2.2rem;
    }
    
    .galerie-text {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .galerie-grid {
        grid-template-columns: 1fr;
        grid-gap: 15px;
    }
    
    .galerie-item {
        height: 220px;
    }
    
    .lightbox-prev, .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
        background-color: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(10px);
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        background-color: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(10px);
    }
    
    .lightbox-caption {
        bottom: 10px;
        font-size: 0.9rem;
        padding: 5px;
    }
}
