/* =====================================================================
   BIVOUAC — feuille de style
   Charte : tous les jetons sont dans :root ci-dessous (voir REFONTE.md)
   Police : Montserrat (embarquée, licence OFL)
   ===================================================================== */

@font-face { font-family: 'Montserrat'; font-weight: 400; src: url(fonts/montserrat-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 500; src: url(fonts/montserrat-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 600; src: url(fonts/montserrat-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 700; src: url(fonts/montserrat-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Montserrat'; font-weight: 800; src: url(fonts/montserrat-latin-800-normal.woff2) format('woff2'); }

:root {
  /* ===== CHARTE (REFONTE.md, section 1) =====
     Toute couleur, taille de texte, graisse, arrondi et ombre de l'app vient d'ici.
     Ne jamais écrire une valeur en dur plus bas : ajouter ou réutiliser un jeton. */

  /* Marque */
  --navy: #0E2A3B;            /* colonne de gauche */
  --navy-2: #173B52;
  --navy-3: #21495F;
  --teal: #12809A;            /* liens, chemin parcouru (blanc dessus = 4,59) */
  --teal-dark: #0B5E72;       /* pétrole au survol */
  --mint: #5ECDB5;            /* présence en ligne */
  --orange: #F28C28;          /* DESSIN seulement : logo, icônes, traits. Jamais de texte ni de bouton. */
  --sand: #F7E1C0;
  --action: #B4560A;          /* boutons principaux et compteurs (blanc dessus = 4,91) */
  --action-hover: #9A4808;

  /* Règle C : la couleur d'un titre dit son rôle */
  --title-page: #7A3E10;      /* titre de page */
  --title-mine: #0B5E72;      /* ce que vous faites */
  --title-decide: #8A4A12;    /* ce qu'on décide ; texte sur fond orangé */
  --title-info: #33536A;      /* information */

  /* Texte et surfaces */
  --text: #12283A;
  --muted: #5A6B7D;           /* 4,66 au minimum sur --column */
  --bg: #FAF7F2;
  --card: #FFFFFF;
  --column: #F2ECE2;          /* colonnes de tâches, fonds neutres */
  --line: #ECE5DA;
  --line-strong: #D5CABB;     /* pointillés, contours de choix */
  --tint: #FFF8F0;            /* voile orangé très léger (messages d'IA, aujourd'hui, survols) */
  --wait-bg: #FFF1DC;         /* la seule carte teintée : ce qui vous attend */
  --wait-line: #F5D3A4;
  --teal-soft: #E3F3F6;
  --mint-soft: #E4F7F2;
  --orange-soft: #FDEBD8;
  --idea-soft: #FFF4CC;

  /* États */
  --done: #2E9C82;            /* terminé (coche) */
  --done-text: #1F7862;
  --late-bg: #FFE6B8;         /* « prévu hier » : jamais de rouge pour un retard */
  --late-text: #7A4E00;
  --danger: #B9403C;          /* supprimer, erreur (blanc dessus = 5,6) */
  --danger-hover: #A33733;
  --danger-soft: #FCE8E7;
  --danger-line: #F2C9C7;
  --check: #748393;           /* contour des ronds à cocher */
  --link: #0B5E72;            /* liens en texte (7,3 sur blanc) */
  --focus: var(--teal);       /* anneau de focus */

  /* Étiquettes */
  --tag-wait: #9A520C;
  --tag-mine: #0B5E72;
  --tag-done: #1F7862;
  --tag-idea: #8A6A00;
  --tag-neutral: #4A5868;

  /* Tâches dans le calendrier (violet) */
  --task: #7C6FE0;
  --task-text: #4B3FB0;
  --task-soft: #EEECFC;

  /* Sur fond nuit */
  --on-navy: #C9D6E0;
  --on-navy-muted: #8FA5B6;
  --on-navy-danger: #FF8F8A;
  --black: #000000;           /* fond d'un écran partagé */

  /* Correcteur (soulignés façon Word) */
  --gram-spell: #D93A35;
  --gram-grammar: #2F6FDB;
  --gram-style: #8B97A3;

  /* Voiles, halos, ombres */
  --overlay: rgba(14, 42, 59, .45);
  --overlay-strong: rgba(14, 42, 59, .6);
  --veil: rgba(255, 255, 255, .7);
  --teal-veil: rgba(18, 128, 154, .08);
  --teal-ring: rgba(18, 128, 154, .25);
  --mint-ring: rgba(94, 205, 181, .35);
  --orange-ring: rgba(242, 140, 40, .25);
  --orange-ring-0: rgba(242, 140, 40, 0);
  --shadow: 0 1px 2px rgba(14, 42, 59, .05), 0 6px 18px rgba(14, 42, 59, .06);  /* la seule ombre des cartes */
  --shadow-pop: 0 12px 32px rgba(14, 42, 59, .2);                                 /* ce qui flotte : menus, fenêtres */

  /* Texte : Montserrat seule */
  --fs-label: 12px;           /* étiquette, minimum absolu */
  --fs-small: 13.5px;         /* secondaire */
  --fs-text: 15px;            /* courant */
  --fs-strong: 17px;          /* contenu fort */
  --fs-title-sm: 22px;        /* titre de page, téléphone */
  --fs-title: 26px;           /* titre de page, ordinateur */
  --fs-touch: 16px;           /* champs sur téléphone (en dessous, l'iPhone zoome) */
  --fs-logo: 23px;
  --fs-logo-md: 34px;
  --fs-logo-xl: 60px;
  --fs-emoji-xl: 44px;
  --font: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
  --font-code: Consolas, monospace;   /* seulement pour ce qu'on recopie : code d'invitation, adresse, code */
  --fw-text: 500;
  --fw-strong: 600;
  --fw-title: 700;
  --fw-label: 800;            /* étiquettes en MAJUSCULES et logo */
  --ls-label: .09em;

  /* Arrondis */
  --r-sm: 8px;
  --r-md: 12px;               /* boutons, champs, tâches */
  --r-lg: 16px;               /* cartes */
  --r-round: 999px;
  --r-ai: 30%;                /* pastille d'une IA */

  /* Espacements (pour toute nouvelle règle) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px;
  --touch: 44px;              /* zone à toucher minimale sur téléphone */

  /* Paysage du Camp de base (dessin seulement : jamais de texte dans ces couleurs, sauf --land-ink) */
  --land-sky-1: #F8D8B4;      /* ciel à l'aube, du haut vers l'horizon */
  --land-sky-2: #FDEBD3;
  --land-sky-3: #FFF6EA;
  --land-sun: #FFC46B;
  --land-far: #EAC9A9;        /* montagnes du fond */
  --land-mid: #AFC8BF;        /* collines vertes */
  --land-peak: #2D5D72;       /* haut du sommet (le bas est --navy) */
  --land-snow: #FBF3E8;
  --land-hill-1: #F7E3C4;     /* colline du chemin */
  --land-hill-2: #ECC892;
  --land-tree: #3E7A72;
  --land-tent-door: #0A4E5F;
  --land-ground: #B98A4E;
  --land-ink: #5A4A33;        /* noms des étapes posés sur la colline (5,3 sur --land-hill-2) */
  --land-halo: #F4D9B2;       /* liseré clair autour de ces noms */
  --land-far-shade: #D9AE8C;  /* faces à l'ombre des montagnes du fond */
  --land-mid-shade: #93B3A8;
  --land-peak-shade: #173F53; /* face à l'ombre du sommet */
  --land-snow-shade: #D7E2EA;
  --land-hill-light: #FFF1DC;
  --land-mist: #FFF4E6;
  --land-cloud: #FFFFFF;
  --land-pine: #2F6656; --land-pine-light: #4C8B6E; --land-trunk: #6E4A32;
  --land-grass: #8FB06A; --land-flower: #F2A35E;
  /* Ambiance d'Aujourd'hui et paysage du chemin : quelques couleurs encore utilisées (pastilles, étoiles, oiseaux) */
  --amb-d-snow: #FBFDFF; --amb-n-snow: #C9D8EE;  /* neige */
  --amb-d-pine: #2E6150; --amb-n-pine: #0F2A28;  /* sapins */
  --amb-d-trunk: #7A4B32; --amb-n-trunk: #3A2A26;  /* troncs */
  --amb-d-fore: #3E5A36; --amb-n-fore: #0E1714;  /* premier plan */
  --amb-d-bush: #3F7351; --amb-n-bush: #13281F;  /* buisson */
  --amb-d-rock: #A39C92; --amb-n-rock: #3E3D45;  /* rochers */
  --amb-d-stone: #8F8A84; --amb-n-stone: #57504C;  /* pierres du foyer */
  --amb-d-tent: #D8BD8E; --amb-n-tent: #6B5843;  /* tente */
  --amb-d-fur: #8C5A33; --amb-n-fur: #7A4F31;  /* ours */
  --amb-d-ink: #24170F;  /* yeux, nez */
  --amb-d-marmot: #9A6C44; --amb-n-marmot: #86603E;  /* marmotte */
  --amb-d-chamois: #9B7250; --amb-n-chamois: #5E4836;  /* chamois */
  --amb-d-fox: #D9772E; --amb-n-fox: #9A5428;  /* renard */
  --amb-d-owl: #8C7660; --amb-n-owl: #4E4438;  /* hibou */
  --amb-d-log: #7A5233; --amb-n-log: #5A3C28;  /* rondins */
  --amb-d-shadow: #2A1E14;  /* ombres portées */
  --amb-star: #FFFDF5;
  --scene-glow: #FF8A2A;      /* lueur du feu sur la scène peinte (nuit, mode écran) */
  --scene-spark: #FFB347;     /* étincelles quand il n'y a pas d'image d'étincelle */
  --scene-debug: #00E5FF;     /* page de test : cadres des calques et pivots */
  --amb-chip: rgba(255, 253, 248, .88);  /* pastille claire sous un titre posé sur le décor */
  --amb-chip-line: rgba(14, 42, 59, .12);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-weight: var(--fw-text);
  font-size: var(--fs-text);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-label); }
.spacer { flex: 1; }
a { color: var(--link); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; color: var(--title-info); }
h1 { font-size: var(--fs-title); font-weight: var(--fw-title); color: var(--title-page); }
h2 { font-size: var(--fs-strong); font-weight: var(--fw-title); }
h3 { font-size: var(--fs-text); font-weight: var(--fw-title); }
code { font-family: var(--font-code); font-size: var(--fs-label); background: var(--column); padding: 1px 6px; border-radius: var(--r-sm); }
.ico { flex: none; vertical-align: middle; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* ---------- Formulaires & boutons ---------- */
label { display: block; font-size: var(--fs-label); font-weight: var(--fw-strong); color: var(--muted); margin: 12px 0 6px; }
input, textarea, select {
  font: inherit; color: var(--text);
  width: 100%;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 10px 12px;
}
input:focus, textarea:focus, select:focus { border-color: var(--teal); }
input[type=checkbox], input[type=radio] { width: auto; }
input[type=color] { padding: 2px; height: 40px; width: 70px; }
textarea { resize: vertical; }

.btn {
  font: inherit; font-weight: var(--fw-strong); font-size: var(--fs-small);
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  border: 1px solid var(--line); background: var(--card); color: var(--navy);
  border-radius: var(--r-md); padding: 9px 16px; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--bg); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn.primary { background: var(--action); border-color: var(--action); color: var(--card); }
.btn.primary:hover { background: var(--action-hover); }
.btn.navy { background: var(--navy); border-color: var(--navy); color: var(--card); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: var(--card); }
.btn.danger-ghost { color: var(--danger); border-color: var(--danger-line); }
.btn.small { padding: 6px 12px; font-size: var(--fs-label); }
.btn.tiny { padding: 2px 8px; font-size: var(--fs-label); border-radius: var(--r-sm); }
.btn.link, .link { background: none; border: 0; color: var(--link); padding: 0; font: inherit; font-weight: var(--fw-strong); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.icon-btn { background: none; border: 0; color: var(--muted); padding: 6px; border-radius: var(--r-sm); cursor: pointer; display: inline-flex; align-items: center; }
.icon-btn:hover { background: var(--column); color: var(--navy); }
.row { display: flex; gap: 8px; align-items: center; }
.row input { flex: 1; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.msg { min-height: 1em; font-size: var(--fs-label); color: var(--muted); margin: 8px 0 0; }
.msg.error { color: var(--danger); }
.info { background: var(--teal-soft); color: var(--navy); border-radius: var(--r-md); padding: 10px 12px; font-size: var(--fs-small); }

/* ---------- Avatars & étiquettes ---------- */
.avatar {
  flex: none; display: inline-grid; place-items: center;
  border-radius: var(--r-round); color: var(--card); font-weight: var(--fw-title); vertical-align: middle;
  box-shadow: 0 0 0 2px var(--card);
}
.avatar.ai { border-radius: var(--r-ai); color: var(--card); display: inline-grid; place-items: center; }
.avatar.ai .ai-logo { display: block; }
/* IA + propriétaire : la pastille de la marque, la photo du propriétaire en petit en bas à droite */
.ai-duo { position: relative; display: inline-block; flex: none; }
.ai-duo > .avatar.ai { width: 100% !important; height: 100% !important; }
.ai-duo .ai-owner { position: absolute; right: -5px; bottom: -5px; display: flex; border-radius: var(--r-round); box-shadow: 0 0 0 2px var(--card); }
.ai-duo .ai-owner .avatar { box-shadow: none; }
.ai-status-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.ai-nick { display: flex; align-items: center; margin-top: 2px; }
.con-refresh { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 2px; font-size: var(--fs-small); }
.con-refresh.stale { color: var(--action); font-weight: var(--fw-strong); }
.con-refresh .link svg { vertical-align: -2px; }
.cr-steps { margin: 10px 0 4px; padding-left: 22px; display: grid; gap: 8px; line-height: 1.45; }
.ai-nick [data-nick-edit] { display: inline-flex; align-items: center; gap: 4px; padding: 0; font-size: var(--fs-label); }
.ai-nick [data-nick-edit][hidden] { display: none; }
.ai-nick-form { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ai-nick-form[hidden] { display: none; }
.ai-nick-form input { width: 160px; padding: 5px 8px; font-size: var(--fs-small); }
.tag { font-size: var(--fs-label); font-weight: var(--fw-title); padding: 2px 9px; border-radius: var(--r-sm); }
.tag.human { background: var(--teal-soft); color: var(--link); }
.tag.ai { background: var(--orange-soft); color: var(--tag-wait); }

/* =====================================================================
   CONNEXION
   ===================================================================== */
#login { display: grid; grid-template-columns: 1.2fr 1fr; height: 100%; }
.login-art { position: relative; overflow: hidden; background: var(--navy); }
.login-banner { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.login-brand { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-align: center; padding: 14vh 40px 40px; }
.login-brand .wordmark { font-size: var(--fs-logo-xl); color: var(--card); }
.tagline { font-size: var(--fs-strong); color: var(--card); font-weight: var(--fw-text); margin-top: 22px; line-height: 1.5; text-shadow: 0 1px 8px var(--overlay); }
.wordmark { font-weight: var(--fw-label); letter-spacing: 1px; color: var(--navy); line-height: 1; display: inline-flex; flex-direction: column; align-items: center; }
/* « — tech — » sous BIVOUAC, comme sur les planches */
.wordmark .tech { font-size: .42em; font-weight: var(--fw-strong); letter-spacing: .32em; color: var(--orange); margin-top: .18em; display: flex; align-items: center; gap: .45em; padding-left: .32em; }
.wordmark .tech::before, .wordmark .tech::after { content: ''; width: 1.1em; height: 2px; background: var(--orange); border-radius: var(--r-sm); }
.login-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; background: var(--card); }
.login-card { width: 100%; max-width: 380px; }
.login-card h1 { margin-bottom: 6px; }
.login-card form { display: flex; flex-direction: column; margin-top: 18px; }
.login-card form .btn { margin-top: 14px; }
.credits { margin-top: 40px; color: var(--muted); font-size: var(--fs-label); letter-spacing: 1px; }

/* =====================================================================
   STRUCTURE : barre latérale + contenu
   ===================================================================== */
#app { display: grid; grid-template-columns: 250px 1fr; height: 100%; }

#sidebar { background: var(--navy); color: var(--on-navy); display: flex; flex-direction: column; padding: 18px 14px; min-height: 0; }
#sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px; }
#sidebar .brand .wordmark { color: var(--card); font-size: var(--fs-logo); }
#sidebar .brand .brand-logo { display: block; width: 210px; height: auto; margin-left: -6px; } /* logo officiel (22/11), agrandi le 23/11 (Apo) */
.login-logo { display: block; width: min(360px, 80%); height: auto; }
.nav a, .space, .nav-add {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--r-md); color: var(--on-navy); font-weight: var(--fw-text); font-size: var(--fs-text);
}
.nav a:hover, .space:hover, .nav-add:hover { background: var(--navy-2); color: var(--card); }
.nav a.active { background: var(--action); color: var(--card); }
.nav a.active .ico { color: var(--card); }
.badge-count { margin-left: auto; background: var(--action); color: var(--card); font-size: var(--fs-label); font-weight: var(--fw-title); border-radius: var(--r-md); padding: 1px 7px; }
.nav a.active .badge-count { background: var(--card); color: var(--action); }
.nav-section { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--navy-3); flex: 1; overflow-y: auto; min-height: 0; }
.nav-title { font-size: var(--fs-label); font-weight: var(--fw-strong); color: var(--on-navy-muted); padding: 0 12px 8px; }
.space { padding: 8px 12px; font-size: var(--fs-small); }
.space.active { background: var(--navy-3); color: var(--card); }
.space-ico { width: 22px; height: 22px; border-radius: var(--r-sm); flex: none; display: grid; place-items: center; color: var(--card); }
.nav-add { background: none; border: 0; width: 100%; font: inherit; cursor: pointer; font-size: var(--fs-small); }
.nav-empty { font-size: var(--fs-label); color: var(--on-navy-muted); padding: 0 12px; }
/* Encart « En ligne » (colonne de gauche) : coéquipiers connectés, clic = message privé */
.online-title { display: flex; align-items: center; gap: 6px; margin-top: 18px; }
.online-title .presence { width: 7px; height: 7px; }
.online-label { flex: none; white-space: nowrap; }
.online-title { gap: 4px; }
.online-scope { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.online-count { margin-left: auto; color: var(--on-navy); flex: none; }
.online-person { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: var(--r-md); color: var(--on-navy);
  font-size: var(--fs-small); text-decoration: none; min-width: 0; }
.online-person:hover { background: var(--navy-2); color: var(--card); }
.online-av { position: relative; display: inline-flex; flex: none; }
.online-voice { display: inline-flex; color: var(--mint); flex: none; }
.online-dm { display: inline-flex; flex: none; margin-left: auto; color: var(--on-navy-muted); }
.online-person:hover .online-dm, .online-person:focus-visible .online-dm { color: var(--card); }
.online-voice + .online-dm { margin-left: 0; }
.team-extra .dm-btn { color: var(--link); }
/* Qui est en vocal, sous chaque salon de la Discussion (façon Discord) */
.ch-voice { display: flex; flex-direction: column; gap: 2px; margin: 0 0 4px 26px; }
.ch-voice.hidden { display: none; }
.ch-voice-person { display: flex; align-items: center; gap: 7px; padding: 3px 8px; border-radius: var(--r-sm); font-size: var(--fs-label);
  color: var(--text); text-decoration: none; min-width: 0; }
.ch-voice-person:hover { background: var(--bg); }
.ch-voice-person .voice-ring { flex: none; }
.ch-voice-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-voice-state { display: inline-flex; color: var(--muted); flex: none; }
.online-av .presence { position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border: 2px solid var(--navy); }

.me-card { display: flex; align-items: center; gap: 10px; padding: 12px 8px 0; border-top: 1px solid var(--navy-3); margin-top: 10px; }
.me-card { cursor: pointer; }
.me-card:hover strong { text-decoration: underline; }
.me-card > div { min-width: 0; }
.me-card > div span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-card .online-av .presence { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border: 2px solid var(--navy); }
.online-who { display: flex; flex-direction: column; min-width: 0; }
.online-status { font-size: var(--fs-label); color: var(--on-navy-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop-item .presence { flex: none; }
.pop-hint { margin-left: auto; color: var(--muted); font-size: var(--fs-label); padding-left: 10px; }
.pop-status-text { display: flex; gap: 6px; padding: 0 10px 8px; }
.pop-status-text input { flex: 1; min-width: 0; }
.me-card .avatar { box-shadow: none; }
.me-card strong { display: block; color: var(--card); font-size: var(--fs-small); }
.me-card span { font-size: var(--fs-label); color: var(--on-navy-muted); }

#main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
#topbar { display: flex; align-items: center; gap: 16px; padding: 12px 28px; background: var(--navy); }
.search { position: relative; flex: 0 1 420px; margin-left: auto; display: flex; align-items: center; gap: 8px; background: var(--navy-2); border-radius: var(--r-md); padding: 0 12px; color: var(--on-navy-muted); }
.search input { background: none; border: 0; color: var(--card); padding: 9px 0; box-shadow: none; }
.search input::placeholder { color: var(--on-navy-muted); }
.top-actions { display: flex; align-items: center; gap: 14px; }
.top-actions .bell { color: var(--on-navy); position: relative; }
.top-actions .bell:hover { background: var(--navy-2); color: var(--card); }
.dot { position: absolute; top: 5px; right: 6px; width: 8px; height: 8px; border-radius: var(--r-round); background: var(--orange); }
.avatar-link .avatar { box-shadow: 0 0 0 2px var(--navy-3); }
#view { flex: 1; overflow-y: auto; min-height: 0; }

.dropdown { position: absolute; z-index: 30; background: var(--card); border-radius: var(--r-md); box-shadow: var(--shadow-pop); padding: 6px; }
#search-results { top: 44px; left: 0; right: 0; }
.result { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-sm); color: var(--text); }
.result span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result small { color: var(--muted); }
.result:hover { background: var(--bg); }
.result.empty { color: var(--muted); }

/* ---------- Pages ---------- */
.page { padding: 28px 32px 40px; max-width: 1240px; margin: 0 auto; }
.page.narrow { max-width: 860px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.card { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 20px 22px; margin-bottom: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head h2 { display: flex; align-items: center; gap: 10px; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty p { margin: 0; line-height: 1.5; }
.loading { color: var(--muted); padding: 20px; text-align: center; }
.bar { display: block; height: 7px; background: var(--column); border-radius: var(--r-sm); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: var(--r-sm); }

/* ---------- Accueil ---------- */
/* Fenêtre moyenne (ex. web app installée, fenêtre réduite) : une seule colonne, sinon les cartes s'écrasent */
.activity .act { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center; padding: 9px 4px; color: var(--text); border-radius: var(--r-sm); }
.activity .act:hover { background: var(--bg); }
.act-ico { width: 30px; height: 30px; border-radius: var(--r-round); display: grid; place-items: center; background: var(--teal-soft); color: var(--link); }
.act-ico.ai { background: var(--orange-soft); color: var(--action); }
.act-ico.done { background: var(--mint-soft); color: var(--done); }
.act-ico.idea { background: var(--idea-soft); color: var(--tag-idea); }
.act-text { font-size: var(--fs-small); line-height: 1.35; }
.act-text small { display: block; color: var(--muted); font-size: var(--fs-label); }
.act-time { font-size: var(--fs-label); color: var(--muted); white-space: nowrap; }

/* ---------- Mes projets ---------- */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.proj-card { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 20px; color: var(--text); display: flex; flex-direction: column; gap: 10px; border-top: 4px solid var(--c); }
.proj-card:hover { transform: translateY(-2px); transition: transform .12s; }
.proj-card-top { display: flex; align-items: center; gap: 10px; }
.proj-sq { width: 32px; height: 32px; border-radius: var(--r-md); flex: none; display: grid; place-items: center; color: var(--card); }
.proj-card p { margin: 0; color: var(--muted); font-size: var(--fs-small); min-height: 36px; }
.proj-meta { display: flex; gap: 16px; font-size: var(--fs-label); color: var(--muted); }
.proj-meta span { display: flex; align-items: center; gap: 5px; }
.proj-card.add { border: 2px dashed var(--line); box-shadow: none; background: none; align-items: center; justify-content: center; font: inherit; font-weight: var(--fw-strong); color: var(--muted); cursor: pointer; min-height: 180px; }

/* ---------- Projet ---------- */
.project { display: flex; flex-direction: column; height: 100%; }
.project-head { display: flex; align-items: center; gap: 14px; padding: 18px 28px 10px; background: var(--card); }
.proj-icon { width: 42px; height: 42px; border-radius: var(--r-md); display: grid; place-items: center; color: var(--card); }

/* Réglages du projet : icône (à gauche) et couleur ; grille des icônes = PROJECT_ICONS (icons.js) */
.pj-look { display: flex; gap: 20px; align-items: flex-end; }
.pj-icon-btn { width: 56px; height: 44px; border: 1px solid var(--line); border-radius: var(--r-md); display: grid; place-items: center; color: var(--card); cursor: pointer; padding: 0; }
.pj-icon-btn[aria-expanded="true"] { outline: 2px solid var(--link); outline-offset: 2px; }
.pj-look input[type=color] { height: 44px; }
.pj-icons { display: grid; grid-template-columns: repeat(8, 44px); gap: 8px; margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); width: max-content; max-width: 100%; }
.pj-icon-opt { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); color: var(--navy); display: grid; place-items: center; cursor: pointer; padding: 0; }
.pj-icon-opt:hover { border-color: var(--link); }
.pj-icon-opt[aria-checked="true"] { background: var(--c); border-color: var(--c); color: var(--card); }
@media (max-width: 760px) { .pj-icons { grid-template-columns: repeat(4, 44px); gap: 12px; } }
.project-title { flex: 1; }
.project-title h1 { font-size: var(--fs-title-sm); }
.project-title p { margin: 2px 0 0; color: var(--muted); font-size: var(--fs-label); }
.tabs { display: flex; gap: 4px; padding: 0 22px; background: var(--card); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: thin; }
.tabs a { display: flex; align-items: center; gap: 7px; padding: 12px 14px; white-space: nowrap; flex: none; color: var(--muted); font-weight: var(--fw-strong); font-size: var(--fs-small); border-bottom: 3px solid transparent; }
.tabs a:hover { color: var(--navy); }
.tabs a.on { color: var(--navy); border-bottom-color: var(--orange); }
.tab { flex: 1; min-height: 0; overflow-y: auto; }
.tab-discussion, .tab-atelier { overflow: hidden; }
.tab-projet, .tab-taches, .tab-tout, .tab-documents, .tab-equipe { padding: 22px 28px 40px; }

.guide { display: flex; align-items: center; gap: 14px; margin: 14px 28px 0; padding: 12px 16px; border-radius: var(--r-md); background: linear-gradient(90deg, var(--wait-bg), var(--card)); border: 1px solid var(--wait-line); }
.guide-ico { width: 36px; height: 36px; border-radius: var(--r-round); background: var(--action); color: var(--card); display: grid; place-items: center; flex: none; }
.guide div { flex: 1; }
.guide strong { color: var(--navy); font-size: var(--fs-small); }
.guide p { margin: 2px 0 0; font-size: var(--fs-small); color: var(--muted); }

/* Discussion d'équipe */
.discussion { display: grid; grid-template-columns: 230px 1fr; height: 100%; }
.channels { background: var(--navy); padding: 16px 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.channels-title { color: var(--on-navy-muted); font-size: var(--fs-label); font-weight: var(--fw-strong); padding: 0 10px 8px; }
.channels a, .add-channel { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: var(--r-sm); color: var(--on-navy); font-weight: var(--fw-text); font-size: var(--fs-small); }
.channels a:hover, .add-channel:hover { background: var(--navy-2); color: var(--card); }
.channels a.on { background: var(--navy-3); color: var(--card); }
.add-channel { background: none; border: 0; font: inherit; cursor: pointer; margin-top: 6px; }
.channels-note { margin-top: auto; font-size: var(--fs-label); color: var(--on-navy-muted); padding: 10px; line-height: 1.4; display: flex; gap: 6px; }
.channel-main { display: flex; flex-direction: column; min-height: 0; background: var(--card); }
.channel-head { padding: 14px 22px; border-bottom: 1px solid var(--line); position: relative; }
.channel-tools { position: absolute; top: 10px; right: 14px; display: flex; gap: 2px; }
.channel-head p { margin: 2px 0 0; color: var(--muted); font-size: var(--fs-label); }
.chat-slot { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* Atelier IA */
.our-ico { width: 28px; height: 28px; border-radius: var(--r-sm); display: inline-grid; place-items: center; flex: none; }
.our-ico.yellow { background: var(--idea-soft); color: var(--tag-idea); }
.our-ico.red { background: var(--danger-soft); color: var(--danger); }
.our-ico.teal { background: var(--teal-soft); color: var(--link); }
.our-ico.violet { background: var(--task-soft); color: var(--task); }
.our-ico.green { background: var(--mint-soft); color: var(--done); }
.our-ico.orange { background: var(--orange-soft); color: var(--action); }
.my-ai { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: var(--fs-small); }

/* ---------- Fil de discussion ---------- */
.chat { display: flex; flex-direction: column; flex: 1; min-height: 0; position: relative; }
.chat-filters { display: flex; gap: 8px; padding: 14px 22px 0; }
/* « Préparer pour mon IA » (connect.js) : texte tout prêt à coller dans un projet de son IA */
.brief-ais { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); margin: var(--s-2) 0; }
.brief-ai { display: inline-flex; align-items: center; gap: var(--s-2); }
.brief-text { width: 100%; font-size: var(--fs-small); line-height: 1.45; resize: vertical; }
.brief-steps { margin: var(--s-2) 0; padding-left: 1.3em; display: grid; gap: var(--s-1); }
.pill { font: inherit; font-weight: var(--fw-strong); font-size: var(--fs-label); border: 0; background: var(--column); color: var(--navy); padding: 7px 18px; border-radius: var(--r-lg); cursor: pointer; }
.pill.on { background: var(--task-soft); color: var(--task-text); }
.pending-requests { padding: 0 22px; }
.pending { display: flex; gap: 8px; align-items: center; margin-top: 10px; padding: 8px 12px; border-radius: var(--r-md); background: var(--orange-soft); color: var(--title-decide); font-size: var(--fs-label); }
.messages { flex: 1; overflow-y: auto; padding: 16px 22px; min-height: 0; }
.msg { position: relative; display: flex; gap: 12px; padding: 10px 10px; border-radius: var(--r-md); }
.msg:hover { background: var(--bg); }
.msg.ai { background: linear-gradient(90deg, var(--tint), transparent); box-shadow: inset 3px 0 0 var(--owner, transparent); }
.msg-body { flex: 1; min-width: 0; }
.msg-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.msg-head .name { font-weight: var(--fw-title); color: var(--navy); }
.msg-head .owner { font-weight: var(--fw-text); color: var(--muted); }
.msg-head .time { font-size: var(--fs-label); color: var(--muted); }
/* Longs messages : le début exact, puis « Afficher le message complet » / « Réduire » (jamais de résumé) */
.msg-text.folded { max-height: 15em; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent); mask-image: linear-gradient(to bottom, black 70%, transparent); }
.msg-more { display: inline-flex; align-items: center; gap: 4px; min-height: var(--touch); margin-top: var(--s-1); padding: 0; border: 0; background: none;
  font: inherit; font-size: var(--fs-small); font-weight: var(--fw-strong); color: var(--link); cursor: pointer; }
/* Nom du projet sous le titre d'une conversation (plein écran sur téléphone seulement) */
.conv-name { display: inline-flex; flex-direction: column; min-width: 0; }
.conv-sub { display: none; font-size: var(--fs-label); font-weight: var(--fw-text); color: var(--muted); }
.msg-head .edited { font-size: var(--fs-label); color: var(--muted); font-style: italic; cursor: default; }
.msg-edit { margin-top: 4px; }
.msg-edit textarea { width: 100%; box-sizing: border-box; font: inherit; line-height: 1.55; resize: none; padding: 8px 10px; border: 1px solid var(--teal); border-radius: var(--r-md); background: var(--card); color: var(--text); }
.msg-edit-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.msg-edit-actions small { margin-right: auto; font-size: var(--fs-label); }
.msg-text { margin-top: 3px; line-height: 1.55; white-space: pre-wrap; word-wrap: break-word; }
.msg-text pre { background: var(--navy); color: var(--on-navy); padding: 12px; border-radius: var(--r-md); overflow-x: auto; white-space: pre; }
.msg-text pre code { background: none; color: inherit; padding: 0; }
.msg-text .md-li { display: block; padding-left: 14px; position: relative; }
.msg-text .md-li::before { content: '•'; position: absolute; left: 2px; color: var(--orange); }
.msg-text .md-li.num { padding-left: 20px; }
.msg-text .md-li.num::before { content: attr(data-n) '.'; font-weight: var(--fw-title); }
.msg-text .md-h { display: block; margin-top: 4px; }
.mention { background: var(--teal-soft); color: var(--link); font-weight: var(--fw-strong); padding: 0 4px; border-radius: var(--r-sm); }
.msg-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.file-card { font: inherit; display: flex; align-items: center; gap: 10px; padding: 9px 14px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); cursor: pointer; text-align: left; color: var(--text); }
.file-card:hover { border-color: var(--teal); }
.file-card strong { display: block; font-size: var(--fs-small); }
.file-card small { color: var(--muted); font-size: var(--fs-label); }
.file-ico { color: var(--link); }
.reactions { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.reaction { font: inherit; font-size: var(--fs-label); border: 1px solid var(--line); background: var(--card); border-radius: var(--r-lg); padding: 2px 9px; cursor: pointer; }
.reaction.mine { border-color: var(--teal); background: var(--teal-soft); }
.msg-tools { position: absolute; top: 4px; right: 8px; display: none; background: var(--card); border-radius: var(--r-md); box-shadow: var(--shadow); }
.msg:hover .msg-tools, .msg:focus-within .msg-tools { display: flex; }
.emoji-picker { position: absolute; right: 8px; top: 38px; z-index: 5; display: flex; gap: 2px; background: var(--card); border-radius: var(--r-md); box-shadow: var(--shadow-pop); padding: 4px; }
.emoji-picker button { font-size: var(--fs-strong); background: none; border: 0; cursor: pointer; padding: 4px 6px; border-radius: var(--r-sm); }
.emoji-picker button:hover { background: var(--bg); }
.typing { color: var(--action); font-style: italic; font-size: var(--fs-small); padding: 8px 12px; display: flex; align-items: center; gap: 6px; }
.empty-chat { text-align: center; color: var(--muted); max-width: 520px; margin: 40px auto; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-chat .ico { color: var(--orange); }
.empty-chat code { display: block; margin: 2px 0; }

.composer { position: relative; padding: 10px 22px 18px; }
.composer-row { display: flex; align-items: flex-end; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 6px 8px; }
.composer-row:focus-within { border-color: var(--teal); background: var(--card); }
.composer textarea { border: 0; background: none; box-shadow: none; resize: none; padding: 8px 4px; max-height: 220px; }
.composer .send { background: var(--teal); color: var(--card); border: 0; border-radius: var(--r-md); width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer; flex: none; }
.composer .send:hover { background: var(--teal-dark); }
.attach-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--teal-soft); color: var(--navy); border-radius: var(--r-sm); padding: 4px 8px; font-size: var(--fs-label); }
.chip button { background: none; border: 0; cursor: pointer; color: var(--muted); display: flex; }
.ac { bottom: 74px; left: 22px; width: 400px; max-height: 300px; overflow-y: auto; }
.ac-item { font: inherit; display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: var(--r-sm); cursor: pointer; text-align: left; color: var(--text); }
.ac-item.on { background: var(--bg); }
.ac-item.disabled { cursor: default; opacity: .7; }
.ac-item strong { display: block; font-size: var(--fs-small); }
.ac-item small { color: var(--muted); font-size: var(--fs-label); }
.ac-space { width: 24px; height: 24px; border-radius: var(--r-sm); background: var(--column); display: inline-grid; place-items: center; color: var(--muted); flex: none; }

/* ---------- Notre projet ---------- */
.hub-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
@media (max-width: 1180px) { .hub-wrap { grid-template-columns: 1fr; } }
.hub-activity { margin: 0; position: sticky; top: 0; max-height: calc(100vh - 220px); overflow-y: auto; }
.hub-activity .act { grid-template-columns: 30px 1fr; }
.hub-activity .act-time { grid-column: 2; margin-top: -6px; }
.hub { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.hub .card { margin: 0; }
.items { list-style: none; margin: 10px 0; padding: 0; }
.item { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item .bullet { width: 8px; height: 8px; border-radius: var(--r-round); background: var(--tag-idea); flex: none; margin: 0 4px; }
.item-title { flex: 1; cursor: pointer; font-weight: var(--fw-text); }
.item-title small { display: block; color: var(--muted); font-weight: var(--fw-text); font-size: var(--fs-label); }
.item.done .item-title { color: var(--muted); text-decoration: line-through; }
.item .due { font-size: var(--fs-label); color: var(--muted); display: flex; align-items: center; gap: 4px; }
.empty-item { color: var(--muted); font-size: var(--fs-small); }
.add-item { display: flex; gap: 8px; flex-wrap: wrap; }
.add-item input { padding: 8px 10px; min-width: 0; flex: 1 1 140px; }
.add-item .date { flex: 0 0 150px; }

/* ---------- Tâches ---------- */
.tasks-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.tasks-head h2 { flex: 1; }
.who-filter[hidden] { display: none; }
.team-overview { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px; }
.to-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.to-head .counts { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: var(--fs-label); color: var(--muted); flex: 1; }
.to-pct { font-weight: var(--fw-title); color: var(--navy); font-variant-numeric: tabular-nums; }
.to-progress { height: 8px; border-radius: var(--r-sm); background: var(--column); margin: 10px 0 12px; overflow: hidden; }
.to-progress span { display: block; height: 100%; background: var(--done); border-radius: var(--r-sm); }
.to-rows { display: flex; flex-direction: column; gap: 2px; }
.to-row { font: inherit; display: grid; grid-template-columns: minmax(120px, 200px) 1fr auto; align-items: center; gap: 12px; border: 0; background: none; padding: 6px; border-radius: var(--r-sm); cursor: pointer; text-align: left; color: inherit; }
.to-row:hover { background: var(--bg); }
.to-name { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: var(--fw-strong); }
.to-name > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.to-bar { display: flex; height: 10px; border-radius: var(--r-sm); background: var(--bg); overflow: hidden; }
.to-num { font-size: var(--fs-label); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.b-todo { background: var(--line-strong); } .b-doing { background: var(--teal); } .b-done { background: var(--mint); }
.to-legend { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; }
.to-legend i { display: inline-block; width: 10px; height: 10px; border-radius: var(--r-sm); margin-left: 8px; }
.to-legend i:first-child { margin-left: 0; }
.avatar.none.sm { width: 22px; height: 22px; border-radius: var(--r-round); background: var(--column); color: var(--muted); display: inline-grid; place-items: center; flex: none; }
.people-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.person-tasks { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 14px; }
.person-tasks header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.person-tasks .who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.person-tasks .avatar.none { width: 32px; height: 32px; border-radius: var(--r-round); background: var(--column); color: var(--muted); display: grid; place-items: center; flex: none; }
.person-tasks .counts { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: var(--fs-label); color: var(--muted); }
.person-tasks .c-doing { color: var(--link); }
.person-tasks .c-late { color: var(--late-text); font-weight: var(--fw-strong); }
.person-tasks .c-done { color: var(--done); }
.person-tasks ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.person-tasks li { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-top: 1px solid var(--line); cursor: pointer; flex-wrap: wrap; }
.person-tasks li:hover { background: var(--bg); }
.person-tasks li .task-title { min-width: 0; overflow-wrap: anywhere; }
.seg { display: flex; background: var(--card); border-radius: var(--r-md); box-shadow: var(--shadow); padding: 3px; }
.seg button { font: inherit; font-weight: var(--fw-strong); font-size: var(--fs-small); display: flex; gap: 6px; align-items: center; border: 0; background: none; padding: 7px 14px; border-radius: var(--r-sm); color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--orange-soft); color: var(--navy); box-shadow: inset 0 -2px 0 var(--orange); }
.kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.col { border-radius: var(--r-lg); padding: 12px; background: var(--column); min-height: 200px; }
.col.over { outline: 2px dashed var(--teal); }
.col-head { font-weight: var(--fw-title); color: var(--title-info); padding: 4px 6px 12px; }
.col-doing .col-head { color: var(--title-mine); }
.col-done .col-head { color: var(--done-text); }
.col-cards { display: flex; flex-direction: column; gap: 10px; min-height: 20px; }
.task-card { background: var(--card); border-radius: var(--r-md); padding: 12px; box-shadow: var(--shadow); display: flex; align-items: flex-start; gap: 10px; cursor: grab; flex-wrap: wrap; }
.task-card.dragging { opacity: .4; }
.task-title { flex: 1; font-weight: var(--fw-text); line-height: 1.4; }
.task-card.done .task-title { color: var(--muted); }
.task-meta { width: 100%; display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding-left: 30px; }
.task-meta:empty { display: none; }
.due { font-size: var(--fs-label); color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.due.late { color: var(--late-text); font-weight: var(--fw-strong); }
.tick { margin: 0; position: relative; width: 20px; height: 20px; flex: none; cursor: pointer; }
.tick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tick .ico { width: 20px; height: 20px; border: 2px solid var(--check); border-radius: var(--r-round); padding: 2px; color: transparent; }
.tick input:checked + .ico { background: var(--done); border-color: var(--done); color: var(--card); }
.col-add { font: inherit; width: 100%; margin-top: 10px; border: 0; background: none; color: var(--muted); padding: 8px; border-radius: var(--r-sm); cursor: pointer; display: flex; align-items: center; gap: 6px; }
.col-add:hover { background: var(--veil); color: var(--navy); }
.task-table, .doc-table { width: 100%; border-collapse: collapse; }
.task-table { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; }
.task-table th, .doc-table th { text-align: left; font-size: var(--fs-label); color: var(--muted); font-weight: var(--fw-strong); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.task-table td, .doc-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.task-table tr { cursor: pointer; }
.task-table tr:hover td { background: var(--bg); }
.task-table tr.done .task-title { color: var(--muted); text-decoration: line-through; }
.status { font-size: var(--fs-label); font-weight: var(--fw-strong); padding: 3px 10px; border-radius: var(--r-md); }
.s-todo { background: var(--column); }
.s-doing { background: var(--teal-soft); color: var(--link); }
.s-done { background: var(--mint-soft); color: var(--done); }

/* ---------- Documents ---------- */
.drop-zone { border: 2px dashed var(--line-strong); border-radius: var(--r-lg); padding: 26px; text-align: center; color: var(--muted); margin-bottom: 18px; background: var(--card); }
.drop-zone.over { border-color: var(--teal); background: var(--teal-soft); }
.drop-zone p { margin: 8px 0 0; }
.file-link { font: inherit; font-weight: var(--fw-strong); background: none; border: 0; color: var(--navy); cursor: pointer; display: flex; align-items: center; gap: 8px; }
.file-link:hover { color: var(--link); }

/* ---------- Équipe ---------- */
.team-list { margin: 6px 0 12px; }
.team-row { display: grid; grid-template-columns: 10px 36px minmax(150px, 1fr) 80px minmax(160px, 1.3fr) minmax(120px, 1fr); align-items: center; gap: 14px; padding: 12px 6px; border-bottom: 1px solid var(--line); }
.presence { width: 9px; height: 9px; border-radius: var(--r-round); background: var(--done); }
.presence.ai { background: var(--orange); }
.presence.off { background: var(--line-strong); }
.presence.busy { background: var(--danger); }
.presence.away { background: var(--orange); }
.team-name { font-weight: var(--fw-title); color: var(--navy); }
.team-name small { display: block; font-weight: var(--fw-text); color: var(--muted); font-size: var(--fs-label); }
.team-role { color: var(--muted); font-size: var(--fs-small); }
.team-extra { font-size: var(--fs-label); color: var(--muted); justify-self: end; display: flex; align-items: center; gap: 6px; }
.role-badge { font-size: var(--fs-label); font-weight: var(--fw-title); padding: 3px 10px; border-radius: var(--r-md); background: var(--column); color: var(--navy); }
.role-badge.owner { background: var(--orange-soft); color: var(--title-decide); }
.role-badge.admin { background: var(--teal-soft); color: var(--link); }
.role-select { font: inherit; font-size: var(--fs-label); font-weight: var(--fw-strong); width: auto; padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); color: var(--navy); }
.team-row .tag { justify-self: start; }

/* ---------- Notifications ---------- */
.notif-list { padding: 6px 12px; }
.notif { display: flex; gap: 12px; padding: 14px 6px; border-bottom: 1px solid var(--line); }
.notif.unread { background: linear-gradient(90deg, var(--tint), transparent); border-radius: var(--r-md); }
.notif-body { flex: 1; }
.notif-body p { margin: 0 0 4px; line-height: 1.45; }
.notif-body small { color: var(--muted); }
.notif-actions { display: flex; gap: 8px; margin-top: 10px; }
.notif-status { display: inline-block; margin: 6px 0 0 8px; font-size: var(--fs-label); font-weight: var(--fw-strong); color: var(--link); }

/* ---------- Paramètres ---------- */
.ai-status { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.ai-status-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); }
.ai-status-row > .ai-duo, .ai-status-row > .avatar { margin-top: 2px; }
.ai-status-row > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; }
.ai-status-row .state { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-label); color: var(--done); font-weight: var(--fw-strong); }
.link.danger { color: var(--danger); }
details.advanced { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
details.advanced summary { cursor: pointer; font-weight: var(--fw-strong); color: var(--navy); font-size: var(--fs-small); }
details.advanced[open] summary { margin-bottom: 10px; }

/* ---------- Assistant « Brancher mon IA » (connect.js) ---------- */
.cw-dots { display: flex; gap: 6px; margin-bottom: 14px; }
.cw-dots span { width: 24px; height: 24px; border-radius: var(--r-round); display: grid; place-items: center; font-size: var(--fs-label); font-weight: var(--fw-title); background: var(--line); color: var(--muted); }
.cw-dots span.on { background: var(--orange); color: var(--card); }
.cw-dots span.done { background: var(--mint); color: var(--card); }
.cw-choices { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.cw-choice { font: inherit; text-align: left; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 14px; border: 2px solid var(--line); border-radius: var(--r-md); background: var(--card); color: var(--text); }
.cw-choice:hover { border-color: var(--orange); background: var(--tint); }
.cw-choice > span:not(.avatar) { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.cw-choice strong { color: var(--navy); font-size: var(--fs-text); }
.cw-shot { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; margin: 14px 0; background: var(--bg); }
/* Vraies captures de Claude / ChatGPT dans l'assistant : cadre sable, zones à cliquer encadrées en orange */
.cw-real { margin: 14px 0; padding: 12px 14px 10px; border-radius: var(--r-lg);
  background: linear-gradient(160deg, var(--tint) 0%, var(--sand) 100%); border: 1px solid var(--orange-ring); }
.cw-real-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: var(--fs-label); font-weight: var(--fw-title);
  letter-spacing: .02em; color: var(--navy); }
.cw-real-frame { position: relative; display: block; margin: 0 auto; padding: 0; border: 0; border-radius: var(--r-md);
  background: var(--card); cursor: zoom-in; transition: width .25s ease;
  box-shadow: var(--shadow-pop); }
.cw-real-frame img { display: block; width: 100%; height: auto; border-radius: var(--r-md); }
.cw-real-frame:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.cw-real.big .cw-real-frame { width: 100% !important; cursor: zoom-out; }
.cw-mark { position: absolute; border: 2.5px solid var(--orange); border-radius: var(--r-sm); pointer-events: none;
  background: var(--orange-ring); animation: cw-glow 1.8s ease-in-out infinite;
  animation-delay: calc(var(--i) * .3s); }
.cw-mark b { position: absolute; left: -10px; top: -10px; width: 20px; height: 20px; border-radius: var(--r-round);
  background: var(--action); color: var(--card); border: 1.5px solid var(--card); font: var(--fw-title) var(--fs-label)/20px var(--font);
  text-align: center; box-shadow: var(--shadow-pop); }
.cw-mark.pill { border-radius: var(--r-round); }
@keyframes cw-glow {
  0%, 100% { box-shadow: 0 0 0 2px var(--orange-ring), 0 0 10px 2px var(--orange-ring); }
  50% { box-shadow: 0 0 0 5px var(--orange-ring), 0 0 18px 6px var(--orange-ring); } }
@media (prefers-reduced-motion: reduce) { .cw-mark { animation: none; box-shadow: 0 0 0 3px var(--orange-ring); } }
.cw-real-foot { margin: 9px 0 0; font-size: var(--fs-label); text-align: center; color: var(--title-decide); }
.cw-shot-bar { display: flex; align-items: center; gap: 5px; padding: 7px 10px; background: var(--card); border-bottom: 1px solid var(--line); font-size: var(--fs-label); color: var(--muted); }
.cw-shot-bar i { width: 8px; height: 8px; border-radius: var(--r-round); background: var(--line); }
.cw-shot-bar span { margin-left: 8px; }
.cw-shot-body { display: flex; min-height: 110px; }
.cw-shot-side { width: 130px; padding: 12px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; font-size: var(--fs-label); color: var(--muted); }
.cw-shot-side .on { color: var(--navy); font-weight: var(--fw-title); }
.cw-shot-main { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 9px; align-items: flex-start; font-size: var(--fs-label); color: var(--navy); }
.cw-shot-main.center { align-items: center; text-align: center; }
.cw-line { display: block; height: 7px; width: 70%; border-radius: var(--r-sm); background: var(--line); }
.cw-line.short { width: 40%; }
.cw-field { display: block; width: 100%; padding: 6px 9px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); font-family: var(--font-code); font-size: var(--fs-label); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-shot-btn { padding: 6px 12px; border-radius: var(--r-sm); background: var(--navy); color: var(--card); font-weight: var(--fw-strong); font-size: var(--fs-label); }
.cw-shot-btn.pulse { box-shadow: 0 0 0 0 var(--orange-ring); animation: cw-pulse 1.8s infinite; }
@keyframes cw-pulse { 70% { box-shadow: 0 0 0 9px var(--orange-ring-0); } 100% { box-shadow: 0 0 0 0 var(--orange-ring-0); } }
.cw-copy { margin-top: 10px; }
.cw-copy .row { display: flex; align-items: center; gap: 8px; }
.cw-copy code { flex: 1; padding: 8px 10px; word-break: break-all; }
.cw-copy .btn.ok { border-color: var(--mint); color: var(--done); }
.cw-wait { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--r-md); background: var(--teal-soft); color: var(--navy); font-weight: var(--fw-strong); margin: 12px 0; }
.spinner { width: 18px; height: 18px; border-radius: var(--r-round); border: 3px solid var(--teal-ring); border-top-color: var(--teal); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.cw-help { margin-top: 14px; }
.cw-success { width: 54px; height: 54px; border-radius: var(--r-round); background: var(--mint-soft); color: var(--done); display: grid; place-items: center; margin-bottom: 10px; }
.cw-examples { margin: 6px 0 0; padding-left: 20px; line-height: 1.8; color: var(--navy); }
.providers { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.provider { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.provider-head { display: flex; align-items: center; gap: 10px; }
.provider-head .state { margin-left: auto; font-size: var(--fs-label); color: var(--muted); }
.provider-head .state.ok { color: var(--done); font-weight: var(--fw-strong); }
.provider label { margin-top: 0; }
.levels { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.level { font: inherit; text-align: left; cursor: pointer; border: 2px solid var(--line); border-radius: var(--r-md); padding: 14px; display: flex; flex-direction: column; gap: 4px; background: var(--card); margin: 0; color: var(--text); }
.level input { display: none; }
.level strong { color: var(--navy); font-size: var(--fs-text); }
.level span { font-size: var(--fs-label); color: var(--muted); font-weight: var(--fw-text); }
.level.on { border-color: var(--orange); background: var(--tint); }
.levels.big .level { padding: 20px; gap: 8px; }
.levels.big .level .ico { color: var(--orange); }

/* =====================================================================
   COUCHES : fenêtres, toasts, visite guidée
   ===================================================================== */
#modal-backdrop { position: fixed; inset: 0; background: var(--overlay); display: grid; place-items: center; z-index: 50; }
#modal { width: 480px; max-width: calc(100vw - 32px); max-height: 88vh; overflow-y: auto; background: var(--card); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-pop); }
#modal.wide { width: 640px; }
#modal textarea.long-text { min-height: 200px; resize: vertical; line-height: 1.5; }  /* description d'une tâche, détails d'un objectif */
#modal h2 { margin-bottom: 6px; }
#modal h3 { margin-bottom: 8px; }
#modal p { line-height: 1.5; }
.invite-code { font-family: var(--font-code); font-size: var(--fs-title); letter-spacing: 3px; text-align: center; background: var(--bg); border-radius: var(--r-md); padding: 16px; user-select: all; color: var(--navy); font-weight: var(--fw-title); }
.invite-link { font: inherit; width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; background: var(--bg); border: 1px dashed var(--teal); border-radius: var(--r-md); padding: 14px 16px; cursor: pointer; color: var(--navy); }
.invite-link:hover { background: var(--teal-soft); }
.invite-link .url { flex: 1; min-width: 0; font-family: var(--font-code); font-size: var(--fs-text); font-weight: var(--fw-strong); overflow-wrap: anywhere; }
.invite-link .hint { display: inline-flex; align-items: center; gap: 4px; color: var(--link); font-size: var(--fs-label); font-weight: var(--fw-strong); white-space: nowrap; }
.invite-meta { margin: 6px 2px 0; }
.invite-mail { margin: 14px 0 6px; }
.invite-mail label { display: block; font-weight: var(--fw-strong); margin-bottom: 6px; }
.invite-mail-row { display: flex; gap: 8px; flex-wrap: wrap; }
.invite-mail-row input { flex: 1 1 220px; min-width: 0; }
.invite-mail-row .btn { flex: 0 0 auto; }
.invite-mail p { margin: 6px 2px 0; }
#modal h3.invite-or { margin: 18px 0 4px; }
.error-text { color: var(--danger); }
.ok-text { color: var(--link); font-weight: var(--fw-strong); }
.login-invite { background: var(--mint-soft); color: var(--navy); border-radius: var(--r-md); padding: 10px 12px; font-size: var(--fs-small); font-weight: var(--fw-strong); }
.invite-actions { display: flex; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.btn.copied { border-color: var(--mint); color: var(--link); }
.share-menu { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.share-menu.hidden { display: none; }
#inv-pending h3 { margin: 18px 0 8px; }
.pending-invites { display: flex; flex-direction: column; gap: 4px; }
.pending-invite { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--r-sm); background: var(--bg); }
.pending-invite code { font-weight: var(--fw-title); }
.color-pick { display: flex; gap: 8px; }
.swatch { width: 30px; height: 30px; border-radius: var(--r-sm); border: 3px solid transparent; cursor: pointer; }
.swatch.on { border-color: var(--card); box-shadow: 0 0 0 2px var(--navy); }
/* ---------- Modèles de projet (v0.8.6) ---------- */
.tpl-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 12px 0 4px; }
.tpl-card { font: inherit; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 12px; cursor: pointer;
  display: flex; flex-direction: column; gap: 4px; transition: transform .1s, box-shadow .1s, border-color .1s; min-width: 0; }
.tpl-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--teal-soft); }
.tpl-card strong { color: var(--navy); font-size: var(--fs-small); }
.tpl-card span:last-child { font-size: var(--fs-label); color: var(--muted); line-height: 1.35; }
.tpl-card.empty { background: var(--bg); border-style: dashed; }
.tpl-emoji { font-size: var(--fs-title); line-height: 1; margin-bottom: 4px; }
.tpl-emoji.big { font-size: var(--fs-emoji-xl); }
.np-back { margin-bottom: 6px; }
.np-date-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.np-date-row input[type=date] { max-width: 200px; }
.np-date-row label.check { margin: 0; }
.tpl-summary { display: flex; align-items: center; gap: 6px; background: var(--teal-soft); color: var(--title-mine); border-radius: var(--r-md); padding: 8px 12px; font-size: var(--fs-label); margin: 14px 0 0; }
.tpl-ready { text-align: center; padding: 6px 0 4px; }
.tpl-ready h2 { margin: 8px 0 6px; }
.tpl-more { margin: 14px 0 0; border-top: 1px solid var(--line); padding-top: 10px; }
.tpl-more summary { cursor: pointer; color: var(--link); font-weight: var(--fw-strong); font-size: var(--fs-small); }
.tpl-more-list { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.tpl-more-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 8px; border-radius: var(--r-sm); font-size: var(--fs-small); }
.tpl-more-row:hover { background: var(--bg); }
@media (max-width: 1100px) { .tpl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.pick-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.pick { font: inherit; font-weight: var(--fw-strong); display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); cursor: pointer; text-align: left; color: var(--navy); }
.pick:hover { border-color: var(--teal); }
.onb { text-align: left; }
.onb img { display: block; margin-bottom: 10px; }

#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; gap: 10px; width: 380px; }
.toast { position: relative; background: var(--navy); color: var(--on-navy); border-radius: var(--r-lg); padding: 14px 40px 14px 16px; box-shadow: var(--shadow-pop); font-size: var(--fs-small); line-height: 1.45; animation: up .2s ease-out; }
.toast a { color: var(--mint); font-weight: var(--fw-strong); }
.toast.error { background: var(--danger-hover); }
.toast.success { background: var(--done-text); }
.toast.request { background: var(--card); color: var(--text); border-left: 5px solid var(--orange); }
.toast.request em { color: var(--navy); }
.toast.request small { color: var(--muted); }
.toast-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.toast-close { position: absolute; top: 10px; right: 10px; background: none; border: 0; color: inherit; opacity: .6; cursor: pointer; }
@keyframes up { from { transform: translateY(10px); opacity: 0; } }

#tour { position: fixed; inset: 0; z-index: 70; }
.tour-hole { position: fixed; border-radius: var(--r-md); outline: 3px solid var(--orange); outline-offset: 2px; box-shadow: 0 0 0 9999px var(--overlay-strong); pointer-events: none; transition: all .25s; }
.tour-tip { position: fixed; width: 320px; background: var(--card); border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--shadow-pop); }
.tour-tip small { color: var(--tag-wait); font-weight: var(--fw-title); }
.tour-tip h3 { margin: 4px 0 6px; }
.tour-tip p { margin: 0; color: var(--muted); line-height: 1.5; font-size: var(--fs-small); }
.tour-tip .actions { margin-top: 14px; }

/* ---------- Vocal (v0.4) ---------- */
.voice-strip { display: flex; align-items: center; gap: 12px; padding: 8px 22px; border-bottom: 1px solid var(--line); background: var(--bg); flex-wrap: wrap; }
.voice-strip-title { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-label); font-weight: var(--fw-title); color: var(--navy); }
.voice-ring { display: inline-flex; border-radius: var(--r-round); box-shadow: 0 0 0 2px transparent; transition: box-shadow .12s; }
.voice-ring.speaking { box-shadow: 0 0 0 2px var(--mint), 0 0 0 4px var(--mint-ring); }
.voice-ring .avatar { box-shadow: none; }
.voice-state { display: inline-flex; color: var(--danger); }

.voice-bar { margin-top: 10px; padding: 10px; border-radius: var(--r-md); background: var(--navy-2); border: 1px solid var(--navy-3); }
.voice-bar .voice-where { display: block; color: var(--on-navy); }
.voice-bar .voice-where strong { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-label); color: var(--orange); }
.voice-bar .voice-where strong.ok { color: var(--mint); }
.voice-bar .voice-where span { display: block; font-size: var(--fs-label); color: var(--on-navy-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voice-bar .voice-state { margin-left: -10px; background: var(--navy-2); border-radius: var(--r-round); }
.voice-controls { display: flex; gap: 4px; justify-content: space-between; margin-top: 6px; }
.voice-controls .icon-btn { color: var(--on-navy); flex: 1; justify-content: center; }
.voice-controls .icon-btn:hover { background: var(--navy-3); color: var(--card); }
.voice-controls .icon-btn.off { color: var(--on-navy-danger); }
.voice-controls .icon-btn.leave { color: var(--card); background: var(--danger); }
.voice-controls .icon-btn.leave:hover { background: var(--danger-hover); }

/* ---------- Calendrier (refait façon Notion le 23/11 : vues Mois / Semaine, cartes, filtres, Sans date) ---------- */
.cal2 { padding: 0 0 var(--s-5); }
.cal-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); flex-wrap: wrap; margin-bottom: var(--s-3); }
.cal-nav, .cal-tools { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; min-width: 0; }
.cal-title { margin: 0 var(--s-2); min-width: 170px; font-size: var(--fs-strong); color: var(--title-info); }
.cal-title::first-letter { text-transform: uppercase; }
.cal-tools .seg { margin: 0; }
.cal-tools .btn.on { border-color: var(--teal); background: var(--teal-soft); color: var(--link); }
.cal-count { font-size: var(--fs-label); font-weight: var(--fw-strong); }
.cal-filters { display: flex; align-items: center; gap: var(--s-2) var(--s-4); flex-wrap: wrap; margin-bottom: var(--s-3); }
.cal-filters label { display: inline-flex; align-items: center; gap: var(--s-2); margin: 0; font-size: var(--fs-small); color: var(--muted); font-weight: var(--fw-strong); }
.cal-filters select { width: auto; min-width: 0; padding: 6px 10px; font-size: var(--fs-small); }
.cal-kinds { display: inline-flex; gap: var(--s-1); flex-wrap: wrap; }
.cal-kind { font: inherit; font-size: var(--fs-small); font-weight: var(--fw-strong); display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px;
  border-radius: var(--r-round); border: 1px solid var(--line); background: var(--card); color: var(--muted); cursor: pointer; }
.cal-kind i { width: 10px; height: 10px; border-radius: var(--r-round); border: 2px solid currentColor; }
.cal-kind.on { color: var(--text); border-color: var(--line-strong); }
.cal-kind.task.on i { background: var(--task); border-color: var(--task); }
.cal-kind.event.on i { background: var(--teal); border-color: var(--teal); }
.cal-kind.milestone.on i { background: var(--orange); border-color: var(--orange); }
.cal-main > * { min-width: 0; }
.cal-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); align-items: start; }
.cal2.side-open .cal-main { grid-template-columns: minmax(0, 1fr) 260px; }
/* Moins de 1500 px : « Sans date » passe au-dessus de la grille (sinon les colonnes de la semaine deviennent trop étroites) */
@media (max-width: 1500px) {
  .cal2.side-open .cal-main { grid-template-columns: minmax(0, 1fr); }
  .cal2 .cal-nodate { position: static; order: -1; }
  .cal2:not(.is-phone) .cal-nodate-list { flex-direction: row; flex-wrap: wrap; }
  .cal2:not(.is-phone) .cal-nodate-list .cal-card { width: auto; max-width: 260px; }
}
.cal-nodate { display: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-3); position: sticky; top: 0; min-width: 0; }
.cal2.side-open .cal-nodate { display: block; }
.cal-nodate h4 { margin: 0 0 var(--s-1); font-size: var(--fs-text); color: var(--title-info); }
.cal-nodate p { margin: 0 0 var(--s-2); }
.cal-nodate-list { display: flex; flex-direction: column; gap: var(--s-1); }

/* Grille du mois et colonnes de la semaine */
.cal-month, .cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: clip; }
.cal-dow { font-size: var(--fs-label); font-weight: var(--fw-label); color: var(--muted); padding: var(--s-2) var(--s-2) 6px; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--line); }
.cal-cell { container-type: inline-size; position: relative; min-height: 100px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; cursor: pointer; transition: background .12s; }
.cal-month .cal-cell:nth-child(7n), .cal-week .cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.weekend { background: var(--bg); }
.cal-cell.other { background: var(--bg); }
.cal-cell.other .cal-day { color: var(--muted); font-weight: var(--fw-text); }
.cal-cell:hover { background: var(--tint); }
.cal-cell.week { min-height: 420px; }
.cal-cell-head { display: flex; align-items: center; gap: 6px; min-height: 26px; margin-bottom: 2px; }
.cal-day { white-space: nowrap; font-size: var(--fs-small); color: var(--text); font-weight: var(--fw-title); min-width: 26px; height: 26px; padding: 0 4px; display: inline-grid; place-items: center; border-radius: var(--r-round); }
.cal-dow-name { font-size: var(--fs-label); font-weight: var(--fw-label); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.cal-week .cal-day { font-size: var(--fs-strong); }
.cal-cell.today .cal-day { background: var(--action); color: var(--card); }
.cal-new { position: absolute; top: 6px; right: 6px; font: inherit; font-size: var(--fs-label); font-weight: var(--fw-title); color: var(--link); background: var(--card);
  border: 1px dashed var(--teal); border-radius: var(--r-sm); padding: 2px 6px; display: inline-flex; align-items: center; gap: 3px; cursor: pointer; opacity: 0; transition: opacity .12s; }
.cal-cell:hover .cal-new, .cal-new:focus-visible { opacity: 1; }
.cal-items { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-more { font: inherit; font-size: var(--fs-label); color: var(--link); background: none; border: 0; padding: 2px 4px; cursor: pointer; font-weight: var(--fw-strong); text-align: left; }

/* Carte d'un élément : titre sur deux lignes, rond d'état, photo du responsable */
.cal-card { display: flex; align-items: flex-start; gap: 6px; width: 100%; min-width: 0; font: inherit; font-size: var(--fs-label); font-weight: var(--fw-strong); line-height: 1.3;
  text-align: left; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 5px 6px; cursor: pointer;
  box-shadow: var(--shadow); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.cal-card:hover { border-color: var(--line-strong); }
.cal-card-t { flex: 1; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: break-word; hyphens: auto; }
.cal-card-t b { color: var(--link); font-weight: var(--fw-title); }
.cal-card-t .t-code { display: inline; margin-right: 4px; padding: 0 4px; }
.cal-card .ico { flex: none; margin-top: 1px; }
.cal-who { flex: none; display: inline-flex; }
.cal-dot { flex: none; width: 10px; height: 10px; margin-top: 2px; border-radius: var(--r-round); border: 2px solid var(--check); }
.cal-dot.doing { background: var(--task); border-color: var(--task); }
.cal-dot.done { background: var(--done); border-color: var(--done); }
.cal-card.event { border-left: 3px solid var(--teal); }
.cal-card.milestone { background: var(--orange-soft); border-color: var(--wait-line); border-left: 3px solid var(--orange); color: var(--title-decide); }
.cal-card.done { color: var(--muted); box-shadow: none; }
.cal-card.done .cal-card-t > span:last-child { text-decoration: line-through; }
.cal-card.late { background: var(--late-bg); border-color: var(--wait-line); color: var(--late-text); }
.cal-card.big { font-size: var(--fs-text); padding: 10px 12px; border-radius: var(--r-md); min-height: var(--touch); align-items: center; }
.cal-card.big .cal-card-t { -webkit-line-clamp: 3; }
.cal-card.big .cal-dot { margin-top: 0; }
.cal-card-t small { display: block; font-size: var(--fs-label); font-weight: var(--fw-text); color: var(--muted); margin-top: 2px; }
.cal-card.late .cal-card-t small, .cal-card.milestone .cal-card-t small { color: inherit; }
.cal-day-list { display: flex; flex-direction: column; gap: 6px; margin: var(--s-3) 0; }

/* Case étroite (semaine avec « Sans date » ouvert, petite fenêtre) : la photo cède sa place au titre */
@container (max-width: 150px) { .cal-card .cal-who { display: none; } .cal-week .cal-card-t { -webkit-line-clamp: 3; } }

/* Création rapide dans une case */
.cal-quick { display: flex; flex-direction: column; gap: 2px; margin: 0; }
.cal-quick input { font-size: var(--fs-label); padding: 5px 6px; border-radius: var(--r-sm); }
.cal-quick .link { font-size: var(--fs-label); text-align: left; padding: 2px; }

/* Glisser-déposer */
.cal2.drag-on .cal-cell { transition: none; }
.cal-card.dragging { opacity: .4; }
.cal2.is-phone ~ .cal-ghost, body > .cal-ghost.big { max-width: 70vw; }
.cal-ghost { position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none; box-shadow: var(--shadow-pop); outline: 2px solid var(--teal); }
.drop-here, .cal-cell.drop-here { background: var(--teal-soft); box-shadow: inset 0 0 0 2px var(--teal); }

/* Téléphone : petit mois + liste du jour, ou semaine en agenda */
.cal2.is-phone .cal-bar { gap: var(--s-2); }
.cal2.is-phone .cal-title { min-width: 0; flex: 1; margin: 0; font-size: var(--fs-strong); }
.cal2.is-phone .cal-nav { width: 100%; flex-wrap: nowrap; }
.cal2.is-phone .cal-prev { order: 0; } .cal2.is-phone .cal-title { order: 1; } .cal2.is-phone .cal-next { order: 2; } .cal2.is-phone .cal-today { order: 3; }
.cal2.is-phone .cal-filters { display: none; }
.cal2.is-phone .cal-add { display: none; } /* sur téléphone : « Ajouter ce jour-là » sous le jour choisi */
.cal2.is-phone .cal-tools { width: 100%; flex-wrap: nowrap; }
.cal2.is-phone .cal-tools .seg { flex: none; }
.cal2.is-phone .cal-tools .btn { min-height: var(--touch); white-space: nowrap; }
.cal2.is-phone.filters-open .cal-filters { display: flex; flex-direction: column; align-items: stretch; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-3); }
.cal2.is-phone .cal-filters label { justify-content: space-between; }
.cal2.is-phone .cal-filters select { flex: 1; max-width: 70%; }
.cal2.is-phone .cal-main, .cal2.is-phone.side-open .cal-main { grid-template-columns: minmax(0, 1fr); }
.cal2.is-phone .cal-nodate { position: static; order: -1; }
.cal-mini { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 6px; }
.cal-mini .cal-dow { border: 0; text-align: center; padding: 4px 0; }
.cal-mday { font: inherit; font-size: var(--fs-text); font-weight: var(--fw-strong); color: var(--text); background: none; border: 0; border-radius: var(--r-md);
  height: 46px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; min-width: 0; padding: 0; }
.cal-mday.other { color: var(--muted); font-weight: var(--fw-text); }
.cal-mday.today { box-shadow: inset 0 0 0 2px var(--orange); }
.cal-mday.sel { background: var(--action); color: var(--card); }
.cal-dots { display: flex; gap: 2px; height: 6px; }
.cal-dots i { width: 6px; height: 6px; border-radius: var(--r-round); background: var(--task); }
.cal-dots i.event { background: var(--teal); } .cal-dots i.milestone { background: var(--orange); } .cal-dots i.late { background: var(--late-text); }
.cal-mday.sel .cal-dots i { background: var(--card); }
.cal-agenda { display: flex; flex-direction: column; gap: var(--s-4); }
.cal-phone-month { display: flex; flex-direction: column; gap: var(--s-4); }
.cal-agenda-day { display: flex; flex-direction: column; gap: 6px; border-radius: var(--r-md); }
.cal-agenda-day h4 { margin: 0; font-size: var(--fs-text); color: var(--title-info); }
.cal-agenda-day h4::first-letter { text-transform: uppercase; }
.cal-agenda-day.today h4 { color: var(--title-mine); }
.cal-add-day { font: inherit; font-size: var(--fs-small); font-weight: var(--fw-strong); color: var(--link); background: none; border: 1px dashed var(--line-strong);
  border-radius: var(--r-md); min-height: var(--touch); display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.cal-agenda-day header { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
.cal-agenda .cal-add-day { width: var(--touch); flex: none; border-color: transparent; }

/* Pastilles « À venir » (Aujourd'hui) */
.cal-chip { display: flex; align-items: center; gap: 4px; width: 100%; font: inherit; font-size: var(--fs-label); text-align: left; border: 0; border-left: 3px solid; border-radius: var(--r-sm); padding: 3px 6px; margin-top: 3px; cursor: pointer; white-space: nowrap; overflow: hidden; min-width: 0; }
.cal-chip span { overflow: hidden; text-overflow: ellipsis; }
.cal-chip b { font-weight: var(--fw-title); }
.cal-chip .chip-who { margin-left: auto; flex: none; display: inline-flex; }
.cal-chip .chip-who + .chip-proj { margin-left: 4px; }
.cal-chip .ico { flex: none; }
.cal-chip.event { background: var(--teal-soft); border-color: var(--teal); color: var(--title-mine); }
.cal-chip.task { background: var(--task-soft); border-color: var(--task); color: var(--task-text); }
/* tâche en cours : reste violette (l'orange est réservé aux étapes), un peu plus soutenue */
.cal-chip.task.doing { background: color-mix(in srgb, var(--task) 28%, var(--card)); border-color: var(--task-text); color: var(--task-text); font-weight: var(--fw-strong); }
.cal-chip.milestone { background: var(--orange-soft); border-color: var(--orange); color: var(--title-decide); font-weight: var(--fw-strong); }
.cal-chip.done { background: var(--mint-soft); border-color: var(--mint); color: var(--muted); text-decoration: line-through; }
.cal-chip.late { background: var(--late-bg); border-color: var(--late-text); color: var(--late-text); }
.cal-chip:hover { filter: brightness(.96); }
.chip-proj { width: 8px; height: 8px; border-radius: var(--r-round); flex: none; margin-left: auto; }
.lg { width: 10px; height: 10px; border-radius: var(--r-sm); display: inline-block; }
.lg.event { background: var(--teal); } .lg.task { background: var(--task); } .lg.milestone { background: var(--orange); } .lg.late { background: var(--late-text); }
.notice { background: var(--orange-soft); color: var(--title-decide); border-radius: var(--r-md); padding: 8px 12px; font-size: var(--fs-label); margin: 0 0 10px; display: flex; gap: 6px; align-items: center; }

/* À venir (calendrier + accueil) */
.upcoming { display: flex; flex-direction: column; gap: 12px; }
.up-day { display: flex; gap: 10px; align-items: flex-start; }
.up-day > div { min-width: 0; flex: 1; }
.up-label { font-size: var(--fs-label); font-weight: var(--fw-title); color: var(--navy); margin-bottom: 2px; }
.up-label::first-letter { text-transform: uppercase; }
.up-day.late .up-label { color: var(--late-text); }
.up-chips { display: flex; flex-direction: column; gap: 0; }
.up-chips.column { margin: 8px 0; }
.day-badge { flex: none; width: 46px; border-radius: var(--r-md); background: var(--column); display: flex; flex-direction: column; align-items: center; padding: 4px 0; line-height: 1.15; }
.day-badge strong { font-size: var(--fs-strong); color: var(--navy); }
.day-badge small { font-size: var(--fs-label); text-transform: uppercase; color: var(--muted); letter-spacing: .03em; }
.day-badge.today { background: var(--action); }
.day-badge.today strong, .day-badge.today small { color: var(--card); }
.day-badge.late { background: var(--late-bg); color: var(--late-text); height: 46px; justify-content: center; }

/* Choix « Ajouter le … » */
.add-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 4px; }
.add-choice { font: inherit; border: 1px solid var(--line); background: var(--card); border-radius: var(--r-lg); padding: 16px 12px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; transition: transform .1s, box-shadow .1s; }
.add-choice:hover:not([disabled]) { transform: translateY(-2px); box-shadow: var(--shadow); }
.add-choice[disabled] { opacity: .45; cursor: not-allowed; }
.add-choice span { font-size: var(--fs-label); color: var(--muted); }
.add-choice.event { color: var(--link); } .add-choice.task { color: var(--task); } .add-choice.milestone { color: var(--action); }
.add-choice strong { color: var(--navy); }
.act-ico.event { background: var(--teal-soft); color: var(--link); }
label.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: var(--fs-small); }
label.check input { width: auto; }


/* ---------- Messages non lus ---------- */
.unread-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-md); background: var(--action); color: var(--card);
  font-size: var(--fs-label); font-weight: var(--fw-title); display: inline-flex; align-items: center; justify-content: center; line-height: 1; flex: none; }
.unread-badge.hidden { display: none; }
.space { display: flex; align-items: center; gap: 10px; }
.space-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabs a .unread-badge { margin-left: 2px; }
.channels a .channel-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-name .unread-badge { margin-left: 6px; vertical-align: 1px; }

/* ---------- « Qu'est-ce que j'ai raté ? » ---------- */
.missed-btn { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.missed-btn + .btn { margin-left: 0; }
.missed-btn .unread-badge { margin-left: 2px; }
.missed-text { font-size: var(--fs-text); line-height: 1.6; color: var(--text); margin: 6px 0 10px; }
.missed-text.small { font-size: var(--fs-small); color: var(--muted); }
.missed-text.typing { color: var(--action); font-style: italic; display: flex; align-items: center; gap: 6px; }
.missed-hint { font-size: var(--fs-label); color: var(--muted); margin: 0 0 12px; }
.missed-hint.error { color: var(--danger); }
.act-ico.me { background: var(--action); color: var(--card); }
.act-ico.vote { background: var(--orange-soft); color: var(--action); }
.missed-ai { background: var(--teal-soft); border-radius: var(--r-md); padding: 10px 14px; margin: 10px 0 12px; }
.missed-ai .missed-text { margin: 0 0 6px; }
.missed-hint { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.missed-details { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.missed-details summary { cursor: pointer; font-weight: var(--fw-strong); color: var(--navy); font-size: var(--fs-small); }
.missed-details .activity { margin-top: 8px; max-height: 260px; overflow-y: auto; }
.summary-options { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.summary-option { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); cursor: pointer; margin: 0; color: var(--text); font-size: var(--fs-small); }
.summary-option.on { border-color: var(--teal); background: var(--teal-soft); }
.summary-option input { width: auto; margin: 0; }
.summary-none { width: 22px; height: 22px; border-radius: var(--r-round); display: grid; place-items: center; background: var(--bg); color: var(--muted); }

/* ---------- Paramètres en bas de la colonne ---------- */

/* ---------- Vocal sans micro ---------- */
.voice-warning { display: flex; align-items: center; gap: 6px; background: var(--orange-soft); color: var(--title-decide);
  border-radius: var(--r-sm); padding: 6px 10px; font-size: var(--fs-label); font-weight: var(--fw-strong); line-height: 1.35; }
.voice-bar .voice-warning { margin: 6px 0 2px; font-size: var(--fs-label); }

/* ---------- Mes tâches / Mes tâches du jour (v0.8.5) ---------- */
.mytasks { display: flex; flex-direction: column; gap: 12px; }
.mytask-group { display: flex; flex-direction: column; gap: 2px; }
.mytask-label { font-size: var(--fs-label); font-weight: var(--fw-title); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 2px; display: flex; align-items: center; gap: 6px; }
.mytask-label span { background: var(--column); color: var(--navy); border-radius: var(--r-md); padding: 0 7px; font-size: var(--fs-label); }
.mytask-group.late .mytask-label { color: var(--late-text); }
.mytask-group.late .mytask-label span { background: var(--late-bg); color: var(--late-text); }
.mytask-group.today .mytask-label { color: var(--tag-wait); }
.mytask { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--r-md); transition: background .12s, opacity .3s; min-width: 0; }
.mytask:hover { background: var(--bg); }
.mytask.done { opacity: .35; }
.mytask.done .mytask-title { text-decoration: line-through; }
.mytask-title { font: inherit; font-size: var(--fs-small); color: var(--text); background: none; border: 0; padding: 0; text-align: left; cursor: pointer; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mytask-title:hover { color: var(--link); }
.mytask .status { padding: 2px 8px; font-size: var(--fs-label); flex: none; }
.mytask .due { flex: none; }
.mytask-proj { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-label); color: var(--muted); max-width: 130px; flex: none; }
.mytask-proj span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mytask-proj i { width: 8px; height: 8px; border-radius: var(--r-round); flex: none; }
.today-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.today-ico { width: 44px; height: 44px; border-radius: var(--r-md); background: var(--orange-soft); color: var(--action); display: grid; place-items: center; flex: none; }
.today-date::first-letter { text-transform: uppercase; }
label.check.small { font-size: var(--fs-label); color: var(--muted); }

/* ---------- Messages épinglés + suppression en direct (v0.8.5) ---------- */
.pin-bar { display: flex; align-items: center; gap: 10px; padding: 7px 22px; background: var(--tint); border-bottom: 1px solid var(--wait-line); font-size: var(--fs-label); min-width: 0; }
.pin-ico { color: var(--orange); display: inline-flex; flex: none; }
.pin-last { font: inherit; background: none; border: 0; padding: 0; cursor: pointer; display: flex; gap: 6px; min-width: 0; flex: 1; text-align: left; color: var(--text); }
.pin-last strong { flex: none; }
.pin-last span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.pin-last:hover span { color: var(--navy); }
.pin-bar .link { flex: none; }
.pin-tag { display: inline-flex; align-items: center; gap: 3px; font-size: var(--fs-label); font-weight: var(--fw-strong); color: var(--tag-wait); background: var(--orange-soft); border-radius: var(--r-sm); padding: 1px 7px; margin-left: 6px; }
.msg.pinned { box-shadow: inset 3px 0 0 var(--orange); }
.msg-tools .icon-btn.on { color: var(--action); }
.msg.flash { animation: msg-flash 1.6s ease; }
@keyframes msg-flash { 0%, 30% { background: var(--orange-soft); } 100% { background: transparent; } }
.msg.vanish { opacity: 0; transform: translateX(8px); transition: opacity .25s, transform .25s; }
.pin-list { display: flex; flex-direction: column; gap: 12px; max-height: 60vh; overflow-y: auto; margin: 6px 0; }
.pin-item { border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; }
.pin-item-head { display: flex; gap: 8px; align-items: baseline; margin-bottom: 4px; }
.pin-item .actions { margin-top: 8px; }

/* ---------- Paramètres → Sons ---------- */
.sound-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.sound-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sound-row .check { margin: 0; }
.sound-vol { display: flex; align-items: center; gap: 10px; max-width: 360px; }
.sound-vol input[type="range"] { flex: 1; accent-color: var(--teal); border: 0; padding: 0; background: none; box-shadow: none; height: auto; margin: 0; }
.sound-vol span { min-width: 44px; font-size: var(--fs-small); color: var(--muted); }

/* ---------- Documents : versions ---------- */
.docs-hint { display: flex; align-items: center; gap: 6px; margin: 4px 2px 10px; }
.version-badge { display: inline-block; margin-left: 6px; font-size: var(--fs-label); font-weight: var(--fw-title); color: var(--link); background: var(--teal-soft); border-radius: var(--r-sm); padding: 1px 6px; vertical-align: 1px; }
.doc-actions { white-space: nowrap; text-align: right; }

/* ---------- Documents : dossiers (migration 022) ---------- */
.docs-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 2px 10px; flex-wrap: wrap; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; min-width: 0; }
.crumb { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; font: inherit; font-weight: var(--fw-strong); color: var(--link); padding: 4px 6px; border-radius: var(--r-sm); cursor: pointer; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb:last-child { color: inherit; cursor: default; }
.crumb:hover:not(:last-child) { background: var(--teal-soft); }
.crumb-sep { color: var(--muted); }
.folder-row .file-link { font-weight: var(--fw-strong); }
.folder-row .file-link svg { color: var(--orange); }
.drop-over, tr.drop-over td { background: var(--teal-soft) !important; outline: 2px dashed var(--teal); outline-offset: -2px; }
.folder-tree { display: flex; flex-direction: column; max-height: 50vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-md); margin: 6px 0 4px; }
.folder-pick { display: flex; align-items: center; gap: 8px; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; padding: 10px 12px; cursor: pointer; }
.folder-pick:last-child { border-bottom: 0; }
.folder-pick:hover { background: var(--teal-soft); }
.folder-pick svg { color: var(--orange); flex: none; }
.version-list { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; max-height: 50vh; overflow: auto; }
.version-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border-radius: var(--r-sm); background: var(--bg); }
.version-row .muted { display: inline-flex; align-items: center; gap: 5px; }
.version-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* ---------- Vote sur les décisions ---------- */
.new-vote { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; }
.vote { margin-top: 8px; display: flex; flex-direction: column; gap: 5px; cursor: default; }
.vote-head { font-size: var(--fs-label); color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.vote-state { font-weight: var(--fw-title); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: .03em; border-radius: var(--r-sm); padding: 1px 6px; background: var(--column); color: var(--muted); }
.vote-state.open { background: var(--mint-soft); color: var(--done-text); }
.vote-opt { position: relative; display: flex; align-items: center; gap: 8px; width: 100%; font: inherit; font-size: var(--fs-small); text-align: left;
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 10px; background: var(--card); cursor: pointer; overflow: hidden; }
.vote-opt:hover:not([disabled]) { border-color: var(--teal); }
.vote-opt[disabled] { cursor: default; color: var(--navy); opacity: 1; }
.vote-bar { position: absolute; inset: 0 auto 0 0; background: var(--teal-soft); z-index: 0; transition: width .2s; }
.vote-label, .vote-count { position: relative; z-index: 1; }
.vote-label { flex: 1; }
.vote-count { font-weight: var(--fw-title); color: var(--navy); }
.vote-opt.mine { border-color: var(--teal); box-shadow: inset 3px 0 0 var(--teal); font-weight: var(--fw-strong); }
.vote-opt.win { border-color: var(--mint); }
.vote-opt.win .vote-bar { background: var(--mint-soft); }
.vote-inputs { display: flex; flex-direction: column; gap: 6px; }
.vote-inputs .link { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Photo de profil ---------- */
img.avatar.photo { object-fit: cover; background: var(--card); padding: 0; }
.photo-row { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.photo-row .btn { display: inline-flex; align-items: center; gap: 6px; }
.photo-row p { margin: 6px 0 0; }

/* ---------- Historique des salons ---------- */
.older { display: flex; justify-content: center; padding: 8px 0 14px; }
.older .btn { display: inline-flex; align-items: center; gap: 6px; }
.join-mark { display: flex; align-items: center; gap: 10px; margin: 14px 0; font-size: var(--fs-label); font-weight: var(--fw-strong); color: var(--link); }
.join-mark::before, .join-mark::after { content: ''; flex: 1; height: 1px; background: var(--teal-soft); }

/* ---------- Ranger les idées ---------- */
.hub-card .card-head .tidy { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; }
.item .tiny-ico { opacity: 0; transition: opacity .12s; padding: 3px; }
.item:hover .tiny-ico { opacity: 1; }
.archived { margin-top: 8px; font-size: var(--fs-label); }
.archived summary { cursor: pointer; color: var(--muted); font-weight: var(--fw-strong); padding: 4px 0; }
.archived .item { opacity: .75; }

/* ---------- Petit menu flottant (clic droit) ---------- */
.pop-menu { position: fixed; z-index: 1000; min-width: 220px; max-width: 320px; background: var(--card); border-radius: var(--r-md);
  box-shadow: var(--shadow-pop); padding: 6px; font-size: var(--fs-small); color: var(--navy); }
.pop-title { display: flex; align-items: center; gap: 6px; font-weight: var(--fw-title); padding: 6px 8px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.pop-item { display: flex; align-items: center; gap: 8px; width: 100%; font: inherit; text-align: left; background: none; border: 0;
  border-radius: var(--r-sm); padding: 6px 8px; cursor: pointer; color: inherit; }
.pop-item:hover { background: var(--teal-soft); }
.pop-item.on { font-weight: var(--fw-strong); color: var(--link); }
.pop-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop-space { display: inline-block; width: 14px; }
.pop-label { display: block; font-size: var(--fs-label); color: var(--muted); font-weight: var(--fw-strong); margin: 8px 8px 2px; }
.pop-range { display: flex; align-items: center; gap: 8px; padding: 0 8px 6px; }
.pop-range input[type="range"] { flex: 1; accent-color: var(--teal); border: 0; padding: 0; background: none; box-shadow: none; height: auto; margin: 0; }
.pop-range span { min-width: 42px; font-size: var(--fs-label); color: var(--muted); text-align: right; }
.pop-note { margin: 4px 8px; color: var(--muted); font-size: var(--fs-label); }
.ch-voice-person[data-person] { cursor: context-menu; }

/* ---------- Décisions : choix multiple, donner suite ---------- */
.vote-kind { font-size: var(--fs-label); color: var(--title-decide); font-weight: var(--fw-strong); }
.vote-box { position: relative; z-index: 1; width: 15px; height: 15px; border: 1.5px solid var(--check); border-radius: var(--r-sm); display: inline-grid; place-items: center; background: var(--card); color: var(--link); flex: none; }
.vote-opt.mine .vote-box { border-color: var(--teal); }
.follow-btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; margin-top: 2px; }
.follow-done { font-size: var(--fs-label); color: var(--done-text); display: inline-flex; align-items: center; gap: 5px; }
.follow-types { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 4px; }
.follow-type { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 7px 10px; cursor: pointer; font-size: var(--fs-small); margin: 0; }
.follow-type input { display: none; }
.follow-type.on { border-color: var(--teal); background: var(--teal-soft); color: var(--title-mine); font-weight: var(--fw-strong); }

/* ---------- Tâches : filtre par personne ---------- */
.who-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 14px; }
.who-chip { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: var(--fs-label); font-weight: var(--fw-strong); color: var(--muted);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-round); padding: 4px 10px 4px 6px; cursor: pointer; }
.who-chip:first-child, .who-chip:last-child { padding-left: 10px; }
.who-chip small { font-size: var(--fs-label); background: var(--column); color: var(--muted); border-radius: var(--r-round); padding: 0 6px; }
.who-chip:hover { border-color: var(--teal); }
.who-chip.on { border-color: var(--teal); background: var(--teal-soft); color: var(--title-mine); }
.who-chip.on small { background: var(--card); color: var(--title-mine); }
.who-chip .avatar { box-shadow: none; }

/* ---------- Correcteur façon Word ---------- */
.gram-layer { position: absolute; pointer-events: none; overflow: hidden; color: transparent; background: none; border-color: transparent;
  border-style: solid; white-space: pre-wrap; overflow-wrap: break-word; word-wrap: break-word; z-index: 1; }
.gram-layer mark { background: none; color: transparent; text-decoration-line: underline; text-decoration-style: wavy;
  text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-skip-ink: none; }
.gram-layer mark.gram-spell { text-decoration-color: var(--gram-spell); }
.gram-layer mark.gram-grammar { text-decoration-color: var(--gram-grammar); }
.gram-layer mark.gram-style { text-decoration-color: var(--gram-style); }
.gram-title { gap: 8px; }
.gram-dot { width: 9px; height: 9px; border-radius: var(--r-round); display: inline-block; }
.gram-dot.gram-spell { background: var(--gram-spell); } .gram-dot.gram-grammar { background: var(--gram-grammar); } .gram-dot.gram-style { background: var(--gram-style); }
.gram-msg { color: var(--navy); line-height: 1.4; }
.gram-fix strong { color: var(--link); }
.pop-sep { height: 1px; background: var(--line); margin: 4px 0; }

/* ---------- Visio ---------- */
.voice-quota { display: flex; gap: 10px; font-size: var(--fs-label); color: var(--on-navy-muted); margin-top: 6px; justify-content: center; }
.voice-quota span { display: inline-flex; align-items: center; gap: 4px; }
.voice-quota.light { color: var(--muted); margin-top: 0; }
.voice-controls .icon-btn.on { color: var(--mint); }
.video-stage { flex-basis: 100%; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); max-height: 46vh; overflow: auto; padding: 4px 0 2px; }
.video-stage[data-n="1"] { grid-template-columns: minmax(260px, 560px); }
.video-stage[data-n="2"] { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
.video-tile { position: relative; background: var(--navy); border-radius: var(--r-md); overflow: hidden; aspect-ratio: 16 / 9; }
.video-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
video.mirror { transform: scaleX(-1); }
/* Partage d'écran (09/11) : toute la largeur, image entière (pas rognée), plein écran au double-clic */
.video-tile.screen { grid-column: 1 / -1; background: var(--black); cursor: zoom-in; }
.video-tile.screen video { object-fit: contain; }
.video-tile.screen:fullscreen { border-radius: 0; cursor: zoom-out; }
.video-name .icon { vertical-align: -2px; }
.screen-tabs { display: flex; gap: 8px; margin: 4px 0 12px; }
.screen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 10px; max-height: 52vh; overflow: auto; }
.screen-tile { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 8px; border: 2px solid var(--line); border-radius: var(--r-md);
  background: none; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.screen-tile:hover, .screen-tile:focus-visible { border-color: var(--teal); }
.screen-tile img, .screen-thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: var(--navy); border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; color: var(--on-navy-muted); }
.screen-tile span[translate] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-small); }
.screen-audio { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-weight: var(--fw-strong); }
.screen-audio + .muted { margin: 4px 0 0 24px; }
.video-name { position: absolute; left: 8px; bottom: 6px; font-size: var(--fs-label); font-weight: var(--fw-strong); color: var(--card); background: var(--overlay-strong); padding: 2px 8px; border-radius: var(--r-sm); z-index: 1; }
.cam-row #v-cam-test { margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; }
.cam-preview video { width: 100%; max-width: 320px; border-radius: var(--r-md); background: var(--navy); aspect-ratio: 16 / 9; object-fit: cover; }

/* ---------- Compte personnel ---------- */
.login-card { max-height: calc(100vh - 80px); overflow-y: auto; }
.login-card .forgot { align-self: flex-end; margin: -2px 0 4px; font-size: var(--fs-label); }
#signup-fields .form-row { margin: 0; }
#signup-fields p { margin: 8px 0 4px; }
.complete-screen { position: fixed; inset: 0; z-index: 2000; background: var(--navy); display: grid; place-items: center; padding: 24px; overflow: auto; }
.complete-card { background: var(--card); border-radius: var(--r-lg); padding: 28px 30px; width: min(560px, 100%); box-shadow: var(--shadow-pop); }
.complete-card h1 { margin: 10px 0 6px; font-size: var(--fs-title-sm); }
.sub-h { font-size: var(--fs-text); margin: 16px 0 4px; }
.msg.error { color: var(--danger); }

/* =====================================================================
   PETIT ÉCRAN (téléphone, version web) — v0.8.13
   La colonne de gauche devient un tiroir (bouton ☰), les grilles passent sur une colonne,
   les salons défilent en bandeau. Rien ne change au-dessus de 760 px.
   ===================================================================== */
.menu-btn { display: none; color: var(--on-navy); }
.menu-btn:hover { background: var(--navy-2); color: var(--card); }
.nav-scrim { display: none; }
@media (max-width: 760px) {
  html, body { overscroll-behavior: none; }
  #app { grid-template-columns: 1fr; }
  #sidebar { position: fixed; inset: 0 auto 0 0; width: min(84vw, 300px); z-index: 45; transform: translateX(-102%);
    transition: transform .2s ease; overflow-y: auto; padding-top: max(18px, env(safe-area-inset-top));
    padding-bottom: max(14px, env(safe-area-inset-bottom)); box-shadow: var(--shadow-pop); }
  body.nav-open #sidebar { transform: none; }
  .nav-scrim { display: block; position: fixed; inset: 0; background: var(--overlay); z-index: 44; opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.nav-open .nav-scrim { opacity: 1; pointer-events: auto; }
  .menu-btn { display: inline-flex; }
  #topbar { gap: 8px; padding: max(8px, env(safe-area-inset-top)) 10px 8px; }
  .search { flex: 1 1 auto; margin-left: 0; min-width: 0; }
  .top-actions { gap: 4px; }
  #view { padding-bottom: env(safe-area-inset-bottom); }

  /* Connexion : une seule colonne, l'illustration devient un bandeau */
  #login { grid-template-columns: 1fr; grid-template-rows: auto 1fr; overflow-y: auto; }
  .login-art { min-height: 150px; }
  .login-brand { padding: 22px 16px; }
  .login-brand .wordmark { font-size: var(--fs-logo-md); }
  .login-brand .login-logo { width: 220px; }
  .login-brand .tagline { display: none; }
  .login-panel { padding: 20px 16px 32px; justify-content: flex-start; }
  .login-card { max-height: none; }

  /* Pages */
  .page { padding: 16px 14px 28px; }
  .page-head { flex-wrap: wrap; align-items: flex-start; }
  .card { padding: 16px 14px; }
  .hub-wrap, .hub { grid-template-columns: minmax(0, 1fr); }
  .hub-wrap { padding: 12px; }
  .add-item { flex-wrap: wrap; }
  .add-item input { min-width: 0; flex: 1 1 140px; }
  .hub-activity { position: static; max-height: none; }
  .kanban { grid-template-columns: 1fr; }
  .people-board { grid-template-columns: 1fr; }
  .tasks-head { flex-wrap: wrap; gap: 10px; }
  .tasks-head h2 { flex-basis: 100%; }
  .task-table, .doc-table { display: block; overflow-x: auto; }

  /* Projet : onglets qui défilent */
  .project-head { padding: 12px 14px 8px; flex-wrap: wrap; }
  .tabs { padding: 0 6px; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { padding: 10px 10px; white-space: nowrap; flex: none; }

  /* Discussion : les salons en bandeau défilant au-dessus du fil */
  .discussion { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .channel-main, .chat, .messages, .msg-body { min-width: 0; }
  .msg-text { overflow-wrap: anywhere; }
  .pin-bar { min-width: 0; }
  .pin-last { min-width: 0; overflow: hidden; }
  .channels { flex-direction: row; align-items: center; gap: 4px; padding: 8px; overflow-x: auto; overflow-y: hidden; }
  .channels-title, .channels-note { display: none; }
  .channels a, .add-channel { flex: none; white-space: nowrap; padding: 7px 10px; }
  .channel-head { padding: 10px 14px; }
  .messages { padding: 10px 10px; }
  .msg { gap: 8px; padding: 8px 6px; }
  .msg-tools { display: flex; position: static; box-shadow: none; background: none; margin-left: auto; }
  .chat-filters { padding: 10px 12px 0; flex-wrap: wrap; }
  .composer { padding: 8px 10px max(12px, env(safe-area-inset-bottom)); }
  .composer textarea { font-size: var(--fs-touch); } /* évite le zoom automatique de l'iPhone */
  input, select, textarea { font-size: var(--fs-touch); }

  /* Équipe : une fiche par personne */
  .team-row { grid-template-columns: 10px 36px minmax(0, 1fr); row-gap: 4px; }
  .team-row > .tag, .team-row > .team-role, .team-row > .team-extra { grid-column: 3; justify-self: start; }

  /* Fenêtres : plein écran ou presque */
  #modal, #modal.wide { width: 100%; max-width: calc(100vw - 16px); max-height: 92vh; padding: 18px 16px; border-radius: var(--r-lg); }
  .actions { flex-wrap: wrap; }
  .voice-strip { padding: 8px 12px; }

  /* Mes tâches (accueil et fenêtre du jour) : le titre sur sa propre ligne */
  .mytask { flex-wrap: wrap; row-gap: 2px; }
  .mytask-title { flex-basis: calc(100% - 40px); white-space: normal; }
  .mytask-proj { margin-left: 30px; }
}

/* Téléphone : boutons rapides de l'accueil en 2 × 2, ligne de projet sans débordement (09/11) */
@media (max-width: 760px) {
  .proj-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* Messages privés */
.dm { display: grid; grid-template-columns: 280px minmax(0, 1fr); height: calc(100vh - 230px); min-height: 380px; padding: 0; overflow: hidden; }
.dm-list { border-right: 1px solid var(--line); overflow-y: auto; min-width: 0; padding: 6px; }
.dm-person { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-md); color: var(--navy); text-decoration: none; min-width: 0; }
.dm-person:hover { background: var(--teal-soft); }
.dm-person.on { background: var(--teal-soft); }
.dm-person.unread strong { color: var(--navy); font-weight: var(--fw-label); }
.dm-person.unread small { color: var(--text); font-weight: var(--fw-strong); }
/* Pastille « messages privés non lus » posée sur la photo (en haut à droite), partout où elle apparaît */
.av-badge { position: absolute; top: -7px; right: -10px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: var(--r-round);
  background: var(--action); color: var(--card); font-size: var(--fs-label); font-weight: var(--fw-label); line-height: 16px; text-align: center;
  border: 2px solid var(--card); box-sizing: content-box; pointer-events: none; animation: av-pop .25s ease-out; }
.av-badge.hidden { display: none; }
#sidebar .av-badge { border-color: var(--navy); }
@keyframes av-pop { from { transform: scale(.4); } to { transform: scale(1); } }
.online-person.offline { opacity: .75; }
.online-waiting { font-size: var(--fs-label); color: var(--on-navy-muted); padding: 8px 12px 2px; }
.dm-person .online-av .presence { border-color: var(--card); }
.dm-person-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.dm-person-text small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-conv { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.dm-conv > .empty { margin: auto; }
.dm-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.dm-head div { display: flex; flex-direction: column; }
.dm-head small { color: var(--muted); font-size: var(--fs-label); }
.dm-back { display: none; transform: scaleX(-1); }
.dm-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.dm-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 78%; }
.dm-msg.mine { align-self: flex-end; align-items: flex-end; }
.dm-bubble { background: var(--column); border-radius: var(--r-lg) var(--r-lg) var(--r-lg) var(--r-sm); padding: 8px 12px; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-wrap; }
.dm-msg.mine .dm-bubble { background: var(--teal); color: var(--card); border-radius: var(--r-lg) var(--r-lg) var(--r-sm) var(--r-lg); }
.dm-msg.mine .dm-bubble a { color: var(--card); }
.dm-msg small { color: var(--muted); font-size: var(--fs-label); margin-top: 2px; }
.dm-compose { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.dm-compose textarea { flex: 1; resize: none; min-width: 0; }
.dm-pad { padding: 12px; }
.dm-note { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
@media (max-width: 760px) {
  .dm { grid-template-columns: minmax(0, 1fr); height: calc(100vh - 190px); }
  .dm-page.has-conv .dm-list { display: none; }
  .dm-page:not(.has-conv) .dm-conv { display: none; }
  .dm-back { display: inline-flex; }
  .dm-page.has-conv .page-head { display: none; }
}

/* Documents des messages privés, y compris les noms longs sur téléphone. */
.dm-compose-row { display: flex; align-items: flex-end; gap: 8px; width: 100%; }
.dm-pending { display: flex; flex-wrap: wrap; gap: 6px; max-width: 100%; }
.dm-pending:empty { display: none; }
.dm-pending .attach-chip { max-width: 100%; overflow-wrap: anywhere; }
.dm-msg { min-width: 0; }
.dm-file { max-width: 100%; margin-top: 4px; text-align: left; }
.dm-file > span { min-width: 0; }
.dm-file strong { display: block; overflow-wrap: anywhere; white-space: normal; }

/* Lectures : petit repère visuel, détails au clavier, au clic et au survol. */
.read-indicator { display: inline-flex; align-items: center; justify-content: center; gap: 3px;
  min-width: 28px; min-height: 28px; padding: 3px 5px; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--muted); font: inherit; font-size: var(--fs-label); vertical-align: middle; cursor: pointer; }
.read-indicator.is-seen { color: var(--link); }
.read-indicator:hover { background: var(--teal-veil); }
.msg-read { display: block; margin-top: 2px; }
.read-details { overflow-wrap: anywhere; }


/* Messagerie : commandes au toucher / clavier, médias et sélecteur partagé. */
.msg-tools { display: flex; }
.msg-tools .msg-actions:not([hidden]) { display: flex; flex-wrap: wrap; }
.msg-tools .msg-actions[hidden], .dm-actions[hidden] { display: none; }
.msg-tools { align-items: center; }
.msg-actions { background: var(--card); border-radius: var(--r-md); box-shadow: var(--shadow); }
.dm-tools { display: flex; align-items: center; gap: 4px; }
.dm-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.dm-msg .msg-edit { max-width: 100%; width: 340px; }
.dm-msg .msg-edit textarea { width: 100%; }
.media-compose { flex: none; }
.media-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.media-head h2 { font-size: var(--fs-strong); margin: 0; }
.media-picker { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.media-tabs, .media-categories { display: flex; gap: 6px; flex-wrap: wrap; }
.media-categories[hidden] { display: none; }
.media-categories .pill { font-size: var(--fs-label); }
.media-search { display: flex; gap: 6px; }
.media-search input { min-width: 0; flex: 1; }
.media-results { overflow-y: auto; max-height: min(42vh, 340px); min-height: 120px; }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 3px; }
.emoji-grid button { border: 0; border-radius: var(--r-sm); background: var(--bg); font-size: var(--fs-title); padding: 5px; min-height: 44px; cursor: pointer; }
.emoji-grid button:hover, .emoji-grid button:focus-visible { background: var(--sand); }
.media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.media-grid button { padding: 4px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); cursor: pointer; min-width: 0; }
.media-grid img { width: 100%; height: 90px; object-fit: contain; }
.media-grid span { display: block; font-size: var(--fs-label); overflow-wrap: anywhere; }
.media-preview { min-width: 0; }
.media-preview img { max-width: 100%; max-height: 140px; display: block; margin: auto; }
.media-preview p { font-size: var(--fs-label); overflow-wrap: anywhere; margin: 6px 0; }
.message-image { display: block; max-width: 220px; max-height: 200px; object-fit: contain; border-radius: var(--r-sm); }
.message-image:not([src]), .message-image[hidden] { display: none; }
.file-card:has(.message-image) { flex-wrap: wrap; max-width: 100%; }
.file-card .message-image { flex-basis: 100%; }
.pending-image { width: 54px; height: 44px; object-fit: contain; border-radius: var(--r-sm); }
.dm-compose-row textarea { min-width: 0; }
@media (max-width: 600px) {
  .msg { flex-wrap: wrap; }
  .msg-body { flex: 1; }
  .msg-tools { position: static; margin-left: auto; max-width: 100%; }
  .msg-actions { max-width: 240px; }
  .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dm-compose-row { gap: 3px; }
  .dm-compose-row .icon-btn { width: 30px; min-width: 30px; padding: 4px; }
  .message-image { max-width: min(220px, 60vw); }
}

/* =====================================================================
   CHARTE, règles communes (refonte, livraison 1)
   ===================================================================== */

/* Focus : le même anneau sur tout ce qui se clique ou se remplit */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
#sidebar :focus-visible, .voice-bar :focus-visible, .toast :focus-visible { outline-color: var(--mint); }
.composer textarea:focus-visible { outline: 0; } /* l'anneau est porté par le cadre autour */
.composer-row:has(textarea:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Règle C : titres qui parlent de vos tâches / de ce qu'on décide */
.t-mine { color: var(--title-mine); }
.t-decide { color: var(--title-decide); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--teal); }

/* Téléphone : zones à toucher de 44 px. Les grands éléments grandissent ;
   les petits (icônes, coches, liens) gardent leur taille et reçoivent une zone invisible autour. */
@media (max-width: 760px) {
  .btn:not(.tiny):not(.link), .tabs a, .nav a, .space, .nav-add, .seg button, .pop-item, .channels a, .add-channel,
  .col-add, .composer .send,
  select, textarea, input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]) { min-height: var(--touch); }
  .btn:not(.tiny):not(.link), .composer .send { min-width: var(--touch); }
  h1 { font-size: var(--fs-title-sm); }
  :where(.icon-btn, .tick, .btn.tiny, .link, .toast-close, .read-indicator, .menu-btn, .avatar-link, .pill, .who-chip, .cal-chip, .crumb, .mytask-title, .pin-last, .team-row > a, .reaction, .notif small a, .summit-title, .major-check) { position: relative; }
  :where(.icon-btn, .tick, .btn.tiny, .link, .toast-close, .read-indicator, .menu-btn, .avatar-link, .pill, .who-chip, .cal-chip, .crumb, .mytask-title, .pin-last, .team-row > a, .reaction, .notif small a, .summit-title, .major-check)::after {
    content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: max(100%, var(--touch)); height: max(100%, var(--touch));
  }
}

/* =====================================================================
   Refonte, livraison 2 : « Aujourd'hui » et « Camp de base » (REFONTE.md, sections 2 et 3)
   Une seule carte principale par écran (.main-card), une seule carte teintée (.card.wait).
   ===================================================================== */

/* Étiquette de carte : petite, MAJUSCULES, couleur du rôle, trait fin dessous */
.eyebrow { font-size: var(--fs-label); font-weight: var(--fw-label); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--title-decide); }
.card-label { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-label); font-weight: var(--fw-label); letter-spacing: var(--ls-label);
  text-transform: uppercase; color: var(--title-info); padding-bottom: var(--s-3); margin-bottom: var(--s-3); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-label.mine { color: var(--title-mine); }
