/* ============================================================
   AZUR — nouveau système de design (glassmorphism bleuté)
   À inclure APRÈS common.css et dark-mode.css, uniquement sur
   les pages déjà migrées. N'affecte aucune page qui ne le
   charge pas explicitement.

   Bascule clair/sombre : synchronisée avec le mécanisme existant
   (localStorage "darkMode" + classe body.dark-mode) — voir le
   script "Gestion du mode sombre/clair" qui pose en plus
   l'attribut data-theme sur <html>.
   ============================================================ */

@font-face{
  font-family:"Bricolage";
  font-style:normal;
  font-weight:500 800;
  font-display:swap;
  src:url("../fonts/bricolage.woff2") format("woff2");
}
@font-face{
  font-family:"JetBrains Mono";
  font-style:normal;
  font-weight:400 700;
  font-display:swap;
  src:url("../fonts/jetbrains-mono.woff2") format("woff2");
}

:root{
  --s1:#eef4fc; --s2:#d9e8fb; --s3:#b9d6f7;
  --ink:#0d2440; --ink-2:#2b4a72; --mist:#5c7699; --mist-soft:#7d93b3;

  --glass: rgba(233,242,255,.55);
  --glass-strong: rgba(233,242,255,.93);
  --glass-line: rgba(255,255,255,.7);
  --glass-hi: rgba(255,255,255,.8);
  --glass-sh: rgba(10,30,60,.18);

  /* Accent principal. Ces 5 variables (+ --s1/--s2/--s3 ci-dessus) sont les
     seules à redéfinir pour changer la couleur du cloud : la surcharge est
     émise en ligne dans le <head> par cloudColorStyle() (includes/cloud-colors.php).
     Les triplets *-rgb servent à composer les rgba (ombres, fonds translucides,
     bordures) sans réécrire la couleur à chaque fois. */
  --azure:#1d4ed8;
  --azure-glow:#3b73f0;
  --azure-press:#163fae;
  --azure-rgb:29,78,216;
  --azure-glow-rgb:59,115,240;
  --azure-soft: rgba(var(--azure-glow-rgb),.14);

  --danger:#c23b4a;      --danger-soft: rgba(194,59,74,.13);
  --ok:#2f8f66;          --ok-soft: rgba(47,143,102,.14);
  --warning:#b3791f;     --warning-soft: rgba(179,121,31,.15);
  --neutral-soft: rgba(127,140,150,.14);

  --t-image:#d9607a;  --t-image-soft: rgba(217,96,122,.14);
  --t-doc:#5b6fae;    --t-doc-soft: rgba(91,111,174,.14);
  --t-sheet:#2f9e6e;  --t-sheet-soft: rgba(47,158,110,.14);
  --t-video:#8b6fd1;  --t-video-soft: rgba(139,111,209,.14);
  --t-archive:#c06a9e;--t-archive-soft: rgba(192,106,158,.14);
  --t-audio:#c9862f;  --t-audio-soft: rgba(201,134,47,.14);
  --t-other:#64809c;  --t-other-soft: rgba(100,128,156,.14);

  --r-xl:28px; --r-lg:20px; --r-md:14px; --r-sm:10px;

  /* Taille des tuiles en vue grille (paramètre Apparence → Taille des
     tuiles) : un seul multiplicateur, appliqué par calc() à chaque dimension
     de .file-card ci-dessous — jamais de valeurs dupliquées entre la grille
     réelle et l'aperçu du panneau de paramètres (.tile-size-preview réutilise
     ces mêmes --tile-base-*). 1 = taille actuelle, inchangée par défaut. */
  --tile-scale:1;
  --tile-base-w:6.6rem;
  --tile-base-min:6.4rem;
  --tile-base-icon:3.2rem;
  --tile-base-icon-svg:1.25rem;
  --tile-base-icon-svg-md:1.5rem;
  --tile-base-font:.72rem;
  --tile-base-font-sub:.62rem;
  --tile-base-gap-row:1.1rem;
  --tile-base-gap-col:.6rem;
  --tile-base-pad-y:.6rem;
  --tile-base-pad-x:.35rem;
  --tile-base-radius:14px;
  --tile-base-radius-icon:14px;
  --font-display:"Bricolage", ui-sans-serif, system-ui, sans-serif;
  --font-mono:"JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --scroll-thumb: rgba(92,118,153,.30);
  --scroll-thumb-hover: rgba(92,118,153,.55);
}
html[data-theme="dark"]{
  --s1:#030814; --s2:#071b35; --s3:#0d2c52;
  --ink:#e9f2fc; --ink-2:#b8cce6; --mist:#7f97bd; --mist-soft:#6c84a8;
  --glass: rgba(7,19,38,.5);
  --glass-strong: rgba(7,19,38,.94);
  --glass-line: rgba(255,255,255,.09);
  --glass-hi: rgba(255,255,255,.08);
  --glass-sh: rgba(0,0,0,.5);
  --azure-glow:#79aeff;
  --azure-press:#5f92e0;
  --azure-glow-rgb:121,174,255;
  --azure-soft: rgba(var(--azure-glow-rgb),.18);
  --danger-soft: rgba(224,110,130,.18);
  --ok-soft: rgba(72,190,140,.18);
  --warning-soft: rgba(224,163,72,.18);
  --neutral-soft: rgba(140,164,190,.16);

  --t-image-soft: rgba(224,120,144,.20); --t-doc-soft: rgba(130,150,224,.20);
  --t-sheet-soft: rgba(78,196,146,.20); --t-video-soft: rgba(166,146,230,.20);
  --t-archive-soft: rgba(212,140,190,.20); --t-audio-soft: rgba(219,160,90,.20);
  --t-other-soft: rgba(140,164,190,.20);

  --scroll-thumb: rgba(160,185,215,.26);
  --scroll-thumb-hover: rgba(160,185,215,.5);
}

/* ---------- scrollbar discrète, à l'échelle du site ----------
   Piste transparente + pouce translucide arrondi, "flottant" grâce à une
   bordure transparente + background-clip (la gouttière fait 10px mais le
   pouce visible n'en fait que 4). Les couleurs viennent des variables de
   thème : rien à redéfinir pour le mode sombre.
   Firefox n'a pas les pseudo-éléments ::-webkit-* mais hérite de
   scrollbar-width/scrollbar-color posés sur <html>. */
