/* ============================================================
   WebResa Sync — Dark Mode v1.9.1
   Surcharge de webresa-sync.css

   Charte chromatique dark :
   - Fond wrap        : rgba(0,0,0,0.50)  sans bordure ni radius
   - Fond champs      : #1a1a1a / focus #222222
   - Bordure champs   : #3a3a3a (légèrement plus claire que le fond)
   - Radius champs    : 4px
   - Accent           : #7bcc41  hover #94d95f
   - Texte principal  : #e8e8e8
   - Texte secondaire : #9a9a9a
   ============================================================ */

/* ---- Wrap filtre : pas de bordure ni de radius ---- */
.webresa-filtre-wrap[data-wr-mode="dark"] {
    background:    rgba(0,0,0,0.50);
    border:        none;
    border-radius: 0;
    box-shadow:    none;
    padding:       24px 28px;
}

.webresa-filtre-wrap[data-wr-mode="dark"] .webresa-field label {
    color:       #9a9a9a;
    font-weight: 600;
}

/* Inputs & selects : bordure légère + radius 4px */
.webresa-filtre-wrap[data-wr-mode="dark"] .webresa-field input,
.webresa-filtre-wrap[data-wr-mode="dark"] .webresa-field select {
    background:    #1a1a1a;
    border:        1px solid #3a3a3a;
    color:         #e8e8e8;
    border-radius: 4px;
}
.webresa-filtre-wrap[data-wr-mode="dark"] .webresa-field input:focus,
.webresa-filtre-wrap[data-wr-mode="dark"] .webresa-field select:focus {
    border-color:  #7bcc41;
    background:    #222222;
    box-shadow:    0 0 0 3px rgba(123,204,65,.15);
    outline:       none;
}

/* Champ date : fond sombre, texte blanc, picker natif dark */
.webresa-filtre-wrap[data-wr-mode="dark"] .webresa-field input[type="date"] {
    color:        #e8e8e8;
    background:   #1a1a1a;
    border:       1px solid #3a3a3a;
    border-radius:4px;
    color-scheme: dark;
}
.webresa-filtre-wrap[data-wr-mode="dark"] .webresa-field input[type="date"]:focus {
    color:        #e8e8e8;
    background:   #222222;
    border-color: #7bcc41;
    box-shadow:   0 0 0 3px rgba(123,204,65,.15);
    outline:      none;
    color-scheme: dark;
}
.webresa-filtre-wrap[data-wr-mode="dark"] .webresa-field input[type="date"]::-webkit-calendar-picker-indicator {
    opacity:          1;
    cursor:           pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23e8e8e8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
    background-size:  contain;
    background-repeat:no-repeat;
}

/* Zone filtres avancés */
.webresa-filtre-wrap[data-wr-mode="dark"] .webresa-form-row-advanced {
    background:    transparent;
    border:        none;
    border-radius: 0;
    padding:       8px 0;
    margin-top:    8px;
}

/* Toggle filtres avancés */
.webresa-filtre-wrap[data-wr-mode="dark"] .webresa-advanced-toggle button {
    color:       #7bcc41;
    font-weight: 600;
}
.webresa-filtre-wrap[data-wr-mode="dark"] .webresa-advanced-toggle button:hover {
    color: #94d95f;
}

/* Bouton Rechercher */
.webresa-filtre-wrap[data-wr-mode="dark"] .webresa-btn-search {
    background:    #7bcc41;
    color:         #0a0a0a;
    font-weight:   700;
    border:        none;
    border-radius: 8px;
    box-shadow:    0 2px 8px rgba(123,204,65,.3);
}
.webresa-filtre-wrap[data-wr-mode="dark"] .webresa-btn-search:hover {
    background: #94d95f;
    box-shadow: 0 4px 14px rgba(123,204,65,.4);
}


/* ---- Wrap résultats ---- */
.webresa-resultats-wrap[data-wr-mode="dark"] {
    background:    rgba(0,0,0,0.50);
    border-color:  #2a2a2a;
    box-shadow:    0 2px 16px rgba(0,0,0,.6);
    padding:       24px 28px;
}

.webresa-resultats-wrap[data-wr-mode="dark"] .webresa-results-count {
    color:       #9a9a9a;
    font-size:   .85em;
    font-weight: 500;
}

.webresa-resultats-wrap[data-wr-mode="dark"] .webresa-no-results,
.webresa-resultats-wrap[data-wr-mode="dark"] .webresa-hint {
    color: #9a9a9a;
}

/* Carte résultat */
.webresa-resultats-wrap[data-wr-mode="dark"] .wr-result-card {
    background:    transparent;
    border:        none;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding:       16px 0;
}
.webresa-resultats-wrap[data-wr-mode="dark"] .wr-result-card:last-child {
    border-bottom: none;
}
.webresa-resultats-wrap[data-wr-mode="dark"] .wr-result-card:hover {
    box-shadow:    none;
    border-color:  rgba(255,255,255,0.08);
    transform:     none;
}

