/*
 * DANY AI — design system, ported 1:1 from the Lovable redesign
 * (src/styles.css + Tailwind utilities of the React export) to plain CSS
 * so Twig templates can use it without a build step.
 *
 * Mobile-first single column capped at 480px. Palette (dark theme):
 * gold #FFD700, beige #D4A574, orange #FF9500 on night blue #0F0F23 /
 * #1A1A3E / #2A2A3E; text #F3F1EA / #A9A8C0; gold and beige fills carry
 * dark text #0F0F23. Fonts: Bricolage Grotesque (headings), Atkinson
 * Hyperlegible (text). All colors are tokens below —
 * components never hardcode a color.
 */

/* ---------- Tokens ---------- */
:root {
    --radius: 1.125rem;
    --radius-xl: calc(var(--radius) + 4px);
    --radius-2xl: calc(var(--radius) + 8px);

    --background: #0F0F23;
    --foreground: #F3F1EA;
    --card: #1A1A3E;
    --card-foreground: #F3F1EA;
    --primary: #FFD700;
    --primary-foreground: #0F0F23;
    --secondary: #FF9500;
    --muted: #2A2A3E;
    --muted-foreground: #A9A8C0;
    --accent: #D4A574;
    --accent-foreground: #0F0F23;
    --accent-text: #D4A574;
    --destructive: oklch(0.62 0.22 22);
    --success: oklch(0.75 0.16 158);
    --border: rgb(255 215 0 / 18%);
    --input: rgb(255 215 0 / 22%);
    --ring: rgb(255 215 0 / 60%);
    --glass: rgb(26 26 62 / 72%);

    --gradient-gold: linear-gradient(135deg, #FFD700, #FF9500);
    --gradient-surface: linear-gradient(160deg, rgb(26 26 62 / 94%), rgb(21 21 48 / 88%));
    --gradient-aura: radial-gradient(circle at 50% 0%, rgb(255 149 0 / 16%), transparent 65%);
    --shadow-glow: 0 0 32px oklch(0.87 0.17 92 / 35%);
    --shadow-card: 0 18px 40px -22px oklch(0 0 0 / 80%);

    --gradient-gold-text: var(--gradient-gold);
    --field: rgb(42 42 62 / 60%);
    --bar: rgb(15 15 35 / 88%);
    --sidebar: rgb(15 15 35 / 85%);

    --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
    --font-sans: "Atkinson Hyperlegible", ui-sans-serif, system-ui, sans-serif;

    color-scheme: dark;
}

/*
 * Light theme (optional — dark stays the default). Chosen in Plus →
 * Apparence and stored per device; "Auto" follows the system setting.
 * Gold used as TEXT is darkened to stay readable on white (WCAG AA);
 * gold used as a FILL (buttons, pills) keeps the bright brand gradient.
 */
:root[data-theme="light"] {
    --background: oklch(0.975 0.008 85);
    --foreground: oklch(0.22 0.04 285);
    --card: oklch(1 0 0);
    --card-foreground: oklch(0.22 0.04 285);
    --primary: oklch(0.55 0.13 70);
    --secondary: oklch(0.58 0.16 50);
    --accent-text: oklch(0.48 0.08 60);
    --muted: oklch(0.93 0.012 285);
    --muted-foreground: oklch(0.46 0.03 285);
    --destructive: oklch(0.55 0.2 25);
    --success: oklch(0.52 0.13 158);
    --border: oklch(0.45 0.06 285 / 16%);
    --input: oklch(0.45 0.06 285 / 25%);
    --ring: oklch(0.6 0.15 75 / 55%);
    --glass: oklch(1 0 0 / 75%);
    --gradient-gold: linear-gradient(135deg, oklch(0.87 0.17 92), oklch(0.76 0.18 60));
    --gradient-gold-text: linear-gradient(135deg, oklch(0.58 0.14 75), oklch(0.55 0.17 50));
    --gradient-surface: linear-gradient(160deg, oklch(1 0 0 / 96%), oklch(0.985 0.004 285 / 92%));
    --gradient-aura: radial-gradient(circle at 50% 0%, oklch(0.87 0.17 92 / 22%), transparent 65%);
    --shadow-glow: 0 0 28px oklch(0.8 0.17 80 / 35%);
    --shadow-card: 0 14px 34px -20px oklch(0.3 0.05 285 / 35%);
    --field: oklch(0.96 0.006 285);
    --bar: oklch(0.975 0.008 85 / 88%);
    --sidebar: oklch(1 0 0 / 80%);
    color-scheme: light;
}
:root[data-theme="light"] .action-btn--primary,
:root[data-theme="light"] .btn-gold,
:root[data-theme="light"] .icon-btn--gold,
:root[data-theme="light"] .fab-toggle,
:root[data-theme="light"] .chip.active,
:root[data-theme="light"] .status-filter.active,
:root[data-theme="light"] .sidebar-link.active,
:root[data-theme="light"] .chat-message-user .bubble { color: oklch(0.2 0.05 285); }
:root[data-theme="light"] input[type="date"].input,
:root[data-theme="light"] input[type="time"].input,
:root[data-theme="light"] input[type="month"].input { color-scheme: light; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; border-color: var(--border); }
[hidden] { display: none !important; }

html, body { overflow-x: hidden; }

body {
    margin: 0;
    min-height: 100vh;
    background-color: var(--background);
    background-image: var(--gradient-aura);
    background-repeat: no-repeat;
    color: var(--foreground);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, .font-display { font-family: var(--font-display); margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img { display: block; max-width: 100%; }
ul { list-style: none; margin: 0; padding: 0; }

:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Animations ---------- */
@keyframes breathe { 0%, 100% { transform: scale(0.98); } 50% { transform: scale(1.02); } }
@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 22px oklch(0.87 0.17 92 / 35%), 0 0 60px oklch(0.76 0.18 60 / 20%); }
    50% { box-shadow: 0 0 40px oklch(0.87 0.17 92 / 65%), 0 0 96px oklch(0.76 0.18 60 / 40%); }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes dots { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.animate-rise { animation: rise 0.35s ease-out both; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}

/* ---------- Utilities ---------- */
.glass-card {
    background-image: var(--gradient-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.text-gradient-gold {
    background-image: var(--gradient-gold-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.pressable { transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.pressable:active { transform: scale(0.95); }
.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.muted { color: var(--muted-foreground); }
.text-primary { color: var(--primary); }
.icon { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
.icon-sm { width: 1rem; height: 1rem; }
.icon-lg { width: 1.5rem; height: 1.5rem; }

/* ---------- Accessibility & page chrome ---------- */
.skip-link {
    position: fixed; top: 0.5rem; left: 0.5rem; z-index: 100; transform: translateY(-200%);
    padding: 0.625rem 1rem; border-radius: 0.75rem; background: var(--primary); color: var(--primary-foreground); font-weight: 700;
}
.skip-link:focus { transform: none; }
.app-main { display: contents; }
.app-main:focus { outline: none; }

/* Thin gold bar while the next page loads. */
.nav-progress { position: fixed; top: 0; left: 0; z-index: 90; height: 3px; width: 0; background-image: var(--gradient-gold); box-shadow: var(--shadow-glow); opacity: 0; }
.nav-progress.is-loading { opacity: 1; width: 85%; transition: width 8s cubic-bezier(0.1, 0.8, 0.2, 1); }

/* Smooth cross-fade between pages (supported browsers; others just navigate). */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.18s; }

/* Toasts (flash messages) */
.toasts { position: fixed; top: calc(env(safe-area-inset-top) + 0.75rem); left: 50%; z-index: 80; transform: translateX(-50%); width: min(440px, calc(100% - 2rem)); display: flex; flex-direction: column; gap: 0.5rem; pointer-events: none; }
.toasts .toast { pointer-events: auto; margin: 0; display: flex; align-items: flex-start; gap: 0.75rem; box-shadow: var(--shadow-card); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); animation: rise 0.3s ease-out both; background: var(--card); }
.toast > span { flex: 1; }
.toast.is-leaving { opacity: 0; transform: translateY(-8px); transition: opacity 0.25s, transform 0.25s; }
.toast-close { flex-shrink: 0; font-size: 1.25rem; line-height: 1; color: var(--muted-foreground); padding: 0 0.25rem; }

/* ---------- Shell ---------- */
.app {
    margin: 0 auto;
    min-height: 100vh;
    max-width: 480px;
    padding: calc(env(safe-area-inset-top) + 0.5rem) 1.25rem 7rem;
}
.app--flush { padding: 0; display: flex; flex-direction: column; }
.app--auth { display: flex; flex-direction: column; justify-content: center; padding-bottom: 2rem; }

.page-header { padding-top: 2rem; }
.page-title { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.page-subtitle { margin-top: 0.5rem; font-size: 0.875rem; color: var(--muted-foreground); }

.section { margin-top: 2rem; }
.section-title {
    font-family: var(--font-display);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--muted-foreground);
    font-weight: 500;
}
.section-title + * { margin-top: 0.75rem; }
.stack > * + * { margin-top: 0.75rem; }

/* Sticky glass top bar with a back button (chat + inner pages). */
.topbar {
    position: sticky; top: 0; z-index: 30;
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.75rem;
    border-bottom: 1px solid var(--border);
    background: var(--glass);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    padding: calc(env(safe-area-inset-top) + 0.5rem) 1rem 0.75rem;
}
.app:not(.app--flush) > .topbar { margin: 0 -1.25rem; }
.topbar-title { font-family: var(--font-display); font-size: 0.875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-sub { font-size: 11px; color: var(--muted-foreground); }

.icon-btn {
    display: grid; place-items: center;
    width: 2.75rem; height: 2.75rem; flex-shrink: 0;
    border-radius: 999px; border: 1px solid var(--border);
    color: var(--primary);
}
.icon-btn--gold { border: 0; color: var(--primary-foreground); background-image: var(--gradient-gold); }

/* ---------- Avatar ---------- */
.dany-avatar { position: relative; border-radius: 999px; animation: breathe 3s ease-in-out infinite; flex-shrink: 0; }
.dany-avatar::before { content: ""; position: absolute; inset: 0; border-radius: 999px; animation: glow-pulse 1.5s ease-in-out infinite; }
.dany-avatar img {
    position: relative; width: 100%; height: 100%;
    border-radius: 999px; object-fit: cover;
    border: 2px solid oklch(0.87 0.17 92 / 60%);
}
/* Smile = a good outcome just happened (top match ≥ 80 / Dany just answered): brighter ring. */
.dany-avatar--smile img { border-color: var(--primary); }
.dany-avatar.is-thinking::before { animation-duration: 0.6s; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    min-height: 2.75rem; padding: 0 1.25rem;
    border-radius: 0.875rem;
    font-family: var(--font-display); font-size: 0.875rem; font-weight: 600;
    border: 1px solid var(--border);
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease, opacity 0.2s;
}
.btn:active { transform: scale(0.95); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-gold { border: 0; color: var(--primary-foreground); background-image: var(--gradient-gold); box-shadow: var(--shadow-glow); }
.btn-ghost { color: var(--primary); background: transparent; }
.btn-block { width: 100%; }

/* Big menu rows (dashboard actions, Plus page). */
.action-btn {
    display: flex; align-items: center; gap: 0.75rem;
    width: 100%; min-height: 3.5rem; padding: 0 1.25rem;
    border-radius: 1rem;
    text-align: left;
    font-family: var(--font-display); font-size: 0.875rem; font-weight: 600;
}
.action-btn.glass-card { border-radius: 1rem; }
.action-btn.glass-card:hover { border-color: oklch(0.76 0.18 60 / 60%); }
.action-btn--primary { color: var(--primary-foreground); background-image: var(--gradient-gold); box-shadow: var(--shadow-glow); }
.action-btn .chevron { margin-left: auto; color: var(--muted-foreground); }
.action-btn .icon:first-child { color: var(--primary); }
.action-btn--primary .icon:first-child { color: inherit; }
.action-btn--danger .icon:first-child, .action-btn--danger { color: var(--destructive); }

/* Pills: chips, filters, badges. */
.chip {
    display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.75rem;
    border-radius: 999px; border: 1px solid oklch(0.87 0.17 92 / 40%);
    font-size: 0.75rem; font-weight: 600; color: var(--primary);
    transition: transform 0.15s ease, background-color 0.2s;
}
.chip:active { transform: scale(0.95); }
.chip.active, .status-filter.active { color: var(--primary-foreground); background-image: var(--gradient-gold); border-color: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips-scroll { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.25rem; }
.chips-scroll > * { flex-shrink: 0; }

.badge {
    display: inline-flex; align-items: center; flex-shrink: 0;
    border-radius: 999px; border: 1px solid oklch(0.87 0.17 92 / 40%);
    padding: 0.25rem 0.625rem;
    font-size: 11px; font-weight: 600; color: var(--primary);
}
.badge--muted { color: var(--muted-foreground); border-color: var(--border); }
.badge--pending { color: var(--secondary); border-color: oklch(0.76 0.18 60 / 45%); }
.badge--ok { color: var(--success); border-color: oklch(0.75 0.16 158 / 45%); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 0.375rem; }
.field + .field { margin-top: 1rem; }
.field label, .label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em; color: var(--muted-foreground); }
.input, .field input[type="text"], .field input[type="email"], .field input[type="password"], .field select, .textarea {
    width: 100%; min-height: 2.75rem; padding: 0 1rem;
    border-radius: 0.875rem; border: 1px solid var(--input);
    background: var(--field);
    font-size: 0.875rem; outline: none;
}
.textarea { padding: 0.75rem 1rem; line-height: 1.6; resize: vertical; min-height: 8rem; }
.input:focus, .field input:focus, .field select:focus, .textarea:focus { box-shadow: 0 0 0 2px var(--ring); }
.input::placeholder, .textarea::placeholder { color: var(--muted-foreground); }
.field ul { color: var(--destructive); font-size: 0.75rem; }

.check-row { display: flex; align-items: center; gap: 0.75rem; min-height: 2.75rem; font-size: 0.875rem; }
.check-row input[type="checkbox"] { width: 1.25rem; height: 1.25rem; accent-color: var(--primary); flex-shrink: 0; }
input[type="range"] { width: 100%; accent-color: var(--primary); }

/* ---------- Flash ---------- */
.flash { margin-top: 1rem; padding: 0.875rem 1rem; border-radius: 1rem; font-size: 0.875rem; border: 1px solid var(--border); background: var(--glass); }
.dany-flash-error { border-color: oklch(0.62 0.22 22 / 50%); color: oklch(0.8 0.12 22); }
.dany-flash-success { border-color: oklch(0.75 0.16 158 / 50%); color: var(--success); }
.app--flush .flash { margin: 0.75rem 1rem 0; }

/* ---------- Dashboard ---------- */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 1.5rem; }
.hero-title { margin-top: 1.25rem; font-size: 1.5rem; font-weight: 700; }
.hero-sub { margin-top: 0.25rem; font-size: 0.875rem; color: var(--muted-foreground); }

.stats { display: flex; gap: 0.75rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 0.25rem; margin-top: 1.75rem; }
.stat-card { min-width: 9.5rem; flex-shrink: 0; scroll-snap-align: start; padding: 1rem; }
.stat-value { font-family: var(--font-display); font-size: 1.875rem; font-weight: 700; line-height: 1.2; }
.stat-label { margin-top: 0.25rem; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted-foreground); }

.actions { margin-top: 1.75rem; }

/* Dashboard sparkline (last 14 days). */
.spark-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 0.75rem; padding: 1rem; }
.spark-total { margin-top: 0.25rem; font-size: 0.875rem; color: var(--muted-foreground); }
.spark-total strong { font-family: var(--font-display); font-size: 1.25rem; color: var(--foreground); }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 2.75rem; width: 55%; max-width: 14rem; }
.spark span { flex: 1; border-radius: 2px; background: var(--muted); }
.spark span.has-value { background-image: var(--gradient-gold); }

/* Timeline card (dashboard "Aujourd'hui" + /applications). */
.timeline-card { padding: 1rem; }
.timeline-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 0.75rem; }
.timeline-time { font-size: 11px; letter-spacing: 0.1em; color: var(--secondary); }
.due-pill {
    display: inline-flex; align-items: center; gap: 0.25rem; margin-left: 0.375rem; padding: 0.05rem 0.5rem;
    border-radius: 999px; background: oklch(0.76 0.18 60 / 18%); color: var(--secondary); font-weight: 600; letter-spacing: 0;
}
.due-pill .icon { width: 0.75rem; height: 0.75rem; }
.timeline-title { margin-top: 0.25rem; font-family: var(--font-display); font-size: 0.875rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timeline-role { margin-top: 0.125rem; font-size: 0.75rem; color: var(--muted-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timeline-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem; margin-top: 0.75rem; }
.timeline-cta {
    display: flex; align-items: center; justify-content: center;
    min-height: 2.75rem; border-radius: 0.75rem; border: 1px solid var(--border);
    font-size: 0.75rem; font-weight: 600; color: var(--primary);
}
.timeline-cta--icon { width: 2.75rem; }

.activity-item-icon {
    display: grid; place-items: center;
    width: 2.25rem; height: 2.25rem; border-radius: 0.75rem;
    background: oklch(0.87 0.17 92 / 12%); color: var(--primary);
}
.activity-item-icon--interview, .activity-item-icon--accepted { background: oklch(0.75 0.16 158 / 16%); color: var(--success); }
.activity-item-icon--rejected { background: oklch(0.62 0.22 22 / 16%); color: var(--destructive); }
.activity-item-icon--sent, .activity-item-icon--response { background: oklch(0.76 0.18 60 / 16%); color: var(--secondary); }

/* Floating action button + its menu. */
.fab {
    position: fixed; bottom: 6rem; left: 50%; z-index: 40;
    width: 100%; max-width: 480px; transform: translateX(-50%);
    padding: 0 1.25rem; pointer-events: none;
    display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem;
}
.fab > * { pointer-events: auto; }
.fab-menu { display: none; text-align: right; }
.fab-menu > * + * { margin-top: 0.5rem; }
.fab.is-open .fab-menu { display: block; animation: rise 0.35s ease-out both; }
.fab-item {
    display: inline-flex; align-items: center; gap: 0.5rem;
    min-height: 2.75rem; padding: 0 1rem;
    font-size: 0.75rem; font-weight: 600;
}
.fab-item .icon { width: 1rem; height: 1rem; color: var(--primary); }
.fab-toggle {
    display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 999px;
    color: var(--primary-foreground); background-image: var(--gradient-gold); box-shadow: var(--shadow-glow);
}
.fab-toggle .icon-close, .fab.is-open .fab-toggle .icon-open { display: none; }
.fab.is-open .fab-toggle .icon-close { display: block; }

/* ---------- Bottom nav ---------- */
.dany-bottom-nav {
    position: fixed; inset: auto 0 0 0; z-index: 40;
    margin: 0 auto; max-width: 480px;
    border-top: 1px solid var(--border);
    background: var(--glass);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    padding: 0.5rem 0.5rem calc(env(safe-area-inset-bottom) + 0.5rem);
}
.dany-bottom-nav ul { display: grid; grid-template-columns: repeat(5, 1fr); }
.nav-item {
    display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
    min-height: 2.75rem; padding: 0.25rem 0; border-radius: 0.75rem;
    font-size: 10px; font-weight: 500; color: var(--muted-foreground);
}
.nav-item.active { color: var(--primary); }
.nav-item.active .icon { filter: drop-shadow(0 0 8px currentColor); }

/* ---------- Chat ---------- */
.chat-hero { display: flex; flex-direction: column; align-items: center; padding: 1.5rem 0; }
.chat-hero p { margin-top: 1rem; font-size: 0.875rem; color: var(--muted-foreground); }
.chat-messages { flex: 1; padding: 0 1rem 12rem; }
.chat-messages > * + * { margin-top: 0.75rem; }
.chat-message { display: flex; animation: rise 0.35s ease-out both; }
.chat-message-user { justify-content: flex-end; }
.bubble { max-width: 80%; border-radius: 1rem; padding: 0.75rem 1rem; font-size: 0.875rem; overflow-wrap: anywhere; }
.bubble-text { white-space: pre-line; }
.chat-message-user .bubble { color: var(--primary-foreground); background-image: var(--gradient-gold); }
.chat-message-assistant .bubble { color: var(--card-foreground); }
.chat-message-assistant .bubble.glass-card { border-radius: 1rem; }
.bubble .chips { margin-top: 0.75rem; }
.bubble--wide { max-width: 100%; width: 100%; }
.typing-cursor::after { content: "▍"; margin-left: 1px; color: var(--primary); animation: blink 1s steps(1) infinite; }
.typing-dots { display: inline-flex; gap: 4px; }
.typing-dots span { width: 6px; height: 6px; border-radius: 999px; background: var(--primary); animation: dots 1.2s infinite; }
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }

.chat-dock { position: fixed; inset: auto 0 0 0; z-index: 40; margin: 0 auto; max-width: 480px; }
.chat-form {
    display: flex; align-items: center; gap: 0.5rem;
    border-top: 1px solid var(--border);
    background: var(--glass);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    padding: 0.75rem 1rem 0.5rem;
}
.chat-input {
    flex: 1; min-width: 0; min-height: 2.75rem; padding: 0 1rem;
    border-radius: 999px; border: 1px solid var(--input);
    background: var(--field);
    font-size: 0.875rem; outline: none;
}
.chat-input:focus { box-shadow: 0 0 0 2px var(--ring); }
.chat-input::placeholder { color: var(--muted-foreground); }
.chat-dock-spacer { height: 4rem; }
.mic-btn .icon-close, .mic-btn.is-active .icon-mic { display: none; }
.mic-btn.is-active .icon-close { display: block; }

.voice-panel { margin: 0 1rem 0.5rem; padding: 1rem; animation: rise 0.35s ease-out both; }
.voice-panel[hidden] { display: none; }
.voice-transcript { margin-top: 0.5rem; font-size: 0.875rem; min-height: 1.25rem; }
.voice-bars { display: flex; align-items: flex-end; gap: 0.25rem; height: 2rem; margin-top: 0.75rem; }
.voice-bars span { flex: 1; border-radius: 999px; background: var(--primary); animation: breathe 1s ease-in-out infinite; }
.voice-panel:not(.is-listening) .voice-bars span { animation-play-state: paused; opacity: 0.4; }
.voice-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.75rem; }
.voice-actions .btn { font-size: 0.75rem; border-radius: 0.75rem; }

/* Offer cards (chat search results + /offres). */
.job-cards { margin-top: 0.75rem; }
.job-cards > * + * { margin-top: 0.5rem; }
.job-card { padding: 1rem; }
.job-card-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.75rem; align-items: start; }
.job-card-title { font-family: var(--font-display); font-size: 0.875rem; font-weight: 600; }
.job-card-company { margin-top: 0.125rem; font-size: 0.75rem; color: var(--muted-foreground); }
.job-card-score { font-family: var(--font-display); font-weight: 700; }
.job-card-score--mid { color: var(--secondary); }
.job-card-score--low { color: var(--muted-foreground); }
.score-bar { margin-top: 0.75rem; height: 0.375rem; border-radius: 999px; background: var(--muted); overflow: hidden; }
.score-bar > span { display: block; height: 100%; border-radius: inherit; background-image: var(--gradient-gold); }
.job-card-badges { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 0.75rem; }
.job-card-highlights { margin-top: 0.75rem; font-size: 0.75rem; color: var(--muted-foreground); }
.job-card-highlights li { display: flex; gap: 0.375rem; align-items: flex-start; }
.job-card-highlights li + li { margin-top: 0.25rem; }
.job-card-highlights .icon { width: 0.875rem; height: 0.875rem; color: var(--success); margin-top: 0.2rem; }
.job-card-explanation { margin-top: 0.75rem; font-size: 0.75rem; color: var(--muted-foreground); }

/* ---------- Generic content blocks ---------- */
.card { padding: 1.25rem; }
.card-title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; }
.card-text { margin-top: 0.5rem; font-size: 0.875rem; color: var(--muted-foreground); }
.empty { padding: 1.5rem; font-size: 0.875rem; color: var(--muted-foreground); }
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.kv-grid dt { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted-foreground); }
.kv-grid dd { margin: 0.125rem 0 0; font-size: 0.875rem; font-weight: 500; }
.list-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.75rem; align-items: center; padding: 1rem; }
.list-row-title { font-family: var(--font-display); font-size: 0.875rem; font-weight: 600; }
.list-row-sub { margin-top: 0.125rem; font-size: 0.75rem; color: var(--muted-foreground); }
.fine-print { margin-top: 0.75rem; font-size: 0.75rem; color: var(--muted-foreground); }