html{
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) transparent;
}
::-webkit-scrollbar{ width: 10px; height: 10px; }
::-webkit-scrollbar-track{ background: transparent; }
::-webkit-scrollbar-corner{ background: transparent; }
::-webkit-scrollbar-thumb{
  background-color: var(--scroll-thumb);
  border: 3px solid transparent;
  background-clip: padding-box;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover{ background-color: var(--scroll-thumb-hover); }
/* Sur les petites zones scrollables (menus, listes), gouttière plus fine. */
.chat-pop ::-webkit-scrollbar,
.acct-menu ::-webkit-scrollbar,
.spotlight-results::-webkit-scrollbar,
.settings-tab-content::-webkit-scrollbar{ width: 8px; height: 8px; }

/* ---------- fond de page ---------- */
body{
  font-family: var(--font-mono);
  background: linear-gradient(200deg, var(--s1) 0%, var(--s2) 55%, var(--s3) 100%) !important;
  background-attachment: fixed;
  transition: background 1s ease;
}
body.dark-mode{
  /* Mêmes variables que le mode clair : html[data-theme="dark"] les a déjà
     redéfinies, donc le fond suit la palette choisie sans valeur en dur. */
  background: linear-gradient(200deg, var(--s1) 0%, var(--s2) 55%, var(--s3) 100%) !important;
}
.azur-display{ font-family: var(--font-display); }

/* ---------- reskin du panneau "verre" existant ----------
   Affecte tout élément .glass-card restant sur la page
   (cartes de fichiers, bannière de vérification d'e-mail). */
.glass-card{
  background: var(--glass) !important;
  border: 1px solid var(--glass-line) !important;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 20px 40px -24px var(--glass-sh);
}
body.dark-mode .glass-card{
  background: var(--glass-strong) !important;
  border-color: var(--glass-line) !important;
}
.file-card h3{ font-family: var(--font-mono); }

/* ---------- teinte des badges d'icônes par type de fichier ----------
   Remplace les classes Tailwind (bg-red-50/text-red-500, etc.) rendues
   par le switch PHP, pour retrouver exactement les teintes de l'artifact
   (notamment l'audio en ambre plutôt qu'en rose, trop proche des images). */
.tbadge-image{ background:var(--t-image-soft) !important; color:var(--t-image) !important; }
.tbadge-doc{ background:var(--t-doc-soft) !important; color:var(--t-doc) !important; }
.tbadge-sheet{ background:var(--t-sheet-soft) !important; color:var(--t-sheet) !important; }
.tbadge-video{ background:var(--t-video-soft) !important; color:var(--t-video) !important; }
.tbadge-archive{ background:var(--t-archive-soft) !important; color:var(--t-archive) !important; }
.tbadge-audio{ background:var(--t-audio-soft) !important; color:var(--t-audio) !important; }
.tbadge-other{ background:var(--t-other-soft) !important; color:var(--t-other) !important; }
.tbadge-folder{ background:var(--azure) !important; color:#fff !important; }
body.dark-mode .tbadge-folder{ background:var(--azure-glow) !important; color:white !important; }

/* ---------- bouton "retirer des favoris" (favorites.php) ----------
   Étoile pleine ambre (même teinte que le favori-btn du menu "...") au
   repos, qui passe au rouge danger au survol pour signaler l'action de
   suppression. */
.fav-remove-btn{
  width:1.9rem; height:1.9rem; border-radius:999px; display:flex; align-items:center; justify-content:center;
  background:transparent; border:none; color:#b3791f; cursor:pointer; flex-shrink:0;
  transition: background .15s ease, color .15s ease;
}
.fav-remove-btn:hover{ background:var(--danger-soft); color:var(--danger); }

/* Icônes décoratives (menu de filtre) reprenant les mêmes teintes que les
   badges de fichiers ; en classes (pas de style inline) pour survivre au
   remplacement de <i data-lucide> par un <svg> fait par lucide.createIcons(). */
.ic-azure{ color:var(--azure) !important; }
body.dark-mode .ic-azure{ color:var(--azure-glow) !important; }
.ic-image{ color:var(--t-image) !important; }
.ic-doc{ color:var(--t-doc) !important; }
.ic-sheet{ color:var(--t-sheet) !important; }
.ic-video{ color:var(--t-video) !important; }
.ic-archive{ color:var(--t-archive) !important; }
.ic-audio{ color:var(--t-audio) !important; }
.ic-other{ color:var(--t-other) !important; }
.file-card.selected{ background: var(--azure-soft) !important; box-shadow: 0 0 0 2px rgba(var(--azure-rgb),.35) !important; }

/* ---------- statusbar (remplace <header>) ---------- */
.statusbar.glass-card{
  background: var(--glass) !important;
  border: 1px solid var(--glass-line) !important;
  border-radius:999px;
  padding:.55rem .8rem .55rem 1rem;
  display:flex; align-items:center; gap:1rem;
}
body.dark-mode .statusbar.glass-card{ background: var(--glass) !important; }
.statusbar .brand{ display:flex; align-items:center; gap:.5rem; border:none; background:transparent; cursor:pointer; color:var(--ink); padding:0; flex-shrink:0; }
.statusbar .brand-mark{ width:1.9rem; height:1.9rem; border-radius:.7rem; display:flex; align-items:center; justify-content:center; background:linear-gradient(155deg,var(--azure-glow),var(--azure)); color:#fff; flex-shrink:0; }
.statusbar .brand-name{ font-family:var(--font-display); font-weight:700; font-size:1.05rem; color:var(--ink); }
.crumb{ flex:1; display:flex; flex-wrap:nowrap; align-items:center; gap:.3rem; font-size:.76rem; font-weight:400; color:var(--mist); overflow:hidden; white-space:nowrap; min-width:0; margin:0 .75rem; }
.crumb a{ color:inherit; text-decoration:none; }
.crumb a:hover{ color:var(--ink); text-decoration:underline; }
.crumb svg{ color:var(--mist); opacity:.6; flex-shrink:0; width:.75em; height:.75em; }
.crumb span.current{ color:var(--ink); font-weight:600; }
.crumb-seg{ display:inline-flex; align-items:center; gap:.3rem; min-width:0; }
.crumb-seg .current, .crumb-seg > a{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.status-right{ margin-left:auto; display:flex; align-items:center; gap:.5rem; flex-shrink:0; }

.ring-btn{
  position:relative; width:2.5rem; height:2.5rem; border-radius:50%; border:none; cursor:pointer;
  background:
    radial-gradient(closest-side, var(--glass-strong) 62%, transparent 63% 100%),
    conic-gradient(var(--azure-glow) calc(var(--pct,0)*1%), rgba(127,140,150,.28) 0);
  display:flex; align-items:center; justify-content:center;
}
.ring-btn span{ font-size:.56rem; font-weight:700; color:var(--ink-2); font-family:var(--font-mono); }

.spotlight-btn{ display:flex; align-items:center; gap:.4rem; padding:.4rem .6rem; border-radius:999px; border:1px solid var(--glass-line); background:var(--glass); cursor:pointer; color:var(--mist); flex-shrink:0; font-size:.78rem; font-family:var(--font-mono); }
.spotlight-btn:hover{ color:var(--ink); }

/* ---------- palette de recherche (habille le vrai champ #search-bar) ---------- */
.spotlight-overlay{ position:fixed; inset:0; z-index:300; background:rgba(6,14,26,.3); -webkit-backdrop-filter:blur(4px); backdrop-filter:blur(4px); display:flex; align-items:flex-start; justify-content:center; padding-top:12vh; }
.spotlight-overlay[hidden]{ display:none; }
.spotlight-panel{ width:100%; max-width:34rem; margin:0 1rem; border-radius: var(--r-xl); padding:.3rem; background:var(--glass-strong); border:1px solid var(--glass-line); -webkit-backdrop-filter:blur(20px) saturate(160%); backdrop-filter:blur(20px) saturate(160%); box-shadow: inset 0 1px 0 var(--glass-hi), 0 30px 60px -28px var(--glass-sh); }
.spotlight-input-row{ display:flex; align-items:center; gap:.7rem; padding:.8rem 1rem; }
.spotlight-input-row input{ flex:1; border:none; background:transparent; outline:none; font-size:1rem; color:var(--ink); font-family:var(--font-mono); }
/* dark-mode.css a une règle globale, non limitée à un conteneur,
   "body.dark-mode input:not([type=checkbox]):not(...):not(...):not(...)"
   avec 4 :not() qui lui donnent une spécificité largement supérieure à
   ".spotlight-input-row input" (même en !important côté vs côté) — elle
   forçait un fond #1e293b sur #search-bar. Un sélecteur d'ID gagne
   toujours face à des classes, quel que soit leur nombre. */
#search-bar{ background: transparent !important; border: none !important; color: var(--ink) !important; }

/* ---------- résultats de la palette de recherche ----------
   Fidèle à l'artifact : les résultats vivent DANS le panneau (liste
   .sp-row), pas en fermant la palette pour révéler des tuiles dans la
   grille du fond — c'était le bug signalé ("dès que j'entre une lettre,
   ça cache le modal et affiche les tuiles sur la page"). */
.spotlight-results{ max-height:50vh; overflow-y:auto; padding:.3rem; }
.spotlight-results:not(:empty){ border-top:1px solid var(--glass-line); }
.sp-row{ display:flex; align-items:center; gap:.65rem; padding:.6rem .7rem; border-radius:var(--r-md); cursor:pointer; }
.sp-row:hover{ background:rgba(127,140,150,.14); }
.sp-row .sp-glyph{ width:2rem; height:2rem; border-radius:.6rem; flex-shrink:0; display:flex; align-items:center; justify-content:center; }
.sp-row .sp-glyph i, .sp-row .sp-glyph svg{ width:1rem; height:1rem; }
.sp-row .sp-name{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.8rem; font-weight:600; color:var(--ink); }
.sp-row .sp-path{ font-size:.65rem; color:var(--mist-soft); max-width:35%; flex-shrink:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sp-row mark{ background:var(--azure-soft); color:var(--azure); border-radius:.2rem; padding:0 .1rem; }
body.dark-mode .sp-row mark{ color:var(--azure-glow); }
.sp-row-locked{ opacity:.55; cursor:not-allowed; }
.sp-empty{ padding:1.2rem; text-align:center; color:var(--mist); font-size:.8rem; }

.avatarbtn{ border:none; background:transparent; cursor:pointer; padding:0; }
.azur-avatar{ width:2.15rem; height:2.15rem; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:.7rem; font-weight:700; color:#fff; background:linear-gradient(155deg,var(--azure-glow),var(--azure)); font-family:var(--font-display); }
/* Photo de profil : remplace la pastille d'initiales, même gabarit (voir
   includes/avatar.php) — object-fit pour ne jamais déformer une image qui
   n'est pas carrée, background:none pour ne pas laisser transparaître le
   dégradé sous une photo à zones transparentes (PNG). */
.azur-avatar.avatar-img{ object-fit: cover; background: none; }

/* ---------- dock (remplace <aside> + nav mobile) ---------- */
.dock.glass-card, .verify-card.glass-card{ background: var(--glass-strong) !important; }
body.dark-mode .dock.glass-card, body.dark-mode .verify-card.glass-card{ background: var(--glass-strong) !important; }
.dock{
  position:fixed; left:50%; bottom:.85rem; transform:translateX(-50%); z-index:150;
  display:flex; align-items:flex-end; gap:.4rem; padding:.5rem; border-radius:20px;
  max-width:calc(100vw - 1rem); overflow-x:auto; scrollbar-width:none; -ms-overflow-style:none;
}
.dock::-webkit-scrollbar{ display:none; width:0; height:0; }
/* "overflow-x:auto" sans overflow-y explicite force silencieusement
   overflow-y à "auto" aussi (règle CSS : si l'un des deux axes n'est
   pas "visible", l'autre ne peut plus l'être non plus) — ça rognait
   .dock-tip, qui se positionne AU-DESSUS du dock donc hors de sa boîte.
   Le défilement horizontal ne sert que sur mobile (beaucoup d'items sur
   un petit écran) ; sur souris/trackpad, on repasse en overflow:visible
   pour que l'infobulle au survol reste visible. */
@media (hover:hover) and (pointer:fine){
  .dock{ overflow:visible; }
}
.dock-item{
  position:relative; width:2.75rem; height:2.75rem; border-radius:14px; border:none; cursor:pointer; text-decoration:none;
  display:flex; align-items:center; justify-content:center; color:var(--ink-2); background:rgba(127,140,150,.12); flex-shrink:0;
  box-sizing:border-box;
  transition: transform .16s ease, background .16s ease;
}
.dock-item:hover{ transform:translateY(-6px) scale(1.08); background:rgba(127,140,150,.22); }
.dock-item.active{ background:var(--azure); color:#fff; }
body.dark-mode .dock-item.active{ background:var(--azure-glow); color:#0d1a2b; }
.dock-item.active::after{ content:""; position:absolute; bottom:-.45rem; left:50%; width:4px; height:4px; border-radius:50%; background:var(--azure); transform:translateX(-50%); }
body.dark-mode .dock-item.active::after{ background:var(--azure-glow); }
/* Taille des icônes : posée en classes Tailwind directement sur
   chaque <i data-lucide>, car lucide.createIcons() remplace la
   balise <i> par un <svg> (un sélecteur i[data-lucide] ne matche
   plus rien une fois l'icône rendue). */
.dock-sep{ width:1px; align-self:stretch; margin:.25rem .2rem; background:var(--glass-line); flex-shrink:0; }
.dock-team-avatar{ font-family:var(--font-display); font-weight:700; font-size:.72rem; color:#fff; }
/* Avatar de team personnalisé : occupe l'intégralité du bouton (pas de fond
   visible autour), contrairement au fallback en initiales ci-dessus qui
   garde le dégradé violet posé en inline style sur .dock-item. */
.dock-item-avatar{ width:100%; height:100%; object-fit:cover; border-radius:14px; display:block; }
.dock-tip{
  position:absolute; bottom:calc(100% + .55rem); left:50%;
  padding:.35rem .7rem; border-radius:.6rem; font-size:.68rem; font-weight:600; font-family:var(--font-mono);
  white-space:nowrap; pointer-events:none;
  background:var(--glass-strong); border:1px solid var(--glass-line); color:var(--ink);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 10px 20px -10px var(--glass-sh);
  opacity:0; transform:translate(-50%, 4px) scale(.94); transform-origin:bottom center;
  transition: opacity .15s ease, transform .15s ease;
}
.dock-item:hover .dock-tip{ opacity:1; transform:translate(-50%, 0) scale(1); }
/* Le survol n'existe pas au toucher : sur mobile/tablette, autant ne
   pas garder l'infobulle dans le DOM (elle ne s'ouvrira jamais mais
   pourrait gêner un lecteur d'écran tactile). */
@media (hover:none){
  .dock-tip{ display:none; }
}

/* Animation d'apparition commune à tous les panneaux flottants
   (menu compte, jauge stockage, popover de création, ...), identique
   à celle de l'artifact — absente jusqu'ici (apparition instantanée). */
@keyframes azur-pop{ from{ opacity:0; transform:translateY(6px); } to{ opacity:1; transform:translateY(0); } }

/* ---------- menu compte (avatar) ---------- */
.acct-menu{ position:fixed; z-index:250; min-width:13.5rem; border-radius:var(--r-lg); padding:.35rem; display:none; background:var(--glass-strong); border:1px solid var(--glass-line); -webkit-backdrop-filter:blur(20px) saturate(160%); backdrop-filter:blur(20px) saturate(160%); box-shadow: inset 0 1px 0 var(--glass-hi), 0 24px 48px -26px var(--glass-sh); }
.acct-menu.open{ display:block; animation: azur-pop .14s ease-out; }
.acct-menu-head{ display:flex; align-items:center; gap:.6rem; padding:.5rem .6rem .7rem; }
.acct-menu-head .azur-avatar{ width:2.3rem; height:2.3rem; font-size:.76rem; flex-shrink:0; }
.acct-menu-name{ font-size:.82rem; font-weight:700; color:var(--ink); font-family:var(--font-display); line-height:1.25; }
.acct-menu-email{ font-size:.65rem; color:var(--mist); margin-top:.1rem; word-break:break-all; }
.acct-sep{ height:1px; background:var(--glass-line); margin:.3rem .3rem; }
.acct-item{ display:flex; align-items:center; gap:.6rem; width:100%; padding:.55rem .7rem; border-radius:var(--r-sm); border:none; background:transparent; font-size:.8rem; font-weight:600; color:var(--ink-2); cursor:pointer; text-align:left; text-decoration:none; font-family:var(--font-mono); }
.acct-item:hover{ background:rgba(127,140,150,.14); color:var(--ink); }
.acct-item.danger{ color:var(--danger); }

/* ---------- popover stockage (jauge) ---------- */
.storage-pop{ position:fixed; z-index:130; width:13rem; border-radius:var(--r-lg); padding:.9rem; display:none; background:var(--glass-strong); border:1px solid var(--glass-line); -webkit-backdrop-filter:blur(20px) saturate(160%); backdrop-filter:blur(20px) saturate(160%); box-shadow: inset 0 1px 0 var(--glass-hi), 0 24px 48px -26px var(--glass-sh); }
.storage-pop.open{ display:block; animation: azur-pop .14s ease-out; }
.storage-pop .row{ display:flex; justify-content:space-between; font-size:.7rem; font-weight:700; color:var(--mist); margin-bottom:.5rem; }
.storage-pop .row b{ color:var(--azure); font-family:var(--font-mono); }
body.dark-mode .storage-pop .row b{ color:var(--azure-glow); }
.storage-pop .track{ height:6px; border-radius:999px; background:rgba(127,140,150,.25); overflow:hidden; margin-bottom:.5rem; }
.storage-pop .fill{ height:100%; border-radius:999px; background:linear-gradient(90deg,var(--azure-glow),var(--azure)); }
.storage-pop p{ font-size:.68rem; color:var(--mist-soft); text-align:center; }

/* ---------- barre de sélection multiple : mêmes forme/emplacement/couleurs
   que .multibar dans l'artifact (pilule fixe au-dessus du dock). ---------- */
#multi-action-bar{
  position:fixed !important;
  left:50% !important;
  bottom:5.1rem !important;
  transform:translateX(-50%) !important;
  z-index:140 !important;
  display:flex !important;
  align-items:center !important;
  gap:.8rem !important;
  padding:.55rem .9rem !important;
  border-radius:999px !important;
  /* "left:50%" + largeur auto amène certains navigateurs à calculer la
     largeur "shrink-to-fit" en ne considérant comme espace disponible
     que ce qui reste à DROITE du point left:50% (donc la moitié de
     l'écran), avant même d'appliquer translateX(-50%) pour recentrer :
     sur mobile ça plafonnait la barre à ~187px et forçait "Supprimer"/
     "Annuler" à passer à la ligne, alors que max-width laissait pourtant
     plus de place. width:max-content force un dimensionnement au
     contenu réel, sans ce plafond artificiel. */
  width:max-content !important;
  max-width:calc(100vw - 1.2rem) !important;
  flex-wrap:wrap !important;
  justify-content:center !important;
  row-gap:.4rem !important;
  background: var(--glass-strong) !important;
  border: 1px solid var(--glass-line) !important;
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 20px 40px -20px var(--glass-sh) !important;
  font-family: var(--font-mono);
}
#multi-action-bar.hidden{ display:none !important; }
#multi-action-count{ color: var(--azure) !important; font-size:.78rem; font-weight:700; white-space:nowrap; }
body.dark-mode #multi-action-count{ color: var(--azure-glow) !important; }
#multi-action-bar button{
  border:none !important; cursor:pointer; font-weight:700 !important; font-size:.72rem !important;
  padding:.45rem .8rem !important; border-radius:999px !important; display:flex; align-items:center;
  gap:.35rem; font-family: var(--font-mono); white-space:nowrap;
}
#multi-action-bar button i[data-lucide], #multi-action-bar button svg{ width:.85rem; height:.85rem; flex-shrink:0; }
#multi-move-btn{ background: var(--azure) !important; color:#fff !important; }
body.dark-mode #multi-move-btn{ background: var(--azure-glow) !important; color:#0d1a2b !important; }
#multi-delete-btn{ background: var(--danger) !important; color:#fff !important; }
#multi-cancel-btn{ background: transparent !important; color: var(--mist) !important; }
#multi-cancel-btn:hover{ color: var(--ink) !important; }

/* ---------- fond animé : rubans d'aurore (canvas #azur-aurora) ---------- */
#azur-aurora{ position:fixed; inset:0; z-index:-1; width:100%; height:100%; pointer-events:none; }
/* Le blocage du scroll horizontal était sur <body> (overflow-x:hidden).
   Bug connu de Safari iOS : quand <body> a un overflow non-"visible" ET
   contient des enfants position:fixed avec backdrop-filter (canvas
   d'aurore, dock, statusbar, ...), le flou n'est plus appliqué — le
   fond défile "cru", sans flou, derrière le verre. Déplacé sur <html>,
   qui n'est pas concerné par ce bug. */
html{ overflow-x:hidden; }

/* ---------- fichiers en mode grille = tuiles "bureau" ----------
   On ne touche pas au HTML généré par PHP (.file-card, .more-btn,
   .dropdown-actions, h3/p/.mod-date restent identiques pour que
   tout le JS existant continue de fonctionner) : uniquement une
   reskin CSS structurelle, sur le même principe que les règles
   .list-view déjà présentes plus bas dans la page. Désactivée
   quand body.list-view est actif (le mode liste garde son propre
   habillage existant, plus bas dans le fichier). */
body:not(.list-view) #content-files{
  display:grid !important;
  grid-template-columns:repeat(auto-fill, minmax(calc(var(--tile-base-min) * var(--tile-scale)),1fr)) !important;
  gap:calc(var(--tile-base-gap-row) * var(--tile-scale)) calc(var(--tile-base-gap-col) * var(--tile-scale)) !important;
  justify-items:center;
}
body:not(.list-view) #content-files .file-card{
  background:transparent !important;
  border:none !important;
  box-shadow:none !important;
  -webkit-backdrop-filter:none !important;
  backdrop-filter:none !important;
  width:calc(var(--tile-base-w) * var(--tile-scale));
  padding:calc(var(--tile-base-pad-y) * var(--tile-scale)) calc(var(--tile-base-pad-x) * var(--tile-scale)) !important;
  border-radius:calc(var(--tile-base-radius) * var(--tile-scale)) !important;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:.35rem;
  transition: background .15s ease;
}
body:not(.list-view) #content-files .file-card:hover,
body:not(.list-view) #content-files .file-card.selected{
  background:var(--azure-soft) !important;
  box-shadow:none !important;
}
body.dark-mode:not(.list-view) #content-files .file-card:hover,
body.dark-mode:not(.list-view) #content-files .file-card.selected{
  background:var(--azure-soft) !important;
}
/* Range icône + bouton "..." : icône centrée, bouton en médaillon coin */
body:not(.list-view) #content-files .file-card > div.flex.justify-between{
  justify-content:center;
  width:100%;
  margin-bottom:0 !important;
  position:relative;
}
body:not(.list-view) #content-files .file-card .p-2\.5,
body:not(.list-view) #content-files .file-card .p-3{
  width:calc(var(--tile-base-icon) * var(--tile-scale)) !important;
  height:calc(var(--tile-base-icon) * var(--tile-scale)) !important;
  padding:0 !important;
  display:flex !important;
  align-items:center;
  justify-content:center;
  border-radius:calc(var(--tile-base-radius-icon) * var(--tile-scale)) !important;
  /* Ombre douce façon "tile-glyph" de l'artifact, à la place du
     shadow-md Tailwind (encore amplifié en noir dur par dark-mode.css). */
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 10px 16px -12px var(--glass-sh) !important;
}
/* L'icône Lucide est un <svg> injecté à l'exécution (lucide.createIcons()
   remplace <i data-lucide> par un <svg> qui hérite de ses classes) : cibler
   i[data-lucide] seul ne suffit pas, il faut aussi svg — même défense à
   double sélecteur que .list-view plus bas dans ce fichier. Les tailles de
   base (1.25rem/1.5rem) reproduisent les classes Tailwind w-5/w-6 d'origine
   à l'échelle 1, pour qu'aucun changement ne soit visible tant que le
   paramètre de taille de tuile n'est pas touché. */
body:not(.list-view) #content-files .file-card i[data-lucide],
body:not(.list-view) #content-files .file-card svg.lucide,
body:not(.list-view) #content-files .file-card svg{
  width:calc(var(--tile-base-icon-svg) * var(--tile-scale)) !important;
  height:calc(var(--tile-base-icon-svg) * var(--tile-scale)) !important;
}
@media (min-width: 768px){
  body:not(.list-view) #content-files .file-card i[data-lucide],
  body:not(.list-view) #content-files .file-card svg.lucide,
  body:not(.list-view) #content-files .file-card svg{
    width:calc(var(--tile-base-icon-svg-md) * var(--tile-scale)) !important;
    height:calc(var(--tile-base-icon-svg-md) * var(--tile-scale)) !important;
  }
}
body:not(.list-view) #content-files .file-card > div.flex.justify-between > div.relative{
  position:absolute;
  top:-.5rem;
  right:-.6rem;
  opacity:0;
  transition:opacity .15s ease;
}
body:not(.list-view) #content-files .file-card:hover > div.flex.justify-between > div.relative,
body:not(.list-view) #content-files .file-card.menu-open > div.flex.justify-between > div.relative{
  opacity:1;
}
@media (hover:none){
  body:not(.list-view) #content-files .file-card > div.flex.justify-between > div.relative{ opacity:1; }
}
body:not(.list-view) #content-files .file-card .more-btn{
  background: var(--glass-strong);
  border:1px solid var(--glass-line);
}
body:not(.list-view) #content-files .file-card h3{
  font-size:calc(var(--tile-base-font) * var(--tile-scale)) !important;
  font-family: var(--font-mono);
  white-space:normal;
  line-height:1.25;
  max-width:100%;
  overflow-wrap:break-word;
  word-break:break-word;
  hyphens:auto;
}
body:not(.list-view) #content-files .file-card p{
  font-size:calc(var(--tile-base-font-sub) * var(--tile-scale)) !important;
}
/* Aperçu image (réglage "Aperçu des images", onglet Apparence) : la
   miniature ne se pose plus sur toute la carte (format "bureau" compact,
   incompatible avec un fond pleine carte — l'ancien design ci-dessous
   supposait des cartes bien plus grandes) mais sur le glyphe lui-même, à la
   place de l'icône générique. index.php pose --thumb-url en style inline
   sur .p-2\.5/.p-3 (voir la boucle de rendu des fichiers) ; ces tokens
   --tile-base-icon* sont les mêmes que ceux du glyphe normal plus haut dans
   ce fichier, donc la miniature suit fidèlement la taille de tuile choisie
   (paramètre "Taille des tuiles"), à toutes les échelles. Le reste
   (::before, texte en blanc, z-index) appartenait à l'ancien fond pleine
   carte : gardé neutralisé, la carte elle-même ne reçoit plus jamais de
   background-image désormais. */
