/* ================================================================
   DESIGN SYSTEM — Agent PHP Standalone — Thème clair professionnel
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #F5F7FA;
  --surface:      #FFFFFF;
  --surface-2:    #F8FAFC;
  --border:       #E2E8F0;
  --border-2:     #CBD5E1;
  --primary:      #2563EB;
  --primary-light:#DBEAFE;
  --primary-hover:#1D4ED8;
  --success:      #16A34A;
  --success-bg:   #DCFCE7;
  --warning:      #D97706;
  --warning-bg:   #FEF3C7;
  --error:        #DC2626;
  --error-bg:     #FEE2E2;
  --info:         #0284C7;
  --info-bg:      #E0F2FE;
  --text:         #0F172A;
  --text-2:       #475569;
  --text-3:       #94A3B8;
  --mono:         'Consolas', 'Cascadia Code', 'Fira Code', monospace;
  --radius:       12px;
  --shadow:       0 1px 3px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04);
  --shadow-lg:    0 4px 24px rgba(0,0,0,0.10);
}

html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg); color: var(--text);
  min-height: 100vh; display: flex; flex-direction: column; line-height: 1.6;
}

/* TOPBAR */
.topbar {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 0 30px; height: 61px;
  display: flex; align-items: center; gap: 20px;
  position: sticky; top: 0; z-index: 100;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-icon {
  width: 37px; height: 37px; background: var(--primary);
  border-radius: 9px; display: flex; align-items: center; justify-content: center;
}
.brand-name { font-size: 1rem; font-weight: 700; color: var(--text); }
.brand-sub  { font-size: 0.75rem; color: var(--text-3); margin-top: 2px; }
.sep { width: 1px; height: 32px; background: var(--border); }
.topbar-tabs { display: flex; gap: 4px; flex: 1; }
.tab-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 17px; border-radius: 9px;
  font-size: 0.88rem; font-weight: 600;
  cursor: pointer; border: none; background: transparent; color: var(--text-2); transition: all 0.15s;
}
.tab-btn.active { background: var(--primary-light); color: var(--primary); }
.tab-btn:hover:not(.active) { background: var(--surface-2); color: var(--text); }
.tab-badge {
  background: var(--primary); color: #fff;
  font-size: 0.72rem; font-weight: 700; padding: 2px 8px; border-radius: 10px;
}
.tab-badge.green  { background: var(--success); }
.tab-badge.orange { background: var(--warning); }
.pill-paused  { background: var(--warning-bg);  color: var(--warning); }
.pill-waiting { background: #F3F4F6;             color: #374151; }
.topbar-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.status-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 15px; border-radius: 100px;
  font-size: 0.82rem; font-weight: 600;
}
.pill-ready   { background: var(--info-bg);       color: var(--info); }
.pill-running { background: var(--primary-light);  color: var(--primary); }
.pill-done    { background: var(--success-bg);     color: var(--success); }
.pill-error   { background: var(--error-bg);       color: var(--error); }
.dot-anim {
  width: 8px; height: 8px; border-radius: 50%; background: currentColor;
  animation: dotpulse 2s ease-in-out infinite;
}
@keyframes dotpulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* LAYOUT */
.screens { flex: 1; }
.screen { display: none; }
.screen.active { display: block; }
.main {
  max-width: 1100px; width: 100%;
  margin: 0 auto; padding: 30px 27px;
}

/* CARDS & FORMS */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 25px 27px;
  box-shadow: var(--shadow); margin-bottom: 20px;
}
.card-title {
  font-size: 0.95rem; font-weight: 700; color: var(--text);
  margin-bottom: 5px; display: flex; align-items: center; gap: 10px;
}
.card-sub { font-size: 0.82rem; color: var(--text-2); margin-bottom: 19px; }
.card-icon {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.icon-blue   { background: var(--primary-light); }
.icon-green  { background: var(--success-bg); }
.icon-orange { background: var(--warning-bg); }
.form-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px 24px; }
.form-group  { display: flex; flex-direction: column; gap: 6px; }
label {
  font-size: 0.9rem; font-weight: 600; color: var(--text);
  display: flex; justify-content: space-between; align-items: center;
}
.label-hint { font-size: 0.8rem; font-weight: 400; color: var(--text-3); }
input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
select {
  width: 100%; padding: 10px 14px;
  font-size: 0.88rem; border: 1px solid var(--border-2);
  border-radius: 8px; background: var(--surface); color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s; font-family: inherit;
}
input:focus, select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.input-group { position: relative; display: flex; }
.input-group input { padding-right: 50px; }
.input-toggle {
  position: absolute; right: 1px; top: 50%; transform: translateY(-50%);
  width: 46px; height: calc(100% - 2px);
  border: none; background: transparent; cursor: pointer;
  font-size: 1rem; color: var(--text-3); border-radius: 0 7px 7px 0;
  display: flex; align-items: center; justify-content: center;
}
.input-toggle:hover { color: var(--text); background: var(--surface-2); }
.field-success {
  display: flex; align-items: center; gap: 7px;
  font-size: 0.88rem; color: var(--success); margin-top: 5px;
}

/* BOUTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 19px; border-radius: 9px;
  font-size: 0.88rem; font-weight: 600;
  cursor: pointer; border: 1px solid transparent;
  transition: all 0.15s; font-family: inherit;
}
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-primary:disabled { background: var(--border-2); border-color: var(--border-2); color: var(--text-3); cursor: not-allowed; opacity: 0.7; }
.btn-primary:disabled:hover { background: var(--border-2); border-color: var(--border-2); }
.btn-secondary { background: var(--surface); color: var(--text-2); border-color: var(--border-2); }
.btn-secondary:hover { background: var(--surface-2); color: var(--text); }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-danger  { background: var(--error-bg); color: var(--error); border-color: #FECACA; }
.btn-danger:hover { background: var(--error); color: #fff; }
.btn-lg { padding: 12px 27px; font-size: 0.88rem; }
.btn-sm { padding: 7px 14px; font-size: 0.78rem; }
.btn-test {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 17px; border-radius: 9px; font-size: 0.82rem; font-weight: 600;
  border: 1px solid var(--primary-light); background: var(--primary-light); color: var(--primary);
  cursor: pointer; transition: all 0.15s; margin-top: 2px;
}
.btn-test:hover { background: var(--primary); color: #fff; }
.btn-test:disabled {
  opacity: 0.45; cursor: not-allowed;
}
.btn-test:disabled:hover { background: var(--primary-light); color: var(--primary); }

.info-box {
  background: var(--info-bg); border: 1px solid #BAE6FD; border-radius: 10px;
  padding: 14px 15px; display: flex; gap: 12px; align-items: flex-start;
  font-size: 0.82rem; color: var(--info); margin-bottom: 19px;
}
.info-box svg { flex-shrink: 0; margin-top: 1px; }
.divider { height: 1px; background: var(--border); margin: 22px 0; }

/* CONFIGURATION SCREEN */
.config-header { text-align: center; padding: 32px 20px 26px; }
.config-header h1 { font-size: 1.44rem; font-weight: 800; color: var(--text); margin-bottom: 8px; }
.config-header p  { font-size: 0.88rem; color: var(--text-2); max-width: 560px; margin: 0 auto; }

