/* Business Hub — direction « abidjan », version finale.
   Ivoire le jour, indigo la nuit, terre cuite pour ce qui doit bouger.
   Un seul jeu de jetons change entre les deux thèmes ; aucun composant n'est dupliqué. */

:root {
  /* Sols et surfaces */
  --ivoire: #FBF7EE;
  --ivoire-2: #F4EDDF;
  --carte: #FFFDF9;
  --sable: #EADFCB;
  --sable-2: #DCCFB3;
  --surbrillance: #F7F1E4;
  /* Encre */
  --encre: #1F1B15;
  --encre-2: #5B5346;
  --encre-3: #6E6656;
  /* Accents */
  --terracotta: #C2491D;
  --terracotta-2: #A63A13;
  --terracotta-txt: #A63A13;
  --terracotta-soft: #FBE8DE;
  --indigo: #2B2E6B;
  --indigo-plein: #2B2E6B;
  --indigo-2: #1E2150;
  --indigo-3: #15173D;
  --indigo-soft: #E8E9F5;
  --vert: #146C4B;
  --vert-soft: #DFF1E7;
  --or: #C9962E;
  --or-txt: #8C6212;
  --or-soft: #FBEFD2;
  --or-bord: #EBD39A;
  --rouge: #B3241C;
  --rouge-soft: #FBE3E0;
  /* Marques — uniquement en pastilles et avatars */
  --gwr: #D35400; --gwr-txt: #A94300; --gwr-soft: #FDEADF;
  --gkm: #0056B3; --gkm-txt: #0056B3; --gkm-soft: #E2ECFA;
  --gks: #29235C; --gks-txt: #29235C; --gks-soft: #E8E6F3;
  /* Bandeau de salutation */
  --hero-a: #1E2150; --hero-b: #2B2E6B; --hero-c: #3D3F8A;
  /* Géométrie */
  --r-lg: 22px; --r: 16px; --r-sm: 10px; --r-xs: 7px;
  --h-topbar: 60px;
  --ombre: 0 1px 2px rgba(63, 43, 20, .05), 0 10px 30px -14px rgba(63, 43, 20, .18);
  --ombre-2: 0 2px 4px rgba(63, 43, 20, .06), 0 22px 48px -18px rgba(63, 43, 20, .28);
  --ombre-lg: 0 24px 60px -16px rgba(30, 33, 80, .35);
  --anneau: 0 0 0 3px rgba(194, 73, 29, .22);
  /* Typo */
  --font: "Figtree", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --display: "Outfit", "Figtree", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  /* Motifs en filigrane */
  --motif-losange: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='56' height='56'><path d='M28 2 54 28 28 54 2 28Z' fill='none' stroke='white' stroke-width='1'/><path d='M28 14 42 28 28 42 14 28Z' fill='none' stroke='white' stroke-width='1'/></svg>");
  --motif-triangle: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40'><path d='M0 40 20 0l20 40Z' fill='none' stroke='%231F1B15' stroke-width='.8'/><path d='M20 0v40' stroke='%231F1B15' stroke-width='.8'/></svg>");
  --motif-tisse: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24'><path d='M0 12h24M12 0v24' stroke='%231F1B15' stroke-width='.6'/><path d='M12 4 20 12 12 20 4 12Z' fill='none' stroke='%231F1B15' stroke-width='.6'/></svg>");
  --motif-opacite: .12;
}

