/* ═══════════════════════════════════════════════════════════
   S.O.S SYNTHEX — style.css
   Design mobile réaliste · Glassmorphism · Animations
   ═══════════════════════════════════════════════════════════ */

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.18);
  --accent: #4da3ff;
  --danger: #ff3b30;
  --ok: #34c759;
  --text: #f2f2f7;
  --text-dim: rgba(242, 242, 247, 0.6);
  font-size: 16px;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 30% 20%, #1a2035 0%, #05070d 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.mono { font-family: "SF Mono", "Cascadia Code", Consolas, monospace; }
.hidden { display: none !important; }

/* ─────────── LE TÉLÉPHONE ─────────── */
.phone {
  position: relative;
  width: 375px;
  height: 812px;
  border-radius: 44px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 0 12px #111, 0 0 0 14px #2a2a2e, 0 30px 80px rgba(0,0,0,.8);
}
@media (max-width: 420px), (max-height: 860px) {
  .phone { width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; box-shadow: none; }
}

/* ─────────── BARRE DE STATUT ─────────── */
.status-bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 50;
  height: 44px; padding: 0 22px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; font-weight: 600;
  pointer-events: none;
}
.notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 160px; height: 28px; background: #000;
  border-radius: 0 0 18px 18px;
}
.sb-right { display: flex; align-items: center; gap: 6px; }
.sb-signal { font-size: 10px; letter-spacing: 1px; }
.sb-net { font-size: 12px; }
.sb-battery {
  width: 24px; height: 12px; border: 1px solid rgba(255,255,255,.6);
  border-radius: 3px; padding: 1px; display: inline-block; position: relative;
}
.sb-battery::after {
  content: ""; position: absolute; right: -4px; top: 3px;
  width: 2px; height: 5px; background: rgba(255,255,255,.6); border-radius: 0 2px 2px 0;
}
.sb-battery-level { display: block; height: 100%; width: 38%; background: var(--danger); border-radius: 1px; }

/* ─────────── GLASSMORPHISM ─────────── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(25px) saturate(160%);
  -webkit-backdrop-filter: blur(25px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
}

/* ─────────── ÉCRANS ─────────── */
.screen {
  position: absolute; inset: 0;
  padding-top: 44px;
  transition: opacity .5s ease, transform .5s ease;
}
.screen.fade-out { opacity: 0; transform: scale(1.06); pointer-events: none; }
.screen.fade-in  { animation: screenIn .5s ease both; }
@keyframes screenIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }

/* ═══════════ ÉTAPE 0 : LOCK SCREEN ═══════════ */
.lock-screen {
  background:
    linear-gradient(180deg, rgba(4,8,18,.5) 0%, rgba(4,8,18,.85) 100%),
    radial-gradient(ellipse at 50% 0%, #26344f 0%, #0a0f1c 60%, #04060c 100%);
  display: flex; flex-direction: column; align-items: center;
}

/* Pluie sur la vitre */
.rain { position: absolute; inset: 0; overflow: hidden; pointer-events: none; opacity: .5; }
.rain::before, .rain::after {
  content: ""; position: absolute; inset: -100% 0 0 0;
  background-image:
    linear-gradient(transparent 0 92%, rgba(160,190,255,.35) 92% 100%),
    linear-gradient(transparent 0 95%, rgba(160,190,255,.22) 95% 100%);
  background-size: 2px 90px, 3px 130px;
  background-position: 17px 0, 61px 40px;
  background-repeat: repeat;
  animation: rainFall 1.1s linear infinite;
}
.rain::after {
  background-size: 2px 110px, 2px 70px;
  background-position: 133px 20px, 217px 0;
  animation-duration: .8s; opacity: .7;
}
@keyframes rainFall { to { transform: translateY(50%); } }

.lock-clock { margin-top: 56px; text-align: center; }
.lock-time { font-size: 76px; font-weight: 200; letter-spacing: -2px; }
.lock-date { font-size: 17px; color: var(--text-dim); text-transform: capitalize; }

.lock-notifs { width: 100%; padding: 0 14px; margin-top: 32px; display: flex; flex-direction: column; gap: 10px; }
.notif { padding: 12px 14px; cursor: pointer; animation: notifIn .6s ease both; }
.notif:nth-child(2) { animation-delay: .25s; }
@keyframes notifIn { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: none; } }
.notif:active { transform: scale(.98); }
.notif-head { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 6px; color: var(--text-dim); }
.notif-head b { color: var(--text); font-weight: 600; }
.notif-time { margin-left: auto; font-size: 12px; }
.notif p { font-size: 14px; line-height: 1.4; }
.notif-icon {
  width: 22px; height: 22px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
}
.ic-signal { background: #3a76f0; }
.ic-agenda { background: #fff; color: #e33; font-size: 10px; }

.lock-hint {
  margin-top: auto; margin-bottom: 40px;
  background: none; border: none; color: var(--text-dim);
  font-size: 14px; cursor: pointer;
  animation: hintPulse 2s ease-in-out infinite;
}
@keyframes hintPulse { 0%,100% { opacity: .5; transform: translateY(0);} 50% { opacity: 1; transform: translateY(-6px);} }

/* Pavé PIN */
.keypad-panel {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 20;
  padding: 22px 18px 26px; text-align: center;
  animation: slideUp .35s cubic-bezier(.2,.9,.3,1.1) both;
}
@keyframes slideUp { from { transform: translateY(110%); } to { transform: none; } }
.keypad-title { font-size: 15px; color: var(--text-dim); margin-bottom: 14px; }
.pin-dots { display: flex; justify-content: center; gap: 16px; margin-bottom: 6px; }
.dot {
  width: 13px; height: 13px; border-radius: 50%;
  border: 1.5px solid var(--text); transition: background .15s;
}
.dot.filled { background: var(--text); }
.keypad-error { font-size: 13px; color: var(--danger); min-height: 18px; margin-bottom: 8px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 0 18px; }
.keypad button {
  height: 62px; border-radius: 50%;
  background: rgba(255,255,255,.12); border: none; color: var(--text);
  font-size: 26px; font-weight: 300; cursor: pointer;
  transition: background .12s, transform .08s;
}
.keypad button:active { background: rgba(255,255,255,.32); transform: scale(.93); }
.keypad .k-ghost { background: none; font-size: 15px; }

.shake { animation: shake .45s ease; }
@keyframes shake {
  10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-7px); } 40%, 60% { transform: translateX(7px); }
}

