/* 🌍 Mise en page globale */
body {
  font-family: Arial, sans-serif;
  background: #f5e1fd;
  color: #4b0082;
  margin: 0;
  padding: 20px;
  text-align: center;
}

/* 🏗️ Conteneurs des sections */
#result,
#archivesContainer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  margin-bottom: 12px;
}

/* 🏗️ Conteneur du formulaire aligné */
.selection-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 20px auto;
  width: 60%;
  padding: 10px;
  background: #e6ccff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(75, 0, 130, 0.1);
}

/* 🔘 Sélecteurs */
select {
  padding: 10px;
  font-size: 16px;
  border-radius: 5px;
  border: 2px solid #6a0dad;
  background: white;
  color: #4b0082;
}

/* 🔘 Bouton */
button {
  padding: 10px;
  background: #6a0dad;
  color: white;
  font-size: 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
button:hover {
  background: #4b0082;
}

/* 🖼️ Polaroids des timbres */
.polaroid {
  width: 250px;
  min-height: 400px; /* Remplace height par min-height */
  padding: 15px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease-in-out;
  cursor: pointer;
}
.polaroid:hover {
  transform: scale(1.05);
}

/* 📷 Images des timbres */
.timbre-image {
  width: 180px;
  height: 120px;
  object-fit: contain;
  border-radius: 8px;
  margin: 10px 0;
}

/* 📜 Informations des timbres */
.titre-timbre {
  font-size: 10px;
  font-weight: bold;
  color: #007bff;
  overflow-wrap: break-word; /* Ajout pour gérer les longs textes */
  word-break: break-all; /* Ajout pour casser les mots si nécessaire */
  margin: 5px 0;
}

/* 🔍 Fiche détaillée d'un timbre */
.fiche-timbre {
  max-width: 600px;
  padding: 20px;
  background: white;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  text-align: center;
}
.fiche-timbre h2 {
  margin-bottom: 20px;
  color: #333;
}
.fiche-timbre img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  border-radius: 10px;
  margin-bottom: 10px;
}
.fiche-timbre p {
  font-size: 12px;
  overflow-wrap: break-word; /* Ajout pour gérer les longs textes */
  word-break: break-all; /* Ajout pour casser les mots si nécessaire */
  margin: 5px 0;
  max-height: 100px; /* Limite la hauteur du texte */
  overflow-y: auto; /* Ajoute une barre de défilement si nécessaire */
}

/* 🌍 Conteneur des archives */
.continent-container {
  width: 100%;
  margin-bottom: 30px;
  padding: 10px;
}

/* 📍 Titres des sections */
h2 {
  font-size: 24px;
  font-weight: bold;
  color: #333;
}

/* 🔘 Boutons */
.btn-link {
  display: block;
  padding: 10px;
  background: #007bff;
  color: white;
  text-align: center;
  border-radius: 5px;
  text-decoration: none;
  transition: 0.3s ease-in-out;
}
.btn-link:hover {
  background: #0056b3;
}

/* 📍 Conteneur des timbres */
.stamps-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  justify-content: center;
  gap: 30px;
  overflow: hidden;
  height: auto;
  max-height: 700px;
  margin: 20px auto;
  width: 100%;
}

/* 📜 Fiches compactes */
.compact-polaroid {
  width: 220px;
  min-height: 300px; /* Remplace height par min-height */
  padding: 15px; /* Ajustement du padding */
  background: rgb(245, 226, 250);
  border-radius: 8px;
  text-align: center;
  transition: transform 0.2s ease-in-out;
  margin-top: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.compact-polaroid:hover {
  transform: scale(1.05);
}

/* 🖼️ Images réduites */
.compact-polaroid img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 10px;
}

/* Texte dans les fiches compactes */
.compact-polaroid .titre-timbre,
.compact-polaroid p {
  font-size: 13px;
  overflow-wrap: break-word; /* Ajout pour gérer les longs textes */
  margin: 5px 0;
  max-height: 110px; /* Limite la hauteur du texte */
  overflow-y: auto; /* Ajoute une barre de défilement si nécessaire */
}

