:root {
    --primary: #b32025;
    --primary-dark: #8f1a1f;
    --bg: #f4f6f8;
    --surface: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --topbar: #ffffff;
    --topbar-border: #d9dee5;
    --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    --radius: 14px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
}

a {
    text-decoration: none;
}

.container {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
}

.topbar {
    background: var(--topbar);
    border-bottom: 1px solid var(--topbar-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.topbar-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}



.brand-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 0.9rem;
    color: var(--muted);
    margin-top: 2px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--text);
    font-weight: 600;
}

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

.nav-user {
    color: var(--muted);
    font-size: 0.95rem;
}

.page {
    padding: 34px 0 50px;
}

.hero {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border: 1px solid var(--border);
    border-left: 6px solid var(--primary);
    border-radius: 18px;
    padding: 42px;
    box-shadow: var(--shadow);
    margin-bottom: 28px;
}

.hero-badge,
.eyebrow {
    display: inline-block;
    background: #fbe9ea;
    color: var(--primary-dark);
    border: 1px solid #f3c9cc;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.hero h1 {
    margin: 0 0 14px;
    font-size: 2.2rem;
}

.hero-text {
    margin: 0;
    max-width: 760px;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.hero-actions {
    margin-top: 24px;
}

.grid {
    display: grid;
    gap: 20px;
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.08rem;
}

.card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.section {
    margin-top: 28px;
}

.section-header {
    margin-bottom: 20px;
}

.section-header h2 {
    margin: 0 0 8px;
    font-size: 1.4rem;
}

.section-header p {
    margin: 0;
    color: var(--muted);
}

.page-header {
    margin-bottom: 22px;
}

.page-header h1 {
    margin: 0 0 6px;
}

.muted {
    margin: 0;
    color: var(--muted);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 26px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}

.stat-label {
    color: var(--muted);
    font-size: 0.92rem;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
}

.module-card {
    min-height: 140px;
}

.module-link {
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.module-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.auth-wrapper {
    display: flex;
    justify-content: center;
    padding: 30px 0;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 30px;
}

.auth-header h1 {
    margin: 0 0 8px;
}

.auth-header p {
    margin: 0 0 22px;
    color: var(--muted);
}

.auth-form p {
    margin-bottom: 16px;
}

.auth-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.auth-form input,
.auth-form select,
.auth-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cfd6de;
    border-radius: 10px;
    font-size: 0.98rem;
    background: #fff;
}

.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(179, 32, 37, 0.12);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    padding: 11px 18px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-light {
    background: white;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-light:hover {
    background: #fff5f5;
}

.btn-outline-light {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-outline-light:hover {
    background: #fff5f5;
}

.btn-block {
    width: 100%;
}

.logout-form {
    display: inline;
}

.footer {
    margin-top: 40px;
    background: #ffffff;
    border-top: 1px solid var(--border);
    padding: 18px 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted);
    font-size: 0.92rem;
}

.footer-center {
    justify-content: center;
    text-align: center;
}

@media (max-width: 980px) {
    .grid-3,
    .stats-grid,
    .card-grid {
        grid-template-columns: 1fr 1fr;
    }

    .topbar-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 0;
    }

    .nav {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .grid-3,
    .stats-grid,
    .card-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 26px 20px;
    }

    .hero h1 {
        font-size: 1.7rem;
    }

    .footer-inner {
        flex-direction: column;
    }

    .footer-center {
        justify-content: center;
    }
}

.logo-navbar{
    height:38px;
    width:auto;
    object-fit:contain;
}

/* optionnel pour alignement parfait */
.brand{
    display:flex;
    align-items:center;
    gap:10px;
}