/* ============================================================
   mobile-natif.css : Démo interactive d'application mobile
   Téléphone fictif : barre d'onglets, réservation en 3 étapes,
   messagerie, profil, mode sombre, hors-ligne, notifications.
   Sublime Gestion Site Vitrine
   ============================================================ */

.phone-demo {
  display: flex;
  justify-content: center;
}

.phone-mockup {
  position: relative;
  width: 330px;
  height: 660px;
  background: var(--noir);
  border-radius: 46px;
  padding: 12px;
  box-shadow: 0 32px 80px -20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.05), inset 0 0 0 2px rgba(255, 255, 255, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  scroll-margin-top: 100px;

  --ph-bg: #FFFFFF;
  --ph-bg-2: #F5F3EE;
  --ph-ink: #1A1A1F;
  --ph-muted: #6B7280;
  --ph-border: #E8E4DB;
  --ph-accent: #E75C1F;
  --ph-accent-soft: rgba(231, 92, 31, 0.10);
  --ph-tab: #FFFFFF;
}

.phone-mockup[data-theme="dark"] {
  --ph-bg: #121216;
  --ph-bg-2: #1D1D23;
  --ph-ink: #F4F2ED;
  --ph-muted: #9A9AA6;
  --ph-border: rgba(255, 255, 255, 0.10);
  --ph-accent: #FF7A3D;
  --ph-accent-soft: rgba(255, 122, 61, 0.16);
  --ph-tab: #17171C;
}

.phone-mockup:hover {
  transform: translateY(-4px);
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.05), inset 0 0 0 2px rgba(255, 255, 255, 0.06);
}

.phone-mockup__notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 112px;
  height: 26px;
  background: var(--noir);
  border-radius: 0 0 18px 18px;
  z-index: 6;
}

.phone-mockup__screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--ph-bg);
  color: var(--ph-ink);
  border-radius: 36px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: background-color 0.35s ease, color 0.35s ease;
}

/* Barre de statut */
.phone-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px 0;
  font-size: 12px;
  font-weight: 700;
  height: 42px;
  flex-shrink: 0;
}

.phone-status__icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.phone-status__net {
  font-size: 10px;
  font-weight: 700;
}

.phone-status__battery {
  width: 22px;
  height: 11px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  padding: 1.5px;
  opacity: 0.8;
}

.phone-status__battery i {
  display: block;
  width: 78%;
  height: 100%;
  background: currentColor;
  border-radius: 1.5px;
}

.phone-mockup[data-net="offline"] .phone-status__net {
  text-decoration: line-through;
  opacity: 0.5;
}

.phone-offline {
  margin: 6px 12px 0;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(var(--noir-rgb), 0.85);
  color: #FFFFFF;
  font-size: 10.5px;
  font-weight: 500;
  text-align: center;
  animation: fadeDown 0.3s ease both;
  flex-shrink: 0;
}

.phone-mockup[data-theme="dark"] .phone-offline {
  background: rgba(255, 255, 255, 0.12);
}

/* Écrans */
.phone-screens {
  flex: 1;
  min-height: 0;
  position: relative;
}

.phone-screen {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 14px 18px 20px;
  scrollbar-width: none;
}

.phone-screen::-webkit-scrollbar { display: none; }

.phone-screen[hidden] { display: none; }

.phone-screen.is-active {
  animation: fadeIn 0.25s ease both;
}

.phone-screen__header {
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
}

.phone-screen__header--row {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.phone-screen__title {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.phone-screen__sub {
  font-size: 12.5px;
  color: var(--ph-muted);
  margin-top: 2px;
}

.phone-section-title {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ph-muted);
  margin: 16px 0 8px;
}

/* Accueil */
.phone-next {
  background: var(--ph-accent);
  color: #FFFFFF;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.phone-next__label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 8px;
}

.phone-next__empty strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.phone-next .phone-link {
  color: #FFFFFF;
  opacity: 0.9;
}

.phone-next__card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  animation: scaleIn 0.4s var(--ease-spring) both;
}

.phone-next__card strong { font-size: 15px; }
.phone-next__card span { font-size: 12.5px; opacity: 0.9; }

.phone-pill {
  align-self: flex-start;
  margin-top: 6px;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.22);
  color: #FFFFFF !important;
  opacity: 1 !important;
}

.phone-quick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.phone-quick__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px;
  background: var(--ph-bg-2);
  border: 1px solid var(--ph-border);
  border-radius: 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ph-ink);
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease;
}

.phone-quick__btn:active { transform: scale(0.96); }

