/* ============================================
   DYNAMIC WOO PRICING - FRONTEND STYLES
   Charte graphique : #089944 (vert) / #006633 (vert foncé)
   ============================================ */

/* --- VARIABLES CSS --- */
:root {
    --dwp-primary: #089944;
    --dwp-primary-dark: #006633;
    --dwp-primary-light: #0ab352;
    --dwp-success: #089944;
    --dwp-error: #dc2626;
    --dwp-border: #e5e7eb;
    --dwp-bg-light: #f9fafb;
    --dwp-text-dark: #111827;
    --dwp-text-gray: #6b7280;
    --dwp-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --dwp-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --dwp-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --dwp-radius: 8px;
    --dwp-transition: all 0.2s ease;
}

/* --- INSTRUCTIONS ET MESSAGES --- */
.dwp-instruction-text {
    font-size: 14px;
    color: var(--dwp-text-gray);
    margin: 8px 0 12px 0;
    font-style: italic;
    line-height: 1.5;
}

/* --- SECTIONS DÉSACTIVÉES --- */
.dwp-step-disabled {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin: 0 !important;
    padding: 0 !important;
    transition: all 0.4s ease;
}

/* Section visible/activée */
.dwp-formule-selector-wrapper,
.dwp-concentration-selector-wrapper:not(.dwp-step-disabled),
.dwp-quantity-selector-wrapper:not(.dwp-step-disabled) {
    max-height: 2000px;
    opacity: 1;
    margin-bottom: 20px !important;
    transition: all 0.4s ease;
}

/* Animation d'ouverture */
@keyframes slideDown {
    from {
        max-height: 0;
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        max-height: 2000px;
        opacity: 1;
        transform: translateY(0);
    }
}

.dwp-concentration-selector-wrapper:not(.dwp-step-disabled),
.dwp-quantity-selector-wrapper:not(.dwp-step-disabled) {
    animation: slideDown 0.4s ease forwards;
}


/* --- WRAPPER PRINCIPAL --- */
.dwp-custom-selectors-wrapper {
    margin: 24px 0;
    padding: 24px;
    background: white;
    border-radius: var(--dwp-radius);
    border: 2px solid var(--dwp-border);
    box-shadow: var(--dwp-shadow);
}

/* --- CACHER LES ÉLÉMENTS WOOCOMMERCE --- */
body.dwp-pricing-active.single-product .variations,
body.dwp-pricing-active.single-product form.cart table.variations,
body.dwp-pricing-active.single-product .variations_form table.variations,
body.dwp-pricing-active.single-product form.cart select[name^="attribute_"],
body.dwp-pricing-active.single-product form.cart div.quantity,
body.dwp-pricing-active.single-product .woocommerce-variation-price,
body.dwp-pricing-active.single-product .woocommerce-variation .price,
body.dwp-pricing-active.single-product .woocommerce-variation-description,
body.dwp-pricing-active.single-product .reset_variations {
    display: none !important;
}

/* --- BOUTON RÉINITIALISER --- */
.dwp-reset-button-wrapper {
    margin: 20px 0 !important;
}

.dwp-reset-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--dwp-error);
    color: white;
    border: none;
    border-radius: var(--dwp-radius);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--dwp-transition);
    box-shadow: var(--dwp-shadow);
    width: 100%;
    max-width: 100%;
    justify-content: center;
}

.dwp-reset-button:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: var(--dwp-shadow-md);
}

.dwp-reset-button:active {
    transform: translateY(0);
}

.dwp-reset-button span {
    display: inline-block;
    transition: transform 0.3s ease;
}

.dwp-reset-button:hover span {
    transform: rotate(180deg);
}

/* --- SIMULATEUR DE REVENTE --- */
.dwp-resale-simulator {
    animation: slideIn 0.3s ease-out;
}

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

/* --- SLIDER COEFFICIENT --- */
.dwp-coefficient-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: linear-gradient(to right, var(--dwp-primary-light), var(--dwp-primary-dark));
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.dwp-coefficient-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: white;
    border: 3px solid var(--dwp-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--dwp-shadow-md);
    transition: var(--dwp-transition);
}

.dwp-coefficient-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 8px rgba(8, 153, 68, 0.3);
}

.dwp-coefficient-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: white;
    border: 3px solid var(--dwp-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--dwp-shadow-md);
    transition: var(--dwp-transition);
}

.dwp-coefficient-slider::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 8px rgba(8, 153, 68, 0.3);
}

