/* Lot 3 : le « + » (Capturer) et le bouton Notes. Maquette validée : maquettes/app-plus-notes-2410/ (d72e3d49).
   Jetons du socle seulement (app.css : --esp-*, --r-*, --cible, zones sûres). Les deux rayons propres au lot en sont tirés,
   selon la règle des formes concentriques d'Apple (rayon intérieur = rayon extérieur moins la marge) :
   carte posée à 12 du bord d'un écran au coin d'environ 52 → 40 ; champ posé à 16 dans la carte → 24.
   Préfixes : cap- (Capturer), nt- (notes). Interface avec la barre du lot 1 : voir la fin du fichier. */
:root {
  --pn-r-carte: calc(var(--r-6) + var(--esp-3));
  --pn-r-champ: calc(var(--pn-r-carte) - var(--esp-4));
  --pn-capsule: 76px; /* hauteur de la capsule du lot 1 (app.css : --barre-h = 76 + --capsule-bas) */
  --pn-entree: 340ms;
  --pn-sortie: 220ms;
}

/* ---------- Commun ---------- */
/* Dans un espace client : fonds doux neutres, comme :root.dans-espace du socle (app.css). */
.pn-teinte { --voile: #EEEBE4; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pn-teinte { --voile: #2E2537; } }
:root[data-theme="dark"] .pn-teinte { --voile: #2E2537; }
.cap-voile, .nt-voile { position: fixed; inset: 0; background: rgba(36, 21, 43, .42); opacity: 0; transition: opacity var(--duree) var(--ease-out); }
.cap-voile.visible, .nt-voile.visible { opacity: 1; }
.cap-carte, .nt-plein, .nt-volet { overscroll-behavior: contain; }
.cap-carte :is(input, textarea, select), .nt-plein :is(input, textarea, select), .nt-volet input { font-size: max(16px, 1em); } /* pas de zoom d'iOS */
.pn-btn-texte { display: inline-flex; align-items: center; gap: var(--esp-1); min-height: var(--cible); padding: 0 var(--esp-2); border-radius: var(--r-4); color: var(--accent-texte); font-weight: 600; font-size: 15px; transition: transform 160ms var(--ease-out); }
.pn-btn-texte:active, .cap-ajout:active, .nt-outils button:active, .nt-arbo:active, .nt-ok:active, .pn-puce:active { transform: scale(.96); }
.pn-puce { display: inline-flex; align-items: center; justify-content: center; gap: var(--esp-2); min-height: var(--cible); padding: 0 var(--esp-4); border-radius: var(--r-rond); background: transparent; box-shadow: inset 0 0 0 1px var(--ligne); font-size: 14px; font-weight: 500; color: var(--texte); transition: transform 160ms var(--ease-out), background var(--duree) ease; }
.pn-puce[aria-pressed="true"] { background: var(--accent-voile); color: var(--accent-texte); box-shadow: none; font-weight: 600; }
.pn-pastille { width: 10px; height: 10px; border-radius: var(--r-rond); flex: none; background: var(--c, var(--accent)); }
.pn-statut { font-size: 13px; color: var(--texte-doux); min-height: 1.2em; }
.pn-erreur { color: var(--erreur); font-size: 14px; }

/* ---------- Capturer, variante A (par défaut, R56) : la carte sort de la capsule ---------- */
.cap-voile { z-index: 40; }
.cap-carte { position: fixed; z-index: 41; left: max(calc(var(--esp-3) + var(--gauche-sur)), calc(50% - 15rem)); right: max(calc(var(--esp-3) + var(--droite-sur)), calc(50% - 15rem)); bottom: var(--capsule-bas);
  max-height: calc(100dvh - var(--capsule-bas) - var(--haut-sur) - var(--esp-3)); overflow-y: auto;
  border-radius: var(--pn-r-carte); background: var(--carte); padding: var(--esp-6) var(--esp-4) calc(var(--pn-capsule) + var(--esp-4));
  box-shadow: 0 22px 50px -20px rgba(36, 21, 43, .55), 0 0 0 1px var(--ligne);
  transform-origin: 50% calc(100% - var(--pn-capsule) / 2);
  transition: transform var(--pn-entree) var(--ease-drawer), opacity 120ms linear; }
.cap-carte.entre, .cap-carte.sort { transform: scale(.2); opacity: 0; }
.cap-carte.sort { transition: transform var(--pn-sortie) var(--ease-out), opacity 140ms linear 60ms; pointer-events: none; }
.cap-carte.sans-barre { padding-bottom: calc(var(--esp-5) + var(--bas-sur)); bottom: var(--esp-3); transform-origin: 50% 100%; }
.cap-tirette { position: absolute; top: var(--esp-2); left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: var(--r-rond); background: color-mix(in srgb, var(--texte) 22%, transparent); }
.cap-tete { display: flex; align-items: center; gap: var(--esp-3); flex-wrap: wrap; }
.cap-tete h2 { margin: 0; font-size: 20px; font-weight: 600; }
.cap-tete .cap-fermer { margin-left: auto; }
.cap-fermer { width: var(--cible); height: var(--cible); border-radius: var(--r-rond); background: var(--voile); display: grid; place-items: center; flex: none; }
.cap-fermer .ic { width: 18px; height: 18px; }
.cap-espace { display: inline-flex; align-items: center; gap: var(--esp-2); height: var(--cible); padding: 0 var(--esp-3); border-radius: var(--r-rond); background: var(--fond); box-shadow: inset 0 0 0 1px var(--ligne); font-size: 16px; font-weight: 600; max-width: 100%; }
.cap-espace > span:not(.pn-pastille) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cap-espace .ic { width: 16px; height: 16px; color: var(--texte-doux); transition: transform var(--duree) var(--ease-out); }
.cap-espace[aria-expanded="true"] .ic { transform: rotate(180deg); }
.cap-choix { display: grid; gap: var(--esp-1); margin-top: var(--esp-3); padding: var(--esp-2); border-radius: var(--pn-r-champ); background: var(--fond); box-shadow: inset 0 0 0 1px var(--ligne); }
.cap-choix button { display: flex; align-items: center; gap: var(--esp-3); min-height: var(--cible); padding: 0 var(--esp-3); border-radius: var(--r-5); font-weight: 600; text-align: left; }
.cap-choix button[aria-current="true"] { background: var(--accent-voile); color: var(--accent-texte); }
.cap-grille { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--esp-2) var(--esp-1); margin-top: var(--esp-4); }
.cap-ajout { display: flex; flex-direction: column; align-items: center; gap: var(--esp-2); padding: var(--esp-2) 0; min-height: var(--cible); font-size: 13.5px; font-weight: 500; line-height: 1.2; text-align: center; overflow-wrap: anywhere; transition: transform 160ms var(--ease-out); }
.cap-rond { width: 54px; height: 54px; border-radius: var(--r-5); display: grid; place-items: center; background: var(--voile); color: var(--accent-texte); }
.cap-ajout.frequent .cap-rond { background: var(--accent); color: var(--accent-contraste); }
.cap-squelette .cap-rond { background: var(--squelette); }
.cap-modifier { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--esp-2); margin-top: var(--esp-1); }
.cap-modifier .cap-voir { margin-right: auto; }
.cap-phrase { margin-top: var(--esp-4); border-radius: var(--pn-r-champ); background: var(--fond); box-shadow: inset 0 0 0 1px var(--ligne); padding: var(--esp-1) var(--esp-2) var(--esp-2) var(--esp-4); transition: box-shadow var(--duree) ease; }
.cap-phrase:focus-within { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent); }
.cap-phrase textarea { display: block; width: 100%; border: 0; background: transparent; color: var(--texte); font: inherit; line-height: 1.4; resize: none; outline: none; min-height: var(--cible); padding: var(--esp-2) 0 0; }
.cap-phrase textarea::placeholder { color: var(--texte-doux); }
.cap-outils { display: flex; align-items: center; gap: var(--esp-1); margin-top: var(--esp-2); }
.cap-outils button { width: var(--cible); height: var(--cible); border-radius: var(--r-rond); display: grid; place-items: center; color: var(--texte-doux); }
.cap-outils .cap-micro { margin-left: auto; background: var(--accent-voile); color: var(--accent-texte); }
.cap-outils .cap-suite { margin-left: auto; width: auto; padding: 0 var(--esp-4); background: var(--accent); color: var(--accent-contraste); font-weight: 600; }
.cap-compris { display: flex; flex-wrap: wrap; align-items: center; gap: var(--esp-1) var(--esp-2); margin: var(--esp-2) var(--esp-1) 0; font-size: 13.5px; color: var(--texte-doux); }
.cap-compris b { display: inline-flex; align-items: center; gap: var(--esp-1); padding: 2px var(--esp-2); border-radius: var(--r-3); background: var(--accent-voile); color: var(--accent-texte); font-weight: 600; }
.cap-aide { margin: var(--esp-2) var(--esp-1) 0; font-size: 14px; line-height: 1.4; color: var(--texte-doux); }
.cap-pieces { display: flex; flex-wrap: wrap; gap: var(--esp-1); }
.cap-piece { display: inline-flex; align-items: center; gap: var(--esp-1); max-width: 100%; padding: 2px var(--esp-2); border-radius: var(--r-3); background: var(--voile); font-size: 13px; }
.cap-piece span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Formulaire d'un ajout, dans la même carte */
.cap-form { display: grid; gap: var(--esp-3); margin-top: var(--esp-3); }
.cap-form-tete { display: flex; align-items: center; gap: var(--esp-3); margin-top: var(--esp-4); }
.cap-form-tete .cap-rond { width: var(--cible); height: var(--cible); border-radius: var(--r-4); }
.cap-form-tete h3 { margin: 0; font-size: 18px; font-weight: 600; flex: 1; }
.cap-champ { display: grid; gap: var(--esp-1); }
.cap-champ > label, .cap-champ > .cap-etiquette { font-size: 14px; font-weight: 600; color: var(--texte-doux); }
.cap-champ :is(input, textarea, select) { width: 100%; min-height: var(--cible); padding: var(--esp-2) var(--esp-3); border: 0; border-radius: var(--r-4); background: var(--fond); color: var(--texte); box-shadow: inset 0 0 0 1px var(--ligne); font: inherit; }
.cap-champ textarea { min-height: calc(var(--cible) * 2); resize: vertical; }
.cap-champ :is(input, textarea, select):focus { outline: none; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 60%, transparent); }
.cap-segments { display: flex; flex-wrap: wrap; gap: var(--esp-2); }
.cap-actions { display: flex; flex-wrap: wrap; gap: var(--esp-2); align-items: center; justify-content: space-between; }
.cap-actions .pn-principal { flex: 1 1 auto; }
.pn-principal { display: inline-flex; align-items: center; justify-content: center; gap: var(--esp-2); min-height: var(--cible-confort); padding: 0 var(--esp-5); border-radius: var(--r-rond); background: var(--accent); color: var(--accent-contraste); font-weight: 600; transition: transform 160ms var(--ease-out); }
.pn-principal:active:not(:disabled) { transform: scale(.97); }
.pn-principal.occupe { position: relative; color: transparent; }
.pn-principal.occupe::after { content: ""; position: absolute; width: 20px; height: 20px; background: var(--accent-contraste); -webkit-mask: url("../img/logo-violet.png") center / contain no-repeat; mask: url("../img/logo-violet.png") center / contain no-repeat; animation: tourne 1000ms cubic-bezier(.65, 0, .35, 1) infinite; }
.pn-second { display: inline-flex; align-items: center; justify-content: center; gap: var(--esp-2); min-height: var(--cible); padding: 0 var(--esp-4); border-radius: var(--r-rond); background: var(--accent-voile); color: var(--accent-texte); font-weight: 600; }
.cap-photo-apercu { max-width: 100%; max-height: 160px; border-radius: var(--r-4); }
/* Note vocale (R26) */
.cap-vocal { display: grid; gap: var(--esp-3); margin-top: var(--esp-4); }
.cap-enreg { display: flex; align-items: center; gap: var(--esp-3); padding: var(--esp-3) var(--esp-4); border-radius: var(--pn-r-champ); background: var(--accent-voile); color: var(--accent-texte); font-weight: 600; font-variant-numeric: tabular-nums; }
.cap-enreg .cap-point { width: 10px; height: 10px; border-radius: var(--r-rond); background: var(--erreur); animation: pn-pulse 1.2s ease-in-out infinite; }
@keyframes pn-pulse { 50% { opacity: .35; } }
.cap-choses { display: grid; gap: var(--esp-2); }
.cap-chose { display: grid; grid-template-columns: var(--cible) minmax(0, 1fr); align-items: start; gap: var(--esp-1) var(--esp-2); padding: var(--esp-2); border-radius: var(--r-5); background: var(--fond); box-shadow: inset 0 0 0 1px var(--ligne); }
.cap-chose > label { min-height: var(--cible); display: grid; place-items: center; }
.cap-chose input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--accent); }
.cap-chose-corps { display: grid; gap: var(--esp-1); min-width: 0; padding-top: var(--esp-2); }
.cap-chose-corps b { font-weight: 600; overflow-wrap: anywhere; }
.cap-chose-corps small { color: var(--texte-doux); font-size: 13px; }
.cap-chose select { min-height: var(--cible); border: 0; border-radius: var(--r-rond); padding: 0 var(--esp-3); background: var(--accent-voile); color: var(--accent-texte); font: inherit; font-weight: 600; max-width: 100%; }

