/* ═══════════════════════════════════════════════════════════════
   AlternanceNeo – Design System
   Breakpoints : mobile <640 · tablet <768 · desktop ≥768
   ═══════════════════════════════════════════════════════════════ */

:root {
  --primary: #4361ee;
  --primary-dark: #3451d1;
  --primary-light: #e0e7ff;
  --accent: #f72585;
  --success: #06d6a0;
  --warning: #ffd166;
  --error: #ef476f;
  --bg: #f8f9ff;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #1a1a2e;
  --text-muted: #64748b;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(67,97,238,.06);
  --container: 1100px;
  --gap: 24px;
  --gap-sm: 16px;
}

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

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

/* ── NAVBAR ─────────────────────────────────────────────────── */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(8px);
}
.navbar-inner {
  max-width: var(--container); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gap);
  gap: 12px;
}
.logo { font-size: 18px; font-weight: 700; color: var(--primary); text-decoration: none; white-space: nowrap; }

.nav-links { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-link {
  padding: 6px 12px; border-radius: 8px;
  color: var(--text-muted); text-decoration: none;
  font-size: 13px; font-weight: 500; transition: all .15s; white-space: nowrap;
}
.nav-link:hover, .nav-link.active { background: var(--primary-light); color: var(--primary); }

/* Burger button – masqué desktop */
.nav-burger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  background: var(--primary-light); border: none; cursor: pointer;
  padding: 10px 12px; border-radius: 8px; min-width: 44px; min-height: 44px;
}
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--primary); border-radius: 2px; transition: transform .25s, opacity .2s; }
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── CONTAINER ──────────────────────────────────────────────── */
.container { max-width: var(--container); margin: 0 auto; padding: 32px var(--gap) 80px; }

/* ── FOOTER ─────────────────────────────────────────────────── */
.footer { text-align: center; padding: 20px; color: var(--text-muted); font-size: 13px; border-top: 1px solid var(--border); }

/* ── HERO ───────────────────────────────────────────────────── */
.hero { text-align: center; padding: 48px 0 32px; }
.hero h1 { font-size: 2.2rem; font-weight: 700; line-height: 1.2; margin-bottom: 12px; }
.accent { color: var(--primary); }
.hero-sub { color: var(--text-muted); font-size: 1.05rem; max-width: 560px; margin: 0 auto; }

/* ── TABS ───────────────────────────────────────────────────── */
.tabs {
  display: flex; gap: 6px; margin-bottom: 20px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; padding-bottom: 4px;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 9px 16px; border-radius: 9px; border: 1.5px solid var(--border);
  background: var(--surface); cursor: pointer; font-size: 14px; font-weight: 500;
  color: var(--text-muted); transition: all .15s; white-space: nowrap; flex-shrink: 0;
}
.tab:hover { border-color: var(--primary); color: var(--primary); }
.tab.active { background: var(--primary); color: white; border-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── FORMS ──────────────────────────────────────────────────── */
.search-form { background: var(--surface); border-radius: var(--radius); padding: var(--gap); box-shadow: var(--shadow); margin-bottom: 8px; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.form-group { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 140px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--text); }
.form-group input, .form-group select, .form-group textarea {
  padding: 10px 14px; border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 14px; font-family: inherit; background: var(--bg); transition: border-color .15s;
  width: 100%;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--primary); background: white;
}
.form-group textarea { resize: vertical; }
.flex-1 { flex: 1; }
.flex-2 { flex: 2; }
.flex-3 { flex: 3; }
.align-end { justify-content: flex-end; }

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 600;
  border: none; cursor: pointer; text-decoration: none; transition: all .15s;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-secondary { background: var(--primary-light); color: var(--primary); }
