/* ============================================================
   Emploi du temps — Pointeuse web
   Thèmes multiples (via [data-theme]). Défaut : Ambre (Horoquartz).
   ============================================================ */
:root {
  /* Palette de base — thème AMBRE (Horoquartz) */
  --amber: #f4a900;
  --amber-dark: #d99000;
  --amber-light: #fdf1d3;
  --ink: #1e1e1e;

  --bg: #f4f1e9;
  --surface: #ffffff;
  --panel: #f1ece0;
  --panel-head: #d8ceb8;
  --sidebar-1: #242320;
  --sidebar-2: #2f2d28;

  --text: #2a2823;
  --muted: #7c7768;
  --border: #e5dfd1;
  --border-strong: #d5cbb6;

  --success: #2e7d32; --success-light: #e7f2e7;
  --danger: #c62828;  --danger-light: #fbe9e9;
  --warning: #e08a00; --warning-light: #fcf1dc;

  /* Variables de rôle (permettent le theming) */
  --btn-bg: var(--ink);
  --btn-text: #ffffff;
  --topbar-bg: var(--amber);
  --topbar-text: var(--ink);
  --topbar-sub: #6b5a1e;
  --input-bg: #ffffff;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(40,36,25,.06), 0 3px 10px rgba(40,36,25,.05);
  --shadow-lg: 0 14px 34px rgba(40,36,25,.18);
}

/* ===================== THÈMES ===================== */
body[data-theme="petrole"] {
  --amber: #0d7377; --amber-dark: #0a5a5d; --amber-light: #e2f0ef;
  --ink: #0c3b3d; --btn-bg: #0c3b3d;
  --sidebar-1: #0b3436; --sidebar-2: #0f4b4e;
  --bg: #eef3f2; --panel: #e9f1f0; --panel-head: #cfe3e1;
  --border: #dbe7e5; --border-strong: #c3d6d4;
  --topbar-text: #ffffff; --topbar-sub: rgba(255,255,255,.85);
}
body[data-theme="ocean"] {
  --amber: #2563eb; --amber-dark: #1d4ed8; --amber-light: #e7edfd;
  --ink: #12244a; --btn-bg: #12244a;
  --sidebar-1: #0f2444; --sidebar-2: #173a6b;
  --bg: #eef2f9; --panel: #eaf0fa; --panel-head: #d3e0f4;
  --border: #dce5f2; --border-strong: #c3d4ec;
  --topbar-text: #ffffff; --topbar-sub: rgba(255,255,255,.85);
}
body[data-theme="emeraude"] {
  --amber: #059669; --amber-dark: #047857; --amber-light: #e3f4ee;
  --ink: #0b3b2e; --btn-bg: #0b3b2e;
  --sidebar-1: #0a3529; --sidebar-2: #0e4d3b;
  --bg: #eff5f2; --panel: #e9f4ef; --panel-head: #cfe8dd;
  --border: #dbeae3; --border-strong: #c1ddd0;
  --topbar-text: #ffffff; --topbar-sub: rgba(255,255,255,.85);
}
body[data-theme="indigo"] {
  --amber: #6d28d9; --amber-dark: #5b21b6; --amber-light: #efe9fb;
  --ink: #241a44; --btn-bg: #241a44;
  --sidebar-1: #201640; --sidebar-2: #33246b;
  --bg: #f1eff9; --panel: #efeafb; --panel-head: #ded3f4;
  --border: #e4ddf3; --border-strong: #cfc0ec;
  --topbar-text: #ffffff; --topbar-sub: rgba(255,255,255,.85);
}
body[data-theme="dark"] {
  --amber: #f5b301; --amber-dark: #d99a00; --amber-light: #3a3320;
  --ink: #0e1014; --btn-bg: #f5b301; --btn-text: #161616;
  --sidebar-1: #0c0e12; --sidebar-2: #14171d;
  --bg: #161922; --surface: #1e222b; --panel: #232833; --panel-head: #2c313d;
  --text: #e8eaed; --muted: #98a0ab; --border: #2b313c; --border-strong: #3a4250;
  --topbar-bg: var(--amber); --topbar-text: #161616; --topbar-sub: #6b5a1e;
  --input-bg: #262b34;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--amber-dark); }
h1, h2, h3 { margin: 0 0 .5rem; }

/* ===================== Authentification ===================== */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: linear-gradient(135deg, var(--amber) 0%, var(--amber-dark) 60%, #333 130%);
}
.auth-card {
  background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 410px; padding: 38px 34px; border-top: 5px solid var(--amber);
}
.auth-card h1 { font-size: 1.5rem; }
.auth-card .subtitle { color: var(--muted); margin-bottom: 22px; font-size: .95rem; }
.brand { display: flex; align-items: center; gap: 11px; margin-bottom: 22px; font-weight: 700; font-size: 1.12rem; }
.brand .logo {
  width: 38px; height: 38px; border-radius: 10px; background: var(--ink); color: var(--amber);
  display: grid; place-items: center; font-size: 20px;
}

/* ===================== Formulaires ===================== */
label { display: block; font-size: .82rem; font-weight: 600; margin: 14px 0 6px; color: var(--text); opacity: .85; }
input, textarea, select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font-size: .95rem; font-family: inherit; background: var(--input-bg); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(0,0,0,.06); }
textarea { resize: vertical; min-height: 70px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 17px; border: none; border-radius: var(--radius-sm);
  font-size: .93rem; font-weight: 600; cursor: pointer;
  background: var(--btn-bg); color: var(--btn-text); transition: filter .15s, transform .05s;
}
.btn:hover { filter: brightness(.88); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; margin-top: 22px; }
.btn-accent { background: var(--amber); color: var(--ink); }
.btn-accent:hover { filter: brightness(.94); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }
.btn-ghost:hover { background: var(--panel); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.9); }
.btn-sm { padding: 6px 11px; font-size: .82rem; }

