/* Mes Chantiers — design mobile-first, style application iPhone. */

/* ---------- Thème ---------- */
:root {
  --bg: #f2f2f7;
  --bg-elev: #ffffff;
  --bg-inset: #ffffff;
  --text: #1c1c1e;
  --text-2: #8a8a8e;
  --sep: rgba(60, 60, 67, 0.14);
  --sep-strong: rgba(60, 60, 67, 0.29);
  --blue: #007aff;
  --blue-press: #0062cc;
  --blue-soft: rgba(0, 122, 255, 0.12);
  --green: #2aa952;
  --green-bright: #34c759;
  --green-soft: rgba(52, 199, 89, 0.14);
  --red: #ff3b30;
  --red-soft: rgba(255, 59, 48, 0.12);
  --yellow: #ffcc00;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --radius: 16px;
  --radius-lg: 22px;
  --radius-sm: 11px;
  --tap: 44px;
  --sat: env(safe-area-inset-top);
  --sab: env(safe-area-inset-bottom);
  --tabbar-h: 58px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --bg-elev: #1c1c1e;
    --bg-inset: #1c1c1e;
    --text: #ffffff;
    --text-2: #98989f;
    --sep: rgba(84, 84, 88, 0.42);
    --sep-strong: rgba(84, 84, 88, 0.65);
    --blue: #0a84ff;
    --blue-soft: rgba(10, 132, 255, 0.22);
    --green: #30d158;
    --green-bright: #30d158;
    --green-soft: rgba(48, 209, 88, 0.2);
    --red: #ff453a;
    --red-soft: rgba(255, 69, 58, 0.2);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  }
}
[data-theme="dark"] {
  --bg: #000000;
  --bg-elev: #1c1c1e;
  --bg-inset: #1c1c1e;
  --text: #ffffff;
  --text-2: #98989f;
  --sep: rgba(84, 84, 88, 0.42);
  --sep-strong: rgba(84, 84, 88, 0.65);
  --blue: #0a84ff;
  --blue-soft: rgba(10, 132, 255, 0.22);
  --green: #30d158;
  --green-bright: #30d158;
  --green-soft: rgba(48, 209, 88, 0.2);
  --red: #ff453a;
  --red-soft: rgba(255, 69, 58, 0.2);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior-y: none;
}
h1, h2, h3, h4, p, dl, dd { margin: 0; }
button { font-family: inherit; cursor: pointer; }
a { color: var(--blue); text-decoration: none; }
input, textarea, select, button { font-family: inherit; font-size: 17px; }
.ic { display: block; }
img { display: block; }

/* ---------- Coquille ---------- */
.app {
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(var(--tabbar-h) + var(--sab) + 12px);
  overflow-x: hidden;
}
.view {
  padding: 12px 16px 8px;
  animation: fade 0.22s ease;
}
.view--home { padding-top: calc(var(--sat) + 8px); }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- Barre supérieure ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: 44px 1fr 44px; align-items: center;
  gap: 4px;
  padding: calc(var(--sat) + 6px) 8px 8px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--sep);
}
.topbar__title { font-size: 17px; font-weight: 650; text-align: center; letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__btn {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: none; border: none; color: var(--blue); border-radius: 12px;
}
.topbar__btn:active { background: var(--blue-soft); }
.topbar__action { display: flex; justify-content: flex-end; }
.topbar__spacer { display: block; }

/* ---------- Accueil ---------- */
.greeting { padding: 6px 4px 14px; }
.greeting h1 { font-size: 30px; font-weight: 750; letter-spacing: -0.02em; }
.greeting p { color: var(--text-2); margin-top: 3px; font-size: 15px; text-transform: capitalize; }

/* ---------- Grilles / sections ---------- */
.grid { display: grid; gap: 12px; }
.grid--2 { grid-template-columns: 1fr 1fr; }
.section { margin-top: 24px; }
.section__title { font-size: 15px; font-weight: 640; color: var(--text-2); margin: 0 4px 10px;
  text-transform: none; letter-spacing: -0.01em; }
.section__title--sp { margin-top: 26px; }
.section__bar { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 10px; }
.section__bar .section__title { margin: 0; }
.group-title { font-size: 13px; font-weight: 600; color: var(--text-2); text-transform: uppercase;
  letter-spacing: 0.02em; margin: 26px 4px 8px; }
.group-title:first-child { margin-top: 8px; }

/* ---------- Cartes ---------- */
.card {
  background: var(--bg-elev);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 12px; }
.card--muted { color: var(--text-2); font-size: 15px; }
.card--tap { display: flex; align-items: center; gap: 12px; transition: transform 0.1s, background 0.15s; }
.card--tap:active { transform: scale(0.985); background: color-mix(in srgb, var(--bg-elev) 92%, var(--text)); }
.list > * + * { margin-top: 12px; }
.list-inset { padding: 0; overflow: hidden; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 18px; border: none; border-radius: 14px;
  font-size: 16px; font-weight: 600; color: #fff; background: var(--blue);
  transition: transform 0.1s, opacity 0.15s; letter-spacing: -0.01em;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--blue); }
