/* ============================================================
   Fiche produit custom – Eau & Plaisir
   ============================================================ */

:root {
    --ep-primary:   #004a99;
    --ep-secondary: #002d5d;
    --ep-accent:    #00c2ff;
    --ep-text:      #1e293b;
    --ep-muted:     #64748b;
    --ep-light:     #f0f7ff;
    --ep-border:    #e2e8f0;
}

/* ── Fond blanc sur la fiche produit (override thème dark) ── */
body.single-product #main,
body.single-product .site-main {
    background-color: #fff !important;
    color: var(--ep-text) !important;
}

/* Texte sombre global dans la fiche */
.ep-sp,
.ep-sp p,
.ep-sp span:not(.ep-sp-badge),
.ep-sp li,
.ep-sp td,
.ep-sp th {
    color: var(--ep-text) !important;
}

/* ── Conteneur ── */
.ep-sp {
    max-width: 1280px;
    margin: 0 auto;
    padding: 150px 1.5rem 5rem;
    background: #fff;
}

.ep-sp-breadcrumb {
    margin-bottom: 2rem;
}

/* ── Grille 2 colonnes ── */
.ep-sp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

/* ════════════════════════════
   GALERIE
   ════════════════════════════ */
.ep-sp-main-img {
    border-radius: 2rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .2);
    background: #f8fafc;
}

.ep-sp-main-img img,
.ep-main-img-el {
    width: 100%;
    height: 560px;
    object-fit: cover;
    display: block;
    transition: opacity .2s ease;
}

.ep-sp-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 1.25rem;
}

.ep-sp-thumb {
    border-radius: 1rem;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    background: none;
    transition: border-color .2s;
    height: auto !important;
    display: block !important;
}

.ep-sp-thumb img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.ep-sp-thumb.active,
.ep-sp-thumb:hover {
    border-color: var(--ep-primary);
}

/* ════════════════════════════
   RÉSUMÉ
   ════════════════════════════ */
.ep-sp-summary {
    position: sticky;
    top: 120px;
}

/* Badge + étoiles */
.ep-sp-top-meta {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .75rem;
    flex-wrap: wrap;
}

.ep-sp-badge {
    background: linear-gradient(135deg, var(--ep-secondary), var(--ep-primary));
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    padding: .3rem .85rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.ep-sp-rating .star-rating { font-size: .9rem; }

/* Titre */
.ep-sp-title {
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 900;
    color: var(--ep-secondary);
    letter-spacing: -.03em;
    line-height: 1.05;
    margin: 0 0 1rem;
    text-transform: uppercase;
}

/* Description courte */
.ep-sp-excerpt {
    color: var(--ep-muted);
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: 2rem;
}

/* ── Attributs / Variations ── */
.ep-sp-attr {
    margin-bottom: 1.5rem;
}

.ep-sp-attr-label {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--ep-muted);
    margin-bottom: .75rem;
}

.ep-sp-cards {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.ep-sp-card {
    border: 2px solid var(--ep-border);
    border-radius: 1rem;
    padding: .65rem 1.25rem;
    background: #fff;
    cursor: pointer;
    font-size: .875rem;
    font-weight: 700;
    color: var(--ep-text);
    font-family: inherit;
    transition: border-color .2s, background .2s, color .2s;
    line-height: 1.4;
    text-align: left;
}

.ep-sp-card:hover {
    border-color: var(--ep-primary);
    color: var(--ep-primary);
}

.ep-sp-card.active {
    border-color: var(--ep-primary);
    background: var(--ep-light);
    color: var(--ep-primary);
}

/* ── Bloc CTA (fond navy) ── */
.ep-sp-cta-box {
    background: var(--ep-secondary);
    border-radius: 2rem;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 20px 40px -10px rgba(0, 45, 93, .5);
}

.ep-sp-cta-top {
    margin-bottom: 1.5rem;
}

.ep-sp-price-label {
    color: #93c5fd;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: .25rem;
}

/* Ligne prix + badge promo */
.ep-sp-cta-price-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Prix WooCommerce dans le bloc navy */
.ep-sp-price,
.ep-sp-cta-box .price {
    font-size: 2.5rem;
    font-weight: 900;
    color: #fff;
    line-height: 1.1;
}

.ep-sp-price-ttc {
    font-size: 1.1rem;
    font-weight: 600;
    color: #93c5fd;
}

/* Badge promo (ex: PROMO POSE OFFERTE) */
.ep-sp-promo-badge {
    background: transparent;
    border: 1.5px solid rgba(255,255,255,.4);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: .35rem .75rem;
    border-radius: 999px;
    white-space: nowrap;
}

.ep-sp-cta-box .price .amount,
.ep-sp-price .amount {
    color: #fff !important;
}

.ep-sp-cta-box .price ins,
.ep-sp-cta-box .price del,
.ep-sp-cta-box .price .woocommerce-Price-currencySymbol {
    color: #93c5fd;
    font-size: 1.1rem;
    font-weight: 400;
}

/* Bouton principal */
.ep-sp-cta-btn {
    width: 100%;
    background: var(--ep-accent);
    color: #fff;
    border: none;
    border-radius: .875rem;
    padding: 1.1rem 1.5rem;
    font-size: .9rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    transition: background .2s, color .2s;
    font-family: inherit;
}

.ep-sp-cta-btn svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.ep-sp-cta-btn:hover {
    background: #fff;
    color: var(--ep-secondary);
}

.ep-sp-cta-btn.open {
    background: rgba(255, 255, 255, .15);
}

.ep-sp-cta-btn.open:hover {
    background: rgba(255, 255, 255, .25);
    color: #fff;
}

/* Mention sous le bouton */
.ep-sp-cta-note {
    text-align: center;
    color: #93c5fd;
    font-size: .6rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin: .75rem 0 0;
}

/* Add to cart WC standard (produits sans devis) */
.ep-sp-cta-box .cart .button,
.ep-sp-cta-box .single_add_to_cart_button {
    width: 100% !important;
    background: var(--ep-accent) !important;
    color: #fff !important;
    border: none !important;
    border-radius: .875rem !important;
    padding: 1.1rem !important;
    font-size: .9rem !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: .06em !important;
}

/* ── Formulaire devis (toggle) ── */
.ep-sp-form-wrap {
    margin-top: 1.5rem;
    background: #fff;
    border-radius: 1.25rem;
    padding: 1.75rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .07);
    animation: epFadeDown .3s ease;
}

