/* ===========================================
   PRODUCTS.CSS - Styles communs aux pages produits
   (heroes, galleries, modals, type-cards, CTA)
   =========================================== */

/* ---- Hero Section (base commune) ---- */
/* Cible toutes les classes *-hero (layers-hero, kids-hero, etc.) */
[class$="-hero"],
.product-hero {
    height: 400px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
}

[class$="-hero"] .container,
.product-hero .container {
    width: 100%;
}

/* ---- Type Cards ---- */
.type-card {
    background: var(--background);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    text-align: center;
}

.type-card:hover {
    transform: translateY(-10px);
}

.type-icon {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
}

.type-card h3 {
    color: var(--secondary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-family: 'Playfair Display', serif;
}

.type-card p {
    line-height: 1.6;
}

/* ---- Option Cards (classiques, numbers) ---- */
.option-card {
    background: var(--background);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    text-align: center;
}

.option-card:hover {
    transform: translateY(-10px);
}

.option-icon {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ---- Gallery (pages produits) ---- */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.gallery-image-container {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
}

.gallery-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-image-container:hover .gallery-image {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-image-container:hover .gallery-overlay {
    opacity: 1;
}

/* ---- Modal (images) ---- */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    animation: zoomIn 0.6s;
}

.close {
    position: absolute;
    right: 35px;
    top: 15px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}

.close:hover {
    color: #bbb;
}

@keyframes zoomIn {
    from { transform: scale(0.1); }
    to { transform: scale(1); }
}

/* ---- Navigation Buttons (modal) ---- */
.nav-btn {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 35px;
    transition: 0.3s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    -webkit-user-select: none;
    background-color: rgba(0, 0, 0, 0.1);
}

.nav-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev {
    left: 0;
}

/* ---- Loader ---- */
.loader {
    border: 5px solid #f3f3f3;
    border-radius: 50%;
    border-top: 5px solid #3498db;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -25px;
    margin-left: -25px;
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ---- CTA Section (contact button) ---- */
.contact-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    background: white;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: bold;
    color: var(--secondary) !important;
}

.contact-button i {
    margin-left: 1rem;
    transition: transform 0.3s ease;
}

.contact-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    background: var(--secondary);
    color: white !important;
}

.contact-button:hover i {
    transform: translateX(5px);
    color: white;
}

/* ---- Price ---- */
.price {
    margin-top: 1.5rem;
    font-weight: bold;
    color: var(--primary-dark);
}

.price-list {
    margin-top: 1.5rem;
    font-weight: bold;
    color: var(--primary-dark);
}

.price-list div {
    margin-bottom: 0.5rem;
}

/* ---- Responsive ---- */
@media (max-width: 968px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    [class$="-hero"],
    .product-hero {
        height: 300px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .type-card {
        text-align: center;
    }

    .modal-content {
        width: 95%;
    }

    .close {
        right: 20px;
        top: 20px;
    }
}

@media (max-width: 480px) {
    [class$="-hero"],
    .product-hero {
        height: 250px;
    }
}