.config-steps {
  display: flex; justify-content: center; align-items: flex-start;
  gap: 0; max-width: 700px; margin: 0 auto 34px;
}
.config-step { flex: 1; display: flex; flex-direction: column; align-items: center; position: relative; }
.config-step:not(:last-child)::after {
  content: ''; position: absolute; top: 20px; left: 50%;
  width: 100%; height: 2px; background: var(--border-2); z-index: 0;
}
.config-step.done:not(:last-child)::after  { background: var(--success); }
.step-circle {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.82rem; font-weight: 700;
  border: 2px solid var(--border-2); background: var(--surface); color: var(--text-3);
  position: relative; z-index: 1; transition: all 0.2s; margin-bottom: 8px;
}
.step-circle.active { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.step-circle.done   { border-color: var(--success); background: var(--success); color: #fff; }
.step-label { font-size: 0.82rem; font-weight: 600; color: var(--text-3); text-align: center; }
.step-label.active { color: var(--primary); }
.step-label.done   { color: var(--success); }

/* MONITORING */
.monitor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; margin-bottom: 19px; }
.server-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 17px 19px;
  display: flex; align-items: flex-start; gap: 14px; box-shadow: var(--shadow);
}
.server-card-body { flex: 1; min-width: 0; }
.server-label {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.9px;
  color: var(--text-3); margin-bottom: 4px;
}
.server-host   { font-size: 0.88rem; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.server-detail { font-size: 0.82rem; color: var(--text-2); font-family: var(--mono); }
.server-status { display: flex; align-items: center; gap: 7px; font-size: 0.82rem; color: var(--text-2); margin-top: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dot-green { background: var(--success); box-shadow: 0 0 5px var(--success); }
.dot-blue  { background: var(--primary); box-shadow: 0 0 5px var(--primary); }

.phases-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 25px; margin-bottom: 17px; box-shadow: var(--shadow);
}
.phases-row {
  display: grid; grid-template-columns: repeat(5, 1fr);
  position: relative; margin-bottom: 24px;
}
.phases-row::before {
  content: ''; position: absolute;
  top: 21px; left: 10%; right: 10%; height: 2px;
  background: var(--border); z-index: 0;
}
.phase-item { display: flex; flex-direction: column; align-items: center; gap: 10px; z-index: 1; }
.phase-circle {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--border-2); background: var(--surface); color: var(--text-3);
  font-size: 0.82rem; font-weight: 700; transition: all 0.3s;
}
.phase-circle.done   { background: var(--success-bg); border-color: var(--success); color: var(--success); }
.phase-circle.active { background: var(--primary-light); border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 5px rgba(37,99,235,0.12); animation: phase-pulse 2s ease-in-out infinite; }
@keyframes phase-pulse { 0%,100% { box-shadow: 0 0 0 5px rgba(37,99,235,0.12); } 50% { box-shadow: 0 0 0 10px rgba(37,99,235,0.05); } }
.phase-name { font-size: 0.84rem; font-weight: 600; color: var(--text-2); text-align: center; line-height: 1.3; }
.phase-name.active { color: var(--primary); font-weight: 700; }
.phase-name.done   { color: var(--success); }
.phase-dur  { font-size: 0.78rem; color: var(--text-3); font-family: var(--mono); }

