/* ============================================================
   Atlas Desktop — desktop.css
   Nouvelle couche d'interface, construite SUR tokens.css (source
   unique des jetons). Aucune variable de couleur redéfinie ici,
   uniquement des styles de composants (fenêtres, dock, system bar).

   Direction esthétique : chrome de fenêtre à la macOS (feux tricolores,
   vibrancy, ombres douces multi-couches) + surfaces/typo/rythme dans
   l'esprit Claude (fond chaud, coins généreux, bordures fines plutôt
   que lourdes, une seule couleur d'accent — celle d'Atlas, la sienne).

   15/07 (v2) : accent secondaire violet inspiré de landing.html (--pur,
   variable LOCALE à ce fichier, pas ajoutée à tokens.css qui reste la
   source unique du design system partagé site-wide) — réservé aux
   moments d'accent fort (dégradé de texte, indicateurs actifs), jamais
   utilisé comme couleur de fond dominante.
   ============================================================ */
:root { --atd-purple: #5b3dd0; }

html, body.atd-body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.atd-body * { box-sizing: border-box; }

.atd-body button { font-family: inherit; }
.atd-body :focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 2px;
}

/* ── Boot screen ─────────────────────────────────────────── */
.atd-boot {
  position: fixed; inset: 0; z-index: 900;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--sp-2);
  background: var(--bg);
  transition: opacity 0.45s cubic-bezier(.4,0,.2,1);
}
.atd-boot-hidden { opacity: 0; pointer-events: none; }
.atd-boot-mark {
  font-family: var(--font-display); font-size: var(--fs-7); font-weight: 800;
  background: linear-gradient(90deg, var(--accent), var(--atd-purple));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: atd-boot-pulse 1.6s ease-in-out infinite;
}
.atd-boot-sub { font-size: var(--fs-2); color: var(--ink-3); }
@keyframes atd-boot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .72; transform: scale(.98); }
}

/* ── System Bar ──────────────────────────────────────────── */
.atd-system-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 30px; z-index: 500;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--sp-3);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--line-2);
  font-size: 12px;
}
.atd-sysbar-left, .atd-sysbar-right { display: flex; align-items: center; gap: var(--sp-2); }
/* Meme regle que la barre de l'application (12/10/2026) : la jauge IA et les
   autres pastilles portent du texte en une seule ligne ; les laisser se
   comprimer les ferait deborder les unes sur les autres. */
.atd-sysbar-left > *, .atd-sysbar-right > * { flex: 0 0 auto; }
@media (max-width: 900px) { .atd-sysbar-ai { display: none; } }
.atd-sysbar-logo {
  border: none; background-color: transparent; padding: 0; cursor: pointer;
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em;
  font-size: 13px;
  background-image: linear-gradient(90deg, var(--accent), var(--atd-purple));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.atd-sysbar-sep { color: var(--ink-3); opacity: .5; }
.atd-sysbar-company { font-weight: var(--fw-medium); }
.atd-sysbar-ws {
  color: var(--ink-2); cursor: pointer; padding: 3px var(--sp-2); border-radius: var(--r-pill);
  transition: background .15s ease;
}
.atd-sysbar-ws:hover { background: var(--surface-2); }
.atd-sysbar-item { color: var(--ink-2); display: flex; align-items: center; gap: 4px; }
.atd-sysbar-viewtoggle {
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink-2);
  font-size: 11px; font-weight: var(--fw-medium); line-height: 1;
  padding: 3px var(--sp-2); border-radius: var(--r-pill); cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.atd-sysbar-viewtoggle:hover { background: var(--accent-soft); color: var(--accent); }
.atd-sysbar-sync {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3);
  display: inline-block; transition: background .3s ease, box-shadow .3s ease;
}
.atd-sysbar-sync.atd-sync-ok { background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 18%, transparent); }
.atd-sysbar-sync.atd-sync-down { background: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, transparent); }
.atd-sysbar-ai {
  padding: 3px var(--sp-2); border-radius: var(--r-pill); background: var(--accent-soft);
  color: var(--accent); font-weight: var(--fw-medium); font-size: var(--fs-1);
  display: inline-flex; align-items: center; gap: 5px;
}
.atd-sysbar-ai-over { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.atd-ai-gauge {
  display: inline-block; width: 34px; height: 5px; border-radius: 999px;
  background: color-mix(in srgb, currentColor 20%, transparent); overflow: hidden; vertical-align: middle;
}
.atd-ai-gauge-fill { display: block; height: 100%; background: currentColor; border-radius: 999px; transition: width .3s ease; }
.atd-badge {
  font-size: 10px; font-weight: var(--fw-semibold); letter-spacing: 0.05em;
  padding: 3px 9px; border-radius: var(--r-pill); text-transform: uppercase;
  border: 1px solid transparent;
}
.atd-badge-sandbox { background: color-mix(in srgb, var(--warning) 14%, transparent); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 30%, transparent); }
.atd-badge-prod { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); border-color: color-mix(in srgb, var(--success) 30%, transparent); }
.atd-sysbar-avatar {
  width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: var(--fw-semibold); text-transform: uppercase;
}
.atd-sysbar-clock { font-variant-numeric: tabular-nums; color: var(--ink-2); }