.phone-quick__btn span {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--ph-accent-soft);
  color: var(--ph-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-quick__btn svg { width: 15px; height: 15px; }

.phone-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: var(--ph-bg-2);
  border: 1px solid var(--ph-border);
  border-radius: 14px;
  padding: 11px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  text-align: left;
  color: var(--ph-ink);
  transition: transform 0.15s ease;
}

.phone-list-item:active { transform: scale(0.98); }

.phone-list-item__icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--ph-accent-soft);
  color: var(--ph-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-list-item__icon svg { width: 15px; height: 15px; }

.phone-list-item__body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.phone-list-item__title { font-size: 13px; font-weight: 700; }
.phone-list-item__meta { font-size: 11px; color: var(--ph-muted); }
.phone-list-item__chevron { font-size: 18px; color: var(--ph-muted); }

.phone-link {
  background: none;
  border: none;
  color: var(--ph-accent);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  font-family: 'Inter', sans-serif;
}

.phone-link--center {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 10px;
}

/* Réservation */
.phone-book__progress {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
}

.phone-book__progress i {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--ph-border);
  transition: background-color 0.3s ease;
}

.phone-book__progress i.is-on { background: var(--ph-accent); }

.phone-book__step[hidden] { display: none; }
.phone-book__step.is-active { animation: slideInRight 0.3s var(--ease-spring) both; }

.phone-choices { display: flex; flex-direction: column; gap: 8px; }

.phone-choice {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 14px;
  background: var(--ph-bg-2);
  border: 1.5px solid var(--ph-border);
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ph-ink);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.phone-choice small { font-size: 11px; color: var(--ph-muted); font-weight: 500; }

.phone-choice:hover,
.phone-choice.is-selected {
  border-color: var(--ph-accent);
  background: var(--ph-accent-soft);
}

.phone-days {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
  margin-bottom: 12px;
}

.phone-days::-webkit-scrollbar { display: none; }

.phone-day {
  flex: 0 0 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 0;
  border-radius: 12px;
  border: 1.5px solid var(--ph-border);
  background: var(--ph-bg-2);
  color: var(--ph-ink);
  cursor: pointer;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.phone-day b { font-size: 15px; font-weight: 700; }

.phone-day.is-selected { border-color: var(--ph-accent); background: var(--ph-accent); color: #FFFFFF; }
.phone-day:disabled { opacity: 0.35; cursor: not-allowed; }

.phone-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.phone-slot {
  padding: 9px 4px;
  border-radius: 10px;
  border: 1.5px solid var(--ph-border);
  background: var(--ph-bg-2);
  font-size: 12px;
  font-weight: 600;
  color: var(--ph-ink);
  cursor: pointer;
}

.phone-slot:hover:not(:disabled) { border-color: var(--ph-accent); }
.phone-slot.is-selected { background: var(--ph-accent); border-color: var(--ph-accent); color: #FFFFFF; }
.phone-slot:disabled { text-decoration: line-through; opacity: 0.4; cursor: not-allowed; }

.phone-summary {
  background: var(--ph-bg-2);
  border: 1px solid var(--ph-border);
  border-radius: 14px;
  padding: 6px 14px;
  margin-bottom: 14px;
}

.phone-summary__row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--ph-border);
  font-size: 12.5px;
  color: var(--ph-muted);
}

.phone-summary__row:last-child { border-bottom: none; }
.phone-summary__row strong { color: var(--ph-ink); text-align: right; }

.phone-cta {
  display: block;
  width: 100%;
  background: var(--ph-accent);
  color: #FFFFFF;
  border: none;
  border-radius: 14px;
  padding: 13px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease;
  font-family: 'Inter', sans-serif;
}

.phone-cta:active { transform: scale(0.98); }
.phone-cta--ghost { background: transparent; color: var(--ph-accent); border: 1.5px solid var(--ph-accent-soft); margin-top: 8px; }
.phone-cta:disabled { opacity: 0.5; cursor: wait; }

.phone-book__nav { margin-top: 14px; }

.phone-confirmation { text-align: center; padding: 20px 0 14px; }

.phone-confirmation__check {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--success);
  color: #FFFFFF;
  font-size: 26px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: scaleIn 0.5s var(--ease-bounce) both;
}

.phone-confirmation__check.is-offline { background: var(--ph-muted); }

