/* ══════════════════════════════════════════════════════════════════════════
   Design System — La Maison du Fleuve
   ══════════════════════════════════════════════════════════════════════════ */

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

:root {
  --mdf-brown:      #201C18;
  --mdf-cream:      #E8DDD0;
  --mdf-terracotta: #C4855A;
  --mdf-gold:       #B8965A;
  --mdf-cream-dark: #D5C9BB;
  --mdf-brown-soft: #3A342E;
  --mdf-surface:    #F2EDE6;
  --mdf-error:      #B85A5A;
  --mdf-success:    #5A8A6A;

  --radius: 4px;
  --radius-lg: 8px;
  --shadow: 0 2px 16px rgba(32, 28, 24, 0.10);
  --shadow-lg: 0 8px 32px rgba(32, 28, 24, 0.15);
  --transition: 200ms ease;
}

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

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

body {
  font-family: 'Inter Tight', sans-serif;
  background: var(--mdf-cream);
  color: var(--mdf-brown);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── Layout ─────────────────────────────────────────────────────────────── */

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main {
  flex: 1;
  padding: 40px 0 60px;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

.header {
  background: var(--mdf-brown);
  padding: 20px 0;
  box-shadow: var(--shadow);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header__brand {
  display: flex;
  flex-direction: column;
}

.header__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--mdf-cream);
  letter-spacing: 0.02em;
}

.header__subtitle {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--mdf-gold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 2px;
}

.header__badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--mdf-cream-dark);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(232,221,208,0.15);
  padding: 5px 12px;
  border-radius: 20px;
}

.header__badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mdf-gold);
}

.header__badge.connected .dot { background: var(--mdf-success); }
.header__badge.error .dot { background: var(--mdf-error); }

/* ── Navigation tabs ─────────────────────────────────────────────────────── */

.nav-tabs {
  background: var(--mdf-brown-soft);
  border-bottom: 1px solid rgba(232,221,208,0.1);
}

.nav-tabs__inner {
  display: flex;
  gap: 0;
}

.nav-tab {
  padding: 14px 24px;
  font-family: 'Inter Tight', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mdf-cream-dark);
  border: none;
  background: none;
  cursor: pointer;
  transition: color var(--transition), border-bottom var(--transition);
  border-bottom: 2px solid transparent;
  position: relative;
}

.nav-tab:hover { color: var(--mdf-cream); }

.nav-tab.active {
  color: var(--mdf-terracotta);
  border-bottom-color: var(--mdf-terracotta);
}

/* ── Main content ───────────────────────────────────────────────────────── */

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Section titles ─────────────────────────────────────────────────────── */

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--mdf-brown);
  margin-bottom: 6px;
}

.section-subtitle {
  font-size: 0.85rem;
  color: var(--mdf-brown-soft);
  margin-bottom: 32px;
  font-weight: 400;
}

/* ── Card ───────────────────────────────────────────────────────────────── */

.card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  background: var(--mdf-surface);
  padding: 18px 24px;
  border-bottom: 1px solid var(--mdf-cream-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-header__icon {
  width: 32px;
  height: 32px;
  background: var(--mdf-terracotta);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-header__icon svg { width: 16px; height: 16px; stroke: #fff; fill: none; }

.card-header__title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--mdf-brown);
}

.card-header__desc {
  font-size: 0.78rem;
  color: var(--mdf-brown-soft);
}

.card-body { padding: 28px 24px; }

/* ── Form ───────────────────────────────────────────────────────────────── */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 24px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }

.form-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mdf-brown-soft);
}

.form-label .required {
  color: var(--mdf-terracotta);
  margin-left: 2px;
}

.form-input,
.form-select {
  border: 1.5px solid var(--mdf-cream-dark);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-family: 'Inter Tight', sans-serif;
  font-size: 0.9rem;
  color: var(--mdf-brown);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
  appearance: none;
}

.form-input::placeholder { color: #AEA79E; }

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--mdf-terracotta);
  box-shadow: 0 0 0 3px rgba(196,133,90,0.12);
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23201C18' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-hint {
  font-size: 0.72rem;
  color: #9A928A;
  margin-top: 2px;
}

.form-prefilled {
  background: var(--mdf-surface);
  border-style: dashed;
  color: var(--mdf-brown-soft);
}

/* ── Separateur de section dans le formulaire ──────────────────────────── */