.card-label.decide-label { color: var(--title-decide); }
.card-label.idea-label { color: var(--tag-idea); }
.card-label.wait-label { border-bottom-color: var(--wait-line); }   /* carte teintée : titre neutre */
.label-ico { width: 26px; height: 26px; border-radius: var(--r-sm); display: inline-grid; place-items: center; flex: none; background: var(--column); }
.card-label.mine .label-ico { background: var(--teal-soft); }
.decide-label .label-ico { background: var(--orange-soft); color: var(--action); }
.idea-label .label-ico { background: var(--idea-soft); }
.wait-label .label-ico { background: var(--card); color: var(--action); }
.card-label .n { background: var(--action); color: var(--card); border-radius: var(--r-round); padding: 1px 8px; font-weight: var(--fw-title); letter-spacing: 0; }
.card-label .n.soft { background: var(--column); color: var(--tag-neutral); }
.card-label .see-all { margin-left: auto; text-transform: none; letter-spacing: 0; font-size: var(--fs-small); }
.main-card { border: 1.5px solid var(--title-mine); box-shadow: none; }
.main-card .card-label { border-bottom: 0; padding-bottom: 0; } /* le titre et le bouton suffisent : moins de traits */
.main-card .more-link { border-top: 0; padding-top: 0; }
.calm { margin: var(--s-2) 0 var(--s-3); line-height: 1.5; }
.meta { color: var(--muted); font-size: var(--fs-small); display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.meta .dot { position: static; width: 9px; height: 9px; border-radius: var(--r-sm); display: inline-block; flex: none; }
.chip-late { background: var(--late-bg); color: var(--late-text); font-weight: var(--fw-strong); font-size: var(--fs-label); border-radius: var(--r-round); padding: 3px 10px; white-space: nowrap; }
.chip-date { background: var(--column); color: var(--tag-neutral); font-weight: var(--fw-strong); font-size: var(--fs-label); border-radius: var(--r-round); padding: 3px 10px; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.btn.teal { background: var(--teal); border-color: var(--teal); color: var(--card); }
.btn.teal:hover { background: var(--teal-dark); }
.pop-hint { margin-left: auto; color: var(--muted); }
.create-btn { flex: none; }
.todo-title, .then-title, .big-title { background: none; border: 0; padding: 0; font: inherit; text-align: left; cursor: pointer; color: var(--title-mine); font-weight: var(--fw-strong); }
.todo-title:hover, .then-title:hover, .big-title:hover { text-decoration: underline; }

/* Listes de progrès : sans cadre */
.plist { padding: var(--s-2) var(--s-2) var(--s-4); }
.plist-t { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-label); font-weight: var(--fw-label); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--done-text); }
.plist ul { list-style: none; margin: var(--s-3) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-3); }
.win { display: flex; gap: var(--s-3); align-items: flex-start; line-height: 1.4; }
.win-tick { width: 22px; height: 22px; border-radius: var(--r-round); background: var(--done); color: var(--card); display: grid; place-items: center; flex: none; }
.win b { font-weight: var(--fw-strong); color: var(--title-info); }

