/* DERON · Dashboard — habillage commun (barre du haut, Visual Board, planches, capture)
   Reprend exactement la palette de l'app de Romain. */
:root {
  --bg: #0D0D12;
  --surface: #16161F;
  --surface2: #1E1E2A;
  --line: #2A2A38;
  --text: #F3F3F8;
  --muted: #9797AC;
  --violet: #7C5CFF;
  --rs: #F45DAB;
  --prod: #f0a94a;
  --dev: #7C5CFF;
  --dev2: #4fd6e6;
  --green: #35D0BA;
  --red: #FF5A66;
  --yellow: #FFD400;
  --blue: #4DA3FF;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-text-size-adjust: 100%; }
body { touch-action: manipulation; }
button { font-family: inherit; }
a { color: inherit; }
#root { min-height: 100vh; }

/* ---------- Barre du haut ---------- */
.dx-bar {
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + var(--safe-top)) 20px 10px;
  background: var(--bg); border-bottom: 1px solid var(--line);
  position: relative; z-index: 25;
}
.dx-brand { font-weight: 700; letter-spacing: .14em; font-size: 12.5px; color: var(--text); text-decoration: none; white-space: nowrap; }
.dx-brand span { color: var(--muted); margin: 0 .35em; font-weight: 400; }
.dx-tabs { display: flex; gap: 6px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.dx-tabs::-webkit-scrollbar { display: none; }
.dx-tab {
  display: flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 6px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); font-size: 12.5px; font-weight: 600;
  text-decoration: none; letter-spacing: .03em;
}
.dx-tab i { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--violet)); flex-shrink: 0; }
.dx-tab:hover { color: var(--text); }
.dx-tab.active { color: var(--text); border-color: var(--c, var(--violet)); background: var(--surface2); }
.dx-tab-dev i { background: linear-gradient(135deg, var(--dev), var(--dev2)); }
.dx-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.dx-icon-btn {
  display: flex; align-items: center; gap: 6px; height: 34px; min-width: 34px; justify-content: center;
  padding: 0 9px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); font-size: 12.5px; cursor: pointer; text-decoration: none;
}
.dx-icon-btn:hover { color: var(--text); background: var(--surface2); }
.dx-icon-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.dx-kbd { font-size: 10.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.dx-sync { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex-shrink: 0; margin: 0 4px; transition: background .3s; }
.dx-sync.off { background: var(--prod); }

@media (max-width: 720px) {
  .dx-bar { flex-wrap: wrap; padding: calc(10px + var(--safe-top)) 14px 10px; row-gap: 10px; }
  .dx-bar .dx-brand { order: 1; flex: 1; }
  .dx-bar .dx-actions { order: 2; }
  .dx-bar .dx-tabs { order: 3; flex-basis: 100%; }
  .dx-tab { flex: 1 1 auto; justify-content: center; padding: 7px 6px; font-size: 12px; letter-spacing: .01em; gap: 6px; }
  .dx-hide-mobile { display: none !important; }
}

/* ---------- Modules du dashboard (Visual Board, Reconnect, Frise) ---------- */
.dx-modules { max-width: 680px; margin: 0 auto; padding: 14px 20px 0; display: flex; flex-direction: column; gap: 12px; transition: margin-left .18s ease; }
.dx-modules:empty { display: none; }
.dx-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 12px 14px;
}
.dx-card-head { display: flex; align-items: center; gap: 8px; }
.dx-collapse {
  background: var(--surface2); border: 1px solid var(--line); color: var(--muted); font-size: 11px;
  padding: 5px 7px; border-radius: 8px; cursor: pointer; transition: transform .15s; line-height: 1;
}
.dx-collapse.open { transform: rotate(90deg); }
.dx-card-title { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); flex: 1; }
.dx-mini-btn {
  display: flex; align-items: center; gap: 5px; background: var(--surface2); border: 1px solid var(--line);
  color: var(--muted); font-size: 11.5px; padding: 5px 9px; border-radius: 8px; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.dx-mini-btn:hover { color: var(--text); }
.dx-mini-btn svg { width: 13px; height: 13px; }
.dx-vision-frame-wrap { margin: 12px auto 2px; position: relative; border-radius: 14px; overflow: hidden; background: var(--surface2); }
.dx-vision-frame-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.dx-empty { color: var(--muted); font-size: 13px; padding: 16px 4px 6px; line-height: 1.5; }
.dx-empty button { margin-top: 10px; }
@media (max-width: 720px) { .dx-modules { padding: 12px 20px 0; gap: 10px; } }

/* ---------- Boutons / champs ---------- */
.dx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface2);
  color: var(--text); font-size: 14px; cursor: pointer; text-decoration: none; font-weight: 600;
}
.dx-btn:hover { border-color: #3a3a4c; }
.dx-btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.dx-btn-danger { color: var(--red); }
.dx-input, .dx-textarea {
  width: 100%; background: var(--surface2); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; color: var(--text); font-size: 14px; font-family: inherit; outline: none;
}
.dx-input:focus, .dx-textarea:focus { border-color: #45455a; }
.dx-textarea { resize: vertical; min-height: 70px; line-height: 1.45; }
@media (max-width: 720px) { .dx-input, .dx-textarea { font-size: 16px; } }
.dx-label { display: block; font-size: 11.5px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; font-weight: 700; margin: 18px 0 7px; }
.dx-help { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin: 6px 0 0; }
.dx-help b { color: var(--text); font-weight: 600; }

/* ---------- Modales / panneaux ---------- */
.dx-backdrop {
  position: fixed; inset: 0; background: rgba(4,4,8,.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: 10vh 16px 16px;
}
.dx-sheet {
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px; width: 100%; max-width: 520px;
  max-height: 80vh; overflow: auto; padding: 18px 18px 20px; box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.dx-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dx-sheet-title { font-size: 15px; font-weight: 700; }
@media (max-width: 720px) {
  .dx-backdrop { align-items: flex-end; padding: 0; }
  .dx-sheet { border-radius: 22px 22px 0 0; max-height: 88vh; padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
}

/* Recherche */
.dx-search-input { font-size: 16px; padding: 13px 14px; }
.dx-results { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.dx-result {
  display: flex; align-items: center; gap: 10px; padding: 10px 11px; border-radius: 11px; cursor: pointer;
  text-decoration: none; color: var(--text); font-size: 14px; border: 1px solid transparent;
}
.dx-result.sel, .dx-result:hover { background: var(--surface2); border-color: var(--line); }
.dx-result i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--muted)); flex-shrink: 0; }
.dx-result small { margin-left: auto; color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.dx-result-empty { color: var(--muted); font-size: 13px; padding: 12px 4px; }

/* Needs */
.dx-needs-group { margin-top: 14px; }
.dx-needs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.dx-need {
  display: flex; align-items: center; gap: 9px; padding: 12px; border-radius: 13px; background: var(--surface2);
  border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 13.5px; font-weight: 600; min-height: 48px;
}
.dx-need i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--violet)); flex-shrink: 0; }
.dx-need:hover { border-color: #3a3a4c; }
.dx-need.muted { color: var(--muted); font-weight: 500; }

/* Réglages : lignes de liens */
.dx-row { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.dx-row .dx-input { padding: 8px 10px; font-size: 13px; }
.dx-row .dx-input:first-child { flex: 0 0 38%; }
.dx-x { background: none; border: none; color: var(--muted); font-size: 18px; cursor: pointer; padding: 4px 6px; }
.dx-x:hover { color: var(--red); }
.dx-copy-row { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.dx-copy-row code { flex: 1; font-size: 12px; background: var(--surface2); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }

.dx-toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(20px);
  background: var(--text); color: var(--bg); font-size: 13px; font-weight: 600; padding: 10px 16px; border-radius: 12px;
  opacity: 0; transition: all .2s; z-index: 90; pointer-events: none;
}
.dx-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Connexion ---------- */
.dx-login-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: radial-gradient(circle at 15% 0%, #1a1a28 0%, var(--bg) 55%); }
.dx-login { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 12px; }
.dx-brand-lg { font-size: 15px; text-align: center; margin-bottom: 14px; }
.dx-login-msg { color: var(--muted); font-size: 14px; line-height: 1.55; text-align: center; }
.dx-login-msg code { color: var(--text); }
.dx-login-err { color: var(--red); font-size: 13px; margin: 0; text-align: center; }

/* ---------- Dashboard : cohabitation avec l'app ---------- */
body[data-page="dashboard"] { background: radial-gradient(circle at 15% 0%, #1a1a28 0%, var(--bg) 55%) fixed var(--bg); }
body[data-page="dashboard"] .ft-root { background: transparent; }
body[data-page="dashboard"] .dx-bar { background: transparent; }
/* les boutons fixes de l'app (planches à gauche, sauvegardes / notes / annuler à droite) */
body[data-page="dashboard"] .dx-bar { padding-left: 58px; padding-right: 146px; }

@media (max-width: 720px) {
  body[data-page="dashboard"] .dx-bar { padding-left: 52px; padding-right: 14px; min-height: 60px; }
  body[data-page="dashboard"] .dx-brand { display: none; }
  body[data-page="dashboard"] .dx-actions { order: 1; margin-right: auto; }
}

/* Reconnect */
.dx-rc-row { display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 8px; margin-top: 12px; }
.dx-rc-box { background: var(--surface2); border: 1px solid var(--line); border-radius: 14px; padding: 9px 10px 6px; min-width: 0; }
.dx-rc-box.main { border-color: rgba(255,90,102,.45); background: rgba(255,90,102,.06); }
.dx-rc-title { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.dx-rc-box.main .dx-rc-title { color: var(--red); }
.dx-rc-box textarea { width: 100%; background: transparent; border: 0; outline: none; resize: none; color: var(--text); font: 13px/1.45 var(--font); padding: 0; min-height: 56px; overflow: hidden; }
.dx-rc-box textarea::placeholder { color: #5b5b70; }
@media (max-width: 720px) {
  .dx-rc-row { grid-template-columns: 1fr 1fr; }
  .dx-rc-box.main { grid-column: 1 / -1; order: -1; }
  .dx-rc-box textarea { font-size: 16px; }
}

/* Frise 2026 → 2030 */
.dx-fr-sub { color: var(--muted); font-size: 12px; margin: 6px 0 10px; }
.dx-fr-scroll { position: relative; display: flex; gap: 8px; overflow: auto; height: min(56vh, 460px); border-radius: 12px; overscroll-behavior: contain; scroll-snap-type: x proximity; padding-bottom: 4px; }
.dx-fr-month { flex: 0 0 158px; background: var(--surface2); border: 1px solid var(--line); border-radius: 12px; scroll-snap-align: start; height: max-content; min-height: 100%; }
.dx-fr-month.current { border-color: rgba(124,92,255,.6); }
.dx-fr-title { position: sticky; top: 0; background: var(--surface2); border-radius: 12px 12px 0 0; padding: 8px 10px 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); z-index: 1; }
.dx-fr-month.current .dx-fr-title { color: #a996ff; }
.dx-fr-days { min-height: 200px; }
.dx-fr-day { display: flex; align-items: center; gap: 6px; padding: 0 8px; border-bottom: 1px solid rgba(255,255,255,.035); height: 26px; }
.dx-fr-day span { width: 18px; text-align: right; font-size: 10.5px; color: #6b6b80; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.dx-fr-day.we span { color: #8a8aa0; }
.dx-fr-day.today { background: rgba(124,92,255,.14); }
.dx-fr-day.today span { color: #c8bbff; font-weight: 700; }
.dx-fr-day input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--text); font: 12px var(--font); padding: 0; }
.dx-fr-day input::placeholder { color: transparent; }
.dx-fr-day input:focus::placeholder { color: #5b5b70; }
@media (max-width: 720px) { .dx-fr-month { flex-basis: 70%; } .dx-fr-day { height: 32px; } .dx-fr-day input { font-size: 16px; } }

/* ---------- « Une remarque ? » ---------- */
.dx-remark-btn { color: #9fe8dc; border-color: rgba(53,208,186,.35); }
.dx-remark-btn:hover { color: #c9fff5; }
.dx-fb-backdrop { z-index: 80; }
.dx-fb-where { margin: 4px 0 12px; font-size: 12px; }
.dx-fb-modes { display: flex; gap: 6px; margin-bottom: 10px; }
.dx-fb-modes button {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 8px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface2); color: var(--muted); font-size: 13.5px; font-weight: 600; cursor: pointer;
}
.dx-fb-modes button svg { width: 17px; height: 17px; }
.dx-fb-modes button.on { color: var(--text); border-color: var(--green); background: rgba(53,208,186,.1); }
.dx-fb-modes button.live { color: var(--red); border-color: var(--red); animation: dxPulse 1.2s infinite; }
@keyframes dxPulse { 50% { box-shadow: 0 0 0 4px rgba(255,90,102,.18); } }
.dx-fb-text { min-height: 120px; }
.dx-fb-rec { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--surface2); border: 1px solid var(--line); border-radius: 14px; }
.dx-fb-recbtn { width: 58px; height: 58px; border-radius: 50%; border: 2px solid var(--red); background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.dx-fb-recbtn span { width: 24px; height: 24px; border-radius: 50%; background: var(--red); transition: all .2s; }
.dx-fb-recbtn.live span { border-radius: 5px; width: 20px; height: 20px; }
.dx-fb-recbtn.live { animation: dxPulse 1.2s infinite; }
.dx-fb-rec-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dx-fb-rec-info b { font-size: 14.5px; }
.dx-fb-rec-info small { color: var(--muted); font-size: 12.5px; }
.dx-fb-pane audio { width: 100%; margin-top: 10px; }
.dx-fb-extra { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.dx-fb-shot, .dx-fb-photo { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); cursor: pointer; }
.dx-fb-shot input { width: 18px; height: 18px; accent-color: var(--green); flex-shrink: 0; }
.dx-fb-thumb { width: 44px; height: 30px; border-radius: 6px; background: var(--surface2) center/cover no-repeat; border: 1px solid var(--line); flex-shrink: 0; font-size: 9px; display: flex; align-items: center; justify-content: center; color: #6b6b80; }
.dx-fb-photo span { border: 1px dashed var(--line); border-radius: 10px; padding: 8px 12px; }
.dx-fb-actions { display: flex; gap: 8px; margin-top: 16px; }
.dx-fb-note { font-size: 11.5px; color: #6b6b80; margin: 10px 0 0; line-height: 1.45; }
.dx-fb-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 26px 10px 10px; }
.dx-fb-done small { color: var(--muted); }
.dx-fb-check { width: 54px; height: 54px; border-radius: 50%; background: rgba(53,208,186,.15); color: var(--green); font-size: 26px; display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }

/* ---------- Téléphone / iPad portrait : barre d'onglets en bas (V1.2) ---------- */
.dx-tabbar { display: none; }
@media (max-width: 900px) {
  .dx-tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 28;
    background: rgba(13,13,18,0.96); border-top: 1px solid var(--line);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .dx-tabbar a, .dx-tabbar button {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    min-height: 46px; color: var(--muted); text-decoration: none; font: 600 10.5px var(--font); letter-spacing: .04em;
    background: none; border: 0; border-radius: 12px; -webkit-tap-highlight-color: transparent;
  }
  .dx-tabbar i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); margin: 4px 0 2px; }
  .dx-tabbar .dx-tab-dev i { background: linear-gradient(135deg, var(--dev), var(--dev2)); }
  .dx-tabbar svg { width: 19px; height: 19px; }
  .dx-tabbar a.on { color: var(--text); background: var(--surface2); }
  .dx-tabbar .dx-tab-remark { color: #9fe8dc; }
  .dx-tabbar a:active, .dx-tabbar button:active { transform: scale(.96); }
  /* en haut, on garde recherche / needs / réglages ; les onglets et « Remarque » passent en bas */
  .dx-bar .dx-tabs, .dx-bar .dx-remark-btn { display: none; }
  body.dx-has-tabbar { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  body.dx-has-tabbar .dx-toast { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
}
/* barre du haut plus étroite (petit écran d'ordi ou barre de notes ouverte) : icônes seules */
@media (min-width: 721px) and (max-width: 1180px) { .dx-bar .dx-icon-btn span, .dx-bar .dx-kbd { display: none; } }
.dx-bar.dx-compact .dx-icon-btn span, .dx-bar.dx-compact .dx-kbd { display: none; }
/* titres de modules sur une ligne sur petit téléphone */
@media (max-width: 400px) { .dx-card-title { letter-spacing: .08em; font-size: 11.5px; } .dx-mini-btn { padding: 5px 7px; } }

/* ---------- V1.3 : navigation téléphone ---------- */
html { background: var(--bg); }
.dx-back { display: none; }
@media (max-width: 900px) {
  /* barre du haut toujours visible en défilant, comme une app */
  .dx-bar { position: sticky; top: 0; background: rgba(13,13,18,0.97); z-index: 30; }
  body[data-page="dashboard"] .dx-bar { background: rgba(13,13,18,0.97); }
  .dx-back { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin: 0 2px 0 -6px; border-radius: 10px; color: var(--text); flex-shrink: 0; }
  .dx-back svg { width: 20px; height: 20px; }
  .dx-back:active { background: var(--surface2); }
  /* barre d'onglets : opaque et au-dessus du contenu (sur Safari, le texte passait à travers) */
  .dx-tabbar { background: #0D0D12; z-index: 44; isolation: isolate; transform: translateZ(0); box-shadow: 0 -8px 24px rgba(0,0,0,.35); }
  /* réglages : champ nom au-dessus du lien, plus rien de coupé */
  .dx-row { flex-wrap: wrap; }
  .dx-row .dx-input:first-child { flex: 1 1 100%; }
  .dx-row .dx-input + .dx-input { flex: 1; }
  /* feuilles : poignée visuelle et fermeture confortable */
  .dx-sheet { padding-top: 22px; position: relative; }
  .dx-sheet::before { content: ""; position: absolute; top: 8px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 4px; background: #3a3a4c; }
  .dx-x { min-width: 40px; min-height: 40px; font-size: 22px; border-radius: 12px; background: var(--surface2); display: inline-flex; align-items: center; justify-content: center; }
}
@media (max-width: 720px) { .dx-bar { padding-top: calc(10px + env(safe-area-inset-top, 0px)); } }

/* Conseil « Ajouter à l'écran d'accueil » (Safari iPhone, une seule fois) */
.dx-a2hs { position: fixed; left: 10px; right: 10px; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 43;
  background: #1E1E2A; border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: flex; gap: 12px; align-items: center;
  box-shadow: 0 12px 30px rgba(0,0,0,.45); font-size: 13px; line-height: 1.45; color: var(--text); }
.dx-a2hs img { width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; }
.dx-a2hs b { font-weight: 700; }
.dx-a2hs button { background: none; border: 0; color: var(--muted); font-size: 22px; padding: 4px 6px; margin-left: auto; }

/* Croix de fermeture flottante des fenêtres de l'app */
.dx-layer-x { position: fixed; z-index: 47; width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface2); color: var(--text); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.dx-layer-x[hidden] { display: none; }
.dx-layer-x svg { width: 18px; height: 18px; }
.dx-layer-x:active { transform: scale(.94); }
/* petits écrans : titres de modules sur une ligne, boutons compacts */
.dx-card-head { min-width: 0; }
.dx-card-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 400px) {
  .dx-card-title { letter-spacing: .06em; font-size: 11px; }
  .dx-mini-btn { font-size: 11px; }
  #dx-vision .dx-mini-btn[data-act="edit"] { font-size: 0; gap: 0; padding: 6px 8px; }
  #dx-vision .dx-mini-btn[data-act="edit"] svg { width: 15px; height: 15px; }
  .dx-actions { gap: 4px; }
}
@media (max-width: 400px) { #dx-frise .dx-mini-btn { padding: 5px 7px; font-size: 10.5px; } #dx-frise .dx-card-title { letter-spacing: .04em; } }

/* Voile derrière les barres latérales (touche = fermer) */
.dx-scrim { position: fixed; inset: 0; background: rgba(4,4,8,0.55); z-index: 40; -webkit-tap-highlight-color: transparent; animation: dxFade .18s ease; }
@keyframes dxFade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 900px) {
  .dx-backdrop { overscroll-behavior: contain; }
  .dx-sheet { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
}

/* ---------- V1.5 : finitions ---------- */
/* Les deux barres latérales ouvertes : on libère la place du titre pour garder les onglets entiers */
.dx-bar.dx-narrow .dx-brand { display: none; }
/* Onglets qui ne tiennent pas : fondu sur le bord (on voit qu'on peut faire défiler) au lieu d'un onglet coupé net */
.dx-tabs.dx-tabs-fade { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); padding-right: 22px; }
/* Croix de fermeture : la même partout (fenêtres DERON et fenêtres de l'app) */
.dx-sheet-head { gap: 12px; }
.dx-sheet-head .dx-x { flex: 0 0 auto; width: 34px; height: 34px; min-width: 0; min-height: 0; padding: 0; border-radius: 10px; border: 1px solid var(--line); background: var(--surface2); color: var(--muted); font-size: 20px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.dx-sheet-head .dx-x:hover { color: var(--text); background: var(--surface); }
@media (max-width: 900px) { .dx-sheet-head .dx-x { width: 38px; height: 38px; border-radius: 12px; } }
.dx-label { line-height: 1.45; }

/* ---------- V1.7 : « Nouvelle planche » (Romain décrit l'interface qu'il veut) ---------- */
.dx-fb-planche .dx-label { margin-top: 14px; }
.dx-fb-planche .dx-fb-modes { margin-top: 2px; }
.dx-fb-imgs { display: block; cursor: pointer; }
.dx-fb-imgs span { display: block; border: 1px dashed var(--line); border-radius: 12px; padding: 12px 14px; font-size: 13px; color: var(--muted); text-align: center; }
.dx-fb-imgs:hover span { color: var(--text); border-color: var(--violet); }
.dx-fb-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.dx-fb-thumbs:empty { display: none; }
.dx-fb-imgthumb { position: relative; width: 64px; height: 64px; border-radius: 10px; background: var(--surface2) center/cover no-repeat; border: 1px solid var(--line); }
.dx-fb-imgthumb button { position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 13px; line-height: 1; cursor: pointer; padding: 0; }
.dx-fb-blank { display: block; width: 100%; margin-top: 10px; background: none; border: 0; color: var(--muted); font-size: 13px; cursor: pointer; padding: 8px; text-decoration: underline; text-underline-offset: 3px; }
.dx-fb-blank:hover { color: var(--text); }

/* ---------- V1.8 : modules personnalisables (nom, couleur, ordre) ---------- */
.dx-mod-btn { padding: 5px 6px !important; color: var(--muted); flex-shrink: 0; }
.dx-mod-btn svg { width: 16px; height: 16px; }
.dx-mod-btn:hover { color: var(--text); }
.dx-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.dx-swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface2); color: var(--muted); font-size: 14px; cursor: pointer; padding: 0; }
.dx-swatch.on { border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.18); }
.dx-btn[disabled] { opacity: .4; pointer-events: none; }
.dx-card { transition: border-color .2s; }
@media (max-width: 520px) { #dx-frise .dx-lbl { display: none; } }
/* Calendrier Canva : même cadre que le Visual Board */
#dx-frise .dx-vision-frame-wrap { margin: 10px auto 2px; }

/* ---------- V1.12 : onglets du haut plus grands et en couleur (RS rose, PROD jaune, DEV PERS bleu) ---------- */
@media (min-width: 721px) {
  .dx-bar .dx-tabs { gap: 8px; }
  .dx-bar .dx-tab { padding: 8px 18px; font-size: 13.5px; border-radius: 999px; }
}
/* V1.13 — onglets en transparence, même D.A que les pastilles des planches */
.dx-bar .dx-tab-rs { --tc: 244,93,171; --tt: #F77EBD; }
.dx-bar .dx-tab-prod { --tc: 242,193,78; --tt: #F5CD6E; }
.dx-bar .dx-tab-dev { --tc: 77,163,255; --tt: #7DBBFF; }
.dx-bar .dx-tab-rs, .dx-bar .dx-tab-prod, .dx-bar .dx-tab-dev { color: var(--tt); background: rgba(var(--tc), .16); border: 1px solid rgba(var(--tc), .32); border-radius: 999px; font-weight: 700; letter-spacing: .03em; box-shadow: 2px 3px 0 rgba(0,0,0,.25); transition: background .15s, border-color .15s, box-shadow .15s; }
.dx-bar .dx-tab-rs i, .dx-bar .dx-tab-prod i, .dx-bar .dx-tab-dev i { display: none; }
.dx-bar .dx-tab-rs:hover, .dx-bar .dx-tab-prod:hover, .dx-bar .dx-tab-dev:hover { color: var(--tt); background: rgba(var(--tc), .24); }
.dx-bar .dx-tab-rs.active, .dx-bar .dx-tab-prod.active, .dx-bar .dx-tab-dev.active { color: var(--tt); background: rgba(var(--tc), .28); border-color: rgba(var(--tc), .7); box-shadow: 2px 3px 0 rgba(0,0,0,.25), 0 0 14px rgba(var(--tc), .25); }
/* barre du bas (iPhone) : pastilles aux mêmes couleurs */
.dx-tabbar .dx-tab-dev i { background: #4DA3FF; }
.dx-bar .dx-tabs { padding: 4px; margin: -4px 0; }

/* ---------- V1.14 : barre pour régler la hauteur du Visual Board / Calendrier chronologie ---------- */
.dx-fresize { height: 16px; margin: 2px auto -4px; width: 100%; cursor: row-resize; display: flex; align-items: center; justify-content: center; touch-action: none; }
.dx-fresize::after { content: ""; width: 48px; height: 4px; border-radius: 2px; background: var(--line); transition: background .15s, width .15s; }
.dx-fresize:hover::after, .dx-fresize.active::after { background: var(--violet); width: 64px; }
body.dx-fresizing, body.dx-fresizing * { cursor: row-resize !important; user-select: none !important; }
body.dx-fresizing iframe { pointer-events: none; }
@media (hover: none) { .dx-fresize { height: 22px; } .dx-fresize::after { width: 56px; } }

/* ---------- V1.36 : sur iPhone / iPad portrait, la barre d'onglets (Dashboard, planches, Remarque) passe en haut, sous la barre du haut ---------- */
@media (max-width: 900px) {
  .dx-tabbar {
    top: var(--dx-bar-h, 60px); bottom: auto; z-index: 29;
    padding: 5px 6px; border-top: 0; border-bottom: 1px solid var(--line); box-shadow: 0 8px 20px rgba(0,0,0,.35);
  }
  .dx-tabbar a, .dx-tabbar button { flex-direction: row; gap: 7px; min-height: 38px; font-size: 11.5px; }
  .dx-tabbar i { margin: 0; }
  .dx-tabbar svg { width: 17px; height: 17px; flex-shrink: 0; }
  .dx-tabbar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .dx-bar, body[data-page="dashboard"] .dx-bar { background: #0D0D12; }
  body.dx-has-tabbar .dx-bar { margin-bottom: var(--dx-tab-h, 49px); border-bottom-color: transparent; }
  body.dx-has-tabbar { padding-bottom: env(safe-area-inset-bottom, 0px); }
  body.dx-has-tabbar .dx-toast { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
  body.dx-has-tabbar .dx-a2hs { bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 380px) { .dx-tabbar a, .dx-tabbar button { gap: 5px; font-size: 10.5px; letter-spacing: 0; } .dx-tabbar svg { width: 15px; height: 15px; } }

/* [V1.39] Reconnect : chaque case se renomme et change de couleur */
.dx-rc-box { position: relative; }
button.dx-rc-title { background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-family: inherit; text-align: left; }
.dx-rc-pen { opacity: 0; font-size: 11px; transition: opacity .15s; } .dx-rc-box:hover .dx-rc-pen { opacity: .6; }
@media (hover: none) { .dx-rc-pen { opacity: .45; } }
.dx-rc-pop { position: absolute; z-index: 20; left: 8px; right: 8px; top: 30px; background: #1E1E2A; border: 1px solid var(--line); border-radius: 12px; padding: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.45); }
.dx-rc-pop .dx-swatches { margin-top: 8px; }

/* [V1.41] Visual Board en plusieurs pages : défilement gauche / droite */
.dx-vb { position: relative; }
.dx-vb-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.dx-vb-track::-webkit-scrollbar { display: none; }
.dx-vb-slide { flex: 0 0 100%; scroll-snap-align: start; display: flex; justify-content: center; }
.dx-vb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: rgba(13,13,18,.78); color: var(--text); font-size: 20px; line-height: 1; cursor: pointer; z-index: 2; display: flex; align-items: center; justify-content: center; padding: 0 0 2px; }
.dx-vb-nav.prev { left: 6px; } .dx-vb-nav.next { right: 6px; }
.dx-vb-dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.dx-vb-dot { width: 7px; height: 7px; border-radius: 50%; border: 0; padding: 0; background: var(--line); cursor: pointer; }
.dx-vb-dot.on { background: var(--violet); width: 18px; border-radius: 4px; }
@media (hover: none) { .dx-vb-nav { display: none; } }

/* [V1.41] Calendrier chronologique « mode app » */
.dx-ch-card .dx-card-head { flex-wrap: wrap; row-gap: 6px; }
.dx-ch-toggle { font-weight: 700; }
.dx-ch-folded { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; cursor: pointer; min-height: 120px; }
.dx-ch-fcol { border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); padding: 8px 9px; display: flex; flex-direction: column; gap: 6px; min-width: 0; overflow: hidden; }
.dx-ch-fcol.now { border-color: rgba(53,208,186,.6); background: rgba(53,208,186,.06); }
.dx-ch-mname { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.dx-ch-fcol.now .dx-ch-mname { color: #35D0BA; }
.dx-ch-fobj { font-size: 12.5px; line-height: 1.4; color: var(--text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.dx-ch-fobj.empty { color: #5b5b70; font-style: italic; }
.dx-ch-fdots { margin-top: auto; display: flex; flex-wrap: wrap; gap: 4px; }
.dx-ch-fdots i, .dx-ch-note i, .dx-ch-leg i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dx-ch-open { margin-top: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dx-ch-grid { display: grid; grid-template-columns: 34px repeat(var(--ch-cols), minmax(150px, 1fr)); gap: 6px; min-width: calc(34px + var(--ch-cols) * 156px); }
.dx-ch-head { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 6px 8px; border-radius: 10px; background: var(--surface2); }
.dx-ch-head.now { color: #0D0D12; background: #35D0BA; }
.dx-ch-rowlbl { font-size: 10.5px; font-weight: 800; color: var(--muted); display: flex; align-items: flex-start; justify-content: center; padding-top: 8px; letter-spacing: .04em; }
.dx-ch-rowlbl.obj { writing-mode: vertical-rl; transform: rotate(180deg); align-items: center; padding: 0; letter-spacing: .14em; text-transform: uppercase; }
.dx-ch-cell { position: relative; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.02); padding: 6px; min-height: 64px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dx-ch-cell.obj { background: rgba(255,255,255,.045); }
.dx-ch-cell.obj.now, .dx-ch-cell.wk.now { border-color: rgba(53,208,186,.55); }
.dx-ch-cell textarea { width: 100%; min-height: 58px; background: transparent; border: 0; outline: none; resize: vertical; color: var(--text); font: 12.5px/1.4 var(--font); padding: 0; }
.dx-ch-cell textarea::placeholder { color: #5b5b70; }
.dx-ch-cell.wk { cursor: pointer; }
.dx-ch-days { font-size: 10px; color: #5b5b70; }
.dx-ch-note { display: flex; align-items: flex-start; gap: 6px; text-align: left; background: rgba(0,0,0,.18); border: 0; border-radius: 7px; padding: 4px 6px; color: var(--text); font: 12px/1.35 var(--font); cursor: pointer; }
.dx-ch-note i { margin-top: 4px; }
.dx-ch-note span { overflow-wrap: anywhere; min-width: 0; }
.dx-ch-tools { position: absolute; top: 3px; right: 3px; display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.dx-ch-cell.wk:hover .dx-ch-tools { opacity: 1; }
@media (hover: none) { .dx-ch-tools { opacity: .6; } }
.dx-ch-tools button { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); background: #1E1E2A; color: var(--muted); font-size: 12px; padding: 0; cursor: pointer; }
.dx-ch-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dx-ch-leg { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; cursor: pointer; }
.dx-ch-pop { position: fixed; z-index: 60; background: #1E1E2A; border: 1px solid var(--line); border-radius: 12px; padding: 10px; box-shadow: 0 14px 34px rgba(0,0,0,.5); }
.dx-ch-pop .dx-input { width: 100%; }
.dx-ch-sw { display: flex; flex-wrap: wrap; gap: 8px; margin: 9px 0 4px; }
.dx-ch-sw button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; padding: 0; cursor: pointer; }
.dx-ch-sw button.on { border-color: #fff; }
.dx-ch-popbtns { display: flex; gap: 6px; justify-content: flex-end; margin-top: 8px; }
.dx-ch-poptitle { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.dx-ch-hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
@media (max-width: 900px) { .dx-ch-folded { grid-template-columns: repeat(4, minmax(120px, 1fr)); overflow-x: auto; } }

/* ---------- V1.44 : barre du haut épurée (recherche à gauche, onglets plus grands) ---------- */
.dx-search-left { flex-shrink: 0; }
@media (min-width: 721px) {
  .dx-tabs { justify-content: center; gap: 8px; }
  .dx-tab { padding: 8px 18px; font-size: 14px; border-radius: 12px; gap: 9px; letter-spacing: .04em; }
  .dx-tab i { width: 9px; height: 9px; }
}
@media (max-width: 720px) {
  .dx-bar .dx-search-left { order: 0; }
  body[data-page="dashboard"] .dx-actions { order: 1; margin-right: 0; margin-left: auto; }
}
@media (min-width: 721px) { .dx-bar .dx-tabs .dx-tab { font-size: 14px; padding: 8px 18px; } }

/* ===== V1.47 — D24 : texte mis en forme dans Reconnect / Keep in mind ===== */
.dx-rt { position: relative; }
.dx-rt-bar { display: none; gap: 4px; flex-wrap: wrap; margin: 2px 0 6px; justify-content: center; }
.dx-rt:focus-within .dx-rt-bar { display: flex; }
.dx-rt-bar button { min-width: 28px; height: 26px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface2); color: var(--text); cursor: pointer; font: 13px Georgia, "Times New Roman", serif; padding: 0 6px; }
.dx-rt-colors { display: inline-flex; gap: 4px; align-items: center; }
.dx-rt-colors button { min-width: 0; width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); padding: 0; }
.dx-rt-note { min-height: 56px; outline: none; color: var(--text); font: 13px/1.45 var(--font); overflow-wrap: anywhere; cursor: text; }
.dx-rt-note:empty::before { content: attr(data-ph); color: #5b5b70; }
.dx-rt-note a { color: #5AA9FF; text-decoration: underline; }
.dx-rt-note b, .dx-rt-note strong { font-weight: 800; }
@media (pointer: coarse) { .dx-rt-bar button { min-width: 34px; height: 32px; font-size: 15px; } }
@media (max-width: 640px) { .dx-rt-note { font-size: 16px; } }

/* ===== V1.47 — D49 bouton « parler » · D50 carnet ManyChat ===== */
.dx-talk-btn svg, .dx-mc-btn svg { width: 17px; height: 17px; }
.dx-tabbar .dx-tab-talk { color: #ffb3d6; }
/* [V1.47.3] Parler : petite barre sobre, comme dans DERON Cloud (● chrono onde Stop ×, puis ▶ Envoyer ×) */
.dx-talk-box { position: fixed; z-index: 120; left: 50%; transform: translateX(-50%); bottom: calc(22px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 24px); box-sizing: border-box; background: #1E1E2A; border: 1px solid var(--line); border-radius: 999px; padding: 6px 6px 6px 16px; box-shadow: 0 12px 30px rgba(0,0,0,.45); color: var(--text); font: 600 14px/1 var(--font); white-space: nowrap; }
.dx-talk-dot { width: 10px; height: 10px; border-radius: 50%; background: #FF5A66; animation: dxTalk 1s ease-in-out infinite; flex-shrink: 0; }
@keyframes dxTalk { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.dx-talk-time { font-variant-numeric: tabular-nums; font-weight: 700; }
.dx-talk-wave { display: block; width: 90px; height: 22px; flex: 0 0 90px; cursor: pointer; }
.dx-talk-lbl { color: var(--muted); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.dx-talk-lbl b { color: var(--text); }
.dx-talk-main { background: #7B61FF; color: #fff; border: 0; border-radius: 999px; min-height: 40px; padding: 0 18px; font: 700 14px/1 var(--font); cursor: pointer; flex-shrink: 0; }
.dx-talk-x { background: none; color: var(--muted); border: 0; border-radius: 50%; width: 40px; height: 40px; font-size: 20px; cursor: pointer; flex-shrink: 0; }
.dx-talk-pp { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--surface2); color: var(--text); font-size: 12px; cursor: pointer; flex-shrink: 0; }
.dx-talk-bar { width: 90px; height: 5px; border-radius: 99px; background: var(--surface2); overflow: hidden; }
.dx-talk-bar i { display: block; height: 100%; width: 0; background: #7B61FF; transition: width .2s; }
.dx-talk-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.2); border-top-color: #7B61FF; animation: dxSpin .8s linear infinite; flex-shrink: 0; }
@keyframes dxSpin { to { transform: rotate(360deg); } }
.dx-talk-box.sending, .dx-talk-box.ok { padding-right: 18px; min-height: 52px; }
.dx-talk-ok { width: 20px; height: 20px; border-radius: 50%; background: #3CCB7F; color: #0D0D12; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; }
.dx-talk-on { color: #FF5A66 !important; border-color: rgba(255,90,102,.6) !important; }
@media (max-width: 640px) { .dx-talk-hs { display: none; } .dx-talk-box { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); gap: 8px; padding-left: 12px; } .dx-talk-wave { width: 64px; flex-basis: 64px; } .dx-talk-box.review .dx-talk-time { display: none; } }
@media (max-width: 380px) { .dx-talk-box.review .dx-talk-wave { display: none; } }
/* [V1.47.4] le vocal prend la place de « Une remarque ? », dans la barre (rien ne flotte sur la page) */
.dx-talk-box.dx-talk-inline { position: static; transform: none; bottom: auto; box-shadow: none; max-width: none; height: 34px; min-height: 0; gap: 8px; padding: 0 2px 0 12px; border-radius: 999px; border-color: rgba(255,90,102,.45); background: rgba(255,90,102,.07); font-size: 13px; flex-shrink: 0; }
.dx-talk-box.dx-talk-inline.review, .dx-talk-box.dx-talk-inline.ok, .dx-talk-box.dx-talk-inline.sending { border-color: rgba(123,97,255,.5); background: rgba(123,97,255,.08); }
.dx-talk-box.dx-talk-inline.sending, .dx-talk-box.dx-talk-inline.ok { padding-right: 12px; min-height: 0; }
.dx-talk-inline .dx-talk-hs { display: none; }
.dx-talk-inline .dx-talk-wave { width: 72px; height: 18px; flex-basis: 72px; }
.dx-talk-inline .dx-talk-main { min-height: 28px; padding: 0 13px; font-size: 13px; }
.dx-talk-inline .dx-talk-x { width: 28px; height: 28px; font-size: 17px; }
.dx-talk-inline .dx-talk-pp { width: 26px; height: 26px; font-size: 10px; }
.dx-talk-inline .dx-talk-bar { width: 60px; }
.dx-talk-inline.review .dx-talk-time { color: var(--muted); font-weight: 600; }
@media (max-width: 900px) {
  .dx-tabbar .dx-talk-box.dx-talk-inline { height: 38px; flex: 0 0 auto; align-self: center; }
  .dx-tabbar .dx-talk-inline .dx-talk-main { min-height: 32px; padding: 0 12px; }
  .dx-tabbar .dx-talk-inline .dx-talk-x { width: 32px; height: 32px; }
  .dx-tabbar .dx-talk-inline .dx-talk-pp { width: 30px; height: 30px; }
  .dx-tabbar .dx-talk-inline .dx-talk-wave { width: 44px; flex-basis: 44px; }
  .dx-tabbar .dx-talk-inline.review .dx-talk-time, .dx-tabbar .dx-talk-inline.review .dx-talk-wave { display: none; }
  .dx-tabbar .dx-talk-inline .dx-talk-lbl b { font-weight: 700; }
  .dx-tabbar .dx-talk-box button { flex: 0 0 auto; flex-direction: row; letter-spacing: 0; font: 700 13px/1 var(--font); }
  .dx-tabbar .dx-talk-box button.dx-talk-main { background: #7B61FF; color: #fff; border-radius: 999px; }
  .dx-tabbar .dx-talk-box button.dx-talk-pp { background: var(--surface2); color: var(--text); border-radius: 50%; font-size: 10px; }
  .dx-tabbar .dx-talk-box button.dx-talk-x { color: var(--muted); font-size: 17px; }
  body.dx-talking .dx-tabbar a span { display: none; }   /* pendant le vocal, les onglets gardent leur pastille de couleur */
  body.dx-talking .dx-tabbar a { flex: 1 1 0; min-width: 0; }
}
@media (max-width: 380px) { .dx-tabbar .dx-talk-inline .dx-talk-wave { display: none; } }
.dx-talk-toast { position: fixed; z-index: 121; left: 50%; transform: translateX(-50%); bottom: 90px; background: #1E1E2A; border: 1px solid var(--line); padding: 10px 16px; border-radius: 12px; color: var(--text); font: 600 14px var(--font); }
.dx-mc-sheet { max-width: 560px; width: 100%; }
.dx-mc-sub { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.dx-mc-add { display: flex; gap: 8px; margin-bottom: 12px; }
.dx-mc-add .dx-input { flex: 1; min-width: 0; }
.dx-mc-mic.live { background: rgba(255,90,102,.22); border-color: #FF5A66; }
.dx-mc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow-y: auto; }
.dx-mc-it { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface2); border: 1px solid var(--line); }
.dx-mc-it.done { opacity: .5; } .dx-mc-it.done .dx-mc-tx { text-decoration: line-through; }
.dx-mc-chk { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #b98cff; background: none; flex-shrink: 0; cursor: pointer; margin-top: 1px; }
.dx-mc-it.done .dx-mc-chk { background: #b98cff; }
.dx-mc-tx { flex: 1; min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; font-size: 14.5px; line-height: 1.45; }
.dx-mc-it small { font-size: 10.5px; color: #8cc4ff; border: 1px solid rgba(77,163,255,.4); border-radius: 999px; padding: 1px 6px; }
.dx-mc-del { background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; width: 30px; height: 30px; flex-shrink: 0; }
.dx-mc-empty { color: var(--muted); font-size: 13.5px; padding: 12px 4px; }
@media (pointer: coarse) { .dx-mc-chk { width: 28px; height: 28px; } .dx-mc-del { width: 40px; height: 40px; } }

/* ===== V1.47 — D44 à D46 : nouveau look (Réglages → « Nouveau look »). Couleurs, typo, espacements, boutons,
   cases et menus plus doux. Seuls les styles changent : aucune section ne bouge. ===== */
.dx-look-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; margin: 0 0 14px; border-radius: 16px; background: rgba(124,92,255,.08); border: 1px solid rgba(124,92,255,.25); }
.dx-look-row > div { flex: 1; min-width: 0; } .dx-look-row b { display: block; font-size: 14.5px; } .dx-look-row small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; line-height: 1.4; }
.dx-switch { position: relative; width: 51px; height: 31px; border-radius: 999px; border: 0; background: #39394a; cursor: pointer; flex-shrink: 0; transition: background .2s; }
.dx-switch i { position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.3); transition: transform .2s; }
.dx-switch.on { background: #35C759; } .dx-switch.on i { transform: translateX(20px); }

body.dx-look2 {
  --bg: #0B0B10; --surface: #15151D; --surface2: #1C1C26; --line: rgba(255,255,255,.075); --muted: #A0A0B4;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; letter-spacing: -0.005em;
}
body.dx-look2, body.dx-look2 .ft-root { font-family: var(--font) !important; }
body.dx-look2 .ft-root { --line: rgba(255,255,255,.075); --surface: #15151D; --surface2: #1C1C26; --muted: #A0A0B4; }
/* cartes et modules : fond doux, bord fin, coins plus ronds, légère profondeur */
body.dx-look2 .ft-card, body.dx-look2 .dx-card, body.dx-look2 .pl-box {
  border-radius: 22px !important; border-color: rgba(255,255,255,.07) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.035) inset, 0 12px 30px rgba(0,0,0,.22);
}
body.dx-look2 .ft-card { background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.012)), #15151D !important; }
body.dx-look2 .ft-section, body.dx-look2 .ft-bucket-main, body.dx-look2 .ft-bucket-today, body.dx-look2 .dx-sec { border-radius: 18px !important; }
body.dx-look2 .ft-task-row { border-radius: 12px; }
body.dx-look2 .ft-module-title-caps, body.dx-look2 .dx-card-title, body.dx-look2 .pl-p2-head, body.dx-look2 .ft-bucket-title { letter-spacing: .08em; font-weight: 700; }
/* boutons : pastilles douces, sans bord dur, taille au doigt */
body.dx-look2 .ft-chip, body.dx-look2 .dx-btn, body.dx-look2 .dx-mini-btn, body.dx-look2 .pl-sm-add, body.dx-look2 .ft-btn-secondary, body.dx-look2 .dx-icon-btn {
  border-radius: 12px !important; border-color: transparent !important; background-color: rgba(255,255,255,.065) !important; transition: background-color .15s, transform .1s;
}
body.dx-look2 .ft-chip:hover, body.dx-look2 .dx-btn:hover, body.dx-look2 .dx-mini-btn:hover, body.dx-look2 .pl-sm-add:hover, body.dx-look2 .ft-btn-secondary:hover, body.dx-look2 .dx-icon-btn:hover { background-color: rgba(255,255,255,.11) !important; }
body.dx-look2 .ft-chip:active, body.dx-look2 .dx-btn:active, body.dx-look2 .ft-btn-primary:active { transform: scale(.97); }
body.dx-look2 .ft-btn-primary, body.dx-look2 .dx-btn-primary { border-radius: 12px !important; background: #7C5CFF !important; border-color: transparent !important; box-shadow: 0 6px 18px rgba(124,92,255,.28); }
body.dx-look2 .ft-chip.active { background-color: rgba(124,92,255,.28) !important; }
body.dx-look2 .dx-btn, body.dx-look2 .ft-btn-primary, body.dx-look2 .ft-btn-secondary { min-height: 40px; }
/* champs */
body.dx-look2 .dx-input, body.dx-look2 .dx-textarea, body.dx-look2 .ft-modal input, body.dx-look2 .ft-modal textarea, body.dx-look2 .ft-notes-editable {
  border-radius: 12px !important; background: rgba(255,255,255,.05) !important; border-color: rgba(255,255,255,.08) !important;
}
body.dx-look2 .dx-input:focus, body.dx-look2 .ft-notes-editable:focus { border-color: rgba(124,92,255,.7) !important; box-shadow: 0 0 0 4px rgba(124,92,255,.16); }
/* fenêtres et menus : verre dépoli */
body.dx-look2 .ft-modal, body.dx-look2 .dx-sheet { border-radius: 24px !important; border: 1px solid rgba(255,255,255,.08) !important; background: rgba(24,24,33,.94) !important; -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4); box-shadow: 0 30px 80px rgba(0,0,0,.5); }
body.dx-look2 .ft-day-pick-pop, body.dx-look2 .pl-pop, body.dx-look2 .dx-rc-pop, body.dx-look2 .pl-card-pop { border-radius: 16px !important; border-color: rgba(255,255,255,.08) !important; background: rgba(28,28,38,.97) !important; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 18px 48px rgba(0,0,0,.45) !important; }
body.dx-look2 .ft-modal-backdrop, body.dx-look2 .dx-backdrop { background: rgba(5,5,10,.55) !important; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
/* barre du haut et barre du bas : verre */
body.dx-look2 .dx-bar { background: rgba(11,11,16,.72) !important; -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5); border-bottom-color: rgba(255,255,255,.06) !important; }
body.dx-look2 .dx-tab { border-radius: 12px !important; }
body.dx-look2 .dx-tabbar { background: rgba(11,11,16,.8) !important; -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5); border-top-color: rgba(255,255,255,.06) !important; }
/* cases à cocher : rondes et nettes */
body.dx-look2 .ft-check, body.dx-look2 .pl-check { border-width: 2px !important; }
/* calendrier */
body.dx-look2 .ft-cal-cell { border-radius: 14px !important; border-color: rgba(255,255,255,.06) !important; background: rgba(255,255,255,.025) !important; }
body.dx-look2 .ft-cal-chip { border-radius: 7px !important; }
/* planches */
body.dx-look2 .pl-sm-tile, body.dx-look2 .pl-km-box, body.dx-look2 .pl-link, body.dx-look2 .pl-sm-link { border-radius: 16px !important; }
body.dx-look2 .pl-box.tint { background-image: linear-gradient(180deg, rgba(var(--acc-rgb), .07), rgba(var(--acc-rgb), .025)) !important; }
@media (max-width: 900px) { .dx-bar .dx-talk-btn, .dx-bar .dx-mc-btn { display: none; } .dx-tabbar .dx-tab-mc { color: #c9b6ff; } }
@media (max-width: 600px) { .dx-tabbar .dx-tab-ico { flex: 0 0 40px; } .dx-tabbar .dx-tab-ico span { display: none; } }
/* ===== V1.47.1 — bandeau Veille DJ du dashboard ===== */
.dx-ticker { overflow: hidden; margin-top: 10px; border-radius: 12px; background: rgba(244,93,171,.06); border: 1px solid rgba(244,93,171,.18); -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.dx-tk-track { display: inline-flex; gap: 26px; padding: 9px 0; white-space: nowrap; animation: dxTicker 70s linear infinite; }
.dx-ticker:hover .dx-tk-track { animation-play-state: paused; }
@keyframes dxTicker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .dx-tk-track { animation: none; flex-wrap: wrap; white-space: normal; padding: 9px; } }
.dx-tk-it { font-size: 13px; color: var(--text); } .dx-tk-it b { color: var(--muted); }
.dx-tk-it.me { color: #F45DAB; font-weight: 800; }
.dx-tk-it i { font-style: normal; font-size: 12px; } .dx-tk-it i.up { color: #35D0BA; } .dx-tk-it i.down { color: #FF5A66; }
/* [V1.47.7] connexion : mot de passe oublié, Google */
.dx-login-alt { display: block; text-align: center; color: var(--muted); font-size: 13px; text-decoration: none; padding: 6px; }
.dx-login-alt:hover { color: var(--text); }
.dx-login-g { display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; min-height: 44px; }
.dx-login-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.dx-login-or::before, .dx-login-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
/* [V1.47.9] tuto de bienvenue */
.onb-bd { position: fixed; inset: 0; z-index: 200; background: rgba(5,5,10,.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 16px; }
.onb { position: relative; width: min(520px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; background: #16161F; border: 1px solid var(--line); border-radius: 22px; padding: 22px 20px 16px; box-sizing: border-box; color: var(--text); font-family: var(--font); box-shadow: 0 24px 60px rgba(0,0,0,.55); }
.onb-title { margin: 0 64px 12px 0; font-size: 19px; line-height: 1.25; font-weight: 800; }
.onb-skip { position: absolute; top: 14px; right: 14px; background: none; border: 0; color: var(--muted); font: 600 13px var(--font); cursor: pointer; padding: 8px; }
.onb-body { overflow-y: auto; font-size: 14.5px; line-height: 1.5; color: #d9d9e3; padding-right: 2px; }
.onb-body p { margin: 0 0 10px; }
.onb-body b { color: var(--text); }
.onb-small { font-size: 12.5px; color: var(--muted) !important; }
.onb-ok { color: #3CCB7F !important; font-weight: 600; }
.onb-warn { background: rgba(255,181,71,.1); border: 1px solid rgba(255,181,71,.35); border-radius: 12px; padding: 8px 10px; }
.onb-ico { width: 17px; height: 17px; vertical-align: -3px; display: inline-block; }
.onb-appicon { width: 46px; height: 46px; border-radius: 11px; flex-shrink: 0; display: block; }
.onb-cards { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 12px; }
.onb-card { display: flex; gap: 12px; align-items: center; background: var(--surface2); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.onb-card small { display: block; color: var(--muted); font-size: 12.5px; }
.onb-card code { display: inline-block; margin-top: 3px; font-size: 12.5px; color: #9fe8dc; background: rgba(53,208,186,.1); border-radius: 6px; padding: 1px 6px; }
.onb-steps { margin: 6px 0 10px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.onb-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.onb-list li { background: var(--surface2); border-radius: 12px; padding: 10px 12px; }
.onb-visual { display: flex; gap: 12px; justify-content: center; align-items: flex-end; margin: 4px 0 12px; flex-wrap: wrap; }
.onb-visual-col { flex-direction: column; align-items: stretch; }
.onb-phone { width: 128px; border: 2px solid #3a3a48; border-radius: 20px; overflow: hidden; background: #0D0D12; }
.onb-ph-screen { height: 120px; display: flex; align-items: center; justify-content: center; }
.onb-ph-app { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; }
.onb-ph-bar { display: flex; justify-content: space-around; align-items: center; padding: 7px 4px 10px; background: #1E1E2A; color: #4DA3FF; font-size: 13px; }
.onb-hl { border: 2px solid #FFD400; border-radius: 8px; padding: 1px 3px; box-shadow: 0 0 0 4px rgba(255,212,0,.18); animation: onbPulse 1.4s ease-in-out infinite; }
@keyframes onbPulse { 50% { box-shadow: 0 0 0 7px rgba(255,212,0,.06); } }
.onb-sheet { width: 200px; background: #1E1E2A; border-radius: 14px; overflow: hidden; font-size: 12.5px; }
.onb-sheet-row { padding: 9px 12px; border-bottom: 1px solid rgba(255,255,255,.06); display: flex; gap: 8px; align-items: center; color: #cfcfda; }
.onb-hl-row { background: rgba(255,212,0,.12); color: #fff; font-weight: 700; outline: 2px solid #FFD400; outline-offset: -2px; border-radius: 10px; }
.onb-home { display: flex; gap: 18px; background: linear-gradient(135deg, #2a1a3a, #0f2440); border-radius: 18px; padding: 16px 22px; }
.onb-home-app { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 11.5px; color: #fff; }
.onb-home-app .onb-appicon { width: 54px; height: 54px; border-radius: 13px; }
.onb-topbar { display: flex; gap: 8px; align-items: center; justify-content: flex-end; background: #0D0D12; border: 1px solid var(--line); border-radius: 14px; padding: 8px; font-size: 13px; }
.onb-topbar2 { justify-content: flex-start; border-color: rgba(255,90,102,.45); background: rgba(255,90,102,.07); border-radius: 999px; padding: 6px 6px 6px 14px; }
.onb-tb-btn { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; color: var(--muted); }
.onb-tb-rem { color: #9fe8dc; border-color: rgba(53,208,186,.35); }
.onb-dot { width: 9px; height: 9px; border-radius: 50%; background: #FF5A66; animation: dxTalk 1s ease-in-out infinite; }
.onb-wave { display: inline-flex; gap: 2px; align-items: center; height: 18px; flex: 1; }
.onb-wave i { width: 3px; background: #9B8CFF; border-radius: 2px; animation: onbWave 1s ease-in-out infinite; height: 6px; }
.onb-wave i:nth-child(2n) { animation-delay: .2s; } .onb-wave i:nth-child(3n) { animation-delay: .4s; }
@keyframes onbWave { 50% { height: 17px; } }
.onb-stop { background: #7B61FF; color: #fff; border-radius: 999px; padding: 6px 13px; font-weight: 700; }
.onb-x { color: var(--muted); padding: 0 8px; }
.onb-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.onb-dots { display: flex; gap: 6px; }
.onb-dots i { width: 7px; height: 7px; border-radius: 50%; background: #3a3a48; }
.onb-dots i.on { background: #7B61FF; width: 18px; border-radius: 4px; }
.onb-btn { background: #7B61FF; color: #fff; border: 0; border-radius: 999px; min-height: 44px; padding: 0 20px; font: 700 14px var(--font); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.onb-btn-ghost { background: var(--surface2); color: var(--text); border: 1px solid var(--line); }
.onb-btn .onb-appicon { width: 24px; height: 24px; border-radius: 6px; }
@media (max-width: 480px) { .onb { padding: 18px 14px 12px; border-radius: 18px; } .onb-title { font-size: 17px; } .onb-sheet { width: 170px; } .onb-phone { width: 110px; } }
/* [V1.47.10] tuto : toutes les cartes ont la même taille, les boutons Retour / Suivant ne bougent jamais */
.onb { height: min(640px, calc(100vh - 32px)); height: min(640px, calc(100dvh - 32px)); }
.onb-title { flex: 0 0 auto; min-height: 48px; display: flex; align-items: flex-start; }
.onb-body { flex: 1 1 auto; min-height: 0; overscroll-behavior: contain; }
.onb-foot { flex: 0 0 auto; margin-top: auto; }
.onb-foot [data-onb-prev], .onb-foot [data-onb-next] { min-width: 112px; justify-content: center; }
@media (max-width: 480px) { .onb { height: min(600px, calc(100dvh - 24px)); } .onb-foot [data-onb-prev], .onb-foot [data-onb-next] { min-width: 100px; } }
.onb-foot [data-onb-prev], .onb-foot [data-onb-next] { width: 124px; min-width: 0; padding: 0 10px; white-space: nowrap; }
@media (max-width: 480px) { .onb-foot [data-onb-prev], .onb-foot [data-onb-next] { width: 112px; } }

/* [V1.47.11] n° 61 bouton « Se déconnecter » de la barre du haut */
.dx-logout-btn { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; box-sizing: border-box; }
.dx-logout-btn svg { width: 18px; height: 18px; }
.dx-logout-btn:hover { color: #FF8A93; }
@media (max-width: 720px) { body[data-page="dashboard"] .dx-bar { padding-right: 162px; } }   /* [V1.47.11] laisse la place aux boutons télécharger / annuler / refaire */
