/* Réinitialiser les marges et les paddings par défaut */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Mode clair (par défaut) */
body {
  font-family: Arial, sans-serif;
  line-height: 1.2;
  margin: 0;
  padding: 0;
  background-color: #fefaf3;
  color: #000000;
  min-height: 100vh;
  transition: background-color 0.3s, color 0.3s;
}
.flag-image {
  filter: drop-shadow(3px 3px 3px #C3C3C3);
}
.text-size {
  font-size: 14px;
}

.dimensions {
  font-size: 14px;
  line-height: 1.2;
}

#main-container {
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
  padding: 20px 20px 5px 20px;
  background-color: #fefaf3;
  position: relative;
  top: 0;
}

/* Styles pour les sections internes */
#header-container,
#bonsai-container {
  margin-top: 15px;
  background-color: white;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  text-align: center;
}

#footer-container {
  margin-top: 15px;
  padding: 10px;
  text-align: center;
}

.imgarbre {
  margin-right: 18px;
}

#header-container {
  margin-top: 0;
}

/* Styles pour les infos du bonsaï */
#infos-container {
  display: flex;
  justify-content: center;
  text-align: left;
  width: 100%;
}

/* Élément interne pour contrôler l'alignement du texte */
#infos-container div {
  text-align: left;
}

/* Style pour le sélecteur de langue */
#language-selector {
  margin: 0px 0;
  text-align: center;
  padding: 0 0 10px 0;
}

/* Styles supplémentaires */
h1 {
  font-size: 20px;
}

h2 {
  font-size: 16px;
}

p {
  margin-bottom: 10px;
}

select {
  padding: 5px;
  font-size: 14px;
}

.lienvers {
  text-align: right;
}

/* Styles des blocs rétractables */
.collapsible {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background-color: #f1f1f1;
  color: #444;
  cursor: pointer;
  padding: 10px;
  border: 1px solid rgb(231, 231, 231);
  text-align: left;
  outline: none;
  font-size: 15px;
  margin: 2px;
  border-radius: 4px;
}

.collapsible .text {
  flex-grow: 1;
  text-align: left;
}

.collapsible .icon {
  flex-shrink: 0;
  margin-left: auto;
  margin-right: 5px;
}

.active,
.collapsible:hover {
  background-color: #ccc;
}

.content {
  margin: 1px;
  padding: 0 10px;
  display: none;
  overflow: hidden;
  background-color: #f9f9f9;
  border-radius: 4px;
}

.textinfos {
  text-align: left;
}

.imgpdf {
  margin: 4px 0 0 10px;
  height: 36px;
}

/* Styles pour l'affiche du conteneur des caractéristiques */
#caracteristiques-container,
#style-container,
#proprio-container {
  cursor: pointer;
}

.textculture {
  text-align: left;
  font-size: 15px;
}

/* Styles pour la boîte de dialogue modale */
#modal,
#modal2,
#modal3 {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  padding: 20px;
  background-color: #fff;
  border: 1px solid #000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

/* Styles pour le bouton de fermeture */
#close-btn,
#close-btn2,
#close-btn3 {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
}

/* Styles pour le fond sombre lorsque la modale est affichée */
#overlay,
#overlay2,
#overlay3 {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 500;
}

/* Styles pour l'affichage du style et des infos propriétaire */
#prostyle-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

#style-container {
  flex: 1;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-left: 40px;
  justify-content: flex-start;
  padding-top: 0px;
}

#proprio-container {
  flex: 1;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
  justify-content: flex-end;
  padding-top: 10px;
  padding-right: 30px;
}

/* Styles des containers des évènements */
#events-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0 auto;
}

#event-container {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  text-align: justify;
  margin: 0;
}

.imgevent {
  margin: 7px 5px 5px 0;
  width: 100px;
}

.divimgevent {
  display: flex;
  align-items: center;
}

.divtxtevent {
  line-height: 1.2;
  font-size: 12px;
  margin: 5px;
}

.survol:hover {
  color: rgb(194, 194, 194);
}

.image-containerevent {
  display: inline-block;
  text-align: center;
}

.image-containerevent img {
  cursor: pointer;
}

/* Styles de base pour le formulaire */
#filter-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 20px;
}

#filter-form label {
  background-color: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  flex: 1 1 auto;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

#filter-form label:hover {
  background-color: #e0e0e0;
  border-color: #ccc;
}

#filter-form label.active {
  background-color: rgb(0, 157, 192);
  color: white;
  border-color: rgb(0, 157, 192);
}

#filter-form input[type="checkbox"] {
  display: none;
}

.qr-code-wrapper {
background-color: white;
display: inline-block;
}

@media (max-width: 600px) {
#filter-form label {
padding: 4px 8px;
font-size: 10px;
flex: 1 1 30%;
}
}

@media (max-width: 400px) {
#filter-form label {
flex: 1 1 45%;
}
}

/* Mode sombre automatique */
@media (prefers-color-scheme: dark) {
body {
  background-color: #1e1e1e;
  color: #ffffff;
}

.flag-image {
  filter: none;
}
#bonsai-contain,
#main-container,
#header-container {
  background-color: #1e1e1e;
  color: #ffffff;
}

.collapsible {
  background-color: #333;
  color: #ddd;
  border: 1px solid #444;
}

.collapsible:hover {
  background-color: #444;
}

.content {
  background-color: #2a2a2a;
  color: #ddd;
}

#filter-form label {
  background-color: #333;
  border-color: #444;
  color: #ddd;
}

#filter-form label.active {
  background-color: #005f99;
  color: white;
  border-color: #005f99;
}

#modal,
#modal2,
#modal3 {
  background-color: #1e1e1e;
  color: #ffffff;
}

a {
  color: #80d8ff;
}
.nophoto {
  filter: invert(1);
  border-radius: 6%;
}
.survol:hover {
  color: #aaaaaa;
}
.qr-code-wrapper {
  background-color: #1e1e1e;
}
.qr-code {
  filter: invert(88%);
}
.qr-logo {
  content: url('../images/logo_dark.png');
}
}
