:root {
    --login-primary:    #00a4c0;
    --login-primary-hover-shadow: rgba(0, 164, 192, 0.35);
    --login-left-bg-from: #0a2e3c;
    --login-left-bg-mid:  #0b3444;
    --login-left-bg-to:   #0a3545;
}

.login-page {
    display: flex;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
}

.login-page *,
.login-page *::before,
.login-page *::after {
    box-sizing: border-box;
}

/* COLONNE GAUCHE */

.login-left {
    position: relative;
    width: 45%;
    height: 100vh;
    background: linear-gradient(160deg,
        var(--login-left-bg-from) 0%,
        var(--login-left-bg-mid)  40%,
        var(--login-left-bg-to)   100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    overflow: hidden;
}

/* Image de fond optionnelle (définie via --login-bg-url en inline) */
.login-left::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--login-bg-url, none) center / cover no-repeat;
    opacity: 0.15;
    z-index: 0;
}

.login-left-content {
    position: relative;
    z-index: 1;
}

.login-left--with-visual {
    justify-content: flex-start;
    overflow-y: auto;
    padding: 32px clamp(24px, 3.3vw, 60px) 24px;
    scrollbar-width: thin;
    scrollbar-color: #356474 var(--login-left-bg-from);
}

.login-left--with-visual .login-aside-stack {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    margin-block: auto;
}

.login-left--with-visual .login-left-footer {
    position: relative;
    inset: auto;
    flex: 0 0 auto;
    padding-top: 24px;
}

.login-left h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 28px;
}

.login-left p {
    font-size: 1.7rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.7;
    max-width: 500px;
}

.login-left--with-visual .login-aside-copy h1 {
    font-size: 3.1rem;
    line-height: 1.15;
    margin: 0 0 12px;
}

.login-left--with-visual .login-aside-copy p {
    max-width: none;
    margin: 0;
    font-size: 1.5rem;
    line-height: 1.5;
}

.login-aside-visual {
    width: 100%;
    margin: 0;
    padding: 10px;
    overflow: hidden;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
}

.login-aside-visual img {
    display: block;
    width: 100%;
    height: auto;
    max-height: clamp(220px, 34vh, 380px);
    object-fit: contain;
}

/* Newsletter : une carte à hauteur libre, y compris pour les descriptions longues. */
.login-newsletter {
    display: grid;
    grid-template-columns: 38% minmax(0, 1fr);
    margin-top: 32px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16);
}

.login-aside-stack .login-newsletter { margin-top: 0; }
.login-newsletter--text-only { grid-template-columns: minmax(0, 1fr); }

.login-newsletter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-bottom: 12px;
}

.login-newsletter-label {
    color: #007e94;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-newsletter-date {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    background: #007e94;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 600;
    white-space: nowrap;
}

.login-newsletter-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 24px;
    background: linear-gradient(145deg, #eff9fb 0%, #dceff4 100%);
    border-right: 1px solid #d6e9ee;
    border-radius: 16px 0 0 16px;
}

.login-newsletter-preview {
    display: block;
    width: 100%;
    max-width: 220px;
    overflow: hidden;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 18px 30px rgba(10, 53, 69, 0.22), 0 4px 10px rgba(10, 53, 69, 0.1);
    transform: rotate(-4deg);
    color: #007e94;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.login-newsletter-preview:hover {
    transform: rotate(-2deg) translateY(-3px);
    box-shadow: 0 22px 36px rgba(10, 53, 69, 0.27);
    color: #007e94;
    text-decoration: none;
}

.login-newsletter-preview img,
.login-newsletter-preview canvas {
    display: block;
    width: 100%;
    height: auto;
}

.login-newsletter-preview-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    aspect-ratio: 1 / 1.414;
    font-size: 1.2rem;
    background: #fff;
}

.login-newsletter-preview-fallback i { font-size: 3.2rem; }
.login-newsletter-preview [hidden] { display: none; }

.login-newsletter-info {
    align-self: center;
    min-width: 0;
    padding: 24px;
    overflow-wrap: anywhere;
}

.login-newsletter-info h2 {
    margin: 0 0 12px;
    color: #0a3545;
    font-size: 1.65rem;
    font-weight: 600;
    line-height: 1.4;
}

.login-newsletter-info .login-newsletter-description {
    max-width: none;
    margin: 0 0 20px;
    color: #425a66;
    font-size: 1.3rem;
    line-height: 1.65;
    white-space: pre-line;
}

.login-newsletter-dl {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 7px;
    color: #fff;
    background: #007e94;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    transition: background 0.2s;
}

.login-newsletter-dl:hover,
.login-newsletter-dl:focus {
    background: #006779;
    color: #fff;
    text-decoration: none;
}

.login-newsletter a:focus-visible {
    outline: 3px solid #00a4c0;
    outline-offset: 4px;
}

/* Footer bas-gauche : copyright + liens légaux */
.login-left-footer {
    position: absolute;
    bottom: 30px;
    left: 60px;
    right: 60px;
    z-index: 1;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.login-left-footer a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: underline;
    transition: color 0.2s;
    white-space: nowrap;
}

.login-left-footer a:hover {
    color: rgba(255, 255, 255, 0.9);
}

.login-left-footer-sep {
    color: rgba(255, 255, 255, 0.25);
}

/* COLONNE DROITE formulaire */

.login-right {
    width: 55%;
    height: 100vh;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-y: auto;
}

/* -- En-tête (retour / lien) -- */
.login-right-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 48px;
}

