/*
  * Template Name: Medilab
  * Template URL: https://bootstrapmade.com/medilab-free-medical-bootstrap-theme/
  * Updated: Aug 07 2024 with Bootstrap v5.3.3
  * Author: BootstrapMade.com
  * License: https://bootstrapmade.com/license/
  ======================================================== 
  */
   /* Solution la plus efficace pour afficher les images vignettes et agrandi de glightbox a la meme taille */
    .glightbox-container .gslide-image img {
        max-width: 90vw;
        max-height: 90vh;
        width: auto !important;
        height: auto !important;
        object-fit: contain;
    }

    .glightbox img {
        width: 300px;
        height: 200px;
        object-fit: cover;
        transition: all 0.3s ease;
    }

    /* Contrôler la taille maximale dans la lightbox */
    .glightbox-container .gslide-image img {
        max-width: 80vw; /* 80% de la largeur de l'écran */
        max-height: 80vh; /* 80% de la hauteur de l'écran */
        object-fit: contain; /* affiche toute l'image sans recadrage */
    }

    .gslide {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .gslide-image {
        width: 800px !important;
        height: 600px !important;
        max-width: 90vw !important;
        max-height: 80vh !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: #000 !important;
    }

    .gslide-image img {
        max-width: 100% !important;
        max-height: 100% !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
    }
    
    /* Solution pour formater la taille d'un fichier en Octet, KO,MO,GO appropié */
    .size-card {
            transition: all 0.3s ease;
        }
        .size-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 25px rgba(0,0,0,0.1);
        }
        .unit-badge {
            font-size: 0.75rem;
            padding: 0.125rem 0.5rem;
        }

/****** pour formulaire de creation avec les nexts des formulaires ********/
/* Animations */
.fade-enter {
    opacity: 0;
}

.fade-enter-active {
    opacity: 1;
    transition: opacity 300ms ease-in;
}

/* Cards hover effects */
.association-card {
    transition: transform 0.3s, box-shadow 0.3s;
}

.association-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Badges personnalisés */
.badge-sector {
    background-color: #e9ecef;
    color: #495057;
    padding: 0.5em 0.8em;
    border-radius: 20px;
    font-weight: 500;
}

/* Timeline pour les activités */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -34px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #007bff;
    border: 2px solid white;
}

/*******pour l'image de couverture page entite - organisme et autre ***/
.object-fit-cover {
    object-fit: cover;
}

/********* Style des tableaux personnalisés********/
.containerss {
            max-width: 1200px;
            margin: 0 auto;
}

.containerss h1 {
    color: black;
    text-align: center;
    margin-bottom: 10px;
    /*text-shadow: 2px 2px 4px rgba(0,0,0,0.3);*/
    font-weight: bold;
    font-size: 20px;
}