/* ── Bureau ──────────────────────────────────────────────── */
.atd-desktop {
  position: fixed; inset: 30px 0 88px 0; z-index: 1;
  background:
    radial-gradient(ellipse 900px 500px at 8% 6%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 55%),
    radial-gradient(ellipse 700px 500px at 96% 92%, color-mix(in srgb, var(--accent) 4%, transparent), transparent 55%),
    var(--bg);
  overflow: hidden;
}
.atd-desktop-icons {
  position: absolute; top: var(--sp-6); left: var(--sp-6); right: 300px;
  display: grid; grid-template-columns: repeat(auto-fill, 88px); gap: var(--sp-3);
  /* `right` contraint la largeur (grid a besoin d'une largeur connue pour
     savoir quand passer à la ligne) — sans ça, auto-fill s'étend à l'infini
     sur une seule ligne, hors écran, au lieu de wrapper. */
}
.atd-icon {
  width: 88px; display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: none; border: 1px solid transparent; border-radius: var(--r-md);
  padding: var(--sp-2) 4px; cursor: pointer; color: var(--ink);
  transition: background .15s ease;
}
.atd-icon:hover { background: color-mix(in srgb, var(--surface) 55%, transparent); }
.atd-icon-selected { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.atd-icon-glyph {
  width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
  font-size: 26px; border-radius: 14px;
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  box-shadow: var(--sh-1), inset 0 1px 0 rgba(255,255,255,0.35);
}
body.dark .atd-icon-glyph { box-shadow: var(--sh-1), inset 0 1px 0 rgba(255,255,255,0.06); }
.atd-icon-label { font-size: var(--fs-1); text-align: center; line-height: 1.25; color: var(--ink-2); }

/* ── Fenêtres ────────────────────────────────────────────── */
.atd-window-layer { position: fixed; inset: 30px 0 88px 0; z-index: 20; pointer-events: none; }
.atd-window {
  position: absolute; pointer-events: auto;
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg);
  box-shadow:
    0 1px 1px rgba(21,19,26,0.04),
    0 8px 24px rgba(21,19,26,0.10),
    0 24px 64px rgba(21,19,26,0.12);
  overflow: hidden; min-width: 320px; min-height: 220px;
  animation: atd-window-in .22s cubic-bezier(.2,.9,.3,1.1);
}
@keyframes atd-window-in {
  from { opacity: 0; transform: scale(.965) translateY(6px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.atd-window-active {
  box-shadow:
    0 1px 1px rgba(21,19,26,0.05),
    0 12px 32px rgba(21,19,26,0.14),
    0 32px 80px rgba(21,19,26,0.16);
  border-color: color-mix(in srgb, var(--accent) 30%, var(--line-2));
}
.atd-window-minimized { display: none; }
.atd-window-maximized {
  top: 0 !important; left: 0 !important; width: 100% !important; border-radius: 0;
  /* S'étend jusqu'au vrai bas du viewport (sous le dock flottant, qui reste
     visible par-dessus grâce à son z-index plus élevé) plutôt que de s'arrêter
     à la zone réservée au dock — "agrandir passe derrière le dock". */
  height: calc(100vh - 30px) !important;
}

.atd-window-titlebar {
  /* tactile : sans ceci le navigateur vole le geste pour scroller la page
     apres quelques px (pointercancel) -- fenetres impossibles a deplacer
     au doigt, surtout dans l'iframe demo de deligny-rd.fr (20/08) */
  touch-action: none;
  position: relative;
  display: flex; align-items: center; gap: var(--sp-2);
  height: 40px; padding: 0 var(--sp-3);
  background: color-mix(in srgb, var(--surface-2) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-2);
  cursor: grab; user-select: none;
}
.atd-window-titlebar:active { cursor: grabbing; }
.atd-window:not(.atd-window-active) .atd-window-titlebar { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.atd-window:not(.atd-window-active) .atd-window-title { opacity: .55; }
.atd-window:not(.atd-window-active) .atd-window-icon { opacity: .55; }

.atd-window-icon { font-size: 14px; }
.atd-window-title {
  flex: 1; font-size: var(--fs-2); font-weight: var(--fw-medium);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-align: center; padding-right: 104px; /* compense feux + flèches de nav pour un centrage visuel */
}
.atd-window-no-nav .atd-window-title { padding-right: 58px; }

/* Feux tricolores (macOS), positionnés avant le titre */
.atd-window-controls { display: flex; gap: 8px; order: -1; }
.atd-wctl {
  width: 12px; height: 12px; border-radius: 50%; border: none;
  cursor: pointer; font-size: 8px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  color: transparent; transition: color .1s ease;
  position: relative;
}
.atd-window-controls:hover .atd-wctl { color: rgba(0,0,0,0.55); }
.atd-wctl-close { background: #FF6058; }
.atd-wctl-min   { background: #FFBD2E; }
.atd-wctl-max   { background: #28C93F; }
.atd-wctl:active { filter: brightness(.85); }

/* Navigation retour/avant (fenêtres iframe uniquement — pages Atlas
   existantes) ; masquée pour les fenêtres à contenu natif (def.render). */
.atd-window-nav { display: flex; gap: 2px; order: -1; margin-left: 4px; }
.atd-window-no-nav .atd-window-nav { display: none; }
.atd-wnav-btn {
  width: 20px; height: 20px; border-radius: var(--r-sm); border: none; background: transparent;
  color: var(--ink-3); cursor: pointer; font-size: 14px; line-height: 1; font-weight: var(--fw-semibold);
  display: flex; align-items: center; justify-content: center;
}
.atd-wnav-btn:hover { background: var(--surface-3, var(--surface-2)); color: var(--ink); }
.atd-wnav-btn:active { filter: brightness(.9); }

.atd-window-body { flex: 1; position: relative; background: #fff; }
.atd-window-iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.atd-window-custom { position: absolute; inset: 0; overflow-y: auto; background: var(--surface); color: var(--ink); }

/* ── Visionneuse fichier ──────────────────────────────────── */
.atd-viewer { display: flex; flex-direction: column; height: 100%; }
.atd-viewer-stage { flex: 1; display: flex; align-items: center; justify-content: center; overflow: auto; background: color-mix(in srgb, var(--ink) 4%, var(--surface)); padding: var(--sp-3); }
.atd-viewer-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--r-sm); box-shadow: var(--sh-2); }
.atd-viewer-stage iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.atd-viewer-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3); border-top: 1px solid var(--line-2);
  font-size: 11.5px; color: var(--ink-2); background: var(--surface);
}
.atd-viewer-meta span:first-child { font-weight: var(--fw-medium); color: var(--ink); }
.atd-viewer-meta a { margin-left: auto; color: var(--accent); text-decoration: none; font-weight: var(--fw-medium); }
.atd-viewer-meta a:hover { text-decoration: underline; }

.atd-window-resize {
  touch-action: none;   /* meme raison que la titlebar */ position: absolute; width: 14px; height: 14px; z-index: 2; }
.atd-window-resize-se {
  right: 2px; bottom: 2px; cursor: se-resize; opacity: .35;
  background: linear-gradient(135deg, transparent 55%, var(--ink-3) 55%, var(--ink-3) 65%, transparent 65%, transparent 75%, var(--ink-3) 75%, var(--ink-3) 85%, transparent 85%);
}
.atd-window-resize-se:hover { opacity: .6; }
.atd-window-resize-sw { left: 2px; bottom: 2px; cursor: sw-resize; }
.atd-window-resize-ne { right: 2px; top: 2px; cursor: ne-resize; }
.atd-window-resize-nw { left: 2px; top: 2px; cursor: nw-resize; }

/* ── Dock ────────────────────────────────────────────────── */
.atd-dock {
  position: fixed; left: 50%; bottom: var(--sp-3); transform: translateX(-50%); z-index: 400;
  display: flex; align-items: flex-end; gap: 6px; padding: 10px 12px;
  background: color-mix(in srgb, var(--surface) 68%, transparent);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--line-2); border-radius: 22px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset, 0 16px 40px rgba(21,19,26,0.16);
  max-width: calc(100vw - 32px); overflow-x: auto;
}
body.dark .atd-dock { box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset, 0 16px 40px rgba(0,0,0,0.4); }
.atd-dock-item {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  width: 56px; padding: 0; border: none; background: none; cursor: pointer;
  transition: transform .14s cubic-bezier(.2,.9,.3,1.3);
  transform-origin: bottom center;
}
.atd-dock-item:hover { transform: translateY(-8px) scale(1.12); }
.atd-dock-tile {
  width: 46px; height: 46px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  background: linear-gradient(160deg, var(--surface), var(--surface-3));
  box-shadow: var(--sh-1), inset 0 1px 0 rgba(255,255,255,0.4);
}
body.dark .atd-dock-tile { box-shadow: var(--sh-1), inset 0 1px 0 rgba(255,255,255,0.08); }
.atd-dock-label {
  color: var(--ink-2); font-size: 10.5px; font-weight: var(--fw-medium);
  white-space: nowrap; text-overflow: ellipsis; overflow: hidden; max-width: 60px;
  pointer-events: none;
}
.atd-dock-running {
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
  position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
}
.atd-dock-count {
  position: absolute; top: -4px; right: 2px;
  min-width: 15px; height: 15px; padding: 0 3px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 10px; font-weight: var(--fw-semibold);
  line-height: 15px; text-align: center; box-shadow: 0 0 0 2px var(--surface);
}

/* ── Recherche (Ctrl/Cmd+K) ──────────────────────────────── */
.atd-search-overlay {
  position: fixed; inset: 0; z-index: 600;
  background: color-mix(in srgb, var(--ink) 40%, transparent);
  backdrop-filter: blur(2px);
  display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh;
}
.atd-search-overlay[hidden] { display: none; }
.atd-search-palette {
  width: min(600px, 92vw); background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 20px; box-shadow: 0 24px 80px rgba(21,19,26,0.28); overflow: hidden;
  animation: atd-window-in .18s cubic-bezier(.2,.9,.3,1.1);
}
.atd-search-input {
  width: 100%; border: none; outline: none; padding: 18px var(--sp-5); font-size: var(--fs-4);
  background: transparent; color: var(--ink); border-bottom: 1px solid var(--line-2);
}
.atd-search-input::placeholder { color: var(--ink-3); }
.atd-search-results { max-height: 46vh; overflow-y: auto; padding: 6px; }
.atd-search-row {
  padding: 10px var(--sp-3); display: flex; align-items: center; gap: var(--sp-3);
  justify-content: space-between; cursor: pointer; font-size: var(--fs-3);
  border-radius: var(--r-md);
}
.atd-search-row:hover, .atd-search-row-active { background: var(--accent-soft); }
.atd-search-row-label { display: flex; align-items: center; gap: 10px; }
.atd-search-row-hint { color: var(--ink-3); font-size: var(--fs-1); }
.atd-search-empty { padding: var(--sp-5); color: var(--ink-3); font-size: var(--fs-2); text-align: center; }
.atd-search-footer {
  display: flex; gap: var(--sp-4); padding: 10px var(--sp-4);
  border-top: 1px solid var(--line-2); background: var(--surface-2);
  font-size: 11px; color: var(--ink-3);
}
.atd-search-kbd {
  display: inline-flex; align-items: center; justify-content: center; gap: 3px;
}
.atd-search-key {
  display: inline-block; min-width: 16px; padding: 1px 5px; margin-right: 4px;
  border: 1px solid var(--line); border-radius: 4px; background: var(--surface);
  font-size: 10px; text-align: center; box-shadow: 0 1px 0 var(--line);
}

/* ── Notification Center ─────────────────────────────────── */
.atd-notification-center { position: fixed; top: 4px; right: var(--sp-4); z-index: 510; }
.atd-nc-bell {
  position: relative; width: 30px; height: 30px; border-radius: var(--r-pill);
  border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; font-size: 14px;
  transition: background .15s ease;
}
.atd-nc-bell:hover { background: var(--surface-2); }
.atd-nc-count {
  position: absolute; top: -3px; right: -3px; background: var(--danger); color: #fff;
  font-size: 9px; font-weight: var(--fw-semibold); border-radius: var(--r-pill);
  padding: 1px 5px; min-width: 15px; text-align: center; border: 2px solid var(--bg);
}
.atd-nc-panel {
  position: absolute; top: 40px; right: 0; width: 340px; max-height: 70vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg);
  box-shadow: 0 24px 64px rgba(21,19,26,0.22); display: none;
}
.atd-nc-open .atd-nc-panel { display: block; animation: atd-window-in .16s cubic-bezier(.2,.9,.3,1.1); }
.atd-nc-header { padding: var(--sp-3) var(--sp-4); font-weight: var(--fw-semibold); border-bottom: 1px solid var(--line-2); }
.atd-nc-group-title { padding: 10px var(--sp-4) 4px; font-size: 10px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; font-weight: var(--fw-semibold); }
.atd-nc-item {
  padding: var(--sp-2) var(--sp-4); cursor: pointer; border-bottom: 1px solid var(--line-2);
  display: flex; align-items: flex-start; gap: 8px;
}
.atd-nc-item:hover { background: var(--surface-2); }
.atd-nc-item::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; margin-top: 6px; flex-shrink: 0;
  background: transparent;
}
.atd-nc-unread { font-weight: var(--fw-medium); }
.atd-nc-unread::before { background: var(--accent); }
.atd-nc-item-title { font-size: var(--fs-2); }
.atd-nc-item-body { font-size: var(--fs-1); color: var(--ink-3); }
.atd-nc-empty { padding: var(--sp-5); color: var(--ink-3); font-size: var(--fs-2); text-align: center; }

/* ── Store ────────────────────────────────────────────────── */
.atd-store-overlay {
  position: fixed; inset: 0; z-index: 600;
  background: color-mix(in srgb, var(--ink) 40%, transparent);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
}
.atd-store-overlay[hidden] { display: none; }
.atd-store-panel {
  width: min(860px, 94vw); max-height: 84vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 20px;
  box-shadow: 0 24px 80px rgba(21,19,26,0.28); padding: var(--sp-6);
  animation: atd-window-in .2s cubic-bezier(.2,.9,.3,1.1);
}
.atd-store-header { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-display); font-size: var(--fs-6); font-weight: var(--fw-semibold); }
.atd-store-close {
  border: none; background: var(--surface-2); width: 30px; height: 30px; border-radius: 50%;
  font-size: 18px; cursor: pointer; color: var(--ink-2); display: flex; align-items: center; justify-content: center;
}
.atd-store-close:hover { background: var(--surface-3); }
.atd-store-sub { color: var(--ink-3); font-size: var(--fs-2); margin: var(--sp-2) 0 var(--sp-5); max-width: 62ch; }
.atd-store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--sp-3); }
.atd-store-card {
  border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: var(--sp-4); background: var(--surface);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.atd-store-card:hover { transform: translateY(-2px); box-shadow: var(--sh-2); border-color: var(--line); }
.atd-store-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.atd-store-card-type { font-size: 10px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; font-weight: var(--fw-semibold); }
.atd-store-badge { font-size: 10px; font-weight: var(--fw-semibold); padding: 3px 8px; border-radius: var(--r-pill); border: 1px solid transparent; }
.atd-store-badge-live { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); border-color: color-mix(in srgb, var(--success) 30%, transparent); }
.atd-store-badge-soon { background: var(--surface-2); color: var(--ink-3); border-color: var(--line); }
.atd-store-card-name { font-weight: var(--fw-medium); font-size: var(--fs-3); }
.atd-store-card-tagline { font-size: var(--fs-1); color: var(--ink-3); margin-top: 4px; line-height: 1.4; }