/* 📍 Conteneur de chaque pays */
.country-section {
  text-align: center;
  margin-bottom: 30px;
}

/* 📍 Nom du pays centré */
.titre-pays {
  font-size: 28px;
  font-weight: bold;
  color: #6a0dad;
  text-transform: uppercase;
  border-bottom: 3px solid #6a0dad;
  padding-bottom: 10px;
  display: inline-block;
  margin: 0 auto;
}

/* 📍 Conteneur des pays */
.countries-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
  position: static;
}

/* Conteneur pour positionner le calendrier à droite */
.calendar-wrapper {
  position: absolute;
  right: 20px;
  top: 550px;
  width: 260px;
}

/* Styles pour le calendrier */
#calendar-container {
  width: 100%;
  background: #e6d5f8;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border: 2px solid #4a90e2;
  padding: 10px;
  box-sizing: border-box;
}
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
#mois-actuel {
  font-size: 25px;
  margin: 0;
}
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: bold;
  margin-bottom: 5px;
}
#calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.day {
  padding: 5px;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 2px;
  background-color: #f0e6ff;
  font-size: 12px;
}
.day.empty-day {
  background-color: transparent;
  border: none;
}
.day.has-stamps {
  background-color: #b388ff;
}
.selection-container {
  text-align: center;
}

/* 🎯 Boutons de navigation */
.nav-btn {
  background: #0073e6;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.3s ease;
}
.nav-btn:hover {
  background: #005bb5;
}
.timbre-centrer {
  display: block;
  margin: auto;
  text-align: center;
  max-width: 100%;
}
.stamps-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}
.journal {
  text-align: justify;
  line-height: 1.6;
}
.compact-popup {
  width: 400px !important;
  padding: 10px;
}
.compact-popup img {
  max-width: 100%;
  height: auto;
}
.container {
  text-align: center;
  margin: 10px;
  margin-top: 20px;
  max-width: 600px;
  padding: 20px;
  background-color: rgb(241, 218, 218);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 1.5);
  margin: 50px auto;
}
.stamps-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.clear-row {
  flex-basis: 100%;
  height: 10px;
}
.timbre-header {
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  color: #444;
  margin-bottom: 5px;
}
.arrow-container {
  display: flex;
  flex-direction: column;
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
}
.arrow-link {
  color: black;
  font-size: 36px;
  margin: 10px 0;
  transition: none;
}
.arrow-link:hover {
  color: black;
}
.arrow-link:active {
  color: black;
}
/* Button reset */
#resetButton {
  /* Arrière-plan et texte */
  background-color: #6a0dad;
  color: white;

  /* Forme et taille */
  border: none;
  border-radius: 20px;
  padding: 10px 20px;
  font-size: 16px;
  text-decoration: none;

  /* Cursor et transition */
  cursor: pointer;

  /* Ajout de la transition pour tous les effets, avec une durée unique */
  transition: all 0.3s ease-in-out;

  /* Ajout d'une ombre discrète pour la profondeur */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Effets au survol du bouton */
#resetButton:hover {
  /* Changement de couleur plus cohérent */
  background-color: #6a0dad59;

  /* L'ombre devient plus forte au survol */
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);

  color: black;

  border: solid 1px rgba(253, 3, 3, 0.604);

  /* Le bouton remonte légèrement et se rétrécit un peu */
  transform: translateY(-2px) scale(1.02);
}

/* Effet au clic (état actif) */
#resetButton:active {
  /* Le bouton s'enfonce au clic */
  transform: translateY(0) scale(1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}


#liens-timbres a {
  display: block;
  margin: 5px 0;
  padding: 5px;
  background-color: #f0f8ff;
  border-radius: 3px;
  color: #0066cc;
  text-decoration: none;
}

#liens-timbres a:hover {
  background-color: #e1f0ff;
}
