/* ================================================================
   PROP PHONE V11 — device-kind.css + readonly.css
   Styles pour les kinds desktop (macbook, windows, custom) et
   pour le mode readonly / apercu client.
   ================================================================ */

/* ---- Bouton de cycle device_kind dans la toolbar ---- */
#kind-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: inherit;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
}
#kind-btn:hover { background: rgba(255,255,255,0.08); }

/* ---- Kinds mobiles : deja gérés par style.css / desktop-v6.css ---- */

/* ---- Kinds desktop : élargir le cadre ---- */
body.desktop-kind #phone-frame {
  width: min(1100px, 92vw);
  max-width: 1100px;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  border: 2px solid #2a2a2f;
  padding: 12px;
  background: #101012;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
body.desktop-kind #notch { display: none; }
body.desktop-kind #phone-screen {
  border-radius: 6px;
  background: #0a0a0c;
  overflow: hidden;
  position: relative;
}
body.desktop-kind .screen { padding: 24px; }

/* Barre de fenetre style desktop pour macbook/windows */
body.kind-macbook #phone-screen::before,
body.kind-windows #phone-screen::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 28px;
  background: linear-gradient(180deg, #1a1a1d 0%, #141416 100%);
  border-bottom: 1px solid #2a2a2f;
  z-index: 100;
}
body.kind-macbook #phone-screen::after {
  content: '● ● ●';
  position: absolute;
  top: 8px; left: 12px;
  font-size: 10px;
  color: #4a4a52;
  letter-spacing: 2px;
  z-index: 101;
}
body.kind-windows #phone-screen::after {
  content: '— □ ×';
  position: absolute;
  top: 6px; right: 12px;
  font-size: 12px;
  color: #8a8a92;
  letter-spacing: 6px;
  font-family: monospace;
  z-index: 101;
}
body.desktop-kind .screen.active { padding-top: 52px; }

/* Custom : cadre neutre, aucun chrome */
body.kind-custom #phone-frame {
  border: 1px dashed #4f8ef7;
  background: transparent;
}
body.kind-custom #phone-screen::before,
body.kind-custom #phone-screen::after { display: none; }

/* ---- MODE READONLY ---- */
body.readonly-mode {
  /* Curseur normal partout, pas de pointer sur les zones editables */
  cursor: default;
}
body.readonly-mode input,
body.readonly-mode textarea,
body.readonly-mode select {
  background: transparent !important;
  border: none !important;
  cursor: default !important;
  pointer-events: none;
}
body.readonly-mode [contenteditable="false"] { outline: none; }

/* Cacher les toolbars et panneaux d'edition */
body.readonly-mode #chrome-bottom,
body.readonly-mode .config-panel,
body.readonly-mode .director-panel,
body.readonly-mode [data-edit-only] {
  display: none !important;
}

/* Chrome haut minimal : garder horloge/chrono/plateau visibles pour l'apercu */
body.readonly-mode #install-btn,
body.readonly-mode #profiles-btn,
body.readonly-mode #device-btn,
body.readonly-mode #platform-btn,
body.readonly-mode #kind-btn,
body.readonly-mode #stage-btn { display: none !important; }

/* Banniere discrete "Aperçu client" */
#readonly-banner {
  position: fixed;
  top: 10px; right: 12px;
  background: rgba(79, 142, 247, 0.15);
  color: #4f8ef7;
  border: 1px solid rgba(79, 142, 247, 0.4);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  z-index: 9999;
  pointer-events: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Badge d'identification de la scene chargee */
#scene-badge {
  position: fixed;
  bottom: 14px; left: 14px;
  background: rgba(16, 16, 18, 0.85);
  color: #f0d989;
  border: 1px solid #c9a227;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 9999;
  pointer-events: none;
  max-width: 60vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#scene-badge b { color: #fff; margin-right: 6px; }

/* Message d'erreur de chargement de scene */
#scene-error {
  position: fixed;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: rgba(140, 20, 20, 0.9);
  color: #fff;
  padding: 16px 24px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 10000;
  max-width: 80vw;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

/* En mode plateau + readonly, cacher meme la banniere et le badge pour un rendu propre */
body.stage-mode.readonly-mode #readonly-banner,
body.stage-mode.readonly-mode #scene-badge { opacity: 0.15; }
body.stage-mode.readonly-mode #readonly-banner:hover,
body.stage-mode.readonly-mode #scene-badge:hover { opacity: 1; }
