/*
 * auth.css — Pages d'authentification EVENEPASS (login / register / completion).
 *
 * Design auto-contenu (ne depend pas du bundle Bootstrap BARREN) inspire de la
 * finition MIKROTUNNEL, re-thematise a la charte EVENEPASS : navy #1c1830,
 * vert #35a936, texte #545454. Structure : banniere visuelle fixe a gauche,
 * carte de formulaire centree a droite. Chargee apres les feuilles BARREN.
 */

:root {
    --evp-navy: #1c1830;
    --evp-navy-2: #2a2442;
    --evp-green: #35a936;
    --evp-green-dark: #2d8f2e;
    --evp-green-bg: rgba(53, 169, 54, 0.10);
    --evp-text: #545454;
    --evp-line: #e3e3ec;
    --evp-field-bg: #fafafb;
}

* { box-sizing: border-box; }

body.evp-auth {
    margin: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    color: var(--evp-text);
    background: #fff;
    min-height: 100vh;
    display: flex;
}

/* ===== Banniere visuelle (gauche) ================================== */
.evp-auth-banner {
    display: none;
    width: 42%;
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    overflow: hidden;
}
.evp-auth-banner img.evp-auth-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.evp-auth-banner .evp-auth-overlay {
    position: absolute;
    inset: 0;
    /* Voile CLAIR : l'image reste lumineuse et visible ; seuls le haut (logo) et
       le bas (accroche) recoivent un leger degrade navy pour la lisibilite. */
    background: linear-gradient(180deg, rgba(28, 24, 48, 0.34) 0%, rgba(28, 24, 48, 0.08) 22%, rgba(28, 24, 48, 0) 52%, rgba(28, 24, 48, 0.62) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 44px;
}
.evp-auth-overlay .evp-auth-brand img { height: 40px; width: auto; }
.evp-auth-overlay .evp-auth-tagline {
    color: #fff;
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.25;
    max-width: 420px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}
.evp-auth-overlay .evp-auth-tagline .evp-accent { color: var(--evp-green); }

/* ===== Panneau formulaire (droite) ================================= */
.evp-auth-panel {
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #fff;
}
.evp-auth-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 32px 0;
    gap: 16px;
}
.evp-auth-topbar .evp-auth-toplogo img { height: 34px; width: auto; }

.evp-auth-container {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 32px 32px;
}
.evp-auth-box { width: 100%; max-width: 440px; }

/* Logo affiche dans la carte (visible surtout en mobile, banniere masquee) */
.evp-auth-logo { display: none; margin: 0 auto 22px; height: 40px; width: auto; }

.evp-auth-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--evp-navy);
    margin: 0 0 4px;
}
.evp-auth-subtitle {
    font-size: 0.92rem;
    color: #8a86a0;
    margin: 0 0 22px;
}

/* ===== Champs ====================================================== */
.evp-field { margin-bottom: 16px; }
.evp-field > label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--evp-navy);
    margin-bottom: 7px;
}
.evp-field input,
.evp-field select {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1.5px solid var(--evp-line);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--evp-text);
    background: var(--evp-field-bg);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    appearance: none;
    -webkit-appearance: none;
}
.evp-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238a86a0' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
    cursor: pointer;
}
.evp-field input:focus,
.evp-field select:focus {
    outline: none;
    border-color: var(--evp-green);
    box-shadow: 0 0 0 3px var(--evp-green-bg);
    background: #fff;
}
.evp-field input::placeholder { color: #b3b0c2; }
.evp-field .evp-hint {
    display: block;
    font-size: 0.78rem;
    color: #9a96ac;
    margin-top: 6px;
}

/* Champ mot de passe avec oeil */
.evp-pass { position: relative; }
.evp-pass input { padding-right: 44px; }
.evp-eye {
    position: absolute;
    top: 0;
    right: 0;
    height: 48px;
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a7a2bb;
    cursor: pointer;
    background: none;
    border: 0;
}
.evp-eye:hover { color: var(--evp-navy); }

/* Grille 2 colonnes */
.evp-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Ligne telephone : indicatif accole */
.evp-phone { display: flex; gap: 10px; align-items: stretch; }
.evp-phone-prefix {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 84px;
    padding: 0 12px;
    border: 1.5px solid var(--evp-green);
    border-radius: 10px;
    background: var(--evp-green-bg);
    color: var(--evp-green-dark);
    font-weight: 700;
    font-size: 0.92rem;
    white-space: nowrap;
}
.evp-phone-prefix img.evp-flag {
    width: 22px;
    height: 15px;
    border-radius: 2px;
    object-fit: cover;
    display: none;
}
.evp-phone input { flex: 1; min-width: 0; }

/* Ligne label + lien (mot de passe oublie) */
.evp-field-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}
.evp-field-head .evp-forgot {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--evp-green-dark);
    text-decoration: none;
}
.evp-field-head .evp-forgot:hover { text-decoration: underline; }

