/* =========================================================
   Gestion Étudiants — Design System
   Direction : "registre académique" — encre profonde, bleu
   institutionnel, sceau doré. Fraunces (titres) + Inter (UI)
   + IBM Plex Mono (codes/matricules).
   ========================================================= */

:root {
    color-scheme: light;

    /* Ink / navy */
    --ink-900: #0b1220;
    --ink-800: #121b30;
    --ink-700: #1e2a44;
    --ink-600: #2a3757;

    /* Brand indigo */
    --brand-700: #2c37b8;
    --brand-600: #3b4ce0;
    --brand-500: #5867f2;
    --brand-400: #7c8bf5;
    --brand-100: #dde1fd;
    --brand-50: #eef0ff;

    /* Gold seal accent */
    --gold-600: #a97c26;
    --gold-500: #c99a3d;
    --gold-400: #dbb767;
    --gold-100: #fbf1dc;

    /* Paper neutrals */
    --paper-50: #f5f6f9;
    --paper-0: #ffffff;
    --line: #e6e8ef;
    --line-strong: #d6d9e3;

    /* Text */
    --ink: #10182b;
    --slate-700: #384157;
    --slate-500: #667085;
    --slate-400: #94a0b6;

    /* Status */
    --success-600: #15803d;
    --success-100: #e7f6ec;
    --warning-600: #b45309;
    --warning-100: #fef3e2;
    --danger-600: #dc2626;
    --danger-100: #fdecec;
    --info-600: #0e7490;
    --info-100: #e3f6fb;

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgba(11, 18, 32, 0.06);
    --shadow: 0 8px 24px -8px rgba(11, 18, 32, 0.14), 0 1px 2px rgba(11,18,32,.05);
    --shadow-lg: 0 24px 48px -16px rgba(11, 18, 32, 0.24);

    --font-display: 'Fraunces', 'Georgia', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; min-height: 100%; overflow-x: hidden; }
body {
    margin: 0;
    min-height: 100%;
    overflow-x: hidden;
    background: var(--paper-50);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-display {
    font-family: var(--font-display);
    color: var(--ink-900);
    font-weight: 600;
    letter-spacing: -0.01em;
}

a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); }

.text-muted { color: var(--slate-500) !important; }
.text-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand-600);
    font-weight: 600;
}
code, .mono { font-family: var(--font-mono); }

:focus-visible {
    outline: 3px solid var(--brand-400);
    outline-offset: 2px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Layout shell ---------- */
.app-shell { min-height: 100vh; width: 100%; overflow-x: hidden; }

.sidebar {
    width: 268px;
    height: 100vh;
    max-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 40;
    background:
        radial-gradient(1200px 400px at -10% -10%, rgba(88,103,242,.25), transparent 60%),
        linear-gradient(180deg, var(--ink-900) 0%, #0e1526 100%);
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255,255,255,.06);
    transition: transform .25s ease;
    overflow: hidden;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: 1.5rem 1.4rem 1.15rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    flex-shrink: 0;
}

.brand-mark {
    width: 38px; height: 38px; flex: none;
    border-radius: 10px;
    background: linear-gradient(145deg, var(--gold-400), var(--gold-600));
    display: flex; align-items: center; justify-content: center;
    color: var(--ink-900); font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
    box-shadow: var(--shadow-sm);
}

.brand-word { color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; line-height: 1.15; }
.brand-sub { color: rgba(255,255,255,.45); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; font-family: var(--font-mono); }

.sidebar-nav {
    padding: 1rem .85rem;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1 1 auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.25) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.22);
    border-radius: 999px;
}
.sidebar-section-label {
    font-family: var(--font-mono);
    font-size: .66rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255,255,255,.32);
    padding: .9rem .65rem .35rem;
}

.sidebar .nav-link {
    color: rgba(255,255,255,.72);
    padding: .62rem .75rem;
    border-radius: 10px;
    margin-bottom: .15rem;
    font-size: .89rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: .65rem;
    position: relative;
}
.sidebar .nav-link i { font-size: 1.02rem; width: 18px; text-align: center; opacity: .85; }
.sidebar .nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar .nav-link.active {
    background: linear-gradient(90deg, rgba(88,103,242,.35), rgba(88,103,242,.12));
    color: #fff;
}
.sidebar .nav-link.active::before {
    content: "";
    position: absolute; left: -.85rem; top: 8px; bottom: 8px; width: 3px;
    background: var(--gold-500); border-radius: 0 4px 4px 0;
}
.sidebar-foot {
    flex-shrink: 0;
    padding: 1rem 1.25rem 1.3rem;
    border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-logout { color: rgba(255,255,255,.55) !important; }
.sidebar-logout:hover { color: #fff !important; }

.main-content { margin-left: 268px; flex: 1; min-width: 0; min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; }

.topbar {
    position: sticky; top: 0; z-index: 30;
    background: rgba(246,247,249,.86);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    padding: .85rem 1.75rem;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.topbar-title { font-family: var(--font-display); font-size: 1.15rem; color: var(--ink-900); margin: 0; }
.topbar-crumb { font-size: .78rem; color: var(--slate-500); }
.topbar-crumb a { color: var(--slate-500); }
.topbar-crumb .sep { margin: 0 .4rem; opacity: .5; }

.sidebar-toggle {
    display: none;
    border: 1px solid var(--line-strong);
    background: #fff; border-radius: 8px; width: 36px; height: 36px;
    align-items: center; justify-content: center; color: var(--ink-900);
}

.topbar-search { position: relative; width: 280px; }
.topbar-search input {
    width: 100%; border: 1px solid var(--line-strong); background: #fff;
    border-radius: 10px; padding: .5rem .75rem .5rem 2.15rem; font-size: .85rem;
}
.topbar-search i { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--slate-400); }

.user-chip {
    display: flex; align-items: center; gap: .6rem; padding: .35rem .55rem .35rem .35rem;
    border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; cursor: pointer;
}
.avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(145deg, var(--brand-500), var(--brand-700));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .78rem; flex: none;
}
.avatar-lg { width: 56px; height: 56px; font-size: 1.15rem; }
.avatar-sm { width: 26px; height: 26px; font-size: .68rem; }

.page-wrap { padding: 1.75rem; flex: 1; width: 100%; max-width: 100%; }

footer.app-footer {
    padding: 1.25rem 1.75rem; color: var(--slate-400); font-size: .78rem; border-top: 1px solid var(--line);
}

@media (max-width: 991px) {
    .sidebar { width: 100%; max-width: 100%; transform: translateX(-100%); box-shadow: var(--shadow-lg); }
    .sidebar.open { transform: translateX(0); z-index: 50; }
    .main-content { margin-left: 0; }
    .sidebar-toggle { display: inline-flex; }
    .topbar-search { display: none; }
}

/* ---------- Cards & surfaces ---------- */
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); background: var(--paper-0); }
.card-body { padding: 1.4rem; }
.surface-title { font-family: var(--font-display); font-size: 1.05rem; margin-bottom: .25rem; }

