/**
 * css/views/summary_view.css - Version V1.6.1
 * RÔLE : Habillage des KPI Cards - THEME-AWARE REFINEMENT
 * - Correction : Utilisation stricte des variables du thème (var(--text-main), etc.)
 */

/* =====================================================================
   SURCHARGE DU PARENT
   ===================================================================== */

.main-widget:has(.summary-grid) {
    min-height: auto !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    overflow: visible !important;
}

/* =====================================================================
   HEADER EN SURPLOMB (Respect du Thème)
   ===================================================================== */

.summary-header-floating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    line-height: 1;
    animation: floatingFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.summary-header-floating::before {
    content: "";
    display: block;
    width: 3px;
    height: 12px;
    background: var(--primary); /* Utilise votre couleur d'accentuation */
    border-radius: 4px;
}

.floating-tag {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-light); /* Respecte votre couleur de texte secondaire */
    opacity: 0.6;
}

.floating-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-main); /* Respecte votre couleur de texte principale */
    letter-spacing: -0.01em;
}

@keyframes floatingFadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =====================================================================
   GRILLE & CARTES
   ===================================================================== */

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    width: 100%;
}

.summary-card {
    background: var(--bg-card); /* Utilise le fond de carte de votre thème */
    border: 1px solid var(--border-light, rgba(0,0,0,0.05));
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 110px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    transition: all 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
    border-color: var(--primary);
}

/* =====================================================================
   CONTENU & TYPOGRAPHIE
   ===================================================================== */

.summary-header {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.summary-body {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-main); /* Respecte votre couleur de texte principale */
    letter-spacing: -0.02em;
}

/* =====================================================================
   FOOTER (TENDANCES)
   ===================================================================== */

.summary-footer {
    margin-top: auto;
    padding-top: 12px;
    display: flex;
}

.summary-footer .cell-content {
    width: 100%;
    display: flex !important;
    justify-content: space-between !important;
    flex-direction: row-reverse;
    align-items: center;
}

.summary-footer .badge-trend {
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 4px;
}

.summary-footer .val-n1 {
    font-size: 10px;
    color: var(--text-light);
}

.summary-footer .val-curr { display: none; }