/* Connexion — reproduction maquette */

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

.login-page {
    --blue: #0056d2;
    --blue-hover: #0047b3;
    --blue-light: #e8f1ff;
    --blue-soft: #f0f6ff;
    --text: #1a2744;
    --muted: #6b7280;
    --border: #e5e7eb;
    --card-shadow: 0 20px 50px rgba(26, 39, 68, 0.08), 0 2px 8px rgba(26, 39, 68, 0.04);

    min-height: 100vh;
    margin: 0;
    position: relative;
    overflow-x: hidden;
    background: #f8fafc;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

.login-page-dots {
    position: fixed;
    width: 120px;
    height: 120px;
    pointer-events: none;
    z-index: 2;
    opacity: 0.55;
    background-image: radial-gradient(#93c5fd 1.5px, transparent 1.5px);
    background-size: 12px 12px;
}

.login-page-dots--tl { top: 20px; left: 20px; }
.login-page-dots--br { right: 24px; bottom: 24px; }

.login-split {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* ===== GAUCHE ===== */

.login-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem 2.75rem 2.5rem 3rem;
    overflow: hidden;
}

.login-hero-bg {
    position: absolute;
    inset: 0;
    background: url('../img/login-hero.jpg') center right / cover no-repeat;
}

.login-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(105deg,
            #ffffff 0%,
            rgba(255, 255, 255, 0.97) 28%,
            rgba(255, 255, 255, 0.88) 48%,
            rgba(255, 255, 255, 0.55) 68%,
            rgba(255, 255, 255, 0.15) 100%);
}

.login-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 420px;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.login-brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 10px;
    background: var(--blue);
    flex-shrink: 0;
}

.login-brand-icon svg {
    width: 1.35rem;
    height: 1.35rem;
    stroke: #fff;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-brand-text strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.login-brand-text span {
    display: block;
    margin-top: 0.1rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted);
}

.login-brand-text .login-brand-credit {
    margin-top: 0.35rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--muted);
    opacity: 0.85;
}

.login-welcome-badge {
    display: inline-block;
    margin: 0 0 0.85rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--blue);
    background: var(--blue-light);
}

.login-hero-title {
    margin: 0 0 0.85rem;
    line-height: 1.15;
}

.login-hero-title-main {
    display: block;
    font-size: clamp(1.65rem, 2.8vw, 2.15rem);
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.03em;
}

.login-hero-title-script {
    display: block;
    margin-top: 0.1rem;
    font-family: 'Caveat', cursive;
    font-size: clamp(1.85rem, 3vw, 2.45rem);
    font-weight: 700;
    color: var(--blue);
    line-height: 1.1;
}

.login-hero-lead {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--muted);
    max-width: 22rem;
}

.login-hero-features {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1.75rem;
}

.login-feature-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 14px rgba(26, 39, 68, 0.06);
}

.login-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 8px;
    flex-shrink: 0;
}

.login-feature-icon svg {
    width: 1.1rem;
    height: 1.1rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-feature-icon--blue  { color: #0056d2; background: #dbeafe; }
.login-feature-icon--green { color: #059669; background: #d1fae5; }
.login-feature-icon--purple { color: #7c3aed; background: #ede9fe; }

.login-feature-label {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text);
}

.login-feature-arrow {
    color: #cbd5e1;
    display: inline-flex;
}

.login-feature-arrow svg {
    width: 1rem;
    height: 1rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-hero-trust {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 1.5rem;
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    background: var(--blue-soft);
    border: 1px solid #dbeafe;
}

.login-hero-trust-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: var(--blue-light);
    flex-shrink: 0;
}

.login-hero-trust-icon svg {
    width: 1rem;
    height: 1rem;
    stroke: var(--blue);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-hero-trust-text strong {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text);
}

.login-hero-trust-text span {
    display: block;
    margin-top: 0.05rem;
    font-size: 0.7rem;
    color: var(--muted);
}

/* ===== DROITE ===== */

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 2.5rem 2rem 1.5rem;
    background: #f8fafc;
}

.login-container {
    width: 100%;
    max-width: 460px;
}

.login-card {
    padding: 2rem 2rem 1.75rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #f1f5f9;
    box-shadow: var(--card-shadow);
}

.login-brand-mobile {
    display: none;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
}

.login-header {
    margin-bottom: 1.5rem;
}

.login-secure-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.65rem;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--blue);
}

.login-secure-badge-icon {
    display: inline-flex;
    width: 1.2rem;
    height: 1.2rem;
}

.login-secure-badge-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--blue);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-header h2 {
    margin: 0 0 0.25rem;
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
}

.login-header p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--muted);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-form .form-group { margin: 0; }

.login-form label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #374151;
}

.login-input-wrap { position: relative; }

.login-input-wrap--flex { flex: 1; min-width: 0; }

