.pwd-wrap { position: relative; display: block; }
.pwd-wrap input[type="password"], .pwd-wrap input[type="text"] { padding-right: 40px; width: 100%; box-sizing: border-box; }
.pwd-wrap input::-ms-reveal, .pwd-wrap input::-ms-clear { display: none; }
.pwd-wrap input::-webkit-credentials-auto-fill-button, .pwd-wrap input::-webkit-textfield-decoration-container { visibility: hidden; }
.pwd-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; background: none !important; border: none !important; cursor: pointer; padding: 0; margin: 0; color: #667085; display: flex; align-items: center; justify-content: center; line-height: 0; box-shadow: none !important; filter: none !important; }
.pwd-toggle:hover, .pwd-toggle:focus { color: #0E1526; background: none; transform: translateY(-50%) !important; box-shadow: none !important; }
.pwd-toggle svg { width: 18px; height: 18px; flex-shrink: 0; }

/* =====================================================================
   DESIGN SYSTEM ADMIN — style "SaaS" moderne
   Palette issue du logo : indigo (#514BB8) + vert (#6B8915)
   ===================================================================== */
:root {
    --a-primaire: #6B8915;
    --a-primaire-hover: #5A7411;
    --a-primaire-fonce: #141833;
    --a-accent: #86A82B;
    --a-indigo: #514BB8;
    --a-indigo-soft: #EEF0FF;

    --a-bg: #F3F5F9;
    --a-surface: #FFFFFF;
    --a-fond: #F8F9FC;
    --a-line: #E6E9F0;
    --a-line-soft: #EFF1F6;
    --a-bordure: #E2E6EE;

    --a-ink: #0E1526;
    --a-texte: #1D2433;
    --a-texte-clair: #667085;
    --a-muted-2: #98A2B3;

    --a-danger: #B42318;
    --a-danger-bg: #FEF3F2;
    --a-succes: #067647;
    --a-succes-bg: #ECFDF3;
    --a-warn: #B54708;
    --a-warn-bg: #FFFAEB;

    --rayon: 10px;
    --a-shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
    --a-shadow-card: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px -18px rgba(16, 24, 40, .16);
    --a-shadow-pop: 0 20px 48px -20px rgba(16, 24, 40, .28);
    --a-ring: 0 0 0 4px rgba(124, 158, 31, .22);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-texte); font-weight: 400; font-size: 0.95rem; color: var(--a-texte); background: var(--a-bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-titre); margin: 0 0 .5em; letter-spacing: -0.015em; color: var(--a-ink); }
