:root {
    --brand-dark:        #0d1f2d;
    --brand-mid:         #1a3a52;
    --brand-teal:        #007cba;
    --brand-teal-light:  #0099e0;
    --brand-accent:      #00b4d8;
    --text-primary:      #ffffff;
    --text-muted:        rgba(255, 255, 255, 0.60);
    --text-subtle:       rgba(255, 255, 255, 0.35);
    --border-subtle:     rgba(255, 255, 255, 0.10);
}

/* ── Fond global — triple protection ── */
html,
body {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh;
    background-color: #0d1f2d !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary) !important;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-color: #0d1f2d;
    z-index: -1;
}

/* ── Conteneur principal ── */
div.container:first-of-type {
    padding-top: 40px;
    padding-bottom: 40px;
}

/* ── Carte principale ── */
.card {
    background-color: var(--brand-mid) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: 16px !important;
    box-shadow: none !important;
    color: var(--text-primary) !important;
    max-width: 780px;
    width: 100%;
    margin: 0 auto;
}

.card-success {
    border-top: 3px solid var(--brand-teal) !important;
}

.card-body {
    padding: 36px 40px !important;
}

/* ── Navbar ── */
.navbar,
.navbar.bg-body-tertiary {
    background-color: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: 10px !important;
    margin-bottom: 28px;
}

.navbar-brand {
    color: var(--text-primary) !important;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-size: 16px;
}

.navbar-brand:hover {
    color: var(--text-primary) !important;
}

.menu-logo {
    height: 28px;
    width: auto;
}

.nav-link,
.nav-link:hover {
    color: var(--text-muted) !important;
    transition: color 0.15s;
}

.nav-link:hover {
    color: var(--text-primary) !important;
}

.navbar-toggler {
    border-color: var(--border-subtle) !important;
}

.navbar-toggler-icon {
    filter: invert(1);
}

/* ── Logo centré ── */
.logo {
    max-height: 48px;
    width: auto;
}

/* ── Alertes ── */
.alert {
    border-radius: 10px !important;
    font-size: 14px;
    box-shadow: none !important;
}

.alert-success {
    background-color: rgba(0, 124, 186, 0.15) !important;
    border: 1px solid rgba(0, 124, 186, 0.35) !important;
    color: var(--brand-accent) !important;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.10) !important;
    border: 1px solid rgba(255, 193, 7, 0.25) !important;
    color: #ffd966 !important;
}

.alert-info {
    background-color: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-primary) !important;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.15) !important;
    border: 1px solid rgba(220, 53, 69, 0.30) !important;
    color: #ff8fa3 !important;
}

/* ── Formulaire ── */
.col-form-label {
    color: var(--text-muted) !important;
    font-size: 13px;
    font-weight: 500;
}

.form-control {
    background-color: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 8px !important;
    color: var(--text-primary) !important;
    font-size: 14px;
    height: 42px;
    transition: border-color 0.18s, box-shadow 0.18s;
}

.form-control:focus {
    background-color: rgba(255, 255, 255, 0.10) !important;
    border-color: var(--brand-teal) !important;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.25) !important;
    color: var(--text-primary) !important;
    outline: none;
}

.form-control::placeholder {
    color: var(--text-subtle) !important;
}

.input-group-text {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: var(--text-muted) !important;
    border-radius: 8px 0 0 8px !important;
}

/* ── Boutons ── */
.btn-success,
.btn-primary {
    background-color: var(--brand-teal) !important;
    border: none !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 10px 22px !important;
    text-shadow: none !important;
    box-shadow: none !important;
    transition: background 0.18s !important;
}

.btn-success:hover,
.btn-primary:hover,
.btn-success:focus,
.btn-primary:focus {
    background-color: var(--brand-teal-light) !important;
    box-shadow: none !important;
    outline: none !important;
}

/* ── Politique de mot de passe ── */
.ppolicy {
    font-size: 13px;
}

.ppolicy ul {
    margin-top: 8px;
    margin-bottom: 0;
}

.ppolicy li {
    margin-bottom: 4px;
    color: #ffd966;
}

/* ── Liens ── */
a {
    color: var(--brand-accent) !important;
    text-decoration: none !important;
    transition: color 0.15s;
}

a:hover {
    color: var(--brand-teal-light) !important;
}

/* ── Footer masqué ── */
#footer {
    display: none !important;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .card-body {
        padding: 24px 16px !important;
    }

    .col-form-label.text-end {
        text-align: left !important;
    }
}