/* ---------- Aujourd'hui ---------- */
.today-hero { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); padding: var(--s-5) var(--s-6); border-radius: var(--r-lg);
  border: 1px solid var(--wait-line); background: linear-gradient(100deg, var(--tint), var(--land-sky-2)); margin-bottom: 18px; }
.today-hello { min-width: 0; }
.today-hero h1 { margin: var(--s-1) 0; }
.today-sum { margin: 0; color: var(--text); }
.today-week { display: flex; align-items: center; gap: var(--s-4); background: var(--card); border-radius: var(--r-lg); padding: var(--s-3) var(--s-5); box-shadow: var(--shadow); flex: none; }
.week-bars { display: flex; align-items: flex-end; gap: 5px; height: 34px; }
.week-bars i { width: 9px; border-radius: var(--r-sm); background: var(--done); }
.week-bars i.none { background: var(--line); }
.week-text { display: flex; flex-direction: column; }
.week-text b { font-size: var(--fs-strong); font-weight: var(--fw-title); color: var(--title-info); }
.week-text span { color: var(--muted); font-size: var(--fs-small); }
.today-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.today-main, .today-side { min-width: 0; }
.card.wait { background: var(--wait-bg); border: 1px solid var(--wait-line); box-shadow: none; }
.wait-row { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-3) 0; }
.wait-row + .wait-row { border-top: 1px solid var(--wait-line); }
.wait-ico { width: 38px; height: 38px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--wait-line); display: grid; place-items: center; color: var(--action); flex: none; }
.wait-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wait-text b { color: var(--title-info); font-weight: var(--fw-strong); overflow-wrap: anywhere; }
.todo-row { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) 0; }
.todo-row + .todo-row { border-top: 1px solid var(--line); }
.todo-row.done { opacity: .5; }
.todo-n { width: 28px; height: 28px; border-radius: var(--r-round); background: var(--teal-soft); color: var(--title-mine); font-weight: var(--fw-title); font-size: var(--fs-small); display: grid; place-items: center; flex: none; }
.todo-row:first-of-type .todo-n { background: var(--title-mine); color: var(--card); }
.todo-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.todo-title { font-size: var(--fs-strong); overflow-wrap: anywhere; }
.tproj { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-3) 0; color: var(--text); }
.tproj + .tproj { border-top: 1px solid var(--line); }
.tproj-top { display: flex; align-items: center; gap: var(--s-2); min-width: 0; }
.tproj-top b { color: var(--title-info); font-size: var(--fs-strong); font-weight: var(--fw-strong); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tproj:hover .tproj-top b { text-decoration: underline; }
.tproj .sq { width: 14px; height: 14px; border-radius: var(--r-sm); flex: none; }
.tproj-count { margin-left: auto; color: var(--muted); font-size: var(--fs-small); white-space: nowrap; }
.tproj-next { display: flex; gap: var(--s-2); color: var(--muted); font-size: var(--fs-small); line-height: 1.4; }
.tproj-next .ico { color: var(--orange); flex: none; margin-top: 2px; }
.tproj-next b { color: var(--text); font-weight: var(--fw-strong); }

/* ---------- Camp de base : le paysage ---------- */
.camp { max-width: 1240px; margin: 0 auto; }
.landcard { padding: 0; overflow: hidden; }
.land { position: relative; overflow: hidden; }
.land-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.land-head { position: relative; padding: var(--s-5) var(--s-6) 0; max-width: 62%; display: flex; flex-direction: column; gap: var(--s-2); align-items: flex-start; }
.land-title { font-size: var(--fs-title); font-weight: var(--fw-title); color: var(--title-page); line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.land-over { position: absolute; inset: 0; pointer-events: none; }
.land-lab { position: absolute; transform: translateX(-50%); white-space: nowrap; max-width: 280px; display: flex; gap: 4px; font-size: var(--fs-small); font-weight: var(--fw-strong); color: var(--land-ink);
  text-shadow: 0 0 3px var(--land-halo), 0 0 3px var(--land-halo), 0 0 6px var(--land-halo); }
.land-lab i { font-style: normal; flex: none; }
.land-lab > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.land-lab.next { color: var(--navy); font-weight: var(--fw-title); }
.land-lab.l { transform: none; margin-left: -14px; }
.land-lab.r { transform: translateX(-100%); margin-left: 14px; }
.land-here { position: absolute; transform: translate(-50%, -100%); background: var(--navy); color: var(--card); font-weight: var(--fw-title); font-size: var(--fs-small); border-radius: var(--r-round); padding: 5px 14px; white-space: nowrap; }
.land-here i { position: absolute; top: 100%; width: 10px; height: 10px; background: var(--navy); transform: translate(-50%, -6px) rotate(45deg); }
.l-sky-1 { stop-color: var(--land-sky-1); } .l-sky-2 { stop-color: var(--land-sky-2); } .l-sky-3 { stop-color: var(--land-sky-3); }
.l-sun { fill: var(--land-sun); stop-color: var(--land-sun); }
.l-peak-1 { stop-color: var(--land-peak); } .l-peak-2 { stop-color: var(--navy); }
.l-hill-1 { stop-color: var(--land-hill-1); } .l-hill-2 { stop-color: var(--land-hill-2); }
.l-far { fill: var(--land-far); } .l-mid { fill: var(--land-mid); } .l-snow { fill: var(--land-snow); } .l-tree { fill: var(--land-tree); }
.l-far-shade { fill: var(--land-far-shade); opacity: .7; } .l-mid-shade { fill: var(--land-mid-shade); opacity: .7; }
.l-peak-shade { fill: var(--land-peak-shade); opacity: .55; } .l-snow-shade { fill: var(--land-snow-shade); } .l-snow.far { opacity: .85; }
.l-couloir { fill: none; stroke: var(--land-snow); stroke-width: 2.2; stroke-linecap: round; opacity: .6; }
.l-mist-band { fill: var(--land-mist); opacity: .45; } .l-hill-light { fill: var(--land-hill-light); opacity: .7; }
.l-cloud { fill: var(--land-cloud); opacity: .75; animation: l-cloud var(--d) linear var(--dl) infinite alternate; }
@keyframes l-cloud { from { transform: translateX(-60px); } to { transform: translateX(80px); } }
.l-forest .amb-pine { fill: var(--land-pine); } .l-forest .amb-pine-light { fill: var(--land-pine-light); } .l-forest .amb-trunk { fill: var(--land-trunk); }
.l-grass { fill: none; stroke: var(--land-grass); stroke-width: 1.6; stroke-linecap: round; } .l-flower { fill: var(--land-flower); }
.l-pole { fill: none; stroke: var(--navy); stroke-width: 2.5; stroke-linecap: round; }
.l-flag { transform-box: fill-box; transform-origin: 0% 50%; animation: l-flag 1.4s ease-in-out infinite alternate; }
@keyframes l-flag { from { transform: skewY(-6deg) scaleX(.92); } to { transform: skewY(6deg) scaleX(1.04); } }
.land.photo { background: var(--navy); }
/* Sur les images (22/11) : titre et noms des étapes sur une pastille claire, lisibles de jour comme de nuit */
.land.photo:not(.stacked) .land-head { margin: var(--s-4) 0 0 var(--s-4); padding: var(--s-3) var(--s-4); border-radius: var(--r-lg);
  background: var(--amb-chip); border: 1px solid var(--amb-chip-line); backdrop-filter: blur(6px); max-width: 56%; }
.land.photo .land-lab { background: var(--amb-chip); border-radius: var(--r-round); padding: 2px var(--s-2); text-shadow: none; }
@keyframes amb-twinkle { 50% { opacity: .25; } }
.lp-star { fill: var(--amb-star); animation: amb-twinkle 3s ease-in-out var(--dl) infinite; }
.lp-sunset { fill: url(#land-glow); animation: lp-glow 6s ease-in-out infinite alternate; }
.lp-tent-shadow { fill: var(--a-shadow, var(--amb-d-shadow)); opacity: .3; }
.lp-tent-glow { fill: url(#land-tent-glow); animation: lp-glow 2.4s ease-in-out infinite alternate; }
@keyframes lp-glow { from { opacity: .55; } to { opacity: .9; } }
.lp-bird { fill: none; stroke: var(--amb-d-ink); stroke-width: 1.8; stroke-linecap: round; }
.lp-birds { animation: lp-birds 40s linear infinite; }
@keyframes lp-birds { from { transform: translate(-60px, 60px); } to { transform: translate(var(--w), 20px); } }
.no-anim .l-cloud, .no-anim .l-flag, .no-anim .lp-star, .no-anim .lp-sunset, .no-anim .lp-tent-glow, .no-anim .lp-birds { animation: none; }
@media (prefers-reduced-motion: reduce) { .lp-star, .lp-sunset, .lp-tent-glow, .lp-birds { animation: none; } }
@media (prefers-reduced-motion: reduce) { .l-cloud, .l-flag { animation: none; } }
.l-dots { fill: none; stroke: var(--navy); stroke-width: 3; stroke-dasharray: 1 9; stroke-linecap: round; opacity: .55; }
.l-dots.up { stroke: var(--card); opacity: .9; }
.l-walk-under { fill: none; stroke: var(--card); stroke-width: 10; stroke-linecap: round; opacity: .85; }
.l-walk { fill: none; stroke: var(--teal); stroke-width: 5; stroke-linecap: round; }
.l-tent { fill: var(--teal); } .l-tent-door { fill: var(--land-tent-door); }
.l-ground { stroke: var(--land-ground); stroke-width: 2; stroke-linecap: round; }
.l-step { fill: var(--card); stroke: var(--navy); stroke-width: 2.6; opacity: .75; }
.l-start { fill: var(--orange); stroke: var(--card); stroke-width: 3; } /* point de départ du chemin (dessin) */
.l-step.next { stroke-width: 3.5; opacity: 1; }
.l-flag { fill: var(--orange); stroke: var(--orange); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.l-here-ring { fill: var(--navy); }
.l-here-dot { fill: var(--orange); stroke: var(--card); stroke-width: 3; }
.l-here-wave { fill: var(--orange); opacity: .2; transform-box: fill-box; transform-origin: center; animation: here-wave 2.8s ease-out infinite; }
/* Mouvement : le chemin parcouru se dessine une fois à l'ouverture ; l'onde de « Vous êtes ici » est lente et permanente */
.land.draw .l-walk, .land.draw .l-walk-under { stroke-dasharray: 1; animation: land-draw 1.6s ease-out both; }
@keyframes land-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes here-wave { 0% { transform: scale(.55); opacity: .45; } 100% { transform: scale(1.3); opacity: 0; } }
.no-anim .l-here-wave, .no-anim .land.draw .l-walk, .no-anim .land.draw .l-walk-under { animation: none; }
@media (prefers-reduced-motion: reduce) { .l-here-wave, .land.draw .l-walk, .land.draw .l-walk-under { animation: none; } }

.where { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-top: 1px solid var(--line); }
.wrow { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-5); min-width: 0; }
.wrow + .wrow { border-left: 1px solid var(--line); }
.wrow > div { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.wrow b { color: var(--title-info); font-size: var(--fs-strong); font-weight: var(--fw-strong); overflow-wrap: break-word; }
.wrow > div > span { color: var(--muted); font-size: var(--fs-small); }
.wdot { width: 18px; height: 18px; border-radius: var(--r-round); flex: none; }
.wdot.me { background: var(--orange); box-shadow: 0 0 0 4px var(--orange-ring); }
.wdot.next { border: 3px solid var(--navy); background: var(--card); }

/* ---------- Camp de base : les blocs ---------- */
.camp-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; align-items: start; margin-bottom: 18px; }
.camp-grid .card { margin: 0; }
.camp-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.big-task { display: flex; gap: var(--s-4); align-items: flex-start; }
.tick.big { width: 28px; height: 28px; margin-top: 2px; }
.tick.big .ico { width: 28px; height: 28px; padding: 4px; }
.big-text { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: var(--s-2); align-items: flex-start; }
.big-title { font-size: var(--fs-title-sm); font-weight: var(--fw-title); line-height: 1.25; overflow-wrap: anywhere; }
.prep { display: flex; align-items: center; gap: 6px; color: var(--title-mine); font-weight: var(--fw-strong); font-size: var(--fs-small); }
.big-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-top: var(--s-2); }
.then { border-top: 1px solid var(--line); margin-top: var(--s-5); padding-top: var(--s-3); display: flex; flex-direction: column; gap: var(--s-2); align-items: flex-start; }
.then-t { font-size: var(--fs-small); font-weight: var(--fw-title); color: var(--muted); }
.then-r { display: flex; align-items: center; gap: var(--s-3); width: 100%; }
.then-title { flex: 1; min-width: 0; color: var(--text); overflow-wrap: anywhere; }
.vote-q { display: block; color: var(--title-decide); font-size: var(--fs-strong); font-weight: var(--fw-strong); margin-bottom: var(--s-3); overflow-wrap: anywhere; }
.vote-row { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.vote-b { flex: 1 1 0; min-width: 0; white-space: normal; }
.vote-b.on { border-color: var(--teal); background: var(--teal-soft); color: var(--link); }
.vote-note { margin: var(--s-3) 0 var(--s-1); color: var(--title-decide); font-weight: var(--fw-strong); font-size: var(--fs-small); }
.ideas-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); padding: var(--s-3) var(--s-5); }
.ideas-row .card-label { border: 0; margin: 0; padding: 0; }
.idea-chip { font: inherit; font-size: var(--fs-small); font-weight: var(--fw-strong); color: var(--text); background: var(--column); border: 0; border-radius: var(--r-round); padding: 6px 14px; cursor: pointer;
  max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
.idea-chip:hover { background: var(--idea-soft); }
.idea-chip.add { background: none; border: 1.5px dashed var(--line-strong); color: var(--tag-idea); display: inline-flex; align-items: center; gap: 4px; }
.ideas-hint { margin-left: auto; color: var(--muted); font-size: var(--fs-small); }
.camp-all > summary { cursor: pointer; font-weight: var(--fw-strong); color: var(--link); display: flex; align-items: center; gap: var(--s-2); padding: var(--s-3) var(--s-2); list-style: none; }
.camp-all > summary::-webkit-details-marker { display: none; }
.camp-all[open] > summary { margin-bottom: var(--s-2); }

@media (max-width: 1100px) {
  .today-grid, .camp-grid, .where { grid-template-columns: minmax(0, 1fr); }
  .wrow + .wrow { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .today-hero { flex-direction: column; align-items: stretch; padding: var(--s-4); gap: var(--s-3); }
  .todo-n, .ideas-hint { display: none; }
  .wait-row { gap: var(--s-3); }
  .wait-ico { display: none; }
  .wait-text b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .wait-text .meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .wrow { padding: var(--s-3) var(--s-4); flex-wrap: wrap; }
  .land-head { max-width: 76%; padding: var(--s-4) var(--s-4) 0; }
  .land-title { font-size: var(--fs-title-sm); -webkit-line-clamp: 3; }
  .wrow > div { flex-basis: calc(100% - 40px); }
  .wrow .btn { margin-left: 30px; }
  .todo-title, .then-title, .big-title, .idea-chip, .camp-all > summary { min-height: var(--touch); }
  .idea-chip { min-width: var(--touch); }
}

/* =====================================================================
   Refonte, livraison 3 : menus et onglets (REFONTE.md, section 2)
   Menu : Aujourd'hui + Messages, projets dessous, roue des Paramètres sur la carte « moi ».
   Projet : 5 onglets. Cloche = panneau. Téléphone : barre du bas.
   ===================================================================== */
.nav-title { text-transform: uppercase; letter-spacing: var(--ls-label); font-weight: var(--fw-label); }
.nav-title-link { color: inherit; }
.nav-title-link:hover { color: var(--card); text-decoration: underline; }
.me-row { display: flex; align-items: center; gap: var(--s-2); border-top: 1px solid var(--navy-3); margin-top: 10px; padding-top: 12px; }
.me-row .me-card { flex: 1; min-width: 0; border-top: 0; margin-top: 0; padding: 0 8px; }
.me-gear { color: var(--on-navy); padding: 8px; border-radius: var(--r-sm); display: inline-flex; flex: none; }
.me-gear:hover, .me-gear.active { background: var(--navy-2); color: var(--card); }

/* La cloche : un panneau sous le bouton, plus une page */
.bell-panel { position: fixed; top: 58px; right: 20px; z-index: 48; width: min(420px, calc(100vw - 24px)); max-height: min(70vh, 620px); display: flex; flex-direction: column;
  background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); overflow: hidden; }
.bell-head { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); }
.bell-head h2 { flex: 1; }
.bell-head .link { white-space: nowrap; font-size: var(--fs-small); }
.bell-panel .notif-list { overflow-y: auto; }

/* Discussion : « Entre humains » (salons) et « Avec les IA » (Atelier) */
.channels-title { text-transform: uppercase; letter-spacing: var(--ls-label); }
.channels-title.with-ai { margin-top: var(--s-4); }
.chan-ai .ico { color: var(--orange); }
.atelier-head h2 { display: flex; align-items: center; gap: var(--s-2); }
.atelier-head h2 .ico { color: var(--action); }
.my-ais-line { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; vertical-align: middle; }
.my-ais-line .my-ai { padding: 0; display: inline-flex; font-size: var(--fs-label); }

/* Tâches : le Calendrier est une vue */
.seg { max-width: 100%; overflow-x: auto; }
.seg button { white-space: nowrap; flex: none; }
.tasks.on-calendar #who-toggle { display: none; }

/* Téléphone : barre du bas (cachée sur ordinateur) */
.bottom-nav { display: none; }
@media (max-width: 760px) {
  .bottom-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: center; flex: none; background: var(--card); border-top: 1px solid var(--line);
    padding: 4px 4px max(4px, env(safe-area-inset-bottom)); }
  .bottom-nav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; color: var(--muted); font-size: var(--fs-label); font-weight: var(--fw-strong); }
  .bottom-nav a.active { color: var(--action); }
  .bottom-create { justify-self: center; width: 52px; height: 52px; border-radius: var(--r-lg); border: 0; background: var(--action); color: var(--card); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); }
  .bottom-nav .badge-count { position: absolute; top: 2px; left: calc(50% + 6px); margin: 0; }
  .bnav-me { display: inline-flex; }
  .bnav-me .avatar { box-shadow: none; }
  .create-btn, #top-avatar { display: none; }      /* « + » et « Moi » sont dans la barre du bas */
  #view { padding-bottom: 0; }
  .bell-panel { top: 56px; left: 8px; right: 8px; width: auto; max-height: calc(100dvh - 150px); }
  .seg .ico { display: none; }
  .tasks-head h2 { display: none; }              /* le nom du projet est déjà en haut de l'écran */
  .bell-head h2 { font-size: var(--fs-strong); }
  .seg button { padding: 7px 10px; }
}

/* =====================================================================
   Refonte téléphone (16/11) : clarté et navigation en 3 niveaux (phone.js)
   Règles : un écran = une question ; les accueils tiennent sans défiler ; les listes sont derrière des portes.
   ===================================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.search-btn, .proj-back, .proj-more, .conv-back, .voice-toggle, .tasks-phone-bar, .fab, .project-nav, .voice-pill { display: none; }
.sec-title { font-size: var(--fs-strong); font-weight: var(--fw-title); color: var(--title-info); margin: 0 0 var(--s-3); }

/* Portes : une icône, un titre, une ligne. Une seule teintée par écran (celle qui demande d'agir). */
.doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
.door { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: var(--s-3); min-height: 104px;
  padding: var(--s-4); border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); color: var(--text); }
