/* ============================================================
   VARIABLES
   ============================================================ */
:root {
    --sidebar:       #060d1f;
    --sidebar-s:     #0e1729;
    --sidebar-h:     #162036;
    --sidebar-t:     #7b8ba5;
    --accent:        #20a095;
    --accent-h:      #0f766e;
    --accent-l:      #ccfbf1;
    --accent-bg:     #f0fdfa;
    --bg:            #f0f4f8;
    --card:          #ffffff;
    --text:          #0f172a;
    --text2:         #475569;
    --text3:         #4b71a7;
    --text4:         #44af8f;
    --text5:         #d15858;
    --text51:        #beb2b2;
    --muted:         #94a3b8;
    --border:        #e2e8f0;
    --danger:        #dc2626;
    --danger2:       #cf7979;
    --danger-l:      #fef2f2;
    --warn:          #815119;
    --warn-l:        #b4aa9d8c;
    --ok:            #059669;
    --ok-l:          #b7e9d2;
    --info:          #2e5ab8;
    --info-l:        #afe4f5;
    --infoAU:        #4fcf9e;
    --info-lAU:      #c6e7d049;
    --sep:           rgb(209, 219, 211);
}

/* ============================================================
   RESET & BASE
   *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
   ============================================================ */
body {
    font-family: 'Ubuntu'; 
    min-height: 100vh;
    display: flex;
}
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

/* ============================================================
   SIDEBAR
   ============================================================ */

#sidebar {
    width: 260px;
    flex-shrink: 0;         
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--sidebar);         /* ou votre couleur */
    color: var(--sidebar-t);
    border-right: 1px solid #e2e8f0;
    z-index: 100;
    overflow: hidden;         /* pour que les enfants gèrent le défilement */
}

#sidebar::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(ellipse at 30% 20%, rgba(13,148,136,.08) 0%, transparent 60%);
    pointer-events: none;
}
.sidebar-logo {
    padding: 24px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    flex-shrink: 0;
}
.sidebar-logo h1 {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    letter-spacing: .5px;
    text-transform: uppercase;
}
.sidebar-logo p {
    font-size: 11px;
    color: var(--sidebar-t);
    margin-top: 2px;
}
.sidebar-annee {
    margin: 12px 10px 8px;
    padding: 10px 14px;
    background: var(--sidebar-s);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.06);
    flex-shrink: 0;
}
.sidebar-annee label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--sidebar-t);
    display: block;
    margin-bottom: 6px;
}
.sidebar-annee select {
    width: 100%;
    background: var(--sidebar-h);
    border: 1px solid rgba(255,255,255,.1);
    color: #fff;
    padding: 7px 10px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}
.sidebar-annee select option { background: var(--sidebar); color: #fff; }

/* Le nav prend tout l'espace disponible et scroll indépendamment */
#nav-menu {
    flex: 1;
    min-height: 0;
    padding: 8px 10px;
    overflow-y: auto;
    overflow-x: hidden;
}
#nav-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--sidebar-t);
    text-decoration: none;
    transition: all .2s;
    margin-bottom: 2px;
    position: relative;
}
#nav-menu a:hover { background: var(--sidebar-h); color: #c8d3e3; }
#nav-menu a.active { background: var(--accent); color: #fff; box-shadow: 0 4px 15px rgba(13,148,136,.35); }
#nav-menu a i { width: 20px; text-align: center; font-size: 14px; }
.sidebar-badge {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 10px;
    line-height: 1.4;
}
.sidebar-sep { height: 1px; background: rgba(255,255,255,.06); margin: 8px 14px; }

/* User et Logout : collés en bas, ne scrollent jamais */
/* ============================================================
   SIDEBAR-USER CLIQUABLE
   ============================================================ */


.sidebar-user {
    padding: 14px 20px;
    border-top: 1px solid rgba(255,255,255,.06);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
        transition: background .15s;
    border-radius: 0;
    margin-left: 10px;
    margin-right: 10px;
    padding-left: 10px;
    padding-right: 10px;
    border-radius: 10px;
}

