/* Page d'authentification de la maquette provider, alignée sur la charte du site.
   Polices à charger dans le <head> de la page :
   <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap"> */

/* ===== Palette alignée sur le site (assets/css/style.css) ===== */
:root {
    --bg: #f5f8ff;
    --surface: #ffffff;
    --text: #0b1f4d;
    --muted: #51608a;
    --primary: #2563eb;
    --primary-ink: #ffffff;
    --accent: #2563eb;
    --accent-ink: #ffffff;
    --soft: #e3ecff;
    --border: #dbe4f5;
    --shadow: 0 12px 40px rgba(37, 99, 235, .08);
    --hero-grad: linear-gradient(135deg, #e3ecff 0%, #eaf1ff 100%);
    --footer-bg: #0b1f4d;

    /* Anciens noms conservés pour le reste de la page */
    --eolidia-primary: var(--primary);
    --eolidia-dark: var(--text);
    --client-primary: var(--primary);
    --active-primary: var(--primary);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0a1224;
        --surface: #111c38;
        --text: #eaf1ff;
        --muted: #9db4e0;
        --primary: #60a5fa;
        --primary-ink: #0a1224;
        --accent: #60a5fa;
        --accent-ink: #0a1224;
        --soft: #16264d;
        --border: #243a66;
        --shadow: 0 12px 40px rgba(0, 0, 0, .4);
        --hero-grad: linear-gradient(135deg, #16264d 0%, #1a2a52 100%);
    }
}



.container.flex-grow-1 {
    flex: 1;
}


.text-muted {
    color: var(--muted) !important;
}

.border-top {
    border-top-color: var(--border) !important;
}

a {
    color: var(--primary);
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f4f9;
    padding: 40px 20px;
}

.auth-badge {
    display: inline-block;
    padding: 5px 14px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: var(--soft);
    color: var(--primary);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--text);
    margin-bottom: 8px;
}

.auth-secure {
    margin: 18px 0 0;
    text-align: center;
    font-size: .8rem;
    color: var(--muted);
}


.auth-card {
    background: var(--surface);
    width: 100%;
    max-width: 480px;
    border-radius: 22px;
    box-shadow: var(--shadow);
    padding: 44px 40px;
    border: 1px solid var(--border);
    animation: auth-rise .5s ease both;
}

@keyframes auth-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) { .auth-card { animation: none; } }

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
    font-family: "Plus Jakarta Sans", system-ui, sans-serif;
    font-weight: 500;
    color: var(--eolidia-dark);
    font-size: 1.3rem;
}

.auth-logo span.divider {
    margin: 0 15px;
    font-weight: 300;
    color: var(--border);
}

.btn-sso {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background-color: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: 'Segoe UI', 'Plus Jakarta Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 999px;
    transition: background-color 0.2s, box-shadow 0.2s, border-color 0.2s, transform 0.2s;
    cursor: pointer;
    text-decoration: none;
}

.btn-sso:hover {
    background-color: var(--soft);
    border-color: var(--primary);
    box-shadow: 0 6px 18px rgba(37, 99, 235, .18);
    transform: translateY(-1px);
    color: var(--text);
    text-decoration: none;
}

.divider-text {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 30px 0;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
}

.divider-text::before,
.divider-text::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}

.divider-text:not(:empty)::before {
    margin-right: .8em;
}

.divider-text:not(:empty)::after {
    margin-left: .8em;
}

.form-control-modern {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
}

.form-control-modern:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent);
    background: var(--surface);
    outline: none;
}

/* Bootstrap grise les champs d'un <fieldset disabled> : on garde la palette du site */
.form-control-modern:disabled {
    background: var(--bg);
    color: var(--muted);
    opacity: .8;
}

.btn-modern-primary {
    background: var(--accent);
    color: var(--accent-ink);
    border: none;
    border-radius: 999px;
    padding: 14px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
}

