body { 
  margin: 0; 
  padding: 0; 
  font-family: sans-serif; 
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.header {
  width: 100%;
  height: 16%;
  background-image: url('/images/bandeau.png');
  background-size: cover;
  background-position: center;
  z-index: 2;
}

.content-container {
  display: flex;
  flex: 1;
  position: relative;
  height: calc(100vh - 140px); /* Hauteur fixe basée sur l'espace restant */
  min-height: 300px; /* Hauteur minimales pour éviter les problèmes */
}

.sidebar {
  width: 15%;
  background-image: url('/images/bandeau_vertical.png');
  background-size: cover;
  padding: 15px;
  box-sizing: border-box;
  z-index: 2;
  color: rgb(0, 0, 0);
  overflow-y: auto;
}

.sidebar h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: white;
}

#map { 
  flex: 1;
  position: relative;
  min-height: 300px; /* Garantir une hauteur minimale */
}

.mapboxgl-popup {
  max-width: 300px;
}

.mapboxgl-popup-close-button {
  font-size: 16px;
  color: #666;
  background: transparent;
  padding: 5px;
  border-radius: 50%;
  position: absolute;
  right: 5px;
  top: 5px;
  line-height: 1;
  width: 20px;
  height: 20px;
  text-align: center;
}

.mapboxgl-popup-close-button:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
}

.mapboxgl-popup-content {
  padding: 15px;
}

.zoom-warning {
  position: absolute;
  top: 10px;
  left: 1000px;
  background-color: #fff;
  padding: 10px;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 1);
  display: none;
  z-index: 1;
  font-family: sans-serif;
  pointer-events: none;
}

.team-selector {
  margin-bottom: 15px;
}

.team-selector label {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: bold;
  color: #333;
}

.team-selector select {
  width: 100%;
  padding: 6px;
  border-radius: 4px;
  font-size: 12px;
  border: 1px solid #ddd;
}

.file-upload {
  display: flex;
  flex-direction: column;
  margin-top: 10px;
}

.file-upload label {
  cursor: pointer;
  font-size: 12px;
  padding: 6px 12px;
  background-color: rgba(255, 255, 255, 0.8);
  border: 1px solid #ddd;
  border-radius: 4px;
  text-align: center;
  margin-bottom: 10px;
  color: #333;
}

.file-upload label:hover {
  background-color: rgba(255, 255, 255, 0.9);
}

.file-info {
  font-size: 12px;
  margin-top: 5px;
  color: #333;
}

button {
  padding: 8px 12px;
  background-color: rgba(76, 175, 80, 0.0);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  margin-top: 10px;
  width: 100%;
}

button:hover {
  background-color: rgba(219, 71, 3, 0.8);
}

#clear-all {
  background-color: rgba(244, 67, 54, 0.8);
}

#clear-all:hover {
  background-color: rgba(244, 67, 54, 1);
}

#loading-indicator {
  display: none;
  color: #ff9800;
  font-weight: bold;
  margin-top: 10px;
}

.team-stats {
  margin-top: 10px;
  font-size: 16px;
  font-weight: bold;
  line-height: 3;
}

.team-stats h4 {
  margin-top: 10px;
  margin-bottom: 5px;
}

.team-indicator {
  display: inline-block;
  width: 20px;
  height: 20px;
  /* translater vers le haut */
  transform: translateY(-2px);
  margin-right: 10px;
  vertical-align: middle;
  border-radius: 50%;
  /*ajouter une bordure noire*/
  border: 2px solid rgba(32, 32, 32, 0.8);
}

.red-team {
  background-color: #ff5252;
}

.blue-team {
  background-color: #4285f4;
}

.green-team {
  background-color: #0f9d58;
}

.orange-team {
  background-color: #ff9800;
}


