/* layout.css */

/* Structure générale de la page */
body {
  font-family: var(--font-family);
  margin: 20px;
  background: var(--background-color);
  line-height: 1.6;
}

/* Barre de navigation principale */
nav {
  text-align: center;
  margin-bottom: 20px;
}

/* Boutons de navigation */
nav button {
  margin: 0 5px;
  padding: 10px 15px;
  font-size: 1rem;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: var(--primary-color);
  color: #fff;
  border-radius: 4px;
  transition: background 0.2s, opacity 0.2s;
}

nav button:hover,
nav button:focus {
  background: rgb(187, 183, 183);
  opacity: 0.6;
}

nav button.active {
  background: var(--secondary-color);
}

/* Conteneur principal des sections */
.main-container {
  max-width: 500px;
  margin: 0 auto 20px;
  padding: 20px;
  background: var(--container-bg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

/* Titres de section */
h1 {
  text-align: center;
  color: var(--text-color);
  margin-bottom: 30px;
  font-size: 2em;
}

/* Espacement des groupes de formulaire */
.form-group {
  margin-bottom: 20px;
}

/* Alignement des conteneurs numériques et selects */
.number-input-container,
.mode-select-container {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Mise en page du tableau de résultats */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

table th,
table td {

  white-space: nowrap;            /* Pas de retour à la ligne */
  overflow: hidden;               /* Cache le dépassement */
  text-overflow: ellipsis;        /* Ajoute "…" si le texte est trop long */
  vertical-align: middle;         /* Centre verticalement le contenu */
  padding: 8px 10px;              /* Renforce l'espacement intérieur */
  max-width: 180px;               /* Empêche les colonnes de s'étirer à l'infini */
}

table th {

    white-space: nowrap;
    padding: 8px 10px;
    text-align: left;
}



/* Étend la zone “main-container” de la section #patch-section */
#patch-section .main-container {
  max-width: 95vw;
  width: auto;
  padding: 20px 10px;
}

/* Pour que les résultats dans #output puissent défiler s'ils débordent */
#patch-section #output {

  display: block;
  overflow-x: auto;
  width: 100%;
  margin-bottom: 20px; /* espace sous le scroll */

}

#patch-section #output .result-item {
  display: grid;
  grid-template-columns: 30% 1fr 1fr 1fr; /* Nom / Univers / Début / Fin */
  column-gap: 10px;
  align-items: center;
  padding: 8px 10px;
  min-height: 40px;      /* hauteur uniforme */
  min-width: 600px;      /* largeurs cumulées des colonnes */
  background: #fff;
  margin-bottom: 5px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Boutons d'export groupés */
.export-buttons {
  margin-top: 20px;
  text-align: center;
}

/* Classe utilitaire pour masquer */
.hidden {
  display: none;
}

/* Univers affiché en petit et moins visible */
#results-table .universe.small {
  font-size: 0.75em;
  opacity: 0.6;
  margin-right: 0.1em;
}

/* Adresse plus mise en valeur (ex : couleur primaire) */
#results-table .address {
  font-weight: bold;
  color: var(--primary-color);
}

/* Univers en petit (pour start-cell) */
.universe.small {
  font-size: 0.75em;
  opacity: 0.6;
  margin-right: 0.1em;
}

/* Adresse de début mise en valeur */
.address.highlight {
  font-weight: bold;
  color: var(--primary-color);
}

/* Adresse de fin tonale neutre */
.address.end {
  font-weight: normal;
  color: black;
}

/* Cellules d'adresse (éviter wrapping) */
.address-cell {
  white-space: nowrap;
  padding: 8px 10px;
}
