/* =============================================================
   MODAL PARAMÈTRES - INTERFACE DE CONFIGURATION
   ============================================================= */

/* Overlay du modal */
#settingsModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
}

#settingsModal.active {
  display: flex;
}

/* Container principal */
.settings-container {
  position: relative;
  width: 800px;
  max-width: 90vw;
  height: 600px;
  max-height: 90vh;
  background: linear-gradient(145deg, #2c3e50, #34495e);
  border-radius: 15px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 3px solid #ffd700;
}

/* En-tête */
.settings-header {
  background: linear-gradient(145deg, #1a252f, #2c3e50);
  padding: 20px;
  border-bottom: 2px solid #ffd700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.settings-title {
  color: white;
  font-size: 28px;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.settings-close-btn {
  width: 40px;
  height: 40px;
  background: rgba(220, 53, 69, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.settings-close-btn:hover {
  background: rgba(220, 53, 69, 1);
  transform: scale(1.1);
}

/* Onglets */
.settings-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  padding: 0;
}

.settings-tab {
  flex: 1;
  padding: 15px 20px;
  background: transparent;
  color: #bbb;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.settings-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.settings-tab.active {
  background: rgba(255, 215, 0, 0.2);
  color: #ffd700;
  border-bottom-color: #ffd700;
}

/* Contenu */
.settings-content {
  flex: 1;
  overflow-y: auto;
  padding: 30px;
}

.settings-tab-content {
  display: none;
}

.settings-tab-content.active {
  display: block;
}

/* Section de paramètres */
.settings-section {
  margin-bottom: 30px;
}

.settings-section-title {
  color: #ffd700;
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(255, 215, 0, 0.3);
}

/* Contrôle individuel */
.settings-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  margin-bottom: 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.settings-control:hover {
  background: rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 215, 0, 0.5);
}

.settings-control-label {
  color: white;
  font-size: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-control-icon {
  font-size: 20px;
}

/* Toggle switch */
.settings-toggle {
  position: relative;
  width: 60px;
  height: 30px;
  background: #555;
  border-radius: 15px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.settings-toggle.active {
  background: #4CAF50;
}

.settings-toggle-slider {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.settings-toggle.active .settings-toggle-slider {
  transform: translateX(30px);
}

/* Slider de volume */
.settings-slider-container {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 250px;
}

.settings-slider {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  outline: none;
}

.settings-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: #ffd700;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

.settings-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 3px 8px rgba(255, 215, 0, 0.6);
}

.settings-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #ffd700;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  border: none;
  transition: all 0.2s ease;
}

.settings-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 3px 8px rgba(255, 215, 0, 0.6);
}

.settings-slider-value {
  color: #ffd700;
  font-weight: bold;
  min-width: 50px;
  text-align: right;
  font-size: 16px;
}

/* Checkboxes pour filtres de routes */
.settings-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settings-checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.settings-checkbox-item:hover {
  background: rgba(0, 0, 0, 0.3);
}

.settings-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #ffd700;
}

.settings-checkbox-label {
  color: white;
  font-size: 15px;
  cursor: pointer;
  user-select: none;
}

/* Scrollbar custom */
.settings-content::-webkit-scrollbar {
  width: 10px;
}

.settings-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 5px;
}

.settings-content::-webkit-scrollbar-thumb {
  background: rgba(255, 215, 0, 0.5);
  border-radius: 5px;
}

.settings-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 215, 0, 0.7);
}

/* Color picker */
.settings-color-picker {
  display: flex;
  align-items: center;
  gap: 15px;
}

.settings-color-input {
  width: 80px;
  height: 40px;
  border: 2px solid rgba(255, 215, 0, 0.5);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.settings-color-input:hover {
  border-color: #ffd700;
  transform: scale(1.05);
}

.settings-color-preview {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Responsive */
@media (max-width: 900px) {
  .settings-container {
    width: 95vw;
    height: 95vh;
  }

  .settings-content {
    padding: 20px;
  }

  .settings-control {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .settings-slider-container {
    width: 100%;
  }
}
