/* ===== VARIABLES CSS MODERNES ===== */
:root {
  --primary-color: #10b981;
  --primary-dark: #059669;
  --secondary-color: #3b82f6;
  --accent-color: #f59e0b;
  --success-color: #22c55e;
  --warning-color: #f97316;
  --error-color: #ef4444;
  
  /* Couleurs adaptatives jour/nuit */
  --bg-primary: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  --bg-secondary: rgba(255, 255, 255, 0.95);
  --bg-glass: rgba(255, 255, 255, 0.8);
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --border-color: rgba(229, 231, 235, 0.8);
  --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-large: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Variables pour le mode sombre */
  --dark-bg-primary: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --dark-bg-secondary: rgba(15, 23, 42, 0.95);
  --dark-bg-glass: rgba(15, 23, 42, 0.8);
  --dark-text-primary: #f8fafc;
  --dark-text-secondary: #cbd5e1;
  --dark-border-color: rgba(51, 65, 85, 0.8);
}

/* Mode sombre appliqué */
[data-theme="dark"] {
  --bg-primary: var(--dark-bg-primary);
  --bg-secondary: var(--dark-bg-secondary);
  --bg-glass: var(--dark-bg-glass);
  --text-primary: var(--dark-text-primary);
  --text-secondary: var(--dark-text-secondary);
  --border-color: var(--dark-border-color);
}

/* ===== RESET ET BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== HEADER MODERNISÉ AVEC LOGOS ===== */
header {
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-light);
  position: relative;
  z-index: 1000;
  transition: all 0.3s ease;
}

/* Container pour logos et titre */
.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Styles pour les logos dans l'en-tête */
.header-logo {
  width: 150px;
  height: 48px;
  border-radius: 12px;
  box-shadow: var(--shadow-light);
  transition: transform 0.3s ease;
  object-fit: cover;
}

.header-logo:hover {
  transform: scale(1.1) rotate(5deg);
}

/* Logo central avec icône */
.logo-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.logo-icon:hover {
  transform: scale(1.1) rotate(5deg);
}

/* Logo et titre avec animation */
.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.1) rotate(5deg);
}

.logo img {
  max-width: 80%;
  max-height: 80%;
  border-radius: 8px;
}

h1 {
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.2); }
}

/* Contrôles header */
.header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Boutons modernes avec glassmorphism */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 12px;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-medium);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-large);
}

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
  transform: translateY(-1px);
}

/* Toggle mode sombre */
.theme-toggle {
  width: 56px;
  height: 28px;
  background: var(--border-color);
  border-radius: 14px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s ease;
}

.theme-toggle.dark {
  background: var(--primary-color);
}

.theme-toggle::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-light);
}

.theme-toggle.dark::before {
  transform: translateX(28px);
}

/* ===== LAYOUT PRINCIPAL ===== */
#main {
  display: flex;
  height: calc(100vh - 80px);
  position: relative;
}

/* ===== SIDEBAR MODERNISÉE ===== */
#sidebar {
  width: 400px; /* ✅ Réduit de 550px à 400px */
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  border-right: 1px solid var(--border-color);
  padding: 1.5rem;
  overflow-y: auto;
  overflow-x: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(0);
  box-shadow: var(--shadow-medium);
}

/* Scrollbar personnalisée */
#sidebar::-webkit-scrollbar {
  width: 5px;
}

#sidebar::-webkit-scrollbar-track {
  background: transparent;
}

#sidebar::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

#sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* Toggle sidebar pour mobile */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 50%;
  left: 20px;
  z-index: 1001;
  background: var(--primary-color);
  color: white;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-large);
  transition: transform 0.3s ease;
}

.sidebar-toggle:hover {
  transform: scale(1.1);
}

/* Sections de la sidebar */
.sidebar-section {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
  animation: slideInLeft 0.6s ease-out;
}

.sidebar-section:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Statistiques animées */
.stats-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-glass);
  padding: 1rem;
  border-radius: 12px;
  text-align: center;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  display: block;
  animation: countUp 2s ease-out;
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Liste des jardins */
.garden-list {
  list-style: none;
}

