/* Appel — mobile d'abord. Clair ou sombre selon le réglage du téléphone. Plat, sans ombre lourde et sans effet de
   verre (une seule exception : la bande des fonds pendant l'appel, .bg-strip-wrap) : ces effets coûtent cher au
   processeur graphique des téléphones d'entrée de gamme. Deux petits flous fixes restent (relecture du 8 novembre :
   l'ancien commentaire disait « sans flou ») : l'aperçu d'une photo pas encore reçue (.photo-msg img.blur) et la case
   « Flou » du choix du fond (.bg-blur).
   Boutons principaux (.btn, .icon-btn, lignes de menu) de 48 px au moins ; les boutons secondaires plus petits (pastilles,
   langue de l'en-tête, Déconnexion, filtres, boutons des chaînes : 26 à 44 px) se touchent quand même sur 48 px (zone
   invisible, « Cibles de 48 px » plus bas ; maquette miroir-cibles-clavier-1, 9 novembre, comme Android que Compose agrandit seul).
   En arabe, tout se retourne : côtés et coins écrits en « début / fin » (inset-inline, border-end-*), jamais gauche / droite.
   Tout tient au pouce (onglets et boutons en bas). */

:root {
    --bg: #ffffff;
    --bg-soft: #f5f6f6;
    --surface: #ffffff;
    --surface-2: #f0f2f2;
    --surface-3: #e4e8e9;
    --line: #e5e8ea;
    --text: #111b21;
    --muted: #54656f;
    --dim: #8696a0;
    --brand: #158a55;
    --brand-strong: #0f7346;
    --brand-ink: #ffffff;
    --brand-soft: #def3e7;
    --brand-text: #0f7346;
    --red: #d92d3a;
    --red-soft: #fde8ea;
    --amber: #f0a020;
    --amber-bg: #fff3d6;
    --amber-ink: #6b4a00;
    /* Encadrés « attention » de la sécurité et invitation dans l'équipe : en sombre, leur version sombre (maquette antenne-tons-1,
       9 novembre ; avant : le fond clair restait en thème sombre) ; mêmes valeurs que Security.kt et Channel.kt */
    --warn-bg: #faeeda;
    --warn-ink: #633806;
    --invite-bg: #efe7f7;
    --invite-line: #d9c9ee;
    --invite-ink: #4b2f73;
    --accent: #1f6fd1;
    --chat-bg: #eef1ef;
    /* Bulles (25 octobre, finition) : l'autre à gauche sur un gris clair, moi à droite sur un vert doux */
    --bubble-in: #ffffff;
    --bubble-out: #dcf3e5;
    --read: #1f8ff0;
    --shadow: 0 1px 2px rgba(17, 27, 33, .12);
    --radius: 14px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --tabbar-h: 64px;
    color-scheme: light dark;
}

/* Sombre : selon l'appareil (Automatique), ou choisi dans Réglages → Apparence (html[data-theme], 21 octobre 2026) */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0f1416;
        --bg-soft: #12181b;
        --surface: #161d20;
        --surface-2: #1f272b;
        --surface-3: #2a3338;
        --line: #232d32;
        --text: #e9edef;
        --muted: #9aa7ad;
        --dim: #6f7c82;
        --brand: #2bb673;
        --brand-strong: #34c37f;
        --brand-ink: #03210f;
        --brand-soft: #123d27;
        --brand-text: #5fd59a;
        --red: #f0525d;
        --red-soft: #3a1418;
        --amber-bg: #3a2a0c;
        --amber-ink: #ffd27a;
        --warn-bg: #3a2a0c;
        --warn-ink: #ffd27a;
        --invite-bg: #251d33;
        --invite-line: #4b3a6b;
        --invite-ink: #d9c9ee;
        --accent: #6aa9ff;
        --chat-bg: #0b1113;
        --bubble-in: #1f2a2e;
        --bubble-out: #11402b;
        --read: #53bdeb;
        --shadow: none;
    }
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0f1416;
    --bg-soft: #12181b;
    --surface: #161d20;
    --surface-2: #1f272b;
    --surface-3: #2a3338;
    --line: #232d32;
    --text: #e9edef;
    --muted: #9aa7ad;
    --dim: #6f7c82;
    --brand: #2bb673;
    --brand-strong: #34c37f;
    --brand-ink: #03210f;
    --brand-soft: #123d27;
    --brand-text: #5fd59a;
    --red: #f0525d;
    --red-soft: #3a1418;
    --amber-bg: #3a2a0c;
    --amber-ink: #ffd27a;
    --warn-bg: #3a2a0c;
    --warn-ink: #ffd27a;
    --invite-bg: #251d33;
    --invite-line: #4b3a6b;
    --invite-ink: #d9c9ee;
    --accent: #6aa9ff;
    --chat-bg: #0b1113;
    --bubble-in: #1f2a2e;
    --bubble-out: #11402b;
    --read: #53bdeb;
    --shadow: none;
}
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body {
    font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
    overscroll-behavior: none;
    -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; text-align: inherit; }
input, textarea, .field select {
    width: 100%;
    background: var(--surface-2);
    border: 1.5px solid transparent;
    border-radius: 12px;
    padding: 13px 15px;
    outline: none;
}
input:focus, textarea:focus, .field select:focus { border-color: var(--brand); }
input::placeholder, textarea::placeholder { color: var(--dim); }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; }
.icon { display: inline-flex; line-height: 0; flex-shrink: 0; }
/* Drapeaux des langues (ui/flags.js), ronds */
.flag { display: inline-flex; line-height: 0; flex-shrink: 0; }
.flag-pair { display: inline-flex; align-items: center; gap: 5px; }
/* « 🇫🇷 → 🇸🇦 » se lit toujours de gauche à droite, même dans l'app en arabe (sinon la flèche dit le contraire) */
.flag-pair, .lang-badge, .lp-call, .vs-lang { direction: ltr; unicode-bidi: isolate; }
/* La flèche dessinée entre deux langues et le chevron au bout d'un texte (maquette antenne-tons-1, 9 novembre ; avant : « → » et
   « › » de la police) */
.lang-badge .lang-arrow svg, .flag-pair .lang-arrow svg, .vs-lang .lang-arrow svg, .lp-call .lang-arrow svg { stroke-width: 2.4; }
.with-chevron { display: inline-flex; align-items: center; }
.with-chevron .inline-icon { margin-inline: 2px 0; }
.menu-item > .icon.chosen { margin-inline-start: auto; --ic: var(--brand-text) !important; }
.lang-btn .flag { margin-inline-end: 4px; }
.lang-badge .flag, .vs-lang .flag { margin: 0 2px; }
/* Icônes en couleur (23 octobre : « l'âge du noir et blanc est révolu ») : trait vif et fond doux de la couleur de
   l'icône (--ic, donnée par icons.js) ; sans couleur, celle du texte. */
.icon svg { stroke: var(--ic, currentColor); }
.icon svg .d { fill: var(--ic, currentColor); fill-opacity: var(--ic-fo, .18); }
/* Une icône au fil d'un texte, à la place d'un émoji (maquette icones-restes-1, 9 novembre) */
.inline-icon { vertical-align: -2px; margin-inline: 1px 3px; }
.icon svg .s, .icon svg .s * { fill: var(--ic, currentColor); stroke: none; }
/* Sur un bouton déjà coloré, une tuile de couleur ou un écran sombre (appel, vidéo, lecture) : l'icône reste de la
   couleur du texte, pour rester lisible */
.icon.icon-mono, .btn-brand .icon, .btn-red .icon, .icon-btn.light .icon, .swipe-action .icon, .session-btn .icon,
.forward-row .box .icon, .voice .play .icon, .round-btn .icon, .ctl .icon, .call .icon, .viewer .icon,
.video-recorder .icon, .voice-screen .icon, .vs-play .icon, .round-ghost .icon, .toast .icon,
.dial-call .icon, .fab .icon, .action-disc .icon, .photo-badge .icon, .acc-disc .icon, .empty-icon .icon, .guest-round .icon {
    --ic: currentColor !important; --ic-fo: 0;
}
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); margin: 0; }
.small { font-size: 13px; }
.center { text-align: center; }
.hint { color: var(--muted); font-size: 13px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ───────── Démarrage, inscription ───────── */
.boot { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--muted); }
/* Le logo de Mennana (21 octobre 2026) : le M de deux voix dans la fibule ; il respire pendant le chargement */
.boot-logo { display: block; width: 48px; height: 48px; background: url(/img/logo.svg) center / contain no-repeat; animation: pulse 1.2s infinite ease-in-out; }
.boot-logo span { display: none; }
@keyframes pulse { 50% { opacity: .35; } }
.noscript { padding: 24px; text-align: center; }

.welcome {
    min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; gap: 18px;
    padding: calc(24px + var(--safe-top)) 20px calc(24px + var(--safe-bottom)); max-width: 460px; margin: 0 auto;
}
.welcome h1 { font-size: 30px; letter-spacing: -.02em; }
.welcome p.lead { color: var(--muted); margin: 0; }
.welcome .perm-list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.switch-line { text-align: center; color: var(--muted); margin: 0; }
.welcome > .link-btn { align-self: center; }
.invite-card { background: var(--surface-2); border-radius: var(--radius); padding: 16px; display: flex; gap: 14px; align-items: center; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; color: var(--muted); font-weight: 600; }
.field .hint { font-size: 13px; color: var(--muted); }
/* Mot de passe avec son œil (23 octobre) */
.pw-box { position: relative; display: flex; }
.pw-box input { flex: 1; padding-inline-end: 48px; }
.pw-eye { position: absolute; inset-inline-end: 2px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; cursor: pointer; }
.secret-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px; border-radius: var(--radius); background: var(--surface-2); }
.secret-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.secret-value { font-size: 22px; font-weight: 700; word-break: break-all; text-align: center; user-select: all; }
.error { color: var(--red); font-size: 14px; min-height: 1em; margin: 0; }
.number-big {
    font-variant-numeric: tabular-nums; font-size: 44px; font-weight: 800; letter-spacing: .04em;
    text-align: center; padding: 18px; border-radius: var(--radius); background: var(--surface-2);
}
.tip { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-text); font-size: 14px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; }
.steps li .icon { color: var(--brand-text); margin-top: 1px; }
.steps.numbered { counter-reset: step; }
.steps.numbered li::before {
    counter-increment: step; content: counter(step);
    width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; background: var(--brand-soft); color: var(--brand-text);
    display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
}

/* ───────── Boutons ───────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 52px; padding: 0 22px; border-radius: 26px; width: 100%;
    font-weight: 650; font-size: 17px; background: var(--surface-2); color: var(--text);
}
.btn:active { filter: brightness(.95); }
.btn-brand { background: var(--brand); color: var(--brand-ink); }
.btn-red { background: var(--red); color: #fff; }
.btn-ghost { background: transparent; border: 1.5px solid var(--line); }
.btn:disabled { opacity: .6; }
.link-btn { color: var(--brand-text); font-weight: 650; padding: 10px 4px; }
.text-btn { color: var(--brand-text); font-weight: 650; padding: 0 14px; min-height: 48px; }
/* Une seule règle (relecture du 6 novembre : .chip était défini deux fois, la seconde, faite pour les pastilles d'un vocal,
   écrasait la moitié de celle-ci). Valeurs gardées telles qu'elles s'affichaient, rien ne change à l'écran. */
.chip {
    display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 4px 9px; border-radius: 14px; border: 0;
    background: var(--brand-soft); color: var(--brand-text); font: inherit; font-size: 12.5px; white-space: nowrap; cursor: pointer;
}
.chip.warn { background: var(--amber-bg); color: var(--amber-ink); }
.chip.ghost { background: var(--surface-2); color: var(--muted); }
.icon-btn {
    width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center; color: var(--text);
}
.icon-btn:active { background: var(--surface-2); }
.icon-btn.brand { color: var(--brand-text); }
.icon-btn.light { color: #fff; }
.icon-btn.light:active { background: rgba(255, 255, 255, .14); }

/* ───────── Mise en page : liste + détail ───────── */
.layout { display: flex; height: 100dvh; overflow: hidden; }
.side-col { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); }
.list-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.detail-pane { display: none; flex: 1; min-width: 0; flex-direction: column; background: var(--bg); }
.layout.has-detail .side-col { display: none; }
.layout.has-detail .detail-pane { display: flex; }
body.has-callbar .layout { height: calc(100dvh - 44px - var(--safe-top)); margin-top: calc(44px + var(--safe-top)); }

