/* =====================================================
DISSERTA — PAGES DE CONNEXION ET D'INSCRIPTION
===================================================== */

:root {
--primary: #2457d6;
--primary-dark: #173b82;
--primary-light: #edf3ff;
--secondary: #6c5ce7;

--text: #202b3c;
--text-light: #68758a;
--muted: #94a0b2;

--background: #f5f7fb;
--surface: #ffffff;
--border: #e8edf5;

--success: #159b69;
--danger: #e5484d;
}

* {
box-sizing: border-box;
}

body {
margin: 0;
min-height: 100vh;
padding: 32px 16px;

display: flex;
align-items: center;
justify-content: center;

background:
    radial-gradient(circle at 12% 10%, rgba(57, 119, 255, 0.14), transparent 42%),
    radial-gradient(circle at 90% 90%, rgba(108, 92, 231, 0.14), transparent 40%),
    var(--background);
color: var(--text);
font-family: 'DM Sans', Arial, sans-serif;
font-size: 15px;
line-height: 1.6;
-webkit-font-smoothing: antialiased;
}

.auth-card {
width: 100%;
max-width: 440px;
padding: 34px 30px 28px;

background: var(--surface);
border: 1px solid var(--border);
border-radius: 22px;
box-shadow: 0 18px 50px rgba(31, 55, 99, 0.1);
}

/* Marque */

.auth-brand {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 26px;
color: inherit;
text-decoration: none;
}

.auth-brand-logo {
position: relative;
flex: 0 0 46px;
width: 46px;
height: 46px;

display: flex;
align-items: center;
justify-content: center;

color: #ffffff;
font-size: 21px;
background: linear-gradient(135deg, #3977ff, #173b82);
border-radius: 15px;
box-shadow: 0 7px 18px rgba(36, 87, 214, 0.22);
}

.auth-brand-logo::after {
content: "";
position: absolute;
width: 8px;
height: 8px;
top: 6px;
right: 6px;
background: #7df0ca;
border: 2px solid #3977ff;
border-radius: 50%;
}

.auth-brand-name {
color: var(--primary-dark);
font-family: 'Manrope', Arial, sans-serif;
font-size: 24px;
font-weight: 800;
letter-spacing: -0.5px;
}

.auth-brand-name span {
color: var(--primary);
}

/* Titres */

.auth-card h1 {
margin: 0 0 6px;
font-family: 'Manrope', Arial, sans-serif;
font-size: 26px;
font-weight: 800;
letter-spacing: -0.6px;
color: var(--text);
}

.auth-description {
margin: 0 0 22px;
color: var(--text-light);
}

/* Formulaire */

.auth-card label {
display: block;
margin: 16px 0 7px;
font-size: 14px;
font-weight: 700;
color: var(--text);
}

.auth-field {
position: relative;
}

.auth-field i {
position: absolute;
top: 50%;
left: 15px;
transform: translateY(-50%);
color: var(--muted);
font-size: 15px;
pointer-events: none;
}

.auth-card input {
width: 100%;
padding: 13px 14px 13px 42px;

font: inherit;
font-size: 16px;
color: var(--text);

background: #f9fbfe;
border: 1px solid #dbe3ef;
border-radius: 12px;
transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.auth-card input::placeholder {
color: var(--muted);
}

.auth-card input:focus {
outline: none;
background: #ffffff;
border-color: var(--primary);
box-shadow: 0 0 0 4px rgba(36, 87, 214, 0.12);
}

.auth-hint {
margin: 6px 0 0;
font-size: 13px;
color: var(--muted);
}

.auth-card button {
width: 100%;
margin-top: 24px;
padding: 14px;

display: flex;
align-items: center;
justify-content: center;
gap: 9px;

font-family: 'Manrope', Arial, sans-serif;
font-size: 15px;
font-weight: 800;
color: #ffffff;

background: linear-gradient(135deg, #3977ff, var(--primary));
border: none;
border-radius: 12px;
box-shadow: 0 8px 20px rgba(36, 87, 214, 0.25);
cursor: pointer;
transition: transform 0.15s, box-shadow 0.15s;
}

.auth-card button:hover {
transform: translateY(-1px);
box-shadow: 0 12px 26px rgba(36, 87, 214, 0.3);
}

/* Messages */

.auth-message {
display: flex;
gap: 10px;
padding: 12px 14px;
margin: 0 0 6px;
border-radius: 12px;
font-size: 14px;
overflow-wrap: anywhere;
}

.auth-message i {
margin-top: 3px;
}

.auth-message.erreur {
background: #fdecec;
color: #a12a2e;
}

.auth-message.succes {
background: #e6f6ef;
color: #0f6e4b;
}

/* Liens */

.auth-links {
margin-top: 24px;
padding-top: 18px;
border-top: 1px solid var(--border);

display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
font-size: 14px;
color: var(--text-light);
text-align: center;
}

.auth-links a {
color: var(--primary);
font-weight: 700;
text-decoration: none;
}

.auth-links a:hover {
text-decoration: underline;
}

@media (max-width: 480px) {
    body {
        padding: 20px 16px;
        align-items: flex-start;
    }

    .auth-card {
        padding: 28px 20px 22px;
    }
}

/* Mode sombre (selon le réglage du téléphone) */

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;

        --primary-dark: #b9cdff;
        --primary-light: #1c2740;

        --text: #e4e8f1;
        --text-light: #a9b3c6;
        --muted: #7d889c;

        --background: #0f131a;
        --surface: #181c25;
        --border: #2a3140;
    }

    .auth-card {
        box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
    }

    .auth-brand-name span,
    .auth-links a {
        color: #86a8ff;
    }

    .auth-card input {
        background: #141821;
        border-color: #2f3747;
    }

    .auth-card input:focus {
        background: #10141c;
    }

    .auth-message.erreur {
        background: rgba(229, 72, 77, 0.16);
        color: #fca5a8;
    }

    .auth-message.succes {
        background: rgba(21, 155, 105, 0.16);
        color: #9be3bd;
    }
}