body:not(.list-view) #content-files .file-card.img-bg-card .p-2\.5,
body:not(.list-view) #content-files .file-card.img-bg-card .p-3{
  /* var(--thumb-url), posée en style inline par index.php : les classes
     .tbadge-* (couleur du glyphe) utilisent "background: ... !important" en
     raccourci, qui réinitialise background-image à "none" — un simple style
     inline non-!important ne peut pas s'imposer face à ça. Cette règle-ci
     l'emporte : même statut !important, mais spécificité plus élevée
     (#content-files + .img-bg-card en plus de .tbadge-*). */
  background-image:var(--thumb-url) !important;
  background-size:cover !important;
  background-position:center !important;
  background-repeat:no-repeat !important;
}
body:not(.list-view) #content-files .file-card.img-bg-card .p-2\.5 i[data-lucide],
body:not(.list-view) #content-files .file-card.img-bg-card .p-2\.5 svg,
body:not(.list-view) #content-files .file-card.img-bg-card .p-3 i[data-lucide],
body:not(.list-view) #content-files .file-card.img-bg-card .p-3 svg{
  display:none !important;
}
body:not(.list-view) #content-files .file-card.img-bg-card{ background-image:none !important; }
body:not(.list-view) #content-files .file-card.img-bg-card::before{ display:none; }
#content-files .file-card.img-bg-card h3,
#content-files .file-card.img-bg-card p,
#content-files .file-card.img-bg-card .mod-date{ color:inherit !important; text-shadow:none !important; }
.file-card.img-bg-card > .flex:first-child{ z-index:auto !important; }
.file-card.img-bg-card .dropdown-actions{ z-index:1000 !important; }
.file-card.img-bg-card > *{ z-index:auto !important; }

/* ---------- barre d'outils / listes déroulantes / modales : teinte Azur ---------- */
/* ============================================================
   MODALES — refonte complète (créer/renommer/déplacer/partager/
   aperçu, + feuille mobile "Créer"). L'ancien look (bg-white brut,
   bordures slate, boutons plats bleus) ne correspondait plus au
   reste du design ; ce composant reprend la recette déjà validée
   ailleurs (.spotlight-panel/.storage-pop) : verre sombre/clair,
   flou, reflet interne + ombre douce, tokens Azur partout. Comme
   le HTML des modales n'utilise plus de classes Tailwind slate/blue
   génériques, l'ancien rattrapage dark-mode.css (qui de toute façon
   ciblait le mauvais sélecteur, [id$="-modal"] au lieu de "modal-*")
   n'est plus nécessaire. */