.door:hover { border-color: var(--line-strong); }
.door.tint { background: var(--wait-bg); border-color: var(--wait-line); }
.door-ico { width: 38px; height: 38px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--column); color: var(--action); }
.door.tint .door-ico { background: var(--card); }
.door.tproj .door-ico { color: var(--card); }
.door-text { display: flex; flex-direction: column; min-width: 0; }
.door-text b { font-weight: var(--fw-title); color: var(--title-info); line-height: 1.25; overflow-wrap: anywhere; }
.door-text > span { font-size: var(--fs-small); color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.door.tint .door-text > span { color: var(--title-info); }
.door .n, .door .unread-badge { position: absolute; top: var(--s-3); right: var(--s-3); }
.door .n { background: var(--action); color: var(--card); border-radius: var(--r-round); padding: 1px 8px; font-size: var(--fs-label); font-weight: var(--fw-title); }
.more-link { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); min-height: var(--touch); width: 100%;
  margin-top: var(--s-3); padding: var(--s-2) 0 0; border: 0; border-top: 1px solid var(--line); background: none; font: inherit;
  font-weight: var(--fw-strong); font-size: var(--fs-small); color: var(--link); cursor: pointer; text-align: left; }

/* Camp de base : le lien vers le chemin sous le paysage, puis le prochain pas et les portes */
.where-link { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-5); border-top: 1px solid var(--line); color: var(--text); min-height: 60px; }
.where-link:hover { background: var(--column); }
.where-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.where-text .eyebrow { color: var(--title-info); }
.ns-title { font-weight: var(--fw-strong); color: var(--text); overflow-wrap: anywhere; } /* la prochaine étape en entier */
.ns-when { color: var(--muted); font-size: var(--fs-small); }
/* Avancement de l'équipe (sous le dessin), distinct de « Votre prochain pas » */
.land-progress { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-5) var(--s-3); color: var(--title-info); }
.land-progress b { font-weight: var(--fw-strong); }
/* Le dessin : derrière le titre sur ordinateur, sous le titre sur téléphone (.stacked) */
.land-art { position: absolute; inset: 0; }
.land:not(.stacked) { height: 300px; }
.land.stacked .land-art { position: relative; inset: auto; }
.land.stacked .land-head { max-width: none; background: var(--land-sky-1); padding: var(--s-4) var(--s-5) var(--s-2); }
.land.stacked .land-title { -webkit-line-clamp: unset; display: block; }
/* Portes en lignes (Camp de base) : icône, titre, une ligne, chevron */
.doors.door-rows { display: flex; flex-direction: column; gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.door-rows .door { flex-direction: row; align-items: center; justify-content: flex-start; min-height: 60px; padding: var(--s-2) var(--s-4);
  border: 0; border-radius: 0; gap: var(--s-3); }
.door-rows .door + .door { border-top: 1px solid var(--line); }
.door-rows .door-ico { width: 36px; height: 36px; }
.door-rows .door-text { flex: 1; }
.door-rows .door .n { position: static; }
.door-go { color: var(--muted); display: inline-flex; flex: none; }
.doors:not(.door-rows) .door-go { display: none; }
.where-go { display: inline-flex; align-items: center; gap: 2px; color: var(--link); font-weight: var(--fw-strong); font-size: var(--fs-small); white-space: nowrap; }
.camp-grid .doors { align-content: start; }

/* Sous-pages du Camp de base (Le chemin, À décider, Idées, Tout le projet) */
.subpage { max-width: 760px; margin: 0 auto; padding: var(--s-2) 0 var(--s-6); display: flex; flex-direction: column; gap: var(--s-5); }
.subpage.wide { max-width: none; }
.sub-head { display: flex; align-items: center; gap: var(--s-2); }
.sub-head h2 { font-size: var(--fs-title-sm); font-weight: var(--fw-title); color: var(--title-page); }
#chemin, #decider, #idees { display: flex; flex-direction: column; gap: var(--s-5); }
.list-block h3 { font-size: var(--fs-small); font-weight: var(--fw-title); color: var(--muted); margin: 0 0 var(--s-1); }
.list-block.gone summary { cursor: pointer; color: var(--muted); font-weight: var(--fw-strong); min-height: var(--touch); display: flex; align-items: center; }
.tap-row { display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: 60px; padding: var(--s-2) var(--s-1);
  border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.tap-row:hover { background: var(--column); }
.tap-row > .ico:last-child { color: var(--muted); flex: none; }
.tap-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tap-text b { font-weight: var(--fw-strong); overflow-wrap: anywhere; }
.tap-text > span { font-size: var(--fs-small); color: var(--muted); }
.step-mark { width: 26px; height: 26px; border-radius: var(--r-round); border: 2px solid var(--muted); background: var(--card); flex: none; display: grid; place-items: center; }
.step-mark.next { border: 3px solid var(--navy); }
.step-mark.done { border: 0; background: var(--done); color: var(--card); }
.step-mark.gone { border-style: dashed; }
.here-mark { display: flex; align-items: center; gap: var(--s-3); color: var(--action); font-weight: var(--fw-title); font-size: var(--fs-small); }
.here-mark::after { content: ''; flex: 1; height: 1px; background: var(--wait-line); }
.here-dot { width: 14px; height: 14px; border-radius: var(--r-round); background: var(--orange); box-shadow: 0 0 0 5px var(--orange-ring); margin: 0 6px; }
.summit { display: flex; gap: var(--s-3); align-items: flex-start; }
.summit-ico { width: 44px; height: 44px; border-radius: var(--r-md); background: var(--wait-bg); color: var(--action); display: grid; place-items: center; flex: none; }
.summit-title { margin: 2px 0 0; font-size: var(--fs-title-sm); font-weight: var(--fw-title); color: var(--title-page); line-height: 1.3; }
.btn.dashed { align-self: flex-start; border-style: dashed; color: var(--link); background: none; margin-top: var(--s-3); }
.sheet-actions { display: flex; flex-direction: column; gap: var(--s-2); margin: var(--s-4) 0 var(--s-2); }
.sheet-actions .btn { justify-content: center; min-height: var(--touch); }
.vote-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-4); }
.idea-ico { width: 34px; height: 34px; border-radius: var(--r-md); background: var(--idea-soft); color: var(--tag-idea); display: grid; place-items: center; flex: none; }

