/**
 * Styles pour la page d'administration réseau Pilo'Blocks
 */

.pib-network-admin {
  max-width: 1400px;
}

/* Introduction */
.pib-network-intro {
  font-size: 14px;
  color: #646970;
  margin-bottom: 30px;
}

/* Grille de statistiques */
.pib-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.pib-stat-card {
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all 0.2s ease;
}

.pib-stat-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-color: #c3c4c7;
}

.pib-stat-card.pib-stat-active {
  border-left: 4px solid #00a32a;
}

.pib-stat-card.pib-stat-config {
  border-left: 4px solid #2271b1;
}

.pib-stat-card.pib-stat-version {
  border-left: 4px solid #646970;
}

.pib-stat-icon {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background: #f0f0f1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pib-stat-icon .dashicons {
  font-size: 24px;
  width: 24px;
  height: 24px;
  color: #2271b1;
}

.pib-stat-active .pib-stat-icon .dashicons {
  color: #00a32a;
}

.pib-stat-content {
  flex: 1;
}

.pib-stat-value {
  font-size: 32px;
  font-weight: 600;
  line-height: 1;
  color: #1d2327;
  margin-bottom: 5px;
}

.pib-stat-label {
  font-size: 13px;
  color: #646970;
  line-height: 1.3;
}

/* Actions réseau */
.pib-network-actions {
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  padding: 25px;
  margin: 30px 0;
}

.pib-network-actions h2 {
  margin-top: 0;
  font-size: 18px;
}

.pib-network-actions p {
  color: #646970;
  margin-bottom: 20px;
}

.pib-network-actions .button-large {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  height: auto;
}

.pib-network-actions .button-large .dashicons {
  margin-top: 0;
}

.pib-action-result {
  margin-top: 20px;
  padding: 12px 20px;
  border-radius: 4px;
  border-left: 4px solid;
}

.pib-action-result.success {
  background: #edfaef;
  border-color: #00a32a;
  color: #00a32a;
}

.pib-action-result.error {
  background: #fcf0f1;
  border-color: #d63638;
  color: #d63638;
}

.pib-action-result.loading {
  background: #f0f6fc;
  border-color: #2271b1;
  color: #2271b1;
}

/* Liste des sites */
.pib-sites-list {
  margin: 30px 0;
}

.pib-sites-list h2 {
  font-size: 18px;
  margin-bottom: 15px;
}

.pib-sites-table-container {
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  overflow: hidden;
}

.pib-sites-table {
  margin: 0;
  border: none;
}

.pib-sites-table th {
  font-weight: 600;
  padding: 12px 15px;
  background: #f6f7f7;
  border-bottom: 1px solid #dcdcde;
}

.pib-sites-table td {
  padding: 15px;
  vertical-align: middle;
}

.pib-site-row.pib-site-inactive {
  opacity: 0.6;
}

/* Colonnes */
.pib-col-id {
  width: 60px;
  text-align: center;
}

.pib-col-status {
  width: 120px;
}

.pib-col-config {
  width: 180px;
}

.pib-col-cache {
  width: 100px;
  text-align: center;
}

.pib-col-actions {
  width: 120px;
  text-align: right;
}

/* Informations du site */
.pib-site-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pib-site-name a {
  color: #2271b1;
  text-decoration: none;
  font-size: 14px;
}

.pib-site-name a:hover {
  color: #135e96;
}

.pib-site-url {
  font-size: 12px;
  color: #646970;
  font-family: "Courier New", monospace;
}

/* Badges */
.pib-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 500;
}

.pib-badge .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

.pib-badge-active {
  background: #edfaef;
  color: #00a32a;
}

.pib-badge-inactive {
  background: #f0f0f1;
  color: #646970;
}

/* Icônes de configuration */
.pib-config-icons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pib-config-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f0f6fc;
  color: #2271b1;
  cursor: help;
}

.pib-config-icon .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

.pib-config-icon.pib-has-gtm {
  background: #f0f6fc;
  color: #2271b1;
}

.pib-config-icon.pib-has-gmap {
  background: #fef7f0;
  color: #d63638;
}

.pib-config-icon.pib-has-captcha {
  background: #edfaef;
  color: #00a32a;
}

.pib-config-empty {
  font-size: 12px;
  color: #a7aaad;
}

/* Statut du cache */
.pib-cache-status {
  display: flex;
  justify-content: center;
}

.pib-cache-ok,
.pib-cache-partial,
.pib-cache-empty {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: help;
}

.pib-cache-ok {
  color: #00a32a;
}

.pib-cache-partial {
  color: #dba617;
}

.pib-cache-empty {
  color: #d63638;
}

.pib-cache-ok .dashicons,
.pib-cache-partial .dashicons,
.pib-cache-empty .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

/* Informations supplémentaires */
.pib-network-info {
  margin: 30px 0;
}

.pib-network-info h2 {
  font-size: 18px;
  margin-bottom: 15px;
}

.pib-network-info .notice {
  margin: 15px 0;
}

.pib-documentation {
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  padding: 20px;
  margin-top: 20px;
}

.pib-documentation h3 {
  margin-top: 0;
  font-size: 16px;
}

.pib-documentation ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pib-documentation li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  color: #646970;
}

.pib-documentation li .dashicons {
  color: #2271b1;
  flex-shrink: 0;
}

.pib-documentation a {
  color: #2271b1;
  text-decoration: none;
}

.pib-documentation a:hover {
  color: #135e96;
  text-decoration: underline;
}

/* États de chargement */
.pib-loading {
  opacity: 0.5;
  pointer-events: none;
}

/* Informations importantes en haut */
.pib-network-info-top {
  margin: 30px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.pib-network-info-top .notice {
  margin: 0;
}

/* Configuration détaillée */
.pib-config-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}

.pib-config-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pib-config-label {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 100px;
  color: #50575e;
  font-weight: 500;
}

.pib-config-label .dashicons {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

.pib-config-value {
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Styles par source */
.pib-config-value.pib-source-site {
  background: #00a32a;
  color: white;
}

.pib-config-value.pib-source-network {
  background: #2271b1;
  color: white;
}

.pib-config-value.pib-source-none {
  background: #dcdcde;
  color: #50575e;
}

/* Largeur de colonne ajustée */
.pib-col-config {
  min-width: 180px;
}

/* Page des paramètres réseau */
.pib-network-settings {
  max-width: 1200px;
}

.pib-network-settings .pib-network-intro {
  font-size: 14px;
  color: #646970;
  margin-bottom: 30px;
}

.pib-network-section {
  background: #fff;
  border: 1px solid #c3c4c7;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
  margin-bottom: 20px;
  padding: 20px;
}

.pib-network-section h2 {
  margin-top: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #c3c4c7;
}

.pib-network-section .form-table {
  margin-top: 20px;
}

.pib-network-settings .pib-network-info {
  margin-top: 20px;
}

/* Responsive */
@media screen and (max-width: 782px) {
  .pib-stats-grid {
    grid-template-columns: 1fr;
  }

  .pib-network-info-top {
    grid-template-columns: 1fr;
  }

  .pib-sites-table-container {
    overflow-x: auto;
  }

  .pib-sites-table {
    min-width: 800px;
  }
}
