/* Interface web BonSéjour (ordinateur) : même palette et même allure que l'app mobile (mobile/lib/theme.dart). */

@font-face { font-family: "Dancing Script"; src: url("/assets/fonts/DancingScript-Regular.ttf"); }
@font-face { font-family: "Great Vibes"; src: url("/assets/fonts/GreatVibes-Regular.ttf"); }
@font-face { font-family: "Playfair Display"; src: url("/assets/fonts/PlayfairDisplay-Regular.ttf"); }
@font-face { font-family: "Oswald"; src: url("/assets/fonts/Oswald-Regular.ttf"); }
@font-face { font-family: "Poppins"; font-weight: 400; src: url("/assets/fonts/Poppins-Regular.ttf"); }
@font-face { font-family: "Poppins"; font-weight: 500; src: url("/assets/fonts/Poppins-Medium.ttf"); }
@font-face { font-family: "Poppins"; font-weight: 600; src: url("/assets/fonts/Poppins-SemiBold.ttf"); }
@font-face { font-family: "Poppins"; font-weight: 700; src: url("/assets/fonts/Poppins-Bold.ttf"); }
/* Même police emoji que le lecteur et que la TV : ce qu'on dessine ici doit être ce qui s'affiche
   chez le client. Citée en premier dans les piles, elle ne couvre que les emojis. */
@font-face { font-family: "BS Emoji"; src: url("/assets/fonts/BonSejourEmoji.ttf"); }

