/* Galerie Ledelice - Styles Frontend */

.dg-gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.dg-main-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.dg-main-image-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.dg-main-image-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.4) 0%, rgba(255, 20, 147, 0.4) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 5;
}

.dg-main-image-wrapper:hover::after {
    opacity: 1;
}

.dg-main-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    position: relative;
    z-index: 1;
}

.dg-main-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    color: white;
    text-align: center;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.3s ease, background 0.3s ease;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.3);
}

.dg-main-image-wrapper:hover .dg-main-image-overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.5);
}

.dg-overlay-icon {
    font-size: 72px;
    display: block;
    text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.9);
    animation: pulse 2s infinite;
    margin: 0;
    line-height: 1;
}

.dg-overlay-text {
    font-size: 24px;
    font-weight: bold;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
    background: rgba(0, 0, 0, 0.7);
    padding: 15px 30px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    margin-top: 10px;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Lightbox */
.dg-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    overflow: hidden;
    animation: fadeIn 0.3s ease;
    margin: 0;
    padding: 0;
}

.dg-lightbox.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.dg-lightbox-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.dg-lightbox-main-image {
    max-width: 100%;
    max-height: 75vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease, transform 0.3s ease;
    animation: fadeInImage 0.4s ease;
    margin: 0 auto;
    display: block;
}

@keyframes fadeInImage {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.dg-lightbox-description {
    color: white;
    text-align: center;
    margin: 20px auto 0;
    font-size: 16px;
    max-width: 800px;
    padding: 0 20px;
    line-height: 1.6;
    word-wrap: break-word;
    display: block;
}

.dg-lightbox-counter {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    z-index: 10001;
}

.dg-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10000;
}

.dg-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.dg-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10000;
}

.dg-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.dg-lightbox-prev {
    left: 20px;
}

.dg-lightbox-next {
    right: 20px;
}

.dg-lightbox-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    padding: 0 20px;
    overflow-x: auto;
    max-width: 100%;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
    justify-content: center;
    align-items: center;
}

.dg-lightbox-thumbnails::-webkit-scrollbar {
    height: 8px;
}

.dg-lightbox-thumbnails::-webkit-scrollbar-track {
    background: transparent;
}

.dg-lightbox-thumbnails::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.dg-lightbox-thumbnail {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.dg-lightbox-thumbnail:hover {
    opacity: 1;
    transform: scale(1.1);
}

.dg-lightbox-thumbnail.active {
    opacity: 1;
    border-color: white;
}

/* Galerie d'images en bas - Masquée par défaut, visible uniquement dans la lightbox */
.dg-images-grid {
    display: none !important; /* Masquer la grille sur la page principale */
}

.dg-image-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    aspect-ratio: 1;
}

.dg-image-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.dg-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dg-image-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 15px;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dg-image-item:hover .dg-image-item-overlay {
    opacity: 1;
}

.dg-image-item-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
}

.dg-image-item-description {
    font-size: 12px;
    opacity: 0.9;
    line-height: 1.4;
}

/* Responsive */
/* Styles pour toutes les galeries */
.dg-all-galleries-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.dg-galleries-grid-frontend {
    display: grid;
    gap: 25px;
    margin-bottom: 40px;
}

.dg-gallery-card-frontend {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 2px solid #e9ecef;
}

.dg-gallery-card-frontend:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.dg-gallery-card-image-frontend {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #f8f9fa;
    position: relative;
}

.dg-gallery-card-image-frontend img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.dg-gallery-card-frontend:hover .dg-gallery-card-image-frontend img {
    transform: scale(1.05);
}

.dg-gallery-card-overlay-frontend {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.7) 0%, rgba(255, 20, 147, 0.7) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
}

.dg-gallery-card-frontend:hover .dg-gallery-card-overlay-frontend {
    opacity: 1;
}

.dg-gallery-card-icon {
    font-size: 48px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.dg-gallery-card-text {
    font-size: 18px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.dg-gallery-card-placeholder-frontend {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.dg-placeholder-icon-frontend {
    font-size: 64px;
}

.dg-gallery-card-content-frontend {
    padding: 20px;
}

.dg-gallery-card-content-frontend h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 20px;
}

.dg-gallery-card-meta-frontend {
    color: #6c757d;
    margin: 0;
    font-size: 14px;
}

.dg-load-more-container {
    text-align: center;
    margin-top: 40px;
}

.dg-load-more-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dg-load-more-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.dg-load-more-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .dg-gallery-container {
        padding: 10px;
    }
    
    .dg-main-image-wrapper {
        margin-bottom: 20px;
    }
    
    .dg-lightbox-content {
        width: 95%;
        height: 95vh;
    }
    
    .dg-lightbox-nav {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .dg-lightbox-prev {
        left: 10px;
    }
    
    .dg-lightbox-next {
        right: 10px;
    }
    
    .dg-lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .dg-images-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .dg-lightbox-thumbnails {
        gap: 8px;
    }
    
    .dg-lightbox-thumbnail {
        width: 80px;
        height: 80px;
    }
    
    .dg-galleries-grid-frontend {
        grid-template-columns: 1fr !important;
    }
}