/* Case a cocher */
.evp-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
    color: var(--evp-text);
    cursor: pointer;
    margin: 4px 0 6px;
}
.evp-check input { width: 17px; height: 17px; accent-color: var(--evp-green); cursor: pointer; }

.evp-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 8px;
}

/* ===== Boutons ===================================================== */
.evp-auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 50px;
    margin-top: 8px;
    border: 0;
    border-radius: 10px;
    background: var(--evp-green);
    color: #fff;
    font-size: 0.98rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.08s ease;
    text-decoration: none;
}
.evp-auth-btn:hover { background: var(--evp-green-dark); }
.evp-auth-btn:active { transform: scale(0.99); }

.evp-auth-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 48px;
    border: 1.5px solid var(--evp-line);
    border-radius: 10px;
    background: #fff;
    color: var(--evp-navy);
    font-size: 0.92rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.evp-auth-google:hover { background: #f8f8fb; border-color: #cfccda; }
.evp-auth-google svg { width: 18px; height: 18px; }

/* ===== Divider ===================================================== */
.evp-auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 18px 0;
    color: #a7a2bb;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.evp-auth-divider::before,
.evp-auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--evp-line);
}

/* ===== Liens / bascule ============================================= */
.evp-auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: #8a86a0;
}
.evp-auth-switch a { color: var(--evp-green-dark); font-weight: 600; text-decoration: none; }
.evp-auth-switch a:hover { text-decoration: underline; }

