/* ==========================================================================
   BULB PRODUCT CONFIGURATOR - FRONTEND CSS
   Faithful to Stitch MCP 1-Column Design (#000072 & #00DD78)
   ========================================================================== */

:root {
    --bsp-primary: #000072;
    --bsp-secondary: #00DD78;
    --bsp-text-dark: #191c1e;
    --bsp-text-muted: #64748b;
    --bsp-border-color: #e2e8f0;
    --bsp-bg-light: #f8fafc;
    --bsp-card-radius: 20px;
}

.bulb-stitch-product-page {
    width: 95% !important;
    max-width: 1700px !important;
    margin: 0 auto !important;
    padding: 24px 0 60px 0 !important;
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--bsp-text-dark);
    display: flex;
    flex-direction: column;
    gap: 40px;
    box-sizing: border-box;
}

@media (max-width: 991px) {
    .bulb-stitch-product-page {
        width: 96% !important;
    }
}

/* 1. Header */
.bsp-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bsp-header-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 768px) {
    .bsp-header-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.bsp-product-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--bsp-primary);
    margin: 0;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.bsp-trustpilot-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid var(--bsp-border-color);
    border-radius: 9999px;
    padding: 6px 16px;
    align-self: flex-start;
}

.bsp-star-icon {
    color: var(--bsp-secondary);
    font-size: 18px;
    font-weight: 900;
}

.bsp-trust-score {
    font-size: 13px;
    font-weight: 700;
    color: var(--bsp-primary);
}

.bsp-trust-count {
    font-size: 13px;
    color: var(--bsp-text-muted);
}

.bsp-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.bsp-mini-badge {
    background: var(--bsp-bg-light);
    border: 1px solid var(--bsp-border-color);
    border-radius: 9999px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
}

/* 2. Image Gallery */
.bsp-gallery-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bsp-main-image-window {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: var(--bsp-card-radius);
    overflow: hidden;
    border: 1px solid var(--bsp-border-color);
    background: var(--bsp-bg-light);
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.bsp-main-image-window img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.bsp-thumbnails-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.bsp-thumb-item {
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--bsp-border-color);
    cursor: pointer;
    background: var(--bsp-bg-light);
    transition: all 0.2s ease;
}

.bsp-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bsp-thumb-item:hover {
    border-color: #94a3b8;
}

.bsp-thumb-item.active {
    border-color: var(--bsp-primary) !important;
    box-shadow: 0 0 0 2px rgba(0, 0, 114, 0.2);
}

@media (min-width: 768px) {
    .bsp-gallery-section {
        flex-direction: row;
        align-items: stretch;
        gap: 20px;
        height: 650px;
    }
    .bsp-main-image-window {
        flex: 1;
        height: 100%;
        aspect-ratio: unset;
        min-height: unset;
    }
    .bsp-thumbnails-row {
        width: 155px;
        height: 100%;
        display: flex;
        flex-direction: column;
        gap: 12px;
        max-height: none;
        overflow: hidden;
        padding-right: 0;
    }
    .bsp-thumb-item {
        width: 100%;
        flex: 1;
        height: auto;
        aspect-ratio: unset;
        border-radius: 14px;
    }
}

/* 3. Description Section */
.bsp-description-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bsp-section-heading {
    font-size: 26px;
    font-weight: 700;
    color: var(--bsp-primary);
    margin: 0;
    letter-spacing: -0.01em;
}

.bsp-desc-content {
    font-size: 16px;
    line-height: 1.6;
    color: #475569;
}

.bsp-desc-content p {
    margin-top: 0;
    margin-bottom: 14px;
}

/* 4. Configurator & Sidebar 2-Col Layout */
.bsp-config-wrapper {
    display: flex;
    flex-direction: column;
    gap: 28px;
    align-items: stretch;
}

@media (min-width: 992px) {
    .bsp-config-wrapper {
        display: grid;
        grid-template-columns: 1fr 380px;
        gap: 32px;
        align-items: start;
    }
}

.bsp-configurator-card {
    background: #ffffff;
    border: 1px solid var(--bsp-border-color);
    border-radius: 24px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.bsp-config-heading {
    font-size: 22px;
    font-weight: 800;
    color: var(--bsp-primary);
    margin: 0;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.bsp-form-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bsp-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--bsp-primary);
}

.bsp-formats-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.bsp-pill-btn {
    padding: 10px 20px;
    border-radius: 9999px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bsp-pill-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.bsp-pill-btn.selected {
    background: var(--bsp-primary);
    border-color: var(--bsp-primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 114, 0.25);
}

.bsp-custom-dim-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    background: var(--bsp-bg-light);
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--bsp-border-color);
}