.sidebar-user:hover {
    background: var(--sidebar-h);
}
.sidebar-user .avatar {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), #06b6d4);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: 14px; flex-shrink: 0;
}
.sidebar-user .user-info { overflow: hidden; }
.sidebar-user .user-name { font-size: 12px; font-weight: 700; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .user-role { font-size: 10px; color: var(--sidebar-t); }

.sidebar-logout {
    padding: 0 10px 12px;
    flex-shrink: 0;
}
.sidebar-logout a {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 14px; border-radius: 10px;
    font-size: 12px; font-weight: 600;
    color: #64748b; text-decoration: none;
    transition: all .2s;
}
.sidebar-logout a:hover { background: rgba(220,38,38,.15); color: #f87171; }
.sidebar-logout a i { width: 20px; text-align: center; font-size: 13px; }

/* ============================================================
   ZONE PRINCIPALE
   ============================================================ */

#main-area {
    flex: 1;                  /* prend tout l'espace restant */
    margin-left: 260px;       /* largeur de la sidebar */
    height: 100vh;
    overflow-y: auto;         /* permet le défilement du contenu */
    display: flex;
    flex-direction: column;
    background: var(--bg);
    background-image: radial-gradient(circle at 1px 1px, rgba(0,0,0,.03) 1px, transparent 0);
    background-size: 24px 24px;
    width: 100%;
}

#topbar {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px; 
    padding-bottom: 16px;
    padding-left: 2%;
    padding-right: 2%;
}

#topbar .burger { 
    display: none; 
    background: none; 
    border: none; 
    font-size: 20px; 
    color: var(--text2); 
    cursor: pointer; 
}

/* Le contenu scroll indépendamment dans la zone restante */
#content {
    width: 100%;
    flex-shrink: 0;
    min-height: 0;
    padding: 28px;
    margin: 0 auto;
}

