/* ==========================================================================
   EMTOP — Tableau de bord Responsable : indicateurs du portefeuille clients / prospects
   (gabarit manager/_indicateurs.html.twig). Bandeaux de quatre cartes : icône, valeur, libellé, part du total.
   Classes préfixées « rd- » : aucun impact sur les autres pages.
   ========================================================================== */

/* Couleurs : fond (--rd-c), texte lisible sur fond clair (--rd-t) */
.rd--bleu { --rd-c: var(--em-primary); --rd-c-rgb: var(--em-primary-rgb); --rd-t: #136fb6; }
.rd--vert { --rd-c: var(--em-success); --rd-c-rgb: var(--em-success-rgb); --rd-t: #0b8a4c; }
.rd--orange { --rd-c: #f26b21; --rd-c-rgb: 242, 107, 33; --rd-t: #c2500f; }
.rd--violet { --rd-c: var(--em-purple); --rd-c-rgb: var(--em-purple-rgb); --rd-t: #4a56a6; }

html[data-theme="dark"] .rd--bleu { --rd-t: #7cc0f5; }
html[data-theme="dark"] .rd--vert { --rd-t: #4ade80; }
html[data-theme="dark"] .rd--orange { --rd-t: #fb923c; }
html[data-theme="dark"] .rd--violet { --rd-t: #a9b3ef; }

.rd-bandeau {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: var(--em-gutter);
    padding: 14px;
    border-radius: var(--em-radius-lg, 14px);
    background: var(--em-band);
}

.rd-carte {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 16px 18px;
    border: 1px solid var(--em-border);
    border-radius: 12px;
    background: var(--em-card-bg);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 16px -10px rgba(16, 24, 40, .12);
}

/* Icône : pastille claire ; variante « pleine » = disque de couleur, pictogramme blanc (actifs, inactifs…) */
.rd-icone {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(var(--rd-c-rgb), .12);
    color: var(--rd-c);
}

.rd-icone .em-icon { width: 26px; height: 26px; stroke-width: 2; }

.rd-icone--plein .em-icon {
    width: 34px;
    height: 34px;
    padding: 8px;
    border-radius: 50%;
    background: var(--rd-c);
    color: #fff;
    stroke-width: 2.6;
}

.rd-texte { flex: 1 1 auto; min-width: 0; }

.rd-valeur {
    margin: 0;
    font-size: 1.625rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--em-heading-color);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.rd-libelle { margin: 3px 0 0; font-size: .9375rem; line-height: 1.3; color: var(--em-muted); }

/* Part du total (clients actifs, inactifs, à relancer) */
.rd-badge {
    flex-shrink: 0;
    align-self: center;
    padding: 4px 10px;
    border-radius: var(--em-radius-pill);
    background: rgba(var(--rd-c-rgb), .12);
    font-size: .8125rem;
    font-weight: 600;
    color: var(--rd-t);
    font-variant-numeric: tabular-nums;
}

/* Écran portable (quatre cartes étroites) : part du total en haut à droite, libellé sur toute la largeur */
@media (min-width: 1200px) and (max-width: 1499.98px) {
    .rd-carte { position: relative; gap: 12px; padding: 16px 14px; }
    .rd-icone { width: 46px; height: 46px; }
    .rd-icone .em-icon { width: 24px; height: 24px; }
    .rd-icone--plein .em-icon { width: 30px; height: 30px; padding: 7px; }
    .rd-valeur { font-size: 1.5rem; }
    .rd-libelle { font-size: .875rem; }
    .rd-badge { position: absolute; top: 10px; right: 10px; padding: 2px 8px; font-size: .75rem; }
}

@media (max-width: 1199.98px) {
    .rd-bandeau { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Téléphone : deux cartes par ligne, contenu empilé, part du total en haut à droite */
@media (max-width: 575.98px) {
    .rd-bandeau { gap: 10px; padding: 10px; }
    .rd-carte { position: relative; flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
    .rd-icone { width: 42px; height: 42px; }
    .rd-icone .em-icon { width: 22px; height: 22px; }
    .rd-icone--plein .em-icon { width: 28px; height: 28px; padding: 6px; }
    .rd-valeur { font-size: 1.375rem; }
    .rd-libelle { font-size: .8125rem; }
    .rd-badge { position: absolute; top: 12px; right: 12px; padding: 3px 8px; font-size: .75rem; }
}
