/* ==========================================
   1. RÉINITIALISATION ET LAYOUT DE BASE
   ========================================== */
html, body {
    margin: 0;
    padding: 0;
    font-family: 'Century Gothic', 'Futura', 'Montserrat', sans-serif;
    background-color: #fafafa;
    color: #111;
    width: 100%;
}

main {
    display: flex;
    flex-direction: column;
    gap: 50px; /* Espace vertical entre les différentes sections */
    width: 100%;
}

/* ==========================================
   2. CARROUSEL FULLSCREEN (CSS Scroll-Snap Native)
   ========================================== */
.carousel-fullscreen {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background-color: #000;
}

.carousel-track {
    display: flex;
    height: 100%;
    width: 100%;
    /* Activation du scroll-snap fluide natif */
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    
    /* Masquer les barres de défilement */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.carousel-track::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.carousel-slide {
    min-width: 100vw;
    width: 100vw;
    height: 100%;
    flex-shrink: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.carousel-slide picture,
.carousel-slide video,
.carousel-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    user-select: none;
    -webkit-user-drag: none;
}

.video-mobile { display: block; }
.video-desktop { display: none; }

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(4px);
    transition: background 0.3s ease, transform 0.2s ease;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.05);
}

.carousel-btn.prev { left: 20px; }
.carousel-btn.next { right: 20px; }

.carousel-dots {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
    pointer-events: none; /* Laisse passer le swipe au-dessus des puces sur mobile */
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    pointer-events: auto;
    transition: background 0.3s ease, transform 0.2s ease;
}

.dot.active {
    background: #ffffff;
    transform: scale(1.3);
}

/* ==========================================
   3. SECTION PRINCIPALE DE LA COLLECTION
   ========================================== */
.collection-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.collection-hero-title {
  width: fit-content;      /* Le conteneur prend la largeur exacte de son contenu */
    max-width: 100%;         /* Évite tout débordement en mobile */
    margin-left: auto;       /* Centre le bloc horizontalement */
    margin-right: auto;
    margin-bottom: 30px;
    text-align: left;        /* Aligne toutes les lignes de texte à gauche */
}

.collection-hero-title h1 {
    font-size: 1.8rem;
    font-weight: 500;
    color: #111;
    margin: 0 0 8px 0;
    text-transform: capitalize;
}

.collection-hero-subtitle,
.collection-hero-info {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    color: #777;
    margin: 0 0 8px 0;
    text-align: left;
}

.collection-hero-subtitle
{
    text-transform: capitalize;

}

.collection-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0px;
    background: #f9f9f9;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
    cursor: pointer;
    user-select: none;
    margin-bottom: 10px;
}

.select-all-label {
    font-weight: 600;
    font-size: 1rem;
    color: #111;
}

.header-right-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

#grand-total-display {
    font-weight: 600;
    font-size: 1.1rem;
    color: #111;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}

/* Cartes produits */
.product-item-card {
    border-bottom: 1px solid #eeeeee;
    padding: 30px 24px;
    background: #ffffff;
    margin-bottom: 15px;
}

.product-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    background: #ffffff;
}

.product-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-title-text {
    font-size: 1.05rem;
    font-weight: 600;
    color: #111;
}