a { color: var(--a-primaire); text-decoration: none; }
a:hover { text-decoration: none; }
svg { display: block; }
::selection { background: rgba(81, 75, 184, .18); }
* { scrollbar-width: thin; scrollbar-color: #CBD0DC transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #CBD0DC; border-radius: 10px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #A9B0C0; background-clip: content-box; border: 2px solid transparent; }

/* ============ Login (page définir-mot-de-passe) ============ */
.login-body {
    display: flex; align-items: center; justify-content: center; min-height: 100vh;
    background: radial-gradient(circle at 20% 20%, #4E6710, #141833 65%);
    padding: 20px; margin: 0;
}
.login-box { background: #fff; padding: 44px 40px; border-radius: 20px; width: 100%; max-width: 400px; box-shadow: 0 24px 64px -12px rgba(20,16,58,0.35); }
.login-box h1 { font-size: 1.5rem; margin: 0 0 6px; color: var(--a-primaire-fonce); }
.login-sub { color: var(--a-texte-clair); margin-bottom: 24px; font-size: .9rem; line-height: 1.5; }
.login-back { text-align: center; margin-top: 18px; font-size: .88rem; color: var(--a-texte-clair); }

/* ============ Login split-screen ============ */
.login-split-body { margin: 0; background: #fff; }
.login-split { display: flex; min-height: 100vh; }

.login-split__visual {
    flex: 1 1 52%; position: relative; overflow: hidden;
    background: linear-gradient(155deg, #141833 0%, #1B1E29 100%);
    color: #fff; padding: 40px 56px; display: flex; flex-direction: column;
}
.login-split__back {
    display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
    color: #fff; background: rgba(255,255,255,.1); padding: 9px 16px 9px 12px;
    border-radius: 100px; font-size: .82rem; font-weight: 600;
}
.login-split__back:hover { background: rgba(255,255,255,.18); text-decoration: none; }

.login-split__deco { position: absolute; border-radius: 50%; pointer-events: none; }
.login-split__deco--a { width: 420px; height: 420px; background: radial-gradient(circle, rgba(133,166,42,.35), transparent 70%); top: -140px; right: -140px; }
.login-split__deco--b { width: 320px; height: 320px; background: radial-gradient(circle, rgba(231,201,72,.18), transparent 70%); bottom: -120px; left: -100px; }

.login-split__content { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 460px; margin: 0 auto; position: relative; z-index: 1; }
.login-split__content h2 { font-size: 1.9rem; line-height: 1.25; margin: 0 0 14px; font-family: var(--font-arboria, inherit); color: #fff; }
.login-split__content p { color: rgba(255,255,255,.72); font-size: .96rem; line-height: 1.6; margin: 0 0 32px; }

.login-split__illustration { width: 100%; max-width: 420px; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 16px; margin: 0 auto 32px; display: block; box-shadow: 0 24px 64px -16px rgba(0,0,0,.5); }

.login-split__stats { display: flex; gap: 20px; }
.login-split__stats div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.login-split__stats strong { font-size: .92rem; color: #fff; white-space: nowrap; }
.login-split__stats span { font-size: .76rem; color: rgba(255,255,255,.5); }
.login-split__stats div:last-child { flex-shrink: 1; }
.login-split__stats div:last-child span { white-space: normal; line-height: 1.4; }

.login-split__form { flex: 1 1 48%; display: flex; align-items: center; justify-content: center; padding: 40px; background: #fff; }
.login-split__form-inner { width: 100%; max-width: 380px; }
.login-split__logo { max-width: 190px; height: auto; margin-bottom: 28px; display: block; }
.login-split__form-inner h1 { font-size: 1.5rem; margin: 0 0 6px; color: var(--a-primaire-fonce); }
.login-back--form { text-align: left; }

@media (max-width: 900px) {
    .login-split { flex-direction: column; }
    .login-split__visual { padding: 32px; flex: none; }
    .login-split__content { max-width: none; }
    .login-split__illustration { max-width: 280px; margin-bottom: 20px; }
    .login-split__form { flex: none; padding: 36px 28px 48px; }
}

/* ============ Layout ============ */
.admin-layout { display: flex; min-height: 100vh; align-items: flex-start; }

.admin-sidebar {
    width: 272px; flex-shrink: 0; position: sticky; top: 0; height: 100vh; z-index: 30;
    display: flex; flex-direction: column; color: #AEB5CE;
    background:
        radial-gradient(90% 40% at 0% 0%, rgba(81, 75, 184, .42), transparent 70%),
        radial-gradient(80% 35% at 100% 100%, rgba(107, 137, 21, .22), transparent 70%),
        linear-gradient(180deg, #151935 0%, #0C0F22 100%);
    border-right: 1px solid rgba(255, 255, 255, .05);
}
.admin-brand { padding: 22px 20px 14px; }
.admin-brand img {
    display: block; width: 100%; height: auto; background: #fff; border-radius: 14px; padding: 10px 14px;
    box-shadow: 0 10px 28px -12px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .06);
}
.admin-sidebar nav { flex: 1; padding: 6px 0 14px; overflow-y: auto; }
.admin-sidebar nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); background-clip: content-box; }
.admin-nav-label {
    padding: 20px 26px 8px; font-size: 10.5px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .12em; color: rgba(255, 255, 255, .34); font-family: var(--font-arboria);
}
.admin-sidebar nav a {
    position: relative; display: flex; align-items: center; gap: 12px;
    margin: 2px 12px; padding: 7px 10px; border-radius: 12px; color: #B4BBD3;
    font-size: .875rem; font-weight: 500; transition: background-color .2s, color .2s, transform .2s;
}
.admin-sidebar nav a svg {
    width: 30px; height: 30px; padding: 7px; flex-shrink: 0; border-radius: 9px; stroke-width: 1.8;
    background: rgba(255, 255, 255, .05); color: #9AA3C4; transition: background-color .2s, color .2s, box-shadow .2s;
}
.admin-sidebar nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.admin-sidebar nav a:hover svg { background: rgba(255, 255, 255, .1); color: #fff; }
.admin-sidebar nav a.active {
    color: #fff; font-weight: 600;
    background: linear-gradient(90deg, rgba(134, 168, 43, .24), rgba(134, 168, 43, .05));
    box-shadow: inset 0 0 0 1px rgba(134, 168, 43, .28);
}
.admin-sidebar nav a.active::before {
    content: ''; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, #A5C93A, #6B8915); box-shadow: 0 0 14px rgba(165, 201, 58, .7);
}
.admin-sidebar nav a.active svg { background: linear-gradient(135deg, #8FB22E, #5F7D10); color: #fff; box-shadow: 0 6px 14px -4px rgba(107, 137, 21, .8); }
.nav-badge {
    background: linear-gradient(180deg, #F04438, #D92D20); color: #fff; font-size: 10.5px; font-weight: 700;
    min-width: 20px; height: 20px; padding: 0 6px; border-radius: 100px; box-shadow: 0 4px 10px -2px rgba(217, 45, 32, .6);
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.admin-sidebar-foot { padding: 14px 16px 18px; border-top: 1px solid rgba(255, 255, 255, .07); }
.admin-sidebar-foot a {
    display: flex; align-items: center; justify-content: center; gap: 9px; padding: 10px 14px; border-radius: 12px;
    color: #DDE1F0; font-size: .84rem; font-weight: 600; background: rgba(255, 255, 255, .06);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); transition: background-color .2s, transform .2s;
}
.admin-sidebar-foot a:hover { background: rgba(255, 255, 255, .12); color: #fff; transform: translateY(-1px); }

.admin-main { flex: 1; min-width: 0; }
.admin-topbar {
    position: sticky; top: 0; z-index: 20;
    background: rgba(255, 255, 255, .78); -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
    border-bottom: 1px solid var(--a-line); padding: 14px 32px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.admin-topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.admin-topbar h1 { font-size: 1.2rem; font-weight: 700; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--a-ink); }
.admin-back {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 38px; height: 38px;
    border-radius: 12px; background: #fff; color: var(--a-ink); border: 1px solid var(--a-line); box-shadow: var(--a-shadow-sm);
    transition: transform .18s ease, background-color .18s, color .18s, border-color .18s, box-shadow .18s;
}
.admin-back svg { width: 18px; height: 18px; }
.admin-back:hover { background: var(--a-ink); color: #fff; border-color: var(--a-ink); transform: translateX(-2px); box-shadow: 0 8px 18px -8px rgba(14, 21, 38, .6); }
.admin-user {
    display: flex; align-items: center; gap: 12px; font-size: .88rem; color: var(--a-texte-clair);
    padding: 5px 6px 5px 5px; border: 1px solid var(--a-line); border-radius: 999px; background: #fff; box-shadow: var(--a-shadow-sm);
}
.admin-user__avatar {
    width: 34px; height: 34px; border-radius: 50%; color: #fff; flex-shrink: 0;
    background: linear-gradient(135deg, #6C66D9, #514BB8); box-shadow: 0 6px 14px -6px rgba(81, 75, 184, .8);
    display: flex; align-items: center; justify-content: center; font-family: var(--font-arboria); font-weight: 700; font-size: .82rem;
}
.admin-user__info { display: flex; flex-direction: column; line-height: 1.25; }
.admin-user__name { color: var(--a-ink); font-weight: 600; font-size: .85rem; }
.admin-user__role { font-size: .72rem; color: var(--a-texte-clair); text-transform: capitalize; }
.btn-logout {
    display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px;
    color: var(--a-danger); background: var(--a-danger-bg); font-size: .8rem; font-weight: 600; transition: background-color .2s, color .2s;
}
.btn-logout svg { width: 15px; height: 15px; }
.btn-logout:hover { background: #D92D20; color: #fff; }
.admin-content { padding: 30px 32px 56px; max-width: 1360px; margin: 0 auto; }
.admin-toggle { display: none; background: #fff !important; color: var(--a-ink) !important; border: 1px solid var(--a-line) !important; border-radius: 10px; font-size: 1.1rem; padding: 6px 11px; cursor: pointer; box-shadow: var(--a-shadow-sm) !important; }
.admin-overlay { display: none; position: fixed; inset: 0; background: rgba(12, 15, 34, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); z-index: 90; }
.admin-overlay.show { display: block; }

@media (max-width: 900px) {
    .admin-layout { display: block; }
    .admin-sidebar {
        position: fixed; top: 0; left: 0; height: 100vh; width: 280px;
        transform: translateX(-100%); transition: transform .28s ease; z-index: 100;
    }
    .admin-sidebar.open { transform: translateX(0); box-shadow: 8px 0 40px rgba(0, 0, 0, .4); }
    .admin-toggle { display: inline-flex; align-items: center; }
    .admin-topbar { padding: 12px 18px; }
    .admin-content { padding: 20px 16px 40px; }
    .admin-user__info { display: none; }
}
@media (max-width: 600px) {
    .admin-topbar h1 { max-width: 46vw; font-size: 1.02rem; }
    .btn-logout span { display: none; }
}

/* ============ Boutons ============ */
button, .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
    padding: 9px 18px; border-radius: 10px; border: 1px solid rgba(60, 80, 5, .35);
    background: linear-gradient(180deg, #7FA21F 0%, #64810F 100%); color: #fff;
    font-family: var(--font-arboria); font-size: .875rem; font-weight: 600; line-height: 1.2; white-space: nowrap;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .28) inset, 0 8px 18px -8px rgba(100, 129, 15, .75);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease, background-color .18s, color .18s, border-color .18s;
}
button:hover, .btn:hover { filter: brightness(1.07); transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255, 255, 255, .28) inset, 0 12px 22px -8px rgba(100, 129, 15, .8); }
button:active, .btn:active { transform: translateY(0); filter: brightness(.97); }
button:focus-visible, .btn:focus-visible { outline: none; box-shadow: var(--a-ring); }

.btn-secondary {
    background: #fff; color: var(--a-ink); border-color: var(--a-bordure);
    box-shadow: var(--a-shadow-sm);
}
.btn-secondary:hover { background: #F8F9FC; border-color: #C9D0DE; filter: none; box-shadow: 0 4px 12px -6px rgba(16, 24, 40, .18); }

.btn-danger {
    background: var(--a-danger-bg); color: var(--a-danger); border-color: #FECDCA; box-shadow: none;
}
.btn-danger:hover { background: #D92D20; color: #fff; border-color: #D92D20; filter: none; box-shadow: 0 10px 20px -8px rgba(217, 45, 32, .75); }
.btn-danger:focus-visible { box-shadow: 0 0 0 4px rgba(217, 45, 32, .2); }

.btn-light { background: #fff; color: var(--a-indigo); border-color: #fff; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5); }
.btn-light:hover { background: #F4F3FF; filter: none; }
.btn-ghost-light { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .28); box-shadow: none; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .24); filter: none; box-shadow: none; }

.btn-sm { padding: 6px 12px; font-size: .8rem; border-radius: 9px; gap: 6px; }

/* Icônes automatiques (masques CSS, héritent de la couleur du bouton) */
.btn-danger::before,
.btn[href*="-edit"][href*="id="]::before,
.btn[target="_blank"]::before {
    content: ''; width: 14px; height: 14px; flex-shrink: 0; background: currentColor;
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain;
}
.btn-danger::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M8 6V4a2 2 0 012-2h4a2 2 0 012 2v2m3 0v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6'/%3E%3Cpath d='M10 11v6M14 11v6'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M8 6V4a2 2 0 012-2h4a2 2 0 012 2v2m3 0v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6'/%3E%3Cpath d='M10 11v6M14 11v6'/%3E%3C/svg%3E");
}
.btn[href*="-edit"][href*="id="]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.12 2.12 0 013 3L7 19l-4 1 1-4z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.12 2.12 0 013 3L7 19l-4 1 1-4z'/%3E%3C/svg%3E");
}
.btn[target="_blank"]::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}

/* ============ Formulaires ============ */
.form-group { margin-bottom: 18px; }
label { display: block; margin-bottom: 7px; font-weight: 600; font-size: .84rem; color: var(--a-ink); }
input, textarea, select {
    width: 100%; padding: 10px 14px; border: 1px solid var(--a-bordure); border-radius: 10px;
    font-family: inherit; font-size: .92rem; background: #fff; color: var(--a-ink);
    box-shadow: var(--a-shadow-sm); transition: border-color .18s, box-shadow .18s, background-color .18s;
}
input::placeholder, textarea::placeholder { color: var(--a-muted-2); }
input:hover, textarea:hover, select:hover { border-color: #C9D0DE; }
input:focus, textarea:focus, select:focus { outline: none; border-color: #7C9E1F; box-shadow: var(--a-ring); }
select {
    appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px;
}
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: #6B8915; box-shadow: none; }
textarea { resize: vertical; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }
.form-actions { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; }
.help-text { font-size: .8rem; color: var(--a-texte-clair); margin-top: 5px; }

/* ============ Panneaux ============ */
.panel {
    background: var(--a-surface); border: 1px solid var(--a-line); border-radius: 18px;
    padding: 22px 24px; margin-bottom: 22px; box-shadow: var(--a-shadow-card);
}
.panel h2 { margin: 0 0 16px; font-size: 1rem; font-weight: 700; color: var(--a-ink); display: flex; align-items: center; gap: 11px; }
.panel h2 > svg:first-child {
    width: 34px; height: 34px; padding: 8px; flex-shrink: 0; border-radius: 10px;
    background: var(--a-indigo-soft); color: var(--a-indigo);
}
.panel-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 4px; }
.panel-head h2 { margin: 0; }

.dash-two-cols { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 22px; align-items: stretch; margin-bottom: 22px; }
.dash-two-cols > .panel { min-width: 0; margin-bottom: 0; display: flex; flex-direction: column; }
@media (max-width: 1000px) { .dash-two-cols { grid-template-columns: minmax(0, 1fr); } }

/* ============ Tableaux ============ */
.table-responsive {
    width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
    background: var(--a-surface); border: 1px solid var(--a-line); border-radius: 18px; box-shadow: var(--a-shadow-card); margin-bottom: 22px;
}
.panel .table-responsive { background: transparent; border: none; border-radius: 0; box-shadow: none; margin-bottom: 0; }
.admin-table { width: 100%; border-collapse: separate; border-spacing: 0; background: transparent; }
.admin-table th {
    padding: 11px 16px; text-align: left; font-family: var(--font-arboria); font-size: .7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .07em; color: var(--a-muted-2); background: transparent;
    border-bottom: 1px solid var(--a-line);
}
.admin-table td { padding: 14px 16px; text-align: left; font-size: .875rem; color: #344054; border-bottom: 1px solid var(--a-line-soft); vertical-align: middle; }
.admin-table td:first-child { color: var(--a-ink); font-weight: 500; }
.admin-table tbody tr { transition: background-color .15s; }
.admin-table tbody tr:hover td { background: #F9FAFD; }
.admin-table tr:last-child td { border-bottom: none; }
.actions-col { white-space: nowrap; text-align: right !important; }
.actions-col > * { vertical-align: middle; }
.actions-col > * + * { margin-left: 8px; }
.actions-col form { display: inline-block; margin: 0; }
.admin-table th.actions-col { text-align: right !important; }

/* ============ Badges ============ */
.badge {
    display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px;
    font-size: .72rem; font-weight: 600; letter-spacing: .01em; border: 1px solid transparent; white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.badge-publie { background: var(--a-succes-bg); color: var(--a-succes); border-color: #ABEFC6; }
.badge-brouillon { background: var(--a-warn-bg); color: var(--a-warn); border-color: #FEDF89; }
.badge-info { background: #EEF4FF; color: #3538CD; border-color: #C7D7FE; }
.badge-neutre { background: #F2F4F7; color: #475467; border-color: #E4E7EC; }

/* ============ Barre d'outils / onglets segmentés ============ */
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.toolbar form select, .toolbar form input[type="search"] { width: auto; }

.subsubsub, .seg {
    list-style: none; display: inline-flex; gap: 2px; margin: 0 0 18px; padding: 4px; flex-wrap: wrap;
    background: #EAEDF3; border-radius: 12px;
}
.seg { margin: 0; }
.subsubsub li { display: flex; align-items: center; }
.subsubsub li::after { content: none !important; }
.subsubsub a, .seg a {
    color: var(--a-texte-clair); font-size: .82rem; font-weight: 600; padding: 6px 14px; border-radius: 9px;
    transition: background-color .18s, color .18s, box-shadow .18s;
}
.subsubsub a:hover, .seg a:hover { color: var(--a-ink); }
.subsubsub a.current, .seg a.is-active { background: #fff; color: var(--a-ink); box-shadow: 0 1px 3px rgba(16, 24, 40, .12), 0 0 0 1px rgba(16, 24, 40, .04); }
.subsubsub .count { color: var(--a-muted-2); font-weight: 500; margin-left: 4px; }
.subsubsub a.current .count { color: var(--a-indigo); }

/* ============ Alertes ============ */
.alert { padding: 13px 18px; border-radius: 12px; margin-bottom: 22px; font-size: .88rem; font-weight: 500; border: 1px solid; }
.alert-success { background: var(--a-succes-bg); color: var(--a-succes); border-color: #ABEFC6; }
.alert-error { background: var(--a-danger-bg); color: var(--a-danger); border-color: #FECDCA; }

/* ============ TABLEAU DE BORD ============ */
.dash-hero {
    position: relative; overflow: hidden; border-radius: 22px; padding: 30px 32px; margin-bottom: 22px; color: #fff;
    display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap;
    background:
        radial-gradient(60% 120% at 100% 0%, rgba(134, 168, 43, .55), transparent 60%),
        radial-gradient(50% 100% at 0% 100%, rgba(255, 255, 255, .12), transparent 60%),
        linear-gradient(120deg, #2E2B86 0%, #514BB8 55%, #6C66D9 100%);
    box-shadow: 0 24px 48px -24px rgba(81, 75, 184, .7);
}
.dash-hero::before, .dash-hero::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; border: 1px solid rgba(255, 255, 255, .12); }
.dash-hero::before { width: 320px; height: 320px; right: -80px; top: -140px; }
.dash-hero::after { width: 220px; height: 220px; right: 90px; top: -90px; }
.dash-hero__text { position: relative; z-index: 1; min-width: 0; flex: 1 1 380px; }
.dash-hero__eyebrow {
    display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; font-size: .72rem; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .22);
}
.dash-hero__eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #A5E635; box-shadow: 0 0 10px #A5E635; }
.dash-hero h2 { color: #fff; font-size: 1.85rem; font-weight: 800; margin: 14px 0 6px; letter-spacing: -.02em; }
.dash-hero p { margin: 0 0 20px; color: rgba(255, 255, 255, .78); font-size: .95rem; }
.dash-search {
    position: relative; display: flex; align-items: center; max-width: 520px; background: rgba(255, 255, 255, .96);
    border-radius: 14px; padding: 5px 5px 5px 16px; box-shadow: 0 16px 32px -16px rgba(0, 0, 0, .55);
}
.dash-search > svg { width: 18px; height: 18px; color: #98A2B3; flex-shrink: 0; }
.dash-search input { border: none; box-shadow: none; background: transparent; padding: 10px 12px; font-size: .92rem; flex: 1; min-width: 0; }
.dash-search input:focus { box-shadow: none; }
.dash-search button { padding: 9px 18px; }
.dash-hero__actions { position: relative; z-index: 1; display: flex; gap: 10px; flex-wrap: wrap; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-card {
    --tone: #6B8915; --tone-2: #9DBE2E; --tone-soft: rgba(107, 137, 21, .14);
    position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px; padding: 20px 22px 22px;
    background: var(--a-surface); border: 1px solid var(--a-line); border-radius: 18px; box-shadow: var(--a-shadow-card);
    color: inherit; transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
}
.stat-card::after { content: ''; position: absolute; right: -36px; top: -36px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(closest-side, var(--tone-soft), transparent); pointer-events: none; }
a.stat-card { cursor: pointer; }
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--a-shadow-pop); border-color: color-mix(in srgb, var(--tone) 30%, var(--a-line)); }
.stat-card--indigo { --tone: #514BB8; --tone-2: #7E79E6; --tone-soft: rgba(81, 75, 184, .16); }
.stat-card--amber  { --tone: #D98A0B; --tone-2: #F5B942; --tone-soft: rgba(217, 138, 11, .16); }
.stat-card--sky    { --tone: #0E8FC7; --tone-2: #45BDEB; --tone-soft: rgba(14, 143, 199, .15); }
.stat-card--rose   { --tone: #D6336C; --tone-2: #F06595; --tone-soft: rgba(214, 51, 108, .15); }
.stat-card__icon {
    width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0; color: #fff; position: relative; z-index: 1;
    background: linear-gradient(135deg, var(--tone-2), var(--tone)); box-shadow: 0 12px 22px -10px var(--tone);
    display: flex; align-items: center; justify-content: center;
}
.stat-card__icon svg { width: 22px; height: 22px; stroke-width: 1.9; }
.stat-card .num { position: relative; z-index: 1; font-family: var(--font-titre); font-size: 2.3rem; font-weight: 800; color: var(--a-ink); line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat-card .label { position: relative; z-index: 1; color: var(--a-texte-clair); font-size: .82rem; font-weight: 500; margin-top: -6px; }

/* Graphique trafic */
.kpis { display: flex; gap: 32px; margin: 18px 0 8px; flex-wrap: wrap; }
.kpi__num { font-family: var(--font-titre); font-size: 1.9rem; font-weight: 800; color: var(--a-ink); letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi__label { font-size: .78rem; color: var(--a-texte-clair); margin-top: 6px; font-weight: 500; }
.chart {
    position: relative; display: flex; align-items: flex-end; gap: 8px; height: 150px; padding-top: 10px; margin-top: 14px;
    background: repeating-linear-gradient(to top, var(--a-line-soft) 0, var(--a-line-soft) 1px, transparent 1px, transparent 37px);
}
.chart--dense { gap: 2px; }
.chart__col { position: relative; flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.chart__bar {
    width: 100%; max-width: 46px; min-height: 4px; border-radius: 8px 8px 3px 3px; opacity: .55;
    background: linear-gradient(180deg, #A5C93A, #6B8915); transition: opacity .2s, transform .2s, filter .2s;
}
.chart__col.is-last .chart__bar { opacity: 1; background: linear-gradient(180deg, #7E79E6, #514BB8); box-shadow: 0 10px 20px -8px rgba(81, 75, 184, .8); }
.chart__col:hover .chart__bar { opacity: 1; transform: scaleY(1.03); transform-origin: bottom; }
.chart__col::after {
    content: attr(data-tip); position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translate(-50%, 6px); white-space: nowrap;
    background: #0E1526; color: #fff; font-size: .7rem; font-weight: 600; padding: 5px 9px; border-radius: 8px; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; z-index: 5;
}
.chart__col:hover::after { opacity: 1; transform: translate(-50%, 0); }
.chart__lbl { font-size: .64rem; color: var(--a-muted-2); font-weight: 500; height: 12px; }
.chart-wrap { margin-top: auto; }

/* Messages récents */
.msg-list { display: flex; flex-direction: column; gap: 4px; min-width: 0; margin: 0 -8px; }
.msg {
    position: relative; display: flex; gap: 12px; padding: 12px 8px; border-radius: 14px; min-width: 0; color: inherit; transition: background-color .15s;
}
.msg:hover { background: #F6F7FB; }
.msg__avatar {
    width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    font-family: var(--font-arboria); font-weight: 700; font-size: .85rem; color: #fff; background: linear-gradient(135deg, #7E79E6, #514BB8);
}
.msg__body { min-width: 0; flex: 1; }
.msg__top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; min-width: 0; }
.msg__name { font-size: .87rem; font-weight: 600; color: var(--a-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.msg__time { font-size: .72rem; color: var(--a-muted-2); flex-shrink: 0; font-weight: 500; }
.msg__subject { font-size: .78rem; color: var(--a-indigo); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 1px 0 3px; }
.msg__text { font-size: .82rem; line-height: 1.5; color: var(--a-texte-clair); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.msg.is-unread .msg__name { font-weight: 800; }
.msg.is-unread::before { content: ''; position: absolute; left: -2px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: #F04438; box-shadow: 0 0 0 3px rgba(240, 68, 56, .18); }

/* Alertes & rappels */
.notice-list { display: flex; flex-direction: column; gap: 10px; }
.notice {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid; font-size: .86rem; font-weight: 500; line-height: 1.45;
    transition: transform .18s, box-shadow .18s;
}
.notice:hover { transform: translateX(3px); box-shadow: 0 8px 20px -14px rgba(16, 24, 40, .35); }
.notice__icon { width: 30px; height: 30px; flex-shrink: 0; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .75); }
.notice__icon svg { width: 16px; height: 16px; }
.notice__text { flex: 1; min-width: 0; }
.notice__go { width: 16px; height: 16px; flex-shrink: 0; opacity: .5; }
.notice--warn { background: var(--a-warn-bg); border-color: #FEDF89; color: var(--a-warn); }
.notice--danger { background: var(--a-danger-bg); border-color: #FECDCA; color: var(--a-danger); }

/* Statut système */
.sys-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.sys-tile { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--a-line); border-radius: 14px; background: var(--a-fond); }
.sys-tile__icon { width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: #fff; color: var(--a-indigo); box-shadow: var(--a-shadow-sm), 0 0 0 1px var(--a-line); }
.sys-tile__icon svg { width: 19px; height: 19px; }
.sys-tile__val { font-family: var(--font-titre); font-weight: 800; font-size: 1.05rem; color: var(--a-ink); letter-spacing: -.01em; line-height: 1.15; }
.sys-tile__lbl { font-size: .75rem; color: var(--a-texte-clair); margin-top: 2px; }

.cell-title { display: block; max-width: clamp(160px, 34vw, 400px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-date { color: var(--a-texte-clair); font-size: .82rem; font-variant-numeric: tabular-nums; white-space: nowrap; }

.current-thumb { max-width: 160px; border-radius: 10px; margin-bottom: 8px; }
.empty-state { color: var(--a-texte-clair); padding: 28px 0; text-align: center; font-size: .9rem; }

/* ============ Fenêtre de confirmation ============ */
.confirm-overlay {
    position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center; padding: 20px;
    background: rgba(12, 15, 34, .55); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
    opacity: 0; transition: opacity .2s ease;
}
.confirm-overlay.is-open { opacity: 1; }
body.confirm-lock { overflow: hidden; }
.confirm-box {
    width: 100%; max-width: 430px; background: #fff; border-radius: 24px; padding: 30px 30px 24px;
    box-shadow: 0 50px 90px -30px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .6) inset;
    transform: translateY(14px) scale(.95); transition: transform .28s cubic-bezier(.2, .9, .3, 1.25);
}
.confirm-overlay.is-open .confirm-box { transform: none; }
.confirm-icon {
    width: 56px; height: 56px; border-radius: 18px; display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
    background: #FEF3F2; color: #D92D20; box-shadow: 0 0 0 8px rgba(254, 243, 242, .7);
}
.confirm-icon.is-info { background: var(--a-indigo-soft); color: var(--a-indigo); box-shadow: 0 0 0 8px rgba(238, 240, 255, .7); }
.confirm-icon svg { width: 26px; height: 26px; }
.confirm-title { font-size: 1.2rem; font-weight: 800; margin: 0 0 8px; color: var(--a-ink); letter-spacing: -.02em; }
.confirm-text { margin: 0; color: #344054; font-size: .95rem; line-height: 1.55; overflow-wrap: anywhere; }
.confirm-detail { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: #F8F9FC; color: var(--a-texte-clair); font-size: .83rem; line-height: 1.45; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.confirm-actions .btn { padding: 10px 20px; }
.btn-danger--solid { background: linear-gradient(180deg, #F04438, #D92D20); color: #fff; border-color: #B42318; box-shadow: 0 10px 22px -10px rgba(217, 45, 32, .8); }
.btn-danger--solid:hover { background: linear-gradient(180deg, #F04438, #C0281B); color: #fff; filter: none; box-shadow: 0 14px 26px -10px rgba(217, 45, 32, .9); }
.btn-danger--solid::before { display: none !important; }
@media (max-width: 480px) { .confirm-actions .btn { flex: 1 1 100%; } .confirm-actions { flex-direction: column-reverse; } }

/* ============ Navigation sans rechargement ============ */
.admin-content { transition: opacity .15s ease; }
.admin-content.is-loading { opacity: .55; pointer-events: none; }
.admin-content.no-anim > * { animation: none !important; }
.admin-progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 200; pointer-events: none; opacity: 0;
    background: linear-gradient(90deg, #514BB8, #86A82B); box-shadow: 0 0 10px rgba(134, 168, 43, .7); border-radius: 0 3px 3px 0;
}
.admin-progress.is-on { opacity: 1; width: 78%; transition: width 6s cubic-bezier(.1, .7, .2, 1); }
.admin-progress.is-done { opacity: 0; width: 100%; transition: width .2s ease, opacity .3s ease .15s; }

/* ============ Entrée en douceur ============ */
@keyframes admin-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.admin-content > * { animation: admin-rise .5s cubic-bezier(.2, .7, .2, 1) both; }
.admin-content > *:nth-child(2) { animation-delay: .04s; }
.admin-content > *:nth-child(3) { animation-delay: .08s; }
.admin-content > *:nth-child(4) { animation-delay: .12s; }
.admin-content > *:nth-child(5) { animation-delay: .16s; }
.admin-content > *:nth-child(6) { animation-delay: .20s; }
@media (prefers-reduced-motion: reduce) {
    .admin-content > * { animation: none; }
    * { transition-duration: .01ms !important; }
}

@media (max-width: 640px) {
    .form-row { flex-direction: column; gap: 0; }
    .panel { padding: 18px; border-radius: 16px; }
    .login-box { padding: 30px 24px; }
    .actions-col { white-space: normal; }
    .dash-hero { padding: 24px 20px; border-radius: 18px; }
    .dash-hero h2 { font-size: 1.5rem; }
    .stat-card .num { font-size: 1.9rem; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .stats-grid > .stat-card:last-child:nth-child(odd) { grid-column: span 2; }
    .stat-card { padding: 16px; gap: 10px; }
    .stat-card__icon { width: 40px; height: 40px; border-radius: 12px; }
    .stat-card .label { font-size: .78rem; }
    .dash-hero__actions .btn { flex: 1 1 auto; }
}
