/* 0️⃣ Réglages généraux */
        :root {
            --primary: #3659c9;
            --primary-dark: #2945a4;
            --text: #202b43;
            --muted: #738099;
            --background: #f3f6fc;
            --border: #e8edf5;
            --white: #ffffff;
        }

        * {
            box-sizing: border-box;
        }

        body {
            margin: 0;
            min-height: 100vh;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
                         Roboto, Helvetica, Arial, sans-serif;
            color: var(--text);
            background: var(--background);
            line-height: 1.6;
        }

        a {
            color: inherit;
            text-decoration: none;
        }

        /* 1️⃣ Barre de navigation */
        .topbar {
            background: var(--white);
            border-bottom: 1px solid var(--border);
        }

        .topbar-inner {
            max-width: 1120px;
            margin: auto;
            padding: 18px 28px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 20px;
        }

        .brand {
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 19px;
            font-weight: 750;
            letter-spacing: -0.5px;
        }

        .brand-icon {
            width: 43px;
            height: 43px;
            display: grid;
            place-items: center;
            border-radius: 13px;
            background: #edf1ff;
            font-size: 23px;
        }

        .topbar-label {
            color: var(--muted);
            font-size: 13px;
        }

        /* 2️⃣ Contenu principal */
        .container {
            max-width: 1120px;
            margin: 0 auto;
            padding: 42px 28px 56px;
        }

        .welcome {
            position: relative;
            overflow: hidden;
            padding: 38px 40px;
            border-radius: 22px;
            color: white;
            background: linear-gradient(120deg, #2945a4, #5278e8);
            box-shadow: 0 12px 32px rgba(54, 89, 201, 0.16);
        }

        .welcome::after {
            content: "";
            position: absolute;
            width: 250px;
            height: 250px;
            right: -65px;
            top: -105px;
            border: 1px solid rgba(255,255,255,0.18);
            border-radius: 50%;
            box-shadow:
                0 0 0 28px rgba(255,255,255,0.05),
                0 0 0 58px rgba(255,255,255,0.04);
            pointer-events: none;
        }

        .eyebrow {
            margin: 0 0 9px;
            color: #dce5ff;
            font-size: 12px;
            font-weight: 750;
            letter-spacing: 1.8px;
            text-transform: uppercase;
        }

        .welcome h1 {
            margin: 0;
            font-size: clamp(28px, 4vw, 39px);
            line-height: 1.2;
            letter-spacing: -1.2px;
        }

        .welcome p:last-child {
            max-width: 530px;
            margin: 15px 0 0;
            color: #e8edff;
            font-size: 15px;
        }

        /* 3️⃣ Titres de section */
        .section-heading {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 16px;
            margin: 36px 0 18px;
        }

        .section-heading h2 {
            margin: 0;
            font-size: 21px;
            letter-spacing: -0.5px;
        }

        .section-heading p {
            margin: 4px 0 0;
            color: var(--muted);
            font-size: 14px;
        }

        .status {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            padding: 7px 12px;
            border: 1px solid #dce5ff;
            border-radius: 30px;
            background: #edf1ff;
            color: var(--primary-dark);
            font-size: 12px;
            font-weight: 700;
            white-space: nowrap;
        }

        .status-dot {
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: #5278e8;
        }

        /* 4️⃣ Cartes du tableau de bord */
        .cards {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 20px;
        }

        .card {
            padding: 25px;
            border: 1px solid var(--border);
            border-radius: 17px;
            background: var(--white);
            box-shadow: 0 4px 16px rgba(30, 48, 85, 0.025);
            transition: transform 180ms ease, box-shadow 180ms ease;
        }

        .card:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 26px rgba(30, 48, 85, 0.07);
        }

        .card-icon {
            width: 49px;
            height: 49px;
            display: grid;
            place-items: center;
            margin-bottom: 20px;
            border-radius: 14px;
            background: #edf1ff;
            font-size: 25px;
        }

        .card:nth-child(2) .card-icon {
            background: #e8f7f0;
        }

        .card:nth-child(3) .card-icon {
            background: #fff2df;
        }

        .card h3 {
            margin: 0 0 8px;
            font-size: 17px;
            letter-spacing: -0.3px;
        }

        .card p {
            min-height: 48px;
            margin: 0;
            color: var(--muted);
            font-size: 14px;
        }

        .card-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            margin-top: 23px;
            padding-top: 16px;
            border-top: 1px solid var(--border);
            color: var(--primary);
            font-size: 13px;
            font-weight: 700;
        }

        .card-footer span:last-child {
            font-size: 18px;
        }

        /* 5️⃣ Encadré d'information */
        .info-panel {
            display: flex;
            align-items: flex-start;
            gap: 16px;
            margin-top: 25px;
            padding: 22px 24px;
            border: 1px solid #e1e8fb;
            border-radius: 16px;
            background: #f9faff;
        }

        .info-icon {
            flex-shrink: 0;
            font-size: 24px;
        }

        .info-panel h3 {
            margin: 0 0 5px;
            font-size: 15px;
        }

        .info-panel p {
            margin: 0;
            color: var(--muted);
            font-size: 14px;
        }

        /* 6️⃣ Pied de page */
        footer {
            max-width: 1120px;
            margin: 0 auto;
            padding: 22px 28px 30px;
            border-top: 1px solid #e2e8f2;
            color: var(--muted);
            text-align: center;
            font-size: 12px;
        }

        /* 7️⃣ Adaptation aux petits écrans */
        @media (max-width: 760px) {
            .container {
                padding: 26px 18px 38px;
            }

            .topbar-inner {
                padding: 14px 18px;
            }

            .topbar-label {
                display: none;
            }

            .welcome {
                padding: 29px 25px;
                border-radius: 18px;
            }

            .cards {
                grid-template-columns: 1fr;
                gap: 14px;
            }

            .card {
                padding: 21px;
            }

            .card p {
                min-height: 0;
            }

            .section-heading {
                align-items: flex-start;
            }

            footer {
                padding-right: 18px;
                padding-left: 18px;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            *,
            *::before,
            *::after {
                transition: none !important;
            }
        }

/* 5️⃣ Bouton de déconnexion */
.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}

.logout-form {
    margin: 0;
}

.logout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border: 1px solid #d8e0ed;
    border-radius: 8px;
    background: #fff;
    color: #244b85;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease;
}

.logout-button:hover {
    background: #edf2fa;
    border-color: #b8c8e0;
}

.logout-button:focus-visible {
    outline: 2px solid #244b85;
    outline-offset: 3px;
}

@media (max-width: 760px) {
    .topbar-actions {
        gap: 0;
    }

    .logout-button {
        padding: 9px 10px;
        font-size: 12px;
    }
}
