/* =========================================
   GLOBAL WRAPPER
========================================= */

.lg-wrapper {
    max-width: 650px;
    margin: 0 auto;
    font-family: inherit;

    /* Force une variable de couleur pour contourner styles inline */
    --lg-label-color: #ffffff;
}

.lg-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 22px;
    color: #FFF !important;
}

.lg-field label {
    font-size: 15px;
    font-weight: 500;
}

/* =========================================
   ROW SYSTEM
========================================= */

.lg-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

@media (max-width: 768px) {
    .lg-row {
        grid-template-columns: 1fr;
    }
}


/* =========================================
   INPUT STYLE — EXACT MAQUETTE
========================================= */

.lg-input {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid #BA9D75;
    background: #ffffff;
    padding: 0 12px 0 40px;
    height: 48px;
    border-radius: 0;
}

.lg-input input,
.lg-input select {
    border: none !important;
    background: transparent !important;
    width: 100%;
    height: 100%;
    font-size: 16px;
    color: #2b2b2b;
    padding: 0 !important;
}

textarea {
    border: 1px solid #BA9D75 !important;
    border-radius: 0 !important;
    background: #fff !important;
    padding: 12px !important;
    font-size: 16px;
    min-height: 140px;
    resize: vertical;
}

.lg-input input:focus,
.lg-input select:focus,
textarea:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Neutralise WordPress / UiCore styles */
.lg-wrapper input,
.lg-wrapper select,
.lg-wrapper textarea {
    background: #ffffff !important;
    border-color: #BA9D75 !important;
    box-shadow: none !important;
    color: #2b2b2b !important;
}


/* =========================================
   ICONES — CALENDRIER & CHEVRON
========================================= */

.lg-icon-calendar {
    position: absolute;
    left: 12px;
    width: 18px;
    height: 18px;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg fill='none' stroke='%23BA9D75' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='18' height='18' x='3' y='4'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E");
}

.lg-chevron {
    position: absolute;
    right: 12px;
    width: 14px;
    height: 14px;
    background-size: contain;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg fill='none' stroke='%23BA9D75' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}


/* =========================================
   MULTISELECT
========================================= */

.lg-multiselect {
    border: 1px solid #BA9D75;
    background: #ffffff;
    padding: 10px;
    border-radius: 0;
    cursor: text;
    position: relative;
}

.lg-multi-input {
    width: 100%;
    border: none !important;
    background: transparent !important;
    font-size: 16px;
    padding: 0;
}

.lg-multi-input:focus {
    outline: none !important;
}

.lg-multi-list {
    display: none;
    position: absolute;
    z-index: 20;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #BA9D75;
    max-height: 180px;
    overflow-y: auto;
    color: #000;
}

.lg-multi-list li {
    padding: 10px;
    cursor: pointer;
    color: #000 !important;
}

.lg-multi-list li:hover {
    background: #f7f2e8;
    color: #000 !important;
}

.lg-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.lg-tag {
    border: 1px solid #BA9D75;
    background: #F2E7D8;
    padding: 6px 10px;
    font-size: 14px;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lg-tag-remove {
    cursor: pointer;
    font-weight: bold;
}


/* =========================================
   SUBMIT BUTTON
========================================= */

.lg-submit {
    width: 100%;
    background: #D4C3A5;
    color: #ffffff;
    border: none;
    padding: 16px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 0;
    transition: 0.2s;
}

.lg-submit:hover {
    background: #c6b495;
}


/* =========================================
   SUCCESS MESSAGE
========================================= */

.lg-success-message {
    text-align: center;
    padding: 50px;
    font-size: 18px;
    color: #000;
}


/* =========================================
   FORCE LABELS TO BE WHITE (ANTI-THEME)
========================================= */

/* Forcer la couleur blanche des labels — niveau 1 */
.lg-wrapper .lg-field label {
    color: var(--lg-label-color) !important;
}

/* Sélecteur ultra fort (bats tout, même le thème) */
body .lg-wrapper .lg-field label {
    color: var(--lg-label-color) !important;
}

/* Ajoute une étoile rouge sur tous les champs obligatoires du formulaire */
.lg-field label.required::after {
    content: " *";
    color: red;
    font-weight: bold;
}

.lg-status {
    margin-top: 15px;
    padding: 14px 16px;
    border-radius: 8px;
    background: #21394B;
    color: #FFF;
    font-size: 14px;
}

.lg-status.lg-error {
    background: #2c3e50;
}

.lg-success-message {
    background: #21394B;
    color: #FFF;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
}