:root, [data-theme="light"] {
  --navy: #1B3354; --navy-fill: #1B3354; --gold: #D4A85A; --on-gold: #1B3354;
  --green: #2E6B54; --green-fill: #2E6B54;
  --bg: #F6F1E6; --surface: #FFFFFF; --soft: #F6F1E6;
  --ink: #1D2733; --muted: #6B7380; --line: #E6DFD0; --danger: #B3413A;
  --shadow: 0 10px 30px rgba(27, 51, 84, .10);
}
[data-theme="dark"] {
  --navy: #E4EAF3; --navy-fill: #2B5282; --green: #6CC39B; --green-fill: #2F7A5C;
  --bg: #111418; --surface: #1B1F25; --soft: #262B33;
  --ink: #ECEFF3; --muted: #9BA4AF; --line: #2E343C; --danger: #E5766F;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: "BS Emoji", "Poppins", system-ui, sans-serif; background: var(--bg); color: var(--ink); font-size: 14px; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

/* -- ossature : menu à gauche, contenu à droite -------------------------------------------------------- */
/* --nav-w : largeur visible du menu (0 à 250 px), animée à l'ouverture/fermeture et suivie par le doigt pendant le glissement. */
@property --nav-w { syntax: "<length>"; inherits: true; initial-value: 250px; }
/* --grip-off : décalage du centre de la poignée par rapport au bord du menu (19 px ouvert : centre de la marge de 38 px entre le menu et le contenu; 14 px fermé). */
@property --grip-off { syntax: "<length>"; inherits: true; initial-value: 19px; }
:root { --nav-w: 250px; --grip-off: 19px; transition: --nav-w .28s cubic-bezier(.32, .72, 0, 1), --grip-off .28s cubic-bezier(.32, .72, 0, 1); }
:root.nav-icons { --nav-w: 76px; }
:root.nav-hidden { --nav-w: 0px; --grip-off: 14px; }
:root.nav-dragging { transition: none; }
.shell { display: grid; grid-template-columns: var(--nav-w) 1fr; min-height: 100vh; }
.sidebar {
  width: var(--nav-w); box-sizing: border-box; overflow: hidden; white-space: nowrap;
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px;
  padding: 26px 16px; background: var(--surface); border-right: 1px solid var(--line);
}
.sidebar .brand { padding: 0 8px 26px; }
.sidebar .brand img { width: 100%; max-width: 200px; display: block; }
.sidebar a[data-page] {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px;
  text-decoration: none; font-weight: 500; color: var(--navy);
}
.sidebar a[data-page] svg { width: 22px; height: 22px; fill: currentColor; }
.sidebar a[data-page]:hover { background: var(--soft); }
.sidebar a[data-page].active { background: color-mix(in srgb, var(--gold) 28%, transparent); font-weight: 600; }
.theme-switch { display: flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.theme-switch button { flex: 1; border: 0; background: transparent; padding: 7px 0; cursor: pointer; color: var(--muted); font-size: 12px; }
.theme-switch button.active { background: color-mix(in srgb, var(--gold) 30%, transparent); color: var(--navy); font-weight: 600; }

main { padding: 30px 38px 60px; min-width: 0; }
.page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: 28px; font-weight: 600; color: var(--navy); flex: 1; }

/* -- éléments communs -------------------------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px; }
.card h2 { margin: 0; font-size: 17px; font-weight: 600; color: var(--navy); }
.card .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h2 { flex: 1; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 20px; }

.btn {
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 14px;
  padding: 10px 18px; border: 1px solid var(--line); background: transparent; color: var(--navy);
  font-weight: 500; cursor: pointer; white-space: nowrap;
}
.btn:hover:not(:disabled) { background: var(--soft); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--navy-fill); border-color: var(--navy-fill); color: #fff; font-weight: 600; }
.btn.primary:hover:not(:disabled) { filter: brightness(1.12); background: var(--navy-fill); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--on-gold); font-weight: 600; }
.btn.gold:hover:not(:disabled) { filter: brightness(1.05); background: var(--gold); }
.btn.danger { color: var(--danger); }
.btn.small { padding: 6px 12px; font-size: 13px; border-radius: 11px; }
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn.icon-btn { width: 48px; height: 48px; padding: 0; border-radius: 14px; flex: none; }
.btn.icon-btn svg { width: 24px; height: 24px; }
.icon-btn { width: 34px; height: 34px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; color: var(--navy); display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: var(--soft); }
.icon-btn svg { width: 20px; height: 20px; fill: currentColor; }

.pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
  color: var(--c, var(--navy)); background: color-mix(in srgb, var(--c, var(--navy)) 13%, transparent); white-space: nowrap; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.subtabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.subtabs button { border: 1px solid var(--line); background: transparent; border-radius: 20px; padding: 7px 14px; cursor: pointer;
  color: var(--muted); font-size: 13px; }
.subtabs button.active { background: color-mix(in srgb, var(--gold) 30%, transparent); border-color: transparent; color: var(--navy); font-weight: 600; }

input[type=text], input[type=search], input[type=date], input[type=number], input[type=password], textarea {
  width: 100%; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface);
}
input:focus, textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy); }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 500; }
.row { display: flex; gap: 12px; align-items: center; }
.ai-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.row > .grow { flex: 1; }
.muted { color: var(--muted); }
.error-text { color: var(--danger); }
.ok-text { color: var(--green); }
.empty { color: var(--muted); text-align: center; padding: 26px 0; }

.switch { position: relative; width: 44px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 24px; background: var(--line); cursor: pointer; transition: .2s; }
.switch span::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + span { background: var(--gold); }
.switch input:checked + span::before { transform: translateX(20px); }

input[type=range] { width: 100%; accent-color: var(--gold); }
select.select { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; min-width: 150px; }

/* -- séjours -------------------------------------------------------------------------------------------- */
.highlight {
  border-radius: 24px; padding: 24px 26px; color: #fff; display: flex; align-items: center; gap: 20px; cursor: pointer;
  background: linear-gradient(135deg, var(--navy-fill), color-mix(in srgb, var(--navy-fill) 82%, #fff));
  box-shadow: 0 10px 26px color-mix(in srgb, var(--navy-fill) 30%, transparent);
}
.highlight .label { color: var(--gold); font-size: 11px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; }
.highlight .guest { font-size: 26px; font-weight: 600; margin-top: 6px; }
.highlight .dates { opacity: .78; margin-top: 2px; }
.highlight .pin { margin-left: auto; background: rgba(255, 255, 255, .12); border-radius: 14px; padding: 10px 16px; text-align: center; }
.highlight .pin b { display: block; letter-spacing: 2px; font-size: 18px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; }
.stat b { display: block; font-size: 24px; color: var(--navy); }
.stat span { color: var(--muted); font-size: 12px; }

.calendar .cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.calendar .cal-head h2 { flex: 1; text-align: center; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal-dow { text-align: center; color: var(--muted); font-size: 12px; font-weight: 500; padding-bottom: 4px; }
.cal-day {
  position: relative; height: 78px; cursor: pointer; overflow: visible;
  background: color-mix(in srgb, var(--surface) 88%, var(--soft));
  border: 1px solid var(--line); border-radius: 16px;
}
.cal-day.on { z-index: 2; }
.cal-day .bar { position: absolute; left: -1px; right: -1px; top: 30px; bottom: 16px; display: flex; z-index: 3; }
.cal-day .bar i { display: block; height: 100%; }
.cal-day .num { position: absolute; top: 7px; left: 10px; width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%; font-weight: 600; font-size: 14px; z-index: 2; }
.cal-day.out .num { color: color-mix(in srgb, var(--muted) 50%, transparent); }
.cal-day.today .num { box-shadow: inset 0 0 0 2px var(--gold); font-weight: 700; }
.cal-day.on .num { color: var(--ink); }
.cal-day .guest-chip {
  position: absolute; left: 18%; top: 30px; max-width: calc(82% + 12px); height: calc(100% - 46px); padding: 0 10px 0 4px; z-index: 4;
  display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid color-mix(in srgb, #fff 18%, var(--c));
  color: #fff; background: var(--c); font-size: 11px; font-weight: 700;
  white-space: nowrap; overflow: hidden;
}
.cal-day .guest-chip img, .cal-day .guest-chip i {
  width: 22px; height: 22px; margin-right: 7px; border-radius: 50%; flex: none;
}
.cal-day .guest-chip img { object-fit: cover; background: var(--line); }
.cal-day .guest-chip i {
  display: inline-flex; align-items: center; justify-content: center; font-style: normal;
  color: var(--c); background: #fff; font-size: 10px; font-weight: 800;
}
.cal-day .guest-chip span { overflow: hidden; text-overflow: ellipsis; }
.cal-day .cal-flags {
  position: absolute; right: 8px; top: 6px; z-index: 3;
  display: flex; align-items: center; gap: 3px;
}
.cal-day .cal-flag {
  width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
  color: var(--navy); font-size: 11px; font-weight: 700; line-height: 1;
}
a.cal-flag { text-decoration: none; cursor: pointer; }
a.cal-flag:hover { border-color: var(--gold); }
.cal-day .cal-flag.money { color: var(--green); }
.cal-day .cal-clean {
  position: absolute; left: 6px; right: 6px; bottom: 3px; height: 15px; z-index: 5; padding: 0 6px; border-radius: 8px;
  font-size: 10px; font-weight: 600; line-height: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--navy); background: color-mix(in srgb, var(--gold) 30%, var(--surface)); border: 1px solid color-mix(in srgb, var(--gold) 60%, var(--line));
}
.cal-day .cal-clean.present { background: color-mix(in srgb, var(--gold) 70%, var(--surface)); color: var(--ink); }
.cal-day .cal-clean.done { background: color-mix(in srgb, var(--green) 25%, var(--surface)); border-color: color-mix(in srgb, var(--green) 55%, var(--line)); color: var(--green); }
.cal-day:hover { border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); background: var(--surface); }

.res-list { display: flex; flex-direction: column; gap: 10px; }
.res-item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); cursor: pointer; background: var(--surface); }
.res-item:hover { border-color: var(--gold); }
.res-item.selected { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; flex: none;
  color: var(--c, var(--navy)); background: color-mix(in srgb, var(--c, var(--navy)) 13%, transparent); }
.res-item .who { flex: 1; min-width: 0; }
.res-item .who b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.res-item .who span { color: var(--muted); font-size: 12px; }
.res-item.cancelled .who b { text-decoration: line-through; color: var(--muted); }
.money { color: var(--green); font-weight: 600; }

/* panneau latéral (détail d'une réservation) */
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: 440px; background: var(--surface); border-left: 1px solid var(--line);
  box-shadow: var(--shadow); padding: 26px 28px; overflow-y: auto; z-index: 20; animation: slide .18s ease-out; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer h2 { margin: 0; font-size: 24px; color: var(--navy); }
.drawer-title { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.drawer-title { padding-right: 26px; }
.drawer-title .icon-btn { position: absolute; top: 10px; right: 10px; }
.drawer-title img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex: none; background: var(--line); }
.info-row { display: flex; gap: 12px; padding: 7px 0; align-items: center; }
.info-row .k { width: 110px; color: var(--muted); }
.info-row .v { font-weight: 500; flex: 1; }
.info-row svg { width: 18px; height: 18px; fill: var(--gold); flex: none; }
.review-card { display: flex; gap: 12px; align-items: center; padding: 12px; margin: 8px 0; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--soft) 60%, transparent); }
a.review-card { color: inherit; text-decoration: none; cursor: pointer; }
.review-card.linked:hover { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 9%, var(--surface)); }
.review-card img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; flex: none; background: var(--line); }
.review-title { font-weight: 600; color: var(--navy); }
.review-stars { color: #ff385c; font-size: 13px; font-weight: 700; letter-spacing: 1px; margin: 2px 0; }
.review-stars span { color: var(--muted); letter-spacing: 0; font-size: 12px; font-weight: 600; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.lock-box { background: var(--soft); border-radius: 16px; padding: 14px; display: flex; align-items: center; gap: 12px; }
.lock-box b { font-size: 20px; letter-spacing: 2px; }

/* -- diaporama ------------------------------------------------------------------------------------------ */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
/* « container-type: size » : les surimpressions de l'aperçu s'expriment en cqh (pourcentage de la hauteur
   de la vignette), donc le texte suit la taille de la grille sans aucun calcul en JavaScript. */
.thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: var(--line); cursor: grab; container-type: size; }
/* Aperçu des surimpressions sur la vignette (voir ovlThumbLayer). La vignette est en « cover » alors que
   le lecteur est en « contain » : identique tant que la photo est en 16/9, ce qui est le cas courant. */
.thumb-stamps { position: absolute; inset: 0; pointer-events: none; }
.thumb-veil { position: absolute; inset: 0; background: #000; }
.thumb-stamp { position: absolute; box-sizing: border-box; }
.thumb-text { width: 100%; line-height: 1.15; white-space: pre-wrap; overflow: hidden; position: relative; }
.thumb-stamp img { width: 100%; height: 100%; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .pos { position: absolute; left: 8px; top: 8px; background: color-mix(in srgb, var(--navy-fill) 85%, transparent); color: #fff;
  font-size: 11px; font-weight: 600; border-radius: 10px; padding: 2px 9px; }
.thumb .actions { position: absolute; right: 6px; top: 6px; display: flex; gap: 6px; opacity: 0; transition: .15s; }
.thumb:hover .actions { opacity: 1; }
.thumb .actions button { width: 30px; height: 30px; border-radius: 9px; border: 0; background: rgba(0, 0, 0, .55); color: #fff; cursor: pointer; font-size: 14px; }
.thumb .actions button.del:hover { background: var(--danger); }
.thumb.dragging { opacity: .35; }
.thumb.drop-before { box-shadow: -4px 0 0 var(--gold); }
.dropzone { border: 2px dashed var(--line); border-radius: 16px; padding: 18px; text-align: center; color: var(--muted); cursor: pointer; }
.dropzone.over, .card.over { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 8%, transparent); }
.uploading { color: var(--muted); font-size: 12px; margin-top: 8px; }

.branding { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.brand-slot .preview { aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: var(--line); display: flex; align-items: center; justify-content: center; }
.brand-slot.logo .preview { background: var(--navy-fill); }
.brand-slot .preview img { max-width: 100%; max-height: 100%; }
.brand-slot.bg .preview img { width: 100%; height: 100%; object-fit: cover; }
.brand-slot .head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 11px; font-weight: 600; letter-spacing: .8px; color: var(--muted); text-transform: uppercase; }

.song { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 14px; }
.song:hover { background: var(--soft); }
.song .play { width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer; background: var(--soft); color: var(--gold); flex: none; font-size: 15px; }
.song.playing .play { background: var(--gold); color: var(--on-gold); }
.song .meta { flex: 1; min-width: 0; }
.song .meta b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song.playing .meta b { font-weight: 600; }
.song .meta span { color: var(--muted); font-size: 12px; }
.song .progress { height: 4px; border-radius: 4px; background: var(--line); margin-top: 6px; overflow: hidden; }
.song .progress i { display: block; height: 100%; background: var(--gold); width: 0; }
.song.dragging { opacity: .35; }
.song.drop-before { box-shadow: 0 -3px 0 var(--gold); }
.song .grip { cursor: grab; color: var(--muted); padding: 0 4px; user-select: none; }

/* -- télé ----------------------------------------------------------------------------------------------- */
.tv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.tv-card { display: flex; flex-direction: column; gap: 12px; }
.tv-card .top { display: flex; gap: 14px; align-items: flex-start; }
.tv-card .tv-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--soft); display: flex; align-items: center; justify-content: center; flex: none; }
.tv-card .tv-icon svg { width: 22px; height: 22px; fill: var(--navy); }
.tv-card .name { font-weight: 600; font-size: 16px; }
.tv-card .id { color: var(--muted); font-size: 12px; }
.tv-card .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; background: var(--surface); cursor: pointer; color: var(--navy); font-weight: 500; }
.chip.active { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 30%, transparent); font-weight: 600; }

