@import url('https://fonts.googleapis.com/css2?family=Marcellus&family=Jost:wght@300;400;500&display=swap');

/* ============================================================
   CAPELIO Tâches — charte graphique
   Ivoire · Sable · Champagne · Or foncé · Espresso
   ============================================================ */

:root {
  --ivoire:    #FBF6EC;
  --sable:     #EFE3C9;
  --champagne: #B89B6E;
  --or:        #8E7245;
  --espresso:  #271F18;

  --terre:   #A5462F;   /* retard, urgent */
  --ambre:   #C08A3E;   /* priorité haute */
  --olive:   #5C6B4A;   /* terminé */
  --ardoise: #4A5A6B;   /* information */

  --bg:        var(--ivoire);
  --surface:   #FFFDF8;
  --surface-2: #F5EEDF;
  --line:      #E3D7BE;
  --line-soft: #EFE7D6;
  --ink:       var(--espresso);
  --ink-soft:  #6B5B4A;
  --ink-faint: #9C8B76;
  --accent:    var(--or);

  --radius:  4px;
  --radius-l: 8px;
  --shadow: 0 1px 2px rgba(39,31,24,.06), 0 8px 24px rgba(39,31,24,.05);
  --sidebar-w: 244px;

  --font-title: 'Marcellus', Georgia, serif;
  --font-ui: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

[data-theme="sombre"] {
  --bg:        #1C1611;
  --surface:   #241D16;
  --surface-2: #2E251C;
  --line:      #3B3025;
  --line-soft: #332920;
  --ink:       #F1E7D6;
  --ink-soft:  #C3B49C;
  --ink-faint: #8D7E69;
  --sable:     #2E251C;
  --champagne: #C9AE83;
  --or:        #C9AE83;
  --accent:    #C9AE83;
  --terre:     #D2704F;
  --ambre:     #D6A45C;
  --olive:     #8AA06C;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.25);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-weight: 300;
  font-size: 15.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a { color: var(--or); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-title); font-weight: 400; letter-spacing: .01em; margin: 0 0 .6em; }
h1 { font-size: 1.62rem; }
h2 { font-size: 1.24rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--champagne); outline-offset: 2px; border-radius: 3px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ------------------------------------------------------- Structure ---- */

.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

.sidebar {
  background: var(--espresso);
  color: var(--sable);
  padding: 22px 0 30px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
[data-theme="sombre"] .sidebar { background: #16110D; }

.brand { padding: 0 22px 22px; }
.brand-mark { font-family: var(--font-title); font-size: 25px; letter-spacing: .2em; color: var(--champagne); line-height: 1; }
.brand-sub { font-size: 10.5px; letter-spacing: .3em; color: #8C7C63; margin-top: 6px; }

.nav-group { margin-bottom: 22px; }
.nav-group > span {
  display: block; padding: 0 22px 7px;
  font-size: 11px; letter-spacing: .14em; color: #7A6B55;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 22px; color: #D8CBB2; font-size: 14.5px;
  border-left: 2px solid transparent; transition: background .12s, color .12s;
}
.nav-item:hover { background: rgba(184,155,110,.1); color: #fff; text-decoration: none; }
.nav-item.on { background: rgba(184,155,110,.15); border-left-color: var(--champagne); color: #FBF6EC; }
.nav-item .ico { width: 17px; height: 17px; flex: 0 0 17px; opacity: .85; }
.nav-count {
  margin-left: auto; font-size: 11.5px; background: rgba(251,246,236,.12);
  color: #E4D9C2; padding: 1px 7px; border-radius: 9px; min-width: 20px; text-align: center;
}
.nav-count.alert { background: var(--terre); color: #fff; }

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

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 12px;
  padding: 11px 24px; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(9px); border-bottom: 1px solid var(--line-soft);
}
.searchbox { position: relative; flex: 1; max-width: 520px; }
.topbar .searchbox input[type=search] {
  width: 100%; padding: 9px 62px 9px 38px; font-family: var(--font-ui); font-size: 14.5px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); cursor: pointer; text-overflow: ellipsis;
}
.searchbox > svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  opacity: .45; pointer-events: none;
}
.searchbox kbd {
  position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-ui); font-size: 11px; color: var(--ink-faint);
  border: 1px solid var(--line); border-radius: 3px; padding: 1px 5px; background: var(--bg);
}
.content { padding: 24px; max-width: 1180px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--ink-faint); font-size: 14px; }

/* --------------------------------------------------------- Boutons ---- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 17px; font-family: var(--font-ui); font-size: 14.5px; font-weight: 400;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: var(--radius); cursor: pointer; transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--or); border-color: var(--or); color: #FBF6EC; }
.btn-primary:hover { background: var(--espresso); border-color: var(--espresso); }
[data-theme="sombre"] .btn-primary { color: #1C1611; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { color: var(--terre); border-color: color-mix(in srgb, var(--terre) 35%, transparent); background: transparent; }
.btn-danger:hover { background: color-mix(in srgb, var(--terre) 10%, transparent); }
.btn-sm { padding: 5px 11px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ------------------------------------------------------ Formulaires ---- */

.field { margin-bottom: 15px; }
.field > label { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 5px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time],
input[type=number], input[type=search], select, textarea {
  width: 100%; padding: 9px 12px; font-family: var(--font-ui); font-size: 15px; font-weight: 300;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink);
}
textarea { resize: vertical; min-height: 90px; line-height: 1.55; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-faint) 50%), linear-gradient(135deg, var(--ink-faint) 50%, transparent 50%); background-position: right 15px center, right 10px center; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
input:focus, select:focus, textarea:focus { border-color: var(--champagne); outline: none; }
.time-pair { display: flex; align-items: center; gap: 6px; }
.time-pair select { flex: 1; min-width: 68px; text-align: center; padding-right: 24px; }
.time-sep { font-size: 13px; color: var(--ink-faint); flex: 0 0 auto; }