.team-row {
  padding: 7px 12px;
  color: white;
  font-weight: bold;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.team-label {
  display: flex;
  align-items: center;
  min-width: 80px; /* ou 100px selon ce qui donne le meilleur rendu */
}

.team-score {
  margin-left: auto;
}

.red-bg {
  background-color: rgba(255, 85, 66, 0.7);
}

.blue-bg {
  background-color: rgba(69, 187, 255, 0.7);
}

.green-bg {
  background-color: rgba(46, 211, 114, 0.7);
}

.orange-bg {
  background-color: rgba(255, 151, 60, 0.7);
}

.red-team { background-color: #ff5252; }
.blue-team { background-color: #4285f4; }
.green-team { background-color: #0f9d58; }
.orange-team { background-color: #ff9800; }


.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: white;
  padding: 30px;
  border-radius: 12px;
  max-width: 800px;
  width: 80%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-close {
  position: absolute;
  top: 5px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  background: none;
  border: none;
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  border-radius: 50%;
  display: flex;
  align-items: center;  
  justify-content: center;

}

.modal-close:hover {
  background-color: rgba(0, 0, 0, 0.1);
  color: #333;
}

.modal-title {
  font-size: 24px;
  margin-top: 0;
  margin-bottom: 20px;
  color: #333;
  text-align: center;
}

.modal-text {
  font-size: 16px;
  line-height: 1.6;
  font-family:'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
  color: #333;
  margin-bottom: 20px;
}

.info-button {
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.info-button:hover {
  background-color: #2980b9;
}

.info-icon {
  margin-right: 8px;
  font-size: 16px;
}

/* Styles pour la barre de recherche */
.search-card {
  margin-bottom: 10px;
}

.search-container {
  width: 100%;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 6px 8px;
  font-size: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
}

.search-results {
  position: absolute;
  width: 100%;
  max-height: 200px;
  overflow-y: auto;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-top: 2px;
  z-index: 10;
  display: none;
}

.search-result-item {
  padding: 6px 8px;
  font-size: 12px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
}

.search-result-item:hover {
  background-color: #f5f5f5;
}

.search-result-name {
  font-weight: bold;
}

.search-result-address {
  font-size: 10px;
  color: #666;
}

.sidebar-card {
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  padding: 8px;
  margin-bottom: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(0, 0, 0, 0.15);
}

/* Styles pour Strava */

/* Bouton Strava simple avec image exacte */
.strava-button-with-hover {
  background: url('/images/bouton_strava.png') no-repeat;
  background-size: 100% 100%;
  
  width: 100%; /* Largeur du conteneur */
  max-width: 200px; /* Largeur max de votre image */
  aspect-ratio: 4/1; /* Ajustez selon votre image (largeur ÷ hauteur) */
  
  border: none;
  padding: 0;
  margin: 0 auto;
  outline: none;
  cursor: pointer;
  display: block;
  
  color: transparent;
  font-size: 0;
  overflow: hidden;
  
  transition: filter 0.2s ease;
}

/* Effet simple au survol : juste un changement de luminosité */
.strava-button-with-hover:hover {
  filter: brightness(1.1); /* Un peu plus lumineux */
}

/* Supprimer tous les effets focus/active indésirables */
.strava-button-with-hover:focus,
.strava-button-with-hover:active {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

/* Version alternative si vous voulez garder le texte visible */
.strava-button-with-text {
  background: url('/images/bouton_strava.png') no-repeat center center;
  background-size: contain;
  
  width: 100%;
  max-width: 250px;
  height: 50px;
  
  border: none;
  padding: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  position: relative;
  
  /* Texte par-dessus l'image */
  color: white;
  font-size: 13px;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  text-align: center;
}

.strava-button-with-text::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.strava-button-with-text:hover::before {
  opacity: 1;
}

.strava-button-with-text:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.strava-button {
  background: linear-gradient(45deg, #fc4c02, #ff6b35);
  color: white;
  border: none;
  padding: 12px 15px;
  font-size: 14px;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-shadow: 0 3px 10px rgba(252, 76, 2, 0.3);
}

.strava-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(252, 76, 2, 0.4);
  background: linear-gradient(45deg, #e04302, #ff5722);
}

.strava-button:active {
  transform: translateY(0);
}

.strava-status {
  margin-top: 10px;
  padding: 8px;
  border-radius: 4px;
  font-size: 12px;
  text-align: center;
}

.strava-status.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.strava-status.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.strava-status.loading {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.team-selection {
  margin-top: 15px;
  padding: 10px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid #ddd;
}

.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
}

.team-option {
  display: flex;
  align-items: center;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  background-color: rgba(255, 255, 255, 0.7);
}

.team-option:hover {
  background-color: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

.team-option.selected {
  border-color: #333;
  background-color: rgba(255, 255, 255, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.team-color {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin-right: 6px;
}

.team-color.rouge {
  background-color: #ff5252;
}

.team-color.bleu {
  background-color: #4285f4;
}

.team-color.vert {
  background-color: #0f9d58;
}

.team-color.orange {
  background-color: #ff9800;
}

.confirm-button {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
  margin-top: 10px;
  font-size: 12px;
}

.confirm-button:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}

.confirm-button:not(:disabled):hover {
  background-color: #218838;
}

.sync-status {
  margin-top: 10px;
  font-size: 12px;
  text-align: center;
  padding: 8px;
  border-radius: 4px;
}

.sync-status.success {
  background-color: #d4edda;
  color: #155724;
}

.sync-status.error {
  background-color: #f8d7da;
  color: #721c24;
}

.sync-status.loading {
  background-color: #d1ecf1;
  color: #0c5460;
}