.form-section-label {
  font-family: 'Playfair Display', serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--mdf-terracotta);
  grid-column: 1 / -1;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--mdf-cream-dark);
  margin-top: 8px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-family: 'Inter Tight', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: none;
  transition: background var(--transition), transform var(--transition), opacity var(--transition);
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--mdf-terracotta);
  color: #fff;
}
.btn-primary:hover { background: #B07448; }
.btn-primary:disabled { background: var(--mdf-cream-dark); color: #9A928A; cursor: not-allowed; transform: none; }

.btn-secondary {
  background: transparent;
  color: var(--mdf-terracotta);
  border: 1.5px solid var(--mdf-terracotta);
}
.btn-secondary:hover { background: rgba(196,133,90,0.08); }

.btn-ghost {
  background: transparent;
  color: var(--mdf-brown-soft);
  padding: 8px 12px;
}
.btn-ghost:hover { color: var(--mdf-brown); }

.btn-sm { padding: 7px 14px; font-size: 0.78rem; }

.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; flex-shrink: 0; }

.form-actions {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--mdf-cream-dark);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  align-items: center;
}

/* ── Status banner ──────────────────────────────────────────────────────── */

.status-banner {
  display: none;
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-top: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  align-items: flex-start;
  gap: 12px;
}

.status-banner.visible { display: flex; }

.status-banner__icon { flex-shrink: 0; margin-top: 2px; }
.status-banner__icon svg { width: 18px; height: 18px; }

.status-banner__body { flex: 1; }
.status-banner__title { font-weight: 600; margin-bottom: 2px; }
.status-banner__detail { font-size: 0.78rem; opacity: 0.8; margin-top: 4px; }

.status-banner.success {
  background: rgba(90, 138, 106, 0.1);
  border: 1px solid rgba(90, 138, 106, 0.3);
  color: #2D6B40;
}
.status-banner.error {
  background: rgba(184, 90, 90, 0.1);
  border: 1px solid rgba(184, 90, 90, 0.3);
  color: #8B2020;
}
.status-banner.loading {
  background: rgba(184, 150, 90, 0.1);
  border: 1px solid rgba(184, 150, 90, 0.3);
  color: #7A5C20;
}

/* ── Spinner ─────────────────────────────────────────────────────────────── */

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Logs console ───────────────────────────────────────────────────────── */

.logs-panel {
  background: var(--mdf-brown);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 16px;
  max-height: 200px;
  overflow-y: auto;
  display: none;
}

.logs-panel.visible { display: block; }

.logs-panel pre {
  font-family: 'Menlo', 'Monaco', monospace;
  font-size: 0.72rem;
  color: var(--mdf-cream);
  white-space: pre-wrap;
  line-height: 1.7;
  opacity: 0.85;
}

/* ── History list ───────────────────────────────────────────────────────── */

.history-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--mdf-brown-soft);
}

.history-empty__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  opacity: 0.3;
}

.history-empty__text {
  font-size: 0.9rem;
}

.history-list { display: flex; flex-direction: column; gap: 0; }

.history-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--mdf-cream-dark);
  transition: background var(--transition);
}

.history-item:last-child { border-bottom: none; }
.history-item:hover { background: var(--mdf-surface); }

.history-item__status {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.history-item__status svg { width: 16px; height: 16px; }

.history-item__status.envoyé {
  background: rgba(90, 138, 106, 0.15);
  color: var(--mdf-success);
}
.history-item__status.envoyé svg { stroke: var(--mdf-success); fill: none; }

.history-item__status.erreur {
  background: rgba(184, 90, 90, 0.15);
  color: var(--mdf-error);
}
.history-item__status.erreur svg { stroke: var(--mdf-error); fill: none; }

.history-item__status.en_cours {
  background: rgba(184, 150, 90, 0.15);
  color: var(--mdf-gold);
}

.history-item__info { min-width: 0; }

.history-item__name {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--mdf-brown);
}