.btn--primary:active { background: var(--blue-press); }
.btn--soft { background: var(--blue-soft); color: var(--blue); }
.btn--ghost { background: color-mix(in srgb, var(--text-2) 14%, transparent); color: var(--text); }
.btn--danger { background: var(--red); }
.btn--danger-ghost { background: var(--red-soft); color: var(--red); }
.btn--block { width: 100%; }
.btn--lg { min-height: 50px; font-size: 17px; border-radius: 15px; }
.btn--xl { min-height: 60px; font-size: 19px; padding: 0 34px; }
.btn--round { border-radius: 30px; box-shadow: 0 8px 22px rgba(0, 122, 255, 0.35); }
.btn.is-disabled, .btn[aria-disabled="true"] { opacity: 0.4; pointer-events: none; }
.link-btn { background: none; border: none; color: var(--blue); font-size: 15px; font-weight: 550;
  display: inline-flex; align-items: center; gap: 5px; padding: 6px; border-radius: 8px; }
.link-btn:active { background: var(--blue-soft); }

/* ---------- Pastilles de statut ---------- */
.pill { font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.pill--a_venir { background: var(--blue-soft); color: var(--blue); }
.pill--en_cours { background: var(--green-soft); color: var(--green); }
.pill--termine { background: color-mix(in srgb, var(--text-2) 18%, transparent); color: var(--text-2); }
.pill--annule { background: var(--red-soft); color: var(--red); }

/* ---------- Carte statistique ---------- */
.stat { display: flex; flex-direction: column; gap: 2px; padding: 15px; position: relative; }
.stat__icon { position: absolute; top: 13px; right: 13px; color: var(--text-2); opacity: 0.7; }
.stat__value { font-size: 25px; font-weight: 720; letter-spacing: -0.02em; line-height: 1.15; }
.stat__label { font-size: 13px; color: var(--text-2); }
.stat--green .stat__value { color: var(--green); }

/* ---------- Carte chantier ---------- */
.chantier-card { padding: 14px 14px 14px 16px; }
.chantier-card__body { flex: 1; min-width: 0; }
.chantier-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chantier-card__title { font-size: 17px; font-weight: 640; letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chantier-card__meta { color: var(--text-2); font-size: 14px; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chantier-card__foot { display: flex; align-items: center; justify-content: space-between;
  margin-top: 9px; font-size: 13.5px; color: var(--text-2); }
.chantier-card__foot span { display: inline-flex; align-items: center; gap: 5px; }
.chantier-card__foot .ic { width: 15px; height: 15px; }
.chantier-card__prix { font-weight: 650; color: var(--text); }
.chantier-card__chev { color: var(--sep-strong); flex-shrink: 0; }

/* ---------- Prochain chantier ---------- */
.prochain__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.prochain__head h3 { font-size: 19px; font-weight: 680; letter-spacing: -0.01em; }
.prochain__head p { color: var(--text-2); font-size: 14px; margin-top: 2px; }
.prochain__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.prochain__actions .btn { min-height: 42px; font-size: 15px; padding: 0 10px; }

/* Liste clé/valeur */
.kv { display: flex; flex-direction: column; margin-top: 12px; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 0.5px solid var(--sep); }
.kv > div:first-child { border-top: none; }
.kv dt { color: var(--text-2); font-size: 15px; flex-shrink: 0; }
.kv dd { font-size: 15px; text-align: right; font-weight: 500; }
.kv__money { font-weight: 680; }

/* Derniers réalisés */
.realise { justify-content: space-between; }
.realise > div:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.realise strong { font-size: 15.5px; font-weight: 600; }
.realise span { color: var(--text-2); font-size: 13px; }
.realise__right { text-align: right; display: flex; flex-direction: column; gap: 2px; }
.realise__prix { font-weight: 650; font-size: 15px; }
.realise__gain { color: var(--green); font-size: 13px; font-weight: 600; }

/* ---------- Segmented control ---------- */
.segmented { display: flex; background: color-mix(in srgb, var(--text-2) 16%, transparent);
  border-radius: 10px; padding: 2px; gap: 2px; margin-bottom: 14px; }
.segmented__item { flex: 1; border: none; background: none; color: var(--text); font-size: 14px;
  font-weight: 550; padding: 7px 4px; border-radius: 8px; transition: background 0.18s; }
.segmented__item.is-active { background: var(--bg-elev); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); font-weight: 620; }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--sep-strong); background: none; color: var(--text); font-size: 15px;
  padding: 8px 15px; border-radius: 20px; font-weight: 500; }
