/* Yannick Fit Coach — espace client et dashboard coach */
:root {
  --ink: #0b0b0c; --ink-2: #17171a; --ink-3: #26262b;
  --orange: #ff5a0a; --orange-deep: #c03c00; --orange-bg: #ffe8db;
  --bg: #f6f3ee; --paper: #fff; --line: #e4ded5; --soft: #ece8e1;
  --mute: #a8a29b; --mute-dark: #5e5852;
  --ok: #1f9d55; --ok-bg: #e6f6ec; --warn: #b45309; --warn-bg: #fdf1dc;
  --danger: #dc2626; --danger-bg: #fce4e4; --info: #2563eb; --info-bg: #e3ecfc;
  --display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, figure, fieldset { margin: 0; padding: 0; border: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.icon { flex: none; }
.muted { color: var(--mute-dark); }
.muted-light { color: var(--mute); font-size: 13px; }
.small { font-size: 13px; }
.accent { color: var(--orange); }
.text-warn { color: var(--warn); }
.display { font: italic 800 30px/1 var(--display); text-transform: uppercase; }
.display--xl { font-size: clamp(48px, 7vw, 96px); line-height: .92; }
.eyebrow { display: flex; align-items: center; gap: 12px; color: var(--orange); font: 600 16px/1.2 var(--display); letter-spacing: .17em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 40px; height: 3px; background: var(--orange); }
.link { display: inline-flex; align-items: center; gap: 6px; color: var(--orange-deep); font-weight: 600; font-size: 13px; }
.link:hover { text-decoration: underline; }

/* Mise en page utilitaire */
.stack { display: grid; gap: 16px; align-content: start; }
.stack--lg { gap: 28px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.row--between { justify-content: space-between; }
.grid { display: grid; gap: 16px; }
.cols { display: grid; gap: 20px; align-items: start; }
@media (min-width: 720px) { .grid--2 { grid-template-columns: 1fr 1fr; } .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .cols--main { grid-template-columns: minmax(0, 1fr) 400px; } .cols--side { grid-template-columns: 340px minmax(0, 1fr); } .cols--aside { grid-template-columns: minmax(0, 1fr) 360px; } }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 4px; border: 1px solid transparent; font-weight: 600; font-size: 14px; line-height: 1.2; white-space: nowrap; transition: filter .15s, background .15s; }
.btn:hover { filter: brightness(.94); }
.btn--primary { background: var(--orange); color: var(--ink); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { filter: none; background: var(--ink-3); }
.btn--ghost { background: var(--paper); border-color: var(--line); }
.btn--ghost-dark { border-color: rgba(255,255,255,.4); color: #fff; }
.btn--danger { background: var(--danger-bg); color: var(--danger); }
.btn--sm { padding: 7px 12px; font-size: 13px; }
.btn--lg { padding: 15px 22px; font: 700 18px/1 var(--display); letter-spacing: .05em; text-transform: uppercase; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Badges, avatars */
.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 100px; background: var(--soft); color: var(--mute-dark); font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge--ok { background: var(--ok-bg); color: var(--ok); }
.badge--warn { background: var(--warn-bg); color: var(--warn); }
.badge--danger { background: var(--danger-bg); color: var(--danger); }
.badge--info { background: var(--info-bg); color: var(--info); }
.badge--orange { background: var(--orange-bg); color: var(--orange-deep); }
.avatar { flex: none; display: grid; place-items: center; width: var(--s, 36px); height: var(--s, 36px); border-radius: 50%; background: var(--ink); color: #fff; font: 700 calc(var(--s, 36px) * .4)/1 var(--display); }

/* Formulaires */
.field { display: grid; gap: 6px; align-content: start; }
.field__label { font-size: 13px; font-weight: 600; }
.field__label em { color: var(--orange-deep); font-style: normal; }
.field__input, .select { width: 100%; min-height: 42px; padding: 9px 12px; background: var(--paper); border: 1px solid rgba(11,11,12,.2); border-radius: 4px; }
textarea.field__input { resize: vertical; line-height: 1.5; }
.field__input:focus, .select:focus, .composer textarea:focus { outline: 0; border-color: var(--orange); box-shadow: 0 0 0 2px var(--orange-bg); }
.field__input.is-invalid { border-color: var(--danger); }
.field__help { color: var(--mute-dark); font-size: 12px; }
.field__error { color: var(--danger); font-size: 12px; font-weight: 600; }
.select { width: auto; min-height: 34px; padding: 5px 10px; font-size: 13px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--mute-dark); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; padding: 9px 15px; border: 1px solid rgba(11,11,12,.2); border-radius: 100px; background: var(--paper); font-size: 14px; font-weight: 500; cursor: pointer; }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.chip input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }
.group { display: grid; gap: 16px; padding-top: 20px; border-top: 2px solid var(--ink); }
.group legend { float: left; width: 100%; margin-bottom: 4px; font: 700 22px/1.2 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.group legend b { color: var(--orange-deep); margin-right: 8px; }
.group legend + * { clear: both; }
.piege { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cf-turnstile { margin: 4px 0; }
.separator { display: flex; align-items: center; gap: 12px; color: var(--mute-dark); font-size: 12px; }
.separator::before, .separator::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; flex: none; }
.toggle input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.toggle span { position: absolute; inset: 0; border-radius: 100px; background: #cfc9c0; transition: background .2s; pointer-events: none; }
.toggle span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle input:checked + span { background: var(--ok); }
.toggle input:checked + span::after { transform: translateX(20px); }
.toggle input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }

/* Messages flash */
.flash { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 12px 16px; border-radius: 6px; font-weight: 600; font-size: 14px; }
.flash--ok { background: var(--ok-bg); color: var(--ok); }
.flash--warn { background: var(--warn-bg); color: var(--warn); }
.flash--danger { background: var(--danger-bg); color: var(--danger); }

/* Cartes */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.card--pad { padding: 20px; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.card__head h2, .h2 { font: 700 18px/1.2 var(--display); letter-spacing: .03em; text-transform: uppercase; }
.card__body { padding: 20px; }
.empty { padding: 20px; color: var(--mute-dark); font-size: 14px; }
.empty--lg { padding: 64px 24px; text-align: center; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { display: grid; gap: 8px; justify-items: start; padding: 20px; }
.kpi small, .label { color: var(--mute-dark); font: 700 12px/1.2 var(--display); letter-spacing: .15em; text-transform: uppercase; }
.kpi strong { font: italic 800 40px/1 var(--display); }
.line { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
a.line:hover { background: var(--bg); }
.line__date { flex: none; width: 104px; display: grid; }
.line__date span, .line__main span { color: var(--mute-dark); font-size: 12px; }
.line__main { flex: 1; min-width: 0; display: grid; }
.line__main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line__meta { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { padding: 10px 16px; background: var(--bg); color: var(--mute-dark); font: 700 11px/1.2 var(--display); letter-spacing: .13em; text-transform: uppercase; text-align: left; white-space: nowrap; }
.table td { padding: 11px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
.table tr:hover td { background: #fbfaf8; }
.table-wrap { overflow-x: auto; }
.cell-user { display: flex; align-items: center; gap: 10px; }
.cell-user span { display: block; color: var(--mute-dark); font-size: 12px; }
.pill { display: inline-flex; padding: 6px 11px; border-radius: 100px; background: var(--bg); color: var(--mute-dark); font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.is-active { background: var(--ink); color: #fff; }
.progress { height: 8px; border-radius: 100px; background: var(--soft); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 100px; background: var(--orange); }
.info { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 6px; background: var(--info-bg); font-size: 13px; }
.info .icon { color: var(--info); margin-top: 2px; }
.info--neutral { background: var(--bg); color: var(--mute-dark); }
.info--neutral .icon { color: var(--mute-dark); }
.info--warn { background: var(--warn-bg); }
.info--warn .icon { color: var(--warn); }

/* Structure application */
.app { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 8px; padding: 24px 16px; background: var(--ink); color: #fff; overflow-y: auto; }
.sidebar__logo { margin-bottom: 16px; }
.sidebar__logo img { width: 96px; height: auto; }
.sidebar__nav { display: grid; gap: 4px; flex: 1; align-content: start; }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 6px; color: rgba(255,255,255,.55); font-weight: 500; }
.nav-item span { flex: 1; }
.nav-item:hover { color: #fff; }
.nav-item.is-active { background: var(--ink-2); color: #fff; font-weight: 600; }
.nav-item.is-active .icon { color: var(--orange); }
.nav-item.is-active::before { content: ""; position: absolute; left: 0; top: 13px; bottom: 13px; width: 3px; border-radius: 2px; background: var(--orange); }
.nav-item__count { padding: 1px 7px; border-radius: 100px; background: var(--orange); color: var(--ink); font-size: 12px; }
.sidebar__credits { padding: 14px; border-radius: 6px; border-left: 3px solid var(--orange); background: var(--ink-2); }
.sidebar__credits small { color: var(--orange); font: 700 12px/1 var(--display); letter-spacing: .15em; text-transform: uppercase; }
.sidebar__credits p { color: var(--mute); font-size: 13px; }
.sidebar__credits strong { color: #fff; font: italic 800 34px/1 var(--display); margin-right: 4px; }
.sidebar__user { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 6px; background: var(--ink-2); }
.sidebar__user .avatar { background: var(--orange); color: var(--ink); }
.sidebar__user div { flex: 1; min-width: 0; display: grid; }
.sidebar__user strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__user span { color: var(--mute); font-size: 12px; }
.sidebar__user button { color: rgba(255,255,255,.55); padding: 6px; }
.sidebar__user button:hover { color: #fff; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 18px 32px; background: var(--paper); border-bottom: 1px solid var(--line); }
.topbar__title { flex: 1; min-width: 0; }
.topbar h1 { font: italic 800 30px/1 var(--display); text-transform: uppercase; }
.topbar p { margin-top: 3px; color: var(--mute-dark); font-size: 13px; }
.topbar__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.topbar__burger, .nav-backdrop { display: none; }
.content { flex: 1; padding: 28px; }
@media (max-width: 899px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 40; left: 0; top: 0; width: 260px; transform: translateX(-100%); transition: transform .25s; }
  .nav-toggle:checked ~ .sidebar { transform: none; }
  .nav-toggle:checked ~ .nav-backdrop { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(11,11,12,.5); }
  .topbar { padding: 14px 16px; flex-wrap: wrap; }
  .topbar__burger { display: grid; place-items: center; width: 40px; height: 40px; cursor: pointer; }
  .topbar h1 { font-size: 24px; }
  .content { padding: 16px; }
}

/* Demandes : vue scindée */
.split { display: grid; gap: 20px; }
.split__list, .split__detail { display: flex; flex-direction: column; }
.search { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--mute-dark); }
.search input { flex: 1; border: 0; outline: 0; background: none; font-size: 14px; min-width: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.split__items { overflow-y: auto; }
.request { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; }
.request > div { flex: 1; min-width: 0; }
.request:hover { background: var(--bg); }
.request.is-selected { background: var(--orange-bg); border-left-color: var(--orange); }
.request.is-unread strong::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-radius: 50%; background: var(--orange); }
.request__top { display: flex; justify-content: space-between; gap: 8px; }
.request__top time, .request__meta { color: var(--mute-dark); font-size: 12px; }
.request__meta b { color: var(--orange-deep); }
.thread__head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 16px 24px; border-bottom: 1px solid var(--line); }
.thread__id { flex: 1; min-width: 200px; }
.thread__id p { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.thread__id strong { font: 700 22px/1.1 var(--display); }
.thread__id > span { color: var(--mute-dark); font-size: 13px; }
.thread__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fiche { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 20px; padding: 14px 24px; border-bottom: 1px solid var(--line); background: var(--surface, #fff); }
.fiche dt { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mute-dark); margin-bottom: 2px; }
.fiche dd { font-size: 14px; color: var(--ink); }
.fiche dd a { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.fiche dd a:hover { text-decoration-color: var(--orange); }
.thread__messages { flex: 1; display: grid; gap: 14px; align-content: start; padding: 24px; background: var(--bg); overflow-y: auto; min-height: 240px; }
.bubble { display: grid; gap: 8px; max-width: 600px; padding: 14px 18px; border-radius: 8px; background: var(--paper); border: 1px solid var(--line); justify-self: start; width: 100%; }
.bubble header { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.bubble time { color: var(--mute-dark); }
.bubble p { white-space: pre-line; line-height: 1.5; }
.bubble--out, .bubble--coach { justify-self: end; background: var(--ink); border-color: var(--ink); color: #fff; }
.bubble--out header strong, .bubble--coach header strong { color: var(--orange); }
.bubble--out time, .bubble--coach time { color: var(--mute); }
.bubble--coach { justify-self: start; }
.bubble--moi { justify-self: end; }
.bubble--note { background: var(--warn-bg); border-color: #f0d9a8; }
.bubble--note header strong { color: var(--warn); }
.composer { display: grid; gap: 10px; padding: 14px 24px 16px; border-top: 1px solid var(--line); }
.composer textarea { width: 100%; padding: 10px 14px; border: 1.5px solid rgba(11,11,12,.2); border-radius: 6px; resize: vertical; }
@media (min-width: 1100px) {
  .split { grid-template-columns: 380px minmax(0, 1fr); height: calc(100vh - 150px); min-height: 520px; }
  .split__list, .split__detail { min-height: 0; }
}

/* Modales */
.modal { width: min(680px, calc(100vw - 32px)); padding: 24px; border: 0; border-radius: 10px; }
.modal::backdrop { background: rgba(11,11,12,.55); }
.modal__head { display: flex; justify-content: space-between; align-items: center; }
.modal__foot { display: flex; justify-content: flex-end; gap: 10px; padding-top: 8px; }

/* Pages publiques */
.public { background: var(--bg); }
.public-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px clamp(16px, 4.4vw, 64px); background: var(--ink); color: #fff; }
.public-header img { width: 96px; height: auto; }
.public-main { padding: clamp(24px, 4vw, 48px) clamp(16px, 4.4vw, 64px); }
.center-card { display: grid; gap: 16px; justify-items: center; max-width: 560px; margin: 8vh auto; padding: 40px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; text-align: center; }
.big-check { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); }
.conversation { display: grid; gap: 16px; max-width: 760px; margin: 0 auto; }
.rdv { display: grid; gap: 0; max-width: 1312px; margin: 0 auto; border-radius: 8px; overflow: hidden; }
.rdv__intro { display: grid; gap: 24px; align-content: start; padding: clamp(24px, 4vw, 56px); background: var(--ink); color: #fff; }
.rdv__intro .lede { color: rgba(255,255,255,.75); font-size: 18px; }
.rdv__steps li { display: flex; gap: 18px; padding: 16px 0; border-top: 1px solid rgba(255,255,255,.14); }
.rdv__steps b { color: var(--orange); font: italic 800 36px/1 var(--display); }
.rdv__steps strong { display: block; font: 700 22px/1.2 var(--display); text-transform: uppercase; }
.rdv__steps span { color: var(--mute); font-size: 14px; }
.callout { display: grid; gap: 6px; padding: 20px 24px; border-left: 4px solid var(--orange); background: var(--ink-2); }
.callout small { color: var(--orange); font: 700 14px/1 var(--display); letter-spacing: .15em; text-transform: uppercase; }
.callout a { font: italic 800 42px/1 var(--display); }
.rdv__form { display: grid; gap: 24px; align-content: start; padding: clamp(24px, 4vw, 56px); background: var(--paper); }
.rdv__form .display { font-size: 44px; }
@media (min-width: 1000px) { .rdv { grid-template-columns: 5fr 7fr; } }

/* Authentification */
.auth { display: grid; min-height: 100vh; background: var(--bg); }
.auth__brand { display: none; }
.auth__panel { display: grid; place-items: center; padding: 32px 20px; }
.auth__form { display: grid; gap: 18px; width: min(440px, 100%); }
.auth__form .display { font-size: 40px; }
@media (min-width: 960px) {
  .auth { grid-template-columns: 5fr 6fr; }
  .auth__brand { display: flex; flex-direction: column; justify-content: space-between; padding: 48px 56px; color: #fff; background: linear-gradient(rgba(11,11,12,.45), rgba(11,11,12,.95)), url("../assets/img/citation.png") center / cover var(--ink); }
  .auth__brand img { width: 150px; height: auto; }
  .auth__brand p:last-child { margin-top: 14px; color: rgba(255,255,255,.75); max-width: 420px; }
  .auth__brand .display--xl { font-size: 60px; }
}