.stat-card {
    border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper-0);
    padding: 1.15rem 1.3rem; display: flex; align-items: center; gap: .9rem; box-shadow: var(--shadow-sm);
}
.stat-icon { width: 44px; height: 44px; border-radius: 12px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 1.15rem; }
.stat-value { font-family: var(--font-display); font-size: 1.6rem; line-height: 1; color: var(--ink-900); }
.stat-label { font-size: .74rem; color: var(--slate-500); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; margin-top: .2rem; }
.stat-delta { font-size: .74rem; font-weight: 600; }

.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; flex-wrap: wrap; gap: .75rem; }
.section-heading h1 { font-size: 1.55rem; margin: 0; }
.section-heading .lead-sub { color: var(--slate-500); font-size: .9rem; margin: .2rem 0 0; }

/* ---------- Buttons ---------- */
.btn { border-radius: 10px; font-weight: 600; font-size: .86rem; padding: .55rem 1.05rem; display: inline-flex; align-items: center; gap: .45rem; }
.btn i { font-size: .95rem; }
.btn-primary { background: var(--brand-600); border-color: var(--brand-600); }
.btn-primary:hover, .btn-primary:focus { background: var(--brand-700); border-color: var(--brand-700); }
.btn-outline-primary { color: var(--brand-600); border-color: var(--brand-100); background: var(--brand-50); }
.btn-outline-primary:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.btn-outline-secondary { border-color: var(--line-strong); color: var(--slate-700); }
.btn-outline-danger { color: var(--danger-600); border-color: var(--danger-100); background: var(--danger-100); }
.btn-outline-danger:hover { background: var(--danger-600); border-color: var(--danger-600); color: #fff; }
.btn-success { background: var(--success-600); border-color: var(--success-600); }
.btn-sm { padding: .38rem .7rem; font-size: .78rem; border-radius: 8px; }
.btn-gold { background: linear-gradient(145deg, var(--gold-400), var(--gold-600)); border: none; color: var(--ink-900); }
.btn-gold:hover { filter: brightness(1.05); color: var(--ink-900); }

/* ---------- Forms ---------- */
.form-label { font-size: .82rem; font-weight: 600; color: var(--slate-700); margin-bottom: .35rem; }
.form-control, .form-select { border-radius: 10px; border: 1px solid var(--line-strong); font-size: .89rem; padding: .55rem .75rem; }
.form-control:focus, .form-select:focus { border-color: var(--brand-400); box-shadow: 0 0 0 3px var(--brand-100); }
.form-text { font-size: .76rem; }
.input-icon { position: relative; }
.input-icon i { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--slate-400); font-size: .9rem; }
.input-icon .form-control { padding-left: 2.1rem; }

/* ---------- Tables ---------- */
.table { font-size: .87rem; margin-bottom: 0; }
.table thead th {
    border-bottom: 1px solid var(--line); color: var(--slate-500); font-size: .7rem;
    text-transform: uppercase; letter-spacing: .06em; font-weight: 700; padding: .7rem .85rem; background: var(--paper-50);
}
.table thead tr:first-child th:first-child { border-top-left-radius: 10px; }
.table thead tr:first-child th:last-child { border-top-right-radius: 10px; }
.table td { padding: .75rem .85rem; vertical-align: middle; border-bottom: 1px solid var(--line); }
.table tbody tr:last-child td { border-bottom: none; }
.table-hover tbody tr:hover { background: var(--brand-50); }
.name-cell { display: flex; align-items: center; gap: .65rem; }

/* ---------- Badges / status pills ---------- */
.pill { display: inline-flex; align-items: center; gap: .35rem; padding: .28rem .65rem; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .01em; }
.pill i { font-size: .68rem; }
.pill-success { background: var(--success-100); color: var(--success-600); }
.pill-warning { background: var(--warning-100); color: var(--warning-600); }
.pill-danger { background: var(--danger-100); color: var(--danger-600); }
.pill-info { background: var(--info-100); color: var(--info-600); }
.pill-neutral { background: var(--paper-50); color: var(--slate-500); border: 1px solid var(--line-strong); }
.pill-gold { background: var(--gold-100); color: var(--gold-600); }

.code-chip { font-family: var(--font-mono); font-size: .76rem; background: var(--paper-50); border: 1px solid var(--line-strong); padding: .2rem .5rem; border-radius: 6px; color: var(--ink-700); }

/* ---------- Alerts / flash ---------- */
.alert { border: 1px solid transparent; border-radius: 12px; font-size: .88rem; }
.alert-success { background: var(--success-100); color: var(--success-600); }
.alert-danger { background: var(--danger-100); color: var(--danger-600); }
.alert-warning { background: var(--warning-100); color: var(--warning-600); }
.alert-info { background: var(--info-100); color: var(--info-600); }

/* ---------- Empty states ---------- */
.empty-state { text-align: center; padding: 2.75rem 1.5rem; color: var(--slate-500); }
.empty-state i { font-size: 2rem; color: var(--slate-400); margin-bottom: .6rem; display: block; }
.empty-state h3 { font-size: 1rem; color: var(--ink-900); margin-bottom: .3rem; }

/* ---------- Seal / ribbon signature motif ---------- */
.seal {
    width: 64px; height: 64px; border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, var(--gold-400), var(--gold-600) 70%);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 18px rgba(169,124,38,.35), inset 0 0 0 3px rgba(255,255,255,.35);
    color: var(--ink-900); font-family: var(--font-display); font-size: 1.5rem; position: relative;
}
.seal::after { content: ""; position: absolute; inset: -8px; border: 1.5px dashed rgba(201,154,61,.55); border-radius: 50%; }

