:root {
    --main-color: #3f2d27;
    --left1-color: #66512c;
    --left2-color: #29b7e9;
    --right1-color: #363D39;
    --right2-color: #3c763d;
    --right3-color: #f5971d;
    --right4-color: #337ab7;
    --ice: #D6EAF8;
    --deep: #1A3550;
    --midnight: #0D2137;
    --frost: #4A9CC7;
    --snow: #F4F8FB;
    --charcoal: #2C3E50;
    --warm: #C0392B;
    --gold: #D4AC0D;
    --text: #2C3E50;
    --muted: #7F8C8D;
    --border: #D5E8F2;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: 'Georgia', serif;
    background-color: var(--snow);
    display: flex;
    align-items: stretch;
}

/* Panneau gauche — illustration montagne */
.login-visual {
    display: none;
    position: relative;
    overflow: hidden;
    background: var(--midnight);
}

@media (min-width: 992px) {
    .login-visual {
        display: flex;
        flex: 0 0 45%;
        max-width: 45%;
    }
}

.login-visual__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 60%, rgba(41,183,233,0.18) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(245,151,29,0.12) 0%, transparent 50%),
        linear-gradient(160deg, #0D2137 0%, #1A3550 50%, #2C3E50 100%);
}

/* Silhouette montagne SVG inline */
.login-visual__mountain {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    opacity: 0.85;
}

.login-visual__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 3rem;
    color: white;
}

.login-visual__tagline {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: white;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.login-visual__sub {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.6;
}

.login-visual__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(245,151,29,0.2);
    border: 1px solid rgba(245,151,29,0.4);
    color: var(--right3-color);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.35rem 0.75rem;
    border-radius: 2rem;
    margin-bottom: 1.5rem;
}

/* Panneau droit — formulaire */
.login-form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2.5rem 1.5rem;
    background: white;
}

.login-form-inner {
    width: 100%;
    max-width: 400px;
}

.login-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 2.5rem;
}

.login-logo__icon {
    width: 40px;
    height: 40px;
    background: var(--main-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-logo__name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--main-color);
    letter-spacing: -0.03em;
}

.login-logo__name span {
    color: var(--right3-color);
}

.login-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.4rem;
    letter-spacing: -0.02em;
}

.login-subtitle {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 2rem;
}

/* Champs de formulaire */
.form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.form-control {
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
    color: var(--text);
    background: var(--snow);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    border-color: var(--left2-color);
    box-shadow: 0 0 0 3px rgba(41,183,233,0.12);
    background: white;
    outline: none;
}

.input-group-text {
    background: var(--snow);
    border: 1.5px solid var(--border);
    border-right: none;
    color: var(--muted);
    border-radius: 8px 0 0 8px;
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 8px 8px 0;
}

.input-group:focus-within .input-group-text {
    border-color: var(--left2-color);
}

/* Bouton principal */
.btn-login {
    background: var(--main-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    width: 100%;
    transition: background 0.2s, transform 0.15s;
    cursor: pointer;
}

.btn-login:hover {
    background: var(--left1-color);
    transform: translateY(-1px);
}

.btn-login:active {
    transform: translateY(0);
}

/* Séparateur */
.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--muted);
    font-size: 0.8rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* Lien mot de passe oublié */
.forgot-link {
    font-size: 0.82rem;
    color: var(--left2-color);
    text-decoration: none;
    transition: color 0.15s;
}

.forgot-link:hover {
    color: var(--frost);
    text-decoration: underline;
}

/* Alerte erreur */
.alert-login {
    background: rgba(192,57,43,0.08);
    border: 1px solid rgba(192,57,43,0.25);
    border-left: 3px solid var(--warm);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
    color: var(--warm);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Checkbox remember me */
.form-check-input:checked {
    background-color: var(--right2-color);
    border-color: var(--right2-color);
}

.form-check-label {
    font-size: 0.88rem;
    color: var(--muted);
}

/* Lien inscription */
.register-link {
    text-align: center;
    font-size: 0.88rem;
    color: var(--muted);
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.register-link a {
    color: var(--right2-color);
    font-weight: 600;
    text-decoration: none;
}

.register-link a:hover {
    text-decoration: underline;
}

/* Étoiles décoratives sur le panneau gauche */
.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Animation entrée formulaire */
.login-form-inner {
    animation: fadeUp 0.5s ease both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}