/* ============================================================
   PLATEFORME APPROBATION DES COMPTES — Premium Legal Theme
   ============================================================ */

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

:root {
  --navy: #0D1B2A;
  --navy-dark: #071018;
  --navy-light: #1E3554;
  --gold: #C9A84C;
  --gold-light: #DDB95E;
  --gold-pale: #F8F3E6;
  --white: #ffffff;
  --bg: #F6F3EE;
  --card: #ffffff;
  --text: #1a1f2e;
  --text-muted: #64748b;
  --border: #DDD8CF;
  --border-focus: #C9A84C;
  --success: #065f46;
  --success-bg: #d1fae5;
  --warning: #92400e;
  --warning-bg: #fef3c7;
  --error: #991b1b;
  --error-bg: #fee2e2;
  --info: #1e3a6b;
  --info-bg: #dbeafe;
  --shadow: 0 2px 8px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.1), 0 4px 8px rgba(0,0,0,0.06);
  --radius: 9px;
  --radius-lg: 14px;
  --font-serif: 'Playfair Display', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── HEADER ── */
.header {
  background: var(--navy);
  color: white;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-logo {
  width: 36px;
  height: 36px;
  background: var(--gold);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  font-family: 'Playfair Display', serif;
}
.header-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.header-subtitle {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.6);
  margin-top: -2px;
}
.header-badge {
  background: rgba(196, 163, 58, 0.2);
  border: 1px solid var(--gold);
  color: var(--gold-light);
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* ── LAYOUT ── */
.app-layout {
  display: flex;
  min-height: calc(100vh - 64px);
  max-width: 1400px;
  margin: 0 auto;
}

/* ── SIDEBAR ── */
.sidebar {
  width: 280px;
  flex-shrink: 0;
  background: white;
  border-right: 1px solid var(--border);
  padding: 2rem 1.25rem;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.sidebar-title {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.step-list { list-style: none; flex: 1; }
.step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  margin-bottom: 4px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-muted);
  position: relative;
}
.step-item::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 0;
  background: var(--gold);
  border-radius: 2px;
  transition: height 0.2s;
}
.step-item.active { background: var(--gold-pale); color: var(--navy); }
.step-item.active::before { height: 28px; }
.step-item.completed { color: var(--success); }
.step-item.completed .step-num { background: var(--success); color: white; }
.step-item.visited { color: var(--navy); cursor: pointer; }
.step-item.visited .step-num { border-color: var(--navy); color: var(--navy); }
.step-item:hover:not(.active) { background: var(--bg); }
.step-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}
.step-item.active .step-num { background: var(--navy); color: white; }
.step-info { flex: 1; min-width: 0; }
.step-name {
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.step-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.step-item.active .step-name { font-weight: 600; color: var(--navy); }

/* ── MAIN CONTENT ── */
.main-content {
  flex: 1;
  padding: 2rem;
  min-width: 0;
  max-width: 800px;
}

/* ── PROGRESS BAR ── */
.progress-container {
  margin-bottom: 2rem;
}
.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.progress-text {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}
.progress-pct {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--navy);
}
.progress-bar {
  height: 5px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--navy) 0%, var(--gold) 100%);
  border-radius: 10px;
  transition: width 0.4s ease;
}

/* ── STEP CARD ── */
.step-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.step-card-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: white;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.step-card-icon {
  width: 42px; height: 42px;
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.step-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 600;
}
.step-card-subtitle {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  margin-top: 2px;
}
.step-card-body { padding: 2rem; }

/* ── FORM ELEMENTS ── */
.form-section {
  margin-bottom: 1.75rem;
}
.form-section-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--navy);
  margin-bottom: 1rem;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--gold-pale);
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-section-title::before {
  content: '';
  width: 3px; height: 14px;
  background: var(--gold);
  border-radius: 2px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-grid.cols-1 { grid-template-columns: 1fr; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 5px;
}
label .required { color: var(--error); font-weight: 700; }
label .hint {
  font-size: 0.68rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: auto;
}
input[type="text"], input[type="number"], input[type="date"], input[type="email"],
select, textarea {
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(27, 58, 107, 0.1);
}
input.error, select.error, textarea.error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(153, 27, 27, 0.1);
}
input[readonly] { background: var(--bg); color: var(--text-muted); }
select { cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}
textarea { resize: vertical; min-height: 80px; }