/* ---------- Progress ---------- */
.progress-track { height: 8px; border-radius: 999px; background: var(--paper-50); overflow: hidden; border: 1px solid var(--line); }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--brand-500), var(--brand-700)); border-radius: 999px; }

/* ---------- Tabs ---------- */
.nav-tabs-clean { border-bottom: 1px solid var(--line); gap: .3rem; }
.nav-tabs-clean .nav-link { border: none; color: var(--slate-500); font-weight: 600; font-size: .86rem; padding: .65rem .3rem; margin-right: 1.35rem; border-radius: 0; border-bottom: 2px solid transparent; }
.nav-tabs-clean .nav-link.active { color: var(--brand-600); border-bottom-color: var(--brand-600); background: none; }

/* ================= AUTH LAYOUT ================= */
.auth-shell { min-height: 100vh; display: flex; }
.auth-brand-panel {
    flex: 1.05; position: relative; overflow: hidden; color: #fff;
    background:
        radial-gradient(900px 500px at 10% 0%, rgba(88,103,242,.35), transparent 55%),
        radial-gradient(700px 500px at 100% 100%, rgba(201,154,61,.18), transparent 55%),
        linear-gradient(160deg, var(--ink-900), #0d1424 60%, var(--ink-800));
    padding: 3rem; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-brand-panel .ruled { position: absolute; inset: 0; opacity: .05; pointer-events: none; background-image: repeating-linear-gradient(180deg, #fff 0 1px, transparent 1px 34px); }
.auth-form-panel { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2.5rem; background: var(--paper-0); }
.auth-card { width: 100%; max-width: 400px; }
.auth-doc { margin-top: 2rem; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius-lg); padding: 1.5rem; backdrop-filter: blur(6px); }
.auth-doc-row { display: flex; justify-content: space-between; font-size: .8rem; padding: .5rem 0; border-bottom: 1px dashed rgba(255,255,255,.14); color: rgba(255,255,255,.8); }
.auth-doc-row:last-child { border-bottom: none; }

@media (max-width: 900px) { .auth-brand-panel { display: none; } }

/* ================= VITRINE (landing) ================= */
.nav-vitrine { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-vitrine .navbar-brand { display: flex; align-items: center; gap: .75rem; font-family: var(--font-display); font-weight: 600; color: var(--ink-900); font-size: 1.05rem; }
.nav-uk-logo { height: 40px; width: auto; object-fit: contain; }
.nav-vitrine .nav-link { color: var(--slate-700); font-weight: 500; font-size: .89rem; }
.nav-vitrine .nav-link:hover { color: var(--brand-600); }

/* ---- Hero UK ---- */
.hero-uk {
    position: relative;
    padding: 5rem 0 5.5rem;
    color: #fff;
    overflow: hidden;
}
.hero-uk-bg { position: absolute; inset: 0; z-index: 0; }
.hero-uk-bg-img { width: 100%; height: 100%; object-fit: cover; }
.hero-uk-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(13,20,36,.92) 0%, rgba(13,20,36,.78) 45%, rgba(30,64,175,.65) 100%);
}
.hero-uk .container { z-index: 1; position: relative; }
.hero-uk-logo { max-height: 72px; width: auto; }
.hero-uk-motto {
    display: inline-flex; align-items: center; gap: .5rem;
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15);
    border-radius: 999px; padding: .35rem 1rem; font-size: .82rem; font-weight: 600;
}
.hero-uk-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw, 3rem);
    line-height: 1.12; letter-spacing: -0.02em;
    color: #fff;
}
.hero-uk-title em { font-style: normal; color: var(--gold-400); }
.hero-uk-lead { font-size: 1.08rem; color: rgba(255,255,255,.8); max-width: 34rem; line-height: 1.65; }
.hero-uk-meta { display: flex; flex-wrap: wrap; gap: 1.25rem; font-size: .85rem; color: rgba(255,255,255,.65); }
.hero-uk-meta i { color: var(--gold-400); margin-right: .35rem; }
.hero-uk-card {
    background: rgba(255,255,255,.97); border-radius: var(--radius-lg);
    padding: 1.5rem; box-shadow: var(--shadow-lg); color: var(--ink-900);
}
.hero-uk-card-head {
    display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem;
    padding-bottom: 1rem; border-bottom: 1px solid var(--line);
    font-size: .82rem; font-weight: 600; color: var(--slate-600);
}
.hero-uk-stat {
    background: var(--paper-50); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 1rem; text-align: center;
}
.hero-uk-stat strong {
    display: block; font-family: var(--font-display); font-size: 1.5rem;
    color: var(--brand-700); line-height: 1; margin-bottom: .25rem;
}
.hero-uk-stat span { font-size: .72rem; color: var(--slate-500); text-transform: uppercase; letter-spacing: .04em; }
.hero-uk-card-foot {
    margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--line);
    font-size: .78rem; color: var(--slate-600); display: flex; align-items: flex-start; gap: .5rem;
}
.hero-uk-card-foot i { color: var(--gold-500); font-size: 1rem; flex-shrink: 0; margin-top: .1rem; }
.stat-strip-uk .stat-strip-eyebrow {
    display: block; font-size: .72rem; text-transform: uppercase;
    letter-spacing: .1em; color: rgba(255,255,255,.45); margin-bottom: .5rem;
}
.uk-about-grid {
    position: relative; display: grid; grid-template-columns: 1fr 1fr;
    gap: 1rem; min-height: 380px;
}
.uk-about-main {
    grid-row: 1 / 3; border-radius: var(--radius-lg);
    width: 100%; height: 100%; object-fit: cover; box-shadow: var(--shadow);
}
.uk-about-sub {
    border-radius: var(--radius-lg); width: 100%; height: 180px;
    object-fit: cover; box-shadow: var(--shadow);
}
.uk-about-badge {
    position: absolute; bottom: -1rem; left: 50%; transform: translateX(-50%);
    background: var(--ink-900); color: #fff; border-radius: var(--radius);
    padding: 1rem 1.5rem; text-align: center; box-shadow: var(--shadow-lg); min-width: 280px;
}
.uk-about-badge strong { display: block; font-size: .9rem; color: var(--gold-400); margin-bottom: .25rem; }
.uk-about-badge span { font-size: .78rem; color: rgba(255,255,255,.65); }
.uk-missions { background: var(--paper-50); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.uk-mission-card { border-left: 3px solid var(--brand-500); }
.uk-faculty-card {
    background: var(--paper-0); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.25rem; height: 100%;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.uk-faculty-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--brand-300); }