/* Profile */
.profile-hero { display: flex; align-items: center; gap: 1rem; padding-top: 2rem; }
.profile-hero .page-title { font-size: 1.25rem; }
.skill-groups > * + * { margin-top: 1rem; }

/* Score rows (resume analyzer). */
.score-row { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 3.5rem; align-items: center; gap: 0.75rem; font-size: 0.8125rem; }
.score-row + .score-row { margin-top: 0.875rem; }
.score-row .score-bar { margin-top: 0; }
.score-row-value { text-align: right; font-family: var(--font-display); font-weight: 700; }
.score-row--ats { padding-top: 0.875rem; border-top: 1px solid var(--border); }
.score-row--ats .score-row-value { color: var(--primary); }

.bullets li { position: relative; padding-left: 1.25rem; font-size: 0.875rem; }
.bullets li + li { margin-top: 0.625rem; }
.bullets li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 0.4rem; height: 0.4rem; border-radius: 999px; background-image: var(--gradient-gold); }

/* Interview coach */
.stars { color: var(--primary); letter-spacing: 0.15em; }
.question { font-family: var(--font-display); font-size: 1.0625rem; font-weight: 600; line-height: 1.4; }
.progress { height: 0.375rem; border-radius: 999px; background: var(--muted); overflow: hidden; margin-top: 0.75rem; }
.progress > span { display: block; height: 100%; background-image: var(--gradient-gold); }
.form-toolbar { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; }
.form-toolbar .btn-gold { flex: 1; }