.tab-screen, .detail-screen { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.tab-screen .scroll { padding-bottom: 88px; }

.tabbar {
    display: flex; flex-shrink: 0; height: calc(var(--tabbar-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom);
    border-top: 1px solid var(--line); background: var(--bg);
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 12px; font-weight: 600; }
.tab-icon { position: relative; display: flex; align-items: center; justify-content: center; width: 60px; height: 32px; border-radius: 16px; }
.tab.selected { color: var(--text); }
/* Écran de 320 px : « Discussions » (71 px à 12 px) dépassait de sa case de 64 px ; jamais sur deux lignes (6 novembre 2026,
   comme TabLabel d'Android) */
@media (max-width: 340px) { .tab { font-size: 10.5px; white-space: nowrap; } }
.tab.selected .tab-icon { background: var(--brand-soft); color: var(--brand-text); }
.tab-badge {
    position: absolute; top: -3px; inset-inline-end: 6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
    background: var(--brand); color: var(--brand-ink); font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--bg);
}

.topbar {
    flex-shrink: 0; display: flex; align-items: center; gap: 4px;
    min-height: calc(58px + var(--safe-top)); padding: var(--safe-top) 4px 0 8px;
    background: var(--bg);
}
.topbar h1 { font-size: 20px; font-weight: 700; flex: 1; min-width: 0; padding-inline-start: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar.big { padding-inline-start: 16px; min-height: calc(62px + var(--safe-top)); }
.topbar.big h1 { font-size: 26px; padding-inline-start: 0; letter-spacing: -.01em; }
.topbar .title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar .title strong { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .title small { color: var(--muted); font-size: 13px; }
.topbar .big-title { flex-direction: row; align-items: baseline; gap: 10px; }
.topbar .big-title small { font-size: 14px; }

.search-wrap { padding: 2px 16px 8px; flex-shrink: 0; }
.search {
    display: flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 22px; background: var(--surface-2); color: var(--muted);
}
.search input { background: transparent; border: 0; padding: 10px 0; min-height: 42px; }

.banner { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 16px; font-size: 14px; background: var(--amber-bg); color: var(--amber-ink); }
.banner.notice { background: var(--brand-soft); color: var(--brand-text); padding-block: 8px; padding-inline: 16px 6px; }
.banner .grow { flex: 1; min-width: 0; line-height: 1.35; }
.banner.full { align-items: flex-start; }
.banner.full b { display: block; font-weight: 600; }
.banner .chip { flex: none; }
.banner .icon-btn { flex: none; width: 36px; height: 36px; color: inherit; }
.perm-act { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

/* ───────── Listes ───────── */
.list { list-style: none; margin: 0; padding: 0; }
.row {
    position: relative; display: flex; align-items: center; gap: 14px; width: 100%; text-align: start;
    min-height: 72px; padding: 8px 16px;
}
.row:active, .row.active { background: var(--surface-2); }
.row .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 4px 0; }
.list > li + li > .row .main { border-top: 0; }

/* Lignes qu'on fait glisser (Discussions, Appels) : les actions sont dessous */
.swipe-row { position: relative; overflow: hidden; }
.swipe-content { position: relative; z-index: 1; background: var(--bg); touch-action: pan-y; }
.swipe-action { position: absolute; inset: 0; display: flex; align-items: center; color: #fff; font-size: 13px; font-weight: 600; visibility: hidden; }
.swipe-action.end { justify-content: flex-end; }
.swipe-action.start { justify-content: flex-start; }
.swipe-action.danger { background: var(--red); }
.swipe-action.info { background: var(--accent); }
.swipe-inner { width: 84px; display: flex; flex-direction: column; align-items: center; gap: 4px; transition: transform .15s ease; }
.swipe-row.show-end .swipe-action.end, .swipe-row.show-start .swipe-action.start { visibility: visible; }
.swipe-row.armed .swipe-inner { transform: scale(1.12); }
.badge.dot { min-width: 12px; width: 12px; height: 12px; padding: 0; }
.row .top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.row .name { font-weight: 600; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .name.missed { color: var(--red); }
.row .sub { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; gap: 4px; align-items: center; }
.row .sub.online { color: var(--brand-text); }
.row .time { color: var(--dim); font-size: 12.5px; flex-shrink: 0; }
.row .time.unread { color: var(--brand-text); font-weight: 700; }
.row .preview { color: var(--muted); font-size: 15px; display: flex; gap: 4px; align-items: center; min-width: 0; }
.row .preview.missed { color: var(--red); }
.row.person .row-hit { position: absolute; inset: 0; border-radius: 0; }
.row.person > :not(.row-hit) { position: relative; pointer-events: none; }
.row.person > .icon-btn { pointer-events: auto; z-index: 1; }
.call-sub.in .icon { color: var(--brand-text); }
.call-sub.out .icon { color: var(--muted); }
.call-sub.missed, .call-sub.missed .icon { color: var(--red); }
.action-row { min-height: 64px; }
.action-disc {
    width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    background: var(--brand); color: var(--brand-ink);
}
.list .letter { padding: 14px 16px 4px; color: var(--brand-text); font-size: 14px; font-weight: 700; }
.list .section { padding: 16px 16px 6px; color: var(--muted); font-size: 14px; font-weight: 600; }
.badge {
    min-width: 21px; height: 21px; padding: 0 6px; border-radius: 11px; background: var(--brand); color: var(--brand-ink);
    font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.st { display: inline-flex; color: var(--dim); }
.st.read { color: var(--read); }
.st.failed { color: var(--red); }
.avatar { position: relative; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; }
.avatar-md { width: 50px; height: 50px; font-size: 18px; }
.avatar-sm { width: 40px; height: 40px; font-size: 15px; }
.avatar-lg { width: 64px; height: 64px; font-size: 24px; }
.avatar-xl { width: 116px; height: 116px; font-size: 40px; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.online-dot { z-index: 1; position: absolute; inset-inline-end: 0; bottom: 1px; width: 14px; height: 14px; border-radius: 50%; background: var(--brand); border: 2.5px solid var(--bg); }
.empty { text-align: center; color: var(--muted); padding: 40px 28px; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.empty strong { color: var(--text); font-size: 19px; }
.empty .btn { max-width: 320px; }
.empty.small { padding: 24px 20px; font-size: 15px; }
.empty-icon { width: 76px; height: 76px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-text); display: flex; align-items: center; justify-content: center; }
.fab {
    position: absolute; inset-inline-end: 16px; bottom: 16px; z-index: 6;
    width: 58px; height: 58px; border-radius: 18px; background: var(--brand); color: var(--brand-ink);
    display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}
.fab:active { background: var(--brand-strong); }
.placeholder { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); background: var(--bg-soft); }
.placeholder strong { color: var(--text); font-size: 22px; }

/* ───────── Fiche contact, réglages ───────── */
.contact-sheet { padding-bottom: 32px; }
.contact-head { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 20px 18px; text-align: center; }
.contact-head h2 { font-size: 26px; margin-top: 8px; }
.number-line { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 18px; font-variant-numeric: tabular-nums; letter-spacing: .03em; padding: 6px 10px; border-radius: 10px; }
.number-line:active { background: var(--surface-2); }
.contact-head .status { color: var(--muted); font-size: 14px; }
.contact-head .status.online { color: var(--brand-text); }
.big-actions { display: flex; justify-content: center; gap: 12px; padding: 0 16px 18px; }
.big-action {
    flex: 1; max-width: 116px; min-height: 76px; border-radius: 16px; border: 1px solid var(--line);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--brand-text); font-weight: 600; font-size: 14px;
}
.big-action span { color: var(--text); }
.big-action:active { background: var(--surface-2); }
.big-actions.blocked .big-action { opacity: .45; }
.menu-list { border-top: 8px solid var(--bg-soft); }
.menu-item { display: flex; align-items: center; gap: 18px; width: 100%; min-height: 56px; padding: 8px 20px; text-align: start; font-size: 16px; }
.menu-item > span:not(.icon):not(.switch):not(.flag):not(.lang-num) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.menu-item small { color: var(--muted); font-size: 13px; }
.menu-item .menu-status { flex: none; }
.menu-item small { overflow-wrap: anywhere; }
/* Aucune voix du genre choisi sur cet appareil (maquette maj-voix-1) : une ligne de plus, plus discrète */
.menu-item small.voice-missing { display: block; font-size: 12.5px; line-height: 1.35; margin-top: 3px; }
.menu-item > .icon { color: var(--muted); }
.menu-item.danger, .menu-item.danger > .icon { color: var(--red); }
.menu-item:active { background: var(--surface-2); }
.menu-item.static:active { background: none; }
.switch { width: 46px; height: 28px; border-radius: 14px; background: var(--surface-3); position: relative; flex-shrink: 0; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); transition: transform .15s; }
.switch.on { background: var(--brand); }
.switch.on::after { transform: translateX(18px); }
[dir="rtl"] .switch.on::after { transform: translateX(-18px); }

.settings { padding-bottom: 40px; }
.profile-card { display: flex; align-items: center; gap: 14px; width: 100%; padding: 12px 16px 14px; text-align: start; }
.photo-edit { position: relative; flex-shrink: 0; }
.photo-badge {
    position: absolute; inset-inline-end: -2px; bottom: -2px; width: 26px; height: 26px; border-radius: 50%;
    background: var(--brand); color: var(--brand-ink); display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg);
}
.profile-card .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.profile-card strong { font-size: 20px; }
.profile-card > .icon { color: var(--muted); }
.number-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; padding: 0 16px 16px; }
.acc { margin: 4px 12px 8px; border: 1px solid var(--line, rgba(0,0,0,.08)); border-radius: 14px; overflow: hidden; background: var(--bg); }
/* Réglages en accordéon (22 octobre) : titre et résumé ; une seule section ouverte ; rond coloré par section */
.acc-item + .acc-item { border-top: 1px solid var(--line, rgba(0,0,0,.08)); }
.acc-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: start; background: none; border: 0; font: inherit; color: inherit; cursor: pointer; }
.acc-head > .icon { color: var(--muted); }
.acc-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; font-weight: 600; font-size: 15px; }
.acc-title small { font-weight: 400; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-title small.attention { color: #c62828; font-weight: 600; }
.acc-disc { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.acc-body { padding: 0 0 8px; }
.acc-body .list { margin: 0; }
.tone-red { background: #fcebeb; color: #a32d2d; }
.tone-blue { background: #e6f1fb; color: #185fa5; }
.tone-teal { background: #e1f5ee; color: #0f6e56; }
.tone-amber { background: #faeeda; color: #854f0b; }
.tone-purple { background: #eeedfe; color: #534ab7; }
.tone-green { background: #eaf3de; color: #3b6d11; }
.tone-pink { background: #fbeaf0; color: #993556; }
.tone-coral { background: #faece7; color: #993c1d; }
.ringing-tips { margin-block: 4px; margin-inline: 52px 16px; padding: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .tone-red { background: #791f1f; color: #fcebeb; }
    :root:not([data-theme="light"]) .tone-blue { background: #0c447c; color: #e6f1fb; }
    :root:not([data-theme="light"]) .tone-teal { background: #085041; color: #e1f5ee; }
    :root:not([data-theme="light"]) .tone-amber { background: #633806; color: #faeeda; }
    :root:not([data-theme="light"]) .tone-purple { background: #3c3489; color: #eeedfe; }
    :root:not([data-theme="light"]) .tone-green { background: #27500a; color: #eaf3de; }
    :root:not([data-theme="light"]) .tone-pink { background: #72243e; color: #fbeaf0; }
    :root:not([data-theme="light"]) .tone-coral { background: #712b13; color: #faece7; }
    :root:not([data-theme="light"]) .acc-title small.attention { color: #f09595; }
}
:root[data-theme="dark"] .tone-red { background: #791f1f; color: #fcebeb; }
:root[data-theme="dark"] .tone-blue { background: #0c447c; color: #e6f1fb; }
:root[data-theme="dark"] .tone-teal { background: #085041; color: #e1f5ee; }
:root[data-theme="dark"] .tone-amber { background: #633806; color: #faeeda; }
:root[data-theme="dark"] .tone-purple { background: #3c3489; color: #eeedfe; }
:root[data-theme="dark"] .tone-green { background: #27500a; color: #eaf3de; }
:root[data-theme="dark"] .tone-pink { background: #72243e; color: #fbeaf0; }
:root[data-theme="dark"] .tone-coral { background: #712b13; color: #faece7; }
:root[data-theme="dark"] .acc-title small.attention { color: #f09595; }
/* En-tête des onglets (22 octobre) : la langue de l'app et Connexion / Déconnexion, côte à côte */
.lang-btn { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg); color: inherit; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; flex-shrink: 0; }
.session-btn { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px; border-radius: 16px; border: 0; color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; flex-shrink: 0; }
.session-btn.out { background: #d93636; }
/* Vert foncé de Mennana, le même en clair et en sombre : blanc dessus 5,9 pour 1 (maquette restes-visuels-1, 10 novembre 2026 ;
   avant #1f9d55, 3,5 pour 1, sous le minimum de lecture) */
.session-btn.in { background: #0f7346; }
.landing-top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 400px) { .topbar .session-btn > span:not(.icon) { display: none; } .topbar .session-btn { padding: 0 9px; } }
/* Transférer (22 octobre) : la marque sur la bulle, et la liste des contacts à cocher */
.msg.np { outline: 1px solid #d9a441; outline-offset: -1px; }
.np-label { display: flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; font: inherit; font-size: 12px; color: #a56a00; margin-bottom: 3px; text-align: start; cursor: pointer; }
:root[data-theme="dark"] .np-label { color: #e6b45c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .np-label { color: #e6b45c; } }
.fw-label { display: flex; align-items: center; gap: 4px; font-size: 12px; font-style: italic; color: var(--muted); margin-bottom: 3px; }
.forward-sheet input[type="search"] { width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: inherit; font: inherit; }
.forward-list { display: flex; flex-direction: column; max-height: 50vh; overflow-y: auto; }
.forward-row { display: flex; align-items: center; gap: 12px; padding: 8px 4px; border-radius: 10px; text-align: start; }
.forward-row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.forward-row .box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.forward-row.on .box { background: var(--brand); border-color: var(--brand); color: #fff; }
.perm { display: flex; align-items: center; gap: 14px; padding: 10px 16px; min-height: 68px; }
.perm .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.perm .name { font-weight: 600; }
.perm .sub { color: var(--muted); font-size: 13px; }
.perm .action-disc { width: 42px; height: 42px; background: var(--brand-soft); color: var(--brand-text); }
.perm .chip { padding: 0 12px; font-size: 13.5px; }
.perm-ok { display: inline-flex; align-items: center; gap: 4px; color: var(--brand-text); font-weight: 650; font-size: 14px; white-space: nowrap; }

/* ───────── Listes en plein écran (nouvelle discussion, nouvel appel) ───────── */
.overlay { position: fixed; inset: 0; z-index: 35; background: var(--bg); display: flex; flex-direction: column; }
.overlay-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; width: 100%; }
.overlay .scroll { padding-bottom: calc(24px + var(--safe-bottom)); }

/* Clavier pour composer un numéro */
.sheet.sheet-dialer { gap: 6px; padding-top: 22px; }
.dialer { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dial-display { font-size: 38px; font-weight: 600; letter-spacing: .06em; font-variant-numeric: tabular-nums; min-height: 50px; }
.dial-display.empty { color: var(--dim); font-weight: 400; font-size: 26px; letter-spacing: 0; }
.dial-who { min-height: 22px; color: var(--brand-text); font-weight: 600; }
.dial-who.error { color: var(--red); }
.keys { display: grid; grid-template-columns: repeat(3, 76px); gap: 14px 26px; margin: 6px 0; }
.key { width: 76px; height: 76px; border-radius: 50%; background: var(--surface-2); font-size: 30px; font-weight: 500; display: flex; align-items: center; justify-content: center; }
.key:active { background: var(--surface-3); }
.key-del { background: none; color: var(--muted); }
.dial-actions { display: grid; grid-template-columns: repeat(3, 76px); gap: 26px; justify-items: center; margin: 6px 0 4px; }
.dial-btn { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--brand-text); background: var(--brand-soft); }
.dial-btn.dial-call { width: 76px; height: 76px; background: var(--brand); color: var(--brand-ink); }

/* ───────── Conversation ───────── */
.chat { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--chat-bg); }
/* Fichiers glissés sur la discussion : un cadre montre où les lâcher */
.chat { position: relative; }
/* Sélection de plusieurs messages : la barre remplace l'en-tête, les messages cochés sont surlignés */
.select-bar { position: absolute; top: 0; inset-inline: 0; z-index: 6; background: var(--surface-2); }
.select-bar .select-count { flex: 1; min-width: 0; font-size: 18px; padding-inline-start: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.check-row { display: flex; gap: 10px; align-items: center; font-size: 15px; cursor: pointer; }
.check-row input { width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--red); }
.select-bar .select-all { width: auto; min-height: 40px; padding: 0 10px; white-space: nowrap; flex-shrink: 0; }
.chat .selecting [data-k] { cursor: pointer; }
/* Une case ronde devant chaque message (24 octobre : « clair et connu, sans devinette ») : vide, ou cochée */
.chat .messages.selecting { padding-inline-start: 44px; }
.chat .selecting [data-k] { position: relative; overflow: visible; }
.chat .selecting [data-k]::before {
    content: ''; position: absolute; inset-inline-start: -36px; top: 50%; width: 24px; height: 24px; margin-top: -12px;
    border-radius: 50%; border: 2px solid var(--muted); box-sizing: border-box; display: grid; place-items: center;
    font-size: 15px; font-weight: 700; color: #fff; background: var(--surface);
}
/* La coche dessinée, comme ic_check_circle d'Android (maquette antenne-tons-1, 9 novembre ; avant : « ✓ » de la police) */
.chat .selecting [data-k].selected::before {
    content: ''; border-color: var(--brand);
    background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 12.5 10 16.5 18 8'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.select-delete { padding: 10px 16px; }
.select-delete .btn { width: 100%; min-height: 52px; display: flex; gap: 8px; align-items: center; justify-content: center; font-weight: 700; }
.select-delete .btn:disabled { background: var(--surface-2); color: var(--muted); }
.chat [data-k].selected { outline: 3px solid var(--brand); outline-offset: 2px; background-image: linear-gradient(color-mix(in srgb, var(--brand) 18%, transparent), color-mix(in srgb, var(--brand) 18%, transparent)); }
.chat.dropping::after { content: ''; position: absolute; inset: 8px; border: 3px dashed var(--brand); border-radius: 16px; background: color-mix(in srgb, var(--brand) 10%, transparent); pointer-events: none; z-index: 5; }
.chat .topbar { border-bottom: 1px solid var(--line); }
.chat-title { flex-direction: row !important; align-items: center; gap: 10px; text-align: start; padding: 4px; border-radius: 10px; }
.chat-title:active { background: var(--surface-2); }
.chat-title .title-text { min-width: 0; display: flex; flex-direction: column; }
.chat-title small.online { color: var(--brand-text); }
.messages { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 10px 14px; display: flex; flex-direction: column; gap: 3px; overscroll-behavior: contain; }
/* Largeur, coins et côté (gauche ou droite) des bulles : dans la « Finition » plus bas */
/* Une seule règle .msg (lot 5 des restes, 11 novembre 2026 : elle était écrite en trois fois, ici, à « Appui long » et à
   « Finition » ; aucune règle de même poids entre elles ne touchait ces propriétés, l'écran ne change pas). Bulles à gauche
   et à droite (Finition, 25 octobre 2026) ; le coin pointu du côté du bord, en arabe aussi (comme Android, Chats.kt :
   RoundedCornerShape en début / fin). */
.msg {
    padding: 7px 10px 5px 11px; background: var(--bubble-in);
    word-wrap: break-word; white-space: pre-wrap; box-shadow: var(--shadow); font-size: 16px;
    width: fit-content; max-width: min(80%, 600px); min-width: 72px; align-self: flex-start; border-radius: 14px; border-end-start-radius: 4px;
    transition: transform .12s, filter .12s;
}
.msg.mine { background: var(--bubble-out); }
/* Photos et vidéos : la bulle garde la taille de l'image */
.msg.media { width: auto; padding: 4px 4px 4px; }
.msg.media .meta { padding: 2px 6px 0; }
.msg .meta { display: flex; gap: 4px; align-items: center; justify-content: flex-end; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.msg.failed { border: 1px solid var(--red); }
.msg-call {
    align-self: center; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 16px;
    background: var(--surface); color: var(--muted); font-size: 13.5px; margin: 6px 0; box-shadow: var(--shadow);
}
.msg-call.missed { color: var(--red); }
.day { align-self: center; color: var(--muted); background: var(--surface); font-size: 12.5px; margin: 10px 0 6px; padding: 4px 12px; border-radius: 8px; box-shadow: var(--shadow); }
.chat-empty { margin: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: var(--muted); padding: 24px; max-width: 320px; }
.chat-empty strong { color: var(--text); font-size: 20px; }
.voice { display: flex; flex-direction: column; gap: 4px; min-width: 220px; white-space: normal; }
/* Bulle du vocal (22 octobre) : rond ▶, forme du son (la partie écoutée en couleur), durée et badge des langues. Leur vert
   est dans la « Finition » plus bas (relecture du 8 novembre : le rouge d'ici était toujours remplacé, il est retiré) */
.voice-row { display: flex; align-items: center; gap: 10px; }
.voice .play { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; border: 0; cursor: pointer; }
.voice .play svg polygon, .voice .play svg rect { fill: currentColor; }
.voice .wave { flex: 1; display: flex; align-items: center; gap: 2px; height: 32px; cursor: pointer; }
.voice .wave i { flex: 1; min-width: 2px; max-width: 4px; border-radius: 2px; background: color-mix(in srgb, currentColor 30%, transparent); }
.voice-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-inline-start: 52px; }
.voice .dur { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lang-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; letter-spacing: .02em; padding: 2px 8px; border-radius: 10px; background: color-mix(in srgb, currentColor 10%, transparent); color: var(--muted); }
.voice-preview { margin: 6px 0 0; font-size: 13px; line-height: 1.45; font-style: italic; color: var(--muted); white-space: normal; }
/* Pastilles colorées (Écouter, Texte, Sous-titres) : toujours la même couleur et la même place */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip.active { box-shadow: inset 0 0 0 1.5px currentColor; }
.chip.loading { opacity: .7; }
.video-msg { width: 220px; max-width: 64vw; position: relative; }
.video-msg video { display: block; width: 100%; max-height: 60dvh; border-radius: 9px; background: #000; }
/* Sous-titres Hormozi dessinés par-dessus l'image du message vidéo (24 octobre, comme Android) */
.video-frame { position: relative; }
.video-subs { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; border-radius: 9px; }
/* Plein écran des messages vidéo avec les sous-titres Hormozi (le cadre entier, pas la vidéo seule) */
.video-big-open, .video-big-close { position: absolute; z-index: 2; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .55); color: #fff; --ic: currentColor; }
.video-big-open { top: 8px; inset-inline-end: 8px; }
.video-big-close { top: calc(12px + var(--safe-top, 0px)); inset-inline-end: 12px; }
.video-frame.big { position: fixed; inset: 0; z-index: 80; background: #000; display: flex; align-items: center; justify-content: center; }
.video-frame.big video { width: 100%; height: 100%; max-height: none; object-fit: contain; border-radius: 0; }
.video-frame.big .video-subs { border-radius: 0; }
.video-frame:fullscreen { background: #000; display: flex; align-items: center; justify-content: center; }
.video-frame:fullscreen video { width: 100%; height: 100%; object-fit: contain; }
/* Sous-titres façon « Hormozi » : majuscules épaisses, contour noir, le mot en cours en jaune (20 octobre) */
.video-msg video::cue {
    background: transparent !important; color: #fff;
    font: 900 1.25em/1.2 Impact, "Arial Black", "Helvetica Neue", Roboto, sans-serif;
    text-shadow: 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 0 2px 0 #000, 0 -2px 0 #000,
        2px 0 0 #000, -2px 0 0 #000, 0 4px 8px rgba(0, 0, 0, .7);
}
.video-msg video::cue(.now) { color: #ffe600; }
/* Le Mac peut ajouter son propre fond aux sous-titres (réglages d'accessibilité) : enlevé, comme dans le style Hormozi */
.video-msg video::-webkit-media-text-track-display { background-color: transparent !important; }
.video-poster {
    position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: 9px; background: #1b2226;
    display: flex; align-items: center; justify-content: center; color: #fff;
}
.play-disc { width: 58px; height: 58px; border-radius: 50%; background: rgba(0, 0, 0, .45); display: flex; align-items: center; justify-content: center; }
.video-dur { position: absolute; inset-inline-start: 10px; bottom: 8px; display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
/* Message vidéo en téléchargement : l'anneau des photos autour du ▶ (maquette lecture-medias-1) */
.video-poster.loading .play-disc { position: relative; }
.video-poster.loading .ring { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); transform: rotate(-90deg); pointer-events: none; }
.load-more { align-self: center; color: var(--brand-text); padding: 8px 14px; font-size: 14px; font-weight: 600; }
/* Au bout du journal des appels (maquette appels-plus-anciens-1) : centré, de la place pour le bouton + */
.load-more-row { display: flex; justify-content: center; padding: 6px 0 84px; }
.load-more:disabled { opacity: .55; }
.composer {
    flex-shrink: 0; display: flex; align-items: flex-end; gap: 6px;
    /* Les bords arrondis de l'iPhone : le bouton du vocal n'est plus collé au bord droit (24 octobre) */
    /* Appui long sur le bouton du vocal : jamais de sélection de texte ni de loupe d'iOS (ils coupaient l'enregistrement) */
    -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
    padding: 6px max(20px, env(safe-area-inset-right)) calc(8px + var(--safe-bottom)) max(12px, env(safe-area-inset-left)); background: transparent;
}
/* En arabe le bouton du vocal passe à gauche : les 20 px le suivent (maquette restes-web-2, 11 novembre 2026 ; il n'en avait que 12) */
[dir="rtl"] .composer { padding-right: max(12px, env(safe-area-inset-right)); padding-left: max(20px, env(safe-area-inset-left)); }
.field-wrap { flex: 1; min-width: 0; display: flex; align-items: flex-end; background: var(--surface); border-radius: 26px; box-shadow: var(--shadow); }
.composer textarea { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; flex: 1; background: transparent; border: 0; min-height: 50px; max-height: 140px; resize: none; padding: 13px 4px 13px 18px; line-height: 1.35; }
.round-btn { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; width: 50px; height: 50px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--brand); color: var(--brand-ink); touch-action: none; }
.round-btn.recording { background: var(--red); color: #fff; transform: scale(1.18); }
.rec-hint { flex: 1; display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 16px; border-radius: 26px; background: var(--surface); color: var(--red); font-variant-numeric: tabular-nums; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: pulse 1s infinite; flex-shrink: 0; }
/* Appui long, messages supprimés */
.msg.pressing { transform: scale(.97); filter: brightness(.94); }
@media (hover: none) { .msg { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; } }
.msg.deleted { background: transparent; border: 1px dashed var(--line); box-shadow: none; color: var(--muted); font-style: italic; }
.deleted-text { display: inline-flex; align-items: center; gap: 6px; }
.row .preview.deleted { font-style: italic; }
/* Micro : glisser pour annuler, glisser vers le haut pour verrouiller */
.mic-wrap { position: relative; flex-shrink: 0; }
.lock-hint {
    position: absolute; left: 50%; bottom: calc(100% + 14px); transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 8px; border-radius: 22px;
    background: var(--surface); color: var(--muted); box-shadow: 0 2px 8px rgba(0, 0, 0, .15); animation: lift 1.4s infinite ease-in-out;
}
@keyframes lift { 50% { transform: translate(-50%, -6px); } }
.rec-hint .rec-time { color: var(--text); min-width: 42px; }
.slide-hint { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 2px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.rec-trash { width: 40px; height: 40px; margin-inline-start: -10px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--red); }
.round-btn.locked { background: var(--brand); color: var(--brand-ink); }
.blocked-bar { align-items: center; justify-content: center; gap: 12px; padding: 12px 12px calc(12px + var(--safe-bottom)); background: var(--surface); color: var(--muted); font-size: 15px; }

/* Photos et fichiers : bulles, progression, aperçu avant l'envoi, plein écran */
.photo-msg {
    position: relative; display: block; width: min(250px, 66vw); aspect-ratio: var(--ratio, 1.333); max-height: 340px;
    border-radius: 9px; overflow: hidden; background: #1b2226; cursor: pointer;
}
.photo-msg img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-msg img.blur { filter: blur(10px); transform: scale(1.12); }
.photo-msg.missing { background: var(--surface-2); }
.transfer { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.transfer-btn {
    position: relative; width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
    background: rgba(0, 0, 0, .5); color: #fff; display: flex; align-items: center; justify-content: center;
}
.transfer-btn .ring { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); transform: rotate(-90deg); pointer-events: none; }
.ring circle { fill: none; stroke-width: 3; }
.ring-bg { stroke: rgba(255, 255, 255, .25); }
.ring-fg { stroke: #fff; stroke-linecap: round; transition: stroke-dashoffset .3s; }
.transfer-btn.small { width: 40px; height: 40px; background: var(--brand-soft); color: var(--brand-text); }
.transfer-btn.small .ring-bg { stroke: rgba(127, 127, 127, .2); }
.transfer-btn.small .ring-fg { stroke: var(--brand); }
.missing-text { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; background: var(--surface); padding: 6px 10px; border-radius: 14px; }
.with-caption .caption { padding: 6px 6px 0; white-space: pre-wrap; font-size: 16px; }
.msg.doc { padding: 5px 5px 4px; }
.msg.doc .meta { padding: 2px 5px 0; }
.file-msg {
    display: flex; align-items: center; gap: 10px; width: min(270px, 70vw); padding: 7px; border-radius: 9px;
    background: rgba(17, 27, 33, .05); cursor: pointer; white-space: normal;
}
.file-icon {
    width: 40px; height: 48px; flex-shrink: 0; border-radius: 8px; background: var(--brand-soft); color: var(--brand-text);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
}
.file-icon b { font-size: 9.5px; letter-spacing: .02em; max-width: 38px; overflow: hidden; }
.file-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.file-text strong { font-size: 15px; font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.file-text small { color: var(--muted); font-size: 12.5px; }
.file-act:empty { display: none; }
/* Transfert direct : accepter, refuser, rechoisir */
.direct-msg { display: flex; flex-direction: column; gap: 6px; width: min(270px, 70vw); }
.direct-msg .file-msg { width: 100%; }
.direct-extra { display: flex; flex-direction: column; gap: 6px; padding: 0 2px; }
.direct-extra:empty { display: none; }
.direct-actions { display: flex; gap: 8px; }
.btn.btn-sm { min-height: 42px; padding: 0 12px; font-size: 15px; border-radius: 21px; gap: 6px; flex: 1; width: auto; }
.direct-note { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.35; white-space: normal; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .file-msg { background: rgba(255, 255, 255, .06); } }
:root[data-theme="dark"] .file-msg { background: rgba(255, 255, 255, .06); }

.send-files .pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; max-height: 46dvh; overflow-y: auto; }
.send-files .pick-list.single { grid-template-columns: 1fr; }
.pick-item.photo { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.pick-item.photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pick-list.single .pick-item.photo { aspect-ratio: auto; background: transparent; }
.pick-list.single .pick-item.photo img { height: auto; max-height: 46dvh; object-fit: contain; }
.pick-item:not(.photo) { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; background: var(--surface-2); }
.pick-item.too-big { opacity: .55; }
.pick-text { min-width: 0; display: flex; flex-direction: column; }
.pick-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-text small { color: var(--muted); }
.caption-input { width: 100%; min-height: 48px; resize: none; padding: 12px 14px; border-radius: 14px; }

.viewer { position: fixed; inset: 0; z-index: 37; background: #000; color: #fff; display: flex; flex-direction: column; }
.viewer-top { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; padding: calc(6px + var(--safe-top)) 6px 6px; background: rgba(0, 0, 0, .6); }
.viewer-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.viewer-title small { color: rgba(255, 255, 255, .7); font-size: 12.5px; }
.viewer-stage { flex: 1; min-height: 0; overflow: auto; display: flex; align-items: center; justify-content: center; touch-action: pan-x pan-y; }
.viewer-error { color: #fff; text-align: center; padding: 24px; margin: 0; }
.viewer-img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; -webkit-user-select: none; user-select: none; }
.viewer-stage.zoomed { display: block; }
.viewer-stage.zoomed .viewer-img { max-width: none; max-height: none; width: 250%; }
.viewer-video { max-width: 100%; max-height: 100%; }
.viewer-audio { width: min(420px, 90vw); }
.viewer-caption { padding: 12px 16px calc(14px + var(--safe-bottom)); background: rgba(0, 0, 0, .6); white-space: pre-wrap; }

/* ───────── Feuilles (bas d'écran) ───────── */
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .5); display: flex; align-items: flex-end; justify-content: center; }
/* Au-dessus du lecteur, de « Préparer » et de l'écran d'invité (essai au banc du 4 novembre : la question du forfait était cachée
   derrière). 1110 : l'écran d'invité est à 1100 et vient après dans la page, il couvrait ses propres feuilles (relecture du 8 novembre) */
body:has(.watch-player, .prep-page, .guest-layer) .sheet-backdrop { z-index: 1110; }
.sheet {
    width: 100%; max-width: 520px; max-height: 92dvh; overflow-y: auto;
    background: var(--surface); color: var(--text); border-radius: 22px 22px 0 0; padding: 20px 18px calc(18px + var(--safe-bottom));
    display: flex; flex-direction: column; gap: 14px;
}
.sheet h2 { font-size: 19px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.menu { display: flex; flex-direction: column; margin: -6px -18px 0; }
.menu h2 { padding: 0 20px 8px; }
.menu .menu-item { padding: 8px 22px; }
.menu .menu-item.cancel { justify-content: center; color: var(--muted); }
.menu .menu-item.cancel > span { align-items: center; }
.meter { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.meter .bar { flex: 1; height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.meter .bar i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .08s linear; }
.net-line { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.net-line small { color: var(--muted); display: block; font-size: 13px; }
.recorder .rec-live { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px 0; }
.recorder .rec-timer { font-size: 40px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rec-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ───────── Barres de réseau ───────── */
.bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; }
.bars i { width: 4px; border-radius: 1px; background: rgba(127, 127, 127, .35); }
.bars i:nth-child(1) { height: 5px; } .bars i:nth-child(2) { height: 8px; } .bars i:nth-child(3) { height: 12px; } .bars i:nth-child(4) { height: 16px; }
.bars-bon i.on { background: #3ccf7e; }
.bars-faible i.on { background: var(--amber); }
.bars-critique i.on { background: #ff6b6f; }

/* ───────── Appel (toujours sombre) ───────── */
.call {
    position: fixed; inset: 0; z-index: 38; background: #0b1013; color: #fff;
    display: flex; flex-direction: column; overflow: hidden; user-select: none; -webkit-user-select: none;
}
.call .remote-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; opacity: 0; transition: opacity .3s; z-index: 0; }
.call .remote-video.live { opacity: 1; }
.call-top {
    position: relative; z-index: 3; display: flex; align-items: center; gap: 6px;
    padding: calc(8px + var(--safe-top)) 8px 20px; background: linear-gradient(rgba(0, 0, 0, .5), transparent);
    transition: opacity .25s;
}
.call-title { flex: 1; min-width: 0; text-align: center; display: flex; flex-direction: column; }
.call-title strong { font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.call-title .sub { color: rgba(255, 255, 255, .78); font-size: 15px; font-variant-numeric: tabular-nums; min-height: 1.3em; }
.call-top-right { display: flex; align-items: center; gap: 2px; min-width: 48px; justify-content: flex-end; }
.bars-wrap { display: inline-flex; padding: 0 6px; }
.call-banner {
    position: absolute; z-index: 4; left: 50%; top: calc(84px + var(--safe-top)); transform: translateX(-50%);
    max-width: calc(100% - 32px); padding: 8px 14px; border-radius: 18px; font-size: 14px; font-weight: 600; text-align: center;
    background: rgba(255, 255, 255, .14);
}
.call-banner.amber { background: #4a3510; color: #ffd27a; }
.call-banner.red { background: #4a1517; color: #ffb3b5; }
.call-center { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 0 24px; text-align: center; }
.voice-ring { border-radius: 50%; padding: 6px; border: 4px solid rgba(43, 182, 115, .28); transition: border-color .1s; }
.voice-ring.speaking { border-color: #2bb673; }
/* Appel traduit nouvelle façon (24 octobre) : sous-titres Hormozi, voix du traducteur, animation de sa voix */
.call-caps { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 4; } /* au-dessus de l'image de l'autre (essai du 24 octobre : à 2, cachée en vidéo) */
.tr-panel { position: absolute; top: calc(78px + var(--safe-top)); left: 12px; right: 12px; z-index: 5; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.tr-voice { pointer-events: auto; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 20px; border: 1px solid rgba(255, 255, 255, .35); background: rgba(0, 0, 0, .45); color: #fff; font-size: 14px; font-weight: 600; --ic: currentColor; }
.tr-voice.on { background: #fff; color: #0d1f17; border-color: #fff; }
.tr-buttons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: inherit; }
.tr-voice.tr-subs.off { opacity: .75; text-decoration: line-through; }
/* En vidéo, ma petite image est en haut du côté de la fin (à droite, à gauche en arabe) : le bouton et le signe passent de l'autre côté */
.call.video-mode .tr-panel { align-items: flex-start; inset-inline-end: 140px; }
.call.controls-hidden .tr-voice { opacity: .55; }
.tr-peer { padding: 6px 12px; border-radius: 14px; background: rgba(245, 158, 11, .22); color: #fde68a; font-size: 13px; text-align: center; }
.tr-peer.reading { background: rgba(245, 158, 11, .5); color: #fff; }
.tr-mine { position: absolute; left: 16px; right: 16px; bottom: calc(150px + var(--safe-bottom)); /* remplacé juste au-dessus des boutons par ui/callcaptions.js */ text-align: center; font-size: 13px; color: #e5e7eb; background: rgba(0, 0, 0, .4); border-radius: 12px; padding: 5px 10px; pointer-events: none; z-index: 5; }
.voice-ring.tr-ring { position: relative; border-color: transparent; }
.voice-ring.tr-ring > :not(.tr-anim) { position: relative; z-index: 1; }
.tr-anim { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; z-index: 0; }
.end-panel { display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 340px; }
.end-panel strong { font-size: 24px; }
.end-panel span { color: rgba(255, 255, 255, .8); font-size: 15px; }
.end-panel .end-tip { margin-top: 6px; color: #9fe6c0; }
.self-view {
    position: absolute; z-index: 5; inset-inline-end: 12px; top: calc(80px + var(--safe-top));
    width: 100px; height: 146px; border-radius: 14px; overflow: hidden; background: #222; border: 2px solid rgba(255, 255, 255, .55);
    transition: top .25s;
}
.self-view, .call.swapped .remote-video { touch-action: none; cursor: grab; }
.self-view video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); pointer-events: none; }
.self-view.back video { transform: none; }
.call.swapped .self-view { inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; z-index: 0; }
.call.swapped .remote-video {
    inset-block: auto; inset-inline: auto 12px; top: calc(80px + var(--safe-top)); width: 100px; height: 146px; border-radius: 14px; z-index: 5;
    border: 2px solid rgba(255, 255, 255, .55); opacity: 1;
}
.call-bottom {
    position: relative; z-index: 3; padding: 18px 10px calc(26px + var(--safe-bottom));
    background: linear-gradient(transparent, rgba(0, 0, 0, .6)); transition: opacity .25s;
}
.call.controls-hidden .call-top, .call.controls-hidden .call-bottom { opacity: 0; pointer-events: none; }
/* Appel de groupe (24 octobre) : une case par personne ; ma propre image reste la vignette. Téléphone d'abord : les
   cases s'empilent ; sur un écran large, côte à côte. Comme l'app Android (CallActivity, GroupGrid). */
.call.grouped .remote-video, .call.grouped .call-banner { display: none; }
.call.grouped .call-center { visibility: hidden; } /* garde sa place : les boutons restent en bas */
.call.grouped.controls-hidden .call-top, .call.grouped.controls-hidden .call-bottom { opacity: 1; pointer-events: auto; }
.group-grid {
    position: absolute; z-index: 1; inset: calc(64px + var(--safe-top)) 8px calc(136px + var(--safe-bottom));
    display: grid; gap: 8px; grid-template-columns: 1fr; grid-auto-rows: 1fr;
}
.group-grid[data-n="3"] { grid-template-columns: 1fr 1fr; }
.group-grid[data-n="3"] > :first-child { grid-column: span 2; }
/* 4 à 7 autres personnes (jusqu'à 8 avec moi, en audio) : deux par ligne */
.group-grid[data-n="4"], .group-grid[data-n="5"], .group-grid[data-n="6"], .group-grid[data-n="7"] { grid-template-columns: 1fr 1fr; }
.group-grid[data-n="5"] > :last-child, .group-grid[data-n="7"] > :last-child { grid-column: span 2; }
@media (min-width: 700px) {
    .group-grid[data-n="4"], .group-grid[data-n="5"], .group-grid[data-n="6"], .group-grid[data-n="7"] { grid-template-columns: 1fr 1fr 1fr; }
    .group-grid[data-n="5"] > :last-child, .group-grid[data-n="7"] > :last-child { grid-column: auto; }
    .group-grid[data-n="2"] { grid-template-columns: 1fr 1fr; }
    .group-grid[data-n="3"] { grid-template-columns: 1fr 1fr 1fr; }
    .group-grid[data-n="3"] > :first-child { grid-column: auto; }
}
.group-tile {
    position: relative; overflow: hidden; border-radius: 18px; min-height: 0;
    background: rgba(255, 255, 255, .08); display: flex; align-items: center; justify-content: center;
}
.group-tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.group-tile.live video { opacity: 1; }
.group-tile .tile-name {
    position: absolute; left: 8px; bottom: 8px; right: 8px; display: flex; gap: 8px; align-items: baseline;
    color: #fff; font-size: 14px; text-shadow: 0 1px 3px rgba(0, 0, 0, .7);
}
.group-tile .tile-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-tile .tile-sub { opacity: .85; font-size: 13px; white-space: nowrap; }
.group-pick .list { max-height: 55vh; overflow: auto; }
.call.controls-hidden:not(.pip-moved) .self-view { top: calc(16px + var(--safe-top)); }
/* Vignette posée par l'utilisateur (au doigt ou à la souris) */
.call.pip-moved:not(.swapped) .self-view, .call.pip-moved.swapped .remote-video { left: var(--pip-x); top: var(--pip-y); right: auto; bottom: auto; transition: none; }
.controls { display: flex; justify-content: space-around; align-items: flex-start; max-width: 440px; margin: 0 auto; }
.ctl { display: flex; flex-direction: column; align-items: center; gap: 7px; width: 78px; font-size: 12.5px; color: rgba(255, 255, 255, .88); }
.ctl .disc { width: 62px; height: 62px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .16); color: #fff; transition: transform .1s, background .1s; }
.ctl:active .disc, .ctl.pressing .disc { transform: scale(.93); }
.ctl.on .disc { background: #fff; color: #111; }
.ctl.off .disc { background: #fff; color: var(--red); }
.ctl.grey .disc { background: rgba(255, 255, 255, .07); color: rgba(255, 255, 255, .32); }
.ctl.grey { color: rgba(255, 255, 255, .45); }
.ctl.hang .disc { background: #e5484d; }
.ctl.hang.pressing .disc { background: #c8353a; }
.ctl.answer .disc { background: #2bb673; color: #03210f; }
.ctl.big { width: 104px; font-size: 14px; }
.ctl.big .disc { width: 76px; height: 76px; }
.ctl.nudge .disc { animation: nudge .45s; }
@keyframes nudge { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.rot135 .disc svg { transform: rotate(135deg); }
.controls.five .ctl { width: 66px; font-size: 11px; }
.controls.five .ctl-label { white-space: nowrap; letter-spacing: -.01em; }
.controls.five .ctl .disc { width: 56px; height: 56px; }
/* Téléphone à l'oreille : écran verrouillé (la joue ne touche plus aucun bouton) */
.ear-lock {
    position: absolute; inset: 0; z-index: 20; background: #000; color: #fff; touch-action: none;
    display: flex; flex-direction: column; justify-content: space-between; align-items: center;
    padding: calc(60px + var(--safe-top)) 24px calc(40px + var(--safe-bottom)); text-align: center;
}
.ear-lock-top { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ear-lock-top strong { font-size: 24px; }
.ear-lock-time { font-size: 18px; color: rgba(255, 255, 255, .75); font-variant-numeric: tabular-nums; }
.ear-lock-mode { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: rgba(255, 255, 255, .55); font-size: 14px; }
.ear-lock-handle { display: flex; flex-direction: column; align-items: center; gap: 6px; color: rgba(255, 255, 255, .7); font-size: 14px; animation: lift2 1.6s infinite ease-in-out; }
@keyframes lift2 { 50% { translate: 0 -10px; } }
.end-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.end-row { display: flex; justify-content: center; gap: 10px; width: 100%; max-width: 420px; }
.end-action { flex: 1; max-width: 120px; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13.5px; color: rgba(255, 255, 255, .9); text-align: center; }
.end-action .disc { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .16); }
.end-action.brand .disc { background: #2bb673; color: #03210f; }
.call.ended .call-top > .icon-btn { visibility: hidden; }
.close-link { color: rgba(255, 255, 255, .75); font-weight: 600; padding: 12px 24px; }
.debug { font: 12px/1.4 ui-monospace, monospace; color: #b8f5cf; white-space: pre-wrap; position: absolute; left: 8px; bottom: calc(150px + var(--safe-bottom)); z-index: 6; background: rgba(0, 0, 0, .6); padding: 8px; border-radius: 8px; max-width: 70%; }

.ctl:disabled { opacity: .45; }
.row-actions { display: flex; gap: 10px; }
.row-actions .btn { flex: 1; }

/* Appel entrant */
.incoming { justify-content: space-between; background: #0c1512; z-index: 45; }
/* Un appel passe au-dessus du lecteur, de « Préparer » et de l'écran d'invité (relecture du 5 novembre, reproduit au banc : ça sonnait,
   l'écran pour répondre restait caché derrière le lecteur). Ce qui s'ouvre depuis l'appel (« Répondre », le menu) reste au-dessus de lui. */
body:has(.watch-player, .prep-page, .guest-layer) .call { z-index: 1150; }
/* Le second sélecteur : la règle des feuilles au-dessus du lecteur (plus précise) gagnait, et ce qui s'ouvrait depuis l'appel
   restait derrière lui quand le lecteur ou « Préparer » était ouvert (relecture du 8 novembre) */
.call ~ .sheet-backdrop, body:has(.watch-player, .prep-page, .guest-layer) .call ~ .sheet-backdrop { z-index: 1200; }
.incoming .who { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: calc(64px + var(--safe-top)) 24px 0; text-align: center; }
.incoming .who strong { font-size: 30px; }
.incoming-kind { display: inline-flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, .85); font-size: 17px; }
.muted-light { color: rgba(255, 255, 255, .6); font-size: 15px; font-variant-numeric: tabular-nums; }
.incoming-bottom { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 0 16px calc(36px + var(--safe-bottom)); }
.incoming .answer-row { display: flex; justify-content: space-between; width: 100%; max-width: 340px; }
.reply-link { display: inline-flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, .85); font-weight: 600; padding: 12px 18px; border-radius: 22px; background: rgba(255, 255, 255, .1); }
.ring-pulse { animation: ring 1.4s infinite; }
@keyframes ring { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* Barre d'appel réduit */
.callbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 25; display: flex; align-items: center; justify-content: center; gap: 10px;
    height: calc(44px + var(--safe-top)); padding: var(--safe-top) 16px 0; background: var(--brand); color: var(--brand-ink); font-weight: 650; font-size: 15px;
}
.callbar-text { font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.callbar-hint { opacity: .85; font-weight: 500; }

/* Enregistreur de message vidéo */
/* Écran d'écoute d'un vocal traduit (22 octobre) : le décor de la régie, dessiné dans le canvas, et les commandes */
.voice-screen { position: fixed; inset: 0; z-index: 36; background: #05050a; color: #fff; }
.voice-screen .vs-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: pointer; }
.vs-top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(10px + var(--safe-top)) 12px 0; }
.vs-lang { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: rgba(255, 255, 255, .78); background: rgba(255, 255, 255, .1); padding: 5px 10px; border-radius: 14px; }
.vs-bottom { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 0 16px calc(18px + var(--safe-bottom)); }
/* De gauche à droite même en arabe, comme VoiceScreen.kt (Canvas) : en arabe la partie remplie partait de la droite alors que le
   toucher compte depuis la gauche (11 novembre 2026, lot 2). La zone du doigt fait 48 px, le dessin reste à 6 px (même technique
   que les cibles de 48 px plus bas). */
.vs-progress { position: relative; direction: ltr; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .18); cursor: pointer; }
.vs-progress:not(.on-sheet)::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 48px; transform: translateY(-50%); }
.vs-progress i { display: block; height: 100%; width: 0; border-radius: 3px; background: #f43f5e; }
/* La même barre sur une feuille claire (« Vidéo avec sous-titres ») : fond gris, partie remplie verte, comme la traduction
   (maquette lecture-medias-1, 9 novembre : le fond blanc transparent ne se voyait pas) */
.vs-progress.on-sheet { background: var(--surface-3); cursor: default; }
.vs-progress.on-sheet i { background: var(--brand); }
.vs-controls { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 12px; } /* au-dessus de la zone de 48 px de la barre */
.vs-play { width: 60px; height: 60px; border-radius: 50%; border: 0; background: #e11d48; color: #fff; display: grid; place-items: center; cursor: pointer; }
.vs-time { font-size: 14px; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .78); min-width: 96px; }
/* Le sous-titre du canvas, lu par les lecteurs d'écran */
.vs-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.video-recorder { position: fixed; inset: 0; z-index: 36; background: #000; color: #fff; display: flex; flex-direction: column; justify-content: space-between; }
.video-recorder > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-recorder > video.mirror { transform: scaleX(-1); }
.vr-top { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; padding: calc(10px + var(--safe-top)) 12px 24px; background: linear-gradient(rgba(0, 0, 0, .55), transparent); }
.vr-title { flex: 1; display: flex; flex-direction: column; }
.vr-title span { color: rgba(255, 255, 255, .78); font-size: 14px; }
.video-recorder .rec-timer { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; background: #e5484d; padding: 4px 10px; border-radius: 12px; }
.vr-progress { position: absolute; z-index: 2; left: 0; right: 0; top: calc(0px + var(--safe-top)); height: 3px; background: rgba(255, 255, 255, .2); }
.vr-progress i { display: block; height: 100%; width: 0; background: #e5484d; }
.vr-bottom { position: relative; z-index: 2; padding: 30px 16px calc(28px + var(--safe-bottom)); background: linear-gradient(transparent, rgba(0, 0, 0, .6)); display: flex; flex-direction: column; align-items: center; gap: 16px; }
.rec-hint-text { margin: 0; font-size: 14px; color: rgba(255, 255, 255, .85); text-align: center; }
.vr-controls { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 320px; }
.round-ghost { width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .16); color: #fff; }
.round-ghost.spacer { visibility: hidden; }
.rec-button { width: 82px; height: 82px; border-radius: 50%; border: 4px solid #fff; display: flex; align-items: center; justify-content: center; }
.rec-core { width: 62px; height: 62px; border-radius: 50%; background: #e5484d; transition: all .15s; }
.video-recorder.recording .rec-core { width: 32px; height: 32px; border-radius: 8px; }
/* Le déclencheur de « Caméra » sur ordinateur : blanc, comme un appareil photo (maquette restes-visuels-1, 10 novembre 2026) */
.photo-camera .rec-core { background: #fff; }
/* La photo est l'image entière de la webcam : l'aperçu la montre entière aussi, bandes noires comprises (maquette restes-web-2 ;
   en `cover`, le panneau en hauteur de l'ordinateur n'en montrait que le milieu). Le message vidéo garde `cover`. */
.photo-camera > video { object-fit: contain; }
.photo-camera .rec-button:active .rec-core { width: 54px; height: 54px; }

/* Messages brefs */
#toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + 18px + var(--safe-bottom)); z-index: 60; display: flex; justify-content: center; pointer-events: none; padding: 0 16px; }
/* Au-dessus du lecteur, de « Préparer » et de l'écran d'invité (reproduit au banc le 5 novembre : « Lien copié » restait caché derrière) */
body:has(.watch-player, .prep-page, .guest-layer) #toasts { z-index: 1200; }
/* Pareil pour la vidéo d'un message en grand (z-index 80) : « Lien copié », réseau coupé restaient cachés derrière
   (relecture du 9 novembre 2026, restes) */
body:has(.video-frame.big) #toasts { z-index: 1200; }
/* Pendant un appel ou un enregistrement vidéo, les messages brefs passent au-dessus des boutons */
#layer:has(.call:not([hidden]), .video-recorder, .voice-screen) ~ #toasts { bottom: calc(196px + var(--safe-bottom)); }
/* Une feuille est ouverte : le message bref passe en haut pour ne cacher aucun de ses boutons */
#layer:has(.sheet-backdrop) ~ #toasts { bottom: auto; top: calc(14px + var(--safe-top)); }
/* Feuille ouverte depuis un appel (au-dessus de l'appel, à 1200) : le message bref reste par-dessus son fond assombri (relecture du 8 novembre) */
#layer:has(.call ~ .sheet-backdrop) ~ #toasts { z-index: 1200; }
.toast { pointer-events: auto; max-width: 480px; display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 14px; background: #1f2c33; color: #fff; font-size: 15px; box-shadow: 0 4px 14px rgba(0, 0, 0, .2); }
.toast-warn { background: #f0a020; color: #1f1400; }
.toast-error { background: #ffb3b5; color: #3a0b0d; }
.toast-action { font-weight: 800; color: inherit; text-decoration: underline; padding: 4px; }

/* ───────── Tablette et ordinateur : liste à gauche, détail à droite ───────── */
@media (min-width: 900px) {
    .layout .side-col { flex: 0 0 400px; display: flex !important; border-inline-end: 1px solid var(--line); }
    .layout .detail-pane { display: flex !important; }
    .detail-pane .topbar > .icon-btn[aria-label="Retour"] { display: none; }
    .detail-pane .topbar { padding-inline-start: 16px; }
    .overlay { background: rgba(0, 0, 0, .45); align-items: center; justify-content: center; }
    .overlay-panel { flex: none; width: 480px; height: min(760px, 88dvh); background: var(--bg); border-radius: 18px; overflow: hidden; }
    .sheet-backdrop { align-items: center; }
    .sheet { border-radius: 22px; max-height: 86dvh; }
    .call-bottom { padding-bottom: 36px; }
    .video-recorder { inset: 4dvh auto 4dvh 50%; width: min(520px, 92vw); transform: translateX(-50%); border-radius: 20px; overflow: hidden; }
    #toasts { bottom: 28px; }
}
@media (min-width: 1300px) {
    .layout .side-col { flex-basis: 440px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Arabe (de droite à gauche) : les flèches de direction regardent de l'autre côté */
[dir="rtl"] .icon.rtl-flip svg { transform: scaleX(-1); }
/* Numéros de téléphone, durées, tailles : toujours de gauche à droite, même au milieu d'un texte arabe */
[dir="rtl"] .number-big, [dir="rtl"] .num, [dir="rtl"] .dial-display { direction: ltr; unicode-bidi: isolate; }

/* Textes écrits par les gens (messages, noms, légendes, saisie) : leur sens d'écriture suit leur contenu.
   Un message en arabe dans l'app en français se lit de droite à gauche, et l'inverse ; les noms restent alignés comme l'app. */
.msg-text, .with-caption .caption { unicode-bidi: plaintext; }
.row .name, .row .preview .ellipsis, .title-text strong, .file-text strong, .call-title strong, .chat-empty strong, .vr-title strong, .ear-lock-top strong {
    unicode-bidi: plaintext; text-align: match-parent;
}
textarea { unicode-bidi: plaintext; }
input:not([type]), input[type=text], input[type=email], input[type=search] { unicode-bidi: plaintext; text-align: match-parent; }
input[inputmode=numeric] { direction: ltr; text-align: match-parent; }

/* Réglages → Mes appareils */
.chip.danger-chip { background: var(--red-soft); color: var(--red); flex: none; }
.hint.section-note { padding: 8px 16px 0; line-height: 1.4; }
.history-note {
    align-self: center; display: flex; gap: 6px; align-items: flex-start; max-width: min(92%, 460px); margin: 6px 0 10px;
    padding: 7px 12px; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: 13px; line-height: 1.35; text-align: center;
}
.history-note .icon { flex: none; margin-top: 1px; }
a.menu-item { color: inherit; text-decoration: none; }

/* ───────── Page d'accueil (visiteur dans un navigateur) et « Tes données » ─────────
   Le motif est le réseau : trois barres, comme l'icône ; au chargement, deux s'éteignent — une seule suffit.
   Aucune image ni police à télécharger : la page doit s'ouvrir sur un mauvais réseau. */
.welcome-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
:lang(ar) .welcome h1 { letter-spacing: 0; }

.landing {
    max-width: 1040px; margin: 0 auto; display: flex; flex-direction: column; gap: 44px;
    padding: calc(12px + var(--safe-top)) 20px calc(32px + var(--safe-bottom));
}
.landing-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.landing-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 21px; letter-spacing: -.01em; }
.boot-logo.still { width: 28px; height: 28px; animation: none; }

/* Les barres montent de gauche à droite dans toutes les langues, comme sur un téléphone (et comme le logo) */
[dir="rtl"] .boot-logo { direction: ltr; }
:lang(ar) .landing h1, :lang(ar) .landing h2 { letter-spacing: 0; line-height: 1.3; }
.landing-lead { font-size: clamp(17px, 2.3vw, 20px); line-height: 1.5; color: var(--muted); max-width: 34em; margin: 16px 0 0; }
.landing-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; max-width: 520px; }
.landing-actions .btn { flex: 1 1 200px; }
.landing-muted { color: var(--muted); font-size: 14px; margin: 0; }


.landing-install { background: var(--surface-2); border-radius: 20px; padding: 24px 20px; }
.landing-install h2 { font-size: 23px; letter-spacing: -.01em; }
.landing-install > .landing-muted { margin-top: 6px; }
.landing-install h3 { font-size: 15px; margin: 20px 0 8px; }
.install-steps { margin: 0; padding-inline-start: 22px; display: grid; gap: 8px; line-height: 1.45; max-width: 40em; }
.landing-install-btn { margin-top: 18px; display: inline-flex; align-items: center; gap: 8px; }
.landing-other { margin-top: 18px; }
.landing-other summary { cursor: pointer; color: var(--brand-text); font-weight: 650; min-height: 44px; display: flex; align-items: center; }

.landing-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; border-top: 1px solid var(--line); padding-top: 14px; }

.data-page { max-width: 720px; gap: 26px; }
.data-page h1 { font-size: clamp(32px, 8vw, 46px); letter-spacing: -.025em; line-height: 1.05; }
.data-page > .landing-lead { margin-top: -12px; }
.data-page h2 { font-size: 18px; margin-bottom: 8px; }
.data-page ul { margin: 0; padding-inline-start: 20px; display: grid; gap: 9px; line-height: 1.5; }
/* « Tes données » en questions (4 novembre, maquette validée) : icône blanche sur un carré de couleur, --q posée par question */
.data-questions { display: grid; gap: 8px; }
.data-q { border-radius: 16px; background: var(--surface-2); }
.data-q[open] { box-shadow: inset 0 0 0 1.5px var(--q); }
.data-q summary { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 10px; padding-inline: 10px 12px; cursor: pointer; list-style: none; font-weight: 600; font-size: 15px; line-height: 1.3; }
.data-q summary::-webkit-details-marker { display: none; }
.data-q-text { flex: 1; min-width: 0; }
.data-disc { flex: none; display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 13px; background: var(--q); color: #fff; }
.data-disc .icon { --ic: #fff; color: #fff; }
.data-chev { flex: none; color: var(--muted); transition: transform .15s; }
.data-q[open] .data-chev { transform: rotate(180deg); color: var(--q); }
.data-q ul { padding: 2px 14px 14px; padding-inline-start: 30px; font-size: 14px; }
.data-q li::marker { color: var(--q); }

@media (min-width: 860px) {
    .landing { gap: 64px; padding-top: calc(20px + var(--safe-top)); }
    .landing-install { padding: 32px 36px; }
}

/* ───── Lien d'appel : invité sans compte, et partage du lien ───── */
.tag-guest {
    display: inline-block; margin-inline-start: 6px; padding: 1px 7px; border-radius: 9px; vertical-align: 2px;
    background: var(--surface-2); color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: 0;
}
.guest-bar { align-items: center; gap: 10px; padding: 12px 16px calc(12px + var(--safe-bottom)); background: var(--surface); color: var(--muted); font-size: 14px; }
.guest-bar .icon { flex-shrink: 0; color: var(--brand-text); }

/* Traduction des messages : bandeau de la discussion, bulles traduites, langue de conversation */
.translate-bar {
    flex-shrink: 0; display: flex; align-items: center; gap: 10px; margin: 0 8px 2px; padding: 6px; padding-inline-start: 14px;
    border-radius: 18px; background: var(--surface); color: var(--muted); font-size: 14px; line-height: 1.3; box-shadow: var(--shadow);
}
.translate-bar > .icon { color: var(--brand-text); }
.translate-bar .chip { flex-shrink: 0; min-height: 34px; }
.translate-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.translate-progress { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.translate-progress i { display: block; height: 100%; background: var(--brand); transition: width .2s; }
.icon-btn.small { width: 36px; height: 36px; color: var(--muted); }
/* La fiche de traduction (toucher « traduit » sous le nom) */
.chat > .translate-bar { margin: 6px 8px 0; }
.tb-sheet-pair { gap: 8px; font-weight: 600; margin: 0; }
.tb-rows { display: flex; flex-direction: column; gap: 12px; }
.tb-row { display: flex; gap: 12px; align-items: flex-start; }
.tb-row > div { display: flex; flex-direction: column; }
.tb-row small { color: var(--muted); font-size: 13.5px; }
/* En-tête sobre (25 octobre au soir) : icône d'appel fine, de la couleur du texte */
.call-plain { color: var(--text); --ic: currentColor; }
.call-plain .icon { --ic: currentColor !important; --ic-fo: 0; }
/* Les langues au début du champ de saisie : vertes quand c'est traduit, grises sinon */
.lang-chip { flex-shrink: 0; align-self: center; margin-inline-start: 10px; padding: 2px 8px 2px 0; border-inline-end: 1px solid var(--line); background: none; color: var(--muted); font-size: 12.5px; font-weight: 700; white-space: nowrap; direction: ltr; unicode-bidi: isolate; }
.lang-chip.on { color: var(--brand-text); }
/* `direction: ltr` garde « FR → AR » dans l'ordre, mais lit aussi margin-inline et border-inline de gauche à droite : en arabe,
   le filet tombait contre le bord du champ et la marge côté texte. Le côté physique en miroir (maquette restes-web-2, 11 novembre) */
[dir="rtl"] .lang-chip { margin: 0 10px 0 0; padding: 2px 0 2px 8px; border-right: 0; border-left: 1px solid var(--line); }
/* La flèche dessinée entre les deux langues (maquette fleche-1) : à la hauteur du texte, couleur du texte */
.lang-chip .lang-arrow { vertical-align: -3px; margin: 0 2px; }
.lang-chip .lang-arrow svg { stroke-width: 2.6; }
.field-wrap:has(.lang-chip:not([hidden])) { display: flex; align-items: center; }
.field-wrap:has(.lang-chip:not([hidden])) textarea { flex: 1; min-width: 0; }
.vr-lang { margin-top: 4px; border: none; background: rgba(0,0,0,.35); border-radius: 10px; padding: 1px 8px; color: #fff; }
.vr-lang.on { color: #9FE1CB; }
/* Pendant un vocal : dans quelle langue parler, et ce que l'autre recevra */
.rec-lang { padding: 4px 16px 0; text-align: center; color: var(--muted); font-size: 13px; font-weight: 600; }
/* Glisser une bulle pour la supprimer : « Supprimer » apparaît derrière elle */
.messages .msg { touch-action: pan-y; }
.msg.swiping { position: relative; transition: none; }
.swipe-del { position: absolute; top: 50%; inset-inline-start: calc(100% + 14px); transform: translateY(-50%); display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; font-weight: 600; white-space: nowrap; font-style: normal; }
.msg.swipe-ready .swipe-del { color: var(--red); }
.plus-btn { width: 44px; height: 44px; margin-bottom: 3px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.plus-btn.open { background: var(--surface-2); }
.attach-row { flex-shrink: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: 6px; margin: 0 8px 4px; padding: 8px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.attach-row button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border-radius: 12px; font-size: 12.5px; color: var(--text); }
.attach-row button:active { background: var(--surface-2); }
/* Vocal / Vidéo juste sous « Appeler » (24 octobre : en bas, on ne les remarquait pas) */
.call-menu { position: absolute; top: calc(58px + var(--safe-top, 0px)); inset-inline-end: 10px; z-index: 7; display: flex; flex-direction: column; min-width: 150px; padding: 6px; border-radius: 16px; background: var(--surface); box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
.call-menu button { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; font-size: 16px; font-weight: 600; color: var(--text); }
.call-menu button:active { background: var(--surface-2); }
/* Le bouton du message vocal : un micro dans une bulle, en rouge (« enregistrer ») ; bulle d'aide après un toucher trop court */
.round-btn.voice-rec:not(.recording):not(.locked) { background: #e53935; color: #fff; }
.hold-tip { position: absolute; bottom: calc(100% + 10px); inset-inline-end: 0; width: max-content; max-width: 220px; padding: 8px 12px; border-radius: 12px; background: var(--text); color: var(--bg, #fff); font-size: 13.5px; line-height: 1.3; box-shadow: var(--shadow); }
.hold-tip::after { content: ''; position: absolute; top: 100%; inset-inline-end: 20px; border: 7px solid transparent; border-top-color: var(--text); }
.msg-tr {
    display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; padding: 2px 0;
    font-size: 12.5px; color: var(--muted); text-align: start;
}
button.msg-tr { color: var(--brand-text); }
.voice-text[hidden] { display: none; }
.msg-tr.warn { color: var(--amber-ink, var(--muted)); }
.msg-alt {
    margin-top: 6px; padding: 6px 10px; border-inline-start: 3px solid var(--brand); border-radius: 6px;
    background: rgba(0, 0, 0, .04); white-space: pre-wrap; unicode-bidi: plaintext; font-size: 15px;
}
/* En sombre, 4 % de noir sur une bulle déjà sombre ne se voyait plus : un voile clair (maquette restes-visuels-1, 10 novembre 2026) */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .msg-alt { background: rgba(255, 255, 255, .07); } }
:root[data-theme="dark"] .msg-alt { background: rgba(255, 255, 255, .07); }
.sheet-sub { font-size: 15px; margin-top: 4px; }
.lang-menu { margin: 0 -18px; }
.lang-menu .menu-item[aria-checked="true"] { color: var(--brand-text); font-weight: 650; }
.menu > .hint, .menu > .error { margin: -4px 0 8px; padding: 0 22px; overflow-wrap: anywhere; }
.link-list { margin-bottom: 4px; }
.call-link .link-box {
    display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 12px; background: var(--surface-2);
    font-weight: 600; font-size: 15px; overflow-wrap: anywhere;
}
.call-link .link-box .icon { flex-shrink: 0; color: var(--brand-text); }
.call-link .hint { margin: 0; color: var(--muted); font-size: 13px; }
.link-actions { display: flex; justify-content: space-between; gap: 12px; }
.link-btn.danger { color: var(--red); }
.welcome.guest { text-align: center; }
.welcome.guest .welcome-top { text-align: start; }
.welcome.guest form { text-align: start; }
.guest-host { display: flex; justify-content: center; }
.welcome.guest .status { margin: -10px 0 0; color: var(--muted); }
.welcome.guest .status.online { color: var(--brand-text); }
.guest-calls .btn { width: 100%; }
.welcome.guest .hint.center { margin: 0; color: var(--muted); font-size: 13px; }
.guest-keep {
    display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: var(--radius);
    border: 1px solid var(--line); text-align: start;
}
.guest-keep h2 { margin: 0; font-size: 18px; }
.guest-keep p { margin: 0; color: var(--muted); font-size: 14px; }
.number-big.small { font-size: 30px; padding: 10px; }

/* La traduction sur la page d'accueil (23 octobre) : texte, drapeaux, et une démonstration en deux bulles */
.landing-faq h2, .lp h2 { font-size: clamp(26px, 6vw, 38px); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 18px; max-width: 16ch; }
.landing-faq details { background: var(--surface-2); border-radius: 16px; margin-bottom: 10px; overflow: hidden; }
.landing-faq summary { cursor: pointer; font-weight: 650; font-size: 16px; min-height: 56px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; }
.landing-faq summary::-webkit-details-marker { display: none; }
.landing-faq summary .icon { color: var(--muted); transition: transform .2s; }
.landing-faq details[open] summary .icon { transform: rotate(180deg); }
.landing-faq p { margin: 0; padding: 0 18px 18px; color: var(--muted); line-height: 1.55; max-width: 40em; }
.lang-menu-btn { height: 38px; padding: 0 10px 0 8px; gap: 6px; font-size: 14px; }
a.landing-install-btn { text-decoration: none; }
/* Choisir son numéro (23 octobre) : la réponse pendant la frappe, et des propositions */
.number-pick { display: flex; flex-direction: column; gap: 6px; }
.number-pick input { font-size: 20px; letter-spacing: .06em; font-variant-numeric: tabular-nums; direction: ltr; }
.number-answer { font-size: 14px; font-weight: 650; min-height: 18px; }
.number-answer.ok { color: var(--brand-text); }
.number-answer.bad { color: var(--red); }
.number-ideas { display: flex; flex-wrap: wrap; gap: 6px; }
.number-ideas .chip { font-variant-numeric: tabular-nums; direction: ltr; }

/* Fond d'écran virtuel (24 octobre) : le choix, en vignettes */
.bg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.bg-tile { display: flex; flex-direction: column; gap: 6px; align-items: center; padding: 0; border: 0; background: none; cursor: pointer; color: inherit; }
.bg-visual {
    width: 100%; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; display: grid; place-items: center;
    background: var(--surface-2); border: 2px solid transparent;
}
.bg-tile.on .bg-visual { border-color: var(--brand, #1f7a4d); }
/* Posées sur toute la case : sur iPhone, « height: 100% » dans la grille ne prenait pas (bande sombre en haut, 24 octobre) */
.bg-visual { position: relative; }
.cam-tech { margin: 4px 0 0; font-size: 11px; color: var(--muted, #888); text-align: center; }
.bg-visual img, .bg-visual .bg-canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.bg-blur { width: 100%; height: 100%; background: linear-gradient(135deg, #8aa, #dcc, #9b8); filter: blur(6px); transform: scale(1.2); }
.bg-label { font-size: 13px; }

/* Appel de groupe lancé d'un coup (24 octobre) : cocher 2 ou 3 contacts, puis appeler */
.group-choice { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.group-choice input { width: 22px; height: 22px; accent-color: var(--brand, #1f7a4d); flex: none; }
.group-choice.disabled { opacity: .45; cursor: default; }
/* Fond de la feuille : `inherit` ne donnait rien (son parent n'a pas de fond), la liste se lisait derrière les boutons (maquette restes-web-2) */
.group-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: sticky; bottom: 0; padding-top: 6px; background: var(--surface); }
.group-count { margin: 0; }
.group-actions .btn { white-space: nowrap; padding-inline: 10px; }

/* Réglages → Caméra : l'aperçu en direct avec le fond choisi (24 octobre) */
.cam-preview { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 10px; }
.cam-status { margin: 0; align-self: flex-start; font-size: 14px; color: var(--muted); }
.cam-status.ok { color: var(--brand-text, #1f7a4d); }
.cam-box { position: relative; width: min(62%, 260px); aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; background: #000; }
.cam-box video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-box video.mirror { transform: scaleX(-1); }
.cam-note { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); font-size: 11px; color: #fff; background: rgba(0,0,0,.45); padding: 3px 8px; border-radius: 8px; white-space: nowrap; }
.cam-flip { position: absolute; inset-inline-end: 8px; bottom: 8px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; cursor: pointer; --ic: currentColor; }
.cam-slow { margin: 0; font-size: 13px; color: var(--amber-ink, #b45309); }
.bg-settings { padding: 4px 14px 12px; }
/* Une case de fond (et sa croix pour retirer une photo, Réglages seulement) */
.bg-cell { position: relative; min-width: 0; }
.bg-cell .bg-tile { width: 100%; }
.bg-remove { position: absolute; top: -6px; inset-inline-end: -6px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--surface, #fff); background: #e11d48; color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; --ic: currentColor; }
/* Le bandeau : les mêmes cases sur une ligne qui défile au doigt (appel vidéo, message vidéo avant de filmer) */
.bg-strip { display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding: 4px 2px; -webkit-overflow-scrolling: touch; }
.bg-strip::-webkit-scrollbar { display: none; }
.bg-strip .bg-cell { flex: 0 0 64px; }
.bg-strip .bg-visual { border-radius: 10px; }
.bg-strip .bg-label { font-size: 11px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.7); white-space: nowrap; }
.bg-strip .bg-visual svg { width: 22px; height: 22px; }
.bg-strip-wrap { background: rgba(0,0,0,.45); border-radius: 14px; padding: 6px 8px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.bg-strip-wrap .bg-tile.on .bg-visual { border-color: #4ade80; }
.vr-strip { width: 100%; max-width: 480px; }
.call-strip { width: 100%; max-width: 480px; margin: 0 auto 10px; }
/* Appel vidéo qui sonne encore chez l'autre : je me vois en grand, avec le bandeau des fonds (24 octobre) */
.call.previewing .self-view { inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; z-index: 0; }
.call.previewing .call-center { visibility: hidden; }
.call.previewing .self-view { pointer-events: none; }

/* Onglet Contacts comme Android (25 octobre) : mon numéro en haut, le nombre de contacts dans le titre */
.row.my-number { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.row.my-number .name { font-variant-numeric: tabular-nums; }
.title-count { color: var(--muted); font-weight: 600; }
/* 48 × 48 comme toutes les cibles (maquette restes-web-2, 11 novembre ; 40 de large avant), collés l'un à l'autre : l'écart de la
   ligne (14 px) entre eux laissait 38 px au nom à 320 px (mesuré au banc) ; collés, il en a 66, plus qu'avant */
.row.person > .icon-btn { width: 48px; min-width: 48px; }
.row.person > .icon-btn + .icon-btn { margin-inline-start: -14px; }

/* ───── Finition (25 octobre 2026, son choix) : bulles à gauche et à droite, teintes calmes (les icônes, grises quelques heures, ont retrouvé leurs couleurs le soir même) ───── */
/* (la règle .msg de base, avec son coin pointu, est en tête des messages) */
.msg.mine { align-self: flex-end; border-radius: 14px; border-end-end-radius: 4px; }
.msg.media { max-width: min(80%, 600px); }
.msg.deleted { align-self: flex-start; }
.msg.mine.deleted { align-self: flex-end; }
:root[data-theme="light"] .msg:not(.mine):not(.deleted) { border: 1px solid var(--line); }
/* « Automatique » : la bordure seulement si l'appareil est en clair (avant, elle restait sur un appareil sombre, maquette restes-web-2) */
@media not all and (prefers-color-scheme: dark) { :root:not([data-theme]) .msg:not(.mine):not(.deleted) { border: 1px solid var(--line); } }
/* Les boutons d'un vocal : neutres, l'accent seulement quand Écouter lit */
.chip-listen, .chip-text, .chip-subtitles,
:root[data-theme="dark"] .chip-listen, :root[data-theme="dark"] .chip-text, :root[data-theme="dark"] .chip-subtitles { background: transparent; color: var(--muted); border: 1px solid var(--line); }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .chip-listen, :root:not([data-theme="light"]) .chip-text, :root:not([data-theme="light"]) .chip-subtitles { background: transparent; color: var(--muted); border: 1px solid var(--line); }
}
.chip-listen.active { color: var(--brand-text); border-color: var(--brand-text); }
/* Le rond ▶ d'un vocal : le vert de l'accent (le rouge reste pour enregistrer et supprimer) */
.voice .play { background: var(--brand); color: var(--brand-ink); }
.voice .wave i.on { background: var(--brand); }

/* ───── « Vérifie avant d'envoyer » (25 octobre 2026, son choix sur maquette) : vocal ou vidéo qui part traduit ───── */
.review { gap: 10px; }
.review-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review-head h2 { margin: 0; font-size: 18px; }
.review-text { width: 100%; box-sizing: border-box; border: 1.5px solid var(--brand); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 16px; line-height: 1.5; background: var(--surface); color: var(--text); resize: none; }
.review-voice { display: flex; align-items: center; gap: 10px; }
.review-play { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; cursor: pointer; }
.review-video { width: 100%; max-height: 220px; border-radius: 12px; background: #000; }
.review-actions { display: flex; align-items: center; gap: 10px; }
.review-delete { width: 44px; height: 44px; min-width: 44px; border-radius: 50%; border: 1px solid var(--line); color: #e5484d; }
.review-send { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.review-send .icon { --ic: currentColor !important; --ic-fo: 0; }
.review-head .lang-chip { margin: 0; padding: 2px 8px; border: 0; border-radius: 8px; background: var(--surface-2); }

/* ───── « Écouter » sur un message texte reçu traduit (25 octobre 2026 au soir, son choix A) : au bout de la ligne « Traduit » ───── */
.msg-tr-row { display: flex; align-items: center; flex-wrap: wrap; column-gap: 14px; margin-top: 4px; }
.msg-tr-row .msg-tr { margin-top: 0; }
.msg-tr.msg-listen { margin-inline-start: auto; }
.msg-tr.msg-listen.active { font-weight: 600; }
/* Qui a traduit, sous l'original (administrateurs, 26 octobre) */
.msg-origin { margin-top: 2px; font-size: 11.5px; color: var(--muted); }

/* Robot de test (26 octobre) : l'onglet du compte robot le rappelle, et un toucher allume sa voix */
.robot-bar {
    position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(78px + env(safe-area-inset-bottom)); z-index: 60;
    max-width: calc(100% - 32px); padding: 8px 14px; border: 0; border-radius: 999px; font: inherit; font-size: 13.5px; font-weight: 600;
    background: #FEF3C7; color: #92400E; box-shadow: 0 2px 10px rgba(0, 0, 0, .15); cursor: pointer;
}
.robot-bar.ready { background: #D1FAE5; color: #065F46; cursor: default; }

/* Chiffrement de bout en bout (0.97) : l'empreinte de la clé de chaque appareil, dans « Mes appareils » */
.device-key { font-variant-numeric: tabular-nums; letter-spacing: .02em; }

/* Chiffrement de bout en bout (1.0) : lignes de la discussion et code de sécurité */
.e2e-line { cursor: pointer; border: 0; font: inherit; }
.e2e-line.warn { background: var(--warn-bg); color: var(--warn-ink); }
.code-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 6px; padding: 14px 8px; border-radius: 12px; background: var(--surface-2); text-align: center; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 17px; letter-spacing: .04em; }
.verified-pill { align-self: center; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-text); font-weight: 600; }

/* La pastille cadenas : toujours en vue au-dessus des messages, ils défilent dessous (27 octobre) */
.messages-wrap { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }
.messages-wrap.sealed .messages { padding-top: 38px; }
.e2e-pill {
    position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 2;
    display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border: 0; border-radius: 999px;
    background: #EAF3DE; color: #27500A; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
}
.e2e-pill[hidden] { display: none; }
:root[data-theme="dark"] .e2e-pill { background: #27500A; color: #EAF3DE; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .e2e-pill { background: #27500A; color: #EAF3DE; } }

/* Discussions : filtres Toutes / Non lues (27 octobre) */
.chat-filters { display: flex; gap: 8px; margin-top: 10px; }
.chat-filter { border: 1px solid var(--line); background: transparent; color: var(--text); border-radius: 999px; padding: 5px 14px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.chat-filter.on { background: var(--brand-soft); color: var(--brand-text); border-color: transparent; }
.security-code h3 { margin: 6px 0 0; font-size: 16px; }
.e2e-step { display: flex; gap: 10px; align-items: flex-start; line-height: 1.4; }
.e2e-step .n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-text); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.e2e-differs { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn-ink); font-size: 14px; line-height: 1.4; }
.security-code .row-actions { display: flex; justify-content: space-between; }
.e2e-pill .icon { color: inherit; }

/* Les nouveaux messages d'une discussion (27 octobre) : la ligne avant le premier non lu, et le bouton « ↓ » */
.unread-sep { display: flex; align-items: center; gap: 10px; margin: 10px 4px; color: var(--brand-text); font-size: 13px; font-weight: 700; }
.unread-sep::before, .unread-sep::after { content: ""; flex: 1; border-top: 1.5px solid var(--brand-soft); }
.jump-down {
    /* Côté fin de ligne : à droite, à gauche en arabe comme tout l'écran (7 novembre, maquette transfert-non-prouve-1) */
    position: absolute; inset-inline-end: 12px; bottom: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 4px;
    min-height: 40px; min-width: 40px; justify-content: center; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px;
    background: var(--surface); color: var(--text); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}
.jump-down[hidden] { display: none; }

/* ───── Chaînes (28 octobre 2026, maquette approuvée) ───── */
.chan-logo { position: relative; flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden;
    background: linear-gradient(135deg, #ffd27a, #f08a5d); border-radius: 14px; }
.chan-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.chan-logo-md { width: 48px; height: 48px; font-size: 24px; }
.chan-logo-lg { width: 76px; height: 76px; font-size: 38px; border-radius: 20px; border: 3px solid var(--bg); margin: -38px 0 0; margin-inline-start: 16px; }
.chan-logo.live { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--red); }
.chan-logo-lg.live { box-shadow: 0 0 0 3px var(--red); }
.live-pill { margin-inline-start: 6px; font-size: 10px; font-weight: 800; letter-spacing: .3px; color: #fff; background: var(--red);
    border-radius: 6px; padding: 2px 6px; white-space: nowrap; vertical-align: middle; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-inline-end: 6px;
    animation: live-blink 1.2s infinite; flex-shrink: 0; }
.live-dot.white { background: #fff; }
@keyframes live-blink { 50% { opacity: .25; } }
.live-line { display: flex; align-items: center; }
.chan-page { padding-bottom: 24px; }
.chan-banner { height: 96px; background: linear-gradient(135deg, #f6b26b, #e06666); }
.chan-name { margin: 10px 16px 0; font-size: 22px; }
.chan-meta { margin: 4px 16px 0; font-size: 14px; }
.chan-about { margin: 10px 16px 0; line-height: 1.45; }
.chan-follow, .chan-share, .chan-add { width: calc(100% - 32px); margin: 14px 16px 0; }
.chan-share { min-height: 44px; font-size: 15px; margin-top: 10px; }
.btn-soft { background: var(--brand-soft); color: var(--brand-text); }
.btn-dark { background: #111; color: #fff; text-decoration: none; min-height: 42px; font-size: 14px; padding: 0 12px; white-space: nowrap; }
.chan-note { margin: 8px 16px 0; line-height: 1.4; }
.chan-section { margin: 20px 16px 8px; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.chan-shows { list-style: none; margin: 0; padding: 0; }
.chan-show { margin: 0 16px 8px; border-radius: 12px; background: var(--surface-2); padding: 10px 12px; display: flex; gap: 12px; align-items: center; }
.chan-show.past { opacity: .55; }
.chan-show .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chan-date { width: 44px; flex-shrink: 0; text-align: center; line-height: 1.15; }
.chan-date b { display: block; font-size: 18px; }
.chan-date small { font-size: 11px; color: var(--muted); text-transform: uppercase; }
.chan-flags { display: inline-flex; gap: 2px; }
.chan-none { margin: 0 16px; }
.chan-create { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 40px 24px; }
.chan-create .btn { margin-top: 8px; }
.chan-logos { display: flex; flex-wrap: wrap; gap: 8px; }
.chan-emoji { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); font-size: 22px; }
.chan-emoji.on { outline: 2px solid var(--brand); background: var(--brand-soft); }
.chan-langs { display: flex; flex-wrap: wrap; gap: 6px; }
.two-fields { display: flex; gap: 10px; }
.two-fields .field { flex: 1; min-width: 0; }
.chan-logo-sm { width: 34px; height: 34px; font-size: 18px; border-radius: 10px; }
.chan-chip { margin-top: 6px; }
.danger-text { color: var(--red); }
.chan-langs .chip.on { outline: 2px solid var(--brand); }
/* Onglet Chaînes et cloches (1.0.9) */
.chan-mine { display: flex; align-items: center; gap: 12px; width: calc(100% - 24px); margin: 4px 12px 10px; padding: 10px 12px;
    border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-align: start; }
.chan-mine .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chan-mine strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chan-bell { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; font-size: 18px; display: flex; align-items: center; justify-content: center;
    border: 1.5px solid var(--line); background: var(--surface); }
.chan-bell.on { background: var(--amber-bg); border-color: var(--amber); }
.tab-badge.dot.live { min-width: 10px; width: 10px; height: 10px; padding: 0; background: var(--red); }
/* Abonnés (1.0.10) */
.chan-state { font-size: 12px; font-weight: 700; border-radius: 10px; padding: 4px 8px; white-space: nowrap; flex-shrink: 0; }
.chan-state.now { color: #fff; background: var(--red); }
.chan-state.past { color: var(--muted); background: var(--surface-3); }
.chan-unfollow { display: block; margin: 12px auto 0; }
.chan-subs-line { display: flex; align-items: center; gap: 10px; width: calc(100% - 32px); margin: 10px 16px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.chan-subs-line strong { flex: 1; text-align: start; }
/* L'équipe d'une chaîne (1er novembre, maquette equipe-1.html) */
.team-line { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.team-av { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-text); display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.team-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.team-wait { align-self: flex-start; margin-top: 4px; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; background: var(--amber-bg); color: var(--amber-ink); }
.banner.team-invite { align-items: flex-start; padding-block: 12px; padding-inline: 16px; }
.team-invite b { display: block; font-weight: 600; }
.team-invite-acts { display: flex; gap: 8px; margin-top: 10px; }
.team-invite-acts .btn { width: auto; min-height: 34px; padding: 6px 16px; font-size: 14px; }
.team-empty { border: 1px dashed var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.team-empty p { margin: 0; }
.team-empty .row-actions { display: flex; gap: 8px; }
.team-empty input { flex: 1; min-width: 0; }
.team-empty .row-actions .btn { flex: none; width: auto; padding: 0 16px; } /* le numéro garde la place (essai du 1er novembre) */
/* Tous les contacts sur une ligne qui défile, comme Android (maquette equipe-web-1, validée le 8 novembre) ; en arabe, la
   ligne part de la droite d'elle-même (sens de la page) */
/* overflow-y: hidden : `overflow-x: auto` rendait aussi la hauteur défilable, et la zone de 48 px des puces la dépassait (4 px de
   défilement vertical au doigt, reproduit au banc le 11 novembre 2026) */
.team-picks { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none; padding-bottom: 2px; }
.team-picks::-webkit-scrollbar { display: none; }
.team-picks .chip { flex: none; }
.chan-inv { font-size: 12px; font-weight: 700; border-radius: 14px; padding: 6px 10px; white-space: nowrap; flex-shrink: 0; }
.chan-inv.go { background: var(--brand); color: var(--brand-ink); }
.chan-inv.sent { background: var(--amber-bg); color: var(--amber-ink); }
.chan-inv.ok { background: var(--brand-soft); color: var(--brand-text); }
.chan-inv.no { background: var(--surface-3); color: var(--muted); }
.chan-invited { margin: 14px 16px 0; padding: 12px; border-radius: 14px; background: var(--invite-bg); border: 1px solid var(--invite-line); color: var(--invite-ink); display: flex; flex-direction: column; gap: 6px; }
.chan-invited p { margin: 0; font-size: 13px; }
.chan-join { background: #6b4d8a; color: #fff; min-height: 44px; }

/* « ▶ Le direct » (1er novembre, maquette direct-1.html) : toujours en haut de la page d'une chaîne */
.chan-direct { margin: 14px 16px 0; width: calc(100% - 32px); display: flex; align-items: center; gap: 12px; text-align: start; border: 0; border-radius: 14px;
  padding: 12px; background: var(--surface-3); color: var(--text); font: inherit; cursor: pointer; }
.chan-direct.on { background: var(--red-soft); }
.chan-direct .play { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--text); color: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 15px; }
.chan-direct.on .play { background: var(--red); color: #fff; }
.chan-direct .play .icon { --ic: currentColor; }
.chan-direct .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chan-direct b { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.chan-direct.on b { color: var(--red); }
.chan-direct small { color: var(--muted); font-size: 12.5px; }
.live-dot.grey { background: #9aa4ab; box-shadow: none; animation: none; }
.chan-live-extras { margin: 8px 16px 0; display: flex; flex-direction: column; gap: 6px; }
.chan-where { font-size: 13px; padding: 8px; }
/* Le rideau d'attente du lecteur : velours de l'antenne, qui s'ouvre en 1,8 s quand le direct commence */
.watch-curtain { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.watch-curtain .pane { position: absolute; top: 0; bottom: 0; width: 51%; transition: transform 1.8s cubic-bezier(.77,0,.18,1);
  background: repeating-linear-gradient(90deg, #7a1024 0, #a01830 16px, #5c0c1c 34px, #8c142a 48px, #6a0e20 64px); }
.watch-curtain .pane::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,.22), rgba(0,0,0,.55)); }
.watch-curtain .pane.l { left: 0; }
.watch-curtain .pane.r { right: 0; }
.watch-curtain.open .pane.l { transform: translateX(-100%); }
.watch-curtain.open .pane.r { transform: translateX(100%); }
.watch-curtain-name { position: absolute; left: 0; right: 0; top: 24%; text-align: center; padding: 0 22px; transition: opacity .7s; }
.watch-curtain.open .watch-curtain-name { opacity: 0; }
.watch-curtain-name .logo { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 16px; background: linear-gradient(135deg, #ffd27a, #f08a5d);
  display: flex; align-items: center; justify-content: center; font-size: 30px; object-fit: cover; box-shadow: 0 8px 20px rgba(0,0,0,.4); }
.watch-curtain-name strong { display: block; font-size: 21px; text-shadow: 0 2px 10px #000; }
.watch-wait { position: absolute; left: 14px; right: 14px; bottom: max(18px, env(safe-area-inset-bottom)); margin: 0 auto; max-width: 460px;
  background: rgba(10,10,12,.82); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 14px; text-align: center;
  display: flex; flex-direction: column; gap: 4px; align-items: center; }
.watch-wait[hidden] { display: none; }
.watch-wait .k { font-size: 11px; opacity: .7; text-transform: uppercase; letter-spacing: .05em; }
.watch-wait .ti { font-size: 17px; font-weight: 700; }
.watch-wait .when { font-size: 14px; opacity: .85; }
.watch-wait .count { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.watch-wait .stay { font-size: 13px; opacity: .85; line-height: 1.35; margin-top: 4px; }
.watch-wait-btn { margin-top: 8px; width: auto; min-height: 36px; padding: 0 16px; border-radius: 999px; background: #fff; color: #111; font-size: 14px; font-weight: 600; }
.watch-wait .owner { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(251,191,36,.12); border: 1px solid rgba(251,191,36,.35);
  color: #fde68a; font-size: 12.5px; text-align: start; line-height: 1.35; }
.watch-live.grey { background: rgba(255,255,255,.2); }
.watch-title b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.watch-title small { display: block; font-weight: 400; opacity: .75; font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.chan-nothing { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.watch-player { position: fixed; inset: 0; z-index: 1000; background: #000; color: #fff; display: flex; flex-direction: column; }
.watch-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.watch-top { position: relative; display: flex; align-items: center; gap: 8px; padding: max(12px, env(safe-area-inset-top)) 12px 12px;
    background: linear-gradient(rgba(0,0,0,.55), transparent); }
.watch-live { display: inline-flex; align-items: center; gap: 6px; background: #e53935; border-radius: 6px; padding: 3px 8px; font-weight: 800; font-size: 12px; }
.watch-live .live-dot { background: #fff; }
.watch-count { display: inline-flex; align-items: center; gap: 4px; background: rgba(0,0,0,.45); border-radius: 6px; padding: 3px 8px; font-size: 12px; font-weight: 700; }
.watch-count svg { width: 14px; height: 14px; --ic: #fff; }
.watch-quit { flex: none; height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: #e53935; color: #fff; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.watch-status { position: relative; margin: auto 24px; text-align: center; background: rgba(0,0,0,.6); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.watch-status p { margin: 0; font-size: 14px; color: #ddd; }
.watch-status[hidden] { display: none; }
.watch-title { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.watch-actions { position: absolute; left: 14px; right: 14px; top: calc(max(12px, env(safe-area-inset-top)) + 54px); display: flex; gap: 8px;
    opacity: 0; pointer-events: none; transition: opacity .25s; }
.watch-actions.shown { opacity: 1; pointer-events: auto; }
/* Plein écran sans plein écran du navigateur (Safari sur iPhone, 8 novembre, maquette safari-lecteur-1.html) : les bandeaux de
   Mennana se cachent, sous-titres, voix et langue restent ; en haut pour ne pas couvrir les sous-titres, posés en bas de l'image */
.watch-player.immersive .watch-top { position: static; padding: 0; background: none; }
.watch-player.immersive .watch-top > :not(.watch-lang-pill) { display: none; }
.watch-player.immersive .watch-lang-pill { position: absolute; inset-inline-start: 12px; top: max(12px, env(safe-area-inset-top)); z-index: 2; background: rgba(0,0,0,.55); }
.watch-player.immersive .watch-actions { display: none; }
.watch-player.immersive .watch-voice, .watch-player.immersive .watch-hint { top: calc(max(12px, env(safe-area-inset-top)) + 50px); }
.watch-exit-full { position: absolute; inset-inline-end: 12px; top: max(12px, env(safe-area-inset-top)); z-index: 2; width: 44px; height: 44px; border: 0; border-radius: 50%;
    background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.watch-exit-full svg { width: 20px; height: 20px; --ic: #fff; }
.watch-exit-full[hidden] { display: none; }
.watch-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 999px; padding: 9px 6px;
    background: rgba(0,0,0,.55); color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.watch-btn svg { width: 16px; height: 16px; --ic: #fff; }

/* Préparer mon émission (1.0.15, maquette chaine-6.html) */
.chan-prep-note { margin: 6px 16px 0; }
.chan-host { border-color: var(--brand); }
.prep-page { position: fixed; inset: 0; z-index: 900; background: var(--bg); display: flex; flex-direction: column; }
.prep-body { padding: 0 0 24px; }
.prep-sub { margin: 4px 16px 0; font-weight: 700; }
.prep-solo { margin: 8px 16px 0; padding: 10px 12px; border-radius: 12px; background: var(--brand-soft); line-height: 1.45; }
/* Une seule porte (1er novembre, porte-1.html) : un rôle par carte, plus de QR */
.prep-grid { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 12px 12px 0; }
.prep-role { border: 1px solid var(--line); border-radius: 16px; padding: 12px; background: var(--surface); display: flex; flex-direction: column; gap: 6px; }
.prep-role h3 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 6px; }
.prep-role p { margin: 0; }
.prep-role .btn { margin-top: 4px; }
.prep-how { background: var(--surface-3); border-radius: 10px; padding: 8px 10px; color: var(--text); }
.prep-problem { margin: 8px 16px 0; color: var(--red); font-size: 14px; }
.prep-problem[hidden] { display: none; }
.prep-after { margin: 10px 16px 0; }
@media (min-width: 900px) {
    .prep-grid { grid-template-columns: repeat(3, 1fr); padding: 12px 20px 0; }
}

/* Regarder dans sa langue (31 octobre, maquette studio-5.html) : sous-titres choisis, « Langue », voix traduite */
.watch-subs { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.watch-voice { position: absolute; left: 50%; transform: translateX(-50%); top: calc(max(12px, env(safe-area-inset-top)) + 102px); display: inline-flex; align-items: center; gap: 6px;
  background: rgba(0,0,0,.6); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.watch-voice svg { width: 15px; height: 15px; --ic: #fff; }
.watch-voice[hidden], .watch-hint[hidden], .watch-lang[hidden] { display: none; }
.watch-hint { position: absolute; left: 14px; right: 14px; top: calc(max(12px, env(safe-area-inset-top)) + 102px); display: flex; align-items: center; gap: 6px;
  background: rgba(0,0,0,.72); border-radius: 12px; padding: 9px 12px; font-size: 13.5px; cursor: pointer; }
.watch-lang { position: absolute; left: 0; right: 0; bottom: 0; max-height: 78%; overflow: auto; background: #111b21; color: #e9edef; border-radius: 18px 18px 0 0;
  padding: 16px 16px max(16px, env(safe-area-inset-bottom)); z-index: 2; }
.watch-lang h3 { margin: 0 0 6px; font-size: 16px; }
.watch-lang h4 { margin: 14px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #8696a0; }
.watch-lang-row { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; color: inherit; padding: 10px 4px; font-size: 15px; text-align: start; cursor: pointer; border-radius: 10px; }
.watch-lang-row.on { background: rgba(37, 211, 102, .12); }
.watch-lang-row > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.watch-lang-row small { color: #8696a0; font-size: 12px; }
.watch-lang-row svg { width: 18px; height: 18px; --ic: #25d366; }
.watch-lang-none { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #8696a0; flex: none; }
.watch-lang-note { margin: 10px 0 0; font-size: 12.5px; color: #8696a0; line-height: 1.4; }
.watch-lang-close { width: 100%; margin-top: 14px; }
/* « Langue » toujours visible en haut (31 octobre : caché avec les boutons du bas, on ne le trouvait pas) */
.watch-lang-pill { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px;
  background: rgba(0,0,0,.55); color: #fff; padding: 6px 12px; font-size: 13px; font-weight: 800; cursor: pointer; }
.watch-lang-pill svg { width: 16px; height: 16px; --ic: #fff; }
.watch-lang-note.warn { color: #f6c177; }

/* Pas dans mes contacts (1er novembre, maquette compte-1.html) : bandeau sous l'en-tête de la discussion */
.unknown-bar { margin: 10px 12px; padding: 10px 12px; border-radius: 12px; background: #fef3c7; color: #78350f; border: 1px solid #f59e0b55; font-size: 14px; line-height: 1.4; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.unknown-bar[hidden] { display: none; }
.unknown-bar strong { color: #451a03; }
.unknown-bar .btn { width: auto; margin-top: 6px; padding: 6px 14px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .unknown-bar { background: #3b2f12; color: #fde68a; border-color: #6b5420; } :root:not([data-theme="light"]) .unknown-bar strong { color: #fff; } }
:root[data-theme="dark"] .unknown-bar { background: #3b2f12; color: #fde68a; border-color: #6b5420; }
:root[data-theme="dark"] .unknown-bar strong { color: #fff; }

/* C'est ton propre compte (1er novembre, maquette compte-1.html) : un lien a ouvert ma propre discussion */
.own-account { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 24px; max-width: 420px; margin: 0 auto; }
.own-account .own-face { width: 72px; height: 72px; border-radius: 50%; background: var(--surface); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.own-account h2 { margin: 6px 0 0; font-size: 19px; }
.own-account p { margin: 0; color: var(--muted); line-height: 1.45; }
.own-account .btn { margin-top: 6px; }
.own-pair { display: flex; align-items: center; gap: 10px; }
.own-letter { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 22px; }
.own-letter.owner { background: var(--brand-soft); color: var(--brand-text); }
.own-letter.me { background: var(--surface); color: var(--muted); }
.own-ne { color: var(--muted); font-size: 20px; }

/* Invité à l'antenne par Mennana (1er novembre, maquette invites-1.html) : sonnerie, présentation, salle d'attente */
.guest-layer { position: fixed; inset: 0; z-index: 1100; background: var(--bg); color: var(--text); display: flex; flex-direction: column; }
.guest-ring { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 80px 24px calc(48px + var(--safe-bottom)); background: linear-gradient(#2a1a45, #120a22); color: #fff; }
.guest-ring p { margin: 0; opacity: .85; }
.guest-logo { position: relative; overflow: hidden; width: 92px; height: 92px; border-radius: 26px; background: linear-gradient(135deg, #ffd27a, #f08a5d); display: flex; align-items: center; justify-content: center; font-size: 44px; }
.guest-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.guest-big { font-size: 21px; font-weight: 800; margin-top: 10px; }
.guest-ring-btns { margin-top: auto; width: 100%; display: flex; justify-content: space-around; }
.guest-round { background: none; border: 0; color: #fff; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.guest-round i { width: 66px; height: 66px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 26px; }
.guest-round.no i { background: #dc2626; }
.guest-round.yes i { background: #22c55e; }
.guest-page { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.guest-center { align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 24px; }
.guest-center .btn { width: auto; padding: 0 28px; }
.guest-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.guest-scroll { flex: 1; overflow-y: auto; padding: 14px 16px calc(20px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 10px; max-width: 520px; width: 100%; margin: 0 auto; }
.guest-scroll h2 { margin: 0; font-size: 19px; }
.guest-cam { height: 260px; flex: none; border-radius: 16px; overflow: hidden; background: #111; }
/* Présentation de l'invité : à la verticale, une colonne qui défile comme avant (le titre au-dessus de la caméra, l'ordre donné par order) */
.guest-present { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px calc(20px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 12px; }
.guest-present-side, .guest-present-form, .guest-present-btns { display: contents; }
.guest-present h2 { order: -1; margin: 0; }
.guest-present-name, .guest-present-no { display: none; }
/* Peu de hauteur (téléphone à l'horizontale, 5 novembre, maquette validée) : caméra à gauche, formulaire à droite, boutons toujours visibles */
@media (orientation: landscape) and (max-height: 500px) {
    .guest-page:has(.guest-present) > .guest-head { display: none; }
    .guest-present { flex-direction: row; overflow: hidden; padding: 8px calc(8px + env(safe-area-inset-right, 0px)) calc(8px + var(--safe-bottom)) calc(8px + env(safe-area-inset-left, 0px)); }
    .guest-present .guest-cam { width: 38%; height: auto; }
    .guest-present-side { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 8px; }
    .guest-present-form { display: flex; flex: 1; min-height: 0; flex-direction: column; gap: 8px; overflow-y: auto; padding: 0 8px; }
    .guest-present h2 { font-size: 16px; order: 0; }
    .guest-present-name { display: block; font-size: 13px; }
    .guest-present-hint { display: none; }
    .guest-present-btns { display: flex; gap: 8px; padding: 0 8px; flex: none; }
    .guest-present-btns .btn { flex: 1; min-width: 0; padding-inline: 8px; white-space: nowrap; }
    .guest-present-btns .btn-brand { flex: 1.6; }
    .guest-present-no { display: inline-flex; align-items: center; justify-content: center; }
}
.guest-cam-video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.guest-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.guest-field input { font-size: 16px; }
.guest-preview { margin: 0; font-size: 13px; font-weight: 700; }
.guest-problem { margin: 0; color: var(--red); font-size: 14px; }
.guest-watch { position: relative; height: 46vh; background: #000; flex: none; }
.guest-show { width: 100%; height: 100%; object-fit: contain; background: #000; }
.guest-live { position: absolute; top: 10px; inset-inline-start: 10px; background: #dc2626; color: #fff; font-size: 11px; font-weight: 800; border-radius: 6px; padding: 2px 8px; }
.guest-show-note { position: absolute; inset: 0; margin: 0; display: flex; align-items: center; justify-content: center; color: #9ca3af; font-size: 13px; pointer-events: none; }
.guest-show-note:empty { display: none; }
.guest-me { position: absolute; inset-inline-end: 10px; bottom: 10px; width: 78px; height: 104px; border-radius: 12px; border: 2px solid #fff; object-fit: cover; transform: scaleX(-1); background: #222; }
.guest-place { padding: 12px; border-radius: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 2px; }
.guest-live[hidden] { display: none; }
.guest-talk { margin: 0; padding: 10px 12px; border-radius: 12px; background: #14532d; color: #bbf7d0; font-size: 14px; }
/* À l'antenne (3c, maquette antenne-1.html) : le décompte « 3, 2, 1 » par-dessus ma caméra ; REC en salle d'attente */
.guest-count { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; text-shadow: 0 4px 30px #000; }
.guest-count b { font-size: 120px; font-weight: 900; line-height: 1; }
.guest-count span { font-size: 17px; font-weight: 600; margin-top: 8px; }
.guest-rec { position: absolute; top: calc(14px + var(--safe-top, 0px)); left: 50%; transform: translateX(-50%); background: rgba(0, 0, 0, .65); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .04em; padding: 4px 10px; border-radius: 8px; z-index: 5; }
/* À l'antenne (6 novembre 2026, sa capture d'iPhone, maquette validée invite-antenne-2.html) : l'antenne en grand et entière,
   comme un moniteur de plateau ; moi en bulle (toucher : on échange, glisser : on la déplace) ; les boutons de l'écran d'appel (.ctl).
   Avant : moi en grand, l'antenne dans une bulle, des émojis pour boutons. Comme ui/Antenne.kt. */
.guest-air { position: relative; flex: 1; background: #000; color: #fff; overflow: hidden; display: flex; flex-direction: column; }
.guest-air-top { flex: none; display: flex; gap: 8px; align-items: center; min-height: 44px; padding: calc(8px + var(--safe-top)) 14px 6px; }
.guest-air-live { background: #dc2626; color: #fff; font-weight: 800; font-size: 13px; border-radius: 8px; padding: 4px 10px; }
.guest-air-rec { background: rgba(255, 255, 255, .14); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .04em; padding: 4px 10px; border-radius: 8px; }
.guest-air-live[hidden], .guest-air-rec[hidden], .guest-air-bar[hidden], .guest-count[hidden], .guest-tile[hidden] { display: none; }
.guest-stage { position: relative; flex: 1; min-height: 0; }
.guest-tile { position: absolute; overflow: hidden; background: #000; }
.guest-tile video { display: block; width: 100%; height: 100%; object-fit: cover; }
.guest-tile.me video { transform: scaleX(-1); }
.guest-tile.me.back video { transform: none; }
.guest-tile.big { inset: 0; }
/* L'antenne entière : synthé, sous-titres et logo visibles, des bandes noires plutôt qu'une image coupée */
.guest-tile.pgm video { object-fit: contain; }
.guest-tile.small { z-index: 2; inset-inline-end: 12px; top: 10px; width: 96px; height: 140px; border-radius: 14px; border: 2px solid rgba(255, 255, 255, .6); box-shadow: 0 6px 18px rgba(0, 0, 0, .45); cursor: pointer; touch-action: none; }
.guest-tile.pgm.small { width: 84px; height: 150px; }
.guest-stage.pip-moved .guest-tile.small { left: var(--pip-x); top: var(--pip-y); right: auto; }
.guest-air-bar { flex: none; display: flex; justify-content: space-around; align-items: flex-start; width: 100%; max-width: 440px; margin: 0 auto; padding: 12px 6px calc(18px + var(--safe-bottom)); }
/* À l'horizontale : l'antenne sur toute la hauteur, les boutons en colonne à droite, toujours visibles */
@media (orientation: landscape) and (max-height: 500px) {
    .guest-air { flex-direction: row; }
    .guest-air-top { position: absolute; left: 0; top: 0; z-index: 3; min-height: 0; padding: 10px 12px; }
    .guest-air-bar { flex-direction: column; justify-content: center; align-items: center; gap: 4px; width: 96px; max-width: none; margin: 0; padding: 6px 4px; }
    .guest-air-bar .ctl { width: 88px; gap: 3px; font-size: 11px; }
    .guest-air-bar .ctl .disc { width: 46px; height: 46px; }
}

/* Alléger une vidéo (3 novembre, maquette alleger-1.html) */
.light-page { position: fixed; inset: 0; overflow: auto; background: var(--bg); color: var(--text); display: flex; flex-direction: column; align-items: center; }
.light-head { width: 100%; max-width: 520px; padding: max(12px, env(safe-area-inset-top)) 16px 4px; }
.light-head h1 { font-size: 22px; margin: 6px 0 0; }
.light-back { margin-inline-start: -8px; } /* la flèche des autres pages (6 novembre, avant : la pastille « ‹ Retour ») */
.light-body { width: 100%; max-width: 520px; padding: 8px 16px 32px; display: flex; flex-direction: column; gap: 12px; }
.light-sub { margin: 0; color: var(--muted); line-height: 1.45; overflow-wrap: anywhere; }
.light-file { margin: 0; padding: 14px 12px; border: 2px dashed var(--line); border-radius: 14px; text-align: center; line-height: 1.5; overflow-wrap: anywhere; }
.light-problem { margin: 0; padding: 12px; border-radius: 12px; background: color-mix(in srgb, var(--red) 12%, transparent); color: var(--red); line-height: 1.45; }
.light-line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.light-line span { color: var(--muted); }
.light-bar { height: 10px; border-radius: 10px; background: var(--line); overflow: hidden; }
.light-bar i { display: block; height: 100%; background: var(--brand); transition: width .3s; }
.light-ok { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; line-height: 1.45; }
.light-safe { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.light-body .btn { padding: 10px 22px; text-align: center; overflow-wrap: anywhere; text-decoration: none; box-sizing: border-box; }

/* Les langues que je lis (6 novembre 2026, maquette langues-messages-2) : le rang de chaque langue */
.menu-item > .lang-num,.lang-num{min-width:24px;width:24px;height:24px;border-radius:50%;background:var(--brand-soft);color:var(--brand-text);font-size:12px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;flex:none}
.menu-item.subtle{color:var(--muted,#54656f);font-size:14px}

/* ───── Cibles de 48 px (maquette miroir-cibles-clavier-1, 9 novembre) ─────
   Un doigt fait environ 1 cm : sous 48 px, on rate le bouton ou on touche le voisin. Le dessin ne change pas ; une zone
   invisible, centrée sur le bouton, répond au doigt sur 48 px au moins (Android le fait seul : Compose agrandit la zone d'un
   petit bouton jusqu'à 48 dp). Les boutons côte à côte sans écart (.row.person > .icon-btn, déjà hauts de 48) n'en ont pas :
   la zone déborderait sur le voisin. Ailleurs, l'écart entre deux boutons est au moins égal à ce qu'ajoute la zone. */
:where(.chip, .chat-filter, .lang-btn, .session-btn, .banner .icon-btn, .icon-btn.small, .rec-trash, .review-play, .review-delete,
    .chan-bell, .watch-quit, .watch-wait-btn, .team-invite-acts .btn, .lang-menu-btn, .voice .play, .btn.btn-sm, .btn-dark,
    .select-bar .select-all, .plus-btn, .chan-share, .chan-join, .landing-other summary) { position: relative; }
:is(.chip, .chat-filter, .lang-btn, .session-btn, .banner .icon-btn, .icon-btn.small, .rec-trash, .review-play, .review-delete,
    .chan-bell, .watch-quit, .watch-wait-btn, .team-invite-acts .btn, .lang-menu-btn, .voice .play, .btn.btn-sm, .btn-dark,
    .select-bar .select-all, .plus-btn, .chan-share, .chan-join, .landing-other summary,
    .video-big-open, .video-big-close, .cam-flip, .bg-remove, .pw-eye, .watch-exit-full, .transfer-btn.small)::after {
    content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, 48px); height: max(100%, 48px);
    transform: translate(-50%, -50%); border-radius: inherit;
}

/* « Découvrir Mennana » (maquette decouvrir-1, validée le 10 novembre 2026) : une page entière, des lignes par groupe, une feuille
   par fonction. Même allure que les listes des Réglages ; sur grand écran, la largeur d'un téléphone confortable. */
.discover-page { display: flex; flex-direction: column; height: 100%; max-width: 640px; margin: 0 auto; background: var(--bg); }
.discover-lead { padding: 0 20px 4px; font-size: 14px; line-height: 1.4; }
.discover-group { margin: 16px 20px 2px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--brand-text); }
.discover-list { margin: 0; }
.discover-list .menu-item { gap: 14px; }
.discover-list .menu-item small { line-height: 1.3; }
.discover-list .discover-chev { --ic: var(--muted); }
.discover-sheet h2 { display: flex; align-items: center; gap: 10px; }
.discover-sheet > p { margin: 0; line-height: 1.45; }
.discover-how { display: flex; flex-direction: column; gap: 2px; background: var(--bg-soft); border-radius: 12px; padding: 10px 12px; line-height: 1.45; }
.discover-how b { font-size: 13px; font-weight: 600; color: var(--muted); }
.discover-here { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 13px; color: var(--muted); line-height: 1.35; }
/* L'ambre des avis, clair et sombre : #b45309 faisait 3,4 pour 1 sur la feuille sombre (maquette restes-web-2) */
.discover-here.no { color: var(--amber-ink); }
.discover-link { display: inline-flex; align-items: center; gap: 6px; }

/* L'accueil écrit par le serveur pour les robots (resources/views/seo/accueil.blade.php, 10 novembre 2026) : à sa place, pas de
   logo de chargement ; ses liens de langue tiennent sur une ligne. L'app le remplace dès qu'elle démarre. */
#seo + .boot { display: none; }
#seo .landing-top-actions { display: flex; gap: 4px; }
#seo a.btn, #seo a.link-btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }

/* Le nouvel accueil (maquette accueil-2, validée le 10 novembre 2026) : le titre dit la traduction, une petite discussion traduite
   s'anime (texte seulement), trois piliers, « Pour qui ? », les 14 fonctions, une fin qui invite. Toujours sans image ni police. */
.lp-hero { display: grid; gap: 24px; padding-top: 4px; }
.lp-hero h1 { font-size: clamp(34px, 9.5vw, 60px); line-height: 1.04; letter-spacing: -.03em; font-weight: 800; margin: 0; }
.lp-hero h1 span, .lp-hero h1 em { display: block; }
.lp-hero h1 em { font-style: normal; color: var(--brand-text); }
.lp-where { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.lp-demo { background: #0f1416; color: #e9edef; border-radius: 22px; padding: 14px 12px 16px; display: flex; flex-direction: column; gap: 8px; max-width: 440px; width: 100%; justify-self: center; box-shadow: 0 10px 30px rgba(15, 20, 22, .18); }
.lp-who { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #9aa7ad; margin-bottom: 2px; }
.lp-av { width: 28px; height: 28px; border-radius: 50%; background: #e2c9a8; color: #5b3d1c; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.lp-bub { border-radius: 14px; padding: 8px 11px; font-size: 14.5px; line-height: 1.35; max-width: 86%; display: flex; flex-direction: column; gap: 5px; opacity: 0; animation: lp-in .5s ease forwards; }
.lp-them { background: #1f2c33; align-self: flex-start; }
.lp-me { background: #005c4b; align-self: flex-end; }
.lp-tr { display: block; padding: 5px 8px; border-inline-start: 3px solid #2bb673; border-radius: 6px; background: rgba(43, 182, 115, .12); font-size: 14px; }
.lp-lab, .lp-voice { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: #9aa7ad; }
.lp-voice { font-size: 14px; color: inherit; }
.lp-call { display: flex; align-items: center; gap: 7px; margin-top: 4px; padding: 9px 12px; border-radius: 14px; background: #123d27; font-size: 13.5px; opacity: 0; animation: lp-in .5s ease forwards; }
.lp-time { margin-inline-start: auto; color: #5fd59a; }
.lp-said { text-align: center; font-size: 15px; font-weight: 600; opacity: 0; animation: lp-in .5s ease forwards; }
.lp-said small { display: block; font-weight: 400; font-size: 12px; color: #9aa7ad; margin-top: 2px; }
.lp-d1 { animation-delay: .3s; } .lp-d2 { animation-delay: 1.5s; } .lp-d3 { animation-delay: 2.8s; } .lp-d4 { animation-delay: 4s; } .lp-d5 { animation-delay: 4.9s; }
@keyframes lp-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lp-bub, .lp-call, .lp-said { animation: none; opacity: 1; } }
.lp-pillars { display: grid; gap: 10px; }
.lp-pillar { display: flex; gap: 12px; align-items: flex-start; background: var(--surface-2); border-radius: 16px; padding: 14px; }
.lp-pillar strong { display: block; font-size: 17px; }
.lp-pillar p { margin: 3px 0 0; color: var(--muted); line-height: 1.45; }
.lp-disc { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.lp h2 { margin-bottom: 4px; }
.lp-hint { margin-bottom: 12px; }
.lp-uses-row { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; margin: 0 -20px; padding: 0 20px 6px; scrollbar-width: none; }
.lp-use { flex: 0 0 80%; scroll-snap-align: start; border-radius: 18px; padding: 16px; color: #fff; min-height: 160px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; }
.lp-use strong { display: block; font-size: 17px; line-height: 1.2; }
.lp-use p { margin: 6px 0 0; font-size: 14px; line-height: 1.4; opacity: .93; }
.lp-u1 { background: linear-gradient(135deg, #0f7346, #2bb673); }
.lp-u2 { background: linear-gradient(135deg, #185fa5, #3b82f6); }
.lp-u3 { background: linear-gradient(135deg, #7c3aed, #db2777); }
.lp-groups { display: grid; gap: 10px; }
.lp-group { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px 6px; }
.lp-group h3 { margin: 0 0 4px; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--brand-text); }
.lp-group ul { list-style: none; margin: 0; padding: 0; }
.lp-group li { display: flex; gap: 12px; align-items: center; padding: 7px 0; }
.lp-group li strong { display: block; font-size: 15px; }
.lp-group li span:not(.icon) { display: block; font-size: 13px; color: var(--muted); line-height: 1.35; }
.lp-more { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 10px auto 0; font-size: 16px; }
.lp-final { border-radius: 22px; background: var(--brand-strong); color: #fff; padding: 22px 18px; text-align: center; }
.lp-final strong { display: block; font-size: 22px; line-height: 1.2; }
.lp-final p { margin: 6px 0 14px; opacity: .9; }
.lp-final .btn { background: #fff; color: #0f7346; max-width: 360px; margin: 0 auto; }
.lp-sticky { position: fixed; inset-inline: 0; bottom: 0; z-index: 5; padding: 8px 16px calc(8px + var(--safe-bottom)); background: color-mix(in srgb, var(--bg) 94%, transparent); border-top: 1px solid var(--line); }
.lp-sticky .btn { width: 100%; max-width: 480px; margin: 0 auto; display: flex; }
.discover-visitor { padding: 4px 20px 6px; }
@media (min-width: 860px) {
    .lp-hero { grid-template-columns: 1.1fr 1fr; align-items: center; gap: 48px; }
    .lp-pillars { grid-template-columns: repeat(3, 1fr); }
    .lp-uses-row { overflow: visible; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
    .lp-groups { grid-template-columns: 1fr 1fr; }
    .lp-hint, .lp-sticky { display: none; }
}

/* Menu déroulant sous son bouton (choix de la langue, 10 novembre 2026 : la feuille du bas, au milieu de l'écran sur ordinateur,
   semblait ne pas s'ouvrir). Fond transparent : la page reste visible, un toucher à côté le ferme. */
.dropdown-backdrop { position: fixed; inset: 0; z-index: 40; background: transparent; }
body:has(.watch-player, .prep-page, .guest-layer) .dropdown-backdrop { z-index: 1110; }
/* Jamais plus haut que l'écran : un téléphone à l'horizontale fait défiler le menu (relecture du 10 novembre 2026 au soir : les
   premières langues sortaient par le haut, hors d'atteinte) */
.menu.dropdown {
    position: fixed; margin: 0; min-width: 230px; max-width: calc(100vw - 16px); padding: 6px 0;
    max-height: calc(100dvh - 16px); overflow-y: auto; overscroll-behavior: contain;
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .18); animation: dropdown-in .12s ease-out;
}
.menu.dropdown .menu-item { min-height: 48px; padding: 8px 16px; gap: 14px; }
@keyframes dropdown-in { from { opacity: 0; transform: translateY(-4px); } }

/* Clair ou sombre sur les pages d'avant la connexion (10 novembre 2026) : un rond de la taille du choix de la langue */
.theme-btn { width: 32px; padding: 0; justify-content: center; }