/* Pendant votre absence */
.absence { max-width: 680px; margin: 0 auto; padding: var(--s-2) 0 var(--s-6); display: flex; flex-direction: column; gap: var(--s-5); }
.absence-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); }
.absence-head h1 { font-size: var(--fs-title); color: var(--title-page); margin: 2px 0; }
.absence-head p { margin: 0; font-size: var(--fs-small); }
.absence-body { display: flex; flex-direction: column; gap: var(--s-6); }
.absence-lead { margin: 0; font-size: var(--fs-strong); line-height: 1.55; color: var(--text); }
.absence-sec h2 { font-size: var(--fs-strong); font-weight: var(--fw-title); color: var(--title-info); margin: 0 0 var(--s-2); }
.fy-row { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
.fy-ico { width: 40px; height: 40px; border-radius: var(--r-md); background: var(--wait-bg); color: var(--action); display: grid; place-items: center; flex: none; }
.fy-ico.ai { background: var(--orange-soft); }
.fy-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fy-text b { font-weight: var(--fw-strong); overflow-wrap: anywhere; }
.fy-text > span { font-size: var(--fs-small); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.absence-sec .wins { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-3); }
.absence-foot { display: flex; flex-direction: column; align-items: center; gap: var(--s-2); }
.btn.big { width: 100%; max-width: 420px; justify-content: center; min-height: 52px; font-size: var(--fs-strong); border-radius: var(--r-round); }

/* Discussion (téléphone) : la liste des salons */
.chan-list { padding: var(--s-4) var(--s-5) var(--s-6); display: flex; flex-direction: column; gap: var(--s-6); }
.chan-row { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-1); min-height: 68px; border-bottom: 1px solid var(--line); color: var(--text); }
.chan-ico { width: 44px; height: 44px; border-radius: var(--r-md); background: var(--teal-soft); color: var(--link); display: grid; place-items: center; flex: none; }
.chan-ico.ai { background: var(--orange-soft); color: var(--action); }
.chan-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chan-top, .chan-bottom { display: flex; align-items: center; gap: var(--s-2); justify-content: space-between; }
.chan-top b { font-weight: var(--fw-title); color: var(--navy); }
.chan-top small { color: var(--muted); font-size: var(--fs-label); flex: none; }
.chan-bottom > span:first-child { flex: 1; min-width: 0; color: var(--muted); font-size: var(--fs-small); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chan-voice { display: inline-flex; align-items: center; gap: 3px; color: var(--link); font-size: var(--fs-label); font-weight: var(--fw-strong); }
.chan-add { display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: 56px; padding: var(--s-2) var(--s-1); border: 0; background: none; font: inherit; font-weight: var(--fw-strong); color: var(--link); cursor: pointer; }

/* Tâches (téléphone) : liste groupée */
.t-block { margin-bottom: var(--s-5); }
.t-block h3, .t-block summary { font-size: var(--fs-small); font-weight: var(--fw-title); color: var(--muted); margin: 0 0 var(--s-1); }
.t-block small { font-weight: var(--fw-text); font-size: inherit; }
.t-block.mine { background: var(--card); border: 1.5px solid var(--title-mine); border-radius: var(--r-lg); padding: var(--s-2) var(--s-3); }
.t-block.mine h3 { color: var(--title-mine); padding-top: var(--s-1); }
.t-block.fold summary { cursor: pointer; min-height: var(--touch); display: flex; align-items: center; gap: var(--s-1); border-top: 1px solid var(--line); }
.t-row { display: flex; align-items: center; gap: var(--s-3); min-height: 56px; padding: var(--s-2) 0; border-bottom: 1px solid var(--line); }
.t-block.mine .t-row:last-child { border-bottom: 0; }
.t-title { flex: 1; min-width: 0; min-height: var(--touch); border: 0; background: none; font: inherit; color: var(--text); text-align: left; cursor: pointer; padding: 0; line-height: 1.4; }
.t-row.done .t-title { color: var(--muted); }
.t-code { display: inline-block; margin-right: var(--s-2); padding: 0 7px; border-radius: var(--r-sm); background: var(--column); color: var(--title-info); font-size: var(--fs-label); font-weight: var(--fw-title); }
/* L'étiquette (« P0-02 · Avant bêta ») sur sa propre ligne, au-dessus du titre : priorité et action ne se mélangent plus */
.task-title .t-code, .t-title .t-code, .mytask-title .t-code, .big-text > .t-code { display: block; width: max-content; max-width: 100%; margin: 0 0 3px; }
.pill-select { height: 40px; border-radius: var(--r-round); padding: 0 var(--s-4); background: var(--card); border: 1px solid var(--line); font-weight: var(--fw-strong); color: var(--text); width: auto; }
.btn.pill { border-radius: var(--r-round); height: 40px; }

/* « En vocal » sur téléphone */
.voice-pill { align-items: center; gap: var(--s-1); margin: 0 var(--s-3) var(--s-2); padding: var(--s-1) var(--s-1) var(--s-1) var(--s-4);
  background: var(--navy); color: var(--on-navy); border-radius: var(--r-round); box-shadow: var(--shadow-pop); }
.voice-pill-where { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--s-2); color: var(--on-navy); font-size: var(--fs-small); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-height: var(--touch); }
.voice-pill-dot { width: 10px; height: 10px; border-radius: var(--r-round); background: var(--orange); flex: none; }
.voice-pill-dot.ok { background: var(--mint); }
.voice-pill .icon-btn { color: var(--on-navy); }
.voice-pill .icon-btn.leave { color: var(--on-navy-danger); }