/* Profile editor */
.edit-nav { position: sticky; top: 0; z-index: 20; margin: 0 -1.25rem; padding: 0.75rem 1.25rem; background: var(--bar); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.edit-nav .chip { min-height: 2.25rem; }
.app > .topbar ~ .edit-nav { top: var(--topbar-h, 4.25rem); }
[id] { scroll-margin-top: 8rem; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 0 0.75rem; }
.field-row + .field, .field + .field-row, .field-row + .field-row { margin-top: 1rem; }
.field-row > .field + .field { margin-top: 1rem; }
.edit-form .btn-block { margin-top: 1.25rem; }
.form-group-title {
    margin-bottom: 0.75rem; font-family: var(--font-display); font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.15em; color: var(--primary);
}
* + .form-group-title { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
input[type="hidden"] + .form-group-title { margin-top: 0; padding-top: 0; border-top: 0; }
.chips + .check-row, .check-row + .field { margin-top: 1rem; }
input[type="month"].input { color-scheme: dark; }
.edit-item { padding: 0; }
.edit-item > summary {
    display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
    padding: 1rem; cursor: pointer; list-style: none;
}
.edit-item > summary::-webkit-details-marker { display: none; }
.edit-item > summary .list-row-title, .edit-item > summary .list-row-sub { display: block; }
.edit-item--new > summary .list-row-title { display: flex; align-items: center; gap: 0.5rem; color: var(--primary); }
.edit-item-icon { color: var(--muted-foreground); }
.edit-item[open] > summary { border-bottom: 1px solid var(--border); }
.edit-item > form { padding: 1rem; }
.edit-item > form + form { padding-top: 0; }
.btn-danger { color: var(--destructive); }
.skill-list > li + li { border-top: 1px solid var(--border); }
.skill-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.75rem; padding: 0.625rem 0; }
.skill-actions { display: flex; align-items: center; gap: 0.5rem; }
.skill-actions .icon-btn { width: 2.25rem; height: 2.25rem; border-color: oklch(0.62 0.22 22 / 35%); }
.skill-add { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0.5rem; margin-top: 1rem; }
.skill-add select.input { width: auto; padding-right: 0.5rem; }
.chip-check { position: relative; }
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check span {
    display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0 0.875rem;
    border-radius: 999px; border: 1px solid var(--border); font-size: 0.8125rem; font-weight: 600;
    color: var(--muted-foreground); cursor: pointer; transition: background-color 0.2s, color 0.2s;
}
.chip-check input:checked + span { color: var(--primary-foreground); background-image: var(--gradient-gold); border-color: transparent; }
.chip-check input:focus-visible + span { outline: 2px solid var(--ring); outline-offset: 2px; }

@media (min-width: 560px) {
    .field-row { grid-template-columns: 1fr 1fr; }
    .field-row > .field + .field { margin-top: 0; }
}

/* CV page */
.completeness-head { display: flex; align-items: center; gap: 1rem; }
.ring {
    --p: 0; flex-shrink: 0; display: grid; place-items: center;
    width: 4.5rem; height: 4.5rem; border-radius: 999px;
    background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--muted) 0);
}
.ring span {
    display: grid; place-items: center; width: 3.6rem; height: 3.6rem; border-radius: 999px;
    background: var(--card); font-family: var(--font-display); font-weight: 700; font-size: 0.9375rem;
}
.checklist { margin-top: 1rem; }
.checklist li { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.5rem 0; font-size: 0.875rem; }
.checklist li + li { border-top: 1px solid var(--border); }
.checklist a { display: flex; flex-direction: column; color: var(--foreground); }
.checklist small { color: var(--muted-foreground); font-size: 0.75rem; }
.checklist .is-done { color: var(--muted-foreground); }
.check-dot {
    display: grid; place-items: center; flex-shrink: 0; margin-top: 0.1rem;
    width: 1.25rem; height: 1.25rem; border-radius: 999px; border: 1.5px solid var(--border);
}
.is-done .check-dot { border: 0; background: var(--success); color: var(--primary-foreground); }
.is-done .check-dot .icon { width: 0.8rem; height: 0.8rem; }
.swatches { display: flex; gap: 0.625rem; margin-top: 0.5rem; flex-wrap: wrap; }
.swatch { position: relative; width: 2.25rem; height: 2.25rem; border-radius: 999px; background: var(--c); cursor: pointer; box-shadow: inset 0 0 0 2px oklch(1 0 0 / 25%); }
.swatch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.swatch:has(input:checked) { outline: 2px solid var(--primary); outline-offset: 3px; }
.swatch:has(input:focus-visible) { outline: 2px solid var(--ring); outline-offset: 3px; }
.ring--sm { width: 3rem; height: 3rem; }
.ring--sm span { width: 2.4rem; height: 2.4rem; font-size: 0.75rem; }
.completeness-banner { display: flex; align-items: center; gap: 0.875rem; margin-top: 1.5rem; padding: 1rem; }
.completeness-banner .chevron { margin-left: auto; color: var(--muted-foreground); flex-shrink: 0; }
.cv-preview { padding: 0; overflow: hidden; }
.cv-preview { position: relative; background: #eceef2; }
.cv-preview iframe { display: block; width: 100%; height: 70vh; min-height: 520px; border: 0; background: #eceef2; }
.cv-preview.is-scaled iframe { position: absolute; top: 0; left: 0; width: 840px; height: 1200px; min-height: 0; transform-origin: 0 0; }

/* Application page */
.app-summary-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.app-status { margin-top: 0.25rem; font-size: 1.25rem; }
.app-status--interview, .app-status--accepted { color: var(--success); }
.app-status--rejected { color: var(--destructive); }
.app-score { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.stepper { display: grid; grid-template-columns: repeat(5, 1fr); margin: 1.25rem 0 0; padding: 0; list-style: none; }
.stepper li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.375rem; text-align: center; }
.stepper li + li::before { content: ""; position: absolute; top: 0.4rem; right: 50%; width: 100%; height: 2px; background: var(--muted); z-index: 0; }
.stepper li.is-done + li.is-done::before { background: var(--primary); }
.stepper-dot { position: relative; z-index: 1; width: 0.875rem; height: 0.875rem; border-radius: 999px; background: var(--muted); border: 2px solid var(--card); }
.stepper .is-done .stepper-dot { background: var(--primary); }
.stepper .is-current .stepper-dot { box-shadow: 0 0 0 4px oklch(0.87 0.17 92 / 25%); }
.stepper-label { font-size: 10px; color: var(--muted-foreground); }
.stepper .is-done .stepper-label { color: var(--foreground); }
.stepper.is-rejected .is-done .stepper-dot, .stepper.is-rejected li.is-done + li.is-done::before { background: var(--muted-foreground); }
.app-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-top: 0.75rem; }
.app-action { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.375rem; min-height: 4.5rem; padding: 0.75rem 0.5rem; border-radius: 1rem; text-align: center; font-size: 0.75rem; font-weight: 600; }
.app-action.glass-card { border-radius: 1rem; }
.app-action .icon { color: var(--primary); }
.status-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem; align-items: center; }
.follow-up-quick { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.875rem; }
.follow-up-date { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem; margin-top: 0.75rem; }
input[type="date"].input, input[type="time"].input { color-scheme: dark; }
.is-due { border-color: oklch(0.76 0.18 60 / 70%); box-shadow: 0 0 24px oklch(0.76 0.18 60 / 25%), var(--shadow-card); }
.row-actions { display: flex; gap: 0.5rem; }
.row-actions .icon-btn, .list-row > form .icon-btn { width: 2.25rem; height: 2.25rem; }
.interview-row.is-past { opacity: 0.6; }
.interview-card { grid-template-columns: auto minmax(0, 1fr); }
.date-badge {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: 3rem; height: 3rem; border-radius: 0.875rem; background-image: var(--gradient-gold); color: var(--primary-foreground); line-height: 1;
}
.date-badge strong { font-family: var(--font-display); font-size: 1.125rem; }
.date-badge small { font-size: 10px; text-transform: uppercase; font-weight: 600; }
.history { list-style: none; }
.history li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 0.75rem; padding: 0.5rem 0; font-size: 0.8125rem; }
.history li + li { border-top: 1px solid var(--border); }
.history-time { color: var(--secondary); font-size: 0.75rem; }