.uk-faculty-code {
    display: block; font-family: var(--font-display); font-weight: 700;
    font-size: 1rem; color: var(--brand-700); margin-bottom: .35rem;
}
.uk-faculty-name { font-size: .82rem; color: var(--slate-600); line-height: 1.4; }
.uk-gallery-item {
    position: relative; margin: 0; border-radius: var(--radius-lg);
    overflow: hidden; box-shadow: var(--shadow); height: 220px;
}
.uk-gallery-featured { height: 280px; }
.uk-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.uk-gallery-item:hover img { transform: scale(1.05); }
.uk-gallery-item figcaption {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 2.5rem 1rem 1rem;
    background: linear-gradient(transparent, rgba(13,20,36,.85));
    color: #fff; font-size: .82rem; font-weight: 500;
}
@media (max-width: 767px) {
    .hero-uk { padding: 3rem 0 3.5rem; text-align: center; }
    .hero-uk-lead { margin: 0 auto; }
    .hero-uk-meta { justify-content: center; }
    .hero-uk-logo-wrap { display: flex; justify-content: center; }
    .uk-about-grid { grid-template-columns: 1fr; min-height: auto; }
    .uk-about-main { grid-row: auto; height: 240px; }
    .uk-about-sub { height: 160px; }
    .uk-about-badge { position: static; transform: none; margin-top: 1rem; width: 100%; }
}

.hero-vitrine {
    background:
        radial-gradient(1100px 480px at 85% -10%, rgba(88,103,242,.16), transparent 60%),
        radial-gradient(700px 420px at 0% 100%, rgba(201,154,61,.12), transparent 55%),
        var(--paper-50);
    padding: 5.5rem 0 5rem; border-bottom: 1px solid var(--line); position: relative;
}
.hero-vitrine h1 { font-size: 3.1rem; line-height: 1.08; letter-spacing: -0.02em; }
.hero-vitrine .lead { font-size: 1.12rem; color: var(--slate-700); max-width: 34rem; }

.hero-mock { background: var(--paper-0); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 1.5rem; transform: rotate(1.2deg); }
.hero-mock:hover { transform: rotate(0deg); transition: transform .35s ease; }
.hero-mock-head { display: flex; align-items: center; gap: .45rem; margin-bottom: 1rem; }
.hero-mock-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }

.stat-strip { background: var(--ink-900); color: #fff; padding: 2.6rem 0; }
.stat-strip .num { font-family: var(--font-display); font-size: 2.3rem; }
.stat-strip .lbl { font-size: .78rem; color: rgba(255,255,255,.55); text-transform: uppercase; letter-spacing: .08em; }
.stat-strip-items .stat-strip-item {
    flex: 0 0 auto;
    min-width: 9rem;
    max-width: 14rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.section-pad { padding: 5rem 0; }
.eyebrow-block { text-align: center; max-width: 640px; margin: 0 auto 3rem; }

.feature-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper-0); padding: 1.8rem; height: 100%; transition: transform .2s ease, box-shadow .2s ease; }
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--brand-50); color: var(--brand-600); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 1rem; }

.step-row { display: flex; gap: 1.5rem; align-items: flex-start; }
.step-num { font-family: var(--font-display); font-size: 1.8rem; color: var(--gold-500); width: 56px; flex: none; }