.product-price-wrapper {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.product-price {
    font-size: 0.95rem;
    color: #555;
}

.product-item-body {
    display: flex;
    gap: 24px;
    padding-left: 36px;
    margin-top: 15px;
}

.product-thumb-container {
    width: 140px;
    height: 140px;
    background: #f4f4f4;
    flex-shrink: 0;
    overflow: hidden;
}

.product-thumb-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.color-label {
    font-size: 0.85rem;
    color: #666;
}

/* Checkbox personnalisée */
.checkbox-custom {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.checkbox-custom input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-box {
    width: 18px;
    height: 18px;
    border: 1.5px solid #111;
    display: inline-block;
    position: relative;
    margin-right: 10px;
}

.checkbox-custom input:checked ~ .checkbox-box::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid black;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ==========================================
   4. SÉLECTEUR PERSONNALISÉ (UL/LI) & QUANTITÉ
   ========================================== */
.custom-select-wrapper {
    position: relative;
    width: 220px;
    user-select: none;
}

.custom-select-trigger {
    position: relative;
    width: 100%;
    height: 42px; /* Hauteur fixe propre */
    padding: 0 35px 0 12px;
    background-color: #FFFFFF;
    border: 1px solid #E5E5E5;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 1px;
    color: #1A1A1A;
    cursor: pointer;
    box-sizing: border-box;

    /* Alignement horizontal sur une seule ligne */
    display: flex;
    align-items: center;
    justify-content: space-between;
    white-space: nowrap; /* Empêche le retour à la ligne du prix */
    transition: border-color 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}

/* Si votre JS injecte un <br> ou des <span> à l'intérieur du trigger */
.custom-select-trigger br {
    display: none; /* Annule tout retour à la ligne accidentel */
}

.custom-select-trigger span,
.custom-select-trigger div {
    display: inline-block;
    white-space: nowrap;
}

.custom-select-trigger:hover,
.custom-select-wrapper.open .custom-select-trigger {
    border-color: #1A1A1A;
}

/* Chevron CSS pur */
.custom-select-trigger::after {
    content: "";
    display: block;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid #1A1A1A;
    border-bottom: 1.5px solid #1A1A1A;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
    position: absolute;
    right: 15px;
    top: 14px;
    pointer-events: none;
}

.custom-select-wrapper.open .custom-select-trigger::after {
    transform: rotate(-135deg);
}

/* Menu Liste (UL) — Support de .custom-options et .custom-select-options */
.custom-options,
.custom-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #FFFFFF;
    border: 1px solid #1A1A1A;
    border-top: none;
    list-style: none;
    margin: 0;
    padding: 0;
    z-index: 50;
    display: none;
    max-height: 240px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}

.custom-select-wrapper.open .custom-options,
.custom-select-wrapper.open .custom-select-options {
    display: block;
}

/* Éléments de la liste (LI) */
.custom-option {
    padding: 12px 16px;
    font-size: 12px;
    color: #1A1A1A;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

.custom-option:hover {
    background-color: #FAF9F6;
}

.custom-option.selected {
    background-color: #F0F0F0;
    font-weight: 600;
}

/* Options désactivées (Rupture de stock) */
.custom-option.disabled {
    color: #A0A0A0;
    background-color: #F5F5F5;
    cursor: not-allowed;
    font-style: italic;
}

.custom-option.disabled:hover {
    background-color: #F5F5F5;
}

/* Compteur de Quantité */
.qty-picker {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 220px;
    height: 48px;
    border: 1px solid #E5E5E5;
    background: #FFFFFF;
    border-radius: 0 !important;
    box-sizing: border-box;
    margin-top: 10px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.qty-picker:hover {
    border-color: #1A1A1A;
}

.qty-picker button {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    width: 48px;
    min-width: 48px;
    height: 100%;
    cursor: pointer;
    font-size: 16px;
    font-weight: 300;
    color: #1A1A1A;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    flex-shrink: 0;       /* Empêche le bouton d'être poussé dehors */
    -webkit-tap-highlight-color: transparent; /* Supprime le flash gris iOS */
    transition: background-color 0.2s ease;
}

.qty-picker button:hover {
    background-color: #FAF9F6;
}

/* Annule les bordures et ombres indésirables au clic sur mobile */
.qty-picker button:focus,
.qty-picker button:active,
.qty-picker button:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

.qty-picker .qty-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    flex: 1;
    min-width: 0;
    height: 100%;
    border: none;
    border-left: 1px solid #F0F0F0;
    border-right: 1px solid #F0F0F0;
    background: transparent;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #1A1A1A;
    outline: none;
    margin: 0;
    padding: 0;
    border-radius: 0;
}

.qty-picker .qty-input::-webkit-outer-spin-button,
.qty-picker .qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ==========================================
   5. BOUTON D'ACTION & BLOC DE RÉASSURANCE
   ========================================== */
.bottom-action-bar {
    position: relative;
    width: 100%;
    height: 54px;
    margin-top: 30px;
    background: #111;
    color: #fff;
    padding: 16px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.bottom-action-bar:hover { background: #333; }
.bottom-action-bar:disabled { background: #aaa; cursor: not-allowed; }

#divreassurance-list {
    margin-top: 35px;
    padding-top: 25px;
    padding-bottom: 25px;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
}

.reassurance-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 40px;
}

.reassurance-list li {
    font-size: 11px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #555;
    line-height: 1.4;
}

/* ==========================================
   6. ACCORDÉON PRODUIT (Description & Entretien)
   ========================================== */
.product-accordion {
    width: 100%;
    margin-top: 0;
    padding: 0 15px;
    border-bottom: 1px solid #e5e5e5;
    background: #ffffff;
    box-sizing: border-box;
}

.accordion-item {
    border-top: 1px solid #e5e5e5;
}

.accordion-header {
    width: 100%;
    background: transparent;
    border: none;
    padding: 24px 0px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 400;
    color: #111;
    cursor: pointer;
    text-align: left;
    box-sizing: border-box;
}

.accordion-icon {
    font-size: 1.2rem;
    font-weight: 300;
    min-width: 20px;
    text-align: center;
    flex-shrink: 0;
}


.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-out;
}

.accordion-item.active .accordion-content {
    max-height: 1000px;
    transition: max-height 0.5s ease-in;
}

.accordion-body {
    padding-bottom: 24px;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #444;
}

.entretien-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.entretien-list li {
    margin-bottom: 12px;
}

.entretien-list li strong {
    color: #111;
}

/* ==========================================
   7. BLOC DE CERTIFICATION / LABELS
   ========================================== */
.certification-container {
    width: 100%;
    box-sizing: border-box;
    margin: 20px 0 0 0;
    padding: 22px 20px;
    background-color: #FAF9F6;
    border: 1px solid #E0DCD5;
}

.certification-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #C5A059;
    margin-bottom: 8px;
}

.certification-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.8;
    color: #555;
    font-weight: 300;
}

