/* ===== Groupe Communication : appareil photo, messages V2, appels vidéo, mail ===== */
svg.mini { width: 13px; height: 13px; fill: var(--muted); vertical-align: -2px; margin-right: 3px; }

/* ---------- Appareil photo ---------- */
.cam-app { padding: 0; background: #000; }
.camera-view { position: absolute; inset: 0; background: #000; color: #fff; display: flex; flex-direction: column; overflow: hidden; }
.cam-overlay { position: absolute; inset: 0; z-index: 95; background: #000; animation: appIn .25s; }
.cam-stage { position: absolute; inset: 0; overflow: hidden; }
.cam-canvas, .cam-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cam-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.cam-flash.go { animation: camFlash .35s ease-out; }
@keyframes camFlash { 0% { opacity: .9; } 100% { opacity: 0; } }
.cam-top { position: absolute; top: 54px; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 6px 16px; z-index: 3; }
.cam-btn { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.35); backdrop-filter: blur(10px); }
.cam-btn svg { width: 20px; fill: #fff; }
.cam-btn.round { width: 46px; height: 46px; }
.cam-zoom { display: flex; gap: 6px; background: rgba(0,0,0,.35); border-radius: 18px; padding: 3px; backdrop-filter: blur(10px); }
.cam-zoom button { width: 34px; height: 30px; border-radius: 15px; font-size: 12px; font-weight: 700; color: #fff; }
.cam-zoom button.on { background: rgba(255,255,255,.2); color: #ffd60a; }
.cam-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 18px 30px; z-index: 3;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.55) 40%); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cam-modes { display: flex; gap: 18px; font-size: 13px; font-weight: 700; letter-spacing: 1px; }
.cam-modes button { color: rgba(255,255,255,.65); }
.cam-modes button.on { color: #ffd60a; }
.cam-row { width: 100%; display: flex; align-items: center; justify-content: space-between; }
.cam-thumb { width: 46px; height: 46px; border-radius: 10px; overflow: hidden; background: rgba(255,255,255,.12); border: 2px solid rgba(255,255,255,.5); }
.cam-thumb img, .cam-thumb video { width: 100%; height: 100%; object-fit: cover; }
.shutter-btn { width: 74px; height: 74px; border-radius: 50%; border: 4px solid #fff; display: grid; place-items: center; }
.shutter-btn span { width: 60px; height: 60px; border-radius: 50%; background: #fff; transition: all .2s; }
.shutter-btn:active span { transform: scale(.9); }
.shutter-btn.video span { background: var(--red); }
.shutter-btn.recording span { width: 28px; height: 28px; border-radius: 7px; }
.cam-hint { font-size: 10px; opacity: .65; text-align: center; line-height: 1.4; max-width: 330px; }
.camera-view:not(.no-cursor) .cam-hint { display: none; }
.cam-rec { position: absolute; top: 104px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 6px;
  background: rgba(255,59,48,.9); padding: 4px 12px; border-radius: 12px; font-weight: 700; font-size: 14px; z-index: 4; font-variant-numeric: tabular-nums; }
.cam-rec .dot, .rec-bar .dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.cam-toast { position: absolute; bottom: 190px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.6); padding: 6px 14px;
  border-radius: 14px; font-size: 13px; z-index: 4; backdrop-filter: blur(10px); white-space: nowrap; }
.cam-stage.selfie canvas { transform: scaleX(-1); }

/* Mode paysage : le téléphone tourne, le contenu de l'appareil reste droit */
#phone.cam-landscape { transform: translate(-235px, 200px) rotate(-90deg); transition: transform .4s cubic-bezier(.3,.8,.3,1), width .55s; }
.camera-view.land { left: 50%; top: 50%; right: auto; bottom: auto; transform: translate(-50%, -50%) rotate(90deg); }
.camera-view.land .cam-top { top: 14px; }
.camera-view.land .cam-bottom { left: auto; top: 0; width: 150px; flex-direction: column-reverse; justify-content: center; padding: 16px 20px 16px 40px;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,.55) 35%); }
.camera-view.land .cam-row { flex-direction: column; gap: 18px; width: auto; }
.camera-view.land .cam-hint { display: none; }

/* ---------- Messages V2 ---------- */
.thread-head { flex-direction: row !important; align-items: center !important; justify-content: space-between; padding: 0 12px 10px !important; }
.thread-head .back { position: static !important; }
.thread-head .back svg { width: 26px; fill: var(--accent); }
.t-who { display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; flex: 1; min-width: 0; }
.t-who .avatar { width: 46px; height: 46px; font-size: 17px; }
.t-who .t-name { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-acts { display: flex; gap: 14px; min-width: 26px; justify-content: flex-end; }
.t-acts svg { width: 24px; fill: var(--accent); }
.group-av { background: linear-gradient(180deg, #8e9aaf, #5f6b80) !important; }
.group-av svg { width: 60%; fill: #fff; }
.bwrap { display: flex; flex-direction: column; max-width: 78%; }
.bwrap.me { align-self: flex-end; align-items: flex-end; }
.bwrap.them { align-self: flex-start; align-items: flex-start; }
.bwrap .bubble { max-width: 100%; }
.b-author { font-size: 11px; color: var(--muted); margin: 4px 12px 2px; }
.bubble.media-only { background: none !important; padding: 0 !important; }
.bubble .att-img { display: block; max-width: 220px; max-height: 260px; border-radius: 16px; margin: 0; cursor: pointer; object-fit: cover; }
.bubble .att-img.gif { max-width: 180px; }
.bubble .att-video { display: block; width: 220px; border-radius: 16px; background: #000; }
.b-text { white-space: pre-wrap; }
.bubble .att-img + .b-text, .bubble .gps-card + .b-text { margin-top: 6px; }
.seen { font-size: 11px; color: var(--muted); margin: 2px 6px 0; }
.voice { display: flex; align-items: center; gap: 8px; min-width: 190px; }
.v-play { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.25); display: grid; place-items: center; flex-shrink: 0; }
.bubble.them .v-play { background: rgba(10,132,255,.15); }
.v-play svg { width: 16px; fill: currentColor; }
.v-wave { flex: 1; display: flex; align-items: center; gap: 2px; height: 24px; }
.v-wave i { flex: 1; background: currentColor; opacity: .35; border-radius: 2px; }
.v-wave i.on { opacity: 1; }
.v-dur { font-size: 12px; opacity: .8; font-variant-numeric: tabular-nums; }
.gps-card { width: 220px; border-radius: 14px; overflow: hidden; background: var(--card); color: var(--text); cursor: pointer; border: 1px solid var(--line); }
.gps-map { height: 96px; position: relative; background:
  linear-gradient(90deg, rgba(255,255,255,.55) 2px, transparent 2px) 0 0 / 34px 34px,
  linear-gradient(0deg, rgba(255,255,255,.55) 2px, transparent 2px) 0 0 / 34px 34px,
  linear-gradient(135deg, #b7d7a8, #d9e7c5 45%, #a9cde8); }
.gps-pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -80%); }
.gps-pin svg { width: 34px; fill: var(--red); filter: drop-shadow(0 3px 4px rgba(0,0,0,.35)); }
.gps-info { padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.gps-info span { color: var(--muted); }
.gps-go { font-size: 13px; text-align: left; margin-top: 2px; }
.tAttach .att-preview { position: relative; display: inline-flex; margin: 0 12px 6px; }
.att-preview .att-img { height: 70px; width: auto; max-width: 140px; border-radius: 10px; object-fit: cover; }
.att-preview .gps-card { width: 180px; }
.att-preview .gps-map { height: 50px; }
.att-x { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff !important; font-size: 12px; }
.cmp-btn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: rgba(118,118,128,.16); }
.cmp-btn svg { width: 20px; fill: var(--accent); }
.composer .hidden { display: none !important; }
.rec-bar { display: flex; align-items: center; gap: 10px; margin: 0 12px 6px; padding: 8px 10px 8px 14px; background: rgba(255,69,58,.12); border-radius: 20px; color: var(--red); font-weight: 600; }
.rec-bar .dot { background: var(--red); }
.rec-bar .rec-label { flex: 1; font-weight: 400; font-size: 13px; }
.rec-time { font-variant-numeric: tabular-nums; }
.row.picked { background: rgba(10,132,255,.08); }
.checkmark { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex-shrink: 0; }
.row.picked .checkmark { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--card); }
.gif-grid { columns: 2; column-gap: 6px; }
.gif-grid img { width: 100%; border-radius: 10px; margin-bottom: 6px; display: block; cursor: pointer; background: rgba(118,118,128,.16); }

/* ---------- Appels ---------- */
.vcall-btn { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: rgba(118,118,128,.16); }
.vcall-btn svg { width: 26px; fill: var(--green); }
.call-kind { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 14px; opacity: .8; }
.call-kind svg { width: 18px; fill: #fff; }
.contact-actions button svg { width: 22px; }
.vc-screen { position: absolute; inset: 0; z-index: 30; background: #0b0c10; color: #fff; overflow: hidden; animation: appIn .3s; }
.vc-remote { position: absolute; inset: 0; background: radial-gradient(circle at 50% 35%, #2a2f3a, #0b0c10 70%); }
.vc-remote video { width: 100%; height: 100%; object-fit: cover; }
.vc-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.vc-ph-text { font-size: 15px; opacity: .75; }
.vc-local { position: absolute; top: 70px; right: 14px; width: 104px; height: 168px; border-radius: 16px; overflow: hidden; background: #222;
  box-shadow: 0 8px 22px rgba(0,0,0,.45); border: 2px solid rgba(255,255,255,.25); z-index: 2; }
.vc-local.off::after { content: ''; position: absolute; inset: 0; background: #1c1c1e url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23888' d='M3.3 2 2 3.3 4.7 6H4a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h11c.4 0 .8-.1 1.1-.3l4.6 4.6 1.3-1.3zM21 8l-4 2.5V8a2 2 0 0 0-2-2H9.8L21 17.2z'/%3E%3C/svg%3E") center / 34px no-repeat; }
.vc-local-wrap, .vc-local-wrap canvas { width: 100%; height: 100%; display: block; object-fit: cover; }
.vc-top { position: absolute; top: 60px; left: 18px; right: 130px; z-index: 2; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.vc-name { font-size: 22px; font-weight: 600; }
.vc-status { font-size: 14px; opacity: .8; font-variant-numeric: tabular-nums; }
.vc-controls { position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%); display: flex; gap: 22px; padding: 12px 20px; border-radius: 40px; z-index: 3;
  background: rgba(40,40,46,.55); backdrop-filter: blur(24px); }
.vc-controls .call-ctrl .c { width: 56px; height: 56px; }
.call-btn.small { width: 56px; height: 56px; }
.call-btn.small svg { width: 26px; }
/* Déplié : la personne à gauche, moi à droite */
.vc-screen.wide .vc-remote { right: 50%; }
.vc-screen.wide .vc-local { top: 0; right: 0; bottom: 0; width: 50%; height: auto; border-radius: 0; border: 0; box-shadow: none; border-left: 2px solid rgba(255,255,255,.08); }
.vc-screen.wide .vc-top { right: 52%; }

/* ---------- Mail ---------- */
.mail-me { padding: 0 4px 10px; }
.mail-tabs { margin-bottom: 14px; }
.mail-row { align-items: flex-start !important; }
.mail-row.unread .r-title { font-weight: 700; }
.mail-line { display: flex; justify-content: space-between; gap: 8px; }
.mail-subj { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-row .unread-dot { margin-top: 7px; }
.mail-setup { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 30px; text-align: center; }
.mail-setup .list { width: 100%; }
.mail-setup .field { align-items: center; gap: 4px; }
.mail-setup .field .r-sub { flex-shrink: 0; }
.mail-read h2 { font-size: 22px; margin: 4px 4px 14px; }
.mail-head { display: flex; gap: 12px; align-items: flex-start; padding: 0 4px 14px; border-bottom: 1px solid var(--line); }
.mail-body { padding: 16px 4px; font-size: 16px; line-height: 1.5; }
.mail-atts { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; padding: 4px; }
.mail-atts .att-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; cursor: pointer; }
.mail-compose { display: flex; flex-direction: column; gap: 12px; }
.mail-compose .field { align-items: center; gap: 10px; }
.mail-compose .fl { color: var(--muted); font-size: 15px; width: 48px; flex-shrink: 0; }
.mail-compose textarea { min-height: 180px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 16px; resize: none; outline: none; }
.att-chip { position: relative; }
.att-chip img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.att-chip button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; }

/* ---------- Galerie ---------- */
.photos.wide { grid-template-columns: repeat(6, 1fr); }
.photos .is-video { background: #111; overflow: hidden; }
.photos .is-video video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.viewer video { flex: 1; width: 100%; min-height: 0; background: #000; }
.b-system { align-self: center; text-align: center; font-size: 12px; color: var(--muted); padding: 6px 14px; margin: 4px auto; max-width: 85%; }