/* Offers */
.job-card-link { color: inherit; }
.pref-warning { display: flex; gap: 0.375rem; align-items: center; margin-top: 0.5rem; font-size: 0.75rem; color: var(--secondary); }
.pref-warning .icon { width: 0.875rem; height: 0.875rem; }
.points li { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.8125rem; padding: 0.25rem 0; }
.points .icon { width: 0.875rem; height: 0.875rem; margin-top: 0.2rem; flex-shrink: 0; }
.points.is-good .icon { color: var(--success); }
.points.is-bad .icon { color: var(--destructive); }
.points.is-unknown .icon { color: var(--muted-foreground); }
.offer-description { font-size: 0.875rem; white-space: pre-line; line-height: 1.65; }

/* Notifications */
.count-badge {
    display: inline-grid; place-items: center; min-width: 1.25rem; height: 1.25rem; padding: 0 0.3rem;
    border-radius: 999px; background: var(--destructive); color: #fff; font-size: 11px; font-weight: 700; line-height: 1;
}
.sidebar-notif .count-badge { margin-left: auto; }
.bell-btn { position: absolute; top: calc(env(safe-area-inset-top) + 1rem); right: 1.25rem; z-index: 5; }
.bell-btn .count-badge { position: absolute; top: -0.25rem; right: -0.25rem; }
.app { position: relative; }
.notif { grid-template-columns: auto minmax(0, 1fr); }
.notif-icon { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 0.75rem; background: oklch(0.87 0.17 92 / 12%); color: var(--primary); }
.notif.is-unread { border-color: oklch(0.87 0.17 92 / 55%); }
.notif.is-unread .list-row-title::before { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; margin-right: 0.375rem; border-radius: 999px; background: var(--primary); vertical-align: middle; }
.learned-list { margin-top: 0.75rem; }
.learned-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.75rem; align-items: center; padding: 0.625rem 0; }
.learned-list li + li { border-top: 1px solid var(--border); }
.learned-list .icon-btn { width: 2.25rem; height: 2.25rem; }

