/* Le Régisseur (bêta) — un fil de discussion (24/11/2026, docs/regisseur-universel/24). Palette Symphonius (papier, or,
   encre), mode nuit par les variables du thème, animations coupées si la personne les refuse. */
.regisseur { --rg-moi: color-mix(in srgb, var(--accent) 17%, var(--surface)); --rg-lui: var(--surface); --rg-ombre: 0 1px 1.5px rgba(0, 0, 0, .08);
  position: fixed; top: 0; right: 0; bottom: 0; width: 460px; max-width: 100vw; z-index: var(--z-drawer-side, 5000); display: none; flex-direction: column;
  background: var(--bg); border-left: 1px solid var(--border-medium); box-shadow: -8px 0 32px rgba(0, 0, 0, .12); }
.regisseur--ouvert { display: flex; }
.regisseur__bouton { position: fixed; right: 18px; bottom: 18px; z-index: var(--z-app-floating, 50); display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--accent); background: var(--surface); color: var(--text); border-radius: 999px; padding: 9px 16px; font: inherit; font-weight: 600; box-shadow: 0 4px 16px rgba(0, 0, 0, .12); cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.regisseur__bouton:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0, 0, 0, .16); }
.regisseur__bouton sup { color: var(--accent); }
.regisseur__alerte { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 2px; border-radius: 50%; font-size: .8rem; color: #1a1306; background: #e0a526; }
.regisseur__alerte--urgente { background: #c0392b; color: #fff; }
.rg-alerte-texte { font-weight: 600; color: #a86b00; }
.rg-alerte-texte--urgente, .rg-alerte-texte--expiree { color: #b3261e; }
.rg-reconnecter { margin-left: 4px; border: 1px solid var(--accent); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: .74rem; padding: 1px 10px; cursor: pointer; }
.rg-commande summary { cursor: pointer; color: var(--text-muted); font-size: .72rem; }
.rg-connexion { flex-basis: 100%; padding: 6px 8px; border-radius: 8px; background: var(--subtle-bg); line-height: 1.4; }
.rg-connexion[hidden] { display: none; }
.rg-connexion__etapes { margin: 0 0 6px; padding-left: 1.2em; }
.rg-connexion__etapes a { color: var(--accent); font-weight: 600; }
.rg-connexion__code { display: flex; gap: 6px; }
.rg-connexion__code input { flex: 1; min-width: 0; font: inherit; font-family: ui-monospace, monospace; font-size: .78rem; padding: 4px 8px; border: 1px solid var(--border-medium); border-radius: 8px; background: var(--bg); color: var(--text); }
.rg-connexion__code button { border: none; border-radius: 8px; padding: 4px 12px; background: var(--accent); color: #1a1306; font: inherit; font-weight: 600; cursor: pointer; }

/* En-tête : avatar, nom, état (« en ligne », « écrit… », « lit un livrable… »). */
.regisseur__tete { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface); border-bottom: 1px solid var(--border-medium); }
.rg-avatar { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 1.2rem; background: radial-gradient(circle at 30% 30%, var(--surface-warm), color-mix(in srgb, var(--accent) 30%, var(--surface))); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.rg-titre { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; min-width: 0; line-height: 1.15; }
.rg-titre strong { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; font-weight: 600; }
.rg-statut { flex-basis: 100%; font-size: .74rem; color: var(--text-muted); }
.regisseur__beta { font-size: .66rem; color: var(--accent); border: 1px solid var(--accent); border-radius: 6px; padding: 0 5px; }
.regisseur__parametres { margin-left: auto; position: relative; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border-medium); background: none; color: var(--text); cursor: pointer; font-size: .95rem; line-height: 1; transition: transform .25s ease, border-color .15s ease, color .15s ease; }
.regisseur__parametres:hover, .regisseur__parametres:focus-visible { border-color: var(--accent); color: var(--accent); }
.regisseur__parametres[aria-expanded="true"] { transform: rotate(60deg); border-color: var(--accent); color: var(--accent); }
.regisseur__parametres--alerte::after { content: ''; position: absolute; top: -1px; right: -1px; width: 8px; height: 8px; border-radius: 50%; background: #e0a526; box-shadow: 0 0 0 2px var(--surface); }
.regisseur__reglages[hidden] { display: none; }
.regisseur__ma-memoire { background: none; border: 1px solid var(--border-medium); border-radius: 999px; color: var(--text); cursor: pointer; font: inherit; font-size: .76rem; padding: 3px 10px; }
.regisseur__ma-memoire:hover, .regisseur__effacer:hover { border-color: var(--accent); color: var(--accent); }
.regisseur__effacer { background: none; border: 1px solid transparent; border-radius: 999px; color: var(--text-muted); cursor: pointer; font: inherit; font-size: .76rem; padding: 3px 8px; }
.regisseur__fermer { background: none; border: none; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--text-muted); padding: 0 4px; }
.regisseur__fermer:hover { color: var(--text); }

/* Le fil : fond papier pointillé discret ; bulles avec leur petite pointe ; séparateurs de jour. */
.regisseur__messages { position: relative; flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 12px 14px 18px; display: flex; flex-direction: column; gap: 6px;
  background-color: var(--bg); background-image: radial-gradient(color-mix(in srgb, var(--accent) 12%, transparent) 1px, transparent 1.2px); background-size: 20px 20px; }
.rg-jour { align-self: center; margin: 10px 0 4px; }
.rg-jour span { display: inline-block; padding: 3px 10px; border-radius: 8px; background: var(--surface); box-shadow: var(--rg-ombre); font-size: .72rem; color: var(--text-muted); }
.rg-jour span::first-letter { text-transform: uppercase; }
.rg-bulle { position: relative; max-width: 82%; padding: 7px 10px 5px; border-radius: 14px; line-height: 1.42; font-size: .93rem; color: var(--text); box-shadow: var(--rg-ombre); overflow-wrap: anywhere; }
.rg-bulle--moi { align-self: flex-end; background: var(--rg-moi); border-bottom-right-radius: 4px; }
.rg-bulle--lui { align-self: flex-start; background: var(--rg-lui); border-bottom-left-radius: 4px; }
.rg-bulle:has(.rg-reaction) { margin-bottom: 12px; }
.rg-bulle__corps > :first-child { margin-top: 0; }
.rg-bulle__corps > :last-child { margin-bottom: 0; }
.rg-bulle__corps p { margin: 0 0 6px; }
.rg-bulle__pied { display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin-top: 2px; font-size: .66rem; color: var(--text-muted); }
.rg-coches { letter-spacing: -2px; }
.rg-coches--lu { color: var(--accent); font-weight: 700; }
.rg-bulle--suivi { border-left: 3px solid var(--accent); }
.rg-bulle--erreur { border-left: 3px solid #b3261e; }

/* Messages successifs du même côté : groupés, plus serrés (comme une messagerie). */
.rg-groupe { margin-top: -3px; }
.rg-bulle--moi.rg-groupe { border-top-right-radius: 6px; }
.rg-bulle--lui.rg-groupe { border-top-left-radius: 6px; }

/* Le Markdown du Régisseur dans une bulle : une typographie compacte (titres, listes, tableaux, code) — sans elle, les
   titres n'étaient pas en gras, les listes trop décalées, un tableau sans bordures et un bloc de code débordait. */
.rg-bulle__corps .md-p, .regisseur__extrait .md-p { margin: 0 0 6px; }
.rg-bulle__corps .md-p:last-child, .regisseur__extrait .md-p:last-child { margin-bottom: 0; }
.rg-bulle__corps .md-h, .regisseur__extrait .md-h { font-weight: 700; line-height: 1.3; margin: 10px 0 4px; color: var(--text); }
.rg-bulle__corps .md-h:first-child { margin-top: 0; }
.rg-bulle__corps .md-h1 { font-size: 1.05rem; }
.rg-bulle__corps .md-h2 { font-size: 1rem; }
.rg-bulle__corps .md-h3, .rg-bulle__corps .md-h4, .rg-bulle__corps .md-h5, .rg-bulle__corps .md-h6 { font-size: .95rem; color: color-mix(in srgb, var(--accent) 45%, var(--text)); }
.rg-bulle__corps strong { font-weight: 700; }
.rg-bulle__corps .md-ul, .rg-bulle__corps .md-ol, .regisseur__extrait .md-ul, .regisseur__extrait .md-ol { margin: 4px 0 6px; padding-left: 1.25em; }
.rg-bulle__corps .md-ul li, .rg-bulle__corps .md-ol li { margin: 2px 0; }
.rg-bulle__corps .md-li--d1 { margin-left: 1em; }
.rg-bulle__corps .md-li--d2 { margin-left: 2em; }
.rg-bulle__corps .md-li--d3 { margin-left: 3em; }
.rg-bulle__corps .md-table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 6px 0; font-size: .84rem; }
.rg-bulle__corps .md-table th, .rg-bulle__corps .md-table td { padding: 4px 8px; border-bottom: 1px solid var(--border-medium); text-align: left; vertical-align: top; white-space: nowrap; }
.rg-bulle__corps .md-table th { font-weight: 600; background: var(--subtle-bg); }
.rg-bulle__corps .md-code { margin: 6px 0; padding: 8px 10px; max-width: 100%; overflow-x: auto; border-radius: 8px; background: var(--subtle-bg); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; line-height: 1.4; white-space: pre; }
.rg-bulle__corps .md-code-inline, .regisseur__extrait .md-code-inline { padding: 0 4px; border-radius: 4px; background: var(--subtle-bg); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .86em; }
.rg-bulle__corps .md-quote { margin: 6px 0; padding: 2px 0 2px 10px; border-left: 3px solid var(--accent); color: var(--text-muted); }
.rg-bulle__corps .md-hr { border: none; border-top: 1px solid var(--border-medium); margin: 8px 0; }
.rg-bulle__corps .md-link, .regisseur__extrait .md-link { color: var(--accent); text-decoration: underline dotted; }
.rg-bulle__corps .md-action { margin: 6px 0; padding: 5px 8px; border-left: 3px solid var(--accent); border-radius: 4px; background: var(--subtle-bg); font-size: .88rem; }
.rg-bulle__corps .md-task { color: var(--accent); }

/* Réactions : la sienne sur ton message, la tienne sur le sien (petite pastille au pied de la bulle). */
.rg-reaction { position: absolute; bottom: -12px; padding: 0 5px; min-width: 24px; text-align: center; border-radius: 12px; background: var(--surface); border: 1px solid var(--border-medium); box-shadow: var(--rg-ombre); font-size: .95rem; line-height: 1.45; cursor: default; }
.rg-bulle--moi .rg-reaction { left: 8px; }
.rg-bulle--lui .rg-reaction { right: 8px; }
.rg-reagir { position: absolute; top: 50%; right: -30px; transform: translateY(-50%); width: 24px; height: 24px; border-radius: 50%; border: none; background: var(--surface); color: var(--text-muted); box-shadow: var(--rg-ombre); cursor: pointer; font-size: .9rem; opacity: 0; transition: opacity .15s ease; }
.rg-bulle--lui:hover .rg-reagir, .rg-reagir:focus-visible, .rg-bulle--lui:focus-within .rg-reagir { opacity: 1; }
@media (hover: none) { .rg-reagir { opacity: .55; } }
.rg-barre-reactions { position: absolute; z-index: 2; left: 0; bottom: calc(100% + 6px); display: flex; gap: 2px; padding: 4px 6px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border-medium); box-shadow: 0 6px 20px rgba(0, 0, 0, .15); }
.rg-barre-reactions[hidden] { display: none; }
.rg-barre-reactions button { border: none; background: none; cursor: pointer; font-size: 1.25rem; line-height: 1; padding: 4px; border-radius: 50%; transition: transform .12s ease; }
.rg-barre-reactions button:hover, .rg-barre-reactions button:focus-visible { transform: scale(1.25); }

/* « écrit… » : trois points qui respirent, et ce qu'il fait. */
.rg-ecrit { display: flex; align-items: center; gap: 8px; padding: 9px 12px; }
.rg-ecrit[hidden] { display: none; }
.rg-points { display: inline-flex; gap: 4px; }
.rg-points i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); opacity: .45; animation: rg-point 1.2s infinite ease-in-out; }
.rg-points i:nth-child(2) { animation-delay: .15s; }
.rg-points i:nth-child(3) { animation-delay: .3s; }
.rg-ecrit__etape { font-size: .78rem; color: var(--text-muted); font-style: italic; }
@keyframes rg-point { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }

/* Arrivées : douces et brèves. */
.rg-arrive { animation: rg-arrive .18s ease-out; }
@keyframes rg-arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.rg-pop { animation: rg-pop .26s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes rg-pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .rg-arrive, .rg-pop, .rg-points i { animation: none; } .rg-points i { opacity: .7; } }

/* Les cartes à confirmer : du côté du Régisseur, dans le fil. */
.regisseur__carte.rg-cote--lui { align-self: flex-start; width: min(92%, 400px); box-shadow: var(--rg-ombre); }
.rg-nouveaux { position: sticky; bottom: 6px; align-self: center; z-index: 3; border: none; border-radius: 999px; padding: 6px 14px; background: var(--accent); color: #1a1306; font: inherit; font-size: .8rem; font-weight: 700; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); cursor: pointer; }
.rg-nouveaux[hidden] { display: none; }

/* Saisie : une pastille qui grandit avec le texte, émojis, envoi rond. */
.rg-emojis { display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); gap: 2px; max-height: 168px; overflow-y: auto; padding: 8px 10px; background: var(--surface); border-top: 1px solid var(--border-medium); }
.rg-emojis[hidden] { display: none; }
.rg-emojis button { border: none; background: none; cursor: pointer; font-size: 1.3rem; padding: 4px; border-radius: 8px; }
.rg-emojis button:hover, .rg-emojis button:focus-visible { background: var(--subtle-bg); }
.rg-saisie { display: flex; align-items: flex-end; gap: 6px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--border-medium); }
.rg-saisie textarea { flex: 1; min-height: 40px; max-height: 140px; resize: none; overflow-y: auto; font: inherit; font-size: .95rem; line-height: 1.35; padding: 9px 14px; border: 1px solid var(--border-medium); border-radius: 20px; background: var(--bg); color: var(--text); outline: none; }
.rg-saisie textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.rg-emoji-btn { flex: none; width: 40px; height: 40px; border-radius: 50%; border: none; background: none; cursor: pointer; font-size: 1.3rem; }
.rg-emoji-btn:hover { background: var(--subtle-bg); }
.rg-envoyer { flex: none; width: 40px; height: 40px; border-radius: 50%; border: none; display: grid; place-items: center; background: var(--accent); color: #1a1306; cursor: pointer; transition: transform .12s ease, opacity .12s ease; }
.rg-envoyer:not(:disabled):hover { transform: scale(1.06); }
.rg-envoyer:disabled { opacity: .4; cursor: default; }
.regisseur__note { margin: 0; padding: 0 14px 8px; font-size: .7rem; color: var(--text-muted); background: var(--surface); text-align: center; }
.regisseur button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Téléphone : plein écran, au-dessus de la barre de navigation du bas (mobile.css). */
@media (max-width: 768px) {
  .regisseur { width: 100vw; border-left: none; }
  .regisseur__bouton { right: 12px; bottom: calc(var(--nav-height, 0px) + var(--safe-bottom, 0px) + 12px); }
  .rg-bulle { max-width: 86%; }
  .rg-reagir { right: -26px; }
}

/* Cartes à confirmer, mémoire, interrupteurs, extraits (inchangés). */
.regisseur__pastille { display: inline-block; min-width: 18px; margin-left: 6px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--surface); font-size: .72rem; line-height: 18px; text-align: center; }
.regisseur__extrait { margin-top: 8px; padding: 6px 8px; border-radius: 8px; background: var(--subtle-bg, var(--surface-warm)); font-size: .85rem; }
.regisseur__extrait-titre { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: 4px; }
.regisseur__resumer { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 6px 14px; border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); color: var(--text); cursor: pointer; font: inherit; font-size: .8rem; font-weight: 600; transition: background .15s ease, color .15s ease, box-shadow .15s ease, transform .08s ease; }
.regisseur__resumer::before { content: '✨'; }
.regisseur__resumer:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: #1a1306; box-shadow: 0 3px 10px color-mix(in srgb, var(--accent) 30%, transparent); }
.regisseur__resumer:active:not(:disabled) { transform: translateY(1px); }
.regisseur__resumer:disabled { opacity: .55; cursor: default; }
.regisseur__resumer:disabled::before { content: '⏳'; }
.regisseur__carnet { border-bottom: 1px solid var(--border); padding: 10px 14px; max-height: 45vh; overflow-y: auto; font-size: .85rem; background: var(--surface-warm); }
.regisseur__carnet ul { margin: 4px 0 10px; padding-left: 0; list-style: none; }
.regisseur__carnet li { padding: 4px 0; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.regisseur__carnet li em { display: block; color: var(--text-muted); font-size: .75rem; font-style: normal; }
.regisseur__carnet li button, .regisseur__tout-oublier { margin-left: 4px; padding: 1px 10px; border: 1px solid var(--border-medium); border-radius: 999px; background: var(--surface); color: var(--text-muted); cursor: pointer; font: inherit; font-size: .72rem; font-weight: 600; transition: border-color .15s ease, color .15s ease, background .15s ease; }
.regisseur__carnet li button:hover, .regisseur__tout-oublier:hover { border-color: #b3261e; color: #b3261e; background: color-mix(in srgb, #b3261e 6%, var(--surface)); }
.regisseur__carnet-titre { font-weight: 700; margin-top: 4px; }
.regisseur__carnet-titre span, .regisseur__carnet-id { color: var(--text-muted); font-weight: 400; }
.regisseur__carnet-note { color: var(--text-muted); font-size: .78rem; margin: 4px 0; }
.regisseur__carte { border: 1px solid var(--accent); border-radius: 12px; padding: 12px; background: var(--surface); font-size: .9rem; }
.regisseur__carte-titre { font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.regisseur__carte-op { font-weight: 600; margin-bottom: 6px; }
.regisseur__carte-op code { font-weight: 400; color: var(--text-muted); font-size: .75rem; }
.regisseur__carte-contexte { margin: 0 0 8px; padding-left: 16px; font-size: .82rem; }
.regisseur__carte-contexte span { font-weight: 600; margin-right: 4px; }
.regisseur__carte-sous-titre { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin: 6px 0 4px; }
.regisseur__carte-champs { margin: 0 0 8px; padding: 0; list-style: none; font-size: .8rem; }
.regisseur__champ { border-top: 1px solid var(--border); padding: 4px 0; }
.regisseur__champ-nom { font-weight: 600; margin-right: 6px; }
.regisseur__champ-taille { color: var(--text-muted); font-size: .72rem; }
.regisseur__champ-valeur { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-family: ui-monospace, monospace; font-size: .78rem; background: var(--code-bg, var(--subtle-bg)); border-radius: 6px; padding: 4px 6px; }
.regisseur__champ-valeur--replie { max-height: 4.5em; overflow: hidden; }
.regisseur__deplier { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px; padding: 3px 11px; border: 1px solid var(--border-medium); border-radius: 999px; background: var(--surface); color: var(--text); cursor: pointer; font: inherit; font-size: .74rem; font-weight: 600; transition: border-color .15s ease, color .15s ease, background .15s ease; }
.regisseur__deplier::before { content: '👁'; font-size: .8rem; }
.regisseur__deplier:hover { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.regisseur__carte-resume { margin: 6px 0; font-size: .85rem; color: var(--text-muted); }
.regisseur__carte-resume span { font-style: italic; }
.regisseur__carte-actions { display: flex; gap: 8px; margin-top: 10px; }
/* Les boutons d'une carte (25/11) : ils portaient `btn`, une classe qu'aucune feuille ne définit — style brut du navigateur. */
.regisseur__confirmer, .regisseur__annuler { font: inherit; cursor: pointer; border-radius: 999px; padding: 8px 16px; line-height: 1.2; transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .08s ease; }
.regisseur__confirmer { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--accent); background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 82%, #fff), var(--accent)); color: #1a1306; font-weight: 700; font-size: .88rem; letter-spacing: .01em; box-shadow: 0 1px 2px rgba(0, 0, 0, .14), inset 0 1px 0 rgba(255, 255, 255, .35); }
.regisseur__confirmer::before { content: '✓'; font-weight: 800; }
.regisseur__confirmer:hover:not(:disabled) { background: var(--accent-hover, #9a7209); border-color: var(--accent-hover, #9a7209); color: #fff; box-shadow: 0 3px 10px color-mix(in srgb, var(--accent) 35%, transparent); }
.regisseur__confirmer:active:not(:disabled) { transform: translateY(1px); box-shadow: 0 1px 2px rgba(0, 0, 0, .14); }
.regisseur__confirmer:disabled { background: var(--subtle-bg); border-color: var(--border-medium); border-style: dashed; color: var(--text-muted); box-shadow: none; cursor: not-allowed; }
.regisseur__confirmer:disabled::before { content: '👁'; font-weight: normal; }
.regisseur__annuler { border: 1px solid var(--border-medium); background: transparent; color: var(--text-muted); font-weight: 600; font-size: .85rem; }
.regisseur__annuler:hover:not(:disabled) { border-color: #b3261e; color: #b3261e; background: color-mix(in srgb, #b3261e 6%, transparent); }
.regisseur__annuler:disabled { opacity: .45; cursor: not-allowed; }
.regisseur__confirmer:focus-visible, .regisseur__annuler:focus-visible, .regisseur__resumer:focus-visible, .regisseur__deplier:focus-visible, .regisseur__carnet li button:focus-visible, .regisseur__tout-oublier:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.regisseur__carte-etat { margin-top: 6px; font-size: .85rem; }
.regisseur__reglages { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 6px 12px; border-bottom: 1px solid var(--border-medium); font-size: .76rem; color: var(--text-muted, var(--text)); }
.regisseur__reglage { display: inline-flex; align-items: center; gap: 4px; }
.regisseur__reglage button { background: none; border: 1px solid var(--border-medium); color: var(--text); cursor: pointer; font: inherit; padding: 1px 8px; }
.regisseur__reglage button:first-of-type { border-radius: 6px 0 0 6px; }
.regisseur__reglage button:last-of-type { border-radius: 0 6px 6px 0; margin-left: -1px; }
.regisseur__reglage button[aria-pressed="true"] { background: var(--gold, #b8860b); border-color: var(--gold, #b8860b); color: #fff; }
.regisseur__reglage button:disabled { opacity: .45; cursor: not-allowed; }
.regisseur__reglage button:focus-visible { outline: 2px solid var(--gold, #b8860b); outline-offset: 1px; }
.regisseur__reglage-etat { flex-basis: 100%; line-height: 1.35; overflow-wrap: anywhere; }
.regisseur__reglage-etat:empty { display: none; }
.regisseur__reglage-etat code { font-size: .72rem; user-select: all; }

/* ─── Pièces jointes (docs/regisseur-universel/26) ─────────────────────────────────────────────────────────── */
.rg-trombone { flex: none; width: 40px; height: 40px; border-radius: 50%; border: none; background: none; cursor: pointer; font-size: 1.2rem; transform: rotate(-20deg); transition: transform .15s ease; }
.rg-trombone:hover, .rg-trombone:focus-visible { transform: rotate(0deg) scale(1.08); }
.rg-pieces { display: flex; gap: 6px; overflow-x: auto; padding: 8px 10px 2px; background: var(--surface); border-top: 1px solid var(--border-medium); scrollbar-width: thin; }
.rg-pieces[hidden] { display: none; }
.regisseur--depot .regisseur__messages { outline: 2px dashed var(--accent); outline-offset: -8px; background: color-mix(in srgb, var(--accent) 6%, transparent); }
.rg-piece { position: relative; display: flex; align-items: center; gap: 8px; flex: none; max-width: 230px; padding: 6px 26px 6px 6px; border-radius: 10px; border: 1px solid var(--border-medium); background: var(--bg); font-size: .78rem; line-height: 1.25; }
.rg-bulle__pieces .rg-piece { padding-right: 8px; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.rg-piece--verif { border-style: dashed; }
.rg-piece--verif .rg-piece__etat::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; border: 1.5px solid var(--accent); border-right-color: transparent; animation: rg-tourne .8s linear infinite; vertical-align: -1px; }
.rg-piece--refus { border-color: #b3261e; background: color-mix(in srgb, #b3261e 7%, var(--bg)); }
.rg-piece--refus .rg-piece__etat { color: #b3261e; }
.rg-piece--ok .rg-piece__etat { color: #2e7d32; }
.rg-piece--ok .rg-piece__etat--avertie { color: #a86b00; }
.rg-piece__vue { position: relative; flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 7px; overflow: hidden; background: var(--subtle-bg); font-size: 1.15rem; }
.rg-piece__vue img { width: 100%; height: 100%; object-fit: cover; }
.rg-piece__texte { display: flex; flex-direction: column; min-width: 0; }
.rg-piece__nom { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-piece__taille, .rg-piece__etat { color: var(--text-muted); font-size: .7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-piece__retirer { position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%; border: none; background: var(--subtle-bg); color: var(--text); font-size: .8rem; line-height: 1; cursor: pointer; }
.rg-bulle__pieces { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
/* Les petits yeux : ils passent sur la pièce que le Régisseur regarde. */
.rg-piece__yeux { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.1rem; background: color-mix(in srgb, var(--surface) 55%, transparent); opacity: 0; transform: scale(.6); transition: opacity .2s ease, transform .2s ease; pointer-events: none; }
.rg-piece--regardee { box-shadow: 0 0 0 2px var(--accent); }
.rg-piece--regardee .rg-piece__yeux { opacity: 1; transform: scale(1); animation: rg-yeux 1.1s ease-in-out infinite; }
/* ✓ « LU » façon caméra de surveillance. */
.rg-cctv { margin-top: 2px; font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: .64rem; letter-spacing: .06em; text-transform: uppercase; animation: rg-apparait .25s ease-out; }
.rg-cctv--lu { color: #2e7d32; }
.rg-cctv--non-lu { color: var(--text-muted); }
.rg-carte-pieces { margin: 4px 0 0; padding: 0; list-style: none; font-size: .78rem; }
.rg-carte-pieces li { padding: 2px 0; }
.rg-carte-pieces span { color: var(--text-muted); font-size: .72rem; margin-left: 4px; }
@keyframes rg-tourne { to { transform: rotate(360deg); } }
@keyframes rg-yeux { 0%, 100% { transform: translateX(-2px); } 50% { transform: translateX(2px); } }
@keyframes rg-apparait { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .rg-piece--regardee .rg-piece__yeux, .rg-cctv, .rg-piece--verif .rg-piece__etat::before { animation: none; }
  .rg-trombone { transition: none; }
}

/* ─── Fichiers remis par le Régisseur (docs/regisseur-universel/27) ───────────────────────────────────────── */
.rg-page { display: none; position: relative; width: 22px; height: 28px; margin-right: 6px; border-radius: 3px; background: var(--bg); border: 1px solid var(--border-medium); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); vertical-align: middle; }
.rg-ecrit--fichier .rg-page { display: inline-block; }
.rg-ecrit--fichier .rg-points { display: none; }
.rg-page i { position: absolute; left: 4px; height: 2px; border-radius: 1px; background: var(--accent); width: 0; animation: rg-ecrire 1.6s ease-in-out infinite; }
.rg-page i:nth-child(1) { top: 6px; } .rg-page i:nth-child(2) { top: 11px; animation-delay: .3s; } .rg-page i:nth-child(3) { top: 16px; animation-delay: .6s; } .rg-page i:nth-child(4) { top: 21px; animation-delay: .9s; }
.rg-page b { position: absolute; right: -9px; bottom: -5px; font-size: .8rem; font-weight: normal; animation: rg-plume 1.6s ease-in-out infinite; }
.rg-bulle--fichier { min-width: min(320px, 82%); }
.rg-fichier__tete { display: flex; align-items: center; gap: 8px; }
.rg-fichier__icone { font-size: 1.3rem; }
.rg-bulle--neuf .rg-fichier__icone { animation: rg-plume .6s ease-in-out 3; }
.rg-fichier__nom { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.rg-fichier__taille { color: var(--text-muted); font-size: .72rem; }
.rg-fichier__apercu { margin: 8px 0 6px; padding: 8px 10px; border-radius: 8px; background: var(--bg); border: 1px solid var(--border-medium); font-size: .82rem; overflow: auto; max-height: 420px; }
.rg-fichier__apercu--replie { max-height: 180px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.rg-fichier__apercu pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: .76rem; }
.rg-fichier__apercu table { border-collapse: collapse; width: 100%; font-size: .76rem; }
.rg-fichier__apercu th, .rg-fichier__apercu td { border: 1px solid var(--border-medium); padding: 3px 6px; text-align: left; vertical-align: top; }
.rg-fichier__apercu th { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); position: sticky; top: 0; }
.rg-fichier__apercu tbody tr:nth-child(even) { background: var(--subtle-bg); }
.rg-fichier__plus { margin: 6px 0 0; color: var(--text-muted); font-size: .72rem; }
.rg-bulle--neuf .rg-fichier__apercu > *, .rg-bulle--neuf .rg-fichier__apercu tbody tr { animation: rg-ligne .35s ease-out both; }
.rg-bulle--neuf .rg-fichier__apercu > *:nth-child(2), .rg-bulle--neuf .rg-fichier__apercu tbody tr:nth-child(2) { animation-delay: .08s; }
.rg-bulle--neuf .rg-fichier__apercu > *:nth-child(3), .rg-bulle--neuf .rg-fichier__apercu tbody tr:nth-child(3) { animation-delay: .16s; }
.rg-bulle--neuf .rg-fichier__apercu > *:nth-child(4), .rg-bulle--neuf .rg-fichier__apercu tbody tr:nth-child(4) { animation-delay: .24s; }
.rg-bulle--neuf .rg-fichier__apercu > *:nth-child(n+5), .rg-bulle--neuf .rg-fichier__apercu tbody tr:nth-child(n+5) { animation-delay: .32s; }
.rg-fichier__note { font-size: .72rem; color: var(--text-muted); margin-bottom: 6px; }
.rg-fichier__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.rg-fichier__actions button { border: 1px solid var(--border-medium); background: var(--surface); color: var(--text); border-radius: 999px; padding: 4px 11px; font: inherit; font-size: .76rem; cursor: pointer; }
.rg-fichier__actions button:hover, .rg-fichier__actions button:focus-visible { border-color: var(--accent); }
.rg-fichier__actions .rg-fichier__principal { background: var(--accent); border-color: var(--accent); color: #1a1306; font-weight: 600; }
.rg-piece__reprendre { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; border: none; background: var(--subtle-bg); color: var(--text); font-size: .8rem; line-height: 1; cursor: pointer; opacity: .55; transition: opacity .15s ease, transform .15s ease; }
.rg-bulle__pieces .rg-piece { padding-right: 28px; }
.rg-piece:hover .rg-piece__reprendre, .rg-piece__reprendre:focus-visible { opacity: 1; transform: rotate(-90deg); }
@keyframes rg-ecrire { 0% { width: 0; } 60%, 100% { width: 13px; } }
@keyframes rg-plume { 0%, 100% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(-3px, -1px) rotate(-12deg); } }
@keyframes rg-ligne { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .rg-page i, .rg-page b, .rg-bulle--neuf .rg-fichier__icone, .rg-bulle--neuf .rg-fichier__apercu > *, .rg-bulle--neuf .rg-fichier__apercu tbody tr { animation: none; }
  .rg-page i { width: 13px; }
  .rg-piece__reprendre { transition: none; }
}
@media (prefers-reduced-motion: reduce) {
  .regisseur__confirmer, .regisseur__annuler, .regisseur__resumer, .regisseur__deplier { transition: none; }
  .regisseur__confirmer:active, .regisseur__resumer:active { transform: none; }
}

/* ─── « Voir l'équipe au travail » (25/11) : dans le cockpit seulement, tant que la mission n'est pas finie ────── */
.rg-equipe { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.rg-equipe__voir { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid var(--accent); border-radius: 999px; background: var(--surface); color: var(--text); cursor: pointer; font: inherit; font-size: .8rem; font-weight: 600; transition: background .15s ease, color .15s ease, box-shadow .15s ease, transform .08s ease; }
.rg-equipe__voir::before { content: '👁'; }
.rg-equipe__voir:hover:not(:disabled) { background: var(--accent); color: #1a1306; box-shadow: 0 3px 10px color-mix(in srgb, var(--accent) 30%, transparent); }
.rg-equipe__voir:active:not(:disabled) { transform: translateY(1px); }
.rg-equipe__voir:disabled { opacity: .6; cursor: progress; }
.rg-equipe__voir:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rg-equipe__loader { display: inline-flex; gap: 3px; align-items: center; }
.rg-equipe__loader i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: .35; animation: rg-travail 1.2s ease-in-out infinite; }
.rg-equipe__loader i:nth-child(2) { animation-delay: .2s; }
.rg-equipe__loader i:nth-child(3) { animation-delay: .4s; }
@keyframes rg-travail { 0%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) {
  .rg-equipe__loader i { animation: none; opacity: .7; }
  .rg-equipe__voir { transition: none; }
}

/* ─── Livrables à télécharger (docs/regisseur-universel/28) ───────────────────────────────────────────────── */
.rg-livrables { margin-top: 10px; }
.rg-livrables__titre { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 4px; }
.rg-livrables__liste { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.rg-livrable { display: flex; align-items: center; gap: 8px; padding: 5px 6px 5px 10px; border: 1px solid var(--border-medium); border-radius: 10px; background: var(--bg); font-size: .8rem; }
.rg-livrable__icone { font-size: 1.05rem; }
.rg-livrable__nom { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-livrable__taille { color: var(--text-muted); font-size: .7rem; }
.rg-livrable__telecharger { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--accent); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; font-weight: 700; transition: background .15s ease, color .15s ease, transform .08s ease; }
.rg-livrable__telecharger:hover:not(:disabled) { background: var(--accent); color: #1a1306; }
.rg-livrable__telecharger:active:not(:disabled) { transform: translateY(1px); }
.rg-livrable__telecharger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rg-livrable__telecharger--encours { cursor: progress; animation: rg-respire 1s ease-in-out infinite; }
.rg-livrable__telecharger--fait { border-color: #2e7d32; color: #2e7d32; }
.rg-livrable--indisponible { flex-wrap: wrap; opacity: .75; }
.rg-livrable__raison { flex-basis: 100%; color: var(--text-muted); font-size: .7rem; padding-left: 26px; }
@keyframes rg-respire { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .rg-livrable__telecharger--encours { animation: none; } .rg-livrable__telecharger { transition: none; } }

/* ─── Livrables : 👁 et visionneuse (25/11) ─────────────────────────────────────────────────────────────── */
.rg-livrable__voir { margin-right: -2px; }
.rg-livrable[hidden] { display: none; }
.rg-livrables__plus { margin-top: 6px; padding: 3px 12px; border: 1px dashed var(--border-medium); border-radius: 999px; background: none; color: var(--text-muted); cursor: pointer; font: inherit; font-size: .74rem; font-weight: 600; }
.rg-livrables__plus:hover, .rg-livrables__plus:focus-visible { border-color: var(--accent); color: var(--accent); }
/* Au-dessus du panneau (04/12/2026 : sous lui, un panneau en pleine largeur — téléphone, vue mobile, application — la cachait). */
.rg-visionneuse { position: fixed; inset: 0; z-index: calc(var(--z-drawer-side, 5000) + 10); display: grid; place-items: center; padding: 16px; background: rgba(10, 10, 10, .55); animation: rg-apparait .18s ease-out; }
.rg-visionneuse__boite { display: flex; flex-direction: column; width: min(900px, 100%); max-height: min(88vh, 100%); border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: 0 18px 50px rgba(0, 0, 0, .35); overflow: hidden; }
.rg-visionneuse__tete { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border-medium); }
.rg-visionneuse__icone { font-size: 1.3rem; }
.rg-visionneuse__nom { flex: 1; min-width: 0; font-family: 'Cormorant Garamond', serif; font-size: 1.15rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rg-visionneuse__taille { color: var(--text-muted); font-size: .75rem; }
.rg-visionneuse__bouton { border: 1px solid var(--border-medium); border-radius: 999px; background: var(--surface); color: var(--text); cursor: pointer; font: inherit; font-size: .8rem; padding: 5px 12px; }
.rg-visionneuse__bouton:hover, .rg-visionneuse__bouton:focus-visible { border-color: var(--accent); }
.rg-visionneuse__bouton--principal { background: var(--accent); border-color: var(--accent); color: #1a1306; font-weight: 600; }
.rg-visionneuse__corps { overflow: auto; padding: 18px 22px; }
.rg-visionneuse__md { font-size: .95rem; line-height: 1.6; }
.rg-visionneuse__texte { margin: 0; white-space: pre-wrap; word-break: break-word; font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: .8rem; }
.rg-visionneuse__tableau { max-height: none; }
.rg-visionneuse__image { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: 8px; }
@media (max-width: 600px) { .rg-visionneuse { padding: 0; } .rg-visionneuse__boite { max-height: 100vh; height: 100%; border-radius: 0; } }
@media (prefers-reduced-motion: reduce) { .rg-visionneuse { animation: none; } }

/* ─── Répondre à un message (25/11) : discret, comme sur une messagerie (les bulles sont déjà en position relative) */
.rg-repondre { position: absolute; top: 4px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border-medium); background: var(--surface); color: var(--text-muted); cursor: pointer; font-size: .8rem; line-height: 1; opacity: 0; transition: opacity .15s ease, color .15s ease, border-color .15s ease; }
.rg-bulle--lui .rg-repondre { right: -30px; }
.rg-bulle--moi .rg-repondre { left: -30px; }
.rg-bulle:hover .rg-repondre, .rg-repondre:focus-visible { opacity: 1; }
.rg-repondre:hover, .rg-repondre:focus-visible { color: var(--accent); border-color: var(--accent); }
@media (hover: none) { .rg-repondre { opacity: .45; } }
.rg-citation { display: flex; flex-direction: column; gap: 1px; width: 100%; margin-bottom: 6px; padding: 5px 9px; border: none; border-left: 3px solid var(--accent); border-radius: 6px; background: color-mix(in srgb, var(--accent) 9%, var(--surface)); color: var(--text); cursor: pointer; font: inherit; text-align: left; }
.rg-citation:hover, .rg-citation:focus-visible { background: color-mix(in srgb, var(--accent) 15%, var(--surface)); }
.rg-citation__de { font-size: .7rem; font-weight: 700; color: var(--accent); }
.rg-citation__texte { font-size: .78rem; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rg-reponse { display: flex; align-items: center; gap: 8px; padding: 6px 10px 0; background: var(--surface); border-top: 1px solid var(--border-medium); }
.rg-reponse[hidden] { display: none; }
.rg-reponse__cadre { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; padding: 5px 9px; border-left: 3px solid var(--accent); border-radius: 6px; background: color-mix(in srgb, var(--accent) 9%, var(--bg)); }
.rg-reponse__fermer { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border-medium); background: var(--surface); color: var(--text-muted); cursor: pointer; }
.rg-reponse__fermer:hover, .rg-reponse__fermer:focus-visible { color: #b3261e; border-color: #b3261e; }
.rg-bulle--surlignee { animation: rg-surligne 1.5s ease-out; }
@keyframes rg-surligne { 0%, 30% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 60%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .rg-repondre { transition: none; } .rg-bulle--surlignee { animation: none; outline: 2px solid var(--accent); } }

/* ─── Décider un plan (25/11) : la carte posée par le cockpit ──────────────────────────────────────────────── */
.rg-decisions { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.rg-decision { padding: 10px 12px; border: 1px solid var(--border-medium); border-left: 4px solid var(--accent); border-radius: 10px; background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.rg-decision--eleve { border-left-color: #b3261e; background: color-mix(in srgb, #b3261e 5%, var(--surface)); }
.rg-decision--prise { opacity: .85; }
.rg-decision__tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.rg-decision__titre { font-family: 'Cormorant Garamond', serif; font-size: 1.02rem; font-weight: 600; }
.rg-decision__risque { padding: 1px 9px; border-radius: 999px; font-size: .7rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; background: color-mix(in srgb, var(--accent) 18%, var(--surface)); color: var(--text); }
.rg-decision--eleve .rg-decision__risque { background: color-mix(in srgb, #b3261e 16%, var(--surface)); color: #b3261e; }
.rg-decision__intention { margin: 2px 0 6px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.rg-decision__etapes { margin: 0 0 6px; padding-left: 20px; font-size: .86rem; line-height: 1.4; overflow-wrap: anywhere; }
.rg-decision__retour { margin: 0 0 6px; color: var(--text-muted); font-size: .8rem; overflow-wrap: anywhere; }
.rg-decision__actions { display: flex; flex-direction: column; gap: 6px; }
.rg-decision__ligne { display: flex; flex-wrap: wrap; gap: 6px; }
.rg-decision__ligne .regisseur__confirmer { flex: 0 1 auto; }
.rg-decision__question { margin: 0; font-size: .86rem; font-weight: 600; }
.rg-decision__texte { width: 100%; box-sizing: border-box; padding: 7px 9px; border: 1px solid var(--border-medium); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-size: .86rem; resize: vertical; }
.rg-decision__texte:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.rg-decision__etat { margin-top: 4px; font-size: .82rem; font-weight: 600; }
.rg-decision__etat:empty { display: none; }
.rg-decision__etat--erreur { color: #b3261e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rg-decision--eleve .rg-decision__risque, :root:not([data-theme="light"]) .rg-decision__etat--erreur { color: #ff8a80; } }
[data-theme="dark"] .rg-decision--eleve .rg-decision__risque, [data-theme="dark"] .rg-decision__etat--erreur { color: #ff8a80; }
.rg-decision__ok:disabled::before { content: '✓'; }
.rg-decision__ok--refus { border-color: #b3261e; background: #b3261e; color: #fff; }
.rg-decision__ok--refus::before, .rg-decision__ok--refus:disabled::before { content: '✕'; }
.rg-decision__ok--refus:hover:not(:disabled) { background: #8f1d17; border-color: #8f1d17; }
.rg-approbation__args { margin: 2px 0 8px; padding: 8px 10px; max-height: 180px; overflow: auto; border-radius: 8px; background: var(--subtle-bg); font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: .76rem; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
/* Note 43, lot 3 : la roue ⚙ d'une personne non admin (son abonnement, sa clé, sa consommation). */
.rg-perso { margin-top: 4px; overflow-wrap: anywhere; }
.rg-perso--discret { color: var(--text-muted); font-size: .72rem; }
.rg-cle { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rg-cle__champ { -webkit-text-security: disc; }
.rg-bulle__appareil { margin-left: 4px; opacity: .75; font-size: .68rem; }   /* lot 4 : écrit depuis un autre de ses appareils */
@supports not (-webkit-text-security: disc) { .rg-cle__champ { color: transparent; text-shadow: 0 0 6px var(--text); } }   /* masquée aussi sans la propriété */
.rg-cle input { min-width: 0; flex: 1 1 12em; padding: 2px 8px; border: 1px solid var(--border-strong, var(--border)); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; font-size: .74rem; }
.rg-cle button, .rg-cle-retirer, .rg-abonnement-oublier { border: 1px solid var(--accent); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: .74rem; padding: 1px 10px; cursor: pointer; }

/* L'application installable (note 43, lot 5, 04/12/2026) : le panneau plein écran, sans bouton flottant ni croix ;
   les bords du téléphone (encoche, barre du bas) respectés. */
.rg-app { margin: 0; min-height: 100dvh; background: var(--bg); }
.rg-app .regisseur__bouton, .rg-app .regisseur__fermer { display: none; }
.regisseur--plein-ecran { width: 100vw; max-width: 100vw; height: 100dvh; border-left: none; box-shadow: none;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); box-sizing: border-box; }
.rg-app-indisponible { margin: 0; padding: 40vh 24px 0; text-align: center; color: var(--text-muted, var(--text)); font: 500 1rem/1.5 'DM Sans', system-ui, sans-serif; }
.rg-app-ouverte .rg-app-indisponible { display: none; }
.rg-notifications:empty { display: none; }
.rg-notif-btn { border: 1px solid var(--accent); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: .74rem; padding: 1px 10px; cursor: pointer; }

/* Note 43, lot 6 (04/12/2026) — « Appareils hors du VPN » au cockpit ; l'application du dehors cache ce qui se règle au cockpit. */
.rg-dehors:empty { display: none; }
.rg-dehors { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.rg-dehors__valeur { font-family: ui-monospace, monospace; letter-spacing: .08em; font-size: 1rem; user-select: all; }
.rg-dehors__ajout input { min-width: 0; padding: 2px 8px; border: 1px solid var(--border-strong, var(--border)); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; }
.regisseur--dehors .regisseur__effacer, .regisseur--dehors .rg-connexion { display: none !important; }
.rg-dehors__confirmer { display: inline; }
.rg-dehors__chiffres { width: 7em; padding: 2px 8px; border: 1px solid var(--border-strong, var(--border)); border-radius: 6px; background: var(--surface); color: var(--text); font: 600 1rem/1.2 ui-monospace, monospace; letter-spacing: .08em; }
