/* ==========================================================================
   VSI — Design System Variables & Components
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&family=Open+Sans:wght@400;500;600;700&display=swap');

:root {
  --vsi-navy: #162E4D;
  --vsi-navy-light: #1E3A5F;
  --vsi-steel: #7BA0C4;
  --vsi-orange: #F46E3C;
  --vsi-orange-dk: #D4582A;
  --vsi-bg: #F8FAFC;

  --shadow-sm: 0 1px 3px rgba(22,46,77,.06), 0 1px 2px rgba(22,46,77,.04);
  --shadow-md: 0 4px 16px rgba(22,46,77,.08), 0 2px 6px rgba(22,46,77,.04);
  --shadow-lg: 0 12px 40px rgba(22,46,77,.12), 0 4px 12px rgba(22,46,77,.06);
  --shadow-xl: 0 24px 64px rgba(22,46,77,.16), 0 8px 24px rgba(22,46,77,.08);
  --shadow-org: 0 8px 24px rgba(244,110,60,.28);

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
}

body {
  font-family: 'Open Sans', sans-serif;
  background-color: var(--vsi-bg);
  color: var(--vsi-navy);
}

/* ---------- COMPONENTS ---------- */

.vsi-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(22,46,77,.06);
  transition: transform .2s, box-shadow .2s;
}
.vsi-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.vsi-card-hero {
  background: linear-gradient(135deg, #162E4D 0%, #1E3A5F 60%, #1D4275 100%);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  position: relative;
}
.vsi-card-hero::before {
  content:'';position:absolute;width:200px;height:200px;
  background:rgba(244,110,60,.10);border-radius:50%;top:-60px;right:-60px;pointer-events:none;
}
.vsi-card-hero::after {
  content:'';position:absolute;width:160px;height:160px;
  background:rgba(123,160,196,.08);border-radius:50%;bottom:-50px;left:25%;pointer-events:none;
}

.vsi-btn {
  background: var(--vsi-orange);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 12px 22px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .04em;
  border: none;
  cursor: pointer;
  transition: background .2s, transform .2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}
.vsi-btn:hover { background: var(--vsi-orange-dk); transform: translateY(-2px) scale(1.02); }
.vsi-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.vsi-btn-outline {
  background: transparent;
  color: var(--vsi-orange);
  border: 2px solid var(--vsi-orange);
  border-radius: var(--radius-sm);
  padding: 11px 22px;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background .2s, transform .2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.vsi-btn-outline:hover { background: rgba(244,110,60,.06); transform: translateY(-1px); }

.vsi-nav {
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(22,46,77,.08);
  box-shadow: var(--shadow-sm);
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.vsi-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: rgba(22,46,77,.45);
}
.vsi-value {
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
  color: var(--vsi-navy);
}

.vsi-input {
  border: 2px solid rgba(22,46,77,.10);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  background: #fff;
  color: var(--vsi-navy);
  box-sizing: border-box;
}
.vsi-input:focus {
  border-color: var(--vsi-orange);
  box-shadow: 0 0 0 4px rgba(244,110,60,.10);
}
.vsi-input::placeholder { color: rgba(22,46,77,.35); }

/* Bottom nav mobile */
.vsi-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-top: 1px solid rgba(22,46,77,.08);
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: calc(60px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -4px 16px rgba(22,46,77,.06);
}
.vsi-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: rgba(22,46,77,.40);
  text-decoration: none;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 8px 12px;
  border-radius: 12px;
  transition: color .2s, background .2s;
}
.vsi-bottom-nav a svg { width: 22px; height: 22px; }
.vsi-bottom-nav a.active, .vsi-bottom-nav a:hover { color: var(--vsi-orange); }

/* Page wrapper with bottom nav space */
.vsi-page { padding-bottom: calc(76px + env(safe-area-inset-bottom)); min-height: 100vh; }

/* Badge */
.vsi-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
}
.vsi-badge-orange { background: rgba(244,110,60,.12); color: var(--vsi-orange); }
.vsi-badge-navy { background: rgba(22,46,77,.08); color: var(--vsi-navy); }
.vsi-badge-green { background: rgba(16,185,129,.10); color: #059669; }
.vsi-badge-red { background: rgba(239,68,68,.10); color: #DC2626; }
.vsi-badge-blue { background: rgba(123,160,196,.15); color: #1A5280; }

/* Divider */
.vsi-divider { height: 1px; background: rgba(22,46,77,.07); margin: 16px 0; }

/* Avatar */
.vsi-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
  flex-shrink: 0;
}

/* Section title */
.vsi-section-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(22,46,77,.40);
  margin-bottom: 12px;
}

/* ==========================================================================
   VSI — Vendez Seul Immo — Core Functional Styles
   (Design system moved to Tailwind CSS)
   ========================================================================== */

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar{width:5px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:rgba(22,46,77,.14);border-radius:9999px}
::selection{background:rgba(244,110,60,.20)}

/* ---------- KEYFRAMES ---------- */
@keyframes vsiUp{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}
@keyframes pulseBadge{0%,100%{box-shadow:0 0 0 0 rgba(244,110,60,0.4)}50%{box-shadow:0 0 0 6px rgba(244,110,60,0)}}
@keyframes toastIn{from{transform:translateY(16px) scale(0.96);opacity:0}to{transform:none;opacity:1}}
@keyframes toastOut{from{opacity:1}to{transform:translateY(8px);opacity:0}}
@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}
@keyframes slideDownBanner{from{transform:translateY(-100%)}to{transform:translateY(0)}}
@keyframes toastProgress{from{width:100%}to{width:0}}