[data-theme="sombre"] {
  --ivoire: #101223;
  --ivoire-2: #1A1D31;
  --carte: #191C2E;
  --sable: #2A2E45;
  --sable-2: #3A3F5C;
  --surbrillance: #20243A;
  --encre: #ECEAF4;
  --encre-2: #B9B6CE;
  --encre-3: #8D8AA6;
  --terracotta: #C2491D;
  --terracotta-2: #D35A2C;
  --terracotta-txt: #F08A5A;
  --terracotta-soft: #3A2218;
  --indigo: #8E92E8;
  --indigo-plein: #3A3E85;
  --indigo-2: #0B0D1A;
  --indigo-3: #05060F;
  --indigo-soft: #23264A;
  --vert: #4FBE8B;
  --vert-soft: #14301F;
  --or: #E0B75A;
  --or-txt: #E0B75A;
  --or-soft: #3A2E12;
  --or-bord: #6A5527;
  --rouge: #F2776C;
  --rouge-soft: #3A1A18;
  --gwr: #F08A4B; --gwr-txt: #F08A4B; --gwr-soft: #3A2113;
  --gkm: #6FA8F0; --gkm-txt: #6FA8F0; --gkm-soft: #16233A;
  --gks: #A79EE8; --gks-txt: #A79EE8; --gks-soft: #232041;
  --hero-a: #24285C; --hero-b: #31356F; --hero-c: #3F4494;
  --ombre: 0 1px 2px rgba(0,0,0,.45), 0 10px 30px -14px rgba(0,0,0,.65);
  --ombre-2: 0 2px 4px rgba(0,0,0,.5), 0 22px 48px -18px rgba(0,0,0,.7);
  --ombre-lg: 0 24px 60px -16px rgba(0,0,0,.8);
  --motif-triangle: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40'><path d='M0 40 20 0l20 40Z' fill='none' stroke='%23ECEAF4' stroke-width='.8'/><path d='M20 0v40' stroke='%23ECEAF4' stroke-width='.8'/></svg>");
  --motif-tisse: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24'><path d='M0 12h24M12 0v24' stroke='%23ECEAF4' stroke-width='.6'/><path d='M12 4 20 12 12 20 4 12Z' fill='none' stroke='%23ECEAF4' stroke-width='.6'/></svg>");
  --motif-opacite: .16;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font: 14.5px/1.55 var(--font); color: var(--encre); background: var(--ivoire); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
code { font-family: var(--mono); font-size: 12px; background: var(--ivoire-2); padding: 1px 6px; border-radius: 5px; }
::selection { background: var(--or-soft); color: var(--encre); }
/* Anneau de focus : couleur pleine (jamais de transparence) pour garder ≥ 3:1 sur toutes les surfaces (WCAG 1.4.11). */
:focus-visible { outline: 3px solid var(--terracotta-2); outline-offset: 2px; border-radius: 6px; }
.nav :focus-visible, .hero :focus-visible { outline-color: #F5B58F; }

/* Lien d'évitement : premier élément tabulable du document (WCAG 2.4.1). */
.skip { position: fixed; top: 8px; left: 8px; z-index: 200; transform: translateY(-160%); transition: transform .15s ease-out; display: inline-flex; align-items: center; min-height: 38px; padding: 9px 16px; border-radius: 11px; background: var(--terracotta); color: #fff; font-weight: 600; font-size: 13.5px; border: 0; box-shadow: var(--ombre-lg); }
.skip:focus-visible { transform: translateY(0); outline-color: #F5B58F; }
#main:focus-visible { outline-offset: -3px; }
svg { display: inline-block; }
[hidden] { display: none !important; }

h1 { font-family: var(--display); font-weight: 700; font-size: 32px; letter-spacing: -.02em; margin: 0; line-height: 1.1; color: var(--encre); }
h2 { font-family: var(--display); font-size: 17px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
h3 { font-size: 12px; margin: 0 0 12px; color: var(--encre-3); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; line-height: 1.3; }
p { margin: 0 0 10px; }
.muted { color: var(--encre-2); }
.small { font-size: 12.5px; line-height: 1.45; }
.faint { color: var(--encre-3); }
.nowrap { white-space: nowrap; }
.id { font-family: var(--mono); font-size: 11.5px; color: var(--encre-3); }

/* ----- Coque ----- */
.shell { display: grid; grid-template-columns: 268px 1fr; min-height: 100vh; }
.frame { min-width: 0; }

.nav { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; color: #D9D6EA; background: linear-gradient(180deg, var(--indigo-2) 0%, var(--indigo-3) 100%); isolation: isolate; }
.nav::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 220px; background: var(--motif-losange) center/56px; opacity: .06; pointer-events: none; -webkit-mask-image: linear-gradient(180deg, #000 20%, transparent); mask-image: linear-gradient(180deg, #000 20%, transparent); }
[data-theme="sombre"] .nav::before { opacity: .08; }
.brand { display: flex; align-items: center; gap: 12px; padding: 22px 20px 16px; position: relative; }
.brand-mark { width: 42px; height: 42px; flex: none; display: grid; place-items: center; }
.brand-mark svg { width: 42px; height: 42px; filter: drop-shadow(0 6px 14px rgba(194, 73, 29, .45)); }
.brand-text { min-width: 0; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 17px; color: #fff; letter-spacing: -.01em; line-height: 1.1; }
.brand-sub { font-size: 11.5px; color: #B3B0CE; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav .nav-close { display: none; margin-left: auto; color: #fff; }
.nav .nav-close:hover { background: rgba(255,255,255,.1); }

.nav nav { padding: 4px 12px 12px; flex: 1; overflow: auto; position: relative; }
.nav nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; min-height: 38px; border-radius: 11px; color: #C4C1DC; margin-bottom: 2px; font-weight: 500; font-size: 14.5px; position: relative; transition: background .15s, color .15s; }
.nav nav a span:first-of-type { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav nav a svg { width: 18px; height: 18px; flex: none; opacity: .8; }
.nav nav a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.nav nav a.active { background: rgba(251, 247, 238, .1); color: #fff; font-weight: 600; }
.nav nav a.active svg { opacity: 1; color: #F2A27A; }
.nav nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--terracotta); }
.nav-group { display: flex; align-items: center; gap: 8px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: #ADAAD0; padding: 18px 12px 6px; font-weight: 700; line-height: 1.2; }
.nav-group .pastille { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.nav-group.marque-gwr { color: #F0A57C; }
.nav-group.marque-gkm { color: #8FB7EE; }
.nav-group.marque-gks { color: #B8B0E8; }
.nav-foot { padding: 12px 16px 14px; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 8px; }
.nav-foot .etat { font-size: 11.5px; color: #B3B0CE; display: flex; align-items: center; gap: 8px; padding: 0 4px; }
.nav-foot .dot { width: 8px; height: 8px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 0 3px rgba(74,222,128,.18); flex: none; }
.nav-foot .dot.off { background: #F5B14B; box-shadow: 0 0 0 3px rgba(245,177,75,.18); }
.theme-btn { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 36px; padding: 7px 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: #D9D6EA; font-size: 13px; font-weight: 600; transition: background .12s; }
.theme-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.theme-btn svg { width: 16px; height: 16px; flex: none; }
.badge { display: inline-flex; min-width: 20px; height: 20px; padding: 0 7px; border-radius: 999px; background: var(--terracotta); color: #fff; font-size: 11px; font-weight: 700; align-items: center; justify-content: center; margin-left: auto; line-height: 1; flex: none; }

/* ----- Barre haute ----- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; height: var(--h-topbar); padding: 12px 36px; background: rgba(251, 247, 238, .82); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--sable); }
[data-theme="sombre"] .topbar { background: var(--ivoire); backdrop-filter: none; }
.topbar .search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 10px; background: var(--carte); border: 1px solid var(--sable-2); border-radius: 13px; padding: 7px 12px; box-shadow: var(--ombre); transition: box-shadow .15s, border-color .15s; cursor: text; }
.topbar .search:focus-within { border-color: var(--terracotta); box-shadow: var(--anneau); }
.topbar .search svg { width: 17px; height: 17px; color: var(--encre-3); flex: none; }
.topbar .search input { border: 0; outline: 0; background: transparent; width: 100%; font-size: 14px; min-width: 0; min-height: 32px; }
.topbar .search input::placeholder { color: var(--encre-3); }
kbd { font: 500 11px/1 var(--font); color: var(--encre-3); border: 1px solid var(--sable-2); border-bottom-width: 2px; border-radius: 6px; padding: 3px 6px; background: var(--ivoire-2); white-space: nowrap; }
.topbar .spacer { flex: 1; }
.topbar .date { color: var(--encre-2); font-size: 13px; font-weight: 600; white-space: nowrap; }
.topbar .date::first-letter { text-transform: uppercase; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent; color: var(--encre-2); flex: none; }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { background: var(--ivoire-2); }
.burger { display: none; }

/* ----- Contenu ----- */
.main { padding: 28px 36px 80px; max-width: 1320px; }
.page { animation: entree .22s ease-out both; }
@keyframes entree { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .sub { margin-top: 6px; color: var(--encre-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--encre-2); margin-bottom: 8px; }
.eyebrow svg { width: 15px; height: 15px; }
.eyebrow:hover { color: var(--terracotta-txt); text-decoration: none; }

.card { background: var(--carte); border: 1px solid var(--sable); border-radius: var(--r); padding: 20px 22px; margin-bottom: 18px; box-shadow: var(--ombre); }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h2 { flex: 1; min-width: 0; }
.card-head .astuce { display: inline-flex; gap: 4px; align-items: center; color: var(--encre-3); font-size: 11.5px; }
.card-head .count { font: 600 12px var(--font); color: var(--encre-2); background: var(--ivoire-2); padding: 3px 9px; border-radius: 999px; flex: none; }
.card-head .count.alert { color: var(--rouge); background: var(--rouge-soft); }
.card-head .count.warm { color: var(--terracotta-txt); background: var(--terracotta-soft); }
.card.soft { background: var(--ivoire-2); border-color: transparent; box-shadow: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 18px; }
.col { min-width: 0; }
/* Une carte placée dans une grille ne porte pas de marge : la grille a son gap. */
.grid-2 > .card, .grid-3 > .card, .grid-6 > .card, .objectifs > .card { margin-bottom: 0; }
.col > .card:last-child { margin-bottom: 0; }

/* ----- Repli de bloc ----- */
.chevron { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; border: 0; background: transparent; color: var(--encre-2); flex: none; }
.chevron:hover { background: var(--ivoire-2); }
.chevron svg { width: 18px; height: 18px; transition: transform .15s ease-out; }
.chevron[aria-expanded="false"] svg { transform: rotate(-90deg); }

/* ----- Boutons ----- */
.btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--sable-2); background: var(--carte); color: var(--encre); padding: 9px 15px; min-height: 38px; border-radius: 11px; font-weight: 600; font-size: 13.5px; line-height: 1.2; box-shadow: 0 1px 1px rgba(63,43,20,.05); transition: background .12s, border-color .12s, transform .08s, box-shadow .12s; white-space: nowrap; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:hover { background: var(--ivoire-2); border-color: var(--encre-3); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--terracotta); color: #fff; border-color: var(--terracotta); box-shadow: 0 8px 18px -10px rgba(194,73,29,.7); }
.btn.primary:hover { background: var(--terracotta-2); border-color: var(--terracotta-2); }
.btn.indigo { background: var(--indigo-plein); color: #fff; border-color: var(--indigo-plein); }
.btn.indigo:hover { background: var(--indigo-2); border-color: var(--indigo-2); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--encre-2); }
.btn.ghost:hover { background: var(--ivoire-2); border-color: transparent; }
.btn.small { padding: 5px 11px; min-height: 32px; font-size: 12.5px; border-radius: 9px; }
.btn.danger { color: var(--rouge); border-color: var(--rouge); }
.btn.danger:hover { background: var(--rouge-soft); border-color: var(--rouge); }
.btn.ghost.danger { border-color: transparent; }
.btn.ghost.danger:hover { border-color: var(--rouge); }
/* Bouton désactivé : jamais d'opacité, le texte doit rester lisible. */
.btn[disabled] { background: var(--ivoire-2); color: var(--encre-3); border-color: var(--sable-2); box-shadow: none; cursor: not-allowed; }
.btn[disabled]:hover { background: var(--ivoire-2); border-color: var(--sable-2); }
.btn kbd { margin-left: 2px; }
.bascule { display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--ivoire-2); border: 1px solid var(--sable); }
.bascule button { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 11px; border: 0; border-radius: 8px; background: transparent; color: var(--encre-2); font-size: 12.5px; font-weight: 600; }
.bascule button svg { width: 15px; height: 15px; }
.bascule button[aria-pressed="true"] { background: var(--carte); color: var(--encre); box-shadow: var(--ombre); }

/* ----- Pastilles ----- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; min-height: 22px; border-radius: 999px; font-size: 11.5px; font-weight: 600; border: 1px solid var(--sable); background: var(--ivoire-2); color: var(--encre-2); white-space: nowrap; line-height: 1.3; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; flex: none; }
.pill.plain::before { display: none; }
/* Le point porte la teinte de charte de la marque ; le texte garde sa version lisible. */
.pill.gwr { border-color: transparent; color: var(--gwr-txt); background: var(--gwr-soft); }
.pill.gkm { border-color: transparent; color: var(--gkm-txt); background: var(--gkm-soft); }
.pill.gks { border-color: transparent; color: var(--gks-txt); background: var(--gks-soft); }
.pill.gwr::before { background: var(--gwr); opacity: 1; }
.pill.gkm::before { background: var(--gkm); opacity: 1; }
.pill.gks::before { background: var(--gks); opacity: 1; }
.pill.today::before { background: var(--or); opacity: 1; }
.pill.commun { border-color: transparent; color: var(--encre-2); background: var(--ivoire-2); }
.pill.retard { border-color: transparent; color: var(--rouge); background: var(--rouge-soft); }
.pill.today { border-color: transparent; color: var(--or-txt); background: var(--or-soft); }
.pill.ok { border-color: transparent; color: var(--vert); background: var(--vert-soft); }
.pill.warm { border-color: transparent; color: var(--terracotta-txt); background: var(--terracotta-soft); }
.pill.indigo { border-color: transparent; color: var(--indigo); background: var(--indigo-soft); }
/* Statut à zéro : style « éteint » explicite, jamais d'opacité (contraste AA). */
.pill.muted { color: var(--encre-3); background: var(--ivoire-2); border: 1px dashed var(--sable-2); }
/* Variante cliquable : c'est un bouton de filtre, la cible doit faire 32 px de haut (brief). */
.pill.click { cursor: pointer; transition: box-shadow .1s; min-height: 32px; padding: 6px 12px; }
.pill.click:hover { box-shadow: 0 0 0 2px var(--sable-2); }
.pill.click.on { background: var(--indigo-plein); color: #fff; border-color: var(--indigo-plein); border-style: solid; }
.pill.click.on::before { background: #fff; }
.pill strong { font-weight: 800; }

.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; font: 700 12.5px var(--display); letter-spacing: .02em; color: var(--indigo); background: var(--indigo-soft); flex: none; text-transform: uppercase; }
.avatar.gwr { color: var(--gwr-txt); background: var(--gwr-soft); }
.avatar.gkm { color: var(--gkm-txt); background: var(--gkm-soft); }
.avatar.gks { color: var(--gks-txt); background: var(--gks-soft); }
.avatar.lg { width: 64px; height: 64px; border-radius: 20px; font-size: 22px; }
.avatar.sm { width: 28px; height: 28px; border-radius: 9px; font-size: 10.5px; }

/* ----- Salutation ----- */
.hero { position: relative; overflow: hidden; border-radius: var(--r-lg); background: linear-gradient(120deg, var(--hero-a), var(--hero-b) 60%, var(--hero-c)); color: #fff; padding: 28px 32px; margin-bottom: 18px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; box-shadow: var(--ombre-lg); isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; background: var(--motif-losange) center/56px; opacity: .07; pointer-events: none; }
.hero::after { content: ""; position: absolute; right: -80px; top: -120px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgba(201,150,46,.35), transparent 65%); pointer-events: none; }
.hero > * { position: relative; }
.hero .salut { font-family: var(--display); font-size: 34px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin: 0; color: #fff; }
.hero .salut em { font-style: normal; color: #F5B58F; }
.hero .ligne { margin: 10px 0 0; font-size: 15px; color: #DDDAEC; max-width: 60ch; }
.hero .ligne strong { color: #fff; font-weight: 700; }
.hero .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hero .chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; min-height: 34px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: #fff; font-weight: 600; font-size: 13px; transition: background .12s; }
.hero .chip:hover { background: rgba(255,255,255,.2); text-decoration: none; }
.hero .chip svg { width: 15px; height: 15px; }
.hero .chip.warm { background: rgba(194,73,29,.9); border-color: transparent; }
.hero .chip.warm:hover { background: var(--terracotta); }
.hero .illu { width: 250px; height: 150px; }
.hero .illu svg { width: 100%; height: 100%; display: block; }

/* ----- Activité sur 14 jours ----- */
.activite { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.activite .barres { display: flex; align-items: flex-end; gap: 5px; height: 40px; flex: 1; min-width: 220px; }
.activite .barres span { flex: 1; background: var(--terracotta); border-radius: 3px 3px 0 0; min-height: 3px; display: block; }
.activite .barres span.zero { background: var(--sable); }
.activite .barres span.jour { background: var(--indigo-plein); }
.activite .reperes { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--encre-3); margin-top: 6px; }
.activite .legende-act { font-size: 12.5px; color: var(--encre-2); }
.activite .legende-act strong { font-family: var(--display); font-size: 19px; color: var(--encre); display: block; line-height: 1.2; }

/* ----- Objectifs (anneaux) ----- */
.objectifs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.objectif { display: flex; gap: 16px; align-items: center; padding: 16px 18px; color: inherit; transition: transform .15s, box-shadow .15s; }
a.objectif:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--ombre-2); }
.objectif .ring { width: 64px; height: 64px; flex: none; position: relative; }
.objectif .ring svg { width: 64px; height: 64px; transform: rotate(-90deg); }
.objectif .ring .v { position: absolute; inset: 0; display: grid; place-items: center; font: 700 15px var(--display); color: var(--encre); }
.objectif .t { font-weight: 700; font-family: var(--display); font-size: 15px; line-height: 1.3; }
.objectif .d { color: var(--encre-2); font-size: 12.5px; margin-top: 2px; }
.objectif .d a { font-weight: 600; }

/* ----- Tuiles chiffrées ----- */
.stat { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 14px; margin: 0; overflow: hidden; color: inherit; transition: transform .15s, box-shadow .15s; }
.stat:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--ombre-2); }
.stat .top { display: flex; align-items: flex-start; gap: 10px; }
.stat .ic { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--indigo-soft); color: var(--indigo); }
.stat .ic svg { width: 16px; height: 16px; }
.stat.gwr .ic { background: var(--gwr-soft); color: var(--gwr-txt); }
.stat.gkm .ic { background: var(--gkm-soft); color: var(--gkm-txt); }
.stat.gks .ic { background: var(--gks-soft); color: var(--gks-txt); }
.stat .l { font-size: 12.5px; color: var(--encre-2); font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stat .n { font-family: var(--display); font-size: 30px; font-weight: 700; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .n small { font: 600 12px var(--font); color: var(--encre-3); margin-left: 6px; letter-spacing: 0; }
.stat::after { content: ""; position: absolute; right: -14px; bottom: -22px; width: 70px; height: 70px; background: var(--motif-tisse) center/24px; opacity: var(--motif-opacite); -webkit-mask-image: radial-gradient(circle at 70% 70%, #000, transparent 70%); mask-image: radial-gradient(circle at 70% 70%, #000, transparent 70%); }

/* ----- Tableaux ----- */
/* Pas de conteneur de défilement au-dessus de 760 px : sinon les en-têtes collants ne collent plus. */
.table-wrap { margin: 0 -6px; padding: 0 6px; }
table.list { width: 100%; border-collapse: separate; border-spacing: 0; }
table.list th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--encre-3); font-weight: 700; line-height: 1.2; padding: 9px 12px; border-bottom: 1px solid var(--sable); background: var(--carte); position: sticky; top: var(--h-topbar); z-index: 2; white-space: nowrap; user-select: none; }
table.list th[data-sort] { cursor: pointer; }
table.list th[data-sort]:hover { color: var(--encre); }
table.list th[data-sort]::after { content: "↕"; margin-left: 5px; opacity: .5; font-size: 10px; }
table.list th[aria-sort="ascending"]::after { content: "↑"; opacity: 1; color: var(--terracotta-txt); }
table.list th[aria-sort="descending"]::after { content: "↓"; opacity: 1; color: var(--terracotta-txt); }
table.list td { padding: 12px; border-bottom: 1px solid var(--sable); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr[data-go] { cursor: pointer; transition: background .1s; }
table.list tr[data-go]:hover td, table.list tr.focus td { background: var(--surbrillance); }
table.list tr[data-go] td:first-child { border-left: 3px solid transparent; border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
table.list tr[data-go]:hover td:first-child, table.list tr.focus td:first-child { border-left-color: var(--terracotta); }
table.list tr.focus { outline: none; }
table.list tr.done td strong { color: var(--encre-2); text-decoration: line-through; }
table.list tr.done td .small { color: var(--encre-3); }
table.list .nom { display: flex; align-items: center; gap: 12px; min-width: 0; }
table.list .nom > div { min-width: 0; }
table.list .nom strong { display: block; font-weight: 600; }
table.list td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.list td.nowrap { white-space: nowrap; }
table.list td.large { min-width: 240px; }
.date-cell { display: inline-flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.liste-pied { display: flex; justify-content: center; padding-top: 14px; }
.check { appearance: none; position: relative; width: 22px; height: 22px; border: 2px solid var(--sable-2); border-radius: var(--r-xs); background: var(--carte); display: inline-grid; place-items: center; cursor: pointer; transition: background .12s, border-color .12s; vertical-align: middle; margin: 0; }
/* La case reste visuellement à 22 px, mais sa zone de clic fait 32 px (brief : cible ≥ 32 px). */
.check::before { content: ""; position: absolute; left: 50%; top: 50%; width: 32px; height: 32px; transform: translate(-50%, -50%); }
.check:hover { border-color: var(--vert); }
.check:checked { background: var(--vert); border-color: var(--vert); }
.check:checked::after { content: ""; width: 10px; height: 6px; border: 2.4px solid var(--carte); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.fait-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; border: 1.5px solid var(--sable-2); background: var(--carte); color: var(--vert); transition: background .12s, border-color .12s; }
.fait-btn:hover { background: var(--vert-soft); border-color: var(--vert); }
.fait-btn svg { width: 16px; height: 16px; }

/* ----- Kanban ----- */
.kanban { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 12px; scroll-snap-type: x proximity; }
.kanban .colonne { flex: none; width: 280px; background: var(--ivoire-2); border: 1px solid var(--sable); border-radius: var(--r); padding: 10px; scroll-snap-align: start; }
.kanban .colonne.survol { border-color: var(--terracotta); box-shadow: var(--anneau); }
.kanban .col-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--encre-3); }
.kanban .col-head .n { margin-left: auto; font-size: 11.5px; background: var(--carte); border: 1px solid var(--sable); border-radius: 999px; padding: 1px 8px; letter-spacing: 0; }
.kanban .k-carte { display: block; background: var(--carte); border: 1px solid var(--sable); border-radius: 12px; padding: 11px 12px; margin-bottom: 8px; color: inherit; cursor: grab; box-shadow: var(--ombre); }
.kanban .k-carte:hover { text-decoration: none; border-color: var(--sable-2); }
.kanban .k-carte.drag { opacity: .45; }
.kanban .k-carte .t { font-weight: 600; line-height: 1.3; }
.kanban .k-carte .s { font-size: 12px; color: var(--encre-2); margin-top: 3px; }
.kanban .k-carte .p { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; font-size: 11.5px; color: var(--encre-3); }
.kanban .plus { width: 100%; }
.kanban-bord { position: relative; }
.kanban-bord::after { content: ""; position: absolute; top: 0; bottom: 12px; right: 0; width: 28px; pointer-events: none; background: linear-gradient(90deg, transparent, var(--carte)); }

/* ----- États vides ----- */
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px 20px; text-align: center; color: var(--encre-2); border: 1.5px dashed var(--sable-2); border-radius: var(--r-sm); background: var(--ivoire-2) var(--motif-triangle) center/40px; font-size: 13.5px; position: relative; overflow: hidden; }
.empty::before { content: ""; position: absolute; inset: 0; background: var(--ivoire-2); opacity: .93; }
.empty > * { position: relative; }
.empty svg { width: 96px; height: 64px; }
.empty .t { font-weight: 600; color: var(--encre); }
.empty .btn { margin-top: 4px; }
.empty.compact { flex-direction: row; justify-content: center; padding: 18px; gap: 12px; text-align: left; }
.empty.compact svg { width: 54px; height: 36px; }

/* ----- Squelettes ----- */
.skel { border-radius: 10px; background: linear-gradient(90deg, var(--ivoire-2) 25%, var(--surbrillance) 50%, var(--ivoire-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.skel-page .skel { margin-bottom: 12px; }

/* ----- Formulaires ----- */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.form .full { grid-column: 1 / -1; }
.form h3 { grid-column: 1 / -1; margin: 10px 0 -4px; padding-top: 14px; border-top: 1px solid var(--sable); }
.form h3:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--encre-2); font-weight: 600; min-width: 0; }
.form label span { font-weight: 500; display: flex; align-items: center; gap: 8px; }
.form input, .form select, .form textarea, .input, select.input { padding: 10px 12px; min-height: 40px; border: 1px solid var(--sable-2); border-radius: var(--r-sm); background: var(--carte); color: var(--encre); font-weight: 400; font-size: 14px; transition: border-color .12s, box-shadow .12s; width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus, .input:focus { outline: 0; border-color: var(--terracotta); box-shadow: var(--anneau); }
.form textarea { min-height: 88px; resize: vertical; }
.form .row-actions { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }
.form.compact { grid-template-columns: repeat(4, 1fr); gap: 12px 14px; }
.form.compact .w2 { grid-column: span 2; }
.form.compact textarea { min-height: 44px; }
.form.compact .row-actions { grid-column: 4; align-items: flex-end; margin-top: 0; }
.form.compact .row-actions .btn { width: 100%; justify-content: center; min-height: 40px; }
.form input[type=checkbox] { width: 18px; height: 18px; min-height: 0; accent-color: var(--terracotta); }
select, input[type=date], input[type=time] { padding: 8px 10px; border: 1px solid var(--sable-2); border-radius: var(--r-sm); background: var(--carte); color: var(--encre); }
.filtres { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filtres .input { flex: 1; min-width: 200px; }
.filtres select.input { width: auto; min-width: 160px; flex: none; }
.filtres .compte { font-size: 12.5px; color: var(--encre-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.form-panel { animation: entree .2s ease-out; border-color: var(--terracotta-soft); box-shadow: 0 0 0 4px rgba(194,73,29,.06); }
.form-panel .card-head { margin-bottom: 18px; }
.inline-date { border: 1px solid var(--sable-2); border-radius: 8px; padding: 5px 8px; min-height: 32px; font-size: 12.5px; background: var(--carte); }

/* ----- Fiche ----- */
.fiche-head { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 20px; flex-wrap: wrap; }
.fiche-head .avatar { margin-top: 2px; }
.fiche-head .titre { flex: 1; min-width: 240px; }
.fiche-head .meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; color: var(--encre-2); font-size: 13px; }
.fiche-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.prochaine { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 18px; margin-bottom: 18px; border-radius: var(--r); background: var(--terracotta-soft); border: 1px solid var(--terracotta); }
.prochaine .ic { width: 38px; height: 38px; border-radius: 12px; background: var(--terracotta); color: #fff; display: grid; place-items: center; flex: none; }
.prochaine .ic svg { width: 19px; height: 19px; }
.prochaine .lab { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--terracotta-txt); }
.prochaine .txt { font-family: var(--display); font-weight: 600; font-size: 16px; color: var(--encre); }
.prochaine .when { text-align: right; font-weight: 600; font-size: 13px; color: var(--encre-2); }
.prochaine.calme { background: var(--ivoire-2); border-color: var(--sable); }
.prochaine.calme .ic { background: var(--indigo-plein); }
.prochaine.calme .lab { color: var(--indigo); }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 9px 14px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--encre-3); font-weight: 500; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.notes { white-space: pre-wrap; line-height: 1.6; background: var(--ivoire-2); padding: 12px 14px; border-radius: var(--r-sm); }

/* Historique en frise */
.frise { list-style: none; margin: 0; padding: 0; }
.frise li { display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 10px 0 14px; }
.frise li + li { border-top: 1px dashed var(--sable); }
.frise .d { font-size: 12.5px; color: var(--encre-3); font-variant-numeric: tabular-nums; padding-top: 2px; }
.frise .a { font-weight: 600; }
.frise .r { color: var(--encre-2); margin-top: 2px; }
.frise .c { font-size: 12px; color: var(--encre-3); margin-top: 4px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ----- Entonnoir candidats ----- */
.entonnoir { display: flex; gap: 4px; height: 44px; border-radius: 12px; overflow: hidden; margin-bottom: 12px; background: var(--ivoire-2); }
.entonnoir .seg { display: flex; align-items: center; justify-content: center; min-width: 32px; color: #fff; font-weight: 700; font-size: 13px; cursor: pointer; transition: filter .12s, opacity .12s; border: 0; padding: 0; }
.entonnoir .seg:hover { filter: brightness(1.12); }
.entonnoir .seg.dim { opacity: .35; }
.legende { display: flex; flex-wrap: wrap; gap: 6px; }

/* ----- Courrier ----- */
.mail { display: grid; grid-template-columns: 360px 1fr; gap: 18px; align-items: start; }
.mail-liste { padding: 8px; max-height: calc(100vh - 210px); overflow: auto; }
.mail-item { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 12px; min-height: 64px; border-radius: 12px; cursor: pointer; transition: background .1s; border: 1px solid transparent; }
.mail-item + .mail-item { margin-top: 2px; }
.mail-item:hover { background: var(--ivoire-2); }
.mail-item.active { background: var(--indigo-soft); border-color: var(--indigo); }
.mail-item .objet { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-item .qui { font-size: 12.5px; color: var(--encre-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-item .top { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 11.5px; color: var(--encre-3); margin-bottom: 2px; }
.mail-item .body { min-width: 0; }
.lecteur { padding: 0; overflow: hidden; }
.lecteur-head { padding: 20px 22px 16px; border-bottom: 1px solid var(--sable); display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.lecteur-head .titre { flex: 1; min-width: 220px; }
.lecteur-head h2 { font-size: 19px; }
.lecteur-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.lecteur-meta { display: flex; gap: 12px; align-items: center; margin-top: 8px; font-size: 13px; color: var(--encre-2); flex-wrap: wrap; }
.preview { background: var(--ivoire-2); padding: 14px; }
.preview iframe { width: 100%; height: calc(100vh - 360px); min-height: 420px; border: 0; background: #fff; border-radius: 10px; box-shadow: var(--ombre); display: block; }
.onglets { display: inline-flex; gap: 2px; padding: 4px; border-radius: 12px; background: var(--ivoire-2); }
.onglets a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; min-height: 34px; border-radius: 9px; font-weight: 600; color: var(--encre-2); font-size: 13.5px; }
.onglets a:hover { text-decoration: none; color: var(--encre); }
.onglets a.on { background: var(--carte); color: var(--encre); box-shadow: var(--ombre); }
.onglets .n { font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: var(--sable); color: var(--encre-2); }
.onglets a.on .n { background: var(--terracotta); color: #fff; }
.marques-sw { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.marques-sw a { padding: 6px 12px; min-height: 32px; display: inline-flex; align-items: center; border-radius: 999px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--sable-2); color: var(--encre-2); }
.marques-sw a.on { background: var(--indigo-plein); border-color: var(--indigo-plein); color: #fff; }
.marques-sw a:hover { text-decoration: none; }
/* Compositeur de courrier */
.compositeur .vars { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.compositeur .vars label.manque input { border-color: var(--or-bord); background: var(--or-soft); }

/* ----- Markdown rendu ----- */
.doc { font-size: 13.5px; line-height: 1.6; background: var(--ivoire-2); border: 1px solid var(--sable); border-radius: var(--r-sm); padding: 14px 16px; max-height: 520px; overflow: auto; overflow-wrap: anywhere; }
.doc > *:first-child { margin-top: 0; }
.doc h2 { font-family: var(--display); font-size: 17px; font-weight: 700; margin: 18px 0 8px; }
.doc h3 { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--encre-3); margin: 16px 0 6px; }
.doc h4 { font-size: 13.5px; font-weight: 700; color: var(--encre); margin: 14px 0 4px; }
.doc p { margin: 0 0 8px; }
.doc ul, .doc ol { margin: 0 0 10px; padding-left: 22px; }
.doc li { margin-bottom: 3px; }
.doc blockquote { margin: 8px 0; padding: 4px 0 4px 12px; border-left: 3px solid var(--terracotta); color: var(--encre-2); }
.doc hr { border: 0; border-top: 1px solid var(--sable); margin: 14px 0; }
.doc code { background: var(--carte); }
.journal-bloc { border: 1px solid var(--sable); border-radius: var(--r-sm); margin-bottom: 10px; overflow: hidden; }
.journal-bloc > summary { cursor: pointer; padding: 10px 14px; font-weight: 600; font-size: 13px; background: var(--ivoire-2); list-style: none; display: flex; align-items: center; gap: 8px; min-height: 40px; }
.journal-bloc > summary::-webkit-details-marker { display: none; }
.journal-bloc > summary::before { content: "▸"; color: var(--encre-3); }
.journal-bloc[open] > summary::before { content: "▾"; }
.journal-bloc .doc { border: 0; border-radius: 0; background: var(--carte); max-height: none; }

.warn-box { display: flex; gap: 10px; align-items: flex-start; background: var(--or-soft); border: 1px solid var(--or-bord); color: var(--or-txt); border-radius: 12px; padding: 12px 14px; font-size: 13.5px; margin-bottom: 14px; }
[data-theme="sombre"] .warn-box { color: var(--encre); }
.warn-box svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.warn-box a { color: inherit; text-decoration: underline; }
.note-aide { font-size: 12.5px; color: var(--encre-2); background: var(--ivoire-2); border-radius: var(--r-sm); padding: 10px 12px; margin-top: 12px; }

/* ----- Boîte mail ----- */
.mail-brut { border: 1px solid var(--sable); border-radius: var(--r-sm); padding: 16px 18px; margin-bottom: 12px; background: var(--carte); }

/* ----- Toast ----- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; background: var(--indigo-2); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 13.5px; font-weight: 600; box-shadow: var(--ombre-lg); z-index: 90; animation: monte .22s ease-out; max-width: calc(100vw - 32px); }
.toast::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #4ADE80; flex: none; }
.toast.err { background: var(--rouge); color: #fff; }
[data-theme="sombre"] .toast.err { color: #2A0B08; }
.toast.err::before { background: currentColor; }
@keyframes monte { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ----- Palette et aide-mémoire ----- */
.surcouche { position: fixed; inset: 0; z-index: 100; background: rgba(10, 12, 26, .5); backdrop-filter: blur(3px); display: grid; place-items: start center; padding: 12vh 16px 16px; animation: fondu .15s ease-out; }
@keyframes fondu { from { opacity: 0; } to { opacity: 1; } }
.palette-box { width: min(620px, 100%); background: var(--carte); border-radius: 18px; box-shadow: var(--ombre-lg); overflow: hidden; border: 1px solid var(--sable); }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--sable); }
.palette-input svg { width: 18px; height: 18px; color: var(--encre-3); flex: none; }
.palette-input h2 { flex: 1; }
.palette-input input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 16px; min-width: 0; }
.palette-list { max-height: 50vh; overflow: auto; padding: 8px; }
.palette-list .grp { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--encre-3); font-weight: 700; padding: 10px 10px 4px; }
.palette-list .it { display: flex; align-items: center; gap: 12px; padding: 9px 10px; min-height: 36px; border-radius: 10px; cursor: pointer; color: var(--encre); }
.palette-list .it .sub { color: var(--encre-3); font-size: 12.5px; margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.palette-list .it.sel, .palette-list .it:hover { background: var(--ivoire-2); }
.palette-list .it svg { width: 16px; height: 16px; color: var(--encre-3); flex: none; }
.palette-list .vide { padding: 22px; text-align: center; color: var(--encre-2); }
.aide-liste { padding: 12px 16px 18px; display: grid; gap: 10px; }
.aide-liste > div { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.aide-liste span { margin-left: auto; color: var(--encre-2); text-align: right; }

/* ----- Points de rupture ----- */
@media (max-width: 1280px) { .grid-6 { grid-template-columns: repeat(3, 1fr); } .mail { grid-template-columns: 320px 1fr; } }
/* 1024 px est une cible de recette : le tableau doit y tenir sans défilement horizontal caché.
   On y réduit la densité (gouttières et largeur mini) et on autorise le retour à la ligne. */
@media (max-width: 1200px) {
  table.list th, table.list td { padding-left: 9px; padding-right: 9px; }
  table.list td.large { min-width: 160px; }
  table.list td.num, table.list td.nowrap { white-space: normal; }
  table.list td { overflow-wrap: anywhere; }
}
@media (max-width: 1080px) {
  .grid-2 { grid-template-columns: 1fr; }
  .objectifs { grid-template-columns: 1fr; }
  .hero .illu { display: none; }
  .hero { grid-template-columns: 1fr; }
  .mail { grid-template-columns: 1fr; }
  .mail-liste { max-height: 320px; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .nav { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); z-index: 110; transform: translateX(-102%); transition: transform .22s ease-out; }
  .nav.open { transform: none; box-shadow: var(--ombre-lg); }
  .nav .nav-close { display: inline-grid; }
  .topbar .spacer { flex: 1; }
  .topbar .search { max-width: none; }
  .objectif { padding: 12px 14px; }
  .stat .n { font-size: 26px; }
  .drawer-backdrop { position: fixed; inset: 0; z-index: 105; background: rgba(10,12,26,.5); }
  .burger { display: inline-grid; }
  .main, .topbar { padding-left: 16px; padding-right: 16px; }
  .main { padding-top: 18px; padding-bottom: 64px; }
  .topbar .date { display: none; }
  .hide-sm { display: none; }
  h1 { font-size: 26px; }
  .hero { padding: 22px 20px; }
  .hero .salut { font-size: 26px; }
  .grid-3, .grid-6 { grid-template-columns: repeat(2, 1fr); }
  .form, .form.compact, .compositeur .vars { grid-template-columns: 1fr; }
  .form.compact .w2, .form.compact .row-actions { grid-column: 1; }
  .kv { grid-template-columns: 110px 1fr; }
  .card { padding: 16px; }
  .frise li { grid-template-columns: 1fr; gap: 4px; }
  .fiche-head .actions { width: 100%; }
  .prochaine { grid-template-columns: auto 1fr; }
  .prochaine .when { grid-column: 2; text-align: left; }
}
/* ≤ 760 px : les tableaux deviennent des cartes empilées. */
@media (max-width: 760px) {
  .table-wrap { overflow-x: auto; }
  table.list, table.list thead, table.list tbody, table.list tr, table.list td { display: block; }
  table.list thead { display: none; }
  table.list tr { border: 1px solid var(--sable); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: var(--carte); }
  table.list tr[data-go]:hover, table.list tr.focus { background: var(--surbrillance); border-color: var(--terracotta); }
  table.list td { border: 0; padding: 4px 0; display: flex; gap: 10px; align-items: baseline; justify-content: space-between; white-space: normal; }
  table.list td.nul { display: none; }
  table.list td::before { content: attr(data-label); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--encre-3); font-weight: 700; flex: none; padding-top: 2px; }
  table.list td[data-label=""]::before { display: none; }
  table.list td.num, table.list td.nowrap { white-space: normal; }
  table.list td > .cel { flex: 1 1 auto; min-width: 0; text-align: right; }
  table.list td.tete { display: block; padding-bottom: 8px; }
  table.list td.tete::before { display: none; }
  table.list td.tete > .cel { text-align: left; }
  table.list tr[data-go] td:first-child { border-left: 0; }
  table.list td.large { min-width: 0; }
  .objectifs { gap: 0; }
  .objectifs .objectif { border-radius: 0; border-bottom-width: 0; margin: 0; box-shadow: none; padding: 12px 16px; }
  .objectifs .objectif:first-child { border-radius: var(--r) var(--r) 0 0; }
  .objectifs .objectif:last-child { border-radius: 0 0 var(--r) var(--r); border-bottom-width: 1px; box-shadow: var(--ombre); }
  .objectifs .ring, .objectifs .ring svg { width: 44px; height: 44px; }
  .objectifs .ring .v { font-size: 12px; }
  a.objectif:hover { transform: none; box-shadow: none; }
  .lecteur-head { padding: 16px; }
  .preview { padding: 8px; }
  .preview iframe { height: 60vh; min-height: 320px; }
}
@media (max-width: 480px) {
  .grid-6 { grid-template-columns: 1fr 1fr; }
  .topbar .search kbd { display: none; }
  #btn-palette { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ----- Coffre-fort ----- */
.coffre-intro { max-width: 620px; }
.coffre-intro h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.coffre-intro h2 svg { width: 20px; height: 20px; color: var(--terracotta-txt); }
.coffre-noms { display: flex; flex-wrap: wrap; gap: 8px; }
.coffre-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.coffre-carte { margin-bottom: 0; }
.coffre-carte h2 { margin-bottom: 4px; }
.secret-ligne { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--sable); flex-wrap: wrap; }
.secret-ligne:first-of-type { margin-top: 10px; }
.secret-lab { width: 104px; flex: none; font-size: 12px; font-weight: 600; color: var(--encre-3); text-transform: uppercase; letter-spacing: .05em; }
.secret-val { flex: 1; min-width: 0; font-family: var(--mono); font-size: 13px; word-break: break-all; }
.secret-val.masque { letter-spacing: .12em; color: var(--encre-2); }
.secret-notes { margin-top: 10px; padding: 10px 12px; background: var(--ivoire-2); border-radius: var(--r-sm); color: var(--encre-2); }
.secret-saisie { display: flex; gap: 6px; align-items: center; }
.secret-saisie input { flex: 1; min-width: 0; }
@media (max-width: 760px) { .coffre-grille { grid-template-columns: 1fr; } .secret-lab { width: 100%; } }

/* ----- Accès : connexion et invitation ----- */
/* Plein écran indigo, comme le menu : on reconnaît le Hub avant même d'y entrer. */
.acces { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; background: linear-gradient(160deg, var(--hero-a) 0%, var(--hero-b) 55%, var(--hero-c) 100%); position: relative; isolation: isolate; }
.acces::before { content: ""; position: absolute; inset: 0; background: var(--motif-losange) center/56px; opacity: .07; z-index: -1; }
.acces-carte { width: 100%; max-width: 440px; background: var(--carte); color: var(--encre); border-radius: var(--r-lg); padding: 30px 30px 22px; box-shadow: var(--ombre-lg); }
.acces-marque { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.acces-marque svg { width: 40px; height: 40px; flex: none; }
.acces-nom { font: 700 18px/1.15 var(--display); color: var(--encre); }
.acces-sous { font-size: 12.5px; color: var(--encre-3); }
.acces-carte h1 { font-size: 26px; margin-bottom: 8px; }
.acces-carte > p { margin: 0 0 14px; }
.acces-carte .note-aide { margin: 0 0 6px; }
.acces-form { grid-template-columns: 1fr; margin: 18px 0 14px; }
.acces-form .row-actions .btn { width: 100%; justify-content: center; }
.acces-erreur { color: var(--rouge); background: var(--rouge-soft); border-radius: var(--r-sm); padding: 9px 12px; font-size: 13px; font-weight: 600; }
@media (max-width: 480px) { .acces-carte { padding: 24px 18px 18px; } }

/* ----- Compte connecté, en pied de menu ----- */
.moi { display: flex; align-items: center; gap: 4px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.08); }
.moi-lien { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 6px 8px; border-radius: 10px; color: #D9D6EA; }
.moi-lien:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.moi-lien .avatar { background: rgba(255,255,255,.12); color: #fff; }
.moi-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.moi-txt strong { font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.moi-txt small { font-size: 11.5px; color: #B3B0CE; }
.moi-sortie { color: #B3B0CE; }
.moi-sortie:hover { color: #fff; background: rgba(255,255,255,.08); }
.moi-sortie svg { width: 18px; height: 18px; }

/* ----- Équipe et mon compte ----- */
.lien-carte { border-color: var(--or-bord); background: var(--or-soft); }
.lien-ligne { display: flex; gap: 10px; align-items: center; }
.lien-ligne .input { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12.5px; }
.droits-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.droits-liste li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.droits-liste svg { width: 16px; height: 16px; flex: none; }
.droits-liste li.oui svg { color: var(--vert); }
.droits-liste li.non { color: var(--encre-3); }
@media (max-width: 600px) { .lien-ligne { flex-direction: column; align-items: stretch; } }
