
/* Variables CSS */

.reservation-form {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  background-color: var(--secondary-color);
  border-radius: 10px;
  color: var(--text-color);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.form-grid label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.form-grid input,
.form-grid select {
  width: 100%;
  padding: 0.5rem;
  border-radius: 5px;
  border: 1px solid #ccc;
  background-color: #1f1f1f;
  color: #fff;
}

.checkboxes {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.confirmation {
  background-color: #1e3a1e;
  color: #d1fadf;
  padding: 1rem;
  margin-top: 1.5rem;
  border-radius: 8px;
  text-align: center;
  font-size: 1rem;
}

/* Style pour la barre de disponibilité */
#disponibilite-barre {
  background-color: #444;
  width: 100%;
  height: 15px;
  border-radius: 8px;
  overflow: hidden;
  margin: 1rem 0;
}

#barre-remplie {
  height: 100%;
  width: 0%;
  background-color: #4caf50;
  transition: width 0.4s ease-in-out;
}

/* Stations (écrans) */
#stations-view {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.station {
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  font-weight: bold;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.station.occupied {
  background-color: #aa2e2e;
  color: #fff;
}

.station.available {
  background-color: #2e7d32;
  color: #fff;
}

/* Icônes dans stations */
.station i {
  font-size: 1.2rem;
}

.legend-stations {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  color: #ccc;
}

.legend-stations .item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-stations .box {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  display: inline-block;
}

.legend-stations .box.available {
  background-color: #2e7d32;
}

.legend-stations .box.occupied {
  background-color: #aa2e2e;
}

/* Tableau des créneaux */
#tableau-creneaux {
  width: 100%;
  margin-top: 2rem;
  border-collapse: collapse;
  font-size: 0.95rem;
  background-color: #222;
  color: #fff;
}

#tableau-creneaux th,
#tableau-creneaux td {
  border: 1px solid #444;
  padding: 10px;
  text-align: center;
}

#tableau-creneaux th {
  background-color: #333;
  color: #ffc107;
}


.custom-alert {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: slideFadeIn 0.4s ease-out;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.alert-box {
  background: #fff;
  color: #333;
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

.alert-box button {
  margin: 0.5rem;
  padding: 0.5rem 1rem;
  background: #ffc107;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#paiement-alert .alert-box {
  background-color: #fff3cd;
  color: #856404;
  border-left: 5px solid #ffc107;
}

#duplicate-alert .alert-box {
  background-color: #f8d7da;
  color: #721c24;
  border-left: 5px solid #f44336;
}

#places-alert .alert-box {
  background-color: #ffe8e8;
  color: #8b0000;
  border-left: 5px solid #dc3545;
}

.custom-alert.fade-out {
  opacity: 0;
  transform: translateY(-20px);
}


/*-------------------------------------------------------*/
@keyframes slideFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.custom-alert {
  animation: slideFadeIn 0.4s ease-out;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* ----------------------------------------------------*/

/*.user-session {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #fff;
  font-size: 0.9rem;
}
.user-session button {
  padding: 4px 10px;
  background-color: #ffc107;
  border: none;
  color: #000;
  border-radius: 4px;
  cursor: pointer;
}*/

@media (max-width: 600px) {
  .reservation-form {
    padding: 1rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .checkboxes {
    font-size: 0.85rem;
  }

  #stations-view {
    grid-template-columns: 1fr;
  }

  .legend-stations {
    flex-direction: column;
    align-items: center;
  }
} 

/* Fix dropdown dans menu burger (mobile) */
@media (max-width: 768px) {
  .dropdown {
    width: 100%;
  }

  .user-dropdown-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .dropdown-menu {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    width: 100%;
    background-color: #2b2b2b;
    z-index: 9999;
    border: 1px solid #444;
    border-radius: 0 0 6px 6px;
    margin-top: 0.2rem;
  }

  .dropdown-menu li {
    padding: 0.6rem 1rem;
  }

  .dropdown-menu.visible {
    display: block;
  }

  .user-dropdown-toggle .arrow {
    transform: rotate(0);
    transition: transform 0.3s ease;
  }

  .dropdown-menu.visible .arrow {
    transform: rotate(180deg);
  }
}
