/* ================================================================
       EURORESIL — CSS page de connexion
       À externaliser dans : public/css/euroresil-login.css
       ou à fusionner avec : public/css/euroresil.css
       ================================================================ */

/* ── Reset & base ─────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: 'Figtree', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #12182B;
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

/* ── Variables EURORESIL ──────────────────────────────────────── */
:root {
    --er-blue:        #2747DC;
    --er-blue-deep:   #1a33a8;
    --er-blue-light:  #3a5df0;
    --er-blue-soft:   #E7EBFB;
    --er-amber:       #FFB22E;
    --er-ink:         #12182B;
    --er-ink-soft:    #5C6072;
    --er-ink-muted:   #9CA3AF;
    --er-bg:          #F4F3EC;
    --er-white:       #FFFFFF;
    --er-line:        #E3E0D5;
    --er-line-light:  #F0EDE8;
}

/* ── Layout principal — split 2 colonnes ──────────────────────── */
.er-login-page {
    display: flex;
    min-height: 100vh;
    background: #fff;
}

/* ================================================================
   PANNEAU GAUCHE — Présentation du service
   ================================================================ */
.er-hero {
    flex: 1 1 0%;
    background: linear-gradient(145deg, #1a33a8 0%, #2747DC 50%, #3558ee 100%);
    position: relative;
    display: flex;
    overflow: hidden;
}

/* Cercles décoratifs en fond */
.er-hero::before {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,178,46,.18) 0%, transparent 70%);
    pointer-events: none;
}

.er-hero::after {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.07) 0%, transparent 70%);
    pointer-events: none;
}

.er-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 36px 48px;
}

/* ── Logo ─────────────────────────────────────────────────────── */
.er-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-bottom: 0;
}

.er-logo-tile {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, .14);
    border: 1.5px solid rgba(255, 255, 255, .24);
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    backdrop-filter: blur(8px);
}

.er-logo-wordmark {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 19px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.3px;
    line-height: 1;
}

.er-logo-wordmark b {
    color: var(--er-amber);
    font-weight: 800;
}

/* ── Contenu hero ─────────────────────────────────────────────── */
.er-hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 0;
}

.er-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 178, 46, .18);
    color: var(--er-amber);
    border: 1px solid rgba(255, 178, 46, .32);
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 22px;
    width: fit-content;
}

.er-hero-badge svg {
    flex-shrink: 0;
}

.er-hero-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: clamp(26px, 3vw, 42px);
    font-weight: 800;
    color: #fff;
    line-height: 1.18;
    letter-spacing: -.5px;
    margin-bottom: 18px;
}

.er-hero-title .highlight {
    color: var(--er-amber);
}

.er-hero-subtitle {
    color: rgba(255, 255, 255, .76);
    font-size: 15px;
    line-height: 1.68;
    margin-bottom: 32px;
    max-width: 460px;
}

/* ── Blocs feature ────────────────────────────────────────────── */
.er-features {
    display: flex;
    flex-direction: column;
    gap: 11px;
    margin-bottom: 30px;
}

.er-feature {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: rgba(255, 255, 255, .09);
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 14px;
    padding: 14px 18px;
    transition: background .2s ease;
    cursor: default;
}

.er-feature:hover {
    background: rgba(255, 255, 255, .14);
}

.er-feature-icon {
    font-size: 22px;
    flex-shrink: 0;
    margin-top: 1px;
    line-height: 1;
}

.er-feature-title {
    display: block;
    color: #fff;
    font-size: 13.5px;
    font-weight: 700;
    margin-bottom: 3px;
    line-height: 1.3;
}

.er-feature-desc {
    color: rgba(255, 255, 255, .66);
    font-size: 12.5px;
    line-height: 1.5;
}

/* ── Badges de confiance ──────────────────────────────────────── */
.er-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.er-trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
    font-weight: 600;
}

.er-trust-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: rgba(255, 255, 255, .15);
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Footer panneau gauche ────────────────────────────────────── */
.er-hero-footer {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, .14);
    flex-wrap: wrap;
    margin-top: auto;
}

.er-hero-footer a {
    color: rgba(255, 255, 255, .58);
    text-decoration: none;
    font-size: 12.5px;
    transition: color .2s;
}

.er-hero-footer a:hover {
    color: #fff;
}

.er-hero-footer-sep {
    color: rgba(255, 255, 255, .28);
    font-size: 12.5px;
    user-select: none;
}

.er-hero-footer-copy {
    color: rgba(255, 255, 255, .28);
    font-size: 12px;
}

/* ================================================================
   PANNEAU DROIT — Formulaire de connexion
   ================================================================ */
.er-form-panel {
    flex: 0 0 420px;
    min-width: 340px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid var(--er-line);
    padding: 40px 24px;
}

.er-form-inner {
    width: 100%;
    max-width: 346px;
}

/* ── En-tête formulaire ───────────────────────────────────────── */
.er-form-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: var(--er-ink);
    margin-bottom: 4px;
    letter-spacing: -.3px;
}

.er-form-subtitle {
    color: var(--er-ink-muted);
    font-size: 14px;
    margin-bottom: 26px;
}

/* ── Alerte d'erreur ──────────────────────────────────────────── */
/*
  TWIG : {% if error %}
  <div class="er-alert-error">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
  {% endif %}
*/
.er-alert-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #B91C1C;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Démonstration visuelle de l'erreur */
.er-alert-demo {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #B91C1C;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 18px;
}

/* ── Champs de formulaire ─────────────────────────────────────── */
.er-field {
    margin-bottom: 18px;
}

