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

body {
    font-family: var(--f1c-font-sans);
    background-color: var(--f1c-bg-light);
    background-image: url("/static/img/motif-clair.png");
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    color: var(--f1c-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── En-tête ──────────────────────────────────────────── */
.app-header {
    background: var(--f1c-gradient-header);
    padding: 0 2rem;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.app-header .logo img {
    height: 36px;
    width: auto;
}

.app-header .logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--f1c-white);
    letter-spacing: .04em;
}

.app-header .header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-header .user-name {
    color: rgba(255,255,255,.8);
    font-size: .875rem;
}

.btn-logout {
    background: transparent;
    border: 1px solid rgba(255,255,255,.4);
    color: var(--f1c-white);
    padding: .3rem .8rem;
    border-radius: var(--f1c-radius);
    font-family: var(--f1c-font-sans);
    font-size: .8rem;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s;
}
.btn-logout:hover { background: rgba(255,255,255,.12); }

/* ── Barre d'accent (pied) ────────────────────────────── */
.accent-bar {
    height: 6px;
    background: var(--f1c-gradient-accent);
    flex-shrink: 0;
}

/* ── Contenu principal ────────────────────────────────── */
.app-main {
    flex: 1;
    padding: 2rem;
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
}

/* ── Carte ────────────────────────────────────────────── */
.card {
    background: var(--f1c-white);
    border: 1px solid var(--f1c-border);
    border-radius: var(--f1c-radius);
    padding: 2rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--f1c-navy);
    margin-bottom: 1rem;
}

/* ── Pipeline (étapes) ────────────────────────────────── */
.pipeline {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.pipeline-step {
    background: var(--f1c-bg-light);
    border: 1px solid var(--f1c-border);
    border-radius: var(--f1c-radius);
    padding: .4rem 1rem;
    font-size: .8rem;
    color: var(--f1c-text-muted);
    display: flex;
    align-items: center;
    gap: .4rem;
}

.pipeline-step.active {
    background: var(--f1c-blue);
    color: var(--f1c-white);
    border-color: var(--f1c-blue);
}

.pipeline-step::before {
    content: attr(data-num);
    font-weight: 700;
    font-size: .7rem;
    opacity: .6;
}

/* ── Boutons ──────────────────────────────────────────── */
.btn-primary {
    background: var(--f1c-orange);
    color: var(--f1c-white);
    border: none;
    border-radius: var(--f1c-radius);
    padding: .7rem 1.5rem;
    font-family: var(--f1c-font-sans);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: opacity .15s;
}
.btn-primary:hover { opacity: .88; }

.btn-secondary {
    background: var(--f1c-navy);
    color: var(--f1c-white);
    border: none;
    border-radius: var(--f1c-radius);
    padding: .6rem 1.2rem;
    font-family: var(--f1c-font-sans);
    font-size: .9rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: opacity .15s;
}
.btn-secondary:hover { opacity: .85; }

/* ── Formulaires ──────────────────────────────────────── */
.form-group {
    margin-bottom: 1.2rem;
}

.form-label {
    display: block;
    font-size: .875rem;
    font-weight: 700;
    color: var(--f1c-navy);
    margin-bottom: .4rem;
}

.form-input {
    width: 100%;
    padding: .6rem .8rem;
    border: 1px solid var(--f1c-border);
    border-radius: var(--f1c-radius);
    background: var(--f1c-white);
    font-family: var(--f1c-font-sans);
    font-size: .95rem;
    color: var(--f1c-text);
    transition: border-color .15s, box-shadow .15s;
}
.form-input:focus {
    outline: none;
    border-color: var(--f1c-cyan);
    box-shadow: 0 0 0 3px rgba(0,169,235,.18);
}

/* ── Page de connexion ────────────────────────────────── */
body.login-body {
    background: var(--f1c-navy);
    justify-content: center;
    align-items: center;
}

.login-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background:
        url("/static/img/motif-sombre.png") center/cover no-repeat,
        var(--f1c-navy);
    padding: 2rem;
}

.login-card {
    background: var(--f1c-white);
    border-radius: var(--f1c-radius);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 8px 32px rgba(0,0,0,.35);
}

.login-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-logo img {
    height: 52px;
    width: auto;
}

.login-logo .logo-fallback {
    font-size: 2rem;
    font-weight: 700;
    color: var(--f1c-navy);
    letter-spacing: .08em;
}

.login-title {
    text-align: center;
    font-size: 1rem;
    color: var(--f1c-text-muted);
    margin-bottom: 1.8rem;
}

.login-error {
    background: #fff0ec;
    border: 1px solid #f8bfa8;
    color: #c0440f;
    border-radius: var(--f1c-radius);
    padding: .6rem .9rem;
    font-size: .875rem;
    margin-bottom: 1rem;
}

.login-card .btn-primary {
    width: 100%;
    text-align: center;
    margin-top: .4rem;
}

.login-footer {
    margin-top: 1.5rem;
    text-align: center;
    color: rgba(255,255,255,.45);
    font-size: .75rem;
}
