/* ═══════════════════════════════════════════
   SERIANCE - Mode bureau (prototype)
   Fenêtres flottantes grand écran, voir bureau.js
═══════════════════════════════════════════ */

/* index.html force #user-topbar en "flex" via "body.logged-in #user-topbar{display:flex!important}" -
   spécificité strictement plus grande nécessaire pour la cacher en mode bureau (voir bureau.js). */
html body.logged-in.bur-shell-active #user-topbar { display: none !important; }

/* Icône notifications du dock : doublon de l'ilot (pastille + alertes) en mode bureau - gardée en
   mode normal où l'ilot n'existe pas, seul accès aux notifications. Son séparateur (.dock-sep juste
   avant, sans id propre) part avec elle, sinon trait orphelin en bout de dock. */
body.bur-shell-active #sidebar-notif,
body.bur-shell-active .dock-sep:has(+ #sidebar-notif) { display: none; }

/* Sous la barre du haut (300), le dock (400) et les modales (600) */
#bur-desktop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 290;
}

.bur-window {
  position: fixed;
  display: flex;
  flex-direction: column;
  min-width: 360px;
  min-height: 280px;
  pointer-events: auto;
  /* Opaque (pas --modal-bg, qui a une transparence) : une page ouverte ne doit jamais laisser
     deviner le fond d'écran au travers. */
  background: var(--bg2);
  border: 1px solid var(--gb-hi);
  border-radius: 12px;
  box-shadow: var(--sh-sm), var(--hi);
  overflow: hidden;
  color: var(--text);
}

.bur-win-focused {
  border-color: var(--accent);
  box-shadow: var(--sh-lg), var(--hi);
}

.bur-win-entering {
  animation: burWinIn .22s cubic-bezier(.22,1,.36,1);
}

