/* ====== ICÔNES ====== */
.icon {
  display: inline-block;
  flex-shrink: 0;
  /* Par défaut, icônes en primary en dehors du header */
  filter: brightness(0) saturate(100%) invert(30%) sepia(10%) saturate(800%) hue-rotate(160deg);
}

.icon-xs { width: 14px; height: 14px; }
.icon-sm { width: 18px; height: 18px; }
.icon-md { width: 24px; height: 24px; }
.icon-lg { width: 32px; height: 32px; }
.icon-xl { width: 48px; height: 48px; }
.icon-xxl { width: 64px; height: 64px; }

/* ====== BOUTONS ====== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-sm) var(--sp-lg);
  font-size: var(--fs-sm);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
  border: 1px solid transparent;
}

.btn-accent {
  background: var(--secondary);
  color: var(--primary-dark);
  border-color: var(--secondary);
}

.btn-accent .icon {
  filter: brightness(0) saturate(100%) invert(25%) sepia(10%) saturate(600%) hue-rotate(160deg);
}

.btn-accent:hover {
  background: var(--secondary-dark);
  border-color: var(--secondary-dark);
  color: #FFFFFF;
}

.btn-accent:hover .icon {
  filter: brightness(0) invert(1);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--border);
}

.btn-outline:hover {
  background: var(--bg-hover);
  border-color: var(--primary-light);
}

.btn-danger {
  background: var(--danger-light);
  color: var(--danger);
  border-color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger);
  color: white;
}

.btn-sm {
  padding: var(--sp-xs) var(--sp-md);
  font-size: var(--fs-xs);
}

/* ====== BADGES ====== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  padding: 2px var(--sp-sm);
  font-size: var(--fs-xs);
  font-weight: 700;
  border-radius: var(--radius-full);
  background: var(--secondary-light);
  color: var(--secondary-dark);
}

/* ====== SECTION TITLES ====== */
.section-title {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  font-size: var(--fs-md);
  color: var(--primary);
  margin-bottom: var(--sp-lg);
}

.section-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--secondary);
  color: var(--primary-dark);
  font-size: var(--fs-sm);
  font-weight: 800;
  flex-shrink: 0;
}

/* ====== TOAST ====== */
.toast {
  position: fixed;
  bottom: var(--sp-xl);
  right: var(--sp-xl);
  background: var(--primary-dark);
  color: white;
  padding: var(--sp-md) var(--sp-xl);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 1000;
  max-width: 360px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ====== UTILITAIRES ====== */
.hidden {
  display: none !important;
}

/* ====== POPUP DE CONFIRMATION ====== */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.popup-overlay.visible {
  opacity: 1;
}

.popup-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--sp-xxl);
  max-width: 400px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  text-align: center;
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.popup-overlay.visible .popup-box {
  transform: scale(1);
}

.popup-message {
  font-size: var(--fs-base);
  color: var(--text);
  line-height: 1.6;
  margin-bottom: var(--sp-xl);
}

.popup-actions {
  display: flex;
  gap: var(--sp-md);
  justify-content: center;
}

/* ====== DROPDOWN LANGUE ====== */
.lang-dropdown {
  position: fixed;
  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;
  z-index: 1500;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lang-dropdown-item {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  padding: var(--sp-sm) var(--sp-md);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: var(--fs-sm);
  cursor: pointer;
  text-align: left;
  transition: background var(--transition);
}

.lang-dropdown-item:hover {
  background: var(--bg-hover);
}

.lang-dropdown-item.active {
  background: var(--secondary-light);
  color: var(--primary-dark);
  font-weight: 700;
}

.lang-dropdown-code {
  font-weight: 700;
  min-width: 24px;
  color: var(--primary);
}

.lang-dropdown-item.active .lang-dropdown-code {
  color: var(--primary-dark);
}

.lang-dropdown-label {
  flex: 1;
}