.history-item__meta {
  font-size: 0.75rem;
  color: var(--mdf-brown-soft);
  margin-top: 2px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.history-item__badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-envoyé { background: rgba(90, 138, 106, 0.15); color: var(--mdf-success); }
.badge-erreur { background: rgba(184, 90, 90, 0.12); color: var(--mdf-error); }
.badge-en_cours { background: rgba(184, 150, 90, 0.12); color: var(--mdf-gold); }
.badge-dry-run { background: rgba(184, 150, 90, 0.12); color: var(--mdf-gold); }
.history-item__status.dry-run { background: rgba(184, 150, 90, 0.15); }
.history-item__status.dry-run svg { stroke: var(--mdf-gold); fill: none; }

.history-item__actions { display: flex; gap: 6px; align-items: center; }

/* ── Tab header row ─────────────────────────────────────────────────────── */

.tab-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

/* ── Tab count badge ─────────────────────────────────────────────────────── */

.tab-count {
  font-size: 0.65rem;
  background: rgba(196,133,90,0.2);
  color: var(--mdf-terracotta);
  padding: 1px 7px;
  border-radius: 10px;
  margin-left: 6px;
}

/* ── Search bar ──────────────────────────────────────────────────────────── */

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1.5px solid var(--mdf-cream-dark);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 20px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-bar:focus-within {
  border-color: var(--mdf-terracotta);
  box-shadow: 0 0 0 3px rgba(196,133,90,0.12);
}

.search-bar svg { width: 16px; height: 16px; stroke: var(--mdf-brown-soft); fill: none; flex-shrink: 0; }

.search-input {
  border: none;
  outline: none;
  font-family: 'Inter Tight', sans-serif;
  font-size: 0.9rem;
  color: var(--mdf-brown);
  background: transparent;
  width: 100%;
}

.search-input::placeholder { color: #AEA79E; }

/* ── Extras grid ─────────────────────────────────────────────────────────── */

.extras-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.extra-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
}

.extra-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }

.extra-card__top { display: flex; align-items: center; gap: 14px; }

.extra-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--mdf-terracotta);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 600;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.extra-card__info { flex: 1; min-width: 0; }

.extra-card__name {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--mdf-brown);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.extra-card__meta {
  font-size: 0.75rem;
  color: var(--mdf-brown-soft);
  margin-top: 2px;
}

.extra-card__stats {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--mdf-cream-dark);
  border-bottom: 1px solid var(--mdf-cream-dark);
}

.extra-stat { flex: 1; text-align: center; }

.extra-stat__label {
  font-size: 0.67rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #9A928A;
  margin-bottom: 3px;
}

.extra-stat__value {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--mdf-brown);
}

.extra-card__actions { display: flex; gap: 8px; align-items: center; }

.btn-prepare {
  flex: 1;
  background: var(--mdf-terracotta);
  color: #fff;
  border: none;
  padding: 9px 16px;
  border-radius: var(--radius);
  font-family: 'Inter Tight', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background var(--transition);
}
.btn-prepare:hover { background: #B07448; }
.btn-prepare svg { width: 14px; height: 14px; stroke: currentColor; fill: none; }

/* ── Phone link on card ──────────────────────────────────────────────────── */

.extra-card__phone {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--mdf-terracotta);
  text-decoration: none;
  font-weight: 500;
  margin-top: -4px;
}
.extra-card__phone:hover { color: var(--mdf-gold); }
.extra-card__phone svg { width: 13px; height: 13px; stroke: currentColor; fill: none; flex-shrink: 0; }
.extra-card__phone--empty { color: #BFB8B0; font-style: italic; }

/* ── Extra detail modal ──────────────────────────────────────────────────── */

.extra-detail-modal .modal-box { max-width: 520px; }

.extra-detail-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--mdf-cream-dark);
}

.extra-detail-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--mdf-terracotta);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 600;
  flex-shrink: 0;
}

.extra-detail-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--mdf-brown);
}

.extra-detail-sub {
  font-size: 0.78rem;
  color: #9A928A;
  margin-top: 2px;
}

.extra-detail-close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--mdf-brown-soft);
  padding: 4px;
  display: flex;
  border-radius: var(--radius);
}
.extra-detail-close:hover { color: var(--mdf-brown); }
.extra-detail-close svg { width: 18px; height: 18px; stroke: currentColor; fill: none; }

.extra-detail-body { padding: 20px 24px; overflow-y: auto; }

.extra-detail-section {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mdf-terracotta);
  margin: 20px 0 10px;
}
.extra-detail-section:first-child { margin-top: 0; }

.extra-detail-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--mdf-cream-dark);
  font-size: 0.85rem;
}
.extra-detail-row:last-child { border-bottom: none; }

