/* Téléphone saisi : écran éteint, sachet de preuve, étiquette */

.seized {
  position: absolute;
  inset: 0;
  z-index: 50;
  border-radius: inherit;
  background:
    linear-gradient(125deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 38%),
    radial-gradient(120% 80% at 80% 110%, rgba(255, 255, 255, 0.04), transparent 60%),
    #020203;
}
.seized[hidden] { display: none; }
/* téléphone masqué jusqu'au premier chargement */
body.is-loading .phone, body.is-loading .evidence { visibility: hidden; }
.is-seized .wifi-menu, .is-seized .phone__home { display: none; }
.is-seized .phone { pointer-events: none; }
body.is-seized { overflow: hidden; }
body.is-seized .phone { animation: ev-drop 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.15) both; }
body[data-mode="public"].is-seized { height: 100vh; min-height: 0; }

.evidence { display: none; }
body.is-seized .evidence {
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
}
/* sachet calé sur la grille de .phone */
body[data-mode="public"].is-seized { position: relative; }
.evidence__bag, .evidence__tag { position: absolute; left: 50%; }
.evidence__bag {
  top: 50%;
  width: calc(min(408px, 100vw) + 70px);
  height: min(calc(min(868px, 100vh - 40px) + 120px), calc(100vh - 8px));
  transform: translate(-50%, -50%);
  animation: ev-drop 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.15) both;
  border-radius: 14px 14px 26px 26px;
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.03) 22%, rgba(255, 255, 255, 0) 45%, rgba(255, 255, 255, 0.08) 70%, rgba(255, 255, 255, 0.02) 100%),
    linear-gradient(rgba(220, 230, 240, 0.06), rgba(220, 230, 240, 0.1));
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 40px rgba(255, 255, 255, 0.06), 0 30px 70px rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(0.6px);
  backdrop-filter: blur(0.6px);
}
/* plis du plastique */
.evidence__bag::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(170deg, transparent 0 30%, rgba(255, 255, 255, 0.09) 31%, transparent 34%),
    linear-gradient(15deg, transparent 0 62%, rgba(255, 255, 255, 0.07) 63%, transparent 66%);
}
/* fermeture à glissière sous la bande rouge */
.evidence__bag::after {
  content: "";
  position: absolute;
  left: 10px; right: 10px; top: 58px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 6px 0 rgba(255, 255, 255, 0.08);
}
.evidence__seal {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(#d4161e, #a50f15);
  color: #fff;
  font-family: var(--head);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25);
}
/* perforations de la bande */
.evidence__seal::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 7px;
  height: 0;
  border-bottom: 2px dotted rgba(255, 255, 255, 0.45);
}
.evidence__tag {
  top: 50%;
  width: min(300px, 74vw);
  padding: 12px 14px 14px;
  transform: translate(-58%, 4%) rotate(-7deg);
  border-radius: 4px;
  background: linear-gradient(#fbf8ef, #efe9d8);
  color: #1d2433;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
  font-family: var(--body);
  animation: ev-tag 0.45s 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
/* œillet de l'étiquette */
.evidence__tag::before {
  content: "";
  position: absolute;
  top: 10px; right: 12px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #cfc6ad;
  box-shadow: inset 0 0 0 3px #efe9d8, 0 0 0 1px #b8ae92;
}
.evidence__head { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding-bottom: 8px; border-bottom: 2px solid #1d2433; }
.evidence__head img { width: 34px; height: 34px; border-radius: 50%; }
.evidence__head span { display: flex; flex-direction: column; font-size: 0.625rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #a50f15; }
.evidence__head b { color: #1d2433; font-family: var(--head); font-size: 0.9375rem; letter-spacing: 0.04em; }
.evidence__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin: 0; }
.evidence__fields .wide { grid-column: 1 / -1; }
.evidence__fields dt { font-size: 0.5625rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #5b6475; }
.evidence__fields dd { margin: 0; padding-bottom: 2px; border-bottom: 1px solid #b9b2a0; font-family: "Permanent Marker", cursive; font-size: 0.9375rem; line-height: 1.25; color: #1b3a8a; }
.evidence__stamp {
  position: absolute;
  right: 14px; bottom: 42px;
  margin: 0;
  padding: 2px 10px;
  border: 3px solid rgba(190, 20, 28, 0.75);
  border-radius: 6px;
  color: rgba(190, 20, 28, 0.8);
  font-family: var(--head);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transform: rotate(-14deg);
  mix-blend-mode: multiply;
}

/* petit écran */
@media (max-width: 520px) {
  body[data-mode="public"].is-seized { display: grid; place-items: center; min-height: 100dvh; }
  body.is-seized .phone { width: 62vw; height: 64dvh; margin-top: 0; padding: 7px; border-radius: 34px; background: linear-gradient(150deg, #34353a, #0d0e10); box-shadow: inset 0 0 0 2px #3c3d42; }
  body.is-seized .phone__screen { border-radius: 28px; }
  body.is-seized .evidence__bag { width: calc(62vw + 44px); height: calc(64dvh + 96px); }
  body.is-seized .evidence__seal { font-size: 0.6875rem; letter-spacing: 0.1em; }
  body.is-seized .evidence__tag { width: 70vw; transform: translate(-52%, 22%) rotate(-6deg); }
}

/* Admin : interrupteur « téléphone saisi » */
.seize-toggle b { color: var(--green); }
.seize-toggle[aria-pressed="true"] { border-color: rgba(245, 196, 0, 0.6); background: rgba(245, 196, 0, 0.12); }
.seize-toggle[aria-pressed="true"] b { color: #f5c400; }
.evidence__fields dd { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 520px) { .evidence__fields dd { font-size: 0.8125rem; } }

/* post-it */
.evidence__note {
  position: absolute;
  top: 50%; left: 50%;
  width: 150px;
  margin: 0;
  padding: 16px 12px 14px;
  transform: translate(8%, -118%) rotate(5deg);
  background: linear-gradient(#fff59a, #f6e56b);
  color: #1b3a8a;
  font-family: "Permanent Marker", cursive;
  font-size: 0.9375rem;
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45), inset 0 -8px 12px rgba(0, 0, 0, 0.05);
  animation: ev-tag 0.45s 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
/* ruban adhésif */
.evidence__note::before {
  content: "";
  position: absolute;
  top: -9px; left: 50%;
  width: 60px; height: 18px;
  transform: translateX(-50%) rotate(-4deg);
  background: rgba(240, 240, 230, 0.55);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
@media (prefers-reduced-motion: reduce) { .evidence__note { animation: none; } }
@media (max-width: 520px) { .evidence__note { width: 118px; padding: 12px 8px 10px; font-size: 0.75rem; transform: translate(4%, -122%) rotate(5deg); } }

/* QR code (zone blanche de lecture) */
.evidence__qr { display: block; width: 86px; margin-top: 10px; padding: 8px; background: #fff; border-radius: 2px; box-shadow: 0 0 0 1px #d8d0bb; }
.evidence__qr svg { display: block; width: 100%; height: auto; }

/* autocollant de scellé */
.evidence__sticker {
  position: absolute;
  top: 40px; right: 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 12px 4px;
  border: 2px solid #c8141c;
  border-radius: 3px;
  background: repeating-linear-gradient(-45deg, #fff 0 6px, #fbeaea 6px 12px);
  color: #c8141c;
  font-family: var(--head);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.1;
  transform: rotate(8deg);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
}
.evidence__sticker small { font-size: 0.5rem; letter-spacing: 0.18em; }

/* reflet */
.evidence__gloss { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.evidence__gloss::before {
  content: "";
  position: absolute;
  top: -20%; bottom: -20%;
  left: -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.1) 45%, rgba(255, 255, 255, 0.16) 50%, rgba(255, 255, 255, 0.1) 55%, transparent);
  transform: skewX(-12deg);
  animation: ev-gloss 7s 1.2s ease-in-out infinite;
}

@keyframes ev-drop { from { translate: 0 -40px; opacity: 0; } }
@keyframes ev-tag { from { scale: 1.25; opacity: 0; } }
@keyframes ev-gloss { 0% { left: -60%; } 30%, 100% { left: 130%; } }
@media (prefers-reduced-motion: reduce) {
  body.is-seized .phone, .evidence__bag, .evidence__tag, .evidence__gloss::before { animation: none; }
}
@media (max-width: 520px) {
  .evidence__sticker { top: 34px; right: 18px; font-size: 0.625rem; }
  .evidence__qr { width: 74px; padding: 7px; margin-top: 6px; }
}
