/* =====================================================================
   Chat en direct — widget visiteur (bouton flottant + fenêtre) et bulles
   de messages partagées avec Admin › Chat en direct.
   ===================================================================== */
.lch, .lch-scope {
  --lch-gold: var(--c-gold, #c9a227); --lch-gold-2: #f2d57e; --lch-navy: var(--c-navy, #0b2545); --lch-deep: var(--c-navy-deep, #061a33);
  --lch-paper: var(--c-paper, #fff); --lch-ink: var(--c-ink, #14213a); --lch-mute: #6b7891; --lch-line: color-mix(in srgb, var(--lch-ink) 10%, transparent);
  --lch-me: linear-gradient(135deg, #0f3a66, #0b2545); --lch-them: color-mix(in srgb, var(--lch-ink) 5%, var(--lch-paper));
  --lch-ease: cubic-bezier(.2, .9, .25, 1.15);
  color: var(--lch-ink);
}
.lch { position: fixed; inset-inline-start: 18px; bottom: 18px; z-index: 1045; font-size: 15px; }
.lch-scope [hidden] { display: none !important; }
.lch [hidden] { display: none !important; }

/* ---------- Bouton flottant ---------- */
.lch-launcher {
  position: relative; display: flex; align-items: center; gap: .7rem; padding: .45rem 1.1rem .45rem .45rem; border: 0; border-radius: 999px; cursor: pointer;
  color: #fff; background: linear-gradient(135deg, #123c69, var(--lch-deep)); box-shadow: 0 18px 40px -14px rgba(6, 26, 51, .7), 0 0 0 1px color-mix(in srgb, var(--lch-gold) 55%, transparent), inset 0 1px 0 rgba(255,255,255,.15);
  transition: transform .4s var(--lch-ease), box-shadow .3s, padding .35s;
}
.lch-launcher:hover { transform: translateY(-3px); box-shadow: 0 24px 48px -14px rgba(6, 26, 51, .8), 0 0 0 1px var(--lch-gold); }
.lch-launcher:focus-visible { outline: 3px solid var(--lch-gold); outline-offset: 3px; }
.lch-launcher-ring { position: absolute; inset-block: 0; inset-inline-start: 0; aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--lch-gold); animation: lch-ring 2.6s ease-out infinite; pointer-events: none; }
@keyframes lch-ring { 0% { transform: scale(.85); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }
.lch.is-open .lch-launcher-ring { display: none; }
.lch-launcher-ico { position: relative; inline-size: 48px; block-size: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 1.35rem; color: var(--lch-deep); background: radial-gradient(circle at 30% 25%, #fff3c4, var(--lch-gold-2) 35%, var(--lch-gold)); box-shadow: inset 0 -3px 8px rgba(0,0,0,.18), 0 6px 14px -6px rgba(201,162,39,.8); }
.lch-launcher-ico i { position: absolute; transition: transform .45s var(--lch-ease), opacity .25s; }
.lch-i-close { opacity: 0; transform: rotate(-90deg) scale(.5); }
.lch.is-open .lch-i-open { opacity: 0; transform: rotate(90deg) scale(.5); }
.lch.is-open .lch-i-close { opacity: 1; transform: none; }
.lch-launcher-text { display: grid; text-align: start; line-height: 1.15; }
.lch-launcher-text strong { font-size: .95rem; font-weight: 700; letter-spacing: .01em; }
.lch-launcher-text small { display: flex; align-items: center; gap: .35rem; font-size: .72rem; color: #b9c7da; }
.lch-on { inline-size: 7px; block-size: 7px; border-radius: 50%; background: #2ee59d; box-shadow: 0 0 0 3px rgba(46,229,157,.2); }
.lch.is-open .lch-launcher { padding-inline-end: .45rem; }
.lch.is-open .lch-launcher-text { display: none; }
.lch-badge { position: absolute; top: -4px; inset-inline-start: 34px; min-inline-size: 22px; block-size: 22px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; font-size: .72rem; font-weight: 800; color: #fff; background: #ef3b4f; border: 2px solid #fff; animation: lch-pop .5s var(--lch-ease); }
@keyframes lch-pop { from { transform: scale(0); } }
.lch-peek { position: absolute; bottom: calc(100% + 14px); inset-inline-start: 0; inline-size: 270px; padding: .8rem 2rem .8rem 1rem; border-radius: 16px 16px 16px 4px; background: var(--lch-paper); color: var(--lch-ink); box-shadow: 0 20px 44px -16px rgba(0,0,0,.35); border: 1px solid var(--lch-line); cursor: pointer; animation: lch-rise .45s var(--lch-ease); }
[dir="rtl"] .lch-peek { border-radius: 16px 16px 4px 16px; }
.lch-peek strong { display: block; font-size: .8rem; color: var(--lch-gold); }
.lch-peek p { margin: .2rem 0 0; font-size: .88rem; line-height: 1.4; }
.lch-peek-x { position: absolute; top: 6px; inset-inline-end: 6px; border: 0; background: none; color: var(--lch-mute); cursor: pointer; font-size: 1.1rem; }

/* ---------- Fenêtre ---------- */
.lch-panel {
  position: absolute; bottom: calc(100% + 16px); inset-inline-start: 0; inline-size: min(400px, calc(100vw - 24px)); block-size: min(640px, calc(100vh - 110px));
  display: flex; flex-direction: column; overflow: hidden; border-radius: 26px; background: var(--lch-paper);
  box-shadow: 0 40px 90px -30px rgba(3, 12, 28, .55), 0 0 0 1px var(--lch-line); transform-origin: bottom left; animation: lch-rise .5s var(--lch-ease);
}
[dir="rtl"] .lch-panel { transform-origin: bottom right; }
@keyframes lch-rise { from { opacity: 0; transform: translateY(16px) scale(.94); } }
.lch-panel.is-capturing { opacity: .02; }
.lch-head { position: relative; isolation: isolate; padding: 1rem 1rem .75rem; color: #fff; background: linear-gradient(140deg, #133f6e, var(--lch-deep) 70%); overflow: hidden; flex: none; }
.lch-head-bg { position: absolute; inset: 0; z-index: -1; }
.lch-head-bg i { position: absolute; border-radius: 50%; filter: blur(30px); }
.lch-head-bg i:first-child { inline-size: 180px; block-size: 180px; top: -90px; inset-inline-end: -40px; background: color-mix(in srgb, var(--lch-gold) 45%, transparent); animation: lch-float 9s ease-in-out infinite; }
.lch-head-bg i:last-child { inline-size: 140px; block-size: 140px; bottom: -90px; inset-inline-start: 10%; background: rgba(46,229,157,.25); animation: lch-float 11s ease-in-out infinite reverse; }
@keyframes lch-float { 50% { transform: translate(20px, 10px); } }
.lch-head::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .07; background-image: radial-gradient(circle at 1px 1px, #fff 1px, transparent 0); background-size: 14px 14px; }
.lch-head-row { display: flex; align-items: center; gap: .75rem; }
.lch-logo { position: relative; flex: none; inline-size: 46px; block-size: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); }
.lch-logo img { inline-size: 36px; block-size: 36px; object-fit: contain; }
.lch-logo-on { position: absolute; bottom: -3px; inset-inline-end: -3px; inline-size: 13px; block-size: 13px; border-radius: 50%; background: #2ee59d; border: 2.5px solid var(--lch-deep); }
.lch-head-text { flex: 1; min-inline-size: 0; }
.lch-head h2 { margin: 0; font-size: 1.08rem; font-weight: 800; letter-spacing: .01em; color: #fff; }
.lch-head p { margin: .1rem 0 0; font-size: .78rem; color: #c3d0e2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lch-head-actions { display: flex; gap: .3rem; }
.lch-hbtn { inline-size: 34px; block-size: 34px; border-radius: 11px; border: 0; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.1); cursor: pointer; transition: background .2s, transform .2s; }
.lch-hbtn:hover { background: rgba(255,255,255,.2); transform: translateY(-1px); }
.lch-head-meta { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin: .7rem 0 0 !important; font-size: .7rem !important; color: #d8c88f !important; }
.lch-head-meta span { display: inline-flex; align-items: center; gap: .3rem; }

/* ---------- Formulaire ---------- */
.lch-form { flex: 1; overflow-y: auto; padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .7rem; }
.lch-form.is-busy { opacity: .6; pointer-events: none; }
.lch-intro { padding: .85rem .95rem; border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--lch-gold) 14%, var(--lch-paper)), var(--lch-paper)); border: 1px solid color-mix(in srgb, var(--lch-gold) 30%, transparent); }
.lch-intro h3 { margin: 0 0 .25rem; font-size: .98rem; font-weight: 800; color: var(--lch-ink); }
.lch-intro p { margin: 0; font-size: .82rem; line-height: 1.5; color: var(--lch-mute); }
.lch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.lch-field { display: grid; gap: .25rem; margin: 0; }
.lch-field > span { font-size: .74rem; font-weight: 700; color: var(--lch-mute); letter-spacing: .02em; }
.lch-field input, .lch-field select, .lch-field textarea {
  inline-size: 100%; padding: .62rem .8rem; border-radius: 12px; border: 1.5px solid var(--lch-line); background: color-mix(in srgb, var(--lch-ink) 2.5%, var(--lch-paper));
  color: var(--lch-ink); font: inherit; font-size: .9rem; transition: border-color .2s, box-shadow .2s, background .2s;
}
.lch-field textarea { resize: none; }
.lch-field input:focus, .lch-field select:focus, .lch-field textarea:focus { outline: 0; border-color: var(--lch-gold); background: var(--lch-paper); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lch-gold) 18%, transparent); }
.lch-field em { font-style: normal; font-size: .72rem; color: #d83a4f; display: none; }
.lch-field.is-bad input, .lch-field.is-bad select { border-color: #e35d6f; }
.lch-field.is-bad em { display: block; }
.lch-hp { position: absolute !important; inset-inline-start: -9999px; inline-size: 1px; block-size: 1px; opacity: 0; }
.lch-consent { display: flex; gap: .55rem; align-items: flex-start; font-size: .76rem; color: var(--lch-mute); line-height: 1.45; cursor: pointer; }
.lch-consent input { margin-top: .15rem; accent-color: var(--lch-gold); inline-size: 16px; block-size: 16px; flex: none; }
.lch-consent.is-bad { color: #d83a4f; }
.lch-form-err { margin: 0; padding: .55rem .75rem; border-radius: 10px; font-size: .8rem; color: #a61b2f; background: #fde8eb; }
.lch-start { display: flex; align-items: center; justify-content: center; gap: .55rem; padding: .85rem 1rem; border: 0; border-radius: 14px; cursor: pointer; font: inherit; font-weight: 800; font-size: .95rem; color: var(--lch-deep); background: linear-gradient(135deg, var(--lch-gold-2), var(--lch-gold)); box-shadow: 0 12px 24px -12px color-mix(in srgb, var(--lch-gold) 90%, transparent); transition: transform .3s var(--lch-ease), box-shadow .3s; }
.lch-start:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px color-mix(in srgb, var(--lch-gold) 100%, transparent); }
.lch-start i { font-size: 1.15rem; transition: transform .3s; }
.lch-start:hover i { transform: translateX(3px); }
[dir="rtl"] .lch-start i { transform: scaleX(-1); }

/* ---------- Conversation ---------- */
.lch-chat { position: relative; flex: 1; display: flex; flex-direction: column; min-block-size: 0; background: color-mix(in srgb, var(--lch-ink) 2%, var(--lch-paper)); }
.lch-msgs { flex: 1; overflow-y: auto; padding: 1rem .9rem .5rem; display: flex; flex-direction: column; gap: .45rem; scroll-behavior: smooth; overscroll-behavior: contain;
  background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--lch-ink) 6%, transparent) 1px, transparent 0); background-size: 18px 18px; }
.lch-day { align-self: center; margin: .5rem 0 .2rem; }
.lch-day span { display: inline-block; padding: .22rem .7rem; border-radius: 999px; font-size: .68rem; font-weight: 700; letter-spacing: .04em; color: var(--lch-mute); background: var(--lch-paper); border: 1px solid var(--lch-line); text-transform: capitalize; }
.lch-m { display: flex; align-items: flex-end; gap: .45rem; max-inline-size: 86%; animation: lch-msg .4s var(--lch-ease) both; }
@keyframes lch-msg { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.lch-m.is-me { align-self: flex-end; flex-direction: row-reverse; }
.lch-m.is-sys { align-self: center; max-inline-size: 92%; }
.lch-m.is-sys p { margin: 0; display: flex; gap: .45rem; padding: .55rem .8rem; border-radius: 14px; font-size: .78rem; line-height: 1.5; color: color-mix(in srgb, var(--lch-ink) 75%, transparent); background: color-mix(in srgb, var(--lch-gold) 12%, var(--lch-paper)); border: 1px dashed color-mix(in srgb, var(--lch-gold) 45%, transparent); }
.lch-m.is-sys p i { color: var(--lch-gold); margin-top: .1rem; }
.lch-av { flex: none; inline-size: 30px; block-size: 30px; border-radius: 50%; display: grid; place-items: center; font-size: .68rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, #5b7bd5, #3654a8); overflow: hidden; }
.lch-av.is-team { background: linear-gradient(135deg, var(--lch-navy), var(--lch-deep)); border: 1.5px solid var(--lch-gold); }
.lch-av img { inline-size: 80%; block-size: 80%; object-fit: contain; }
.lch-bubble { position: relative; min-inline-size: 74px; padding: .55rem .75rem .4rem; border-radius: 18px; background: var(--lch-them); border: 1px solid var(--lch-line); box-shadow: 0 2px 6px -4px rgba(0,0,0,.2); overflow-wrap: anywhere; }
.lch-m.is-them .lch-bubble { border-end-start-radius: 6px; }
.lch-m.is-me .lch-bubble { color: #fff; background: var(--lch-me); border-color: transparent; border-end-end-radius: 6px; box-shadow: 0 8px 18px -12px rgba(11,37,69,.9); }
.lch-who { display: block; margin-bottom: .15rem; font-size: .7rem; font-weight: 800; color: var(--lch-gold); }
.lch-txt { margin: 0; font-size: .9rem; line-height: 1.5; white-space: normal; }
.lch-txt.is-emoji { font-size: 2rem; line-height: 1.2; }
.lch-txt a, .lch-cap a { color: inherit; text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.lch-cap { margin: .35rem 0 0; font-size: .86rem; line-height: 1.45; }
.lch-meta { display: flex; align-items: center; justify-content: flex-end; gap: .25rem; margin-top: .2rem; font-size: .64rem; opacity: .65; }
.lch-tick.is-seen { color: #4fd1ff; opacity: 1; }
.lch-m.is-me .lch-tick.is-seen { color: #7fe3ff; }
.lch-m.is-sending { opacity: .6; }
.lch-img { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 12px; overflow: hidden; margin: .1rem 0; }
.lch-img img { display: block; max-inline-size: 240px; max-block-size: 260px; inline-size: auto; border-radius: 12px; object-fit: cover; }
.lch-file, .lch-link { display: flex; align-items: center; gap: .6rem; padding: .55rem .65rem; margin: .1rem 0; border-radius: 12px; text-decoration: none; color: inherit; background: color-mix(in srgb, currentColor 7%, transparent); border: 1px solid color-mix(in srgb, currentColor 12%, transparent); transition: background .2s; min-inline-size: 200px; }
.lch-file:hover, .lch-link:hover { background: color-mix(in srgb, currentColor 12%, transparent); color: inherit; }
.lch-file > i:first-child, .lch-link > i:first-child { font-size: 1.6rem; color: var(--lch-gold); }
.lch-file span, .lch-link span { flex: 1; min-inline-size: 0; display: grid; }
.lch-file strong, .lch-link strong { font-size: .84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lch-file small, .lch-link small { font-size: .7rem; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lch-audio { display: flex; align-items: center; gap: .55rem; min-inline-size: 210px; padding: .15rem 0; }
.lch-play { flex: none; inline-size: 36px; block-size: 36px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; font-size: 1.15rem; color: var(--lch-deep); background: linear-gradient(135deg, var(--lch-gold-2), var(--lch-gold)); box-shadow: 0 4px 10px -4px rgba(201,162,39,.8); }
.lch-wave { flex: 1; display: flex; align-items: center; gap: 2px; block-size: 26px; }
.lch-wave i { flex: 1; min-inline-size: 2px; block-size: 50%; border-radius: 2px; background: color-mix(in srgb, currentColor 30%, transparent); transition: background .15s; }
.lch-wave i.on { background: var(--lch-gold); }
.lch-dur { font-size: .7rem; font-variant-numeric: tabular-nums; opacity: .8; min-inline-size: 2.4em; }
.lch-typing { display: flex; align-items: center; gap: .5rem; padding: .3rem 1.1rem .4rem; font-size: .75rem; color: var(--lch-mute); }
.lch-dots { display: inline-flex; gap: 3px; padding: .45rem .6rem; border-radius: 12px; background: var(--lch-them); border: 1px solid var(--lch-line); }
.lch-dots i { inline-size: 6px; block-size: 6px; border-radius: 50%; background: var(--lch-gold); animation: lch-dot 1.2s infinite; }
.lch-dots i:nth-child(2) { animation-delay: .15s; } .lch-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes lch-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
.lch-rate { margin: .3rem .9rem .6rem; padding: .8rem; border-radius: 16px; text-align: center; background: var(--lch-paper); border: 1px solid var(--lch-line); }
.lch-rate p { margin: 0 0 .4rem; font-size: .82rem; font-weight: 700; }
.lch-stars { display: flex; justify-content: center; gap: .2rem; }
.lch-stars button { border: 0; background: none; font-size: 1.5rem; color: #d7dbe3; cursor: pointer; transition: transform .2s, color .2s; }
.lch-stars button:hover, .lch-stars button.on { color: var(--lch-gold); transform: scale(1.15); }
.lch-new { margin-top: .5rem; display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--lch-line); background: none; color: var(--lch-ink); font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; }

/* ---------- Zone de saisie ---------- */
.lch-composer { position: relative; flex: none; padding: .55rem .65rem .7rem; background: var(--lch-paper); border-top: 1px solid var(--lch-line); }
.lch-composer.is-closed .lch-bar { opacity: .7; }
.lch-bar { display: flex; align-items: flex-end; gap: .35rem; }
.lch-tools { display: flex; gap: .1rem; }
.lch-tools button, .lch-mic, .lch-send { flex: none; inline-size: 38px; block-size: 38px; border-radius: 12px; border: 0; display: grid; place-items: center; font-size: 1.12rem; cursor: pointer; color: var(--lch-mute); background: none; transition: background .2s, color .2s, transform .2s; }
.lch-tools button:hover { color: var(--lch-gold); background: color-mix(in srgb, var(--lch-gold) 12%, transparent); }
.lch-bar textarea { flex: 1; min-inline-size: 0; max-block-size: 140px; padding: .58rem .8rem; border-radius: 14px; border: 1.5px solid var(--lch-line); background: color-mix(in srgb, var(--lch-ink) 3%, var(--lch-paper)); color: var(--lch-ink); font: inherit; font-size: .9rem; line-height: 1.4; resize: none; }
.lch-bar textarea:focus { outline: 0; border-color: var(--lch-gold); background: var(--lch-paper); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lch-gold) 16%, transparent); }
.lch-mic { color: var(--lch-deep); background: color-mix(in srgb, var(--lch-gold) 20%, transparent); }
.lch-mic:hover { background: color-mix(in srgb, var(--lch-gold) 35%, transparent); transform: scale(1.05); }
.lch-send { color: var(--lch-deep); background: linear-gradient(135deg, var(--lch-gold-2), var(--lch-gold)); box-shadow: 0 8px 16px -8px color-mix(in srgb, var(--lch-gold) 90%, transparent); animation: lch-pop .35s var(--lch-ease); }
.lch-send:hover { transform: scale(1.06) rotate(-8deg); }
[dir="rtl"] .lch-send i { transform: scaleX(-1); }
.lch-emoji { position: absolute; bottom: calc(100% + 6px); inset-inline-start: .6rem; inline-size: min(330px, calc(100% - 1.2rem)); padding: .5rem; border-radius: 18px; background: var(--lch-paper); border: 1px solid var(--lch-line); box-shadow: 0 20px 40px -18px rgba(0,0,0,.4); z-index: 3; animation: lch-rise .3s var(--lch-ease); }
.lch-emoji-tabs { display: flex; gap: .2rem; padding-bottom: .4rem; border-bottom: 1px solid var(--lch-line); }
.lch-emoji-tabs button { flex: 1; border: 0; background: none; padding: .35rem; border-radius: 10px; font-size: 1.1rem; cursor: pointer; opacity: .55; }
.lch-emoji-tabs button.on { opacity: 1; background: color-mix(in srgb, var(--lch-gold) 15%, transparent); }
.lch-emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: .1rem; max-block-size: 190px; overflow-y: auto; padding-top: .4rem; }
.lch-emoji-grid button { border: 0; background: none; font-size: 1.35rem; padding: .25rem 0; border-radius: 8px; cursor: pointer; transition: transform .15s, background .15s; }
.lch-emoji-grid button:hover { transform: scale(1.25); background: color-mix(in srgb, var(--lch-gold) 12%, transparent); }
.lch-pending { margin-bottom: .45rem; }
.lch-chip { display: flex; align-items: center; gap: .6rem; padding: .45rem .55rem; border-radius: 14px; background: color-mix(in srgb, var(--lch-gold) 10%, var(--lch-paper)); border: 1px solid color-mix(in srgb, var(--lch-gold) 35%, transparent); animation: lch-rise .3s var(--lch-ease); }
.lch-chip img { inline-size: 46px; block-size: 46px; border-radius: 10px; object-fit: cover; }
.lch-chip > i { font-size: 1.6rem; color: var(--lch-gold); }
.lch-chip span { flex: 1; min-inline-size: 0; display: grid; }
.lch-chip strong { font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lch-chip small { font-size: .7rem; color: var(--lch-mute); }
.lch-chip button { border: 0; background: none; color: var(--lch-mute); cursor: pointer; padding: .3rem; }
.lch-rec { display: flex; align-items: center; gap: .55rem; margin-bottom: .45rem; padding: .45rem .55rem .45rem .8rem; border-radius: 14px; color: #c3263b; background: #fdecee; animation: lch-rise .3s var(--lch-ease); font-variant-numeric: tabular-nums; font-weight: 700; font-size: .85rem; }
.lch-rec canvas { flex: 1; min-inline-size: 0; block-size: 28px; color: #e2465b; }
.lch-rec-dot { inline-size: 10px; block-size: 10px; border-radius: 50%; background: #e2465b; animation: lch-blink 1s infinite; }
@keyframes lch-blink { 50% { opacity: .25; } }
.lch-rec-cancel, .lch-rec-send { border: 0; cursor: pointer; border-radius: 10px; display: inline-flex; align-items: center; gap: .35rem; padding: .4rem .6rem; font: inherit; font-size: .78rem; font-weight: 700; }
.lch-rec-cancel { background: none; color: #a52235; }
.lch-rec-send { color: #fff; background: linear-gradient(135deg, #e2465b, #b3122a); }
.lch-drop { position: absolute; inset: 8px; z-index: 5; border-radius: 18px; display: grid; place-content: center; justify-items: center; gap: .4rem; font-weight: 700; color: var(--lch-gold); background: color-mix(in srgb, var(--lch-paper) 90%, transparent); border: 2.5px dashed var(--lch-gold); }
.lch-drop i { font-size: 2.4rem; }
.lch-toast { position: absolute; inset-inline: 1rem; bottom: 86px; z-index: 6; padding: .6rem .85rem; border-radius: 12px; font-size: .8rem; color: #fff; background: rgba(11, 22, 40, .92); box-shadow: 0 12px 26px -12px rgba(0,0,0,.6); animation: lch-rise .3s var(--lch-ease); text-align: center; }
.lch-lightbox { position: fixed; inset: 0; z-index: 2100; display: grid; place-items: center; padding: 2rem; background: rgba(3, 8, 18, .88); backdrop-filter: blur(6px); cursor: zoom-out; }
.lch-lightbox img { max-inline-size: 100%; max-block-size: 100%; border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lch-lightbox button { position: absolute; top: 1rem; inset-inline-end: 1rem; inline-size: 44px; block-size: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 1.1rem; cursor: pointer; }

/* Sombre */
[data-bs-theme="dark"] .lch, [data-bs-theme="dark"] .lch-scope { --lch-paper: #0f1a2b; --lch-ink: #e6ecf5; --lch-mute: #93a1b8; --lch-them: #17263d; }
[data-bs-theme="dark"] .lch-rec { background: rgba(226,70,91,.15); color: #ff8b9a; }
[data-bs-theme="dark"] .lch-form-err { background: rgba(226,70,91,.15); color: #ff9aa8; }

/* Mobile : fenêtre plein écran, bouton compact */
@media (max-width: 575.98px) {
  .lch { inset-inline-start: 12px; bottom: 12px; }
  .lch-launcher { padding: .35rem; }
  .lch-launcher-text { display: none; }
  .lch-launcher-ico { inline-size: 48px; block-size: 48px; }
  .lch-panel { position: fixed; inset: 0; inline-size: 100%; block-size: 100%; border-radius: 0; animation-name: lch-up; }
  @keyframes lch-up { from { transform: translateY(100%); } }
  .lch.is-open .lch-launcher { display: none; }
  .lch-grid { grid-template-columns: 1fr; }
}
body.reader-focus-mode .lch { display: none; }
@media print { .lch { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .lch *, .lch { animation: none !important; transition: none !important; } }

/* Alerte « nouveau message » sur toutes les pages de l'administration */
.lca-pop-toast { position: fixed; bottom: 1.4rem; inset-inline-end: 1.4rem; z-index: 2050; display: flex; align-items: center; gap: .8rem; inline-size: min(360px, calc(100vw - 2rem)); padding: .85rem 1rem; border-radius: 18px; text-decoration: none; color: #eef3fb; background: linear-gradient(140deg, #133f6e, #061a33); border: 1px solid rgba(227,179,65,.4); box-shadow: 0 26px 60px -20px rgba(0,0,0,.6); animation: lch-rise .5s cubic-bezier(.2,.9,.25,1.15); transition: opacity .5s, transform .5s; }
.lca-pop-toast.out { opacity: 0; transform: translateY(14px); }
.lca-pop-toast:hover { color: #fff; }
.lca-pop-ico { flex: none; inline-size: 44px; block-size: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.2rem; color: #071a33; background: linear-gradient(135deg, #f2d57e, #c9a227); animation: lch-pop .6s cubic-bezier(.2,1.6,.4,1); }
.lca-pop-toast span:last-child { display: grid; min-inline-size: 0; }
.lca-pop-toast small { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: #8ff0c6; }
.lca-pop-toast strong { font-size: .95rem; }
.lca-pop-toast em { font-style: normal; font-size: .82rem; color: #c3d0e2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-badge-live { background: #e2465b !important; color: #fff !important; }
