/* ==========================================================================
   EasyForm — système de design
   Chargé par layouts/app (administration) et layouts/auth (connexion).
   ========================================================================== */

:root {
    --ef-primary: #0047A4;
    --ef-primary-600: #003b88;
    --ef-primary-50: #eaf1fb;
    --ef-accent: #E47229;
    --ef-accent-600: #cc5f1a;
    --ef-accent-50: #fdf0e7;
    --ef-gold: #D6A600;
    --ef-success: #16a34a;
    --ef-success-50: #e8f7ee;
    --ef-danger: #dc2626;
    --ef-danger-50: #fdecec;
    --ef-warning: #d97706;
    --ef-warning-50: #fef5e6;
    --ef-info: #0891b2;
    --ef-info-50: #e6f6fa;

    --ef-ink: #0f172a;
    --ef-text: #334155;
    --ef-muted: #64748b;
    --ef-subtle: #94a3b8;
    --ef-border: #e2e8f0;
    --ef-border-soft: #eef2f7;
    --ef-bg: #f4f6fb;
    --ef-surface: #ffffff;
    --ef-sidebar: #0b1f3a;
    --ef-sidebar-2: #0f2a4f;

    --ef-radius-sm: 8px;
    --ef-radius: 12px;
    --ef-radius-lg: 18px;
    --ef-shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
    --ef-shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 6px 16px rgba(15, 23, 42, .06);
    --ef-shadow-lg: 0 12px 40px rgba(15, 23, 42, .12);
    --ef-gradient: linear-gradient(135deg, #0047A4 0%, #1a5fd0 55%, #E47229 130%);
    --ef-font: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --ef-sidebar-w: 264px;

    /* Bootstrap */
    --bs-primary: var(--ef-primary);
    --bs-primary-rgb: 0, 71, 164;
    --bs-body-font-family: var(--ef-font);
    --bs-body-color: var(--ef-text);
    --bs-border-color: var(--ef-border);
    --bs-link-color: var(--ef-primary);
    --bs-link-color-rgb: 0, 71, 164;
    --bs-link-hover-color: var(--ef-primary-600);
    --bs-border-radius: var(--ef-radius-sm);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
body {
    font-family: var(--ef-font);
    color: var(--ef-text);
    background: var(--ef-bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--ef-ink);
    font-weight: 700;
    letter-spacing: -.01em;
}

h1, .h1 { font-size: 1.6rem; }

::selection { background: rgba(0, 71, 164, .15); }

.text-muted { color: var(--ef-muted) !important; }
.fw-semibold { font-weight: 600 !important; }
code { color: #be185d; }

/* --------------------------------------------------------------------------
   Layout administration : barre latérale + contenu
   -------------------------------------------------------------------------- */
.ef-shell { display: flex; min-height: 100vh; }

.ef-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--ef-sidebar-w);
    background: linear-gradient(180deg, var(--ef-sidebar) 0%, var(--ef-sidebar-2) 100%);
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    z-index: 1040;
}
.ef-ready .ef-sidebar { transition: transform .25s ease; }

.ef-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1.35rem 1.4rem 1.2rem;
    color: #fff;
    text-decoration: none;
}
.ef-brand:hover { color: #fff; }
.ef-brand-logo {
    width: 40px; height: 40px;
    border-radius: 11px;
    background: var(--ef-gradient);
    display: grid; place-items: center;
    font-weight: 800; font-size: 1.05rem;
    box-shadow: 0 6px 16px rgba(228, 114, 41, .35);
    flex-shrink: 0;
}
.ef-brand-name { font-weight: 800; font-size: 1.1rem; line-height: 1.1; letter-spacing: -.01em; }
.ef-brand-name small { display: block; font-weight: 500; font-size: .72rem; color: #94a3b8; letter-spacing: .02em; }

.ef-nav { padding: .5rem .85rem; overflow-y: auto; flex: 1; }
.ef-nav-label {
    font-size: .68rem; text-transform: uppercase; letter-spacing: .1em;
    color: #64748b; font-weight: 700;
    padding: 1rem .75rem .45rem;
}
.ef-nav a {
    display: flex; align-items: center; gap: .75rem;
    padding: .62rem .8rem;
    margin-bottom: 2px;
    border-radius: 10px;
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500; font-size: .92rem;
    transition: background .15s, color .15s;
}
.ef-nav a i { width: 20px; text-align: center; font-size: .95rem; color: #7c8ba3; transition: color .15s; }
.ef-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.ef-nav a:hover i { color: #fff; }
.ef-nav a.active {
    background: rgba(255, 255, 255, .1);
    color: #fff;
    box-shadow: inset 3px 0 0 var(--ef-accent);
}
.ef-nav a.active i { color: var(--ef-accent); }
.ef-nav-context {
    margin: .25rem 0 .5rem;
    padding: .6rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .06);
}
.ef-nav-context-title {
    color: #fff; font-weight: 600; font-size: .82rem;
    padding: .2rem .35rem .5rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ef-nav-context a { padding: .5rem .65rem; font-size: .86rem; }

.ef-sidebar-footer { padding: 1rem; border-top: 1px solid rgba(255, 255, 255, .07); }
.ef-user { display: flex; align-items: center; gap: .7rem; }
.ef-user-info { min-width: 0; flex: 1; }
.ef-user-name { color: #fff; font-weight: 600; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ef-user-role { font-size: .74rem; color: #94a3b8; }
.ef-logout {
    border: 0; background: rgba(255, 255, 255, .06); color: #cbd5e1;
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
    transition: background .15s, color .15s;
}
.ef-logout:hover { background: rgba(220, 38, 38, .2); color: #fff; }

.ef-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    display: inline-grid; place-items: center;
    font-weight: 700; font-size: .85rem; color: #fff;
    background: var(--ef-gradient);
    flex-shrink: 0;
    text-transform: uppercase;
}
.ef-avatar-sm { width: 32px; height: 32px; font-size: .75rem; }
.ef-avatar-lg { width: 48px; height: 48px; font-size: 1rem; }

.ef-main {
    flex: 1;
    min-width: 0;
    margin-left: var(--ef-sidebar-w);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.ef-topbar {
    position: sticky; top: 0; z-index: 1030;
    height: 64px;
    display: flex; align-items: center; gap: 1rem;
    padding: 0 2rem;
    background: rgba(244, 246, 251, .85);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--ef-border-soft);
}
.ef-topbar-toggle {
    display: none;
    border: 0; background: var(--ef-surface); color: var(--ef-ink);
    width: 40px; height: 40px; border-radius: 10px; box-shadow: var(--ef-shadow-sm);
}
.ef-breadcrumb { font-size: .88rem; color: var(--ef-muted); display: flex; align-items: center; gap: .5rem; min-width: 0; }
.ef-breadcrumb a { color: var(--ef-muted); text-decoration: none; }
.ef-breadcrumb a:hover { color: var(--ef-primary); }
.ef-breadcrumb .current { color: var(--ef-ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ef-topbar-date { font-size: .82rem; color: var(--ef-subtle); }

.ef-content { flex: 1; padding: 1.75rem 2rem 2.5rem; width: 100%; max-width: 1480px; margin: 0 auto; }

.ef-footer {
    padding: 1.1rem 2rem;
    font-size: .8rem;
    color: var(--ef-subtle);
    border-top: 1px solid var(--ef-border-soft);
    display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
}
.ef-footer a { color: var(--ef-muted); }

.ef-backdrop { display: none; }

@media (max-width: 991.98px) {
    .ef-sidebar { transform: translateX(-100%); box-shadow: var(--ef-shadow-lg); }
    .ef-sidebar.is-open { transform: none; }
    .ef-main { margin-left: 0; }
    .ef-topbar { padding: 0 1rem; }
    .ef-topbar-toggle { display: inline-grid; place-items: center; }
    .ef-topbar-date { display: none; }
    .ef-content { padding: 1.25rem 1rem 2rem; }
    .ef-backdrop.is-open {
        display: block; position: fixed; inset: 0; z-index: 1035;
        background: rgba(15, 23, 42, .45);
    }
}

/* --------------------------------------------------------------------------
   En-tête de page
   -------------------------------------------------------------------------- */
.ef-page-header {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 1rem; margin-bottom: 1.6rem;
}
.ef-page-header-main { display: flex; align-items: center; gap: .9rem; min-width: 0; }
.ef-page-icon {
    width: 48px; height: 48px; border-radius: 14px;
    display: grid; place-items: center; flex-shrink: 0;
    background: var(--ef-primary-50); color: var(--ef-primary); font-size: 1.2rem;
}
.ef-page-title { font-size: 1.55rem; margin: 0; line-height: 1.2; }
.ef-page-subtitle { color: var(--ef-muted); margin: .2rem 0 0; font-size: .92rem; }
.ef-page-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.ef-back {
    width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
    display: grid; place-items: center;
    background: var(--ef-surface); color: var(--ef-text);
    box-shadow: var(--ef-shadow-sm); border: 1px solid var(--ef-border);
    text-decoration: none; transition: all .15s;
}
.ef-back:hover { color: var(--ef-primary); border-color: var(--ef-primary); }

/* --------------------------------------------------------------------------
   Cartes
   -------------------------------------------------------------------------- */
.card {
    border: 1px solid var(--ef-border-soft);
    border-radius: var(--ef-radius);
    box-shadow: var(--ef-shadow);
    background: var(--ef-surface);
}
.card-header {
    background: var(--ef-surface);
    border-bottom: 1px solid var(--ef-border-soft);
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: var(--ef-ink);
}
.card-header:first-child { border-radius: var(--ef-radius) var(--ef-radius) 0 0; }
.card-body { padding: 1.25rem; }
.card-footer { background: #fafbfd; border-top: 1px solid var(--ef-border-soft); }

.ef-card {
    background: var(--ef-surface);
    border: 1px solid var(--ef-border-soft);
    border-radius: var(--ef-radius-lg);
    box-shadow: var(--ef-shadow);
}
.ef-card-header {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1.1rem 1.35rem;
    border-bottom: 1px solid var(--ef-border-soft);
}
.ef-card-title { font-size: 1rem; font-weight: 700; color: var(--ef-ink); margin: 0; display: flex; align-items: center; gap: .55rem; }
.ef-card-title i { color: var(--ef-primary); }
.ef-card-body { padding: 1.35rem; }

/* Section de formulaire (titre + description à gauche, champs à droite) */
.ef-section { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 2rem; padding: 1.6rem 1.35rem; border-bottom: 1px solid var(--ef-border-soft); }
.ef-section:last-child { border-bottom: 0; }
.ef-section-title { font-weight: 700; color: var(--ef-ink); margin-bottom: .3rem; display: flex; align-items: center; gap: .5rem; }
.ef-section-title i { color: var(--ef-primary); }
.ef-section-desc { color: var(--ef-muted); font-size: .88rem; margin: 0; }
@media (max-width: 991.98px) { .ef-section { grid-template-columns: minmax(0, 1fr); gap: 1rem; } }

.ef-form-actions {
    position: sticky; bottom: 0; z-index: 10;
    display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end;
    padding: 1rem 1.35rem;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(6px);
    border-top: 1px solid var(--ef-border-soft);
    border-radius: 0 0 var(--ef-radius-lg) var(--ef-radius-lg);
}

/* --------------------------------------------------------------------------
   Statistiques
   -------------------------------------------------------------------------- */
.ef-stat {
    position: relative; overflow: hidden;
    background: var(--ef-surface);
    border: 1px solid var(--ef-border-soft);
    border-radius: var(--ef-radius-lg);
    box-shadow: var(--ef-shadow);
    padding: 1.2rem 1.3rem;
    display: flex; align-items: center; gap: 1rem;
    height: 100%;
    transition: transform .2s, box-shadow .2s;
}
.ef-stat:hover { transform: translateY(-2px); box-shadow: var(--ef-shadow-lg); }
.ef-stat-icon {
    width: 52px; height: 52px; border-radius: 14px;
    display: grid; place-items: center; font-size: 1.25rem; flex-shrink: 0;
}
.ef-stat-value { font-size: 1.65rem; font-weight: 800; color: var(--ef-ink); line-height: 1.1; }
.ef-stat-label { color: var(--ef-muted); font-size: .84rem; font-weight: 500; }
.ef-tone-primary { background: var(--ef-primary-50); color: var(--ef-primary); }
.ef-tone-accent  { background: var(--ef-accent-50); color: var(--ef-accent); }
.ef-tone-success { background: var(--ef-success-50); color: var(--ef-success); }
.ef-tone-warning { background: var(--ef-warning-50); color: var(--ef-warning); }
.ef-tone-info    { background: var(--ef-info-50); color: var(--ef-info); }
.ef-tone-danger  { background: var(--ef-danger-50); color: var(--ef-danger); }
.ef-tone-muted   { background: #f1f5f9; color: var(--ef-muted); }

/* Bandeau d'accueil */
.ef-hero {
    position: relative; overflow: hidden;
    border-radius: var(--ef-radius-lg);
    background: var(--ef-gradient);
    color: #fff;
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 16px 40px rgba(0, 71, 164, .25);
}
.ef-hero::after {
    content: ''; position: absolute; right: -60px; top: -80px;
    width: 280px; height: 280px; border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}
.ef-hero::before {
    content: ''; position: absolute; right: 120px; bottom: -120px;
    width: 220px; height: 220px; border-radius: 50%;
    background: rgba(255, 255, 255, .06);
}
.ef-hero h1 { color: #fff; font-size: 1.6rem; margin-bottom: .35rem; }
.ef-hero p { color: rgba(255, 255, 255, .85); margin: 0; }
.ef-hero > * { position: relative; z-index: 1; }

/* --------------------------------------------------------------------------
   Boutons
   -------------------------------------------------------------------------- */
.btn {
    --bs-btn-font-weight: 600;
    --bs-btn-border-radius: 10px;
    --bs-btn-padding-x: 1rem;
    --bs-btn-padding-y: .5rem;
    --bs-btn-font-size: .9rem;
    transition: all .15s ease;
    display: inline-flex; align-items: center; justify-content: center; gap: .25rem;
}
.btn-sm { --bs-btn-padding-x: .7rem; --bs-btn-padding-y: .32rem; --bs-btn-font-size: .8rem; --bs-btn-border-radius: 8px; }
.btn-lg { --bs-btn-padding-x: 1.4rem; --bs-btn-padding-y: .75rem; --bs-btn-font-size: 1rem; --bs-btn-border-radius: 12px; }
.btn:not(.btn-link):not(.btn-close):active { transform: translateY(1px); }

.btn-primary {
    --bs-btn-bg: var(--ef-primary); --bs-btn-border-color: var(--ef-primary);
    --bs-btn-hover-bg: var(--ef-primary-600); --bs-btn-hover-border-color: var(--ef-primary-600);
    --bs-btn-active-bg: var(--ef-primary-600); --bs-btn-active-border-color: var(--ef-primary-600);
    --bs-btn-disabled-bg: var(--ef-primary); --bs-btn-disabled-border-color: var(--ef-primary);
    box-shadow: 0 4px 12px rgba(0, 71, 164, .22);
}
.btn-accent, .btn-success {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--ef-accent); --bs-btn-border-color: var(--ef-accent);
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--ef-accent-600); --bs-btn-hover-border-color: var(--ef-accent-600);
    --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--ef-accent-600); --bs-btn-active-border-color: var(--ef-accent-600);
    --bs-btn-disabled-bg: var(--ef-accent); --bs-btn-disabled-border-color: var(--ef-accent);
    box-shadow: 0 4px 12px rgba(228, 114, 41, .28);
}
.btn-outline-primary {
    --bs-btn-color: var(--ef-primary); --bs-btn-border-color: #c7d7ee;
    --bs-btn-hover-bg: var(--ef-primary); --bs-btn-hover-border-color: var(--ef-primary);
    --bs-btn-active-bg: var(--ef-primary); --bs-btn-active-border-color: var(--ef-primary);
}
.btn-secondary, .btn-light {
    --bs-btn-color: var(--ef-text); --bs-btn-bg: #fff; --bs-btn-border-color: var(--ef-border);
    --bs-btn-hover-color: var(--ef-ink); --bs-btn-hover-bg: #f8fafc; --bs-btn-hover-border-color: #cbd5e1;
    --bs-btn-active-color: var(--ef-ink); --bs-btn-active-bg: #f1f5f9; --bs-btn-active-border-color: #cbd5e1;
}
.btn-outline-secondary {
    --bs-btn-color: var(--ef-muted); --bs-btn-border-color: var(--ef-border);
    --bs-btn-hover-color: var(--ef-ink); --bs-btn-hover-bg: #f1f5f9; --bs-btn-hover-border-color: #cbd5e1;
}

/* Bouton d'action discret (icône) */
.ef-icon-btn {
    width: 34px; height: 34px; border-radius: 9px;
    display: inline-grid; place-items: center;
    border: 1px solid var(--ef-border); background: #fff; color: var(--ef-muted);
    transition: all .15s; text-decoration: none; padding: 0;
}
.ef-icon-btn:hover { color: var(--ef-primary); border-color: #c7d7ee; background: var(--ef-primary-50); }
.ef-icon-btn.is-danger:hover { color: var(--ef-danger); border-color: #f5c2c2; background: var(--ef-danger-50); }

/* --------------------------------------------------------------------------
   Formulaires
   -------------------------------------------------------------------------- */
.form-label { font-weight: 600; font-size: .86rem; color: var(--ef-ink); margin-bottom: .4rem; }
.form-control, .form-select {
    border-color: var(--ef-border);
    border-radius: 10px;
    padding: .6rem .85rem;
    font-size: .92rem;
    color: var(--ef-ink);
    transition: border-color .15s, box-shadow .15s;
}
.form-control-sm, .form-select-sm { padding: .35rem .65rem; font-size: .84rem; border-radius: 8px; }
.form-control:focus, .form-select:focus {
    border-color: var(--ef-primary);
    box-shadow: 0 0 0 4px rgba(0, 71, 164, .12);
}
.form-control::placeholder { color: var(--ef-subtle); }
.form-text { color: var(--ef-muted); font-size: .8rem; }
.form-check-input:checked { background-color: var(--ef-primary); border-color: var(--ef-primary); }
.form-check-input:focus { box-shadow: 0 0 0 4px rgba(0, 71, 164, .12); border-color: var(--ef-primary); }
.form-switch .form-check-input { width: 2.4em; height: 1.3em; margin-top: .1em; }
.input-group-text { background: #f8fafc; border-color: var(--ef-border); color: var(--ef-muted); border-radius: 10px; }

/* CKEditor */
.ck.ck-editor__main > .ck-editor__editable { min-height: 180px; border-radius: 0 0 10px 10px !important; }
.ck.ck-toolbar { border-radius: 10px 10px 0 0 !important; background: #f8fafc !important; }
.ck.ck-editor__editable.ck-focused { border-color: var(--ef-primary) !important; box-shadow: 0 0 0 4px rgba(0, 71, 164, .12) !important; }

/* --------------------------------------------------------------------------
   Tableaux
   -------------------------------------------------------------------------- */
.table { --bs-table-hover-bg: #f8fbff; color: var(--ef-text); margin-bottom: 0; }
.table > thead > tr > th {
    background: #f8fafc;
    color: var(--ef-muted);
    font-size: .74rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em;
    border-bottom: 1px solid var(--ef-border);
    padding: .8rem 1rem;
    white-space: nowrap;
}
.table > tbody > tr > td { padding: .85rem 1rem; border-color: var(--ef-border-soft); vertical-align: middle; }
.table-bordered > :not(caption) > * > * { border-color: var(--ef-border-soft); }
.table-responsive { border-radius: var(--ef-radius); }
.ef-table-card { background: var(--ef-surface); border: 1px solid var(--ef-border-soft); border-radius: var(--ef-radius-lg); box-shadow: var(--ef-shadow); overflow: hidden; }
.ef-table-card .table-responsive { border-radius: 0; }
.ef-table-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--ef-border-soft); }

/* DataTables */
.dataTables_wrapper { padding: 0; }
.dataTables_wrapper .row:first-child, .dataTables_wrapper .row:last-child { padding: .85rem 1.1rem; margin: 0; align-items: center; }
.dataTables_wrapper .dataTables_filter input, .dataTables_wrapper .dataTables_length select {
    border: 1px solid var(--ef-border) !important; border-radius: 10px !important;
    padding: .4rem .75rem !important; font-size: .86rem;
}
.dataTables_wrapper .dataTables_filter input:focus { outline: 0; border-color: var(--ef-primary) !important; box-shadow: 0 0 0 4px rgba(0, 71, 164, .12); }
.dataTables_wrapper .dataTables_info { color: var(--ef-muted); font-size: .84rem; padding-top: 0 !important; }
.page-link { border-radius: 8px !important; margin: 0 2px; border-color: var(--ef-border); color: var(--ef-text); font-size: .85rem; }
.page-item.active .page-link { background: var(--ef-primary); border-color: var(--ef-primary); }
div.dataTables_wrapper div.dataTables_paginate ul.pagination { margin: 0; }
table.dataTable { margin-top: 0 !important; margin-bottom: 0 !important; }

/* --------------------------------------------------------------------------
   Badges, alertes, onglets, divers
   -------------------------------------------------------------------------- */
.badge { font-weight: 600; border-radius: 999px; padding: .38em .7em; letter-spacing: .01em; }
.ef-badge {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .28rem .65rem; border-radius: 999px;
    font-size: .74rem; font-weight: 600; white-space: nowrap;
}
.ef-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.alert {
    border: 1px solid transparent;
    border-radius: var(--ef-radius);
    padding: .9rem 1.1rem;
    font-size: .9rem;
}
.alert > ul { margin-bottom: 0; }
.alert-success { background: var(--ef-success-50); color: #14532d; border-color: #c9ecd6; }
.alert-danger { background: var(--ef-danger-50); color: #7f1d1d; border-color: #f7cfcf; }
.alert-warning { background: var(--ef-warning-50); color: #78350f; border-color: #fbe2b6; }
.alert-info { background: var(--ef-info-50); color: #164e63; border-color: #bfe6f0; }
.alert-light { background: #f8fafc; color: var(--ef-text); border-color: var(--ef-border); }
.alert-dismissible .btn-close { padding: 1rem; }

.nav-pills.ef-tabs { gap: .35rem; background: #eef2f7; padding: .3rem; border-radius: 12px; display: inline-flex; }
.nav-pills.ef-tabs .nav-link { color: var(--ef-muted); font-weight: 600; font-size: .88rem; border-radius: 9px; padding: .45rem .95rem; display: flex; align-items: center; gap: .45rem; }
.nav-pills.ef-tabs .nav-link.active { background: #fff; color: var(--ef-ink); box-shadow: var(--ef-shadow-sm); }
.nav-pills.ef-tabs .nav-link .count { background: #e2e8f0; color: var(--ef-muted); font-size: .72rem; padding: .05rem .45rem; border-radius: 999px; }
.nav-pills.ef-tabs .nav-link.active .count { background: var(--ef-primary-50); color: var(--ef-primary); }

.dropdown-menu {
    border: 1px solid var(--ef-border-soft); border-radius: 12px;
    box-shadow: var(--ef-shadow-lg); padding: .4rem; font-size: .9rem;
}
.dropdown-item { border-radius: 8px; padding: .5rem .75rem; display: flex; align-items: center; gap: .6rem; color: var(--ef-text); }
.dropdown-item i { width: 18px; text-align: center; color: var(--ef-subtle); }
.dropdown-item:hover { background: #f1f5f9; color: var(--ef-ink); }
.dropdown-item:hover i { color: var(--ef-primary); }
.dropdown-item.text-danger:hover { background: var(--ef-danger-50); }
.dropdown-item.text-danger i { color: var(--ef-danger); }
.dropdown-item:active { background: var(--ef-primary); color: #fff; }

.modal-content { border: 0; border-radius: var(--ef-radius-lg); box-shadow: var(--ef-shadow-lg); overflow: hidden; }
.modal-header { border-bottom: 1px solid var(--ef-border-soft); padding: 1.1rem 1.4rem; }
.modal-footer { border-top: 1px solid var(--ef-border-soft); }

.ef-empty { text-align: center; padding: 3.5rem 1.5rem; color: var(--ef-muted); }
.ef-empty-icon {
    width: 76px; height: 76px; border-radius: 22px; margin: 0 auto 1.1rem;
    display: grid; place-items: center; font-size: 1.8rem;
    background: var(--ef-primary-50); color: var(--ef-primary);
}
.ef-empty h3, .ef-empty h5 { color: var(--ef-ink); }

.ef-link-copy { display: flex; align-items: center; gap: .35rem; max-width: 330px; }
.ef-link-copy input {
    flex: 1; min-width: 0;
    border: 1px solid var(--ef-border); background: #f8fafc; color: var(--ef-muted);
    border-radius: 8px; font-size: .78rem; padding: .35rem .6rem;
}

/* Animations d'apparition légères */
@keyframes ef-fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.ef-content > * { animation: ef-fade-up .35s ease backwards; }

/* --------------------------------------------------------------------------
   Pages d'authentification
   -------------------------------------------------------------------------- */
.ef-auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: #fff; }
.ef-auth-aside {
    position: relative; overflow: hidden;
    background: var(--ef-gradient);
    color: #fff;
    padding: 3rem;
    display: flex; flex-direction: column; justify-content: space-between;
}
.ef-auth-aside::before, .ef-auth-aside::after {
    content: ''; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .08);
}
.ef-auth-aside::before { width: 520px; height: 520px; right: -200px; top: -160px; }
.ef-auth-aside::after { width: 360px; height: 360px; left: -140px; bottom: -120px; }
.ef-auth-aside > * { position: relative; z-index: 1; }
.ef-auth-aside h2 { color: #fff; font-size: 2.3rem; font-weight: 800; line-height: 1.15; max-width: 480px; }
.ef-auth-aside p { color: rgba(255, 255, 255, .85); font-size: 1.05rem; max-width: 460px; }
.ef-auth-points { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .9rem; }
.ef-auth-points li { display: flex; align-items: center; gap: .8rem; font-weight: 500; }
.ef-auth-points i {
    width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
    background: rgba(255, 255, 255, .15); flex-shrink: 0;
}
.ef-auth-main { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.5rem; background: var(--ef-bg); }
.ef-auth-card {
    width: 100%; max-width: 440px;
    background: #fff; border-radius: 22px;
    box-shadow: var(--ef-shadow-lg);
    border: 1px solid var(--ef-border-soft);
    padding: 2.4rem 2.2rem;
}
.ef-auth-card h1 { font-size: 1.6rem; margin-bottom: .35rem; }
.ef-auth-card .lead-text { color: var(--ef-muted); margin-bottom: 1.8rem; }
.ef-auth-card .form-control { padding: .72rem .95rem; }
.ef-input-icon { position: relative; }
.ef-input-icon { position: relative; }
.ef-input-icon > i { position: absolute; left: .95rem; top: 1.45rem; transform: translateY(-50%); color: var(--ef-subtle); pointer-events: none; z-index: 5; }
.ef-input-icon > .form-control { padding-left: 2.6rem; }
.ef-auth-footer { text-align: center; color: var(--ef-subtle); font-size: .8rem; margin-top: 1.5rem; }
.ef-auth-mobile-brand { display: none; }
@media (max-width: 991.98px) {
    .ef-auth { grid-template-columns: 1fr; }
    .ef-auth-aside { display: none; }
    .ef-auth-mobile-brand { display: flex; justify-content: center; margin-bottom: 1.5rem; }
    .ef-auth-card { padding: 2rem 1.4rem; }
}

.min-w-0 { min-width: 0; }

@media (max-width: 575.98px) {
    .ef-stat { padding: .9rem; gap: .7rem; flex-direction: column; align-items: flex-start; }
    .ef-stat-icon { width: 40px; height: 40px; font-size: 1rem; border-radius: 11px; }
    .ef-stat-value { font-size: 1.35rem; }
    .ef-stat-label { font-size: .78rem; }
    .ef-hero { padding: 1.4rem 1.25rem; }
    .ef-hero h1 { font-size: 1.3rem; }
    .ef-page-title { font-size: 1.3rem; }
    .ef-page-icon { width: 42px; height: 42px; font-size: 1rem; }
}
