:root {
    --font-heading:'Plus Jakarta Sans',sans-serif; --font-body:'Plus Jakarta Sans',sans-serif; --font-script:'Caveat',cursive;
    --navy:#0f2942; --gray:#64748b; --border-soft:#e5eaf0; --bg-soft:#f7f9fc;
    --blue:#2563eb; --green:#16a34a; --green-dark:#15803d; --green-light:#dcfce7; --orange:#dc2626;
}
html[lang="ar"], [dir="rtl"] { --font-heading:'Cairo',sans-serif; --font-body:'Cairo',sans-serif; }
* { margin:0; padding:0; box-sizing:border-box; }

/* Photo plein écran (gérée par l'admin) — plus aucun fond blanc derrière la carte */
body.auth-body {
    font-family:var(--font-body); color:#334155; min-height:100vh;
    background:linear-gradient(150deg,var(--blue) 0%,var(--green) 55%,var(--orange) 100%) center/cover no-repeat fixed;
}
.auth-overlay { position:fixed; inset:0; background:linear-gradient(180deg,rgba(15,41,66,.55),rgba(15,41,66,.3) 50%,rgba(15,41,66,.65)); }

/* Tout est centré : horizontalement ET verticalement */
.auth-center { position:relative; z-index:2; min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1.4rem; padding:5rem 1rem 2rem; }

/* Langues en haut (PC / tablette / téléphone) */
.auth-lang { position:absolute; z-index:30; top:1rem; inset-inline-end:1rem; }

.auth-card { width:100%; max-width:460px; background:rgba(255,255,255,.97); border-radius:22px; padding:2rem 2.2rem 2.2rem; box-shadow:0 24px 60px rgba(0,0,0,.28); }

/* Logo + PAEPTEM à l'intérieur de la carte, centrés en haut */
.auth-brand { display:flex; align-items:center; justify-content:center; gap:.7rem; text-decoration:none; margin-bottom:1.3rem; }
.auth-logo { height:50px; width:auto; }
.auth-brand-name { font-family:var(--font-heading); font-size:1.7rem; font-weight:800; color:var(--navy); letter-spacing:.04em; }

.auth-card h1 { font-family:var(--font-heading); font-size:1.45rem; font-weight:800; color:var(--navy); text-align:center; margin-bottom:.3rem; }
.auth-card-subtitle { color:var(--gray); font-size:.9rem; text-align:center; margin-bottom:1.5rem; }

.auth-form .auth-field { margin-bottom:1.05rem; }
.auth-form label { display:block; font-weight:600; color:var(--navy); font-size:.85rem; margin-bottom:.4rem; }
.auth-form input[type="text"],.auth-form input[type="email"],.auth-form input[type="password"],.auth-form input[type="tel"],.auth-form select {
    width:100%; padding:.75rem 1rem; border:1px solid var(--border-soft); border-radius:10px; font-family:var(--font-body); font-size:.92rem; background:#fff;
}
.auth-form input:focus,.auth-form select:focus { outline:none; border-color:var(--green); }

