/* Variables globales */
:root {
  /* Couleurs principales */
  --main-orange: #ff8c00;
  --main-purple: #4b0082;
  --main-black: #202020;
  --light-gray: #f9f9f9;
  --medium-gray: #ddd;
  --dark-gray: #666;
  --accent-green: #4caf50;

  /* Couleurs fonctionnelles - Mode clair (défaut) */
  --background-color: var(--light-gray);
  --text-color: var(--main-black);
  --border-color: var(--dark-gray);
  --input-background: white;
  --input-color: var(--main-black);
  --chart-grid-color: #4caf50;
  --header-color: var(--main-orange);
  --tab-background: var(--main-purple);
  --tab-color: var(--light-gray);
  --tab-active-background: var(--main-orange);
  --button-color: var(--light-gray);
  --table-header-background: var(--main-purple);
  --table-header-color: var(--light-gray);
}

/* Mode sombre - Override des variables */
body.dark-mode {
  --background-color: var(--main-black);
  --text-color: var(--light-gray);
  --border-color: var(--medium-gray);
  --input-background: var(--dark-gray);
  --input-color: var(--light-gray);
  --chart-grid-color: rgba(100, 100, 100, 0.3);
  --header-color: var(--main-orange);
  --tab-background: var(--main-purple);
  --tab-color: var(--light-gray);
  --tab-active-background: var(--main-orange);
  --button-color: var(--main-black);
  --table-header-background: var(--main-orange);
  --table-header-color: var(--main-black);
}

/* Styles de base */
body {
  font-family: Arial, sans-serif;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
  background-color: var(--background-color);
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s;
}

h1,
h2,
h3 {
  color: var(--header-color);
}

p,
li {
  line-height: 1.6;
}

/* Styles de lien */
.content-link {
  color: var(--main-orange);
  text-decoration: none;
  border-bottom: 1px dotted var(--main-orange);
  transition: border-bottom 0.3s;
}

.content-link:hover {
  border-bottom: 1px solid var(--main-orange);
}

/* Styles de base pour les conteneurs */
.info-section,
.weather-info,
.recommendations {
  margin-bottom: 30px;
}

/* Messages et erreurs */
.error-message,
.error {
  color: #ff4136;
  font-weight: bold;
}

.success-message {
  background-color: #dff0d8;
  color: #3c763d;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.no-match-message {
  color: #ff851b;
  font-weight: bold;
}

.diagnosis-disclaimer,
.select-message,
.forecast-note {
  font-style: italic;
  color: var(--dark-gray);
}

/* Styles de base pour tous les boutons */
.button,
button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--accent-green);
  color: var(--button-color);
  border: none;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  font-size: 16px;
  transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
}

/* Styles pour les boutons arrondis */
.button:not(.tab),
button:not(.tab),
input[type="button"],
input[type="submit"],
input[type="reset"] {
  border-radius: 4px;
}

/* États des boutons */
.button:hover,
button:hover,
input[type="button"]:hover,
input[type="submit"]:hover,
input[type="reset"]:hover {
  background-color: #45a049;
}

.button:active,
button:active,
input[type="button"]:active,
input[type="submit"]:active,
input[type="reset"]:active {
  background-color: #3e8e41;
}

.button:focus,
button:focus,
input[type="button"]:focus,
input[type="submit"]:focus,
input[type="reset"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.5);
}

/* Boutons désactivés */
.button:disabled,
button:disabled,
input[type="button"]:disabled,
input[type="submit"]:disabled,
input[type="reset"]:disabled,
body.dark-mode .button:disabled,
body.dark-mode button:disabled,
body.dark-mode input[type="button"]:disabled,
body.dark-mode input[type="submit"]:disabled,
body.dark-mode input[type="reset"]:disabled {
  background-color: var(--medium-gray);
  color: var(--dark-gray);
  cursor: not-allowed;
}

/* Mode Toggle Button */
.mode-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  padding: 0.75rem;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  background-color: var(--main-purple);
  color: var(--light-gray);
}

.mode-toggle:hover {
  background-color: var(--main-orange);
  transform: scale(1.1);
}

.mode-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--main-orange);
}

/* Styles des formulaires */
input,
select {
  margin-bottom: 10px;
  width: 100%;
  max-width: 300px;
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--input-background);
  color: var(--input-color);
  box-sizing: border-box;
}