.btn-secondary:hover { background: #c7d3f7; }
.btn-link { background: transparent; color: var(--primary); padding: 10px; }
.btn-link:hover { background: var(--primary-light); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn-danger { background: #fef2f2; color: var(--error); border: 1.5px solid #fecaca; }
.btn-danger:hover { background: #fee2e2; }
.btn-block { display: block; text-align: center; margin-bottom: 8px; width: 100%; }

/* ── LOADER ─────────────────────────────────────────────────── */
.loader {
  display: none; flex-direction: column; align-items: center; gap: 14px;
  padding: 40px; text-align: center; color: var(--text-muted);
}
.htmx-indicator { display: none !important; }
.htmx-request .htmx-indicator, .htmx-indicator.htmx-request { display: flex !important; }
.spinner {
  width: 40px; height: 40px; border: 3px solid var(--primary-light);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── ALERTS ─────────────────────────────────────────────────── */
.alert { padding: 14px 18px; border-radius: 10px; margin: 16px 0; font-size: 14px; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.alert-success { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }
.alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8; }

/* ── BADGES ─────────────────────────────────────────────────── */
.badge { background: var(--primary); color: white; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 20px; }
.text-muted { color: var(--text-muted); font-size: 14px; }
.text-sm { font-size: 12px; }

/* ── RESULTS HEADER ─────────────────────────────────────────── */
.results-header { margin: 28px 0 16px; }
.results-header h2 { font-size: 1.2rem; font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ── OFFERS GRID ─────────────────────────────────────────────── */
.offers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.offer-card {
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 18px; cursor: pointer; transition: all .15s; position: relative;
}
.offer-card:hover { border-color: var(--primary); box-shadow: 0 4px 20px rgba(67,97,238,.1); transform: translateY(-2px); }
.offer-card--full { cursor: default; }
.offer-card--full:hover { transform: none; }
.offer-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
.offer-title { font-size: 15px; font-weight: 700; line-height: 1.3; }
.offer-source { background: var(--bg); border: 1px solid var(--border); font-size: 11px; padding: 2px 7px; border-radius: 6px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }
.offer-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; font-size: 12px; color: var(--text-muted); }
.offer-skills { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.skill-tag { background: var(--primary-light); color: var(--primary); font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 6px; }
.offer-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; line-height: 1.5; }
.offer-description-full { background: var(--bg); border-radius: 8px; padding: 14px; margin: 12px 0; }
.offer-description-full h4 { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.offer-description-full p { font-size: 13px; color: #444; line-height: 1.6; }
.actions { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }

/* ── RESULT SECTION ─────────────────────────────────────────── */
.result-section { margin-top: 32px; }
.result-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.result-header h2 { font-size: 1.1rem; font-weight: 700; line-height: 1.3; }
.score-badge { background: linear-gradient(135deg, var(--primary), #7b2fff); color: white; padding: 6px 16px; border-radius: 20px; font-size: 14px; white-space: nowrap; }
.keywords-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 20px; }
.keywords-label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.keyword-tag { background: var(--primary-light); color: var(--primary); font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.result-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.result-card-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--bg); gap: 8px; flex-wrap: wrap; }
.result-card-header h3 { font-size: 15px; font-weight: 700; }
.actions-mini { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── EMAIL BOX ──────────────────────────────────────────────── */
.email-box { padding: 18px; }
.email-subject { font-size: 13px; font-weight: 600; padding: 10px 14px; background: var(--primary-light); border-radius: 8px; margin-bottom: 16px; color: var(--primary); word-break: break-word; }
.email-body { font-size: 14px; line-height: 1.7; white-space: pre-line; word-break: break-word; }

/* ── CV PREVIEW ─────────────────────────────────────────────── */
.cv-preview { padding: 18px; font-size: 13px; }
.cv-preview-header { border-bottom: 2px solid var(--primary); padding-bottom: 12px; margin-bottom: 14px; }
.cv-preview-header h2 { font-size: 18px; font-weight: 700; }
.cv-titre { color: var(--primary); font-weight: 500; margin: 4px 0; }
.cv-contact { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--text-muted); }
.cv-section { margin-bottom: 14px; }
.cv-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--primary); border-bottom: 1px solid var(--primary-light); padding-bottom: 3px; margin-bottom: 8px; }
.cv-exp { margin-bottom: 10px; }
.cv-exp-header { display: flex; justify-content: space-between; margin-bottom: 4px; flex-wrap: wrap; gap: 4px; }
.cv-dates { font-size: 12px; color: var(--text-muted); }
.cv-exp ul { padding-left: 16px; }
.cv-exp li { margin-bottom: 2px; font-size: 12px; }
.cv-skill-row { font-size: 12px; margin-bottom: 4px; }
.cv-langue { display: inline-block; margin-right: 16px; font-size: 12px; }
.cv-preview-box { font-size: 13px; }

/* ── PAGE HEADER ────────────────────────────────────────────── */
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 1.6rem; font-weight: 700; }
.page-header .app-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; font-size: 13px; color: var(--text-muted); }
.page-header .app-meta a { color: var(--primary); }
.back-link { display: inline-block; color: var(--text-muted); font-size: 13px; margin-bottom: 10px; text-decoration: none; }
.back-link:hover { color: var(--primary); }

/* ── FORM SECTIONS ──────────────────────────────────────────── */
.form-section { background: var(--surface); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; border: 1.5px solid var(--border); }
.form-section h2 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.form-sections { display: flex; flex-direction: column; gap: 0; }
.form-actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.code-area { font-family: 'Courier New', monospace; font-size: 12px; background: #1e1e2e; color: #cdd6f4; border-color: #313244; }
.cv-edit-form { max-width: 900px; }

/* ── SPACING ────────────────────────────────────────────────── */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 24px; }
.mb-2 { margin-bottom: 24px; }

/* ── DROP ZONE ──────────────────────────────────────────────── */
.import-form { display: flex; flex-direction: column; gap: 14px; }
.import-drop-zone {
  border: 2px dashed var(--border); border-radius: 12px;
  padding: 28px 16px; text-align: center; cursor: pointer;
  transition: all .2s; background: var(--bg);
}
.import-drop-zone:hover, .import-drop-zone.drag-over { border-color: var(--primary); background: var(--primary-light); }
.drop-icon { font-size: 28px; margin-bottom: 8px; }
.drop-label { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.drop-formats { font-size: 12px; color: var(--text-muted); }
.file-name-display { display: none; font-size: 13px; color: var(--primary); font-weight: 500; padding: 6px 0; }
.import-separator { text-align: center; position: relative; margin: 4px 0; }
.import-separator::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--border); }
.import-separator span { background: var(--surface); padding: 0 12px; position: relative; font-size: 13px; color: var(--text-muted); }

/* ── STATS BAR ──────────────────────────────────────────────── */
.stats-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.stat-chip { background: var(--surface); border: 1.5px solid var(--border); border-left-width: 4px; border-radius: 10px; padding: 8px 14px; display: flex; flex-direction: column; align-items: center; min-width: 72px; }
.stat-chip--total { border-left-color: var(--primary); }
.stat-num { font-size: 20px; font-weight: 700; line-height: 1; }
.stat-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; text-align: center; }

/* ── APPLICATIONS ───────────────────────────────────────────── */
.applications-list { display: flex; flex-direction: column; gap: 12px; }
.app-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 18px; }
.app-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.app-card-title h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.app-card-title h3 a { color: var(--text); text-decoration: none; }
.app-card-title h3 a:hover { color: var(--primary); }
.app-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--text-muted); }
.app-email-objet { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; word-break: break-word; }
.app-keywords { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.app-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.status-badge { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; border: 1.5px solid transparent; white-space: nowrap; }
.status-form { display: flex; align-items: center; }
.status-select { padding: 5px 10px; border-radius: 8px; border: 1.5px solid var(--border); font-size: 13px; cursor: pointer; max-width: 140px; }
.status-select-lg { padding: 10px 14px; border-radius: 8px; border: 1.5px solid var(--border); font-size: 14px; width: 100%; }

/* ── DETAIL ─────────────────────────────────────────────────── */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.detail-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 22px; }
.detail-card h2 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.download-list { display: flex; flex-direction: column; gap: 10px; }
.status-full-form { display: flex; flex-direction: column; gap: 14px; }
.status-quick-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.quick-status { border-top: 1px solid var(--border); padding-top: 12px; }