/* ── RADIO / CHECKBOX GROUPS ── */
.radio-group, .checkbox-group { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-option, .checkbox-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.85rem;
  font-weight: 500;
  user-select: none;
  white-space: nowrap;
}
.radio-option:hover, .checkbox-option:hover { border-color: var(--navy-light); background: var(--bg); }
.radio-option.selected, .checkbox-option.selected {
  border-color: var(--navy);
  background: rgba(27, 58, 107, 0.06);
  color: var(--navy);
}
.radio-option input, .checkbox-option input { display: none; }
.radio-dot {
  width: 14px; height: 14px;
  border: 2px solid var(--border);
  border-radius: 50%;
  transition: all 0.15s;
}
.radio-option.selected .radio-dot { border-color: var(--navy); background: var(--navy); box-shadow: inset 0 0 0 2px white; }

/* ── SWITCH TOGGLE ── */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: var(--radius);
  margin-bottom: 8px;
  cursor: pointer;
}
.toggle-row:hover { background: var(--gold-pale); }
.toggle-label { font-size: 0.875rem; font-weight: 500; flex: 1; }
.toggle-sub { font-size: 0.72rem; color: var(--text-muted); margin-top: 2px; }
.toggle {
  width: 42px; height: 24px;
  background: var(--border);
  border-radius: 12px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle.on { background: var(--navy); }
.toggle-knob {
  width: 18px; height: 18px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 3px; left: 3px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle.on .toggle-knob { transform: translateX(18px); }

/* ── ALERTS ── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.85rem;
}
.alert-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.alert.error { background: var(--error-bg); color: var(--error); border-left: 3px solid var(--error); }
.alert.warning { background: var(--warning-bg); color: var(--warning); border-left: 3px solid var(--gold); }
.alert.success { background: var(--success-bg); color: var(--success); border-left: 3px solid var(--success); }
.alert.info { background: var(--info-bg); color: var(--info); border-left: 3px solid var(--info); }

/* ── UPLOAD ZONE ── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  background: #fafbff;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--navy-light);
  background: var(--info-bg);
}
.upload-zone-icon { font-size: 2rem; margin-bottom: 8px; }
.upload-zone-text { font-size: 0.88rem; color: var(--text); margin-bottom: 4px; }
.upload-zone-sub { font-size: 0.76rem; color: var(--text-muted); }

/* ── INFO BOX ── */
.info-box {
  background: var(--info-bg);
  border: 1px solid rgba(30, 64, 175, 0.2);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 0.82rem;
  color: var(--info);
  margin-bottom: 1rem;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

/* ── COMPUTED FIELD ── */
.computed-field {
  background: linear-gradient(135deg, var(--gold-pale), rgba(196, 163, 58, 0.08));
  border: 1px solid rgba(196, 163, 58, 0.4);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-top: 6px;
}
.computed-label { font-size: 0.72rem; font-weight: 600; color: var(--gold); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.computed-value { font-size: 1.1rem; font-weight: 700; color: var(--navy); font-family: 'Playfair Display', serif; }
.computed-value.negative { color: var(--error); }

/* ── AFFECTATION BALANCE ── */
.affectation-table {
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}
.affectation-row {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
  font-size: 0.85rem;
}
.affectation-row:last-child { border-bottom: none; }
.affectation-row.total {
  background: var(--navy);
  color: white;
  font-weight: 600;
}
.affectation-row.total.ok { background: var(--success); }
.affectation-row.total.error { background: var(--error); }
.affectation-key { flex: 1; font-weight: 500; }
.affectation-val { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 120px; text-align: right; }

/* ── ASSOCIES TABLE ── */
.associes-table { width: 100%; border-collapse: separate; border-spacing: 0; margin-bottom: 1rem; }
.associes-table th {
  background: var(--navy);
  color: white;
  padding: 10px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.associes-table th:first-child { border-radius: 8px 0 0 0; }
.associes-table th:last-child { border-radius: 0 8px 0 0; }
.associes-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  vertical-align: middle;
}
.associes-table tr:last-child td { border-bottom: none; }
.associes-table tr:nth-child(even) td { background: var(--bg); }
.associes-table .total-row td { background: var(--gold-pale); font-weight: 700; color: var(--navy); }
.associes-table td input { padding: 5px 8px; border: 1px solid var(--border); border-radius: 5px; font-size: 0.82rem; width: 100%; }
.associes-table td select { padding: 5px 8px; font-size: 0.82rem; width: 100%; }

.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1.5px dashed var(--navy-light);
  border-radius: var(--radius);
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  background: white;
  transition: all 0.15s;
  margin-bottom: 1rem;
}
.btn-add:hover { background: var(--bg); border-color: var(--navy); }
.btn-del {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: none;
  background: var(--error-bg);
  color: var(--error);
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}
.btn-del:hover { background: var(--error); color: white; }

/* ── NAVIGATION BUTTONS ── */
.nav-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  font-family: 'Inter', sans-serif;
}
.btn-primary {
  background: var(--navy);
  color: white;
}
.btn-primary:hover { background: var(--navy-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-secondary {
  background: white;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { background: var(--bg); color: var(--text); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy);
  font-weight: 700;
}
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(196, 163, 58, 0.4); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }

/* ── RECAP / REVIEW ── */
.recap-section { margin-bottom: 1.5rem; }
.recap-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.75rem;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.recap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.recap-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 12px;
  background: var(--bg);
  border-radius: 6px;
  font-size: 0.82rem;
}
.recap-key { color: var(--text-muted); flex: 1; }
.recap-val { font-weight: 600; color: var(--text); text-align: right; }

/* ── DOCUMENTS LIST ── */
.doc-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 1.5rem; }
.doc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.85rem;
}
.doc-icon { font-size: 1.2rem; flex-shrink: 0; }
.doc-name { font-weight: 500; flex: 1; }
.doc-badge {
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.doc-badge.obligatoire { background: var(--navy); color: white; }
.doc-badge.recommande { background: var(--gold-pale); color: var(--gold); border: 1px solid var(--gold); }

/* ── GENERATE BOX ── */
.generate-box {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  margin-top: 1.5rem;
}
.generate-box h3 { font-family: 'Playfair Display', serif; font-size: 1.3rem; margin-bottom: 0.5rem; }
.generate-box p { font-size: 0.85rem; color: rgba(255,255,255,0.75); margin-bottom: 1.5rem; }

/* ── LOADING OVERLAY ── */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  backdrop-filter: blur(4px);
}
.loading-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  max-width: 320px;
  box-shadow: var(--shadow-lg);
}
.loading-spinner {
  width: 48px; height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-weight: 600; color: var(--navy); margin-bottom: 8px; }
