/* ============================================
   GALERIE LE BOIS BLEU
   Design artisanal pour présenter les réalisations
   ============================================ */

/* Section principale */
.leboisbleu-gallery-section {
    padding: 0 0 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    position: relative;
}

.leboisbleu-gallery-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #153e4d 0%, #ddb254 50%, #153e4d 100%);
}

/* En-tête de la galerie */
.gallery-intro {
	margin-top: 50px;
    text-align: center;
    margin-bottom: 50px;
}

.gallery-title {
    font-family: 'Higuen Serif', serif;
    font-size: 42px;
    color: #153e4d;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.gallery-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #ddb254;
}

.gallery-description {
    font-size: 16px;
    color: #666;
    max-width: 700px;
    margin: 30px auto 0;
    line-height: 1.8;
}

/* ============================================
   GRILLE D'IMAGES
   ============================================ */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.gallery-item {
    opacity: 1;
    transform: scale(1);
    transition: all 0.5s ease;
}

.gallery-item-inner {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    cursor: zoom-in; /* Curseur qui indique qu'on peut zoomer */
    aspect-ratio: 4/3;
    background: #f0f0f0;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.gallery-item-inner:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

.gallery-item-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item-inner:hover img {
    transform: scale(1.08); /* Zoom léger de l'image au survol */
}

/* Overlay */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, 
        rgba(21, 62, 77, 0) 0%, 
        rgba(21, 62, 77, 0.7) 60%, 
        rgba(21, 62, 77, 0.95) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
    padding: 25px;
}

.gallery-item-inner:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay-content {
    width: 100%;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.gallery-item-inner:hover .gallery-overlay-content {
    transform: translateY(0);
}

/* Titre et caption */
.gallery-item-title {
    font-family: 'Higuen Serif', serif;
    font-size: 20px;
    color: #fff;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.gallery-item-caption {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 15px 0;
    line-height: 1.5;
}

/* Boutons d'action */
.gallery-actions {
    display: flex;
    gap: 10px;
}

.gallery-zoom-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: #ddb254;
    color: #153e4d;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(221, 178, 84, 0.4);
}

.gallery-zoom-btn:hover {
    background: #fff;
    color: #153e4d;
    transform: scale(1.1) rotate(15deg);
}

.gallery-zoom-btn i {
    font-size: 18px;
}

/* ============================================
   MESSAGE VIDE
   ============================================ */

.no-images-message {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.no-images-message i {
    font-size: 80px;
    color: #ddb254;
    margin-bottom: 20px;
}

.no-images-message h3 {
    font-family: 'Higuen Serif', serif;
    font-size: 28px;
    color: #153e4d;
    margin-bottom: 15px;
}

.no-images-message p {
    font-size: 16px;
    color: #666;
    max-width: 500px;
    margin: 0 auto;
}

/* ============================================
   COMPTEUR D'IMAGES
   ============================================ */

.gallery-counter {
    text-align: center;
    padding: 25px;
    background: #153e4d;
    border-radius: 10px;
    color: #fff;
    font-family: 'Higuen Serif', serif;
    position: relative;
    overflow: hidden;
}

.gallery-counter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='woodgrain-counter' x='0' y='0' width='200' height='200' patternUnits='userSpaceOnUse'%3E%3Cpath d='M0,50 Q50,48 100,50 T200,50' stroke='%23ffffff' stroke-width='0.3' fill='none' opacity='0.03'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='200' height='200' fill='url(%23woodgrain-counter)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

.gallery-counter > * {
    position: relative;
    z-index: 1;
}

.visible-count {
    font-size: 32px;
    font-weight: 700;
    color: #ddb254;
}

.total-count {
    font-size: 18px;
    opacity: 0.8;
}

.counter-label {
    font-size: 16px;
    margin-left: 10px;
}

/* ============================================
   LIGHTBOX
   ============================================ */

.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

.lightbox-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    display: block;
    margin: 0 auto;
    border-radius: 5px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    text-align: center;
    color: #fff;
    padding: 20px;
    font-size: 16px;
    font-family: 'Higuen Serif', serif;
}

/* Boutons lightbox */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    z-index: 100000;
    transition: all 0.3s ease;
    line-height: 1;
}

.lightbox-close:hover {
    color: #ddb254;
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(221, 178, 84, 0.9);
    color: #153e4d;
    border: none;
    padding: 20px 15px;
    font-size: 24px;
    cursor: pointer;
    z-index: 100000;
    transition: all 0.3s ease;
    border-radius: 5px;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: #ddb254;
    transform: translateY(-50%) scale(1.1);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 991px) {
    .leboisbleu-gallery-section {
        padding: 60px 0;
    }
    
    .gallery-title {
        font-size: 36px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .gallery-title {
        font-size: 32px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 12px;
    }
    
    .gallery-item-title {
        font-size: 18px;
    }
    
    .gallery-item-caption {
        font-size: 13px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        padding: 15px 12px;
        font-size: 20px;
    }
    
    .lightbox-close {
        top: 10px;
        right: 20px;
        font-size: 40px;
    }
}

@media (max-width: 576px) {
    .leboisbleu-gallery-section {
        padding: 40px 0;
    }
    
    .gallery-title {
        font-size: 28px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .gallery-overlay {
        padding: 15px;
    }
    
    .gallery-item-title {
        font-size: 16px;
    }
    
    .gallery-counter {
        padding: 20px;
    }
    
    .visible-count {
        font-size: 24px;
    }
    
    .total-count,
    .counter-label {
        font-size: 14px;
    }
}