@media (min-width: 1101px) { .camp-grid .doors:not(.door-rows) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Téléphone ---------- */
@media (max-width: 760px) {
  /* Niveau 1 : plus de menu ☰ ; la recherche s'ouvre avec la loupe ; une barre du bas à 4 entrées */
  .menu-btn, #sidebar, .nav-scrim { display: none; }
  .search-btn { display: inline-flex; color: var(--on-navy); }
  .search { display: none; }
  body.search-open .search { display: flex; flex: 1 1 auto; }
  body.search-open .search-btn ~ .top-actions, body.search-open .search-btn { display: none; }
  #topbar { justify-content: flex-end; }
  .bottom-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .bottom-nav a { gap: 3px; }
  .bnav-ico { width: 56px; height: 30px; border-radius: var(--r-round); display: grid; place-items: center; }
  .bottom-nav a.active .bnav-ico { background: var(--wait-bg); }
  .voice-pill { display: flex; }
  .voice-pill.hidden { display: none; }

  /* Niveau 2 : dans un projet, pas de barre du haut ; en-tête d'une ligne ; la barre du bas = les 5 rubriques */
  body.in-project #topbar, body.in-project #bottom-nav { display: none; }
  body.in-project .project-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .project-nav a { position: relative; }
  .project-nav a.active { color: var(--link); }
  .project-nav a.active .bnav-ico { background: var(--teal-soft); }
  .project-nav .badge-count { position: absolute; top: 2px; left: calc(50% + 8px); margin: 0; }
  .project-head { flex-wrap: nowrap; gap: var(--s-2); padding: max(8px, env(safe-area-inset-top)) var(--s-2) var(--s-2) var(--s-1); border-bottom: 1px solid var(--line); }
  .proj-back, .proj-more { display: inline-flex; flex: none; }
  .project-head .proj-icon { width: 30px; height: 30px; border-radius: var(--r-sm); flex: none; }
  .project-head .proj-icon .ico { width: 16px; height: 16px; }
  .project-title { min-width: 0; }
  .project-title h1 { font-size: var(--fs-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .project-title p, .project-head .missed-btn, .project-head #invite, .project .tabs, #guide-slot { display: none; }

  /* Niveau 3 : plein écran (conversation, Pendant votre absence) : ni en-tête de projet, ni barre du bas */
  body.phone-full .project-head, body.phone-full .project-nav, body.phone-full #bottom-nav { display: none; }
  /* Sous-page du Camp de base : un seul retour (celui de la sous-page) */
  body.in-sub .project-head { display: none; }
  .sub-head { padding-top: max(0px, env(safe-area-inset-top)); }

  /* Accueils : de l'air, et tout tient sans défiler */
  .page.today { padding: var(--s-4) var(--s-5) var(--s-5); }
  .today-hero { background: none; border: 0; padding: var(--s-2) 0 0; margin-bottom: var(--s-4); }
  .today-week { display: none; }
  .today-grid, .today-main, .today-side { gap: var(--s-6); display: flex; flex-direction: column; }
  .camp { padding: 0 0 var(--s-5); }
  .camp .landcard { border-radius: 0; border-left: 0; border-right: 0; margin: 0; }
  .camp-grid { padding: var(--s-4) var(--s-5) 0; gap: var(--s-4); }
  .subpage, .absence { padding: var(--s-3) var(--s-5) var(--s-6); }
  .tab-projet { padding: 0; }
  .subpage.wide { padding: var(--s-3) var(--s-4) var(--s-6); }
  .camp .big-title { font-size: var(--fs-strong); }
  .camp .main-card { padding: var(--s-4); }
  .absence { min-height: 100%; }
  .absence-foot { padding: var(--s-2) 0 max(12px, env(safe-area-inset-bottom)); }

  /* Discussion : la conversation en plein écran, le vocal derrière un bouton */
  .discussion { grid-template-rows: minmax(0, 1fr); }
  .discussion .channels { display: none; }
  .channel-head { display: flex; align-items: center; gap: var(--s-2); padding: max(8px, env(safe-area-inset-top)) var(--s-2) var(--s-2) var(--s-1); }
  .channel-head h2 { flex: 1; min-width: 0; font-size: var(--fs-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: var(--s-2); }
  .channel-head > p, .atelier-head > p { display: none; }
  .conv-back, .voice-toggle { display: inline-flex; flex: none; }
  .where-link { flex-wrap: wrap; align-items: flex-end; }
  .where-link .where-text { flex-basis: 100%; }
  .where-link .where-go { margin-left: auto; min-height: var(--touch); }
  .conv-sub { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .conv-name { overflow: hidden; }
  .conv-name, .conv-name > small { line-height: 1.25; }
  .channel-tools { position: static; display: flex; }
  .voice-strip:not(.in-room):not(.open) { display: none; }
  .msg-read { display: inline-flex; margin-left: var(--s-2); }

  /* Tâches : la vue dans une liste déroulante, le filtre derrière un bouton, « + Tâche » flottant */
  .tasks { position: relative; }
  .tasks-head h2, .tasks-head .seg, .tasks-head #new-task { display: none; }
  .tasks-phone-bar { display: flex; gap: var(--s-2); flex-wrap: wrap; }
  .who-filter:not(.open) { display: none; }
  .fab { display: inline-flex; align-items: center; gap: var(--s-2); position: sticky; bottom: var(--s-4); float: right; margin: 0 0 var(--s-4);
    height: 52px; padding: 0 var(--s-5) 0 var(--s-4); border: 0; border-radius: var(--r-round); background: var(--action); color: var(--card);
    font: inherit; font-weight: var(--fw-title); box-shadow: var(--shadow-pop); cursor: pointer; z-index: 5; }
  .tasks-body.in-calendar ~ .fab { display: none; }
  .tasks-body:not(.in-calendar) { padding-bottom: 76px; } /* le « + Tâche » flottant ne cache jamais la dernière ligne */
}

/* =====================================================================
   Le chemin et le sommet (22/11) : étapes majeures, montée de bas en haut ; « Votre prochain pas » harmonisé
   ===================================================================== */
/* « Votre prochain pas » : même famille que les portes à côté (carte blanche, icône carrée, titre ardoise) */
.camp .main-card { border: 1px solid var(--line); border-radius: var(--r-lg); display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-4); }
.camp-grid { align-items: stretch; }
.next-head { display: flex; align-items: center; gap: var(--s-3); }
.next-head .door-ico { width: 36px; height: 36px; flex: none; }
.camp .big-task { padding: var(--s-1) 0 0; }
.camp .big-title { color: var(--text); font-size: var(--fs-strong); font-weight: var(--fw-title); }
.camp .big-actions { margin-top: auto; }
.big-due { display: flex; }

/* Étape majeure */
.major-tag { display: inline-block; width: max-content; font-size: var(--fs-label); font-weight: var(--fw-label); letter-spacing: var(--ls-label);
  text-transform: uppercase; color: var(--title-decide); background: var(--orange-soft); border-radius: var(--r-sm); padding: 1px 6px; margin: 0 0 2px; }
.l-step.major { stroke: var(--orange); stroke-width: 4; opacity: 1; }
.land-lab.major { color: var(--navy); }

/* Le chemin : une montée, du départ (en bas) au sommet (en haut) */
.trail { list-style: none; margin: 0; padding: 0; position: relative; display: flex; flex-direction: column; gap: 0; }
/* La ligne (23/11, Apo) : un seul trait par étape, collé au suivant (aucun écart entre les étapes), centré sur l'axe à 21 px.
   À venir = pointillé gris ; franchi (de « Vous êtes ici » au départ) = trait plein. */
.trail-stop { position: relative; display: flex; align-items: center; gap: var(--s-3); min-height: 60px; }
.trail-stop::before { content: ''; position: absolute; left: 19.5px; width: 0; top: 0; bottom: 0; border-left: 3px dotted var(--line-strong); }
.trail-stop.summit::before { top: 24px; }
.trail-stop.done::before, .trail-stop.start::before { border-left-style: solid; border-left-color: var(--teal); }
.trail-stop.start::before { bottom: 50%; }
/* « Vous êtes ici » : pointillé au-dessus, trait plein en dessous */
.trail-stop.here::before { bottom: 50%; }
.trail-stop.here::after { content: ''; position: absolute; left: 19.5px; width: 0; top: 50%; bottom: 0; border-left: 3px solid var(--teal); }
.trail-stop.here:last-child::after, .trail-stop.start:first-child::before { display: none; }
.trail-btn { display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: 56px; padding: var(--s-2) var(--s-1) var(--s-2) 8px; margin: 2px 0;
  background: none; border: 0; border-radius: var(--r-md); font: inherit; color: inherit; text-align: left; cursor: pointer; }
.trail-btn:hover { background: var(--column); }
.trail-btn > .ico:last-child { color: var(--muted); flex: none; }
.trail-mark { position: relative; z-index: 1; width: 26px; height: 26px; border-radius: var(--r-round); border: 2px solid var(--muted); background: var(--card);
  flex: none; display: grid; place-items: center; }
.trail-stop.next .trail-mark { border: 3px solid var(--navy); }
.trail-stop.done .trail-mark { border: 0; background: var(--done); color: var(--card); }
.trail-stop.major .trail-mark { width: 34px; height: 34px; margin-left: -4px; border-color: var(--orange); border-width: 4px; }
.trail-stop.major.done .trail-mark { background: var(--done); }
.trail-stop.major b { font-size: var(--fs-strong); }
.trail-stop .tap-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.trail-stop .tap-text b { overflow-wrap: anywhere; }
.trail-stop .tap-text > span:last-child { font-size: var(--fs-small); color: var(--muted); }
.trail-stop.summit { align-items: flex-start; padding-bottom: var(--s-3); }
.trail-stop.summit .summit-ico { position: relative; z-index: 1; }
.trail-summit { min-width: 0; }
.trail-summit .summit-title { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; display: block; margin: 2px 0 0;
  font: inherit; font-size: var(--fs-title-sm); font-weight: var(--fw-title); color: var(--title-page); line-height: 1.3; overflow-wrap: anywhere; }
.trail-summit .summit-title:hover { text-decoration: underline; }
.trail-stop.here { gap: var(--s-2); flex-wrap: wrap; padding-left: 0; color: var(--action); min-height: 48px; }
.trail-stop.here .here-dot { position: relative; z-index: 1; margin: 0 var(--s-2) 0 14px; flex: none; } /* centré sur le trait (axe à 21 px) */
.trail-stop.here b { color: var(--action); }
.start-mark { position: relative; z-index: 1; width: 18px; height: 18px; margin-left: 12px; border-radius: var(--r-sm); background: var(--teal); flex: none; }
.trail-stop.start b { color: var(--muted); font-size: var(--fs-small); }

/* « Tout le projet » : la carte « Le chemin » en entier, le sommet en haut, le départ en bas */
.hub-card[data-type="milestone"] { grid-column: 1 / -1; }
.hub-summit .summit-item { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3); margin: var(--s-2) 0; background: var(--wait-bg);
  border: 1px solid var(--wait-line); border-radius: var(--r-md); }
.hub-summit .summit-ico { width: 38px; height: 38px; background: var(--card); }
.hub-summit .item-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; cursor: default; }
.hub-summit .item-title b { color: var(--title-page); font-size: var(--fs-strong); overflow-wrap: anywhere; }
.hub-summit .summit-item.done b { text-decoration: none; }
.hub-card[data-type="milestone"] .item.major .item-title { font-weight: var(--fw-title); }
.path-start { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-small); color: var(--muted); font-weight: var(--fw-strong); padding: var(--s-1) var(--s-2); }
/* Boutons d'affichage du chemin (23/11, Apo) : « Raccourcir le chemin » puis « Masquer étapes accomplies » */
.hub-card[data-type="milestone"] .card-head { flex-wrap: wrap; }
.path-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s-2); margin-left: auto; }
.path-tools .btn { display: inline-flex; align-items: center; gap: var(--s-1); }
.path-tools .btn[aria-pressed="true"] { border-color: var(--link); color: var(--link); }
.path-tools .btn[hidden] { display: none; }
.path-tools .lbl-short { display: none; }
@media (max-width: 760px) {
  .path-tools { flex: 1 1 100%; flex-wrap: nowrap; }
  .path-tools .lbl-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .path-tools .lbl-short { display: inline; }
}
.path-gap { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-1) var(--s-2); font-size: var(--fs-small); color: var(--muted); list-style: none; }
.done-steps { margin-top: var(--s-1); }
.add-item .major-check { margin: 0; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; color: var(--muted); }
.add-item input.major { flex: none; padding: 0; }