/* ============================================================
   CARTES
   ============================================================ */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.card-head {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.card-body { padding: 22px; }

/* ============================================================
   TABLEAUX
   ============================================================ */
.tbl-wrap { 
    overflow-x: auto; 
    border: 1px solid var(--border); 
    overflow-y: visible;
    border-radius: 10px; 
}

table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl thead { background: #f8fafc; }
.tbl th {
    padding: 10px 14px; text-align: left;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .5px;
    color: var(--text2); border-bottom: 2px solid var(--border);
    white-space: nowrap;
}
.tbl td { padding: 10px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.tbl tbody tr:hover { background: #f8fafc; }
.tbl tbody tr:last-child td { border-bottom: none; }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 700;
}
.badge-ok      { background: var(--ok-l);       color: var(--ok); }
.badge-warn    { background: var(--warn-l);     color: var(--warn); }
.badge-danger  { background: var(--danger-l);   color: var(--danger); }
.badge-info    { background: var(--info-l);     color: var(--info); }
.badge-infoAU  { background: var(--info-lAU);   color: var(--infoAU); }
.badge-muted   { background: #f1f5f9;         color: var(--muted); }

/* ============================================================
   BOUTONS
   ============================================================ */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 9px;
    font-size: 12px; font-weight: 700;
    border: none; cursor: pointer;
    transition: all .15s; text-decoration: none; white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary  { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-h); }
.btn-danger   { background: var(--danger); color: #fff; }
.btn-danger:hover  { background: #b91c1c; }
.btn-ok       { background: var(--ok); color: #fff; }
.btn-ok:hover { background: #0bb182; }
.btn-ghost    { background: transparent; color: var(--text2); border: 1px solid var(--border); }
.btn-ghost3    { background: rgb(255, 255, 255); color: var(--text2); border: 1px solid var(--border); }
.btn-ghost2    { background: transparent; color: #991b1b; border: 1px solid var(--border); }
.btn-ghost:hover { background: #f8fafc; }
.btn-ghost3:hover { background:rgb(223, 229, 235)c; }
.btn-sm { padding: 5px 10px; font-size: 11px; border-radius: 7px; }
.btn-xs { padding: 3px 8px; font-size: 10px; border-radius: 6px; }
.btn-icon { width: 32px; height: 32px; padding: 0; justify-content: center; border-radius: 8px; }

/* ============================================================
   FORMULAIRES
   ============================================================ */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block; font-size: 12px; font-weight: 700;
    color: var(--text2); margin-bottom: 5px;
    text-transform: uppercase; letter-spacing: .3px;
}
.form-control {
    width: 100%; padding: 9px 12px;
    border: 1px solid var(--border); border-radius: 9px;
    font-size: 13px; color: var(--text); background: #fff;
    outline: none; transition: border-color .2s;
}
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(13,148,136,.1); }
select.form-control { cursor: pointer; }

/* ============================================================
   TOAST (message flash)
   ============================================================ */
.toast {
    padding: 14px 20px; border-radius: 12px;
    font-size: 13px; font-weight: 600;
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 20px; border: 1px solid;
    animation: slideIn .3s ease;
    box-shadow: 0 8px 30px rgba(0,0,0,.1);
}
.toast-ok   { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.toast-err  { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.toast-warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.toast-info { background: #f0fdfa; border-color: #99f6e4; color: #134e4a; }

/* ============================================================
   MODAL DE CONFIRMATION
   #confirm-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5); backdrop-filter: blur(4px);
    z-index: 200; display: flex;
    align-items: center; justify-content: center;
    padding: 20px;
}
#confirm-box {
    background: var(--card); border-radius: 16px;
    padding: 32px; text-align: center;
    max-width: 400px; width: 100%;
    box-shadow: 0 25px 60px rgba(0,0,0,.2);
    animation: scaleIn .25s ease;
}
#confirm-icon {
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--warn-l); color: var(--warn);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; margin: 0 auto 16px;
}
#confirm-text { font-size: 14px; color: var(--text2); margin-bottom: 24px; line-height: 1.6; }
#confirm-actions { display: flex; gap: 8px; justify-content: center; }
============================================================ */

/* ============================================================
   KPI CARDS
   ============================================================ */
.kpi {
    border-radius: 14px; padding: 22px 24px; color: #fff;
    display: flex; align-items: center; justify-content: space-between;
    position: relative; overflow: hidden;
}
.kpi::after {
    content: ''; position: absolute;
    top: -30%; right: -20%; width: 140px; height: 140px;
    border-radius: 50%; background: rgba(255,255,255,.08);
}
.kpi-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; opacity: .85; }
.kpi-val   { font-size: 32px; font-weight: 900; margin-top: 4px; line-height: 1; }
.kpi-sub   { font-size: 10px; opacity: .7; margin-top: 6px; }
.kpi-icon  {
    width: 52px; height: 52px; border-radius: 14px;
    background: rgba(255,255,255,.15);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; position: relative; z-index: 1;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp   { from { opacity:0; transform:translateY(16px) } to { opacity:1; transform:translateY(0) } }
@keyframes scaleIn  { from { opacity:0; transform:scale(.92) } to { opacity:1; transform:scale(1) } }
@keyframes slideIn  { from { opacity:0; transform:translateX(40px) } to { opacity:1; transform:translateX(0) } }
.anim-up { animation: fadeUp .4s ease both; }
.anim-up-1 { animation-delay: .05s; }
.anim-up-2 { animation-delay: .10s; }
.anim-up-3 { animation-delay: .15s; }
.anim-up-4 { animation-delay: .20s; }

/* ============================================================
   PAGE 404
   ============================================================ */
.e404-code {
    font-size: 120px; font-weight: 900; line-height: 1;
    background: linear-gradient(135deg, var(--accent), #06b6d4);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    #sidebar {
        position: fixed !important;
        left: -260px !important;  /* hors écran */
        top: 0 !important;
        bottom: 0 !important;
        width: 260px !important;
        transition: left 0.3s ease;
        /* supprimer toute règle transform */
    }
    #sidebar.open {
        left: 0 !important;
    }
    #main-area {
        margin-left: 0 !important;
        width: 100%;
    }
    #topbar .burger {
        display: block !important;
    }
    #content {
        padding: 16px !important;
    }
    .kpi .kpi-val { 
        font-size: 24px; 
    }
}
#sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 40; }
#sidebar-overlay.show { display: block; }

/* ============================================================
   MODAL PERSONNALISÉ
   ============================================================ */
#modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
#modal-box {
    background: var(--card);
    border-radius: 16px;
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    animation: scaleIn .25s ease;
    box-shadow: 0 25px 60px rgba(0, 0, 0, .2);
}
#modal-box.wide { max-width: 800px; }
#modal-head {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--card);
    z-index: 2;
    border-radius: 16px 16px 0 0;
}
#modal-head h2 { font-size: 16px; font-weight: 800; }
#modal-body { padding: 24px; }
#modal-foot {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    position: sticky;
    bottom: 0;
    background: var(--card);
    border-radius: 0 0 16px 16px;
}

/* ============================================================
   ALERTES DANS LES MODALS (formulaire)
   ============================================================ */
.alert-err {
    background: var(--danger-l);
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}
.alert-ok {
    background: var(--ok-l);
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}

/* ============================================================
   LIEN INSCRITS CLIQUABLE
   ============================================================ */
.inscrits-link {
    font-size: 15px;
    font-weight: 800;
    color: var(--accent);
    cursor: pointer;
    text-decoration: none;
    transition: color .15s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.inscrits-link:hover { color: var(--accent-h); text-decoration: underline; }
.inscrits-link.zero {
    color: var(--muted);
    cursor: default;
    pointer-events: none;
    font-weight: 700;
    font-size: 14px;
}
.inscrits-link.zero:hover { text-decoration: none; }

/* ============================================================
   COMBOBOX (liste déroulante avec recherche intégrée)
   ============================================================ */
.combobox { position: relative; width: 220px; flex-shrink: 0; z-index: 9999 !important;}
.cb-control {
    display: flex; align-items: center;
    border: 1px solid var(--border); border-radius: 9px;
    background: #fff; transition: border-color .2s;
    overflow: hidden;
}
.cb-control:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(13,148,136,.1); }
.cb-input {
    flex: 1; border: none !important; outline: none !important;
    box-shadow: none !important; padding: 9px 0 9px 12px;
    font-size: 13px; background: transparent; min-width: 0;
}
.cb-input::placeholder { color: var(--muted); font-size: 12px; }
.cb-arrow {
    padding: 0 10px; color: var(--muted); font-size: 10px;
    pointer-events: none; flex-shrink: 0;
}
.cb-clear {
    display: none; align-items: center; justify-content: center;
    width: 28px; height: 28px; border: none; background: none;
    color: var(--muted); cursor: pointer; font-size: 11px;
    flex-shrink: 0; border-radius: 0 8px 8px 0; margin-right: 4px;
}
.cb-clear:hover { color: var(--danger); background: var(--danger-l); }
.cb-dropdown {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0;
    background: #fff; border: 1px solid var(--border); border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
    max-height: 240px; overflow-y: auto; 
    z-index: 9999;
    display: none; padding: 4px;
}
.cb-dropdown.open { display: block; animation: fadeUp .15s ease; }
.cb-option {
    padding: 8px 12px; border-radius: 7px; cursor: pointer;
    font-size: 13px; color: var(--text); transition: background .1s;
    z-index: 9999;
}
.cb-option:hover { background: var(--accent-bg); color: var(--accent); font-weight: 600; }
.cb-option.selected { background: var(--accent); color: #fff; font-weight: 700; }

/* ============================================================
   ZONE DE GLISSER-DÉPOSER (import)
   ============================================================ */
.drop-zone {
    border: 2px dashed var(--border); border-radius: 16px;
    padding: 60px 40px; text-align: center;
    transition: all .2s; cursor: pointer;
    background: #fafbfc;
}
.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--accent); background: var(--accent-bg);
}
.drop-zone.dragover { transform: scale(1.01); }
.drop-zone i { font-size: 48px; color: var(--accent); opacity: .6; display: block; margin-bottom: 16px; }
.drop-zone p { font-size: 14px; color: var(--text2); margin: 4px 0; }
.drop-zone-sep { color: var(--muted) !important; font-size: 12px !important; text-transform: uppercase; letter-spacing: 1px; }
.drop-zone-hint { font-size: 11px !important; color: var(--muted) !important; margin-top: 12px !important; }

/* ============================================================
   TABLEAU D'IMPORT (aperçu)
   ============================================================ */
.import-table .row-ok td { background: var(--ok-l); }
.import-table .row-err td { background: var(--danger-l); }
.import-table .row-err td:first-child {
    box-shadow: inset 3px 0 0 var(--danger);
}
.err-list { font-size: 11px; color: var(--danger); line-height: 1.5; }
.err-list i { margin-right: 3px; }

/* ============================================================
   LIGNE BESOIN (tableau des besoins en production)
   ============================================================ */
.row-besoin td {
    background: var(--danger-l);
}
.row-besoin td:last-child {
    background: var(--danger-l);
}
.row-besoin:hover td {
    background: #fee2e2 !important;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.btn-pagination {
    min-width: 34px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text2);
    cursor: pointer;
    transition: all .15s;
    padding: 0 8px;
}
.btn-pagination:hover { background: #f8fafc; color: var(--text); }
.btn-pagination.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(13,148,136,.3);
}

.filter-option {
    transition: background-color 0.2s, color 0.2s;
}

.filter-option:hover {
    background-color: var(--accent-bg);   /* Couleur de fond au survol */
    color: var(--accent);                /* Couleur du texte au survol */
    font-weight: 600;                    /* Optionnel : rendre le texte plus gras */
}

/* ============================================================
   ONGLETS RÉFÉRENTIELS
   ============================================================ */
.ref-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    overflow-x: auto;
    overflow-y: hidden;  /* Pour être sûr qu'il n'y ait pas de scroll vertical */
}

