/* ============================================================
   Fenua Planning — styles
   Direction graphique de la gamme Fenua Cash : éditorial tropical
   (encre lagon, fond crème, corail en action principale)
   ============================================================ */
:root {
  --ink: #173b39;
  --ink-2: #355f5b;
  --muted: #6f817d;
  --line: #e8dfd3;
  --line-soft: #eee7de;
  --canvas: #f8f4ed;
  --paper: #fffdf9;
  --paper-2: #fbf7f1;
  --coral: #e66455;
  --coral-strong: #d85a4c;
  --coral-ink: #bb4c42;
  --coral-soft: #fbe4df;
  --lagon: #2f9c94;
  --lagon-soft: #dbf0ed;
  --sable: #c98a2b;
  --sable-soft: #f6ead5;
  --danger: #d75d50;
  --danger-soft: #fbe7e1;
  --ok: #2d8668;
  --ok-soft: #e1f1ea;
  --warn: #a46722;
  --warn-soft: #f6ead5;
  --radius-s: 9px;
  --radius-m: 12px;
  --shadow-card: 0 10px 28px rgba(50, 64, 59, .055);
  --shadow-pop: 0 24px 60px rgba(33, 44, 38, .18);
  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --editorial: 'Playfair Display', Georgia, serif;
  --sidebar-w: 236px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(circle at 80% 0%, rgba(237,174,133,.10), transparent 24%),
    radial-gradient(circle at 14% 100%, rgba(113,184,176,.08), transparent 28%),
    var(--canvas);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; line-height: 1.2; color: var(--ink); }
h1 { font-family: var(--editorial); font-size: clamp(1.7rem, 2.1vw, 2.25rem); font-weight: 700; letter-spacing: -.025em; }
h2 { font-family: var(--editorial); font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: .95rem; font-weight: 650; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--lagon); outline-offset: 2px; }
[hidden] { display: none !important; }
::selection { background: rgba(113,183,173,.3); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .84rem; }
.nowrap { white-space: nowrap; }

