@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700&family=Inter:wght@400;500;600&display=swap');

:root {
    --bleu-marine: #0B3C5D;
    --orange-ambre: #F59E0B;
    --vert-emeraude: #16A34A;
    --fond: #F8FAFC;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', Arial, sans-serif; background: var(--fond); color: #1e293b; }
h1, h2, h3 { font-family: 'Montserrat', Arial, sans-serif; font-weight: 600; }

.menu-toggle-input { display: none; }

.topbar {
    background: var(--bleu-marine); color: #fff; display: flex; align-items: center;
    padding: 0 20px; height: 58px; position: sticky; top: 0; z-index: 100;
}
.topbar .brand {
    display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px;
    font-family: 'Montserrat', Arial, sans-serif; margin-right: 24px;
}
.topbar .brand img { height: 30px; width: auto; }

.main-nav { display: flex; align-items: center; height: 100%; flex: 1; }
.main-nav > a {
    padding: 0 14px; height: 100%; display: flex; align-items: center;
    color: #fff; text-decoration: none; font-size: 14px; font-weight: 600;
}
.main-nav > a.active { background: var(--orange-ambre); color: #1e293b; }

.main-nav details { position: relative; height: 100%; display: flex; align-items: center; }
.main-nav details summary {
    height: 100%; padding: 0 14px; display: flex; align-items: center;
    color: rgba(255,255,255,0.85); cursor: pointer; list-style: none; user-select: none;
    font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
}
.main-nav details summary::-webkit-details-marker { display: none; }
.main-nav details summary::after { content: ' ▾'; }
.main-nav details[open] summary::after { content: ' ▴'; }
.main-nav details[open] summary { background: rgba(255,255,255,0.08); }

.dropdown-panel {
    position: absolute; top: 58px; left: 0; background: #fff; min-width: 230px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.18); border-radius: 0 0 10px 10px; padding: 6px 0; z-index: 50;
}
.dropdown-panel a { display: block; padding: 10px 16px; color: var(--bleu-marine); text-decoration: none; font-size: 14px; }
.dropdown-panel a:hover { background: #f0efe8; }
.dropdown-panel a.active { background: var(--orange-ambre); color: #1e293b; font-weight: 600; }

.user-menu { margin-left: auto; }
.user-menu .dropdown-panel { left: auto; right: 0; border-radius: 10px 0 10px 10px; }

.hamburger { display: none; }

@media (max-width: 900px) {
    .hamburger {
        display: flex; flex-direction: column; gap: 4px; justify-content: center;
        width: 34px; height: 34px; margin-left: auto; cursor: pointer;
    }
    .hamburger span { display: block; width: 20px; height: 2px; background: #fff; }
    .main-nav {
        display: none; position: absolute; top: 58px; left: 0; right: 0; background: var(--bleu-marine);
        flex-direction: column; align-items: stretch; height: auto; padding: 8px 0; box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    }
    .menu-toggle-input:checked ~ .topbar .main-nav { display: flex; }
    .main-nav details { display: block; height: auto; }
    .main-nav details summary { height: auto; padding: 12px 20px; }
    .main-nav > a { height: auto; padding: 12px 20px; }
    .dropdown-panel { position: static; box-shadow: none; border-radius: 0; background: rgba(0,0,0,0.15); }
    .dropdown-panel a { color: #fff; }
    .user-menu { margin-left: 0; }
    .user-menu .dropdown-panel { left: 0; right: auto; }
}

.container { max-width: 1100px; margin: 30px auto; padding: 0 20px; }
.card { background: #fff; border-radius: 10px; padding: 22px; margin-bottom: 20px; box-shadow: 0 1px 3px rgba(11,60,93,0.08); }
h1 { font-size: 22px; margin-bottom: 16px; color: var(--bleu-marine); }
h2 { font-size: 18px; margin-bottom: 12px; color: var(--bleu-marine); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid #e2e8f0; }
th { background: #eef2f6; font-weight: 600; color: var(--bleu-marine); }

.badge { padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-attente { background: #fef3c7; color: #92400e; }
.badge-validee { background: #dcfce7; color: #166534; }
.badge-rejetee { background: #fee2e2; color: #991b1b; }

.btn { display: inline-block; padding: 9px 16px; background: var(--bleu-marine); color: #fff; border: none; border-radius: 6px; text-decoration: none; font-size: 14px; cursor: pointer; font-family: 'Inter', Arial, sans-serif; }
.btn:hover { background: #0a3350; }
.btn-danger { background: #b91c1c; }
.btn-outline { background: transparent; color: var(--bleu-marine); border: 1px solid var(--bleu-marine); }
.btn-accent { background: var(--orange-ambre); color: #1e293b; }
.btn-success { background: var(--vert-emeraude); }

form label { display: block; margin: 12px 0 4px; font-size: 14px; font-weight: 600; color: var(--bleu-marine); }
form input, form select, form textarea { width: 100%; padding: 9px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 14px; font-family: 'Inter', Arial, sans-serif; }
form input:focus, form select:focus, form textarea:focus { outline: none; border-color: var(--bleu-marine); }

.stats { display: flex; gap: 16px; flex-wrap: wrap; }
.stat-box { flex: 1; min-width: 180px; background: #fff; border-radius: 10px; padding: 18px; box-shadow: 0 1px 3px rgba(11,60,93,0.08); border-top: 3px solid var(--orange-ambre); }
.stat-box .label { font-size: 13px; color: #64748b; }
.stat-box .value { font-size: 24px; font-weight: 600; margin-top: 4px; color: var(--bleu-marine); font-family: 'Montserrat', Arial, sans-serif; }

.error { background: #fee2e2; color: #991b1b; padding: 10px; border-radius: 6px; margin-bottom: 14px; font-size: 14px; }
.success { background: #dcfce7; color: #166534; padding: 10px; border-radius: 6px; margin-bottom: 14px; font-size: 14px; }

.pole-transport { border-left: 4px solid var(--bleu-marine); }
.pole-agriculture { border-left: 4px solid var(--vert-emeraude); }
.pole-digital { border-left: 4px solid var(--orange-ambre); }
.pole-formation { border-left: 4px solid #2563EB; }

@media print {
    @page { size: A4; margin: 15mm; }
    .topbar, .hamburger, .no-print { display: none !important; }
    body { background: #fff; }
    .container { margin: 0; padding: 0; max-width: none; }
}