/* ---------- Capturer, variante B (réglage) : la phrase d'abord, clavier ouvert ---------- */
.cap-carte.b { left: max(var(--gauche-sur), calc(50% - 15rem)); right: max(var(--droite-sur), calc(50% - 15rem)); bottom: 0; border-radius: var(--r-6) var(--r-6) 0 0; padding: var(--esp-6) var(--esp-4) calc(var(--esp-3) + var(--bas-sur)); transform-origin: 50% 100%; }
.cap-carte.b.entre, .cap-carte.b.sort { transform: translateY(100%); opacity: 1; }
.cap-carte.b .cap-tete h2 { font-size: 17px; }
.cap-rang { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) 54px; gap: var(--esp-1); margin-top: var(--esp-3); }
.cap-rang .cap-ajout { min-height: 60px; justify-content: center; gap: var(--esp-1); padding: var(--esp-2) 1px; border-radius: var(--r-5); background: var(--fond); box-shadow: inset 0 0 0 1px var(--ligne); font-size: 11.5px; font-weight: 600; }
.cap-rang .cap-ajout.frequent { background: var(--accent); color: var(--accent-contraste); box-shadow: none; }
.cap-rang .cap-ajout .ic { width: 21px; height: 21px; }
.cap-rang .cap-tout { color: var(--accent-texte); }
.cap-carte.b .cap-phrase { margin-top: var(--esp-3); }