/* --- LABELS D'ATTRIBUTS --- */
.dwp-attribute-label {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--dwp-text-dark);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

/* --- SÉLECTEUR D'ATTRIBUTS --- */
.dwp-attribute-selector {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* --- OPTIONS D'ATTRIBUTS (BOUTONS) --- */
.dwp-attribute-option {
    position: relative;
    padding: 12px 20px;
    border: 2px solid var(--dwp-border);
    background: white;
    cursor: pointer;
    border-radius: var(--dwp-radius);
    font-size: 14px;
    font-weight: 600;
    transition: var(--dwp-transition);
    min-width: 100px;
    text-align: center;
    color: var(--dwp-text-dark);
    box-shadow: var(--dwp-shadow);
}

.dwp-attribute-option:hover {
    border-color: var(--dwp-primary);
    transform: translateY(-2px);
    box-shadow: var(--dwp-shadow-md);
    background: var(--dwp-bg-light);
}

/* État sélectionné */
.dwp-attribute-option.selected {
    border-color: var(--dwp-primary);
    background: var(--dwp-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(8, 153, 68, 0.3);
}

.dwp-attribute-option.selected:hover {
    background: var(--dwp-primary-dark);
    border-color: var(--dwp-primary-dark);
}

/* Inputs radio cachés */
.dwp-attribute-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.dwp-attribute-option:has(input:checked) {
    border-color: var(--dwp-primary);
    background: var(--dwp-primary);
    color: white;
}

/* Options désactivées */
.dwp-attribute-option.dwp-option-disabled {
    display: none !important;
}


/* --- SÉLECTEUR DE QUANTITÉ --- */
.dwp-quantity-selector-wrapper {
    margin: 24px 0;
    padding: 24px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: var(--dwp-radius);
    border: 2px solid var(--dwp-primary-light);
    box-shadow: var(--dwp-shadow);
}

.dwp-quantity-label {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--dwp-text-dark);
    margin-bottom: 16px;
    text-align: center;
    letter-spacing: -0.01em;
}

.dwp-quantity-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    max-width: 240px;
    margin: 0 auto;
    box-shadow: var(--dwp-shadow-md);
    border-radius: var(--dwp-radius);
    overflow: hidden;
}

.dwp-quantity-btn {
    width: 60px;
    height: 60px;
    border: none;
    background: white;
    color: var(--dwp-primary);
    font-size: 28px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--dwp-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.dwp-quantity-minus {
    border-radius: var(--dwp-radius) 0 0 var(--dwp-radius);
}

.dwp-quantity-plus {
    border-radius: 0 var(--dwp-radius) var(--dwp-radius) 0;
}

.dwp-quantity-btn:hover:not(:disabled) {
    background: var(--dwp-primary);
    color: white;
    transform: scale(1.05);
}

.dwp-quantity-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.dwp-quantity-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.dwp-quantity-display {
    min-width: 120px;
    height: 60px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 20px;
    font-weight: 600;
    color: var(--dwp-text-dark);
    border-left: 1px solid var(--dwp-border);
    border-right: 1px solid var(--dwp-border);
}

.dwp-quantity-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--dwp-primary-dark);
}

.dwp-quantity-unit {
    font-size: 18px;
    font-weight: 600;
    color: var(--dwp-text-gray);
}

.dwp-quantity-info {
    text-align: center;
    font-size: 13px;
    color: var(--dwp-text-gray);
    margin-top: 12px;
    font-style: italic;
}

/* --- AFFICHAGE DU POIDS --- */
.dwp-weight-wrapper {
    margin: 20px 0;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: var(--dwp-radius);
    border-left: 4px solid var(--dwp-primary);
    box-shadow: var(--dwp-shadow);
    /* Caché par défaut */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin: 0;
    padding: 0;
    transition: all 0.4s ease;
}

/* Afficher le poids quand la quantité est active */
.dwp-quantity-selector-wrapper:not(.dwp-step-disabled) ~ .dwp-weight-wrapper {
    max-height: 200px;
    opacity: 1;
    margin: 20px 0;
    padding: 16px 20px;
    animation: slideDown 0.4s ease forwards;
}

.dwp-weight-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.dwp-weight-label {
    font-weight: 600;
    color: var(--dwp-text-dark);
    font-size: 16px;
}

.dwp-weight-amount {
    font-size: 24px;
    font-weight: 800;
    color: var(--dwp-primary-dark);
}