.cta-band { background: linear-gradient(135deg, var(--ink-900), var(--ink-700)); color: #fff; border-radius: var(--radius-lg); padding: 3.2rem; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(201,154,61,.25), transparent 70%); top: -100px; right: -60px; }

.footer-vitrine { background: var(--ink-900); color: rgba(255,255,255,.6); padding: 3rem 0 1.5rem; font-size: .86rem; }
.footer-vitrine a { color: rgba(255,255,255,.75); }
.footer-vitrine a:hover { color: #fff; }
.footer-vitrine hr { border-color: rgba(255,255,255,.1); }

@media (max-width: 767px) {
    .hero-vitrine h1 { font-size: 2.15rem; }
    .hero-vitrine { padding: 3rem 0 2.5rem; text-align: center; }
    .hero-vitrine .lead { margin: 0 auto; }
}

/* ================= Certificate print/preview ================= */
.certificate-sheet { background: var(--paper-0); border: 1px solid var(--line); max-width: 780px; margin: 0 auto; padding: 3.2rem; position: relative; box-shadow: var(--shadow-lg); }
.certificate-sheet::before { content: ""; position: absolute; inset: 14px; border: 2px solid var(--gold-500); border-radius: 4px; pointer-events: none; opacity: .55; }
.certificate-sheet .cert-title { font-family: var(--font-display); font-size: 2rem; text-align: center; color: var(--ink-900); }
.certificate-sheet .cert-name { font-family: var(--font-display); font-size: 1.7rem; text-align: center; color: var(--brand-700); margin: .75rem 0; }
@media print {
    .no-print { display: none !important; }
    body { background: #fff; }
    .certificate-sheet { box-shadow: none; border: none; }
}

.gap-2p { gap: .5rem; }
.mb-6 { margin-bottom: 3.5rem; }
.rounded-xl { border-radius: var(--radius); }

/* ---- Sidebar UK logo ---- */
.uk-logo-frame {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 10px;
    padding: 6px 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
    flex-shrink: 0;
}
.uk-logo-frame img {
    display: block;
    width: auto;
    object-fit: contain;
}
.uk-logo-frame-sm { padding: 5px 8px; border-radius: 8px; }
.uk-logo-frame-sm img { max-height: 36px; }
.uk-logo-frame-auth { padding: 8px 14px; }
.uk-logo-frame-auth img { max-height: 84px; width: auto; }
.uk-logo-frame-hero { padding: 10px 14px; border-radius: 12px; }
.uk-logo-frame-hero img { max-height: 72px; }
.uk-logo-frame-cta { padding: 8px 12px; }
.uk-logo-frame-cta img { max-height: 56px; }
.uk-logo-frame-nav { padding: 4px 8px; border-radius: 8px; }
.uk-logo-frame-nav img { max-height: 36px; }

.sidebar-brand { display: flex; align-items: center; gap: .75rem; }
.sidebar-uk-logo { height: 34px; width: auto; object-fit: contain; }
.nav-uk-logo { height: 32px; width: auto; object-fit: contain; }
.hero-uk-logo { max-height: 72px; width: auto; }

/* ---- Dashboard hero ---- */
.dash-hero {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 180px;
}
.dash-hero-bg { position: absolute; inset: 0; }
.dash-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.dash-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(13,20,36,.88) 0%, rgba(13,20,36,.72) 50%, rgba(30,64,175,.55) 100%);
}
.dash-hero-content { position: relative; z-index: 1; padding: 2rem 2.25rem; color: #fff; }
.dash-hero-logo { filter: drop-shadow(0 2px 8px rgba(0,0,0,.3)); }
.dash-hero-greeting { font-size: .85rem; color: rgba(255,255,255,.65); margin: 0; }
.dash-hero-title { font-family: var(--font-display); font-size: 1.65rem; letter-spacing: -0.02em; margin: 0; color: #fff; }
.dash-hero-sub { font-size: .88rem; color: rgba(255,255,255,.7); }
.dash-hero-sub em { font-style: normal; color: var(--gold-400); }
.stat-card-link { transition: transform .2s ease, box-shadow .2s ease; }
.stat-card-link:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

/* ---- Campus Nord infra cards ---- */
.uk-campus-nord .uk-infra-card {
    display: flex; align-items: flex-start; gap: .75rem;
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--radius); padding: .875rem 1rem;
}
.uk-campus-nord .uk-infra-card i { font-size: 1.25rem; color: var(--gold-400); flex-shrink: 0; margin-top: .15rem; }
.uk-infra-code { display: block; font-size: .7rem; font-weight: 700; color: var(--gold-400); text-transform: uppercase; letter-spacing: .06em; }
.uk-infra-name { font-size: .82rem; color: rgba(255,255,255,.85); line-height: 1.35; }

/* ---- Dual campus cards ---- */
.uk-campus-card {
    background: var(--paper-0); border: 1px solid var(--line); border-radius: var(--radius-lg);
    overflow: hidden; height: 100%; box-shadow: var(--shadow-sm);
    transition: box-shadow .2s ease, transform .2s ease;
}
.uk-campus-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.uk-campus-card-img { position: relative; height: 220px; overflow: hidden; }
.uk-campus-card-img img { width: 100%; height: 100%; object-fit: cover; }
.uk-campus-badge {
    position: absolute; top: 1rem; left: 1rem; background: var(--brand-600); color: #fff;
    font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    padding: .35rem .75rem; border-radius: 999px;
}
.uk-campus-badge-sud { background: var(--gold-600); }
.uk-campus-card-body { padding: 1.5rem; }
.uk-campus-features { list-style: none; padding: 0; margin: 0; }
.uk-campus-features li {
    font-size: .85rem; color: var(--slate-600); padding: .35rem 0;
    display: flex; align-items: flex-start; gap: .5rem;
}
.uk-campus-features li i { color: var(--success-600); flex-shrink: 0; margin-top: .15rem; }

/* ---- Request card (candidature) ---- */
.request-card-page { background: var(--paper-50); min-height: 100vh; }
.request-card-sheet {
    background: #fff; max-width: 820px; margin: 0 auto; padding: 2.5rem;
    border: 1px solid var(--line); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); position: relative;
}
.request-card-border {
    position: absolute; inset: 12px; border: 2px solid var(--gold-500);
    border-radius: 8px; pointer-events: none; opacity: .45;
}
.request-card-header { display: flex; gap: 1.25rem; align-items: center; margin-bottom: 1.5rem; position: relative; z-index: 1; }
.request-card-logo { height: 64px; width: auto; }
.request-card-org { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--slate-500); margin: 0; }
.request-card-header h1 { font-family: var(--font-display); font-size: 1.35rem; margin: .25rem 0; color: var(--ink-900); }
.request-card-motto { font-size: .8rem; color: var(--gold-600); margin: 0; }
.request-card-ref {
    display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
    background: var(--paper-50); border: 1px solid var(--line); border-radius: var(--radius);
    padding: .75rem 1rem; margin-bottom: 1.5rem; font-size: .88rem; position: relative; z-index: 1;
}
.request-card-ref strong { color: var(--brand-700); font-size: 1rem; }
.request-card-photo {
    border: 2px solid var(--ink-900); border-radius: 4px; overflow: hidden;
    aspect-ratio: 3/4; max-width: 180px; margin: 0 auto; background: var(--paper-50);
}
.request-card-photo img { width: 100%; height: 100%; object-fit: cover; }
.request-card-photo-placeholder {
    height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: var(--slate-400); gap: .5rem;
}
.request-card-photo-placeholder i { font-size: 2.5rem; }
.request-card-details dt { font-size: .72rem; text-transform: uppercase; color: var(--slate-500); margin-bottom: .15rem; }
.request-card-details dd { font-size: .92rem; margin-bottom: .75rem; }
.request-card-docs h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--slate-500); }
.request-card-docs ul { padding-left: 1.2rem; font-size: .88rem; }
.request-card-footer {
    margin-top: 2rem; padding-top: 1.25rem; border-top: 1px dashed var(--line);
    display: flex; justify-content: space-between; gap: 1rem; align-items: flex-end; font-size: .82rem; color: var(--slate-600);
    position: relative; z-index: 1;
}
.request-card-stamp {
    text-align: center; border: 2px solid var(--brand-600); color: var(--brand-700);
    padding: .5rem 1rem; border-radius: 4px; font-weight: 700; font-size: .75rem;
}
.request-card-stamp small { display: block; font-weight: 400; color: var(--slate-500); }
@media print {
    .request-card-page { background: #fff; }
    .request-card-sheet { box-shadow: none; border: none; }
    .no-print { display: none !important; }
}

/* ---- Compact request card (reçu candidature) ---- */
.request-card-wrap { max-width: 580px; }
.request-card-compact {
    max-width: 560px; margin: 0 auto; padding: 1.75rem 2rem;
    box-shadow: var(--shadow-lg);
}
.request-card-compact .request-card-logo { max-height: 52px; }
.request-card-compact .request-card-org { font-size: .72rem; margin: 0; }
.request-card-compact h1 { font-size: 1.05rem; margin: .2rem 0 0; line-height: 1.35; }
.request-card-compact .request-card-header { gap: .85rem; margin-bottom: .85rem; }
.request-card-compact .request-card-ref {
    font-size: .82rem; padding: .55rem .85rem; margin-bottom: .85rem;
    display: flex; justify-content: space-between;
}
.request-card-body-compact { display: flex; gap: 1rem; align-items: flex-start; }
.request-card-photo-sm {
    width: 100px; flex-shrink: 0; aspect-ratio: 3/4; max-width: none; margin: 0;
    border-width: 2px;
}
.request-card-photo-sm .request-card-photo-placeholder { font-size: .72rem; }
.request-card-photo-sm .request-card-photo-placeholder i { font-size: 1.75rem; }
.request-card-details-sm { flex: 1; margin: 0; font-size: .84rem; }
.request-card-details-sm > div { display: flex; gap: .45rem; margin-bottom: .35rem; }
.request-card-details-sm dt { color: var(--slate-500); min-width: 3.6rem; margin: 0; font-size: .72rem; text-transform: uppercase; }
.request-card-details-sm dd { margin: 0; font-weight: 500; color: var(--ink-900); }
.request-card-program dd { font-size: .8rem; line-height: 1.3; }
.request-card-footer-sm { margin-top: 1rem; padding-top: .85rem; font-size: .76rem; }
.request-card-footer-sm p { margin: 0 0 .5rem; line-height: 1.4; }
.request-card-footer-sm .request-card-stamp { padding: .35rem .65rem; font-size: .72rem; }

/* ---- Transcript sheet ---- */
.transcript-sheet {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 2rem 2.25rem; position: relative; box-shadow: var(--shadow);
}
.transcript-border {
    position: absolute; inset: 10px; border: 2px solid var(--gold-500);
    border-radius: 6px; pointer-events: none; opacity: .4;
}
.transcript-header { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.5rem; position: relative; z-index: 1; }
.transcript-logo { height: 56px; width: auto; }
.transcript-org { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--slate-500); margin: 0; }
.transcript-head-text h1 { font-family: var(--font-display); font-size: 1.35rem; margin: .2rem 0; color: var(--ink-900); }
.transcript-motto { font-size: .78rem; color: var(--gold-600); margin: 0; }
.transcript-meta { margin-bottom: 1.25rem; position: relative; z-index: 1; }
.transcript-info-table { width: 100%; font-size: .82rem; }
.transcript-info-table th { text-align: left; color: var(--slate-500); font-weight: 600; width: 38%; padding: .2rem 0; vertical-align: top; }
.transcript-info-table td { padding: .2rem 0; color: var(--ink-900); }
.transcript-semester { margin-bottom: 1.25rem; position: relative; z-index: 1; }
.transcript-semester-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .5rem; border-bottom: 2px solid var(--brand-100); padding-bottom: .35rem; }
.transcript-semester-head h2 { font-size: .9rem; margin: 0; color: var(--brand-700); }
.transcript-sem-credits { font-size: .75rem; color: var(--slate-500); }
.transcript-table { font-size: .8rem; }
.transcript-table thead th { background: var(--paper-50); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--slate-600); }
.transcript-summary { background: var(--paper-50); border-radius: var(--radius); padding: 1rem; margin: 1rem 0; position: relative; z-index: 1; }
.transcript-stat span { display: block; font-size: .7rem; text-transform: uppercase; color: var(--slate-500); }
.transcript-stat strong { font-size: 1.1rem; color: var(--brand-700); }
.transcript-footer { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px dashed var(--line); font-size: .78rem; color: var(--slate-600); position: relative; z-index: 1; }
.transcript-signatures { display: flex; justify-content: space-between; margin-top: 1.5rem; gap: 2rem; }
.transcript-sign-line { border-bottom: 1px solid var(--ink-900); width: 180px; margin-top: 2rem; }
@media print {
    .transcript-sheet { box-shadow: none; border: none; page-break-inside: avoid; }
    .no-print { display: none !important; }
    body { background: #fff; }
}

.document-export-page { background: var(--paper-50); min-height: 100vh; }
.document-export-wrap {
    width: 210mm;
    max-width: 100%;
    margin: 0 auto;
}
.document-export-wrap:has(.uk-doc-a4) { width: 210mm; }
.document-export-wrap:has(.request-card-compact),
.document-export-wrap.request-card-wrap {
    width: auto;
    max-width: 100%;
}
body.document-export-capture .document-export-wrap,
body.document-export-capture .request-card-wrap,
body.document-export-capture .container {
    width: auto !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.document-export-target { background: #fff; }
.document-export-ready {
    box-shadow: none !important;
    margin: 0 !important;
    transform: none !important;
}
.document-export-ready .transcript-border,
.document-export-ready .request-card-border,
.document-export-ready .certificate-border {
    opacity: 1;
}
.document-toolbar { position: sticky; top: 0; z-index: 10; background: var(--paper-50); padding: .5rem 0; }
.notification-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.notification-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.bg-warning-subtle { background: #fef3c7; }
.bg-info-subtle { background: #dbeafe; }
.bg-danger-subtle { background: #fee2e2; }
.activity-item { padding: .65rem 0; border-bottom: 1px dashed var(--line); }
.activity-item:last-child { border-bottom: none; }
.settings-nav-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.settings-nav-card.border-primary { border-width: 2px !important; }

/* ---- Documents officiels UK (modèle CMV / Certificat) ---- */
.uk-doc-a4 {
    width: 210mm;
    min-height: 297mm;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    box-shadow: 0 2px 24px rgba(15, 23, 42, .08);
}
.uk-doc-sheet {
    background: #fff;
    position: relative;
    font-family: 'Times New Roman', Times, serif;
    color: #111;
    font-size: 11pt;
    line-height: 1.35;
}
.uk-doc-frame {
    position: absolute;
    inset: 8px;
    border: 2px solid #1a5c2e;
    pointer-events: none;
    z-index: 0;
}
.uk-doc-frame::after {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px solid #c9a227;
}
.uk-doc-frame-cert { inset: 10px; }
.uk-doc-inner {
    position: relative;
    z-index: 1;
    padding: 1.75rem 2rem 1.5rem;
}
.uk-doc-header { text-align: center; margin-bottom: 1rem; }
.uk-doc-republique-line1 {
    font-weight: 700;
    font-size: 12pt;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.uk-doc-republique-line2 {
    font-size: 10pt;
    font-style: italic;
    margin-bottom: .5rem;
}
.uk-doc-logo { height: 58px; width: auto; margin: .25rem 0 .5rem; }
.uk-doc-academic-year { font-size: 10.5pt; margin: .35rem 0; }
.uk-doc-faculty { font-weight: 700; font-size: 11pt; margin-top: .25rem; }
.uk-doc-department { font-size: 10.5pt; margin-bottom: .15rem; }
.uk-doc-program-title {
    font-weight: 700;
    font-size: 11.5pt;
    text-transform: uppercase;
    margin: .5rem 0 .15rem;
    letter-spacing: .02em;
}
.uk-doc-subtitle {
    font-weight: 700;
    font-size: 12pt;
    text-decoration: underline;
    text-underline-offset: 3px;
    margin-bottom: .75rem;
}
.uk-doc-student-block { margin-bottom: .85rem; }
.uk-doc-info-grid { width: 100%; border-collapse: collapse; font-size: 10pt; }
.uk-doc-info-grid td { padding: .2rem .35rem; vertical-align: top; }
.uk-doc-info-label { white-space: nowrap; width: 1%; font-weight: 600; }
.uk-doc-info-value { width: 38%; }
.uk-doc-info-strong { font-weight: 700; text-transform: uppercase; }
.uk-doc-semesters { margin: .5rem 0 1rem; }
.uk-doc-semesters-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .65rem;
    align-items: start;
}
.uk-doc-semester-head {
    text-align: center;
    font-weight: 700;
    font-size: 10pt;
    padding: .25rem;
    background: #f0f4f0;
    border: 1px solid #333;
    border-bottom: none;
}
.uk-doc-grades-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 8.5pt;
    table-layout: fixed;
}
.uk-doc-grades-table th,
.uk-doc-grades-table td {
    border: 1px solid #333;
    padding: .18rem .25rem;
    vertical-align: top;
    word-wrap: break-word;
}
.uk-doc-grades-table th {
    background: #fafafa;
    font-weight: 700;
    text-align: center;
    font-size: 8pt;
}
.uk-doc-grades-table th:nth-child(1) { width: 16%; }
.uk-doc-grades-table th:nth-child(3),
.uk-doc-grades-table th:nth-child(4) { width: 12%; }
.uk-doc-code { font-family: var(--font-mono); font-size: 7.5pt; }
.uk-doc-num { text-align: center; white-space: nowrap; }
.uk-doc-empty { text-align: center; color: #888; }
.uk-doc-totaux-label {
    text-align: center;
    font-weight: 700;
    font-size: 10pt;
    margin-top: .35rem;
    padding: .2rem;
    border: 1px solid #333;
    border-top: 2px solid #333;
    background: #f5f5f5;
}
.uk-doc-results { margin: 1rem 0; font-size: 10pt; }
.uk-doc-results-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: .5rem;
}
.uk-doc-results-label { font-weight: 600; }
.uk-doc-results-place { font-style: italic; }
.uk-doc-summary-table { width: 100%; border-collapse: collapse; }
.uk-doc-summary-table td {
    border: 1px solid #ccc;
    padding: .35rem .5rem;
    text-align: center;
    font-size: 9.5pt;
}
.uk-doc-signatures {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 1.25rem;
    padding-top: .5rem;
}
.uk-doc-signatures-2 .uk-doc-signature-block { flex: 1; text-align: center; }
.uk-doc-sign-title { font-size: 9.5pt; margin-bottom: 2.5rem; }
.uk-doc-sign-line {
    border-bottom: 1px solid #111;
    width: 75%;
    margin: 0 auto .35rem;
    min-height: 1px;
}
.uk-doc-sign-name { font-weight: 700; font-size: 10pt; }
.uk-doc-footer-note {
    font-size: 8pt;
    color: #555;
    text-align: center;
    margin: .75rem 0 0;
    border-top: 1px dashed #ccc;
    padding-top: .5rem;
}

/* Certificat specimen */
.uk-doc-certificate .uk-doc-inner { padding: 2rem 2.25rem 1.75rem; }
.uk-doc-certificate.uk-doc-a4 { min-height: 297mm; }
.uk-doc-transcript.uk-doc-a4 .uk-doc-inner { padding: 1.35rem 1.5rem 1.25rem; }
.uk-doc-transcript.uk-doc-a4 .uk-doc-logo { height: 48px; }
.uk-doc-transcript.uk-doc-a4 .uk-doc-grades-table { font-size: 7.5pt; }
.uk-doc-transcript.uk-doc-a4 .uk-doc-grades-table th,
.uk-doc-transcript.uk-doc-a4 .uk-doc-grades-table td { padding: .12rem .2rem; }
.uk-cert-main-title { text-align: center; margin: .75rem 0 1.25rem; }
.uk-cert-word {
    display: block;
    font-size: 22pt;
    font-weight: 700;
    letter-spacing: .12em;
    color: #1a5c2e;
    line-height: 1.1;
}
.uk-cert-program-line {
    display: block;
    font-size: 11pt;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: .35rem;
    letter-spacing: .03em;
}
.uk-cert-body { max-width: 92%; margin: 0 auto; font-size: 11pt; }
.uk-cert-intro { margin: 0 0 .15rem; font-size: 10.5pt; }
.uk-cert-student-name {
    font-size: 14pt;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    margin: 0 0 1rem;
    padding-bottom: .35rem;
    border-bottom: 1px dotted #999;
}
.uk-cert-fields { width: 100%; margin: .5rem 0; border-collapse: collapse; }
.uk-cert-fields td { padding: .25rem 0; vertical-align: top; }
.uk-cert-field-label { width: 38%; font-weight: 600; white-space: nowrap; }
.uk-cert-field-value { font-size: 10.5pt; }
.uk-cert-fields-grid { margin: 1rem 0; }
.uk-cert-achievement {
    text-align: center;
    font-size: 11pt;
    margin: 1rem 0;
    line-height: 1.5;
}
.uk-cert-code {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 9pt;
    color: #555;
    margin-top: .75rem;
}
.uk-cert-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 2rem;
    gap: 2rem;
}
.uk-cert-issue { font-style: italic; margin-bottom: 2rem; font-size: 10.5pt; }
.uk-cert-sign-block { text-align: center; min-width: 160px; }
.uk-cert-sign-line {
    border-bottom: 1px solid #111;
    width: 140px;
    margin: 0 auto .3rem;
}
.uk-cert-sign-name { font-weight: 700; font-size: 10pt; }
.uk-cert-sign-title { font-size: 8.5pt; color: #555; }
.uk-cert-seal {
    width: 56px; height: 56px;
    border: 2px solid #1a5c2e;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .75rem; color: #1a5c2e;
    margin: .5rem auto 0;
}
.document-export-ready.uk-doc-sheet { box-shadow: none !important; }
.document-export-ready.uk-doc-a4 {
    width: 210mm !important;
    min-height: auto !important;
    max-width: none !important;
}

/* ---- Catalogue formations (home.php) ---- */
.catalog-section { scroll-margin-top: 5rem; }
.catalog-filters { margin-top: 1.5rem; }
.catalog-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .9rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink-700);
    text-decoration: none;
    font-size: .875rem;
    font-weight: 500;
    transition: all .15s ease;
}
.catalog-filter-pill:hover { border-color: var(--brand-500); color: var(--brand-600); }
.catalog-filter-pill.active {
    background: var(--brand-600);
    border-color: var(--brand-600);
    color: #fff;
}
.catalog-filter-pill .badge { background: rgba(0,0,0,.08); color: inherit; font-weight: 600; }
.catalog-filter-pill.active .badge { background: rgba(255,255,255,.2); }
.catalog-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s ease, transform .2s ease;
    padding: 0;
}
.catalog-card-body { padding: 1.25rem 1.35rem 1.1rem; display: flex; flex-direction: column; flex: 1; }
.catalog-card-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--paper-100);
}
.catalog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.catalog-admin-preview { max-width: 100%; max-height: 120px; object-fit: cover; }
.catalog-detail-image { width: 100%; max-height: 220px; object-fit: cover; }

