/* Fichier: style/injections.css */

/* --- UTILITAIRES COULEURS --- */
.text-low  { color: var(--c-low); font-weight: bold; }
.text-warn { color: var(--c-warn); font-weight: bold; }
.text-good { color: var(--c-good); font-weight: bold; }
.text-high { color: var(--c-high); font-weight: bold; }
.text-very { color: var(--c-very); font-weight: bold; }
.text-neutre { color: var(--text-muted); }

/* --- NAVIGATION ONGLETS --- */
.tabs-nav {
    display: flex;
    justify-content: space-around;
    background: rgba(0,0,0,0.2);
    padding: 5px;
    margin: 15px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.05);
}
.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px 15px;
    font-weight: 600;
    font-size: 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}
.tab-btn.active {
    background: var(--violet);
    color: white;
    box-shadow: 0 4px 15px rgba(138, 79, 255, 0.4);
}

/* --- CONTENU DES ONGLETS (Animation) --- */
.tab-content { display: none; animation: fadeIn 0.4s ease; }
.tab-content.active { display: block; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- LISTE DES INJECTIONS --- */
.inj-item {
    display: flex;
    flex-direction: column;
    padding: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.3s;
}

/* Style pour une dose ACTIVE (Vert sexy) */
.item-active {
    background: linear-gradient(90deg, rgba(55, 200, 91, 0.15) 0%, rgba(55, 200, 91, 0.02) 100%);
    border-left: 3px solid var(--c-good);
}

/* Style pour une dose D'AUJOURD'HUI NON ACTIVE (Blanc subtil) */
.item-today-subtle {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.01) 100%);
    border-left: 3px solid rgba(255, 255, 255, 0.3);
}

/* --- EN-TÊTE DE L'ITEM (Date & Dose) --- */
.inj-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

/* Colonne Gauche : Badge Date et Timeline */
.inj-left-col {
    display: flex; 
    flex-direction: column; 
    gap: 6px; 
    text-align: left; 
    align-items: flex-start;
}

.inj-date { 
    font-size: 13px; 
    color: var(--text-muted); 
    display: flex; 
    flex-direction: column; 
    gap: 4px;
}

.smart-date {
    display: inline-flex;
    align-items: center;
}

.inj-dose { 
    font-size: 16px; 
    font-weight: 800; 
    color: white; 
    background: rgba(255,255,255,0.05); 
    padding: 6px 12px; 
    border-radius: 8px;
    white-space: nowrap;
}

/* --- BADGES ET TIMELINE --- */
.type-badge {
    font-size: 10px; 
    text-transform: uppercase; 
    padding: 3px 8px; 
    border-radius: 6px; 
    margin-right: 8px; 
    font-weight: 800; 
    letter-spacing: 0.5px;
    background: rgba(255,255,255,0.1); 
    color: #aaa; /* Gris par défaut (Repas) */
    border: 1px solid rgba(255,255,255,0.05);
    vertical-align: middle;
}

/* Style spécifique pour le badge Date (plus clair/brillant) */
.date-badge-color {
    color: white; 
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Style "Correction" (Rouge Néon Sexy) */
.badge-correction {
    color: var(--c-low); 
    background: rgba(249, 40, 61, 0.2);
    border: 1px solid rgba(249, 40, 61, 0.4);
    box-shadow: 0 0 12px rgba(249, 40, 61, 0.5);
    text-shadow: 0 0 5px rgba(249, 40, 61, 0.3);
}

/* Badge Durée (Gris Discret) */
.duration-badge {
    font-size: 10px; color: #888; background: rgba(255,255,255,0.05);
    padding: 2px 5px; border-radius: 4px; margin-left: 5px;
    border: 1px solid rgba(255,255,255,0.05); font-weight: 600;
}

.d-time {
    font-size: 11px;
    opacity: 0.6;
    margin-left: 2px;
    font-weight: 400;
}

.timeline-row {
    font-size: 12px; 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    margin-top: 2px;
}
.arrow-icon { 
    color: var(--text-muted); 
    opacity: 0.5; 
    font-size: 10px; 
}

/* --- ZONE GRAPHIQUE ET STATS --- */
.inj-details-row {
    display: flex;
    align-items: center;
    gap: 15px;
    height: 60px;
    margin-top: 5px;
}

.sparkline-container {
    flex: 1;
    min-width: 0; /* Crucial pour Chart.js en Flexbox */
    height: 100%;
    position: relative;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
    min-width: 110px;
    font-size: 11px;
    color: var(--text-muted);
    text-align: right;
}

.stat-item { display: flex; justify-content: flex-end; gap: 5px; }
.stat-label { opacity: 0.7; }
.stat-val { font-size: 12px; } /* Couleur via classes utilitaires */