.bsp-dim-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bsp-dim-field label {
    font-size: 12px;
    font-weight: 700;
    color: var(--bsp-text-muted);
}

.bsp-dim-field input {
    width: 100%;
    padding: 10px 16px;
    border-radius: 9999px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    font-size: 14px;
    font-weight: 700;
    color: var(--bsp-primary);
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease;
}

.bsp-dim-field input:focus {
    border-color: var(--bsp-primary);
}

.bsp-dim-cross {
    font-size: 20px;
    font-weight: 800;
    color: #94a3b8;
    margin-top: 20px;
}

.bsp-segmented-controls {
    display: inline-flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 9999px;
    gap: 4px;
    width: fit-content;
    max-width: 100%;
    flex-wrap: wrap;
}

.bsp-seg-btn {
    padding: 8px 20px;
    border-radius: 9999px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bsp-seg-btn:hover {
    color: var(--bsp-primary);
}

.bsp-seg-btn.selected {
    background: var(--bsp-primary) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 114, 0.25) !important;
}

.bsp-toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bsp-toggle-status {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.bsp-sub-options {
    margin-top: 10px;
}

.bsc-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
}

.bsc-switch input { display: none; }

.bsc-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 34px;
}

.bsc-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

.bsc-switch input:checked + .bsc-slider {
    background-color: var(--bsp-secondary);
}

.bsc-switch input:checked + .bsc-slider:before {
    transform: translateX(20px);
}

/* Stepper Quantité */
.bsp-quantity-clean-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.bsp-quantity-stepper-clean {
    display: inline-flex;
    align-items: center;
    width: 200px;
    height: 48px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
}

.bsp-quantity-stepper-clean:focus-within {
    border-color: var(--bsp-primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 114, 0.12);
}

.bsp-qty-step-btn {
    width: 48px;
    height: 100%;
    border: none;
    background: var(--bsp-bg-light);
    color: var(--bsp-primary);
    font-size: 20px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.bsp-qty-step-btn:hover {
    background: var(--bsp-primary);
    color: #ffffff;
}

.bsp-qty-step-btn:active {
    background: #000050;
}

.bsp-qty-number-clean {
    flex: 1;
    width: 100%;
    height: 100%;
    border: none;
    text-align: center;
    font-size: 18px;
    font-weight: 800;
    color: var(--bsp-primary);
    outline: none;
    background: transparent;
    padding: 0;
    -moz-appearance: textfield;
}

.bsp-qty-number-clean::-webkit-outer-spin-button,
.bsp-qty-number-clean::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.bsp-quantity-hint {
    font-size: 13px;
    color: var(--bsp-text-muted);
    font-weight: 500;
}

/* Grille des délais */
.bsp-delays-grid-3cols {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 640px) {
    .bsp-delays-grid-3cols {
        grid-template-columns: repeat(3, 1fr);
    }
}

.bsp-delay-card {
    border: 2px solid var(--bsp-border-color);
    background: #ffffff;
    border-radius: 16px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.bsp-delay-card:hover {
    border-color: #94a3b8;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}

.bsp-delay-card.selected {
    border: 2px solid var(--bsp-primary) !important;
    background: #f8faff !important;
    box-shadow: 0 4px 16px rgba(0, 0, 114, 0.08) !important;
}

.bsp-delay-name {
    font-size: 16px;
    font-weight: 800;
    color: var(--bsp-primary);
}

.bsp-delay-time {
    font-size: 13px;
    color: var(--bsp-text-muted);
    font-weight: 500;
}

.bsp-delay-check {
    font-size: 11px;
    font-weight: 700;
    color: #008744;
    background: #e6fcf0;
    padding: 3px 10px;
    border-radius: 9999px;
    width: fit-content;
    margin-top: 6px;
    display: inline-block;
}

.bsp-delay-card.selected .bsp-delay-check {
    background: var(--bsp-primary);
    color: var(--bsp-secondary);
}

/* 5. Colonne Droite : Specs Minimalistes & Récapitulatif */
.bsp-recap-sidebar {
    position: relative;
    width: 100%;
}

@media (min-width: 992px) {
    .bsp-sidebar-sticky-wrap {
        position: sticky;
        top: 85px;
    }
}

.bsp-specs-minimal-card {
    background: #ffffff;
    border: 1px solid var(--bsp-border-color);
    border-radius: 18px;
    padding: 18px 22px;
    margin-bottom: 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.bsp-specs-minimal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
}

.bsp-specs-minimal-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bsp-primary);
}

.bsp-specs-minimal-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.bsp-spec-min-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    font-size: 13px;
    border-bottom: 1px solid #f8fafc;
}