@keyframes burWinIn {
  from { opacity: 0; transform: scale(.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Fermer (X) : la fenêtre se referme sur elle-même, symétrique de l'ouverture. */
.bur-win-closing {
  animation: burWinOut .16s cubic-bezier(.4,0,1,1) forwards;
}
@keyframes burWinOut {
  from { opacity: 1; transform: scale(1) translateY(0); }
  to   { opacity: 0; transform: scale(.94) translateY(6px); }
}

/* Réduire (barre -) : s'envole vers le dock en bas de l'écran, pour distinguer visuellement
   « minimiser » (fenêtre toujours ouverte, juste cachée) de « fermer ». */
.bur-win-minimizing {
  animation: burWinMinimize .22s cubic-bezier(.4,0,1,1) forwards;
}
@keyframes burWinMinimize {
  from { opacity: 1; transform: scale(1) translateY(0); }
  to   { opacity: 0; transform: scale(.35) translateY(45vh); }
}

.bur-win-titlebar {
  cursor: move;
  user-select: none;
  -webkit-user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  flex-shrink: 0;
  background: var(--glass-a);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  border-bottom: 1px solid var(--gb);
  transition: margin-top .18s cubic-bezier(.22,1,.36,1), opacity .18s;
}

/* Fenêtre en plein écran (comme macOS) : sa propre barre de titre se range aussi, et ne
   réapparaît qu'en survolant le tout haut de l'écran (voir bureau.js, même survol que l'îlot). */
.bur-win-fullscreen .bur-win-titlebar {
  margin-top: -40px;
  opacity: 0;
  pointer-events: none;
}
.bur-win-fullscreen.bur-win-titlebar-peek .bur-win-titlebar {
  margin-top: 0;
  opacity: 1;
  pointer-events: auto;
}

.bur-win-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  cursor: default;
}

/* Ronds façon macOS : glyphe affiché au survol du groupe (couleur = fond de fenêtre, donc
   toujours contrasté avec --red/--orange/--green dans les deux thèmes) */
.bur-win-ctl {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--gb-hi);
  color: var(--bg2);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.bur-win-close { background: var(--red); }
.bur-win-min { background: var(--orange); }
.bur-win-max { background: var(--green); }
.bur-win-ctl::before { content: ''; }
.bur-win-controls:hover .bur-win-close::before,
.bur-win-close:focus-visible::before { content: '×'; }
.bur-win-controls:hover .bur-win-min::before,
.bur-win-min:focus-visible::before { content: '−'; }
.bur-win-controls:hover .bur-win-max::before,
.bur-win-max:focus-visible::before { content: '⤢'; }
.bur-win-ctl:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.bur-win-heading {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.bur-win-icon { display: flex; align-items: center; color: var(--accent); }
.bur-win-icon svg { width: 16px; height: 16px; }

.bur-win-title {
  min-width: 0;
  font-size: .9rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bur-win-body {
  flex: 1;
  overflow: auto;
  min-height: 0;
  background: var(--bg2);
}

/* Module externe (hors SPA) ouvert en fenêtre : la page s'affiche telle quelle dans le cadre */
.bur-win-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: var(--bg);
}

.bur-window .section {
  display: flex !important;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: auto;
  contain: none;
  padding: 12px 16px;
  box-sizing: border-box;
}

/* Place de l'ancienne barre du haut (54 px, index.html) : sans objet dans une fenêtre, l'îlot a sa
   propre zone réservée. Sinon Administration s'ouvrait avec ~110 px de vide en haut. */
.bur-window #section-admin { padding-top: 12px; }
.bur-window #section-admin > .content,
.bur-window .section > .content { padding-top: 0; }

/* Barres avec leur propre défilement horizontal (overflow-x:auto) : en colonne flex, un
   enfant qui a lui-même un overflow non "visible" perd son plancher de hauteur automatique
   (CSS Flexbox §4.5) et peut être écrasé à ~0px par le column-flex ci-dessus quand le contenu
   total dépasse la hauteur de la fenêtre (ex : barre d'outils Chantiers illisible, superposée).
   flex-shrink:0 les garde à leur hauteur naturelle ; la fenêtre défile entière si besoin. */
.bur-window .section > .chantiers-toolbar,
.bur-window .section > .chantier-statut-chips {
  flex-shrink: 0;
}

/* Fenêtre Réglages : le contenu de #modal-profil perd son habillage de modale */
.bur-window .profil-modal {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  box-sizing: border-box;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.bur-window .modal-close { display: none; }

/* Fenêtre Fiche chantier : le contenu de #modal-chantier-detail perd son habillage de modale */
.bur-window .ch-detail-modal {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  box-sizing: border-box;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: auto;
}

/* Fenêtre DOE/Dossier technique : le contenu de #modal-doe-page-editor perd son habillage de modale */
.bur-window .dpe-modal {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  box-sizing: border-box;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Fond d'écran du bureau : sous .main (z-index 1, layout.css) pour qu'il reste DERRIÈRE tout
   contenu de page encore affiché en plein écran - sinon un fond opaque recouvrirait ce contenu.
   body.bur-shell-active rend le fond du <body> transparent pour laisser voir ce calque là où
   .main/.content n'a rien d'opaque (le cas normal une fois les modules sortis en fenêtres). */
#bur-wallpaper {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  /* Repli quand aucun fond d'écran personnalisé n'est choisi : sans ça le bureau est totalement
     transparent (voir body.bur-shell-active ci-dessous) et montre le blanc par défaut du
     navigateur derrière des fenêtres en thème sombre. */
  background: var(--bg);
}
body.bur-shell-active { background: transparent; }

/* Raccourcis de bureau : icônes posées sur le fond d'écran (glisser une icône du dock dessus
   pour en créer un, voir bureau.js). Au-dessus de .main (1), sous les fenêtres (#bur-desktop, 290). */
#bur-shortcuts {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

.bur-shortcut {
  position: absolute;
  width: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px 8px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: none;
  color: var(--text);
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
}
.bur-shortcut:hover,
.bur-shortcut:focus-visible { background: rgba(255,255,255,.08); border-color: var(--gb); outline: none; }
.bur-shortcut-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--glass-a);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  border: 1px solid var(--gb-hi);
  box-shadow: var(--sh-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.bur-shortcut-icon svg { width: 20px; height: 20px; }
.bur-shortcut-label {
  font-size: .72rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.bur-shortcut-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.bur-shortcut:hover .bur-shortcut-remove,
.bur-shortcut-remove:focus-visible { display: flex; }

/* Fantôme suivant la souris pendant le glisser-déposer d'une icône du dock vers le bureau */
#bur-shortcut-ghost {
  position: fixed;
  z-index: 560;
  pointer-events: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--glass-a);
  border: 1px solid var(--gb-hi);
  box-shadow: var(--sh-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  opacity: .92;
  transform: translate(-50%, -50%) scale(1.1);
}
#bur-shortcut-ghost svg { width: 20px; height: 20px; }

.bur-seg { display: flex; gap: 8px; flex-wrap: wrap; }

.bur-wp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.bur-wp-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.bur-wp-swatch {
  width: 56px;
  height: 38px;
  padding: 0;
  border-radius: 8px;
  border: 2px solid var(--gb);
  cursor: pointer;
  transition: transform .15s, border-color .15s;
}
.bur-wp-swatch:hover { transform: scale(1.06); }
.bur-wp-swatch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bur-wp-swatch[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accentbg); }
.bur-wp-swatch-default {
  background: linear-gradient(135deg, transparent 46%, var(--gb-hi) 46%, var(--gb-hi) 54%, transparent 54%), var(--bg);
}

.bur-wp-photo-current {
  display: flex; align-items: center; gap: 10px; margin-top: 10px;
}
.bur-wp-photo-current:empty { display: none; }
.bur-wp-photo-current img {
  width: 72px; height: 44px; object-fit: cover; border-radius: 8px; border: 1px solid var(--gb);
}
.bur-wp-photo-current .profil-link-row {
  width: auto; padding: 7px 12px; font-size: .79rem;
}

.bur-win-resize {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 16px;
  height: 16px;
  cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 50%, var(--gb-hi) 50%, var(--gb-hi) 60%, transparent 60%, transparent 75%, var(--gb-hi) 75%, var(--gb-hi) 85%, transparent 85%);
}

/* Poignées de redimensionnement des 7 autres bords/coins : invisibles (seul le coin bas-droit a
   un repère visuel ci-dessus), juste une zone de prise + le bon curseur. Positionnées à 0 (jamais
   en négatif) car .bur-window a overflow:hidden - un décalage négatif serait inatteignable. Leur
   position:absolute (même sans z-index) les peint déjà au-dessus de .bur-win-titlebar, qui est en
   flux normal : pas de conflit avec le déplacement ou le double-clic de la barre de titre. */
.bur-win-resize-n, .bur-win-resize-s, .bur-win-resize-e, .bur-win-resize-w,
.bur-win-resize-ne, .bur-win-resize-nw, .bur-win-resize-sw { position: absolute; }
.bur-win-resize-n, .bur-win-resize-s { left: 16px; right: 16px; height: 6px; cursor: ns-resize; }
.bur-win-resize-e, .bur-win-resize-w { top: 16px; bottom: 16px; width: 6px; cursor: ew-resize; }
.bur-win-resize-n { top: 0; }
.bur-win-resize-s { bottom: 0; }
.bur-win-resize-e { right: 0; }
.bur-win-resize-w { left: 0; }
.bur-win-resize-ne, .bur-win-resize-nw, .bur-win-resize-sw { width: 16px; height: 16px; }
.bur-win-resize-ne { top: 0; right: 0; cursor: nesw-resize; }
.bur-win-resize-nw { top: 0; left: 0; cursor: nwse-resize; }
.bur-win-resize-sw { bottom: 0; left: 0; cursor: nesw-resize; }

/* Snap Assist : proposition d'une fenêtre ouverte pour remplir l'autre moitié de l'écran
   après un collage à gauche/droite (Maj + flèche), comme sur Windows. */
#bur-snap-assist {
  position: fixed;
  z-index: 580;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px;
  box-sizing: border-box;
  background: var(--glass-a);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  border: 1px solid var(--gb-hi);
  border-radius: 12px;
  box-shadow: var(--sh-lg);
}
.bur-snap-assist-label { font-size: .85rem; font-weight: 600; color: var(--text-muted); text-align: center; }
.bur-snap-assist-row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.bur-snap-assist-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 84px;
  padding: 10px 6px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: none;
  color: var(--text);
  cursor: pointer;
}
.bur-snap-assist-item:hover,
.bur-snap-assist-item:focus-visible { background: var(--surface2); border-color: var(--gb); outline: none; }
.bur-snap-assist-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--glass);
  border: 1px solid var(--gb-hi);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.bur-snap-assist-icon svg { width: 18px; height: 18px; }