/* ---------- Réglage « Le + s'ouvre sur » ---------- */
.pn-reglage { background: var(--carte); border-radius: var(--r-5); box-shadow: 0 0 0 1px var(--ligne); padding: 0 var(--esp-4); }
.pn-reglage button { display: flex; align-items: center; gap: var(--esp-3); width: 100%; min-height: 60px; padding: var(--esp-3) 0; border-bottom: 1px solid var(--ligne); text-align: left; }
.pn-reglage button:last-child { border-bottom: 0; }
.pn-reglage b { display: block; font-size: 16px; font-weight: 600; }
.pn-reglage small { display: block; font-size: 13px; line-height: 1.35; color: var(--texte-doux); margin-top: 2px; }
.pn-reglage .ic { color: var(--accent-texte); flex: none; }
.pn-reglage .pn-vide { width: 24px; flex: none; }

/* ---------- Le bouton Notes (R18, R58) : flottant, en verre léger, juste son icône ---------- */
.nt-bouton { width: var(--cible-confort); height: var(--cible-confort); border-radius: var(--r-rond); display: grid; place-items: center; color: var(--accent-texte);
  background: color-mix(in srgb, var(--carte) 60%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%);
  box-shadow: 0 12px 28px -14px rgba(36, 21, 43, .5), inset 0 0 0 1px color-mix(in srgb, var(--texte) 10%, transparent), inset 0 1px 0 rgba(255, 255, 255, .6);
  transition: opacity 120ms var(--ease-out), transform 160ms var(--ease-out); }