.certification-text strong {
    font-weight: 600;
    color: #1A1A1A;
}

/* ==========================================
   8. SECTION AUTRES COLLECTIONS (CARROUSEL SCROLL)
   ========================================== */
#other-collections-header {
    width: 100%;
    background: #F9F6F0;
    min-height: 50px;
    height: auto;
    padding: 20px;
    box-sizing: border-box;
}

#other-collections-header h2 {
    margin: 0;
    font-weight: 300;
    text-transform: capitalize;
    color: #1A1A1A;
}

#collections-grid-container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 25px;

    width: 100%;
    max-width: 100%;
    height: 550px;
    box-sizing: border-box;

    background: #F9F6F0;
    overflow-x: auto !important;
    overflow-y: hidden;

    padding: 25px !important;

    scroll-padding-left: 25px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;

    cursor: grab;
    user-select: none;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#collections-grid-container::-webkit-scrollbar {
    display: none;
}

/* Barre de défilement pour ordinateurs */
@media (hover: hover) and (pointer: fine) {
    #collections-grid-container {
        scrollbar-width: thin;
        scrollbar-color: #bbbbbb #f1f1f1;
    }

    #collections-grid-container::-webkit-scrollbar {
        display: block !important;
        height: 6px;
    }

    #collections-grid-container::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
        margin-left: 40px;
        margin-right: 40px;
    }

    #collections-grid-container::-webkit-scrollbar-thumb {
        background: #cccccc;
        border-radius: 10px;
        transition: background 0.3s ease;
    }

    #collections-grid-container::-webkit-scrollbar-thumb:hover {
        background: #888888;
    }

    .collection-card-link:hover .collection-card-media img {
        transform: scale(1.04);
    }
}

/* Cartes de collection */
.collection-card {
    width: 380px !important;
    min-width: 380px !important;
    max-width: 380px !important;
    height: 500px !important;
    flex: 0 0 380px !important;
    scroll-snap-align: start;
    box-sizing: border-box;
    position: relative;
}

.collection-card-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
}

.collection-card-media {
    width: 100% !important;
    height: 100% !important;
    overflow: hidden;
    position: relative !important;
    background-color: #f0f0f0;
}