.bsp-spec-min-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.bsp-spec-min-label {
    color: var(--bsp-text-muted);
    font-weight: 500;
    font-size: 12.5px;
}

.bsp-spec-min-val {
    font-weight: 700;
    color: var(--bsp-primary);
    text-align: right;
    font-size: 13px;
}

.bsp-leaf-icon {
    margin-left: 4px;
    font-size: 15px;
    display: inline-block;
    vertical-align: middle;
}

.bsp-recap-sticky-card {
    background: #ffffff;
    border: 2px solid var(--bsp-primary);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 10px 40px rgba(0, 0, 114, 0.08);
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-sizing: border-box;
}

.bsp-recap-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 14px;
}

.bsp-recap-badge {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--bsp-secondary);
    background: var(--bsp-primary);
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    width: fit-content;
}

.bsp-recap-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--bsp-primary);
    margin: 0;
}

.bsp-recap-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bsp-recap-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-size: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
    gap: 12px;
}

.bsp-recap-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.bsp-recap-label {
    color: var(--bsp-text-muted);
    font-weight: 600;
}

.bsp-recap-val {
    color: var(--bsp-primary);
    font-weight: 700;
    text-align: right;
}

.bsp-recap-cta-wrap {
    margin-top: 6px;
}

.bsp-full-width-btn {
    width: 100% !important;
    padding: 16px 20px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.bsp-btn-neon {
    background: var(--bsp-secondary) !important;
    color: var(--bsp-primary) !important;
    border: none;
    border-radius: 9999px;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 221, 120, 0.4);
    transition: all 0.25s ease;
    gap: 10px;
    text-decoration: none;
}

.bsp-btn-neon:hover {
    background: #00f585 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 221, 120, 0.6);
}

.bsp-recap-trust-points {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    background: var(--bsp-bg-light);
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--bsp-border-color);
}

.bsp-trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 6. Produits complémentaires */
.bsp-related-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--bsp-border-color);
}

.bsp-related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

@media (min-width: 768px) {
    .bsp-related-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.bsp-related-card {
    background: #ffffff;
    border: 1px solid var(--bsp-border-color);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
}

.bsp-related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}

.bsp-related-img-wrap {
    aspect-ratio: 1 / 1;
    background: var(--bsp-bg-light);
    overflow: hidden;
}

.bsp-related-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.bsp-related-card:hover .bsp-related-img-wrap img {
    transform: scale(1.05);
}

.bsp-related-title {
    padding: 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--bsp-primary);
    text-align: center;
}

/* 7. Formulaire de Devis */
.bsp-contact-section {
    width: 100%;
    animation: bspFadeIn 0.3s ease-out;
}

@keyframes bspFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.bsp-contact-card {
    background: #ffffff;
    border: 2px solid var(--bsp-primary);
    border-radius: 24px;
    padding: 36px;
    box-shadow: 0 10px 40px rgba(0, 0, 114, 0.08);
}

.bsp-contact-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.bsp-contact-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--bsp-primary);
    margin: 0 0 6px 0;
}

.bsp-contact-subtitle {
    font-size: 14px;
    color: var(--bsp-text-muted);
    margin: 0;
}

.bsp-form-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

@media (min-width: 768px) {
    .bsp-form-grid-2 {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

.bsp-field-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bsp-field-box label {
    font-size: 13px;
    font-weight: 700;
    color: var(--bsp-primary);
}

.bsp-input {
    width: 100%;
    padding: 12px 18px;
    border-radius: 9999px;
    border: 1px solid #cbd5e1;
    background: var(--bsp-bg-light);
    font-size: 14px;
    color: #1e293b;
    box-sizing: border-box;
    outline: none;
    transition: all 0.2s ease;
}

.bsp-input:focus {
    background: #ffffff;
    border-color: var(--bsp-primary);
    box-shadow: 0 0 0 3px rgba(0, 0, 114, 0.1);
}

.bsp-rgpd-notice {
    font-size: 12px;
    color: var(--bsp-text-muted);
    line-height: 1.5;
    margin-top: 12px;
    margin-bottom: 20px;
}

.bsp-alert {
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.bsp-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.bsp-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.bsp-submit-row {
    display: flex;
    justify-content: flex-end;
}