.nt-bouton:active { transform: scale(.94); }
.nt-bouton .ic { width: 25px; height: 25px; }
.nt-bouton.flottant { position: fixed; z-index: 46; right: calc(var(--esp-5) + var(--droite-sur)); bottom: calc(var(--capsule-bas) + 60px + var(--esp-6) + var(--esp-2)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nt-bouton { box-shadow: 0 12px 28px -14px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(255, 255, 255, .12), inset 0 1px 0 rgba(255, 255, 255, .12); } }
:root[data-theme="dark"] .nt-bouton { box-shadow: 0 12px 28px -14px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(255, 255, 255, .12), inset 0 1px 0 rgba(255, 255, 255, .12); }
@media (prefers-reduced-transparency: reduce) { .nt-bouton { background: var(--carte); -webkit-backdrop-filter: none; backdrop-filter: none; } }
:root[data-capturer] .nt-bouton { opacity: 0; transform: scale(.9); pointer-events: none; }

/* ---------- La note en plein écran ---------- */
.nt-plein { position: fixed; inset: 0; z-index: 45; background: var(--fond); display: flex; flex-direction: column; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: var(--haut-sur) var(--droite-sur) 0 var(--gauche-sur); transform-origin: var(--origine, calc(100% - 46px) calc(100% - 136px));
  transition: transform 320ms var(--ease-drawer), opacity 100ms linear; touch-action: pan-y; }
.nt-plein.entre { transform: scale(.12); opacity: 0; }
.nt-plein.sort { transform: scale(.12); opacity: 0; transition: transform var(--pn-sortie) var(--ease-out), opacity 140ms linear 60ms; pointer-events: none; }
.nt-plein.suit { transition: none; }
.nt-entete { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: var(--esp-1); min-height: calc(var(--cible) + var(--esp-4)); padding: var(--esp-2) var(--esp-3) var(--esp-2) var(--esp-2); background: var(--fond); touch-action: none; }
.nt-entete .nt-retour { width: var(--cible); height: var(--cible); border-radius: var(--r-rond); display: grid; place-items: center; }
.nt-entete .nt-vide { flex: 1; }
.nt-prive { display: inline-flex; align-items: center; gap: var(--esp-1); min-height: var(--cible); padding: 0 var(--esp-3); border-radius: var(--r-rond); color: var(--texte-doux); font-size: 13px; font-weight: 600; }
.nt-prive > span { display: inline-flex; align-items: center; gap: var(--esp-1); height: 30px; padding: 0 var(--esp-3); border-radius: var(--r-rond); background: var(--voile); }
.nt-arbo { display: inline-flex; align-items: center; gap: var(--esp-2); height: var(--cible); padding: 0 var(--esp-4); border-radius: var(--r-rond); background: var(--accent-voile); color: var(--accent-texte); font-size: 14px; font-weight: 600; flex: none; transition: transform 160ms var(--ease-out); }
.nt-arbo .ic { width: 18px; height: 18px; }
.nt-ok { min-width: var(--cible-confort); height: var(--cible); padding: 0 var(--esp-2); font-size: 17px; font-weight: 600; color: var(--accent-texte); flex: none; transition: transform 160ms var(--ease-out); }
.nt-corps { width: 100%; max-width: 46rem; margin: 0 auto; padding: var(--esp-1) var(--esp-5) calc(var(--pn-capsule) + var(--cible-confort) + var(--esp-12) + var(--bas-sur)); flex: 1 0 auto; }
.nt-date { font-size: 13px; color: var(--texte-doux); margin-top: var(--esp-1); }
.nt-reprendre { display: inline-flex; align-items: center; gap: var(--esp-2); min-height: var(--cible); max-width: 100%; margin-top: var(--esp-3); padding: 0 var(--esp-4); border-radius: var(--r-rond); box-shadow: inset 0 0 0 1px var(--ligne); color: var(--accent-texte); font-size: 14px; font-weight: 600; }
.nt-reprendre span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-reprendre small { font-size: 12.5px; font-weight: 500; color: var(--texte-doux); white-space: nowrap; }
.nt-reprendre .ic { width: 16px; height: 16px; flex: none; }
.nt-titre { display: block; width: 100%; margin-top: var(--esp-4); padding: 0; border: 0; background: transparent; color: var(--texte); resize: none; outline: none; overflow: hidden;
  font-family: "Gilda Display", serif; font-weight: 400; font-size: 30px !important; line-height: 1.2; }
.nt-titre::placeholder { color: var(--texte-doux); opacity: .8; }
/* Le corps : une zone de saisie transparente posée sur son miroir, qui colore les liens _texte_ (aucun HTML venu de la note) */
.nt-texte { position: relative; margin-top: var(--esp-3); font-size: 17px; line-height: 1.55; }
.nt-miroir, .nt-saisie { font: inherit; font-size: 17px !important; line-height: 1.55; letter-spacing: normal; white-space: pre-wrap; overflow-wrap: break-word; word-break: normal; padding: 0; margin: 0; border: 0; tab-size: 4; }
.nt-miroir { color: var(--texte); min-height: 8em; pointer-events: none; }
.nt-saisie { position: absolute; inset: 0; width: 100%; height: 100%; resize: none; overflow: hidden; background: transparent; color: transparent; caret-color: var(--texte); outline: none; -webkit-appearance: none; appearance: none; border-radius: 0; }
.nt-saisie::placeholder { color: var(--texte-doux); }
.nt-saisie::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); color: transparent; }
.nt-lien { border-radius: var(--r-3); background: var(--accent-voile); color: var(--accent-texte); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.nt-lien.cree { background: color-mix(in srgb, var(--ok) 12%, var(--fond)); color: var(--ok); }
.nt-lien.inconnu { background: transparent; color: var(--accent-texte); text-decoration: underline dotted; text-underline-offset: .2em; }
.nt-tiret { color: transparent; }
.nt-cartes { display: grid; gap: var(--esp-2); margin-top: var(--esp-3); }
.nt-cartes:empty { display: none; }
.nt-carte { display: flex; flex-wrap: wrap; align-items: center; gap: var(--esp-2) var(--esp-3); padding: var(--esp-2) var(--esp-2) var(--esp-2) var(--esp-3); border-radius: var(--r-5); font-size: 14px; line-height: 1.35; background: var(--carte); box-shadow: inset 0 0 0 1px var(--ligne); }
.nt-carte > .ic { flex: none; color: var(--accent-texte); }
.nt-carte .nt-carte-corps { flex: 1 1 10rem; min-width: 0; color: var(--texte-doux); }
.nt-carte.empile .nt-carte-corps { flex-basis: calc(100% - var(--esp-8)); }
.nt-carte .conflit { grid-template-columns: 1fr 1fr; gap: var(--esp-2); margin-top: var(--esp-2); }
.nt-carte .conflit pre { font-size: 14px; }
.nt-carte b { display: block; color: var(--texte); font-weight: 600; }
.nt-carte .nt-carte-actions { display: flex; flex-wrap: wrap; flex: 1 0 auto; gap: var(--esp-1); justify-content: flex-end; }
.nt-carte.empile > .ic { display: none; }
.nt-carte.empile .nt-carte-corps, .nt-carte.empile .nt-carte-actions { flex: 1 1 100%; min-width: 0; }
.nt-carte.empile .nt-carte-actions .nt-mini { flex: 1 1 auto; justify-content: center; }
.nt-carte.cree { background: color-mix(in srgb, var(--ok) 10%, var(--carte)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 22%, transparent); }
.nt-carte.cree > .ic { color: var(--ok); }
.nt-carte.empile { flex-wrap: wrap; }
.nt-mini { display: inline-flex; align-items: center; min-height: var(--cible); padding: 0 var(--esp-4); border-radius: var(--r-4); background: var(--voile); color: var(--accent-texte); font-size: 14px; font-weight: 600; }
.nt-mini.plein { background: var(--accent); color: var(--accent-contraste); }
.nt-conflit-col { padding: var(--esp-3); border-radius: var(--r-4); background: var(--fond); box-shadow: inset 0 0 0 1px var(--ligne); }
.nt-conflit-col h4 { margin: 0 0 var(--esp-1); font-size: 13px; font-weight: 600; color: var(--texte-doux); }
.nt-conflit-col pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 15px; color: var(--texte); }
.nt-conflit-col .diff { background: var(--or-voile); color: var(--or-texte); border-radius: var(--r-2); }
/* Propositions du premier « _ » (C7) */
.nt-propositions { margin-top: var(--esp-3); padding: var(--esp-2); border-radius: var(--r-5); background: var(--carte); box-shadow: 0 14px 34px -18px rgba(36, 21, 43, .4), 0 0 0 1px var(--ligne); }
.nt-propositions [role="option"] { display: flex; align-items: center; gap: var(--esp-3); min-height: var(--cible); padding: var(--esp-2) var(--esp-3); border-radius: var(--r-4); font-size: 16px; }
.nt-propositions [role="option"][aria-selected="true"] { background: var(--accent-voile); }
.nt-propositions [role="option"] span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.nt-propositions small { color: var(--texte-doux); font-size: 13px; }
.nt-propositions .ic { width: 18px; height: 18px; color: var(--texte-doux); flex: none; }
/* Liens vivants (R140) : la bulle d'un lien, et le pied « Notes qui mènent ici » */
.nt-bulle { position: fixed; z-index: 4; display: flex; align-items: center; gap: var(--esp-3); width: max-content; max-width: min(22rem, calc(100% - var(--esp-6))); padding: var(--esp-2) var(--esp-2) var(--esp-2) var(--esp-4);
  border-radius: var(--r-5); background: var(--carte); box-shadow: 0 14px 34px -18px rgba(36, 21, 43, .4), 0 0 0 1px var(--ligne); transform-origin: var(--o, 0 0); animation: nt-bulle-entre 140ms var(--ease-out) both; }