.evp-auth-toplink { font-size: 0.88rem; color: #8a86a0; }
.evp-auth-toplink a { color: var(--evp-green-dark); font-weight: 600; text-decoration: none; }
.evp-auth-toplink a:hover { text-decoration: underline; }

/* ===== Selecteur de langue ========================================= */
.evp-auth-lang { font-size: 0.84rem; font-weight: 600; }
.evp-auth-lang a { color: #9a96ac; text-decoration: none; padding: 0 3px; }
.evp-auth-lang a.active { color: var(--evp-green-dark); }
.evp-auth-lang span { color: #d0ced9; }

/* ===== Alertes ===================================================== */
.evp-alert {
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 0.86rem;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 9px;
}
.evp-alert ul { margin: 0; padding-left: 18px; }
.evp-alert-danger { background: #fdecec; color: #c0392b; border: 1px solid #f5c9c4; }
.evp-alert-success { background: var(--evp-green-bg); color: var(--evp-green-dark); border: 1px solid rgba(53, 169, 54, 0.28); }
.evp-alert-info { background: #eef4fb; color: #2c5aa0; border: 1px solid #cfe0f2; }
.evp-alert-google { background: #f6f7fb; color: var(--evp-navy); border: 1px solid var(--evp-line); font-weight: 600; }

/* ===== Pied de panneau ============================================= */
.evp-auth-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 32px 22px;
    font-size: 0.8rem;
    color: #a7a2bb;
    flex-wrap: wrap;
}
.evp-auth-foot strong { color: var(--evp-navy); }

/* ===== Barre haute droite (lien + bascule de theme) =============== */
.evp-auth-topright { display: flex; align-items: center; gap: 16px; }
.evp-auth-theme {
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 1.5px solid var(--evp-line);
    background: transparent;
    color: var(--evp-navy);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex: 0 0 auto;
    transition: border-color .15s ease, color .15s ease;
}
.evp-auth-theme:hover { border-color: var(--evp-green); color: var(--evp-green-dark); }
.evp-auth-theme .fa-sun { display: none; }

/* ===== Logo net en clair ET en sombre (deux visuels permutes) ===== */
.evp-logo-dark { display: none; }
.evp-auth-toplogo .evp-logo-light,
.evp-auth-toplogo .evp-logo-dark { height: 34px; width: auto; }

/* ===== Responsive ================================================== */
@media (min-width: 992px) {
    .evp-auth-banner { display: block; }
    .evp-auth-panel { margin-left: 42%; }
}
@media (max-width: 991.98px) {
    .evp-auth-logo.evp-logo-light { display: block; }
    .evp-auth-logo.evp-logo-dark { display: none; }
    .evp-auth-topbar .evp-auth-toplogo { display: none; }
}

/* ================================================================== */
/* ===== THEME SOMBRE (panneau de droite ; l'image reste a gauche) == */
/* ================================================================== */
html[data-theme="dark"] { --evp-line: #2e2942; --evp-field-bg: #201b31; }

html[data-theme="dark"] body.evp-auth,
html[data-theme="dark"] .evp-auth-panel { background: #17131f; }

/* Permutation des logos nets selon le theme */
html[data-theme="dark"] .evp-logo-light { display: none; }
html[data-theme="dark"] .evp-auth-toplogo .evp-logo-dark { display: block; }
@media (max-width: 991.98px) {
    html[data-theme="dark"] .evp-auth-logo.evp-logo-light { display: none; }
    html[data-theme="dark"] .evp-auth-logo.evp-logo-dark { display: block; }
}

/* Bascule de theme : soleil en sombre */
html[data-theme="dark"] .evp-auth-theme { color: #cfcbe0; }
html[data-theme="dark"] .evp-auth-theme .fa-moon { display: none; }
html[data-theme="dark"] .evp-auth-theme .fa-sun { display: inline-block; color: #f4c430; }

/* Textes & champs */
html[data-theme="dark"] .evp-auth-title { color: #f2f1f7; }
html[data-theme="dark"] .evp-auth-subtitle { color: #948fac; }
html[data-theme="dark"] .evp-field > label { color: #e7e5f0; }
html[data-theme="dark"] .evp-field .evp-hint { color: #8983a3; }
html[data-theme="dark"] .evp-field input,
html[data-theme="dark"] .evp-field select { background: #201b31; border-color: #2e2942; color: #d7d3e6; }
html[data-theme="dark"] .evp-field input:focus,
html[data-theme="dark"] .evp-field select:focus { background: #241f38; border-color: var(--evp-green); }
html[data-theme="dark"] .evp-field input::placeholder { color: #6f6a86; }
html[data-theme="dark"] .evp-eye { color: #8983a3; }
html[data-theme="dark"] .evp-eye:hover { color: #fff; }

/* Boutons & separateurs */
html[data-theme="dark"] .evp-auth-google { background: #201b31; border-color: #2e2942; color: #e7e5f0; }
html[data-theme="dark"] .evp-auth-google:hover { background: #241f38; border-color: #3a3452; }
html[data-theme="dark"] .evp-auth-divider { color: #7d7796; }
html[data-theme="dark"] .evp-auth-divider::before,
html[data-theme="dark"] .evp-auth-divider::after { background: #2e2942; }

/* Liens, cases, pied */
html[data-theme="dark"] .evp-check { color: #c4c0d6; }
html[data-theme="dark"] .evp-auth-switch { color: #948fac; }
html[data-theme="dark"] .evp-auth-toplink { color: #948fac; }
html[data-theme="dark"] .evp-auth-foot { color: #7d7796; }
html[data-theme="dark"] .evp-auth-foot strong { color: #e7e5f0; }
html[data-theme="dark"] .evp-auth-lang a { color: #948fac; }
@media (max-width: 520px) {
    .evp-grid-2 { grid-template-columns: 1fr; }
    .evp-auth-container { padding: 20px 18px 24px; }
    .evp-auth-topbar { padding: 18px 18px 0; }
    .evp-auth-foot { padding: 14px 18px 20px; }
}

/* Case d'acceptation des conditions (CGU/CGV) — inscription + completion Google. */
.evp-check-terms { align-items: flex-start; gap: 10px; margin: 6px 0 20px; line-height: 1.45; }
.evp-check-terms input { margin-top: 2px; }
.evp-check-terms a { color: var(--evp-green-dark); font-weight: 600; text-decoration: underline; }