.extra-detail-row__label {
  color: #9A928A;
  font-size: 0.78rem;
  min-width: 130px;
  flex-shrink: 0;
  padding-top: 1px;
}

.extra-detail-row__value {
  color: var(--mdf-brown);
  font-weight: 500;
  word-break: break-word;
}

.extra-detail-row__value a {
  color: var(--mdf-terracotta);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
}
.extra-detail-row__value a:hover { color: var(--mdf-gold); }
.extra-detail-row__value a svg { width: 13px; height: 13px; stroke: currentColor; fill: none; }

.extra-detail-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--mdf-cream-dark);
  display: flex;
  justify-content: flex-end;
}

.extras-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--mdf-brown-soft);
}
.extras-empty__icon { width: 48px; height: 48px; margin: 0 auto 16px; opacity: 0.3; }
.extras-empty__text { font-size: 0.9rem; }
.extras-empty__hint { font-size: 0.8rem; margin-top: 6px; opacity: 0.7; }

/* ── Modal accusé de réception ───────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(32, 28, 24, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(32,28,24,0.3);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: var(--mdf-surface);
  border-bottom: 1px solid var(--mdf-cream-dark);
  flex-shrink: 0;
}

.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--mdf-brown);
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--mdf-brown-soft);
  padding: 4px;
  display: flex;
  border-radius: var(--radius);
  transition: color var(--transition);
}
.modal-close:hover { color: var(--mdf-brown); }
.modal-close svg { width: 18px; height: 18px; stroke: currentColor; fill: none; }

.modal-body {
  overflow-y: auto;
  flex: 1;
  padding: 24px;
  background: var(--mdf-cream);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.modal-body img {
  max-width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--mdf-cream-dark);
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* ── Receipt button in history ───────────────────────────────────────────── */

.btn-receipt {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'Inter Tight', sans-serif;
  background: rgba(196,133,90,0.1);
  color: var(--mdf-terracotta);
  border: 1px solid rgba(196,133,90,0.25);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
}
.btn-receipt:hover { background: rgba(196,133,90,0.18); }
.btn-receipt svg { width: 13px; height: 13px; stroke: currentColor; fill: none; flex-shrink: 0; }

/* ── Config warning ─────────────────────────────────────────────────────── */

.config-warning {
  background: rgba(184,150,90,0.1);
  border: 1px solid rgba(184,150,90,0.3);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 0.82rem;
  color: #7A5C20;
  display: flex;
  align-items: center;
  gap: 10px;
}

.config-warning svg { width: 18px; height: 18px; stroke: currentColor; fill: none; flex-shrink: 0; }
.config-warning code { font-family: monospace; background: rgba(0,0,0,0.06); padding: 1px 5px; border-radius: 3px; }

/* ── Footer ─────────────────────────────────────────────────────────────── */

.footer {
  background: var(--mdf-brown);
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__text {
  font-size: 0.72rem;
  color: rgba(232,221,208,0.4);
}

.footer__link {
  font-size: 0.72rem;
  color: var(--mdf-gold);
  text-decoration: none;
  opacity: 0.7;
}

.footer__link:hover { opacity: 1; }

/* ── Modal formulaire extra ──────────────────────────────────────────────── */

.form-section-label {
  grid-column: 1 / -1;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--mdf-terracotta);
  margin-top: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--mdf-cream);
}

#extraFormModal .modal-body .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
}

#extraFormModal .modal-body .form-group.full {
  grid-column: 1 / -1;
}

#extraFormModal .modal-body .form-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--mdf-brown);
  margin-bottom: 4px;
  display: block;
}

.required { color: var(--mdf-terracotta); }

#extraFormModal .modal-body .form-input {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--mdf-cream);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.875rem;
  background: #FAFAF8;
  color: var(--mdf-brown);
  transition: border-color .15s;
  box-sizing: border-box;
}

#extraFormModal .modal-body .form-input:focus {
  outline: none;
  border-color: var(--mdf-terracotta);
  background: #fff;
}

#extraFormModal .modal-body .form-input[readonly] {
  background: var(--mdf-cream);
  cursor: default;
}

.modal-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--mdf-cream);
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: 1; }
  .header__inner { flex-direction: column; align-items: flex-start; }
  .history-item { grid-template-columns: auto 1fr; grid-template-rows: auto auto; }
  .history-item__actions { grid-column: 1 / -1; }
}