.er-label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--er-ink);
    margin-bottom: 7px;
}

.er-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 7px;
}

.er-label-row .er-label {
    margin-bottom: 0;
}

.er-forgot-link {
    font-size: 12.5px;
    color: var(--er-blue);
    text-decoration: none;
    font-weight: 500;
    transition: opacity .2s;
    /*
      TWIG : href="{{ path('app_forgot_password') }}"
    */
}

.er-forgot-link:hover {
    opacity: .75;
    text-decoration: underline;
}

.er-input {
    display: block;
    width: 100%;
    padding: 11px 14px;
    font-size: 14.5px;
    font-family: 'Figtree', sans-serif;
    color: var(--er-ink);
    background: #FAFAFA;
    border: 1.5px solid var(--er-line);
    border-radius: 10px;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
    appearance: none;
    -webkit-appearance: none;
}

.er-input::placeholder {
    color: var(--er-ink-muted);
}

.er-input:focus {
    border-color: var(--er-blue);
    box-shadow: 0 0 0 3px rgba(39, 71, 220, .12);
    background: #fff;
}

.er-input:hover:not(:focus) {
    border-color: #C9C5BC;
}

/* Champ mot de passe avec toggle visibilité */
.er-input-pw-wrap {
    position: relative;
}

.er-input-pw-wrap .er-input {
    padding-right: 46px;
}

.er-pw-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--er-ink-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .2s;
}

.er-pw-toggle:hover {
    color: var(--er-blue);
}

.er-pw-toggle:focus-visible {
    outline: 2px solid var(--er-blue);
    border-radius: 4px;
}

/* Champ CSRF caché — note Symfony */
/*
  TWIG : <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
*/

/* ── Bouton principal Se connecter ────────────────────────────── */
.er-btn-primary {
    display: block;
    width: 100%;
    padding: 13px 20px;
    background: var(--er-blue);
    color: #fff;
    font-family: 'Figtree', sans-serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .03em;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background .2s, box-shadow .2s, transform .1s;
    box-shadow: 0 4px 16px rgba(39, 71, 220, .32);
    margin-top: 22px;
}

.er-btn-primary:hover {
    background: var(--er-blue-deep);
    box-shadow: 0 6px 22px rgba(39, 71, 220, .42);
}

.er-btn-primary:active {
    transform: scale(.98);
}

.er-btn-primary:focus-visible {
    outline: 2px solid var(--er-blue);
    outline-offset: 3px;
}

/* ── Séparateur ───────────────────────────────────────────────── */
.er-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 18px;
}

.er-divider-line {
    flex: 1;
    height: 1px;
    background: var(--er-line);
}

.er-divider-text {
    font-size: 12.5px;
    color: var(--er-ink-muted);
    white-space: nowrap;
}

/* ── Bouton secondaire Créer un compte ────────────────────────── */
.er-btn-secondary {
    display: block;
    width: 100%;
    padding: 11px 20px;
    background: #fff;
    color: var(--er-blue);
    font-family: 'Figtree', sans-serif;
    font-size: 14px;
    font-weight: 700;
    border: 1.5px solid var(--er-blue);
    border-radius: 999px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background .2s, color .2s;
    /*
      TWIG : href="{{ path('app_register_choice') }}"
    */
}

.er-btn-secondary:hover {
    background: var(--er-blue-soft);
    color: var(--er-blue-deep);
}

.er-btn-secondary:focus-visible {
    outline: 2px solid var(--er-blue);
    outline-offset: 3px;
}

/* ── Tags profils ─────────────────────────────────────────────── */
.er-profiles {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: center;
    margin-top: 16px;
}

.er-profile-tag {
    font-size: 11.5px;
    color: var(--er-ink-soft);
    background: var(--er-bg);
    border: 1px solid var(--er-line);
    border-radius: 999px;
    padding: 4px 11px;
    cursor: default;
    transition: border-color .2s;
}

.er-profile-tag:hover {
    border-color: #C9C5BC;
}

/* ── Liens pied de formulaire ─────────────────────────────────── */
.er-form-footer {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--er-line-light);
}

.er-form-footer a {
    font-size: 12px;
    color: var(--er-ink-muted);
    text-decoration: none;
    transition: color .2s;
    /*
      TWIG :
      href="{{ path('app_cgv') }}"
      href="{{ path('app_mentions_legales') }}"
      href="{{ path('app_contact') }}"
    */
}

.er-form-footer a:hover {
    color: var(--er-blue);
}

/* ================================================================
   RESPONSIVE — Mobile (< 860px)
   ================================================================ */
@media (max-width: 860px) {
    .er-login-page {
        flex-direction: column;
    }

    .er-hero {
        flex: 0 0 auto;
    }

    .er-hero-inner {
        padding: 28px 24px;
        min-height: auto;
    }

    .er-hero-content {
        padding: 22px 0;
    }

    .er-hero-title {
        font-size: 24px;
    }

    .er-hero-subtitle {
        font-size: 14px;
    }

    .er-form-panel {
        flex: 1 1 auto;
        min-width: 0;
        border-left: none;
        border-top: 1px solid var(--er-line);
        padding: 36px 20px;
    }
}

@media (max-width: 480px) {
    .er-form-panel {
        padding: 28px 16px;
    }

    .er-hero-inner {
        padding: 24px 18px;
    }

    .er-hero-title {
        font-size: 22px;
    }

    .er-features {
        gap: 8px;
    }

    .er-feature {
        padding: 11px 14px;
    }
}

/* ── Accessibilité : focus visible ────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}