/* ============================================================================
   🍎 INTELLIWEALTH APPLE-STYLE FINTECH AI SUITE (macOS / iPadOS Glassmorphism)
   Offres : 1. IntelliQuant • 2. IntelliPulse™ • 3. GhostTrader × TV • 4. IntelliRobot™
   ============================================================================ */

.iw-apple-suite-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 14px;
    background: rgba(12, 16, 26, 0.82);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Plus Jakarta Sans", sans-serif;
    z-index: 95;
}

.iw-apple-suite-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.iw-apple-suite-brand .iw-brand-pill {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 800;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(168, 85, 247, 0.2));
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
}

/* Segmented Control style macOS Sequoia */
.iw-apple-segmented {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 11px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

.iw-seg-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 13px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
    white-space: nowrap;
}

.iw-seg-btn:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.05);
}

.iw-seg-btn.active {
    background: rgba(255, 255, 255, 0.13);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.iw-seg-sub {
    font-size: 0.62rem;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.16);
    color: #7dd3fc;
    font-weight: 700;
}

.iw-seg-btn[data-suite="ghosttrader"] .iw-seg-sub {
    background: rgba(168, 85, 247, 0.22);
    color: #e9d5ff;
}

.iw-seg-btn[data-suite="intellirobot"] .iw-seg-sub {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

/* Bouton Support Technique IA & TradingView Bridge à droite */
.iw-apple-suite-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.iw-btn-apple-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #f1f5f9;
}

.iw-btn-apple-pill:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.iw-btn-apple-pill.concierge {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(56, 189, 248, 0.22));
    border-color: rgba(52, 211, 153, 0.45);
    color: #ecfdf5;
}

/* Modale Apple-Style IntelliRobot Studio & TradingView Bridge */
.iw-apple-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(3, 7, 18, 0.72);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.iw-apple-modal-backdrop.is-open {
    display: flex;
}

.iw-apple-modal-card {
    width: 100%;
    max-width: 980px;
    max-height: 86vh;
    background: rgba(15, 23, 42, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.65);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Plus Jakarta Sans", sans-serif;
}

.iw-apple-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.iw-apple-modal-body {
    padding: 22px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    color: #e2e8f0;
}

.iw-studio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 14px;
}

.iw-studio-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.iw-code-box {
    background: #060911;
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 12px;
    padding: 14px;
    font-family: "JetBrains Mono", monospace;
    font-size: 0.74rem;
    color: #bae6fd;
    overflow-x: auto;
    white-space: pre;
    max-height: 250px;
}

/* Tiroir Flottant Support Technique IA (IntelliCare Concierge) */
.iw-support-drawer {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 410px;
    max-width: calc(100vw - 32px);
    max-height: 76vh;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9998;
    font-family: -apple-system, BlinkMacSystemFont, "Plus Jakarta Sans", sans-serif;
}

.iw-support-drawer.is-open {
    display: flex;
}

.iw-support-quick-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.02);
}

.iw-support-chip {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #7dd3fc;
    cursor: pointer;
}

.iw-support-chip:hover {
    background: rgba(56, 189, 248, 0.24);
    color: #ffffff;
}
