/* ====== CONTENEUR ====== */
.scenario-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  height: 100%;
  overflow: hidden;
}

/* ====== PANNEAU ARBRE ====== */
.scenario-arbre {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  height: 100%;
  overflow: hidden;
}

.arbre-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-lg);
  border-bottom: 1px solid var(--border);
}

.arbre-header h2 {
  font-size: var(--fs-md);
  color: var(--primary);
}

.arbre-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-md);
}

.arbre-footer {
  display: flex;
  gap: var(--sp-sm);
  padding: var(--sp-md) var(--sp-lg);
  border-top: 1px solid var(--border);
  background: var(--bg);
}

/* Nœuds de l'arbre */
.arbre-node {
  margin-bottom: 2px;
}

.arbre-node-header {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-sm) var(--sp-md);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--primary);
}

.arbre-node-header:hover {
  background: var(--secondary-light);
}

.arbre-node-header.selected {
  background: var(--secondary-light);
  color: var(--primary-dark);
  box-shadow: inset 3px 0 0 var(--secondary);
}

.arbre-toggle {
  transition: transform var(--transition);
  flex-shrink: 0;
}

.arbre-toggle.collapsed {
  transform: rotate(-90deg);
}

.arbre-node-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arbre-node-menu {
  opacity: 0;
  padding: var(--sp-xs);
  border-radius: var(--radius-sm);
  transition: opacity var(--transition);
  flex-shrink: 0;
}

.arbre-node-header:hover .arbre-node-menu {
  opacity: 1;
}

.arbre-node-menu:hover {
  background: var(--border);
}

.arbre-children {
  padding-left: var(--sp-xl);
}

/* Menu contextuel */
.context-menu {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-xs);
  z-index: 500;
  min-width: 150px;
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  width: 100%;
  padding: var(--sp-sm) var(--sp-md);
  font-size: var(--fs-sm);
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  text-align: left;
  color: var(--primary);
}

.context-menu-item:hover {
  background: var(--bg-hover);
}

.context-menu-item.danger {
  color: var(--danger);
}

.context-menu-item.danger:hover {
  background: var(--danger-light);
}

/* ====== PANNEAU ÉDITEUR ====== */
.scenario-editeur {
  height: 100%;
  overflow-y: auto;
  padding: var(--sp-xl);
  background: var(--bg);
}

.editeur-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: var(--sp-lg);
  color: var(--text-light);
  text-align: center;
}

.editeur-placeholder .icon {
  opacity: 0.3;
}

/* En-tête éditeur */
.editeur-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-xl);
  padding-bottom: var(--sp-lg);
  border-bottom: 2px solid var(--secondary);
}

.editeur-titre {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  font-size: var(--fs-lg);
  color: var(--primary);
}

.editeur-id {
  font-size: var(--fs-xs);
  font-family: var(--font-mono);
  color: var(--text-light);
  background: var(--bg);
  padding: 2px var(--sp-sm);
  border-radius: var(--radius-sm);
}

/* Sections accordéon */
.editeur-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-md);
  overflow: hidden;
}

.section-toggle {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  width: 100%;
  padding: var(--sp-md) var(--sp-lg);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--primary);
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
  text-align: left;
}

.section-toggle.active {
  border-bottom-color: var(--border);
}

.section-toggle:hover {
  background: var(--bg-hover);
}

.section-toggle-icon {
  transition: transform var(--transition);
  flex-shrink: 0;
}

.section-toggle-icon.collapsed {
  transform: rotate(-90deg);
}

.section-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: var(--secondary);
  color: var(--primary-dark);
  font-size: var(--fs-xs);
  font-weight: 800;
  flex-shrink: 0;
}

.section-badge {
  margin-left: auto;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--border-light);
  padding: 2px var(--sp-sm);
  border-radius: var(--radius-full);
}

.section-tag {
  margin-left: auto;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-light);
  background: var(--border-light);
  padding: 2px var(--sp-sm);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-content {
  padding: var(--sp-lg);
}

/* Formulaires */
.form-group {
  margin-bottom: var(--sp-md);
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--sp-xs);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--sp-sm) var(--sp-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  background: var(--bg-card);
  transition: border-color var(--transition);
  color: var(--text);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px var(--secondary-light);
}

