/* TranslatorFlow — shared design system */
:root {
  --bg: #E8F5E9;            /* mint background */
  --bg-soft: #F1F9F2;
  --surface: #FFFFFF;
  --ink: #0A0A0A;           /* primary CTA black */
  --ink-soft: #1F2937;
  --muted: #6B7280;
  --muted-2: #9CA3AF;
  --line: #E5E7EB;
  --accent: #16A34A;        /* TranslatorFlow green */
  --accent-soft: #DCFCE7;
  --accent-strong: #15803D;
  --warn: #F59E0B;
  --danger: #DC2626;
  --info: #2563EB;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 6px 16px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 880px; margin: 0 auto; padding: 0 24px; }

/* ===== HEADER ===== */
.tf-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.tf-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
}
.tf-logo {
  font-weight: 800; font-size: 22px; letter-spacing: -0.02em;
  color: var(--ink); display: inline-flex; align-items: baseline; gap: 0;
}
.tf-logo .accent { color: var(--accent); }
.tf-logo .dot { color: var(--accent); }
.tf-nav { display: flex; align-items: center; gap: 32px; }
.tf-nav a { color: var(--ink); font-weight: 500; font-size: 15px; }
.tf-nav a:hover { color: var(--accent-strong); }
@media (max-width: 768px) { .tf-nav-links { display: none; } }

/* ===== LOGO ===== */
.logo-img {
  display: block;
  height: 24px;
  width: auto;
}

/* Header (fond clair) */
.tf-header .logo-img {
  height: 24px;
}

/* Footer (fond sombre) */
.tf-footer .logo-img {
  height: 24px;
  filter: brightness(0) invert(1);
}