.login-cabinet-code-row {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

.login-cabinet-save {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    flex-shrink: 0;
    padding: 0 0.85rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: #374151;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.login-cabinet-save svg {
    width: 0.9rem;
    height: 0.9rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-cabinet-save:hover {
    color: var(--blue);
    border-color: #bfdbfe;
    background: var(--blue-soft);
}

.login-cabinet-save.is-saved {
    color: #059669;
    border-color: #a7f3d0;
    background: #ecfdf5;
}

.login-cabinet-hint {
    margin: 0.35rem 0 0;
    font-size: 0.72rem;
    color: #059669;
    font-weight: 500;
}

.login-form .form-control.is-invalid {
    border-color: #fca5a5;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.login-input-wrap--password .form-control { padding-right: 2.65rem; }

.login-input-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: #9ca3af;
    pointer-events: none;
}

.login-input-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-form .form-control {
    width: 100%;
    padding: 0.72rem 0.85rem 0.72rem 2.45rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.875rem;
    font-family: inherit;
    background: #fff;
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.login-form .form-control::placeholder { color: #9ca3af; }

.login-form .form-control:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(0, 86, 210, 0.1);
}

.login-password-toggle {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
}

.login-password-toggle:hover { color: #6b7280; }

.login-password-toggle svg {
    width: 1rem;
    height: 1rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-password-toggle .icon-eye-off { display: none; }
.login-password-toggle.is-visible .icon-eye { display: none; }
.login-password-toggle.is-visible .icon-eye-off { display: block; }

.login-form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: -0.1rem;
}

.login-remember {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: #4b5563;
    cursor: pointer;
    user-select: none;
}

.login-remember input {
    width: 0.9rem;
    height: 0.9rem;
    accent-color: var(--blue);
}

.login-forgot {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--blue);
    text-decoration: none;
}

.login-forgot:hover { text-decoration: underline; }

.login-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.15rem;
    padding: 0.78rem 1rem;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    color: #fff;
    background: var(--blue);
    cursor: pointer;
    transition: background 0.15s;
}

.login-submit svg {
    width: 0.95rem;
    height: 0.95rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-submit:hover { background: var(--blue-hover); }

.login-page .alert-error {
    margin-bottom: 0.85rem;
    padding: 0.7rem 0.85rem;
    border-radius: 10px;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 0.82rem;
}

.login-page .alert-info {
    margin-bottom: 0.85rem;
    padding: 0.7rem 0.85rem;
    border-radius: 10px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.82rem;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 1.25rem 0 0.85rem;
    color: #9ca3af;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.login-demo-title {
    margin: 0 0 0.55rem;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #9ca3af;
}

.login-demo-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.login-demo-row {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fafafa;
}

.login-demo-role {
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    font-size: 0.58rem;
    font-weight: 700;
    white-space: nowrap;
}

.login-demo-role--blue   { color: #1d4ed8; background: #dbeafe; }
.login-demo-role--green  { color: #047857; background: #d1fae5; }
.login-demo-role--purple { color: #6d28d9; background: #ede9fe; }
.login-demo-role--orange { color: #c2410c; background: #ffedd5; }
.login-demo-role--sky    { color: #0369a1; background: #e0f2fe; }

.login-demo-email,
.login-demo-login {
    font-size: 0.72rem;
    color: #374151;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.login-demo-pass {
    font-size: 0.72rem;
    color: #9ca3af;
    letter-spacing: 0.06em;
}

.login-demo-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    color: #6b7280;
    cursor: pointer;
}

.login-demo-copy svg {
    width: 0.85rem;
    height: 0.85rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-demo-copy:hover {
    color: var(--blue);
    border-color: #bfdbfe;
    background: var(--blue-soft);
}

.login-demo-copy.is-copied {
    color: #059669;
    border-color: #a7f3d0;
    background: #ecfdf5;
}

.login-platform-stealth {
    margin-top: 0.25rem;
}

/* Lien discret : texte blanc (visible seulement au survol / sélection) */
.login-platform-stealth .login-divider span,
.login-platform-stealth .login-platform-link a {
    color: #fff;
}

.login-platform-stealth .login-divider::before,
.login-platform-stealth .login-divider::after {
    background: #fff;
}

.login-platform-link {
    margin: 0;
    text-align: center;
    font-size: 0.85rem;
}

.login-platform-link a {
    color: var(--blue);
    font-weight: 600;
    text-decoration: none;
}

.login-platform-stealth .login-platform-link a:hover,
.login-platform-stealth .login-platform-link a:focus-visible {
    color: #fff;
    text-decoration: none;
    outline: none;
}

.login-platform-link a:hover { text-decoration: underline; }

@media (max-width: 1024px) {
    .login-split { grid-template-columns: 1fr; }
    .login-hero { display: none; }
    .login-brand-mobile { display: flex; }
    .login-panel { min-height: 100vh; padding: 1.5rem; }
}

@media (max-width: 480px) {
    .login-card { padding: 1.35rem; }
    .login-demo-row {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto auto;
    }
    .login-demo-role { grid-column: 1; }
    .login-demo-copy { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
    .login-demo-email, .login-demo-login, .login-demo-pass { grid-column: 1; }
    .login-form-options { flex-direction: column; align-items: flex-start; }
}

.login-features-link-wrap {
    margin: 0.65rem 0 0;
}

.login-features-link {
    color: var(--blue);
    font-weight: 650;
    font-size: 0.9rem;
    text-decoration: none;
}

.login-features-link:hover,
.login-features-link:focus-visible {
    text-decoration: underline;
}