.form-input:disabled {
  background: var(--bg);
  color: var(--text-light);
  cursor: not-allowed;
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  line-height: 1.6;
}

.form-select {
  cursor: pointer;
}

.form-row {
  display: flex;
  gap: var(--sp-md);
  align-items: flex-end;
  margin-bottom: var(--sp-md);
}

.form-row:last-child {
  margin-bottom: 0;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

/* Barre d'outils message */
.message-toolbar {
  display: flex;
  gap: var(--sp-xs);
  margin-bottom: 0;
  padding: var(--sp-xs);
  background: var(--bg);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.toolbar-btn {
  padding: var(--sp-xs) var(--sp-sm);
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.toolbar-btn:hover {
  background: var(--secondary-light);
}

.message-toolbar + .form-textarea {
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

/* Prévisualisation message */
.message-preview {
  margin-top: var(--sp-sm);
  padding: var(--sp-md);
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  color: var(--text);
  line-height: 1.6;
  min-height: 40px;
}

.message-preview a {
  color: var(--secondary-dark);
  text-decoration: underline;
}

.message-preview .preview-img {
  max-width: 200px;
  max-height: 120px;
  border-radius: var(--radius-sm);
  margin: var(--sp-sm) 0;
}

.preview-vide {
  color: var(--text-light);
  font-style: italic;
}

/* ====== CARTES DE CHOIX ====== */
.choix-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-md);
  overflow: hidden;
  transition: border-color var(--transition);
}

.choix-card:hover {
  border-color: var(--primary-light);
}

.choix-header {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-sm) var(--sp-md);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.choix-numero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: var(--secondary);
  color: var(--primary-dark);
  font-size: var(--fs-xs);
  font-weight: 800;
  flex-shrink: 0;
}

.choix-titre {
  flex: 1;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--primary);
}

.choix-supprimer {
  padding: var(--sp-xs);
  border-radius: var(--radius-sm);
  color: var(--text-light);
  transition: all var(--transition);
}

.choix-supprimer:hover {
  color: var(--danger);
  background: var(--danger-light);
}

.choix-body {
  padding: var(--sp-md);
}

.choix-limite {
  font-size: var(--fs-sm);
  color: var(--text-light);
  font-style: italic;
  text-align: center;
  padding: var(--sp-md);
}

/* Variable dans choix */
.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: var(--sp-sm);
  font-size: var(--fs-sm) !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: var(--primary) !important;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  accent-color: var(--secondary-dark);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.choix-var-fields {
  margin-top: var(--sp-md);
  padding: var(--sp-md);
  background: var(--secondary-light);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--secondary);
}

/* ====== PANNEAU VARIABLES ====== */
.panneau-variables {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
  min-height: 32px;
}

.variables-vide {
  font-size: var(--fs-sm);
  color: var(--text-light);
  font-style: italic;
}

.badge-variable {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  padding: var(--sp-xs) var(--sp-md);
  background: var(--secondary-light);
  color: var(--primary-dark);
  border: 1px solid var(--secondary);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 700;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all var(--transition);
}

.badge-variable:hover {
  background: var(--secondary);
  transform: scale(1.05);
}

/* ====== SECTION DONNÉES / FILTRES ====== */
.donnees-alerte {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: var(--sp-lg);
  background: var(--danger-light);
  border: 1px solid var(--danger);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  color: var(--danger);
}

.filtres-container {
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
}

/* Toggle switch */
.toggle-label {
  display: flex !important;
  align-items: center;
  gap: var(--sp-md);
  cursor: pointer;
  font-size: var(--fs-sm) !important;
  font-weight: 700 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: var(--primary) !important;
}

.toggle-label input[type="checkbox"] {
  display: none;
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--border);
  border-radius: var(--radius-full);
  transition: background var(--transition);
  flex-shrink: 0;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: var(--shadow-sm);
}

.toggle-label input:checked + .toggle-switch {
  background: var(--secondary);
}

.toggle-label input:checked + .toggle-switch::after {
  transform: translateX(20px);
}

.filtres-body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xl);
}