.ep-sp-form-wrap[hidden] {
    display: none !important;
}

@keyframes epFadeDown {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Intégration du form plugin dans la fiche */
.ep-sp-form-wrap .ep-quote-form-wrap {
    background: transparent;
    padding: 0;
    box-shadow: none;
}

/* Force les couleurs sombres dans le form (le thème dark hérite son blanc partout) */
.ep-sp-form-wrap,
.ep-sp-form-wrap h1,
.ep-sp-form-wrap h2,
.ep-sp-form-wrap h3,
.ep-sp-form-wrap p,
.ep-sp-form-wrap label,
.ep-sp-form-wrap span,
.ep-sp-form-wrap div {
    color: #1e293b !important;
}

.ep-sp-form-wrap input,
.ep-sp-form-wrap textarea,
.ep-sp-form-wrap select {
    color: #1e293b !important;
    background: #fff !important;
    border-color: #cbd5e1 !important;
}

.ep-sp-form-wrap input::placeholder,
.ep-sp-form-wrap textarea::placeholder {
    color: #94a3b8 !important;
}

.ep-sp-form-wrap .ep-submit-btn {
    background: var(--ep-primary) !important;
    color: #fff !important;
    width: 100%;
}

.ep-sp-form-wrap .ep-form-intro,
.ep-sp-form-wrap .ep-form-intro * {
    color: #1e293b !important;
}

/* ════════════════════════════
   SECTION SPECS TECHNIQUES
   ════════════════════════════ */
.ep-sp-specs {
    margin-top: 5rem;
    padding-top: 3.5rem;
    border-top: 1px solid var(--ep-border);
}

.ep-sp-specs-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 900;
    color: var(--ep-secondary);
    text-transform: uppercase;
    letter-spacing: -.02em;
    margin-bottom: 3rem;
}

/* Si la description contient des blocs WP (colonnes, groupes), on laisse WP gérer.
   Sinon on applique une grille 3 colonnes sur les <p> ou <div> directs. */
.ep-sp-specs-content > p,
.ep-sp-specs-content > div:not([class]) {
    /* pas de style forcé - laisser le thème */
}

/* Grille 3 colonnes si l'utilisateur structure avec des blocs WP columns */
.ep-sp-specs-content .wp-block-columns {
    gap: 3rem;
}

/* ════════════════════════════
   ÉQUIPEMENTS INCLUS (liste dans résumé)
   ════════════════════════════ */
.ep-sp-eq-list {
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.ep-sp-eq-item {
    display: flex;
    align-items: center;
    gap: .875rem;
    background: var(--ep-light);
    border-radius: 1rem;
    padding: .875rem 1.125rem;
}

.ep-sp-eq-emoji {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.ep-sp-eq-title {
    font-weight: 700;
    font-size: .9rem;
    color: var(--ep-text);
}

.ep-sp-eq-subtitle {
    font-size: .8rem;
    color: var(--ep-muted);
    margin-top: .15rem;
}

/* Grille 3 colonnes pour les cartes specs */
.ep-sp-specs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 900px) {
    .ep-sp-specs-grid {
        grid-template-columns: 1fr;
    }
}

/* Style des cartes numérotées si on utilise le pattern 01/02/03 */
.ep-sp-spec-card {
    background: #fff;
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}

.ep-sp-spec-num {
    width: 3rem;
    height: 3rem;
    background: var(--ep-light);
    border-radius: .75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ep-primary);
    font-weight: 700;
    font-size: .9rem;
    margin-bottom: 1rem;
}

/* ════════════════════════════
   RESPONSIVE
   ════════════════════════════ */
@media (max-width: 1024px) {
    .ep-sp-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .ep-sp-summary {
        position: static;
    }

    .ep-sp-main-img img,
    .ep-main-img-el {
        height: 420px;
    }
}

@media (max-width: 640px) {
    .ep-sp {
        padding: 1rem 1rem 3rem;
    }

    .ep-sp-main-img img,
    .ep-main-img-el {
        height: 280px;
    }

    .ep-sp-thumbs {
        grid-template-columns: repeat(4, 1fr);
        gap: .5rem;
    }

    .ep-sp-thumb img {
        height: 90px;
    }

    .ep-sp-cta-box {
        padding: 1.5rem;
    }
}