.progress-bar-wrap { margin-top: 10px; }
.progress-bar-header { display: flex; justify-content: space-between; margin-bottom: 10px; }
.progress-bar-label { font-size: 0.88rem; color: var(--text-2); }
.progress-bar-pct   { font-size: 0.95rem; font-weight: 800; color: var(--text); font-family: var(--mono); }
.progress-bar-bg    { height: 9px; background: var(--border); border-radius: 100px; overflow: hidden; }
.progress-bar-fill {
  height: 100%; border-radius: 100px;
  background: linear-gradient(90deg, var(--primary), #60a5fa);
  background-size: 200% 100%; animation: shimmer 2s linear infinite; transition: width 0.5s ease;
}
@keyframes shimmer { 0%{background-position:0%} 100%{background-position:200%} }
.progress-bar-eta { font-size: 0.84rem; color: var(--text-3); text-align: right; margin-top: 6px; }

.current-op-card {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--primary); border-radius: var(--radius);
  padding: 17px 22px; display: flex; align-items: center; gap: 17px;
  margin-bottom: 17px; box-shadow: var(--shadow);
}
.op-spinner {
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--primary-light); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; animation: spin 2s linear infinite;
}
@keyframes spin { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }
.op-text { flex: 1; min-width: 0; }
.op-action { font-size: 0.88rem; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.op-file   { font-size: 0.85rem; color: var(--text-2); font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-stats  { display: flex; gap: 24px; flex-shrink: 0; }
.op-stat   { text-align: right; }
.op-stat-val   { font-size: 0.95rem; font-weight: 800; color: var(--text); font-family: var(--mono); }
.op-stat-label { font-size: 0.72rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }

.metrics-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 19px; }
.metric {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 17px 19px; box-shadow: var(--shadow);
}
.metric-label { font-size: 0.67rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.7px; color: var(--text-3); margin-bottom: 7px; }
.metric-value { font-size: 1.28rem; font-weight: 800; line-height: 1; margin-bottom: 4px; }
.metric-sub   { font-size: 0.82rem; color: var(--text-2); }
.val-blue   { color: var(--primary); }
.val-green  { color: var(--success); }
.val-orange { color: var(--warning); }
.val-indigo { color: #6366f1; }

/* CONSOLE */
.console-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 20px;
}
.console-header {
  background: var(--surface-2); border-bottom: 1px solid var(--border);
  padding: 14px 19px; display: flex; align-items: center; justify-content: space-between;
}
.console-title-wrap { display: flex; align-items: center; gap: 10px; }
.console-live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--success); animation: dotpulse 2s ease-in-out infinite; }
.console-title { font-size: 0.88rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-2); }
.console-tools { display: flex; align-items: center; gap: 8px; }
.filter-chip {
  padding: 5px 12px; border-radius: 100px; font-size: 0.78rem; font-weight: 600;
  cursor: pointer; border: 1px solid var(--border-2); background: transparent; color: var(--text-3);
}
.filter-chip.active { background: var(--primary-light); color: var(--primary); border-color: #BFDBFE; }
.filter-chip:hover  { background: var(--surface-2); color: var(--text-2); }
.con-btn {
  padding: 6px 14px; border-radius: 7px; font-size: 0.78rem; font-weight: 600;
  cursor: pointer; border: 1px solid var(--border-2); background: transparent; color: var(--text-2);
}
.con-btn:hover { background: var(--surface-2); }
.console-body {
  height: 374px; overflow-y: auto; padding: 10px 0;
  font-family: var(--mono); font-size: 0.72rem; line-height: 1.8;
  background: #FAFBFD; scrollbar-width: thin;
}
.log-line { display: flex; align-items: baseline; padding: 2px 19px; }
.log-line:hover { background: rgba(37,99,235,0.03); }
.log-ts  { color: var(--text-3); font-size: 0.67rem; flex-shrink: 0; margin-right: 12px; user-select: none; }
.log-lvl {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.4px; flex-shrink: 0;
  margin-right: 12px; min-width: 52px; padding: 1px 6px; border-radius: 4px; text-align: center;
}
.lvl-info { color: var(--info);    background: var(--info-bg); }
.lvl-ok   { color: var(--success); background: var(--success-bg); }
.lvl-warn { color: var(--warning); background: var(--warning-bg); }
.lvl-err  { color: var(--error);   background: var(--error-bg); }
.lvl-file { color: #7C3AED;        background: #EDE9FE; }
.log-msg  { color: var(--text-2);  word-break: break-all; }
.msg-ok   { color: #15803D; }
.msg-warn { color: #B45309; }
.msg-err  { color: #B91C1C; }
.msg-file { color: #6D28D9; }
.console-footer {
  background: var(--surface-2); border-top: 1px solid var(--border);
  padding: 8px 19px; display: flex; justify-content: space-between; align-items: center;
}
.console-count { font-size: 0.78rem; color: var(--text-3); font-family: var(--mono); }
.autoscroll-label { display: flex; align-items: center; gap: 7px; font-size: 0.78rem; color: var(--text-3); cursor: pointer; }

/* SECURITY BAR */
.security-bar {
  background: #F0F9FF; border: 1px solid #BAE6FD; border-radius: 12px;
  padding: 14px 19px; display: flex; align-items: center; gap: 12px;
  font-size: 0.78rem; color: var(--info);
}
.security-bar-text { flex: 1; color: var(--text-2); }
.security-bar-text strong { color: var(--primary); }
.token-badge {
  font-family: var(--mono); font-size: 0.82rem;
  background: var(--primary-light); color: var(--primary);
  border: 1px solid #BFDBFE; border-radius: 7px; padding: 6px 14px; flex-shrink: 0;
}

/* ─── BARRE D'ACTIONS ─────────────────────────── */
.action-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 17px 20px;
  margin-bottom: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.action-bar-status {
  display: flex;
  align-items: center;
  gap: 12px;
}
.state-indicator {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 700;
}
.state-running  { background: var(--primary-light); color: var(--primary); }
.state-paused   { background: var(--warning-bg);    color: var(--warning); }
.state-done     { background: var(--success-bg);    color: var(--success); }
.state-error    { background: var(--error-bg);      color: var(--error); }
.state-waiting  { background: #F3F4F6;              color: #374151; }
.state-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: currentColor;
}
.state-dot.anim { animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.action-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-action {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px; border-radius: 9px;
  font-size: 0.82rem; font-weight: 600;
  cursor: pointer; border: 1.5px solid transparent;
  transition: all 0.15s; white-space: nowrap;
  font-family: inherit;
}
.btn-action:disabled { opacity: 0.38; cursor: not-allowed; }
.btn-pause    { background: var(--warning-bg); color: var(--warning); border-color: var(--warning); }
.btn-pause:hover:not(:disabled)    { background: #FCD34D; }
.btn-resume   { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.btn-resume:hover:not(:disabled)   { background: #BFDBFE; }
.btn-restart  { background: #F3F4F6; color: var(--text); border-color: var(--border-2); }
.btn-restart:hover:not(:disabled)  { background: var(--border); }
.btn-cancel   { background: var(--error-bg); color: var(--error); border-color: var(--error); }
.btn-cancel:hover:not(:disabled)   { background: #FECACA; }

/* ─── ÉCRAN TERMINÉ ──────────────────────────── */
.completed-card {
  background: var(--success-bg);
  border: 1.5px solid #86EFAC;
  border-radius: var(--radius);
  padding: 30px 27px;
  text-align: center;
  margin-bottom: 17px;
}
.completed-icon {
  width: 54px; height: 54px;
  background: var(--success);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 15px;
}
.completed-title { font-size: 1.12rem; font-weight: 800; color: var(--success); margin-bottom: 7px; }
.completed-sub   { font-size: 0.9rem;  color: var(--text-2); margin-bottom: 24px; }
.completed-stats {
  display: flex; justify-content: center; gap: 32px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.cstat { text-align: center; }
.cstat-val  { font-size: 1.12rem; font-weight: 800; color: var(--text); }
.cstat-lbl  { font-size: 0.78rem; color: var(--text-2); margin-top: 3px; }
.completed-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ─── ÉCRAN ERREUR ────────────────────────────── */
.error-card {
  background: var(--error-bg);
  border: 1.5px solid #FCA5A5;
  border-radius: var(--radius);
  padding: 24px 27px;
  margin-bottom: 17px;
}
.error-header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.error-icon {
  width: 40px; height: 40px; background: var(--error); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.error-title { font-size: 0.95rem; font-weight: 800; color: var(--error); }
.error-code  { font-size: 0.8rem; color: var(--error); opacity: 0.8; margin-top: 3px; font-family: var(--mono); }
.error-msg   { font-size: 0.88rem; color: #7F1D1D; background: #FEE2E2; border-radius: 8px; padding: 12px 16px; margin-bottom: 18px; line-height: 1.6; }
.error-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Modal de confirmation */
.modal-backdrop {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.4); z-index: 500;
  align-items: center; justify-content: center;
}
.modal-backdrop.open { display: flex; }
.modal-box {
  background: #fff; border-radius: 14px; padding: 32px 28px;
  max-width: 420px; width: calc(100% - 32px);
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
}
.modal-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; }
.modal-body  { font-size: 0.9rem; color: var(--text-2); line-height: 1.6; margin-bottom: 24px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* Tableau de sélection des candidats backup (CDC §4.1.5) */
.candidates-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  margin-top: 4px;
}
.candidates-table thead th {
  text-align: left;
  font-weight: 700;
  color: var(--text-2);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-2);
  background: var(--surface-2);
}
.candidates-table tbody td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.candidates-table tbody tr:hover {
  background: var(--surface-2);
}
.candidates-table tbody tr.selected {
  background: var(--primary-light);
}
.candidates-table .candidate-format {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border-2);
}
.candidates-table .candidate-format.confirmed {
  background: var(--success-bg);
  color: var(--success);
  border-color: var(--success);
}
.candidates-table .candidate-format.ambiguous {
  background: #FEF3C7;
  color: #92400E;
  border-color: #FCD34D;
}
.candidates-table input[type="radio"] {
  width: 16px; height: 16px; cursor: pointer;
  accent-color: var(--primary);
}

/* Liste déroulante des formats possibles (Ambiguous 2+ formats) — CDC §4.1.5 */
.candidate-format-select {
  display: inline-block;
  padding: 4px 28px 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  background: #FEF3C7;
  color: #92400E;
  border: 1px solid #FCD34D;
  cursor: pointer;
  font-family: inherit;
  appearance: auto;
  -webkit-appearance: auto;
  max-width: 320px;
}
.candidate-format-select:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