.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 145px; }
.check { display: flex; align-items: center; gap: 9px; font-size: 14.5px; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--or); }

/* ---------------------------------------------------------- Cartes ---- */

.card {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--radius-l); padding: 18px 20px; margin-bottom: 16px;
}
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-flat { background: var(--surface-2); border: none; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-l);
  padding: 15px 17px; display: block; color: inherit;
}
.stat:hover { border-color: var(--champagne); text-decoration: none; }
.stat b { display: block; font-family: var(--font-title); font-size: 30px; line-height: 1.1; color: var(--or); }
.stat span { font-size: 13px; color: var(--ink-faint); }
.stat.alert b { color: var(--terre); }

/* --------------------------------------------------------- Tâches ---- */

.task-list { border: 1px solid var(--line-soft); border-radius: var(--radius-l); overflow: hidden; background: var(--surface); }
.task {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--line-soft);
  position: relative; transition: background .1s;
}
.task:last-child { border-bottom: none; }
.task:hover { background: var(--surface-2); }
.task.done .task-title { color: var(--ink-faint); text-decoration: line-through; }
.task::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; }
.task.p2::before { background: var(--ambre); }
.task.p3::before { background: var(--terre); }
.task.late::before { background: var(--terre); }

.tick {
  flex: 0 0 20px; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%;
  border: 1.5px solid var(--champagne); background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.tick:hover { background: color-mix(in srgb, var(--champagne) 18%, transparent); }
.tick.on { background: var(--olive); border-color: var(--olive); }
.tick svg { opacity: 0; width: 11px; height: 11px; }
.tick.on svg { opacity: 1; }

.task-body { flex: 1; min-width: 0; }
.task-title { color: var(--ink); font-size: 15.5px; display: block; }
.task-title:hover { color: var(--or); text-decoration: none; }
.task-meta { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 4px; font-size: 12.5px; color: var(--ink-faint); }
.task-meta .late { color: var(--terre); }
.task-note { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; padding: 2px 9px; border-radius: 11px;
  background: var(--surface-2); color: var(--ink-soft); border: 1px solid var(--line-soft);
}
.chip.tone-terre   { background: color-mix(in srgb, var(--terre) 12%, transparent); color: var(--terre); border-color: transparent; }
.chip.tone-ambre   { background: color-mix(in srgb, var(--ambre) 16%, transparent); color: #8a5f1f; border-color: transparent; }
.chip.tone-olive   { background: color-mix(in srgb, var(--olive) 15%, transparent); color: var(--olive); border-color: transparent; }
.chip.tone-ardoise { background: color-mix(in srgb, var(--ardoise) 12%, transparent); color: var(--ardoise); border-color: transparent; }
.chip.tone-or      { background: color-mix(in srgb, var(--or) 14%, transparent); color: var(--or); border-color: transparent; }
[data-theme="sombre"] .chip.tone-ambre { color: var(--ambre); }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

.avatar {
  width: 25px; height: 25px; border-radius: 50%; flex: 0 0 25px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10.5px; letter-spacing: .04em; color: #FBF6EC; background: var(--champagne);
}
.avatar.lg { width: 38px; height: 38px; flex-basis: 38px; font-size: 13px; }
.avatar-groupe { display: inline-flex; align-items: center; flex-shrink: 0; }
.avatar-groupe .avatar { margin-left: -7px; border: 2px solid var(--surface); }
.avatar-groupe .avatar:first-child { margin-left: 0; }
.task:hover .avatar-groupe .avatar { border-color: var(--surface-2); }

/* ---------------------------------------------------- Dictée ---- */

.mic {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
  border-radius: var(--radius); cursor: pointer; padding: 8px 11px;
  font-family: var(--font-ui); font-size: 13.5px; flex: 0 0 auto;
}
.mic:hover { border-color: var(--champagne); color: var(--or); }
.mic svg { width: 18px; height: 18px; }

.mic.ecoute {
  border-color: var(--terre); color: var(--terre);
  background: color-mix(in srgb, var(--terre) 10%, transparent);
  animation: pulse-mic 1.4s ease-in-out infinite;
}
@keyframes pulse-mic {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--terre) 35%, transparent); }
  50%      { box-shadow: 0 0 0 6px color-mix(in srgb, var(--terre) 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .mic.ecoute { animation: none; } }

.mic-inline {
  border: none; background: transparent; padding: 2px 6px;
  font-size: 12.5px; color: var(--ink-faint); cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px; vertical-align: middle;
}
.mic-inline svg { width: 15px; height: 15px; }
.mic-inline:hover { color: var(--or); }
.mic-inline.ecoute { color: var(--terre); }

/* --------------------------------------------------- Ajout rapide ---- */

.quick {
  display: flex; gap: 9px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l);
  padding: 7px 8px 7px 15px; margin-bottom: 18px;
}
.quick input {
  flex: 1; border: none; background: transparent; padding: 6px 0; font-size: 15.5px;
}
.quick input:focus { outline: none; }
.quick .hint { font-size: 12px; color: var(--ink-faint); }