/* =====================================================================
   Colonne vidéo (22/11) : caméras et écrans partagés à droite, visibles partout pendant le vocal ;
   « Lecteur réduit » = une vidéo flottante en bas à droite. Pastilles d'état du vocal en orange.
   ===================================================================== */
#app.has-dock { grid-template-columns: 250px minmax(0, 1fr) clamp(280px, 27vw, 420px); }
.video-dock { background: var(--bg); color: var(--text); display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; min-height: 0; overflow: hidden; }
.video-dock.col { padding: var(--s-3); overflow-y: auto; border-left: 1px solid var(--line); }
.video-dock.mini { position: fixed; right: var(--s-4); bottom: var(--s-4); width: min(340px, calc(100vw - 32px)); padding: var(--s-2);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); z-index: 60; }
.dock-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); min-height: 32px; }
.dock-title { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-small); font-weight: var(--fw-title); color: var(--title-info); }
.dock-title .ico { color: var(--orange); }
.dock-n { background: var(--action); color: var(--card); border-radius: var(--r-round); padding: 0 7px; font-size: var(--fs-label); }
.dock-head .icon-btn { color: var(--muted); }
.dock-head .icon-btn:hover { background: var(--column); color: var(--text); }
.dock-tiles { display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }
.video-dock .video-tile { aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: var(--r-md); min-width: 0; }
.video-dock .video-tile.screen { border: 2px solid var(--orange); }
.video-dock .video-name { right: 86px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.video-full, .video-pip { position: absolute; top: 6px; right: 6px; z-index: 1; background: var(--overlay-strong); color: var(--card); }
.video-pip { right: 46px; }
.video-full:hover, .video-pip:hover { background: var(--navy); color: var(--card); }
.video-tile:fullscreen { border: 0; border-radius: 0; background: var(--black); }
.video-tile:fullscreen video { object-fit: contain; }
.video-tile:fullscreen .video-full .ico { transform: rotate(180deg); }
.dock-more { color: var(--link); align-self: flex-start; }
@media (max-width: 760px) {
  .video-dock.mini { bottom: calc(76px + env(safe-area-inset-bottom)); right: var(--s-3); width: min(260px, 70vw); }
}

/* Pastilles d'état d'une personne dans le vocal : écran (orange plein), caméra (contour orange), micro */
.vs-badges { display: inline-flex; align-items: center; gap: 3px; flex: none; margin-left: auto; }
.vs-badge { width: 20px; height: 20px; border-radius: var(--r-round); display: inline-grid; place-items: center; flex: none; }
.vs-badge .ico { width: 12px; height: 12px; }
.vs-screen { background: var(--orange); color: var(--navy); }
.vs-cam { background: var(--orange-soft); color: var(--action); box-shadow: inset 0 0 0 1.5px var(--orange); }
.vs-mic { background: var(--orange-soft); color: var(--action); }
.vs-off { background: var(--danger-soft); color: var(--danger); }

/* =====================================================================
   Documents (22/11) : recherche, filtre par type, affichage liste ou icônes
   ===================================================================== */
.docs-tools { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; margin: 0 2px var(--s-3); }
.docs-search { flex: 1 1 220px; min-width: 0; display: flex; align-items: center; gap: var(--s-2); margin: 0; padding: 0 var(--s-3);
  background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--r-md); color: var(--muted); }
