* {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  box-sizing: border-box;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #888;
}

body {
  background-color: #f4f4f4;
  color: #333;
}

/* HEADER */
header {
  background-color: #0078d7;
  color: white;
  font-size: 8px;
  padding: 1rem;
  text-align: center;
}

/* MAIN */
main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1rem;
  gap: 1rem;
}

/* CONTROLS */
#controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  width: 100%;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* GRAPH-WRAPPER */
.graph-wrapper {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 1rem;
}

/* GRAPH-CONTAINER */
#graph-container {
  flex: 1;
  height: calc(100vh - 5.5rem);
  max-height: calc(100vh - 5.5rem);
  width: 50%;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  overflow: auto;
}

/* RESULTS */
#results {
  flex: 1;
  height: calc(100vh - 5.5rem);
  max-height: calc(100vh - 5.5rem);
  padding: 1rem;
  width: 50%;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  overflow: auto;
}

/* BOUTONS */
button {
  background-color: #0078d7;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 1rem;
}

button:hover {
  background-color: #005bb5;
}

/* INPUTS / SELECT */
input,
select {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.hidden {
  display: none;
}

#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 10px;
  background: rgba(0, 0, 0, 0.3);
  display: none;
  justify-content: center;
  align-items: center;
}

/* Boîte d'alerte */
#customAlert {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  min-width: 300px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  text-align: center;
}

/* Boutons */
.alert-button {
  margin: 10px;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.btn-primary {
  background-color: #007bff;
  color: #fff;
}

.btn-secondary {
  background-color: #6c757d;
  color: #fff;
}
/* ========================= */
/*          RESPONSIVE       */
/* ========================= */

@media screen and (max-width: 768px) {
  #controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 1rem;
  }

  .graph-wrapper {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }

  #graph-container,
  #results {
    width: 100%;
    min-height: 500px;
    max-height: none;
  }
}

@media screen and (max-width: 480px) {
  header {
    font-size: 6px;
  }

  #controls {
    padding: 0.5rem;
  }

  button {
    width: 100%;
    margin-top: 0.5rem;
  }
  
  .alert-button {
    margin: 5px 0;
  }
}
