/* dash2next : thème clair et sombre par variables ; le thème suit le hub (data-theme sur <html>). */
:root {
  --barre: 264px;
  --texte: #37352f; --texte-doux: #787774; --texte-pale: #a5a29a;
  --fond: #ffffff; --fond-barre: #f7f7f5; --fond-doux: #f1f1ef; --fond-code: #f6f5f4; --survol: rgba(55, 53, 47, .07); --survol-fort: rgba(55, 53, 47, .13);
  --bord: #e9e9e7; --bord-fort: #dcdcd8; --panneau: #ffffff; --ombre: 0 0 0 1px rgba(15, 15, 15, .05), 0 3px 6px rgba(15, 15, 15, .1), 0 9px 24px rgba(15, 15, 15, .2);
  --accent: #2383e2; --accent-fond: rgba(35, 131, 226, .14); --danger: #eb5757; --succes: #1f845a;
  /* Kanban */
  --colonne: #f1f2f4; --carte: #ffffff; --carte-ombre: 0 1px 1px rgba(9, 30, 66, .25), 0 0 1px rgba(9, 30, 66, .31); --carte-texte: #172b4d;
  /* puces (fond, texte) */
  --gris-f: #e3e2e0; --gris-t: #32302c; --brun-f: #eee0da; --brun-t: #442a1e; --orange-f: #fadec9; --orange-t: #49290e;
  --jaune-f: #fdecc8; --jaune-t: #402c1b; --vert-f: #dbeddb; --vert-t: #1c3829; --bleu-f: #d3e5ef; --bleu-t: #183347;
  --violet-f: #e8deee; --violet-t: #412454; --rose-f: #f5e0e9; --rose-t: #4c2337; --rouge-f: #ffe2dd; --rouge-t: #5d1715;
  /* texte coloré */
  --gris-c: #787774; --brun-c: #9f6b53; --orange-c: #d9730d; --jaune-c: #cb912f; --vert-c: #448361; --bleu-c: #337ea9; --violet-c: #9065b0; --rose-c: #c14c8a; --rouge-c: #d44c47;
  /* étiquettes des cartes : couleurs franches */
  --gris-e: #b3b9c4; --brun-e: #c9a28b; --orange-e: #fea362; --jaune-e: #f5cd47; --vert-e: #4bce97; --bleu-e: #579dff; --violet-e: #9f8fef; --rose-e: #e774bb; --rouge-e: #f87168; --etiq-t: #172b4d;
  /* teinte des colonnes */
  --gris-k: #f1f2f4; --brun-k: #f4ede9; --orange-k: #fdf0e6; --jaune-k: #fdf6e1; --vert-k: #e9f5ee; --bleu-k: #e9f2fb; --violet-k: #f1ecf8; --rose-k: #fbecf4; --rouge-k: #fdeceb;
  color-scheme: light;
}
:root[data-theme="sombre"] {
  --texte: rgba(255, 255, 255, .86); --texte-doux: rgba(255, 255, 255, .52); --texte-pale: rgba(255, 255, 255, .32);
  --fond: #191919; --fond-barre: #202020; --fond-doux: #262626; --fond-code: #232323; --survol: rgba(255, 255, 255, .055); --survol-fort: rgba(255, 255, 255, .1);
  --bord: #2f2f2f; --bord-fort: #3a3a3a; --panneau: #252525; --ombre: 0 0 0 1px rgba(255, 255, 255, .08), 0 3px 6px rgba(0, 0, 0, .35), 0 9px 24px rgba(0, 0, 0, .5);
  --accent: #529cca; --accent-fond: rgba(82, 156, 202, .2);
  --colonne: #101204; --carte: #22272b; --carte-ombre: 0 1px 1px rgba(3, 4, 4, .5), 0 0 1px rgba(3, 4, 4, .5); --carte-texte: #b6c2cf;
  --gris-f: #3a3a3a; --gris-t: #e3e2e0; --brun-f: #4a3228; --brun-t: #f0dcd2; --orange-f: #5c3b23; --orange-t: #fbdcc5;
  --jaune-f: #564328; --jaune-t: #fcecc8; --vert-f: #2b4632; --vert-t: #d6f0dc; --bleu-f: #28456c; --bleu-t: #d3e5ef;
  --violet-f: #492f64; --violet-t: #eadcf6; --rose-f: #69314c; --rose-t: #f8dcea; --rouge-f: #6e3630; --rouge-t: #ffdcd7;
  --gris-c: #9b9b9b; --brun-c: #ba856f; --orange-c: #c77d48; --jaune-c: #ca9849; --vert-c: #529e72; --bleu-c: #5e87c9; --violet-c: #9d68d3; --rose-c: #d15796; --rouge-c: #df5452;
  --gris-e: #626f86; --brun-e: #8a5a45; --orange-e: #c25100; --jaune-e: #946f00; --vert-e: #216e4e; --bleu-e: #0055cc; --violet-e: #5e4db2; --rose-e: #943d73; --rouge-e: #ae2e24; --etiq-t: #ffffff;
  --gris-k: #101204; --brun-k: #1b1410; --orange-k: #1e140b; --jaune-k: #1c1709; --vert-k: #0d1a13; --bleu-k: #0c1626; --violet-k: #17112a; --rose-k: #1f0f19; --rouge-k: #220f0d;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--fond); color: var(--texte); display: grid; grid-template-columns: var(--barre) 1fr; overflow: hidden;
  font: 15px/1.5 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Segoe UI Emoji";
  -webkit-font-smoothing: antialiased;
}
body.sans-barre { grid-template-columns: 0 1fr; }
body.sans-barre #barre { visibility: hidden; }
body.en-glisse { cursor: grabbing; user-select: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
.ic { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.discret { color: var(--texte-doux); font-size: 13px; }
.vide { color: var(--texte-pale); }
kbd { font: 11px ui-monospace, monospace; color: var(--texte-pale); margin-left: auto; }

/* --- Boutons et champs --- */
.bouton { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--bord-fort); background: var(--fond); border-radius: 6px; padding: 6px 12px; cursor: pointer; font-size: 14px; white-space: nowrap; }
.bouton:hover { background: var(--survol); }
.bouton.principal { background: var(--accent); border-color: var(--accent); color: #fff; }
.bouton.principal:hover { filter: brightness(1.07); }
.bouton.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.bouton.petit { padding: 3px 9px; font-size: 13px; }
.bouton-double { display: inline-flex; }
.bouton-double .bouton:first-child { border-radius: 6px 0 0 6px; }
.bouton-double .fleche { border-radius: 0 6px 6px 0; border-left: 1px solid rgba(255, 255, 255, .3); padding: 3px 7px; }
.bouton-icone { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 0; background: none; border-radius: 6px; cursor: pointer; color: var(--texte-doux); }
.bouton-icone:hover { background: var(--survol-fort); color: var(--texte); }
.bouton-icone.petit { width: 22px; height: 22px; }
.bouton-icone.favori { color: #e6a700; }
.bouton-icone.favori .ic { fill: #e6a700; }
.bouton-icone.eteint { opacity: .4; }
.lien-bouton { border: 0; background: none; padding: 2px 6px; border-radius: 4px; color: var(--texte-doux); cursor: pointer; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.lien-bouton:hover { background: var(--survol); color: var(--texte); }
.lien-bouton.danger:hover { color: var(--danger); }
.champ { width: 100%; border: 1px solid var(--bord-fort); background: var(--fond-doux); border-radius: 6px; padding: 6px 9px; font-size: 14px; outline: none; }
.champ:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-fond); background: var(--fond); }
textarea.champ { resize: vertical; }
.ligne-outils { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ligne-outils > .champ { flex: 1; min-width: 0; width: auto; }
.option-case { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--texte-doux); cursor: pointer; }
.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

/* --- Puces de couleur --- */
.puce { display: inline-flex; align-items: center; gap: 3px; padding: 0 7px; border-radius: 4px; font-size: 13px; line-height: 21px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.puce.petite { font-size: 12px; line-height: 19px; padding: 0 6px; }
.puce.relation { background: var(--fond-doux); text-decoration: underline; text-decoration-color: var(--bord-fort); }
.puce-x { border: 0; background: none; cursor: pointer; padding: 0 2px; opacity: .6; font-size: 14px; line-height: 1; }
.puces { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.pastille { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.f-gris { background: var(--gris-f); color: var(--gris-t); } .f-brun { background: var(--brun-f); color: var(--brun-t); } .f-orange { background: var(--orange-f); color: var(--orange-t); }
.f-jaune { background: var(--jaune-f); color: var(--jaune-t); } .f-vert { background: var(--vert-f); color: var(--vert-t); } .f-bleu { background: var(--bleu-f); color: var(--bleu-t); }
.f-violet { background: var(--violet-f); color: var(--violet-t); } .f-rose { background: var(--rose-f); color: var(--rose-t); } .f-rouge { background: var(--rouge-f); color: var(--rouge-t); }
.t-gris { color: var(--gris-c); } .t-brun { color: var(--brun-c); } .t-orange { color: var(--orange-c); } .t-jaune { color: var(--jaune-c); } .t-vert { color: var(--vert-c); }
.t-bleu { color: var(--bleu-c); } .t-violet { color: var(--violet-c); } .t-rose { color: var(--rose-c); } .t-rouge { color: var(--rouge-c); }
.pastille.f-gris { background: var(--gris-e); } .pastille.f-brun { background: var(--brun-e); } .pastille.f-orange { background: var(--orange-e); } .pastille.f-jaune { background: var(--jaune-e); }
.pastille.f-vert { background: var(--vert-e); } .pastille.f-bleu { background: var(--bleu-e); } .pastille.f-violet { background: var(--violet-e); } .pastille.f-rose { background: var(--rose-e); } .pastille.f-rouge { background: var(--rouge-e); }
.avatar { display: inline-grid; place-items: center; border-radius: 50%; font-weight: 600; flex: none; letter-spacing: -.3px; }
.personnes { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.personne { display: inline-flex; gap: 5px; align-items: center; }

/* --- Barre latérale --- */
#barre { background: var(--fond-barre); border-right: 1px solid var(--bord); display: flex; flex-direction: column; overflow: hidden; font-size: 14px; position: relative; color: var(--texte-doux); }
#poignee-barre { position: absolute; top: 0; bottom: 0; left: calc(var(--barre) - 3px); width: 6px; cursor: col-resize; z-index: 5; }
body.sans-barre #poignee-barre { display: none; }
.espace { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px 14px; color: var(--texte); font-weight: 600; }
.logo { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: linear-gradient(135deg, #2383e2, #9065b0); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: -.5px; }
.nom-espace { flex: 1; }
.badge-env { font-size: 10px; font-weight: 700; background: #f5a623; color: #3b2600; padding: 1px 6px; border-radius: 4px; letter-spacing: .5px; }
.espace .replier { opacity: 0; }
#barre:hover .replier { opacity: 1; }
.liens { padding: 0 6px 8px; display: flex; flex-direction: column; }
.barre-lien { display: flex; align-items: center; gap: 9px; border: 0; background: none; padding: 4px 8px; border-radius: 6px; cursor: pointer; text-align: left; color: var(--texte-doux); font-weight: 500; }
.barre-lien:hover { background: var(--survol); color: var(--texte); }
.section { padding: 6px 6px 0; }
.section-pages { flex: 1; overflow-y: auto; min-height: 0; }
.section-titre { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 600; padding: 4px 8px; color: var(--texte-pale); }
.section-titre .bouton-icone { opacity: 0; }
.section:hover .section-titre .bouton-icone { opacity: 1; }
.arbre-ligne { display: flex; align-items: center; gap: 4px; min-height: 28px; padding-right: 4px; border-radius: 6px; cursor: pointer; color: var(--texte-doux); font-weight: 500; }
.arbre-ligne:hover { background: var(--survol); }
.arbre-ligne.actif { background: var(--survol-fort); color: var(--texte); }
.arbre-fleche { width: 20px; height: 20px; display: grid; place-items: center; border: 0; background: none; border-radius: 4px; cursor: pointer; color: var(--texte-pale); flex: none; }
.arbre-fleche:hover { background: var(--survol-fort); }
.arbre-fleche.ouvert .ic { transform: rotate(90deg); }
.arbre-fleche.vide { opacity: .45; }
.arbre-icone { width: 20px; text-align: center; flex: none; font-size: 15px; }
.arbre-titre { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arbre-actions { display: none; gap: 1px; }
.arbre-ligne:hover .arbre-actions { display: flex; }
.arbre-vide { font-size: 12px; color: var(--texte-pale); padding: 3px 0; }
.bas-barre { border-top: 1px solid var(--bord); padding: 6px; display: flex; flex-direction: column; }

/* --- Zone principale --- */
#contenu { overflow-y: auto; height: 100vh; position: relative; min-width: 0; }
.barre-haut { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 6px; height: 45px; padding: 0 12px; background: var(--fond); }
.montrer-barre { display: none; }
body.sans-barre .montrer-barre { display: inline-grid; }
.fil { flex: 1; display: flex; align-items: center; gap: 2px; min-width: 0; overflow: hidden; white-space: nowrap; font-size: 14px; }
.fil a { text-decoration: none; padding: 2px 6px; border-radius: 4px; color: var(--texte-doux); overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.fil a:hover { background: var(--survol); }
.fil .sep { color: var(--texte-pale); }
.fil .courant { padding: 2px 6px; overflow: hidden; text-overflow: ellipsis; }
.modifie { white-space: nowrap; margin-right: 6px; }

/* --- Page --- */
.page { padding-bottom: 30vh; }
.couverture { height: 30vh; max-height: 280px; min-height: 160px; background-size: cover; background-position: center; position: relative; }
.couv-outils { position: absolute; right: 22%; bottom: 12px; display: none; gap: 6px; }
.couverture:hover .couv-outils { display: flex; }
.couv-outils .bouton { background: color-mix(in srgb, var(--fond) 88%, transparent); }
.page-corps { max-width: 900px; margin: 0 auto; padding: 0 96px; }
.pleine-largeur .page-corps { max-width: none; }
.page-base .page-corps { max-width: none; padding: 0 56px; }
.page-base .tete-page { max-width: 1200px; }
.petit-texte .contenu-page { font-size: 14px; }
.tete-page { padding-top: 64px; position: relative; }
.tete-page.avec-couv { padding-top: 12px; }
.grande-icone { font-size: 72px; line-height: 1; border: 0; background: none; cursor: pointer; padding: 4px; border-radius: 8px; margin-bottom: 4px; }
.tete-page.avec-couv .grande-icone { margin-top: -52px; }
.grande-icone:hover:not(:disabled) { background: var(--survol); }
.outils-titre { display: flex; gap: 4px; opacity: 0; transition: opacity .15s; margin: 0 0 4px -6px; }
.tete-page:hover .outils-titre, .outils-titre:focus-within { opacity: 1; }
.titre-page { font-size: 40px; font-weight: 700; line-height: 1.2; margin: 0 0 12px; outline: none; word-break: break-word; }
.titre-page:empty::before { content: attr(data-ph); color: var(--texte-pale); }
.dans-base { font-size: 13px; color: var(--texte-doux); margin-bottom: 6px; }
.dans-base a { text-decoration: none; padding: 1px 4px; border-radius: 4px; }
.dans-base a:hover { background: var(--survol); }
.bandeau-verrou, .bandeau-modele, .bandeau-corbeille { display: flex; align-items: center; gap: 6px; background: var(--fond-doux); border-radius: 6px; padding: 8px 12px; font-size: 13px; color: var(--texte-doux); margin: 8px 0; }
.bandeau-corbeille { background: var(--rouge-f); color: var(--rouge-t); justify-content: center; border-radius: 0; margin: 0; }
.section-com { border-top: 1px solid var(--bord); border-bottom: 1px solid var(--bord); margin: 10px 0 16px; padding: 6px 0; }
.section-com summary { cursor: pointer; font-size: 13px; color: var(--texte-doux); padding: 2px 0; }
.retroliens { margin-top: 48px; border-top: 1px solid var(--bord); padding-top: 12px; }
.retrolien { display: flex; gap: 8px; align-items: center; text-decoration: none; padding: 4px 6px; border-radius: 6px; font-size: 14px; }
.retrolien:hover { background: var(--survol); }
.page-vide, .page-simple { max-width: 900px; margin: 0 auto; padding: 40px 96px; }

/* --- Propriétés d'une fiche --- */
.proprietes-fiche { margin: 8px 0 12px; }
.ligne-propriete { display: flex; align-items: flex-start; min-height: 34px; }
.nom-propriete { display: flex; align-items: center; gap: 6px; width: 170px; flex: none; border: 0; background: none; padding: 6px 6px; border-radius: 4px; color: var(--texte-doux); cursor: pointer; font-size: 14px; text-align: left; }
.nom-propriete span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nom-propriete:hover:not(:disabled) { background: var(--survol); }
.valeur-prop { flex: 1; min-height: 32px; padding: 5px 8px; border-radius: 4px; cursor: pointer; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 14px; min-width: 0; word-break: break-word; }
.valeur-prop:hover { background: var(--survol); }
.ajout-propriete { border: 0; background: none; color: var(--texte-pale); padding: 6px; border-radius: 4px; cursor: pointer; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.ajout-propriete:hover { background: var(--survol); color: var(--texte-doux); }
.case-prop { display: inline-grid; place-items: center; width: 16px; height: 16px; border: 1.5px solid var(--texte-doux); border-radius: 3px; }
.case-prop.cochee { background: var(--accent); border-color: var(--accent); color: #fff; }
.lien-prop { color: var(--texte); text-decoration: underline; text-decoration-color: var(--texte-pale); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge-date { display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px; border-radius: 4px; font-size: 12px; line-height: 20px; white-space: nowrap; }
.badge-date.retard { background: #ffd5d2; color: #ae2e24; }
.badge-date.bientot { background: #f8e6a0; color: #7f5f01; }
.badge-date.fait { background: #baf3db; color: #164b35; }
[data-theme="sombre"] .badge-date.retard { background: #5d1f1a; color: #fd9891; }
[data-theme="sombre"] .badge-date.bientot { background: #533f04; color: #f5cd47; }
[data-theme="sombre"] .badge-date.fait { background: #164b35; color: #7ee2b8; }
.titre-cellule { display: inline-flex; gap: 6px; align-items: center; font-weight: 500; }
.icone-fiche { flex: none; }

/* --- Éditeur de blocs --- */
.contenu-page { padding-bottom: 12px; }
.editeur { position: relative; }
.bloc { position: relative; margin: 1px 0; }
.bloc-corps { display: flex; align-items: flex-start; gap: 4px; border-radius: 4px; }
.bloc.t-gris > .bloc-corps .txt, .bloc.t-gris > .bloc-corps { color: var(--gris-c); } .bloc.t-brun > .bloc-corps { color: var(--brun-c); } .bloc.t-orange > .bloc-corps { color: var(--orange-c); }
.bloc.t-jaune > .bloc-corps { color: var(--jaune-c); } .bloc.t-vert > .bloc-corps { color: var(--vert-c); } .bloc.t-bleu > .bloc-corps { color: var(--bleu-c); }
.bloc.t-violet > .bloc-corps { color: var(--violet-c); } .bloc.t-rose > .bloc-corps { color: var(--rose-c); } .bloc.t-rouge > .bloc-corps { color: var(--rouge-c); }
.bloc[class*=" f-"] { background: none; }
.bloc.f-gris > .bloc-corps { background: var(--gris-f); } .bloc.f-brun > .bloc-corps { background: var(--brun-f); } .bloc.f-orange > .bloc-corps { background: var(--orange-f); }
.bloc.f-jaune > .bloc-corps { background: var(--jaune-f); } .bloc.f-vert > .bloc-corps { background: var(--vert-f); } .bloc.f-bleu > .bloc-corps { background: var(--bleu-f); }
.bloc.f-violet > .bloc-corps { background: var(--violet-f); } .bloc.f-rose > .bloc-corps { background: var(--rose-f); } .bloc.f-rouge > .bloc-corps { background: var(--rouge-f); }
.txt { flex: 1; min-width: 0; outline: none; padding: 3px 2px; min-height: 1.5em; word-break: break-word; white-space: pre-wrap; caret-color: var(--texte); }
.txt:empty:focus::before, .b-titre1 .txt:empty::before, .b-titre2 .txt:empty::before, .b-titre3 .txt:empty::before { content: attr(data-ph); color: var(--texte-pale); pointer-events: none; }
.b-puce .txt:empty::before, .b-numero .txt:empty::before, .b-case .txt:empty::before, .b-repli .txt:empty::before, .b-citation .txt:empty::before, .b-encadre .txt:empty::before { content: attr(data-ph); color: var(--texte-pale); pointer-events: none; }
.txt a { color: inherit; text-decoration: underline; text-decoration-color: var(--texte-pale); cursor: pointer; }
.txt a[data-page] { text-decoration: none; border-bottom: 1px solid var(--texte-pale); font-weight: 500; }
.txt a[data-page]::before { content: "↗ "; color: var(--texte-doux); font-size: .85em; }
.txt code, .com-texte code { font: .86em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--fond-code); color: #eb5757; padding: 2px 4px; border-radius: 4px; }
.b-titre1 { margin-top: 1.4em; } .b-titre1 .txt { font-size: 1.875em; font-weight: 700; line-height: 1.3; }
.b-titre2 { margin-top: 1.1em; } .b-titre2 .txt { font-size: 1.5em; font-weight: 650; line-height: 1.3; }
.b-titre3 { margin-top: .9em; } .b-titre3 .txt { font-size: 1.25em; font-weight: 600; line-height: 1.3; }
.marque { width: 24px; flex: none; text-align: center; padding-top: 3px; user-select: none; }
.b-numero > .bloc-corps > .marque { text-align: right; padding-right: 4px; font-variant-numeric: tabular-nums; }
.case { width: 16px; height: 16px; margin: 6px 4px 0 4px; flex: none; accent-color: var(--accent); cursor: pointer; }
.txt.barre { text-decoration: line-through; color: var(--texte-pale); }
.fleche-repli { width: 24px; height: 24px; display: grid; place-items: center; border: 0; background: none; border-radius: 4px; cursor: pointer; margin-top: 1px; flex: none; color: var(--texte); }
.fleche-repli:hover { background: var(--survol); }
.fleche-repli.ouvert .ic { transform: rotate(90deg); }
.repli-vide { border: 0; background: none; color: var(--texte-pale); font-size: 14px; padding: 3px 2px; cursor: pointer; text-align: left; }
.enfants { padding-left: 26px; }
.b-citation > .bloc-corps { border-left: 3px solid currentColor; padding-left: 12px; margin: 4px 0; }
.b-citation .txt { font-size: 1.05em; }
.b-encadre > .bloc-corps { background: var(--fond-doux); padding: 14px 14px 14px 12px; border-radius: 6px; margin: 4px 0; gap: 8px; }
.icone-encadre { border: 0; background: none; font-size: 20px; line-height: 1.2; cursor: pointer; padding: 0 2px; border-radius: 4px; }
.icone-encadre:hover { background: var(--survol-fort); }
.separateur { width: 100%; padding: 8px 0; outline: none; }
.separateur hr { border: 0; border-top: 1px solid var(--bord-fort); margin: 0; }
.separateur:focus hr { border-color: var(--accent); }
.b-code > .bloc-corps { flex-direction: column; background: var(--fond-code); border-radius: 6px; margin: 6px 0; position: relative; gap: 0; }
.code-outils { display: flex; justify-content: space-between; width: 100%; padding: 6px 10px 0; opacity: .3; transition: opacity .15s; }
.b-code:hover .code-outils { opacity: 1; }
.langage { border: 0; background: none; color: var(--texte-doux); font-size: 12px; cursor: pointer; }
pre { margin: 0; padding: 6px 16px 16px; width: 100%; font: 13.5px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word; outline: none; tab-size: 2; }
.image { margin: 6px 0; max-width: 100%; position: relative; }
.image img { max-width: 100%; border-radius: 4px; display: block; cursor: zoom-in; }
.legende { font-size: 13px; color: var(--texte-doux); padding: 4px 2px; outline: none; min-height: 1.4em; }
.legende:empty:focus::before { content: attr(data-ph); color: var(--texte-pale); }
.image-outils { position: absolute; top: 8px; right: 8px; display: none; gap: 2px; }
.image:hover .image-outils { display: flex; }
.image-outils .bouton { background: color-mix(in srgb, var(--fond) 85%, transparent); }
.zone-envoi { display: flex; gap: 8px; align-items: center; width: 100%; background: var(--fond-doux); border-radius: 6px; padding: 12px; margin: 4px 0; color: var(--texte-doux); }
.zone-envoi .champ { flex: 1; }
.zone-envoi.envoi { opacity: .5; pointer-events: none; }
.fichier-joint { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 6px; text-decoration: none; }
.fichier-joint:hover { background: var(--survol); }
.signet { display: flex; width: 100%; border: 1px solid var(--bord); border-radius: 6px; text-decoration: none; margin: 4px 0; overflow: hidden; }
.signet:hover { background: var(--survol); }
.signet-texte { flex: 1; padding: 12px 14px; min-width: 0; }
.signet-titre { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signet-url { font-size: 12px; color: var(--texte-doux); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signet-icone { width: 40px; height: 40px; margin: 12px; border-radius: 6px; }
.lien-page { display: flex; align-items: center; gap: 8px; width: 100%; padding: 3px 4px; border-radius: 4px; text-decoration: none; font-weight: 500; outline: none; }
.lien-page:hover, .lien-page:focus { background: var(--survol); }
.lien-page .titre-lien { border-bottom: 1px solid var(--bord-fort); }
.lien-page.absente { color: var(--texte-pale); font-style: italic; }
.icone-page { font-size: 18px; width: 22px; text-align: center; }
.tableau-bloc { width: 100%; margin: 6px 0; }
.tableau-defile { overflow-x: auto; }
.tableau-simple { border-collapse: collapse; min-width: 50%; }
.tableau-simple td, .tableau-simple th { border: 1px solid var(--bord-fort); padding: 6px 9px; min-width: 110px; vertical-align: top; outline: none; text-align: left; }
.tableau-simple.avec-entete tr:first-child th { background: var(--fond-doux); font-weight: 600; }
.tableau-outils { display: flex; gap: 4px; margin-top: 6px; opacity: 0; flex-wrap: wrap; align-items: center; }
.tableau-bloc:hover .tableau-outils { opacity: 1; }
.base-en-ligne { width: 100%; margin: 10px 0; }
.zone-fin { min-height: 80px; cursor: text; }

/* poignée des blocs */
.poignee { position: absolute; left: -50px; top: 2px; display: flex; gap: 0; opacity: 0; transition: opacity .1s; }
.b-titre1 > .poignee { top: 10px; } .b-titre2 > .poignee { top: 6px; } .b-titre3 > .poignee { top: 4px; }
.bloc:hover > .poignee { opacity: 1; }
.poignee button { width: 24px; height: 24px; border: 0; background: none; border-radius: 4px; color: var(--texte-pale); cursor: pointer; display: grid; place-items: center; }
.poignee button:hover { background: var(--survol-fort); color: var(--texte-doux); }
.poignee-grip { cursor: grab !important; }
.bloc.glisse { opacity: .4; }
.ligne-depot { position: fixed; height: 3px; background: var(--accent); border-radius: 2px; z-index: 900; pointer-events: none; opacity: .8; }

/* barre de mise en forme */
.barre-format { position: fixed; z-index: 950; display: flex; background: var(--panneau); box-shadow: var(--ombre); border-radius: 6px; padding: 2px; }
.format { border: 0; background: none; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 4px; cursor: pointer; font-size: 14px; display: grid; place-items: center; }
.format:hover { background: var(--survol-fort); }
.format code { font-size: 12px; color: inherit; background: none; }
.format-couleur { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--rouge-c); }

/* --- Menus flottants --- */
.flottant { position: fixed; z-index: 1000; background: var(--panneau); box-shadow: var(--ombre); border-radius: 8px; max-height: min(70vh, 520px); overflow-y: auto; }
.menu { padding: 6px; display: flex; flex-direction: column; gap: 1px; }
.menu > .champ { margin-bottom: 4px; }
.menu-item { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; background: none; padding: 5px 8px; border-radius: 5px; cursor: pointer; text-align: left; font-size: 14px; outline: none; }
.menu-item:hover, .menu-item:focus-visible, .menu-item.actif { background: var(--survol-fort); }
.menu-item.danger { color: var(--danger); }
.menu-item.choisie { background: var(--accent-fond); }
.menu-item .ic { color: var(--texte-doux); }
.menu-libelle { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.menu-libelle small { color: var(--texte-doux); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-indice { font-size: 11px; color: var(--texte-pale); }
.menu-emoji { width: 20px; text-align: center; flex: none; }
.menu-titre { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; color: var(--texte-pale); padding: 8px 8px 4px; }
.menu-sep { height: 1px; background: var(--bord); margin: 4px 0; }
.menu-vide { padding: 8px; color: var(--texte-pale); font-size: 14px; }
.menu-slash { width: 320px; max-height: 360px; overflow-y: auto; padding: 6px; display: block; }
.slash-icone { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 1px solid var(--bord); border-radius: 6px; background: var(--fond); font-size: 15px; font-weight: 600; }
.slash-item .menu-libelle b { font-weight: 500; }
.panneau { padding: 6px; }
.ligne-filtre { display: grid; grid-template-columns: 1fr 1fr 1fr 28px; gap: 6px; align-items: center; padding: 3px 4px; }
.ligne-prop { display: flex; align-items: center; gap: 8px; padding: 2px 4px; border-radius: 4px; }
.ligne-prop:hover { background: var(--survol); }
.poignee-prop { cursor: grab; color: var(--texte-pale); display: grid; }
.nom-prop { flex: 1; border: 0; background: none; text-align: left; padding: 4px 2px; cursor: pointer; font-size: 14px; }
.editeur-options { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.choisis { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--fond-doux); border-radius: 6px; }
.liste-options { display: flex; flex-direction: column; gap: 1px; max-height: 300px; overflow-y: auto; }
.option-ligne { display: flex; align-items: center; border-radius: 4px; }
.option-ligne:hover, .option-ligne.choisie { background: var(--survol); }
.option-bouton { flex: 1; border: 0; background: none; text-align: left; padding: 4px 6px; cursor: pointer; }
.editeur-valeur { padding: 6px; }
.editeur-date { padding: 10px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.editeur-date label { color: var(--texte-doux); }
.raccourcis-date { display: flex; gap: 4px; flex-wrap: wrap; }
.choix-emoji { padding: 8px; }
.emojis { display: grid; grid-template-columns: repeat(10, 1fr); gap: 2px; margin-top: 8px; max-height: 260px; overflow-y: auto; }
.emoji { border: 0; background: none; font-size: 21px; padding: 3px; border-radius: 4px; cursor: pointer; }
.emoji:hover { background: var(--survol-fort); }
.choix-couv { padding: 8px; }
.grille-couv { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.vignette-couv { height: 40px; border: 0; border-radius: 6px; cursor: pointer; }
.couv-degrade-1 { background: linear-gradient(120deg, #4facfe, #8e64d8); } .couv-degrade-2 { background: linear-gradient(120deg, #f6d365, #fda085); }
.couv-degrade-3 { background: linear-gradient(120deg, #84fab0, #8fd3f4); } .couv-degrade-4 { background: linear-gradient(120deg, #fccb90, #d57eeb); }
.couv-degrade-5 { background: linear-gradient(120deg, #e0c3fc, #8ec5fc); } .couv-degrade-6 { background: linear-gradient(120deg, #434343, #1e3c72); }
.couv-uni-bleu { background: #579dff; } .couv-uni-vert { background: #4bce97; } .couv-uni-rose { background: #e774bb; } .couv-uni-jaune { background: #f5cd47; }

/* --- Fenêtres modales --- */
.voile { position: fixed; inset: 0; background: rgba(15, 15, 15, .55); z-index: 800; display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px 16px; overflow-y: auto; }
.modale { background: var(--panneau); border-radius: 12px; box-shadow: var(--ombre); width: 100%; max-width: 560px; }
.modale.petite { max-width: 420px; } .modale.moyenne { max-width: 640px; } .modale.large { max-width: 920px; }
.modale-entete { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 0 20px; }
.modale-entete h2 { margin: 0; font-size: 17px; }
.modale-corps { padding: 14px 20px 20px; }
.modale-recherche { max-width: 640px; }
.modale-recherche .modale-corps { padding: 0; }
.ligne-recherche { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--bord); color: var(--texte-doux); }
.champ-recherche { flex: 1; border: 0; background: none; outline: none; font-size: 17px; }
.resultats { max-height: 60vh; overflow-y: auto; padding: 6px; }
.resultat { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; text-align: left; padding: 7px 10px; border-radius: 6px; cursor: pointer; }
.resultat.actif { background: var(--survol-fort); }
.resultat .extrait { display: block; white-space: normal; }
.reglages h4 { margin: 18px 0 8px; font-size: 14px; }
.reglages h4:first-child { margin-top: 0; }
.raccourcis { margin: 0; padding-left: 18px; font-size: 13px; color: var(--texte-doux); }
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #2f3437; color: #fff; padding: 9px 16px; border-radius: 8px; font-size: 14px; box-shadow: var(--ombre); transition: opacity .3s, transform .3s; }
.toast.erreur { background: #c4302b; }
.toast.part { opacity: 0; transform: translateY(8px); }

/* --- Bases : barre, onglets, filtres --- */
.vue-base { width: 100%; }
.base-titre { display: flex; align-items: center; gap: 4px; margin-bottom: 4px; }
.base-lien { font-size: 20px; font-weight: 700; text-decoration: none; padding: 2px 4px; border-radius: 4px; }
.base-lien:hover { background: var(--survol); }
.base-titre .bouton-icone { opacity: 0; }
.base-titre:hover .bouton-icone { opacity: 1; }
.barre-base { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--bord); flex-wrap: wrap; }
.onglets-vues { display: flex; gap: 2px; overflow-x: auto; min-width: 0; }
.onglet { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 8px 8px 9px; cursor: pointer; font-size: 14px; color: var(--texte-doux); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; border-radius: 4px 4px 0 0; }
.onglet:hover { color: var(--texte); background: var(--survol); }
.onglet.actif { color: var(--texte); border-bottom-color: var(--texte); font-weight: 500; }
.onglet.ajout { padding: 8px 6px; }
.outils-base { display: flex; align-items: center; gap: 2px; padding: 4px 0; margin-left: auto; }
.bouton-outil { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; padding: 4px 7px; border-radius: 5px; cursor: pointer; color: var(--texte-doux); font-size: 14px; }
.bouton-outil:hover { background: var(--survol); color: var(--texte); }
.bouton-outil.actif { color: var(--accent); }
.libelle-outil { display: none; }
@media (min-width: 1200px) { .libelle-outil { display: inline; } }
.chercher-vue { display: inline-flex; align-items: center; gap: 4px; color: var(--texte-doux); padding: 0 4px; cursor: text; }
.recherche-vue { width: 0; border: 0; background: none; outline: none; transition: width .2s; font-size: 14px; }
.chercher-vue:focus-within .recherche-vue, .recherche-vue.ouverte { width: 150px; }
.ligne-filtres { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 0 0; }
.puce-filtre { display: inline-flex; align-items: center; gap: 4px; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); background: var(--accent-fond); color: var(--accent); border-radius: 14px; padding: 2px 10px; font-size: 13px; cursor: pointer; }
.base-corps { padding-top: 10px; }
.vide-vue, .base-absente, .chargement { padding: 30px; text-align: center; color: var(--texte-doux); }
.zone-base-pleine { margin-top: 8px; }
.compte { font-size: 12px; color: var(--texte-doux); font-variant-numeric: tabular-nums; }

/* --- Kanban --- */
.kanban { overflow-x: auto; padding-bottom: 12px; }
.kanban-colonnes { display: flex; gap: 12px; align-items: flex-start; min-height: 120px; }
.colonne { flex: none; width: 272px; background: var(--colonne); border-radius: 12px; padding: 8px 6px 6px; display: flex; flex-direction: column; max-height: calc(100vh - 230px); }
.taille-petite .colonne { width: 236px; } .taille-grande .colonne { width: 330px; }
.base-en-ligne .colonne { max-height: 640px; }
.colonne.teinte-gris { background: var(--gris-k); } .colonne.teinte-brun { background: var(--brun-k); } .colonne.teinte-orange { background: var(--orange-k); }
.colonne.teinte-jaune { background: var(--jaune-k); } .colonne.teinte-vert { background: var(--vert-k); } .colonne.teinte-bleu { background: var(--bleu-k); }
.colonne.teinte-violet { background: var(--violet-k); } .colonne.teinte-rose { background: var(--rose-k); } .colonne.teinte-rouge { background: var(--rouge-k); }
.sans-teinte .colonne { background: var(--colonne) !important; }
.colonne-tete { display: flex; align-items: center; gap: 6px; padding: 2px 6px 8px 8px; cursor: grab; }
.colonne-nom { flex: 1; display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--carte-texte); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.colonne-tete .bouton-icone { opacity: .55; }
.colonne:hover .colonne-tete .bouton-icone { opacity: 1; }
.colonne-cartes { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 6px; padding: 2px 2px 4px; }
.carte { position: relative; background: var(--carte); border-radius: 8px; box-shadow: var(--carte-ombre); padding: 8px 12px 8px; cursor: pointer; color: var(--carte-texte); font-size: 14px; outline: none; overflow: hidden; text-align: left; }
.carte:hover { box-shadow: var(--carte-ombre), inset 0 0 0 2px var(--accent); }
.carte:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.taille-petite .carte { font-size: 13px; padding: 6px 10px; }
.carte.finie .carte-titre { color: var(--texte-doux); }
.carte-couv { margin: -8px -12px 8px; }
.carte-couv img { display: block; width: 100%; max-height: 180px; object-fit: cover; }
.carte-couv.bande { height: 36px; }
.etiquettes { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.etiq { display: inline-block; min-width: 40px; max-width: 100%; height: 18px; line-height: 18px; padding: 0 8px; border-radius: 4px; font-size: 12px; font-weight: 600; color: var(--etiq-t); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.etiq.f-gris { background: var(--gris-e); } .etiq.f-brun { background: var(--brun-e); } .etiq.f-orange { background: var(--orange-e); } .etiq.f-jaune { background: var(--jaune-e); }
.etiq.f-vert { background: var(--vert-e); } .etiq.f-bleu { background: var(--bleu-e); } .etiq.f-violet { background: var(--violet-e); } .etiq.f-rose { background: var(--rose-e); } .etiq.f-rouge { background: var(--rouge-e); }
.carte-titre { line-height: 1.35; word-break: break-word; padding-right: 14px; }
.carte-titre .icone-fiche { margin-right: 4px; }
.carte-props { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; }
.carte-prop { font-size: 12px; color: var(--texte-doux); overflow: hidden; }
.carte-bas { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; margin-top: 8px; }
.badges { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; color: var(--texte-doux); }
.badge { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; padding: 1px 4px; border-radius: 4px; }
.badge.complet { background: #1f845a; color: #fff; }
.membres { display: flex; gap: 2px; margin-left: auto; }
.carte-menu { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--carte); display: none; place-items: center; cursor: pointer; color: var(--texte-doux); box-shadow: var(--carte-ombre); }
.carte:hover .carte-menu { display: grid; }
.carte-menu:hover { color: var(--texte); }
.carte-fantome { opacity: .35; background: var(--survol-fort); box-shadow: none; }
.carte-fantome > * { visibility: hidden; }
.carte-glissee { transform: rotate(3deg); box-shadow: 0 8px 20px rgba(0, 0, 0, .25) !important; opacity: 1 !important; }
.ajout-carte { display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: none; padding: 7px 8px; border-radius: 8px; cursor: pointer; color: var(--texte-doux); font-size: 14px; text-align: left; margin-top: 4px; }
.ajout-carte:hover { background: var(--survol-fort); color: var(--texte); }
.compositeur { display: flex; flex-direction: column; gap: 6px; padding: 2px; }
.compositeur textarea { background: var(--carte); box-shadow: var(--carte-ombre); border: 0; resize: none; }
.ajout-colonne { background: color-mix(in srgb, var(--colonne) 60%, transparent); padding: 6px; }
.ajout-colonne .ajout-carte { margin: 0; }
.colonnes-masquees { margin-top: 12px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.colonnes-masquees .menu-titre { padding: 0 4px 0 0; }
.colonne-masquee { display: inline-flex; align-items: center; gap: 6px; border: 1px dashed var(--bord-fort); background: none; border-radius: 8px; padding: 4px 8px; cursor: pointer; }

/* --- Tableau --- */
.table-defile { overflow-x: auto; }
.table-base { border-collapse: collapse; font-size: 14px; table-layout: fixed; min-width: 100%; }
.table-base th { text-align: left; font-weight: 400; color: var(--texte-doux); border-bottom: 1px solid var(--bord); border-right: 1px solid var(--bord); padding: 0; position: relative; white-space: nowrap; }
.table-base th:last-child { border-right: 0; width: 40px; }
.entete-prop { display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: none; padding: 7px 8px; cursor: pointer; color: inherit; font-size: 14px; overflow: hidden; }
.entete-prop:hover { background: var(--survol); }
.entete-prop span { overflow: hidden; text-overflow: ellipsis; }
.poignee-largeur { position: absolute; right: -3px; top: 0; bottom: 0; width: 6px; cursor: col-resize; z-index: 2; }
.poignee-largeur:hover { background: var(--accent); opacity: .5; }
.table-base td { border-bottom: 1px solid var(--bord); border-right: 1px solid var(--bord); padding: 6px 8px; vertical-align: top; overflow: hidden; cursor: pointer; position: relative; height: 36px; }
.table-base td:last-child { border-right: 0; }
.table-base tbody tr:hover td { background: var(--survol); }
.table-base .cellule > * { max-width: 100%; }
.texte-cellule { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ouvrir-ligne { position: absolute; right: 6px; top: 6px; display: none; align-items: center; gap: 3px; border: 1px solid var(--bord-fort); background: var(--fond); border-radius: 4px; padding: 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .3px; color: var(--texte-doux); cursor: pointer; height: 22px; }
.table-base tr:hover .ouvrir-ligne { display: inline-flex; }
.c-title { cursor: grab; }
.ligne-groupe td { background: var(--fond-doux) !important; font-size: 13px; }
.ligne-groupe .compte { margin-left: 8px; }
.pied td { border-bottom: 0; color: var(--texte-doux); font-size: 13px; cursor: default; }
.pied td:hover { background: none !important; }
.ajout-ligne { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 4px 6px; border-radius: 4px; cursor: pointer; color: var(--texte-doux); font-size: 14px; }
.ajout-ligne:hover { background: var(--survol); color: var(--texte); }
.compte-lignes { margin-left: 10px; font-size: 12px; color: var(--texte-pale); }
.somme { text-align: right; font-variant-numeric: tabular-nums; }
.nombre { font-variant-numeric: tabular-nums; }

/* --- Liste --- */
.liste-base { display: flex; flex-direction: column; }
.ligne-liste { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-bottom: 1px solid var(--bord); cursor: pointer; border-radius: 4px; font-size: 14px; }
.ligne-liste:hover { background: var(--survol); }
.ligne-liste.finie .titre-liste { color: var(--texte-doux); text-decoration: line-through; }
.titre-liste { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.props-liste { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.groupe-liste { margin-bottom: 12px; }
.titre-groupe { display: flex; gap: 8px; align-items: center; padding: 8px 4px 4px; }

/* --- Galerie --- */
.galerie { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.galerie.taille-petite { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.galerie.taille-grande { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.galerie .carte { padding: 0 12px 10px; border: 1px solid var(--bord); box-shadow: none; }
.galerie .carte:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.galerie-couv { margin: 0 -12px 10px; height: 150px; display: grid; place-items: center; overflow: hidden; }
.galerie-couv.sans { background: var(--fond-doux); }
.taille-petite .galerie-couv { height: 110px; } .taille-grande .galerie-couv { height: 200px; }
.galerie-couv img { width: 100%; height: 100%; object-fit: cover; }
.galerie-icone { font-size: 44px; }
.ajout-galerie { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 120px; border: 1px dashed var(--bord-fort) !important; background: none; color: var(--texte-doux); }

/* --- Calendrier --- */
.cal-tete { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.cal-tete h3 { margin: 0; font-size: 18px; text-transform: capitalize; flex: 1; }
.cal-grille { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--bord); border-left: 1px solid var(--bord); }
.cal-jour-nom { padding: 4px 8px; font-size: 12px; color: var(--texte-doux); border-right: 1px solid var(--bord); border-bottom: 1px solid var(--bord); text-align: right; }
.cal-cellule { min-height: 118px; border-right: 1px solid var(--bord); border-bottom: 1px solid var(--bord); padding: 4px; display: flex; flex-direction: column; gap: 3px; }
.cal-cellule.hors-mois { background: var(--fond-doux); }
.cal-cellule.weekend:not(.hors-mois) { background: color-mix(in srgb, var(--fond-doux) 50%, var(--fond)); }
.cal-num { display: flex; justify-content: flex-end; align-items: center; gap: 4px; font-size: 13px; color: var(--texte-doux); }
.cal-cellule.aujourdhui .cal-num span { background: #eb5757; color: #fff; border-radius: 12px; padding: 0 7px; font-weight: 600; }
.cal-ajout { order: -1; margin-right: auto; border: 0; background: none; border-radius: 4px; width: 20px; height: 20px; display: none; place-items: center; cursor: pointer; color: var(--texte-doux); }
.cal-cellule:hover .cal-ajout { display: grid; }
.cal-ajout:hover { background: var(--survol-fort); }
.cal-cartes { display: flex; flex-direction: column; gap: 3px; flex: 1; min-height: 20px; }
.carte.compacte { padding: 3px 7px; font-size: 12px; border-radius: 5px; }
.carte.compacte .etiquettes { margin-bottom: 2px; }
.carte.compacte .etiq { height: 6px; min-width: 24px; padding: 0; font-size: 0; }
.carte.compacte .carte-bas { margin-top: 2px; }
.carte.compacte .carte-titre { padding: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Chronologie --- */
.chronologie { display: grid; grid-template-columns: 240px minmax(0, 1fr); border: 1px solid var(--bord); border-radius: 8px; overflow: hidden; }
.chrono-gauche { border-right: 1px solid var(--bord); background: var(--fond); }
.chrono-coin { height: 48px; border-bottom: 1px solid var(--bord); padding: 14px 10px; font-size: 13px; color: var(--texte-doux); }
.chrono-nom { display: flex; gap: 6px; align-items: center; width: 100%; height: 36px; border: 0; border-bottom: 1px solid var(--bord); background: none; padding: 0 10px; cursor: pointer; text-align: left; font-size: 14px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.chrono-nom:hover { background: var(--survol); }
.chrono-nom.sans { color: var(--texte-doux); }
.chrono-droite { overflow-x: auto; position: relative; }
.chrono-echelle { height: 48px; position: relative; border-bottom: 1px solid var(--bord); }
.chrono-mois { position: absolute; top: 4px; font-size: 12px; font-weight: 600; text-transform: capitalize; padding-left: 4px; white-space: nowrap; }
.chrono-jour { position: absolute; top: 24px; font-size: 11px; color: var(--texte-doux); text-align: center; border-left: 1px solid var(--bord); height: 24px; padding-top: 3px; }
.chrono-jour.weekend { background: var(--fond-doux); }
.chrono-lignes { position: relative; }
.chrono-ligne { height: 36px; border-bottom: 1px solid var(--bord); position: relative; }
.chrono-auj { position: absolute; top: 0; bottom: 0; width: 2px; background: #eb5757; z-index: 1; opacity: .7; }
.chrono-barre { position: absolute; top: 5px; height: 26px; border-radius: 6px; padding: 0 10px; font-size: 13px; line-height: 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: grab; z-index: 2; box-shadow: 0 1px 2px rgba(0, 0, 0, .15); user-select: none; }
.chrono-barre.finie { opacity: .6; }
.chrono-poignee { position: absolute; right: 0; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }

/* --- Fiche ouverte (carte) --- */
.modale-fiche { max-width: 980px; overflow: hidden; }
.modale-fiche .modale-corps { padding: 0 0 20px; }
.fiche-couv { height: 160px; background-size: cover; background-position: center; }
.fiche-tete { display: flex; align-items: flex-start; gap: 10px; padding: 18px 16px 0 22px; }
.fiche-icone { border: 0; background: none; font-size: 26px; line-height: 1; padding: 4px; border-radius: 6px; cursor: pointer; color: var(--texte-doux); margin-top: 2px; }
.fiche-icone:hover { background: var(--survol); }
.fiche-titres { flex: 1; min-width: 0; }
.fiche-titre { width: 100%; border: 0; background: none; resize: none; font-size: 24px; font-weight: 700; line-height: 1.3; outline: none; padding: 2px 4px; border-radius: 4px; overflow: hidden; }
.fiche-titre:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.dans-liste { font-size: 13px; color: var(--texte-doux); padding-left: 4px; }
.dans-liste .lien-bouton { text-decoration: underline; padding: 0 2px; }
.fermer-fiche { flex: none; }
.fiche-etat { padding: 0 26px; }
.fiche-grille { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 24px; padding: 8px 22px 0 26px; }
.fiche-principal section { margin-bottom: 18px; }
.fiche-principal h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 10px 0 6px; color: var(--texte); }
.fiche-description { min-height: 80px; padding-left: 8px; }
.fiche-description .poignee { left: -40px; }
.fiche-cote { display: flex; flex-direction: column; gap: 6px; padding-top: 8px; }
.fiche-cote .menu-titre { padding: 8px 0 2px; }
.action-fiche { display: flex; align-items: center; gap: 8px; border: 0; background: var(--survol); padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; text-align: left; }
.action-fiche:hover { background: var(--survol-fort); }

/* --- Commentaires --- */
.zone-commentaires { display: flex; flex-direction: column; gap: 10px; padding: 6px 0; }
.saisie-com { display: flex; flex-direction: column; gap: 6px; }
.commentaire { background: var(--fond-doux); border-radius: 8px; padding: 8px 12px; font-size: 14px; }
.commentaire.resolu { opacity: .55; }
.com-tete { display: flex; gap: 8px; align-items: center; margin-bottom: 2px; font-size: 13px; }
.com-actions { margin-left: auto; display: none; }
.commentaire:hover .com-actions { display: flex; }
.com-texte { white-space: pre-wrap; word-break: break-word; }
.activite { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--texte-doux); padding: 0 4px; }

/* --- Accueil, corbeille, modèles, versions --- */
.accueil-corps { max-width: 980px; margin: 0 auto; padding: 24px 48px 80px; }
.accueil-corps h1 { font-size: 32px; margin: 12px 0 28px; }
.accueil-corps h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--texte-doux); font-weight: 500; margin: 28px 0 12px; }
.recents { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.recent { position: relative; display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; background: var(--fond-doux); text-decoration: none; height: 130px; border: 0; cursor: pointer; text-align: left; padding: 0; }
.recent:hover { box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
.recent-couv { height: 44px; background-size: cover; background-position: center; background-color: var(--survol-fort); }
.recent-icone { font-size: 26px; margin: -14px 0 0 12px; line-height: 1; }
.recent-titre { padding: 6px 12px 0; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.recent .discret { padding: 2px 12px; font-size: 12px; margin-top: auto; padding-bottom: 8px; }
.recent.nouveau { align-items: center; justify-content: center; color: var(--texte-doux); }
.echeances { display: flex; flex-direction: column; gap: 14px; }
.groupe-echeances h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 13px; }
.groupe-echeances.retard h4 { color: var(--rouge-c); }
.ligne-echeance { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 7px 8px; border-radius: 6px; cursor: pointer; text-align: left; font-size: 14px; border-bottom: 1px solid var(--bord); }
.ligne-echeance:hover { background: var(--survol); }
.date-echeance { font-size: 13px; color: var(--texte-doux); min-width: 90px; text-align: right; }
.groupe-echeances.retard .date-echeance { color: var(--rouge-c); font-weight: 600; }
.grille-modeles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.modele { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left; border: 1px solid var(--bord); background: var(--fond); border-radius: 10px; padding: 14px; cursor: pointer; }
.modele:hover { background: var(--survol); }
.modele-icone { font-size: 26px; }
.modele small { color: var(--texte-doux); font-size: 12px; }
.liste-corbeille { margin-top: 16px; }
.ligne-corbeille { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-bottom: 1px solid var(--bord); }
.ligne-corbeille a { flex: 1; text-decoration: none; font-weight: 500; }
.liste-versions { display: flex; flex-direction: column; }
.version { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--bord); }

/* --- Petits écrans --- */
@media (max-width: 760px) {
  body { grid-template-columns: 0 1fr; }
  body:not(.sans-barre) #barre { position: fixed; z-index: 700; top: 0; bottom: 0; left: 0; width: min(86vw, 300px); visibility: visible; box-shadow: var(--ombre); }
  .montrer-barre { display: inline-grid !important; }
  .page-corps, .page-vide, .page-simple { padding: 0 18px; }
  .page-base .page-corps { padding: 0 12px; }
  .accueil-corps { padding: 16px 18px 60px; }
  .titre-page { font-size: 30px; }
  .tete-page { padding-top: 28px; }
  .poignee { display: none; }
  .fiche-grille { grid-template-columns: 1fr; padding: 8px 16px 0; }
  .nom-propriete { width: 120px; }
  .colonne { width: 82vw !important; max-height: none; }
  .chronologie { grid-template-columns: 130px minmax(0, 1fr); }
  .modifie { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* --- Vitrine publique et connexion --- */
body.public, body:has(#public) { display: block; overflow: auto; }
body:has(#public) #barre, body:has(#public) #poignee-barre, body:has(#public) #contenu { display: none; }
.vitrine { min-height: 100vh; display: flex; flex-direction: column; }
.vitrine-tete { display: flex; align-items: center; gap: 10px; padding: 16px 32px; position: sticky; top: 0; background: color-mix(in srgb, var(--fond) 92%, transparent); backdrop-filter: blur(6px); z-index: 5; }
.vitrine-tete .espaceur { flex: 1; }
.vitrine-tete .bouton { text-decoration: none; }
.vitrine-haut { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, 420px); gap: 56px; align-items: center; max-width: 1120px; margin: 0 auto; padding: 56px 32px 40px; width: 100%; }
.vitrine-texte h1 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.1; margin: 0 0 18px; letter-spacing: -.5px; }
.vitrine-sous { font-size: 19px; color: var(--texte-doux); margin: 0 0 22px; max-width: 34em; }
.vitrine-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; font-weight: 500; }
.vitrine-points .ic { color: var(--succes); }
.auth-carte { background: var(--panneau); border: 1px solid var(--bord); border-radius: 14px; padding: 26px; box-shadow: 0 10px 30px rgba(0, 0, 0, .08); }
.auth-carte h2 { margin: 0 0 16px; font-size: 20px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--texte-doux); }
.auth-erreur { margin: 0; color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); border-radius: 6px; padding: 7px 10px; font-size: 14px; }
.auth-liens { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.auth-liens a, .auth-carte a { color: var(--accent); text-decoration: none; }
.bouton.large { justify-content: center; padding: 9px 12px; font-size: 15px; }
.vitrine-fonctions { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; max-width: 1120px; margin: 0 auto; padding: 24px 32px 56px; width: 100%; }
.fonction { background: var(--fond-doux); border-radius: 14px; padding: 22px; }
.fonction-icone { font-size: 30px; }
.fonction h3 { margin: 10px 0 6px; font-size: 16px; }
.fonction p { margin: 0; color: var(--texte-doux); font-size: 14px; }
.vitrine-pied { margin-top: auto; display: flex; gap: 18px; justify-content: center; padding: 20px; color: var(--texte-doux); font-size: 13px; border-top: 1px solid var(--bord); }
.vitrine-pied a { color: inherit; }
.nom-espace { flex: 1; display: flex; align-items: center; gap: 6px; border: 0; background: none; padding: 2px 6px; border-radius: 6px; cursor: pointer; font-weight: 600; text-align: left; min-width: 0; }
.nom-espace span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nom-espace:hover { background: var(--survol); }
.nom-espace .ic { transform: rotate(90deg); color: var(--texte-pale); }
@media (max-width: 860px) { .vitrine-haut { grid-template-columns: 1fr; gap: 28px; padding-top: 28px; } .vitrine-tete { padding: 12px 16px; } }