/* -- fenêtres, notifications --------------------------------------------------------------------------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(8, 12, 18, .45); display: flex; align-items: center; justify-content: center; z-index: 30; }
.modal { background: var(--surface); border-radius: 22px; padding: 26px 28px; width: min(520px, 92vw); max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow); }
/* L'éditeur prend presque toute la fenêtre : la photo et la barre de réglages ont besoin de la hauteur,
   et une marge décorative autour ne sert à rien ici. */
.modal.ovl-modal { padding: 14px 16px; max-height: 97vh; }
/* La scène prend EXACTEMENT les proportions de la photo (--ar, posé au chargement de l'image) et se borne
   à la place disponible. C'est ce qui garantit que la couche de surimpressions, qui épouse la scène,
   épouse aussi l'image au pixel près : auparavant le flex étirait la scène en hauteur et l'image était
   simplement centrée dedans, d'où des éléments décalés dès que la place changeait. */
.ovl-area { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; }
.ovl-modal .ovl-stage { aspect-ratio: var(--ar, 16 / 9); max-width: 100%; max-height: 100%; width: auto; }
.ovl-modal .ovl-stage img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: fill; }
.modal h2 { margin: 0 0 4px; color: var(--navy); font-size: 20px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.modal .body { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.notice { border-radius: 14px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
  background: color-mix(in srgb, var(--c) 8%, transparent); }
.notice b { display: block; }
.toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 40; }
.toast { background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px; box-shadow: var(--shadow); max-width: 560px; animation: slide .2s ease-out; }
.info-banner { background: color-mix(in srgb, var(--gold) 12%, transparent); border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); border-radius: 14px; padding: 12px 16px; margin-bottom: 16px; font-size: 13px; }
.banner { background: color-mix(in srgb, var(--danger) 10%, transparent); color: var(--danger); border-radius: 14px; padding: 12px 16px; margin-bottom: 18px; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Portrait (téléphone, tablette verticale) : une seule colonne, réservations sous le calendrier, calendrier compact. */
@media (orientation: portrait) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .cal-grid { gap: 3px; }
  .cal-day { height: 52px; border-radius: 10px; }
  .cal-day .num { top: 3px; left: 4px; width: 22px; height: 22px; font-size: 12px; }
  .cal-day .bar { top: 24px; bottom: 6px; }
  .cal-day .guest-chip { top: 24px; height: calc(100% - 30px); left: 12%; padding: 0 5px 0 2px; font-size: 9px; }
  .cal-day .guest-chip img, .cal-day .guest-chip i { width: 14px; height: 14px; margin-right: 3px; }
  .cal-day .cal-flags { right: 3px; top: 3px; gap: 2px; }
  .cal-day .cal-flag { width: 14px; height: 14px; font-size: 9px; }
}