/* --------------------------------------------------------- Kanban ---- */

.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(266px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; }
.col { background: var(--surface-2); border-radius: var(--radius-l); padding: 12px; min-height: 220px; }
.col > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; font-size: 13.5px; color: var(--ink-soft); }
.col.drop { outline: 2px dashed var(--champagne); outline-offset: -3px; }
.kcard {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 11px 13px; margin-bottom: 9px; cursor: grab; border-left: 3px solid transparent;
}
.kcard:active { cursor: grabbing; }
.kcard.p2 { border-left-color: var(--ambre); }
.kcard.p3 { border-left-color: var(--terre); }
.kcard.dragging { opacity: .45; }
.kcard .t { font-size: 14.5px; color: var(--ink); display: block; }
.kcard .m { font-size: 12px; color: var(--ink-faint); margin-top: 5px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* -------------------------------------------------------- Agenda ---- */

.cal { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-l); overflow: hidden; }
.cal th { font-weight: 400; font-size: 12px; color: var(--ink-faint); padding: 9px 6px; border-bottom: 1px solid var(--line-soft); }
.cal td { vertical-align: top; height: 104px; width: 14.28%; border: 1px solid var(--line-soft); padding: 5px 6px; }
.cal td.off { background: var(--surface-2); }
.cal td.now { background: color-mix(in srgb, var(--champagne) 12%, transparent); }
.cal .num { font-size: 12.5px; color: var(--ink-faint); }
.cal .num b { font-family: var(--font-title); font-size: 15px; color: var(--ink); }
.cal .ev { display: block; font-size: 11.5px; padding: 2px 5px; border-radius: 3px; margin-top: 3px; background: var(--surface-2); color: var(--ink); border-left: 2px solid var(--or); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .ev.task { border-left-color: var(--champagne); }
.cal .ev.late { border-left-color: var(--terre); color: var(--terre); }
.cal-nav { display: flex; align-items: center; gap: 10px; }

/* ------------------------------------------------------ Contacts ---- */

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 13px; }
.contact-card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-l); padding: 16px; display: block; color: inherit; }
.contact-card:hover { border-color: var(--champagne); text-decoration: none; }
.contact-card .n { font-family: var(--font-title); font-size: 17px; color: var(--ink); }
.contact-card .l { font-size: 13px; color: var(--ink-faint); margin-top: 3px; }
.contact-card .b { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }

.kv { display: grid; grid-template-columns: 128px 1fr; gap: 7px 14px; font-size: 14.5px; }
.kv dt { color: var(--ink-faint); font-size: 13px; }
.kv dd { margin: 0; }

/* ---------------------------------------------- Détail d'une tâche ---- */

.split { display: grid; grid-template-columns: 1fr 312px; gap: 20px; align-items: start; }
.timeline { border-left: 1px solid var(--line); padding-left: 17px; margin-left: 5px; }
.tl-item { position: relative; padding-bottom: 15px; font-size: 14px; }
.tl-item::before { content: ''; position: absolute; left: -22px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--champagne); border: 2px solid var(--bg); }
.tl-item .when { font-size: 12px; color: var(--ink-faint); }
.comment { background: var(--surface-2); border-radius: var(--radius); padding: 11px 14px; margin-bottom: 10px; }
.comment .who { font-size: 12.5px; color: var(--ink-faint); margin-bottom: 4px; display: flex; gap: 8px; align-items: center; }
.comment .body { font-size: 14.5px; white-space: pre-wrap; }

.upload-row { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.upload-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; font-size: 14.5px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: var(--radius); cursor: pointer;
}
.upload-btn:hover { background: var(--surface-2); }
.upload-btn svg { width: 19px; height: 19px; }
.upload-btn.camera { background: var(--surface-2); border-color: var(--champagne); color: var(--or); }
.upload-btn.camera:hover { background: var(--or); border-color: var(--or); color: var(--ivoire); }
[data-theme="sombre"] .upload-btn.camera:hover { color: #1C1611; }
.upload-picked { font-size: 13.5px; flex-basis: 100%; }
.upload-liste { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.upload-item {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2); border: 1px solid var(--line-soft);
  border-radius: 13px; padding: 3px 5px 3px 11px; font-size: 12.5px; color: var(--ink);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.upload-item button {
  border: none; background: transparent; color: var(--ink-faint);
  font-size: 16px; line-height: 1; cursor: pointer; padding: 0 4px; border-radius: 50%;
}
.upload-item button:hover { color: var(--terre); background: color-mix(in srgb, var(--terre) 12%, transparent); }
.upload-total { font-size: 12.5px; color: var(--olive); margin-top: 6px; }
.upload-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.upload-hidden:focus-visible + label, label:has(+ .upload-hidden:focus-visible) { outline: 2px solid var(--champagne); outline-offset: 2px; }
.camera-only { display: none; }
@media (max-width: 880px) {
  .camera-only { display: inline-flex; }
  .upload-btn { flex: 1; min-width: 140px; }
}

.thumbs { display: flex; gap: 9px; flex-wrap: wrap; }
.thumb { width: 92px; height: 92px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); display: block; background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; padding: 6px 11px; background: var(--surface-2); border-radius: var(--radius); }

.subtasks { list-style: none; margin: 0; padding: 0; }
.subtasks li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); font-size: 14.5px; }
.subtasks li.done span { text-decoration: line-through; color: var(--ink-faint); }
.progress { height: 4px; background: var(--line-soft); border-radius: 2px; overflow: hidden; margin: 8px 0 12px; }
.progress i { display: block; height: 100%; background: var(--olive); }

