:root {
    --primary: #0a3d62;
    --primary-dark: #062c47;
    --accent: #c9a44c;
    --bg: #f5f7fa;
    --surface: #ffffff;
    --text: #1c2b36;
    --muted: #6b7a87;
    --border: #e3e8ee;
    --success: #1e7e44;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, .display-font {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--primary-dark);
    font-weight: 700;
}

/* Header */
.site-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border-bottom: 4px solid var(--accent);
}
.site-header .institution {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}
.site-header .department {
    font-size: 0.9rem;
    opacity: 0.95;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.site-header .country {
    font-size: 0.75rem;
    opacity: 0.7;
}
.emblem {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--primary-dark);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.header-nav a {
    color: #fff;
    text-decoration: none;
    margin-left: 1.25rem;
    font-size: 0.9rem;
    opacity: 0.9;
    transition: opacity 0.2s;
}
.header-nav a:hover { opacity: 1; color: var(--accent); }

.site-main { flex: 1; padding: 2.5rem 0; }

/* Hero */
.hero {
    text-align: center;
    margin-bottom: 2.5rem;
}
.hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    margin-bottom: 0.75rem;
}
.hero p { color: var(--muted); font-size: 1.05rem; max-width: 720px; margin: 0 auto; }

/* Card */
.card-elegant {
    background: var(--surface);
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(10, 61, 98, 0.08);
    border: 1px solid var(--border);
    overflow: hidden;
}
.card-elegant .card-head {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 1.25rem 1.75rem;
    border-bottom: 3px solid var(--accent);
}
.card-elegant .card-head h2 {
    color: #fff;
    margin: 0;
    font-size: 1.4rem;
}
.card-elegant .card-body { padding: 2rem; }

/* Form */
.form-label { font-weight: 500; color: var(--primary-dark); margin-bottom: 0.4rem; }
.form-label .req { color: #c0392b; }
.form-control, .form-select {
    border: 1px solid var(--border);
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    font-size: 0.95rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(10,61,98,0.12);
}
textarea.form-control { min-height: 120px; }

.btn-primary-uac {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s;
}
.btn-primary-uac:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); }
.btn-accent {
    background: var(--accent); color: var(--primary-dark); border: none; font-weight: 600;
    padding: 0.5rem 1rem; border-radius: 6px;
}

/* Alerts */
.alert-success-pro {
    background: #e8f5ee;
    border-left: 4px solid var(--success);
    color: #14532d;
    padding: 1rem 1.25rem;
    border-radius: 8px;
}
.alert-danger-pro {
    background: #fdecea;
    border-left: 4px solid #c0392b;
    color: #7a1f15;
    padding: 1rem 1.25rem;
    border-radius: 8px;
}

/* Footer */
.site-footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.85);
    margin-top: auto;
}

/* Admin */
.sidebar {
    background: var(--primary-dark);
    min-height: calc(100vh - 90px);
    color: #fff;
    padding: 1.5rem 0;
}
.sidebar a {
    display: block;
    color: rgba(255,255,255,0.85);
    padding: 0.7rem 1.5rem;
    text-decoration: none;
    border-left: 3px solid transparent;
    font-size: 0.95rem;
}
.sidebar a:hover, .sidebar a.active {
    background: rgba(255,255,255,0.06);
    border-left-color: var(--accent);
    color: #fff;
}
.sidebar a i { margin-right: 0.6rem; }

.stat-card {
    background: var(--surface);
    border-radius: 10px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-top: 4px solid var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.stat-card.accent { border-top-color: var(--accent); }
.stat-card.success { border-top-color: var(--success); }
.stat-card .stat-label { color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; }
.stat-card .stat-value { font-family: 'Playfair Display', serif; font-size: 2.2rem; color: var(--primary-dark); font-weight: 700; }

.table-pro { background: var(--surface); border-radius: 10px; overflow: hidden; }
.table-pro thead { background: var(--primary); color: #fff; }
.table-pro thead th { font-weight: 500; padding: 0.9rem; border: none; }
.table-pro tbody td { padding: 0.85rem 0.9rem; vertical-align: middle; border-color: var(--border); }
.table-pro tbody tr:hover { background: #fafbfc; }

.badge-fonction {
    background: rgba(10,61,98,0.1); color: var(--primary-dark);
    padding: 0.3rem 0.7rem; border-radius: 20px; font-size: 0.8rem; font-weight: 500;
}

/* Login */
.login-wrap {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 2rem 1rem;
}
.login-card {
    background: #fff;
    border-radius: 14px;
    max-width: 420px;
    width: 100%;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    border-top: 5px solid var(--accent);
}
.login-card h1 { font-size: 1.5rem; text-align: center; margin-bottom: 0.5rem; }
.login-card .subtitle { text-align: center; color: var(--muted); margin-bottom: 2rem; font-size: 0.9rem; }

@media (max-width: 768px) {
    .header-nav { width: 100%; margin-top: 0.75rem; }
    .header-nav a { margin: 0 0.75rem 0 0; }
    .card-elegant .card-body { padding: 1.25rem; }
    .sidebar { min-height: auto; }
}
