/* ============================================================
   Retraide Login Modal – retraide-login/assets/css/login-modal.css
   ============================================================ */

/* Variables reprises du design system retraide-login */
:root {
    --rlm-blue:       #009bfe;
    --rlm-blue-dark:  #0079d0;
    --rlm-blue-light: #e8f5ff;
    --rlm-text:       #1a2640;
    --rlm-muted:      #6b7a9a;
    --rlm-border:     #d0ddf0;
    --rlm-radius:     14px;
    --rlm-shadow:     0 20px 60px rgba(0,40,100,.18);
    --rlm-font:       'Inter', 'Segoe UI', system-ui, sans-serif;
    --rlm-ease:       .2s ease;
}

/* ── Overlay ── */
.rl-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(10, 22, 45, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--rlm-ease), visibility var(--rlm-ease);
}
.rl-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* ── Boîte de dialogue ── */
.rl-modal {
    background: #fff;
    border-radius: var(--rlm-radius);
    box-shadow: var(--rlm-shadow);
    width: 100%;
    max-width: 420px;
    padding: 32px 28px 28px;
    position: relative;
    transform: translateY(16px) scale(.97);
    transition: transform .28s cubic-bezier(.22,.68,0,1.2);
    font-family: var(--rlm-font);
}
.rl-modal-overlay.is-open .rl-modal {
    transform: translateY(0) scale(1);
}

/* ── Bouton fermeture ── */
.rl-modal-close {
    position: absolute;
    top: 14px; right: 14px;
    width: 32px; height: 32px;
    border: none; background: rgba(0,0,0,.04); border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 1rem; color: var(--rlm-muted);
    transition: background var(--rlm-ease);
}
.rl-modal-close:hover { background: rgba(0,0,0,.09); }

/* ── Logo ── */
.rl-modal-logo {
    text-align: center;
    margin-bottom: 20px;
}
.rl-modal-logo img {
    max-width: 130px; height: auto;
}

/* ── Titre ── */
.rl-modal-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--rlm-text);
    margin: 0 0 4px;
    text-align: center;
}
.rl-modal-subtitle {
    font-size: 0.82rem;
    color: var(--rlm-muted);
    text-align: center;
    margin: 0 0 22px;
}

/* ── Alert ── */
.rl-modal-alert {
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: none;
}
.rl-modal-alert.is-error   { background: #fee2e2; color: #dc2626; }
.rl-modal-alert.is-success { background: #dcfce7; color: #16a34a; }
.rl-modal-alert.is-visible { display: block; }

/* ── Champs ── */
.rl-modal-field {
    margin-bottom: 14px;
}
.rl-modal-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--rlm-text);
    margin-bottom: 5px;
}
.rl-modal-field input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1.5px solid var(--rlm-border);
    border-radius: 8px;
    font-family: var(--rlm-font);
    font-size: 0.9rem;
    color: var(--rlm-text);
    background: #fff;
    box-sizing: border-box;
    transition: border-color var(--rlm-ease), box-shadow var(--rlm-ease);
}
.rl-modal-field input:focus {
    outline: none;
    border-color: var(--rlm-blue);
    box-shadow: 0 0 0 3px rgba(0,155,254,.12);
}

/* ── Bouton principal ── */
.rl-modal-btn {
    width: 100%;
    height: 48px;
    background: var(--rlm-blue);
    color: #fff;
    border: none;
    border-radius: 9px;
    font-family: var(--rlm-font);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background var(--rlm-ease), transform var(--rlm-ease), box-shadow var(--rlm-ease);
    box-shadow: 0 3px 12px rgba(0,155,254,.25);
    margin-top: 6px;
}
.rl-modal-btn:hover:not(:disabled) {
    background: var(--rlm-blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 5px 18px rgba(0,155,254,.3);
}
.rl-modal-btn:disabled { opacity: .7; cursor: not-allowed; }
.rl-modal-btn svg { animation: rl-spin 1s linear infinite; }
@keyframes rl-spin { to { transform: rotate(360deg); } }

/* ── Séparateur ── */
.rl-modal-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 14px;
    color: var(--rlm-muted);
    font-size: 0.75rem;
}
.rl-modal-divider::before,
.rl-modal-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--rlm-border);
}

/* ── Liens bas ── */
.rl-modal-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    margin-top: 4px;
}
.rl-modal-links a {
    color: var(--rlm-blue);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity var(--rlm-ease);
}
.rl-modal-links a:hover { opacity: .75; }

.rl-modal-links-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}
.rl-modal-links-row span {
    color: var(--rlm-border);
    font-size: 0.75rem;
}

/* ── Bouton créer compte (plein largeur) ── */
.rl-modal-btn-secondary {
    width: 100%;
    height: 44px;
    background: var(--rlm-blue-light);
    color: var(--rlm-blue-dark);
    border: 1.5px solid var(--rlm-blue);
    border-radius: 9px;
    font-family: var(--rlm-font);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    transition: background var(--rlm-ease), transform var(--rlm-ease);
}
.rl-modal-btn-secondary:hover {
    background: #cce8ff;
    transform: translateY(-1px);
    color: var(--rlm-blue-dark);
}