/* ------------------------------------------- Palette de recherche ---- */

.palette-back {
  position: fixed; inset: 0; background: rgba(39,31,24,.45); z-index: 100;
  display: none; align-items: flex-start; justify-content: center; padding: 9vh 16px 16px;
  backdrop-filter: blur(2px);
}
.palette-back.open { display: flex; }
.palette {
  width: 100%; max-width: 640px; background: var(--surface); border-radius: var(--radius-l);
  box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--line);
}
.palette-champ { display: flex; align-items: center; border-bottom: 1px solid var(--line-soft); }
.palette-champ .mic-inline { margin-right: 14px; padding: 8px; }
.palette input {
  flex: 1; width: 100%; border: none; border-radius: 0;
  padding: 16px 19px; font-size: 17px; background: transparent;
}
.palette input:focus { outline: none; border-color: var(--line-soft); }
.palette-results { max-height: 58vh; overflow-y: auto; }
.pres { display: block; padding: 11px 19px; border-bottom: 1px solid var(--line-soft); color: inherit; }
.pres:last-child { border-bottom: none; }
.pres:hover, .pres.sel { background: var(--surface-2); text-decoration: none; }
.pres .t { font-size: 15px; }
.pres .m { font-size: 12.5px; color: var(--ink-faint); }
.pres mark { background: color-mix(in srgb, var(--champagne) 40%, transparent); color: inherit; padding: 0 1px; }
.palette-foot { padding: 9px 19px; font-size: 12px; color: var(--ink-faint); background: var(--surface-2); }

/* ------------------------------------------------------ Assistant ---- */