@keyframes nt-bulle-entre { from { opacity: 0; transform: scale(.96); } }
.nt-bulle-texte { flex: 1; min-width: 0; line-height: 1.3; }
.nt-bulle-texte b { display: block; font-size: 15px; font-weight: 600; color: var(--texte); overflow-wrap: anywhere; }
.nt-bulle-texte span { font-size: 13px; color: var(--texte-doux); }
.nt-bulle .nt-mini { flex: none; justify-content: center; }
.nt-menent { margin-top: var(--esp-8); padding-top: var(--esp-3); border-top: 1px solid var(--ligne); }
.nt-menent[hidden] { display: none; }
.nt-menent h2 { display: flex; align-items: baseline; gap: var(--esp-2); margin: 0 0 var(--esp-1); font: inherit; font-size: 14px; font-weight: 600; color: var(--texte-doux); }
.nt-menent h2 small { font-size: 13px; font-weight: 500; opacity: .8; }
.nt-menent ul { list-style: none; margin: 0; padding: 0; }
.nt-menent button { display: flex; align-items: center; gap: var(--esp-3); width: calc(100% + var(--esp-4)); min-height: var(--cible); margin-inline: calc(var(--esp-2) * -1); padding: var(--esp-1) var(--esp-2); border-radius: var(--r-4);
  color: var(--texte); font-size: 16px; text-align: left; transition: background-color 120ms var(--ease-out), transform 160ms var(--ease-out); }