/* ---- Modal candidature FOAD ---- */
.request-modal-content { border: none; border-radius: 20px; overflow: hidden; box-shadow: 0 24px 80px rgba(15, 23, 42, .18); }
.request-modal-header {
    background: linear-gradient(135deg, var(--ink-900) 0%, #1e3a5f 55%, var(--brand-700) 100%);
    color: #fff;
    padding: 1.5rem 1.75rem;
}
.request-modal-header-inner { display: flex; align-items: center; gap: 1rem; }
.request-modal-logo { width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(0 2px 8px rgba(0,0,0,.2)); }
.request-modal-eyebrow {
    display: block;
    font-size: .68rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gold-400);
    font-weight: 700;
    margin-bottom: .25rem;
}
.request-modal-sub { font-size: .85rem; color: rgba(255,255,255,.75); margin-top: .35rem; }
.request-modal-body { padding: 1.5rem 1.75rem 1.75rem; background: var(--paper-50); }
.request-form-section {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 1.1rem 1.25rem 1.25rem;
    margin-bottom: 1rem;
}
.request-form-section-title {
    font-size: .78rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--brand-700);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .45rem;
}
.request-modal-footer { border-top: 1px solid var(--line); }

/* ---- Journal d'activité ---- */
.activity-table thead th {
    font-size: .72rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-600);
    white-space: nowrap;
}
.activity-table tbody td { font-size: .875rem; vertical-align: middle; }
#activityExportArea .card-header { background: #fff; }
.activity-section-card .card-header { background: var(--paper-50); }