.btn-modern-primary:hover {
    filter: brightness(0.9);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Pastille « à compléter » identique à celle du site */
.todo {
    background: #fef08a;
    color: #422006;
    padding: 0 4px;
    border-radius: 3px;
    font-weight: 600;
}

:root {
    --win-font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    --title-h: 32px;
    --url-h: 33px;
    --ctrl-w: 46px;
    --lock-size: 12px;

    --title-font-size: 14px;

    --win-bg: #ffffff;
    --win-title-bg: #d7d9dd;
    --win-title-text: #1a1a1a;
    --win-url-bg: #ffffff;
    --win-url-text: #1a1a1a;
    --win-url-protocol: #5f6368;

    --win-url-lock: #6f6f6f;
    --win-border: #999999;
    --win-hover-bg: rgba(0, 0, 0, 0.06);
    --win-close-bg: #e81123;
    --win-close-text: #ffffff;
    --win-separator: #e5e5e5;
}

.theme-chrome {
    --title-font-size: 12px;
    --win-title-bg: #d3e3fd;
    --win-url-bg: #EDF2FA;
}

.theme-edge {
    --title-font-size: 14px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --win-bg: #1e1e1e;
        --win-title-bg: #000000;
        --win-title-text: #ffffff;
        --win-url-bg: #2e2e2e;
        --win-url-text: #e8eaed;
        --win-url-lock: #9b9b9b;
        --win-url-protocol: #9aa0a6;
        --win-border: #444444;
        --win-hover-bg: rgba(255, 255, 255, 0.08);
        --win-close-bg: #e81123;
        --win-close-text: #ffffff;
        --win-separator: #333333;
    }

    .theme-chrome {
        --win-url-bg: #3f3f3f;
        --win-title-bg: #1f2020;
    }

    .theme-edge {
        --win-url-bg: #2e2e2e;
        --win-title-bg: #000000;
    }
}

#logo-description {
    color: var(--win-title-text);
    font-size: var(--title-font-size);
    font-family: var(--win-font);
    font-weight: 400;
    line-height: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    display: block;
}


.protocol-gray {
    color: var(--win-url-protocol);
}

#window {
    display: flex;
    flex-direction: column;
    background-color: var(--win-bg);
    border: 1px solid var(--win-border);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.25);

    width: 485px;
    height: 665px;
    max-width: 95vw;
    max-height: 95vh;

    resize: both;

    border-radius: 8px;
    overflow: hidden;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

#window.maximized {
    position: fixed !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    top: 0 !important;
    left: 0 !important;
    border-radius: 0 !important;
    transform: none !important;
    resize: none !important;
}

#window.animating {
    transition: top .15s ease, left .15s ease, width .15s ease, height .15s ease, border-radius .15s ease;
}




#title-bar {
    flex: 0 0 auto;
    height: 26px;
    background-color: var(--win-title-bg);
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    user-select: none;
}

.title-left {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 4px;
    white-space: nowrap;
    overflow: hidden;
    min-width: 0;
}

#logo {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex-shrink: 0;
}

.title-right {
    display: flex;
    align-items: stretch;
    flex-shrink: 0;
}

.control-btn {
    width: var(--ctrl-w);
    border: 0;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--win-title-text);
    cursor: default;
    transition: background-color .1s ease;
    -webkit-app-region: no-drag;
}

.control-btn svg {
    display: block;
    width: 10px;
    height: 10px;
}

.min-btn svg,
.max-btn svg {
    shape-rendering: crispEdges;
}

.close-btn svg {
    shape-rendering: geometricPrecision;
}

.control-btn:hover {
    background-color: var(--win-hover-bg);
}

.control-btn:focus-visible {
    outline: 1px solid currentColor;
    outline-offset: -3px;
}

.close-btn:hover {
    background-color: var(--win-close-bg);
    color: var(--win-close-text);
}

#window:not(.maximized) .icon-restore {
    display: none;
}

#window.maximized .icon-maximize {
    display: none;
}

#url-bar {
    flex: 0 0 var(--url-h);
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 6px;
    background-color: var(--win-url-bg);
    border-bottom: 1px solid var(--win-separator);
    overflow: hidden;
}

#ssl-padlock {
    width: var(--lock-size);
    height: var(--lock-size);
    flex-shrink: 0;
    color: var(--win-url-text);
}

#domain-name {
    color: var(--win-url-text);
    font: 14px/1 var(--win-font);
    white-space: nowrap;
}

.protocol-gray {
    color: var(--win-url-protocol);
}

#content {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    border: 0;
    background-color: var(--win-bg);
}

#login-wrapper {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: 100%;
}

/* Formulaire retravaillé */
.auth-logo img { max-width: 45%; object-fit: contain; }

.field { margin-bottom: 18px; }
.field label { display: block; margin: 0 0 6px; font-size: .88rem; font-weight: 700; color: var(--text); }
.field-head { display: flex; justify-content: space-between; align-items: baseline; }
.field-link { font-size: .82rem; font-weight: 600; color: var(--primary); }

.input-icon { position: relative; }
.input-icon svg {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    width: 18px; height: 18px; fill: none; stroke: var(--muted);
    stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; pointer-events: none;
}
.input-icon .form-control-modern { padding-left: 42px; height: 48px; border-radius: 12px; width: 100%; }
.input-icon:focus-within svg { stroke: var(--primary); }

.btn-modern-primary { margin-top: 6px; padding: 14px; font-size: 1rem; }
.btn-modern-primary:disabled { opacity: .7; cursor: not-allowed; }
