/* DOST CRM - Dashboard Custom V3 */

/* Titres des widgets */
[data-widget-id] [id^="title-id-"] {
  font-size: 20px !important;
  font-weight: 600 !important;
  text-align: center !important;
  width: 100% !important;
}

/* Conteneur des titres */
[data-widget-id] .css-bp5v2k {
  flex: 1 !important;
  width: 100% !important;
  text-align: center !important;
}

/* Valeurs des KPI */
[data-widget-id] h2 {
  font-size: 48px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  text-align: center !important;
}

/* Centrage des KPI */
[data-widget-id] .css-ztkwx4 {
  width: 100% !important;
  justify-content: center !important;
  align-items: center !important;
}

[data-widget-id]:has(h2) .css-18h3645 {
  flex: 1 !important;
  justify-content: center !important;
  align-items: center !important;
}

/* Couleurs des KPI */
[data-dost-kpi="danger"] h2 {
  color: #dc2626 !important;
}

[data-dost-kpi="warning"] h2 {
  color: #b45309 !important;
}

[data-dost-kpi="info"] h2 {
  color: #2563eb !important;
}

[data-dost-kpi="success"] h2 {
  color: #15803d !important;
}

/* Couleurs en mode sombre */
html.dark [data-dost-kpi="danger"] h2 {
  color: #f87171 !important;
}

html.dark [data-dost-kpi="warning"] h2 {
  color: #fbbf24 !important;
}

html.dark [data-dost-kpi="info"] h2 {
  color: #60a5fa !important;
}

html.dark [data-dost-kpi="success"] h2 {
  color: #4ade80 !important;
}

/* Libellés du graphique */
[data-widget-id] svg text[text-anchor="end"] {
  font-size: 14px !important;
  font-weight: 500 !important;
}

/* Valeurs du graphique */
[data-widget-id] svg text[text-anchor="start"] {
  font-size: 14px !important;
  font-weight: 600 !important;
  fill: #333333 !important;
}

html.dark [data-widget-id] svg text[text-anchor="start"] {
  fill: #e5e5e5 !important;
}

/* Graduations */
[data-widget-id] svg text[text-anchor="middle"] {
  font-size: 12px !important;
}

/* DOST - Couleurs des KPI par identifiant */

/* Relances en retard - Rouge */
[data-widget-id="e659774d-55ff-4896-a1de-ca52de819c0c"] h2 {
  color: #dc2626 !important;
}

/* Affaires sans prochaine action - Jaune */
[data-widget-id="7a3f92b0-853b-4de6-9907-62dc2f9e9af1"] h2 {
  color: #b45309 !important;
}

/* Actions commerciales du jour - Bleu */
[data-widget-id="40592f05-4fbe-48c6-a37b-542c02f50667"] h2 {
  color: #2563eb !important;
}

/* MRR et nouveaux clients - Vert */
[data-widget-id="c4a60610-ad7c-4013-9288-6981da715f7d"] h2,
[data-widget-id="14df585a-9223-4126-8ec5-e02643c545de"] h2 {
  color: #15803d !important;
}

/* Mode sombre */

html.dark [data-widget-id="e659774d-55ff-4896-a1de-ca52de819c0c"] h2 {
  color: #f87171 !important;
}

html.dark [data-widget-id="7a3f92b0-853b-4de6-9907-62dc2f9e9af1"] h2 {
  color: #fbbf24 !important;
}

html.dark [data-widget-id="40592f05-4fbe-48c6-a37b-542c02f50667"] h2 {
  color: #60a5fa !important;
}

html.dark [data-widget-id="c4a60610-ad7c-4013-9288-6981da715f7d"] h2,
html.dark [data-widget-id="14df585a-9223-4126-8ec5-e02643c545de"] h2 {
  color: #4ade80 !important;
}


/* ==========================================
   DOST - TYPOGRAPHIE GLOBALE CRM
   ========================================== */

/* Nom de l'espace de travail */
.css-150apny {
  font-size: 18px !important;
}

/* Navigation latérale */
.css-1ezgv1 {
  font-size: 18px !important;
}

/* Titres des sections du menu */
.css-1tw2q1u {
  font-size: 15px !important;
}

/* Textes, opportunités et libellés */
.s1a0c8w6:not([data-widget-id] *) {
  font-size: 18px !important;
}

/* Champs des opportunités */
.css-tr28r8 {
  font-size: 18px !important;
}

/* Boutons et filtres */
.css-m7m24w,
.css-10b2dlz {
  font-size: 18px !important;
}


/* ==========================================
   DOST - LARGEUR DES COLONNES KANBAN
   ========================================== */

/* Colonnes et en-têtes */
.css-1a4y1va,
#record-board-header > .css-96ro2i {
  width: 320px !important;
  min-width: 320px !important;
  flex-shrink: 0 !important;
}

/* ==========================================
   DOST - TITRES DES CARTES KANBAN
   ========================================== */

/* Titres sur deux lignes maximum */
[id^="record-board-card-"] .css-jttcgh
a[href^="/object/opportunity/"] [data-testid="tooltip"] {
  font-weight: 600 !important;
  white-space: normal !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  line-height: 1.2 !important;
}

/* Hauteur dynamique des conteneurs du titre */
[id^="record-board-card-"] .css-jttcgh,
[id^="record-board-card-"] .css-jttcgh
:has(a[href^="/object/opportunity/"]),
[id^="record-board-card-"] .css-jttcgh
a[href^="/object/opportunity/"],
[id^="record-board-card-"] .css-jttcgh
a[href^="/object/opportunity/"] [data-testid="chip"],
[id^="record-board-card-"] .css-jttcgh
a[href^="/object/opportunity/"] [data-testid="tooltip"] {
  height: auto !important;
  max-height: none !important;
  min-height: 22px !important;
}
/* ==========================================
   DOST - PANNEAU LATERAL
   ========================================== */

/* Largeur de la colonne des libellés */
aside [data-testid="record-fields-list-container"] .css-1kh1sa {
  width: 200px !important;
  min-width: 200px !important;
  flex-shrink: 0 !important;
}

/* Largeur du texte des libellés */
aside [data-testid="record-fields-list-container"] .css-1598exh {
  width: 180px !important;
  min-width: 180px !important;
}

/* Typographie des libellés */
aside [data-testid="record-fields-list-container"] .s1w3fbr1 {
  font-size: 15px !important;
}

/* ==========================================
   DOST - PANNEAU LATERAL V2
   ========================================== */

/* Largeur du panneau lateral */
html {
  --command-menu-width: 600px !important;
}

/* Affichage complet du titre */
aside .css-10ylpcd [data-testid="tooltip"] {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  display: block !important;
  -webkit-line-clamp: unset !important;
  line-height: 1.2 !important;
}

/* Conteneur du titre */
aside .css-10ylpcd {
  min-width: 0 !important;
  height: auto !important;
}

/* Typographie des onglets */
aside button[data-testid^="tab-"] {
  font-size: 15px !important;
}

/* Icones des onglets */
aside button[data-testid^="tab-"] svg {
  width: 16px !important;
  height: 16px !important;
}


/* ==========================================
   DOST - PANNEAU LATERAL V3
   ========================================== */

/* Supprimer la limitation de largeur du titre */
aside .css-5048l6 {
  max-width: none !important;
  width: auto !important;
  min-width: 0 !important;
}

/* Adapter automatiquement la hauteur de l'en-tête */
aside .css-11u9fgz {
  height: auto !important;
  min-height: 40px !important;
  overflow: visible !important;
}