.form-footer { margin-top: 18px; text-align: center; font-size: .9rem; color: var(--muted); }
.msg { margin-top: 14px; padding: 10px 12px; border-radius: var(--radius-sm); font-size: .88rem; display: none; }
.msg.show { display: block; }
.msg.error { background: var(--danger-light); color: var(--danger); border: 1px solid rgba(198,40,40,.25); }
.msg.success { background: var(--success-light); color: var(--success); border: 1px solid rgba(46,125,50,.25); }

/* ===================== Structure ===================== */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; background: linear-gradient(180deg, var(--sidebar-1), var(--sidebar-2));
  color: rgba(255,255,255,.78); display: flex; flex-direction: column; padding: 20px 14px;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { color: #fff; padding: 4px 8px 18px; border-bottom: 1px solid rgba(255,255,255,.10); margin-bottom: 14px; }
.sidebar .brand .logo { background: var(--amber); color: var(--ink); }
.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.nav button {
  display: flex; align-items: center; gap: 12px; background: transparent; border: none;
  color: rgba(255,255,255,.78); padding: 11px 13px; border-radius: var(--radius-sm); cursor: pointer;
  font-size: .93rem; font-weight: 500; text-align: left; width: 100%; transition: .15s;
}
.nav button:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav button.active { background: var(--amber); color: var(--ink); font-weight: 600; }
.nav .icon { display: inline-flex; align-items: center; justify-content: center; width: 22px; }
.sidebar-footer { border-top: 1px solid rgba(255,255,255,.12); padding-top: 14px; font-size: .82rem; }
.sidebar-footer .user { color: #fff; font-weight: 600; margin-bottom: 8px; padding: 0 8px; display: flex; align-items: center; gap: 8px; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

/* ===================== Barre supérieure ===================== */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--amber); border-bottom: 3px solid rgba(0,0,0,.14);
  padding: 10px 26px; position: sticky; top: 0; z-index: 20;
}
.topbar-left { display: flex; flex-direction: column; }
.topbar-hello { font-weight: 800; font-size: 1rem; color: var(--topbar-text); }
.topbar-date { color: var(--topbar-sub); font-size: .82rem; text-transform: capitalize; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.bell {
  background: var(--ink); border: none; color: #fff; width: 40px; height: 40px; border-radius: 9px;
  cursor: pointer; display: grid; place-items: center; transition: filter .15s;
}
.bell:hover { filter: brightness(1.3); }
.theme-wrap { position: relative; }
.theme-menu {
  position: absolute; top: 50px; right: 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-lg); padding: 8px; display: none; flex-direction: column; gap: 3px;
  z-index: 60; min-width: 230px;
}
.theme-menu.show { display: flex; }
.theme-swatch {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid transparent;
  border-radius: 9px; background: transparent; cursor: pointer; width: 100%; text-align: left;
  color: var(--text); font-size: .9rem; font-weight: 600;
}
.theme-swatch:hover { background: var(--panel); }
.theme-swatch.active { border-color: var(--amber); background: var(--amber-light); }
.theme-swatch .sw { display: inline-flex; border-radius: 6px; overflow: hidden; border: 1px solid var(--border-strong); flex-shrink: 0; }
.theme-swatch .sw i { width: 15px; height: 24px; display: block; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-top: 10px; }
.theme-grid .theme-swatch { border: 1px solid var(--border); }