@media print {
    .no-print { display: none !important; }
    #activityExportArea { box-shadow: none !important; border: none !important; }
    .activity-table { font-size: 10pt; }
}
.catalog-card:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.catalog-card-featured { border-color: var(--gold-400); box-shadow: 0 0 0 1px rgba(212, 168, 67, .25); }
.catalog-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .65rem; }
.catalog-featured { color: var(--gold-500); }
.catalog-level {
    display: inline-block;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--brand-600);
    margin-bottom: .35rem;
}
.catalog-title { font-size: 1.05rem; font-weight: 700; margin-bottom: .35rem; line-height: 1.35; }
.catalog-code { font-size: .75rem; color: var(--ink-500); }
.catalog-desc { font-size: .875rem; color: var(--ink-600); margin: .65rem 0; flex: 1; }
.catalog-meta {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    font-size: .8rem;
    color: var(--ink-600);
}
.catalog-meta li { margin-bottom: .25rem; }
.catalog-meta i { color: var(--brand-500); margin-right: .35rem; }
.catalog-card-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; }
.catalog-docs-preview .text-eyebrow { font-size: .65rem; }
.catalog-docs-preview .catalog-docs-list { font-size: .85rem; }
.catalog-detail-item { background: var(--paper-50); border-radius: 10px; padding: .65rem .75rem; height: 100%; }
.catalog-detail-block h6 { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.catalog-docs-list {
    color: var(--slate-600);
    list-style-type: disc;
    padding-left: 1.35rem;
    margin: 0;
}
.catalog-docs-list li {
    display: list-item;
    margin-bottom: .4rem;
    line-height: 1.5;
}
.pieces-textarea { min-height: 11rem; resize: vertical; }

@media print {
    @page { size: A4 portrait; margin: 0; }
    .document-toolbar { display: none !important; }
    .app-shell .sidebar, .app-shell .topbar { display: none !important; }
    .main-content { margin: 0 !important; width: 100% !important; }
    .page-wrap { padding: 0 !important; }
    .document-export-page { background: #fff; }
    .document-export-wrap { width: 210mm; max-width: none; margin: 0; }
    .uk-doc-a4 {
        width: 210mm;
        min-height: 297mm;
        box-shadow: none !important;
        page-break-after: always;
    }
}