/* --- AFFICHAGE DU PRIX CALCULÉ --- */
.dwp-calculated-price-wrapper {
    border: 3px solid var(--dwp-primary);
    border-radius: var(--dwp-radius);
    padding: 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
    margin: 24px 0;
    box-shadow: var(--dwp-shadow-lg);
    position: relative;
    overflow: hidden;
    /* Caché par défaut */
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
    border-width: 0;
    transition: all 0.4s ease;
}

/* Afficher le prix quand la quantité est active */
.dwp-quantity-selector-wrapper:not(.dwp-step-disabled) ~ .dwp-calculated-price-wrapper {
    max-height: 500px;
    opacity: 1;
    margin: 24px 0;
    padding: 24px;
    border-width: 3px;
    animation: slideDown 0.4s ease forwards;
}
}

.dwp-calculated-price-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--dwp-primary) 0%, var(--dwp-primary-dark) 100%);
}

.dwp-calculated-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.dwp-price-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--dwp-text-dark);
}

.dwp-price-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--dwp-primary-dark);
    letter-spacing: -0.02em;
}

.dwp-price-value .woocommerce-Price-amount {
    display: inline-block;
}

.dwp-price-number {
    font-size: 36px;
}

.dwp-price-details {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--dwp-border);
    font-size: 14px;
    color: var(--dwp-text-gray);
}

.dwp-price-per-kg {
    font-style: italic;
    font-weight: 500;
}

/* --- CLASSES UTILITAIRES --- */
.dwp-hidden-select {
    display: none !important;
}

.dwp-pa_formule .dwp-attribute-option {
    min-width: 100px;
}

.dwp-pa_concentration .dwp-attribute-option {
    min-width: 110px;
}

/* --- ÉTATS DÉSACTIVÉS --- */
.dwp-attribute-option.disabled,
.dwp-attribute-option.dwp-option-disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
    background: #f5f5f5;
    border-color: #ccc;
}

.dwp-attribute-option.disabled:hover,
.dwp-attribute-option.dwp-option-disabled:hover {
    border-color: #ccc;
    box-shadow: none;
    transform: none;
}

.dwp-attribute-option.disabled::after,
.dwp-attribute-option.dwp-option-disabled::after {
    content: "✕";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
    color: rgba(220, 38, 38, 0.4);
    font-weight: bold;
    pointer-events: none;
}

