/* Cineco — Messages et IA Capri. */

/* Liste des conversations */
.chat { display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 10px 14px; border-radius: 24px; color: inherit; text-decoration: none; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  animation: cardin .45s var(--ease) backwards; transition: transform .3s var(--spring); }
.chat:active { transform: scale(.98); }
.chat b { display: block; font-size: 15px; font-weight: 600; }
.chat small { font-size: 13px; color: var(--ink-2); }
.chat.unread b { font-weight: 700; }
.chat.unread small { color: var(--ink); font-weight: 600; }
.chat-r { flex: none; display: grid; gap: 6px; justify-items: end; }
.chat-r time { font-size: 11.5px; color: var(--ink-2); }
.chat-r i { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 700; background: var(--grad); color: var(--accent-ink); }

/* Conversation : en-tête fixe en haut, barre d'écriture fixe en bas, au-dessus du menu */
.thread { display: flex; flex-direction: column; min-height: calc(100dvh - 120px); }
.th-top { position: sticky; top: 0; z-index: 6; display: flex; align-items: center; gap: 12px; margin: -14px -16px 0; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  background: rgba(14, 15, 18, .78); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); box-shadow: 0 1px 0 var(--line); }
.th-top .top-btn { text-decoration: none; }
.th-top b { font-size: 16px; font-weight: 600; }
.th-top.ia { justify-content: center; min-height: 62px; }
.th-peer { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; }
.th-log { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 16px 0 calc(150px + env(safe-area-inset-bottom, 0px)); }
.msg-day { align-self: center; margin: 10px 0 4px; font-size: 11.5px; color: var(--ink-2); text-transform: capitalize; }
.msg { max-width: 80%; display: grid; gap: 6px; padding: 10px 14px; font-size: 14.5px; line-height: 1.4; animation: msg-in .32s var(--ease) backwards; }
@keyframes msg-in { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.msg.mine { align-self: flex-end; border-radius: 22px 22px 6px 22px; background: linear-gradient(135deg, rgba(203, 213, 223, .26), rgba(163, 179, 194, .16)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .10); }
.msg.theirs { align-self: flex-start; border-radius: 22px 22px 22px 6px; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px var(--line); }
.msg.bare { padding: 6px; }
.msg-t { overflow-wrap: anywhere; }
.msg time { font-size: 10px; color: var(--ink-2); justify-self: end; }
.msg.bare time { padding: 0 8px 2px; }
.msg-img { display: block; max-width: 100%; max-height: 260px; border-radius: 16px; }

/* Carte d'œuvre */
.wcard { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 12px; width: 240px; max-width: 100%; padding: 8px; border: 0; border-radius: 18px; text-align: left; color: inherit;
  background: rgba(14, 15, 18, .42); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .10); transition: transform .3s var(--spring); }
