/* ════════════════════════════════════════════════════
   ProxiPass - Styles Page Client (Tablette/Mobile)
   Optimisé pour tablette en mode paysage + iPhone
════════════════════════════════════════════════════ */

/* ── Page d'entrée du code (index.php) ───────────── */
.entry-page {
  min-height: 100vh;
  background: var(--gradient-hero);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.entry-page::before {
  content: '';
  position: absolute;
  top: -200px;
  left: -100px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(124,58,237,0.3) 0%, transparent 70%);
  pointer-events: none;
}
.entry-page::after {
  content: '';
  position: absolute;
  bottom: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(79,70,229,0.25) 0%, transparent 70%);
  pointer-events: none;
}

.entry-card {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 28px;
  padding: 48px 40px;
  width: 100%;
  max-width: 460px;
  text-align: center;
  position: relative;
  z-index: 1;
  box-shadow: 0 24px 64px rgba(0,0,0,0.3);
}

.entry-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}
.entry-logo-icon {
  width: 56px;
  height: 56px;
  background: var(--gradient-primary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 8px 24px rgba(79,70,229,0.4);
}
.entry-logo-name {
  font-size: 28px;
  font-weight: 800;
  color: white;
  letter-spacing: -0.5px;
}
.entry-logo-name span { color: #A78BFA; }

.entry-title {
  color: white;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}
.entry-subtitle {
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  margin-bottom: 32px;
}

.entry-input-wrap {
  position: relative;
  margin-bottom: 20px;
}
.entry-input {
  width: 100%;
  padding: 16px 20px;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: 16px;
  color: white;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 4px;
  text-transform: uppercase;
  outline: none;
  transition: all 0.2s;
}
.entry-input::placeholder {
  color: rgba(255,255,255,0.3);
  letter-spacing: 2px;
  font-size: 16px;
  font-weight: 400;
}
.entry-input:focus {
  border-color: rgba(167,139,250,0.7);
  background: rgba(255,255,255,0.12);
  box-shadow: 0 0 0 4px rgba(124,58,237,0.2);
}

.entry-btn {
  width: 100%;
  padding: 16px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 8px 24px rgba(79,70,229,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}
.entry-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}
.entry-btn:hover::before { transform: translateX(100%); }
.entry-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(79,70,229,0.5); }
.entry-btn:active { transform: translateY(0); }

.entry-error {
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.3);
  color: #FCA5A5;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}
.entry-error.show { display: block; animation: shake 0.4s ease; }

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

/* ── Store page ──────────────────────────────────── */
.store-page {
  min-height: 100vh;
  background: var(--gradient-hero);
  display: flex;
  overflow: hidden;
}

/* Colonne info boutique (gauche) */
.store-sidebar {
  width: 340px;
  min-width: 340px;
  background: rgba(255,255,255,0.04);
  border-right: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.store-sidebar-header {
  padding: 32px 28px 24px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.store-logo {
  width: 90px;
  height: 90px;
  border-radius: 20px;
  object-fit: cover;
  margin: 0 auto 16px;
  background: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.15);
}
.store-name {
  font-size: 22px;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}
.store-description {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
}
.store-photo-wrap {
  padding: 0 28px 24px;
}
.store-photo {
  width: 100%;
  border-radius: 16px;
  max-height: 200px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.1);
}
.store-welcome {
  padding: 20px 28px;
  background: rgba(255,255,255,0.06);
  margin: 0 20px 20px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
}
.store-welcome-title {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.store-welcome-text {
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  line-height: 1.6;
}

/* Colonne fidélité (droite) */
.store-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  overflow-y: auto;
}
.store-panel {
  width: 100%;
  max-width: 420px;
}

/* Steps */
.step { display: none; }
.step.active {
  display: block;
  animation: fadeInUp 0.35s ease;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.panel-title {
  color: white;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
  text-align: center;
}
.panel-subtitle {
  color: rgba(255,255,255,0.5);
  font-size: 14px;
  text-align: center;
  margin-bottom: 32px;
}

/* ── Clavier téléphone ───────────────────────────── */
.phone-display {
  background: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 20px 24px;
  margin-bottom: 20px;
  text-align: center;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.phone-display.has-value { border-color: rgba(167,139,250,0.5); }

.phone-country {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.phone-number {
  font-size: 28px;
  font-weight: 700;
  color: white;
  letter-spacing: 3px;
  font-variant-numeric: tabular-nums;
  min-height: 40px;
  line-height: 1;
}
.phone-number.placeholder { color: rgba(255,255,255,0.25); font-size: 18px; font-weight: 400; letter-spacing: 1px; }

/* Grille touches */
.dialpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.dial-key {
  aspect-ratio: 1.3;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.12s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.dial-key:hover { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.15); }
.dial-key:active {
  background: rgba(124,58,237,0.35);
  border-color: rgba(167,139,250,0.5);
  transform: scale(0.93);
}
.dial-key-num {
  font-size: 22px;
  font-weight: 700;
  color: white;
  line-height: 1;
}
.dial-key-letters {
  font-size: 9px;
  font-weight: 500;
  color: rgba(255,255,255,0.35);
  letter-spacing: 1.5px;
  margin-top: 3px;
}
.dial-key.special { background: rgba(255,255,255,0.04); }
.dial-key.delete  { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.15); }
.dial-key.delete:hover { background: rgba(239,68,68,0.2); }
.dial-key.delete .dial-key-num { font-size: 18px; }

/* Bouton valider numéro */
.phone-validate-btn {
  width: 100%;
  padding: 18px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 18px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 8px 24px rgba(79,70,229,0.4);
  margin-bottom: 12px;
}
.phone-validate-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(79,70,229,0.5); }
.phone-validate-btn:disabled { opacity: 0.4; transform: none; cursor: not-allowed; }

/* ── Formulaire inscription ──────────────────────── */
.register-form .form-control {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
  color: white;
  padding: 14px 16px;
  border-radius: 14px;
}
.register-form .form-control::placeholder { color: rgba(255,255,255,0.3); }
.register-form .form-control:focus {
  border-color: rgba(167,139,250,0.7);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.2);
  background: rgba(255,255,255,0.12);
}
.register-form .form-label { color: rgba(255,255,255,0.7); }
.register-form .form-check-label { color: rgba(255,255,255,0.6); }
.register-form .form-check-label a { color: #A78BFA; text-decoration: underline; }

/* ── Succès / Points ─────────────────────────────── */
.success-panel {
  text-align: center;
  padding: 20px 0;
}
.success-animation {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 44px;
  box-shadow: 0 0 0 0 rgba(124,58,237,0.4);
  animation: pulse-success 2s ease infinite;
}
@keyframes pulse-success {
  0%   { box-shadow: 0 0 0 0 rgba(124,58,237,0.4); }
  50%  { box-shadow: 0 0 0 24px rgba(124,58,237,0); }
  100% { box-shadow: 0 0 0 0 rgba(124,58,237,0); }
}

.success-title {
  color: white;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
}
.success-subtitle { color: rgba(255,255,255,0.6); font-size: 15px; margin-bottom: 32px; }

.points-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  padding: 16px 28px;
  margin-bottom: 16px;
}
.points-badge-icon { font-size: 28px; }
.points-badge-content { text-align: left; }
.points-badge-earned { font-size: 13px; color: rgba(255,255,255,0.5); margin-bottom: 2px; }
.points-badge-value { font-size: 28px; font-weight: 800; color: #FBBF24; line-height: 1; }
.points-badge-unit  { font-size: 12px; color: rgba(255,255,255,0.4); }

.points-total {
  background: rgba(16,185,129,0.12);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 14px;
  padding: 12px 20px;
  font-size: 14px;
  color: #A7F3D0;
  margin-bottom: 28px;
}

.new-client-badge {
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 14px;
  padding: 12px 20px;
  font-size: 14px;
  color: #FDE68A;
  margin-bottom: 28px;
  text-align: center;
}

.success-reset-btn {
  padding: 14px 40px;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: 14px;
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.success-reset-btn:hover { background: rgba(255,255,255,0.15); }

/* ── Loading overlay ─────────────────────────────── */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,15,45,0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.loading-overlay.show { opacity: 1; pointer-events: all; }
.loading-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 32px 40px;
  text-align: center;
}
.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(167,139,250,0.2);
  border-top-color: #A78BFA;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 16px;
}
.loading-text { color: rgba(255,255,255,0.7); font-size: 15px; }

/* ── Responsive tablette + mobile ───────────────────── */
@media (max-width: 900px) {
  .store-page { flex-direction: column; }
  .store-sidebar { width: 100%; min-width: unset; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .store-sidebar-header { display: flex; align-items: center; gap: 16px; text-align: left; padding: 20px; }
  .store-logo { width: 64px; height: 64px; margin: 0; }
  .store-name { font-size: 18px; margin-bottom: 4px; }
  .store-photo-wrap { display: none; }
  .store-welcome { margin: 0 16px 16px; }
  .store-main { padding: 24px 16px; }
}
@media (max-width: 500px) {
  .entry-card { padding: 32px 24px; }
  .dial-key-num { font-size: 20px; }
  .phone-number { font-size: 22px; }
  .panel-title  { font-size: 20px; }
}

/* ── Country selector ────────────────────────────── */
.country-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: rgba(20,20,50,0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  overflow: hidden;
  z-index: 100;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  display: none;
}
.country-dropdown.show { display: block; animation: fadeInUp 0.2s ease; }
.country-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  cursor: pointer;
  color: white;
  font-size: 14px;
  transition: background 0.15s;
}
.country-option:hover { background: rgba(255,255,255,0.08); }
.country-flag { font-size: 20px; }
.country-name { flex: 1; }
.country-dial { color: rgba(255,255,255,0.4); font-size: 13px; }