.collection-card-media img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
    transition: transform 0.4s ease;
}

.collection-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.collection-card-title {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    padding: 25px 15px 12px 15px !important;
    box-sizing: border-box !important;
    margin: 0;
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
    color: #000000;
    background: rgba(249, 246, 240, 0.4);
    backdrop-filter: blur(5px);
    transition: opacity 0.3s ease;
    z-index: 2;
}

.collection-card-media:hover .collection-card-title {
    opacity: 0;
}

.collection-card-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 20px;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    line-height: 1.6;
    background: rgba(249, 246, 240, 0.95);
    color: #000000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    pointer-events: auto;
    z-index: 3;
}

.collection-card-media:hover .collection-card-details {
    opacity: 1;
    visibility: visible;
}

.detail-line {
    margin: 4px 0;
}

.stock-status-badge {
    margin-top: 10px;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
}



/* ==========================================
   9. ADAPTATIONS RESPONSIVE (MOBILE & TABLETTE)
   ========================================== */
@media screen and (max-width: 767px)
{
    .carousel-btn {
        display: none !important;
    }

    .carousel-dots {
        bottom: calc(15px + env(safe-area-inset-bottom, 0px));
    }

    .video-mobile { display: none; }
    .video-desktop { display: block; }

    .product-item-body
    {
        padding-left: 0 !important;
        gap: 15px !important;
        flex-direction: column;
        align-items: flex-start;
    }

    .product-thumb-container {
    width: 100%;
    height: 220px; /* Donne une belle hauteur de présentation */
  }

    .product-details {
        flex: 1;
        min-width: 0;
        width: 100% !important;
    }

    .collection-hero-title h1
    {
    font-size: 1.4rem;
    }

    .custom-select-wrapper,
    .qty-picker {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .qty-picker {
        height: 48px;
    }

    .qty-picker button {
        height: 50px;
    }



    .custom-select-trigger {
    height: 48px;
    font-size: 12px;
    }
    .custom-option {
    padding: 16px;
    font-size: 13px;
    }


    #other-collections-header {
        padding: 15px;
    }

    #collections-grid-container {
        overflow-x: auto !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding: 15px !important;
        gap: 15px !important;
        height: auto !important;
        scrollbar-width: none !important;
    }

    #collections-grid-container::-webkit-scrollbar {
        display: none !important;
    }

    .collection-card {
        width: 85% !important;
        min-width: 85% !important;
        max-width: 85% !important;
        flex: 0 0 85% !important;
        height: 420px !important;
        scroll-snap-align: center !important;
    }

    .collection-card-link:hover .collection-card-media img {
        transform: none !important;
    }

    /* Affichage de l'overlay au survol (Desktop) ET au clic (Mobile via la classe .active) */
    .collection-card:hover .collection-card-overlay,
    .collection-card.active .collection-card-overlay {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    /* Style de base de l'overlay (masqué par défaut) */
    .collection-card-overlay {
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .bottom-action-bar {
        position: sticky;
        bottom: 0;
        z-index: 999;
        /* Ombre pour détacher le bouton quand il colle en bas */
        box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.12); 
    }   

    /* Espace de sécurité sous le bloc réassurance */
    #divreassurance-list {
        margin-bottom: 80px !important;
    }

}

@media (max-width: 600px) {
    .reassurance-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* 1. Utiliser 100dvh pour le fond noir */
#pure-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh; /* au lieu de 100vh */
    background-color: #000000;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2147483647;
    touch-action: pan-y;
    user-select: none;
    overflow: hidden;
}

/* 2. Ajuster le conteneur du slide */
.pure-modal-slide {
    min-width: 100vw;
    height: 100dvh; /* au lieu de 100vh */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    box-sizing: border-box;
    position: relative;
}

/* 3. Réduire max-height et ajouter box-sizing pour inclure les contrôles */
.pure-modal-slide img,
.pure-modal-slide video {
    max-width: 100%;
    max-height: calc(100dvh - 60px); /* Laisse de la place pour la barre de contrôle vidéo */
    object-fit: contain;
    border-radius: 4px;
}