/* ═══════════ ÉTAPE 1 : HOME / MUR D'ENQUÊTE ═══════════ */
.home-screen {
  background:
    radial-gradient(circle at 70% 15%, rgba(120,40,40,.25), transparent 45%),
    repeating-linear-gradient(0deg, transparent 0 34px, rgba(255,255,255,.025) 34px 35px),
    repeating-linear-gradient(90deg, transparent 0 34px, rgba(255,255,255,.025) 34px 35px),
    linear-gradient(160deg, #2b241c 0%, #17130e 55%, #0b0906 100%);
  display: flex; flex-direction: column;
}

/* Mur d'enquête : punaises, fils rouges, coupures */
.board-bg { position: absolute; inset: 44px 0 0 0; pointer-events: none; z-index: 0; }
.pin { position: absolute; width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff8a80, #c62828 60%, #7f1010);
  box-shadow: 0 2px 4px rgba(0,0,0,.6); }
.p1 { top: 6%; left: 12%; } .p2 { top: 9%; right: 15%; }
.p3 { top: 38%; left: 7%; } .p4 { top: 33%; right: 8%; }
.thread { position: absolute; height: 2px; background: linear-gradient(90deg, #d32f2f, #8e1515);
  transform-origin: left center; box-shadow: 0 1px 2px rgba(0,0,0,.5); opacity: .85; }
.t1 { top: 7%;  left: 14%; width: 70%; transform: rotate(4deg); }
.t2 { top: 10%; right: 16%; width: 60%; left: auto; transform: rotate(38deg); transform-origin: right center; }
.t3 { top: 39%; left: 9%;  width: 82%; transform: rotate(-7deg); }
.clipping {
  position: absolute; padding: 6px 9px; max-width: 130px;
  background: #efe6d0; color: #2c2418;
  font-family: Georgia, "Times New Roman", serif; font-size: 10px; line-height: 1.3;
  box-shadow: 0 4px 10px rgba(0,0,0,.55);
}
.c1 { top: 12%; left: 8%;  transform: rotate(-5deg); font-weight: 700; }
.c2 { top: 16%; right: 6%; transform: rotate(3deg); }
.c3 { top: 41%; left: 36%; transform: rotate(-2deg); }

.app-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 18px 10px; padding: 240px 18px 0;
}
.app {
  position: relative; background: none; border: none; color: var(--text);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; transition: transform .12s;
}
.app:active { transform: scale(.9); }
.app-icon {
  width: 58px; height: 58px; border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; box-shadow: 0 6px 14px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.25);
}
.ic-messages { background: linear-gradient(160deg, #5dde6c, #12a33a); }
.ic-notes    { background: linear-gradient(160deg, #ffe9a8, #f5c94c); }
.ic-galerie  { background: linear-gradient(160deg, #ff9a9e, #a15ee8); }
.ic-mail     { background: linear-gradient(160deg, #6db6ff, #1d6fd6); }
.ic-crypt    { background: linear-gradient(160deg, #3a3f47, #14161a); border: 1px solid #444; }
.app-label { font-size: 11.5px; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.badge {
  position: absolute; top: -5px; right: 8px;
  min-width: 20px; height: 20px; border-radius: 10px; padding: 0 5px;
  background: var(--danger); color: #fff; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.lock-badge { position: absolute; top: -5px; right: 6px; font-size: 14px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.7)); }

.dock {
  position: relative; z-index: 1;
  margin: auto 14px 26px; padding: 12px;
  display: flex; justify-content: center;
  border-radius: 28px;
}
.app-crypt .app-label { color: #7fe0a8; letter-spacing: .5px; font-size: 10.5px; }
.app-crypt .app-icon { animation: cryptFlicker 3.2s infinite; }
@keyframes cryptFlicker { 0%,94%,100% { filter: none; } 95% { filter: brightness(2) hue-rotate(90deg); } 97% { filter: brightness(.5); } }

/* ═══════════ FENÊTRES D'APPS ═══════════ */
.app-screen { background: #0d1017; z-index: 10; display: flex; flex-direction: column; }
.app-header {
  margin: 8px 10px 0; padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
  border-radius: 16px;
}
.app-header h2 { font-size: 17px; font-weight: 600; }
.back-btn { background: none; border: none; color: var(--accent); font-size: 16px; cursor: pointer; }
.app-content { flex: 1; overflow-y: auto; padding: 14px; }

/* Messages */
.bubble {
  max-width: 78%; padding: 10px 13px; border-radius: 18px;
  font-size: 14.5px; line-height: 1.4; margin-bottom: 8px;
  animation: bubbleIn .3s ease both;
}
@keyframes bubbleIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.bubble.them { background: #26303e; border-bottom-left-radius: 5px; }
.bubble.me   { background: #1d6fd6; margin-left: auto; border-bottom-right-radius: 5px; }
.bubble-meta { font-size: 11px; color: var(--text-dim); text-align: center; margin: 14px 0 8px; }

/* Notes */
.note-card { background: #1c1a12; border: 1px solid #3a3524; border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.note-card h4 { color: #f5c94c; font-size: 15px; margin-bottom: 6px; }
.note-card p { font-size: 14px; line-height: 1.5; color: #e8e2cf; }
.note-card .scratch { text-decoration: line-through; opacity: .55; }

/* Galerie */
.gallery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photo-thumb {
  aspect-ratio: 1; border-radius: 12px; border: none; cursor: pointer;
  display: flex; align-items: flex-end; padding: 8px;
  color: #fff; font-size: 11px; text-shadow: 0 1px 3px #000;
  transition: transform .15s;
}
.photo-thumb:active { transform: scale(.95); }
.ph-labo   { background: linear-gradient(200deg, #24425a, #0d1b26 70%); }
.ph-street { background: linear-gradient(180deg, #3a3f52, #14161f 70%); }
.ph-cat    { background: linear-gradient(200deg, #6b5642, #241b12 70%); }
.ph-badge  { background: linear-gradient(200deg, #47526b, #12151d 70%); }

/* Visionneuse photo — la scène du Labo B en CSS */
.photo-view { position: relative; border-radius: 14px; overflow: hidden; background: #101821; padding-bottom: 8px; }
.labo-scene { position: relative; height: 300px; background: linear-gradient(180deg, #1c2f40 0%, #0e1822 100%); overflow: hidden; }
.labo-scene .neon { position: absolute; top: 12px; left: 15%; right: 15%; height: 6px; background: #cfe9ff; border-radius: 3px; box-shadow: 0 0 24px 6px rgba(180,220,255,.5); }
.whiteboard {
  position: absolute; top: 48px; left: 10%; width: 80%; height: 150px;
  background: #f4f4ef; border: 7px solid #9aa2ab; border-radius: 4px;
  color: #1c3d8f; padding: 14px 12px;
  font-family: "Segoe Print", "Comic Sans MS", cursive;
  transform: perspective(400px) rotateY(-4deg);
  box-shadow: 0 10px 24px rgba(0,0,0,.5);
}
.whiteboard .wb-line { font-size: 12px; margin-bottom: 6px; }
.whiteboard .wb-code { font-size: 21px; font-weight: 700; color: #c22626; transform: rotate(-2deg); display: inline-block; }
.labo-scene .paillasse { position: absolute; bottom: 0; left: 0; right: 0; height: 70px; background: linear-gradient(180deg, #2e3d4c, #1a232c); }
.labo-scene .flacon { position: absolute; bottom: 58px; width: 22px; height: 40px; background: rgba(140,220,255,.35); border-radius: 4px 4px 6px 6px; border: 1px solid rgba(200,240,255,.4); }
.labo-scene .f1 { left: 14%; } .labo-scene .f2 { left: 24%; height: 30px; background: rgba(140,255,180,.3); }
.photo-caption { font-size: 12.5px; color: var(--text-dim); padding: 10px 12px 4px; }

/* Mail */
.mail-item { border-bottom: 1px solid rgba(255,255,255,.08); padding: 12px 4px; cursor: pointer; }
.mail-item:active { background: rgba(255,255,255,.04); }
.mail-from { font-weight: 600; font-size: 14.5px; display: flex; justify-content: space-between; }
.mail-from time { font-weight: 400; font-size: 12px; color: var(--text-dim); }
.mail-subject { font-size: 13.5px; color: var(--accent); margin: 2px 0; }
.mail-preview { font-size: 12.5px; color: var(--text-dim); }
.mail-body { font-size: 14px; line-height: 1.55; padding: 12px 4px; }
.mail-body h4 { margin-bottom: 10px; font-size: 15px; }
.mail-body table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 12.5px; }
.mail-body th, .mail-body td { border: 1px solid rgba(255,255,255,.15); padding: 5px 7px; text-align: left; }
.mail-body th { background: rgba(255,255,255,.07); }
.row-dead td { color: #ff8a80; }
.row-alive td { color: #7fe0a8; font-weight: 700; }
.stamp {
  display: inline-block; margin: 10px 0; padding: 4px 10px;
  border: 2px solid var(--danger); color: var(--danger);
  font-weight: 800; font-size: 13px; transform: rotate(-4deg); letter-spacing: 1px;
}

/* Dossier X114 */
.file-card { background: #10151d; border: 1px solid #2c3a4d; border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.file-card h4 { color: #7fe0a8; font-size: 14px; margin-bottom: 10px; letter-spacing: 1px; }
.file-card dl { display: grid; grid-template-columns: 110px 1fr; row-gap: 7px; font-size: 13.5px; }
.file-card dt { color: var(--text-dim); }
.file-card dd { font-weight: 600; }
.reveal-alex { color: var(--danger); font-size: 15px; }
.btn-upload {
  width: 100%; padding: 20px; margin-top: 6px;
  background: linear-gradient(160deg, #d32f2f, #7f1010);
  border: 1px solid #ff6659; border-radius: 16px;
  color: #fff; font-size: 17px; font-weight: 800; letter-spacing: 1px; cursor: pointer;
  box-shadow: 0 0 30px rgba(255,60,40,.35);
  animation: uploadPulse 1.6s ease-in-out infinite;
}
@keyframes uploadPulse { 0%,100% { box-shadow: 0 0 18px rgba(255,60,40,.25); } 50% { box-shadow: 0 0 42px rgba(255,60,40,.6); } }
.btn-upload:active { transform: scale(.97); }

/* ═══════════ OVERLAYS / MODALES ═══════════ */
.overlay {
  position: absolute; inset: 0; z-index: 60;
  background: rgba(5, 8, 14, .55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  animation: overlayIn .25s ease both;
}
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
.modal { width: 82%; padding: 24px 20px; text-align: center; }
.modal h3 { font-size: 17px; margin-bottom: 6px; }
.modal-sub { font-size: 13px; color: var(--text-dim); margin-bottom: 16px; }
.modal input {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--glass-border); background: rgba(0,0,0,.35);
  color: var(--text); font-size: 16px; text-align: center; outline: none;
}
.modal input:focus { border-color: var(--accent); }
.modal-error { font-size: 13px; color: var(--danger); min-height: 18px; margin: 8px 0; }
.modal-actions { display: flex; gap: 10px; justify-content: center; }
.btn-main {
  padding: 11px 22px; border-radius: 12px; border: none;
  background: var(--accent); color: #04121f; font-size: 15px; font-weight: 700; cursor: pointer;
}
.btn-main:active { filter: brightness(.85); }
.btn-ghost { padding: 11px 18px; border-radius: 12px; border: 1px solid var(--glass-border); background: none; color: var(--text); font-size: 15px; cursor: pointer; }

/* ═══════════ FAUX APPEL ═══════════ */
.call-overlay { background: linear-gradient(180deg, #0c111c 0%, #05070c 100%); animation: overlayIn .3s ease both; }
.call-inner { text-align: center; width: 100%; padding: 0 30px; }
.call-label { color: var(--text-dim); font-size: 15px; margin-bottom: 6px; animation: hintPulse 1.4s infinite; }
.call-name { font-size: 30px; font-weight: 300; letter-spacing: 2px; }
.call-avatar {
  width: 110px; height: 110px; margin: 42px auto; border-radius: 50%;
  background: #1d2534; border: 1px solid #37455c;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; color: var(--text-dim);
}
.pulse { animation: avatarPulse 1.2s ease-out infinite; }
@keyframes avatarPulse {
  0% { box-shadow: 0 0 0 0 rgba(77,163,255,.45); }
  100% { box-shadow: 0 0 0 34px rgba(77,163,255,0); }
}
.call-actions { display: flex; justify-content: space-around; margin-top: 70px; }
.call-btn {
  width: 74px; height: 74px; border-radius: 50%; border: none;
  font-size: 30px; color: #fff; cursor: pointer; transition: transform .1s;
}
.call-btn:active { transform: scale(.92); }
.call-decline { background: var(--danger); }
.call-accept { background: var(--ok); animation: callShake .6s ease-in-out infinite; }
@keyframes callShake {
  0%,100% { transform: rotate(0); } 20% { transform: rotate(-12deg); }
  40% { transform: rotate(10deg); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(6deg); }
}
.call-timer { color: var(--ok); font-size: 14px; margin: 10px 0 46px; }
.call-speech { font-size: 21px; line-height: 1.6; font-weight: 300; min-height: 110px; }

/* ═══════════ MINI-JEU D'UPLOAD ═══════════ */
.upload-overlay { background: #04070d; flex-direction: column; }
.upload-inner { width: 86%; text-align: center; position: relative; }
.upload-inner h2 { font-size: 21px; color: #7fe0a8; margin-bottom: 8px; }
.upload-sub { font-size: 12.5px; color: var(--text-dim); margin-bottom: 30px; }
.progress-track {
  height: 22px; border-radius: 11px; overflow: hidden;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
}
.progress-fill {
  height: 100%; width: 0%;
  background: repeating-linear-gradient(45deg, #34c759 0 12px, #2aa64a 12px 24px);
  background-size: 34px 100%;
  transition: width .25s linear;
  animation: barberpole .8s linear infinite;
}
@keyframes barberpole { to { background-position: 34px 0; } }
.progress-label { font-size: 26px; font-weight: 700; margin-top: 14px; }
.upload-warn { font-size: 12px; color: #ffb340; margin-top: 22px; animation: hintPulse 1.2s infinite; }

/* Pop-ups d'erreur SYNTHEX */
.error-popup {
  position: absolute; z-index: 70;
  width: 220px; padding: 0 0 14px;
  background: #1a0505; border: 1px solid var(--danger); border-radius: 10px;
  box-shadow: 0 0 26px rgba(255,59,48,.5);
  animation: popupIn .18s cubic-bezier(.2,1.4,.4,1) both;
  text-align: left; overflow: hidden;
}
@keyframes popupIn { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.error-popup .ep-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--danger); color: #fff;
  padding: 6px 10px; font-size: 12px; font-weight: 800; letter-spacing: .5px;
}
.error-popup .ep-close {
  background: none; border: none; color: #fff; font-size: 15px;
  font-weight: 900; cursor: pointer; padding: 2px 4px;
}
.error-popup p { padding: 12px 12px 0; font-size: 12px; color: #ffd7d4; line-height: 1.4; }

/* ═══════════ GLITCH ═══════════ */
.glitch-text { position: relative; }
.glitching .glitch-text, .glitch-once { animation: glitchTxt .28s steps(2) infinite; }
@keyframes glitchTxt {
  0% { text-shadow: 2px 0 #f0f, -2px 0 #0ff; transform: translateX(0); }
  50% { text-shadow: -3px 0 #f0f, 3px 0 #0ff; transform: translateX(2px) skewX(-2deg); }
  100% { text-shadow: 2px 0 #f0f, -2px 0 #0ff; transform: translateX(-2px); }
}
.phone.glitching::after {
  content: ""; position: absolute; inset: 0; z-index: 90; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.06) 0 2px, transparent 2px 5px);
  mix-blend-mode: overlay;
  animation: scanShift .12s steps(3) infinite;
}
@keyframes scanShift { 0% { transform: translateY(0);} 100% { transform: translateY(6px);} }
.phone.glitching { animation: rgbSplit .3s steps(2) infinite; }
@keyframes rgbSplit {
  0%,100% { filter: none; } 50% { filter: drop-shadow(2px 0 0 rgba(255,0,80,.35)) drop-shadow(-2px 0 0 rgba(0,200,255,.35)); }
}

/* ═══════════ ÉCRAN FINAL ═══════════ */
.final-overlay { background: #000; z-index: 100; }
.final-inner { text-align: center; padding: 0 34px; }
.final-msg { font-size: 20px; color: #34c759; letter-spacing: 2px; line-height: 2; min-height: 130px; white-space: pre-line; }
.final-msg::after { content: "▊"; animation: cursorBlink 1s steps(1) infinite; }
@keyframes cursorBlink { 50% { opacity: 0; } }
#btn-restart { margin-top: 34px; }

/* ═══════════ DIVERS ═══════════ */
.toast {
  position: absolute; bottom: 90px; left: 50%; transform: translateX(-50%);
  z-index: 120; padding: 10px 18px; border-radius: 20px;
  background: rgba(20,20,25,.92); border: 1px solid var(--glass-border);
  font-size: 13px; white-space: nowrap;
  animation: overlayIn .25s ease both;
}
.home-indicator {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  width: 130px; height: 5px; border-radius: 3px;
  background: rgba(255,255,255,.55); z-index: 55; pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════
   AJOUTS v2 — EXTENSION « 3 ACTES »
   ═══════════════════════════════════════════════════════════ */

/* Icônes des nouvelles apps */
.ic-banque { background: linear-gradient(160deg, #43e6a0, #0e7a52); }
.ic-nav    { background: linear-gradient(160deg, #7ec3ff, #2451c9); }
.ic-tel    { background: linear-gradient(160deg, #67e06f, #1a8f2e); }

/* ─── App Banque ─── */
.bank-head {
  background: linear-gradient(160deg, #123227, #0b1d17);
  border: 1px solid #1f4a39; border-radius: 16px;
  padding: 16px; margin-bottom: 10px;
}
.bank-label   { font-size: 12px; color: var(--text-dim); }
.bank-balance { font-size: 30px; font-weight: 700; margin: 4px 0; }
.bank-alert   { font-size: 12px; color: #ffb340; }
.tx-month {
  font-size: 12px; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 1px; margin: 14px 0 6px;
}
.tx {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 8px; border-bottom: 1px solid rgba(255,255,255,.07); font-size: 13.5px;
}
.tx div span { display: block; font-size: 11.5px; color: var(--text-dim); font-weight: 400; }
.tx .plus { color: #7fe0a8; }
.tx.suspicious {
  border-left: 3px solid var(--danger);
  background: rgba(255,59,48,.07); border-radius: 6px;
}
.scratch-red { color: #ff8a80 !important; }

/* ─── App Répondeur ─── */
.call-log {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 6px; border-bottom: 1px solid rgba(255,255,255,.07); font-size: 14px;
}
.call-log div span { display: block; font-size: 11.5px; color: var(--text-dim); font-weight: 400; }
.cl-icon {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: #26303e; display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.cl-icon.missed { color: var(--danger); }
.vm {
  border: 1px solid rgba(255,255,255,.1); border-radius: 12px;
  padding: 10px 12px; margin-bottom: 10px; cursor: pointer;
}
.vm-row { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.vm-row div span { display: block; font-size: 11.5px; color: var(--text-dim); font-weight: 400; }
.vm-play {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #04121f;
  display: flex; align-items: center; justify-content: center; font-size: 12px;
}
.vm-text {
  display: none; margin-top: 10px; padding-top: 10px;
  font-size: 13.5px; line-height: 1.55; color: #dfe6f2;
  border-top: 1px dashed rgba(255,255,255,.15);
}
.vm-open .vm-text { display: block; animation: bubbleIn .3s ease both; }
.vm-open .vm-play { background: #ffb340; }

/* ─── App Navigateur / Intranet Synthex ─── */
.browser-chrome { border: 1px solid rgba(255,255,255,.12); border-radius: 14px; overflow: hidden; }
.addr-bar {
  background: rgba(255,255,255,.08); padding: 9px 12px;
  font-size: 12px; color: #9fd3a8; border-bottom: 1px solid rgba(255,255,255,.1);
}
.intra-page { padding: 18px 14px 22px; background: linear-gradient(180deg, #0e1420, #0a0e16); }
.intra-logo { text-align: center; font-size: 22px; letter-spacing: 3px; font-weight: 800; }
.intra-logo span { color: var(--accent); font-weight: 300; }
.intra-sub { text-align: center; font-size: 12px; color: var(--text-dim); margin: 4px 0 18px; }
.intra-form { display: flex; flex-direction: column; gap: 6px; }
.intra-form label { font-size: 11.5px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; }
.intra-input {
  padding: 11px 12px; border-radius: 10px; margin-bottom: 6px;
  border: 1px solid var(--glass-border); background: rgba(0,0,0,.35);
  color: var(--text); font-size: 14px; outline: none;
}
.intra-input:focus { border-color: var(--accent); }
.intra-input[readonly] { opacity: .65; }
.intra-hint { text-align: center; font-size: 11.5px; color: var(--text-dim); margin-top: 14px; }

/* ─── SMS de stress (bannières) ─── */
#sms-zone {
  position: absolute; top: 50px; left: 12px; right: 12px; z-index: 110;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.sms-banner { padding: 12px 14px; cursor: pointer; pointer-events: auto; animation: smsIn .45s cubic-bezier(.2,.9,.3,1.15) both; }
.sms-banner p { font-size: 13.5px; line-height: 1.4; }
@keyframes smsIn { from { transform: translateY(-130%); opacity: 0; } to { transform: none; opacity: 1; } }

/* ─── Cartons d'acte ─── */
.acte-card {
  position: absolute; inset: 0; z-index: 95; background: #000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  animation: acteFade 2.6s ease both;
}
.acte-num   { font-size: 15px; letter-spacing: 6px; color: #7fe0a8; }
.acte-title { font-size: 24px; font-weight: 200; letter-spacing: 2px; }
@keyframes acteFade { 0% { opacity: 0; } 12% { opacity: 1; } 82% { opacity: 1; } 100% { opacity: 0; } }

/* ═══════════════════════════════════════════════════════════
   AJOUTS v3 — CINÉMATIQUES BD + PASSE DE RÉALISME
   ═══════════════════════════════════════════════════════════ */

/* ─── Réalisme : icônes d'apps (SVG) ─── */
.app-icon svg { display: block; }
.ic-notes   { background: linear-gradient(160deg, #ffffff, #efe9d6); }
.ic-galerie { background: linear-gradient(160deg, #ffffff, #e9e9ef); }
.ic-nav     { background: linear-gradient(160deg, #ffffff, #dfe8f6); }

/* ─── Réalisme : barre de statut ─── */
.sb-right { gap: 5px; }
.sb-ic { display: block; }
.sb-batt-pct { font-size: 12px; font-weight: 500; }
.sb-battery-level { background: #fff; transition: width .4s; }
.sb-battery-level.low { background: var(--danger); }

/* ─── Réalisme : clavier PIN avec lettres ─── */
.keypad button { font-size: 24px; line-height: 1.15; }
.keypad .sub {
  display: block; font-size: 8.5px; letter-spacing: 1.5px;
  font-weight: 700; color: rgba(255,255,255,.7);
}

/* ─── Réalisme : app Messages ─── */
.convo-head {
  display: flex; align-items: center; gap: 10px;
  padding: 2px 2px 12px; margin-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.avatar {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(160deg, #95a3b8, #5c6a80); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.convo-status { display: block; font-size: 11px; color: var(--text-dim); font-weight: 400; }
.msg-inputbar {
  display: flex; align-items: center; gap: 10px; margin-top: 14px;
  padding: 8px 12px; border-radius: 20px;
  border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05);
  color: var(--text-dim); font-size: 14px;
}
.mi-field { flex: 1; }
.mi-plus, .mi-cam { font-size: 15px; }

/* ─── Réalisme : barre d'outils du navigateur ─── */
.browser-toolbar {
  display: flex; justify-content: space-around; align-items: center;
  padding: 10px 6px; font-size: 16px; color: var(--accent);
  background: rgba(255,255,255,.06); border-top: 1px solid rgba(255,255,255,.1);
}
.browser-toolbar .dim { opacity: .35; }
.browser-toolbar .tabs i { font-style: normal; font-size: 9px; position: relative; top: -4px; left: -9px; }

/* ─── Réalisme : carte bancaire ─── */
.bank-card {
  position: relative; overflow: hidden; border-radius: 14px;
  padding: 16px; margin-bottom: 10px;
  background: linear-gradient(135deg, #243b55, #141e30);
  border: 1px solid rgba(255,255,255,.15);
}
.bank-card::after {
  content: ""; position: absolute; top: -40px; right: -40px;
  width: 130px; height: 130px; border-radius: 50%; background: rgba(255,255,255,.06);
}
.bc-chip {
  width: 34px; height: 25px; border-radius: 5px; margin-bottom: 12px;
  background: linear-gradient(160deg, #e8c76a, #b8933c);
}
.bc-num { letter-spacing: 2px; font-size: 15px; margin-bottom: 10px; }
.bc-row { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-dim); letter-spacing: 1px; }

/* ═══ CINÉMATIQUES BANDE DESSINÉE ═══ */
.cine { position: absolute; inset: 0; z-index: 140; background: #000; cursor: pointer; }
.cine-stage, .cine-panel { position: absolute; inset: 0; }
.cine-panel { animation: panelIn .45s ease both; }
@keyframes panelIn { from { opacity: 0; transform: scale(1.05); } to { opacity: 1; transform: none; } }
.cine-art { width: 100%; height: 100%; display: block; }
.cine-panel::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 6px #000, inset 0 0 0 8px rgba(255,255,255,.14);
}
.cine-cap {
  position: absolute; left: 14px; right: 60px; bottom: 68px;
  background: #f4ecd2; color: #1a1712;
  font-family: Georgia, "Times New Roman", serif; font-size: 14.5px; line-height: 1.45;
  padding: 10px 12px; border: 2px solid #000; box-shadow: 4px 4px 0 rgba(0,0,0,.65);
}
.cine-sfx {
  position: absolute; z-index: 5;
  font-family: Impact, "Arial Black", sans-serif; font-size: 46px; color: #ffd93b;
  -webkit-text-stroke: 2px #000; text-shadow: 3px 3px 0 #000;
  animation: sfxPop .35s cubic-bezier(.2,1.6,.4,1) both;
}
@keyframes sfxPop { from { transform: scale(.2) rotate(-8deg); opacity: 0; } to { transform: scale(1) rotate(-8deg); opacity: 1; } }
.cine-ui {
  position: absolute; top: 52px; left: 16px; right: 16px; z-index: 6;
  display: flex; justify-content: space-between; align-items: center;
}
.cine-progress i { display: inline-block; width: 16px; height: 4px; margin-right: 5px; border-radius: 2px; background: #333; }
.cine-progress i.on { background: #ffd93b; }
.cine-skip {
  background: rgba(0,0,0,.55); border: 1px solid #555; color: #ddd;
  border-radius: 14px; padding: 5px 12px; font-size: 12px; cursor: pointer;
}
.cine-hint {
  position: absolute; bottom: 24px; width: 100%; text-align: center;
  font-size: 11.5px; color: #999; pointer-events: none;
  animation: hintPulse 2s infinite;
}

/* v3.1 : cinématiques en images IA */
img.cine-art { object-fit: cover; background: #000; }

/* ═══ v4 : vraies photos (galerie) + fonds d'écran réels ═══ */
.photo-thumb { background-size: cover; background-position: center; text-shadow: 0 1px 4px #000; }
.photo-frame { position: relative; }
.photo-img { width: 100%; display: block; border-radius: 14px 14px 0 0; }
.photo-annot {
  position: absolute; top: 25%; left: 9%;
  font-family: "Segoe Print", "Comic Sans MS", cursive;
  font-size: 27px; font-weight: 700; color: #c2261d;
  transform: rotate(-4deg);
  text-shadow: 0 0 7px rgba(255,255,255,.85), 0 0 14px rgba(255,255,255,.5);
}
.photo-annot-sub {
  position: absolute; top: 37%; left: 10%;
  font-family: "Segoe Print", "Comic Sans MS", cursive;
  font-size: 11.5px; color: #1c3d8f; transform: rotate(-3deg);
  text-shadow: 0 0 6px rgba(255,255,255,.9);
}
/* Fonds d'écran : photo réelle + assombrissement pour la lisibilité */
.lock-screen { background: #000 url("../assets/wall_lock.jpg") center/cover no-repeat; }
.home-screen {
  background:
    linear-gradient(rgba(0,0,0,.30), rgba(0,0,0,.55)),
    url("../assets/wall_home.jpg") center/cover no-repeat #000;
}
.board-bg, .rain { display: none; }