/* Icônes seulement : textes masqués, logo caché, icônes centrées. */
.nav-icons .sidebar { padding-left: 12px; padding-right: 12px; }
.nav-icons .sidebar > * { width: 52px; }
.nav-icons .sidebar .brand { display: none; }
.nav-icons .sidebar { padding-top: 40px; }
.nav-icons .sidebar a[data-page] { font-size: 0; gap: 0; justify-content: center; padding: 12px 0; }
/* Le menu est rogné par la droite (son contenu reste aligné à gauche, largeur fixe de 218 px). */
.sidebar > * { width: 218px; flex: none; box-sizing: border-box; }
/* Menu de gauche masquable : poignée verticale glissable au bord du menu (comme l'app Claude). */
.nav-hidden:not(.nav-dragging) .sidebar { visibility: hidden; transition: visibility 0s .28s; }
.nav-grip {
  position: fixed; top: 0; bottom: 0; left: calc(var(--nav-w) + var(--grip-off) - 11px); width: 22px; z-index: 60;
  display: flex; align-items: center; justify-content: center; cursor: ew-resize; touch-action: none;
}
.nav-grip i { width: 4px; height: 44px; border-radius: 4px; background: var(--muted); opacity: .45; transition: opacity .15s, height .15s; }
.nav-grip:hover i, .nav-dragging .nav-grip i { opacity: .9; height: 60px; }
/* Menu en bas (téléphone, ou choix dans Réglages › Apparence) : mêmes trois états, hauteur 92 px (icônes + titres), 64 px
   (icônes seules) ou 0; poignée horizontale glissable au-dessus du menu. */