.phone-confirmation__title { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.phone-confirmation__sub { font-size: 12.5px; color: var(--ph-muted); max-width: 230px; margin: 0 auto; }

/* Messages */
.phone-thread {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 4px;
  border: none;
  border-bottom: 1px solid var(--ph-border);
  background: none;
  text-align: left;
  color: var(--ph-ink);
  cursor: pointer;
}

.phone-avatar {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--ph-accent-soft);
  color: var(--ph-accent);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-avatar--alt { background: rgba(59, 130, 246, 0.14); color: #2563EB; }
.phone-avatar--sys { background: rgba(var(--success-rgb), 0.14); color: var(--success); }
.phone-avatar--lg { width: 52px; height: 52px; font-size: 16px; }

.phone-thread__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.phone-thread__name { font-size: 13px; font-weight: 700; }
.phone-thread__preview { font-size: 11.5px; color: var(--ph-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone-thread__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 10.5px; color: var(--ph-muted); }

.phone-unread {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ph-accent);
}

.phone-thread.is-read .phone-unread { display: none; }

.phone-chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 8px;
}

.phone-msg {
  max-width: 82%;
  padding: 9px 12px;
  border-radius: 16px;
  font-size: 12.5px;
  line-height: 1.45;
  animation: fadeUp 0.3s ease both;
}

.phone-msg--in { align-self: flex-start; background: var(--ph-bg-2); border-bottom-left-radius: 5px; }
.phone-msg--out { align-self: flex-end; background: var(--ph-accent); color: #FFFFFF; border-bottom-right-radius: 5px; }
.phone-msg--typing { display: flex; gap: 4px; padding: 11px 14px; }
.phone-msg--typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ph-muted); animation: chatTypingPulse 1.2s infinite ease-in-out; }
.phone-msg--typing i:nth-child(2) { animation-delay: 0.15s; }
.phone-msg--typing i:nth-child(3) { animation-delay: 0.3s; }

@keyframes chatTypingPulse {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

.phone-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 6px;
}

.phone-reply {
  font-size: 11.5px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 100px;
  border: 1.5px solid var(--ph-accent-soft);
  background: transparent;
  color: var(--ph-accent);
  cursor: pointer;
}

.phone-reply:disabled { opacity: 0.4; }

/* Profil */
.phone-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0 10px;
}

.phone-profile div { display: flex; flex-direction: column; }
.phone-profile strong { font-size: 15px; }
.phone-profile span { font-size: 12px; color: var(--ph-muted); }

.phone-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--ph-border);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
}

.phone-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }

.phone-toggle i {
  width: 40px;
  height: 24px;
  border-radius: 100px;
  background: var(--ph-border);
  position: relative;
  transition: background-color 0.25s ease;
}

.phone-toggle i::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s var(--ease-spring);
}

.phone-toggle input:checked + i { background: var(--ph-accent); }
.phone-toggle input:checked + i::after { transform: translateX(16px); }
.phone-toggle input:focus-visible + i { outline: 2px solid var(--orange); outline-offset: 2px; }

.phone-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 11px 0;
  border: none;
  border-bottom: 1px solid var(--ph-border);
  background: none;
  color: var(--ph-ink);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}

.phone-version {
  margin-top: 18px;
  font-size: 10.5px;
  color: var(--ph-muted);
  text-align: center;
}

/* Barre d'onglets */
.phone-tabbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 8px 8px 16px;
  background: var(--ph-tab);
  border-top: 1px solid var(--ph-border);
  flex-shrink: 0;
  transition: background-color 0.35s ease;
}

.phone-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 2px;
  border: none;
  background: none;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--ph-muted);
  cursor: pointer;
  transition: color 0.2s ease;
  font-family: 'Inter', sans-serif;
}

.phone-tab svg { width: 20px; height: 20px; }
.phone-tab.is-active { color: var(--ph-accent); }

.phone-tab__badge {
  position: absolute;
  top: 2px;
  right: calc(50% - 18px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 100px;
  background: var(--ph-accent);
  color: #FFFFFF;
  font-size: 9.5px;
  font-weight: 700;
  font-style: normal;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-tab__badge[hidden] { display: none; }

/* Notification push */
.phone-notification {
  position: absolute;
  top: 46px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  transform: translateY(-90px);
  opacity: 0;
  transition: transform 0.45s var(--ease-spring), opacity 0.3s ease;
  z-index: 8;
  cursor: pointer;
  color: var(--ink);
}

.phone-notification[hidden] { display: none; }
.phone-notification.is-visible { transform: translateY(0); opacity: 1; }
.phone-notification__icon { color: var(--orange); flex-shrink: 0; display: flex; }
.phone-notification__body { display: flex; flex-direction: column; font-size: 12px; }
.phone-notification__body strong { font-size: 12px; }
.phone-notification__body span { color: var(--muted); font-size: 11px; }

/* Toast interne */
.phone-toast {
  position: absolute;
  left: 50%;
  bottom: 86px;
  transform: translateX(-50%) translateY(10px);
  background: rgba(var(--noir-rgb), 0.9);
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 100px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.35s var(--ease-spring);
  z-index: 7;
  white-space: nowrap;
}

.phone-toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 400px) {
  .phone-mockup { width: 300px; height: 620px; }
}