/* ── Menu contextuel ─────────────────────────────────────── */
.atd-ctxmenu {
  position: fixed; z-index: 650; min-width: 200px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-md);
  box-shadow: 0 12px 32px rgba(21,19,26,0.20); padding: 6px;
  animation: atd-window-in .12s cubic-bezier(.2,.9,.3,1.1);
}
.atd-ctxmenu-item {
  display: block; width: 100%; text-align: left; border: none; background: none;
  padding: 8px 10px; border-radius: var(--r-sm); font-size: var(--fs-2); color: var(--ink);
  cursor: pointer;
}
.atd-ctxmenu-item:hover { background: var(--accent-soft); }
.atd-ctxmenu-danger { color: var(--danger); }
.atd-ctxmenu-danger:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); }
.atd-ctxmenu-sep { height: 1px; background: var(--line-2); margin: 4px 6px; }

/* ── Groupes de raccourcis bureau ────────────────────────── */
.atd-icon-group { font-size: 24px; }

/* ── Dock : bouton d'ajout ───────────────────────────────── */
.atd-dock-tile-add {
  background: var(--surface-2); color: var(--ink-3); font-size: 20px; font-weight: var(--fw-semibold);
  border: 1px dashed var(--line);
}
.atd-dock-add:hover .atd-dock-tile-add { color: var(--accent); border-color: var(--accent); }

