/* ============================================================
   login.css — Styles partagés pages de connexion (admin + advertiser)
   ============================================================ */

body {
    background-color: var(--bg-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    gap: 1rem;
    padding: 2rem 1rem;
    box-sizing: border-box;
}

/* ── Container principal ──────────────────────────────────── */

.login-container {
    background: var(--white);
    padding: 3rem;
    border-radius: 1.5rem;
    width: 100%;
    max-width: 440px;
    text-align: center;
    border: 1px solid var(--border-color);
}

/* ── Logo animé ───────────────────────────────────────────── */

.login-logo {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.login-logo img {
    height: 48px;
    object-fit: contain;
}

.logo-bar {
    position: relative;
    width: 100%;
    max-width: 60px;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    margin: 0 auto;
}

.layer {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    height: 100%;
    border-radius: 0 999px 999px 0;
}

@keyframes flow-vert {
    0%, 100% { width: 22%; }
    50%       { width: 42%; }
}

@keyframes flow-jaune {
    0%, 100% { width: 48%; }
    50%       { width: 66%; }
}

@keyframes flow-orange {
    0%, 100% { width: 74%; }
    50%       { width: 90%; }
}

.layer-4 {
    width: 100%;
    background-color: #ff5e4d;
    z-index: 1;
}

.layer-3 {
    animation: flow-orange 4s ease-in-out infinite alternate;
    background-color: #fa9e4f;
    z-index: 2;
    animation-delay: 0.2s;
}

.layer-2 {
    animation: flow-jaune 4s ease-in-out infinite alternate;
    background-color: #f9d448;
    z-index: 3;
    animation-delay: 0.1s;
}

.layer-1 {
    animation: flow-vert 4s ease-in-out infinite alternate;
    background-color: #17c3a5;
    z-index: 4;
    border-radius: 999px;
    animation-delay: 0s;
}

/* ── Header ───────────────────────────────────────────────── */

.login-header {
    margin-bottom: 2.5rem;
}

.login-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-light);
    font-size: 0.9375rem;
}

/* ── Formulaire ───────────────────────────────────────────── */

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    color: var(--text-dark);
    transition: all 0.2s;
    outline: none;
    box-sizing: border-box;
}

.form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 41, 59, 0.1);
}

/* ── Checkbox "Rester connecté" ───────────────────────────── */

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-align: left;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 1.5px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    background: var(--white);
}

.remember-me input[type="checkbox"]:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.remember-me input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1.5px;
    width: 5px;
    height: 10px;
    border: solid var(--white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.remember-me input[type="checkbox"]:hover {
    border-color: var(--primary-color);
}

.remember-me span {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
    user-select: none;
}

/* ── Bouton de connexion ──────────────────────────────────── */

.btn-login {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 0.875rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 0.5rem;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn-login:hover {
    background-color: var(--primary-hover);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── Lien mot de passe oublié ─────────────────────────────── */

.forgot-password {
    margin-top: 1.5rem;
    font-size: 0.875rem;
}

.forgot-password a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-password a:hover {
    color: var(--primary-color);
}

/* ── Alertes inline ───────────────────────────────────────── */

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.875rem 1rem;
    border-radius: 0.625rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: left;
    margin-bottom: 0.5rem;
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.login-alert-error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ── Bandeau beta ─────────────────────────────────────────── */

.beta-banner {
    width: 100%;
    max-width: 440px;
    padding: 0.75rem 1rem;
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 0.625rem;
    color: #92400e;
    font-size: 0.8125rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.5;
    box-sizing: border-box;
}

/* ── Utilitaires ──────────────────────────────────────────── */

.hidden {
    display: none;
}