.azur-modal{
  background: rgba(10,20,37,.5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 1rem;
  /* Le dock mobile (nav du bas) est en position:fixed avec z-index:150 ;
     la classe utilitaire Tailwind "z-50" posée sur les modales ne suffit
     pas à passer au-dessus, donc les modales (paramètres, etc.) pouvaient
     apparaître sous le dock sur mobile. On force un z-index supérieur. */
  z-index: 200 !important;
}
.azur-modal-panel{
  background: var(--glass-strong);
  border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  border-radius: var(--r-xl);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 30px 60px -28px var(--glass-sh);
  color: var(--ink);
  animation: azur-pop .16s ease-out;
}
.azur-modal-head{ display:flex; align-items:center; gap:.75rem; }
.azur-modal-glyph{
  width: 2.6rem; height: 2.6rem; border-radius: var(--r-md);
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 8px 14px -10px var(--glass-sh);
}
/* Teinte azur réutilisable pour glyphes/pastilles/texte : var(--azure) tout
   seul ne s'adapte PAS au dark mode (contrairement à var(--azure-glow),
   redéfini par le thème sombre) — utilisée en inline style un peu partout
   (icônes de modales, badges), elle restait bleu foncé sur fond sombre et
   devenait peu lisible. Cette classe fournit le bon contraste dans les deux
   thèmes ; !important nécessaire pour l'emporter sur un inline style existant
   côté background si besoin. */
.tint-azure{ color:var(--azure) !important; }
body.dark-mode .tint-azure{ color:var(--azure-glow) !important; }
.tint-danger{ color:var(--danger) !important; }
body.dark-mode .tint-danger{ color:#e08a8a !important; }
.tint-ok{ color:var(--ok) !important; }
body.dark-mode .tint-ok{ color:#6fd6a8 !important; }
.tint-warning{ color:var(--warning) !important; }
body.dark-mode .tint-warning{ color:#e0b04d !important; }
.tint-video{ color:var(--t-video) !important; }
body.dark-mode .tint-video{ color:#b7a2e8 !important; }
.tint-doc{ color:var(--t-doc) !important; }
body.dark-mode .tint-doc{ color:#8296e0 !important; }
.tint-sheet{ color:var(--t-sheet) !important; }
body.dark-mode .tint-sheet{ color:#4ec492 !important; }
.spinner-azure{ border:2px solid var(--glass-line); border-bottom-color:var(--azure); }
body.dark-mode .spinner-azure{ border-bottom-color:var(--azure-glow); }
.azur-modal-title{ font-family: var(--font-display); font-weight:700; font-size:1.05rem; color:var(--ink); line-height:1.25; }
.azur-modal-subtitle{ font-size:.78rem; color:var(--mist); margin-top:.15rem; overflow-wrap:anywhere; }
.azur-modal-close{
  width:2.1rem; height:2.1rem; border-radius:999px; display:flex; align-items:center; justify-content:center;
  background:var(--glass); border:1px solid var(--glass-line); color:var(--mist); flex-shrink:0; cursor:pointer;
}
.azur-modal-close:hover{ background: rgba(127,140,150,.2); color:var(--ink); }
.azur-modal-close i, .azur-modal-close svg{ width:1rem; height:1rem; }

.azur-input, .azur-modal-panel select, .azur-modal-panel textarea{
  width:100%; background: rgba(127,140,150,.1); border:1px solid var(--glass-line);
  border-radius: var(--r-md); padding:.7rem .9rem; font-size:.85rem; color:var(--ink);
  outline:none; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.azur-input::placeholder{ color: var(--mist-soft); }
.azur-input:focus, .azur-modal-panel select:focus, .azur-modal-panel textarea:focus{
  border-color: var(--azure); box-shadow: 0 0 0 3px var(--azure-soft); background: rgba(127,140,150,.14);
}
body.dark-mode .azur-input, body.dark-mode .azur-modal-panel select{ background: rgba(255,255,255,.05); }
body.dark-mode .azur-input:focus, body.dark-mode .azur-modal-panel select:focus{ background: rgba(255,255,255,.08); }
.azur-input-mono{ font-family: var(--font-mono); }

.azur-field-label{ display:flex; align-items:center; gap:.4rem; font-size:.7rem; font-weight:700; color:var(--mist); text-transform:uppercase; letter-spacing:.03em; margin-bottom:.4rem; font-family: var(--font-mono); }
.azur-field-label i, .azur-field-label svg{ width:.8rem; height:.8rem; opacity:.8; }

.azur-modal-actions{ display:flex; gap:.6rem; }
.azur-modal-actions .azur-btn-ghost, .azur-modal-actions .azur-btn-primary{ flex:1; }
.azur-btn-ghost, .azur-btn-primary{
  padding:.65rem 1rem; border-radius:999px; font-weight:700; font-size:.82rem; text-align:center;
  display:flex; align-items:center; justify-content:center; gap:.4rem; cursor:pointer; border:1px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.azur-btn-ghost{ background: var(--glass); border-color: var(--glass-line); color: var(--ink-2); }
.azur-btn-ghost:hover{ background: rgba(127,140,150,.2); color: var(--ink); }
.azur-btn-primary{ background: linear-gradient(135deg, var(--azure-glow), var(--azure)); color:#fff; box-shadow: 0 10px 20px -10px rgba(var(--azure-rgb),.55); }
.azur-btn-primary:hover{ transform: translateY(-1px); box-shadow: 0 14px 26px -10px rgba(var(--azure-rgb),.65); }
.azur-btn-primary:active{ transform: translateY(0) scale(.98); }
.azur-btn-primary.danger{ background: linear-gradient(135deg, #e0687c, var(--danger)); box-shadow: 0 10px 20px -10px rgba(194,59,74,.5); }
.azur-btn-primary i, .azur-btn-primary svg, .azur-btn-ghost i, .azur-btn-ghost svg{ width:1rem; height:1rem; }

.azur-modal-error{ font-size:.75rem; color: var(--danger); font-family: var(--font-mono); }

/* ---------- Corbeille (trash.php) ---------- */
.trash-list{ display:flex; flex-direction:column; gap:.5rem; }
.trash-row{
  display:flex; align-items:center; gap:.9rem; padding:.75rem .9rem;
  border-radius: var(--r-md); border:1px solid var(--glass-line); background: var(--glass);
  transition: background .15s ease, transform .12s ease;
}
.trash-row:hover{ background: var(--glass-strong); transform: translateY(-1px); }
.trash-glyph{
  width:2.2rem; height:2.2rem; border-radius: var(--r-sm); flex:none;
  display:flex; align-items:center; justify-content:center;
  background: var(--neutral-soft); color: var(--mist);
}
.trash-glyph.is-dir{ background: var(--azure-soft); color: var(--azure); }
body.dark-mode .trash-glyph.is-dir{ color: var(--azure-glow); }
.trash-glyph i, .trash-glyph svg{ width:1.1rem; height:1.1rem; }
.trash-body{ flex:1; min-width:0; }
.trash-name{ font-size:.88rem; font-weight:700; color:var(--ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.trash-meta{ font-size:.72rem; color:var(--mist); font-family:var(--font-mono); margin-top:.15rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.trash-actions{ display:flex; align-items:center; gap:.4rem; flex:none; }
.trash-btn{
  display:flex; align-items:center; gap:.35rem; padding:.42rem .7rem; cursor:pointer;
  border-radius:999px; border:1px solid var(--glass-line); background: rgba(127,140,150,.1);
  font-size:.74rem; font-weight:700; color:var(--ink-2); transition: background .15s ease, color .15s ease;
}
.trash-btn:hover{ background: var(--azure-soft); color: var(--azure); border-color: rgba(var(--azure-rgb),.3); }
body.dark-mode .trash-btn:hover{ color: var(--azure-glow); }
.trash-btn.danger:hover{ background: var(--danger-soft); color: var(--danger); border-color: rgba(194,59,74,.3); }
.trash-btn:disabled{ opacity:.5; cursor:default; }
.trash-btn i, .trash-btn svg{ width:.9rem; height:.9rem; }
@media (max-width: 640px){
  .trash-btn span{ display:none; }
  .trash-meta{ white-space:normal; }
}

/* Retour d'action de la corbeille (restauration, suppression) */
.trash-toast{
  position:fixed; left:50%; bottom:6rem; transform:translate(-50%, 1rem);
  max-width:min(90vw, 30rem); padding:.75rem 1.1rem; border-radius:999px; z-index:60;
  background: var(--glass-strong); border:1px solid var(--glass-line); box-shadow:0 18px 40px -18px var(--glass-sh);
  font-size:.8rem; font-weight:600; color:var(--ink); text-align:center;
  opacity:0; pointer-events:none; transition: opacity .2s ease, transform .2s ease;
}
.trash-toast.visible{ opacity:1; transform:translate(-50%, 0); }
.trash-toast.error{ color: var(--danger); border-color: rgba(194,59,74,.35); }
.spotlight-hint{ padding:.9rem 1rem; font-size:.8rem; color:var(--mist); }

/* Sélecteur de couleur du cloud (onglet Apparence des paramètres).
   Les pastilles portent leur propre couleur en style inline : elles doivent
   montrer la palette proposée, pas la palette active. */
.cloud-color-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:.55rem; }
.cloud-color-swatch{
  display:flex; align-items:center; gap:.5rem; padding:.55rem .6rem; cursor:pointer;
  border-radius: var(--r-md); border:1px solid var(--glass-line); background: rgba(127,140,150,.08);
  font-size:.78rem; font-weight:600; color:var(--ink-2); text-align:left;
  transition: background .15s ease, border-color .15s ease, transform .12s ease;
}
.cloud-color-swatch:hover{ background: rgba(127,140,150,.16); transform: translateY(-1px); }
.cloud-color-swatch.active{ border-color: var(--azure); background: var(--azure-soft); color: var(--ink); }
.cloud-color-dot{ width:1.1rem; height:1.1rem; border-radius:50%; flex:none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
@media (max-width: 520px){ .cloud-color-grid{ grid-template-columns:repeat(2,1fr); } }

/* Sélecteur de taille des tuiles (onglet Apparence des paramètres).
   .tile-size-preview réutilise exactement les tokens --tile-base-* de la
   vraie grille (voir plus haut dans ce fichier) avec son propre --tile-scale
   posé en style inline par bouton : l'aperçu est donc au format réel, pas une
   illustration réduite — ce qu'on voit ici est ce qu'on aura sur la grille. */
.tile-size-grid{ display:flex; flex-wrap:wrap; gap:.7rem; }
.tile-size-option{
  display:flex; flex-direction:column; align-items:center; gap:.55rem; padding:.85rem .6rem .7rem;
  border-radius: var(--r-md); border:1px solid var(--glass-line); background: rgba(127,140,150,.06);
  cursor:pointer; transition: background .15s ease, border-color .15s ease, transform .12s ease;
  flex:1; min-width:6.5rem;
}
.tile-size-option:hover{ background: rgba(127,140,150,.14); transform: translateY(-1px); }
.tile-size-option.active{ border-color: var(--azure); background: var(--azure-soft); }
.tile-size-preview{
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.35rem;
  width:calc(var(--tile-base-w) * var(--tile-scale));
  height:calc(var(--tile-base-w) * var(--tile-scale));
  flex:none;
}
.tile-size-swatch-icon{
  width:calc(var(--tile-base-icon) * var(--tile-scale)); height:calc(var(--tile-base-icon) * var(--tile-scale));
  border-radius:calc(var(--tile-base-radius-icon) * var(--tile-scale)); flex:none;
  display:flex; align-items:center; justify-content:center;
  background: var(--azure-soft); color: var(--azure);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 10px 16px -12px var(--glass-sh);
}
body.dark-mode .tile-size-swatch-icon{ color: var(--azure-glow); }
.tile-size-swatch-icon i, .tile-size-swatch-icon svg{
  width:calc(var(--tile-base-icon-svg-md) * var(--tile-scale)); height:calc(var(--tile-base-icon-svg-md) * var(--tile-scale));
}
.tile-size-swatch-label{
  font-size:calc(var(--tile-base-font) * var(--tile-scale)); font-family: var(--font-mono);
  color: var(--ink); line-height:1.2; text-align:center;
}
.tile-size-name{ font-size:.72rem; font-weight:700; color:var(--ink-2); }
.tile-size-option.active .tile-size-name{ color: var(--azure); }
body.dark-mode .tile-size-option.active .tile-size-name{ color: var(--azure-glow); }

/* Modal de conflit d'import : liste des fichiers déjà présents, à cocher
   individuellement pour les remplacer (voir #modal-upload-conflict). */
.upload-conflict-list{ display:flex; flex-direction:column; gap:.4rem; max-height:40vh; overflow-y:auto; }
.upload-conflict-item{
  display:flex; align-items:center; gap:.7rem; padding:.6rem .75rem; cursor:pointer;
  border-radius: var(--r-md); border:1px solid var(--glass-line); background: rgba(127,140,150,.08);
  transition: background .15s ease, border-color .15s ease;
}
.upload-conflict-item:hover{ background: rgba(127,140,150,.16); }
.upload-conflict-item.checked{ border-color: rgba(var(--azure-rgb),.35); background: var(--azure-soft); }
.upload-conflict-item.locked{ cursor:not-allowed; opacity:.6; }
.upload-conflict-item input{ flex:none; accent-color: var(--azure); width:1rem; height:1rem; cursor:inherit; }
.upload-conflict-item .ucf-body{ flex:1; min-width:0; }
.upload-conflict-item .ucf-name{ font-size:.82rem; font-weight:600; color:var(--ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.upload-conflict-item .ucf-meta{ font-size:.7rem; color:var(--mist); font-family: var(--font-mono); margin-top:.1rem; }
.upload-conflict-all{ display:flex; align-items:center; gap:.55rem; font-size:.8rem; font-weight:700; color:var(--ink-2); cursor:pointer; }
.upload-conflict-all input{ accent-color: var(--azure); width:1rem; height:1rem; cursor:pointer; }

.azur-info-box{ padding:.9rem 1rem; border-radius: var(--r-md); border:1px solid var(--glass-line); background: rgba(127,140,150,.08); }
.azur-info-box.ok{ background: var(--ok-soft); border-color: rgba(47,143,102,.3); color: var(--ok); }
.azur-info-box.azure{ background: var(--azure-soft); border-color: rgba(var(--azure-rgb),.25); color: var(--azure); }
.azur-info-box.danger{ background: var(--danger-soft); border-color: rgba(194,59,74,.3); color: var(--danger); }
body.dark-mode .azur-info-box.azure{ color: var(--azure-glow); }
body.dark-mode .azur-info-box.danger{ color: #e08a8a; }
.azur-info-box p{ font-size:.8rem; font-weight:600; margin-bottom:.6rem; display:flex; align-items:center; gap:.4rem; }
.azur-info-box .row{ display:flex; gap:.5rem; }
.azur-info-box input{ flex:1; min-width:0; }
.azur-copy-btn{
  width:2.4rem; flex-shrink:0; border-radius: var(--r-sm); display:flex; align-items:center; justify-content:center;
  background: rgba(255,255,255,.5); border:1px solid var(--glass-line); color:inherit; cursor:pointer;
}
body.dark-mode .azur-copy-btn{ background: rgba(255,255,255,.08); }
.azur-copy-btn:hover{ background: rgba(255,255,255,.8); }
body.dark-mode .azur-copy-btn:hover{ background: rgba(255,255,255,.16); }
.azur-copy-btn i, .azur-copy-btn svg{ width:.9rem; height:.9rem; }

/* ---- feuille mobile "Créer / Importer" ---- */
.azur-sheet-backdrop{ background: rgba(10,20,37,.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.azur-sheet{
  background: var(--glass-strong); border:1px solid var(--glass-line); border-bottom:none;
  border-top-left-radius: var(--r-xl); border-top-right-radius: var(--r-xl);
  -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 -20px 50px -22px var(--glass-sh);
  padding: .6rem 1rem 1.3rem; color: var(--ink);
}
.azur-sheet-handle{ width:2.5rem; height:.3rem; border-radius:999px; background:var(--glass-line); margin:0 auto .9rem; }
.azur-sheet-title{ font-family:var(--font-display); font-weight:700; font-size:1rem; color:var(--ink); margin:.2rem 0 .8rem; }
.azur-sheet-item{ display:flex; align-items:center; gap:.8rem; width:100%; padding:.7rem .5rem; border-radius:var(--r-md); color:var(--ink); font-weight:600; font-size:.88rem; text-align:left; background:transparent; }
.azur-sheet-item:hover{ background: rgba(127,140,150,.14); }
.azur-sheet-glyph{ width:2.3rem; height:2.3rem; border-radius:var(--r-md); display:flex; align-items:center; justify-content:center; flex-shrink:0; box-shadow: inset 0 1px 0 var(--glass-hi), 0 6px 12px -8px var(--glass-sh); }
.azur-sheet-glyph i, .azur-sheet-glyph svg{ width:1.1rem; height:1.1rem; }
.azur-sheet-divider{ height:1px; background:var(--glass-line); margin:.3rem .5rem; }

/* ---------- modale d'aperçu de fichier ----------
   Deux gabarits selon le type : .azur-preview-media (image/vidéo) se
   dimensionne au contenu (fit-content, plafonné par le viewport) pour
   que le cadre suive la résolution réelle du média au lieu d'imposer
   une largeur fixe ; .azur-preview-panel (audio/pdf/aperçu indisponible)
   garde une largeur de panneau classique. */
.azur-preview-panel{ width:100%; max-width:30rem; max-height:85vh; overflow:auto; }
.azur-preview-media{ width:fit-content; max-width:92vw; max-height:92vh; padding:.75rem !important; overflow:hidden; }
.azur-preview-media #modal-preview-content{ max-width:calc(92vw - 1.5rem); max-height:calc(92vh - 1.5rem); }
.azur-preview-media img, .azur-preview-media video{
  display:block; width:auto; height:auto;
  max-width:calc(92vw - 1.5rem); max-height:calc(92vh - 1.5rem);
  border-radius: var(--r-lg);
}
.azur-preview-media #modal-preview-filename{ margin-top:.5rem; max-width:calc(92vw - 1.5rem); }
.azur-preview-empty{ color:var(--mist); font-size:.85rem; text-align:center; padding:3rem 1rem; display:flex; flex-direction:column; align-items:center; gap:.6rem; }
.azur-preview-empty i, .azur-preview-empty svg{ width:2rem; height:2rem; opacity:.5; }
#modal-preview-content iframe{ border-radius: var(--r-md); border:1px solid var(--glass-line); }

/* ---------- lecteur audio de la modale d'aperçu ----------
   L'ancienne version encapsulait les contrôles dans sa propre
   .glass-card (fond + flou + ombre) alors qu'elle est déjà à l'intérieur
   du verre de .azur-modal-panel : ça créait un effet visuel de "modale
   dans la modale". Les contrôles sont maintenant posés à plat dans le
   panneau existant, sans second cadre. */
.azur-audio-track{ position:relative; height:.4rem; border-radius:999px; background:rgba(127,140,150,.25); cursor:pointer; }
.azur-audio-fill{ position:absolute; left:0; top:0; height:100%; width:0%; border-radius:999px; background:linear-gradient(90deg,var(--azure-glow),var(--azure)); }
.azur-audio-handle{
  position:absolute; top:50%; left:0%; transform:translate(-50%,-50%);
  width:.85rem; height:.85rem; border-radius:999px; background:#fff; border:2px solid var(--azure);
  box-shadow:0 2px 6px rgba(0,0,0,.25); opacity:0; transition:opacity .15s ease; pointer-events:none;
}
.azur-audio-track:hover .azur-audio-handle{ opacity:1; }
.azur-audio-time{ font-family:var(--font-mono); font-size:.68rem; color:var(--mist); white-space:nowrap; }
.azur-audio-play{
  width:3.25rem; height:3.25rem; border-radius:999px; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg,var(--azure-glow),var(--azure)); color:#fff; flex-shrink:0; cursor:pointer; border:none;
  box-shadow:0 10px 20px -10px rgba(var(--azure-rgb),.55); transition:transform .12s ease;
}
.azur-audio-play:hover{ transform:translateY(-1px); }
.azur-audio-play svg{ width:1.3rem; height:1.3rem; }
.filter-dropdown > button{
  background: var(--glass) !important;
  border: 1px solid var(--glass-line) !important;
  font-family: var(--font-mono);
}
.filter-dropdown .dropdown-content > div{
  background: var(--glass-strong) !important;
  border: 1px solid var(--glass-line) !important;
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
}
.dropdown-actions{
  background: var(--glass-strong) !important;
  border: 1px solid var(--glass-line) !important;
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  padding: .35rem !important;
  min-width: 10.5rem !important;
  width: max-content !important;
}
/* Taille/police des items alignées sur .dd-item de l'artifact : Tailwind
   donnait des boutons text-sm (14px)/icônes 16px/padding généreux — plus
   grand et plus large que l'artifact (12.2px, mono, icônes ~14px). */
.dropdown-actions button{
  display: flex !important;
  align-items: center;
  gap: .55rem;
  padding: .5rem .65rem !important;
  border-radius: var(--r-sm) !important;
  font-size: .76rem !important;
  font-weight: 600;
  font-family: var(--font-mono);
}
.dropdown-actions button i[data-lucide],
.dropdown-actions button svg{
  width: .85rem !important;
  height: .85rem !important;
  margin-right: 0 !important;
  flex-shrink: 0;
}

/* ---------- menu contextuel clic-droit sur un fichier ---------- */
.context-inline-actions button{
  background: var(--glass-strong) !important;
  border: 1px solid var(--glass-line) !important;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.context-inline-actions .context-rename{ color: var(--ink-2) !important; }
.context-inline-actions .context-share{ color: var(--azure) !important; }
body.dark-mode .context-inline-actions .context-share{ color: var(--azure-glow) !important; }
.context-inline-actions .context-delete{ color: var(--danger) !important; }
.context-inline-actions .context-download{ color: var(--ok) !important; }
.context-inline-actions .context-move{ color: #b3791f !important; }

/* ---------- menu "..." (dropdown-actions) sur une tuile ----------
   Même logique de teinte que le menu contextuel clic-droit ci-dessus
   (context-inline-actions), pour que les deux menus d'actions sur un
   fichier restent cohérents entre eux plutôt que l'un en tokens Azur
   et l'autre en couleurs Tailwind génériques traduites par dark-mode.css. */
.dropdown-actions .favorite-btn{ color: #b3791f !important; }
.dropdown-actions .share-btn{ color: var(--azure) !important; }
.dropdown-actions .delete-btn{ color: var(--danger) !important; }
.dropdown-actions .rename-btn,
.dropdown-actions .move-btn,
.dropdown-actions .download-btn{ color: var(--ink-2) !important; }
/* dark-mode.css a une règle plus spécifique que celles ci-dessus
   ("body.dark-mode .dropdown-actions button" = 1 élément de plus dans le
   sélecteur = spécificité supérieure) qui repasse TOUS les boutons du menu
   en gris clair uniforme (#cbd5e1), écrasant nos teintes par bouton — d'où
   "Supprimer" qui ne ressortait pas en rouge. On rajoute donc les mêmes
   couleurs préfixées par body.dark-mode pour égaler/dépasser sa spécificité. */
body.dark-mode .dropdown-actions .favorite-btn{ color: #b3791f !important; }
body.dark-mode .dropdown-actions .share-btn{ color: var(--azure-glow) !important; }
body.dark-mode .dropdown-actions .delete-btn{ color: var(--danger) !important; }
body.dark-mode .dropdown-actions .rename-btn,
body.dark-mode .dropdown-actions .move-btn,
body.dark-mode .dropdown-actions .download-btn{ color: var(--ink-2) !important; }
.dropdown-actions button:hover{ background: rgba(127,140,150,.14) !important; }

/* ---------- lignes actives/survolées des menus filtre/tri/création ----------
   Ces liens utilisent bg-blue-50/text-blue-600 (Tailwind) pour l'état
   sélectionné ou survolé ; on force ici la même teinte que le reste du
   design. (dark-mode.css les traduisait autrefois en bleu générique en dur ;
   il utilise désormais lui aussi les variables de palette.) */
.dropdown-content a.bg-blue-50,
.dropdown-content a.text-blue-600{
  background: var(--azure-soft) !important;
  color: var(--azure) !important;
}
body.dark-mode .dropdown-content a.bg-blue-50,
body.dark-mode .dropdown-content a.text-blue-600{
  color: var(--azure-glow) !important;
}
.dropdown-content a:hover{ background: rgba(127,140,150,.14) !important; }
.dropdown-content{ color: var(--ink-2); }

/* ---------- barre d'outils flottante unifiée (vue / filtre / tri / créer) ---------- */
.float-toolbar.glass-card{
  background: var(--glass) !important;
  border: 1px solid var(--glass-line) !important;
  display:flex; align-items:center; gap:.25rem; padding:.3rem; border-radius:999px;
  flex-wrap:wrap; align-self:flex-start;
  /* backdrop-filter (via .glass-card) crée un nouveau contexte d'empilement :
     sans position+z-index EXPLICITES ici, tout ce qui est ouvert à
     l'intérieur (menus Type/Tri, popover du "+") reste "piégé" dans ce
     contexte et peut se retrouver visuellement sous la grille de fichiers
     qui suit dans le DOM, même avec un z-index élevé sur l'élément ouvert
     lui-même. */
  position: relative;
  z-index: 40;
}
body.dark-mode .float-toolbar.glass-card{ background:var(--glass) !important; }
.float-toolbar .divider{ width:1px; align-self:stretch; background:var(--glass-line); margin:.15rem .05rem; }
.seg{ display:flex; gap:.1rem; }
.seg button{ border:none; background:transparent; color:var(--mist); padding:.4rem; border-radius:999px; cursor:pointer; display:flex; align-items:center; justify-content:center; width:2rem; height:2rem; }
.seg button.active,
.seg button.bg-blue-50{ background:var(--azure) !important; color:#fff !important; }
body.dark-mode .seg button.active,
body.dark-mode .seg button.bg-blue-50{ background:var(--azure-glow) !important; color:#0d1a2b !important; }
.seg button i[data-lucide], .seg button svg{ width:1rem !important; height:1rem !important; color:inherit !important; }
.seg button.active svg, .seg button.bg-blue-50 svg{ color:#fff !important; }
body.dark-mode .seg button.active svg, body.dark-mode .seg button.bg-blue-50 svg{ color:#0d1a2b !important; }

/* Les déclencheurs filtre/tri perdent leur fond/bordure propres : le
   fond verre est désormais porté par .float-toolbar qui les entoure. */
.float-toolbar .filter-dropdown > button{
  background:transparent !important;
  border:none !important;
  box-shadow:none !important;
  padding:.4rem .6rem !important;
  gap:.4rem !important;
  font-family: var(--font-mono);
  font-size:.74rem !important;
  font-weight:600 !important;
  color:var(--ink-2) !important;
}
.float-toolbar .filter-dropdown > button:hover{ background:rgba(127,140,150,.12) !important; }
.float-toolbar .filter-dropdown > button i[data-lucide],
.float-toolbar .filter-dropdown > button svg{ width:.8rem !important; height:.8rem !important; }
.float-toolbar .filter-dropdown > button .text-blue-600,
.float-toolbar .filter-dropdown > button em{ color:var(--azure) !important; }
body.dark-mode .float-toolbar .filter-dropdown > button .text-blue-600{ color:var(--azure-glow) !important; }
.float-toolbar .filter-dropdown > button .text-slate-400{ color:var(--mist-soft) !important; }

/* Bouton icône discret de la barre d'outils (corbeille) : même gabarit que
   .plusbtn, mais en retrait — c'est une destination, pas une action primaire. */
.toolbar-iconbtn{
  width:2.1rem; height:2.1rem; border-radius:50%; cursor:pointer; flex-shrink:0;
  display:flex; align-items:center; justify-content:center; text-decoration:none;
  background:rgba(127,140,150,.12); color:var(--mist);
  transition: background .15s ease, color .15s ease;
}
.toolbar-iconbtn:hover{ background:var(--azure-soft); color:var(--azure); }
body.dark-mode .toolbar-iconbtn:hover{ color:var(--azure-glow); }
.toolbar-iconbtn i[data-lucide], .toolbar-iconbtn svg{ width:.95rem !important; height:.95rem !important; }

.plusbtn{
  width:2.1rem; height:2.1rem; border-radius:50%; border:none; cursor:pointer;
  background:var(--azure); color:#fff; display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
body.dark-mode .plusbtn{ background:var(--azure-glow); color:#0d1a2b; }
.plusbtn i[data-lucide], .plusbtn svg{ width:.95rem !important; height:.95rem !important; }

/* ---------- popover de création (dossier / document / tableur / import) ---------- */
.popover{
  /* Ancré en position:absolute dans .float-toolbar (qui a position:relative
     depuis le correctif d'empilement) plutôt qu'en position:fixed calculée
     en JS à l'ouverture : ça évite tout décalage si la page défile/se
     redimensionne entre le clic et l'affichage, et ça place le panneau au
     bon endroit sans recalcul. */
  position:absolute; top:calc(100% + .6rem); right:0;
  z-index:230; border-radius:var(--r-lg); padding:.9rem; width:16.5rem; display:none;
  background:var(--glass-strong); border:1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 24px 48px -26px var(--glass-sh);
}
.popover.open{ display:block; animation: azur-pop .14s ease-out; }
.launcher-row{ display:grid; grid-template-columns:repeat(2,1fr); gap:.6rem; }
.launcher-tile{
  display:flex; flex-direction:column; align-items:center; gap:.4rem; padding:.8rem .3rem; border-radius:var(--r-md);
  border:none; background:rgba(127,140,150,.10); cursor:pointer; color:var(--ink-2); font-family:var(--font-mono);
}
.launcher-tile:hover{ background:rgba(127,140,150,.2); color:var(--ink); }
.launcher-tile .launcher-glyph{ width:2.2rem; height:2.2rem; border-radius:.7rem; display:flex; align-items:center; justify-content:center; }
.launcher-tile span{ font-size:.7rem; font-weight:600; }

/* ---------- ancien bouton scindé : conservé hors-écran comme relais
   fonctionnel (modales/handlers inchangés), remplacé visuellement
   par le bouton "+" ci-dessus. ---------- */
.legacy-new-controls{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* ---------- titre du dossier courant en police d'affichage ---------- */
.folder-title{ font-family: var(--font-display); }

/* ---------- responsive ---------- */
@media (max-width: 767px){
  .statusbar .crumb-text{ display:none; }

  /* Le fil d'ariane complet (racine > ... > dossier courant) ne tient pas
     à côté du logo et des infos de droite sur mobile : il passait sous le
     bloc de droite. On ne garde que la racine et le dossier courant,
     comme le ferait un gestionnaire de fichiers mobile classique. */
  .statusbar.glass-card{ padding:.5rem .6rem .5rem .65rem; gap:.4rem; }
  .statusbar .brand-name{ display:none; }
  .crumb{ margin:0 .35rem; gap:.2rem; }
  .crumb-seg:not(.crumb-root):not(.crumb-current){ display:none; }
  .status-right{ gap:.35rem; }

  /* La toolbar (grille/liste, Type, Tri, "+") est trop large pour la
     largeur mobile avec ".float-toolbar{flex-wrap:wrap}" : le bouton "+"
     (dernier de la ligne) n'a plus la place et passe seul à la ligne
     suivante. On raccourcit les déclencheurs Type/Tri (masque le
     préfixe "Type :"/"Tri :", ne garde que la valeur + l'icône) et on
     empêche tout retour à la ligne pour que ça tienne sur une seule ligne. */
  .float-toolbar.glass-card{ flex-wrap: nowrap !important; }
  .toolbar-label{ display: none; }
  .float-toolbar .filter-dropdown > button{ padding:.4rem .45rem !important; gap:.3rem !important; }

  /* Barre d'actions de sélection multiple : idem, "Annuler" passait seul
     à la ligne du dessous faute de place pour les 3 boutons + le compteur
     sur une ligne. Les boutons Déplacer/Supprimer perdent leur texte au
     profit de leur seule icône (Annuler garde le sien, plus court). */
  #multi-action-bar{ gap:.5rem !important; padding:.5rem .7rem !important; }
  #multi-move-btn span, #multi-delete-btn span{ display: none; }
  #multi-move-btn, #multi-delete-btn{ padding:.5rem !important; width:2.1rem; height:2.1rem; justify-content:center; }
  #multi-move-btn i, #multi-move-btn svg, #multi-delete-btn i, #multi-delete-btn svg{ width:1rem !important; height:1rem !important; }
}

/* ---------- renfort tuiles : hook dédié .azur-iconfield ----------
   Règle de dernier recours, volontairement redondante avec la section
   "fichiers en mode grille" plus haut : cible directement la classe
   posée sur #content-files (plutôt que l'id seul) et réinitialise
   toutes les propriétés de fond en longhand, pour ne laisser aucune
   ambiguïté face aux règles de dark-mode.css qui visent aussi .file-card. */
body:not(.list-view) .azur-iconfield > .file-card{
  background-color:transparent !important;
  background-image:none !important;
  border-color:transparent !important;
  box-shadow:none !important;
}
body:not(.list-view) .azur-iconfield > .file-card:hover,
body:not(.list-view) .azur-iconfield > .file-card.selected{
  background-color:var(--azure-soft) !important;
}

/* ---------- hiérarchie de z-index ----------
   Les modales existantes utilisent la classe Tailwind "z-50" (donc
   z-index:50), très inférieure aux z-index déjà en jeu ailleurs sur
   la page (.dropdown-actions:1000, .file-card.menu-open:100, dock/
   statusbar/popovers Azur:130-300) : une modale pouvait donc
   s'afficher SOUS le menu "..." d'une tuile ou sous le dock. On fixe
   ici une échelle claire, les modales passant au-dessus de tout. */
#modal-folder, #modal-file-text, #modal-file-sheet, #modal-rename,
#modal-share, #modal-preview, #modal-move, #mobile-create-menu{
  z-index:2000 !important;
}

/* ============================================================
   RETEINTE COMPLÈTE — chaque classe Tailwind couleur encore
   présente dans le HTML est ramenée aux tokens Azur, pour la page
   entière, dans les deux thèmes. Remplace la traduction générique
   de dark-mode.css (qui gardait des teintes Tailwind pas tout à
   fait alignées) et couvre aussi le thème clair, où Tailwind
   fournissait encore ses propres bleus/rouges/verts d'origine.
   ============================================================ */

/* ---- Neutres (slate) : hiérarchie de texte ---- */
.text-slate-900{ color: var(--ink) !important; }
.text-slate-800{ color: var(--ink) !important; }
.text-slate-700{ color: var(--ink-2) !important; }
.text-slate-600{ color: var(--ink-2) !important; }
.text-slate-500{ color: var(--mist) !important; }
.text-slate-400{ color: var(--mist-soft) !important; }
.text-slate-300{ color: var(--mist-soft) !important; }
body.dark-mode .text-slate-900,
body.dark-mode .text-slate-800{ color: var(--ink) !important; }
body.dark-mode .text-slate-700,
body.dark-mode .text-slate-600{ color: var(--ink-2) !important; }
body.dark-mode .text-slate-500{ color: var(--mist) !important; }
body.dark-mode .text-slate-400,
body.dark-mode .text-slate-300{ color: var(--mist-soft) !important; }

/* ---- Neutres : fonds et bordures ---- */
.bg-slate-50, .bg-slate-100{ background-color: var(--neutral-soft) !important; }
.bg-slate-200{ background-color: rgba(127,140,150,.25) !important; }
.border-slate-100, .border-slate-200{ border-color: var(--glass-line) !important; }
.border-slate-300{ border-color: rgba(127,140,150,.4) !important; }
.hover\:bg-slate-50:hover{ background-color: var(--neutral-soft) !important; }
.hover\:bg-slate-100:hover{ background-color: rgba(127,140,150,.20) !important; }
.hover\:bg-slate-200:hover{ background-color: rgba(127,140,150,.28) !important; }
body.dark-mode .bg-slate-50,
body.dark-mode .bg-slate-100{ background-color: var(--neutral-soft) !important; }
body.dark-mode .bg-slate-200{ background-color: rgba(140,164,190,.28) !important; }
body.dark-mode .border-slate-100,
body.dark-mode .border-slate-200{ border-color: var(--glass-line) !important; }
body.dark-mode .border-slate-300{ border-color: rgba(140,164,190,.45) !important; }
body.dark-mode .hover\:bg-slate-50:hover{ background-color: var(--neutral-soft) !important; }
body.dark-mode .hover\:bg-slate-100:hover{ background-color: rgba(127,140,150,.24) !important; }
body.dark-mode .hover\:bg-slate-200:hover{ background-color: rgba(127,140,150,.32) !important; }

/* ---- Azur (accent principal, remplace le bleu ET l'émeraude Tailwind —
   éditeur de tableur historiquement branded en vert, uniformisé ici) ---- */
.text-blue-300, .text-blue-400, .text-blue-500, .text-blue-600, .text-blue-700, .text-blue-800, .text-blue-900,
.text-emerald-500, .text-emerald-600, .text-emerald-900{ color: var(--azure) !important; }
.bg-blue-500, .bg-blue-600{ background-color: var(--azure) !important; }
.bg-emerald-50{ background-color: var(--azure-soft) !important; }
.border-emerald-100{ border-color: rgba(var(--azure-glow-rgb),.25) !important; }
.hover\:bg-emerald-50:hover{ background-color: var(--azure-soft) !important; }
.hover\:text-emerald-600:hover{ color: var(--azure) !important; }
.bg-blue-50{ background-color: var(--azure-soft) !important; }
.hover\:bg-blue-50:hover{ background-color: var(--azure-soft) !important; }
.hover\:bg-blue-100:hover{ background-color: rgba(var(--azure-glow-rgb),.22) !important; }
.hover\:bg-blue-600:hover{ background-color: var(--azure-press) !important; }
.hover\:bg-white:hover{ background-color: var(--glass-strong) !important; }
.hover\:text-blue-500:hover, .hover\:text-blue-600:hover, .hover\:text-blue-700:hover{ color: var(--azure) !important; }
.hover\:bg-blue-200:hover{ background-color: rgba(var(--azure-glow-rgb),.28) !important; }
.hover\:bg-blue-700:hover{ background-color: var(--azure-press) !important; }
.hover\:border-blue-300:hover, .hover\:border-blue-400:hover{ border-color: var(--azure) !important; }
.focus\:border-blue-500:focus{ border-color: var(--azure) !important; }
.focus\:border-blue-200:focus{ border-color: var(--azure) !important; }
.border-blue-100, .border-blue-200{ border-color: rgba(var(--azure-glow-rgb),.25) !important; }
.border-blue-400, .border-blue-500, .border-blue-600{ border-color: var(--azure) !important; }
.focus\:ring-blue-100:focus{ --tw-ring-color: var(--azure-soft) !important; }
.focus\:border-blue-400:focus, .focus\:border-blue-600:focus{ border-color: var(--azure) !important; }
[class*="shadow-blue-"]{ --tw-shadow-color: rgba(var(--azure-rgb),.18) !important; }
.bg-blue-100{ background-color: var(--azure-soft) !important; }
.bg-white{ background-color: var(--glass-strong) !important; }
body.dark-mode .text-blue-300,
body.dark-mode .text-blue-400,
body.dark-mode .text-blue-500,
body.dark-mode .text-blue-600,
body.dark-mode .text-blue-700,
body.dark-mode .text-blue-800,
body.dark-mode .text-blue-900,
body.dark-mode .text-emerald-500,
body.dark-mode .text-emerald-600,
body.dark-mode .text-emerald-900{ color: var(--azure-glow) !important; }
body.dark-mode .bg-blue-500,
body.dark-mode .bg-blue-600{ background-color: var(--azure-glow) !important; color:#0d1a2b !important; }
body.dark-mode .bg-blue-50{ background-color: var(--azure-soft) !important; }
body.dark-mode .bg-emerald-50{ background-color: var(--azure-soft) !important; }
body.dark-mode .border-emerald-100{ border-color: rgba(var(--azure-glow-rgb),.3) !important; }
body.dark-mode .hover\:bg-emerald-50:hover{ background-color: var(--azure-soft) !important; }
body.dark-mode .hover\:text-emerald-600:hover{ color: var(--azure-glow) !important; }
body.dark-mode .hover\:bg-blue-50:hover{ background-color: var(--azure-soft) !important; }
body.dark-mode .hover\:bg-blue-100:hover{ background-color: rgba(var(--azure-glow-rgb),.26) !important; }
body.dark-mode .hover\:bg-blue-600:hover{ background-color: var(--azure-press) !important; }
body.dark-mode .hover\:bg-white:hover{ background-color: rgba(255,255,255,.06) !important; }
body.dark-mode .hover\:text-blue-500:hover,
body.dark-mode .hover\:text-blue-600:hover,
body.dark-mode .hover\:text-blue-700:hover{ color: var(--azure-glow) !important; }
body.dark-mode .hover\:bg-blue-200:hover{ background-color: rgba(var(--azure-glow-rgb),.30) !important; }
body.dark-mode .hover\:bg-blue-700:hover{ background-color: var(--azure-press) !important; }
body.dark-mode .hover\:border-blue-300:hover,
body.dark-mode .hover\:border-blue-400:hover{ border-color: var(--azure-glow) !important; }
body.dark-mode .focus\:border-blue-200:focus{ border-color: var(--azure-glow) !important; }
body.dark-mode .focus\:border-blue-500:focus{ border-color: var(--azure-glow) !important; }
body.dark-mode .border-blue-100,
body.dark-mode .border-blue-200{ border-color: rgba(var(--azure-glow-rgb),.3) !important; }
body.dark-mode .border-blue-400,
body.dark-mode .border-blue-500,
body.dark-mode .border-blue-600{ border-color: var(--azure-glow) !important; }
body.dark-mode .focus\:ring-blue-100:focus{ --tw-ring-color: var(--azure-soft) !important; }
body.dark-mode .focus\:border-blue-400:focus,
body.dark-mode .focus\:border-blue-600:focus{ border-color: var(--azure-glow) !important; }
body.dark-mode .bg-blue-100{ background-color: var(--azure-soft) !important; }
body.dark-mode .bg-white{ background-color: var(--glass-strong) !important; }

/* ---- Danger (rouge) ---- */
.text-red-300, .text-red-400, .text-red-500, .text-red-600, .text-red-700{ color: var(--danger) !important; }
.bg-red-50, .bg-red-100{ background-color: var(--danger-soft) !important; }
.bg-red-500{ background-color: var(--danger) !important; }
.border-red-200{ border-color: rgba(194,59,74,.3) !important; }
.hover\:bg-red-50:hover{ background-color: var(--danger-soft) !important; }
.hover\:bg-red-100:hover{ background-color: rgba(194,59,74,.22) !important; }
.hover\:text-red-600:hover{ color: var(--danger) !important; }
.hover\:bg-red-200:hover{ background-color: rgba(194,59,74,.28) !important; }
.hover\:bg-red-600:hover{ background-color: #a8323f !important; }
body.dark-mode .text-red-300,
body.dark-mode .text-red-400,
body.dark-mode .text-red-500,
body.dark-mode .text-red-600,
body.dark-mode .text-red-700{ color: #e08a8a !important; }
body.dark-mode .bg-red-50,
body.dark-mode .bg-red-100{ background-color: var(--danger-soft) !important; }
body.dark-mode .bg-red-500{ background-color: #c2504f !important; }
body.dark-mode .border-red-200{ border-color: rgba(224,110,130,.35) !important; }
body.dark-mode .hover\:bg-red-50:hover{ background-color: rgba(194,59,74,.22) !important; }
body.dark-mode .hover\:bg-red-100:hover{ background-color: rgba(224,110,130,.26) !important; }
body.dark-mode .hover\:text-red-600:hover{ color: #e08a8a !important; }
body.dark-mode .hover\:bg-red-200:hover{ background-color: rgba(224,110,130,.32) !important; }
body.dark-mode .hover\:bg-red-600:hover{ background-color: #a8434a !important; }

/* ---- Succès (vert) ---- */
.text-green-500, .text-green-600, .text-green-700{ color: var(--ok) !important; }
.bg-green-50, .bg-green-100{ background-color: var(--ok-soft) !important; }
.bg-green-600{ background-color: var(--ok) !important; }
.border-green-200{ border-color: rgba(47,143,102,.3) !important; }
.hover\:bg-green-200:hover{ background-color: rgba(47,143,102,.28) !important; }
.hover\:bg-green-700:hover{ background-color: #256f50 !important; }
body.dark-mode .text-green-500,
body.dark-mode .text-green-600,
body.dark-mode .text-green-700{ color: #6fd6a8 !important; }
body.dark-mode .bg-green-50,
body.dark-mode .bg-green-100{ background-color: var(--ok-soft) !important; }
body.dark-mode .bg-green-600{ background-color: #3aa876 !important; }
body.dark-mode .border-green-200{ border-color: rgba(78,196,146,.35) !important; }
body.dark-mode .hover\:bg-green-200:hover{ background-color: rgba(78,196,146,.32) !important; }
body.dark-mode .hover\:bg-green-700:hover{ background-color: #2f8f66 !important; }

/* ---- Avertissement (jaune/ambre) ---- */
.text-yellow-600, .text-amber-500, .text-amber-600, .text-orange-400, .text-orange-500, .text-orange-600{ color: var(--warning) !important; }
.bg-yellow-100, .bg-amber-100, .bg-amber-50, .bg-orange-100{ background-color: var(--warning-soft) !important; }
.bg-amber-600{ background-color: var(--warning) !important; }
.border-amber-200{ border-color: rgba(179,121,31,.3) !important; }
.hover\:bg-yellow-200:hover{ background-color: rgba(179,121,31,.28) !important; }
.hover\:bg-amber-700:hover{ background-color: #8f5f18 !important; }
body.dark-mode .text-yellow-600,
body.dark-mode .text-amber-500,
body.dark-mode .text-amber-600,
body.dark-mode .text-orange-400,
body.dark-mode .text-orange-500,
body.dark-mode .text-orange-600{ color: #e0b04d !important; }
body.dark-mode .bg-yellow-100,
body.dark-mode .bg-amber-100,
body.dark-mode .bg-amber-50,
body.dark-mode .bg-orange-100{ background-color: var(--warning-soft) !important; }
body.dark-mode .bg-amber-600{ background-color: #e0b04d !important; }
body.dark-mode .border-amber-200{ border-color: rgba(224,163,72,.35) !important; }
body.dark-mode .hover\:bg-yellow-200:hover{ background-color: rgba(224,163,72,.30) !important; }
body.dark-mode .hover\:bg-amber-700:hover{ background-color: #b3791f !important; }

/* ---- Résidus violet/indigo (icônes d'action, hors badges de type) ---- */
.text-purple-500, .text-purple-600{ color: var(--t-video) !important; }
.bg-purple-50, .bg-purple-100{ background-color: var(--t-video-soft) !important; }
.bg-purple-600{ background-color: var(--t-video) !important; }
.hover\:bg-purple-50:hover{ background-color: var(--t-video-soft) !important; }
.hover\:bg-purple-100:hover{ background-color: rgba(139,111,209,.24) !important; }
.hover\:bg-purple-200:hover{ background-color: rgba(139,111,209,.28) !important; }
.bg-indigo-100{ background-color: var(--t-doc-soft) !important; }
.hover\:bg-indigo-200:hover{ background-color: rgba(91,111,174,.28) !important; }
/* rose : réutilise le token déjà associé aux images (badges de type de fichier) */
.text-rose-500{ color: var(--t-image) !important; }
.bg-rose-50{ background-color: var(--t-image-soft) !important; }
body.dark-mode .text-purple-500,
body.dark-mode .text-purple-600{ color: #b7a2e8 !important; }
body.dark-mode .bg-purple-50,
body.dark-mode .bg-purple-100{ background-color: var(--t-video-soft) !important; }
body.dark-mode .bg-purple-600{ background-color: #b7a2e8 !important; }
body.dark-mode .hover\:bg-purple-50:hover{ background-color: var(--t-video-soft) !important; }
body.dark-mode .hover\:bg-purple-100:hover{ background-color: rgba(166,146,230,.28) !important; }
body.dark-mode .hover\:bg-purple-200:hover{ background-color: rgba(166,146,230,.32) !important; }
body.dark-mode .bg-indigo-100{ background-color: var(--t-doc-soft) !important; }
body.dark-mode .hover\:bg-indigo-200:hover{ background-color: rgba(130,150,224,.30) !important; }
body.dark-mode .text-rose-500{ color: #e88aa0 !important; }
body.dark-mode .bg-rose-50{ background-color: var(--t-image-soft) !important; }

/* ============================================================
   MODE LISTE — jamais retouché jusqu'ici : gardait le fond "carte
   verre" bien visible sur chaque ligne (via .glass-card), alors que
   dans l'artifact les lignes de la liste sont transparentes comme
   les tuiles (surlignage uniquement au survol/sélection), avec une
   ombre neutre sur le badge plutôt que la teinte bleu Tailwind d'origine.
   ============================================================ */
body.list-view #content-files .file-card{
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  border-radius: var(--r-md) !important;
  transition: background .15s ease;
}
body.list-view #content-files .file-card:hover,
body.list-view #content-files .file-card.selected{
  background: var(--azure-soft) !important;
}
body.list-view #content-files .file-card .p-2\.5,
body.list-view #content-files .file-card .p-3{
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 4px 8px -4px var(--glass-sh) !important;
}
body.list-view #content-files .file-card h3{ font-family: var(--font-mono); color: var(--ink); }
body.list-view #content-files .file-card p{ color: var(--mist); }
body.list-view #content-files .file-card .mod-date{
  color: var(--mist-soft) !important;
  font-variant-numeric: tabular-nums;
  font-size: .68rem !important; /* était 0.9rem dans le CSS d'origine, plus gros que le nom (0.8rem) */
}
body.list-view #content-files .file-card p{ font-size: .68rem !important; }

/* Badge d'icône : l'artifact l'affiche à 2.3rem/14px d'arrondi en liste
   (quasi la même taille qu'en grille), le CSS d'origine le réduisait à
   30px avec un arrondi de 0.4rem — d'où l'impression d'icônes minuscules
   et d'arrondi différent de l'artifact. */
body.list-view #content-files .file-card .p-2\.5,
body.list-view #content-files .file-card .p-3{
  width: 2.3rem !important;
  height: 2.3rem !important;
  border-radius: var(--r-md) !important;
}
body.list-view #content-files .file-card i[data-lucide] svg,
body.list-view #content-files .file-card svg.lucide,
body.list-view #content-files .file-card svg{
  width: 1.05rem !important;
  height: 1.05rem !important;
}
body.list-view #content-files .file-card{ min-height: 3rem !important; }

/* Bouton "..." : dans l'artifact il est le PREMIER élément de la tuile
   (donc affiché au tout début, à gauche, avant l'icône) et suit le flux
   normal — le CSS d'origine le sortait du flux (position:absolute) et le
   collait à droite, d'où la position incohérente selon le mode. */
body.list-view #content-files .file-card > div.flex.justify-between{
  justify-content: flex-start !important;
  gap: .6rem;
  flex-shrink: 0;
}
body.list-view #content-files .file-card > div.flex.justify-between > div.relative{
  order: -1;
  /* Doit RESTER position:relative (comportement Tailwind par défaut de
     cette classe) : c'est l'ancre de .dropdown-actions (position:absolute;
     right:0). Un vieux CSS d'origine (index.php, ".list-view .file-card
     .relative{position:static}") le remet à "static" — sans le forcer ici
     en !important, le menu perd son ancre : il remonte jusqu'à .file-card
     (position:relative, pleine largeur de la ligne), et un absolu avec
     "right:0"/"left:auto" dans un conteneur flex se retrouve alors
     positionné/étiré selon l'algorithme flex pour enfants hors-flux, d'où
     un menu bien plus large que prévu et mal placé. */
  position: relative !important;
}
body.list-view #content-files .file-card .more-btn{
  position: static !important;
  right: auto !important;
  top: auto !important;
  transform: none !important;
  background: var(--glass-strong);
  border: 1px solid var(--glass-line);
  border-radius: 999px !important;
  width: 1.9rem; height: 1.9rem;
  display: flex !important; align-items: center; justify-content: center;
  padding: 0 !important;
  opacity: 1;
}
body.list-view #content-files .file-card .more-btn:hover{ background: rgba(127,140,150,.2); }
/* Le CSS d'origine réservait de la place à droite pour le bouton absolu :
   plus nécessaire puisqu'il est maintenant dans le flux, à gauche. */
body.list-view #content-files .file-card{ padding-right: .75rem !important; }
/* .dropdown-actions est ancré en "right:0" (pertinent en grille, où le
   bouton "..." est à droite de la tuile). En liste le bouton est maintenant
   au DÉBUT de la ligne (à gauche) : ancrer le menu à droite le ferait
   s'ouvrir vers la gauche et sortir de l'écran. On l'ancre donc à gauche,
   collé au bouton, comme dans l'artifact. */
body.list-view #content-files .file-card .dropdown-actions{
  left: 0 !important;
  right: auto !important;
  top: calc(100% + .3rem) !important;
}

/* ============================================================
   MODAL PARAMÈTRES — composant partagé (includes/settings-modal.php),
   inclus sur toutes les pages Azur. Centralisé ici (plutôt qu'en <style>
   embarqué dans l'include) car il est chargé une seule fois par
   azur.css et partagé/caché par le navigateur sur les 5 pages, au lieu
   d'être dupliqué 5 fois dans le HTML de chaque page.
   ============================================================ */
.settings-modal-panel{
  width: 100%; max-width: 54rem; height: 38rem; max-height: 85vh;
  display: flex; overflow: hidden;
}
.settings-tab-rail{
  flex: 0 0 12.5rem; display: flex; flex-direction: column; gap: .2rem;
  padding: 1.1rem .7rem; border-right: 1px solid var(--glass-line);
  overflow-y: auto;
}
.settings-tab-item{
  display: flex; align-items: center; gap: .6rem; padding: .6rem .75rem;
  border-radius: var(--r-md); border: none; background: transparent;
  color: var(--ink-2); font-size: .82rem; font-weight: 600; cursor: pointer;
  text-align: left; font-family: var(--font-mono); transition: background .15s ease, color .15s ease;
  white-space: nowrap;
}
.settings-tab-item:hover{ background: rgba(127,140,150,.14); color: var(--ink); }
.settings-tab-item.active{ background: var(--azure-soft); color: var(--azure); }
body.dark-mode .settings-tab-item.active{ color: var(--azure-glow); }
.settings-tab-item.danger{ color: var(--danger); }
body.dark-mode .settings-tab-item.danger{ color: #e08a8a; }
.settings-tab-content{
  flex: 1; min-width: 0; overflow-y: auto; padding: 1.4rem 1.6rem;
}
.settings-tab-panel{ display: none; flex-direction: column; gap: 1.2rem; }
.settings-tab-panel.active{ display: flex; }
.settings-tab-panel h2{
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--ink);
  display: flex; align-items: center; gap: .6rem;
}
.settings-row{
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .9rem 1rem; border-radius: var(--r-lg); background: rgba(127,140,150,.08);
}
.settings-row h3{ font-size: .88rem; font-weight: 700; color: var(--ink); }
.settings-row p{ font-size: .78rem; color: var(--mist); margin-top: .1rem; }
.settings-view-btn{
  flex: 1; padding: 1rem; border-radius: var(--r-lg); border: 2px solid var(--glass-line);
  background: transparent; display: flex; flex-direction: column; align-items: center; gap: .5rem;
  color: var(--ink-2); cursor: pointer; transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.settings-view-btn:hover{ border-color: var(--azure); color: var(--ink); }
body.dark-mode .settings-view-btn:hover{ border-color: var(--azure-glow); }
.settings-view-btn.active{ border-color: var(--azure); background: var(--azure-soft); color: var(--azure); }
body.dark-mode .settings-view-btn.active{ border-color: var(--azure-glow); color: var(--azure-glow); }
.settings-danger-box{ padding: 1.2rem; border-radius: var(--r-lg); border: 1.5px solid rgba(194,59,74,.3); background: var(--danger-soft); }
.settings-danger-box.warn{ border-color: rgba(179,121,31,.35); background: var(--warning-soft); }
.settings-danger-box h3{ font-weight: 700; color: var(--danger); margin-bottom: .35rem; }
.settings-danger-box.warn h3{ color: var(--warning); }
body.dark-mode .settings-danger-box h3{ color: #e08a8a; }
body.dark-mode .settings-danger-box.warn h3{ color: #e0b04d; }
.settings-danger-box p{ font-size: .8rem; color: var(--ink-2); margin-bottom: .8rem; }

.toggle-switch{ position: relative; width: 44px; height: 24px; flex: none; }
.toggle-switch input{ opacity: 0; width: 0; height: 0; }
.toggle-slider{
  position: absolute; cursor: pointer; inset: 0; background: rgba(127,140,150,.35);
  border-radius: 999px; transition: .2s ease;
}
.toggle-slider:before{
  position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px;
  background: #fff; border-radius: 50%; transition: .2s ease; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle-switch input:checked + .toggle-slider{ background: var(--azure); }
body.dark-mode .toggle-switch input:checked + .toggle-slider{ background: var(--azure-glow); }
.toggle-switch input:checked + .toggle-slider:before{ transform: translateX(20px); }

.settings-storage-bar{ width: 100%; height: 10px; border-radius: 999px; background: rgba(127,140,150,.2); overflow: hidden; }
.settings-storage-bar .fill{ height: 100%; background: linear-gradient(90deg,var(--azure-glow),var(--azure)); }
.settings-type-bar{ width: 100%; height: 10px; border-radius: 999px; overflow: hidden; display: flex; background: rgba(127,140,150,.2); }
.settings-type-row{ display: flex; align-items: center; gap: .6rem; font-size: .8rem; color: var(--ink-2); }
.settings-type-row .dot{ width: .6rem; height: .6rem; border-radius: 999px; flex: none; }
.settings-type-row .label{ flex: 1; }
.settings-type-row .count{ font-size: .68rem; color: var(--mist); }
.settings-type-row .size{ font-weight: 700; color: var(--ink); }

@media (max-width: 767px){
  .settings-modal-panel{ flex-direction: column; max-height: 92vh; }
  .settings-tab-rail{
    flex-direction: row; overflow-x: auto; white-space: nowrap; flex: 0 0 auto;
    border-right: none; border-bottom: 1px solid var(--glass-line); padding: .7rem;
  }
  .settings-tab-item span{ display: none; }
  .settings-tab-content{ padding: 1.1rem; }
}

/* ============================================================
   Messagerie interne (chat) — includes/messages-panel.php
   Menu déroulant ancré sous l'icône du header : même langage
   visuel que .acct-menu / .storage-pop (verre, même rayon,
   même ombre, même animation azur-pop).
   ============================================================ */
.messages-btn{
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border-radius: 50%; border: none;
  background: var(--glass-strong); cursor: pointer; color: var(--ink-2); flex-shrink: 0;
}
.messages-btn:hover{ color: var(--ink); }
.messages-btn.active{ color: var(--azure); }
body.dark-mode .messages-btn.active{ color: var(--azure-glow); }
.messages-badge{
  position: absolute; top: -.1rem; right: -.1rem; min-width: 1.05rem; height: 1.05rem;
  padding: 0 .28rem; border-radius: 999px; background: var(--danger); color: #fff;
  font-size: .6rem; font-weight: 700; font-family: var(--font-mono);
  display: flex; align-items: center; justify-content: center; line-height: 1;
  border: 2px solid var(--glass-strong);
}

/* ---------- le panneau déroulant ---------- */
.chat-pop{
  position: fixed; z-index: 250; width: 21rem; max-width: calc(100vw - 1rem);
  border-radius: var(--r-lg); padding: .35rem; display: none;
  background: var(--glass-strong); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 24px 48px -26px var(--glass-sh);
}
.chat-pop.open{ display: block; animation: azur-pop .14s ease-out; }
.chat-pop-head{ display: flex; align-items: center; gap: .4rem; padding: .5rem .3rem .6rem .6rem; }
.chat-pop-titlebtn{
  flex: 1; min-width: 0; display: flex; align-items: center; gap: .4rem;
  border: none; background: transparent; padding: 0; text-align: left; cursor: default;
}
.chat-pop-titlebtn.clickable{ cursor: pointer; }
.chat-pop-titlebtn.clickable:hover .chat-pop-title{ text-decoration: underline; }
.chat-pop-title{
  min-width: 0; font-size: .82rem; font-weight: 700; color: var(--ink);
  font-family: var(--font-display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Étiquette "team" : distingue une discussion de team d'un simple groupe. */
.chat-team-tag{
  display: inline-flex; align-items: center; gap: .2rem; flex: none;
  padding: .1rem .4rem; border-radius: 999px;
  background: rgba(139,111,209,.16); color: #7c62c2;
  font-size: .58rem; font-weight: 700; font-family: var(--font-mono);
  max-width: 9rem; overflow: hidden;
}
body.dark-mode .chat-team-tag{ background: rgba(166,146,230,.2); color: #b8a4ee; }
.chat-team-tag span{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-team-tag i, .chat-team-tag svg{ width: .6rem; height: .6rem; flex: none; }
.chat-team-tag.sm{ margin-left: .3rem; vertical-align: middle; }
.chat-members-head{
  font-size: .66rem; color: var(--mist); font-weight: 700;
  padding: .2rem .6rem .4rem; text-transform: uppercase; letter-spacing: .03em;
}
.chat-you{ font-size: .6rem; color: var(--mist); font-weight: 600; }
/* Étiquette "admin de discussion" dans la vue Membres (clic droit pour la basculer). */
.chat-admin-badge{
  display: inline-flex; align-items: center; padding: .05rem .4rem; border-radius: 999px;
  background: var(--azure-soft); color: var(--azure); font-size: .58rem; font-weight: 700;
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .02em; vertical-align: middle;
}
body.dark-mode .chat-admin-badge{ color: var(--azure-glow); }
.chat-pop-iconbtn{
  width: 1.7rem; height: 1.7rem; border-radius: 50%; border: none; background: transparent;
  color: var(--mist); cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex: none; padding: 0;
}
.chat-pop-iconbtn:hover{ background: rgba(127,140,150,.18); color: var(--ink); }
.chat-pop-iconbtn i, .chat-pop-iconbtn svg{ width: .9rem; height: .9rem; }
.chat-pop-body{ display: flex; flex-direction: column; min-height: 0; }
/* Le panneau bascule ses vues avec la classe utilitaire .hidden de Tailwind :
   on la rend explicitement gagnante ici pour ne pas dépendre de l'ordre
   d'injection de la feuille Tailwind CDN par rapport à azur.css. */
.chat-pop .hidden{ display: none !important; }

/* ---------- recherche d'utilisateurs ---------- */
.chat-search-wrap{ position: relative; padding: 0 .3rem .4rem; flex: none; }
.chat-search-icon{
  position: absolute; left: .95rem; top: 50%; transform: translateY(-60%);
  width: .85rem; height: .85rem; color: var(--mist-soft); pointer-events: none;
}
.chat-search-input{
  width: 100%; border-radius: var(--r-md); border: 1px solid var(--glass-line);
  background: var(--glass); padding: .45rem .7rem .45rem 2.1rem; font-size: .78rem;
  color: var(--ink); font-family: var(--font-mono); outline: none;
}
.chat-search-input:focus{ border-color: var(--azure); }
.chat-search-results{
  position: absolute; top: 100%; left: .3rem; right: .3rem; z-index: 20;
  max-height: 13rem; overflow-y: auto; border-radius: var(--r-md);
  background: var(--glass-strong); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  box-shadow: 0 20px 40px -22px var(--glass-sh); padding: .25rem;
}
.chat-user-row{
  display: flex; align-items: center; gap: .55rem; padding: .45rem .5rem;
  border-radius: var(--r-sm); cursor: pointer;
}
.chat-user-row:hover{ background: rgba(127,140,150,.14); }
.chat-user-row .chat-user-name{ font-size: .78rem; font-weight: 600; color: var(--ink); }
.chat-user-row .chat-user-mail{ font-size: .64rem; color: var(--mist); }

/* ---------- pastille d'initiales (reprend .azur-avatar) ---------- */
.chat-avatar{
  width: 2rem; height: 2rem; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: .66rem; font-weight: 700; color: #fff; font-family: var(--font-display);
  background: linear-gradient(155deg,var(--azure-glow),var(--azure));
}
.chat-avatar.sm{ width: 1.7rem; height: 1.7rem; font-size: .58rem; }
.chat-avatar.avatar-img{ object-fit: cover; background: none; }
/* Groupe / team : pastille d'icône au lieu des initiales d'une personne. */
.chat-avatar.is-group{ background: linear-gradient(155deg,#8b6fd1,#6b4fb0); }
.chat-avatar i, .chat-avatar svg{ width: .95rem; height: .95rem; }

/* ---------- liste des conversations ---------- */
.chat-conv-list{
  max-height: 19rem; overflow-y: auto; display: flex; flex-direction: column;
  gap: .1rem; padding: 0 .05rem .1rem;
}
.chat-empty{ text-align: center; color: var(--mist); font-size: .76rem; padding: 1.6rem .8rem; line-height: 1.5; }
.chat-conv-row{
  display: flex; align-items: center; gap: .6rem; padding: .5rem .55rem; width: 100%;
  border-radius: var(--r-sm); border: none; background: transparent; cursor: pointer; text-align: left;
}
.chat-conv-row:hover{ background: rgba(127,140,150,.14); }
.chat-conv-info{ flex: 1; min-width: 0; }
.chat-conv-name{ display: block; font-size: .78rem; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-conv-preview{ display: block; font-size: .68rem; color: var(--mist); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: .05rem; }
.chat-conv-row.unread .chat-conv-preview{ color: var(--ink-2); font-weight: 600; }
.chat-conv-badge{
  min-width: 1.15rem; height: 1.15rem; border-radius: 999px; background: var(--azure); color: #fff;
  font-size: .62rem; font-weight: 700; font-family: var(--font-mono);
  display: flex; align-items: center; justify-content: center; flex: none;
}
body.dark-mode .chat-conv-badge{ background: var(--azure-glow); color: #0d1a2b; }

/* ---------- centre de notifications (bouton + panneau) ----------
   Bouton et badge : même gabarit que .messages-btn/.messages-badge, classes
   propres pour rester indépendant du JS de la messagerie. Panneau : hérite
   de .chat-pop (voir includes/notifications-panel.php), avec .notif-pop pour
   les quelques ajustements propres à cette liste. */
.notif-btn{
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border-radius: 50%; border: none;
  background: var(--glass-strong); cursor: pointer; color: var(--ink-2); flex-shrink: 0;
}
.notif-btn:hover{ color: var(--ink); }
.notif-btn.active{ color: var(--azure); }
body.dark-mode .notif-btn.active{ color: var(--azure-glow); }
.notif-badge{
  position: absolute; top: -.1rem; right: -.1rem; min-width: 1.05rem; height: 1.05rem;
  padding: 0 .28rem; border-radius: 999px; background: var(--danger); color: #fff;
  font-size: .6rem; font-weight: 700; font-family: var(--font-mono);
  display: flex; align-items: center; justify-content: center; line-height: 1;
  border: 2px solid var(--glass-strong);
}

.notif-list{ max-height: 24rem; overflow-y: auto; display: flex; flex-direction: column; gap: .1rem; padding: 0 .05rem .1rem; }
.notif-row{
  display: flex; align-items: flex-start; gap: .6rem; padding: .55rem .55rem; width: 100%;
  border-radius: var(--r-sm); border: none; background: transparent; cursor: pointer; text-align: left;
}
.notif-row:hover{ background: rgba(127,140,150,.14); }
.notif-row.unread{ background: rgba(var(--azure-glow-rgb),.08); }
.notif-row.unread:hover{ background: rgba(var(--azure-glow-rgb),.14); }
.notif-icon{
  width: 2rem; height: 2rem; border-radius: 50%; flex: none; margin-top: .05rem;
  display: flex; align-items: center; justify-content: center;
  background: var(--neutral-soft); color: var(--mist);
}
.notif-icon i, .notif-icon svg{ width: .95rem; height: .95rem; }
.notif-icon-quota{ background: var(--warning-soft); color: var(--warning); }
.notif-icon-chat_mention{ background: var(--azure-soft); color: var(--azure); }
body.dark-mode .notif-icon-chat_mention{ color: var(--azure-glow); }
.notif-icon-task_assigned{ background: var(--ok-soft); color: var(--ok); }
.notif-icon-share_received{ background: rgba(139,111,209,.16); color: #7c62c2; }
body.dark-mode .notif-icon-share_received{ color: #b8a4ee; }
.notif-icon-team_invitation{ background: var(--azure-soft); color: var(--azure); }
body.dark-mode .notif-icon-team_invitation{ color: var(--azure-glow); }
.notif-info{ flex: 1; min-width: 0; display: flex; flex-direction: column; }
.notif-title{ display: flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-body{ font-size: .7rem; color: var(--mist); margin-top: .1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-when{ font-size: .64rem; color: var(--mist-soft); font-family: var(--font-mono); margin-top: .15rem; }
.notif-dot{ width: .5rem; height: .5rem; border-radius: 50%; background: var(--azure); flex: none; margin-top: .4rem; }
body.dark-mode .notif-dot{ background: var(--azure-glow); }

/* ---------- fil de discussion ---------- */
.chat-thread{
  height: 17rem; overflow-y: auto; display: flex; flex-direction: column; gap: .25rem;
  padding: .2rem .5rem .4rem;
}
/* Une "row" = la bulle + éventuellement son heure en dessous, alignées du
   même côté. L'heure n'est rendue que sous la dernière bulle d'une série
   (même auteur, même heure) — cf. paintThread() dans messages.js. */
.chat-row{ display: flex; flex-direction: column; max-width: 82%; min-width: 0; }
.chat-row.mine{ align-self: flex-end; align-items: flex-end; }
.chat-row.theirs{ align-self: flex-start; align-items: flex-start; }
/* Peu de messages : on les colle en bas comme une vraie messagerie. Via
   margin-top:auto sur la 1re row (et non justify-content:flex-end, qui
   rend le haut du fil inatteignable au scroll quand ça déborde). */
.chat-thread > .chat-row:first-child{ margin-top: auto; }
.chat-bubble{
  max-width: 100%; padding: .3rem .6rem; border-radius: .95rem; font-size: .78rem; line-height: 1.35;
  overflow-wrap: anywhere; white-space: pre-wrap;
}
.chat-row.mine .chat-bubble{
  background: linear-gradient(155deg,var(--azure-glow),var(--azure)); color: #fff;
  border-bottom-right-radius: .3rem;
}
.chat-row.theirs .chat-bubble{
  background: rgba(127,140,150,.16); color: var(--ink);
  border-bottom-left-radius: .3rem;
}
.chat-bubble-time{
  font-size: .55rem; color: var(--mist); white-space: nowrap;
  margin: .12rem .35rem 0;
}

/* ---------- indicateur de saisie ---------- */
.chat-typing{ font-size: .68rem; color: var(--mist); padding: .1rem .8rem .3rem; flex: none; }
.chat-typing-dots span{ animation: chat-blink 1.2s infinite; }
.chat-typing-dots span:nth-child(2){ animation-delay: .2s; }
.chat-typing-dots span:nth-child(3){ animation-delay: .4s; }
@keyframes chat-blink{ 0%, 60%, 100%{ opacity: .25; } 30%{ opacity: 1; } }

/* ---------- zone de saisie ---------- */
.chat-composer{
  display: flex; align-items: flex-end; gap: .4rem; padding: .4rem .3rem .3rem;
  border-top: 1px solid var(--glass-line); flex: none;
}
.chat-composer textarea{
  flex: 1; resize: none; max-height: 5rem; border-radius: var(--r-md);
  border: 1px solid var(--glass-line); background: var(--glass);
  padding: .45rem .7rem; font-size: .78rem; font-family: inherit; color: var(--ink);
  outline: none; line-height: 1.4;
}
.chat-composer textarea:focus{ border-color: var(--azure); }
.chat-send-btn{
  flex: none; width: 2rem; height: 2rem; border-radius: 50%; border: none; padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: #fff;
  background: linear-gradient(155deg,var(--azure-glow),var(--azure));
}
.chat-send-btn i, .chat-send-btn svg{ width: .85rem; height: .85rem; }
.chat-send-btn:hover{ filter: brightness(1.08); }

/* ---------- auteur (groupes/teams), réactions, "vu" ---------- */
.chat-author{
  font-size: .62rem; font-weight: 700; color: var(--mist);
  margin: .1rem .4rem .1rem; letter-spacing: .01em;
}
.chat-reactions{ display: flex; flex-wrap: wrap; gap: .2rem; margin: .15rem .2rem 0; }
.chat-reaction{
  display: inline-flex; align-items: center; gap: .15rem; padding: .05rem .35rem;
  border-radius: 999px; border: 1px solid var(--glass-line); background: var(--glass);
  font-size: .62rem; font-family: var(--font-mono); color: var(--ink-2); cursor: pointer; line-height: 1.5;
}
.chat-reaction:hover{ background: rgba(127,140,150,.18); }
.chat-reaction.mine{ border-color: var(--azure); color: var(--azure); background: var(--azure-soft); }
body.dark-mode .chat-reaction.mine{ color: var(--azure-glow); border-color: var(--azure-glow); }
.chat-seen{
  font-size: .55rem; color: var(--mist); margin: .05rem .35rem 0;
  display: inline-flex; align-items: center; gap: .2rem;
}
.chat-seen::before{ content: '✓'; font-size: .6rem; }

/* ---------- pièces jointes ---------- */
.chat-att{ max-width: 100%; margin-bottom: .15rem; }
/* Vignette d'image : boîte fixe, l'image remplit et se recadre depuis son
   CENTRE (object-position) au lieu d'être rognée par le bas comme le faisait
   un height:auto dans un conteneur en overflow:hidden. Le flex centre aussi
   la vignette elle-même sur les deux axes si l'image est plus petite. */
.chat-att-media{
  display: flex; align-items: center; justify-content: center;
  width: 13rem; height: 9.5rem; max-width: 100%;
  border-radius: .9rem; overflow: hidden;
  background: rgba(127,140,150,.12);
}
.chat-att-media img{
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: center center;
}
.chat-att-video{
  display: block; width: 13rem; height: 9.5rem; max-width: 100%;
  border-radius: .9rem; overflow: hidden; background: #000;
  object-fit: contain; object-position: center center;
}
.chat-att-audio{ max-width: 13rem; height: 2.2rem; }
.chat-att-file{
  display: flex; align-items: center; gap: .5rem; padding: .45rem .6rem; max-width: 13rem;
  border-radius: .9rem; background: rgba(127,140,150,.16); color: var(--ink);
  text-decoration: none; font-size: .74rem;
}
.chat-att-file:hover{ background: rgba(127,140,150,.26); }
.chat-att-info{ flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-att-name{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.chat-att-size{ font-size: .6rem; color: var(--mist); }
.chat-att-file i, .chat-att-file svg{ width: .9rem; height: .9rem; flex: none; color: var(--mist); }
.chat-att.mine .chat-att-file{
  background: var(--azure-soft); color: var(--azure);
}
body.dark-mode .chat-att.mine .chat-att-file{ color: var(--azure-glow); }

.chat-attach-btn{
  flex: none; width: 2rem; height: 2rem; border-radius: 50%; border: none; padding: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: transparent; color: var(--mist);
}
.chat-attach-btn:hover{ background: rgba(127,140,150,.18); color: var(--ink); }
.chat-attach-btn i, .chat-attach-btn svg{ width: .95rem; height: .95rem; }
.chat-attach-preview{
  display: flex; align-items: center; gap: .4rem; flex: none;
  padding: .3rem .55rem; margin: 0 .3rem .3rem; border-radius: var(--r-sm);
  background: var(--azure-soft); color: var(--azure); font-size: .68rem; font-weight: 600;
}
body.dark-mode .chat-attach-preview{ color: var(--azure-glow); }
.chat-attach-preview i, .chat-attach-preview svg{ width: .8rem; height: .8rem; flex: none; }
.chat-attach-preview span{ flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-attach-preview button{
  border: none; background: transparent; color: inherit; cursor: pointer;
  font-size: 1rem; line-height: 1; padding: 0 .2rem;
}

/* ---------- navigateur du Drive (choix d'une pièce jointe) ---------- */
.chat-drive-crumb{
  display: flex; align-items: center; gap: .4rem; flex: none;
  padding: 0 .5rem .45rem; font-size: .66rem; color: var(--mist);
  font-family: var(--font-mono); overflow: hidden;
}
.chat-drive-crumb span{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-drive-up{
  flex: none; width: 1.5rem; height: 1.5rem; border-radius: var(--r-sm); border: none;
  background: rgba(127,140,150,.16); color: var(--ink-2); cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.chat-drive-up:hover{ background: rgba(127,140,150,.28); color: var(--ink); }
.chat-drive-up i, .chat-drive-up svg{ width: .8rem; height: .8rem; }
.chat-avatar.is-folder{ background: linear-gradient(155deg,var(--azure-glow),var(--azure)); }
.chat-avatar.is-file{ background: rgba(127,140,150,.3); color: var(--ink-2); }
.chat-drive-chevron{ width: .8rem; height: .8rem; color: var(--mist); flex: none; }

/* ---------- bandeau de modification ---------- */
.chat-edit-banner{
  display: flex; align-items: center; gap: .4rem; flex: none;
  padding: .3rem .55rem; margin: 0 .3rem .3rem; border-radius: var(--r-sm);
  background: var(--warning-soft); color: var(--warning); font-size: .68rem; font-weight: 600;
}
.chat-edit-banner i, .chat-edit-banner svg{ width: .8rem; height: .8rem; flex: none; }
.chat-edit-banner span{ flex: 1; }
.chat-edit-banner button{
  border: none; background: transparent; color: inherit; text-decoration: underline;
  cursor: pointer; font-size: .66rem; font-family: inherit; padding: 0;
}

/* ---------- menu contextuel d'un message ---------- */
.chat-msg-menu{
  position: fixed; z-index: 300; display: none; padding: .3rem; min-width: 9.5rem;
  border-radius: var(--r-md); background: var(--glass-strong); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  box-shadow: inset 0 1px 0 var(--glass-hi), 0 24px 48px -26px var(--glass-sh);
}
.chat-msg-menu.open{ display: block; animation: azur-pop .12s ease-out; }
.chat-msg-emojis{
  display: flex; gap: .1rem; padding: .15rem; margin-bottom: .2rem;
  border-bottom: 1px solid var(--glass-line);
}
.chat-emoji-btn{
  border: none; background: transparent; cursor: pointer; font-size: .95rem;
  padding: .15rem .2rem; border-radius: var(--r-sm); line-height: 1;
}
.chat-emoji-btn:hover{ background: rgba(127,140,150,.2); transform: scale(1.15); }
.chat-msg-menu-item{
  display: flex; align-items: center; gap: .5rem; width: 100%; padding: .45rem .55rem;
  border: none; background: transparent; border-radius: var(--r-sm); cursor: pointer;
  font-size: .74rem; font-weight: 600; font-family: var(--font-mono); color: var(--ink-2); text-align: left;
}
.chat-msg-menu-item:hover{ background: rgba(127,140,150,.16); color: var(--ink); }
.chat-msg-menu-item.danger{ color: var(--danger); }
.chat-msg-menu-item i, .chat-msg-menu-item svg{ width: .85rem; height: .85rem; flex: none; }
.chat-msg-menu .hidden{ display: none !important; }

/* ---------- vue "nouvelle discussion" ---------- */
.chat-new-tabs{ display: flex; gap: .25rem; padding: 0 .3rem .5rem; flex: none; }
.chat-new-tab, .chat-access-tab{
  flex: 1; padding: .4rem; border-radius: var(--r-sm); border: 1px solid var(--glass-line);
  background: var(--glass); cursor: pointer; font-size: .72rem; font-weight: 700;
  font-family: var(--font-mono); color: var(--mist);
}
.chat-new-tab.active, .chat-access-tab.active{ background: var(--azure-soft); color: var(--azure); border-color: var(--azure); }
body.dark-mode .chat-new-tab.active, body.dark-mode .chat-access-tab.active{ color: var(--azure-glow); border-color: var(--azure-glow); }
#messages-new-view{ padding: 0 .3rem .3rem; }
#messages-new-view .chat-search-input{ width: 100%; }
.chat-chips{ display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .45rem; max-height: 7rem; overflow-y: auto; }
/* Cases à cocher rôles/membres pour restreindre l'accès d'un canal de team. */
.chat-chip-picker{
  display: flex; flex-direction: column; gap: .1rem; margin-top: .45rem;
  max-height: 8rem; overflow-y: auto; padding: .2rem; border-radius: var(--r-sm);
  background: rgba(127,140,150,.08);
}
.chat-check-row{
  display: flex; align-items: center; gap: .5rem; padding: .35rem .4rem;
  border-radius: var(--r-sm); font-size: .74rem; color: var(--ink-2); cursor: pointer;
}
.chat-check-row:hover{ background: rgba(127,140,150,.14); color: var(--ink); }
.chat-check-row input{ flex: none; }
.chat-chip{
  display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .3rem .15rem .5rem;
  border-radius: 999px; background: var(--azure-soft); color: var(--azure);
  font-size: .66rem; font-weight: 600;
}
body.dark-mode .chat-chip{ color: var(--azure-glow); }
.chat-chip button{
  border: none; background: transparent; color: inherit; cursor: pointer;
  font-size: .85rem; line-height: 1; padding: 0 .15rem;
}
.chat-hint{ font-size: .64rem; color: var(--mist); margin-top: .4rem; line-height: 1.4; }
.chat-new-actions{ display: flex; gap: .5rem; justify-content: flex-end; margin-top: .8rem; }
.chat-new-actions button{ flex: none; padding: .4rem .9rem; font-size: .74rem; }
.chat-error{
  margin-top: .5rem; padding: .35rem .55rem; border-radius: var(--r-sm);
  background: var(--danger-soft); color: var(--danger); font-size: .68rem;
}

@media (max-width: 767px){
  .chat-pop{ width: calc(100vw - 1rem); }
  .chat-conv-list{ max-height: 55vh; }
  .chat-thread{ height: 50vh; }
}