/* ── Sélecteur d'apps (picker) ───────────────────────────── */
.atd-picker-panel { width: min(440px, 92vw); padding: var(--sp-5); }
.atd-picker-header { display: flex; justify-content: space-between; align-items: center; font-weight: var(--fw-semibold); font-size: var(--fs-4); margin-bottom: var(--sp-3); }
.atd-picker-list { max-height: 44vh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.atd-picker-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-md);
  cursor: pointer; font-size: var(--fs-3);
}
.atd-picker-row:hover { background: var(--surface-2); }
.atd-picker-row-selected { background: var(--accent-soft); }
.atd-picker-icon { font-size: 18px; }
.atd-picker-footer { display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-3); border-top: 1px solid var(--line-2); padding-top: var(--sp-3); }
.atd-picker-footer .atd-search-input { flex: 1; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.atd-picker-confirm {
  border: none; background: var(--accent); color: var(--accent-ink); font-weight: var(--fw-medium);
  padding: 8px 16px; border-radius: var(--r-pill); cursor: pointer; white-space: nowrap;
}
.atd-picker-confirm:hover { filter: brightness(1.05); }

/* ── Concierge (fenêtre chat native) ─────────────────────── */
.atd-cc-body {
  position: absolute; top: 0; left: 0; right: 0; bottom: 76px; overflow-y: auto;
  padding: var(--sp-4); display: flex; flex-direction: column; gap: 8px;
}
.atd-cc-msg {
  max-width: 82%; padding: 8px 12px; border-radius: var(--r-md); font-size: var(--fs-2);
  line-height: 1.45; white-space: pre-wrap; word-break: break-word;
}
.atd-cc-msg-user {
  align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px;
}
.atd-cc-msg-assistant {
  align-self: flex-start; background: var(--surface-2); color: var(--ink); border-bottom-left-radius: 4px;
}
.atd-cc-status {
  position: absolute; bottom: 52px; left: 0; right: 0; padding: 0 var(--sp-4);
  font-size: 11px; color: var(--ink-3); font-style: italic; min-height: 16px;
}
.atd-cc-inputbar {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 6px;
  padding: 8px; border-top: 1px solid var(--line-2); background: var(--surface);
}
.atd-cc-attach {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: var(--r-pill); border: 1px solid var(--line);
  background: var(--surface-2); cursor: pointer; font-size: 15px; display: flex; align-items: center; justify-content: center;
}
.atd-cc-attach:hover { background: var(--accent-soft); }
.atd-cc-input {
  flex: 1; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 8px 14px; font-size: var(--fs-2);
  background: var(--surface); color: var(--ink); outline: none;
}
.atd-cc-input:focus { border-color: var(--accent); }
.atd-cc-send {
  flex: 0 0 auto; border: none; background: var(--accent); color: var(--accent-ink); font-weight: var(--fw-medium);
  padding: 8px 16px; border-radius: var(--r-pill); cursor: pointer; font-size: var(--fs-2);
}
.atd-cc-send:hover { filter: brightness(1.05); }
.atd-cc-dragover { outline: 2px dashed var(--accent); outline-offset: -4px; background: var(--accent-soft); }

/* ── Documents (fenêtre grille native) ───────────────────── */
.atd-docs-toolbar { padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line-2); }
.atd-docs-grid {
  padding: var(--sp-4); display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--sp-3);
  align-content: start;
}
.atd-doc-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: var(--sp-3);
  border-radius: var(--r-md); cursor: default; text-align: center;
}
.atd-doc-card:hover { background: var(--surface-2); }
.atd-doc-thumbwrap {
  width: 76px; height: 76px; border-radius: var(--r-md); background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--line-2);
}
.atd-doc-thumb { width: 100%; height: 100%; object-fit: cover; }
.atd-doc-icon { font-size: 34px; }
.atd-doc-name {
  font-size: 12px; font-weight: var(--fw-medium); color: var(--ink); width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.atd-doc-meta { font-size: 11px; color: var(--ink-3); }

/* ── Concierge : icône barre système ─────────────────────── */
.atd-sysbar-concierge {
  border: none; background: transparent; cursor: pointer; font-size: 14px; line-height: 1;
  padding: 4px 6px; border-radius: var(--r-sm); color: var(--ink-2);
}
.atd-sysbar-concierge:hover { background: var(--surface-2); }

/* ── Glisser-déposer : états de survol ───────────────────── */
.atd-drop-target-active { outline: 2px dashed var(--accent); outline-offset: 2px; background: var(--accent-soft); border-radius: var(--r-md); }
.atd-desktop-dragover::after {
  content: ''; position: absolute; inset: 0; background: color-mix(in srgb, var(--accent) 6%, transparent);
  outline: 2px dashed var(--accent); outline-offset: -8px; pointer-events: none; z-index: 5;
}

/* ── Terminal (palette de commandes, pas un shell) ───────── */
.atd-term { background: #1B1D22; color: #D8DCE4; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12.5px; }
.atd-term-output { position: absolute; top: 0; left: 0; right: 0; bottom: 34px; overflow-y: auto; padding: var(--sp-3); }
.atd-term-line { white-space: pre-wrap; word-break: break-word; line-height: 1.5; }
.atd-term-cmd { color: #8FE3A6; }
.atd-term-err { color: #F2A6A0; }
.atd-term-inputrow {
  position: absolute; left: 0; right: 0; bottom: 0; height: 34px; display: flex; align-items: center; gap: 6px;
  padding: 0 var(--sp-3); border-top: 1px solid rgba(255,255,255,.08);
}
.atd-term-prompt { color: #8FE3A6; }
.atd-term-input {
  flex: 1; background: transparent; border: none; color: #D8DCE4; font: inherit; outline: none;
}

/* ── Réglages (façon Préférences Système) ────────────────── */
.atd-set { display: flex; }
.atd-set-sidebar {
  width: 150px; flex: 0 0 auto; background: var(--surface-2); border-right: 1px solid var(--line-2);
  padding: var(--sp-2); display: flex; flex-direction: column; gap: 2px;
}
.atd-set-nav-item {
  display: flex; align-items: center; gap: 8px; border: none; background: transparent; text-align: left;
  padding: 7px 10px; border-radius: var(--r-sm); cursor: pointer; font-size: var(--fs-2); color: var(--ink-2);
}
.atd-set-nav-item:hover { background: var(--surface-3, var(--surface)); }
.atd-set-nav-active { background: var(--accent-soft); color: var(--ink); font-weight: var(--fw-medium); }
.atd-set-nav-icon { font-size: 14px; }
.atd-set-content { flex: 1; padding: var(--sp-4); overflow-y: auto; }
.atd-set-row {
  display: flex; align-items: center; justify-content: space-between; padding: 8px 0;
  border-bottom: 1px solid var(--line-2);
}
.atd-set-row-label { font-size: var(--fs-2); color: var(--ink); }
.atd-set-row-value { font-size: var(--fs-2); color: var(--ink-2); font-weight: var(--fw-medium); }
.atd-set-group-label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); margin: var(--sp-4) 0 var(--sp-2); }
.atd-set-toggle { position: relative; width: 36px; height: 21px; display: inline-block; }
.atd-set-toggle input { opacity: 0; width: 0; height: 0; }
.atd-set-toggle span {
  position: absolute; inset: 0; background: var(--line); border-radius: var(--r-pill); transition: background .15s ease; cursor: pointer;
}
.atd-set-toggle span::before {
  content: ''; position: absolute; width: 17px; height: 17px; left: 2px; top: 2px; background: #fff; border-radius: 50%;
  transition: transform .15s ease; box-shadow: var(--sh-1);
}
.atd-set-toggle input:checked + span { background: var(--accent); }
.atd-set-toggle input:checked + span::before { transform: translateX(15px); }
.atd-set-wallpapers { display: flex; gap: 10px; }
.atd-set-wp {
  width: 52px; height: 36px; border-radius: var(--r-sm); border: 2px solid transparent; cursor: pointer; padding: 0;
}
.atd-set-wp-active { border-color: var(--accent); }
.atd-set-wp-default { background: linear-gradient(135deg, #F5F1E8, #EDE6D6); }
.atd-set-wp-sunset { background: linear-gradient(135deg, var(--accent), var(--atd-purple)); }
.atd-set-wp-mist { background: linear-gradient(135deg, #DDE4EA, #C7D0D8); }
.atd-set-wp-mono { background: var(--surface); border-color: var(--line); }
.atd-set-hint { font-size: 12px; color: var(--ink-3); margin: var(--sp-2) 0 var(--sp-4); line-height: 1.5; }
.atd-set-btn {
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); font-size: var(--fs-2);
  padding: 8px 14px; border-radius: var(--r-sm); cursor: pointer;
}
.atd-set-btn:hover { background: var(--accent-soft); }
.atd-set-links { display: flex; flex-direction: column; gap: 4px; }
.atd-set-link { color: var(--accent); font-size: var(--fs-2); text-decoration: none; padding: 6px 0; }
.atd-set-link:hover { text-decoration: underline; }

/* ── À propos ─────────────────────────────────────────────── */
.atd-about { display: flex; flex-direction: column; }
.atd-about-header { text-align: center; padding: var(--sp-5) var(--sp-4) var(--sp-3); border-bottom: 1px solid var(--line-2); }
.atd-about-mark {
  font-family: var(--font-display); font-weight: 800; font-size: var(--fs-6);
  background-image: linear-gradient(90deg, var(--accent), var(--atd-purple));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.atd-about-publisher { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.atd-about-body { flex: 1; overflow-y: auto; padding: var(--sp-4); }
.atd-about-cat { margin-bottom: var(--sp-4); }
.atd-about-cat-label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); font-weight: var(--fw-semibold); margin-bottom: 6px; }
.atd-about-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.atd-about-list li { font-size: 12.5px; color: var(--ink-2); line-height: 1.45; padding-left: 14px; position: relative; }
.atd-about-list li::before { content: '•'; position: absolute; left: 0; color: var(--accent); }

/* ── Fonds d'écran (Réglages > Apparence) ────────────────── */
.atd-wallpaper-sunset {
  background:
    radial-gradient(ellipse 900px 500px at 8% 6%, color-mix(in srgb, var(--atd-purple) 10%, transparent), transparent 55%),
    radial-gradient(ellipse 700px 500px at 96% 92%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 55%),
    var(--bg);
}
.atd-wallpaper-mist {
  background:
    radial-gradient(ellipse 900px 500px at 8% 6%, color-mix(in srgb, #6C8CA8 10%, transparent), transparent 55%),
    radial-gradient(ellipse 700px 500px at 96% 92%, color-mix(in srgb, #6C8CA8 6%, transparent), transparent 55%),
    var(--bg);
}
.atd-wallpaper-mono { background: var(--bg); }

/* ── Aide ─────────────────────────────────────────────────── */
.atd-aide { display: flex; flex-direction: column; }
.atd-aide-tabs { display: flex; gap: 4px; padding: var(--sp-2) var(--sp-3) 0; border-bottom: 1px solid var(--line-2); }
.atd-aide-tab {
  border: none; background: transparent; padding: 8px 12px; font-size: var(--fs-2); color: var(--ink-3);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.atd-aide-tab:hover { color: var(--ink); }
.atd-aide-tab-active { color: var(--ink); font-weight: var(--fw-medium); border-bottom-color: var(--accent); }
.atd-aide-content { position: relative; flex: 1; overflow: hidden; }
.atd-aide-tips { list-style: none; margin: 0; padding: var(--sp-4); display: flex; flex-direction: column; gap: 10px; overflow-y: auto; height: 100%; box-sizing: border-box; }
.atd-aide-tips li { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; padding-left: 16px; position: relative; }
.atd-aide-tips li::before { content: '💡'; position: absolute; left: 0; top: 0; font-size: 11px; }
/* Le sous-arbre SAV réutilise les styles de bulles/entrée du Concierge
   (.atd-cc-*) mais en disposition flex normale plutôt qu'en absolu — évite
   tout chevauchement avec la barre d'escalade, propre à Aide. */
.atd-aide-sav { display: flex; flex-direction: column; height: 100%; }
.atd-aide-sav-body { position: static; flex: 1; min-height: 0; }
.atd-aide-sav .atd-cc-status { position: static; padding: 0 var(--sp-4); }
.atd-aide-sav-inputbar { position: static; }
.atd-aide-escalate-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 8px 12px; background: var(--accent-soft); border-top: 1px solid var(--line-2); font-size: 12px;
}
.atd-aide-escalate-bar[hidden] { display: none; }
.atd-aide-escalate-hint { color: var(--ink-2); }
.atd-aide-escalate-btn {
  flex: 0 0 auto; border: none; background: var(--accent); color: var(--accent-ink); font-weight: var(--fw-medium);
  padding: 6px 12px; border-radius: var(--r-pill); cursor: pointer; font-size: 12px; white-space: nowrap;
}
.atd-aide-escalate-btn:hover { filter: brightness(1.05); }

/* ── Corbeille ────────────────────────────────────────────── */
.atd-trash { display: flex; flex-direction: column; }
.atd-trash-toolbar { padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line-2); }
.atd-trash-body { flex: 1; overflow-y: auto; padding: var(--sp-2) var(--sp-3); }
.atd-trash-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-md); }
.atd-trash-row:hover { background: var(--surface-2); }
.atd-trash-icon { font-size: 20px; flex: 0 0 auto; }
.atd-trash-info { flex: 1; min-width: 0; }
.atd-trash-name { font-size: var(--fs-2); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.atd-trash-date { font-size: 11px; color: var(--ink-3); }
.atd-trash-restore { flex: 0 0 auto; padding: 5px 10px; font-size: 12px; }
.atd-trash-purge {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; border: none; background: transparent;
  color: var(--ink-3); cursor: pointer; font-size: 15px; line-height: 1;
}
.atd-trash-purge:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }

/* ── Dispositions (configs de fenêtres nommées) ──────────────
   Réutilise .atd-trash-row/-icon/-info/-name/-date/-toolbar/-body : même
   forme de liste (icône + nom/date + actions) que la Corbeille. */
.atd-disp-more {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; border: none; background: transparent;
  color: var(--ink-3); cursor: pointer; font-size: 15px; line-height: 1;
}
.atd-disp-more:hover { background: var(--surface-2); color: var(--ink); }
.atd-disp-note { padding: var(--sp-2) var(--sp-4); font-size: 11px; line-height: 1.4; color: var(--ink-3); border-bottom: 1px solid var(--line-2); }

/* ── Sauvegarde ───────────────────────────────────────────── */
.atd-backup { display: flex; flex-direction: column; align-items: center; text-align: center; padding: var(--sp-6) var(--sp-5); gap: 10px; }
.atd-backup-icon { font-size: 40px; }
.atd-backup-title { font-size: var(--fs-4); font-weight: var(--fw-semibold); color: var(--ink); }
.atd-backup-desc { font-size: 12.5px; color: var(--ink-2); line-height: 1.55; max-width: 320px; }
.atd-backup-btn { margin-top: var(--sp-2); }
.atd-backup-status { font-size: 12px; color: var(--ink-3); min-height: 16px; }

/* ── Applications ─────────────────────────────────────────── */
.atd-apps-grid { display: grid; grid-template-columns: repeat(auto-fill, 84px); gap: 12px; padding: var(--sp-4); justify-content: space-between; }
.atd-apps-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px; border: none; background: transparent;
  padding: 10px 4px; border-radius: var(--r-md); cursor: pointer; width: 84px;
}
.atd-apps-item:hover { background: var(--surface-2); }
.atd-apps-icon {
  width: 48px; height: 48px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-1);
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.atd-apps-label { font-size: 11px; color: var(--ink-2); text-align: center; line-height: 1.25; }

/* ── Dashboard ────────────────────────────────────────────── */
.atd-dash { display: flex; flex-direction: column; }
.atd-dash-toolbar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--line-2);
}
.atd-dash-select {
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 8px; font-size: 12.5px;
  background: var(--surface); color: var(--ink); margin-right: 4px;
}
.atd-dash-tbtn { padding: 6px 10px; font-size: 12px; }
.atd-dash-danger { color: var(--danger); }
.atd-dash-grid { flex: 1; overflow-y: auto; padding: var(--sp-4); display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--sp-3); align-content: start; }
.atd-dash-card { position: relative; background: var(--surface-2); border-radius: var(--r-lg); padding: var(--sp-4); }
.atd-dash-remove {
  position: absolute; top: 6px; right: 6px; width: 18px; height: 18px; border-radius: 50%; border: none;
  background: transparent; color: var(--ink-3); cursor: pointer; font-size: 13px; line-height: 1;
}
.atd-dash-remove:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.atd-dash-label { font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-3); margin-bottom: 6px; }
.atd-dash-value { font-size: var(--fs-5); font-weight: var(--fw-semibold); color: var(--ink); }

/* ── Recherche (moteur maison) ────────────────────────────── */
.atd-se { display: flex; flex-direction: column; height: 100%; }
.atd-se-bar {
  display: flex; align-items: center; gap: 10px; padding: var(--sp-4);
  border-bottom: 1px solid var(--line-2);
}
.atd-se-bar-icon { font-size: 16px; opacity: .6; }
.atd-se-input {
  flex: 1; border: none; background: transparent; font-size: var(--fs-4); color: var(--ink); outline: none;
}
.atd-se-body { flex: 1; overflow-y: auto; padding: var(--sp-4); }
.atd-se-ai {
  background: var(--accent-soft); border-radius: var(--r-lg); padding: var(--sp-4); margin-bottom: var(--sp-4);
}
.atd-se-ai-label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); font-weight: var(--fw-semibold); margin-bottom: 6px; }
.atd-se-ai-body { font-size: 13px; color: var(--ink); line-height: 1.55; white-space: pre-wrap; }
.atd-se-cat { margin-bottom: var(--sp-4); }
.atd-se-cat-label { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); margin-bottom: 6px; }
.atd-se-row {
  display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left;
  border: none; background: transparent; border-radius: var(--r-md); padding: 8px 10px; cursor: pointer;
}
.atd-se-row:hover { background: var(--surface-2); }
.atd-se-row-label { font-size: var(--fs-2); color: var(--ink); }
.atd-se-row-sub { font-size: 11.5px; color: var(--ink-3); }