.login-right-header a {
    color: #334155;
    text-decoration: none;
    font-size: 1.35rem;
    font-weight: 500;
    transition: color 0.2s;
}

.login-right-header a:hover { color: var(--login-primary); }
.login-right-header a i    { margin-right: 8px; }

/* -- Zone formulaire centrée -- */
.login-form-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 48px;
}

.login-form-inner {
    width: 100%;
    max-width: 520px;
}

.login-form-wrapper--with-visual {
    justify-content: flex-start;
}

/* -- Logo -- */
.login-logo {
    text-align: center;
    margin-bottom: 36px;
}

.login-logo img { height: 115px; }

/* -- Titre & sous-titre -- */
.login-title {
    text-align: center;
    margin-bottom: 12px;
    font-size: 2.3rem;
    font-weight: 700;
    color: #1e293b;
}

.login-subtitle {
    text-align: center;
    color: #64748b;
    font-size: 1.25rem;
    margin-bottom: 40px;
    line-height: 1.6;
}

/* -- Champs -- */
.login-field { margin-bottom: 22px; }

.login-field input,
.login-form-inner .form-group input,
.login-form-inner .form-group input.form-control {
    width: 100%;
    padding: 18px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1.35rem;
    color: #334155;
    background: #f8fafc;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    box-shadow: none;
    height: auto;
}

.login-field input:focus,
.login-form-inner .form-group input:focus,
.login-form-inner .form-group input.form-control:focus {
    border-color: var(--login-primary);
    box-shadow: 0 0 0 3px rgba(0, 164, 192, 0.1);
    background: #fff;
}

.login-field input::placeholder { color: #94a3b8; }

.login-field .field-hint {
    font-size: 1rem;
    color: #94a3b8;
    margin-top: 8px;
    padding-left: 4px;
}

/* -- Bouton oeil (afficher/masquer le mot de passe) -- */
.login-field--has-toggle { position: relative; }
.login-field--has-toggle input { padding-right: 52px; }
.login-pass-toggle {
    position: absolute;
    top: 13px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #94a3b8;
    font-size: 1.4rem;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}
.login-pass-toggle:hover { color: var(--login-primary); background: #eef2f6; }
.login-pass-toggle:focus { outline: none; color: var(--login-primary); }

/* Override label Symfony form_row */
.login-form-inner .form-group { margin-bottom: 0; }
.login-form-inner .form-group label { display: none; }
.login-form-inner .help-block { font-size: 1rem; margin-top: 6px; }

/* -- Ligne options (checkbox + lien oublié) -- */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.login-options label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    color: #475569;
    cursor: pointer;
    font-weight: 400;
    margin: 0;
}

.login-options label input[type="checkbox"] {
    width: 20px !important;
    min-width: 20px;
    height: 20px;
    accent-color: var(--login-primary);
    cursor: pointer;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    -webkit-appearance: checkbox !important;
    appearance: checkbox !important;
    margin: 0;
}

.login-options a {
    font-size: 1.3rem;
    color: #475569;
    text-decoration: none;
    font-weight: 500;
}

.login-options a:hover { color: var(--login-primary); }

/* -- Indicateur de robustesse du mot de passe : voir css/security/password-strength.css -- */

/* -- Bouton principal -- */
.login-btn {
    width: 100%;
    padding: 18px;
    background: var(--login-primary);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.15s, box-shadow 0.2s;
    margin-top: 0;
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--login-primary-hover-shadow);
}

/* Spécificité (0,4,0) pour battre la règle globale
   `button[type=submit]:not(.renderInput):not(.btn-success)` (0,3,1). */
.login-page .login-btn[type="submit"]:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    opacity: 0.7;
}

.login-page .login-btn[type="submit"]:disabled:hover {
    transform: none;
    box-shadow: none;
}

.login-btn i { font-size: 1.4rem; }

.login-question-visual {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.login-question-visual img {
    display: block;
    width: 100%;
    max-height: min(260px, 29vh);
    object-fit: contain;
}

/* -- Lien retour sous formulaire -- */
.login-back-link {
    text-align: center;
    margin-top: 20px;
}

.login-back-link a {
    font-size: 1.2rem;
    color: #64748b;
    text-decoration: none;
}

.login-back-link a:hover { color: var(--login-primary); }
.login-back-link a i { margin-right: 6px; }

/* -- Alertes -- */
.login-alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 22px;
    font-size: 1.2rem;
    text-align: center;
}

.login-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 22px;
    font-size: 1.2rem;
    text-align: center;
}

/* -- Footer droit (logo Studeffi) -- */
.login-right-footer {
    text-align: center;
    padding: 32px 48px;
    color: #64748b;
    font-size: 1.3rem;
}

.login-right-footer--with-visual { padding-top: 0; }

.login-right-footer a { display: inline-block; }

.login-right-footer img {
    height: 55px;
    margin-top: 12px;
    opacity: 0.85;
}

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

@media (min-width: 1101px) {
    .login-form-wrapper--with-visual { justify-content: center; }
    .login-question-visual { display: none; }
    .login-right-footer--with-visual { padding-top: 32px; }
}

@media (min-width: 1101px) and (max-width: 1400px) {
    .login-newsletter-stage { padding: 28px 18px; }
    .login-newsletter-info { padding: 20px; }
}

@media (max-width: 1100px) {
    .login-left  { display: none; }
    .login-right { width: 100%; }
}

@media (max-width: 576px) {
    .login-right-header  { padding: 16px 20px; }
    .login-form-wrapper  { padding: 0 20px; }
    .login-right-footer  { padding: 16px 20px; }
}
