/**
 * Serres Privées — Styles
 * v3.0.0
 */

/* ── Variables ──────────────────────────────────────────────────────────────── */
:root {
    --sp-vert:         #2d6a4f;
    --sp-vert-clair:   #52b788;
    --sp-rouge:        #e63946;
    --sp-orange:       #e67e22;
    --sp-texte:        #2c3e50;
    --sp-texte-doux:   #6b7280;
    --sp-fond-carte:   #ffffff;
    --sp-bordure:      #e5e7eb;
    --sp-radius:       12px;
    --sp-shadow:       0 2px 12px rgba(0, 0, 0, 0.07);
    --sp-shadow-hover: 0 8px 28px rgba(0, 0, 0, 0.13);
    --sp-transition:   0.25s ease;
}

/* ── Container ──────────────────────────────────────────────────────────────── */
.serres-privees-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

/* ── En-tête ─────────────────────────────────────────────────────────────────── */
.serres-privees-header {
    text-align: center;
    margin-bottom: 56px;
}

.serres-privees-logo {
    margin-bottom: 24px;
}

.sp-logo {
    height: 56px;
    width: auto;
    display: inline-block;
}

.serres-tagline-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--sp-vert);
    background: #f0faf4;
    border: 1px solid #c3e6d0;
    border-radius: 20px;
    padding: 4px 14px;
    margin: 0 0 14px;
}

.serres-titre {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    color: var(--sp-texte);
    margin: 0 0 20px;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.serres-privees-slogan {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
}

.slogan-principal {
    font-size: clamp(1.6rem, 3.5vw, 2.6rem);
    font-weight: 800;
    color: var(--sp-vert);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.slogan-secondaire {
    font-size: clamp(1rem, 2vw, 1.35rem);
    font-weight: 500;
    color: var(--sp-texte-doux);
    font-style: italic;
}

.serres-privees-description {
    font-size: 1.05rem;
    color: var(--sp-texte-doux);
    max-width: 640px;
    margin: 0 auto 40px;
    line-height: 1.75;
}

/* ── Cards de réassurance ────────────────────────────────────────────────────── */
.serres-privees-reassurance {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 860px;
    margin: 0 auto;
}

.reassurance-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #f8faf8;
    border: 1px solid #ddeedd;
    border-radius: 10px;
    padding: 18px 20px;
    flex: 1;
    min-width: 220px;
    max-width: 280px;
    text-align: left;
}

.reassurance-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
    line-height: 1;
}

.reassurance-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reassurance-content strong {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--sp-texte);
}

.reassurance-content span {
    font-size: 0.82rem;
    color: var(--sp-texte-doux);
    line-height: 1.4;
}

/* ── Grille ──────────────────────────────────────────────────────────────────── */
.serres-privees-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 28px;
    margin-bottom: 72px;
}

/* ── Carte plante ────────────────────────────────────────────────────────────── */
.plante-card {
    background: var(--sp-fond-carte);
    border: 1px solid var(--sp-bordure);
    border-radius: var(--sp-radius);
    overflow: hidden;
    box-shadow: var(--sp-shadow);
    transition: transform var(--sp-transition), box-shadow var(--sp-transition);
}

.plante-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sp-shadow-hover);
}

/* ── Photo ───────────────────────────────────────────────────────────────────── */
.plante-photo {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    background: #fff;
}

.plante-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity var(--sp-transition);
}

/* ── Photos : scroll-snap natif (mobile swipe + desktop hover) ─────────────── */

/* Track scroll-snap : les deux photos côte à côte, scroll natif */
.plante-photo.has-second-photo .sp-slider-track {
    position: absolute;
    inset: 0;
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.plante-photo.has-second-photo .sp-slider-track::-webkit-scrollbar {
    display: none;
}

.plante-photo.has-second-photo .photo-principale,
.plante-photo.has-second-photo .photo-secondaire {
    position: relative;
    inset: auto;
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    scroll-snap-align: start;
    opacity: 1;
    transition: none;
}

/* Dots */
.sp-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
    pointer-events: none;
}

.sp-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: 1px solid rgba(0,0,0,0.2);
    transition: background 0.2s;
}

.sp-dot.active {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Desktop : hover scrolle vers la photo 2 via JS */
/* Pas de CSS hover opacity — le scroll gère tout */

/* ─────────────────────────────────────────────────────────────────────────── */

.photo-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #9ca3af;
}

/* ── Badge grande plante ─────────────────────────────────────────────────────── */
.badge-emballage {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--sp-orange);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.01em;
}

/* ── Informations ────────────────────────────────────────────────────────────── */
.plante-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.plante-nom {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--sp-texte);
    margin: 0;
    line-height: 1.3;
}

