/* === DARK MODE COMMUN — pages organisationsch.php et fiche-organisation.php ===
   Règles identiques précédemment dupliquées dans les deux fichiers via des <style> inline.
   Les overrides spécifiques à chaque page (carte plein écran, onglets, etc.) restent
   dans le <style> inline de la page concernée. */

/* Conteneur principal */
.dark .min-h-screen {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%) !important;
}

/* Textes principaux */
.dark h1, .dark h2, .dark h3, .dark h4, .dark h5 {
    color: #f9fafb !important;
}

.dark .text-gray-900 {
    color: #f9fafb !important;
}

.dark .text-gray-800 {
    color: #e5e7eb !important;
}

.dark .text-gray-700 {
    color: #d1d5db !important;
}

.dark .text-gray-600 {
    color: #d1d5db !important;
}

.dark .text-gray-500 {
    color: #9ca3af !important;
}

.dark .text-gray-400 {
    color: #6b7280 !important;
}

/* Backgrounds */
.dark .bg-white {
    background-color: #1f2937 !important;
}

.dark .bg-gray-50 {
    background-color: #111827 !important;
}

.dark .bg-gray-100 {
    background-color: #374151 !important;
}

.dark .bg-gray-200 {
    background-color: #4b5563 !important;
}

/* Bordures */
.dark .border-gray-200 {
    border-color: #374151 !important;
}

.dark .border-gray-300 {
    border-color: #4b5563 !important;
}

.dark .border {
    border-color: #4b5563 !important;
}

/* Ombres */
.dark .shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3) !important;
}

.dark .shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2) !important;
}

.dark .shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3) !important;
}

/* Hover states */
.dark .hover\:bg-gray-100:hover {
    background-color: #374151 !important;
}

.dark .hover\:bg-gray-50:hover {
    background-color: #374151 !important;
}

/* Badges - garder les couleurs mais adapter le contraste */
.dark .bg-green-100 {
    background-color: #065f46 !important;
}

.dark .bg-blue-100 {
    background-color: #1e3a8a !important;
}

.dark .text-blue-800 {
    color: #bfdbfe !important;
}

.dark .bg-purple-100 {
    background-color: #581c87 !important;
}

/* Carte Leaflet */
.dark .leaflet-popup-content-wrapper {
    background: #1f2937 !important;
    color: #f9fafb !important;
}

.dark .leaflet-popup-tip {
    background: #1f2937 !important;
}

.dark .leaflet-control {
    background: #374151 !important;
    border-color: #4b5563 !important;
}

.dark .leaflet-control a {
    background: #374151 !important;
    color: #f9fafb !important;
}

.dark .leaflet-control a:hover {
    background: #4b5563 !important;
}

/* Modals */
.dark .fixed.inset-0 > div {
    background-color: #1f2937 !important;
}

.dark .bg-black\/50 {
    background-color: rgba(0, 0, 0, 0.7) !important;
}

/* Dividers */
.dark .divide-gray-200 > * {
    border-color: #374151 !important;
}

.dark hr {
    border-color: #374151 !important;
}

/* Cards avec image de fond */
.dark .bg-cover,
.dark .bg-center {
    filter: brightness(0.85);
}

/* Tables si présentes */
.dark table {
    background-color: #1f2937 !important;
}

.dark th {
    background-color: #374151 !important;
    color: #f9fafb !important;
}

.dark tr:hover {
    background-color: #374151 !important;
}

/* Améliorer les contrastes sur les gradients */
.dark .text-white {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Transitions fluides */
.dark * {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