/* ── SAVE BAR ────────────────────────────────────────────────── */
.save-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #f0fdf4; border: 1.5px solid #86efac; border-radius: var(--radius);
  padding: 14px 18px; margin-bottom: 20px;
}

/* ── EMPTY STATE ────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 20px; }
.empty-icon { font-size: 44px; margin-bottom: 14px; }
.empty-state h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); margin-bottom: 20px; }

/* ── VERSIONS ───────────────────────────────────────────────── */
.versions-layout { display: grid; grid-template-columns: 340px 1fr; gap: 20px; }
.versions-sidebar { display: flex; flex-direction: column; gap: 10px; }
.versions-preview { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 22px; min-height: 250px; }
.version-item { background: var(--surface); border: 1.5px solid var(--border); border-radius: 10px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.version-item:hover { border-color: var(--primary); }
.version-label { font-weight: 600; font-size: 14px; }
.version-titre { color: var(--text-muted); font-size: 12px; }
.version-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }
.preview-placeholder { display: flex; align-items: center; justify-content: center; height: 180px; color: var(--text-muted); }
.versions-mini { display: flex; flex-direction: column; gap: 8px; }
.version-item-mini { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg); border-radius: 8px; border: 1px solid var(--border); flex-wrap: wrap; }

/* ── SCORE BARS ──────────────────────────────────────────────── */
.score-bars { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 10px; }
.score-bar-row { display: flex; align-items: center; gap: 6px; }
.score-bar-label { font-size: 13px; width: 22px; text-align: center; flex-shrink: 0; }
.score-bar-track { flex: 1; height: 6px; background: var(--bg); border-radius: 4px; overflow: hidden; border: 1px solid var(--border); }
.score-bar-fill { height: 100%; border-radius: 4px; transition: width .5s ease; }
.sbf--global    { background: linear-gradient(90deg, #4361ee, #7b2fff); }
.sbf--transport { background: #06d6a0; }
.sbf--prefs     { background: #ffd166; }
.score-bar-val  { font-size: 11px; font-weight: 600; color: var(--text-muted); width: 32px; text-align: right; flex-shrink: 0; }

/* ── ALERT BADGE ─────────────────────────────────────────────── */
.alert-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: white; font-size: 10px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px;
  margin-left: 4px; vertical-align: middle;
  animation: pulse-badge 2s ease-in-out infinite;
}
@keyframes pulse-badge { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.2); opacity: .85; } }

/* ── ENTRETIEN PREP ──────────────────────────────────────────── */
.entretien-prep { margin-top: 4px; }
.prep-header { margin-bottom: 16px; }
.prep-header h2 { font-size: 1.15rem; font-weight: 700; }
.qa-list { display: flex; flex-direction: column; gap: 10px; }
.qa-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.qa-question { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; font-weight: 600; font-size: 14px; background: var(--bg); border-bottom: 1px solid var(--border); }
.qa-num { background: var(--primary); color: white; font-size: 11px; font-weight: 700; min-width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.qa-answer { padding: 12px 14px; font-size: 13px; line-height: 1.65; }
.qa-label { display: inline-block; font-size: 11px; font-weight: 700; color: var(--primary); margin-bottom: 4px; }

/* ── RELANCE RESULT ──────────────────────────────────────────── */
.relance-result { margin-top: 4px; }
.relance-due-badge { background: #fff7ed; color: #c2410c; border: 1.5px solid #fed7aa; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 20px; white-space: nowrap; }

/* ── DETAIL ACTIONS ROW ──────────────────────────────────────── */
.detail-actions-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ── SUGGESTIONS ────────────────────────────────────────────── */
.suggestions-section { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border); }
.suggestions-title { font-size: 1rem; font-weight: 700; margin-bottom: 14px; color: var(--text-muted); }
.suggestions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.suggestion-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: 10px; padding: 14px; display: flex; gap: 12px; align-items: flex-start; opacity: .8; }
.suggestion-card:hover { border-color: var(--primary); opacity: 1; }
.suggestion-icon { font-size: 22px; flex-shrink: 0; }
.suggestion-titre { font-weight: 600; font-size: 14px; margin-bottom: 3px; }
.suggestion-desc { line-height: 1.4; font-size: 13px; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE – Tablet  ≤ 768px
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  :root { --gap: 16px; }

  .container { padding: 20px var(--gap) 60px; }

  /* Navbar : burger */
  .nav-burger { display: flex; }
  .nav-links {
    display: none; position: fixed; top: 57px; left: 0; right: 0;
    background: var(--surface); border-bottom: 2px solid var(--border);
    flex-direction: column; padding: 8px 16px 20px; gap: 2px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-link { padding: 12px 14px; font-size: 15px; border-radius: 10px; }
  .navbar { position: sticky; }

  /* Hero */
  .hero { padding: 28px 0 20px; }
  .hero h1 { font-size: 1.6rem; }
  .hero-sub { font-size: .95rem; }

  /* Grids → une colonne */
  .result-grid { grid-template-columns: 1fr; gap: 14px; }
  .detail-grid { grid-template-columns: 1fr; }
  .offers-grid { grid-template-columns: 1fr; }
  .versions-layout { grid-template-columns: 1fr; }

  /* Form rows → colonne */
  .form-row { flex-direction: column; gap: 10px; }
  .flex-1, .flex-2, .flex-3 { flex: unset; width: 100%; }
  .align-end { align-items: stretch; }
  .align-end .btn { width: 100%; }

  /* Sections */
  .form-section { padding: 16px; }
  .search-form { padding: 16px; }

  /* Boutons actions */
  .form-actions { flex-direction: column; gap: 8px; }
  .form-actions .btn { width: 100%; justify-content: center; }
  .btn-lg { padding: 12px 20px; font-size: 14px; }

  /* Save bar */
  .save-bar { flex-direction: column; align-items: stretch; }
  .save-bar .btn { width: 100%; justify-content: center; }

  /* Detail grid */
  .detail-grid { grid-template-columns: 1fr; }

  /* Page header */
  .page-header h1 { font-size: 1.3rem; }

  /* App card header */
  .app-card-header { flex-direction: column; gap: 8px; }
  .app-card { padding: 14px; }
  .app-actions { gap: 6px; }
  .app-actions .btn-sm { padding: 6px 10px; font-size: 12px; }

  /* Stats */
  .stats-bar { gap: 6px; }
  .stat-chip { min-width: 60px; padding: 6px 10px; }
  .stat-num { font-size: 18px; }

  /* Version items */
  .version-item { flex-direction: column; align-items: flex-start; }
  .version-actions { width: 100%; justify-content: flex-start; }

  /* Result card header */
  .result-card-header { flex-direction: column; align-items: flex-start; }
  .actions-mini { width: 100%; }
  .actions-mini .btn { flex: 1; justify-content: center; }

  /* Suggestions */
  .suggestions-grid { grid-template-columns: 1fr; }

  /* Drop zone */
  .import-drop-zone { padding: 20px 12px; }

  /* Detail actions row */
  .detail-actions-row { grid-template-columns: 1fr; }

  /* Save bar */
  .save-bar { flex-direction: column; align-items: stretch; }
  .save-bar .btn { width: 100%; justify-content: center; }
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE – Mobile  ≤ 480px
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  :root { --gap: 12px; }

  .container { padding: 14px var(--gap) 50px; }

  /* Hero */
  .hero h1 { font-size: 1.35rem; }
  .hero { padding: 20px 0 16px; }

  /* Tabs scroll horizontal */
  .tab { padding: 8px 12px; font-size: 13px; }

  /* Offer cards */
  .offer-card { padding: 14px; }
  .offer-header { flex-direction: column; gap: 6px; }
  .offer-source { align-self: flex-start; }

  /* Buttons full width dans les cards */
  .offer-card .btn { width: 100%; justify-content: center; }
  .offer-card .actions { flex-direction: column; }

  /* Keywords */
  .keyword-tag { font-size: 11px; padding: 2px 8px; }

  /* CV preview */
  .cv-preview-header h2 { font-size: 15px; }
  .cv-contact { flex-direction: column; gap: 4px; }

  /* Email */
  .email-box { padding: 12px; }

  /* App actions full width */
  .app-actions .btn-sm { width: 100%; justify-content: center; }
  .app-actions { flex-direction: column; }
  .status-form { width: 100%; }
  .status-select { max-width: 100%; width: 100%; }

  /* Version mini items */
  .version-item-mini { flex-direction: column; align-items: flex-start; gap: 8px; }
  .version-actions { flex-wrap: wrap; }

  /* Detail card */
  .detail-card { padding: 14px; }

  /* Page header */
  .page-header h1 { font-size: 1.2rem; }

  /* Stat chips 2 par ligne */
  .stats-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .stats-bar > .btn { grid-column: 1 / -1; width: 100%; }

  /* Form section */
  .form-section { padding: 12px; }
  .form-section h2 { font-size: 15px; }

  /* Code area */
  .code-area { font-size: 11px; }

  /* Suggestions 1 col déjà fait */
  .suggestion-card { padding: 12px; }
}
