/* Ecran de jeu "telephone" (voir telephone.html). Le telephone garde toujours son
   interface sombre, quel que soit le theme du systeme : c'est un objet du decor. */

:root {
  --page-fond: #0e1a17;
  --ecran-fond: radial-gradient(120% 70% at 50% 0%, #3b2f7a 0%, #1d1840 45%, #0f0c22 100%);
  --verre: rgba(255, 255, 255, 0.09);
  --verre-fort: rgba(255, 255, 255, 0.15);
  --verre-bordure: rgba(255, 255, 255, 0.14);
  --texte: #f4f2ff;
  --texte-doux: #b9b4d9;
  --accent: #8fe3d0;
  --accent-texte: #0b2a24;
  --bulle-moi: #6c5ce7;
  --bulle-lumi: rgba(255, 255, 255, 0.11);
  --ok: #7be0a1;
  --ko: #ff8a8a;
  --alerte: #ffd166;
  --rayon-ecran: 44px;
  --police: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  background: var(--page-fond);
  color: var(--texte);
  font-family: var(--police);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* ---------- Decor : un banc de parc, flou, a la tombee du jour ---------- */

.decor {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(60% 50% at 20% 15%, rgba(255, 196, 120, 0.35), transparent 70%),
    radial-gradient(50% 45% at 85% 25%, rgba(120, 200, 150, 0.28), transparent 70%),
    linear-gradient(180deg, #1f3a32 0%, #12241f 55%, #0b1613 100%);
  z-index: 0;
}

.decor span {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  animation: flotter 18s ease-in-out infinite alternate;
}
.decor span:nth-child(1) { width: 260px; height: 260px; left: 8%; top: 55%; background: #3f7d5e; }
.decor span:nth-child(2) { width: 200px; height: 200px; right: 10%; top: 60%; background: #c98a4b; animation-delay: -6s; }
.decor span:nth-child(3) { width: 160px; height: 160px; left: 45%; top: 8%; background: #6a8f4f; animation-delay: -12s; }

@keyframes flotter {
  from { transform: translate(0, 0); }
  to { transform: translate(30px, -40px); }
}

/* ---------- Le telephone ---------- */

.appareil {
  position: relative;
  z-index: 1;
  width: min(400px, 100vw - 32px);
  height: min(840px, 100dvh - 48px);
  padding: 12px;
  border-radius: calc(var(--rayon-ecran) + 12px);
  background: linear-gradient(145deg, #2b2b33, #0d0d10);
  box-shadow:
    0 0 0 2px #3a3a44,
    0 30px 80px rgba(0, 0, 0, 0.6),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.appareil.vibre { animation: vibrer 0.45s linear; }

@keyframes vibrer {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  15% { transform: translate(-3px, 0) rotate(-0.6deg); }
  30% { transform: translate(3px, 0) rotate(0.6deg); }
  45% { transform: translate(-3px, 0) rotate(-0.4deg); }
  60% { transform: translate(3px, 0) rotate(0.4deg); }
  75% { transform: translate(-1px, 0); }
}

.ecran {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--rayon-ecran);
  background: var(--ecran-fond);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: filter 0.6s ease;
}

.ilot {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 30px;
  border-radius: 20px;
  background: #000;
  z-index: 30;
}

.barre-etat {
  flex: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px 6px;
  height: 50px;
  font-size: 15px;
  font-weight: 600;
  z-index: 20;
}

/* A gauche de l'heure : retour aux enigmes de l'accueil, toujours visible pendant la partie. */
.barre-etat { padding-left: 14px; }
.barre-gauche { display: flex; align-items: center; gap: 8px; }
.btn-retour-accueil {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 9px 3px 5px;
  border-radius: 999px;
  background: var(--verre-fort);
  border: 1px solid var(--verre-bordure);
  color: var(--texte);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.btn-retour-accueil svg { width: 13px; height: 13px; }
.btn-retour-accueil:hover { background: var(--verre-bordure); }

.barre-icones { display: flex; align-items: center; gap: 8px; }
.barre-icones svg { width: 16px; height: 16px; }

.batterie { display: inline-flex; align-items: center; gap: 5px; }
.batterie-pourcent { font-size: 12px; font-variant-numeric: tabular-nums; }
.batterie-corps {
  position: relative;
  width: 26px;
  height: 13px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  padding: 1.5px;
}
.batterie-corps::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 3.5px;
  width: 2px;
  height: 5px;
  border-radius: 0 2px 2px 0;
  background: currentColor;
}
.batterie-niveau {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: 2px;
  background: currentColor;
  transition: width 0.5s ease, background 0.5s ease;
}
.batterie.faible { color: var(--alerte); }
.batterie.critique { color: var(--ko); animation: clignoter 1.2s ease-in-out infinite; }

@keyframes clignoter { 50% { opacity: 0.45; } }

/* ---------- Vues (une seule visible a la fois) ---------- */

.vue {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  animation: entrer 0.28s ease;
}

@keyframes entrer {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.ecran[data-vue="verrou"] #vue-verrou,
.ecran[data-vue="lumi"] #vue-lumi,
.ecran[data-vue="notes"] #vue-notes,
.ecran[data-vue="messages"] #vue-messages,
.ecran[data-vue="rendre"] #vue-rendre,
.ecran[data-vue="fin"] #vue-fin { display: flex; }

/* ---------- Ecran de verrouillage ---------- */

.vue-verrou {
  align-items: center;
  padding: 8px 18px 18px;
  overflow-y: auto;
  text-align: center;
}

.verrou-jour { margin: 6px 0 0; font-size: 17px; font-weight: 500; color: var(--texte-doux); text-transform: capitalize; }
.verrou-heure {
  margin: 0;
  font-size: 84px;
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.verrou-titre {
  margin: 10px 0 16px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
}

.verrou-notifs { width: 100%; display: flex; flex-direction: column; gap: 10px; text-align: left; }

.notif {
  background: var(--verre);
  border: 1px solid var(--verre-bordure);
  border-radius: 20px;
  padding: 12px 14px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.notif-app {
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--texte-doux);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.notif-pastille {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--verre-fort);
  font-size: 11px;
}
.notif-texte { font-size: 14.5px; line-height: 1.45; margin: 0; }
.notif-texte p { margin: 0 0 6px; }
.notif-texte p:last-child { margin-bottom: 0; }
.notif-masquee { opacity: 0.75; }

.btn-reveiller {
  margin-top: auto;
  padding: 18px 0 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  border: 0;
  background: none;
  font-size: 15px;
  font-weight: 600;
}
.btn-reveiller:disabled { opacity: 0.5; cursor: default; }
.btn-reveiller-orbe {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #8fe3d0, #6c5ce7, #ff9ad5, #8fe3d0);
  box-shadow: 0 0 30px rgba(143, 227, 208, 0.55);
  animation: tourner 6s linear infinite, respirer 2.4s ease-in-out infinite;
}

.verrou-liens { display: flex; gap: 18px; justify-content: center; margin: 10px 0 0; font-size: 13px; }
.verrou-liens a, .verrou-liens button { color: var(--texte-doux); background: none; border: 0; padding: 0; text-decoration: underline; }

@keyframes tourner { to { rotate: 360deg; } }
@keyframes respirer { 50% { transform: scale(1.08); } }

/* ---------- L'assistante ---------- */

.lumi-entete {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 16px 12px;
  border-bottom: 1px solid var(--verre-bordure);
}

.orbe {
  position: relative;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #8fe3d0, #6c5ce7, #ff9ad5, #8fe3d0);
  animation: tourner 8s linear infinite;
}
.orbe span {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #c9c2ff 25%, #3b2f7a 75%);
}
.orbe.parle { animation: tourner 1.4s linear infinite, respirer 0.7s ease-in-out infinite; box-shadow: 0 0 26px rgba(143, 227, 208, 0.7); }

.lumi-identite { flex: 1; min-width: 0; }
.lumi-nom { margin: 0; font-size: 18px; font-weight: 700; }
.lumi-statut { margin: 0; font-size: 12.5px; color: var(--texte-doux); }

.btn-rond {
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--verre-bordure);
  background: var(--verre);
}
.btn-rond svg { width: 20px; height: 20px; }

.messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scroll-behavior: smooth;
}

.bulle {
  max-width: 82%;
  padding: 9px 13px;
  border-radius: 20px;
  font-size: 15px;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  animation: entrer 0.22s ease;
}
.bulle-joueur { align-self: flex-end; background: var(--bulle-moi); border-bottom-right-radius: 6px; }
.bulle-perso { align-self: flex-start; background: var(--bulle-lumi); border: 1px solid var(--verre-bordure); border-bottom-left-radius: 6px; }
.bulle-systeme { align-self: center; max-width: 92%; background: none; color: var(--texte-doux); font-size: 13px; text-align: center; }
.bulle.en-attente { letter-spacing: 3px; animation: clignoter 1s ease-in-out infinite; }

.saisie {
  flex: none;
  display: flex;
  gap: 8px;
  padding: 8px 12px 2px;
}
.saisie input {
  flex: 1;
  min-width: 0;
  padding: 11px 16px;
  border-radius: 22px;
  border: 1px solid var(--verre-bordure);
  background: var(--verre);
  outline: none;
  font-size: 16px;
}
.saisie input:focus { border-color: var(--accent); }
.saisie button {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-texte);
}
.saisie button svg { width: 22px; height: 22px; }
.saisie button:disabled, .saisie input:disabled { opacity: 0.45; cursor: default; }
.saisie-cout { flex: none; margin: 4px 0 6px; text-align: center; font-size: 11.5px; color: var(--texte-doux); }

/* ---------- Applis (Notes, Messages, Rendre) ---------- */

.vue-appli { padding: 4px 18px 16px; overflow-y: auto; }
.appli-titre { margin: 4px 0 2px; font-size: 30px; font-weight: 800; }
.appli-sous-titre { margin: 0 0 14px; font-size: 14px; color: var(--texte-doux); line-height: 1.4; }
.appli-intertitre { margin: 18px 0 8px; font-size: 15px; color: var(--texte-doux); }

.liste-notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.liste-notes li {
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff8d6;
  color: #3a3220;
  font-size: 14.5px;
  line-height: 1.45;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.liste-notes li.vide { background: var(--verre); color: var(--texte-doux); box-shadow: none; }
.liste-notes li.nouvelle { animation: entrer 0.4s ease; outline: 2px solid var(--accent); }
.liste-idees li { background: rgba(143, 227, 208, 0.14); color: var(--texte); border: 1px solid rgba(143, 227, 208, 0.35); box-shadow: none; }

.verrou-appli { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 20px; }
.verrou-appli-icone { font-size: 48px; }
.verrou-appli-texte { margin: 10px 0 6px; font-size: 15px; }
.verrou-appli-indice {
  margin: 0 0 18px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--verre);
  border: 1px dashed var(--verre-bordure);
  font-size: 14px;
  color: var(--texte-doux);
}
.form-code { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.form-code input {
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid var(--verre-bordure);
  background: var(--verre);
  text-align: center;
  font-size: 18px;
  letter-spacing: 2px;
  outline: none;
}
.form-code input:focus { border-color: var(--accent); }
.form-code button, .btn-principal {
  padding: 13px 18px;
  border-radius: 14px;
  border: 0;
  background: var(--accent);
  color: var(--accent-texte);
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  text-decoration: none;
}
.form-code button:disabled, .btn-principal:disabled { opacity: 0.5; cursor: default; }
.form-code.secoue { animation: secouer 0.4s linear; }
.code-erreur { min-height: 1.2em; margin: 10px 0 0; color: var(--ko); font-size: 14px; }

@keyframes secouer {
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.fil-messages { display: flex; flex-direction: column; gap: 6px; }
.fil-contact {
  margin: 16px 0 4px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--verre-bordure);
  font-weight: 700;
  font-size: 16px;
}
.fil-contact:first-child { margin-top: 0; }
.fil-date { align-self: center; margin: 6px 0 2px; font-size: 12px; color: var(--texte-doux); }
.fil-note { align-self: center; margin-top: 14px; font-size: 12.5px; color: var(--texte-doux); text-align: center; font-style: italic; }

.form-rendre { display: flex; flex-direction: column; gap: 16px; }
.champ { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.champ-libelle { font-size: 14px; font-weight: 600; color: var(--texte-doux); padding: 0; }
.champ input {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--verre-bordure);
  background: var(--verre);
  font-size: 16px;
  outline: none;
}
.champ input:focus { border-color: var(--accent); }
.champ-verdict { min-height: 0; font-size: 13px; font-weight: 600; }
.champ-verdict.ok { color: var(--ok); }
.champ-verdict.ko { color: var(--ko); }

.choix-lieux { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choix-lieu { position: relative; }
.choix-lieu input { position: absolute; opacity: 0; pointer-events: none; }
.choix-lieu span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid var(--verre-bordure);
  background: var(--verre);
  font-size: 13.5px;
  text-align: center;
  line-height: 1.25;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.choix-lieu input:checked + span { background: rgba(143, 227, 208, 0.2); border-color: var(--accent); font-weight: 600; }
.choix-lieu input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.resultat-rendre { margin: 0; min-height: 1.2em; font-size: 14px; line-height: 1.4; text-align: center; color: var(--texte-doux); }
.resultat-rendre.ko { color: var(--ko); }

/* ---------- Fin de partie ---------- */

.vue-fin {
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  padding: 20px 24px 30px;
  gap: 10px;
  overflow-y: auto;
}
/* Marges automatiques plutot que justify-content: center, qui couperait le haut quand l'ecran defile. */
.fin-icone { font-size: 64px; line-height: 1; margin-top: auto; }
.fin-actions { margin-bottom: auto; }
.fin-titre { margin: 4px 0 0; font-size: 26px; font-weight: 800; }
.fin-texte { margin: 0; font-size: 15.5px; line-height: 1.5; color: var(--texte-doux); }
.fin-stats { display: flex; gap: 10px; margin: 10px 0 0; }
.fin-stats div { padding: 10px 12px; border-radius: 14px; background: var(--verre); min-width: 82px; }
.fin-stats dt { font-size: 11.5px; color: var(--texte-doux); }
.fin-stats dd { margin: 2px 0 0; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.fin-compte { margin: 4px 0 0; font-size: 13.5px; color: var(--texte-doux); }
.fin-compte a, .btn-lien { color: var(--accent); }
.fin-actions { display: flex; flex-direction: column; gap: 12px; align-items: center; margin-top: 16px; width: 100%; }
.fin-actions .btn-principal { width: 100%; }

.ecran.eteint { filter: grayscale(1) brightness(0.55); }

.btn-secondaire {
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid var(--verre-bordure);
  background: var(--verre);
  font-weight: 600;
  font-size: 15px;
  width: 100%;
}

/* Victoire sans compte : invitation a creer un compte */
.fin-invite {
  width: 100%;
  margin-top: 6px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(143, 227, 208, 0.1);
  border: 1px solid rgba(143, 227, 208, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.fin-invite-titre { margin: 0; font-weight: 800; font-size: 16px; }
.fin-invite-texte { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--texte-doux); }
.fin-invite .btn-principal { width: 100%; }
.fin-invite .btn-lien { font-size: 14px; }

/* "Defier un ami" (partage.js) : memes elements que jeu.html, aux couleurs du telephone */
.partage-resultat { width: 100%; display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.bouton-defi {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #8fe3d0, #6c5ce7);
  color: #0f0c22;
  font-weight: 800;
  font-size: 16px;
}
.bouton-defi:active { transform: scale(0.98); }
.partage-icone { display: inline-flex; }
.partage-icone svg { width: 20px; height: 20px; }
.bouton-partage-image {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--verre-bordure);
  background: var(--verre);
  font-size: 14px;
}
.bouton-partage-image svg { width: 18px; height: 18px; }
.bouton-partage-image:disabled { opacity: 0.6; cursor: progress; }
.partage-options { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.partage-options .partage-canal:first-child { grid-column: 1 / -1; }
.partage-canal {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--verre-bordure);
  background: var(--verre);
  color: var(--texte);
  font-size: 14px;
  text-decoration: none;
}
.partage-statut { margin: 0; font-size: 13px; color: var(--accent); }
.partage-apercu { margin: 0; font-size: 12.5px; color: var(--texte-doux); white-space: pre-wrap; text-align: left; }

/* ---------- Banniere (notification du haut) ---------- */

.banniere {
  position: absolute;
  top: 48px;
  left: 10px;
  right: 10px;
  z-index: 40;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 20px;
  background: rgba(30, 26, 60, 0.92);
  border: 1px solid var(--verre-bordure);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  animation: descendre 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.banniere-icone { flex: none; font-size: 22px; line-height: 1.2; }
.banniere-corps { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; line-height: 1.4; min-width: 0; }
.banniere-corps strong { font-size: 14px; }

@keyframes descendre {
  from { transform: translateY(-120%); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* ---------- Dock ---------- */

.dock {
  flex: none;
  display: flex;
  justify-content: space-around;
  margin: 4px 10px 0;
  padding: 8px 6px 6px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--verre-bordure);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.appli {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border: 0;
  background: none;
  padding: 2px 4px;
  min-width: 60px;
}
.appli-icone {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 24px;
  transition: transform 0.15s;
}
.appli:active .appli-icone { transform: scale(0.92); }
.appli-lumi { background: conic-gradient(from 0deg, #8fe3d0, #6c5ce7, #ff9ad5, #8fe3d0); }
.appli-notes { background: linear-gradient(180deg, #ffe680, #f5c542); }
.appli-messages { background: linear-gradient(180deg, #6ee7a0, #2fb36a); }
.appli-rendre { background: linear-gradient(180deg, #ff9a8b, #e5533d); }
.appli-nom { font-size: 11px; color: var(--texte-doux); }
.appli[aria-current="page"] .appli-nom { color: var(--texte); font-weight: 700; }
.appli.nouvelle .appli-icone { animation: sautiller 0.6s ease 3; }

@keyframes sautiller { 50% { transform: translateY(-6px); } }

.pastille {
  position: absolute;
  top: -4px;
  right: 4px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #ff3b30;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
}

.barre-accueil {
  flex: none;
  width: 130px;
  height: 5px;
  margin: 8px auto 8px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.6);
}

/* ---------- Liens hors de l'ecran ---------- */

.hors-ecran {
  position: fixed;
  top: 14px;
  left: 16px;
  right: 16px;
  z-index: 2;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  font-size: 14px;
  pointer-events: none;
}
.hors-ecran a, .hors-ecran button {
  pointer-events: auto;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 6px 12px;
}
.hors-ecran button { margin-left: auto; }

/* ---------- Porte du compte ---------- */

.popin-acces {
  max-width: 360px;
  border: 1px solid var(--verre-bordure);
  border-radius: 24px;
  padding: 24px;
  background: #1d1840;
  color: var(--texte);
  text-align: center;
}
.popin-acces::backdrop { background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(4px); }
.popin-surtitre { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: 2px; color: var(--accent); }
.popin-acces h2 { margin: 6px 0 10px; }
.popin-acces p { line-height: 1.45; color: var(--texte-doux); }
.popin-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }

/* ---------- Mobile : le telephone devient l'ecran ---------- */

@media (max-width: 520px) {
  body { align-items: stretch; }
  .decor, .hors-ecran { display: none; }
  .appareil {
    width: 100vw;
    height: 100dvh;
    padding: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }
  .ecran { border-radius: 0; padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
  .ilot { display: none; }
  .barre-etat { padding-top: 10px; height: 40px; }
  .banniere { top: calc(40px + env(safe-area-inset-top)); }
  .verrou-heure { font-size: 72px; }
}

@media (max-height: 700px) and (min-width: 521px) {
  .verrou-heure { font-size: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
