/* Structure globale */
.container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 1rem;
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid #ccc;
  padding-bottom: 0.5rem;
}

.section-singles,
.section-summary,
.section-labels,
.section-publishing {
  margin-bottom: 3rem;
}

.flag-icon {
  width: 24px;
  height: 24px;
  object-fit: cover;
  border-radius: 4px; /* coins légèrement arrondis */
  background: #f0f0f0; /* optionnel pour éviter les bords transparents */
}

/* Singles (solo & Take That) */
.single-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.single-row {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-radius: 8px;
  background-color: #f9f9f9;
  transition: background-color 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  align-items: center;
}

.single-row:hover {
  background-color: #e6f1ff;
}

.single-left {
  flex: 0 0 95px;
}

.single-cover {
  width: 95px;
  height: auto;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  margin: 0 auto;
}

.single-name {
  flex: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.single-middle {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  padding-right: 25px;
}

.single-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.single-title {
  font-size: 1rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.single-sales {
  font-size: 1.2rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.single-link {
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.single-link a {
  color: #007bff;
  text-decoration: none;
}

.single-total-row {
  background-color: #dbefff;
  font-weight: bold;
  font-size: 1.7rem;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.single-total-row .single-left {
  flex: 0 0 95px;
}

.single-total-row .single-name {
  flex: 2;
}

.single-total-row .single-middle {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding-right: 25px;
}

.single-total-row .single-right {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
}

.single-total-row .single-title {
  font-size: 1.5rem;
}

.single-total-row .single-sales {
  font-size: 1.4rem;
}

/* Récapitulatif */
.summary-row {
  background-color: #eef6ff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  font-size: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.summary-row .summary-item {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  font-size: 1.3rem;
}

.summary-row .summary-item.total-global {
  font-size: 1.6rem;
}

/* Tableaux */
table {
  width: 100%;
  border-collapse: collapse;
}

table th,
table td {
  padding: 0.75rem;
  vertical-align: top;
  border: 1px solid #dee2e6;
}

table th:nth-child(1),
table td:nth-child(1) {
  width: 120px;
}

table td blockquote {
  margin: 0.5rem 0 0;
  padding-left: 1rem;
  border-left: 3px solid #ccc;
  color: #555;
  font-style: italic;
}

#sales-list {
  margin-top: 25px;
  margin-bottom: 3rem;
}

#charts-list {
  margin-top: 25px;
  margin-bottom: 25px;
}

/* Responsive */
@media (max-width: 600px) {
  .single-row {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    gap: 8px;
    padding: 1rem 0.5rem;
  }

  .single-left,
  .single-middle,
  .single-right {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  .single-left {
    flex: none;
  }

  .single-cover {
    width: 50px;
    height: auto;
  }

  .single-name {
    display: flex;
    align-items: left;
    justify-content: flex-start;
    width: 50%;
    text-align: left;
  }

  .single-middle {
    width: 50%;
    justify-content: flex-end;
    align-items: flex-end;
    text-align: right;
    padding-right: 0px;
  }

  .single-right {
    margin-top: 0.2rem;
    width: 100%;
  }

  .single-link {
    font-size: 1rem;
  }

  .single-total-row {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem 0.5rem;
    gap: 0.4rem;
  }

  .single-total-row .single-left {
    display: none;
  }

  .single-total-row .single-name {
    display: block;
  }

  .single-total-row .single-middle {
    align-items: center;
    justify-content: center;
    padding: 0;
  }

  .single-total-row .single-right {
    display: none;
  }

  .single-total-row .single-title {
    font-size: 1.3rem;
  }

  .single-total-row .single-sales {
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .summary-row {
    font-size: 0.9rem;
  }

  .summary-row .summary-item {
    font-size: 0.9rem;
  }

  .summary-row .summary-item.total-global {
    font-size: 1.1rem;
  }

  table thead {
    display: none;
  }

  table,
  table tbody,
  table tr,
  table td {
    display: block;
    width: 100%;
  }

  table tr {
    margin-bottom: 1.5rem;
    border: 1px solid #ccc;
    padding: 1rem;
    background-color: #fefefe;
    border-radius: 8px;
  }

  table td {
    border: none;
    padding: 0.3rem 0;
  }

  table td::before {
    content: attr(data-label);
    display: block;
    font-weight: bold;
    margin-bottom: 0.25rem;
    color: #444;
  }

  .single-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
  }

  .single-grid .single-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background-color: #f5faff;
    border-radius: 6px;
    font-size: 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: background-color 0.2s ease;
  }

  .single-grid .single-row:hover {
    background-color: #eaf4ff;
  }

  .single-grid .country {
    font-weight: 500;
    color: #222;
  }

  .single-grid .value {
    font-weight: bold;
    color: #2563eb;
  }

  .single-total-row {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0.5rem;
    gap: 0.5rem;
    text-align: left;
  }

  .single-total-row .single-name,
  .single-total-row .single-middle {
    width: 50%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
  }

  .single-total-row .single-middle {
    justify-content: flex-end;
  }
}