@property --nav-h { syntax: "<length>"; inherits: true; initial-value: 92px; }
:root.nav-bottom { --nav-h: 92px; transition: --nav-h .28s cubic-bezier(.32, .72, 0, 1); }
:root.nav-bottom.nav-icons { --nav-h: 64px; }
:root.nav-bottom.nav-hidden { --nav-h: 0px; }
:root.nav-bottom.nav-dragging { transition: none; }
:root.nav-bottom .shell { display: block; padding-bottom: calc(var(--nav-h) + 26px); }
:root.nav-bottom .sidebar {
  position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; height: var(--nav-h); z-index: 55;
  flex-direction: row; align-items: stretch; gap: 4px; padding: 6px; border-right: 0; border-top: 1px solid var(--line);
}
:root.nav-bottom.nav-hidden .sidebar { padding: 0; border-top: 0; }
:root.nav-bottom .sidebar .brand { display: none; }
:root.nav-bottom .sidebar > * { width: auto; flex: 1 1 0; min-width: 0; }
:root.nav-bottom .sidebar a[data-page] { flex-direction: column; justify-content: center; gap: 4px; padding: 6px 2px; font-size: 11px; text-align: center; }
:root.nav-bottom.nav-icons .sidebar { padding: 6px; }
:root.nav-bottom.nav-icons .sidebar > * { width: auto; }
:root.nav-bottom.nav-icons .sidebar a[data-page] { font-size: 0; gap: 0; padding: 6px 0; }
:root.nav-bottom .nav-grip { top: auto; bottom: var(--nav-h); left: 0; right: 0; width: auto; height: 26px; cursor: ns-resize; }
:root.nav-bottom .nav-grip i { width: 44px; height: 4px; }
:root.nav-bottom .nav-grip:hover i, :root.nav-bottom.nav-dragging .nav-grip i { width: 60px; height: 4px; }
/* Pas de navigation « retour » par balayage horizontal : ce geste ouvre le menu. */
html, body { overscroll-behavior-x: none; }

/* Icônes des sections de Réglages (onglets et titres de carte). */
.subtabs button { display: inline-flex; align-items: center; gap: 7px; }
.subtabs button svg, h2.with-icon svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
h2.with-icon { display: flex; align-items: center; gap: 9px; }
.theme-switch button svg { width: 15px; height: 15px; fill: currentColor; vertical-align: -3px; margin-right: 5px; }

/* -- éditeur de surimpressions (voir assets/overlay.js) ------------------------------------------------- */
/* La scène épouse l'image : les éléments sont placés en % de CETTE boîte, donc elle doit avoir exactement
   les proportions de la photo. C'est l'image qui lui donne sa taille. « max-height » laisse la photo
   prendre la hauteur disponible sans jamais pousser les boutons hors de l'écran. */
.ovl-stage { position: relative; background: #000; border-radius: 12px; overflow: hidden; touch-action: none; margin: 0 auto; width: fit-content; max-width: 100%; }
/* La fenêtre devient une colonne flexible et la photo prend simplement la place qui reste. Calculer une
   hauteur (« 100vh moins tant de pixels ») revenait à deviner la taille de l'entête et des réglages, qui
   change avec le contenu — d'où la barre de défilement qui revenait. Ici, plus rien à deviner. */
.modal.ovl-modal { display: flex; flex-direction: column; overflow: hidden; }

.ovl-stage img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; user-select: none; }
.ovl-bg { position: absolute; inset: 0; pointer-events: none; }
.ovl-veil { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; }
.ovl-layer { position: absolute; inset: 0; }
.ovl-item { position: absolute; box-sizing: border-box; }
.ovl-item.selected { outline: 1px dashed var(--gold); outline-offset: 1px; }
/* Sélection multiple : les éléments qui suivent le principal sont marqués plus discrètement — c'est le
   principal qui porte les poignées et dont le panneau montre les réglages. */
