/* +--------------------------------------------------------------------------+
// 2017 PMB Services / www.sigb.net pmb@sigb.net et contributeurs (voir www.sigb.net)
// +-------------------------------------------------+
// $Id: campaign.css,v 1.1.2.3 2026/07/27 14:39:33 dgoron Exp $ */
/*------------------------------------------------------------------------------------------*/

/* ---------------------------------------------------------------------------*/

/*                      Campagnes de mails                             		  */

/* ---------------------------------------------------------------------------*/

.campaign-app {
  color: #1f2937;
}
.campaign-app h4 {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  margin: 0 0 10px;
}
.campaign-app .row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
  align-items: stretch;
}

.campaign_view_box {
  flex: 1 1 0;
  min-width: 150px;
  float: none;
  width: auto;
  margin: 0;
  text-align: left;
  background-color: rgb(165, 212, 255);
  border: 1px solid #eef0f6;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
  font-size: 22px;
  font-weight: 600;
  box-sizing: border-box;
}

.campaign_view_box label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

/* Fraction affichee sous le taux : "8 / 13" */
.campaign_view_box_sub {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #1f2937;
  opacity: 0.65;
}

/* Nombre de destinataires n'ayant pas consenti au tracage (RGPD/CNIL) */
.campaign_view_box_refused {
  color: #92400e;
  opacity: 1;
}

.campaign_view_graph {
  flex: 1 1 45%;
  min-width: 320px;
  /* Plafonne une carte a la moitie : un graphe seul sur sa derniere ligne
	 ne s'etire pas sur toute la largeur (sinon il devient 2x plus gros). */
  max-width: calc(50% - 7px);
  float: none;
  width: auto;
  background: #fff;
  border: 1px solid #eef0f6;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
  box-sizing: border-box;
}

/* Graphe des liens en barres horizontales : hauteur portee par le conteneur */
/* (proportionnelle au nombre de liens), position relative requise par        */
/* Chart.js en maintainAspectRatio:false.                                      */
.campaign-links-chart {
  position: relative;
  width: 100%;
}

.campaign-links-chart > div {
  position: relative;
  height: 100%;
}

/* Mise en page selon le type : temporels / barres en pleine largeur, */
/* camemberts en tiers (3 par ligne).                                  */
.campaign_view_graph--full {
  flex-basis: 100%;
  max-width: 100%;
}

.campaign_view_graph--third {
  flex-basis: calc(33.333% - 10px);
  min-width: 240px;
  max-width: calc(33.333% - 10px);
}

/* Legende HTML des camemberts : hors canvas, defilable si trop d'elements,    */
/* pour ne pas reduire la taille du graphe.                                    */
.campaign-pie-legend {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  max-height: 96px;
  overflow-y: auto;
}

.campaign-pie-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #374151;
  cursor: pointer;
  user-select: none;
}

.campaign-pie-legend-item.is-hidden {
  opacity: 0.45;
  text-decoration: line-through;
}

.campaign-pie-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex: 0 0 auto;
}

@media (max-width: 900px) {
  .campaign_view_graph,
  .campaign_view_graph--full,
  .campaign_view_graph--third {
    flex-basis: 100%;
    max-width: none;
  }
}

div.elt-in-graph {
  background-color: #e1e1e1;
  border-radius: 2px;
  box-shadow: 3px 1px 2px 1px #ccc;
}

.campaign-chart-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.campaign-chart-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.campaign-chart-header h4 {
  margin: 0;
  flex: 1;
}

.campaign-chart-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.campaign-chart-badge {
  color: #9ca3af;
  font-size: 0.9em;
  cursor: help;
}

.campaign-chart-detail-links {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

.campaign-chart-detail-links .bouton {
  white-space: nowrap;
  text-decoration: none;
}

/* Heatmap jour de la semaine x heure : grille CSS pure, sans dependance      */
/* graphique supplementaire. L'intensite de couleur de chaque cellule est    */
/* calculee cote Vue (cf. heatmapChart.vue).                                  */
.campaign-heatmap {
  overflow-x: auto;
}

.campaign-heatmap-grid {
  display: grid;
  gap: 2px;
  min-width: 720px;
}

.campaign-heatmap-corner {
  background: transparent;
}

.campaign-heatmap-col-label,
.campaign-heatmap-row-label {
  font-size: 0.7rem;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
}

.campaign-heatmap-row-label {
  justify-content: flex-end;
  padding-right: 6px;
  white-space: nowrap;
}

.campaign-heatmap-cell {
  min-height: 20px;
  border-radius: 2px;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #374151;
}