.user-chip { display: flex; align-items: center; gap: 9px; background: var(--ink); color: #fff; padding: 5px 12px 5px 6px; border-radius: 30px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--amber); color: var(--ink); font-weight: 800; font-size: 14px; text-transform: uppercase; }
.avatar.sm { width: 26px; height: 26px; font-size: 12px; }
.user-chip .u-name { font-weight: 700; font-size: .88rem; color: #fff; }
.user-chip .u-role { color: rgba(255,255,255,.72); font-size: .72rem; }

/* ===================== Pages ===================== */
.content { padding: 24px 28px; max-width: 1180px; width: 100%; }
.page { display: none; }
.page.active { display: block; animation: fade .2s; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.page-head h1 { font-size: 1.45rem; display: flex; align-items: center; gap: 10px; }

/* ===================== Cartes ===================== */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* ===================== Compteurs ===================== */
.counters { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.counter { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; display: flex; align-items: center; gap: 14px; border-left: 4px solid var(--amber); }
.counter.accent { border-left-color: var(--ink); }
.counter.green { border-left-color: var(--success); }
.counter .c-icon { width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center; background: var(--amber-light); color: var(--amber-dark); flex-shrink: 0; }
.counter.green .c-icon { background: var(--success-light); color: var(--success); }
.counter .c-value { font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.counter .c-label { color: var(--muted); font-size: .82rem; }
.c-value.pos { color: var(--success); }
.c-value.neg { color: var(--warning); }

/* ===================== Badgeuse ===================== */
.badge-status { text-align: center; padding: 6px 0 16px; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .85rem; padding: 5px 14px; border-radius: 30px; margin-bottom: 10px; background: var(--panel-head); color: var(--muted); }
.status-pill.on { background: var(--success-light); color: var(--success); }
.status-pill .dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.clock { font-size: 3.4rem; font-weight: 800; letter-spacing: 2px; color: var(--text); font-variant-numeric: tabular-nums; }
.badge-status .date { color: var(--muted); text-transform: capitalize; }

.badge-main-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; max-width: 460px;
  margin: 6px auto 14px; padding: 18px; background: var(--btn-bg); color: var(--btn-text); border: none;
  border-radius: var(--radius); font-size: 1.15rem; font-weight: 700; cursor: pointer; transition: filter .15s, transform .05s;
}
.badge-main-btn:hover { filter: brightness(.9); }
.badge-main-btn:active { transform: translateY(1px); }
.badge-main-btn.out { background: var(--amber); color: var(--ink); }

.motif-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 460px; margin: 0 auto; }
.motif-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 10px; background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm); cursor: pointer; font-size: .9rem; font-weight: 600; color: var(--text); transition: .15s; }
.motif-btn:hover:not(:disabled) { border-color: var(--amber); background: var(--amber-light); }
.motif-btn:disabled { opacity: .45; cursor: not-allowed; }
.motif-btn .m-ic { color: var(--amber-dark); }

.punch-list { margin-top: 6px; }
.punch-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-top: 8px; background: var(--surface); }
.punch-item .p-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.punch-item.in .p-ic { background: var(--success-light); color: var(--success); }
.punch-item.out .p-ic { background: var(--warning-light); color: var(--warning); }
.punch-item .p-time { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 54px; }
.punch-item .p-label { flex: 1; }
.punch-item .p-motif { font-size: .78rem; color: var(--muted); }
.big-hours { font-size: 2.3rem; font-weight: 800; color: var(--amber-dark); }

/* ===================== Tables ===================== */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: .92rem; }
th { color: var(--muted); font-weight: 600; font-size: .76rem; text-transform: uppercase; letter-spacing: .4px; }
tbody tr:hover { background: var(--panel); }

/* ===================== Kanban ===================== */
.kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.column { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; min-height: 160px; }
.column.drag-over { background: var(--amber-light); border-color: var(--amber); }
.column h3 { font-size: .92rem; display: flex; justify-content: space-between; align-items: center; }
.column .count { background: var(--panel-head); color: var(--text); border-radius: 20px; padding: 1px 9px; font-size: .78rem; font-weight: 600; }
.task-card { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--amber); border-radius: var(--radius-sm); padding: 12px; margin-top: 10px; cursor: grab; box-shadow: var(--shadow); }
.task-card:active { cursor: grabbing; }
.task-card .t-title { font-weight: 600; font-size: .95rem; }
.task-card .t-desc { color: var(--muted); font-size: .85rem; margin: 4px 0; }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { font-size: .72rem; padding: 2px 9px; border-radius: 20px; background: var(--amber-light); color: var(--amber-dark); font-weight: 600; }
.chip.cat { background: var(--panel); color: var(--muted); }
.chip.date { background: var(--warning-light); color: var(--warning); }
.chip.overdue { background: var(--danger-light); color: var(--danger); }
.task-card .actions { display: flex; gap: 6px; margin-top: 8px; }