.bur-snap-assist-item-label {
  font-size: .74rem;
  font-weight: 600;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html.perf-lite #bur-snap-assist { backdrop-filter: none; -webkit-backdrop-filter: none; }

body.bur-dragging, body.bur-dragging * { user-select: none; -webkit-user-select: none; }
/* user-select:none ci-dessus ne traverse pas la frontière d'une iframe (document séparé) :
   sans ceci, déplacer/redimensionner une fenêtre dont le glissé passe au-dessus d'une iframe
   (la sienne en rétrécissant, ou celle d'une autre fenêtre en la traversant) gèle le glissé à
   mi-chemin et sélectionne du texte dans l'iframe à la place. */
body.bur-dragging .bur-win-iframe { pointer-events: none; }

.dock-item.bur-open::after { opacity: 1; }

/* Dock : se retire en bas quand une fenêtre est en plein écran (option Réglages > Apparence),
   la page prend alors toute la hauteur. Réapparaît en survolant le tout bas de l'écran. */
#dock.bur-dock-hidden {
  transform: translateX(-50%) translateY(140%);
  opacity: 0;
  pointer-events: none;
}

/* ═══════════ Îlot (bureau_ilot.js) ═══════════
   Une seule forme noire qui change de taille selon la vue active : repos (pastille), alerte, panneau,
   assistant. Elle reste noire dans les deux thèmes : ses couleurs sont donc fixes (--ilot-...), jamais
   celles du thème (l'accent du thème clair est trop sombre pour être lu sur du noir).
   Au-dessus du dock (400) et de son infobulle (500), sous les modales. La taille de .ilot-forme est
   posée par bureau_ilot.js (_ilotAjuster) d'après la vue active ; le conteneur occupe toute la largeur
   sans capter la souris, la forme est centrée par flex (pas de transform : texte toujours net). */
#bur-island {
  --ilot-accent: #92BF3B;
  --ilot-sur-accent: #101a02;
  --ilot-rouge: #FF453A;
  --ilot-orange: #FF9F0A;
  --ilot-bleu: #0A84FF;
  --ilot-vert: #30D158;
  --ilot-texte: rgba(255,255,255,.94);
  --ilot-doux: rgba(255,255,255,.64);
  --ilot-trait: rgba(255,255,255,.13);
  --ilot-case: rgba(255,255,255,.07);
  --ilot-case-h: rgba(255,255,255,.14);
  --ilot-ressort: cubic-bezier(.3,1.35,.5,1);
  --ilot-amorti: cubic-bezier(.22,1,.36,1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 550;
  display: flex;
  justify-content: center;
  padding-top: 8px;
  pointer-events: none;
  color: var(--ilot-texte);
  font-size: .85rem;
  line-height: 1.3;
  /* "backwards" seulement : l'animation ne garde pas son état final */
  animation: ilotEntree .7s var(--ilot-ressort) backwards;
  transition: transform .3s var(--ilot-amorti), opacity .2s ease;
}
/* Vrais ressorts (amortissement 0,7 à l'ouverture, critique à la fermeture) là où linear() existe */
@supports (transition-timing-function: linear(0, 1)) {
  #bur-island {
    --ilot-ressort: linear(0, 0.052, 0.174, 0.327, 0.486, 0.632, 0.757, 0.857, 0.932, 0.984, 1.018, 1.037, 1.045, 1.046, 1.042, 1.035, 1.028, 1.021, 1.014, 1.009, 1.005, 1.002, 1, 0.999, 0.998, 0.998, 1);
    --ilot-amorti: linear(0, 0.065, 0.201, 0.352, 0.492, 0.612, 0.709, 0.784, 0.842, 0.886, 0.918, 0.941, 0.958, 0.97, 0.979, 0.985, 0.99, 0.993, 0.995, 0.997, 1);
  }
}
@keyframes ilotEntree {
  from { opacity: 0; transform: translateY(-64px); }
}
#bur-island [hidden] { display: none !important; }