.chat { display: flex; flex-direction: column; gap: 13px; margin-bottom: 18px; }
.msg { max-width: 78%; padding: 11px 15px; border-radius: var(--radius-l); font-size: 15px; white-space: pre-wrap; }
.msg.me { align-self: flex-end; background: var(--or); color: #FBF6EC; }
[data-theme="sombre"] .msg.me { color: #1C1611; }
.msg.ai { align-self: flex-start; background: var(--surface); border: 1px solid var(--line-soft); }
.msg.ai { position: relative; padding-right: 42px; }
.parler {
  position: absolute; right: 8px; top: 8px;
  border: none; background: transparent; color: var(--ink-faint);
  cursor: pointer; padding: 4px; border-radius: 50%; line-height: 0;
}
.parler svg { width: 17px; height: 17px; }
.parler:hover { color: var(--or); background: color-mix(in srgb, var(--champagne) 16%, transparent); }
.parler.parle { color: var(--terre); animation: pulse-mic 1.4s ease-in-out infinite; }

.suggest { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.suggest button { font-size: 13px; padding: 6px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft); cursor: pointer; }
.suggest button:hover { border-color: var(--champagne); }

.mail-notice {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 22px; z-index: 90;
  display: flex; align-items: center; gap: 14px;
  background: var(--espresso); color: var(--sable);
  padding: 11px 13px 11px 19px; border-radius: 26px;
  box-shadow: 0 6px 22px rgba(39,31,24,.3); font-size: 14.5px;
}
.mail-notice button {
  border: none; background: var(--champagne); color: var(--espresso);
  padding: 6px 15px; border-radius: 15px; font-family: var(--font-ui);
  font-size: 13.5px; cursor: pointer;
}
.mail-notice button:hover { background: var(--sable); }
@media (max-width: 880px) { .mail-notice { bottom: 84px; width: calc(100% - 28px); justify-content: space-between; } }

/* ---------------------------------------------------------- Divers ---- */

.flash { padding: 11px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 14.5px; border-left: 3px solid var(--olive); background: color-mix(in srgb, var(--olive) 11%, transparent); }
.flash.err { border-left-color: var(--terre); background: color-mix(in srgb, var(--terre) 10%, transparent); }
.empty { text-align: center; padding: 46px 20px; color: var(--ink-faint); }
.empty .big { font-family: var(--font-title); font-size: 19px; color: var(--ink-soft); margin-bottom: 7px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-soft); margin-bottom: 18px; overflow-x: auto; }
.tab { padding: 8px 14px; font-size: 14.5px; color: var(--ink-faint); border-bottom: 2px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--ink); text-decoration: none; }
.tab.on { color: var(--or); border-bottom-color: var(--or); }
.muted { color: var(--ink-faint); font-size: 13.5px; }
.divider { height: 1px; background: var(--line-soft); margin: 18px 0; }
table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.data th { text-align: left; font-weight: 400; color: var(--ink-faint); font-size: 12.5px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.data td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); }
.mobile-only { display: none; }
.bottom-nav { display: none; }

/* --------------------------------------------------------- Mobile ---- */

@media (max-width: 880px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .content { padding: 16px 14px 92px; }
  .topbar { padding: 10px 14px; }
  .split { grid-template-columns: 1fr; }
  .mobile-only { display: block; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .searchbox kbd { display: none; }
  .board { grid-auto-columns: 84vw; }

  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: var(--espresso); padding: 7px 0 max(7px, env(safe-area-inset-bottom));
  }
  .bottom-nav a {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    font-size: 10.5px; color: #A08F76; padding: 3px 0; position: relative;
  }
  .bottom-nav a.on { color: var(--champagne); }
  .bottom-nav a:hover { text-decoration: none; }
  .bottom-nav .badge {
    position: absolute; top: 0; right: 50%; margin-right: -20px;
    background: var(--terre); color: #fff; font-size: 9.5px;
    min-width: 15px; height: 15px; border-radius: 8px; display: flex;
    align-items: center; justify-content: center; padding: 0 4px;
  }
  .searchbox input[type=search] { padding-right: 14px; }
}

/* Bouton flottant « nouvelle tâche ». C'est un lien : sans display explicite,
   largeur et hauteur resteraient sans effet et le cercle se déformerait.
   La règle d'affichage mobile vient après, sinon elle serait annulée. */
.fab {
  align-items: center; justify-content: center;
  position: fixed; right: 18px; bottom: 82px; z-index: 45;
  width: 56px; height: 56px; padding: 0; border: none; border-radius: 50%;
  background: var(--or); color: #FBF6EC;
  box-shadow: 0 5px 16px rgba(39,31,24,.3);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.fab:hover, .fab:active { background: var(--espresso); text-decoration: none; }
.fab svg { width: 25px; height: 25px; display: block; }
[data-theme="sombre"] .fab { color: #1C1611; }

.fab { display: none; }
@media (max-width: 880px) { .fab { display: flex; } }

@media print {
  .sidebar, .topbar, .bottom-nav, .fab, .btn { display: none !important; }
  .content { padding: 0; }
  body { background: #fff; }
}