@media (max-width: 768px) {
  .tf-header .logo-img {
    height: 22px;  /* était 30px ligne 71 */
  }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 14px;
  border: 1px solid transparent; transition: all .15s ease; white-space: nowrap;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #1F1F1F; transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-strong); }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: rgba(0,0,0,0.04); }
.btn-lg { padding: 16px 28px; font-size: 15px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* ===== CARDS ===== */
.card {
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid rgba(0,0,0,0.04); box-shadow: var(--shadow-sm);
  padding: 24px;
}
.card-flat { background: var(--surface); border-radius: var(--radius); padding: 24px; }
.card-dark { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 24px; }

/* ===== BADGES ===== */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 500;
  background: var(--accent-soft); color: var(--accent-strong);
}
.badge-gray { background: #F3F4F6; color: #4B5563; }
.badge-amber { background: #FEF3C7; color: #92400E; }
.badge-red { background: #FEE2E2; color: #991B1B; }
.badge-blue { background: #DBEAFE; color: #1E40AF; }
.badge-vip { background: linear-gradient(135deg, #F59E0B, #D97706); color: #fff; font-weight: 600; }
.badge-dot::before { content: "●"; font-size: 8px; }

/* ===== FORMS ===== */
.field { display: block; margin-bottom: 16px; }
.label { display: block; font-size: 13px; font-weight: 500; color: var(--ink-soft); margin-bottom: 6px; }
.label .req { color: var(--danger); }
.input, .select, .textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; font-size: 14px; font-family: inherit; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.textarea { resize: vertical; min-height: 100px; }
.select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.checkbox-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.checkbox-row input { width: 18px; height: 18px; accent-color: var(--accent); }
.help { font-size: 12px; color: var(--muted); margin-top: 4px; }
.error { font-size: 12px; color: var(--danger); margin-top: 4px; }

/* ===== TABLES ===== */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; padding: 12px 14px; font-weight: 500; color: var(--muted); background: var(--bg-soft); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.table td { padding: 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover { background: var(--bg-soft); }

/* ===== AVATAR ===== */
.avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff; font-weight: 600; display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.avatar-sm { width: 32px; height: 32px; font-size: 13px; }
.avatar-lg { width: 96px; height: 96px; font-size: 32px; }
.avatar-xl { width: 128px; height: 128px; font-size: 40px; }

/* ===== STARS ===== */
.stars { color: #F59E0B; letter-spacing: 1px; font-size: 14px; }

/* ===== FLAG-LANG TAGS ===== */
.lang-tag {
  display: inline-flex; align-items: center; gap: 4px;
  background: #F3F4F6; padding: 3px 8px; border-radius: 6px;
  font-size: 12px; font-weight: 500; color: var(--ink-soft);
}

/* ===== HERO HOMEPAGE ===== */
.hero {
  padding: 60px 0 80px;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 {
  font-size: clamp(40px, 5.5vw, 64px); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.05; margin: 0 0 24px;
}
.hero p { font-size: 17px; color: var(--ink-soft); max-width: 520px; margin: 0 0 24px; }
.hero-image-wrap {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 4/3; background: #ddd;
}
.hero-image-wrap img { width: 100%; height: 100%; object-fit: cover; }
.hero-floating {
  position: absolute; background: #fff; border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 12px 16px; display: flex; align-items: center; gap: 10px;
}

/* ===== SECTION ===== */
.section { padding: 80px 0; }
.section-title { font-size: clamp(32px, 4vw, 44px); font-weight: 800; letter-spacing: -0.025em; margin: 0 0 16px; }
.eyebrow { color: var(--muted); font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }

/* ===== FOOTER ===== */
.tf-footer { background: var(--ink); color: #fff; padding: 60px 0 28px; margin-top: 80px; }
.tf-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 768px) { .tf-footer-grid { grid-template-columns: 1fr 1fr; } }
.tf-footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: #9CA3AF; margin: 0 0 16px; font-weight: 500; }
.tf-footer a { display: block; color: #D1D5DB; font-size: 14px; padding: 4px 0; }
.tf-footer a:hover { color: #fff; }
.tf-footer-bottom { border-top: 1px solid #1F2937; margin-top: 40px; padding-top: 24px; display: flex; justify-content: space-between; color: #9CA3AF; font-size: 13px; flex-wrap: wrap; gap: 12px; }

/* ===== DASHBOARD LAYOUT ===== */
.dash { display: grid; grid-template-columns: 260px 1fr; min-height: calc(100vh - 73px); }
@media (max-width: 900px) { .dash { grid-template-columns: 1fr; } }
.dash-side {
  background: #fff; border-right: 1px solid var(--line);
  padding: 24px 16px; position: sticky; top: 73px; height: calc(100vh - 73px); overflow-y: auto;
}
@media (max-width: 900px) { .dash-side { position: static; height: auto; } }
.dash-side h5 { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 16px 12px 8px; font-weight: 600; }
.dash-side a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; color: var(--ink-soft);
  font-size: 14px; font-weight: 500; margin-bottom: 2px;
}
.dash-side a:hover { background: var(--bg-soft); }
.dash-side a.active { background: var(--ink); color: #fff; }
.dash-main { padding: 32px; background: var(--bg-soft); }
@media (max-width: 600px) { .dash-main { padding: 20px; } }
.dash-header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 16px; margin-bottom: 28px; }
.dash-header h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 4px; }
.dash-header p { color: var(--muted); margin: 0; }

/* ===== STATS / KPI ===== */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.kpi { background: #fff; padding: 20px; border-radius: var(--radius); border: 1px solid var(--line); }
.kpi-label { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.kpi-value { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; }
.kpi-delta { font-size: 12px; color: var(--accent-strong); margin-top: 4px; }

/* ===== PROGRESS ===== */
.progress { width: 100%; height: 8px; background: #E5E7EB; border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--accent); border-radius: 999px; transition: width .4s; }

/* ===== TABS ===== */
.tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tab { padding: 10px 4px; font-size: 14px; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; margin-right: 16px; }
.tab.active { color: var(--ink); border-bottom-color: var(--ink); }

/* ===== STATUS PILLS ===== */
.status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-sent { background: #DBEAFE; color: #1E40AF; }
.status-accepted { background: #FEF3C7; color: #92400E; }
.status-progress { background: #E0E7FF; color: #3730A3; }
.status-delivered { background: #DCFCE7; color: #15803D; }
.status-done { background: #F3F4F6; color: #4B5563; }

/* ===== UTILS ===== */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.grid { display: grid; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 768px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.text-sm { font-size: 13px; } .text-xs { font-size: 12px; } .text-lg { font-size: 18px; } .text-xl { font-size: 22px; } .text-2xl { font-size: 28px; }
.text-muted { color: var(--muted); }
.font-bold { font-weight: 700; } .font-semibold { font-weight: 600; } .font-medium { font-weight: 500; }
.text-center { text-align: center; }
.hidden { display: none; }
