.cke_notifications_area {
    display: none;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #75b6ff 100%, #ffffff 0%);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}


:root {
    --header-bg: #00a2e2;
    --header-text: #FFFFFF;
    --header-hover: #00b7ff;
    --header-active: #005761;
    --header-shadow: 0 2px 15px rgba(0, 109, 119, 0.15);
}
.hero-title {
    padding: 0;              /* laisser le contrôle du padding au .hero-inner */
    margin: 0;
    background: transparent; /* si besoin, déplace le background sur .hero-inner */
}
.hero-title {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 10px;
    background-image:
        /* couche de teinte subtile pour assombrir progressivement le bas‑droite */
        linear-gradient(to bottom right,
            rgba(255,255,255,0.0) 0%,
            rgba(0,162,226,0.04) 45%,
            rgba(3,37,65,0.08) 100%),
        /* couche de base claire */
        linear-gradient(to bottom right,
            #ffffff 0%,
            #eaf6ff 40%,
            #d1eeff 100%);
    background-repeat: no-repeat;
    background-size: cover;
    color: inherit;
    transition: background 180ms ease, box-shadow 180ms ease;
    box-shadow: 0 8px 24px rgba(3,37,65,0.08);
}

html.dark-mode .hero-title {
    background-image: none !important;
    background-color: linear-gradient(180deg, rgba(18,18,18,0.96) 0%, rgba(12,12,12,0.98) 100%) !important;
    box-shadow: 0 8px 24px rgba(255,255,255,0.02) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
}

html.high-contrast-mode .hero-title {
    background-image: none !important;
    background-color: white !important;
    box-shadow: none !important;
    border: 1px solid #dee2e6 !important;
}

.hero-title h1 {
    margin: 0;
    background: linear-gradient(90deg, #183b6b, #0077c8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 0.4px rgba(0,0,0,0.12);
}

html.dark-mode .hero-title h1 {
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: #ffffff !important;
    color: #ffffff !important;
    -webkit-text-stroke: none !important;
    text-shadow: none !important;
}

html.high-contrast-mode .hero-title h1 {
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: #000000 !important;
    color: #000000 !important;
    -webkit-text-stroke: none !important;
    text-shadow: none !important;
}

/* Header principal */
header {
    background: var(--header-bg);
    box-shadow: var(--header-shadow);
    position: sticky;
    top: 0;
    z-index: 1030;
    min-height: 70px;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

/* Navbar personnalisée */
.navbar {
    padding: 0.5rem 2rem;
    min-height: 70px;
}

.container-fluid {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.logo {
    height: 100%;

    width: 100%;

    object-fit: cover;
}

.logoContainer {
    max-width: 70px;
    min-width: 70px;
    transition: var(--transition);
}

.logoContainer:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* Navigation principale */
.navbar-nav .btn {
    color: var(--header-text);
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    transition: var(--transition);
    margin: 0 0.3rem;
    border: 1px solid transparent;
}

.navbar-nav .btn:hover {
    background-color: var(--header-hover);
    color: #000000;
}

/* Style des icônes */

.user {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* Menu utilisateur */
.dropdown-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--header-text);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: var(--transition);
}

.dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Menu dropdown */
.dropdown-menu {
    background: #FFFFFF;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-top: 0.5rem;
    padding: 0.5rem;
}

.dropdown-item {
    color: var(--header-bg);
    border-radius: 6px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Styles spécifiques pour les boutons dans le dropdown */
.dropdown-item.btn-danger {
    color: white;
    background-color: var(--danger-color);
}

.dropdown-item.btn-success {
    color: white;
    background-color: var(--success-color);
}

.dropdown-item.btn-primary {
    color: white;
    background-color: var(--header-bg);
}

/* Effets de hover pour les boutons du dropdown */
.dropdown-item:hover {
    background: var(--header-hover);
    color: #000000;
}

.dropdown-item.btn-danger:hover {
    background-color: #c82333;
    color: white;
}

.dropdown-item.btn-success:hover {
    background-color: #218838;
    color: white;
}

.dropdown-item.btn-primary:hover {
    background-color: var(--header-active);
    color: white;
}

/* Accessibilité améliorée */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

/* Focus visible */
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--header-text);
    outline-offset: 2px;
}

/* Support contraste élevé */
@media (forced-colors: active) {

    .dropdown-toggle,
    .btn {
        border: 2px solid currentColor;
    }
}

/* User icon/name : blanc par défaut, deviennent noirs au hover (swap des 2 icônes) */
.icon-light.user {
    display: none;
}

/* icône noire (masquée par défaut) */
.icon-dark.user {
    display: inline-block;
}

/* icône blanche affichée par défaut */

.user-name {
    color: #fff;
    transition: color .18s ease-in-out;
}

/* Au hover : montrer l'icône claire (noire) et masquer l'icône blanche */
.dropdown-toggle:hover .icon-light.user {
    display: inline-block;
}

.dropdown-toggle:hover .icon-dark.user {
    display: none;
}

.dropdown-toggle:hover .user-name {
    color: #000;
}

/* Fin Header principal */

/* Footer */

footer {
  background: var(--header-bg);
  padding: 10px;
  text-align: center;
  width: 100%;
  margin-top: auto;
  height: 50px;
}

/* Fin Footer */

.border-radius{
    border-radius: 12px;
}

/* Breadcrumb moderne et élégant */
.modern-breadcrumb {
    /* Dégradé : plus clair en haut‑gauche → un peu plus sombre en bas‑droite */
    background-image:
        /* couche de teinte subtile pour assombrir progressivement le bas‑droite */
        linear-gradient(to bottom right,
            rgba(255,255,255,0.0) 0%,
            rgba(0,162,226,0.04) 45%,
            rgba(3,37,65,0.08) 100%),
        /* couche de base claire */
        linear-gradient(to bottom right,
            #ffffff 0%,
            #eaf6ff 40%,
            #d1eeff 100%);
    background-repeat: no-repeat;
    background-size: cover;
    color: inherit;
    transition: background 180ms ease, box-shadow 180ms ease;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    margin: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    font-size: 0.9rem;
}

.modern-breadcrumb:hover {
    /* renforce légèrement le contraste au survol */
    background-image:
        linear-gradient(to bottom right,
            rgba(255,255,255,0.0) 0%,
            rgba(0,162,226,0.06) 45%,
            rgba(3,37,65,0.12) 100%),
        linear-gradient(to bottom right,
            #ffffff 0%,
            #e6f4ff 40%,
            #c9eaff 100%);
    box-shadow: 0 12px 30px rgba(11,35,60,0.09);
}

/* Dark mode pour le breadcrumb */
html.dark-mode .modern-breadcrumb {
    /* fond sombre lisible */
    background-image: none !important;
    background-color: linear-gradient(180deg, rgba(18,18,18,0.96) 0%, rgba(12,12,12,0.98) 100%) !important;
}

/* Contraste élevé pour le breadcrumb */
html.high-contrast-mode .modern-breadcrumb {
    /* fond sombre lisible */
    background-image: none !important;
    background-color: white !important;
}

html.high-contrast-mode .modern-breadcrumb:hover {
    box-shadow: none !important;
}

.modern-breadcrumb .breadcrumb-item {
    display: flex;
    align-items: center;
}

.modern-breadcrumb .breadcrumb-item+.breadcrumb-item::before {
    content: "›";
    color: #6c757d;
    font-weight: bold;
    font-size: 1.1rem;
    margin: 0 0.75rem;
    display: flex;
    align-items: center;
}

.modern-breadcrumb .breadcrumb-link {
    color: var(--header-bg, #007bff);
    text-decoration: none;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.modern-breadcrumb .breadcrumb-link:hover {
    background-color: rgba(0, 123, 255, 0.1);
    color: var(--header-hover, #0056b3);
    transform: translateY(-1px);
    text-decoration: none;
}

.modern-breadcrumb .breadcrumb-item.active {
    color: #495057;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.modern-breadcrumb .breadcrumb-item.active i {
    color: var(--header-bg, #007bff);
}

/* Responsive pour mobile */
@media (max-width: 576px) {
    .modern-breadcrumb {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .modern-breadcrumb .breadcrumb-item+.breadcrumb-item::before {
        margin: 0 0.5rem;
    }

    .modern-breadcrumb .breadcrumb-link {
        padding: 0.2rem 0.3rem;
    }
}

/* Animation d'apparition */
.modern-breadcrumb {
    animation: fadeInDown 0.3s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accessibilité - focus visible */
.modern-breadcrumb .breadcrumb-link:focus-visible {
    outline: 2px solid var(--header-bg, #007bff);
    outline-offset: 2px;
}

/* Fin breadcrumb */

/* Styles élégants pour le formulaire de situation */
.error {
    color: red;
}

.bg-cards {
    /* Dégradé : plus clair en haut‑gauche → un peu plus sombre en bas‑droite */
    background-image:
        /* couche de teinte subtile pour assombrir progressivement le bas‑droite */
        linear-gradient(to bottom right,
            rgba(255,255,255,0.0) 0%,
            rgba(0,162,226,0.04) 45%,
            rgba(3,37,65,0.08) 100%),
        /* couche de base claire */
        linear-gradient(to bottom right,
            #ffffff 0%,
            #eaf6ff 40%,
            #d1eeff 100%);
    background-repeat: no-repeat;
    background-size: cover;
    color: inherit;
    transition: background 180ms ease, box-shadow 180ms ease;
}

.bg-cards:hover {
    /* renforce légèrement le contraste au survol */
    background-image:
        linear-gradient(to bottom right,
            rgba(255,255,255,0.0) 0%,
            rgba(0,162,226,0.06) 45%,
            rgba(3,37,65,0.12) 100%),
        linear-gradient(to bottom right,
            #ffffff 0%,
            #e6f4ff 40%,
            #c9eaff 100%);
    box-shadow: 0 12px 30px rgba(11,35,60,0.09);
}

.users-selection-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 0.5rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5);
}

.user-checkbox-item {
    background: white;
    border-radius: 8px;
    padding: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    border: 1px solid #e9ecef;
}

.user-checkbox-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: var(--header-bg);
}

.user-checkbox-item .form-check {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.user-checkbox-item .form-check-input {
    width: 1.2em;
    height: 1.2em;
    margin: 0;
    flex-shrink: 0;
}

.user-checkbox-item .form-check-label {
    margin: 0;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    line-height: 1.3;
}

/* Style pour les cartes du formulaire */
.card-header h6 {
    font-size: 0.95rem;
    font-weight: 600;
}

/* Animation pour les inputs */
.form-control:focus {
    border-color: var(--header-bg);
    box-shadow: 0 0 0 0.2rem rgba(0, 162, 226, 0.25);
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .users-selection-container {
        grid-template-columns: 1fr;
        max-height: 250px;
    }

    .card-header .btn {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Amélioration de l'accessibilité */
.user-checkbox-item .form-check-input:focus {
    outline: 2px solid var(--header-bg);
    outline-offset: 2px;
}

/* Fin des styles pour les formulaires */

/* Situation Index - tableau */

/* Table transparente et lisible */
.table.table-transparent {
    background-color: transparent !important;
    color: inherit;
    border-collapse: separate; /* évite certaines bordures indésirables */
}

/* Enlever les fonds de cellules/thead */
.table.table-transparent thead,
.table.table-transparent thead th,
.table.table-transparent tbody td,
.table.table-transparent tfoot td {
    background-color: transparent !important;
    background-image: none !important;
    border-color: rgba(0,0,0,0.06) !important; /* subtile, ajuste selon thème */
}

/* Neutraliser le hover Bootstrap par défaut */
.table.table-transparent.table-hover tbody tr {
    transition: all 0.2s ease !important;
    border-radius: 8px !important;
    background-color: transparent !important;
}

/* Border radius au hover des lignes de table - Override complet */
.table.table-transparent.table-hover tbody tr:hover {
    background-color: rgba(0,0,0,0.03) !important;
    background-image: none !important;
    border-radius: 8px !important;
    transform: translateY(-1px) !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
}

/* Assurer que les cellules suivent le border-radius de la ligne */
.table.table-transparent.table-hover tbody tr:hover td {
    background-color: transparent !important;
    background-image: none !important;
}

.table.table-transparent.table-hover tbody tr:hover td:first-child {
    border-top-left-radius: 8px !important;
    border-bottom-left-radius: 8px !important;
}

.table.table-transparent.table-hover tbody tr:hover td:last-child {
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
}

/* Mode sombre - adaptation du hover */
html.dark-mode .table.table-transparent.table-hover tbody tr:hover {
    background-color: rgba(255,255,255,0.04) !important;
    box-shadow: 0 2px 8px rgba(255,255,255,0.02) !important;
}

html.dark-mode .table.table-transparent.table-hover tbody tr:hover td {
    background-color: transparent !important;
}

/* Fin Situation Index - tableau */

/* Indicateur de statut utilisateur */
.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.status-indicator.online {
    background-color: #10b981;
    animation: pulse-online 2s infinite;
}

.status-indicator.offline {
    background-color: #6b7280;
}

@keyframes pulse-online {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Alignement vertical propre pour le header du widget utilisateurs */
#online-users-widget .card-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    line-height: 1;
}

#online-users-widget .card-header h3 .fa-users-circle {
    font-size: 1.05rem;
    line-height: 1;
}

#online-users-widget .card-header h3 .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.0rem;
    height: 1.6rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    font-size: 0.85rem;
    margin-left: 0.25rem;
    line-height: 1;
    vertical-align: middle;
}
/* Fin Indicateur de statut utilisateur */

/* === Styles pour la zone d'upload élégante === */
.upload-zone {
    border-color: #dee2e6 !important;
    transition: all 0.3s ease;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.upload-zone:hover {
    border-color: #007bff !important;
    background-color: #f8f9ff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15);
}

.upload-zone.dragover {
    border-color: #28a745 !important;
    background-color: #f8fff9 !important;
    transform: scale(1.02);
}

.upload-icon {
    transition: all 0.3s ease;
}

.upload-zone:hover .upload-icon {
    transform: scale(1.1);
    color: #007bff !important;
}

.upload-zone.dragover .upload-icon {
    color: #28a745 !important;
    animation: bounce 0.6s ease-in-out;
}

@keyframes bounce {
    0%, 20%, 60%, 100% { transform: translateY(0) scale(1.1); }
    40% { transform: translateY(-10px) scale(1.2); }
    80% { transform: translateY(-5px) scale(1.15); }
}

/* Gradient pour les headers */
.bg-gradient-danger {
    background: linear-gradient(135deg, #dc3545, #c82333) !important;
}

/* Preview des fichiers sélectionnés */
.selected-files-preview {
    margin-top: 1rem;
}

.file-preview-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: between;
    transition: all 0.2s ease;
}

.file-preview-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.file-preview-icon {
    width: 40px;
    text-align: center;
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.file-preview-info {
    flex: 1;
}

.file-preview-name {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.25rem;
}

.file-preview-size {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Responsive */
@media (max-width: 768px) {
    .upload-zone {
        min-height: 150px;
        padding: 2rem !important;
    }

    .upload-icon .fa-3x {
        font-size: 2rem !important;
    }

    .d-flex.gap-4 {
        flex-wrap: wrap;
        gap: 0.5rem !important;
    }
}
/* Fin styles upload */

/* Tooltip personnalisé pour les documents */

.document-tooltip-custom .tooltip-inner {
    text-align: left !important;
    max-width: 350px !important;
    padding: 10px !important;
}

/* Fin Tooltip personnalisé pour les documents */

/* Styles pour les en-têtes de tri */

/* Uniformiser l'alignement de tous les en-têtes */
.table thead th {
    cursor: pointer;
    user-select: none;
    vertical-align: middle;
    padding: 0.75rem 0.5rem;
    height: 3rem;
    font-weight: 600; /* Mettre tous les en-têtes en gras */
}

.table thead th:last-child {
    cursor: default;
}

/* Style uniforme pour les contenus d'en-têtes */
.table thead th > div,
.table thead th > a {
    display: flex !important;
    align-items: center;
    min-height: 1.5rem;
    padding: 0.25rem 0;
    transition: all 0.2s ease;
    font-weight: 600; /* Assurer que tout est en gras */
    gap: 0.5rem; /* IMPORTANT : Espacement uniforme entre icône et texte */
}

/* Harmoniser la couleur des en-têtes non-triables */
.table thead th > div {
    color: inherit;
    font-weight: 600; /* Force le gras pour les non-triables */
}

/* Améliorer l'espacement des icônes */
.table thead th i.fas,
.table thead th i.fa {
    width: 1rem;
    text-align: center;
    flex-shrink: 0;
    margin-right: 0.5rem; /* Espacement constant après l'icône */
}

/* Style pour les en-têtes non-cliquables */
.table thead th > div:not(.clickable) {
    cursor: default;
}

/* Assurer l'espacement pour les icônes de tri */
.table thead th a .fas.fa-sort,
.table thead th a .fas.fa-sort-up,
.table thead th a .fas.fa-sort-down {
    margin-left: 0.5rem; /* Espacement avant l'icône de tri */
    margin-right: 0; /* Pas d'espacement après */
}

/* Hover effect uniforme */
.table thead th a {
    color: inherit !important;
    text-decoration: none !important;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    margin: -0.25rem -0.5rem;
    transition: all 0.2s ease;
}

.table thead th a:hover {
    background-color: rgba(13, 110, 253, 0.1);
    color: inherit !important;
}

.table thead th a:hover .text-muted {
    color: #0d6efd !important;
}
/* Fin styles pour les en-têtes de tri */

/* Styles pour les tabeaux AJAX de tri */

/* Hover effect pour les lignes cliquables */
.clickable-row:hover {
    background-color: rgba(13, 110, 253, 0.05);
    transform: translateY(-1px);
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Animation pour la transition du tri */
#etablissements-table {
    transition: opacity 0.3s ease;
}

/* SUPPRIMER le fond du thead - le rendre transparent */
.table thead th {
    background-color: transparent !important;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* Supprimer aussi le fond des lignes du tbody */
.table tbody tr {
    background-color: transparent !important;
}

/* Supprimer le fond de la classe table-light */
.table thead.table-light th {
    background-color: transparent !important;
}

/* Améliorer l'overlay */
#loading-overlay {
    backdrop-filter: blur(2px);
}

/* Assurer que toutes les cellules restent transparentes */
.table td,
.table th {
    background-color: transparent !important;
}

/* Garder seulement l'effet hover */
.table tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05) !important;
}