.loading-sub { font-size: 0.8rem; color: var(--text-muted); }

/* ── ERROR MESSAGES ── */
.field-error { font-size: 0.75rem; color: var(--error); font-weight: 500; display: flex; align-items: center; gap: 4px; }

/* ── DATE LIMIT BADGE ── */
.date-limit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--info-bg);
  color: var(--info);
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 500;
  margin-top: 8px;
}
.date-limit.late { background: var(--error-bg); color: var(--error); }

/* ── FORM SUMMARY CHIP ── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: rgba(27, 58, 107, 0.08);
  color: var(--navy);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .main-content { padding: 1rem; max-width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid.cols-3 { grid-template-columns: 1fr 1fr; }
  .recap-grid { grid-template-columns: 1fr; }
}

/* ── UTILITIES ── */
.hidden { display: none !important; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.text-muted { color: var(--text-muted); font-size: 0.8rem; }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-gold { color: var(--gold); }
.font-bold { font-weight: 700; }

/* ══════════════════════════════════════════════════════════
   APP PAGE — Nouveau header premium (app.html)
══════════════════════════════════════════════════════════ */
.app-page { background: var(--bg); }

.app-header {
  background: var(--navy);
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem;
  position: sticky; top: 0; z-index: 200;
  box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 4px 20px rgba(0,0,0,.25);
  border-bottom: 1px solid rgba(201,168,76,.15);
}
.app-header-left {
  display: flex; align-items: center; gap: 0;
}
.app-header-home {
  display: flex; align-items: center; gap: 6px;
  color: rgba(255,255,255,.45);
  font-size: .75rem; font-weight: 500; letter-spacing: .04em;
  text-decoration: none; text-transform: uppercase;
  padding: 6px 12px 6px 0;
  transition: color .2s;
}
.app-header-home:hover { color: var(--gold-light); }
.app-header-home svg { flex-shrink: 0; }
.app-header-divider {
  width: 1px; height: 24px;
  background: rgba(255,255,255,.12);
  margin: 0 16px;
}
.app-header-brand { display: flex; align-items: center; gap: 12px; }
.app-header-logo {
  width: 34px; height: 34px;
  background: var(--gold);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--navy);
}
.app-header-title {
  font-family: var(--font-serif, 'Playfair Display', serif);
  font-size: 1rem; font-weight: 600; letter-spacing: .08em; color: white;
}
.app-header-sub {
  font-size: .66rem; color: rgba(255,255,255,.45); letter-spacing: .04em;
}
.app-header-badge {
  background: rgba(201,168,76,.15);
  border: 1px solid rgba(201,168,76,.4);
  color: var(--gold-light);
  font-size: .68rem; padding: 3px 10px; border-radius: 20px;
  font-weight: 500; letter-spacing: .04em;
}

/* Upload zone premium */
.upload-zone {
  border-color: var(--border);
  background: var(--gold-pale);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--gold);
  background: #fdf8ed;
  box-shadow: 0 0 0 4px rgba(201,168,76,.08);
}

