/**
 * InfiniFlow Frontend Styles
 * Extrait des styles inline de bilan.php et resultats.php
 * @since 3.9.0
 */

/* ═══ PALETTE & TYPOGRAPHIE ═══════════════════════════════════════════ */
.infiniflow-wrapper,
.infiniflow-resultats,
.infiniflow-bilan {
    font-family: 'Plus Jakarta Sans', 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1A1A1A;
    background: #FFFBF5;
    min-height: 100vh;
}

/* ═══ BANNIÈRE VERTE HEADER ═══════════════════════════════════════════ */
.infiniflow-header-bar {
    background: linear-gradient(135deg, #1B4332 0%, #40916C 100%);
    padding: 40px 20px;
    color: white;
}
.infiniflow-header-bar h1 {
    color: white;
    font-size: 32px;
    font-weight: 800;
    margin: 0;
}

/* ═══ BOUTONS ═════════════════════════════════════════════════════════ */
.if-btn {
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.if-btn-primary { background: #E85D04; color: white; }
.if-btn-primary:hover { background: #F48C06; }
.if-btn-secondary { background: white; color: #1B4332; }
.if-btn-outline { background: rgba(255,255,255,0.1); color: white; border: 1px solid rgba(255,255,255,0.3); }

/* ═══ CARTES & SECTIONS ═══════════════════════════════════════════════ */
.if-card {
    background: white;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    margin-bottom: 24px;
}
.if-card-tight { padding: 20px; border-radius: 16px; }

/* ═══ GRILLES RESPONSIVES ═════════════════════════════════════════════ */
.if-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
@media (max-width: 768px) {
    .if-grid-2 { grid-template-columns: 1fr; }
}

/* ═══ FRPS ZONES ══════════════════════════════════════════════════════ */
.if-zone-favorable    { background: #10B981; color: white; }
.if-zone-acceptable   { background: #D1FAE5; color: #065F46; }
.if-zone-vigilance    { background: #F97316; color: white; }
.if-zone-risque-eleve { background: #EF4444; color: white; }

/* ═══ TIMELINE HISTORIQUE ═════════════════════════════════════════════ */
.if-timeline {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 16px 0;
    scroll-snap-type: x mandatory;
}
.if-timeline-item {
    flex: 0 0 280px;
    scroll-snap-align: start;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 16px;
}

/* ═══ RADAR SVG ═══════════════════════════════════════════════════════ */
.if-radar-wrap {
    width: 100%;
    text-align: center;
    margin: 0 auto;
}
.if-radar-wrap svg {
    width: 100%;
    max-width: 100%;
    height: auto;
}

/* ═══ DISTRIBUTION BARS ═══════════════════════════════════════════════ */
.if-dist-bar {
    display: flex;
    height: 12px;
    border-radius: 3px;
    overflow: hidden;
    gap: 1px;
    margin: 4px 0;
}

/* ═══ PRIORITÉS TOP 3 ═════════════════════════════════════════════════ */
.if-prio-item {
    margin-bottom: 8px;
    padding: 10px 12px;
    background: white;
    border-radius: 8px;
    border-left: 3px solid #F97316;
}
.if-prio-item.critical { border-left-color: #EF4444; background: #FFF5F5; }

/* ═══ IMPRESSION — @media print ═══════════════════════════════════════ */
@media print {
    /* Éléments à masquer globalement */
    header, footer, nav, aside,
    #wpadminbar, .wp-admin-bar, .admin-bar,
    .no-print, .section-recommandations-ia,
    .infiniflow-nav-header, .infiniflow-header-bar,
    .if-btn, button,
    a[href*="mon-compte"], a[href*="imprimer"],
    [style*="position: fixed"],
    [style*="position:fixed"] {
        display: none !important;
    }

    /* Layout A4 portrait */
    @page { size: A4 portrait; margin: 12mm 14mm; }
    html, body {
        background: white !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 10pt !important;
    }

    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .infiniflow-resultats,
    .infiniflow-bilan {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        background: white !important;
    }

    .if-card,
    .infiniflow-resultats > div {
        page-break-inside: avoid;
        break-inside: avoid;
        margin-bottom: 6mm !important;
        box-shadow: none !important;
        border: 1px solid #E5E7EB !important;
        border-radius: 8px !important;
    }

    /* Grilles préservées à l'impression */
    .if-grid-2 { display: grid !important; grid-template-columns: 1fr 1fr !important; }
}