/* Fenêtre en plein écran : l'îlot au repos se range au-dessus de l'écran comme la barre de titre
   (voir _burFullscreenUISync). Alerte, panneau et assistant restent visibles. */
body.bur-plein-ecran:not(.bur-ilot-peek) #bur-island[data-vue="repos"]:not(:focus-within) {
  transform: translateY(calc(-100% - 40px));
  opacity: 0;
}
body.bur-plein-ecran:not(.bur-ilot-peek) #bur-island[data-vue="repos"]:not(:focus-within) * { pointer-events: none; }
/* Bandeau hors ligne (layout.css, en haut de l'écran) : l'îlot se place dessous, comme le reste de la page */
body.offline-active #bur-island { top: var(--offline-banner-h, 26px); }


.ilot-forme {
  position: relative;
  flex: none;
  display: grid;
  /* Une seule case, de la taille de la forme : sans ces pistes explicites, la case prendrait la
     largeur de la plus grande vue (le panneau) et les autres n'y seraient plus centrées. */
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  justify-items: unsafe center;
  align-items: start;
  width: 132px;
  height: 38px;
  overflow: hidden;
  contain: layout;
  background: #000;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 8px 26px rgba(0,0,0,.45);
  pointer-events: auto;
  transition: width .65s var(--ilot-ressort), height .65s var(--ilot-ressort), border-radius .45s ease, box-shadow .3s ease, transform .16s ease-out;
}
/* Repli : plus court et sans rebond (rien n'a lancé la forme, elle se range) */
#bur-island[data-sens="ferme"] .ilot-forme {
  transition: width .5s var(--ilot-amorti), height .5s var(--ilot-amorti), border-radius .4s ease, box-shadow .3s ease, transform .16s ease-out;
}
#bur-island[data-vue="repos"] .ilot-forme:hover { box-shadow: 0 0 0 1px rgba(255,255,255,.22), 0 8px 26px rgba(0,0,0,.45); }
#bur-island[data-vue="repos"] .ilot-forme:active { transform: scale(.97); }
#bur-island[data-vue="alerte"] .ilot-forme { border-radius: 26px; }
#bur-island[data-vue="panneau"] .ilot-forme {
  border-radius: 30px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 24px 70px rgba(0,0,0,.6);
}
#bur-island[data-vue="assistant"] .ilot-forme {
  border-radius: 26px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.14), 0 18px 50px rgba(0,0,0,.55);
}
#bur-island[data-vue="assistant"] .ilot-forme:focus-within {
  box-shadow: 0 0 0 1.5px var(--asst-color, var(--ilot-accent)), 0 18px 50px rgba(0,0,0,.55);
}
#bur-island.ilot-brut .ilot-forme,
#bur-island.ilot-brut .ilot-vue { transition: none; }

/* Les quatre vues occupent la même case : seule la vue active se voit, les autres restent mesurables.
   Le contenu se matérialise (flou + échelle) plutôt que d'apparaître d'un coup. */
.ilot-vue {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  filter: blur(8px);
  transform: scale(.94);
  transition: opacity .16s ease, filter .16s ease, transform .16s ease, visibility 0s linear .16s;
}
.ilot-vue-on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  filter: none;
  transform: none;
  transition: opacity .3s ease .1s, filter .3s ease .1s, transform .45s var(--ilot-amorti) .06s, visibility 0s;
}

#bur-island button { font: inherit; }
#bur-island button:focus-visible { outline: 2px solid var(--ilot-accent); outline-offset: 2px; }
/* Collés au bord de la forme (qui rogne ce qui dépasse) : repère de focus tracé vers l'intérieur */
.ilot-repos button:focus-visible,
.ilot-alerte button:focus-visible,
#bur-island .ilot-notif:focus-visible,
#bur-island .ilot-fen-b:focus-visible { outline-offset: -2px; }
/* Boutons à fond d'accent : un repère vert sur vert ne se verrait pas */
#bur-island .ilot-al-act:focus-visible,
#bur-island .ilot-btn-plein:focus-visible,
#bur-island .ilot-jour-auj:focus-visible { outline-color: #fff; }
/* Zone d'annonce pour les lecteurs d'écran : présente en permanence, jamais visible */
.ilot-annonce { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ── Repos : pastille ── */
.ilot-repos {
  width: max-content;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 4px;
}
.ilot-lead {
  position: relative;
  width: 30px;
  height: 30px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s;
}
.ilot-lead:hover { background: var(--ilot-case-h); }
.ilot-lead .asst-mascot { width: 24px; height: 24px; display: block; animation: asst-bob 4.2s ease-in-out infinite; }
.ilot-lead[data-mood="sleepy"] .asst-mascot { animation: none; }
.ilot-lead[data-mood="sleepy"] .asst-zzz { opacity: .9; animation: asst-z 2.6s ease-in-out infinite; }
.ilot-lead-point {
  display: none;
  position: absolute;
  top: 1px;
  right: 1px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ilot-rouge);
  box-shadow: 0 0 0 2px #000;
}
.ilot-lead-alerte .ilot-lead-point { display: block; }