.ref-tab {
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    text-decoration: none;
    border-bottom: 2px solid var(--border);
    transition: all .15s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;  /* Empêche les onglets de se compresser dans le scroll */
}

.ref-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);  /* L'onglet actif prend la couleur d'accent */
}
.ref-tab:hover { color: var(--text2); }
.ref-tab.active:hover { color: var(--text2); }

.ref-tab .tab-count {
    font-size: 10px;
    font-weight: 800;
    padding: 1px 7px;
    border-radius: 10px;
    line-height: 1.25;
}
.ref-tab.active .tab-count { background: var(--accent-h); color: var(--accent-bg); }

.ref-tab:not(.active) .tab-count { background: #f1f5f9; color: var(--muted); }


/* Conteneur principal */
.actions-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Bouton toggle (caché par défaut sur desktop) */
.actions-toggle {
    display: none;
    background: transparent;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 18px;
}

/* Groupe d'actions : en ligne sur desktop */
.actions-dropdown {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

/* ========== STYLES MOBILE ========== */
@media (max-width: 768px) {
    .actions-toggle {
        display: inline-flex; /* On affiche le bouton "..." */
    }

    .actions-dropdown {
        display: none; /* Caché par défaut */
        position: absolute;
        right: 0;
        top: calc(100% + 8px);
        background: #ffffff;
        border: 1px solid var(--border, #e2e8f0);
        border-radius: 8px;
        padding: 6px;
        flex-direction: column;
        align-items: stretch;
        min-width: 180px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
        z-index: 1000;
    }

    /* Quand le dropdown est ouvert */
    .actions-dropdown.open {
        display: flex;
    }

    /* Chaque bouton dans le dropdown prend toute la largeur */
    .actions-dropdown .btn-ghost {
        justify-content: flex-start;
        padding: 10px 14px;
        width: 100%;
        border-radius: 6px;
        white-space: nowrap;
        border: none;
    }

    .actions-dropdown .btn-ghost:hover {
        background: var(--bg-muted, #f1f5f9);
    }
}