/* ── Vitrine démo (fenêtres à données fictives) ──────────── */
.atd-demo-note {
  font-size: 11.5px; color: var(--accent); background: var(--accent-soft);
  padding: 8px var(--sp-4); line-height: 1.4;
}

/* ── Toast ───────────────────────────────────────────────── */
.atd-toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(12px);
  background: var(--ink); color: var(--bg); font-size: var(--fs-2); font-weight: var(--fw-medium);
  padding: 10px 18px; border-radius: var(--r-pill); box-shadow: var(--sh-2);
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; z-index: 700;
}
.atd-toast-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Responsive minimal ──────────────────────────────────── */
@media (max-width: 720px) {
  .atd-desktop-widgets { display: none; }
  .atd-dock-label { display: none; }
  .atd-dock-item { width: 44px; }
  .atd-dock-tile { width: 40px; height: 40px; }
}

/* ── Vitrine démo v2 (20/08) — graphiques, tableaux, mail, agenda ─────────
   Couleurs sémantiques (ok/warn/bad) distinctes de l'accent produit. */
.atd2 { padding: 10px 12px 12px; font-size: 12.5px; }
.atd2-note { font-size: 10.5px; padding: 4px 8px; margin: -2px -4px 8px; }
.atd2-kpis { display: flex; gap: 8px; margin-bottom: 8px; }
.atd2-kpis .atd-dash-card { flex: 1; padding: 8px 10px; }
.atd2-kpis .atd-dash-label { font-size: 10px; }
.atd2-kpis .atd-dash-value { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.atd2-chart-title { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 2px 0 4px; }
.atd2-chart { display: block; width: 100%; height: 84px; }
.atd2-grid { stroke: var(--line-2); stroke-width: 1; }
.atd2-line { fill: none; stroke: #2e7d46; stroke-width: 2; stroke-linejoin: round; }
.atd2-area { fill: rgba(46,125,70,.12); }
.atd2-dot { fill: #2e7d46; }
.atd2-chart-legend { display: flex; justify-content: space-between; font-size: 10px; color: var(--ink-3); margin-top: 2px; }
.atd2-strong { color: var(--ink); font-weight: 700; }
.atd2-bar-row { display: flex; align-items: center; gap: 8px; margin: 7px 0; }
.atd2-bar-label { flex: 0 0 108px; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atd2-bar-track { flex: 1; height: 8px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.atd2-bar-fill { height: 100%; border-radius: 5px; }
.atd2-bar-fill.ok { background: #2e7d46; }
.atd2-bar-fill.warn { background: #b58422; }
.atd2-bar-fill.bad { background: #a43d2b; }
.atd2-bar-pct { flex: 0 0 34px; text-align: right; font-variant-numeric: tabular-nums; font-size: 11.5px; }
.atd2-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.atd2-table th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 600; padding: 2px 6px 6px; }
.atd2-table td { padding: 5px 6px; border-top: 1px solid var(--line-2); white-space: nowrap; }
.atd2-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.atd2-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 600; }
.atd2-badge.ok { background: rgba(46,125,70,.14); color: #2e7d46; }
.atd2-badge.warn { background: rgba(181,132,34,.16); color: #8a5a00; }
.atd2-badge.bad { background: rgba(164,61,43,.14); color: #a43d2b; }
.atd2-mail { display: flex; align-items: center; gap: 8px; padding: 7px 4px; border-bottom: 1px solid var(--line-2); }
.atd2-mail:last-child { border-bottom: 0; }
.atd2-mail-dot { flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: transparent; }
.atd2-mail.nonlu .atd2-mail-dot { background: #2f6ecf; }
.atd2-mail-body { flex: 1; min-width: 0; }
.atd2-mail-de { font-size: 12px; color: var(--ink); }
.atd2-mail.nonlu .atd2-mail-de { font-weight: 700; }
.atd2-mail-sujet { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atd2-mail-t { flex: 0 0 auto; font-size: 10.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.atd2-week { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; height: calc(100% - 34px); min-height: 130px; }
.atd2-day { display: flex; flex-direction: column; min-width: 0; }
.atd2-day-h { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); text-align: center; margin-bottom: 4px; }
.atd2-day-col { position: relative; flex: 1; border-radius: 8px; background: var(--surface-2); }
.atd2-ev { position: absolute; left: 3px; right: 3px; border-radius: 6px; padding: 3px 5px; font-size: 9.5px; font-weight: 600; line-height: 1.2; color: #fff; overflow: hidden; }
.atd2-ev.b { background: #2f6ecf; }
.atd2-ev.a { background: #b58422; }
.atd2-ev.g { background: #2e7d46; }
.atd2-ev.p { background: #7c5cbf; }

/* Vitrine encadree (02/11) : contenu d'une fenetre d'application quand le
   Bureau est montre en demonstration dans une autre page (deligny-rd.fr), a la
   place d'un iframe que le navigateur refuserait. */
.atd-window-vitrine { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 28px 32px; background: var(--surface, #F5F1E8); color: var(--ink, #2B2730); overflow-y: auto; }
.atd-vitrine-icone { font-size: 40px; line-height: 1; margin-bottom: 12px; }
.atd-vitrine-titre { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.atd-vitrine-texte { max-width: 44ch; margin: 0 0 18px; font-size: 13.5px; line-height: 1.55; color: var(--ink-soft, #6A6470); }
.atd-vitrine-btn { display: inline-block; padding: 10px 18px; border-radius: 999px; background: #1a1a1a; color: #fff; font-size: 13.5px; font-weight: 700; text-decoration: none; }
.atd-vitrine-btn:hover, .atd-vitrine-btn:focus-visible { background: #000; }