input:focus,
select:focus {
  outline: 2px solid var(--main-orange);
  outline-offset: 2px;
}

input::placeholder {
  color: var(--text-color);
  opacity: 0.7;
}

/* Selecteur plante dans information*/

.search-bar {
  width: 100%;
  max-width: 500px;
  padding: 10px;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--input-background);
  color: var(--input-color);
  font-size: 1rem;
}

/* Style pour les groupes dans le select */
optgroup {
  font-weight: bold;
  color: var(--text-color);
}

/* Style pour les options */
option {
  padding: 8px;
  color: var(--text-color);
}

/* Groupes de formulaires */
.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: bold;
  color: var(--text-color);
  margin-bottom: 0.25rem;
}

.form-row {
  display: flex;
  gap: 1rem;
  width: 100%;
}

/* Styles spécifiques pour les radio et checkbox */
.radio-container {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.radio-container input[type="radio"] {
  margin-right: 8px;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-container input[type="checkbox"] {
  margin-right: 8px;
  width: auto;
}

/* Responsive design pour les formulaires */
@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
  }

  input,
  select {
    max-width: 100%;
  }

  .mode-toggle {
    top: 0.5rem;
    right: 0.5rem;
    width: 35px;
    height: 35px;
    padding: 0.5rem;
  }
}

/* Styles de base pour tous les tableaux */
.table-base,
table,
.culture-calendar,
.substrate-comparison,
.properties-comparison,
.comparison-table,
.growth-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  background-color: var(--background-color);
  color: var(--text-color);
}

/* Cellules de tableau */
.table-base th,
.table-base td,
th,
td {
  border: 1px solid var(--border-color);
  padding: 8px;
  text-align: left;
}

/* En-têtes de tableau */
.table-base th,
th {
  background-color: var(--table-header-background);
  color: var(--table-header-color);
  font-weight: bold;
}

/* Lignes alternées */
.table-base tbody tr:nth-child(even),
tbody tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.02);
}

/* Hover sur les lignes */
.table-base tbody tr:hover,
tbody tr:hover {
  background-color: rgba(75, 0, 130, 0.05);
}

@media (max-width: 768px) {
  .properties-comparison {
    font-size: 0.9rem; /* Réduit légèrement la taille du texte sur mobile */
    width: 100%;
  }

  .properties-comparison th,
  .properties-comparison td {
    padding: 6px 4px; /* Réduit le padding pour gagner de l'espace */
    word-break: keep-all; /* Empêche la coupure des mots */
    text-align: center;
  }
}

/* Mode sombre pour les tableaux */
body.dark-mode .table-base tbody tr:nth-child(even),
body.dark-mode tbody tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.02);
}

body.dark-mode .table-base tbody tr:hover,
body.dark-mode tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Conteneurs de tableau */
.table-container {
  overflow-x: auto;
  margin-top: 1rem;
}

/* Contrôles de tableau */
.table-controls {
  margin-bottom: 1rem;
}

.table-controls input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

/* Grilles de base */
.grid-base {
  display: grid;
  gap: 20px;
}

/* Grilles spécifiques */
.cultivar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.comparison-grid {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.growth-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

/* Items de grille */
.grid-item-base {
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  transition: box-shadow 0.3s;
}

.grid-item-base:hover {
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Conteneurs flexibles */
.flex-container {
  display: flex;
  gap: 20px;
}

.flex-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Structure de comparaison */
.comparison-container {
  max-width: 1200px;
  margin: 0 auto;
}

.comparison-controls {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
}

/* Styles spécifiques pour la comparaison */
.comparison-flex {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
}

.comparison-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comparison-image {
  max-height: 300px;
  object-fit: cover;
}

.plant-details {
  padding: 1rem;
  background-color: var(--background-color);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.chart-section {
  margin: 2rem 0;
}

.humidity-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
}

.chart-container {
  margin-top: 1rem;
  padding: 1rem;
  background-color: var(--background-color);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.chart-controls {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 1rem;
}

/* Responsive design */
@media (max-width: 768px) {
  .comparison-grid,
  .comparison-controls {
    flex-direction: column;
  }

  .grid-base {
    grid-template-columns: 1fr;
  }

  .comparison-controls select {
    max-width: 100%;
  }

  .comparison-flex {
    flex-direction: column;
  }

  .comparison-image {
    max-height: 200px;
  }
}

/* Adaptation des tableaux pour mobile */
#growth-tracker table,
#growth-tracker tr,
#growth-tracker td {
  display: block;
}

#growth-tracker th {
  display: none;
}

#growth-tracker td {
  position: relative;
  padding-left: 50%;
}

