@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

/* ═══════════════════════════════════════════════════════════════
   FOND & BASE — extrait directement de l'aperçu validé
═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100vh;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #fff;
  background: #1b262c;
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(255,64,129,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(233,30,99,0.12) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 60% 30%, rgba(156,39,176,0.08) 0%, transparent 50%);
  background-attachment: fixed;
}

a { color: rgba(255,255,255,0.8); text-decoration: none; }
a:hover { color: #FF4081; }

/* ═══════════════════════════════════════════════════════════════
   CLASSES GLASS — identiques à l'aperçu
═══════════════════════════════════════════════════════════════ */
.glass {
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
}

.glass-strong {
  background: rgba(255,255,255,0.10);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 16px;
}

/* ═══════════════════════════════════════════════════════════════
   BOUTONS
═══════════════════════════════════════════════════════════════ */
.btn-primary {
  background: linear-gradient(135deg, #FF4081 0%, #E91E63 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255,64,129,0.35), inset 0 1px 0 rgba(255,255,255,0.2);
  font-family: inherit;
  letter-spacing: 0.2px;
  transition: filter 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-primary:hover { filter: brightness(1.1); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }

.btn-glass {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  color: rgba(255,255,255,0.8);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, border-color 0.2s;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.btn-glass:hover {
  background: rgba(255,255,255,0.13);
  border-color: rgba(255,255,255,0.28);
  color: #fff;
  text-decoration: none;
}

.btn-ghost {
  background: none;
  border: 1px dashed rgba(255,255,255,0.2);
  border-radius: 10px;
  color: rgba(255,255,255,0.45);
  padding: 9px 18px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
  transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover {
  border-color: rgba(255,64,129,0.5);
  color: #FF4081;
}

/* ═══════════════════════════════════════════════════════════════
   CHAMPS
═══════════════════════════════════════════════════════════════ */
.glass-input,
input[type="text"],
input[type="password"],
input[type="file"],
select,
textarea {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
  padding: 10px 14px;
  width: 100%;
  box-sizing: border-box;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.glass-input:focus,
input[type="text"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
  border-color: rgba(255,64,129,0.6);
  box-shadow: 0 0 0 3px rgba(255,64,129,0.12);
}
input::placeholder,
.glass-input::placeholder { color: rgba(255,255,255,0.25); }

input[type="checkbox"] {
  accent-color: #FF4081;
  width: 16px;
  height: 16px;
  cursor: pointer;
  vertical-align: middle;
}
input[type="file"] {
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════════
   BADGES MODES
═══════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(8px);
  letter-spacing: 0.3px;
}
.b-pink   { background: rgba(255,64,129,0.15); border: 1px solid rgba(255,64,129,0.35); color: #ff80ab; }
.b-green  { background: rgba(52,211,153,0.12); border: 1px solid rgba(52,211,153,0.3);  color: #6ee7b7; }
.b-blue   { background: rgba(96,165,250,0.12); border: 1px solid rgba(96,165,250,0.3);  color: #93c5fd; }
.b-orange { background: rgba(251,146,60,0.12); border: 1px solid rgba(251,146,60,0.3);  color: #fdba74; }
.b-teal   { background: rgba(45,212,191,0.12); border: 1px solid rgba(45,212,191,0.3);  color: #5eead4; }

/* ═══════════════════════════════════════════════════════════════
   ÉTIQUETTES DE SECTION (style aperçu)
═══════════════════════════════════════════════════════════════ */
.gs-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,64,129,0.8);
  margin-bottom: 14px;
}
.gs-divider { height: 1px; background: rgba(255,255,255,0.06); margin: 24px 0; }

/* ═══════════════════════════════════════════════════════════════
   CERCLES NUMÉROTÉS (étapes index)
═══════════════════════════════════════════════════════════════ */
.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255,64,129,0.2);
  border: 1px solid rgba(255,64,129,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: #FF4081;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   TOASTIFY — surcharges glass
═══════════════════════════════════════════════════════════════ */
.toastify {
  font-family: 'Inter', system-ui, sans-serif !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  border-radius: 12px !important;
  padding: 13px 16px !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1) !important;
  max-width: 340px !important;
}

/* Toast progression */
.tp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 9px;
}
.tp-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  color: #bfdbfe;
  font-size: 13px;
}
.tp-counter {
  font-weight: 700;
  color: #93c5fd;
  font-size: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}
.tp-track {
  background: rgba(255,255,255,0.1);
  border-radius: 999px;
  height: 4px;
  overflow: hidden;
}
.tp-fill {
  height: 100%;
  background: linear-gradient(90deg, #60a5fa, #a78bfa);
  border-radius: 999px;
  transition: width 0.5s ease;
}
.tp-detail-link {
  color: #fdba74;
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════════
   PANNEAUX LATÉRAUX (erreurs / alertes)
═══════════════════════════════════════════════════════════════ */
#error-panel,
#alertes-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 95vw;
  height: 100vh;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  background: rgba(27,38,44,0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid rgba(255,255,255,0.1);
  box-shadow: -8px 0 40px rgba(0,0,0,0.4);
  font-family: 'Inter', system-ui, sans-serif;
}
#error-panel.ep-visible,
#alertes-panel.ep-visible { transform: translateX(0); }

#error-panel-header,
#alertes-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  background: rgba(255,64,129,0.12);
  border-bottom: 1px solid rgba(255,64,129,0.2);
  color: #ff80ab;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}
#error-panel-close,
#alertes-panel-close {
  background: none;
  border: none;
  color: #ff80ab;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  line-height: 1;
  padding: 0 4px;
}
#error-panel-close:hover,
#alertes-panel-close:hover { opacity: 1; }

#error-panel-body,
#alertes-panel-body {
  padding: 20px 22px;
  overflow-y: auto;
  flex: 1;
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
}
.ep-cat {
  font-weight: 600;
  color: #ff80ab;
  margin: 14px 0 6px;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
#error-panel-body ul,
#alertes-panel-body ul { margin: 0 0 0 14px; padding: 0; }
#error-panel-body li,
#alertes-panel-body li { margin-bottom: 6px; }

/* ═══════════════════════════════════════════════════════════════
   CONTAINER INDEX
═══════════════════════════════════════════════════════════════ */
.container {
  max-width: 700px;
  width: 100%;
  margin: 40px auto;
  padding: 0 20px;
}

/* ─── Nav barre ─── */
.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}
.page-nav h1 {
  font-size: 18px;
  font-weight: 600;
}
.page-nav-actions { display: flex; gap: 8px; align-items: center; }

/* ─── Zone étapes ─── */
.steps-card {
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  padding: 8px 20px;
  background: rgba(255,255,255,0.04);
}
.step-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.step-row:last-child { border-bottom: none; }
.step-content { flex: 1; min-width: 0; }

#simulation-warning {
  display: none;
  color: #ff80ab;
  font-size: 12px;
  font-weight: 500;
  background: rgba(255,64,129,0.1);
  border: 1px solid rgba(255,64,129,0.2);
  border-radius: 6px;
  padding: 3px 10px;
}

/* ═══════════════════════════════════════════════════════════════
   CONFIG PAGE
═══════════════════════════════════════════════════════════════ */
.config-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}
.wfa-list { list-style: none; margin: 0 0 10px; }
.wfa-item { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.wfa-item input[type="text"] {
  flex: 1;
  padding: 7px 10px !important;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 12px !important;
  border-radius: 8px !important;
  width: auto !important;
}
.btn-remove {
  background: none;
  border: none;
  color: rgba(255,64,129,0.4);
  cursor: pointer;
  font-size: 14px;
  padding: 4px 6px;
  flex-shrink: 0;
  line-height: 1;
  transition: color 0.2s;
}
.btn-remove:hover { color: #FF4081; }
.btn-add-wfa {
  background: none;
  border: 1px dashed rgba(255,255,255,0.15);
  border-radius: 8px;
  color: rgba(255,255,255,0.35);
  padding: 7px 12px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  width: 100%;
  text-align: center;
  transition: all 0.2s;
}
.btn-add-wfa:hover { border-color: rgba(255,64,129,0.4); color: #FF4081; }

/* ═══════════════════════════════════════════════════════════════
   LOGIN PAGE
═══════════════════════════════════════════════════════════════ */
.login-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.login-card {
  width: 340px;
  max-width: 95vw;
  padding: 36px 30px;
}
.login-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #FF4081, #E91E63);
  box-shadow: 0 4px 20px rgba(255,64,129,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 18px;
}
.login-title {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}
.login-subtitle {
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  margin-bottom: 26px;
}
.field-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.field-wrap { margin-bottom: 14px; }
.btn-login {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #FF4081, #E91E63);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255,64,129,0.35), inset 0 1px 0 rgba(255,255,255,0.2);
  margin-top: 8px;
  transition: filter 0.2s;
}
.btn-login:hover { filter: brightness(1.1); }
.login-error {
  background: rgba(255,64,129,0.1);
  border: 1px solid rgba(255,64,129,0.25);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #ff80ab;
  margin-bottom: 16px;
  text-align: center;
}