.chip.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ---------- Formulaires ---------- */
.form { padding-bottom: 30px; }
.fs { border: none; margin: 0 0 8px; padding: 0; }
.fs legend { font-size: 13px; font-weight: 600; color: var(--text-2); text-transform: uppercase;
  letter-spacing: 0.02em; padding: 22px 4px 8px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field__label { font-size: 13.5px; color: var(--text-2); font-weight: 500; padding-left: 2px; }
.field__error { color: var(--red); font-size: 12.5px; min-height: 0; padding-left: 2px; }
.field__error:empty { display: none; }
.field--inline { flex-direction: row; align-items: center; justify-content: space-between; }
.field--inline .field__label { flex: 1; }
.input {
  width: 100%; background: var(--bg-elev); border: 0.5px solid var(--sep-strong);
  border-radius: 12px; padding: 12px 14px; color: var(--text); font-size: 17px; outline: none;
  transition: border-color 0.15s;
}
.input:focus { border-color: var(--blue); }
.input--error { border-color: var(--red); }
.input--num { max-width: 120px; text-align: right; }
textarea.input { resize: vertical; line-height: 1.4; min-height: 44px; }
select.input { -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238a8a8e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.new-client.is-hidden { display: none; }
.form__actions { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }

/* ---------- Fiche ---------- */
.fiche__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.fiche__head h2 { font-size: 22px; font-weight: 720; letter-spacing: -0.02em; }
.fiche__type { color: var(--blue); font-size: 14px; font-weight: 550; margin-top: 3px; }
.fiche__block { margin-top: 14px; padding-top: 14px; border-top: 0.5px solid var(--sep); }
.fiche__block h4 { font-size: 13px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.02em;
  margin-bottom: 5px; font-weight: 600; }
.fiche__block p { font-size: 15px; line-height: 1.45; white-space: pre-wrap; }

/* Actions rapides (fiche) */
.actions-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.act { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px;
  color: var(--text); background: none; border: none; }
.act.is-disabled { opacity: 0.4; pointer-events: none; }
.act__ic { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center;
  background: var(--blue-soft); color: var(--blue); }
.act__ic--primary { background: var(--blue); color: #fff; }

/* ---------- Rentabilité ---------- */
.renta { display: grid; grid-template-columns: repeat(3, 1fr); }
.renta__cell { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px;
  border-left: 0.5px solid var(--sep); }
.renta__cell:first-child { border-left: none; }
.renta__label { font-size: 12px; color: var(--text-2); }
.renta__val { font-size: 20px; font-weight: 720; letter-spacing: -0.02em; text-align: center; }
.renta__val--good { color: var(--green); }
.hint { color: var(--text-2); font-size: 13px; margin: 10px 4px 0; line-height: 1.4; }

/* ---------- Checklist outils ---------- */
.checklist { list-style: none; margin: 0 0 8px; padding: 0; }
.check { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-bottom: 0.5px solid var(--sep); }
.checklist--plain .check { padding: 13px 2px; }
.check:last-child { border-bottom: none; }
.check__box { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--sep-strong);
  background: none; color: #fff; display: grid; place-items: center; flex-shrink: 0; transition: all 0.15s; }
.check.is-checked .check__box { background: var(--green-bright); border-color: var(--green-bright); }
.check__label { flex: 1; font-size: 16px; }
.check.is-checked .check__label { color: var(--text-2); text-decoration: line-through; }
.check__del { background: none; border: none; color: var(--text-2); display: grid; place-items: center;
  padding: 4px; border-radius: 8px; }
.check__del:active { background: var(--red-soft); color: var(--red); }

/* ---------- Photos ---------- */
.photo-cat { margin-top: 14px; }
.photo-cat__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.photo-cat__head h4 { font-size: 14px; font-weight: 620; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--bg-elev); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb__del { position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; border-radius: 50%;
  border: none; background: rgba(0, 0, 0, 0.55); color: #fff; display: grid; place-items: center; }
.muted { color: var(--text-2); font-size: 15px; }
.muted--sm { font-size: 13px; }

/* Visionneuse plein écran */
.viewer { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, 0.92);
  display: grid; place-items: center; padding: 20px; animation: fade 0.2s ease; }
.viewer img { max-width: 100%; max-height: 100%; border-radius: 8px; }
.viewer__close { position: absolute; top: calc(var(--sat) + 12px); right: 16px; width: 40px; height: 40px;
  border-radius: 50%; border: none; background: rgba(255, 255, 255, 0.18); color: #fff; display: grid; place-items: center; }

/* ---------- Calendrier ---------- */
.cal__nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal__nav strong { font-size: 17px; font-weight: 640; text-transform: capitalize; }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal__grid--head { margin-bottom: 4px; }
.cal__dow { text-align: center; font-size: 12px; color: var(--text-2); font-weight: 600; padding: 4px 0; }
.cal__cell { position: relative; aspect-ratio: 1; border: none; background: none; color: var(--text);
  font-size: 15px; border-radius: 50%; display: grid; place-items: center; }
.cal__cell--empty { visibility: hidden; }
.cal__cell.is-today { color: var(--blue); font-weight: 700; }
.cal__cell.is-selected { background: var(--blue); color: #fff; font-weight: 650; }
.cal__cell.is-selected.is-today { color: #fff; }
.cal__dot { position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--green-bright); }
.cal__cell.is-selected .cal__dot { background: #fff; }

/* ---------- Graphiques ---------- */
.chart { display: flex; flex-direction: column; gap: 12px; }
.chart__row { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: 10px; }
.chart__label { font-size: 12.5px; color: var(--text-2); }
.chart__track { height: 10px; background: color-mix(in srgb, var(--text-2) 14%, transparent); border-radius: 6px; overflow: hidden; }
.chart__bar { display: block; height: 100%; border-radius: 6px; min-width: 3px; transition: width 0.4s ease; }
.chart__bar--green { background: var(--green-bright); }
.chart__bar--blue { background: var(--blue); }
.chart__value { font-size: 12.5px; font-weight: 600; white-space: nowrap; }

/* Classement rentables */
.rank { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 0.5px solid var(--sep); }
.rank:last-child { border-bottom: none; }
.rank__n { width: 24px; height: 24px; border-radius: 50%; background: var(--blue-soft); color: var(--blue);
  display: grid; place-items: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.rank__body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.rank__body strong { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank__body span { color: var(--text-2); font-size: 12.5px; }
.rank__gain { color: var(--green); font-weight: 680; font-size: 15px; }

/* ---------- Clients ---------- */
.client-card { padding: 12px 14px; }
.client-card__body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.client-card__body strong { font-size: 16px; font-weight: 600; }
.client-card__body span { color: var(--text-2); font-size: 13.5px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--blue-soft); color: var(--blue);
  display: grid; place-items: center; font-size: 16px; font-weight: 680; flex-shrink: 0; text-transform: uppercase; }
.avatar--lg { width: 64px; height: 64px; font-size: 24px; }
.client-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.client-head h2 { font-size: 21px; font-weight: 700; }
.client-head p { color: var(--text-2); font-size: 14px; }
.client-head__actions { display: flex; gap: 10px; margin-top: 8px; }
.client-head__actions .btn { min-height: 38px; font-size: 14px; }

/* ---------- Menu (Plus) ---------- */
.menu { background: var(--bg-elev); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.menu__row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 0.5px solid var(--sep); color: var(--text); }
.menu__row:last-child { border-bottom: none; }
.menu__row:active { background: color-mix(in srgb, var(--bg-elev) 92%, var(--text)); }
.menu__ic { width: 34px; height: 34px; border-radius: 9px; background: var(--blue-soft); color: var(--blue);
  display: grid; place-items: center; flex-shrink: 0; }
.menu__body { flex: 1; display: flex; flex-direction: column; }
.menu__body strong { font-size: 16px; font-weight: 550; }
.menu__body span { color: var(--text-2); font-size: 13px; }
.menu__row > .ic { color: var(--sep-strong); }

/* Lignes de réglages */
.row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; background: none;
  border: none; border-bottom: 0.5px solid var(--sep); color: var(--text); font-size: 16px; text-align: left; }
.row:last-child { border-bottom: none; }
.row:active:not(.row--static) { background: color-mix(in srgb, var(--bg-elev) 92%, var(--text)); }
.row__ic { color: var(--blue); display: grid; place-items: center; }
.row__label { flex: 1; }
.row__value { color: var(--text-2); }
.row--danger .row__ic, .row--danger .row__label { color: var(--red); }
.row > .ic:last-child { color: var(--sep-strong); }

/* Interrupteur */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0 2px;
  margin-top: 8px; font-size: 15px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track { width: 51px; height: 31px; border-radius: 20px; background: var(--sep-strong);
  position: relative; transition: background 0.2s; flex-shrink: 0; }
.switch__thumb { position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 0.2s; }
.switch input:checked + .switch__track { background: var(--green-bright); }
.switch input:checked + .switch__track .switch__thumb { transform: translateX(20px); }

/* Recherche */
.search { display: flex; align-items: center; gap: 8px; background: color-mix(in srgb, var(--text-2) 14%, transparent);
  border-radius: 11px; padding: 9px 12px; margin-bottom: 12px; color: var(--text-2); }
.search__input { flex: 1; border: none; background: none; outline: none; color: var(--text); font-size: 16px; }
.count { color: var(--text-2); font-size: 13px; margin: 0 4px 10px; }

/* État vide */
.empty { text-align: center; color: var(--text-2); padding: 50px 20px; display: flex; flex-direction: column;
  align-items: center; gap: 10px; }
.empty .ic { color: var(--sep-strong); }
.empty p { font-size: 16px; font-weight: 550; color: var(--text); }
.empty span { font-size: 14px; }

/* ---------- Chronomètre ---------- */
.view--chrono { padding-top: 20px; }
.chrono { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 24px 0 20px; }
.chrono__label { font-size: 15px; color: var(--text-2); font-weight: 550; display: flex; align-items: center; gap: 7px; }
.chrono__label.is-running::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--green-bright);
  animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.chrono__time { font-size: 60px; font-weight: 300; letter-spacing: 0.01em; font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum"; }
.chrono__controls { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.chrono__edit { margin-top: 4px; }

/* ---------- Barre d'onglets ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  height: calc(var(--tabbar-h) + var(--sab)); padding-bottom: var(--sab);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  background: color-mix(in srgb, var(--bg-elev) 84%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-top: 0.5px solid var(--sep);
}
.tabbar__item { display: flex; flex-direction: column; align-items: center; gap: 3px; background: none;
  border: none; color: var(--text-2); font-size: 10px; font-weight: 500; padding: 6px 0; height: 100%; }
.tabbar__item svg { width: 26px; height: 26px; }
.tabbar__item.is-active { color: var(--blue); }
.tabbar__spacer { background: none; border: none; }

/* Bouton flottant + */
.fab {
  position: fixed; z-index: 31; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--sab) + 10px);
  width: 58px; height: 58px; border-radius: 50%; border: 3.5px solid var(--bg);
  background: var(--blue); color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 18px rgba(0, 122, 255, 0.4); transition: transform 0.12s;
}
.fab:active { transform: translateX(-50%) scale(0.92); }
.fab svg { width: 30px; height: 30px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; z-index: 300; left: 50%; transform: translateX(-50%) translateY(-20px);
  top: calc(var(--sat) + 14px); max-width: 90%;
  background: color-mix(in srgb, var(--text) 88%, transparent); color: var(--bg-elev);
  padding: 12px 20px; border-radius: 14px; font-size: 15px; font-weight: 550;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.28); opacity: 0; pointer-events: none;
  transition: opacity 0.25s, transform 0.25s; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast--success { background: var(--green); color: #fff; }
.toast--error { background: var(--red); color: #fff; }

/* ---------- Feuille modale ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 250; background: rgba(0, 0, 0, 0.4);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity 0.22s;
}
.sheet-backdrop.open { opacity: 1; }
.sheet {
  width: 100%; max-width: 500px; background: var(--bg-elev);
  border-radius: 22px 22px 0 0; padding: 22px 18px calc(18px + var(--sab));
  transform: translateY(100%); transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.2);
}
.sheet-backdrop.open .sheet { transform: translateY(0); }
.sheet__title { font-size: 18px; font-weight: 680; text-align: center; margin-bottom: 6px; letter-spacing: -0.01em; }
.sheet__msg { color: var(--text-2); font-size: 15px; text-align: center; line-height: 1.45; margin-bottom: 6px; }
.sheet__actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.sheet__list { display: flex; flex-direction: column; margin-top: 12px; }
.sheet__action { display: flex; align-items: center; gap: 14px; padding: 15px 6px; background: none; border: none;
  border-top: 0.5px solid var(--sep); color: var(--blue); font-size: 17px; text-align: left; }
.sheet__action:first-child { border-top: none; }
.sheet__action.is-danger { color: var(--red); }
.sheet .field { margin-top: 14px; }

/* ---------- Divers ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
::selection { background: var(--blue-soft); }
