/**
 * Formulaire "Alerte biens".
 *
 * Memes jetons de couleur que les blocs de capture (capture.css) : le bloc
 * herite du theme quand il existe, et retombe sinon sur la charte noir / or
 * (voir vault 02-Areas/Marketing/Charte-Couleurs).
 */

.rr-alerte {
    --rr-alerte-accent: var(--color-primary, #040404);
    --rr-alerte-accent-hover: var(--color-primary-hover, #2b2b2b);
    --rr-alerte-gold: var(--color-accent, #dab455);
    --rr-alerte-border: var(--color-border, #e5e5e5);
    --rr-alerte-bg: var(--color-bg, #fff);
    --rr-alerte-text: var(--color-text, #000);
    --rr-alerte-muted: var(--color-text-muted, #767676);
    --rr-alerte-radius: var(--radius-md, 0.5rem);

    margin: 2.5rem 0;
    padding: 1.75rem;
    border: 1px solid var(--rr-alerte-border);
    /* Le filet or signale un bloc de marque sans peser sur la lecture. */
    border-top: 3px solid var(--rr-alerte-gold);
    border-radius: var(--rr-alerte-radius);
    background: var(--rr-alerte-bg);
    color: var(--rr-alerte-text);
}

.rr-alerte__intro {
    margin-bottom: 1.25rem;
}

.rr-alerte__title {
    margin: 0 0 0.35rem;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.rr-alerte__text {
    margin: 0;
    font-size: 0.95rem;
    color: var(--rr-alerte-muted);
}

/* Rappel du bien d'ou part la demande : c'est lui qui porte les criteres. */
.rr-alerte__bien {
    margin: 0 0 1rem;
    padding: 0.6rem 0.8rem;
    border-left: 3px solid var(--rr-alerte-gold);
    background: rgba(218, 180, 85, 0.1);
    font-size: 0.9rem;
}

.rr-alerte__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.9rem;
}

.rr-alerte__grid--identity {
    margin-top: 0.9rem;
}

.rr-alerte__field {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.rr-alerte__label {
    margin-bottom: 0.3rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    opacity: 0.8;
}

.rr-alerte__input {
    width: 100%;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--rr-alerte-border);
    border-radius: var(--rr-alerte-radius);
    background: #fff;
    color: inherit;
    font: inherit;
    font-size: 0.95rem;
}

.rr-alerte__input:focus {
    outline: 2px solid var(--rr-alerte-accent);
    outline-offset: 1px;
    border-color: var(--rr-alerte-accent);
}

.rr-alerte__input[aria-invalid="true"] {
    border-color: #b3261e;
}

/* Piege a robots : hors ecran plutot que display:none, que certains scripts
   detectent pour ignorer le champ. */
.rr-alerte__hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.rr-alerte__consent-field {
    margin-top: 1rem;
}

.rr-alerte__checkbox {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    font-size: 0.85rem;
    line-height: 1.45;
    opacity: 0.9;
    cursor: pointer;
}

.rr-alerte__checkbox input {
    margin-top: 0.2rem;
    flex: 0 0 auto;
}

.rr-alerte__btn {
    margin-top: 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1.4rem;
    border: 0;
    border-radius: var(--rr-alerte-radius);
    background: var(--rr-alerte-accent);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.rr-alerte__btn:hover {
    background: var(--rr-alerte-accent-hover);
}

.rr-alerte__btn[disabled] {
    opacity: 0.6;
    cursor: default;
}

.rr-alerte__spinner {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: rr-alerte-spin 0.7s linear infinite;
}

.rr-alerte.is-loading .rr-alerte__spinner {
    display: inline-block;
}

@keyframes rr-alerte-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .rr-alerte__spinner {
        animation: none;
    }
}

.rr-alerte__msg {
    margin: 0.9rem 0 0;
    font-size: 0.9rem;
    min-height: 1.2em;
}

.rr-alerte__msg--error {
    color: #b3261e;
}

.rr-alerte__msg--success {
    color: #1a7a4f;
    font-weight: 600;
}

.rr-alerte.is-done {
    text-align: left;
}