.garden-item {
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background: var(--bg-glass);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.garden-item:hover {
  background: var(--primary-color);
  color: white;
  transform: translateX(8px);
  box-shadow: var(--shadow-medium);
}

/* Filtres avancés */
.filter-section {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.filter-chip {
  padding: 0.5rem 1rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.filter-chip.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.filter-chip::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.filter-chip:hover::before {
  width: 100px;
  height: 100px;
  top: calc(50% - 50px);
  left: calc(50% - 50px);
}

/* ===== CARTE PRINCIPALE ===== */
#map {
  flex: 1;
  height: 100%;
  position: relative;
  background: linear-gradient(45deg, #f0f9ff, #ecfdf5);
}

/* Loading overlay */
.map-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: opacity 0.5s ease;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== TIMELINE SLIDER ===== */
.timeline-container {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  padding: 1rem 2rem;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-large);
  z-index: 1000;
  animation: slideInUp 0.8s ease-out;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(100px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.timeline-slider {
  width: 300px;
  margin: 0 1rem;
}

.timeline-year {
  font-weight: 600;
  color: var(--primary-color);
  margin: 0 1rem;
  font-size: 1.125rem;
}

/* ===== LÉGENDE MODERNISÉE ===== */
.legend {
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  padding: 1.5rem;
  border-radius: 16px;
  box-shadow: var(--shadow-large);
  border: 1px solid var(--border-color);
  font-size: 0.875rem;
  line-height: 1.6;
  max-width: 320px;
  animation: fadeInScale 0.8s ease-out;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.legend h4 {
  margin: 0 0 1rem 0;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  transition: transform 0.2s ease;
}

.legend-item:hover {
  transform: translateX(4px);
}

.legend-symbol {
  width: 20px;
  height: 12px;
  margin-right: 12px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.legend-symbol:hover {
  transform: scale(1.2);
}

.legend-symbol.circle {
  border-radius: 50%;
  width: 12px;
  height: 12px;
}

.legend-symbol.line {
  height: 3px;
  border-radius: 0;
}

.legend-section {
  margin-bottom: 1.5rem;
}

.legend-section:last-child {
  margin-bottom: 0;
}

/* ===== MODAL TUTORIEL MODERNISÉ ===== */
#tutorial {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 2000;
  animation: fadeIn 0.5s ease-out;
}

.tutorial-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 600px;
  background: var(--bg-secondary);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: var(--shadow-large);
  border: 1px solid var(--border-color);
  animation: slideInScale 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInScale {
  from {
    opacity: 0;
    transform: translate(-50%, -60%) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.tutorial-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.tutorial-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.tutorial-step {
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
}

.tutorial-body {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.tutorial-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tutorial-progress {
  display: flex;
  gap: 0.5rem;
}

.progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-color);
  transition: all 0.3s ease;
}

.progress-dot.active {
  background: var(--primary-color);
  transform: scale(1.5);
}

/* ===== GRAPHIQUES MODERNISÉS ===== */
.chart-container {
  margin: 1rem 0;
  padding: 1rem;
  background: var(--bg-glass);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== NOTIFICATIONS TOAST ===== */
.toast-container {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 3000;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin-bottom: 0.5rem;
  box-shadow: var(--shadow-large);
  backdrop-filter: blur(20px);
  animation: slideInRight 0.5s ease-out;
  transition: all 0.3s ease;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast.success {
  border-left: 4px solid var(--success-color);
}

.toast.error {
  border-left: 4px solid var(--error-color);
}

.toast.warning {
  border-left: 4px solid var(--warning-color);
}

/* ===== STYLES POUR LES MODALS ===== */

/* Overlay modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: fadeIn 0.3s ease-out;
}

/* Contenu du modal */
.modal-content {
  background: var(--bg-secondary);
  border-radius: 20px;
  box-shadow: var(--shadow-large);
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideInScale 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInScale {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* En-tête du modal */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-glass);
  border-radius: 20px 20px 0 0;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: var(--error-color);
  color: white;
  transform: scale(1.1);
}

/* Corps du modal */
.modal-body {
  padding: 2rem;
}

/* ===== STYLES POUR LE FORMULAIRE DE CONTACT ===== */

.contact-intro {
  background: var(--bg-glass);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.contact-intro p {
  margin-bottom: 1rem;
  color: var(--text-primary);
  line-height: 1.6;
}

.contact-intro ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
  color: var(--text-secondary);
}

.contact-intro li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

/* Groupes de formulaire */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-glass);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
  background: var(--bg-secondary);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

/* Checkbox personnalisé */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
  position: absolute;
  opacity: 0;
}

.checkmark {
  width: 20px;
  height: 20px;
  background: var(--bg-glass);
  border: 2px solid var(--border-color);
  border-radius: 4px;
  position: relative;
  transition: all 0.3s ease;
  flex-shrink: 0;
  margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
}

/* Actions du formulaire */
.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

/* ===== STYLES POUR LA RECHERCHE ===== */

.search-container {
  width: 100%;
}

.search-input-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.search-input-group input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-glass);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.search-input-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.search-btn {
  padding: 0.75rem 1rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

/* Résultats de recherche */
.search-results {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-glass);
}

.search-result-item {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: var(--primary-color);
  color: white;
  transform: translateX(4px);
}

.result-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.result-name {
  font-weight: 500;
  font-size: 0.875rem;
}

.result-type {
  font-size: 0.75rem;
  opacity: 0.8;
}

.search-hint,
.no-results {
  padding: 2rem;
  text-align: center;
  color: var(--text-secondary);
  font-style: italic;
}

/* Filtres de recherche */
.search-filters h4 {
  margin: 0 0 1rem 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.filter-options {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.filter-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-color);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
  header {
    padding: 1rem;
  }

  h1 {
    font-size: 1.25rem;
  }

  .header-controls {
    gap: 0.5rem;
  }

  .logo-container {
    gap: 0.5rem;
  }

  .header-logo {
    width: 36px;
    height: 36px;
  }

  .logo-icon {
    width: 36px;
    height: 36px;
    font-size: 1.25rem;
  }

  #sidebar {
    position: fixed;
    top: 80px;
    left: 0;
    height: calc(100vh - 80px);
    z-index: 1001;
    transform: translateX(-100%);
  }

  #sidebar.open {
    transform: translateX(0);
  }

  .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #map {
    width: 100%;
  }

  .timeline-container {
    width: 90%;
    padding: 0.75rem 1rem;
  }

  .timeline-slider {
    width: 200px;
  }
}

/* ===== RESPONSIVE POUR LES MODALS ===== */

@media (max-width: 768px) {
  .modal-overlay {
    padding: 1rem;
  }
  
  .modal-content {
    max-width: 100%;
    margin: 0;
  }
  
  .modal-header,
  .modal-body {
    padding: 1rem 1.5rem;
  }
  
  .modal-header h3 {
    font-size: 1.125rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .form-actions {
    flex-direction: column-reverse;
  }
  
  .form-actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  .search-input-group {
    flex-direction: column;
  }
  
  .search-btn {
    width: 100%;
  }
  
  .filter-options {
    flex-direction: column;
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  header {
    padding: 0.75rem;
  }

  .logo-container {
    gap: 0.25rem;
  }

  .header-logo {
    width: 32px;
    height: 32px;
  }

  .logo-icon {
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  h1 {
    font-size: 1rem;
  }

  .header-controls {
    gap: 0.25rem;
  }
  
  .btn {
    padding: 0.5rem;
    font-size: 0.75rem;
  }
  
  .btn i {
    margin: 0;
  }
  
  .btn span {
    display: none;
  }
  
  .timeline-container {
    padding: 0.5rem 1rem;
  }
  
  .tutorial-content {
    box-sizing: border-box !important; /*width: 95%; padding: 1.5rem;*/
    
  }

  .modal-overlay {
    padding: 0.5rem;
  }
  
  .modal-header,
  .modal-body {
    padding: 1rem;
  }
  
  .contact-intro {
    padding: 1rem;
  }
  
  .search-results {
    max-height: 200px;
  }
  
  .checkbox-label {
    font-size: 0.8rem;
  }
}

/* ===== EFFETS PARTICULES ===== */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--primary-color);
  border-radius: 50%;
  opacity: 0.3;
  animation: float 15s infinite linear;
}

@keyframes float {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.3;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

/* ===== STYLES SUPPLÉMENTAIRES POUR LES ÉLÉMENTS DYNAMIQUES ===== */

/* Styles pour les clusters de markers */
.custom-cluster {
  background: linear-gradient(135deg, #10b981, #059669);
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
  transition: transform 0.3s ease;
}

.custom-cluster:hover {
  transform: scale(1.1);
}

.cluster-icon {
  font-size: 14px;
  font-weight: 600;
}

/* Styles pour les popups personnalisées */
.custom-popup .leaflet-popup-content {
  margin: 0;
  padding: 0;
}

.custom-popup .leaflet-popup-content-wrapper {
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  border: 1px solid var(--border-color);
}

.historical-popup .leaflet-popup-content-wrapper {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
}

/* Marker de géolocalisation */
.location-marker {
  background: #ef4444;
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  animation: pulse 2s infinite;
}

/* Animations pour les éléments de liste */
.garden-item {
  animation: slideInLeft 0.5s ease-out backwards;
}

/* ===== UTILITAIRES ===== */
.fade-in {
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.slide-up {
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.glow {
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

/* Animations supplémentaires */
.search-result-item {
  animation: slideInLeft 0.3s ease-out;
}

.search-result-item:nth-child(odd) {
  animation-delay: 0.1s;
}

.search-result-item:nth-child(even) {
  animation-delay: 0.2s;
}

.form-group {
  animation: slideInUp 0.4s ease-out;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
.form-group:nth-child(5) { animation-delay: 0.5s; }

/* Effet de survol pour les éléments interactifs */
.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
  border-color: var(--primary-color);
}

.checkbox-label:hover .checkmark {
  border-color: var(--primary-color);
  transform: scale(1.05);
}

/* États de validation */
.form-group input:invalid:not(:focus):not(:placeholder-shown) {
  border-color: var(--error-color);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group input:valid:not(:focus):not(:placeholder-shown) {
  border-color: var(--success-color);
}