/* Resto IA — UI IA propre */
.restoia-ai-report {
    display: grid;
    gap: 22px;
    margin: 24px 0;
    max-width: 100%;
}

.restoia-ai-card {
    background: #ffffff;
    color: #111827;
    border: 1px solid #e5e7eb;
    border-left: 6px solid #2563eb;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.restoia-ai-card h3 {
    margin: 0 0 14px !important;
    padding: 0 !important;
    font-size: 24px !important;
    line-height: 1.25 !important;
    font-weight: 800 !important;
    color: #111827 !important;
}

.restoia-ai-card h4 {
    margin: 0 0 10px !important;
    padding: 0 !important;
    font-size: 20px !important;
    line-height: 1.3 !important;
    font-weight: 800 !important;
    color: #111827 !important;
}

.restoia-ai-card p {
    margin: 8px 0 14px !important;
    color: #374151 !important;
    font-size: 15px !important;
    line-height: 1.7 !important;
}

.restoia-ai-main { border-left-color: #2563eb; }
.restoia-ai-success { border-left-color: #16a34a; }
.restoia-ai-warning { border-left-color: #f59e0b; }
.restoia-ai-danger { border-left-color: #dc2626; }

.restoia-ai-item {
    padding: 22px 0;
    border-top: 1px solid #e5e7eb;
}

.restoia-ai-item:first-of-type {
    border-top: 0;
    padding-top: 4px;
}

.restoia-ai-card-head {
    margin-bottom: 8px;
}

.restoia-ai-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 12px;
}

.restoia-ai-badges span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.restoia-ai-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.restoia-ai-metric {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 14px;
}

.restoia-ai-metric-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.restoia-ai-metric strong {
    display: block;
    color: #111827;
    font-size: 22px;
    line-height: 1.15;
    font-weight: 900;
}

.restoia-ai-sublist {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.restoia-ai-sublist > strong {
    display: block;
    margin-bottom: 8px;
    color: #111827;
    font-size: 14px;
    font-weight: 900;
}

.restoia-ai-list {
    margin: 8px 0 0 20px !important;
    padding: 0 !important;
}

.restoia-ai-list li {
    margin: 0 0 8px !important;
    color: #374151 !important;
    line-height: 1.55 !important;
    font-size: 15px !important;
}

.restoia-ai-note {
    padding: 12px 14px;
    background: #f3f4f6;
    border-radius: 12px;
}

.restoia-ai-debug {
    margin-top: 16px;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    padding: 12px 14px;
}

.restoia-ai-debug summary {
    cursor: pointer;
    font-weight: 800;
    color: #111827;
}

.restoia-ai-debug pre,
.restoia-ai-raw {
    white-space: pre-wrap;
    overflow-x: auto;
    max-height: 360px;
    margin: 14px 0 0;
    padding: 16px;
    border-radius: 12px;
    background: #f3f4f6 !important;
    color: #111827 !important;
    font-size: 13px;
    line-height: 1.55;
}

/* Neutralise les vieux pre sombres dans les blocs IA */
.restoia-front-shell .restoia-ai-report pre,
.restoia-front-shell .restoia-ai-debug pre {
    background: #f3f4f6 !important;
    color: #111827 !important;
}

@media (max-width: 1000px) {
    .restoia-ai-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .restoia-ai-card {
        padding: 18px;
        border-radius: 14px;
    }

    .restoia-ai-grid {
        grid-template-columns: 1fr;
    }

    .restoia-ai-card h3 {
        font-size: 20px !important;
    }

    .restoia-ai-card h4 {
        font-size: 18px !important;
    }
}

/* =========================================================
   RESTO IA — éléments anciennement inline
========================================================= */

.restoia-hidden-iframe {
    display: none;
    width: 0;
    height: 0;
    border: 0;
}


/* Prix marché IA — validation en base */
.restoia-ai-market-price-form {
    margin-top: 14px;
}

.restoia-ai-market-price-button {
    width: auto;
}


/* =========================================================
   RESTO IA — BADGES KPI CARTES COMMERCIALES
========================================================= */

.restoia-carte-kpi-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.restoia-ai-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.restoia-ai-badge.success {
    background: #ecfdf5;
    color: #047857;
}

.restoia-ai-badge.warning {
    background: #fff7ed;
    color: #c2410c;
}

.restoia-ai-badge.danger {
    background: #fef2f2;
    color: #b91c1c;
}