/* Titre circuit */
.webresa-resultats-wrap[data-wr-mode="dark"] .wr-result-titre a {
    color:           #e8e8e8;
    text-decoration: none;
}
.webresa-resultats-wrap[data-wr-mode="dark"] .wr-result-titre a:hover {
    color: #7bcc41;
}

/* Promo */
.webresa-resultats-wrap[data-wr-mode="dark"] .wr-promo {
    background:    rgba(123,204,65,.15);
    color:         #7bcc41;
    border:        1px solid rgba(123,204,65,.3);
    border-radius: 4px;
    padding:       1px 7px;
    font-size:     .8em;
    font-weight:   700;
    margin-left:   8px;
}

/* ---- Tags / badges ---- */
.webresa-resultats-wrap[data-wr-mode="dark"] .wr-badge-activite,
.webresa-resultats-wrap[data-wr-mode="dark"] .wr-badge-region,
.webresa-resultats-wrap[data-wr-mode="dark"] .wr-badge-niveau,
.webresa-resultats-wrap[data-wr-mode="dark"] .wr-badge-duree {
    background: transparent;
    color:      #e8e8e8;
    border:     none;
    padding:    0 4px 0 0;
}

/* Dates */
.webresa-resultats-wrap[data-wr-mode="dark"] .wr-badge-etat.wr-etat-confirme { background:rgba(46,125,50,.25); color:#a5d6a7; }
.webresa-resultats-wrap[data-wr-mode="dark"] .wr-badge-etat.wr-etat-garanti  { background:rgba(21,101,192,.25); color:#90caf9; }
.webresa-resultats-wrap[data-wr-mode="dark"] .wr-badge-etat.wr-etat-autre    { background:rgba(230,81,0,.25);   color:#ffcc80; }

.webresa-resultats-wrap[data-wr-mode="dark"] .wr-dates {
    color:       #e8e8e8;
    line-height: 1.6;
}
.webresa-resultats-wrap[data-wr-mode="dark"] .wr-dates strong {
    color:          #9a9a9a;
    font-size:      .8em;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.webresa-resultats-wrap[data-wr-mode="dark"] .wr-dispo {
    display: none;
}

/* Prix */
.webresa-resultats-wrap[data-wr-mode="dark"] .wr-prix {
    color:       #7bcc41;
    font-weight: 700;
    font-size:   1.05em;
}

/* Bouton En savoir plus */
.webresa-resultats-wrap[data-wr-mode="dark"] .wr-btn-detail {
    background:      #7bcc41;
    color:           #0a0a0a !important;
    font-weight:     700;
    border-radius:   8px;
    box-shadow:      0 2px 8px rgba(123,204,65,.3);
    text-decoration: none;
    transition:      background .2s, box-shadow .2s, transform .15s;
}
.webresa-resultats-wrap[data-wr-mode="dark"] .wr-btn-detail:hover {
    background: #94d95f;
    box-shadow: 0 4px 14px rgba(123,204,65,.4);
}


/* ---- Mode AUTO (@media prefers-color-scheme: dark) ---- */
@media (prefers-color-scheme: dark) {

    .webresa-filtre-wrap[data-wr-mode="auto"] {
        background:    rgba(0,0,0,0.50);
        border:        none;
        border-radius: 0;
        box-shadow:    none;
        padding:       24px 28px;
    }
    .webresa-filtre-wrap[data-wr-mode="auto"] .webresa-field label { color:#9a9a9a; font-weight:600; }

    .webresa-filtre-wrap[data-wr-mode="auto"] .webresa-field input,
    .webresa-filtre-wrap[data-wr-mode="auto"] .webresa-field select {
        background:#1a1a1a; border:1px solid #3a3a3a; color:#e8e8e8; border-radius:4px;
    }
    .webresa-filtre-wrap[data-wr-mode="auto"] .webresa-field input:focus,
    .webresa-filtre-wrap[data-wr-mode="auto"] .webresa-field select:focus {
        border-color:#7bcc41; background:#222222; box-shadow:0 0 0 3px rgba(123,204,65,.15); outline:none;
    }

    /* Champ date en mode auto */
    .webresa-filtre-wrap[data-wr-mode="auto"] .webresa-field input[type="date"] {
        color:#e8e8e8; background:#1a1a1a; border:1px solid #3a3a3a; border-radius:4px; color-scheme:dark;
    }
    .webresa-filtre-wrap[data-wr-mode="auto"] .webresa-field input[type="date"]:focus {
        color:#e8e8e8; background:#222222; color-scheme:dark;
        border-color:#7bcc41; box-shadow:0 0 0 3px rgba(123,204,65,.15); outline:none;
    }
    .webresa-filtre-wrap[data-wr-mode="auto"] .webresa-field input[type="date"]::-webkit-calendar-picker-indicator {
        opacity:1; cursor:pointer;
        background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23e8e8e8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
        background-size:contain; background-repeat:no-repeat;
    }

    .webresa-filtre-wrap[data-wr-mode="auto"] .webresa-form-row-advanced {
        background:transparent; border:none; border-radius:0; padding:8px 0; margin-top:8px;
    }
    .webresa-filtre-wrap[data-wr-mode="auto"] .webresa-advanced-toggle button { color:#7bcc41; font-weight:600; }
    .webresa-filtre-wrap[data-wr-mode="auto"] .webresa-advanced-toggle button:hover { color:#94d95f; }
    .webresa-filtre-wrap[data-wr-mode="auto"] .webresa-btn-search {
        background:#7bcc41; color:#0a0a0a; font-weight:700; border:none; border-radius:8px;
        box-shadow:0 2px 8px rgba(123,204,65,.3);
    }
    .webresa-filtre-wrap[data-wr-mode="auto"] .webresa-btn-search:hover { background:#94d95f; }

    .webresa-resultats-wrap[data-wr-mode="auto"] {
        background:rgba(0,0,0,0.50); border-color:#2a2a2a; /*box-shadow:0 2px 16px rgba(0,0,0,.6); padding:24px 28px;*/
    }
    .webresa-resultats-wrap[data-wr-mode="auto"] .wr-result-card {
        background:transparent; border:none; border-radius:0;
        border-bottom:1px solid rgba(255,255,255,0.08); padding:16px 0;
    }
    .webresa-resultats-wrap[data-wr-mode="auto"] .wr-result-card:last-child { border-bottom:none; }
    .webresa-resultats-wrap[data-wr-mode="auto"] .wr-result-card:hover { box-shadow:none; border-color:rgba(255,255,255,0.08); transform:none; }
    .webresa-resultats-wrap[data-wr-mode="auto"] .wr-result-titre a { color:#e8e8e8; }
    .webresa-resultats-wrap[data-wr-mode="auto"] .wr-result-titre a:hover { color:#7bcc41; }
    .webresa-resultats-wrap[data-wr-mode="auto"] .wr-badge-activite,
    .webresa-resultats-wrap[data-wr-mode="auto"] .wr-badge-region,
    .webresa-resultats-wrap[data-wr-mode="auto"] .wr-badge-niveau,
    .webresa-resultats-wrap[data-wr-mode="auto"] .wr-badge-duree {
        background: transparent;
        color:      #e8e8e8;
        border:     none;
        padding:    0 4px 0 0;
    }
    .webresa-resultats-wrap[data-wr-mode="auto"] .wr-badge-etat.wr-etat-confirme { background:rgba(46,125,50,.25); color:#a5d6a7; }
    .webresa-resultats-wrap[data-wr-mode="auto"] .wr-badge-etat.wr-etat-garanti  { background:rgba(21,101,192,.25); color:#90caf9; }
    .webresa-resultats-wrap[data-wr-mode="auto"] .wr-badge-etat.wr-etat-autre    { background:rgba(230,81,0,.25);   color:#ffcc80; }
    .webresa-resultats-wrap[data-wr-mode="auto"] .wr-dates  { color:#e8e8e8; line-height:1.6; }
    .webresa-resultats-wrap[data-wr-mode="auto"] .wr-dates strong { color:#9a9a9a; font-size:.8em; text-transform:uppercase; }
    .webresa-resultats-wrap[data-wr-mode="auto"] .wr-dispo  { display:none; }
    .webresa-resultats-wrap[data-wr-mode="auto"] .wr-prix   { color:#7bcc41; font-weight:700; font-size:1.05em; }
    .webresa-resultats-wrap[data-wr-mode="auto"] .wr-promo  {
        background:rgba(123,204,65,.15); color:#7bcc41; border:1px solid rgba(123,204,65,.3); border-radius:4px; padding:1px 7px;
    }
    .webresa-resultats-wrap[data-wr-mode="auto"] .wr-btn-detail {
        background:#7bcc41; color:#0a0a0a !important; font-weight:700; border-radius:8px;
        box-shadow:0 2px 8px rgba(123,204,65,.3);
    }
    .webresa-resultats-wrap[data-wr-mode="auto"] .wr-btn-detail:hover { background:#94d95f; }
    .webresa-resultats-wrap[data-wr-mode="auto"] .webresa-results-count { color:#9a9a9a; }
    .webresa-resultats-wrap[data-wr-mode="auto"] .webresa-no-results,
    .webresa-resultats-wrap[data-wr-mode="auto"] .webresa-hint { color:#9a9a9a; }
}
