header {
    background: #2c3e50;
    color: white;
    padding: 25px 40px;
}

header h1 {
    margin: 0;
    color: white;
}

header p {
    margin-bottom: 0;
}

nav {
    background: #34495e;
    padding: 12px 40px;
}

nav a {
    color: white;
    text-decoration: none;
    margin-right: 20px;
    font-weight: bold;
}

nav a:hover {
    text-decoration: underline;
}

main {
    padding: 30px 40px;
}

footer {
    margin-top: 40px;
    padding: 20px 40px;
    background: #2c3e50;
    color: white;
    font-size: 14px;
}

footer p {
    margin: 0;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-title {
    cursor: pointer;
}

.nav-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;

    min-width: 220px;
    background: #2c3e50;
    border: 1px solid #22313f;
    z-index: 9999;
}

.nav-dropdown-content a {
    display: block;
    padding: 10px 14px;
    color: white;
    text-decoration: none;
    white-space: nowrap;
}

.nav-dropdown-content a:hover {
    background: #3d566e;
}

.nav-dropdown:hover .nav-dropdown-content {
    display: block;
}

/* =========================
   Header
   ========================= */

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1000;

    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 22px;

    margin: 12px;
    padding: 10px 14px;

    background: #f7fbff;
    border: 1px solid #dfeaf3;
    border-radius: 20px;
    box-shadow: 0 6px 18px rgba(31, 60, 90, 0.12);
}

.brand-area {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    gap: 12px;

    text-decoration: none;
    color: inherit;
    white-space: nowrap;
}

.brand-logo {
    width: 50px;
    height: 50px;
    border: 2px solid #20a6a6;
    border-radius: 16px;

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

    color: #12335a;
    font-weight: 800;
    font-size: 0.75rem;
    background: white;
    overflow: hidden;
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-text {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: -1px;
}

.brand-text-main {
    color: #102b56;
}

.brand-text-accent {
    color: #17a6a6;
}

/* Important : on neutralise les anciens styles nav */
.app-topbar .child-main-nav {
    flex: 1 1 620px;

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

    min-width: 280px;

    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.nav-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    min-height: 46px;
    padding: 10px 16px;

    border: 1px solid #dfe7ef;
    border-radius: 15px;
    background: white;
    color: #102b56;

    text-decoration: none !important;
    font-weight: 800;
    font-size: 0.92rem;

    box-shadow: 0 3px 10px rgba(31, 60, 90, 0.10);
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.nav-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(31, 60, 90, 0.18);
    background: #eef8ff;
    border-color: #b8d7ea;
    text-decoration: none !important;
}

.nav-pill.active,
.nav-pill.active:hover {
    background: linear-gradient(135deg, #18b6b3, #109c9b);
    color: white;
    border-color: #109c9b;
    text-decoration: none !important;
}

.nav-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.nav-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.nav-disabled:hover {
    transform: none;
}

.topbar-actions {
    flex: 0 1 auto;

    display: flex;
    align-items: center;
    gap: 12px;

    white-space: nowrap;
}

.help-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    color: #5a6b82;
    text-decoration: none;
    font-weight: 700;
}

.help-icon {
    width: 26px;
    height: 26px;
    border: 2px solid #9aa8b8;
    border-radius: 50%;

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

    font-weight: 900;
}

.profile-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.profile-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;

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

    background: #e6f4ff;
    font-size: 1.25rem;
}

.profile-arrow {
    color: #102b56;
    font-weight: 900;
}

.topbar-separator {
    width: 1px;
    height: 30px;
    background: #d7e0ea;
}

/* Admin */
.admin-dropdown {
    position: relative;

    padding: 8px 0;
    margin: -8px 0;
}

.admin-button {
    border: none;
    background: transparent;
    color: #7a8797;

    display: inline-flex;
    align-items: center;
    gap: 6px;

    cursor: pointer;
    font-weight: 800;
    font-size: 0.92rem;
}

.admin-dropdown-content {
    display: none;

    position: absolute;
    top: 100%;
    right: 0;
    z-index: 3000;

    min-width: 230px;
    padding: 8px;

    background: white;
    border: 1px solid #e1e7ee;
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(31, 60, 90, 0.18);
}

.admin-dropdown-content a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;

    color: #102b56;
    text-decoration: none;
    font-weight: 700;
}

.admin-dropdown-content a:hover {
    background: #f0f6fb;
}

.admin-dropdown:hover .admin-dropdown-content,
.admin-dropdown:focus-within .admin-dropdown-content {
    display: block;
}

/* Responsive */
@media (max-width: 1250px) {
    .app-topbar {
        justify-content: center;
    }

    .brand-area {
        flex: 1 1 100%;
        justify-content: center;
    }

    .app-topbar .child-main-nav {
        flex: 1 1 100%;
    }

    .topbar-actions {
        flex: 1 1 100%;
        justify-content: center;
    }
}

@media (max-width: 760px) {
    .brand-text {
        font-size: 1.45rem;
    }

    .brand-logo {
        width: 44px;
        height: 44px;
    }

    .app-topbar .child-main-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .nav-pill {
        width: 100%;
        padding: 10px 8px;
    }

    .topbar-actions {
        flex-wrap: wrap;
    }
}