/* Applications: list/board toggle + kanban board */
.tracker-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.view-toggle { display: flex; gap: 0.375rem; }
.view-toggle .icon-btn { width: 2.5rem; height: 2.5rem; color: var(--muted-foreground); }
.view-toggle .icon-btn.is-active { color: var(--primary); border-color: oklch(0.87 0.17 92 / 50%); background: oklch(0.87 0.17 92 / 10%); }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(15rem, 1fr); gap: 0.75rem; overflow-x: auto; margin: 1rem -1.25rem 0; padding: 0 1.25rem 1rem; scroll-snap-type: x mandatory; }
.board-col { display: flex; flex-direction: column; gap: 0.5rem; min-height: 60vh; padding: 0.75rem; border-radius: var(--radius-xl); background: oklch(0.5 0.05 285 / 8%); border: 1px solid var(--border); scroll-snap-align: start; }
.board-col-head { display: flex; justify-content: space-between; align-items: center; padding: 0 0.25rem; }
.board-col-head h2 { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted-foreground); }
.board-list { flex: 1; display: flex; flex-direction: column; gap: 0.5rem; min-height: 4rem; border-radius: 1rem; transition: background-color 0.15s; }
.board-list.is-over, .board-drop.is-over { background: oklch(0.87 0.17 92 / 12%); outline: 2px dashed oklch(0.87 0.17 92 / 60%); outline-offset: 2px; }
.board-drop { display: grid; place-items: center; min-height: 3rem; border-radius: 0.875rem; border: 1px dashed var(--border); font-size: 0.75rem; color: var(--muted-foreground); }
.board-card { padding: 0.75rem; border-radius: 1rem; cursor: grab; }
.board-card.glass-card { border-radius: 1rem; }
.board-card.is-dragging { opacity: 0.5; cursor: grabbing; }
.board-card-link { display: block; }
.board-card-link .list-row-title, .board-card-link .list-row-sub { display: block; }
.board-card-meta { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; margin-top: 0.5rem; font-size: 11px; color: var(--secondary); }

/* Stats */
.week-chart { display: grid; grid-template-columns: repeat(8, 1fr); gap: 0.5rem; align-items: end; height: 10rem; }
.week-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 0.25rem; }
.week-bar { width: 100%; max-width: 1.75rem; min-height: 3px; border-radius: 0.375rem 0.375rem 0.125rem 0.125rem; background-image: var(--gradient-gold); }
.week-count { font-size: 11px; font-weight: 600; color: var(--primary); min-height: 1em; }
.week-label { font-size: 10px; color: var(--muted-foreground); }

/* File drop (resume analyzer) */
.file-drop {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.375rem;
    padding: 1.5rem 1rem; border: 1.5px dashed oklch(0.87 0.17 92 / 45%); border-radius: 1rem;
    text-align: center; cursor: pointer; transition: background-color 0.2s, border-color 0.2s;
}
.file-drop:hover, .file-drop.is-over { background: oklch(0.87 0.17 92 / 7%); border-color: var(--primary); }
.file-drop.has-file { border-style: solid; border-color: var(--success); }
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-drop .icon { color: var(--primary); }
.file-drop-title { font-family: var(--font-display); font-weight: 600; font-size: 0.9375rem; }
.file-drop-sub { font-size: 0.75rem; color: var(--muted-foreground); }
.or-sep { display: flex; align-items: center; gap: 0.75rem; margin: 1rem 0; font-size: 0.75rem; color: var(--muted-foreground); }
.or-sep::before, .or-sep::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* Account */
.danger-card { border-color: oklch(0.62 0.22 22 / 45%); }
.btn-danger-solid { border: 0; background: var(--destructive); color: #fff; }

/* Auth */
.auth-hero { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 1.75rem; }
.auth-hero h1 { margin-top: 1.25rem; font-size: 1.5rem; font-weight: 700; }
.auth-hero p { margin-top: 0.25rem; font-size: 0.875rem; color: var(--muted-foreground); }
.auth-card { padding: 1.5rem; }
.auth-card .btn { margin-top: 1.5rem; }
.auth-links { margin-top: 1.25rem; text-align: center; font-size: 0.8125rem; color: var(--muted-foreground); }
.auth-links a { color: var(--primary); font-weight: 600; }

/* ==========================================================================
 * Desktop "admin" layout (≥1024px). Everything below only applies to large
 * screens; the mobile design above is untouched. The sidebar and the chat's
 * conversation list are in the markup on every size but hidden here.
 * ========================================================================== */
.dany-sidebar, .chat-threads { display: none; }

@media (min-width: 1024px) {
    :root { --sidebar-w: 264px; --topbar-h: 4.75rem; }

    .mobile-only, .dany-bottom-nav { display: none !important; }
    body.has-sidebar { padding-left: var(--sidebar-w); }

    /* Sidebar */
    .dany-sidebar {
        display: flex; flex-direction: column;
        position: fixed; inset: 0 auto 0 0; z-index: 50;
        width: var(--sidebar-w); padding: 1.5rem 1rem;
        border-right: 1px solid var(--border);
        background: var(--sidebar);
        backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
        overflow-y: auto;
    }
    .sidebar-brand { display: flex; align-items: center; gap: 0.75rem; padding: 0 0.5rem 1.5rem; border-bottom: 1px solid var(--border); }
    .sidebar-brand-name { display: block; font-family: var(--font-display); font-size: 1.0625rem; font-weight: 700; }
    .sidebar-brand-sub { display: block; font-size: 11px; color: var(--muted-foreground); }
    .sidebar-nav { flex: 1; margin-top: 0.5rem; }
    .sidebar-section { padding: 1.25rem 0.75rem 0.5rem; font-family: var(--font-display); font-size: 11px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--muted-foreground); }
    .sidebar-nav li + li { margin-top: 0.25rem; }
    .sidebar-link {
        display: flex; align-items: center; gap: 0.75rem;
        min-height: 2.75rem; padding: 0 0.75rem; border-radius: 0.875rem;
        font-size: 0.875rem; font-weight: 500; color: var(--muted-foreground);
        transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
    }
    .sidebar-link:hover { color: var(--foreground); background: oklch(0.87 0.17 92 / 7%); }
    .sidebar-link.active { color: var(--primary-foreground); font-weight: 600; background-image: var(--gradient-gold); box-shadow: var(--shadow-glow); }
    .sidebar-link--danger, .sidebar-link--danger:hover { color: var(--destructive); }
    .sidebar-footer { padding-top: 1rem; border-top: 1px solid var(--border); }
    .sidebar-user { padding: 0 0.75rem 0.5rem; font-size: 0.75rem; color: var(--muted-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    /* Content area */
    .app { max-width: 1180px; padding: 2rem 2.5rem 3rem; }
    .app--narrow { max-width: 820px; }
    .app--wide { max-width: none; }
    .board { margin: 1rem 0 0; padding: 0 0 1rem; }
    .app--auth { max-width: 440px; }
    .app:not(.app--flush) > .topbar { margin: -2rem -2.5rem 0; padding: 1rem 2.5rem; }
    .page-header { padding-top: 0.5rem; }
    .edit-nav { margin: 0 -2.5rem; padding: 0.75rem 2.5rem; }
    .cv-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 2rem; align-items: start; }
    .cv-preview-wrap { margin-top: 1.25rem; position: sticky; top: calc(var(--topbar-h) + 1rem); }
    .cv-preview:not(.is-scaled) iframe { height: calc(100vh - var(--topbar-h) - 5rem); }
    .page-title { font-size: 1.875rem; }

    /* Grids */
    .card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
    .card-grid > * + * { margin-top: 0; }
    .cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; align-items: start; }
    .stats { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); overflow: visible; }
    .stat-card { min-width: 0; padding: 1.5rem; }
    .stat-value { font-size: 2.5rem; }

    /* Dashboard */
    .hero { flex-direction: row; text-align: left; gap: 1.5rem; padding-top: 0.5rem; }
    .hero .dany-avatar { width: 104px !important; height: 104px !important; }
    .hero-title { margin-top: 0; font-size: 1.875rem; }
    .dash-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2rem; align-items: start; margin-top: 1.75rem; }
    .dash-grid .actions { margin-top: 0; position: sticky; top: 2rem; }
    .dash-activity > .section:first-child { margin-top: 0; }
    .fab { left: auto; right: 2.5rem; bottom: 2rem; width: auto; max-width: none; transform: none; padding: 0; }

    /* Chat: side panel (avatar + conversations) | conversation */
    .app--flush { max-width: none; padding: 0; display: grid; grid-template-columns: 320px minmax(0, 1fr); align-items: start; min-height: 100vh; }
    .app--flush > .topbar, .app--flush > .flash { grid-column: 1 / -1; }
    .app--flush > .topbar { padding: 1rem 2rem; }
    .chat-side {
        grid-column: 1; position: sticky; top: var(--topbar-h);
        height: calc(100vh - var(--topbar-h)); overflow-y: auto;
        padding: 1.5rem; border-right: 1px solid var(--border);
    }
    .chat-hero { padding: 0.5rem 0 1.5rem; }
    .chat-threads { display: block; }
    .chat-threads ul { margin-top: 0.5rem; }
    .chat-thread-link {
        display: block; padding: 0.625rem 0.75rem; border-radius: 0.75rem;
        font-size: 0.8125rem; color: var(--muted-foreground);
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .chat-thread-link:hover { color: var(--foreground); background: oklch(0.87 0.17 92 / 7%); }
    .chat-thread-link.active { color: var(--primary); background: oklch(0.87 0.17 92 / 12%); }
    .chat-messages { grid-column: 2; width: 100%; max-width: 920px; padding: 1.5rem 2.5rem 9rem; }
    .bubble { max-width: 70%; }
    .bubble--wide { max-width: 100%; }
    .job-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
    .job-cards > * + * { margin-top: 0; }
    .chat-dock { left: calc(var(--sidebar-w) + 320px); right: 0; max-width: none; margin: 0; }
    .chat-form { padding: 1rem 2.5rem; }
    .chat-dock-spacer { display: none; }
    .voice-panel { margin: 0 2.5rem 0.5rem; max-width: 560px; }
}