/* ---------- Structure ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; padding: 18px 0 14px;
  background: rgba(255,252,246,.96);
  border-right: 1px solid #eee5d9;
  box-shadow: 12px 0 36px rgba(48,64,58,.035);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 8px 20px 22px; }
.brand-mark {
  width: 36px; height: 36px; flex: none; border-radius: 50%;
  background:
    radial-gradient(circle at 42% 34%, #f9d18c 0 16%, transparent 18%),
    radial-gradient(circle at 51% 56%, #173b39 0 18%, transparent 20%),
    linear-gradient(145deg, #f19a72, #f2bd7e);
  box-shadow: 0 8px 18px rgba(204,101,75,.16);
}
.brand-text { display: grid; line-height: 1.2; min-width: 0; }
.brand-name { font-weight: 700; font-size: 1rem; }
.brand-sub { font-size: .76rem; color: #8a8f88; }
.nav { list-style: none; margin: 0; padding: 0 10px; display: grid; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  color: #294d4a; text-decoration: none; font-weight: 500;
}
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .75; }
.nav a:hover { background: #f8eee8; color: #c95547; }
.nav a.active { color: var(--coral-ink); background: linear-gradient(90deg, #fbe4df, #f9eee9); box-shadow: inset 3px 0 0 #e9695a; font-weight: 700; }
.nav a.active svg { opacity: 1; }
.nav-group { margin: 18px 22px 6px; font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #62736f; }
.sidebar-foot { margin: auto 12px 0; padding: 14px 10px 2px; border-top: 1px solid #eee5db; display: grid; gap: 2px; }
.me { font-weight: 650; }
.me-role { font-size: .8rem; color: var(--muted); }
.link-btn { background: none; border: 0; padding: 4px 0 0; text-align: left; color: #6e7e79; font: inherit; font-size: .85rem; cursor: pointer; }
.link-btn:hover { color: #c95547; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); margin-top: 6px; }
.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #c9c3b8; }
.live.on::before { background: var(--ok); box-shadow: 0 0 0 3px rgba(45,134,104,.15); }

.main { padding: 22px clamp(16px, 2.6vw, 34px) 56px; min-width: 0; max-width: 1760px; width: 100%; margin: 0 auto; outline: none; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-kicker { color: var(--coral); text-transform: uppercase; letter-spacing: .18em; font-size: .7rem; font-weight: 700; margin-bottom: 4px; }
.page-lead { margin: 6px 0 0; color: #77847f; max-width: 70ch; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; padding: 8px 14px;
  font: inherit; font-weight: 600; font-size: .9rem;
  border-radius: var(--radius-s); border: 1px solid #e6ddd3; background: var(--paper); color: var(--ink);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { border-color: #cdbdaf; transform: translateY(-1px); }
.btn:active { transform: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--coral); border-color: var(--coral); color: #fff; box-shadow: 0 8px 18px rgba(211,87,72,.14); }
.btn-primary:hover { background: var(--coral-strong); border-color: var(--coral-strong); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: #0f2c2a; border-color: #0f2c2a; }
.btn-lagon { background: var(--lagon); border-color: var(--lagon); color: #fff; }
.btn-lagon:hover { background: #278880; border-color: #278880; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgba(23,59,57,.05); border-color: transparent; }
.btn-danger { color: var(--danger); background: transparent; border-color: transparent; }
.btn-danger:hover { background: var(--danger-soft); border-color: transparent; }
.btn-sm { min-height: 30px; padding: 4px 10px; font-size: .82rem; }
.icon-btn { background: none; border: 0; width: 34px; height: 34px; border-radius: 9px; cursor: pointer; color: inherit; display: inline-grid; place-items: center; font-size: 1.2rem; }
.icon-btn:hover { background: rgba(23,59,57,.06); }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------- Formulaires ---------- */
input, select, textarea {
  font: inherit; color: var(--ink); width: 100%;
  min-height: 38px; padding: 7px 10px;
  border: 1px solid #e4ddd2; border-radius: var(--radius-s); background: #fffdf9;
}
input:focus, select:focus, textarea:focus { border-color: #83b9b1; outline: none; box-shadow: 0 0 0 3px rgba(111,181,173,.15); }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; min-height: 0; accent-color: var(--lagon); }
input[type="color"] { padding: 2px; width: 60px; }
textarea { min-height: 76px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 14px; }
.field { display: grid; gap: 5px; grid-column: span 4; align-content: start; }
.field.s1 { grid-column: span 1; }
.field.s2 { grid-column: span 2; }
.field.s3 { grid-column: span 3; }
.field > label, .field-label { font-size: .83rem; font-weight: 600; color: #454a3b; }
.field .req { color: var(--danger); margin-left: 2px; }
.help { font-size: .8rem; color: var(--muted); }
.form-section { grid-column: 1 / -1; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.form-section h3 { font-size: .9rem; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: .92rem; }
.form-error { margin: 0; padding: 10px 12px; border-radius: var(--radius-s); background: var(--danger-soft); color: var(--danger); border: 1px solid #f3d2cf; font-size: .9rem; }
.form-error ul { margin: 6px 0 0; padding-left: 18px; }
.form-warn { margin: 0; padding: 10px 12px; border-radius: var(--radius-s); background: var(--warn-soft); color: #7a4b12; border: 1px solid #ecd7b5; font-size: .9rem; }
.form-warn ul { margin: 6px 0 0; padding-left: 18px; }
.inline { display: flex; gap: 8px; align-items: center; }
.inline > input, .inline > select { width: auto; }

/* ---------- Panneaux / tables ---------- */
.panel { background: var(--paper); border: 1px solid #ece4da; border-radius: var(--radius-m); box-shadow: var(--shadow-card); padding: 18px 20px; }
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .search { flex: 1 1 240px; max-width: 360px; }
.toolbar select { width: auto; min-width: 180px; }
.table-wrap { background: var(--paper); border: 1px solid #ece4da; border-radius: var(--radius-m); box-shadow: var(--shadow-card); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .78rem; font-weight: 600; color: #62736f; background: #f8f3ec; padding: 9px 14px; border-bottom: 1px solid #e8dfd5; white-space: nowrap; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover td { background: #fbf7f1; }
.table tr.off td { color: var(--muted); }
.table .empty { text-align: center; color: var(--muted); padding: 36px 14px; }
.table th.num { text-align: right; }
.cell-main { font-weight: 600; }
.cell-sub { font-size: .8rem; color: var(--muted); }
.count { font-size: .84rem; color: var(--muted); margin: 10px 2px 0; }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #efe9e0; color: var(--ink-2); white-space: nowrap; }
.badge-coral { background: var(--coral-soft); color: var(--coral-ink); }
.badge-lagon { background: var(--lagon-soft); color: #0b6e67; }
.badge-sable { background: var(--sable-soft); color: #8a5a17; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-dark { background: var(--ink); color: #fff; }
.badge-off { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-right: 6px; background: var(--c, #ccc); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tabs button { font: inherit; font-size: .9rem; border: 0; background: none; padding: 8px 12px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--coral-ink); border-bottom-color: var(--coral); font-weight: 650; }
.seg { display: inline-flex; border: 1px solid #e6ddd3; border-radius: var(--radius-s); overflow: hidden; background: var(--paper); }
.seg button { font: inherit; font-size: .86rem; border: 0; background: none; padding: 7px 12px; cursor: pointer; color: var(--ink-2); }
.seg button + button { border-left: 1px solid #e6ddd3; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; font-weight: 600; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpi { background: var(--paper); border: 1px solid #ece3d9; border-radius: var(--radius-m); padding: 12px 16px; box-shadow: 0 4px 14px rgba(50,64,59,.04); }
.kpi b { display: block; font-family: var(--editorial); font-size: 1.55rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi span { color: #687a75; font-size: .8rem; }
.kpi.alert b { color: var(--danger); }
.kpi.good b { color: var(--ok); }

/* ---------- Modale ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(23,32,30,.42); display: grid; place-items: start center; padding: 6vh 16px; overflow-y: auto; }
.modal { width: min(600px, 100%); background: var(--paper); border-radius: 14px; box-shadow: var(--shadow-pop); animation: pop .14s ease-out; border: 1px solid #ece4da; }
.modal.wide { width: min(860px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 12px 22px; border-bottom: 1px solid var(--line); }
.modal-head .sub { font-size: .84rem; color: var(--muted); }
.modal-body { padding: 18px 22px; display: grid; gap: 14px; }
.modal-foot { display: flex; justify-content: space-between; gap: 10px; padding: 12px 22px; border-top: 1px solid var(--line); background: #fbf7f1; border-radius: 0 0 14px 14px; flex-wrap: wrap; }
.modal-foot .grp { display: flex; gap: 8px; flex-wrap: wrap; }
@keyframes pop { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Toasts ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 70; display: grid; gap: 8px; }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 10px; border-left: 4px solid #7bbdb5; max-width: 380px; font-size: .9rem; box-shadow: 0 10px 26px rgba(0,0,0,.18); animation: pop .14s ease-out; }
.toast.error { border-left-color: #ff8a7a; }
.toast.warn { border-left-color: #f2bd7e; }
.toast a { color: #f9d18c; }

/* ---------- Connexion ---------- */
.login-body {
  display: grid; place-items: center; padding: 16px; min-height: 100vh;
  background:
    radial-gradient(circle at 18% 18%, rgba(113,183,173,.16), transparent 18%),
    radial-gradient(circle at 82% 12%, rgba(233,183,109,.15), transparent 16%),
    radial-gradient(circle at 50% 100%, rgba(224,122,95,.10), transparent 22%),
    linear-gradient(135deg, #fbf8f1 0%, #f4efe5 100%);
}
.login { width: min(380px, 100%); background: var(--paper); border-radius: 14px; border: 1px solid #e9dfd5; padding: 32px 30px; box-shadow: 0 28px 68px rgba(19,33,28,.12); }
.login .brand { padding: 0 0 22px; }
.login h1 { font-size: 1.6rem; margin-bottom: 4px; }
.login p { margin: 0 0 20px; color: var(--muted); }
.login-form { display: grid; gap: 12px; }
.login-form label { display: grid; gap: 5px; font-size: .85rem; font-weight: 600; }
.login-form .btn { margin-top: 6px; min-height: 44px; }

/* ---------- Planning ---------- */
.pl-toolbar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 14px; }
.pl-nav { display: flex; gap: 6px; align-items: center; }
.pl-label { font-family: var(--editorial); font-size: 1.2rem; font-weight: 700; min-width: 220px; }
.pl-toolbar select { width: auto; min-width: 190px; }
.pl-spacer { flex: 1; }
.pl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 14px; align-items: start; }
.pl-layout.no-side { grid-template-columns: minmax(0, 1fr); }

.grid-wrap { background: var(--paper); border: 1px solid #ece4da; border-radius: var(--radius-m); box-shadow: var(--shadow-card); overflow: auto; max-height: calc(100vh - 210px); }
.pgrid { display: grid; grid-template-columns: 178px repeat(7, minmax(96px, 1fr)); min-width: 850px; }
.pgrid .h { position: sticky; top: 0; z-index: 3; background: #f8f3ec; border-bottom: 1px solid #e8dfd5; padding: 8px 10px; font-size: .78rem; color: #62736f; }
.pgrid .h.day { display: grid; gap: 1px; border-left: 1px solid var(--line-soft); }
.pgrid .h.day b { font-size: .95rem; color: var(--ink); }
.pgrid .h.day.today { background: #fdeee9; }
.pgrid .h.day.today b { color: var(--coral-ink); }
.day-cov { font-size: .72rem; font-weight: 600; }
.day-cov.ok { color: var(--ok); }
.day-cov.ko { color: var(--danger); }
.pgrid .h.corner { left: 0; z-index: 4; display: flex; align-items: end; font-weight: 600; }
.pgrid .group { grid-column: 1 / -1; position: sticky; left: 0; padding: 7px 12px; background: #f4eee6; border-bottom: 1px solid var(--line-soft); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #62736f; }
.pgrid .who { position: sticky; left: 0; z-index: 2; background: var(--paper); border-bottom: 1px solid var(--line-soft); padding: 7px 10px; display: grid; gap: 2px; align-content: center; min-height: 56px; }
.who-name { font-weight: 600; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-sub { font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar { height: 4px; border-radius: 4px; background: #eee7de; overflow: hidden; margin-top: 2px; }
.hbar i { display: block; height: 100%; background: var(--lagon); border-radius: 4px; }
.hbar.over i { background: var(--sable); }
.pgrid .cell { position: relative; border-left: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); padding: 4px; display: grid; gap: 4px; align-content: start; min-height: 56px; }
.pgrid .cell.today { background: #fffaf6; }
.pgrid .cell:hover { background: #fbf7f1; }
.pgrid .cell .add { position: absolute; right: 3px; bottom: 3px; opacity: 0; width: 22px; height: 22px; border-radius: 6px; border: 0; background: var(--lagon-soft); color: #0b6e67; cursor: pointer; font-size: 1rem; line-height: 1; }
.pgrid .cell:hover .add { opacity: 1; }
.pgrid .cell.drop { background: #e9f5f3; box-shadow: inset 0 0 0 2px #83b9b1; }
.pgrid .cell.absent { background: repeating-linear-gradient(135deg, #fbe7e1 0 6px, #fffdf9 6px 11px); }
.abs-tag { font-size: .72rem; font-weight: 700; color: var(--danger); background: rgba(255,253,249,.9); border-radius: 6px; padding: 2px 6px; justify-self: start; }

.chip {
  display: grid; gap: 0; text-align: left; font: inherit; cursor: grab; color: var(--ink);
  padding: 4px 7px 4px 9px; border-radius: 7px; border: 1px solid transparent;
  background: color-mix(in srgb, var(--c) 20%, #fffdf9);
  box-shadow: inset 3px 0 0 var(--c);
  font-size: .76rem; line-height: 1.3; position: relative;
}
.chip:hover { filter: brightness(.97); }
.chip .t { font-weight: 700; font-variant-numeric: tabular-nums; }
.chip .p { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip.propose { background: #fffdf9; border: 1px dashed color-mix(in srgb, var(--c) 70%, #fff); }
.chip.valide { background: color-mix(in srgb, var(--c) 14%, #fffdf9); }
.chip.publie { background: color-mix(in srgb, var(--c) 26%, #fffdf9); }
.chip .ico { position: absolute; top: 3px; right: 5px; font-size: .7rem; opacity: .7; }
.chip.dragging { opacity: .4; }
.chip.flash { animation: flash 1.2s ease-out; }
@keyframes flash { 0% { box-shadow: inset 3px 0 0 var(--c), 0 0 0 3px rgba(230,100,85,.5); } 100% { box-shadow: inset 3px 0 0 var(--c), 0 0 0 0 transparent; } }

.legend { display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; font-size: .8rem; color: var(--muted); margin: 10px 2px 0; }
.legend .chip { cursor: default; padding: 1px 7px; font-size: .72rem; }

.side { display: grid; gap: 14px; position: sticky; top: 14px; }
.side .panel { padding: 14px 16px; }
.side h2 { font-size: 1.05rem; }
.gaps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: calc(100vh - 380px); overflow-y: auto; }
.gap {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center;
  padding: 8px 10px; border-radius: 9px; background: var(--danger-soft); border: 1px solid #f3d2cf; cursor: pointer; text-align: left; font: inherit; color: var(--ink); width: 100%;
}
.gap:hover { border-color: var(--danger); }
.gap.ideal { background: var(--warn-soft); border-color: #ecd7b5; }
.gap .g1 { font-weight: 650; font-size: .85rem; }
.gap .g2 { font-size: .76rem; color: var(--muted); grid-column: 1; }
.gap .g3 { grid-row: 1 / span 2; grid-column: 2; font-weight: 700; color: var(--danger); font-size: .85rem; }
.gap.ideal .g3 { color: #8a5a17; }
.gaps-empty { padding: 16px; text-align: center; color: var(--ok); background: var(--ok-soft); border-radius: 9px; font-weight: 600; font-size: .88rem; }

.progress { height: 8px; border-radius: 8px; background: #eee7de; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--lagon), #7bbdb5); transition: width .4s ease; }
.gen-status { display: grid; gap: 6px; font-size: .86rem; }
.gen-status b { font-variant-numeric: tabular-nums; }

.cand { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 300px; overflow-y: auto; }
.cand button {
  width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; text-align: left; font: inherit; color: var(--ink);
  padding: 8px 10px; border: 1px solid #e6ddd3; border-radius: 9px; background: var(--paper); cursor: pointer;
}
.cand button:hover, .cand button.sel { border-color: var(--lagon); background: #f1f9f7; }
.cand .cn { font-weight: 600; }
.cand .cs { font-size: .78rem; color: var(--muted); }
.cand .ch { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: .8rem; font-variant-numeric: tabular-nums; color: var(--ink-2); }

/* Éditeurs (horaires, disponibilités, sites) */
.rows { display: grid; gap: 6px; }
.row-line { display: grid; grid-template-columns: var(--cols, 1fr 1fr auto); gap: 8px; align-items: center; }
.day-row { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: start; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.day-row:last-child { border-bottom: 0; }
.day-row .dn { font-weight: 600; padding-top: 8px; }
.plages { display: grid; gap: 6px; }
.plage { display: flex; gap: 6px; align-items: center; }
.plage input { width: 110px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.card { background: var(--paper); border: 1px solid #ece4da; border-radius: var(--radius-m); box-shadow: var(--shadow-card); padding: 16px 18px; display: grid; gap: 8px; cursor: pointer; border-top: 5px solid var(--c, var(--lagon)); }
.card:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(50,64,59,.08); }
.card h2 { font-size: 1.1rem; }
.hours { font-size: .82rem; color: var(--ink-2); display: grid; gap: 1px; }
.hours span { display: grid; grid-template-columns: 34px 1fr; }
.empty-state { padding: 40px 20px; text-align: center; color: var(--muted); }

/* Mon planning (employé) */
.my-week { display: grid; gap: 10px; max-width: 720px; }
.my-day { background: var(--paper); border: 1px solid #ece4da; border-radius: var(--radius-m); padding: 12px 16px; display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: center; }
.my-day.off { opacity: .6; }
.my-day .d b { display: block; font-family: var(--editorial); font-size: 1.15rem; }
.my-shift { display: grid; gap: 2px; }
.my-shift + .my-shift { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }

/* ---------- Petits écrans ---------- */
.topbar { display: none; }
@media (max-width: 1440px) {
  .pl-layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; grid-template-columns: 1fr 1fr; }
  .gaps { max-height: 320px; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 12px; }
  .topbar-title { font-weight: 700; }
  .sidebar { position: fixed; z-index: 40; top: 51px; left: 0; bottom: 0; height: auto; width: min(280px, 85vw); transform: translateX(-100%); transition: transform .18s ease; }
  .sidebar.open { transform: none; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .side { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .field, .field.s3 { grid-column: span 2; }
  .field.s1, .field.s2 { grid-column: span 1; }
  .my-day { grid-template-columns: 1fr; }
}
@media print {
  .sidebar, .topbar, .toasts, .no-print, .pl-nav .btn, .side { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  body { background: #fff; }
  .grid-wrap { max-height: none; overflow: visible; box-shadow: none; }
  .pgrid { min-width: 0; }
  .pgrid .cell .add { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
