/* OfficineRecrute — feuille de style commune (reprise du design de la maquette) */
@import url("fonts.css");

:root {
  --bg: #FFF8EC;
  --surface: #FFFFFF;
  --ink: #10241C;
  --ink-2: #3A3631;
  --text-2: #57524A;
  --muted: #6B655C;
  --faint: #9A917F;
  --green: #0E3B2E;
  --green-dark: #0A2C22;
  --lime: #C6F36B;
  --lime-soft: #E4F7B8;
  --lime-ink: #2F5B12;
  --lime-ring: #DDF3A8;
  --border: #EADFC9;
  --border-strong: #DCCFB4;
  --divider: #F2E8D5;
  --cream: #F7EEDD;
  --cream-2: #F1E6D0;
  --amber-bg: #FDF1DC;
  --amber: #8A5300;
  --ok-bg: #E3F3E8;
  --ok: #1E6B3A;
  --err-bg: #FBE5E3;
  --err: #A3271D;
  --urgent: #C73A1A;
  --shadow-sm: 0 2px 8px rgba(16, 36, 28, .12);
  --shadow: 0 8px 24px rgba(16, 36, 28, .08);
  --shadow-lg: 0 18px 40px rgba(16, 36, 28, .18);
  --font: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  --display: 'Bricolage Grotesque', 'Instrument Sans', sans-serif;
  --side-w: 252px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--green); }
