/* ============================================================
   WORKERS App — design system
   Inspiré du deck : noir profond, crème, ambre, chips pilules
   ============================================================ */

:root {
  --noir:        #16171B;
  --noir-2:      #1F2026;
  --noir-3:      #2A2B33;
  --creme:       #F4F2ED;
  --blanc:       #FFFFFF;
  --amber:       #F5A83C;
  --orange:      #F26F21;
  --orange-dark: #d85d12;
  --rouge:       #EF4823;
  --vert:        #2E9E6B;
  --ink:         #16171B;
  --body:        #464a54;
  --muted:       #82868f;
  --line:        #E5E2DA;
  --radius:      22px;
  --radius-sm:   14px;
  --shadow:      0 20px 50px rgba(22,23,27,.14);
  --shadow-sm:   0 8px 24px rgba(22,23,27,.08);
  --max:         1180px;
  --font:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-head:   'Poppins', 'Inter', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font); color: var(--body); background: var(--creme);
  line-height: 1.6; -webkit-font-smoothing: antialiased;
  display: flex; min-height: 100vh; flex-direction: column;
}
h1,h2,h3,h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 10px; }
h2 { font-size: clamp(21px, 3vw, 28px); margin-bottom: 12px; }
h3 { font-size: 18px; margin-bottom: 8px; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; width: 100%; }
.main { flex: 1; padding: 34px 22px 70px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mt { margin-top: 18px; } .mb { margin-bottom: 18px; }
.right { text-align: right; }

/* ---------- Topbar ---------- */
.topbar {
  background: var(--noir); color: #fff; position: sticky; top: 0; z-index: 50;
  box-shadow: 0 4px 24px rgba(0,0,0,.25);
}
.topbar-in { display: flex; align-items: center; justify-content: space-between; min-height: 66px; gap: 18px; }
.brand { display: flex; align-items: baseline; gap: 7px; }
.brand .logo {
  font-family: var(--font-head); font-weight: 800; letter-spacing: .12em; font-size: 19px;
  color: var(--amber);
}
.brand .logo-sub { font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: rgba(255,255,255,.55); }
.topnav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.topnav a { font-weight: 600; font-size: 14.5px; color: rgba(255,255,255,.82); }
.topnav a:hover { color: var(--amber); }
.wplus-link { color: var(--amber) !important; font-weight: 800 !important; }
.bell { position: relative; font-size: 17px; }
.bell-count {
  position: absolute; top: -7px; right: -11px; background: var(--rouge); color: #fff;
  font-size: 10.5px; font-weight: 800; border-radius: 999px; padding: 1px 5px; line-height: 1.3;
}
.linklike {
  background: none; border: 0; color: rgba(255,255,255,.6); font: inherit; font-weight: 600;
  font-size: 14.5px; cursor: pointer; padding: 0;
}
.linklike:hover { color: #fff; }
.inline-form { display: inline; }
.burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.burger span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; border-radius: 2px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 26px; border-radius: 999px; font-weight: 700; font-size: 15px; cursor: pointer;
  border: 2px solid transparent; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  font-family: var(--font);
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: 8px 18px; font-size: 13.5px; }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 10px 24px rgba(242,111,33,.35); }
.btn-primary:hover { background: var(--orange-dark); }
.btn-dark { background: var(--noir); color: #fff; }
.btn-dark:hover { background: var(--noir-3); }
.btn-ghost { background: transparent; color: var(--ink); border-color: rgba(22,23,27,.2); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-danger { background: var(--rouge); color: #fff; }
.btn-amber { background: var(--amber); color: var(--noir); }
.btn-block { width: 100%; }

/* ---------- Cartes ---------- */
.card {
  background: var(--blanc); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm);
}
.card-dark { background: var(--noir); color: rgba(255,255,255,.85); border: 0; }
.card-dark h1, .card-dark h2, .card-dark h3 { color: #fff; }
.card + .card { margin-top: 18px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Stat tiles ---------- */
.stat { background: var(--noir); color: #fff; border-radius: var(--radius); padding: 22px 24px; }
.stat .n { font-family: var(--font-head); font-size: 34px; font-weight: 800; color: var(--amber); line-height: 1.1; }
.stat .l { font-size: 13px; color: rgba(255,255,255,.6); font-weight: 600; }

/* ---------- Eyebrow ---------- */
.eyebrow {
  font-size: 12.5px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
  color: var(--rouge); margin-bottom: 10px; display: block;
}
.eyebrow.amber { color: var(--amber); }

/* ---------- Formulaires ---------- */
label.field { display: block; margin-bottom: 16px; }
label.field > span, .field-label {
  display: block; font-size: 12px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 7px;
}
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date],
input[type=time], input[type=number], select, textarea {
  width: 100%; padding: 13px 16px; border-radius: var(--radius-sm); border: 1.5px solid var(--line);
  background: #fff; font: inherit; color: var(--ink); transition: border-color .15s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--amber); }
textarea { min-height: 110px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0; font-size: 14.5px; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--orange); }
.hint { font-size: 13px; color: var(--muted); margin-top: 5px; }
.honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---------- Chips (métiers, PMS) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip { position: relative; }
.chip input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.chip span {
  display: inline-block; padding: 9px 18px; border-radius: 999px; background: #fff;
  border: 1.5px solid var(--line); font-weight: 600; font-size: 14px; cursor: pointer;
  transition: all .13s ease; color: var(--ink);
}
.chip input:checked + span { background: var(--noir); color: #fff; border-color: var(--noir); }
.chip input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 2px; }
.chip-fam { width: 100%; font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 10px 0 2px; }

/* ---------- Badges ---------- */
.badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 800;
  letter-spacing: .02em;
}
.badge-ok   { background: #e2f3ea; color: #157a4e; }
.badge-no   { background: #fde5e0; color: #c0330f; }
.badge-wait { background: #fdf0d7; color: #a06a08; }
.badge-mut  { background: #ececec; color: #666; }
.badge-urgence { background: var(--rouge); color: #fff; text-transform: uppercase; letter-spacing: .06em; }
.badge-wplus { background: var(--amber); color: var(--noir); text-transform: uppercase; letter-spacing: .06em; }

/* ---------- Flash ---------- */
.flash { padding: 14px 20px; border-radius: var(--radius-sm); margin-bottom: 16px; font-weight: 600; font-size: 14.5px; }
.flash-ok    { background: #e2f3ea; color: #157a4e; }
.flash-error { background: #fde5e0; color: #c0330f; }
.flash-warn  { background: #fdf0d7; color: #a06a08; }
.flash-info  { background: #e7edf7; color: #2c4a7c; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius-sm); overflow: hidden; }
table.list th {
  text-align: left; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); padding: 12px 14px; border-bottom: 2px solid var(--line); background: #faf9f6;
}
table.list td { padding: 13px 14px; border-bottom: 1px solid var(--line); font-size: 14.5px; vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }

/* ---------- Annonces ---------- */
.annonce-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px;
  display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.annonce-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.annonce-card.is-urgente { border: 2px solid var(--rouge); }
.annonce-card.is-wplus { border: 2px solid var(--amber); }
.annonce-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.annonce-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--body); }
.annonce-meta strong { color: var(--ink); }
.taux { font-family: var(--font-head); font-weight: 800; font-size: 22px; color: var(--ink); }
.taux small { font-size: 13px; color: var(--muted); font-weight: 600; }

/* ---------- Récap prix ---------- */
.recap { background: var(--noir); color: #fff; border-radius: var(--radius); padding: 20px 24px; }
.recap .row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14.5px; color: rgba(255,255,255,.75); }
.recap .row.total { border-top: 1px solid rgba(255,255,255,.18); margin-top: 8px; padding-top: 12px; font-weight: 800; color: #fff; font-size: 16px; }
.recap .row .v { font-weight: 700; color: #fff; }

/* ---------- Messagerie ---------- */
.msg-layout { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }
.conv-list { display: flex; flex-direction: column; gap: 8px; }
.conv-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 13px 15px; display: block; }
.conv-item.active, .conv-item:hover { border-color: var(--noir); }
.conv-item .who { font-weight: 700; color: var(--ink); font-size: 14.5px; }
.conv-item .what { font-size: 12.5px; color: var(--muted); }
.thread { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 460px; }
.thread-head { padding: 15px 20px; border-bottom: 1px solid var(--line); font-weight: 700; color: var(--ink); }
.thread-body { flex: 1; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: 480px; }
.bubble { max-width: 75%; padding: 10px 15px; border-radius: 16px; font-size: 14.5px; }
.bubble.me { align-self: flex-end; background: var(--noir); color: #fff; border-bottom-right-radius: 4px; }
.bubble.them { align-self: flex-start; background: var(--creme); color: var(--ink); border-bottom-left-radius: 4px; }
.bubble .when { display: block; font-size: 10.5px; opacity: .55; margin-top: 3px; }
.thread-form { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); }
.thread-form input { flex: 1; }

/* ---------- Hero (accueil app) ---------- */
.hero-app {
  background: var(--noir); color: #fff; border-radius: var(--radius); padding: 56px 46px;
  margin-bottom: 26px; position: relative; overflow: hidden;
}
.hero-app .eyebrow { color: var(--amber); }
.hero-app h1 { color: #fff; font-size: clamp(32px, 5vw, 52px); max-width: 700px; }
.hero-app p { color: rgba(255,255,255,.75); font-size: 17px; max-width: 620px; margin: 14px 0 26px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- WORKERS+ ---------- */
.wplus-card { border: 2px solid var(--amber); border-radius: var(--radius); padding: 26px; background: var(--noir); color: rgba(255,255,255,.85); }
.wplus-card h3 { color: var(--amber); font-size: 22px; }
.wplus-price { font-family: var(--font-head); font-size: 38px; font-weight: 800; color: #fff; }
.wplus-price small { font-size: 15px; color: rgba(255,255,255,.6); font-weight: 600; }
.wplus-card ul { list-style: none; margin: 14px 0; }
.wplus-card li { padding: 6px 0 6px 26px; position: relative; font-size: 14.5px; }
.wplus-card li::before { content: "✓"; position: absolute; left: 0; color: var(--amber); font-weight: 800; }

/* ---------- Étoiles ---------- */
.stars { color: var(--amber); font-size: 15px; letter-spacing: 2px; }

/* ---------- Progress (profil candidat) ---------- */
.progress { background: #e8e5dd; border-radius: 999px; height: 10px; overflow: hidden; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--amber), var(--orange)); border-radius: 999px; }

/* ---------- Footer ---------- */
.footer { background: var(--noir); color: rgba(255,255,255,.55); font-size: 13.5px; margin-top: auto; }
.footer-in { display: flex; justify-content: space-between; gap: 14px; padding: 22px; flex-wrap: wrap; }
.footer a { color: rgba(255,255,255,.75); }
.footer a:hover { color: var(--amber); }

/* ---------- Modal urgence ---------- */
dialog.modal {
  border: 0; border-radius: var(--radius); padding: 30px; max-width: 480px; width: 92%;
  box-shadow: var(--shadow); margin: auto;
}
dialog.modal::backdrop { background: rgba(22,23,27,.65); }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; justify-content: flex-end; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .msg-layout { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .burger { display: block; }
  .topnav {
    display: none; position: absolute; top: 66px; left: 0; right: 0;
    background: var(--noir); flex-direction: column; align-items: flex-start;
    padding: 18px 22px 24px; gap: 16px; box-shadow: 0 20px 30px rgba(0,0,0,.35);
  }
  .topnav.open { display: flex; }
  .hero-app { padding: 36px 26px; }
}