.plante-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.plante-detail {
    font-size: 0.88rem;
    color: var(--sp-texte-doux);
}

.plante-detail-emballage {
    color: var(--sp-orange) !important;
    font-weight: 600;
}

.plante-description {
    font-size: 0.88rem;
    color: #9ca3af;
    font-style: italic;
    margin: 0;
    line-height: 1.5;
}

/* ── Prix ────────────────────────────────────────────────────────────────────── */
.plante-prix {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: 4px;
}

.prix-actuel {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--sp-texte);
}

.prix-promo {
    color: var(--sp-rouge);
}

.prix-barre {
    font-size: 1rem !important;
    font-weight: 400 !important;
    color: #9ca3af !important;
    text-decoration: line-through !important;
    opacity: 1 !important;
}

/* ── Bouton ──────────────────────────────────────────────────────────────────── */
.btn-ajouter-panier {
    display: block;
    width: 100%;
    padding: 13px 16px;
    margin-top: 4px;
    background: var(--sp-vert);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.01em;
    transition: background var(--sp-transition), transform 0.1s ease;
}

.btn-ajouter-panier:hover:not(:disabled) {
    background: var(--sp-vert-clair);
}

.btn-ajouter-panier:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-ajouter-panier:disabled {
    cursor: not-allowed;
    opacity: 0.75;
}

/* Masquer le lien "Voir le panier" injecté par WooCommerce */
.added_to_cart.wc-forward {
    display: none !important;
}

/* ── Message d'erreur inline ─────────────────────────────────────────────────── */
.plante-erreur {
    font-size: 0.85rem;
    color: var(--sp-rouge);
    margin: 6px 0 0;
    min-height: 1.2em;
    text-align: center;
}

/* ── Message vide ────────────────────────────────────────────────────────────── */
.serres-privees-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    font-size: 1.1rem;
    color: var(--sp-texte-doux);
}

/* ── FAQ ─────────────────────────────────────────────────────────────────────── */
.serres-privees-faq {
    max-width: 780px;
    margin: 0 auto;
}

.faq-titre {
    font-size: clamp(1.3rem, 2.5vw, 1.75rem);
    font-weight: 700;
    color: var(--sp-texte);
    text-align: center;
    margin: 0 0 32px;
}

.faq-liste {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.faq-item {
    border: 1px solid var(--sp-bordure);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--sp-texte);
    transition: background var(--sp-transition);
}

.faq-question:hover {
    background: #f8faf8;
}

.faq-chevron {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--sp-texte-doux);
    transition: transform var(--sp-transition);
}

.faq-item.open .faq-chevron {
    transform: rotate(180deg);
}

.faq-reponse {
    padding: 12px 20px 18px;
    font-size: 0.9rem;
    color: var(--sp-texte-doux);
    line-height: 1.7;
}

.faq-reponse p {
    margin: 0;
}

/* ── Modal popup ─────────────────────────────────────────────────────────────── */
.sp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: sp-fade-in 0.2s ease;
}

.sp-modal-overlay[hidden] {
    display: none;
}

@keyframes sp-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.sp-modal {
    background: #fff;
    border-radius: 16px;
    padding: 36px 32px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: sp-modal-in 0.25s ease;
}

@keyframes sp-modal-in {
    from { transform: scale(0.92); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

.sp-modal-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    line-height: 1;
}

.sp-modal-message {
    font-size: 1rem;
    color: var(--sp-texte);
    line-height: 1.65;
    margin: 0 0 24px;
}

.sp-modal-btn {
    display: inline-block;
    padding: 12px 32px;
    background: var(--sp-vert);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--sp-transition);
}

.sp-modal-btn:hover {
    background: var(--sp-vert-clair);
}

.sp-modal-close-link {
    display: block;
    margin: 14px auto 0;
    font-size: 0.85rem;
    color: var(--sp-texte-doux);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    background: none;
    border: none;
    padding: 0;
    text-align: center;
    width: fit-content;
}

.sp-modal-close-link:hover {
    color: var(--sp-texte);
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .serres-privees-container {
        padding: 32px 16px 56px;
    }

    .serres-privees-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .serres-privees-reassurance {
        flex-direction: column;
        align-items: center;
    }

    .reassurance-card {
        max-width: 100%;
        width: 100%;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .serres-privees-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* ── Encadré informatif supplément grandes plantes ──────────────────────────── */
.sp-supplement-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 20px auto 0;
    padding: 16px 20px;
    max-width: 680px;
    background: #f0faf4;
    border: 1px solid #c3e6d0;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #2d6a4f;
    line-height: 1.6;
}

.sp-supplement-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.sp-supplement-info p {
    margin: 0;
}

.sp-supplement-info strong {
    color: #1a4a35;
}