#growth-tracker td:before {
  content: attr(data-label);
  position: absolute;
  left: 6px;
  width: 45%;
  padding-right: 10px;
  white-space: nowrap;
  font-weight: bold;
}
c

/* Navigation par onglets - Structure de base */
/* Structure des tabs */
.tabs {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Rangées de tabs */
.tabs-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr); /* 5 colonnes égales par rangée */
  gap: 8px;
  width: 100%;
}

/* Style des tabs individuels */
.tab {
  min-width: 180px; /* Largeur minimale fixe */
  padding: 10px 20px;
  background-color: var(--tab-background);
  border: none;
  cursor: pointer;
  color: var(--tab-color);
  transition: background-color 0.3s;
  margin-bottom: 10px;
  text-align: center; /* Centre le contenu */
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px; /* Hauteur fixe */
}

.tab i {
  margin-right: 8px;
  flex-shrink: 0; /* Empêche l'icône de rétrécir */
}

.tab span {
  overflow: hidden;
  text-overflow: ellipsis; /* Ajoute des points de suspension si le texte est trop long */
}

.tab.active {
  background-color: var(--tab-active-background);
}

.tab:hover {
  background-color: #6a1b9a;
}

/* Data tabs spécifiques */
.data-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.data-tabs .tab-button {
  background-color: transparent;
  border: none;
  color: var(--text-color);
  opacity: 0.7;
  padding: 0.75rem 1.5rem;
  font-weight: bold;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
}

.data-tabs .tab-button.active {
  background-color: var(--main-purple);
  color: white;
  opacity: 1;
  border-radius: 4px;
}

.data-tabs .tab-button:hover {
  opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .tabs-row {
    grid-template-columns: repeat(1, 1fr); /* 2 colonnes sur mobile */
  }

  .tab {
    min-width: unset; /* Retire la largeur minimale sur mobile */
    width: 100%;
  }
}

/* Contenus des onglets */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Navigation de pied de page */
footer {
  margin-top: 40px;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

footer nav ul {
  list-style: none;
  padding: 0;
}

footer nav li {
  display: inline;
  margin: 0 10px;
}

footer nav a {
  color: var(--text-color);
  text-decoration: none;
}

footer nav a:hover {
  text-decoration: underline;
}

/* Styles pour le conteneur de filtres */
.filter-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 10px;
  padding: 10px;
  background-color: var(--background-color);
}

/* Style pour chaque élément de filtre */
.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
}

.filter-option input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.filter-option label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--text-color);
  cursor: pointer;
}

.filter-option .emoji {
  font-size: 1.2rem;
}

/* Version désactivée */
.filter-option.disabled {
  opacity: 0.5;
}

.filter-option.disabled label {
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
  .filter-checkboxes {
    flex-direction: column;
    gap: 10px;
  }

  .filter-option {
    width: 100%;
  }
}

/* Tooltips */
.tooltip {
  position: relative;
  display: inline-block;
  cursor: help;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 200px;
  background-color: var(--main-black);
  color: var(--light-gray);
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  opacity: 0;
  transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* Responsive design */
@media (max-width: 768px) {
  .tabs {
    flex-direction: column;
  }

  .tab {
    width: 100%;
    margin-bottom: 5px;
  }

  .tab i {
    margin-right: 0;
  }

  .tab span {
    display: none;
  }

  .data-tabs {
    overflow-x: auto;
    padding-bottom: 10px;
  }

  .data-tabs .tab-button {
    padding: 0.5rem 1rem;
    white-space: nowrap;
  }
}

/* Cartes et panneaux */
.plant-info,
#growth-stats,
.info-section,
.diagnosis-container,
.comparison-container,
.weather-info,
.cultivar-card,
.summary-item {
  background-color: var(--background-color);
  color: var(--text-color);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
  transition: box-shadow 0.3s;
}

/* Hover effects pour les cartes */
.cultivar-card:hover,
.summary-item:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Conteneur d'image de plante */
.plant-image-container {
  width: 100%;
  max-width: 600px;
  margin: 2rem auto;
  padding: 1rem;
  background-color: var(--background-color);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  box-sizing: border-box;
}

.plant-image {
  width: 100%;
  height: auto;
  border-radius: 6px;
  object-fit: cover;
  margin: 0;
  transition: transform 0.3s ease;
}

.plant-image:hover {
  transform: scale(1.02);
}

.image-caption {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-color);
  font-style: italic;
}