.wcard:active { transform: scale(.97); }
.wc-p { aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; background: #1D1E24; }
.wc-p img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wc-i { display: grid; gap: 3px; align-content: center; min-width: 0; }
.wc-i b { font-size: 14px; font-weight: 600; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wc-i small { font-size: 11.5px; color: var(--ink-2); }
.wc-n { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.wc-n i { font-style: normal; font-weight: 500; color: var(--ink-2); font-size: 11px; }
.wc-i em { font-style: normal; font-size: 11.5px; color: var(--ink-2); margin-top: 2px; }

/* Barre d'écriture */
.dm-bar2 { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 19; width: min(calc(100% - 24px), 680px); display: flex; align-items: center; gap: 8px; padding: 6px;
  border-radius: 999px; background: rgba(30, 31, 37, .86); box-shadow: var(--sh), inset 0 0 0 1px var(--line); -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%); }
.dm-bar2 input { flex: 1; min-width: 0; min-height: 40px; border: 0; background: none; outline: none; font-size: 15px; padding: 0 4px; }
.dm-plus2 { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; padding: 0; display: grid; place-items: center; color: var(--ink); background: rgba(255, 255, 255, .10); transition: transform .35s var(--spring), background .2s; }
.dm-plus2 svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.dm-plus2.on { transform: rotate(45deg); background: rgba(255, 255, 255, .18); }
.dm-menu { position: absolute; left: 0; bottom: calc(100% + 10px); display: grid; gap: 2px; min-width: 230px; padding: 6px; border-radius: 22px; background: rgba(30, 31, 37, .96); box-shadow: var(--sh), inset 0 0 0 1px var(--line);
  -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); transform-origin: 20px 100%; animation: menu-in .28s var(--spring) backwards; }
@keyframes menu-in { from { opacity: 0; transform: scale(.86) translateY(8px); } }
.dm-menu button { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 8px 14px; border: 0; border-radius: 16px; background: none; color: inherit; font-weight: 600; font-size: 14px; text-align: left; }
.dm-menu button:active { background: rgba(255, 255, 255, .08); }
.dm-menu svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Capri */
.ia-orb { display: block; width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle at 32% 28%, #F4F6F8 0%, #B9C7D4 34%, #5E6F80 72%, #2A323B 100%); box-shadow: 0 0 40px rgba(185, 199, 212, .28), inset 0 0 0 1px rgba(255, 255, 255, .22); animation: orb 5s ease-in-out infinite; }
.ia-orb.sm { width: 26px; height: 26px; animation: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
@keyframes orb { 50% { transform: scale(1.06); box-shadow: 0 0 60px rgba(185, 199, 212, .40), inset 0 0 0 1px rgba(255, 255, 255, .22); } }
.ia-hello { margin: auto; display: grid; gap: 8px; justify-items: center; text-align: center; padding: 40px 0; animation: cine-tab .5s var(--ease) backwards; }
.ia-hello b { font-size: 20px; }

/* Appui long : l'élément ressort, le fond s'assombrit, un menu apparaît */
[data-hold] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; transition: transform .35s var(--spring); }
[data-hold].pressing { transform: scale(.97); }
.hold-ov { position: fixed; inset: 0; z-index: 90; background: rgba(6, 7, 9, 0); -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); transition: background .25s, backdrop-filter .25s, -webkit-backdrop-filter .25s; }
.hold-ov.on { background: rgba(6, 7, 9, .55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.hold-ghost { z-index: 2; pointer-events: none; animation: none !important; transition: transform .38s var(--spring); }
.hold-ov.on .hold-ghost { transform: scale(1.04); }
.hold-menu { position: fixed; z-index: 3; min-width: 210px; display: grid; padding: 6px; border-radius: 20px; background: rgba(34, 35, 42, .94); box-shadow: 0 18px 50px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .10);
  -webkit-backdrop-filter: blur(24px) saturate(140%); backdrop-filter: blur(24px) saturate(140%); transform-origin: 20px 0; opacity: 0; transform: scale(.85); transition: opacity .2s, transform .35s var(--spring); }
.hold-menu.end { transform-origin: calc(100% - 20px) 0; }
.hold-ov.on .hold-menu { opacity: 1; transform: none; }
.hold-menu button { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 46px; padding: 0 14px; border: 0; border-radius: 14px; background: none; color: var(--ink); font: inherit; font-size: 15px; text-align: left; }
.hold-menu button + button { box-shadow: 0 -1px 0 rgba(255, 255, 255, .07); border-radius: 0 0 14px 14px; }
.hold-menu button:active { background: rgba(255, 255, 255, .08); }
.hold-menu button.danger { color: #FF6B6B; }
.hold-menu svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Confirmation */
.cf-box { display: grid; text-align: center; padding: 22px 6px 4px; gap: 8px; }
.cf-box h3 { margin: 0; font-size: 17px; }
.cf-box p { margin: 0 8px 10px; font-size: 13.5px; color: var(--ink-2); line-height: 1.4; }
.cf-acts { display: grid; margin: 6px -6px -4px; }
.cf-acts button { min-height: 50px; border: 0; background: none; font: inherit; font-size: 15px; color: var(--ink); box-shadow: 0 -1px 0 var(--line); }
.cf-acts .cf-ok { color: #FF6B6B; font-weight: 700; }

/* Disparition douce */
.vanish { overflow: hidden; opacity: 0; transform: scale(.92); margin-top: 0 !important; margin-bottom: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important;
  transition: opacity .25s, transform .3s var(--ease), height .32s var(--ease), padding .32s var(--ease), margin .32s var(--ease); }
.my-drop { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; color: #FF7A7A; font-size: 13.5px; }
.my-drop svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* Alerte de prévention (Réglages avancés, Questionnaire de goûts) */
.prev-box { gap: 10px; padding-top: 24px; }
.prev-ic { justify-self: center; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; font-weight: 800; font-size: 20px; color: #f1d9a0; background: rgba(230, 200, 130, .14); box-shadow: inset 0 0 0 1px rgba(230, 200, 130, .3); }
.prev-list { margin: 0 6px; padding-left: 20px; display: grid; gap: 6px; text-align: left; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.prev-mute { justify-self: center; display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 2px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.prev-mute input { width: 18px; height: 18px; accent-color: #cfd8e2; }
.prev-box .prev-ok { color: var(--ink); }
