/* ============================================================================
   Harmonisation des widgets Agregateur Actus avec le thème Radar News
   À charger après les styles du plugin pour prendre la priorité
   ============================================================================ */

/* ---------------------------------------------------------------------------
   1. Palette globale — toutes les variables des widgets
   --------------------------------------------------------------------------- */

.agg-timeline,
.agg-frise,
.agg-archives,
.agg-ticker,
.agg-top,
.agg-modal,
.agg-frise-modal {
    /* Fonds */
    --agg-bg:           #070b12;
    --agg-bg-card:      #0f1621;
    --agg-bg-card-2:    #1a2433;
    --agg-bg-hover:     #243347;

    /* Textes */
    --agg-text:         #e2e8f0;
    --agg-text-muted:   #7d8ba0;
    --agg-text-accent:  #38bdf8;

    /* Bordures */
    --agg-border:       #1e2a3a;
    --agg-border-soft:  #16202e;

    /* Accents */
    --agg-accent:       #38bdf8;
    --agg-accent-hover: #7dd3fc;
    --agg-accent-dark:  #0ea5e9;

    /* Tonalités */
    --agg-positif:      #22d3a4;
    --agg-negatif:      #f43f5e;
    --agg-neutre:       #64748b;
}

/* ---------------------------------------------------------------------------
   2. Application aux widgets de base
   --------------------------------------------------------------------------- */

.agg-timeline,
.agg-frise,
.agg-archives {
    background: var(--agg-bg) !important;
    color: var(--agg-text) !important;
    border: 1px solid var(--agg-border-soft);
}

.agg-ticker {
    background: var(--agg-bg-card) !important;
    color: var(--agg-text) !important;
    border: 1px solid var(--agg-border-soft);
}

.agg-top,
.agg-meteo {
    background: var(--agg-bg-card) !important;
    color: var(--agg-text) !important;
}

/* ---------------------------------------------------------------------------
   3. Cartes d'articles (timeline, archives)
   --------------------------------------------------------------------------- */

.agg-card,
.agg-archives__card {
    background: var(--agg-bg-card) !important;
    border-left: 3px solid var(--agg-border);
}

.agg-card:hover,
.agg-archives__card:hover {
    background: var(--agg-bg-hover) !important;
}

.agg-card__titre,
.agg-archives__card-titre {
    color: var(--agg-text) !important;
}

.agg-card__extrait {
    color: var(--agg-text-muted) !important;
}

.agg-card__source,
.agg-card__heure {
    color: var(--agg-text-muted) !important;
}

.agg-card__source {
    color: var(--agg-accent) !important;
}

.agg-card__meta,
.agg-archives__card-meta {
    border-top-color: var(--agg-border-soft) !important;
    color: var(--agg-text-muted) !important;
}

/* ---------------------------------------------------------------------------
   4. Toolbar, filtres, boutons
   --------------------------------------------------------------------------- */

.agg-timeline__toolbar {
    border-bottom-color: var(--agg-border-soft) !important;
}

.agg-filter {
    color: var(--agg-text-muted) !important;
    border-color: var(--agg-border) !important;
    background: transparent !important;
}

.agg-filter:hover {
    background: var(--agg-bg-card-2) !important;
    color: var(--agg-text) !important;
}

.agg-filter.is-active {
    background: var(--agg-accent) !important;
    color: #070b12 !important;
    border-color: var(--agg-accent) !important;
}

.agg-timeline__status,
.agg-status__count strong {
    color: var(--agg-text-muted) !important;
}

.agg-load-more {
    background: var(--agg-bg-card) !important;
    color: var(--agg-text) !important;
    border-color: var(--agg-border) !important;
}

.agg-load-more:hover {
    background: var(--agg-bg-hover) !important;
    border-color: var(--agg-accent) !important;
}

/* ---------------------------------------------------------------------------
   5. Frise : titre, légende, sélecteur de jour
   --------------------------------------------------------------------------- */

.agg-frise__titre,
.agg-archives__titre {
    color: var(--agg-text) !important;
}

.agg-frise__legende {
    color: var(--agg-text-muted) !important;
}

.agg-frise__jour-btn {
    color: var(--agg-text-muted) !important;
    border-color: var(--agg-border) !important;
    background: transparent !important;
}

.agg-frise__jour-btn:hover {
    background: var(--agg-bg-card-2) !important;
    color: var(--agg-text) !important;
}

.agg-frise__jour-btn.is-active {
    background: var(--agg-accent) !important;
    color: #070b12 !important;
    border-color: var(--agg-accent) !important;
}

.agg-ligne {
    border-bottom-color: var(--agg-border-soft) !important;
}

.agg-ligne__label {
    color: var(--agg-text-muted) !important;
}

.agg-ligne__piste::before {
    background-image:
        linear-gradient(to right, var(--agg-border-soft) 1px, transparent 1px) !important;
}

.agg-frise__axe-label {
    color: var(--agg-text-muted) !important;
}

.agg-frise__curseur {
    background: var(--agg-accent) !important;
    box-shadow: 0 0 6px var(--agg-accent) !important;
}

.agg-frise__curseur::after {
    background: var(--agg-accent) !important;
}

/* Points colorés : on remplace par les nouvelles couleurs */
.agg-point--positif,
.agg-legende-point--positif { background: var(--agg-positif) !important; }

.agg-point--negatif,
.agg-legende-point--negatif { background: var(--agg-negatif) !important; }

.agg-point--neutre,
.agg-legende-point--neutre  { background: var(--agg-neutre) !important; }

/* Vignettes de la frise */
.agg-vignette {
    border-color: var(--agg-border) !important;
    background: var(--agg-bg-card-2) !important;
}

.agg-vignette:hover {
    border-color: var(--agg-accent) !important;
}

