/* ==========================================================================
   mypro.ch · partner (espace partenaire)
   ========================================================================== */

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

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

.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 { 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; }

.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; }

.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:#ede9fe; color:#5b21b6; }
.pill-muted    { background:#f1f5f9; color:#475569; }

.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); }

.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-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 { 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; }

.kpi-card {
    background: white; border-radius: 16px; padding: 18px;
    box-shadow: 0 1px 3px rgba(15,23,42,.06); border: 1px solid #e2e8f0;
}
.kpi-card .label { font-size: 11px; text-transform:uppercase; font-weight:600; color: #64748b; letter-spacing: .04em; }
.kpi-card .value { font-size: 22px; font-weight: 800; color: #0f172a; margin-top: 4px; }
.kpi-card .sub   { font-size: 12px; color: #64748b; margin-top: 4px; }

.gradient-card {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: white; border-radius: 18px; padding: 20px;
}
.gradient-card .label { font-size: 12px; opacity: .85; text-transform: uppercase; font-weight: 600; letter-spacing: .04em; }
.gradient-card .value { font-size: 30px; font-weight: 800; margin-top: 4px; }

.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(5, 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); }

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

.with-bottom-nav { padding-bottom: 100px; }
@media (min-width: 900px) { .with-bottom-nav { padding-bottom: 24px; } }

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

.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(124,58,237,.15); }

/* Link/share box */
.share-box {
    background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 12px; padding: 12px;
    display:flex; align-items:center; gap: 10px; font-family: monospace; font-size: 13px; word-break: break-all;
}