.ovl-item.selected.aussi { outline-style: dotted; outline-color: color-mix(in srgb, var(--gold) 65%, transparent); }
.ovl-text { position: relative; white-space: pre-wrap; line-height: 1.15; text-shadow: 0 2px 6px rgba(0, 0, 0, .45); pointer-events: none; }
/* Poignées de redimensionnement : 4 coins + 4 côtés, comme dans un outil vectoriel. */
.ovl-grip { position: absolute; width: 10px; height: 10px; background: var(--gold); border: 1px solid #fff; border-radius: 2px; }
.ovl-nw { left: -5px; top: -5px; cursor: nwse-resize; }
.ovl-n { left: calc(50% - 5px); top: -5px; cursor: ns-resize; }
.ovl-ne { right: -5px; top: -5px; cursor: nesw-resize; }
.ovl-w { left: -5px; top: calc(50% - 5px); cursor: ew-resize; }
.ovl-e { right: -5px; top: calc(50% - 5px); cursor: ew-resize; }
.ovl-sw { left: -5px; bottom: -5px; cursor: nesw-resize; }
.ovl-s { left: calc(50% - 5px); bottom: -5px; cursor: ns-resize; }
.ovl-se { right: -5px; bottom: -5px; cursor: nwse-resize; }

/* Barre d'outils et propriétés SOUS l'image : à droite, elles volaient la largeur de la photo. */
.ovl-tools { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
/* Réglages et boutons d'action sur la MÊME rangée : deux boutons libellés sur leur propre ligne
   mangeaient une bande entière de hauteur, prise sur la photo. */
.ovl-bottom { display: flex; align-items: flex-end; gap: 14px; margin-top: 10px; }
.ovl-props { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; }
.ovl-foot { display: flex; gap: 8px; margin-left: auto; flex: none; }
.ovl-foot .icon-btn { width: 38px; height: 38px; }
.ovl-foot .primary svg { fill: #fff; }
/* Étiquettes et contrôles alignés : chaque réglage occupe la même hauteur, sinon les libellés se décalent
   les uns par rapport aux autres selon la hauteur de leur contrôle (liste, curseur, groupe de boutons). */
.ovl-props .ovl-field { gap: 3px; justify-content: flex-end; }
.ovl-props .ovl-field > span { height: 14px; line-height: 14px; }
.ovl-props .ovl-field > :not(span) { height: 36px; box-sizing: border-box; }
.ovl-props .ovl-field > div:not(span) { display: flex; align-items: center; }
.ovl-props .ovl-field .theme-switch button { height: 100%; padding: 0 11px; }
/* Les curseurs portent une marge par défaut dans Chrome (2 px), qui rendait leur champ plus haut que les
   autres et décalait son libellé vers le haut. */
.ovl-props .ovl-field input { margin: 0; }
.ovl-props .ovl-field input[type="color"] { height: 100%; }
.ovl-props .ovl-field .ovl-swatch { height: 26px; }
.ovl-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.ovl-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.ovl-field > span { white-space: nowrap; }
.ovl-field input[type="text"] { min-width: 220px; }
.ovl-field input[type="range"] { width: 150px; }
/* Réglage en pourcentage : le curseur n'apparaît qu'au clic, dans une bulle AU-DESSUS du bouton, pour que
   la ligne de réglages ne grandisse pas. Vertical : il tient dans la largeur d'un bouton. */
.ovl-pct { min-width: 64px; justify-content: center; }
.ovl-pop { position: fixed; z-index: 210; padding: 10px 8px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow); }
.ovl-pop input[type="range"].ovl-vert { writing-mode: vertical-lr; direction: rtl; width: 24px; height: 120px; }
/* Groupes de boutons en pictogrammes (alignements, plans) : l'icône seule, le libellé en infobulle. */
.ovl-field .theme-switch button svg { width: 17px; height: 17px; fill: currentColor; margin: 0; vertical-align: -3px; }
.ovl-field .theme-switch button[disabled] { opacity: .35; cursor: default; }
.ovl-field .theme-switch { width: auto; }
.ovl-field .theme-switch button { padding: 6px 12px; }
/* Pastilles : les teintes dominantes de la photo, puis la roue complète. */
.ovl-colors { display: flex; align-items: center; gap: 6px; }
.ovl-swatch { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--line); cursor: pointer; padding: 0; }
.ovl-colors input[type="color"] { width: 34px; height: 26px; padding: 2px; background: transparent; border: 1px solid var(--line); border-radius: 7px; }
/* Pipette : une pastille comme les autres, mais qui porte un pictogramme au lieu d'une teinte. */
.ovl-dropper { display: inline-flex; align-items: center; justify-content: center; background: transparent; }
.ovl-dropper svg { width: 16px; height: 16px; fill: currentColor; }
/* Prélèvement en cours : le croisillon doit s'imposer à TOUTE la scène. Les poignées de
   redimensionnement portent leur propre curseur, qui l'emportait sur celui de la scène. */
.ovl-picking, .ovl-picking * { cursor: crosshair !important; }


/* Choix d'icône ou de variable : une bulle, pas un modal — celui-ci remplacerait l'éditeur. */
.ovl-pick { display: flex; flex-direction: column; gap: 8px; width: 330px; }
.ovl-pick input[type="text"] { width: 100%; }
.ovl-varlist { width: 210px; }
.ovl-varlist button { justify-content: flex-start; }
.ovl-icons { display: flex; flex-wrap: wrap; gap: 6px; max-height: 260px; overflow-y: auto; }
.ovl-icon-btn { font-size: 22px; line-height: 1; width: 42px; height: 42px; border-radius: 10px;
  border: 1px solid var(--line); background: transparent; cursor: pointer; }
.ovl-icon-btn.active { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 25%, transparent); }
/* Bouton d'icône de la LIGNE DE RÉGLAGES : il doit s'aligner sur les listes déroulantes voisines, alors que
   .ovl-icon-btn est dimensionné pour la grille de choix (42 px de côté), ce qui le faisait dépasser. */
.ovl-icon-pick { font-size: 17px; line-height: 1; padding: 7px 14px; }
/* Champ texte d'une étiquette : le bouton « { } » insère une variable au curseur, donc il doit rester
   collé au champ plutôt que de partir sur sa propre ligne. */
