body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
}

section {
  margin: 30px auto;
  max-width: 1000px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

section h2 {
  margin: 0;
  padding: 16px 20px;
  font-size: 18px;
  background: #961c45;
  color: white;
  display: flex;
  align-items: center;
  gap: 8px;
}

section p,
section ul {
  padding: 16px 20px;
  font-size: 15px;
}

.details-grid {
  display: flex;
  flex-wrap: wrap;
  padding: 0 20px 20px;
  gap: 16px;
}

.detail-card {
  flex: 1;
  min-width: 260px;
  background: #f9f9f9;
  border-radius: 6px;
  padding: 16px;
  border-left: 4px solid #961c45;
}

.detail-card h3 {
  font-size: 16px;
  margin-top: 0;
  color: #961c45;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-manage-widgets {
  display: inline-block;
  margin: 10px 20px 20px 20px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: bold;
  color: white;
  background-color: #2a632c;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.3s ease;
}

.btn-manage-widgets:hover {
  opacity: 0.9;
}

.btn-manage-widgets.violet {
  background-color: #5c1a68;
}
.card-section {
  max-width: 1000px;
  margin: 30px auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
}

.card-header {
  background: #861a3e;
  color: white;
  padding: 16px 20px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-body {
  padding: 20px;
  font-size: 15px;
}
.widget-form {
  background: #f9f9f9;
  padding: 16px;
  margin-bottom: 20px;
  border-left: 4px solid #e91e63;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.widget-form label {
  display: block;
  margin-bottom: 10px;
  font-weight: 500;
}

.widget-form input {
  padding: 8px;
  margin-top: 4px;
  width: 100%;
  box-sizing: border-box;
  border-radius: 4px;
  border: 1px solid #ccc;
  margin-bottom: 12px;
}

.btn-group {
  margin-top: 10px;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  margin-right: 10px;
  color: white;
  font-weight: bold;
}

.btn-sm.edit {
  background-color: #2196f3;
}

.btn-sm.save {
  background-color: #4caf50;
}

.btn-sm.delete {
  background-color: #f44336;
}

pre {
  background: #f0f0f0;
  padding: 12px;
  border-radius: 6px;
  overflow: auto;
  border: 1px solid #ddd;
  max-height: 400px;
}

/* Styles pour les actionneurs */
.actuators {
  margin: 30px auto;
  max-width: 1000px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

#actuators-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px;
}

.actuator-widget {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 20px;
  border-left: 4px solid #961c45;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.actuator-widget h3 {
  margin: 0 0 15px 0;
  color: #961c45;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Boutons ON/OFF */
.on-off-control {
  display: flex;
  align-items: center;
  gap: 15px;
}

.toggle-switch {
  position: relative;
  width: 60px;
  height: 30px;
  background-color: #ccc;
  border-radius: 15px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.toggle-switch.on {
  background-color: #4caf50;
}

.toggle-switch .slider {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.3s;
}

.toggle-switch.on .slider {
  transform: translateX(30px);
}

.status-text {
  font-weight: bold;
  color: #666;
}

.status-text.on {
  color: #4caf50;
}

.status-text.off {
  color: #f44336;
}

/* Contrôles de niveau (sliders) */
.level-control {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.level-slider {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: #ddd;
  outline: none;
  -webkit-appearance: none;
}

.level-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #961c45;
  cursor: pointer;
}

.level-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #961c45;
  cursor: pointer;
  border: none;
}

.level-value {
  min-width: 60px;
  text-align: center;
  font-weight: bold;
  color: #961c45;
  background: #f0f0f0;
  padding: 5px 10px;
  border-radius: 4px;
}

/* Boutons impulsion */
.impulse-control {
  display: flex;
  justify-content: center;
}

.impulse-button {
  background: linear-gradient(135deg, #961c45, #b8285a);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(150, 28, 69, 0.3);
}

.impulse-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(150, 28, 69, 0.4);
}

.impulse-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(150, 28, 69, 0.3);
}

.impulse-button.triggered {
  background: linear-gradient(135deg, #4caf50, #66bb6a);
  animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Responsive design */
@media (max-width: 768px) {
  #actuators-panel {
    grid-template-columns: 1fr;
    padding: 15px;
  }
  
  .actuator-widget {
    padding: 15px;
  }
  
  .slider-container {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  
  .level-value {
    text-align: center;
  }
}

