/* ══════════════════════════════════════════════
   ÉCRASEMENT GLOBAL de --wp-admin-theme-color
   Source du bleu : Elementor définit #6EC1E4
   que Select2 utilise via var(--wp-admin-theme-color)
══════════════════════════════════════════════ */
:root {
    --wp-admin-theme-color: #39FF14 !important;
    --wp-admin-theme-color--rgb: 57, 255, 20 !important;
    --wc-primary: #39FF14 !important;
    --wc-primary-text: #000000 !important;
}

/* ── Galerie & description courte ── */
.woocommerce-product-gallery,
.woocommerce-product-details__short-description {
    border: 2px solid #39FF14 !important;
    border-radius: 12px !important;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.4), 0 0 5px rgba(57, 255, 20, 0.2) !important;
    overflow: hidden !important;
    padding: 16px !important;
}

/* ── Bloc variantes — conteneur global ── */
form.variations_form {
    border: 2px solid #39FF14 !important;
    border-radius: 12px !important;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.4), 0 0 5px rgba(57, 255, 20, 0.2) !important;
    padding: 16px !important;
    overflow: visible !important;
}

/* ── Select natif (fallback) ── */
.variations_form select {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    accent-color: #39FF14 !important;
    color-scheme: dark !important;
    outline: 0 !important;
    border: 2px solid #39FF14 !important;
    border-radius: 8px !important;
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.3) !important;
    background-color: #000000 !important;
    color: #ffffff !important;
    padding: 10px !important;
    cursor: pointer !important;
}
.variations_form select:focus,
.variations_form select:focus-visible,
.variations_form select:active {
    border-color: #39FF14 !important;
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.6) !important;
    outline: 0 !important;
    background-color: #000000 !important;
}
.variations_form select option {
    background-color: #000000 !important;
    color: #ffffff !important;
}

/* ══════════════════════════════════════════════
   SELECT2 — SÉLECTEURS GLOBAUX
   Le dropdown est injecté directement dans <body>
   en dehors de .variations_form — on cible tout
══════════════════════════════════════════════ */

/* Boîte de sélection fermée */
.select2-container .select2-selection--single,
.select2-container--default .select2-selection--single,
.select2-container--classic .select2-selection--single {
    background-color: #000000 !important;
    background-image: none !important;
    border: 2px solid #39FF14 !important;
    border-radius: 8px !important;
    box-shadow: 0 0 10px rgba(57, 255, 20, 0.3) !important;
    height: auto !important;
    min-height: 38px !important;
    outline: none !important;
}

/* Texte affiché */
.select2-container .select2-selection--single .select2-selection__rendered,
.select2-container--default .select2-selection--single .select2-selection__rendered,
.select2-container--classic .select2-selection--single .select2-selection__rendered {
    color: #ffffff !important;
    background-color: #000000 !important;
    line-height: 2.2 !important;
    padding: 4px 36px 4px 10px !important;
}

/* Placeholder */
.select2-container--default .select2-selection--single .select2-selection__placeholder,
.select2-container--classic .select2-selection--single .select2-selection__placeholder {
    color: rgba(255, 255, 255, 0.55) !important;
}

/* Flèche */
.select2-container--default .select2-selection--single .select2-selection__arrow b,
.select2-container--classic .select2-selection--single .select2-selection__arrow b {
    border-color: #39FF14 transparent transparent transparent !important;
    border-style: solid !important;
    border-width: 6px 5px 0 5px !important;
    background: none !important;
    background-image: none !important;
}

/* Flèche état ouvert */
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b,
.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #39FF14 transparent !important;
    border-width: 0 5px 6px 5px !important;
}

/* Boîte ouverte / focus */
.select2-container--open .select2-selection--single,
.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--classic.select2-container--open .select2-selection--single,
.select2-container--classic:focus .select2-selection--single {
    background-color: #000000 !important;
    background-image: none !important;
    border: 2px solid #39FF14 !important;
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.6) !important;
    outline: none !important;
}

/* ── Dropdown (injecté en bas de <body>) ── */
.select2-dropdown,
.select2-container--default .select2-dropdown,
.select2-container--classic .select2-dropdown {
    background-color: #000000 !important;
    background: #000000 !important;
    border: 2px solid #39FF14 !important;
    border-radius: 8px !important;
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.4) !important;
    color: #ffffff !important;
    z-index: 99999 !important;
}

/* Options */
.select2-results__options {
    background-color: #000000 !important;
}
.select2-results__option,
.select2-container--default .select2-results__option,
.select2-container--classic .select2-results__option {
    background-color: #000000 !important;
    color: #ffffff !important;
    padding: 8px 12px !important;
}

/* Option survol — ÉCRASE var(--wp-admin-theme-color) bleu ── */
.select2-container--default .select2-results__option--highlighted,
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted[data-selected],
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable,
.select2-container--classic .select2-results__option--highlighted,
.select2-container--classic .select2-results__option--highlighted[aria-selected],
.select2-container--classic .select2-results__option--highlighted[data-selected] {
    background-color: #39FF14 !important;
    background: #39FF14 !important;
    color: #000000 !important;
}

/* Option sélectionnée */
.select2-container--default .select2-results__option[aria-selected=true],
.select2-container--default .select2-results__option[data-selected=true],
.select2-container--classic .select2-results__option[aria-selected=true],
.select2-container--classic .select2-results__option[data-selected=true] {
    background-color: rgba(57, 255, 20, 0.15) !important;
    color: #39FF14 !important;
}

/* Option désactivée */
.select2-container--default .select2-results__option[aria-disabled=true] {
    color: rgba(255, 255, 255, 0.35) !important;
    background-color: #000000 !important;
}

/* Champ de recherche dans le dropdown */
.select2-search--dropdown .select2-search__field {
    background-color: #111111 !important;
    border: 1px solid #39FF14 !important;
    color: #ffffff !important;
    outline: none !important;
}

/* État ouvert — bordure */
.select2-container--classic.select2-container--open .select2-selection--single,
.select2-container--classic.select2-container--open .select2-dropdown {
    border-color: #39FF14 !important;
}