.ovl-text-row { display: flex; align-items: center; gap: 6px; height: 100%; }
.ovl-text-row input[type="text"] { height: 100%; }
.ovl-tokens { width: 300px; gap: 2px; max-height: 300px; overflow-y: auto; }
.ovl-token { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: 0;
  border-radius: 8px; background: transparent; cursor: pointer; text-align: left; color: inherit; }
.ovl-token:hover { background: var(--soft); }
.ovl-token code { font-size: 12px; color: var(--gold); white-space: nowrap; }
.ovl-token span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ovl-token-hint { padding: 8px 8px 2px; margin-top: 4px; border-top: 1px solid var(--line);
  font-size: 11px; color: var(--muted); line-height: 1.5; }
.ovl-token-hint code { color: var(--gold); }
/* Choix de la transition : l'aperçu rejoue l'effet sur la scène d'édition. En POURCENTAGE de l'élément
   et non en vw/vh comme dans le lecteur (player.html) : ici la scène n'est pas la fenêtre, et une
   translation d'une largeur de fenêtre enverrait la photo bien au-delà du cadre. */
@keyframes ovl-in-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ovl-in-slide_left { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes ovl-in-slide_right { from { transform: translateX(-100%); } to { transform: translateX(0); } }
@keyframes ovl-in-slide_up { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes ovl-in-slide_down { from { transform: translateY(-100%); } to { transform: translateY(0); } }
@keyframes ovl-in-zoom { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.ovl-transitions { width: 260px; gap: 2px; }
.ovl-transitions .ovl-token.active { background: color-mix(in srgb, var(--gold) 25%, transparent); }
.ovl-transition-ms { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); }

/* -- Assistant (voir assets/app.js renderAssistant, server/chalet/assistant.py) ------------------------ */
.asst { display: flex; flex-direction: column; gap: 10px; }
/* Hauteur bornée pour que le champ de saisie reste visible sans défiler jusqu'en bas de la page. */
.asst-log { display: flex; flex-direction: column; gap: 12px; min-height: 240px;
  max-height: min(58vh, 620px); overflow-y: auto; padding-right: 4px; }
.asst-turn { max-width: 78%; padding: 10px 14px; border-radius: 16px; line-height: 1.5; white-space: pre-wrap; }
.asst-user { align-self: flex-end; background: var(--navy-fill); color: #fff; }
.asst-assistant { align-self: flex-start; background: var(--soft); border: 1px solid var(--line); }
.asst-erreur { align-self: flex-start; background: color-mix(in srgb, #c0392b 12%, transparent);
  border: 1px solid #c0392b; }
.asst-who { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; opacity: .65; margin-bottom: 4px; }
.asst-user .asst-who { color: #fff; }
.asst-actions { align-self: flex-start; max-width: 78%; padding: 8px 12px; border-radius: 14px;
  border: 1px dashed var(--line); font-size: 13px; }
.asst-action { display: flex; align-items: center; gap: 8px; padding: 2px 0; color: var(--muted); }
.asst-action svg { width: 15px; height: 15px; fill: var(--green); }
.asst-joint { display: flex; flex-wrap: wrap; gap: 6px; }
/* Image que l'assistant montre dans la conversation (outil montrer_image). Bornée en hauteur : un fond
   d'écran occuperait sinon tout le fil. */
.asst-image { padding: 8px; }
.asst-image img { display: block; max-width: 100%; max-height: 320px; border-radius: 10px; cursor: zoom-in;
  background: var(--soft); }
/* Historique des conversations : une ligne par conversation, les épinglées en tête. */
.asst-chats { display: flex; flex-direction: column; gap: 4px; max-height: 60vh; overflow-y: auto; }
.asst-chat { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer;
  color: inherit; text-align: left; font-size: 14px; }
.asst-chat:hover { background: var(--soft); }
.asst-chat.active { border-color: var(--gold); }
.asst-chat svg { width: 16px; height: 16px; fill: var(--muted); flex: none; }
.asst-chat .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asst-chat .muted { font-size: 12px; flex: none; }
/* Signet posé : la pastille doit se voir d'un coup d'œil dans l'en-tête. */
.page-head .icon-btn.active { color: var(--gold); }
/* Image d'une page dans la conversation : le fichier n'est que le fond, les surimpressions sont
   dessinées par-dessus (même calque que les vignettes de la galerie, voir ovlThumbLayer). */
/* « container-type: size » est nécessaire aux unités du calque de surimpressions, mais il fait IGNORER
   au cadre la taille de son image : il faut donc lui donner la sienne (largeur ici, proportions posées
   à la volée au chargement). Sans ça, le cadre restait plat et l'image invisible. */
.asst-page { position: relative; display: block; width: 300px; max-width: 100%; cursor: zoom-in;
  container-type: size; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; }
.asst-page.grand { width: min(900px, 100%); }
.asst-page img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }

/* Confirmation de fermeture, posée DANS l'éditeur de surimpressions : le modal du site ne gère qu'une
   fenêtre à la fois et remplacerait l'éditeur — on perdrait le travail qu'on cherche justement à sauver. */
.ovl-leave { position: fixed; inset: 0; z-index: 240; display: flex; align-items: center;
  justify-content: center; background: rgba(0, 0, 0, .55); padding: 20px; }
.ovl-leave-box { max-width: 460px; padding: 24px 26px; border-radius: 18px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.ovl-leave-box p { font-size: 14px; line-height: 1.5; }

/* Bibliothèque d'images réutilisables (posées sur les pages, pas des pages elles-mêmes). */
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.lib-item { position: relative; border: 1px solid var(--line); border-radius: 14px; padding: 10px;
  background: var(--surface); }
/* Damier : beaucoup de ces images sont détourées, et un fond uni cacherait leur transparence. */
.lib-item img { display: block; width: 100%; height: 86px; object-fit: contain;
  background-image: linear-gradient(45deg, var(--soft) 25%, transparent 25%),
    linear-gradient(-45deg, var(--soft) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--soft) 75%),
    linear-gradient(-45deg, transparent 75%, var(--soft) 75%);
  background-size: 14px 14px; background-position: 0 0, 0 7px, 7px -7px, -7px 0; border-radius: 8px; }
.lib-name { margin-top: 8px; font-size: 12px; color: var(--muted); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.lib-item .actions { position: absolute; top: 6px; right: 6px; opacity: 0; transition: opacity .15s; }
.lib-item:hover .actions { opacity: 1; }

/* Choix d'une image à poser : la bibliothèque, dans une bulle (pas un modal, qui masquerait l'éditeur). */
/* Large : on choisit une image à ce qu'elle MONTRE, et des vignettes de la taille d'un timbre ne le
   permettent pas. « min-width: 0 » sur la grille et ses cases, sinon un nom long les élargit et la
   bulle se met à défiler horizontalement. */
.ovl-biblio-pick { width: min(620px, 92vw); gap: 10px; }
.ovl-biblio { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px;
  max-height: min(60vh, 460px); overflow-y: auto; overflow-x: hidden; min-width: 0; }
.ovl-biblio-item { display: flex; flex-direction: column; gap: 6px; padding: 8px; cursor: pointer;
  min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: transparent;
  color: inherit; }
.ovl-biblio-item.active { border-color: var(--gold); }
.ovl-biblio-item:hover { background: var(--soft); }
/* Damier : beaucoup de ces images sont détourées, un fond uni cacherait leur transparence. */
.ovl-biblio-item img { width: 100%; height: 92px; object-fit: contain; border-radius: 6px;
  background-image: linear-gradient(45deg, var(--line) 25%, transparent 25%),
    linear-gradient(-45deg, var(--line) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--line) 75%),
    linear-gradient(-45deg, transparent 75%, var(--line) 75%);
  background-size: 12px 12px; background-position: 0 0, 0 6px, 6px -6px, -6px 0; }
.ovl-biblio-item span { font-size: 11px; color: var(--muted); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }

/* Zone de saisie de l'assistant : un seul cadre, le champ au-dessus et les actions en dessous — même
   disposition que l'app mobile. Plus lisible qu'une rangée où le texte se coince entre les icônes. */
.asst-box { border: 1px solid var(--line); border-radius: 22px; background: var(--surface);
  padding: 12px 10px 6px 16px; }
.asst-box textarea { width: 100%; border: 0; background: transparent; resize: vertical;
  min-height: 46px; color: inherit; font: inherit; outline: none; padding: 0; }
.asst-box textarea:disabled { color: var(--muted); }
/* Le champ ne porte NI bordure ni anneau de focus : c'est le cadre qui les porte pour lui, sinon on en
   voit deux l'un dans l'autre dès qu'on clique dedans. */
.asst-box textarea:focus { box-shadow: none; border: 0; }
/* Gris un peu plus clair, pas « --navy » : en mode sombre cette teinte est presque blanche, et le
   cadre tranchait violemment avec le reste du panneau dès qu'on cliquait dedans. */
.asst-box:focus-within { border-color: color-mix(in srgb, var(--muted) 45%, var(--line)); }
.asst-actions-row { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.icon-btn.filled { background: var(--navy-fill); color: #fff; }
.icon-btn.filled:hover { opacity: .9; }
.icon-btn.danger { color: var(--danger); }
.icon-btn.busy { opacity: .5; }
/* Onde de la dictée : DÉCORATIVE, elle ne mesure pas le son. Ce qu'on veut savoir, c'est que ça écoute ;
   lire le niveau du micro en continu coûterait un flux d'événements pour rien. */
.asst-wave { flex: 1; display: flex; align-items: center; justify-content: center; gap: 3px; height: 22px; }
.asst-wave i { width: 3px; height: 18px; border-radius: 2px; background: var(--danger);
  transform: scaleY(.25); animation: asst-wave 1.1s ease-in-out infinite; }
/* Les barres du centre montent plus haut que celles des bords, sinon l'onde paraît plate. */
.asst-wave i:nth-child(-n+3), .asst-wave i:nth-last-child(-n+3) { height: 10px; }
.asst-wave i:nth-child(n+5):nth-child(-n+9) { height: 22px; }
@keyframes asst-wave { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
/* Images jointes au prochain message : vignettes, parce qu'une image collée n'a pas de nom de fichier. */
.asst-joint { display: flex; flex-wrap: wrap; gap: 8px; }
.asst-jointe { position: relative; width: 64px; height: 64px; padding: 0; cursor: pointer;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--soft); }
.asst-jointe img { width: 100%; height: 100%; object-fit: cover; display: block; }
.asst-jointe span { position: absolute; top: 2px; right: 2px; width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  background: rgba(0, 0, 0, .6); color: #fff; }
.asst-jointe svg { width: 12px; height: 12px; fill: currentColor; }
