/* ════════════════════════════════════════════════════════════════
   SIMCOPT VISION — DESIGN SYSTEM v3 (Light Pro)
   Style : Apple Vision Pro / iPad Pro app médicale
   Palette : blanc / gris très clair, transparence très subtile,
   accents bleu Apple désaturés. PAS de néon.
   ════════════════════════════════════════════════════════════════ */

:root {
    /* ─── Fonds neutres très clairs ─── */
    --bg-base:      #f5f5f7;
    --bg-surface:   #ffffff;
    --bg-elevated:  #fafafc;
    --bg-glass:     rgba(255, 255, 255, 0.7);
    --bg-glass-hi:  rgba(255, 255, 255, 0.85);
    --bg-tint:      rgba(245, 245, 247, 0.6);
    
    /* ─── Bordures fines ─── */
    --border:       rgba(0, 0, 0, 0.06);
    --border-mid:   rgba(0, 0, 0, 0.1);
    --border-strong:rgba(0, 0, 0, 0.18);
    
    /* ─── Couleurs sémantiques (Apple-like, désaturées) ─── */
    --accent:       #007aff;
    --accent-soft:  #5ac8fa;
    --accent-light: #e9f3ff;
    --success:      #34c759;
    --warning:      #ff9500;
    --danger:       #ff3b30;
    --od:           #ff3b30;
    --og:           #34c759;
    
    /* ─── Texte ─── */
    --text:         #1d1d1f;
    --text-2:       #424245;
    --text-3:       #6e6e73;
    --text-mute:    #a1a1a6;
    
    /* ─── Ombres très subtiles ─── */
    --shadow-sm:    0 1px 2px rgba(0,0,0,0.04);
    --shadow:       0 4px 16px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.03);
    --shadow-md:    0 8px 32px rgba(0,0,0,0.06), 0 2px 6px rgba(0,0,0,0.04);
    --shadow-lg:    0 20px 60px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
    --shadow-glow:  0 0 0 4px rgba(0, 122, 255, 0.12);
    
    /* ─── Typographie ─── */
    --font-sans:    -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Inter', system-ui, sans-serif;
    --font-mono:    'SF Mono', ui-monospace, 'JetBrains Mono', Menlo, monospace;
    
    /* ─── Radius ─── */
    --r-xs: 6px;
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 18px;
    --r-xl: 24px;
    --r-pill: 999px;
    
    /* ─── Espacements ─── */
    --s-1: 4px;
    --s-2: 8px;
    --s-3: 12px;
    --s-4: 16px;
    --s-5: 20px;
    --s-6: 24px;
    --s-8: 32px;
    --s-10: 40px;
    --s-12: 48px;
    
    /* ─── Easings ─── */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--bg-base);
    background-image:
        radial-gradient(ellipse 800px 400px at 80% 0%, rgba(0, 122, 255, 0.04), transparent 60%),
        radial-gradient(ellipse 600px 600px at 0% 100%, rgba(90, 200, 250, 0.04), transparent 60%);
    background-attachment: fixed;
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
    font-weight: 600;
    letter-spacing: -0.022em;
    line-height: 1.1;
    color: var(--text);
}

.vp-display {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.045em;
    line-height: 1.05;
}
.vp-title {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 600;
    letter-spacing: -0.025em;
}
.vp-heading {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.vp-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
}
.vp-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.vp-glass {
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow);
}

.vp-surface {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow);
}

.vp-card-hover {
    transition: transform 0.4s var(--ease-out), box-shadow 0.4s ease, border-color 0.2s ease;
    cursor: pointer;
}
.vp-card-hover:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-mid);
}

.vp-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    padding: 11px 22px;
    font-family: inherit;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--r-pill);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s var(--ease);
    white-space: nowrap;
    user-select: none;
}

.vp-btn-primary {
    background: var(--accent);
    color: white;
}
.vp-btn-primary:hover {
    background: #0066d6;
}

.vp-btn-ghost {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text);
    border-color: var(--border);
}
.vp-btn-ghost:hover {
    background: rgba(0, 0, 0, 0.06);
}

.vp-btn-outline {
    background: transparent;
    color: var(--accent);
    border-color: var(--accent);
}
.vp-btn-outline:hover {
    background: var(--accent-light);
}

.vp-btn-danger {
    background: rgba(255, 59, 48, 0.08);
    color: var(--danger);
    border-color: rgba(255, 59, 48, 0.2);
}
.vp-btn-danger:hover {
    background: var(--danger);
    color: white;
}

.vp-btn-sm { padding: 7px 16px; font-size: 0.85rem; }
.vp-btn-lg { padding: 14px 28px; font-size: 1.05rem; }

.vp-input {
    background: var(--bg-surface);
    border: 1px solid var(--border-mid);
    color: var(--text);
    padding: 11px 14px;
    font-size: 0.95rem;
    border-radius: var(--r-md);
    font-family: inherit;
    width: 100%;
    transition: all 0.2s var(--ease);
}
.vp-input::placeholder { color: var(--text-mute); }
.vp-input:hover { border-color: var(--border-strong); }
.vp-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

select.vp-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%236e6e73' d='M5 8l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 40px;
}

.vp-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-2);
    margin-bottom: 6px;
    font-weight: 500;
}

.vp-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--r-pill);
    font-size: 0.72rem;
    font-weight: 600;
    background: var(--bg-elevated);
    color: var(--text-2);
    border: 1px solid var(--border);
}
.vp-badge-accent { background: var(--accent-light); color: var(--accent); border-color: rgba(0, 122, 255, 0.18); }
.vp-badge-success { background: rgba(52, 199, 89, 0.1); color: #248a3d; border-color: rgba(52, 199, 89, 0.2); }
.vp-badge-warning { background: rgba(255, 149, 0, 0.1); color: #c77400; border-color: rgba(255, 149, 0, 0.2); }

.vp-pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 0 var(--success);
    animation: vp-pulse 2s infinite;
}
@keyframes vp-pulse {
    0% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.5); }
    70% { box-shadow: 0 0 0 8px rgba(52, 199, 89, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0); }
}

.vp-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: rgba(255, 255, 255, 0.72);
    border-bottom: 1px solid var(--border);
    padding: 12px 28px;
    display: flex;
    align-items: center;
    gap: var(--s-4);
}
.vp-topbar-logo { height: 32px; }
.vp-topbar-spacer { flex: 1; }

.vp-stepper {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    padding: var(--s-2) var(--s-3);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    box-shadow: var(--shadow);
}
.vp-step {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 14px;
    border-radius: var(--r-pill);
    font-size: 0.85rem;
    color: var(--text-3);
    font-weight: 500;
    transition: all 0.25s var(--ease);
}
.vp-step.active {
    background: var(--accent);
    color: white;
}
.vp-step.done { color: var(--success); }
.vp-step.done::before { content: '✓ '; font-weight: 700; }
.vp-step-arrow {
    color: var(--text-mute);
    font-size: 0.85rem;
}

.vp-fade-in { animation: vp-fade-in 0.6s var(--ease-out) backwards; }
@keyframes vp-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.vp-stagger-1 { animation-delay: 0.05s; }
.vp-stagger-2 { animation-delay: 0.1s; }
.vp-stagger-3 { animation-delay: 0.15s; }
.vp-stagger-4 { animation-delay: 0.2s; }

.vp-loader {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border-mid);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: vp-spin 0.8s linear infinite;
}
@keyframes vp-spin { to { transform: rotate(360deg); } }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--text-mute);
    border-radius: 4px;
    border: 2px solid var(--bg-base);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

@media (max-width: 768px) {
    .vp-topbar { padding: 10px 16px; }
}

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