.filtres-section {
  padding: var(--sp-lg);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.filtres-sous-titre {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  font-size: var(--fs-sm);
  color: var(--primary);
  margin-bottom: var(--sp-md);
}

/* Conditions */
.condition-row {
  display: grid;
  grid-template-columns: 1fr 130px 1fr 32px;
  gap: var(--sp-sm);
  align-items: center;
  margin-bottom: var(--sp-sm);
  padding: var(--sp-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.condition-supprimer {
  padding: var(--sp-xs);
  border-radius: var(--radius-sm);
  color: var(--text-light);
  transition: all var(--transition);
}

.condition-supprimer:hover {
  color: var(--danger);
  background: var(--danger-light);
}

/* ====== TEMPLATE ====== */
.template-container {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.template-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-xs);
}

.brique {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  padding: var(--sp-xs) var(--sp-sm);
  font-size: var(--fs-xs);
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-mono);
  color: var(--primary);
}

.brique:hover {
  border-color: var(--secondary);
  background: var(--secondary-light);
}

.brique-colonne {
  color: var(--primary-dark);
  border-color: var(--secondary);
  background: var(--secondary-light);
}

.brique-colonne:hover {
  background: var(--secondary);
}

.template-textarea {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  line-height: 1.6;
}

.template-colonnes {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  flex-wrap: wrap;
}

.template-colonnes-label {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-secondary);
}

.template-colonnes-liste {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-xs);
}

.template-preview {
  border-top: 1px dashed var(--border);
  padding-top: var(--sp-md);
}

.template-preview-label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: var(--sp-sm);
}

.template-preview-carte {
  padding: var(--sp-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  line-height: 2;
  min-height: 40px;
}

.template-preview-carte a {
  color: var(--secondary-dark);
  text-decoration: underline;
}

.template-preview-carte .carte-img {
  max-width: 150px;
  max-height: 80px;
  border-radius: var(--radius-sm);
}

.preview-var {
  background: var(--secondary-light);
  color: var(--primary-dark);
  padding: 1px 4px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
}

.section-badge.actif {
  background: var(--success-light);
  color: var(--success);
}

/* Placeholder */
.placeholder-text {
  font-size: var(--fs-sm);
  color: var(--text-light);
  font-style: italic;
}

.variables-description {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  padding: var(--sp-md);
  background: var(--secondary-light);
  border-left: 3px solid var(--secondary);
  border-radius: var(--radius-sm);
  margin-bottom: var(--sp-md);
}

.variables-description strong {
  color: var(--primary);
}

/* ====== ICÔNES INLINE ====== */
.icone-inline {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.icone-inline .icon {
  width: 18px;
  height: 18px;
}

/* ====== PANNEAU ICÔNES ====== */
.icone-panel-wrapper {
  position: relative;
}

.icone-panel {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 200;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  /* padding: var(--sp-md); */
  width: 320px;
  max-height: 200px;
  overflow-y: auto;
}

.icone-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: var(--sp-xs);
}

.icone-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-sm);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}

.icone-item:hover {
  background: var(--secondary-light);
  border-color: var(--secondary);
  transform: scale(1.1);
}

.icone-item .icon {
  width: 20px;
  height: 20px;
}

/* ====== BADGE VARIABLE INLINE (choix) ====== */
.badge-variable-inline {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  padding: 1px var(--sp-sm);
  background: var(--secondary-light);
  color: var(--primary-dark);
  border: 1px solid var(--secondary);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 700;
  font-family: var(--font-mono);
  margin-left: var(--sp-sm);
}

/* ====== DROPDOWN VARIABLES ====== */
.var-dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.var-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 200;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-xs);
  min-width: 180px;
  max-height: 200px;
  overflow-y: auto;
}

.var-dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  width: 100%;
  padding: var(--sp-sm) var(--sp-md);
  font-size: var(--fs-sm);
  font-weight: 600;
  border-radius: var(--radius-sm);
  color: var(--primary);
  cursor: pointer;
  transition: background var(--transition);
  text-align: left;
}

.var-dropdown-item:hover {
  background: var(--secondary-light);
}

.var-dropdown-empty {
  padding: var(--sp-md);
  font-size: var(--fs-xs);
  color: var(--text-light);
  text-align: center;
  font-style: italic;
}

/* ====== TAG VARIABLE DANS FILTRES ====== */
.condition-valeur-wrapper {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
  position: relative;
}

.condition-valeur-wrapper .form-input {
  flex: 1;
}

