/* =========================================================
   Modale de confirmation de déconnexion (/admin)
   ========================================================= */
.admin-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.admin-confirm-modal.open { display: flex; }
.admin-confirm-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(2px);
}
.admin-confirm-modal-panel {
    position: relative;
    background: #fff;
    border-radius: 0.75rem;
    max-width: 420px;
    width: 100%;
    padding: 1.75rem;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.35);
}
.admin-confirm-modal-panel h3 { margin: 0 0 0.5rem; font-size: 1.15rem; font-weight: 800; color: #0f172a; }
.admin-confirm-modal-panel p { margin: 0; color: #4b5563; font-size: 0.92rem; }
.admin-confirm-modal-actions { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.5rem; }
.admin-confirm-btn-secondary,
.admin-confirm-btn-primary {
    padding: 0.6rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    border: 2px solid transparent;
}
.admin-confirm-btn-secondary { background: #f3f4f6; color: #374151; }
.admin-confirm-btn-secondary:hover { background: #e5e7eb; }
.admin-confirm-btn-primary { background: #d7191f; color: #fff; }
.admin-confirm-btn-primary:hover { background: #8f2f35; }
@media (max-width: 480px) {
    .admin-confirm-modal-actions { flex-direction: column-reverse; }
    .admin-confirm-btn-secondary, .admin-confirm-btn-primary { width: 100%; }
}

/* =========================================================
   Page de connexion admin (/admin/login)
   — panneau promo + formulaire, sur le même principe que
   /espace-client/connexion, mais en styles autonomes pour ne
   jamais entrer en collision avec les balises génériques
   (label, input, h1…) du CSS Filament.
   ========================================================= */
.fi-simple-layout {
    background: radial-gradient(circle at 15% 20%, rgba(175, 60, 67, 0.35), transparent 45%),
                radial-gradient(circle at 85% 85%, rgba(175, 60, 67, 0.25), transparent 40%),
                linear-gradient(160deg, #0f172a 0%, #1e293b 55%, #0f172a 100%);
    min-height: 100vh;
}
.fi-simple-main {
    padding: 0 !important;
    overflow: hidden;
    background: #fff !important;
    border-top: 4px solid #d7191f !important;
    border-radius: 0 !important;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.55) !important;
}

.admin-login-shell {
    max-width: none;
    width: 100%;
    display: flex;
    background: #fff;
}
.admin-login-promo {
    flex: 0 0 36%;
    background: linear-gradient(150deg, #2a1b57, #3f2a7d 70%);
    color: #fff;
    padding: 3rem 2.25rem;
    display: flex;
    align-items: center;
}
.admin-login-promo-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    margin-bottom: 1.25rem;
}
.admin-login-promo-icon { width: 28px; height: 28px; color: #fff; }
.admin-login-promo h2 { color: #fff; font-size: 1.5rem; font-weight: 800; margin: 0 0 0.75rem; }
.admin-login-promo p { color: rgba(255, 255, 255, 0.85); margin: 0 0 1.75rem; }
.admin-login-benefits { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1rem; }
.admin-login-benefits li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
}
.admin-login-benefit-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    padding: 0.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}
.admin-login-form-panel { flex: 1 1 0; min-width: 0; padding: 3rem 2.75rem; display: flex; align-items: center; }
.admin-login-form-card { width: 100%; }
.admin-login-form-card h1 { margin: 0 0 0.4rem; font-size: 1.5rem; font-weight: 800; color: #0f172a; }
.admin-login-subtitle { color: #6b7280; margin: 0 0 1.75rem; }
@media (max-width: 860px) {
    .admin-login-shell { flex-direction: column; }
    .admin-login-promo { padding: 2.25rem 1.75rem; }
    .admin-login-form-panel { padding: 2rem 1.5rem; }
}

/* Le panneau de connexion admin est toujours clair : on neutralise les
   variantes "dark:" de Filament qui rendraient le texte illisible si le
   mode sombre du panneau est actif. */
.admin-login-shell .fi-fo-field-wrp-label,
.admin-login-shell .fi-fo-field-wrp-label span {
    color: #1e293b !important;
}
.admin-login-shell .fi-input-wrp {
    background: #fff !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: 0.5rem !important;
}
.admin-login-shell .fi-input-wrp-prefix,
.admin-login-shell .fi-input-wrp-suffix {
    border-color: #e5e7eb !important;
    background: #f9fafb !important;
}
.admin-login-shell .fi-input {
    color: #1e293b !important;
    background: transparent !important;
}
.admin-login-shell .fi-input::placeholder {
    color: #9ca3af !important;
}
.admin-login-shell .fi-input-wrp-icon {
    color: #9ca3af !important;
}
.admin-login-shell .fi-checkbox-input {
    background: #fff !important;
}

/* Espacement resserré pour le menu latéral de l'admin (/admin) */
.fi-sidebar-nav-groups {
    gap: 0.2rem !important;
}
.fi-sidebar-group {
    gap: 0.15rem !important;
    margin-bottom: 0 !important;
}
.fi-sidebar-group-button {
    padding-top: 0.3rem !important;
    padding-bottom: 0.3rem !important;
}
.fi-sidebar-group-label {
    font-size: 0.875rem !important;
    line-height: 1.15rem !important;
}
.fi-sidebar-group-items {
    gap: 0.1rem !important;
    padding-left: 0.75rem !important;
}
.fi-sidebar-item {
    margin-bottom: 0 !important;
}
.fi-sidebar-item-button {
    padding-top: 0.3rem !important;
    padding-bottom: 0.3rem !important;
}
/* Les sous-menus (éléments) doivent être plus petits que les menus principaux (groupes) */
.fi-sidebar-item-label {
    font-size: 0.8rem !important;
}
.fi-sidebar-item-icon {
    width: 1rem !important;
    height: 1rem !important;
}
.fi-sidebar-nav {
    gap: 0.2rem !important;
}
/* Icônes rouges pour les menus principaux (groupes de navigation) */
.fi-sidebar-group-button {
    position: relative;
    padding-left: 1.9rem !important;
}
.fi-sidebar-group-button::before {
    content: "";
    position: absolute;
    left: 0.15rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.15rem;
    height: 1.15rem;
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
}
[data-group-label="Organisation"] .fi-sidebar-group-button::before, [data-group-label="LivesPartners"] .fi-sidebar-group-button::before, [data-group-label="Vie interne"] .fi-sidebar-group-button::before {
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='%23dc2626' aria-hidden='true' data-slot='icon'> <path stroke-linecap='round' stroke-linejoin='round' d='M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3.75h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Z'/> </svg>");
}
[data-group-label="Hébergement"] .fi-sidebar-group-button::before {
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='%23dc2626' aria-hidden='true' data-slot='icon'> <path stroke-linecap='round' stroke-linejoin='round' d='M5.25 14.25h13.5m-13.5 0a3 3 0 0 1-3-3m3 3a3 3 0 1 0 0 6h13.5a3 3 0 1 0 0-6m-16.5-3a3 3 0 0 1 3-3h13.5a3 3 0 0 1 3 3m-19.5 0a4.5 4.5 0 0 1 .9-2.7L5.737 5.1a3.375 3.375 0 0 1 2.7-1.35h7.126c1.062 0 2.062.5 2.7 1.35l2.587 3.45a4.5 4.5 0 0 1 .9 2.7m0 0a3 3 0 0 1-3 3m0 3h.008v.008h-.008v-.008Zm0-6h.008v.008h-.008v-.008Zm-3 6h.008v.008h-.008v-.008Zm0-6h.008v.008h-.008v-.008Z'/> </svg>");
}
[data-group-label="Contenu du site"] .fi-sidebar-group-button::before, [data-group-label="Contenu"] .fi-sidebar-group-button::before, [data-group-label="Webmaster"] .fi-sidebar-group-button::before {
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='%23dc2626' aria-hidden='true' data-slot='icon'> <path stroke-linecap='round' stroke-linejoin='round' d='M12 7.5h1.5m-1.5 3h1.5m-7.5 3h7.5m-7.5 3h7.5m3-9h3.375c.621 0 1.125.504 1.125 1.125V18a2.25 2.25 0 0 1-2.25 2.25M16.5 7.5V18a2.25 2.25 0 0 0 2.25 2.25M16.5 7.5V4.875c0-.621-.504-1.125-1.125-1.125H4.125C3.504 3.75 3 4.254 3 4.875V18a2.25 2.25 0 0 0 2.25 2.25h13.5M6 7.5h3v3H6v-3Z'/> </svg>");
}
[data-group-label="Gestion sessions formations"] .fi-sidebar-group-button::before, [data-group-label="Gestion des formations"] .fi-sidebar-group-button::before {
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='%23dc2626' aria-hidden='true' data-slot='icon'> <path stroke-linecap='round' stroke-linejoin='round' d='M4.26 10.147a60.438 60.438 0 0 0-.491 6.347A48.62 48.62 0 0 1 12 20.904a48.62 48.62 0 0 1 8.232-4.41 60.46 60.46 0 0 0-.491-6.347m-15.482 0a50.636 50.636 0 0 0-2.658-.813A59.906 59.906 0 0 1 12 3.493a59.903 59.903 0 0 1 10.399 5.84c-.896.248-1.783.52-2.658.814m-15.482 0A50.717 50.717 0 0 1 12 13.489a50.702 50.702 0 0 1 7.74-3.342M6.75 15a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm0 0v-3.675A55.378 55.378 0 0 1 12 8.443m-7.007 11.55A5.981 5.981 0 0 0 6.75 15.75v-1.5'/> </svg>");
}
[data-group-label="Gestion eLearning"] .fi-sidebar-group-button::before {
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='%23dc2626' aria-hidden='true' data-slot='icon'> <path stroke-linecap='round' stroke-linejoin='round' d='M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z'/> <path stroke-linecap='round' stroke-linejoin='round' d='M15.91 11.672a.375.375 0 0 1 0 .656l-5.603 3.113a.375.375 0 0 1-.557-.328V8.887c0-.286.307-.466.557-.327l5.603 3.112Z'/> </svg>");
}
[data-group-label="Comptabilité"] .fi-sidebar-group-button::before, [data-group-label="Activité"] .fi-sidebar-group-button::before {
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='%23dc2626' aria-hidden='true' data-slot='icon'> <path stroke-linecap='round' stroke-linejoin='round' d='M15.75 15.75V18m-7.5-6.75h.008v.008H8.25v-.008Zm0 2.25h.008v.008H8.25V13.5Zm0 2.25h.008v.008H8.25v-.008Zm0 2.25h.008v.008H8.25V18Zm2.498-6.75h.007v.008h-.007v-.008Zm0 2.25h.007v.008h-.007V13.5Zm0 2.25h.007v.008h-.007v-.008Zm0 2.25h.007v.008h-.007V18Zm2.504-6.75h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V13.5Zm0 2.25h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V18Zm2.498-6.75h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V13.5ZM8.25 6h7.5v2.25h-7.5V6ZM12 2.25c-1.892 0-3.758.11-5.593.322C5.307 2.7 4.5 3.65 4.5 4.757V19.5a2.25 2.25 0 0 0 2.25 2.25h10.5a2.25 2.25 0 0 0 2.25-2.25V4.757c0-1.108-.806-2.057-1.907-2.185A48.507 48.507 0 0 0 12 2.25Z'/> </svg>");
}
[data-group-label="Gestion des produits"] .fi-sidebar-group-button::before {
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='%23dc2626' aria-hidden='true' data-slot='icon'> <path stroke-linecap='round' stroke-linejoin='round' d='M15.75 10.5V6a3.75 3.75 0 1 0-7.5 0v4.5m11.356-1.993 1.263 12c.07.665-.45 1.243-1.119 1.243H4.25a1.125 1.125 0 0 1-1.12-1.243l1.264-12A1.125 1.125 0 0 1 5.513 7.5h12.974c.576 0 1.059.435 1.119 1.007ZM8.625 10.5a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm7.5 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z'/> </svg>");
}
[data-group-label="Sécurité et Système"] .fi-sidebar-group-button::before {
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='%23dc2626' aria-hidden='true' data-slot='icon'> <path stroke-linecap='round' stroke-linejoin='round' d='M15 19.128a9.38 9.38 0 0 0 2.625.372 9.337 9.337 0 0 0 4.121-.952 4.125 4.125 0 0 0-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 0 1 8.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0 1 11.964-3.07M12 6.375a3.375 3.375 0 1 1-6.75 0 3.375 3.375 0 0 1 6.75 0Zm8.25 2.25a2.625 2.625 0 1 1-5.25 0 2.625 2.625 0 0 1 5.25 0Z'/> </svg>");
}
[data-group-label="Gestion des ebooks"] .fi-sidebar-group-button::before {
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.5' stroke='%23dc2626' aria-hidden='true' data-slot='icon'> <path stroke-linecap='round' stroke-linejoin='round' d='M12 6.042A8.967 8.967 0 0 0 6 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 0 1 6 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 0 1 6-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0 0 18 18a8.967 8.967 0 0 0-6 2.292m0-14.25v14.25'/> </svg>");
}

/* Boutons d'action des lignes de tableau : espacement entre les icônes. */
.fi-ta-actions { gap: 0.6rem; }

/* Titres « Encaissement » et « Décaissement » affichés dans le groupe Comptabilité. */
.fi-sidebar-item:has(> a[href*="/admin/commandes"])::before,
.fi-sidebar-item:has(> a[href*="/admin/decaissement"])::before,
.fi-sidebar-item:has(> a[href*="/admin/membres-equipe"])::before {
    content: "Encaissement";
    display: block;
    padding: 0.85rem 0.75rem 0.3rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #dc2626;
    pointer-events: none;
}
.fi-sidebar-item:has(> a[href*="/admin/decaissement"])::before {
    content: "Décaissement";
}
.fi-sidebar-item:has(> a[href*="/admin/membres-equipe"])::before {
    content: "Membres de l'équipe";
}