.profile-select-group { display:grid; grid-template-columns:repeat(3,1fr); gap:.7rem; }
.profile-radio-input { position:absolute; opacity:0; width:1px; height:1px; }
.profile-radio-card { display:flex; flex-direction:column; align-items:center; gap:.5rem; padding:.8rem .4rem; border:2px solid var(--border-soft); border-radius:14px; cursor:pointer; transition:all .2s; text-align:center; }
.profile-radio-card span:last-child { font-size:.8rem; font-weight:600; color:var(--navy); }
.profile-radio-input:checked + .profile-radio-card { border-color:var(--green); background:var(--green-light); }
.profile-radio-input:focus-visible + .profile-radio-card { outline:2px solid var(--green); outline-offset:2px; }
.profile-radio-icon { width:36px; height:36px; border-radius:50%; display:flex; align-items:center; justify-content:center; color:#fff; font-size:.95rem; }
.icon-badge-blue { background:var(--blue); } .icon-badge-green { background:var(--green); } .icon-badge-orange { background:var(--orange); }
.auth-hint { font-size:.74rem; color:var(--gray); margin-top:.4rem; }

.auth-row-between { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:1.3rem; flex-wrap:wrap; }
.auth-checkbox-label { display:flex !important; align-items:center; gap:.5rem; font-size:.85rem !important; color:#475569 !important; font-weight:500 !important; margin:0 !important; }
.auth-link { color:var(--green-dark); font-size:.85rem; text-decoration:none; font-weight:600; }
.auth-link:hover { text-decoration:underline; }

.auth-btn-primary { width:100%; padding:.9rem; background:var(--green); color:#fff; border:none; border-radius:12px; font-family:var(--font-body); font-weight:700; font-size:.95rem; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:.5rem; transition:background .2s; }
.auth-btn-primary:hover { background:var(--green-dark); }
.auth-divider { display:flex; align-items:center; gap:.8rem; margin:1.1rem 0; color:var(--gray); font-size:.8rem; }
.auth-divider::before,.auth-divider::after { content:''; flex:1; height:1px; background:var(--border-soft); }
.auth-btn-secondary { width:100%; padding:.85rem; background:var(--bg-soft); color:var(--navy); border:1px solid var(--border-soft); border-radius:12px; font-weight:700; font-size:.9rem; display:flex; align-items:center; justify-content:center; gap:.5rem; text-decoration:none; transition:all .2s; }
.auth-btn-secondary:hover { border-color:var(--navy); }
.auth-switch { text-align:center; font-size:.88rem; color:var(--gray); margin-top:1.3rem; }
.auth-switch a { color:var(--green-dark); font-weight:600; text-decoration:none; }
[dir="rtl"] .fa-arrow-right { transform:scaleX(-1); }

/* Textes sous la carte (gérés par l'admin) */
.auth-caption { text-align:center; color:#fff; max-width:460px; text-shadow:0 2px 10px rgba(0,0,0,.4); }
.auth-quote { font-family:var(--font-script); font-size:1.7rem; line-height:1.25; }
.auth-text { font-size:.9rem; margin-top:.4rem; }

@media (max-width:480px) { .auth-card { padding:1.6rem 1.2rem; }   }

/* ===== Langue : 1 bouton drapeau rond + menu de drapeaux (sans texte) ===== */
.lang-dd { position:relative; }
.lang-current { display:inline-flex; align-items:center; gap:.4rem; padding:.22rem .6rem .22rem .25rem; background:rgba(255,255,255,.92); border:1px solid #e5eaf0; border-radius:50px; cursor:pointer; }
.lang-current:hover { border-color:#16a34a; }
.lang-caret { font-size:.65rem; color:#0f2942; transition:transform .2s; }
.lang-dd.open .lang-caret { transform:rotate(180deg); }
.flag { width:28px; height:28px; border-radius:50%; object-fit:cover; display:block; box-shadow:0 0 0 1px rgba(15,41,66,.15); }
.lang-menu { position:absolute; top:calc(100% + .45rem); inset-inline-end:0; display:none; flex-direction:column; gap:.45rem; padding:.5rem; background:#fff; border-radius:40px; box-shadow:0 12px 30px rgba(15,41,66,.2); z-index:200; }
.lang-dd.open .lang-menu { display:flex; }
.lang-opt { display:block; border-radius:50%; transition:transform .15s; }
.lang-opt:hover { transform:scale(1.12); }

/* ===== Choix du compte à la connexion : Étudiant = bleu · Patient = vert · Touriste = rouge ===== */
.login-profils { display:grid; grid-template-columns:repeat(3,1fr); gap:.6rem; }
.login-profils .profile-radio-card { position:relative; flex-direction:column; text-align:center; gap:.45rem; padding:.9rem .4rem; border:2px solid #e2e8f0; border-radius:14px; background:#fff; cursor:pointer; font-weight:800; font-size:.82rem; transition:.15s; display:flex; align-items:center; }
.login-profils .profile-radio-icon { width:42px; height:42px; border-radius:12px; display:flex; align-items:center; justify-content:center; color:#fff; font-size:1.1rem; }
.login-profils .pr-etudiant .profile-radio-icon { background:#2563eb; }
.login-profils .pr-patient  .profile-radio-icon { background:#16a34a; }
.login-profils .pr-touriste .profile-radio-icon { background:#dc2626; }
.login-profils .pr-check { position:absolute; top:.4rem; inset-inline-end:.45rem; font-size:1rem; opacity:0; transition:.15s; }
.login-profils .profile-radio-input { position:absolute; opacity:0; width:1px; height:1px; }
.login-profils .profile-radio-input:checked + .pr-etudiant { border-color:#2563eb; background:#eff6ff; color:#1d4ed8; box-shadow:0 0 0 3px #dbeafe; }
.login-profils .profile-radio-input:checked + .pr-patient  { border-color:#16a34a; background:#f0fdf4; color:#15803d; box-shadow:0 0 0 3px #dcfce7; }
.login-profils .profile-radio-input:checked + .pr-touriste { border-color:#dc2626; background:#fef2f2; color:#b91c1c; box-shadow:0 0 0 3px #fee2e2; }
.login-profils .profile-radio-input:checked + .profile-radio-card .pr-check { opacity:1; }
.login-profils .profile-radio-input:focus-visible + .profile-radio-card { outline:2px solid #0f2942; outline-offset:2px; }
.login-vers-ok { font-weight:800; color:#0f2942; }
/* le bouton « Se connecter » prend la couleur du compte choisi */
body[data-profil="etudiant"] .auth-btn-primary { background:#2563eb; }
body[data-profil="patient"]  .auth-btn-primary { background:#16a34a; }
body[data-profil="touriste"] .auth-btn-primary { background:#dc2626; }
@media (max-width:420px){ .login-profils .profile-radio-card span:last-of-type { font-size:.74rem; } }