.btn-tag-variable {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-xs) var(--sp-sm);
  border-radius: var(--radius-sm);
  border: 1px solid var(--secondary);
  background: var(--secondary-light);
  color: var(--primary-dark);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
  height: 32px;
}

.btn-tag-variable:hover {
  background: var(--secondary);
}

.condition-badge-var {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  padding: 2px var(--sp-sm);
  background: var(--secondary-light);
  color: var(--primary-dark);
  border: 1px solid var(--secondary);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 700;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.condition-badge-var .badge-remove {
  padding: 0 2px;
  font-size: var(--fs-sm);
  color: var(--text-light);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  line-height: 1;
}

.condition-badge-var .badge-remove:hover {
  color: var(--danger);
  background: var(--danger-light);
}

.filtres-var-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 200;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-xs);
  min-width: 160px;
  max-height: 180px;
  overflow-y: auto;
}

/* Bouton retour mobile (éditeur → arbre) */
.btn-retour-mobile {
  display: none;
  align-items: center;
  gap: var(--sp-xs);
  margin-bottom: var(--sp-md);
  padding: var(--sp-sm) var(--sp-md);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--primary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}

.btn-retour-mobile:hover {
  background: var(--secondary-light);
}

/* ====== BOUTON LISTE DANS FILTRES ====== */
.btn-liste-valeurs {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-xs) var(--sp-sm);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-light);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
  height: 32px;
}

.btn-liste-valeurs:hover {
  border-color: var(--secondary);
  background: var(--secondary-light);
  color: var(--primary-dark);
}

/* ====== MODAL LISTE ====== */
.modal-liste-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-liste {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--sp-xl);
  width: 400px;
  max-width: 90vw;
  box-shadow: var(--shadow-lg);
}

.modal-liste h3 {
  font-size: var(--fs-md);
  color: var(--primary);
  margin: 0 0 var(--sp-xs) 0;
}

.modal-liste-info {
  font-size: var(--fs-xs);
  color: var(--text-light);
  margin: 0 0 var(--sp-md) 0;
}

.modal-liste-textarea {
  width: 100%;
  min-height: 150px;
  padding: var(--sp-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  line-height: 1.8;
  resize: vertical;
  margin-bottom: var(--sp-md);
  color: var(--text);
  background: var(--bg-card);
  box-sizing: border-box;
}

.modal-liste-textarea:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px var(--secondary-light);
}

.modal-liste-valider {
  display: block;
  margin-left: auto;
  padding: var(--sp-sm) var(--sp-lg);
  background: var(--secondary);
  color: var(--primary-dark);
  border: none;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition);
}

.modal-liste-valider:hover {
  background: var(--secondary-dark);
  color: white;
}

/* ====== HEADER FILTRES AVEC BOUTON AIDE ====== */
.filtres-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-md);
}

.filtres-header .filtres-sous-titre {
  margin-bottom: 0;
}

.btn-aide-filtres {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--secondary);
  color: var(--primary-dark);
  font-size: var(--fs-sm);
  font-weight: 800;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  flex-shrink: 0;
}

.btn-aide-filtres:hover {
  background: var(--secondary-dark);
  color: white;
  transform: scale(1.1);
}

/* ====== MODAL AIDE ====== */
.modal-aide {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--sp-xl);
  width: 500px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-aide h3 {
  font-size: var(--fs-md);
  color: var(--primary);
  margin: 0 0 var(--sp-lg) 0;
  padding-bottom: var(--sp-sm);
  border-bottom: 2px solid var(--secondary);
}

.modal-aide-section {
  margin-bottom: var(--sp-lg);
}

.modal-aide-section:last-of-type {
  margin-bottom: var(--sp-xl);
}

.modal-aide-section h4 {
  font-size: var(--fs-sm);
  color: var(--primary);
  margin: 0 0 var(--sp-xs) 0;
}

.modal-aide-section p {
  font-size: var(--fs-sm);
  color: var(--text);
  line-height: 1.6;
  margin: 0 0 var(--sp-xs) 0;
}

.modal-aide-exemple {
  padding: var(--sp-sm) var(--sp-md);
  background: var(--secondary-light);
  border-left: 3px solid var(--secondary);
  border-radius: var(--radius-sm);
  margin-top: var(--sp-sm) !important;
}

.modal-aide code {
  padding: 2px 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--primary-dark);
}