@media (min-width: 1440px) {
    .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Error pages */
.error-page { display: flex; flex-direction: column; align-items: center; text-align: center; }
.error-code { margin-top: 1rem; font-family: var(--font-display); font-size: 4rem; font-weight: 700; line-height: 1; }
.error-page h1 { margin-top: 0.5rem; font-size: 1.5rem; }
.error-page .muted { margin-top: 0.5rem; font-size: 0.9375rem; }

/* Theme switch */
.theme-choices { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.theme-choices .chip { gap: 0.375rem; }
.sidebar-theme { width: 100%; text-align: left; }
.theme-icon-light, :root[data-theme="light"] .theme-icon-dark { display: none; }
:root[data-theme="light"] .theme-icon-light { display: inline-flex; }
.theme-icon-dark { display: inline-flex; }

@media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
    .nav-progress.is-loading { transition: none; }
}

/* ---------- Modals (native <dialog>) ---------- */
.modal {
    width: min(520px, calc(100% - 1.5rem)); max-height: calc(100dvh - 2rem); padding: 0;
    border: 1px solid var(--border); border-radius: var(--radius-2xl);
    background: var(--card); color: var(--foreground); box-shadow: 0 30px 80px -20px oklch(0 0 0 / 70%);
    overflow: auto;
}
.modal--wide { width: min(760px, calc(100% - 1.5rem)); }
.modal::backdrop { background: oklch(0.1 0.04 285 / 60%); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal[open] { animation: modal-in 0.2s ease-out both; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-box { padding: 1.25rem; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.modal-title { font-size: 1.125rem; font-weight: 700; }
.modal-x { width: 2.25rem; height: 2.25rem; font-size: 1.25rem; line-height: 1; color: var(--muted-foreground); }
.modal-text { margin-top: 0.5rem; font-size: 0.9375rem; color: var(--muted-foreground); }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 1.25rem; }
.modal .edit-form .btn-block:first-of-type { margin-top: 1.25rem; }
.modal .danger-zone { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
/* On phones, dialogs slide up from the bottom like a sheet. */
@media (max-width: 559px) {
    .modal { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: var(--radius-2xl) var(--radius-2xl) 0 0; max-height: 92dvh; }
    .modal[open] { animation-name: sheet-in; }
    @keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* ---------- Whole-card links ("stretched link"): the card's main link covers the card,
   secondary buttons inside stay clickable above it. ---------- */
.card-link { position: relative; }
.card-link .stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card-link a:not(.stretched), .card-link button, .card-link form, .card-link .above { position: relative; z-index: 2; }
.card-link { cursor: pointer; transition: border-color 0.2s, transform 0.15s; }
.card-link:hover { border-color: oklch(0.87 0.17 92 / 45%); }
.card-link:active { transform: scale(0.99); }
.card-link .stretched:focus-visible { outline: none; }
.card-link:has(.stretched:focus-visible) { outline: 2px solid var(--ring); outline-offset: 2px; }
a.stat-card, a.stat-card:visited { color: inherit; display: block; }
a.stat-card:hover { border-color: oklch(0.87 0.17 92 / 45%); }
.card-more { display: flex; align-items: center; justify-content: flex-end; gap: 0.25rem; margin-top: 0.75rem; font-size: 0.75rem; font-weight: 600; color: var(--primary); }
.stat-card .stat-hint { margin-top: 0.375rem; font-size: 11px; color: var(--primary); opacity: 0.85; }
a.hero-avatar { border-radius: 999px; }
a.hero-link { color: inherit; text-decoration: underline; text-decoration-color: oklch(0.87 0.17 92 / 40%); text-underline-offset: 3px; }
.chip--pending { color: var(--secondary); border-color: oklch(0.76 0.18 60 / 45%); }
.edit-row { width: 100%; text-align: left; border-radius: var(--radius-2xl); }
.edit-row--new .list-row-title { display: flex; align-items: center; gap: 0.5rem; color: var(--primary); }
.modal .edit-form + .danger-zone { margin-top: 0.75rem; }
.stepper li form { display: contents; }
.stepper-btn { display: flex; flex-direction: column; align-items: center; gap: 0.375rem; width: 100%; padding: 0.25rem 0; border-radius: 0.75rem; }
.stepper-btn:not(:disabled):hover .stepper-dot { box-shadow: 0 0 0 4px oklch(0.87 0.17 92 / 20%); }
.stepper-btn:not(:disabled):hover .stepper-label { color: var(--primary); }
.stepper-btn:disabled { cursor: default; }
a.app-score { color: inherit; }
a.app-score:hover .stat-label { color: var(--primary); }
.chip--muted { color: var(--muted-foreground); border-color: var(--border); }
.empty-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
a.score-row--link { color: inherit; border-radius: 0.5rem; } a.score-row--link:hover .score-row-value { color: var(--primary); } button.stat-card { width: 100%; font: inherit; color: inherit; }

/* Onboarding checklist + welcome tour */
.onboarding { margin-top: 1.5rem; }
.onboarding-head { display: flex; align-items: center; gap: 0.875rem; }
.onboarding-steps .check-dot { font-size: 11px; font-weight: 700; color: var(--muted-foreground); }
.onboarding-steps .is-done a strong { text-decoration: line-through; text-decoration-color: var(--muted-foreground); }
.onboarding-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 0.75rem; }
.tour .modal-box { text-align: center; }
.tour-count { font-size: 0.75rem; color: var(--muted-foreground); }
.tour-slide { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; min-height: 15rem; justify-content: center; }
.tour-slide .modal-title { font-size: 1.25rem; }
.tour-icon { display: grid; place-items: center; width: 4.5rem; height: 4.5rem; border-radius: 1.25rem; background-image: var(--gradient-gold); color: var(--primary-foreground); box-shadow: var(--shadow-glow); }
.tour-dots { display: flex; justify-content: center; gap: 0.375rem; margin-top: 1rem; }
.tour-dots span { width: 0.5rem; height: 0.5rem; border-radius: 999px; background: var(--muted); transition: width 0.2s, background 0.2s; }
.tour-dots span.active { width: 1.5rem; background-image: var(--gradient-gold); }
.app-summary-head > div:first-child { flex: 1; } .app-score { flex-shrink: 0; }

/* ==========================================================================
 * Offer list (/offres, screen 1) — 390px reference, no overflow at 375px.
 * ========================================================================== */
.icon-xs { width: 0.875rem; height: 0.875rem; }
.offers-hello { font-size: 0.875rem; color: var(--muted-foreground); }
.offers-head .page-title { margin-top: 0.125rem; }
.offers-status { margin-top: 0.375rem; font-size: 0.8125rem; color: var(--accent-text); }

.offer-filters { margin-top: 1.25rem; }
.search-field { position: relative; }
.search-field > .icon { position: absolute; left: 0.875rem; top: 50%; transform: translateY(-50%); color: var(--muted-foreground); pointer-events: none; }
.search-field .input { padding-left: 2.5rem; min-height: 2.75rem; width: 100%; }
.filter-chips { margin-top: 0.75rem; }
.filter-chips .chip-check span, .filter-chips .chip { min-height: 2.75rem; white-space: nowrap; }
.filters-toggle { gap: 0.375rem; color: var(--foreground); border-color: var(--border); }
.filters-toggle[aria-expanded="true"] { border-color: var(--primary); color: var(--primary); }
.filters-panel { margin-top: 0.75rem; padding: 1rem; animation: rise 0.2s ease-out both; }
.filters-panel fieldset { border: 0; margin: 0 0 1rem; padding: 0; min-width: 0; }
.filters-panel legend { margin-bottom: 0.5rem; padding: 0; }
.filters-panel .chip-check span { min-height: 2.75rem; }

.tabs { display: flex; gap: 0.25rem; margin-top: 1.25rem; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tab {
    display: inline-flex; align-items: center; gap: 0.375rem; flex-shrink: 0;
    min-height: 2.75rem; padding: 0 0.75rem; margin-bottom: -1px;
    font-family: var(--font-display); font-size: 0.875rem; font-weight: 600; color: var(--muted-foreground);
    border-bottom: 2px solid transparent; transition: color 0.15s, border-color 0.15s;
}
.tab:hover { color: var(--foreground); }
.tab.is-active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-count { min-width: 1.375rem; padding: 0 0.375rem; border-radius: 999px; background: var(--muted); color: var(--foreground); font-size: 0.75rem; text-align: center; line-height: 1.375rem; }
.tab.is-active .tab-count { background: var(--primary); color: var(--primary-foreground); }

.offer-list { margin-top: 1rem; }
.offer-list > li + li { margin-top: 0.75rem; }
.offer-card { padding: 1rem; min-width: 0; }
.offer-card-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.875rem; align-items: start; }
.offer-card-title { font-size: 1rem; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.offer-card-title a { color: inherit; }
.offer-card-meta { margin-top: 0.25rem; font-size: 0.8125rem; color: var(--muted-foreground); overflow-wrap: anywhere; }

.score-ring {
    display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 999px;
    border: 3px solid var(--muted); font-family: var(--font-display); font-size: 1.125rem; font-weight: 800;
}
.score-ring--gold { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 18px rgb(255 215 0 / 25%); }
.score-ring--beige { border-color: var(--accent); color: var(--accent-text); }
.score-ring--grey { border-color: var(--muted); color: var(--muted-foreground); }

.offer-pills { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 0.75rem; }
.pill { display: inline-flex; align-items: center; gap: 0.3rem; min-height: 1.75rem; padding: 0 0.625rem; border-radius: 999px; background: var(--muted); font-size: 0.75rem; color: var(--foreground); }
.pill .icon { color: var(--accent-text); }
.offer-card-why { display: flex; gap: 0.5rem; align-items: flex-start; margin-top: 0.75rem; font-size: 0.875rem; line-height: 1.45; }
.offer-card-why .icon { margin-top: 0.15rem; color: var(--primary); }
.ai-later { display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 0.5rem; padding: 0.125rem 0.5rem; border-radius: 999px; border: 1px dashed var(--accent); font-size: 0.6875rem; color: var(--accent-text); }
.offer-card-discard { display: flex; gap: 0.5rem; align-items: flex-start; margin-top: 0.75rem; font-size: 0.8125rem; color: var(--secondary); }
.offer-card-discard .icon { margin-top: 0.15rem; }
.offer-card-sep { height: 1px; margin: 0.875rem 0 0.75rem; background: var(--border); }

.tracker { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.tracker-step { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.tracker-bar { height: 0.3125rem; border-radius: 999px; background: var(--muted); transition: background-color 0.2s; }
.tracker-step.is-done .tracker-bar { background: var(--primary); }
.tracker-step.is-current .tracker-bar { background: var(--secondary); }
.tracker-label { font-size: 0.6875rem; color: var(--muted-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tracker-step.is-done .tracker-label { color: var(--foreground); }
.tracker-step.is-current .tracker-label { color: var(--secondary); font-weight: 700; }
.offer-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; margin-top: 0.625rem; font-size: 0.8125rem; }
.offer-card-status { min-width: 0; color: var(--foreground); }
.offer-card-action { display: inline-flex; align-items: center; gap: 0.2rem; flex-shrink: 0; color: var(--accent-text); font-weight: 700; text-align: right; }
.offer-card-action.is-cta { color: var(--secondary); }

.load-more-item { list-style: none; }
.load-more.is-loading { opacity: 0.6; pointer-events: none; }
.offer-skeleton { height: 13rem; border-radius: var(--radius-2xl); background: linear-gradient(90deg, var(--card) 25%, var(--muted) 50%, var(--card) 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.discarded-block { margin-top: 1.5rem; padding: 0 1rem; }
.discarded-block > summary { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 3.25rem; cursor: pointer; list-style: none; font-family: var(--font-display); font-weight: 600; font-size: 0.9375rem; }
.discarded-block > summary::-webkit-details-marker { display: none; }
.discarded-chevron { transition: transform 0.2s; color: var(--muted-foreground); }
.discarded-block[open] .discarded-chevron { transform: rotate(180deg); }
.discarded-block[open] { padding-bottom: 1rem; }
.reason-list li { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.5rem 0; font-size: 0.875rem; border-top: 1px solid var(--border); }
.reason-count { color: var(--secondary); font-weight: 700; }

.score-legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin-top: 1.25rem; font-size: 0.75rem; color: var(--muted-foreground); }
.score-legend li { display: inline-flex; align-items: center; gap: 0.375rem; }
.legend-dot { width: 0.75rem; height: 0.75rem; border-radius: 999px; border: 3px solid; }
.legend-dot--gold { border-color: var(--primary); }
.legend-dot--beige { border-color: var(--accent); }
.legend-dot--grey { border-color: var(--muted-foreground); opacity: 0.6; }

@media (min-width: 1024px) {
    .offer-list > li + li { margin-top: 0; }
    .offer-list .load-more-item { grid-column: 1 / -1; }
    .filters-panel { max-width: 36rem; }
}

/* ==========================================================================
 * Offer page (/offres/{id}, screen 2).
 * ========================================================================== */
.offer-topbar { grid-template-columns: auto minmax(0, 1fr) auto; }
.offer-topbar-actions { display: flex; gap: 0.5rem; }
.icon-btn--on { color: var(--primary-foreground); background: var(--primary); border-color: transparent; }
.offer-hero { padding-top: 1.25rem; }
.offer-source { font-size: 0.75rem; color: var(--muted-foreground); overflow-wrap: anywhere; }
.offer-title { margin-top: 0.375rem; font-size: 1.5rem; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.offer-company { margin-top: 0.375rem; font-size: 0.9375rem; color: var(--accent-text); }
.restore-form { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 1rem; padding: 0.75rem 1rem; border-radius: 1rem; border: 1px dashed var(--secondary); font-size: 0.875rem; }

.score-card { margin-top: 1.25rem; padding: 1.25rem; border: 1.5px solid var(--primary); box-shadow: 0 0 28px rgb(255 215 0 / 14%), var(--shadow-card); }
.score-block { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: center; }
.score-ring--xl { width: 4.75rem; height: 4.75rem; border-width: 4px; font-size: 1.75rem; }
.score-verdict { font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; }
.score-oneliner { display: flex; gap: 0.5rem; align-items: flex-start; margin-top: 0.375rem; font-size: 0.9375rem; line-height: 1.45; }
.score-oneliner .icon { margin-top: 0.2rem; color: var(--primary); }
.skeleton-lines { display: grid; gap: 0.4rem; margin-top: 0.5rem; }
.skeleton-lines span { display: block; height: 0.8rem; border-radius: 999px; background: linear-gradient(90deg, var(--muted) 25%, rgb(255 255 255 / 10%) 50%, var(--muted) 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.skeleton-lines span:last-child { width: 65%; }

.apply-block { display: grid; gap: 0.625rem; margin-top: 1.25rem; }
.btn-lg { min-height: 3.25rem; font-size: 1rem; border-radius: 1rem; }
.btn-beige { border: 0; color: var(--accent-foreground); background: var(--accent); }
.apply-all { justify-self: center; min-height: 2.75rem; display: inline-flex; align-items: center; font-weight: 700; color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.apply-note { font-size: 0.8125rem; color: var(--muted-foreground); text-align: center; }
.apply-sent { display: flex; align-items: center; gap: 0.5rem; padding: 0.875rem 1rem; border-radius: 1rem; background: var(--muted); font-weight: 700; }
.apply-sent .icon { color: var(--primary); }

.offer-section { margin-top: 1.75rem; }
.offer-section-title { font-size: 1.0625rem; font-weight: 800; }
.offer-section-title + * { margin-top: 0.75rem; }

.vtrack { list-style: none; margin-bottom: 0; padding: 1rem 1.25rem; }
.vtrack-step { position: relative; display: grid; grid-template-columns: 1.5rem minmax(0, 1fr) auto; align-items: center; gap: 0.75rem; min-height: 2.75rem; }
.vtrack-step:not(:last-child)::after { content: ""; position: absolute; left: calc(0.75rem - 1px); top: calc(50% + 0.75rem); height: calc(100% - 1.5rem); width: 2px; background: var(--muted); }
.vtrack-step.is-done:not(:last-child)::after { background: var(--primary); }
.vtrack-dot { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 999px; border: 2px solid var(--muted); color: var(--primary-foreground); }
.vtrack-step.is-done .vtrack-dot { background: var(--primary); border-color: var(--primary); }
.vtrack-step.is-next .vtrack-dot { border-color: var(--secondary); box-shadow: 0 0 0 4px rgb(255 149 0 / 18%); }
.vtrack-label { font-size: 0.9375rem; color: var(--muted-foreground); }
.vtrack-step.is-done .vtrack-label { color: var(--foreground); font-weight: 700; }
.vtrack-step.is-next .vtrack-label { color: var(--secondary); font-weight: 700; }
.vtrack-date { font-size: 0.8125rem; color: var(--muted-foreground); text-align: right; }

.why-list li { display: flex; gap: 0.625rem; align-items: flex-start; padding: 0.375rem 0; font-size: 0.9375rem; }
.why-list .icon { margin-top: 0.2rem; }
.why-list--match .icon { color: var(--primary); }
.why-list--gap .icon { color: var(--secondary); }
.why-list + .why-list { margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid var(--border); }
.highlight-box { margin-top: 1rem; padding: 0.875rem 1rem; border-radius: 1rem; background: rgb(212 165 116 / 12%); border-left: 3px solid var(--accent); font-size: 0.9375rem; }
.highlight-title { font-family: var(--font-display); font-weight: 800; color: var(--accent-text); margin-bottom: 0.25rem; }

.passed-list { margin: 0.5rem 0 1.25rem; }
.passed-list li { display: flex; gap: 0.5rem; align-items: flex-start; padding: 0.2rem 0; font-size: 0.8125rem; color: var(--muted-foreground); }
.passed-list .icon { margin-top: 0.2rem; color: var(--primary); }
.calc-bars > li + li { margin-top: 1rem; }
.calc-bar-head { display: flex; justify-content: space-between; gap: 0.75rem; font-weight: 700; font-size: 0.9375rem; }
.calc-bar-value { font-family: var(--font-display); color: var(--primary); }
.calc-bar { height: 0.5rem; margin-top: 0.375rem; border-radius: 999px; background: var(--muted); overflow: hidden; }
.calc-bar > span { display: block; height: 100%; border-radius: inherit; background-image: var(--gradient-gold); }
.calc-bar-detail { margin-top: 0.375rem; font-size: 0.8125rem; color: var(--muted-foreground); }
.calc-adjust { display: flex; gap: 0.5rem; align-items: flex-start; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: 0.875rem; }
.calc-adjust .icon { margin-top: 0.15rem; color: var(--primary); }

.detail-card > * + .detail-title { margin-top: 1.25rem; }
.detail-title { font-family: var(--font-display); font-size: 0.9375rem; font-weight: 800; margin-bottom: 0.5rem; }
.skill-pills { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.skill-pill { display: inline-flex; align-items: center; gap: 0.25rem; min-height: 1.875rem; padding: 0 0.75rem; border-radius: 999px; font-size: 0.8125rem; font-weight: 700; }
.skill-pill.is-have { background: var(--primary); color: var(--primary-foreground); }
.skill-pill.is-missing { border: 1.5px dashed var(--secondary); color: var(--secondary); }
.skill-pill.is-nice:not(.is-have) { border: 1px solid var(--border); color: var(--muted-foreground); font-weight: 600; }
.skill-pill small { font-weight: 400; }
.full-text { margin-top: 1.25rem; border-top: 1px solid var(--border); }
.full-text > summary { display: flex; align-items: center; justify-content: space-between; min-height: 2.75rem; cursor: pointer; list-style: none; font-weight: 700; }
.full-text > summary::-webkit-details-marker { display: none; }
.full-text[open] > summary .icon { transform: rotate(180deg); }
.other-sources { margin-top: 1.25rem; font-size: 0.8125rem; color: var(--muted-foreground); }
.other-sources a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
 * Applying: screen 3 (vérifier avant d'envoyer) and screen 4 (assistée).
 * ========================================================================== */
.review-form { display: grid; gap: 1rem; margin-top: 1.25rem; }
.envelope { display: grid; gap: 0.5rem; margin: 0 0 1rem; }
.envelope > div { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: 0.5rem; font-size: 0.875rem; }
.envelope dt { color: var(--muted-foreground); }
.envelope dd { margin: 0; overflow-wrap: anywhere; }
.review-parts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; border: 0; margin: 0; padding: 0; }
.review-parts .chip-check span { min-height: 2.75rem; gap: 0.375rem; }
.review-parts .fine-print { width: 100%; margin-top: 0; }
.cv-card-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.75rem; align-items: center; }
.cv-card-icon { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 0.75rem; background: rgb(255 215 0 / 12%); color: var(--primary); }
.cv-card-name { font-size: 0.9375rem; font-weight: 800; overflow-wrap: anywhere; }
.cv-card-badge { display: inline-flex; align-items: center; gap: 0.25rem; margin-top: 0.25rem; font-size: 0.75rem; font-weight: 700; color: var(--primary); }
.cv-card-text { margin-top: 0.75rem; font-size: 0.875rem; color: var(--muted-foreground); }
.cv-card-actions { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.5rem; margin-top: 0.875rem; }
.cv-version { min-height: 2.75rem; }
.letter-title { font-size: 1.0625rem; font-weight: 800; }
.tone-choice { border: 0; margin: 0.75rem 0; padding: 0; }
.tone-choice legend { margin-bottom: 0.375rem; padding: 0; }
.tone-choice .chip-check span { min-height: 2.75rem; }
.letter-text { width: 100%; margin-top: 0.5rem; font-size: 0.9375rem; line-height: 1.6; }
.letter-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.625rem; }
.letter-mode { border: 0; margin: 0.5rem 0 0; padding: 0; }
.letter-mode .check-row input { accent-color: var(--primary); width: 1.25rem; height: 1.25rem; }
.review-options { display: grid; }
.review-options input[type="checkbox"] { width: 1.25rem; height: 1.25rem; accent-color: var(--primary); flex-shrink: 0; }
.review-actions { display: grid; gap: 0.625rem; }
.btn-outline-gold { border: 1.5px solid var(--primary); color: var(--primary); background: transparent; }
.review-quota { text-align: center; margin-top: 0; }
.review-form [data-part][hidden] { display: none; }

.assisted-head .page-title { font-size: 1.5rem; }
.assisted-steps { display: grid; gap: 0.875rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.assisted-step { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.875rem; align-items: start; }
.step-badge { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 999px; background: var(--primary); color: var(--primary-foreground); font-family: var(--font-display); font-weight: 800; }
.step-body { min-width: 0; }
.step-title { font-size: 1rem; font-weight: 800; line-height: 2rem; }
.step-text { margin-bottom: 0.75rem; font-size: 0.875rem; color: var(--muted-foreground); overflow-wrap: anywhere; }
.letter-preview { max-height: 12rem; overflow-y: auto; padding: 0.75rem; border-radius: 0.75rem; background: var(--muted); font-size: 0.875rem; white-space: pre-line; }
.step-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: 0.625rem; }
.step-actions form { display: contents; }
.answers > li + li { margin-top: 0.875rem; padding-top: 0.875rem; border-top: 1px solid var(--border); }
.answer-question { font-weight: 700; font-size: 0.875rem; color: var(--accent-text); }
.answer-text { margin: 0.25rem 0 0.5rem; font-size: 0.875rem; white-space: pre-line; overflow-wrap: anywhere; }
.btn-sm { min-height: 2.75rem; padding: 0 0.875rem; font-size: 0.8125rem; }
.assisted-done { display: grid; gap: 0.5rem; margin-top: 1.25rem; }
.toast-icon { flex-shrink: 0; color: var(--success); }

/* Profile edit: how a skill appears on the CV. */
.skill-cv { margin-top: 0.375rem; }
.skill-cv > summary { min-height: 2.75rem; display: inline-flex; align-items: center; cursor: pointer; font-size: 0.8125rem; font-weight: 700; color: var(--primary); }
.skill-cv-form { display: grid; gap: 0.5rem; padding: 0.75rem 0; }
.skill-cv-form .field + .field { margin-top: 0; }
.skill-add { grid-template-columns: minmax(0, 1fr) auto auto auto; }
@media (max-width: 420px) {
    .skill-add { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
    .skill-add > input[name="name"] { grid-column: 1 / -1; }
}
.maybe-filled { display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 0.5rem; padding: 0.125rem 0.5rem; border-radius: 999px; background: rgb(255 149 0 / 14%); color: var(--secondary); font-size: 0.75rem; font-weight: 700; }
