/* =====================================================
   VARIABLES CSS
   ===================================================== */

:root {
    --primary:          #1b4d4f;
    --primary-dark:     #163f41;
    --primary-light:    #2c7a7b;
    --accent:           #f97316;
    --gold:             #FCD116;

    --color-bg:         #edf2f2;
    --color-white:      #ffffff;
    --color-border:     #e5e7eb;
    --color-border-dk:  #d1d5db;
    --color-text:       #1b4d4f;
    --color-text-lt:    #6b7280;
    --color-text-muted: #9ca3af;

    --danger:           #dc2626;
    --danger-dark:      #991b1b;
    --success:          #166534;
    --success-bg:       #dcfce7;
    --warning:          #92400e;
    --warning-bg:       #fef3c7;

    --radius-sm:        6px;
    --radius-md:        10px;
    --radius-lg:        16px;
    --radius-xl:        20px;

    --shadow-card:      0 24px 64px rgba(27,77,79,0.18), 0 6px 20px rgba(0,0,0,0.07);
    --shadow-input:     0 0 0 3px rgba(27,77,79,0.10);
}


/* =====================================================
   RESET & BASE
   ===================================================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    height: 100%;
}

body {
    height: 100%;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    background: var(--color-bg);
    color: var(--color-text);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-7px); }
}


/* =====================================================
   CARTE DE LOGIN (conteneur principal)
   ===================================================== */

.container {
    display: flex;
    width: 100%;
    max-width: 900px;
    min-height: 520px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    animation: slideUp 0.55s ease;
}


/* =====================================================
   PANNEAU GAUCHE
   ===================================================== */

.left-panel {
    flex: 0 0 400px;
    background: url("../images/background.jpg") no-repeat center center;
    background-size: cover;
    position: relative;
    color: var(--color-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.pattern-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(22,63,65,0.95) 0%, rgba(27,77,79,0.88) 60%, rgba(44,122,123,0.82) 100%);
    z-index: 0;
}

/* cercles décoratifs */
.left-panel::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -60px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    z-index: 0;
}

.left-panel::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -50px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(249,115,22,0.06);
    z-index: 0;
}

.left-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px 36px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}


/* =====================================================
   DRAPEAU BURKINA FASO
   ===================================================== */

.bf-flag {
    position: relative;
    width: 80px;
    height: 54px;
    margin: 0 auto 20px auto;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.35);
    animation: float 4s ease-in-out infinite;
}

.bf-flag-red {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50%;
    background: #EF2B2D;
}

.bf-flag-green {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 50%;
    background: #009A44;
}

.bf-flag-star {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: #FCD116;
    font-size: 22px;
    line-height: 1;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}


/* =====================================================
   LOGO AUTHENMARK
   ===================================================== */

.brand-logo {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 8px;
    line-height: 1;
    text-shadow: 0 3px 14px rgba(0,0,0,0.25);
}

.brand-authen { color: #ffffff; }

.brand-mark {
    color: var(--accent);
    text-shadow: 0 2px 14px rgba(249,115,22,0.5);
}

.brand-slogan {
    font-size: 0.92rem;
    font-weight: 500;
    color: rgba(255,255,255,0.88);
    margin-bottom: 20px;
}

.left-divider {
    width: 48px;
    height: 2px;
    background: rgba(255,255,255,0.28);
    border-radius: 2px;
    margin: 0 auto 18px auto;
}

.brand-desc {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.70);
    margin-bottom: 24px;
    line-height: 1.7;
}

.gov-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 24px;
    padding: 8px 18px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,0.88);
    backdrop-filter: blur(6px);
}

.gov-badge i {
    font-size: 13px;
    color: var(--gold);
}


/* =====================================================
   PANNEAU DROIT — FORMULAIRE
   ===================================================== */

.right-panel {
    flex: 1;
    background: var(--color-white);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 48px 44px;
    overflow-y: auto;
}

.login-box {
    width: 100%;
    max-width: 380px;
}


/* =====================================================
   HEADER LOGIN
   ===================================================== */

.login-header {
    margin-bottom: 36px;
}

.login-logo {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    box-shadow: 0 4px 14px rgba(27,77,79,0.28);
}

.login-logo i {
    font-size: 22px;
    color: #ffffff;
}

.login-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

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


/* =====================================================
   MESSAGES D'ALERTE
   ===================================================== */

.messages-login {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.alert-login {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
}

.alert-login.alert-error {
    background: #fee2e2;
    color: var(--danger-dark);
    border-left: 4px solid var(--danger);
}

.alert-login.alert-success {
    background: var(--success-bg);
    color: var(--success);
    border-left: 4px solid #22c55e;
}

.alert-login.alert-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border-left: 4px solid #f59e0b;
}


/* =====================================================
   FORMULAIRE
   ===================================================== */

form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-group {
    margin-bottom: 20px;
}

/* label en majuscules avec icône */
.form-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.form-group label i {
    font-size: 11px;
}

/* champ texte simple */
.input-field {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--color-border-dk);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--color-text);
    background: #fafafa;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.input-field:focus {
    border-color: var(--primary);
    box-shadow: var(--shadow-input);
    background: var(--color-white);
}

.input-field::placeholder {
    color: var(--color-text-muted);
}

/* wrapper mot de passe (pour l'œil) */
.input-password-wrap {
    position: relative;
}

.input-password-wrap .input-field {
    padding-right: 44px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    font-size: 15px;
    padding: 4px;
    transition: color 0.2s;
}

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


/* =====================================================
   BOUTON CONNEXION
   ===================================================== */

.btn-login {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--color-white);
    border: none;
    padding: 13px 20px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 14px rgba(27,77,79,0.32);
    transition: filter 0.2s, transform 0.12s, box-shadow 0.2s;
}

.btn-login:hover {
    filter: brightness(1.08);
    box-shadow: 0 6px 20px rgba(27,77,79,0.40);
}

.btn-login:active {
    transform: scale(0.985);
    filter: brightness(0.95);
}


/* =====================================================
   FOOTER LOGIN
   ===================================================== */

.login-footer {
    margin-top: 28px;
    text-align: center;
    padding-top: 18px;
    border-top: 1px solid var(--color-border);
}

.login-footer p {
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.8;
}


/* =====================================================
   RESPONSIVE
   ===================================================== */

@media (max-width: 768px) {

    body { padding: 16px; align-items: flex-start; }

    .container {
        flex-direction: column;
        max-width: 100%;
        min-height: auto;
        border-radius: var(--radius-lg);
    }

    .left-panel {
        flex: none;
        height: 220px;
    }

    .left-content { padding: 24px 20px; }

    .brand-logo { font-size: 2rem; }

    .brand-desc, .left-divider { display: none; }

    .right-panel { padding: 32px 24px; }

    .login-box { max-width: 100%; }

}

@media (max-width: 480px) {

    .left-panel { height: 175px; }

    .bf-flag { display: none; }

    .brand-logo { font-size: 1.7rem; }

    .gov-badge { display: none; }

    .right-panel { padding: 24px 16px; }

    .login-header h2 { font-size: 1.4rem; }

}