.nt-menent button:active { background: var(--accent-voile); transform: scale(.985); }
.nt-menent button > .ic:first-child { color: var(--accent-texte); flex: none; }
.nt-menent button span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-menent button .chevron { color: var(--texte-doux); opacity: .7; flex: none; }
@media (hover: hover) and (pointer: fine) { .nt-menent button:hover { background: color-mix(in srgb, var(--accent-voile) 60%, transparent); } }
@media (prefers-reduced-motion: reduce) { .nt-bulle { animation: none; } .nt-menent button { transition: none; } }
/* Outils de la note : une capsule au pouce, comme la barre */
.nt-outils { position: fixed; z-index: 46; left: calc(var(--esp-3) + var(--gauche-sur)); right: calc(var(--esp-3) + var(--droite-sur)); bottom: var(--capsule-bas); height: 60px; border-radius: var(--r-rond);
  max-width: 46rem; margin: 0 auto; background: var(--carte); display: flex; align-items: center; justify-content: space-around; padding: 0 var(--esp-2);
  box-shadow: 0 14px 34px -16px rgba(36, 21, 43, .45), 0 0 0 1px var(--ligne); }
.nt-outils button { width: var(--cible); height: var(--cible); border-radius: var(--r-rond); display: grid; place-items: center; color: var(--texte-doux); transition: transform 160ms var(--ease-out); }
.nt-outils button[aria-pressed="true"] { background: var(--accent-voile); color: var(--accent-texte); }
.nt-plein .nt-bouton { position: fixed; z-index: 47; right: calc(var(--esp-5) + var(--droite-sur)); bottom: calc(var(--capsule-bas) + 60px + var(--esp-6) + var(--esp-2)); }
/* Une liste et son tri (C22, R59) */
.nt-l-tete { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--esp-3); }
.nt-l-tete .nt-titre { flex: 1; }
.nt-trier { display: inline-flex; align-items: center; gap: var(--esp-2); height: var(--cible); padding: 0 var(--esp-4); border-radius: var(--r-rond); background: var(--accent-voile); color: var(--accent-texte); font-size: 14px; font-weight: 600; flex: none; }
.nt-tri { display: grid; grid-template-columns: 1fr 1fr; gap: var(--esp-2); margin-top: var(--esp-3); }
.nt-coches { display: flex; align-items: center; gap: var(--esp-3); min-height: 52px; padding: var(--esp-2) 0; border-bottom: 1px solid var(--ligne); }
.nt-coches > div { flex: 1; }
.nt-coches b { display: block; font-weight: 600; }
.nt-coches small { color: var(--texte-doux); font-size: 14px; }
.pn-interrupteur { position: relative; flex: none; width: 51px; height: var(--cible); background: none; }
.pn-interrupteur::before { content: ""; position: absolute; left: 0; right: 0; top: calc(50% - 15.5px); height: 31px; border-radius: var(--r-rond); background: color-mix(in srgb, var(--texte) 18%, transparent); transition: background var(--duree) var(--ease-out); }
.pn-interrupteur::after { content: ""; position: absolute; top: calc(50% - 13.5px); left: 2px; width: 27px; height: 27px; border-radius: var(--r-rond); background: #fff; box-shadow: 0 2px 6px rgba(36, 21, 43, .25); transition: transform var(--duree) var(--ease-out); }
.pn-interrupteur[aria-checked="true"]::before { background: var(--accent); }
.pn-interrupteur[aria-checked="true"]::after { transform: translateX(20px); }
.nt-cat { font-size: 13px; font-weight: 600; color: var(--texte-doux); margin: var(--esp-4) 0 0; }
.nt-el { display: flex; align-items: center; gap: var(--esp-3); min-height: 48px; border-bottom: 1px solid var(--ligne); font-size: 17px; width: 100%; text-align: left; }
.nt-case { width: 24px; height: 24px; border-radius: var(--r-3); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--texte) 30%, transparent); display: grid; place-items: center; flex: none; color: var(--accent-contraste); transition: background 160ms var(--ease-out); }
.nt-case .ic { width: 16px; height: 16px; stroke-width: 2.4; opacity: 0; }
.nt-el[aria-checked="true"] .nt-case { background: var(--accent); box-shadow: none; }
.nt-el[aria-checked="true"] .nt-case .ic { opacity: 1; }
.nt-el[aria-checked="true"] .nt-el-texte { color: var(--texte-doux); text-decoration: line-through; text-decoration-thickness: 1px; }
.nt-ajouter { display: flex; align-items: center; gap: var(--esp-3); min-height: 48px; border-bottom: 1px solid var(--ligne); }
.nt-ajouter input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--texte); font: inherit; outline: none; min-height: var(--cible); }
.nt-ajouter .ic { color: var(--texte-doux); }

