/* Augmenter la taille de la police pour tous les éléments de la navbar */
.navbar {
    font-size: 1.2rem; /* Exemple : 1.2 fois la taille par défaut */

    color: black !important;
    background: linear-gradient(to bottom, #cafcca 0%, #65a898 100%) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Cibler spécifiquement les liens dans la navbar */
.navbar-nav .nav-link {
    font-size: 1.2rem;

    color: black !important;
}

/* Cibler le titre ou la marque (brand) dans la navbar */
.navbar-brand {
    font-size: 1.2rem; /* Exemple : 1.5 fois la taille par défaut */

    color: white !important;
}
/* Style de l'icône du toggler */
/* Style du bouton toggler */
.navbar-toggler {
    padding: 0.5rem 0.75rem; /* Ajuste le padding pour un meilleur rendu */
}

/* Style de l'icône du toggler */
.navbar-toggler-icon {
    width: 3rem; /* 3x la taille par défaut */
    height: 3rem; /* 3x la taille par défaut */
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='white' stroke-width='3' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}
/* Taille de la police pour la navbar sur écrans sm et plus grands */
@media (max-width: 480px) {
    .navbar {
        font-size: 3rem !important; /* 3x la taille par défaut */
    }

    /* Cibler spécifiquement les liens et le brand */
    .navbar-nav .nav-link,
    .navbar-brand {
        font-size: 3rem !important;
    }
}
/* Sur les écrans < 576px (mobile) */
@media (max-width: 575.98px) {
    .navbar .form-control {
        width: 100px;
        font-size: 2rem;
        padding: 0.2rem 0.4rem;
    }
    .navbar .btn {
        padding: 0.2rem 0.4rem;
    }
}

/* Style de la zone de drop */


/* Style du bouton Parcourir */
.file-input {
    display: none;
}

.btn-outline-primary {
    color: #65a898;
    border-color: #65a898;
}

.btn-outline-primary:hover {
    background-color: #65a898;
    border-color: #65a898;
    color: white;
}


.btn.btn-sm .icon {
    display: inline-block;
    vertical-align: middle;
    margin: 0;
}

.btn.btn-sm {
    padding: 0.375rem 0.75rem;
    transition: all 0.2s ease;
}

.btn.btn-sm:hover {
    transform: scale(1.15);
}

.btn-outline-primary:hover {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-outline-info:hover {
    background-color: #0dcaf0;
    border-color: #0dcaf0;
}

.drop-zone {
    border: 1px dashed #65a898 !important;
    border-radius: 0.375rem;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: rgba(202, 252, 202, 0.1);
    min-height: 200px;
}

.drop-zone:hover {
    background-color: rgba(202, 252, 202, 0.2);
    border-color: #65a898 !important;
}

.drop-zone.dragover {
    background-color: rgba(202, 252, 202, 0.3);
    border-color: #65a898 !important;
    border-style: solid !important;
}

.drop-zone-icon {
    width: 48px !important;
    height: 48px !important;
    color: #65a898;
    margin-bottom: 1rem;
}

.drop-zone-title {
    color: #65a898;
    font-weight: 600;
}
.fichiers-table {
    font-size: 0.95rem;
    margin-bottom: 0;
}

.fichiers-table thead {
    background-color: #f8f9fa;
}

.fichiers-table th,
.fichiers-table td {
    padding: 0.75rem;
    vertical-align: middle;
    white-space: normal;
    word-break: break-word;
}


@media (min-width: 950px) {
    .fichiers-table th:nth-child(1),
    .fichiers-table td:nth-child(1) {
        min-width: 140px;
    }

    .fichiers-table th:nth-child(2),
    .fichiers-table td:nth-child(2) {
        min-width: 150px;
    }

    .fichiers-table th:nth-child(3),
    .fichiers-table td:nth-child(3) {
        min-width: 80px;
    }

    .fichiers-table th:nth-child(4),
    .fichiers-table td:nth-child(4) {
        min-width: 100px;
    }

    .fichiers-table th:nth-child(5),
    .fichiers-table td:nth-child(5) {
        min-width: 80px;
    }
}

/* Petits écrans - Réduction des espacements */
@media (max-width: 576px) {
    .fichiers-table {
        font-size: 0.85rem;
    }

    .fichiers-table th,
    .fichiers-table td {
        padding: 0.5rem;
        display: block;
        text-align: left;
        border: none;
        position: relative;
        padding-left: 0;
    }

    .fichiers-table th {
        display: none;
    }

    .fichiers-table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #dee2e6;
        border-radius: 0.375rem;
        overflow: hidden;
    }

    .fichiers-table tbody tr td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.75rem;
        font-weight: 600;
        color: #666;
        background-color: #f8f9fa;
        padding: 0.5rem;
        margin-bottom: 0.25rem;
        border-bottom: 1px solid #dee2e6;
        text-align: left;
    }


    .fichiers-table tbody tr td:last-child {
        white-space: normal;
        padding-left: 0;
    }

    .btn.btn-sm {
        padding: 0.25rem 0.5rem;
        margin: 0 2px;
    }
}

/* Écrans SM (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .fichiers-table {
        font-size: 0.9rem;
    }

    .fichiers-table th,
    .fichiers-table td {
        padding: 0.5rem 0.35rem;
    }
}
.btn.btn-sm .icon {
    display: inline-block;
    vertical-align: middle;
    margin: 0;
}

.btn.btn-sm {
    padding: 0.375rem 0.75rem;
    transition: all 0.2s ease;
}

.btn.btn-sm:hover {
    transform: scale(1.15);
}

.btn-outline-primary:hover {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-outline-info:hover {
    background-color: #0dcaf0;
    border-color: #0dcaf0;
}
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

/* Style des cartes de résultats */
.result-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.result-card p {
    margin: 0 0 8px 0;
    font-size: 14px;
    line-height: 1.4;
}

.category {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Adaptation pour mobile */
@media (max-width: 600px) {
    .results-grid {
        grid-template-columns: 1fr;
    }
}
/* Style de base pour le menu principal */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 0.25rem;
    padding: 0.5rem 0;
    min-width: 220px;
    z-index: 1000;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    margin: 0;
}

/* Style pour les éléments du menu */
.dropdown-menu li {
    position: relative;
    padding: 0.25rem 1rem;
    white-space: nowrap;
}

/* Style pour les sous-menus */
.dropdown-submenu {
    position: relative;
}

/* Positionnement des sous-menus */
.dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: 0;
    margin-left: 0;
    border-radius: 0 0.25rem 0.25rem 0;
    display: none;
    position: relative;
    min-width: 220px;
    z-index: 1001;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Afficher le sous-menu uniquement au survol de son parent */
.dropdown-submenu:hover > .dropdown-menu {
    display: block;
}

/* Ajustement pour les écrans étroits */
@media (max-width: 768px) {
    /* Le conteneur parent doit capturer le survol */
    .nav-item.dropdown {
        position: static;
    }

    .nav-item.dropdown:hover .dropdown-menu {
        display: block;
        position: fixed; /* Utiliser fixed pour éviter les problèmes de positionnement */
        top: auto;
        left: auto;
        right: 0;
        width: 220px;
    }

    /* Sous-menus sur écrans étroits */
    .dropdown-submenu:hover > .dropdown-menu {
        display: block;
        position: fixed;
        left: auto;
        right: 220px; /* Positionne le sous-menu à gauche du menu parent */
        top: 0;
    }
}

/* ===== MODIFICATIONS SESSION 20/07 ===== */

/* Styles pour les dropdowns imbriqués */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-toggle::after {
    display: inline-block;
    margin-left: 0.255em;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
    transform: rotate(-90deg);
    float: right;
}

/* Styles COMMUNS pour tous les dropdowns */
.dropdown-menu {
    font-size: 0.95rem !important;
}

/* Menus de niveau 0 (catégories principales) - GRADIENT VERT */
.nav-item.dropdown > .dropdown-menu {
    background: linear-gradient(to bottom, rgba(202, 252, 202, 0.95) 0%, rgba(101, 168, 152, 0.95) 100%) !important;
    border: 1px solid #65a898 !important;
}

/* Positionnement du sous-menu vers la droite - CACHÉ PAR DÉFAUT */
.dropdown-submenu > .dropdown-menu {
    top: 0 !important;
    left: 100% !important;
    margin-top: -0.5rem !important;
    margin-left: 0.1rem !important;
    border-radius: 0.375rem;
    display: none !important;
    background: linear-gradient(to bottom, rgba(202, 252, 202, 0.95) 0%, rgba(101, 168, 152, 0.95) 100%) !important;
    border: 1px solid #65a898 !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

/* Affichage seulement quand développé */
.dropdown-submenu > .dropdown-toggle[aria-expanded="true"] ~ .dropdown-menu {
    display: block !important;
}

/* Ne pas afficher au survol si fermé */
.dropdown-submenu > .dropdown-toggle[aria-expanded="false"]:hover ~ .dropdown-menu {
    display: none !important;
}

.dropdown-submenu > a:hover {
    background-color: rgba(202, 252, 202, 0.4) !important;
    color: black !important;
}

/* Classe dropend pour Bootstrap 5 */
.niv-1 {
    left: calc(100%) !important;
    margin-left: 0 !important;
}

.dropend .dropdown-menu {
    top: 0 !important;
    left: 100% !important;
    margin-top: 0 !important;
    margin-left: 0 !important;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    color: black !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(202, 252, 202, 0.3) !important;
    color: black !important;
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: #65a898 !important;
    color: white !important;
}

/* Force gradient vert sur TOUS les sous-menus */
.navbar .dropdown-submenu > .dropdown-menu {
    background: linear-gradient(to bottom, rgba(202, 252, 202, 0.95) 0%, rgba(101, 168, 152, 0.95) 100%) !important;
    border: 1px solid #65a898 !important;
}

/* Force gradient vert aussi sur les dropdowns niveau 1 (imbriqués) */
.dropdown-menu > .nav-item.dropdown > .dropdown-menu {
    background: linear-gradient(to bottom, rgba(202, 252, 202, 0.95) 0%, rgba(101, 168, 152, 0.95) 100%) !important;
    border: 1px solid #65a898 !important;
}

/* Réduction taille font navbar mobile */
@media (max-width: 480px) {
    .navbar {
        font-size: 0.9rem !important;
    }

    .navbar-nav .nav-link,
    .navbar-brand {
        font-size: 0.9rem !important;
    }
}

/* Affichage ligne vide "Aucun fichier" sur mobile */
@media (max-width: 576px) {
    .fichiers-table tbody tr.empty-row {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #dee2e6;
        border-radius: 0.375rem;
    }

    .fichiers-table tbody tr.empty-row td {
        display: block;
        padding: 1.5rem !important;
        padding-left: 1.5rem !important;
        text-align: center !important;
        width: 100% !important;
        border: none !important;
    }

    .fichiers-table tbody tr.empty-row td::before {
        display: none !important;
    }

    /* Labels au-dessus des valeurs */
    .fichiers-table th,
    .fichiers-table td {
        padding-left: 0 !important;
    }

    .fichiers-table tbody tr td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.75rem;
        font-weight: 600;
        color: #666;
        background-color: #f8f9fa;
        padding: 0.5rem;
        margin-bottom: 0.25rem;
        border-bottom: 1px solid #dee2e6;
        text-align: left;
        position: static !important;
        width: auto !important;
        border-right: none !important;
    }

    .fichiers-table tbody tr td:last-child {
        white-space: normal;
        padding-left: 0 !important;
    }
}