/* --- ANIMATION DE CHARGEMENT --- */
.dwp-calculated-price-wrapper.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.dwp-calculated-price-wrapper.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid var(--dwp-bg-light);
    border-top: 4px solid var(--dwp-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* --- MESSAGES D'ERREUR --- */
.dwp-error-message {
    color: var(--dwp-error);
    font-size: 14px;
    font-weight: 600;
    margin-top: 12px;
    padding: 12px 16px;
    background: #fef2f2;
    border-left: 4px solid var(--dwp-error);
    border-radius: var(--dwp-radius);
    box-shadow: var(--dwp-shadow);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dwp-error-message::before {
    content: '⚠️';
    font-size: 18px;
}

/* ========================================
   RESPONSIVE MOBILE ULTRA-COMPACT
   Remplace complètement les sections @media
   ======================================== */

/* --- RESPONSIVE TABLETTE --- */
@media (max-width: 768px) {
    /* Wrappers ultra-compacts */
    .dwp-custom-selectors-wrapper {
        padding: 8px !important;
        margin-bottom: 8px !important;
    }
    
    .dwp-formule-selector-wrapper,
    .dwp-concentration-selector-wrapper {
        margin-bottom: 10px !important;
    }
    
    .dwp-quantity-selector-wrapper {
        padding: 10px 8px !important;
        margin: 8px 0 !important;
    }
    
    .dwp-attribute-selector {
        gap: 8px;
        margin-bottom: 8px !important;
    }
    
    .dwp-attribute-option {
        min-width: 75px;
        padding: 9px 14px;
        font-size: 12px;
    }
    
    /* Labels compacts */
    .dwp-attribute-label,
    .dwp-quantity-label {
        font-size: 15px !important;
        margin-bottom: 6px !important;
    }
    
    .dwp-instruction-text {
        margin: 2px 0 6px 0 !important;
        font-size: 13px !important;
        line-height: 1.3 !important;
    }
    
    .dwp-quantity-info {
        margin-top: 4px !important;
        margin-bottom: 0 !important;
        font-size: 12px !important;
    }
    
    /* Sélecteur de quantité */
    .dwp-quantity-selector {
        max-width: 220px;
        margin: 8px auto !important;
    }
    
    .dwp-quantity-btn {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .dwp-quantity-display {
        min-width: 100px;
        height: 50px;
    }
    
    /* POIDS ULTRA-COMPACT */
    .dwp-weight-wrapper {
        margin: 6px 0 !important;
        padding: 0 !important;
    }
    
    .dwp-weight-display {
        padding: 6px 8px !important;
    }
    
    .dwp-weight-label {
        font-size: 14px !important;
    }
    
    .dwp-weight-amount {
        font-size: 18px !important;
    }
    
    /* PRIX ULTRA-COMPACT */
    .dwp-calculated-price-wrapper {
        margin: 6px 0 10px 0 !important;
        padding: 0 !important;
    }
    
    .dwp-calculated-price {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px !important;
        padding: 10px !important;
    }
    
    .dwp-price-label {
        font-size: 14px !important;
    }
    
    .dwp-price-value {
        font-size: 26px;
    }
    
    .dwp-price-number {
        font-size: 30px;
    }
    
    .dwp-price-details {
        margin-top: 0 !important;
        font-size: 12px !important;
    }
    
    /* SIMULATEUR COMPACT */
    .dwp-resale-simulator {
        margin: 10px 0 !important;
        padding: 12px !important;
    }
    
    .dwp-resale-simulator h3 {
        font-size: 16px !important;
        margin: 0 0 12px 0 !important;
    }
    
    .dwp-resale-content {
        padding: 12px !important;
    }
    
    .dwp-resale-row {
        margin-bottom: 10px !important;
    }
    
    .dwp-coefficient-control {
        margin: 12px 0 !important;
    }
    
    /* Bouton réinitialiser */
    .dwp-reset-button-wrapper {
        margin: 10px 0 !important;
    }
    
    /* Sticky bar */
    body.dwp-sticky-active {
        padding-bottom: 100px !important;
    }
    
    .dwp-sticky-summary {
        padding: 8px 12px !important;
    }
    
    .dwp-sticky-content {
        flex-direction: row !important;
        gap: 10px !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    
    .dwp-sticky-price {
        align-items: flex-start !important;
    }
    
    .dwp-sticky-price-label {
        font-size: 9px !important;
    }
    
    .dwp-sticky-price-value {
        font-size: 20px !important;
    }
    
    .dwp-sticky-add-to-cart {
        padding: 10px 20px !important;
        font-size: 14px !important;
        white-space: nowrap !important;
    }
    
    .dwp-sticky-summary.active {
        max-height: 60px !important;
    }
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 480px) {
    /* Wrappers MINIMAUX */
    .dwp-custom-selectors-wrapper {
        padding: 6px !important;
        margin-bottom: 6px !important;
    }
    
    .dwp-formule-selector-wrapper,
    .dwp-concentration-selector-wrapper {
        margin-bottom: 8px !important;
    }
    
    .dwp-quantity-selector-wrapper {
        padding: 8px 6px !important;
        margin: 6px 0 !important;
    }
    
    .dwp-attribute-selector {
        gap: 6px !important;
        margin-bottom: 6px !important;
    }
    
    .dwp-attribute-option {
        min-width: 65px;
        padding: 6px 10px;
        font-size: 11px;
    }
    
    /* Labels minimaux */
    .dwp-attribute-label,
    .dwp-quantity-label {
        font-size: 14px !important;
        margin-bottom: 4px !important;
    }
    
    .dwp-instruction-text {
        margin: 1px 0 4px 0 !important;
        font-size: 12px !important;
    }
    
    .dwp-quantity-info {
        margin-top: 3px !important;
        font-size: 11px !important;
    }
    
    /* Sélecteur de quantité */
    .dwp-quantity-selector {
        max-width: 200px;
        margin: 6px auto !important;
    }
    
    .dwp-quantity-btn {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .dwp-quantity-display {
        min-width: 90px;
        height: 45px;
    }
    
    .dwp-quantity-value {
        font-size: 22px;
    }
    
    /* POIDS MINIMAL */
    .dwp-weight-wrapper {
        margin: 4px 0 !important;
    }
    
    .dwp-weight-display {
        padding: 4px 6px !important;
    }
    
    .dwp-weight-label {
        font-size: 13px !important;
    }
    
    .dwp-weight-amount {
        font-size: 16px !important;
    }
    
    /* PRIX MINIMAL */
    .dwp-calculated-price-wrapper {
        margin: 4px 0 8px 0 !important;
    }
    
    .dwp-calculated-price {
        padding: 8px !important;
    }
    
    .dwp-price-label {
        font-size: 13px !important;
    }
    
    .dwp-price-value {
        font-size: 22px !important;
    }
    
    .dwp-price-number {
        font-size: 26px !important;
    }
    
    .dwp-price-details {
        font-size: 11px !important;
    }
    
    /* SIMULATEUR MINIMAL */
    .dwp-resale-simulator {
        margin: 8px 0 !important;
        padding: 10px !important;
    }
    
    .dwp-resale-simulator h3 {
        font-size: 15px !important;
        margin: 0 0 10px 0 !important;
    }
    
    .dwp-resale-content {
        padding: 10px !important;
    }
    
    .dwp-resale-row {
        margin-bottom: 8px !important;
        font-size: 13px !important;
    }
    
    .dwp-coefficient-control {
        margin: 10px 0 !important;
    }
    
    .dwp-coefficient-control label {
        font-size: 13px !important;
    }
    
    .dwp-coefficient-value {
        font-size: 15px !important;
    }
    
    .dwp-purchase-price-value,
    .dwp-resale-price-value {
        font-size: 16px !important;
    }
    
    /* Bouton réinitialiser */
    .dwp-reset-button-wrapper {
        margin: 8px 0 !important;
    }
    
    .dwp-reset-button {
        padding: 10px 20px !important;
        font-size: 13px !important;
    }
    
    /* Sticky bar */
    body.dwp-sticky-active {
        padding-bottom: 120px !important;
    }
    
    .dwp-sticky-summary {
        padding: 6px 10px !important;
    }
    
    .dwp-sticky-content {
        gap: 8px !important;
    }
    
    .dwp-sticky-price-label {
        font-size: 8px !important;
    }
    
    .dwp-sticky-price-value {
        font-size: 18px !important;
    }
    
    .dwp-sticky-add-to-cart {
        padding: 8px 16px !important;
        font-size: 13px !important;
    }
    
    .dwp-sticky-summary.active {
        max-height: 50px !important;
    }
}

/* --- PRINT STYLES --- */
@media print {
    .dwp-reset-button,
    .dwp-quantity-selector,
    .dwp-resale-simulator {
        display: none !important;
    }
}

    }
    
    /* Sticky bar responsive - Tablette */
    .dwp-sticky-summary {
        padding: 8px 12px !important;
    }
    
    .dwp-sticky-content {
        flex-direction: row !important;
        gap: 10px !important;
        align-items: center !important;
        justify-content: space-between !important;
    }
    
    .dwp-sticky-price {
        align-items: flex-start !important;
    }
    
    .dwp-sticky-price-label {
        font-size: 9px !important;
    }
    
    .dwp-sticky-price-value {
        font-size: 20px !important;
    }
    
    .dwp-sticky-add-to-cart {
        padding: 10px 20px !important;
        font-size: 14px !important;
        white-space: nowrap !important;
    }
    
    .dwp-sticky-summary.active {
        max-height: 60px !important;
    }
}

@media (max-width: 480px) {
    /* Optimisations supplémentaires pour petits écrans */
    .dwp-custom-selectors-wrapper {
        padding: 10px !important;
        margin-bottom: 10px !important;
    }
    
    .dwp-quantity-selector-wrapper {
        padding: 12px 10px !important;
        margin: 10px 0 !important;
    }
    
    .dwp-attribute-option {
        min-width: 70px;
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .dwp-attribute-label,
    .dwp-quantity-label {
        font-size: 15px;
        margin-bottom: 6px !important;
    }
    
    .dwp-instruction-text {
        margin: 3px 0 6px 0 !important;
        font-size: 13px !important;
    }
    
    .dwp-quantity-selector {
        max-width: 200px;
    }
    
    .dwp-quantity-btn {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .dwp-quantity-display {
        min-width: 90px;
        height: 45px;
    }
    
    .dwp-quantity-value {
        font-size: 24px;
    }
    
    /* Compacter encore plus le poids sélectionné */
    .dwp-weight-wrapper {
        margin: 8px 0 !important;
    }
    
    .dwp-weight-display {
        padding: 8px !important;
    }
    
    .dwp-weight-label {
        font-size: 14px !important;
    }
    
    .dwp-weight-amount {
        font-size: 18px !important;
    }
    
    /* Optimiser le bloc prix */
    .dwp-calculated-price-wrapper {
        margin: 8px 0 12px 0 !important;
    }
    
    .dwp-calculated-price {
        padding: 12px !important;
    }
    
    .dwp-price-value {
        font-size: 24px;
    }
    
    .dwp-price-label {
        font-size: 14px !important;
    }
    
    /* AUGMENTER LE PADDING POUR VOIR COMPLÈTEMENT LE BOUTON */
    body.dwp-sticky-active {
        padding-bottom: 140px !important;
    }
    
    /* Sticky bar responsive - Mobile */
    .dwp-sticky-summary {
        padding: 6px 10px !important;
    }
    
    .dwp-sticky-content {
        gap: 8px !important;
    }
    
    .dwp-sticky-price-label {
        font-size: 8px !important;
    }
    
    .dwp-sticky-price-value {
        font-size: 18px !important;
    }
    
    .dwp-sticky-add-to-cart {
        padding: 8px 16px !important;
        font-size: 13px !important;
    }
    
    .dwp-sticky-summary.active {
        max-height: 50px !important;
    }
}

/* --- PRINT STYLES --- */
@media print {
    .dwp-reset-button,
    .dwp-quantity-selector,
    .dwp-resale-simulator {
        display: none !important;
    }
}

/* --- BARRE STICKY RÉCAPITULATIVE EN BAS --- */
/* ============================================================================
   STICKY BAR COMPACTE (Prix + Bouton uniquement)
   ============================================================================ */
.dwp-sticky-summary {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    /* Dégradé vert - Fallback + Variable CSS */
    background: #089944 !important; /* Fallback */
    background: linear-gradient(135deg, #089944 0%, #006633 100%) !important;
    background: linear-gradient(135deg, var(--dwp-primary) 0%, var(--dwp-primary-dark) 100%) !important;
    border-top: 3px solid var(--dwp-primary-light) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3) !important;
    padding: 12px 20px !important;
    z-index: 9999999 !important;
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    max-height: 0;
    overflow: hidden !important;
}

/* Afficher la barre quand active */
.dwp-sticky-summary.active {
    transform: translateY(0) !important;
    opacity: 1 !important;
    max-height: 100px !important;
}

/* Cacher la sticky bar quand le panier est ouvert */
body.woocommerce-cart-opened .dwp-sticky-summary,
body.cart-opened .dwp-sticky-summary,
.drawer-opened .dwp-sticky-summary {
    transform: translateY(100%) !important;
    opacity: 0 !important;
}

/* Ajouter un padding-bottom au body quand la sticky est active pour ne pas cacher le contenu */
body.dwp-sticky-active {
    padding-bottom: 80px !important;
}

.dwp-sticky-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Desktop : Augmenter le padding pour éviter que le sticky cache le contenu */
@media (min-width: 769px) {
    body.dwp-sticky-active {
        padding-bottom: 140px !important;
    }
}

/* Section du prix dans sticky */
.dwp-sticky-price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.dwp-sticky-price-label {
    font-size: 10px !important;
    color: rgba(255, 255, 255, 0.9) !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.dwp-sticky-price-value {
    font-size: 24px !important;
    font-weight: 800 !important;
    color: white !important;
    line-height: 1;
}

/* Bouton Ajouter au panier dans sticky */
.dwp-sticky-add-to-cart {
    background: white !important;
    color: var(--dwp-primary) !important;
    border: none !important;
    padding: 12px 32px !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    cursor: pointer;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    white-space: nowrap;
}

.dwp-sticky-add-to-cart:hover {
    background: #f0fdf4 !important;
    transform: scale(1.05) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3) !important;
}

.dwp-sticky-add-to-cart:active {
    transform: scale(0.98) !important;
}

.dwp-sticky-add-to-cart:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background: #e5e7eb !important;
    color: #9ca3af !important;
}

/* --- GESTION DU SCROLL POUR STICKY BAR (DESKTOP) --- */
/* Cacher la sticky bar lors du scroll vers le haut ou en haut de page (desktop uniquement) */
@media (min-width: 769px) {
    .dwp-sticky-summary.dwp-scroll-hidden {
        transform: translateY(100%) !important;
        opacity: 0 !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
    
    /* Animation fluide lors de la réapparition */
    .dwp-sticky-summary.active:not(.dwp-scroll-hidden) {
        transform: translateY(0) !important;
        opacity: 1 !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
}

/* Sur mobile/tablette, la sticky reste toujours visible si active */
@media (max-width: 768px) {
    .dwp-sticky-summary.dwp-scroll-hidden {
        transform: translateY(0) !important;
        opacity: 1 !important;
    }
}