.docs-search:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; }
.docs-search input { border: 0; background: none; flex: 1; min-width: 0; padding: 9px 0; outline: none; box-shadow: none; }
#doc-type { flex: none; }
.seg.doc-views .ico { display: block; }
.doc-view { overflow-x: auto; }
.doc-found { display: flex; align-items: center; gap: var(--s-3); margin: 0 0 var(--s-2); }
.doc-where { display: flex; align-items: center; gap: 4px; font-size: var(--fs-label); color: var(--muted); margin-top: 2px; }
.doc-empty { padding: var(--s-4); margin: 0; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: var(--s-3); }
.doc-card { position: relative; display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); }
.doc-card:hover { border-color: var(--line-strong); }
.doc-card.drop-over { border-color: var(--teal); background: var(--teal-soft); }
.doc-card-main { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: var(--s-4) var(--s-3) var(--s-2); min-width: 0;
  background: none; border: 0; font: inherit; color: inherit; text-align: center; cursor: pointer; }
.doc-card-main b { font-weight: var(--fw-strong); font-size: var(--fs-small); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.doc-card-ico { position: relative; width: 64px; height: 64px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--column); color: var(--title-info); }
.folder-card .doc-card-ico { background: var(--orange-soft); color: var(--action); }
.doc-card-ico.k-image { background: var(--teal-soft); color: var(--link); }
.doc-card-ico.k-pdf { background: var(--danger-soft); color: var(--danger); }
.doc-card-ico.k-sheet { background: var(--mint-soft); color: var(--done-text); }
.doc-card-ico.k-slides { background: var(--orange-soft); color: var(--action); }
.doc-card-ico.k-text { background: var(--task-soft); color: var(--task-text); }
.doc-ext { position: absolute; bottom: -6px; right: -8px; font-size: var(--fs-label); font-weight: var(--fw-label); background: var(--card); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 0 4px; line-height: 1.4; }
.doc-card .doc-where { justify-content: center; }
.doc-card-actions { display: flex; justify-content: center; align-items: center; gap: 2px; padding: 0 var(--s-2) var(--s-2); flex-wrap: wrap; }

/* =====================================================================
   Inscription : âge déclaré et conditions (22/11) ; signalements
   ===================================================================== */
.consent { display: flex; flex-direction: column; gap: var(--s-2); margin: var(--s-3) 0 var(--s-2); }
.consent .check { display: flex; align-items: flex-start; gap: var(--s-2); margin: 0; font-size: var(--fs-small); color: var(--text); font-weight: var(--fw-strong); }
.consent .check input { margin-top: 3px; flex: none; }
.consent a { color: var(--link); }
.parent-box { border: 1px solid var(--wait-line); background: var(--wait-bg); border-radius: var(--r-md); padding: var(--s-3); display: flex; flex-direction: column; gap: var(--s-2); }
.parent-box p { margin: 0; color: var(--title-decide); font-weight: var(--fw-strong); }
.parent-box blockquote, .report-quote { margin: 0; padding: var(--s-2) var(--s-3); border-left: 3px solid var(--line-strong); background: var(--card); color: var(--text);
  border-radius: var(--r-sm); font-style: italic; overflow-wrap: anywhere; }
.parent-box label { margin: var(--s-1) 0 0; }
.report-reasons { display: flex; flex-direction: column; gap: var(--s-1); }
.report-reasons .check { margin: 0; display: flex; align-items: center; gap: var(--s-2); color: var(--text); font-size: var(--fs-small); }
.report-row { display: flex; align-items: flex-start; gap: var(--s-3); padding: var(--s-3) 0; border-top: 1px solid var(--line); }
.report-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--s-1); }
#t-reports .card-head h2 { display: flex; align-items: center; gap: var(--s-2); }
#t-reports .n { background: var(--action); color: var(--card); border-radius: var(--r-round); padding: 1px 8px; font-size: var(--fs-label); }
.seg.doc-views button { min-width: var(--touch); justify-content: center; }

/* =====================================================================
   Paysage de fond (22/11) : « Les prochains pas » (animé, boucle de 5 min) et bas de « Le chemin » (calme).
   Décoratif : jamais sous du texte, s'efface vers le haut ; image fixe si .no-anim ou « réduire les animations ».
   ===================================================================== */
.scene-svg { display: block; width: 100%; height: 100%; }
.sc-peak { fill: var(--land-peak); }
.sc-hill { fill: var(--land-hill-1); }
.sc-cloud-a { fill: var(--card); opacity: .85; }
.sc-glow { opacity: .35; }
.sc-walker-halo { fill: var(--orange); opacity: .25; }
/* Positions de repos (image fixe) */
.sc-sun { transform: translate(930px, 64px); }
.sc-cloud { transform: translate(300px, 46px); }
.sc-cloud.two { transform: translate(760px, 30px); }
.sc-walker { transform: translate(560px, 128px); }
.sc-still .sc-cloud, .sc-still .sc-walker { display: none; }
/* La boucle de 5 minutes */
.sc-anim .sc-sun { animation: sc-sun 300s ease-in-out infinite; }
.sc-anim .sc-cloud { animation: sc-cloud 300s linear infinite; }
.sc-anim .sc-cloud.two { animation: sc-cloud-2 300s linear infinite; animation-delay: -150s; }
.sc-anim .sc-walker { animation: sc-walk 300s linear infinite; }
.sc-anim .sc-walker-halo { transform-box: fill-box; transform-origin: center; animation: here-wave 2.8s ease-out infinite; }
.sc-anim .sc-flag { transform-box: fill-box; transform-origin: left center; animation: sc-flag 4s ease-in-out infinite; }
@keyframes sc-sun { 0% { transform: translate(640px, 210px); } 50% { transform: translate(900px, 52px); } 100% { transform: translate(1160px, 210px); } }
@keyframes sc-cloud { from { transform: translate(-260px, 46px); } to { transform: translate(1360px, 46px); } }
@keyframes sc-cloud-2 { from { transform: translate(-260px, 30px); } to { transform: translate(1360px, 30px); } }
@keyframes sc-walk {
  0% { transform: translate(60px, 184px); opacity: 0; } 2% { opacity: 1; }
  10% { transform: translate(180px, 174px); } 20% { transform: translate(320px, 168px); } 30% { transform: translate(440px, 148px); }
  42%, 47% { transform: translate(560px, 128px); } 57% { transform: translate(680px, 118px); } 66% { transform: translate(780px, 94px); }
  74% { transform: translate(870px, 76px); } 82% { transform: translate(950px, 54px); }
  88%, 96% { transform: translate(1000px, 34px); opacity: 1; } 100% { transform: translate(1000px, 34px); opacity: 0; }
}
@keyframes sc-flag { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(.82); } }
.no-anim .sc-anim *, .no-anim .sc-anim { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .sc-anim *, .sc-anim { animation: none !important; } }

/* Le chemin : la montagne au pied de la page */
.chemin-wrap { min-height: 100%; display: flex; flex-direction: column; }
.chemin-scene { position: relative; margin: auto -28px -40px; height: 190px; flex: none; opacity: .75; pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, var(--black) 55%); mask-image: linear-gradient(to bottom, transparent, var(--black) 55%); }
@media (max-width: 760px) { .chemin-scene { margin: auto 0 0; height: 140px; } }

/* « Les prochains pas » (Aujourd'hui) : une ligne par projet (plus de paysage dessous depuis le 22/11) */
.next-list { display: flex; flex-direction: column; }
.next-row { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-1); padding: var(--s-3) 0; min-width: 0; }
.next-row + .next-row { border-top: 1px solid var(--line); }
.next-title { font-size: var(--fs-strong); font-weight: var(--fw-title); line-height: 1.3; overflow-wrap: anywhere; color: var(--text); }
.next-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-top: var(--s-1); }
.next-row.done { opacity: .5; }


/* ---------------------------------------------------------------------
   Ambiance d'Aujourd'hui (22/11, Apo ; ambiance.js + ambiance-scene.js) : décor dessiné en fond de page, sous le contenu,
   de jour (.amb.day) ou de nuit (.amb.night). Coupé par .no-anim / réduire les animations.
   --------------------------------------------------------------------- */
.amb { position: fixed; z-index: 0; pointer-events: none; overflow: hidden; }
#view.has-amb > .page { position: relative; z-index: 1; }
/* Ce qui est posé directement sur le décor (titres de rubrique) : une pastille claire, lisible de jour comme de nuit */
#view.has-amb .sec-title { display: inline-block; background: var(--amb-chip); border: 1px solid var(--amb-chip-line);
  border-radius: var(--r-round); padding: var(--s-1) var(--s-3); backdrop-filter: blur(6px); }
.amb-sound { position: fixed; z-index: 2; background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow); color: var(--navy); width: 44px; height: 44px; border-radius: var(--r-round); display: grid; place-items: center; }
.amb-sound[aria-pressed="false"] { color: var(--muted); }
/* Masquer les « bulles » (23/11, Apo) : tout le contenu de la page s'efface, seuls le décor et les deux boutons restent */
.amb-bare-btn { position: fixed; z-index: 2; background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow); color: var(--navy); width: 44px; height: 44px; border-radius: var(--r-round); display: grid; place-items: center; }
.amb-bare-btn[aria-pressed="true"] { color: var(--action); }
#view.has-amb > .page { transition: opacity .25s ease; }
#view.has-amb.amb-bare > .page { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .25s ease, visibility 0s .25s; }
.no-anim #view.has-amb > .page { transition: none; }
@media (prefers-reduced-motion: reduce) { #view.has-amb > .page { transition: none; } }

@media (max-width: 760px) {
  #view.has-amb .today-hero { background: var(--amb-chip); border: 1px solid var(--amb-chip-line); padding: var(--s-4);
    border-radius: var(--r-lg); backdrop-filter: blur(6px); }
}
@media (max-width: 760px) { .amb-sound { display: none; } }

/* Scène du bivouac (scene.js) : calques HTML en % du fond, animations Web Animations (transform, opacity) */
.scn { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.scn-set { position: absolute; inset: 0; opacity: 0; transition: opacity var(--scn-fade, 1.5s) ease-in-out; }
.scn-set.on { opacity: 1; }
.scn-stage { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.scn-bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scn-a, .scn-fire, .scn-glow { position: absolute; }
.scn-move, .scn-breath, .scn-head, .scn-flicker { position: absolute; inset: 0; }
.scn-img, .scn-eyes { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; display: block; }
.scn-fire { mix-blend-mode: screen; }
.scn-flicker { transform-origin: 50% 100%; }
.scn-flame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; }
.scn-glow { background: radial-gradient(closest-side, var(--scene-glow), transparent); }
.scn-sparks { position: absolute; inset: 0; mix-blend-mode: screen; }
.scn-spark { position: absolute; background: radial-gradient(closest-side, var(--scene-spark), transparent); }
.scn-spark.tex { border-radius: 0; background: center / contain no-repeat; }
.scn-pivot { display: none; }
.scn-debug .scn-a, .scn-debug .scn-fire, .scn-debug .scn-glow { outline: 1px dashed var(--scene-debug); }
.scn-debug .scn-pivot { display: block; position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: var(--r-round);
  background: var(--scene-debug); z-index: 1; }
