body {
  font-family: system-ui, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  margin: 0;
  padding: 1rem;
  color: #333;
  min-height: 100vh;
}

/* Styles pour le splash screen */
.main-splash {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  justify-content: center; /* Centrage horizontal */
  align-items: center;   /* Centrage vertical */
  z-index: 100;
  color: white;
  text-align: center;
  flex-direction: column;
}

.splash-content {
  padding: 1.5rem; /* Légèrement réduit pour plus de compacité */
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  backdrop-filter: blur(5px);
  max-width: 90%;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  display: flex; /* Utilise flexbox pour l'alignement interne */
  flex-direction: column;
  align-items: center; /* Centre les éléments enfants */
  gap: 1rem; /* Espacement entre les éléments enfants */
}

.splash-image {
  max-width: 80%;
  height: auto;
  /* margin-bottom: 1.5rem; */ /* Supprimé, géré par gap */
  border-radius: 10px;
}

.main-splash h2 {
  font-size: 2.2rem;
  /* margin-bottom: 1rem; */ /* Supprimé, géré par gap */
}

.main-splash p {
  font-size: 1.2rem;
  /* margin-bottom: 2rem; */ /* Supprimé, géré par gap */
}

/* Styles pour cacher le contenu de l'application au démarrage */
.app-content {
  display: none;
}


.container {
  max-width: 800px;
  margin: 0 auto;
}

/* Styles pour le header avec image et texte superposés */
header {
  text-align: center;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  color: #667eea;
  margin-bottom: 2rem;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  padding: 0;
  height: 250px; /* Hauteur par défaut augmentée pour les grands écrans */
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 50%);
  z-index: 1;
}

.header-image {
  width: 100%;
  height: 100%; /* L'image prend toute la hauteur du header */
  object-fit: cover;
  border-radius: 20px 20px 0 0;
  display: block;
  position: relative;
  z-index: 0;
}

header h1,
header p {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  z-index: 2;
  width: 90%;
}

header h1 {
  bottom: 40px;
  font-size: 2.5rem;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

header p {
  bottom: 15px;
  font-size: 1.8rem;
  margin: 0;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}


.install-button {
  background-color: #0100ff;
  color: white;
  border: none;
  padding: 0.8em 1.5em;
  font-size: 1.5rem;
  border-radius: 0.5em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5em;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: background-color 0.3s;
  /* margin: 1.5rem auto 0; */ /* Supprimé, géré par gap du parent */
}

.install-button:hover {
  background-color: #0056b3;
}

.install-button .icon {
  height: 1.5em;
  width: 1.5em;
}

main {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
}

.form-label {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #555;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.form-label img {
  height: 1.5em;
  width: 1.5em;
}

input[type="number"],
select {
  width: 100%;
  padding: 0.8em;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  box-sizing: border-box;
}

.input-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.input-group input {
  flex-grow: 1;
}

.seat-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.seat-controls label {
  font-size: 0.95rem;
  color: #666;
}

.seat-controls select {
  width: auto;
  min-width: 100px;
}


button[type="submit"] {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 1em 2em;
  font-size: 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 100%;
}

button[type="submit"]:hover {
  background-color: #218838;
}

#resultat {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
  text-align: center;
}

#resultat h2 {
  color: #667eea;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Nouveau style pour le bloc de masse (maintenant le même dégradé que le centrage) */
.mass-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* Même dégradé que le centrage */
  max-height: 150px;
  padding: 1.5rem;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  color: white; /* Texte blanc pour le contraste */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.result-card .result-label {
  margin: 0 0 0.5rem 0;
  color: rgba(255, 255, 255, 0.8); /* Couleur pour le label sur fond sombre */
  font-size: 1.1rem;
}

.result-card .result-value {
  font-size: 2rem;
  font-weight: bold;
  color: white; /* Couleur pour la valeur sur fond sombre */
}

/* Styles pour le statut de masse */
.masse-status {
  font-size: 1.1rem;
  font-weight: 600;
  color: white; /* Texte blanc par défaut */
  margin-top: 0.5rem;
}

.masse-status-danger {
  color: #ff4757; /* Rouge pour le danger */
}


#centrage-display {
  margin-top: 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 1.5rem;
  min-height: 150px;
  border-radius: 10px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
  color: white;
}

.centrage-title {
  font-size: 1.1rem;
  color: white;
  margin-bottom: 0.5rem;
}

.centrage-value {
  font-size: 2rem;
  font-weight: bold;
  color: white;
  margin: 0.5rem 0;
}

.centrage-status {
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
}

/* Styles pour la jauge de centrage */
.centrage-scale {
  margin-top: 2rem;
  padding: 1rem;
  background: #f0f2f5;
  border-radius: 10px;
  box-shadow: inset 0 1px 5px rgba(0,0,0,0.1);
}

.scale-title {
  font-size: 1.1rem;
  font-weight: bold;
  color: #555;
  margin-bottom: 0.8rem;
  text-align: center;
}

.scale-container {
  position: relative;
  width: 90%;
  height: 25px;
  background: linear-gradient(to right,
    #ff4757 0%,
    #ffa502 13%,
    #2ed573 25%,
    #2ed573 75%,
    #ffa502 87%,
    #ff4457 100%
);
  border-radius: 2px;
  margin: 0.5rem auto;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.2);
  overflow: hidden;
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  width: 90%;
  margin: 0 auto;
  font-size: 0.85rem;
  color: #666;
}

.scale-marker {
  position: absolute;
  top: 0;
  height: 100%;
  width: 4px;
  background: #2c3e50;
  border-radius: 2px;
  z-index: 10;
}

.scale-marker::after {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid #2c3e50;
}

.legend {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.legend-color {
  width: 20px;
  height: 12px;
  border-radius: 6px;
}

.note {
  font-size: 0.85rem;
  color: #888;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px dashed #eee;
}

/* Styles pour les alertes */
#alerts {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.alert {
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-warning {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  header {
    height: 200px;
  }

  .header-image {
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
  }

  header h1 {
    font-size: 2rem;
    bottom: 45px;
  }

  header p {
    font-size: 1rem;
    bottom: 20px;
  }

  main {
    padding: 1.5rem;
  }

  .form-group {
    margin-bottom: 1rem;
  }

  .input-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .input-group input {
    width: 100%;
  }

  .seat-controls {
    width: 100%;
    justify-content: space-between;
  }

  .splash-content {
    padding: 1rem;
  }

  .main-splash h2 {
    font-size: 1.8rem;
  }
}

.zone-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  font-weight: 600;
}

.zone-arriere {
  color: #ff4757;
  text-align: right;
}

.zone-avant {
  color: #ff4757;
  text-align: left;
}