/* ---------- VSI UP ANIMATION ---------- */
.vsi-up{opacity:0;animation:vsiUp 550ms cubic-bezier(0.22,1,0.36,1) forwards}
.vsi-up.d1{animation-delay:55ms}.vsi-up.d2{animation-delay:110ms}.vsi-up.d3{animation-delay:165ms}
.vsi-up.d4{animation-delay:220ms}.vsi-up.d5{animation-delay:275ms}.vsi-up.d6{animation-delay:330ms}

/* ========================================================================
   TOAST — Javascript Notification System
   ======================================================================== */
.toast-container{position:fixed;bottom:80px;right:16px;left:16px;z-index:9999;display:flex;flex-direction:column;gap:10px}
@media(min-width:768px){.toast-container{bottom:28px;left:auto;right:28px;width:380px}}
.toast{
  background:rgba(13,27,42,0.95);backdrop-filter:blur(16px);color:#fff;
  border-radius:16px;box-shadow:0 4px 18px rgba(22,46,77,.06);font-size:14px;font-weight:600;
  overflow:hidden;cursor:pointer;
}
.toast-body{display:flex;align-items:center;gap:12px;padding:14px 18px}
.toast-icon{flex-shrink:0}
.toast-message{flex:1}
.toast-progress{height:3px;background:rgba(255,255,255,.15)}
.toast-progress-bar{height:100%;background:rgba(255,255,255,.5);border-radius:0 0 16px 16px;animation:toastProgress linear forwards}
.toast--success{background:rgba(16,185,129,0.95)}
.toast--success .toast-progress-bar{background:rgba(255,255,255,.4)}
.toast--error{background:rgba(239,68,68,0.95)}
.toast--info{background:rgba(13,27,42,0.95)}
.toast--warning{background:rgba(245,158,11,0.95)}
.toast--visible{animation:toastIn 260ms cubic-bezier(0.22,1,0.36,1)}
.toast--out{animation:toastOut 200ms cubic-bezier(0.25,0.1,0.25,1) forwards}

/* ========================================================================
   OFFLINE BANNER
   ======================================================================== */
#offline-banner{
  display:none;position:fixed;top:0;left:0;right:0;z-index:9999;
  background:#F59E0B;color:#fff;padding:10px 20px;font-size:13px;font-weight:700;
  align-items:center;justify-content:center;gap:8px;
  animation:slideDownBanner 250ms cubic-bezier(0.22,1,0.36,1);text-align:center;
}

/* ========================================================================
   NETWORK DOT
   ======================================================================== */
.network-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0;transition:background 300ms}
.network-dot--online{background:#10B981}
.network-dot--offline{background:#EF4444}
.network-dot--loading{background:#F59E0B;animation:pulse-dot 1s ease-in-out infinite}
@keyframes pulse-dot{0%,100%{box-shadow:0 0 0 0 rgba(245,158,11,0.5)}50%{box-shadow:0 0 0 5px rgba(245,158,11,0)}}

/* ========================================================================
   PASSWORD STRENGTH
   ======================================================================== */
.pwd-strength-bar{height:4px;border-radius:999px;background:rgba(22,46,77,0.08);margin-top:8px;overflow:hidden}
.pwd-strength-bar__fill{height:100%;border-radius:999px;transition:width 300ms,background 300ms}
.pwd-strength-bar__fill.weak{width:33%;background:#EF4444}
.pwd-strength-bar__fill.medium{width:66%;background:#F59E0B}
.pwd-strength-bar__fill.strong{width:100%;background:#10B981}
.pwd-strength-label{font-size:11px;font-weight:600;margin-top:4px}
.pwd-strength-label.weak{color:#EF4444}
.pwd-strength-label.medium{color:#F59E0B}
.pwd-strength-label.strong{color:#10B981}