/* Step card header — gold accent */
.step-card {
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.step-card-header {
  background: linear-gradient(135deg, var(--navy) 0%, #1E3554 100%);
  border-bottom: 2px solid var(--gold);
}

/* Progress fill — gold gradient */
.progress-fill {
  background: linear-gradient(90deg, var(--navy-light) 0%, var(--gold) 100%);
}

/* Buttons premium */
.btn-primary {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  box-shadow: 0 2px 8px rgba(13,27,42,.3);
  font-weight: 600; letter-spacing: .03em;
  transition: filter .2s, box-shadow .2s, transform .15s;
}
.btn-primary:hover:not(:disabled) {
  filter: brightness(1.12);
  box-shadow: 0 6px 20px rgba(13,27,42,.35);
  transform: translateY(-1px);
}

/* Sidebar active item */
.step-item.active { background: var(--gold-pale); }
.step-item.active .step-num { background: var(--gold); color: var(--navy); }
.step-item.active::before { background: var(--gold); height: 28px; }
.step-item.active .step-name { color: var(--navy); }

/* Form section title gold underline */
.form-section-title {
  border-bottom-color: rgba(201,168,76,.25);
  color: var(--navy);
}

/* Input focus gold */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(201,168,76,.12) !important;
}

@media (max-width: 768px) {
  .app-header-home, .app-header-divider { display: none; }
  .app-header { padding: 0 1rem; }
}
.text-center { text-align: center; }

/* ── Document Preview ───────────────────────────────────────── */
.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1.2rem;
  background: var(--navy);
  border-radius: 10px 10px 0 0;
}
.preview-header-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.preview-close {
  background: none;
  border: none;
  color: rgba(255,255,255,.5);
  font-size: .8rem;
  cursor: pointer;
  padding: .25rem .5rem;
  border-radius: 4px;
  transition: color .15s;
}
.preview-close:hover { color: #fff; }
.preview-doc {
  background: #fff;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 48px 56px;
  font-family: 'Times New Roman', Times, serif;
  font-size: 13.5px;
  line-height: 1.7;
  color: #111;
  max-height: 640px;
  overflow-y: auto;
}
.preview-entete { text-align: center; margin-bottom: 1rem; }
.preview-denomination { font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: .04em; }
.preview-infos { font-size: 12.5px; color: #444; }
.preview-rule { border: none; border-top: 1px solid #888; margin: 1rem 0; }
.preview-title {
  text-align: center;
  font-weight: 700;
  font-size: 13.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
  white-space: pre-line;
  margin-bottom: .4rem;
}
.preview-subtitle { text-align: center; font-size: 12.5px; color: #333; margin-bottom: 1rem; }
.preview-reso {
  font-weight: 700;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 1.4rem 0 .5rem;
  text-decoration: underline;
}
.preview-para { margin-bottom: .75rem; text-align: justify; }
.preview-adopted {
  text-align: center;
  font-style: italic;
  font-size: 12.5px;
  color: #333;
  margin: .5rem 0 1rem;
}
.preview-sig-section { margin-top: 2rem; }
.preview-sig-label { font-size: 12.5px; margin-bottom: 1.5rem; }
.preview-sig-block { width: 220px; }
.preview-sig-line { border-top: 1px solid #888; margin-bottom: .4rem; }
.preview-sig-name { font-weight: 700; font-size: 12px; }
.preview-sig-role { font-size: 11.5px; color: #555; }
.preview-notice {
  margin-top: 2rem;
  padding: .6rem 1rem;
  background: rgba(201,168,76,.08);
  border-left: 3px solid var(--gold);
  border-radius: 4px;
  font-family: var(--sans);
  font-size: .78rem;
  color: var(--dim);
  font-style: normal;
}

/* ── SIREN CONFIRMATION PANEL ── */
.siren-confirm-card {
  background: var(--gold-pale);
  border: 1.5px solid var(--gold);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-top: 14px;
}
.siren-confirm-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--navy);
  margin-bottom: 14px;
}
.sc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}
.sc-row { display: flex; flex-direction: column; gap: 3px; }
.sc-row-wide { grid-column: 1 / -1; }
.sc-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.03em; }
.sc-input {
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 0.82rem;
  background: var(--white);
  font-family: inherit;
  width: 100%;
}
.sc-input:focus { outline: none; border-color: var(--gold); }
.sc-note {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin: 10px 0 12px;
  font-style: italic;
}
.sc-actions {
  display: flex;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* ── Reset / Nouveau dossier button (sidebar) ──────────────── */
.sidebar-reset {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  background: white;
  padding-bottom: .5rem;
}
.btn-reset-draft {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 9px 12px;
  background: none;
  border: 1.5px solid #fecaca;
  border-radius: 8px;
  color: #991b1b;
  font-size: .8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn-reset-draft:hover {
  background: #fff1f2;
  border-color: #fca5a5;
}