/* ===================== Créneaux ===================== */
.slot-item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--border); border-left: 5px solid var(--amber); border-radius: var(--radius-sm); margin-bottom: 10px; background: var(--surface); }
.slot-time { font-weight: 700; font-size: .9rem; white-space: nowrap; min-width: 108px; color: var(--text); }
.slot-body { flex: 1; }
.slot-body .s-title { font-weight: 600; }
.slot-body .s-desc { color: var(--muted); font-size: .86rem; }
.slot-actions { display: flex; gap: 6px; }
.day-group { margin-bottom: 20px; }
.day-group h3 { font-size: 1rem; text-transform: capitalize; color: var(--text); border-bottom: 2px solid var(--border); padding-bottom: 6px; }

/* ===================== Modales ===================== */
.modal-backdrop { position: fixed; inset: 0; background: rgba(20,18,12,.55); display: none; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal-backdrop.show { display: flex; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 480px; padding: 26px; max-height: 90vh; overflow: auto; box-shadow: var(--shadow-lg); border-top: 4px solid var(--amber); }
.modal h2 { font-size: 1.2rem; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ===================== Toasts ===================== */
#toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 100; }
.toast { background: #1e1e1e; color: #fff; padding: 13px 16px; border-radius: 11px; box-shadow: var(--shadow-lg); min-width: 240px; max-width: 340px; animation: slidein .25s; border-left: 4px solid var(--amber); }
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }
.toast .toast-title { font-weight: 600; margin-bottom: 2px; }
.toast .toast-body { font-size: .86rem; color: #d7d1c4; }
@keyframes slidein { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ===================== Utilitaires ===================== */
.muted { color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 30px; }
.mt { margin-top: 16px; }
.flex { display: flex; align-items: center; gap: 10px; }
.spread { justify-content: space-between; }
.color-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }

/* ===================== Icônes SVG ===================== */
.ic { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.btn .ic { vertical-align: -0.15em; }
.page-head h1 .ic { color: var(--amber-dark); }
.brand .logo .ic { color: var(--amber); }
.brand-logo { width: 38px; height: 38px; display: block; flex-shrink: 0; }
.counter .c-icon .ic { width: 24px; height: 24px; }
.chip .ic { vertical-align: -0.12em; margin-right: 2px; }
.icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; }

/* ===================== Calendrier ===================== */
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-title { font-weight: 700; font-size: 1.05rem; text-transform: capitalize; margin-left: 6px; }
.cal-views button.active { background: var(--amber); color: var(--ink); border-color: var(--amber); }
.cal-card { padding: 0; overflow: hidden; }

.cal-grid-head { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--panel); border-bottom: 1px solid var(--border); }
.cal-grid-head > div { padding: 8px; text-align: center; font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-cell { min-height: 104px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 5px; cursor: pointer; position: relative; transition: background .1s; }
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell:hover { background: var(--panel); }
.cal-cell.out { background: var(--bg); }
.cal-cell.out .cal-daynum { opacity: .45; }
.cal-daynum { font-size: .82rem; font-weight: 700; margin-bottom: 3px; width: 24px; height: 24px; display: grid; place-items: center; }
.cal-cell.today .cal-daynum { background: var(--amber); color: var(--ink); border-radius: 50%; }
.cal-ev { font-size: .72rem; padding: 2px 6px; border-radius: 5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.cal-ev .ev-t { font-weight: 700; opacity: .85; }

.wk-head { display: grid; grid-template-columns: 56px repeat(7, 1fr); border-bottom: 1px solid var(--border); background: var(--surface); }
.wk-dayhead { padding: 8px 4px; text-align: center; font-size: .78rem; color: var(--muted); border-left: 1px solid var(--border); text-transform: uppercase; }
.wk-dayhead strong { display: block; font-size: 1.05rem; color: var(--text); }
.wk-dayhead.today { background: var(--amber-light); }
.wk-dayhead.today strong { color: var(--amber-dark); }
.wk-body { display: grid; grid-template-columns: 56px 1fr; max-height: 600px; overflow-y: auto; }
.wk-hour { font-size: .72rem; color: var(--muted); text-align: right; padding-right: 6px; border-bottom: 1px solid var(--border); box-sizing: border-box; display: flex; align-items: flex-start; justify-content: flex-end; padding-top: 2px; }
.wk-cols { display: grid; grid-template-columns: repeat(7, 1fr); }
.wk-col { position: relative; border-left: 1px solid var(--border); user-select: none; }
.wk-col.today { background: rgba(244,169,0,.06); }
.wk-slot { border-bottom: 1px solid var(--border); cursor: pointer; }
.wk-slot:hover { background: var(--panel); }
.wk-ev { position: absolute; border-radius: 6px; padding: 3px 6px; font-size: .72rem; overflow: hidden; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.18); line-height: 1.25; }
.wk-ev-time { font-weight: 700; opacity: .9; display: block; font-size: .68rem; }
.wk-sel { position: absolute; left: 2px; right: 2px; background: var(--amber-light); border: 1.5px solid var(--amber-dark); border-radius: 6px; font-size: .7rem; color: var(--ink); padding: 2px 5px; pointer-events: none; z-index: 4; font-weight: 700; box-sizing: border-box; overflow: hidden; }

.weekday-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.weekday-picker label { display: flex; align-items: center; gap: 5px; margin: 0; font-weight: 600; font-size: .85rem; background: var(--panel); padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.weekday-picker input { width: auto; }

/* ===================== Pied de page + cookies ===================== */
.app-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; padding: 14px 28px; border-top: 1px solid var(--border); color: var(--muted); font-size: .8rem; margin-top: 24px; }
.app-footer a { color: var(--muted); }
.cookie-notice { position: fixed; bottom: 16px; left: 16px; right: 16px; max-width: 640px; margin: 0 auto; background: var(--ink); color: #fff; border-radius: 12px; padding: 12px 16px; display: none; align-items: center; gap: 14px; box-shadow: var(--shadow-lg); z-index: 200; font-size: .86rem; }
.cookie-notice a { color: var(--amber); }
.cookie-notice .btn { flex-shrink: 0; }

/* ===================== Studio (créateur) ===================== */
.progress { height: 12px; background: var(--panel); border-radius: 20px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--amber); width: 0; transition: width .4s; }
.bars7 { display: flex; align-items: flex-end; gap: 10px; height: 170px; padding-top: 6px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.bar { width: 68%; background: var(--amber); border-radius: 6px 6px 0 0; min-height: 2px; transition: height .3s; }
.bar-val { font-size: .72rem; color: var(--muted); margin-bottom: 4px; height: 14px; }
.bar-lbl { font-size: .72rem; color: var(--muted); margin-top: 6px; text-transform: capitalize; }
.cat-row { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.cat-name { min-width: 130px; font-weight: 600; font-size: .88rem; }
.cat-track { flex: 1; height: 12px; background: var(--panel); border-radius: 20px; overflow: hidden; }
.cat-fill { height: 100%; background: var(--amber-dark); border-radius: 20px; }
.cat-h { min-width: 60px; text-align: right; font-weight: 700; font-size: .85rem; }
.pomo { text-align: center; padding: 6px 0; }
.pomo-time { font-size: 3rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); letter-spacing: 1px; }
.pomo-phase { color: var(--muted); font-weight: 600; }
.live-row { padding: 12px 14px; border-radius: 9px; margin-top: 8px; background: var(--panel); border-left: 3px solid var(--muted); }
.live-row.today { border-left-color: var(--amber); background: var(--amber-light); }
.live-row.done { border-left-color: var(--success); background: var(--success-light); }
.live-row.missed { border-left-color: var(--danger); background: var(--danger-light); }
.live-hist { padding: 6px 0; font-size: .88rem; border-bottom: 1px solid var(--border); }
.title-review-box { background: var(--panel); border: 1px solid var(--border); border-radius: 9px; padding: 12px 14px; font-size: .88rem; line-height: 1.6; margin-top: 8px; }

@media (max-width: 820px) {
  .cal-cell { min-height: 66px; }
  .wk-body { max-height: none; }
  .app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; }
  .sidebar .brand { border: none; margin: 0; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .kanban { grid-template-columns: 1fr; }
  .content { padding: 16px; }
  .topbar { padding: 10px 16px; }
  .clock { font-size: 2.6rem; }
  .motif-row { grid-template-columns: 1fr; }
}