/* ===== TABLEAU 1: Style moderne avec dégradé ===== */
.table-modern {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.table-modern thead tr {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-modern th {
    padding: 15px 10px;
    font-weight: 600;
    font-size: 14px;
    border: none;
}

.table-modern td {
    padding: 15px 10px;
    border-bottom: 1px solid #e0e0e0;
    color: #333;
}

.table-modern tbody tr:hover {
    background: #f8f9fa;
    transition: background 0.3s;
}

.table-modern tbody tr:last-child td {
    border-bottom: none;
}

/* ===== TABLEAU 2: Style zébré avec bordures colorées ===== */
.table-striped {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    margin-bottom: 30px;
}

.table-striped th {
    background: #2c3e50;
    color: white;
    padding: 15px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
    border: 1px solid #34495e;
}

.table-striped td {
    padding: 12px 15px;
    border: 1px solid #bdc3c7;
}

.table-striped tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.table-striped tbody tr:nth-child(odd) {
    background-color: white;
}

.table-striped tbody tr:hover {
    background-color: #e8f4f8;
    transition: background 0.3s;
}

/* ===== TABLEAU 3: Style carte avec bordures arrondies ===== */
.table-card {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    margin-bottom: 30px;
}

.table-card th {
    background: #e74c3c;
    color: white;
    padding: 15px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.table-card th:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.table-card th:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.table-card td {
    background: white;
    padding: 15px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.table-card td:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.table-card td:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* ===== TABLEAU 4: Style minimaliste avec bordures subtiles ===== */
.table-minimal {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.table-minimal th {
    background: #f8f9fa;
    color: #2c3e50;
    padding: 15px 20px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #3498db;
}

.table-minimal td {
    padding: 12px 20px;
    border-bottom: 1px solid #ecf0f1;
    color: #34495e;
}

.table-minimal tbody tr:hover td {
    background-color: #f0f7ff;
    border-bottom: 1px solid #3498db;
}

/* ===== TABLEAU 5: Style sombre (dark mode) ===== */
.table-dark {
    width: 100%;
    border-collapse: collapse;
    background: #1a1a2e;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    margin-bottom: 30px;
}

.table-dark th {
    background: #16213e;
    color: #e94560;
    padding: 15px 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid #e94560;
}

.table-dark td {
    padding: 12px 20px;
    color: #fff;
    border-bottom: 1px solid #0f3460;
}

.table-dark tbody tr:hover {
    background: #16213e;
    transition: background 0.3s;
}

.table-dark tbody tr:last-child td {
    border-bottom: none;
}

/* ===== TABLEAU 6: Style coloré par colonne ===== */
.table-colors {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    margin-bottom: 30px;
}

.table-colors th {
    padding: 15px 20px;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
}

.table-colors th:nth-child(1) { background: #4CAF50; }
.table-colors th:nth-child(2) { background: #2196F3; }
.table-colors th:nth-child(3) { background: #9C27B0; }
.table-colors th:nth-child(4) { background: #FF9800; }

.table-colors td {
    padding: 12px 20px;
    border: 1px solid #ddd;
}

.table-colors td:nth-child(1) { background: rgba(76, 175, 80, 0.1); }
.table-colors td:nth-child(2) { background: rgba(33, 150, 243, 0.1); }
.table-colors td:nth-child(3) { background: rgba(156, 39, 176, 0.1); }
.table-colors td:nth-child(4) { background: rgba(255, 152, 0, 0.1); }

/* Badges et éléments décoratifs */
.badge-success {
    background: #4CAF50;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.badge-warning {
    background: #ff9800;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.badge-danger {
    background: #f44336;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.badge-info {
    background: #2196F3;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

 /********* Pour le formulaire de creation avec bouton avant et bouton arriere********/
 
.hover-card {
    transition: transform 0.2s, box-shadow 0.2s;
}
.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15) !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

.pagination-custom .page-link {
    border-radius: 5px;
    margin: 0 3px;
    color: #007bff;
    border: none;
    background: #f8f9fa;
}
.pagination-custom .page-link:hover {
    background: #007bff;
    color: white;
}
.pagination-custom .page-item.active .page-link {
    background: #007bff;
    color: white;
    border-color: #007bff;
}
.pagination-custom .page-item.disabled .page-link {
    background: #f8f9fa;
    color: #adb5bd;
}

/* Conteneur et affichage des elements graphiques */
.card {
            margin-bottom: 20px;
            box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
            border: solid 1px #4CAF50;
}
.card-header {
    background-color: #fff;
    border-bottom: 2px solid #e9ecef;
    font-weight: bold;
}
.kpi-card {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}
.chart-container {
    position: relative;
    height: 300px;
    margin: 20px 0;
}
    
    
/* Aspect pour le formulaire modale qui s'affiche au dessus */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}
.modal-content {
    position: relative;
    width: 500px;
    margin: 50px auto;
    background: white;
    border-radius: 8px;
    padding: 20px;
}
.close-btn {
    float: right;
    border: none;
    background: none;
    font-size: 24px;
    cursor: pointer;
}


/* Permettre de scroller les informations dans un div raccourcie comme pour la liste des associations, agripreneurs, ..*/
 .scrollable-div {
            max-height: 800px;        /* Hauteur maximale du conteneur */
            overflow-y: auto;         /* Active le scroll vertical si nécessaire */
            border: 1px solid #ccc;
            padding: 10px;
            background-color: #f9f9f9;
            font-family: Arial, sans-serif;
        }

        .scrollable-div::-webkit-scrollbar {
            width: 8px;
        }
        .scrollable-div::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 4px;
        }
        .scrollable-div::-webkit-scrollbar-thumb {
            background: #888;
            border-radius: 4px;
        }
        .scrollable-div::-webkit-scrollbar-thumb:hover {
            background: #555;
        }

  /* style pour l'entete et les logos de l'annuaire.*/    
 .boxlogocontainer {
    display: flex;
    gap: 10px; /* Espace entre les divs */
    /*padding: 5px;*/
    align-items: center;
  }

  .box {
    color: white;
    padding: 5px;
    text-align: center;
    border-radius: 8px;
    /*border: solid 2px #002664;*/
  }
  
  /* Largeurs personnalisables */
  .box1 { width: 13%; }
  .box2 { width: 74%; }
  .box3 { width: 13%; }
  .box4 { width: 100%; }
  
  /* Pour tester le responsive */
  @media (max-width: 768px) {
    .container {
      flex-direction: column; /* Passe en colonne sur mobile */
    }
    .box1, .box2, .box3 {
      width: auto;
    }
  }

  /* a utiliser avec leaflet194 ..*/
  .leaflet-popup-content {
        min-width: 250px;
        max-width: 300px;
    }
    .popup-title {
        font-weight: bold;
        font-size: 14px;
        margin-bottom: 5px;
        color: #2c7da0;
    }
    .popup-detail {
        font-size: 12px;
        margin: 3px 0;
    }
    .popup-badge {
        display: inline-block;
        padding: 2px 6px;
        border-radius: 4px;
        font-size: 10px;
        margin-top: 5px;
    }
    .badge-association { background: #0d6efd; color: white; }
    .badge-groupement { background: #198754; color: white; }
    .badge-cooperative { background: #0dcaf0; color: black; }
    .badge-union { background: #ffc107; color: black; }
    .badge-bio { background: #198754; color: white; }

    .object-fit-cover {object-fit: cover;}


/* style pour l'info bulle d'information.*/   
    .info-tip {
        position: relative;
        display: inline-block;
        cursor: help;
    }

    .info-tip .tooltip-text {
        visibility: hidden;
        width: 200px;
        background-color: #333;
        color: #fff;
        text-align: center;
        border-radius: 6px;
        padding: 8px 12px;
        position: absolute;
        z-index: 1;
        bottom: 125%;
        left: 50%;
        transform: translateX(-50%);
        opacity: 0;
        transition: opacity 0.3s;
        font-size: 14px;
        font-weight: normal;
    }

    .info-tip .tooltip-text::after {
        content: "";
        position: absolute;
        top: 100%;
        left: 50%;
        margin-left: -5px;
        border-width: 5px;
        border-style: solid;
        border-color: #333 transparent transparent transparent;
    }

    .info-tip:hover .tooltip-text {
        visibility: visible;
        opacity: 1;
    }

