/**
 * TEMPLATE PRÉCIEUX - Le Précieux Gallery
 * Design spécifique pour la galerie "Le Précieux"
 * - Description centrée et justifiée
 * - Images centrées et affichées en entier
 */

/* Reset pour forcer l'affichage correct */
html, body {
    overflow-x: hidden;
    overflow-y: visible !important;
    height: auto !important;
    max-height: none !important;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Cormorant Garamond', Georgia, serif;
    background: #fff;
    color: #111;
}

/* Container principal */
.precieux-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
}

/* Header avec titre et description */
.precieux-header {
    text-align: center;
    margin-bottom: 60px;
}

.precieux-title {
    font-size: 3em;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0 0 30px 0;
    color: #111;
}

.precieux-description {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1em;
    line-height: 1.8;
    text-align: justify;
    color: #333;
    padding: 0 20px;
}

.precieux-description br {
    display: block;
    margin: 0.8em 0;
    content: "";
}

/* Galerie d'images */
.precieux-gallery {
    max-width: 800px;
    margin: 0 auto 80px auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 0 20px;
    align-items: start;
}

/* Item individuel */
.precieux-item {
    width: 100%;
    margin: 0;
    padding: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.precieux-image-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-bottom: 15px;
    flex: 1 1 auto;
    cursor: pointer;
}

.precieux-image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.precieux-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* LIGHTBOX */
.precieux-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.precieux-lightbox.active {
    opacity: 1;
}

.lightbox-image {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    transition: opacity 0.15s ease;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next,
.lightbox-info-toggle {
    position: fixed;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.2s ease;
    z-index: 10001;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.lightbox-info-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.lightbox-close {
    top: 30px;
    right: 30px;
}

.lightbox-prev {
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 4px;
    padding: 15px 10px;
}

.lightbox-prev:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox-next {
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 4px;
    padding: 15px 10px;
}

.lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox-info-toggle {
    top: 80px;
    right: 30px;
    border-radius: 4px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 0.9em;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.lightbox-info-toggle.active {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid #fff;
}

.lightbox-info {
    position: fixed;
    top: 50%;
    left: 0;
    width: 50%;
    max-width: 500px;
    padding: 30px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    transform: translate(-100%, -50%);
    transition: transform 0.3s ease;
    z-index: 10001;
    max-height: 80vh;
    overflow-y: auto;
}

.lightbox-info.visible {
    transform: translate(0, -50%);
}

.lightbox-name {
    font-size: 1.5em;
    margin: 0 0 15px 0;
    font-weight: 400;
}

.lightbox-description {
    font-size: 1em;
    line-height: 1.6;
    margin: 0;
}

.precieux-caption {
    font-size: 1em;
    font-style: italic;
    color: #666;
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
}

/* Message si pas d'images */
.no-images {
    text-align: center;
    font-size: 1.2em;
    color: #999;
    padding: 60px 20px;
}

/* Bouton retour */
.precieux-back {
    text-align: center;
    margin-top: 60px;
    padding-bottom: 40px;
}

.btn-back {
    display: inline-block;
    padding: 12px 30px;
    background: #fff;
    color: #111;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 500;
    transition: background 0.3s ease, color 0.3s ease;
    cursor: pointer;
}

.btn-back:hover {
    background: #f5f5f5;
    color: #111;
}

/* Responsive */
@media (max-width: 1024px) {
    .precieux-container {
        padding: 30px 15px;
    }

    .precieux-title {
        font-size: 2.5em;
    }

    .precieux-description {
        font-size: 1.05em;
        padding: 0 15px;
    }

    .precieux-gallery {
        padding: 0 15px;
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .precieux-title {
        font-size: 2em;
        margin-bottom: 20px;
    }

    .precieux-description {
        font-size: 1em;
        line-height: 1.7;
    }

    .precieux-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin-bottom: 60px;
    }

    .precieux-caption {
        font-size: 0.95em;
    }

    /* Lightbox mobile */
    .lightbox-close {
        top: 15px;
        right: 15px;
        padding: 8px;
    }

    .lightbox-info-toggle {
        top: 60px;
        right: 15px;
        font-size: 0.8em;
        padding: 6px 12px;
    }

    .lightbox-prev,
    .lightbox-next {
        padding: 10px 8px;
    }

    .lightbox-prev {
        left: 15px;
    }

    .lightbox-next {
        right: 15px;
    }

    .lightbox-info {
        width: 70%;
        max-width: none;
        padding: 20px;
    }

    .lightbox-name {
        font-size: 1.3em;
    }

    .lightbox-description {
        font-size: 0.95em;
    }
}

@media (max-width: 480px) {
    .precieux-container {
        padding: 20px 10px;
    }

    .precieux-title {
        font-size: 1.8em;
        letter-spacing: 0.03em;
    }

    .precieux-description {
        font-size: 0.95em;
        padding: 0 10px;
    }

    .precieux-gallery {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .precieux-caption {
        font-size: 0.9em;
    }

    .btn-back {
        padding: 10px 20px;
        font-size: 0.95em;
    }

    /* Lightbox small mobile */
    .lightbox-close {
        top: 10px;
        right: 10px;
        padding: 6px;
    }

    .lightbox-close svg {
        width: 24px;
        height: 24px;
    }

    .lightbox-info-toggle {
        top: 50px;
        right: 10px;
        font-size: 0.75em;
        padding: 5px 10px;
    }

    .lightbox-prev,
    .lightbox-next {
        padding: 8px 6px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-prev svg,
    .lightbox-next svg {
        width: 30px;
        height: 30px;
    }

    .lightbox-info {
        width: 85%;
        padding: 15px;
    }

    .lightbox-name {
        font-size: 1.2em;
        margin-bottom: 10px;
    }

    .lightbox-description {
        font-size: 0.9em;
    }
}
