/* ==========================================================================
   mypro.ch · my (espace client)
   ========================================================================== */

* { box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; color: #0f172a; }

:root {
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --accent: #f59e0b;
    --text: #0f172a;
    --text-muted: #64748b;
    --bg: #f8fafc;
    --bg-soft: #f1f5f9;
    --border: #e2e8f0;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
}

/* Loading spinner */
.loading-spinner {
    width: 36px; height: 36px; border-radius: 50%;
    border: 3px solid #e2e8f0; border-top-color: var(--primary);
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Card */
.card { background: white; border-radius: 14px; box-shadow: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04); padding: 16px; }

/* Buttons */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:6px; padding: 10px 16px;
       border-radius: 10px; font-weight:600; font-size: 14px; cursor:pointer; border: 1px solid transparent;
       transition: background .15s, transform .05s; text-decoration:none; line-height:1; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }

/* Status pills */
.pill { display:inline-flex; align-items:center; gap:4px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.pill-success  { background:#dcfce7; color:#166534; }
.pill-warning  { background:#fef3c7; color:#92400e; }
.pill-danger   { background:#fee2e2; color:#991b1b; }
.pill-info     { background:#e0f2fe; color:#075985; }
.pill-muted    { background:#f1f5f9; color:#475569; }

/* Modal */
.modal-backdrop {
    position: fixed; inset: 0; background: rgba(15,23,42,0.55);
    display:flex; align-items:center; justify-content:center; padding: 20px;
    z-index: 100; backdrop-filter: blur(4px);
}
.modal { background:white; border-radius: 18px; max-width: 540px; width: 100%; max-height: 92vh;
         overflow-y: auto; box-shadow: 0 24px 60px -12px rgba(15,23,42,.35); }

/* Tabs (segmented control) */
.tab-segmented {
    display:inline-flex; background: #f1f5f9; border-radius: 12px; padding: 4px; gap: 2px;
}
.tab-segmented button {
    padding: 8px 14px; border-radius: 9px; font-size: 13px; font-weight: 600;
    color: #64748b; background: transparent; border:none; cursor:pointer;
}
.tab-segmented button.active { background: white; color: #0f172a; box-shadow: 0 1px 2px rgba(15,23,42,.08); }

/* Toast */
.toast-container { position:fixed; top: 20px; right: 20px; z-index:200; display:flex; flex-direction:column; gap:8px; }
.toast { background:white; padding: 12px 16px; border-radius: 10px;
         box-shadow: 0 8px 24px rgba(15,23,42,.15); display:flex; align-items:center; gap:10px;
         min-width: 240px; animation: slideIn .2s ease-out; }
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Booking card */
.booking-card { background: white; border-radius: 16px; padding: 16px; box-shadow: 0 1px 3px rgba(15,23,42,.06); border: 1px solid #e2e8f0; }
.booking-card.cancelled { opacity: .6; }
.booking-card .route-line {
    display:grid; grid-template-columns: 16px 1fr; gap: 8px; align-items: start;
}
.route-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); margin-top: 5px; }
.route-dot.dest { background: var(--accent); }
.route-vline { width: 2px; background: #e2e8f0; margin: 0 auto; height: 18px; }

/* Centrale section header */
.centrale-header { display:flex; align-items:center; gap:12px; padding: 8px 0; }
.centrale-logo { width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(135deg,#0ea5e9,#0284c7);
                 display:flex; align-items:center; justify-content:center; color:white; font-weight:700; font-size: 14px; }

/* Bottom nav (mobile) */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; background: white; border-top: 1px solid #e2e8f0;
              padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(4, 1fr);
              z-index: 50; }
.bottom-nav button { background: none; border: none; padding: 8px; display:flex; flex-direction:column; align-items:center;
                     gap: 2px; color: #64748b; font-size: 11px; font-weight: 500; cursor: pointer; }
.bottom-nav button i { font-size: 18px; }
.bottom-nav button.active { color: var(--primary); }
.bottom-nav button.active i { transform: translateY(-1px); }

@media (min-width: 900px) {
    .bottom-nav { display: none; }
}

/* Mobile content padding to clear bottom nav */
.with-bottom-nav { padding-bottom: 100px; }
@media (min-width: 900px) {
    .with-bottom-nav { padding-bottom: 24px; }
}

/* Empty state */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state .icon { font-size: 56px; opacity: .35; margin-bottom: 12px; }

/* Field */
.field { display:block; margin-bottom: 14px; }
.field label { display:block; font-size: 12px; font-weight: 600; color: #475569; margin-bottom: 6px; }
.field input, .field textarea, .field select {
    width: 100%; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 10px; font-size: 14px;
    font-family: inherit; background: white;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14,165,233,.15); }
