/* ============================================================
   SIHATI.DZ - STYLE "ZEN-MÉDICAL" (SOFT, CLAIR & FLUIDE)
   ============================================================ */

:root {
    --primary: #0077b6;
    --secondary: #00b386;
    --text-dark: #34495e;       /* Gris foncé doux (remplace le noir) */
    --text-light: #7f8c8d;
    --bg-page: #f8fafb;
    --white: #ffffff;
    --radius: 30px;
}

* {
    margin: 0; padding: 0; box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--bg-page);
    background-image: 
        radial-gradient(at 0% 0%, rgba(0, 179, 134, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(0, 119, 182, 0.05) 0px, transparent 50%);
    color: var(--text-dark);
    line-height: 1.6;
}

/* =========================== HEADER (PREND TOUT L'ÉCRAN) =========================== */
header {
    min-height: 95vh; /* Presque tout l'écran pour voir un peu le début du scroll */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 5%;
}

.connecter {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 800;
    text-align: center;
    color: var(--text-dark);
    margin-bottom: 40px;
    letter-spacing: -1px;
    animation: fadeInDown 0.8s ease forwards;
}

.connecter span {
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    
    /* 1. Coupe l'arrière-plan pour suivre la forme des lettres */
    -webkit-background-clip: text;
    background-clip: text;
    
    /* 2. Rend la couleur du texte transparente pour laisser voir le dégradé dessous */
    -webkit-text-fill-color: transparent;
    
    /* 3. Sécurité pour les vieux navigateurs qui ne supportent pas le clip */
    color: var(--secondary); 
}

/* ===================== LA CARTE (BIGBOX) ===================== */
.bigbox {
    display: flex;
    width: 100%;
    max-width: 1100px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.02);
    animation: slideUp 1s cubic-bezier(0.2, 1, 0.2, 1);
}

.box1, .box2 {
    flex: 1;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* BOX GAUCHE : CONNEXION */
.box1 {
    background: var(--white);
}

/* BOX DROITE : INSCRIPTION (SOFT MEDICAL) */
.box2 {
    background: linear-gradient(135deg, #f0fdf9 0%, #e6fffa 100%);
    border-left: 1px solid rgba(0, 179, 134, 0.1);
}

/* ===================== TYPO & INPUTS ===================== */
.P01 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--primary);
}

.box2 .P01 { color: var(--secondary); }

.P02 {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

.divP03 {
    margin-bottom: 20px;
    position: relative; /* CRUCIAL pour l'oeil */
}

.P03 {
    width: 100%;
    height: 60px;
    background: #f1f5f9;
    border: 2px solid transparent;
    border-radius: 18px;
    padding: 0 50px 0 20px; /* On laisse de la place à droite pour l'oeil */
    font-size: 1rem;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.P03:focus {
    outline: none;
    background: var(--white);
    border-color: var(--secondary);
    box-shadow: 0 10px 20px rgba(0, 179, 134, 0.05);
}

/* L'OEIL DU MOT DE PASSE (PARFAITEMENT PLACÉ) */
.password-container .toggle-password {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.3rem;
    color: var(--secondary);
    z-index: 10;
    transition: 0.3s;
}

.password-container .toggle-password:hover {
    transform: translateY(-50%) scale(1.1);
}

/* ===================== BOUTONS ===================== */
.boutton {
    width: 100%;
    height: 60px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 18px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 10px 20px rgba(0, 119, 182, 0.15);
}

.boutton:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(0, 179, 134, 0.2);
}

.boutton2 {
    display: inline-block;
    background: var(--white);
    color: var(--secondary);
    padding: 18px 40px;
    border-radius: 18px;
    text-decoration: none;
    font-weight: 800;
    text-align: center;
    border: 2px solid var(--secondary);
    transition: 0.3s ease;
}

.boutton2:hover {
    background: var(--secondary);
    color: white;
    transform: scale(1.03);
}

/* OPTIONS */
.options-connexion {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
}

/* LISTE (P09) */
.P09 {
    margin-bottom: 15px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.P09::before {
    content: "•";
    color: var(--secondary);
    font-size: 25px;
    line-height: 0;
}

/* ANIMATIONS */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ON CACHE L'IMAGE CENTRALE */
.women { display: none; }

/* ============================================================
   OPTIMISATION RESPONSIVE "ZEN-MOBILE"
   ============================================================ */

@media (max-width: 900px) {
    header {
        min-height: auto;
        padding: 40px 15px;
    }

    .connecter {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }

    .bigbox {
        flex-direction: column; /* Empilement vertical */
        max-width: 100%;
        border-radius: 20px; /* On réduit un peu l'arrondi sur mobile */
    }

    .box1, .box2 {
        padding: 40px 20px; /* Padding réduit pour gagner de la place */
        flex: none;
        width: 100%;
    }

    .box2 {
        border-left: none;
        border-top: 1px solid rgba(0, 179, 134, 0.1); /* Séparation horizontale */
    }

    .P01 {
        font-size: 22px;
        text-align: center;
    }

    .P02 {
        text-align: center;
        font-size: 0.9rem;
    }

    .options-connexion {
        flex-direction: column; /* "Se souvenir de moi" et "Oublié" l'un sur l'autre */
        gap: 15px;
        align-items: center;
    }

    /* Ajustement des boutons pour qu'ils soient faciles à cliquer au pouce */
    .boutton, .boutton2 {
        height: 55px;
        font-size: 1rem;
    }
}

/* Pour les très petits téléphones */
@media (max-width: 400px) {
    .P09 {
        font-size: 0.85rem;
    }
}
[dir="rtl"] .P03 {
    padding: 0 20px 0 50px; /* On inverse le padding pour l'œil à gauche */
}

[dir="rtl"] .password-container .toggle-password {
    right: auto;
    left: 20px; /* L'œil passe à gauche */
}

[dir="rtl"] .P09::before {
    margin-left: 12px;
    margin-right: 0;
}
/* Correction esthétique pour le mode readonly anti-autofill */
.P03[readonly] {
    cursor: pointer;
    background-color: #f1f5f9; /* Garde la couleur de fond intacte */
}

.P03:not([readonly]) {
    cursor: text;
}

/* Cacher proprement les champs pièges pour ne pas casser le layout */
input[name="prevent_autofill_email"], 
input[name="prevent_autofill_pass"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
/* Alerte de message moderne */

.login-alert {
    background: #ff7675;
    color: white;
    padding: 18px 25px;
    text-align: center;
    font-weight: 600;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 500px;
    border-radius: 20px;
    z-index: 9999;
    box-shadow: 0 15px 35px rgba(255, 118, 117, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInDown 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Gestion de la croix pour RTL/LTR */
[dir="rtl"] .login-alert i {
    margin-left: 0;
    margin-right: 15px;
}

[dir="ltr"] .login-alert i {
    margin-left: 15px;
}