.agg-vignette__ton--positif { background: var(--agg-positif) !important; }
.agg-vignette__ton--negatif { background: var(--agg-negatif) !important; }
.agg-vignette__ton--neutre  { background: var(--agg-neutre)  !important; }

/* Infobulle frise */
.agg-frise__infobulle {
    background: var(--agg-bg-card-2) !important;
    color: var(--agg-text) !important;
    border-color: var(--agg-border) !important;
}

/* ---------------------------------------------------------------------------
   6. Ticker
   --------------------------------------------------------------------------- */

.agg-ticker__item {
    color: var(--agg-text) !important;
}

.agg-ticker__item:hover {
    color: var(--agg-accent) !important;
}

.agg-ticker__heure {
    color: var(--agg-text-muted) !important;
}

.agg-ticker--list .agg-ticker__item {
    border-bottom-color: var(--agg-border-soft) !important;
}

/* ---------------------------------------------------------------------------
   7. Météo sentimentale
   --------------------------------------------------------------------------- */

.agg-meteo__title {
    color: var(--agg-text-muted) !important;
}

.agg-meteo__jauge {
    background: var(--agg-border) !important;
}

.agg-meteo__segment--negatif {
    background: linear-gradient(90deg, #be123c 0%, var(--agg-negatif) 100%) !important;
}

.agg-meteo__segment--positif {
    background: linear-gradient(90deg, #059669 0%, var(--agg-positif) 100%) !important;
}

.agg-meteo__valeur {
    color: var(--agg-text) !important;
}

.agg-meteo__label,
.agg-meteo__neutres,
.agg-meteo__footer {
    color: var(--agg-text-muted) !important;
}

/* ---------------------------------------------------------------------------
   8. Top / dernières arrivées
   --------------------------------------------------------------------------- */

.agg-top__title {
    color: var(--agg-text-muted) !important;
}

.agg-top__item {
    border-bottom-color: var(--agg-border-soft) !important;
}

.agg-top__titre {
    color: var(--agg-text) !important;
}

.agg-top__titre:hover {
    color: var(--agg-accent) !important;
}

.agg-top__meta {
    color: var(--agg-text-muted) !important;
}

.agg-top__badge--positif { background: var(--agg-positif) !important; }
.agg-top__badge--negatif { background: var(--agg-negatif) !important; }
.agg-top__badge--neutre  { background: var(--agg-neutre)  !important; }

/* ---------------------------------------------------------------------------
   9. Modaux
   --------------------------------------------------------------------------- */

.agg-modal__panel,
.agg-frise-modal__panel {
    background: var(--agg-bg-card) !important;
    color: var(--agg-text) !important;
    border: 1px solid var(--agg-border);
}

.agg-modal__title,
.agg-frise-modal__content h2 {
    color: var(--agg-text) !important;
}

.agg-modal__extrait {
    color: var(--agg-text-muted) !important;
}

.agg-modal__meta {
    border-color: var(--agg-border-soft) !important;
    color: var(--agg-text-muted) !important;
}

.agg-modal__meta strong {
    color: var(--agg-text) !important;
}

.agg-modal__cta,
.agg-frise-modal__content .agg-modal__cta {
    background: var(--agg-accent) !important;
    color: #070b12 !important;
}

.agg-modal__cta:hover,
.agg-frise-modal__content .agg-modal__cta:hover {
    background: var(--agg-accent-hover) !important;
}

.agg-modal__ad {
    background: var(--agg-bg) !important;
    border-color: var(--agg-border) !important;
    color: var(--agg-text-muted) !important;
}

/* ---------------------------------------------------------------------------
   10. Calendrier des archives
   --------------------------------------------------------------------------- */

.agg-archives__toggle {
    background: var(--agg-bg-card) !important;
    color: var(--agg-text) !important;
    border-color: var(--agg-border) !important;
}

.agg-archives__toggle:hover {
    background: var(--agg-bg-hover) !important;
    border-color: var(--agg-accent) !important;
}

.agg-archives__chevron {
    color: var(--agg-text-muted) !important;
}

.agg-archives__calendrier {
    background: var(--agg-bg-card) !important;
}

.agg-cal__titre {
    color: var(--agg-text) !important;
}

.agg-cal__nav button {
    color: var(--agg-text-muted) !important;
    border-color: var(--agg-border) !important;
}

.agg-cal__nav button:hover:not(:disabled) {
    background: var(--agg-bg-hover) !important;
    color: var(--agg-text) !important;
}

.agg-cal__jour-semaine {
    color: var(--agg-text-muted) !important;
}

.agg-cal__jour--actif {
    background: rgba(56, 189, 248, 0.12) !important;
    border-color: rgba(56, 189, 248, 0.4) !important;
    color: var(--agg-text) !important;
}

.agg-cal__jour--actif:hover {
    background: rgba(56, 189, 248, 0.25) !important;
    border-color: var(--agg-accent) !important;
}

.agg-cal__jour--selection {
    background: var(--agg-accent) !important;
    border-color: var(--agg-accent) !important;
    color: #070b12 !important;
}

.agg-cal__jour--selection .agg-cal__compteur {
    color: #070b12 !important;
    opacity: 0.7 !important;
}

/* ---------------------------------------------------------------------------
   11. Loader / spinner
   --------------------------------------------------------------------------- */

.agg-spinner {
    border-color: var(--agg-border) !important;
    border-top-color: var(--agg-accent) !important;
}

/* ---------------------------------------------------------------------------
   12. Placeholder image (articles sans image)
   --------------------------------------------------------------------------- */

.agg-card__image--placeholder,
.agg-vignette__placeholder {
    background: linear-gradient(135deg, var(--agg-bg-card-2) 0%, var(--agg-bg-card) 100%) !important;
    color: var(--agg-text-muted) !important;
}