/* ---------- Le volet « Mes notes » : dossiers et anciennes notes, à droite (R59) ---------- */
.nt-voile { z-index: 47; }
.nt-volet { position: fixed; z-index: 48; top: 0; bottom: 0; right: 0; width: min(88%, 352px); background: var(--carte); border-radius: var(--r-6) 0 0 var(--r-6);
  box-shadow: -16px 0 40px -18px rgba(36, 21, 43, .45); padding: calc(var(--haut-sur) + var(--esp-10)) var(--esp-4) calc(var(--esp-6) + var(--bas-sur)); overflow-y: auto;
  transition: transform 280ms var(--ease-drawer); touch-action: pan-y; }
.nt-volet.entre, .nt-volet.sort { transform: translateX(105%); }
.nt-volet.sort { transition: transform 200ms var(--ease-out); }
.nt-volet-tete { display: flex; align-items: center; gap: var(--esp-1); margin: 0 calc(-1 * var(--esp-2)) var(--esp-1) var(--esp-1); }
.nt-volet-tete h2 { flex: 1; margin: 0; font-family: "Gilda Display", serif; font-weight: 400; font-size: 26px; }
.nt-volet-tete button { width: var(--cible); height: var(--cible); border-radius: var(--r-rond); display: grid; place-items: center; }
.nt-chercher { display: flex; align-items: center; gap: var(--esp-2); margin-top: var(--esp-2); padding: 0 var(--esp-3); border-radius: var(--r-4); background: var(--fond); box-shadow: inset 0 0 0 1px var(--ligne); }
.nt-chercher .ic { color: var(--texte-doux); }
.nt-chercher input { flex: 1; min-width: 0; min-height: var(--cible-confort); border: 0; background: transparent; color: var(--texte); font: inherit; outline: none; }
.nt-filtre { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; margin-top: var(--esp-3); border-radius: var(--r-5); background: var(--voile); }
.nt-filtre button { text-align: center; min-height: var(--cible); border-radius: calc(var(--r-5) - 3px); font-size: 14px; font-weight: 600; color: var(--texte-doux); padding: 0 var(--esp-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-filtre button[aria-pressed="true"] { background: var(--carte); color: var(--texte); box-shadow: 0 1px 4px rgba(36, 21, 43, .14); }
.nt-v-espace { display: flex; align-items: center; gap: var(--esp-2); font-size: 13px; font-weight: 600; color: var(--texte-doux); margin: var(--esp-4) var(--esp-2) 0; }
.nt-v-titre { display: flex; justify-content: space-between; align-items: center; gap: var(--esp-2); font-size: 13px; font-weight: 600; color: var(--texte-doux); margin: var(--esp-5) var(--esp-2) var(--esp-1); }
.nt-v-titre span { display: inline-flex; align-items: center; gap: var(--esp-1); color: var(--accent-texte); }
.nt-v-titre .ic { width: 16px; height: 16px; }
.nt-v-ligne { display: flex; align-items: center; gap: var(--esp-3); width: 100%; min-height: var(--cible); padding: var(--esp-1) var(--esp-2); border-radius: var(--r-4); color: var(--texte); font-size: 16px; text-align: left; }
.nt-v-ligne > .ic { color: var(--texte-doux); }
.nt-v-ligne .chevron { width: 18px; height: 18px; opacity: .7; transition: transform var(--duree) var(--ease-out); }
.nt-v-ligne[aria-expanded="true"] .chevron { transform: rotate(90deg); }
.nt-v-nom { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.nt-v-nom small { display: block; font-size: 13px; color: var(--texte-doux); line-height: 1.3; }
.nt-v-nb { min-width: 26px; height: 26px; padding: 0 var(--esp-2); border-radius: var(--r-rond); display: grid; place-items: center; background: var(--accent-voile); color: var(--accent-texte); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.nt-v-enfants { padding-left: var(--esp-8); }
.nt-v-note { display: flex; align-items: center; gap: var(--esp-2); }
.nt-v-note .nt-v-ligne { flex: 1; min-width: 0; min-height: 50px; }
.nt-v-note .nt-v-nom { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-v-note .nt-v-nom small { font-weight: 400; }
.nt-v-range { flex: none; display: inline-flex; align-items: center; gap: var(--esp-1); min-height: var(--cible); padding: 0 var(--esp-3); border-radius: var(--r-rond); font-size: 13px; font-weight: 600; color: var(--accent-texte); }
.nt-v-range > span { display: inline-flex; align-items: center; gap: var(--esp-1); height: 28px; padding: 0 var(--esp-2); border-radius: var(--r-rond); background: var(--accent-voile); }
.nt-v-range .ic { width: 14px; height: 14px; }
.nt-v-aide { font-size: 13px; line-height: 1.4; color: var(--texte-doux); margin: var(--esp-1) var(--esp-2); }
.nt-nouveau-dossier { display: flex; gap: var(--esp-2); margin-top: var(--esp-3); }
.nt-nouveau-dossier input { flex: 1; min-width: 0; min-height: var(--cible); padding: 0 var(--esp-3); border: 0; border-radius: var(--r-4); background: var(--fond); color: var(--texte); box-shadow: inset 0 0 0 1px var(--ligne); font: inherit; }
/* L'écran « Mes notes » (tiroir, ordinateur, « Toutes les notes ») reprend le contenu du volet */
.nt-ecran { max-width: 46rem; margin: 0 auto; }
.nt-ecran > h1 { font-family: "Gilda Display", serif; font-weight: 400; font-size: 30px; margin: var(--esp-2) 0 0; }
/* Partie Notes de la Vue d'ensemble (R59), pour le lot 1b */
.nt-ensemble .nt-ens-tete { display: flex; align-items: center; justify-content: space-between; gap: var(--esp-2); }
.nt-ensemble h2 { font-size: 17px; font-weight: 600; margin: 0; }
.nt-ensemble .pn-puces { display: flex; flex-wrap: wrap; gap: var(--esp-2); margin: var(--esp-3) 0 var(--esp-1); }
.nt-ens-ligne { display: flex; align-items: center; gap: var(--esp-3); width: 100%; min-height: 64px; padding: var(--esp-2) 0; border-bottom: 1px solid var(--ligne); text-align: left; }
.nt-ens-ligne .cap-rond { width: var(--cible); height: var(--cible); border-radius: var(--r-4); background: var(--accent-voile); }
.nt-ens-ligne .nt-v-nom b { display: block; font-weight: 600; font-size: 17px; }
.nt-ens-ligne .nt-v-nom small { font-size: 14px; }
.nt-ens-ligne .chevron { color: var(--texte-doux); opacity: .7; }

/* ---------- Ordinateur (C1 : une petite fenêtre sous le bouton) ---------- */
@media (min-width: 1024px), (min-width: 640px) and (hover: hover) and (pointer: fine) {
  .cap-carte.pres { left: var(--cap-x, auto); right: auto; top: var(--cap-y, auto); bottom: auto; width: min(420px, calc(100vw - var(--esp-8))); max-height: calc(100dvh - var(--cap-y, 0px) - var(--esp-6)); padding-bottom: var(--esp-5); transform-origin: var(--cap-origine, 50% 0); border-radius: var(--r-6); }
  .nt-volet { width: 380px; }
}
@media (hover: hover) and (pointer: fine) {
  .cap-ajout:hover .cap-rond, .nt-v-ligne:hover, .cap-choix button:hover, .nt-propositions [role="option"]:hover { filter: brightness(.97); background-color: color-mix(in srgb, var(--accent-voile) 60%, transparent); }
}

/* ---------- Réduire les animations : partout un fondu ---------- */
@media (prefers-reduced-motion: reduce) {
  .cap-carte, .cap-carte.b, .nt-plein, .nt-volet { transition: opacity 160ms ease !important; }
  .cap-carte.entre, .cap-carte.sort, .cap-carte.b.entre, .cap-carte.b.sort, .nt-plein.entre, .nt-plein.sort, .nt-volet.entre, .nt-volet.sort { transform: none; opacity: 0; }
  .cap-enreg .cap-point { animation: none; }
}

/* ---------- Interface avec la barre du lot 1 ----------
   Pendant le Capturer : <html data-capturer="ouvert">, et le bouton qui l'a ouvert (« depuis ») porte data-capturer-source.
   La barre [data-barre] passe au-dessus de la carte, ses autres boutons s'estompent (inactifs), l'icône du « + » tourne
   de 45° et devient × au même endroit, sous le pouce (R56). Une note ouverte passe au-dessus de tout, toasts compris. */
:root[data-capturer="ouvert"] [data-barre] { z-index: 42; box-shadow: none; }
:root[data-capturer="ouvert"] [data-barre] :is(button, a):not([data-capturer-source]) { opacity: .32; pointer-events: none; transition: opacity 160ms var(--ease-out); }
[data-capturer-source] .ic { transition: transform var(--pn-entree) var(--ease-drawer); }
:root[data-capturer="ouvert"] [data-capturer-source] .ic { transform: rotate(45deg); }
:root[data-note="ouverte"] .toast { z-index: 49; bottom: calc(var(--capsule-bas) + 60px + var(--esp-4)); }
:root[data-note="ouverte"] { overflow: hidden; }