/* Styles pour la catégorie de symptômes */
.symptom-category {
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}

.category-header {
  /* En-tête de catégorie */
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.category-icon {
  font-size: 1.5em;
}

.category-title {
  font-size: 1.2em;
  font-weight: bold;
  color: var(--text-color);
  margin: 0;
}

.symptom-list {
  /* Liste des symptômes */
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.symptom-item {
  /* Élément de symptôme individuel */
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 0;
}

.symptom-item input[type="checkbox"] {
  margin-top: 3px;
  width: auto;
}

.symptom-item label {
  line-height: 1.4;
  cursor: pointer;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

/* Styles de base pour les étapes */
.diagnosis-step {
  display: none; /* Cache toutes les étapes par défaut */
}

.diagnosis-step.active {
  display: block; /* Affiche uniquement l'étape active */
}

/* Style pour le conteneur des étapes */
.diagnosis-steps {
  width: 100%;
}

/* Mise en page des symptômes */
.symptom-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.confidence-analysis {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
  margin: 10px 0;
}

.confidence-modifiers {
  list-style: none;
  padding-left: 0;
}

.modifier-item {
  display: inline-block;
  background-color: #e7f5ff;
  border-radius: 4px;
  padding: 4px 8px;
  margin: 2px 0;
  font-size: 0.9em;
  color: #1864ab;
}

.diagnostic-notes {
  background-color: #fff9db;
  border-radius: 8px;
  padding: 15px;
  margin: 10px 0;
}

.notes-list {
  list-style: none;
  padding-left: 0;
}

.note-item {
  display: block;
  padding: 4px 0;
  color: #664d03;
  font-size: 0.95em;
}

.confidence span {
  font-weight: normal;
  font-size: 0.9em;
}

.confidence::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: 8px;
}

/* Composants de calendrier */
.calendar-container {
  max-width: 100%;
  overflow-x: auto;
}

.calendar-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.active-month {
  width: 30px;
  height: 30px;
}

/* Légende du calendrier */
.calendar-legend {
  margin-top: 20px;
}

.legend-list {
  list-style-type: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.legend-list li {
  display: flex;
  align-items: center;
}

.legend-color {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 5px;
}

/* Couleurs d'activité */
.dormancy {
  background-color: #abb2b9;
}
.active-growth {
  background-color: #43a047;
}
.slow-growth {
  background-color: #ffa000;
}
.repotting {
  background-color: #d84315;
}
.fertilization {
  background-color: #0288d1;
}
.propagation {
  background-color: #c2185b;
}

/* Composants de progression */
.progress-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.progress-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 15px;
}

.progress {
  width: 100%;
  height: 24px;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.progress-bar {
  height: 100%;
  background-color: var(--main-purple);
  border-radius: 12px;
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: white;
  font-size: 0.9rem;
  white-space: nowrap;
  min-width: -webkit-fit-content;
  min-width: -moz-fit-content;
  min-width: fit-content;
  /* Solution de repli pour les anciens navigateurs */
  min-width: min-content;
}

/* Composant de chargement */
.weather-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
}

.spinner {
  border: 4px solid var(--background-color);
  border-top: 4px solid var(--main-orange);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Mode sombre pour les composants */
body.dark-mode .progress {
  background-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .plant-image-container {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Responsive design pour les composants */
@media (max-width: 768px) {
  .plant-image-container {
    max-width: 100%;
    padding: 0.5rem;
  }

  .symptom-category {
    flex: 1 1 100%;
  }

  .calendar-controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .active-month {
    width: 20px;
    height: 20px;
  }

  .legend-list {
    flex-direction: column;
  }

  .progress-bar {
    font-size: 0.8rem;
    padding: 0 5px;
  }
}

/* Growth Tracker */
.growth-tracker-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.growth-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.plant-selection-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
}

.plant-selection-controls select {
  min-width: 200px;
  flex-grow: 1;
  max-width: none;
}

.plant-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.growth-content {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  width: 100%;
  margin-top: 1rem;
}

/* Panneau de saisie de croissance */
.growth-input-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-panel {
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
}

/* Assistant de substrat */
#substrate-assistant {
  max-width: 100%;
  overflow-x: hidden;
}

#substrate-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.substrate-item {
  display: flex;
  align-items: center;
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 10px;
  transition: background-color 0.3s;
}

.substrate-item:hover {
  background-color: rgba(255, 140, 0, 0.1);
}

.substrate-info {
  display: flex;
  flex-direction: column;
}

.substrate-name {
  font-weight: bold;
  margin-bottom: 5px;
}

.substrate-properties {
  font-size: 0.9em;
  color: var(--dark-gray);
}

/* Visualisation des pots */
.pot-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.substrate-pot {
  width: 200px;
  text-align: center;
  margin-bottom: 30px;
}

.pot {
  width: 100%;
  height: 300px;
  border: 3px solid #8b4513;
  border-radius: 0 0 100px 100px;
  overflow: hidden;
  position: relative;
  background-color: #f5deb3;
}

.substrate-layer {
  position: absolute;
  width: 100%;
  left: 0;
  transition: all 0.3s ease;
}

.substrate-label {
  font-size: 12px;
  color: #000;
  background-color: rgba(255, 255, 255, 0.7);
  padding: 2px 4px;
  border-radius: 3px;
  position: absolute;
  left: 5px;
  max-width: calc(100% - 10px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Carte des habitats */
.natural-species-marker,
.horticultural-variety-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  border-radius: 50%;
}

.natural-species-marker {
  background-color: var(--main-orange);
}

.horticultural-variety-marker {
  background-color: var(--main-purple);
}

/* Légende de la carte */
.legend {
  background: rgba(255, 255, 255, 0.8);
  padding: 10px;
  border-radius: 5px;
}

.legend h4 {
  margin: 0 0 10px;
  font-size: 16px;
}

.legend-item {
  margin-bottom: 5px;
}

.legend-marker {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 5px;
  border-radius: 50%;
}

/* Mode sombre pour la carte */
.dark-mode .leaflet-tile {
  filter: invert(1) hue-rotate(180deg) brightness(0.8) contrast(1.2);
}

.dark-mode .leaflet-container {
  background: #333;
}

.dark-mode .legend {
  background: rgba(0, 0, 0, 0.7);
  color: var(--light-gray);
}

/* Météo */
.weather-container {
  max-width: 600px;
  margin: 0 auto;
}

.weather-form {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.city-input {
  flex-grow: 1;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
}

.weather-details {
  display: flex;
  align-items: center;
  gap: 20px;
}

.weather-icon {
  width: 64px;
  height: 64px;
}

/* Responsive design */
@media (max-width: 1024px) {
  .growth-content {
    grid-template-columns: 1fr;
  }

  .growth-input-panel {
    order: 2;
  }

  .growth-data-panel {
    order: 1;
  }
}

@media (max-width: 768px) {
  .plant-selection-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .plant-actions {
    justify-content: space-between;
    width: 100%;
  }

  .plant-actions .button {
    flex: 1;
    text-align: center;
  }

  .substrate-pot {
    width: 150px;
  }

  .pot {
    height: 225px;
  }

  .substrate-label {
    font-size: 10px;
  }

  .weather-form {
    flex-direction: column;
  }

  .weather-details {
    flex-direction: column;
    align-items: flex-start;
  }

  #substrate-checkboxes {
    grid-template-columns: 1fr;
  }

  .substrate-item {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Styles spécifiques pour la carte et ses contrôles */
.map-controls {
  margin-bottom: 1rem;
  background-color: var(--background-color);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.map-controls h2 {
  color: var(--header-color);
  margin-top: 0;
  margin-bottom: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
}

.form-group select {
  width: 100%;
  max-width: 500px;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--input-background);
  color: var(--input-color);
  font-size: 1rem;
}

#habitat-map-container {
  height: 400px;
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

/* Styles pour les marqueurs */
.natural-species-marker,
.horticultural-variety-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.natural-species-marker {
  background-color: var(--main-orange);
}

.horticultural-variety-marker {
  background-color: var(--main-purple);
}

/* Légende de la carte */
.legend {
  padding: 0.75rem;
  background-color: var(--background-color);
  border-radius: 4px;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.legend h4 {
  margin: 0 0 0.5rem 0;
  color: var(--header-color);
  font-size: 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.legend-marker {
  width: 20px;
  height: 20px;
  margin-right: 0.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
}

/* Mode sombre pour la carte */
body.dark-mode .leaflet-tile {
  filter: invert(1) hue-rotate(180deg) brightness(0.8) contrast(1.2);
}

body.dark-mode .leaflet-container {
  background-color: var(--background-color);
}

body.dark-mode .legend {
  background-color: var(--background-color);
  border-color: var(--border-color);
}

/* Styles responsifs */
@media (max-width: 768px) {
  .map-controls {
    padding: 0.75rem;
  }

  #habitat-map-container {
    height: 300px;
  }

  .form-group select {
    max-width: 100%;
  }

  .legend {
    padding: 0.5rem;
  }
}

/* selecteur de langue */
.header-controls {
  position: fixed;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
  z-index: 1000;
}

.lang-toggle {
  padding: 0.25rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background-color: transparent;
  transition: all 0.3s ease;
}

.lang-toggle:hover {
  transform: scale(1.1);
  background-color: rgba(255, 255, 255, 0.1);
}

.lang-toggle img {
  display: block;
  border-radius: 2px;
  width: 24px;
  height: 18px;
}

/* Ajuster la position du bouton de thème */
.mode-toggle {
  position: static; /* Annuler la position fixed existante */
}

@media (max-width: 768px) {
  .header-controls {
    top: 0.5rem;
    right: 0.5rem;
  }

  .lang-toggle img {
    width: 20px;
    height: 15px;
  }
}

/* Conteneur principal des statistiques */
.detailed-stats {
  background-color: var(--background-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 20px;
}

/* En-tête des stats */
.stats-header {
  margin-bottom: 1.5rem;
}

.stats-header h2 {
  color: var(--main-orange);
  font-size: 1.25rem;
  font-weight: bold;
  margin: 0;
}

/* Grille des métriques */
.stats-grid {
  display: grid;
  gap: 1.5rem;
}

/* Carte individuelle de métrique */
.metric-card {
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* En-tête de la carte de métrique */
.metric-header h3 {
  color: var(--main-purple);
  font-size: 1.1rem;
  font-weight: bold;
  margin: 0 0 1rem 0;
}

/* Grille des valeurs */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

/* Conteneur de valeur individuelle */
.metric-value {
  background-color: rgba(0, 0, 0, 0.03);
  border-radius: 6px;
  padding: 0.75rem;
  text-align: center;
}

/* Adaptation pour le mode sombre */
body.dark-mode .metric-value {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Étiquette de la métrique */
.metric-label {
  font-size: 0.875rem;
  color: var(--text-color);
  opacity: 0.7;
  margin-bottom: 0.25rem;
}

/* Valeur numérique */
.metric-number {
  font-size: 1.125rem;
  font-weight: bold;
  color: var(--text-color);
}

/* Responsive design */
@media (max-width: 768px) {
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .metric-value {
    padding: 0.5rem;
  }

  .metric-number {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    gap: 1rem;
  }

  .metric-header h3 {
    font-size: 1rem;
  }
}

.metrics-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 0.5rem;
}

.metrics-table th {
  text-align: left;
  padding: 1rem;
  color: var(--main-purple);
  font-weight: bold;
  border-bottom: 2px solid var(--border-color);
}

.metrics-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.date-value {
  font-weight: 500;
}

.dimensions-container,
.count-container {
  display: flex;
  gap: 1.5rem;
}

.dimension-item,
.count-item {
  font-family: monospace;
  padding: 0.2rem 0.5rem;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 4px;
}

.notes-container {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.note-item {
  font-size: 0.9rem;
  color: var(--dark-gray);
  font-style: italic;
}

/* Style au survol des filtres */
.metric-value:hover {
  background-color: rgba(75, 0, 130, 0.1) !important;
}

.metric-value.active {
  background-color: rgba(75, 0, 130, 0.15) !important;
  font-weight: bold;
}

/* Mode sombre */
body.dark-mode .dimension-item,
body.dark-mode .count-item {
  background: rgba(255, 255, 255, 0.05);
}