.ilot-principal {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: inherit;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s;
}
.ilot-principal:hover { background: rgba(255,255,255,.1); }
.ilot-icone { display: flex; align-items: center; color: var(--ilot-accent); }
.ilot-icone svg { width: 16px; height: 16px; }
.ilot-marque {
  width: 18px;
  height: 18px;
  border-radius: 8px;
  background: var(--ilot-accent);
  color: var(--ilot-sur-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .79rem;
  font-weight: 800;
}
.ilot-titre { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.ilot-act,
.ilot-heure {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 10px;
  border-left: 1px solid var(--ilot-trait);
  font-variant-numeric: tabular-nums;
}
.ilot-act[data-ton="accent"] { color: var(--ilot-accent); }
.ilot-act[data-ton="urgent"] { color: var(--ilot-rouge); }
.ilot-act[data-ton="warn"] { color: var(--ilot-orange); }
.ilot-act b { font-weight: 700; }
.ilot-act-titre { max-width: 150px; overflow: hidden; text-overflow: ellipsis; color: var(--ilot-doux); font-weight: 500; }
.ilot-anneau circle { fill: none; stroke: rgba(255,255,255,.2); stroke-width: 2.5; }
.ilot-anneau .ilot-anneau-p {
  stroke: currentColor;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset .6s ease;
}
.ilot-heure { font-family: 'DM Mono', monospace; font-weight: 500; color: rgba(255,255,255,.82); }
.ilot-cloche {
  height: 30px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px 0 9px;
  border: 0;
  border-radius: 12px;
  background: rgba(255,69,58,.2);
  color: var(--ilot-texte);
  cursor: pointer;
  transition: background .15s;
}
.ilot-cloche:hover { background: rgba(255,69,58,.34); }
.ilot-cloche svg { color: #ff8078; }
.ilot-nb { font-family: 'DM Mono', monospace; font-size: .79rem; font-weight: 700; }
.ilot-pulse { animation: ilotPulse .6s var(--ilot-amorti); }
@keyframes ilotPulse {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* ── Alerte : ce qui partait en toast, une notification qui arrive, l'assistant qui parle ── */
.ilot-alerte {
  position: relative;
  width: max-content;
  max-width: min(560px, calc(100vw - 24px));
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px 8px 8px;
  cursor: pointer;
}
.ilot-al-ico {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10,132,255,.18);
  color: #5aa9ff;
}
.ilot-al-ico[data-ton="ok"] { background: rgba(48,209,88,.17); color: var(--ilot-vert); }
.ilot-al-ico[data-ton="warn"] { background: rgba(255,159,10,.17); color: var(--ilot-orange); }
.ilot-al-ico[data-ton="urgent"] { background: rgba(255,69,58,.19); color: #ff7068; }
.ilot-al-ico.ilot-al-mascotte { background: none; }
.ilot-al-mascotte .asst-mascot { width: 34px; height: 34px; display: block; }
.ilot-al-txt { flex: 1; min-width: 0; padding-right: 2px; }
.ilot-al-titre { font-size: .79rem; font-weight: 600; color: var(--ilot-doux); }
.ilot-al-msg {
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ilot-al-act {
  height: 30px;
  flex: none;
  padding: 0 13px;
  border: 0;
  border-radius: 12px;
  background: var(--ilot-accent);
  color: var(--ilot-sur-accent);
  font-size: .79rem;
  font-weight: 700;
  cursor: pointer;
}
.ilot-al-x {
  width: 28px;
  height: 28px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ilot-case);
  color: var(--ilot-doux);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.ilot-al-x:hover { background: var(--ilot-case-h); color: var(--ilot-texte); }
/* Temps restant : un trait qui se vide (mis en pause au survol, voir _ilotAlertePause) */
.ilot-al-temps {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: rgba(255,255,255,.34);
  transform-origin: left center;
  animation: ilotTemps 4s linear forwards;
}
@keyframes ilotTemps { to { transform: scaleX(0); } }
.ilot-al-change > :not(.ilot-al-temps) { animation: ilotMonte .35s var(--ilot-amorti) backwards; }
@keyframes ilotMonte {
  from { opacity: 0; transform: translateY(6px); }
}

/* ── Panneau : tableau de bord ── */
.ilot-panneau {
  width: min(900px, calc(100vw - 24px));
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.25) transparent;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  outline: none;
}
.ilot-p-tete { display: flex; align-items: center; gap: 12px; padding: 0 2px; }
.ilot-compte {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 4px 14px 4px 4px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .15s;
}
.ilot-compte:hover { background: var(--ilot-case-h); }
.ilot-avatar {
  width: 36px;
  height: 36px;
  flex: none;
  overflow: hidden;
  border-radius: 50%;
  background: rgba(146,191,59,.18);
  color: var(--ilot-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.ilot-avatar img,
.ilot-avatar svg { width: 100%; height: 100%; object-fit: cover; }
.ilot-compte-txt { display: flex; flex-direction: column; min-width: 0; }
.ilot-compte-nom { font-size: .9rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ilot-compte-role { font-size: .79rem; color: var(--ilot-doux); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ilot-p-date { margin-left: auto; color: var(--ilot-doux); white-space: nowrap; }
.ilot-p-date::first-letter { text-transform: uppercase; }
.ilot-p-outils { display: flex; gap: 6px; }
.ilot-rond {
  width: 36px;
  height: 36px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ilot-case);
  color: var(--ilot-texte);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.ilot-rond:hover { background: var(--ilot-accent); color: var(--ilot-sur-accent); }

.ilot-p-reseau {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 14px;
  border-radius: 12px;
  background: rgba(255,159,10,.15);
}
.ilot-res-ico { display: flex; color: var(--ilot-orange); }
.ilot-res-txt { flex: 1; min-width: 0; font-weight: 600; }

.ilot-p-grille { display: grid; grid-template-columns: 1.3fr 1.1fr .95fr; gap: 10px; }
.ilot-tuile {
  min-width: 0;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 13px 14px;
  border-radius: 12px;
  background: var(--ilot-case);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}
/* Les tuiles arrivent en cascade à chaque ouverture du panneau */
.ilot-vue-on .ilot-tuile,
.ilot-vue-on .ilot-p-tete,
.ilot-vue-on .ilot-p-asst { animation: ilotTuile .5s var(--ilot-amorti) backwards; }
.ilot-vue-on .ilot-p-tete { animation-delay: .06s; }
.ilot-vue-on .ilot-tuile:nth-child(1) { animation-delay: .1s; }
.ilot-vue-on .ilot-tuile:nth-child(2) { animation-delay: .14s; }
.ilot-vue-on .ilot-tuile:nth-child(3) { animation-delay: .18s; }
.ilot-vue-on .ilot-tuile:nth-child(4) { animation-delay: .2s; }
.ilot-vue-on .ilot-tuile:nth-child(5) { animation-delay: .24s; }
.ilot-vue-on .ilot-tuile:nth-child(6) { animation-delay: .28s; }
.ilot-vue-on .ilot-p-asst { animation-delay: .3s; }
@keyframes ilotTuile {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
}

.ilot-t-ligne { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 26px; }
.ilot-t-etiq {
  display: flex;
  align-items: center;
  min-height: 26px;
  font-size: .79rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ilot-doux);
}
.ilot-t-etiq[data-etat="encours"] { color: var(--ilot-accent); }
.ilot-t-etiq[data-etat="encours"]::before {
  content: '';
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: ilotVif 1.6s ease-in-out infinite;
}
@keyframes ilotVif {
  50% { opacity: .3; }
}
.ilot-t-pied { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.ilot-flex { flex: 1; }
.ilot-nb-total {
  min-width: 22px;
  padding: 2px 7px;
  border-radius: 8px;
  background: var(--ilot-case-h);
  font-family: 'DM Mono', monospace;
  font-size: .79rem;
  font-weight: 700;
  text-align: center;
}
.ilot-btn {
  height: 32px;
  flex: none;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: var(--ilot-case-h);
  color: var(--ilot-texte);
  font-size: .79rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .1s ease-out;
}
.ilot-btn:hover { background: rgba(255,255,255,.22); }
.ilot-btn:active { transform: scale(.96); }
.ilot-btn-plein { background: var(--ilot-accent); color: var(--ilot-sur-accent); font-weight: 700; }
.ilot-btn-plein:hover { background: #a6d24a; }
.ilot-pas { display: flex; align-items: center; gap: 2px; }
.ilot-pas button {
  min-width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--ilot-doux);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.ilot-pas button:hover:not(:disabled) { background: var(--ilot-case-h); color: var(--ilot-texte); }
.ilot-pas button:disabled { opacity: .4; cursor: default; }
.ilot-pas .ilot-pas-lib { padding: 0 7px; font-size: .79rem; font-variant-numeric: tabular-nums; color: var(--ilot-doux); }
.ilot-pas button.ilot-pas-lib:disabled { opacity: 1; }
.ilot-vide {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
  color: var(--ilot-doux);
}
.ilot-vide-sous { max-width: 100%; font-size: .79rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Agenda du jour : le rendez-vous en cours ou le prochain, avec son avancement */
.ilot-ag-corps { display: flex; gap: 10px; align-items: stretch; }
.ilot-ag-trait { width: 4px; flex: none; border-radius: 2px; background: var(--ilot-accent); }
.ilot-ag-txt { min-width: 0; }
.ilot-ag-titre {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ilot-ag-sous { margin-top: 2px; font-size: .79rem; color: var(--ilot-doux); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ilot-barre { height: 4px; flex: none; overflow: hidden; border-radius: 2px; background: rgba(255,255,255,.13); }
.ilot-barre span {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--ilot-accent);
  transform-origin: left center;
  transition: transform .6s ease;
}
.ilot-barre[data-etat="passe"] span { background: rgba(255,255,255,.38); }
.ilot-ag-etat { font-weight: 700; color: var(--ilot-accent); font-variant-numeric: tabular-nums; }

/* Semaine : heure, mois, sept jours avec leurs rendez-vous */
.ilot-horloge { font-size: 2rem; font-weight: 700; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ilot-mois { margin-top: -4px; font-size: .79rem; color: var(--ilot-doux); }
.ilot-mois::first-letter { text-transform: uppercase; }
.ilot-sem { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin-top: auto; }
.ilot-jour {
  min-width: 0;
  padding: 6px 0 5px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--ilot-texte);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  transition: background .15s;
}
.ilot-jour:hover:not(:disabled) { background: var(--ilot-case-h); }
.ilot-jour:disabled { cursor: default; }
.ilot-jour-l { font-size: .79rem; color: var(--ilot-doux); }
.ilot-jour-n { font-weight: 700; font-variant-numeric: tabular-nums; }
.ilot-jour-auj { background: var(--ilot-accent); color: var(--ilot-sur-accent); }
.ilot-jour-auj:hover:not(:disabled) { background: #a6d24a; }
.ilot-jour-auj .ilot-jour-l { color: var(--ilot-sur-accent); }
.ilot-jour-pts { display: flex; gap: 2px; height: 5px; }
.ilot-jour-pts i { width: 5px; height: 5px; border-radius: 50%; background: var(--ilot-doux); }
.ilot-jour-auj .ilot-jour-pts i { box-shadow: 0 0 0 1px var(--ilot-sur-accent); }

/* Météo du secteur */
.ilot-met-now { display: flex; align-items: center; gap: 9px; }
.ilot-met-ico { display: flex; color: #ffd166; }
.ilot-met-t { font-size: 2rem; font-weight: 700; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ilot-met-d { min-width: 0; display: flex; flex-direction: column; gap: 1px; font-size: .79rem; color: var(--ilot-doux); }
.ilot-met-d b { font-size: .85rem; font-weight: 600; color: var(--ilot-texte); }
.ilot-met-d span { display: flex; align-items: center; gap: 4px; }
.ilot-met-vig { display: flex; align-items: center; gap: 6px; font-size: .79rem; font-weight: 600; color: var(--ilot-orange); }
.ilot-met-jours { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: auto; }
.ilot-met-j {
  padding: 6px 2px;
  border-radius: 12px;
  background: rgba(255,255,255,.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: .79rem;
  color: var(--ilot-doux);
}
.ilot-met-j b { color: var(--ilot-texte); font-weight: 700; font-variant-numeric: tabular-nums; }
.ilot-met-j em { font-style: normal; font-variant-numeric: tabular-nums; }
.ilot-met-j svg { color: var(--ilot-texte); }
.ilot-met-j-vig { box-shadow: inset 0 0 0 1px rgba(255,159,10,.55); }
.ilot-met-j-vig svg { color: var(--ilot-orange); }

/* À suivre : quatre compteurs cliquables */
.ilot-suivi { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ilot-stat {
  min-width: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  color: var(--ilot-texte);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  text-align: left;
  cursor: pointer;
  transition: background .15s, transform .1s ease-out;
}
.ilot-stat:hover:not(:disabled) { background: var(--ilot-case-h); }
.ilot-stat:active:not(:disabled) { transform: scale(.97); }
.ilot-stat:disabled { cursor: default; }
.ilot-stat b { font-family: 'DM Mono', monospace; font-size: 1.4rem; font-weight: 700; line-height: 1.15; }
.ilot-stat span { max-width: 100%; font-size: .79rem; color: var(--ilot-doux); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ilot-stat[data-ton="urgent"] b { color: #ff7068; }
.ilot-stat[data-ton="accent"] b { color: var(--ilot-accent); }
.ilot-stat[data-ton="warn"] b { color: var(--ilot-orange); }
.ilot-stat[data-ton="info"] b { color: #5aa9ff; }
.ilot-stat.ilot-stat-zero b { color: var(--ilot-doux); }

/* Notifications : les trois premières */
.ilot-notifs { display: flex; flex-direction: column; gap: 2px; margin: 0 -6px; }
.ilot-notif {
  min-width: 0;
  min-height: 32px;
  padding: 3px 6px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ilot-texte);
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  transition: background .15s;
}
.ilot-notif:hover { background: var(--ilot-case-h); }
.ilot-notif-ico {
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10,132,255,.18);
  color: #5aa9ff;
}
.ilot-notif-ico[data-ton="ok"] { background: rgba(48,209,88,.17); color: var(--ilot-vert); }
.ilot-notif-ico[data-ton="warn"] { background: rgba(255,159,10,.17); color: var(--ilot-orange); }
.ilot-notif-ico[data-ton="urgent"] { background: rgba(255,69,58,.19); color: #ff7068; }
.ilot-notif-t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ilot-notif-m { flex: none; font-size: .79rem; color: var(--ilot-doux); }

/* Fenêtres ouvertes : y revenir d'un clic */
.ilot-fen { display: flex; flex-direction: column; gap: 2px; margin: 0 -6px; max-height: 132px; overflow-y: auto; scrollbar-width: thin; }
.ilot-fen-b {
  min-width: 0;
  min-height: 32px;
  flex: none;
  padding: 3px 6px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--ilot-texte);
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  cursor: pointer;
  transition: background .15s;
}
.ilot-fen-b:hover { background: var(--ilot-case-h); }
.ilot-fen-i { width: 24px; height: 24px; flex: none; display: flex; align-items: center; justify-content: center; color: var(--ilot-accent); }
.ilot-fen-i svg { width: 16px; height: 16px; }
.ilot-fen-l { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ilot-fen-on { background: rgba(146,191,59,.16); }
.ilot-fen-red .ilot-fen-l,
.ilot-fen-red .ilot-fen-i { opacity: .55; }

/* Barre de l'assistant, au pied du panneau */
.ilot-asst-b {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 8px;
  border: 0;
  border-radius: 12px;
  background: var(--ilot-case);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
  color: var(--ilot-doux);
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: text;
  transition: background .15s, box-shadow .15s;
}
.ilot-asst-b:hover { background: var(--ilot-case-h); box-shadow: inset 0 0 0 1px var(--asst-color, var(--ilot-accent)); }
.ilot-asst-m { width: 32px; height: 32px; flex: none; display: flex; align-items: center; justify-content: center; color: var(--ilot-accent); }
.ilot-asst-m .asst-mascot { width: 30px; height: 30px; display: block; }
.ilot-asst-t { flex: 1; min-width: 0; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ilot-asst-s { flex: none; font-size: .79rem; }
.ilot-asst-b kbd {
  flex: none;
  padding: 3px 8px;
  border-radius: 8px;
  background: var(--ilot-case-h);
  font-family: 'DM Mono', monospace;
  font-size: .79rem;
  color: var(--ilot-doux);
}

/* ── Assistant : sa conversation (assistant_core.js, #asst-island) est logée dans la forme ──
   Hors de l'îlot (le temps que bureau_ilot.js se charge), son propre rectangle replié ferait doublon avec
   la pastille : on le masque. Dans l'îlot, il perd position, fond et taille propres : la forme les porte. */
body.bur-shell-active > .asst-island:not([data-state="open"]) { display: none; }
body.bur-shell-active > .asst-island[data-state="open"] { top: 54px; }
.ilot-assistant { width: min(500px, calc(100vw - 24px)); }
#bur-island .asst-island,
#bur-island .asst-island[data-state="open"] {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  height: var(--asst-h);
  min-height: 50px;
  transform: none;
  z-index: auto;
  border-radius: 0;
  background: none;
  box-shadow: none;
  transition: none;
}
#bur-island .asst-island .asst-mascot-wrap { left: 14px; top: 25px; transform: translate(0, -50%); }
#bur-island .asst-island[data-state="open"] .asst-mascot-wrap { transform: translate(0, -50%) scale(1.45); }
#bur-island .asst-island .asst-dot,
#bur-island .asst-island .asst-peek,
#bur-island .asst-island .asst-hit { display: none; }

/* ── Écrans étroits (le mode bureau commence à 861 px) : deux colonnes ── */
@media (max-width: 1024px) {
  .ilot-p-grille { grid-template-columns: 1fr 1fr; }
  .ilot-p-date { display: none; }
  .ilot-p-outils { margin-left: auto; }
}

/* ── Mode léger et confort visuel ── */
html.perf-lite .bur-win-titlebar { backdrop-filter: none; -webkit-backdrop-filter: none; }
html.perf-lite .bur-win-entering,
html.perf-lite .bur-win-closing,
html.perf-lite .bur-win-minimizing { animation: none; }
html.perf-lite #bur-island,
html.perf-lite #bur-island * { animation: none !important; }
html.perf-lite .ilot-forme,
html.perf-lite .ilot-vue { transition: none; filter: none; }
html.perf-lite .ilot-al-temps { display: none; }

/* Mouvement réduit : la forme change de taille sans rebond, le contenu se fond sans flou ni échelle
   (variables.css ramène déjà toutes les durées à presque rien) */
@media (prefers-reduced-motion: reduce) {
  .ilot-vue { filter: none; transform: none; }
  .ilot-al-temps { display: none; }
}
@media (prefers-contrast: more) {
  .ilot-forme { box-shadow: 0 0 0 2px #fff; }
  #bur-island { --ilot-doux: rgba(255,255,255,.86); --ilot-case: rgba(255,255,255,.14); }
}

/* Menus flottants posés sur <body> (menu contextuel du Dossier technique, prix du devis, date de
   fin des tâches) : en mode bureau, fenêtres et modales prennent des z-index de 2000 à 7000
   (bureau.js, _burNextZ) - ces menus doivent toujours passer devant elles, sous les
   confirmations (8000). */
body.bur-shell-active .dt-ctx,
body.bur-shell-active .dv-prix-pop,
body.bur-shell-active .pt-datefin-pop,
body.bur-shell-active .dt-dragghost,
body.bur-shell-active .ch-tab-ghost { z-index: 7500 !important; }