a:hover { color: var(--green-dark); }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.02em; }
h1 { font-size: clamp(24px, 3vw, 32px); line-height: 1.2; font-weight: 800; }
h2 { font-size: 20px; font-weight: 800; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
[x-cloak] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Mise en page ---------- */
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 24px 16px 110px; display: flex; flex-direction: column; gap: 16px; }
.wrap-md { max-width: 1120px; }
.wrap-sm { max-width: 960px; }
.wrap-xs { max-width: 640px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-head .sub { font-size: 15px; color: var(--text-2); margin-top: 4px; }
.row { display: flex; gap: 12px; align-items: center; }
.row-wrap { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-sm { display: flex; flex-direction: column; gap: 6px; }
.spacer { flex: 1; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.bold { font-weight: 700; }
.center { text-align: center; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }

/* Logo */
.logo { border: none; background: none; padding: 0; font-family: var(--display); font-size: 23px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; cursor: pointer; white-space: nowrap; }
.logo span { color: var(--green); background: var(--lime); padding: 0 4px; border-radius: 6px; }
.logo:hover { color: var(--ink); }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s; }
.btn:hover { background: var(--cream); color: var(--ink); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--green); border-color: var(--green); color: #fff; font-weight: 700; }
.btn-primary:hover { background: var(--green-dark); color: #fff; }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 700; }
.btn-dark:hover { background: #000; color: #fff; }
.btn-lime { background: var(--lime); border-color: var(--lime); color: var(--green); font-weight: 700; }
.btn-lime:hover { background: #b8e85c; color: var(--green); }
.btn-outline { border-color: var(--ink); font-weight: 700; }
.btn-danger { color: var(--err); border-color: #F1C9C4; }
.btn-danger:hover { background: var(--err-bg); color: var(--err); }
.btn-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: none; background: none; padding: 0 4px; min-height: 36px; color: var(--green); font-weight: 700; cursor: pointer; text-decoration: none; }
.btn-link:hover { text-decoration: underline; background: none; }
.btn-lg { min-height: 54px; padding: 0 24px; font-size: 16px; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-pill { border-radius: 999px; }
.btn-soon { background: #ECE7DD; color: #8F887B; border: 1px dashed #C9C0AE; cursor: not-allowed; font-weight: 700; flex-wrap: wrap; }
.btn-soon:hover { background: #ECE7DD; color: #8F887B; }
.soon { font-size: 11px; font-weight: 800; padding: 3px 7px; border-radius: 6px; background: #fff; color: #8F887B; letter-spacing: .04em; margin-left: 4px; }
.back { align-self: flex-start; border: none; background: none; padding: 0; min-height: 36px; color: var(--ink); font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.back:hover { color: var(--green); }

/* ---------- Pastilles / badges ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 19px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: var(--ink); }
.chip.on, .chip[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border-strong); color: var(--ink); white-space: nowrap; }
.tag-soft { background: var(--cream); border-color: transparent; color: var(--ink-2); }
.tag-lime { background: var(--lime-soft); border-color: transparent; color: var(--lime-ink); font-weight: 700; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.b-grey { background: var(--cream-2); color: var(--text-2); }
.b-amber { background: var(--amber-bg); color: var(--amber); }
.b-ok { background: var(--ok-bg); color: var(--ok); }
.b-err { background: var(--err-bg); color: var(--err); }
.b-lime { background: var(--lime-soft); color: var(--lime-ink); }
.b-dark { background: var(--ink); color: #fff; }
.b-urgent { background: var(--urgent); color: #fff; font-weight: 800; border-radius: 8px; }
.b-urgent::before { content: ""; width: 6px; height: 6px; border-radius: 3px; background: #fff; }
.ct-pill { align-self: flex-start; font-size: 12px; font-weight: 800; letter-spacing: .02em; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--green); color: var(--green); white-space: nowrap; }
.verified { display: inline-flex; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--lime-soft); color: var(--lime-ink); white-space: nowrap; }

/* ---------- Cartes ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.card-lg { border-radius: 22px; padding: 22px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card.clickable { cursor: pointer; text-align: left; transition: box-shadow .15s; color: inherit; text-decoration: none; }
.card.clickable:hover { box-shadow: 0 14px 32px rgba(16, 36, 28, .12); }
.notice { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; padding: 14px 16px; border-radius: 14px; font-size: 14px; line-height: 1.45; }
.notice-amber { background: var(--amber-bg); color: var(--amber); }
.notice-lime { background: var(--lime-soft); color: var(--lime-ink); }
.notice-err { background: var(--err-bg); color: var(--err); }
.notice-dark { background: var(--green); color: var(--bg); }
.notice-dark strong { color: var(--lime); }
.notice > span { flex: 1 1 260px; }
.empty { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 32px 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: var(--text-2); font-size: 15px; }
.empty .ic { font-size: 34px; color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.fact { background: var(--cream); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.fact .k { font-size: 12px; color: var(--muted); }
.fact .v { font-size: 15px; font-weight: 700; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface); }
.kv > div { padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; border-bottom: 1px solid var(--divider); }
.kv .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.kv .v { font-size: 15px; font-weight: 600; word-break: break-word; }
.divider { height: 1px; background: var(--divider); border: none; margin: 4px 0; }

/* ---------- Formulaires ---------- */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 13px; font-weight: 400; color: var(--muted); line-height: 1.4; }
.req { color: var(--urgent); }
/* indicateurs dans un libellé .field : restent sur la ligne du texte */
.field > .req, .field > .opt { display: contents; }
.opt { font-weight: 400; color: var(--muted); }
.input, .select, .textarea { width: 100%; min-width: 0; height: 48px; border: 1px solid var(--border-strong); border-radius: 12px; padding: 0 12px; font-size: 16px; background: var(--surface); color: var(--ink); outline: none; }
.textarea { height: auto; padding: 10px 12px; line-height: 1.45; resize: vertical; }
.input[readonly] { background: var(--cream); color: var(--text-2); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--lime-ring); }
.input.invalid, .select.invalid { border-color: var(--urgent); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.form-row > * { min-width: 0; }
/* Champs date/heure sur iPhone (Safari) : largeur intrinsèque imposée, hauteur variable et texte centré par défaut */
input.input[type="date"], input.input[type="time"], input.input[type="datetime-local"], input.input[type="month"] {
  -webkit-appearance: none; appearance: none; display: block; max-width: 100%; line-height: 46px; text-align: left;
}
.input::-webkit-date-and-time-value { text-align: left; margin: 0; min-height: 1.2em; }
.input::-webkit-datetime-edit { padding: 0; }
.alert { padding: 12px 14px; border-radius: 12px; background: var(--err-bg); color: var(--err); font-size: 14px; font-weight: 600; }
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; background: var(--cream-2); border-radius: 12px; }
.seg button { height: 38px; padding: 0 16px; border: none; border-radius: 9px; font-weight: 600; font-size: 14px; cursor: pointer; background: transparent; color: var(--text-2); white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(16, 36, 28, .15); }
.switch { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); cursor: pointer; text-align: left; }
.switch .t { font-weight: 700; font-size: 15px; display: block; }
.switch .s { font-size: 13px; color: var(--muted); display: block; }
.switch .track { margin-left: auto; flex: 0 0 46px; width: 46px; height: 28px; border-radius: 14px; background: var(--border-strong); position: relative; transition: background .15s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 11px; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch.on .track { background: var(--green); }
.switch.on .track::after { transform: translateX(18px); }
.switch.urgent.on { border-color: var(--urgent); background: #FCE9E4; }
.switch.urgent.on .track { background: var(--urgent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--green); margin: 0; flex: 0 0 20px; }
.progress { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--green); border-radius: 3px; transition: width .3s; }

/* ---------- En-tête public ---------- */
.pub-header { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--border); }
.pub-header .in { max-width: 1180px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 16px; }
.pub-nav { display: flex; gap: 2px; }
.pub-nav a { height: 40px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 10px; font-size: 15px; color: var(--ink); text-decoration: none; }
.pub-nav a:hover { background: var(--cream); }
.pub-nav a.on { background: var(--lime-soft); font-weight: 700; color: var(--green); }
.pub-nav-m { display: none; gap: 2px; overflow-x: auto; padding: 0 12px 8px; }
/* même style que le menu principal sur ordinateur */
.pub-nav-m a { flex: 0 0 auto; height: 40px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 10px; font-size: 15px; color: var(--ink); text-decoration: none; }
@media (hover: hover) { .pub-nav-m a:hover { background: var(--cream); } }
.pub-nav-m a.on { background: var(--lime-soft); color: var(--green); font-weight: 700; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px 0 4px; border: 1px solid var(--border); border-radius: 22px; background: var(--surface); font-weight: 700; font-size: 15px; color: var(--ink); text-decoration: none; }
.user-chip:hover { color: var(--ink); background: var(--cream); }
.avatar { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%; object-fit: cover; background: var(--cream-2); color: var(--green); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; overflow: hidden; }
.avatar-lg { width: 96px; height: 96px; font-size: 30px; }
/* Photo de profil modifiable : l'avatar est cliquable (pastille appareil photo) et un bouton est posé juste dessous */
.avatar-edit { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.avatar-pick { position: relative; display: block; cursor: pointer; border-radius: 50%; }
.avatar-pick .cam { position: absolute; right: -2px; bottom: -2px; width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: #fff; border: 3px solid var(--bg, #FFF8EC); display: flex; align-items: center; justify-content: center; }
.avatar-pick .cam svg { width: 16px; height: 16px; }
.avatar-pick:hover .avatar { filter: brightness(.92); }
.avatar-edit .btn { cursor: pointer; white-space: nowrap; }
.avatar-md { width: 52px; height: 52px; font-size: 17px; }
.off-ini { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.pub-footer { border-top: 1px solid var(--border); background: var(--bg); }
.pub-footer .in { max-width: 1180px; margin: 0 auto; padding: 28px 20px; display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; font-size: 14px; }
.pub-footer nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.pub-footer a { color: var(--text-2); text-decoration: none; }
.pub-footer a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Espaces connectés (barre latérale) ---------- */
.app-shell { min-height: 100vh; display: flex; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.view { flex: 1; display: flex; flex-direction: column; }
.view > * { width: 100%; }
.view > .wrap { margin-left: auto; margin-right: auto; }
.side { width: var(--side-w); flex: 0 0 var(--side-w); position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; gap: 4px; padding: 20px 14px; overflow-y: auto; }
.side .logo { padding: 4px 10px 16px; text-align: left; }
.side-link { display: flex; align-items: center; justify-content: space-between; height: 42px; border-radius: 10px; padding: 0 12px; font-size: 15px; color: var(--ink); text-decoration: none; }
.side-link:hover { background: var(--cream); color: var(--ink); }
.side-link.on { background: var(--lime-soft); color: var(--green); font-weight: 700; }
.side-link .count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--green); color: #fff; font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 12px 4px 0; margin-top: 8px; border-top: 1px solid var(--divider); }
.side-user .n { font-weight: 700; font-size: 14px; display: block; }
.side-user .r { font-size: 12px; color: var(--muted); display: block; }
.off-switch { position: relative; margin-bottom: 10px; }
.off-switch > button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; text-align: left; }
.off-switch .n { font-weight: 700; font-size: 14px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.off-switch .v { font-size: 12px; color: var(--muted); display: block; }
.menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 41; width: 300px; max-width: calc(100vw - 24px); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.menu .t { padding: 8px 10px 6px; font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.menu button, .menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; min-height: 48px; border: none; border-radius: 10px; background: transparent; cursor: pointer; text-align: left; color: var(--ink); text-decoration: none; font-size: 14px; }
.menu button:hover, .menu a:hover { background: var(--cream); }
.menu .on { background: var(--lime-soft); }
/* Dans la barre latérale (overflow auto, donc rognée) : le menu des officines prend la largeur de la barre, les noms longs passent à la ligne */
.side .off-switch .menu { width: 100%; right: 0; }
.menu button > span:last-child { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.m-top { display: none; position: sticky; top: 0; z-index: 15; background: var(--bg); padding: 12px 16px; align-items: center; gap: 10px; border-bottom: 1px solid var(--border); }
.tabbar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px; font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none; }
.tabbar a .ic { display: flex; align-items: center; justify-content: center; width: 52px; height: 30px; border-radius: 15px; transition: background .15s; }
.tabbar a.on { color: var(--green); font-weight: 800; }
.tabbar a.on .ic { background: var(--lime-soft); }

/* ---------- Recherche (barre type « pilule ») ---------- */
.searchbar { width: 100%; max-width: 940px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: stretch; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--shadow); padding: 6px; position: relative; z-index: 26; }
.sb-text { flex: 1.4 1 200px; display: flex; flex-direction: column; justify-content: center; padding: 8px 18px; border-radius: 999px; min-width: 0; cursor: text; }
.sb-text:hover { background: var(--cream); }
.sb-text span, .sb-seg .t { font-size: 12px; font-weight: 700; color: var(--ink); }
.sb-text input { border: none; outline: none; background: transparent; font-size: 15px; padding: 2px 0; min-width: 0; width: 100%; }
.sb-cell { position: relative; flex: 1 1 150px; display: flex; min-width: 0; }
.sb-cell::before { content: ""; width: 1px; background: var(--border); margin: 12px 0; }
.sb-seg { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; text-align: left; padding: 8px 18px; border: none; border-radius: 999px; cursor: pointer; min-width: 0; background: transparent; }
.sb-seg:hover, .sb-seg.open { background: var(--cream); }
.sb-seg .v { font-size: 15px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sb-seg .v.act { color: var(--ink); }
.sb-go { flex: 0 0 auto; align-self: center; height: 48px; padding: 0 22px; margin: 0 2px 0 6px; border: none; border-radius: 999px; background: var(--green); color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; }
.sb-go:hover { background: var(--green-dark); }
.pop { position: absolute; top: calc(100% + 10px); left: 0; z-index: 30; width: max-content; min-width: 260px; max-width: min(420px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.pop .t { font-size: 14px; font-weight: 700; }
.pop .hint { font-size: 13px; color: var(--text-2); line-height: 1.4; max-width: 380px; }
.pop-veil { position: fixed; inset: 0; z-index: 25; }
.filters-row { width: 100%; max-width: 940px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.filters-row .rel { position: relative; }
.fchip { height: 40px; padding: 0 16px; border-radius: 20px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; }
.fchip.act { background: var(--green); border-color: var(--green); color: #fff; }
.sort { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text-2); margin-left: 4px; }
.sort select { height: 40px; border: 1px solid var(--border); border-radius: 20px; padding: 0 12px; font-size: 14px; background: var(--surface); }
.m-search { display: none; flex-direction: column; gap: 10px; }
.m-search .bar { display: flex; gap: 8px; align-items: center; }
.m-search label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 29px; box-shadow: 0 4px 16px rgba(16,36,28,.10); }
.m-search input { border: none; outline: none; background: transparent; font-size: 15px; font-weight: 700; padding: 0; width: 100%; min-width: 0; }
.m-search .sum { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.m-search .fbtn { position: relative; width: 58px; height: 58px; flex: 0 0 58px; border-radius: 29px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(16,36,28,.10); }
.m-search .fbtn .n { position: absolute; top: 4px; right: 4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--green); color: #fff; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.m-search .quick { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }

/* ---------- Cartes d'annonce ---------- */
.jcard { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; overflow: hidden; transition: box-shadow .15s; }
.jcard:hover { box-shadow: 0 14px 32px rgba(16, 36, 28, .12); }
.jcard > a { display: flex; flex-direction: column; color: inherit; text-decoration: none; flex: 1; }
.jcard .cover { position: relative; height: 112px; width: 100%; background-size: cover; background-position: center; }
.jcard .flags { position: absolute; top: 12px; left: 14px; right: 60px; display: flex; gap: 6px; flex-wrap: wrap; }
.flag { font-size: 12px; font-weight: 800; padding: 5px 9px; border-radius: 8px; background: #fff; color: var(--ink); }
.flag-lime { background: var(--lime); color: var(--green); }
.flag-red { color: var(--err); font-weight: 700; }
.jcard .body { padding: 14px 16px 2px; display: flex; flex-direction: column; gap: 4px; }
.jcard .title { font-size: 17px; font-weight: 700; line-height: 1.3; }
.jcard .where { font-size: 14px; color: var(--text-2); }
.jcard .when { padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.jcard .when b { font-size: 15px; }
.jcard .when span { font-size: 13px; color: var(--muted); }
.jcard .tags { padding: 0 16px 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.jcard .foot { padding: 10px 16px; border-top: 1px solid var(--divider); font-size: 12px; color: var(--muted); }
.heart { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 20px; border: none; background: #fff; font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink); box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: center; }
.heart.on { color: var(--urgent); }
.load-more { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 0 8px; }
.load-more .bar { width: 220px; height: 4px; border-radius: 2px; background: var(--border); overflow: hidden; }
.load-more .bar span { display: block; height: 100%; background: var(--green); }

/* Carte d'annonce côté officine */
.tjcard { display: flex; flex-direction: column; gap: 6px; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; color: inherit; text-decoration: none; }
.tjcard:hover { box-shadow: 0 10px 24px rgba(16,36,28,.10); color: inherit; }
.tjcard .h { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.tjcard .h b { font-size: 16px; line-height: 1.3; }
.tjcard .l { font-size: 13px; color: var(--text-2); }
.tjcard .f { display: flex; align-items: center; gap: 8px; padding-top: 8px; margin-top: 4px; border-top: 1px solid var(--divider); font-weight: 700; font-size: 14px; }

/* ---------- Détail d'annonce ---------- */
.job-hero { position: relative; height: clamp(180px, 28vw, 300px); border-radius: 22px; background-size: cover; background-position: center; overflow: hidden; }
.job-hero .flags { position: absolute; top: 14px; left: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.mosaic { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px; height: clamp(220px, 30vw, 340px); }
.mosaic > div { border-radius: 18px; background-size: cover; background-position: center; }
.mosaic > div:first-child { grid-row: 1 / 3; }
.job-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 56px; align-items: start; }
.job-side { position: sticky; top: 84px; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.job-side .coef { font-family: var(--display); font-size: 26px; font-weight: 800; line-height: 1.15; letter-spacing: -0.01em; }
.boxes { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border-strong); border-radius: 12px; overflow: hidden; }
.boxes > div { padding: 8px 10px; }
.boxes > div + div { border-left: 1px solid var(--border-strong); }
.boxes .k { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.boxes .v { font-size: 14px; }
.tri { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; }
.tri > div { padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.tri > div + div { border-left: 1px solid var(--border); }
.tri .k { font-size: 13px; color: var(--muted); }
.tri .v { font-size: 20px; font-weight: 800; font-family: var(--display); }
.tri .s { font-size: 13px; color: var(--text-2); }
.week-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--divider); flex-wrap: wrap; }
.week-row .d { width: 110px; flex: 0 0 110px; font-weight: 700; font-size: 14px; }
.week-row .d.off { color: var(--faint); font-weight: 600; }
.slot { font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 8px; background: var(--lime-soft); color: var(--lime-ink); }
.slot.night { background: var(--ink); color: #fff; }
.tbd { font-size: 12px; font-weight: 700; color: var(--amber); background: var(--amber-bg); padding: 4px 8px; border-radius: 8px; }
.m-apply { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--surface); border-top: 1px solid var(--border); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); align-items: center; gap: 12px; }
.vit-crew { display: flex; }
.vit-crew img { width: 40px; height: 40px; border-radius: 20px; border: 2px solid #fff; object-fit: cover; margin-left: -10px; }
.vit-crew img:first-child { margin-left: 0; }

/* ---------- Étapes de suivi ---------- */
.steps { display: flex; align-items: flex-start; }
.steps .st { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; min-width: 0; }
.steps .st .line { position: absolute; top: 13px; left: 50%; width: 100%; height: 2px; background: var(--border); }
.steps .st.done .line { background: var(--green); }
.steps .st .n { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 14px; border: 2px solid var(--border-strong); background: #fff; color: var(--muted); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
.steps .st.reached .n { background: var(--green); border-color: var(--green); color: #fff; }
.steps .st .l { font-size: 11px; font-weight: 600; color: var(--muted); text-align: center; }
.steps .st.cur .l { color: var(--ink); font-weight: 800; }

/* ---------- Modales et feuilles ---------- */
.modal-veil { position: fixed; inset: 0; z-index: 60; background: rgba(16, 36, 28, .45); display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal { width: 560px; max-width: 100%; max-height: calc(100vh - 48px); overflow-y: auto; background: var(--bg); border-radius: 24px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1; }
.modal-body { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.x { margin-left: auto; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 20px; border: none; background: var(--cream-2); font-size: 20px; cursor: pointer; }

/* ---------- Toast et feedback ---------- */
.toast { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); z-index: 90; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); max-width: calc(100vw - 32px); }
.toast.err { background: var(--err); }
.fb-btn { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 16px 0 6px; border: none; border-radius: 23px; background: var(--ink); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; box-shadow: var(--shadow-lg); }
.fb-btn.fb-dock { display: none; }
.fb-btn .b { background: var(--lime); color: var(--green); font-size: 11px; font-weight: 800; padding: 8px 9px; border-radius: 17px; }
.fb-panel { position: fixed; right: 24px; bottom: 24px; z-index: 61; width: 420px; max-width: calc(100vw - 24px); background: var(--surface); border-radius: 22px; box-shadow: var(--shadow-lg); padding: 18px; display: flex; flex-direction: column; gap: 12px; }

/* ---------- Tableaux (admin) ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--divider); vertical-align: top; }
.tbl tr:last-child td { border-bottom: none; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.photo-item, .photo-add { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--cream); }
.photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-loading { display: flex; align-items: center; justify-content: center; }
.photo-first { position: absolute; top: 6px; left: 6px; font-size: 10px; padding: 2px 7px; }
.photo-actions { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; padding: 4px; background: linear-gradient(transparent, rgba(16,36,28,.55)); }
.photo-actions button { width: 28px; height: 28px; border-radius: 14px; border: none; background: rgba(255,255,255,.92); color: var(--ink); font-weight: 800; cursor: pointer; }
.photo-actions button:disabled { opacity: .35; cursor: default; }
.photo-add { border: 2px dashed var(--border-strong); background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; color: var(--green); }
.photo-add:hover { border-color: var(--green); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, calc(50% - 6px)), 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.kpi .v { font-family: var(--display); font-size: 30px; font-weight: 800; }
.kpi .l { font-size: 13px; font-weight: 600; color: var(--text-2); }
.kpi .s { font-size: 12px; color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 180px; padding-top: 10px; }
.bars > div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars .b { width: 100%; max-width: 36px; background: var(--green); border-radius: 6px 6px 0 0; min-height: 2px; }
.bars .l { font-size: 11px; color: var(--muted); }
.admin-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.admin-side { background: var(--ink); color: #B9B2A6; padding: 20px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.admin-side button, .admin-side a { white-space: nowrap; flex-shrink: 0; text-align: left; height: 40px; border: none; border-radius: 10px; padding: 0 12px; background: transparent; color: #B9B2A6; font-size: 14px; cursor: pointer; text-decoration: none; display: flex; align-items: center; }
.admin-side .on { background: #3A3631; color: #fff; }

/* ---------- Pages marketing ---------- */
.hero { max-width: 1160px; margin: 0 auto; padding: 48px 20px 24px; width: 100%; display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.hero h1 { color: var(--green); font-size: clamp(34px, 5vw, 64px); line-height: 1.08; letter-spacing: -0.03em; text-wrap: balance; }
.hero p.lead { font-size: 18px; line-height: 1.55; color: var(--text-2); max-width: 580px; }
.section { max-width: 1160px; margin: 0 auto; padding: 40px 20px; width: 100%; display: flex; flex-direction: column; gap: 22px; }
.section h2 { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.12; letter-spacing: -0.02em; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step .n { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 17px; background: var(--lime); color: var(--green); font-weight: 800; display: flex; align-items: center; justify-content: center; }
.step .t { font-weight: 700; font-size: 16px; }
.step .s { font-size: 14px; color: var(--text-2); line-height: 1.5; }
.ticks { display: flex; flex-direction: column; gap: 10px; }
.ticks > div { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.ticks .ok { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 11px; background: var(--lime-soft); color: var(--lime-ink); font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item button { width: 100%; display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; border: none; background: none; text-align: left; font-size: 17px; font-weight: 700; cursor: pointer; }
.faq-item .a { padding: 0 0 18px; color: var(--text-2); line-height: 1.6; max-width: 820px; }
.price-card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.price-card.feat { border: 2px solid var(--green); }
.price-card .p { font-family: var(--display); font-size: 40px; font-weight: 800; letter-spacing: -0.02em; }
.price-card .p span { font-size: 15px; font-family: var(--font); font-weight: 600; color: var(--muted); }
.mock { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-lg); padding: 18px; width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 14px; }

/* ---------- Auth ---------- */
.auth { max-width: 460px; margin: 0 auto; padding: 24px 16px 80px; display: flex; flex-direction: column; gap: 16px; }
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-pick button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--border); background: var(--surface); cursor: pointer; text-align: left; }
.role-pick button.on { border-color: var(--green); background: var(--lime-soft); }
.role-pick b { font-size: 15px; }
.role-pick span { font-size: 12px; color: var(--muted); }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------- Spinner ---------- */
.loading { display: flex; justify-content: center; padding: 48px 0; }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--green); animation: os-spin .8s linear infinite; }
@keyframes os-spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--cream) 25%, var(--divider) 50%, var(--cream) 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 22px; height: 320px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- Responsive ---------- */
@media (max-width: 959px) {
  .side { display: none; }
  .m-top { display: flex; }
  .tabbar { display: flex; }
  .app-main .wrap { padding-bottom: 120px; }
  .job-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .job-side.hide-m { display: none; }
  .m-apply { display: flex; }
  .mosaic { display: none; }
  .fb-btn { bottom: calc(84px + env(safe-area-inset-bottom)); right: 12px; }
  body:has(.has-mapply) .fb-float { bottom: calc(92px + env(safe-area-inset-bottom)); }
  /* Espaces officine / candidat : le bouton est accroché à la barre d'onglets (toujours affichée), au-dessus d'elle */
  .tabbar .fb-btn.fb-dock { display: flex; position: absolute; bottom: calc(100% + 12px); right: 12px; }
  body:has(.tabbar) .fb-float { display: none !important; }
  .toast { bottom: 96px; }
  .admin-shell { grid-template-columns: minmax(0, 1fr); }
  .admin-side { position: static; height: auto; flex-direction: row; overflow-x: auto; }
}
@media (max-width: 767px) {
  .pub-nav, .hide-s { display: none !important; }
  .pub-nav-m { display: flex; }
  .searchbar, .filters-row.desk { display: none; }
  .m-search { display: flex; }
  .tri { grid-template-columns: 1fr; }
  .tri > div + div { border-left: none; border-top: 1px solid var(--border); }
  .modal-veil { align-items: flex-end; padding: 0; }
  .modal { width: 100%; border-radius: 24px 24px 0 0; max-height: 92vh; }
  .week-row .d { width: 80px; flex-basis: 80px; }
  .wrap { padding-top: 16px; }
}
@media (min-width: 768px) { .only-s { display: none !important; } }
