/* ==========================================================
   Live Nation Eventos (Agenda) — CSS
   La section est injectée directement dans <main>, hors du
   conteneur Gutenberg `is-layout-constrained`. Donc le full-bleed
   CSS marche naturellement, sans hack.
   ========================================================== */

.ag-section-wrapper {
  /* Full-width naturel : la section est dans <main>, pas dans entry-content */
  display: block;
  width: 100%;
  margin: 0;
  padding: 60px 20px 80px 20px;
  box-sizing: border-box;

  /* Variables */
  --ag-bg-page: #000000;
  --ag-bg-card: #121212;
  --ag-border-subtle: rgba(255, 255, 255, 0.08);
  --ag-red: #e31837;
  --ag-red-hover: #c1122a;
  --ag-text-main: #ffffff;
  --ag-text-muted: #999999;
  --ag-font: 'Helvetica Neue', Helvetica, Arial, sans-serif;

  background-color: var(--ag-bg-page);
  color: var(--ag-text-main);
  font-family: var(--ag-font);
}

.ag-section-wrapper * {
  box-sizing: border-box;
}

/* Le container limite la largeur du contenu intérieur (pas du fond) */
.ag-section-wrapper .ag-container {
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}

/* --- HEADER --- */
.ag-section-wrapper .ag-header {
  text-align: center;
  margin-bottom: 40px;
}

.ag-section-wrapper .ag-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 25px;
  color: var(--ag-text-main);
}

/* --- LISTE --- */
.ag-section-wrapper .ag-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.ag-section-wrapper .ag-card {
  display: grid;
  grid-template-columns: 75px 130px 1fr auto;
  gap: 25px;
  align-items: center;
  background-color: var(--ag-bg-card);
  padding: 20px 25px;
  border-radius: 8px;
  border: 1px solid var(--ag-border-subtle);
  text-decoration: none;
  color: var(--ag-text-main);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.ag-section-wrapper .ag-card:not(.ag-sold-out):hover {
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.ag-section-wrapper .ag-card.ag-sold-out {
  pointer-events: none;
}

.ag-section-wrapper .ag-card.ag-sold-out .ag-btn {
  background-color: #2a2a2a;
  color: #666666;
  text-decoration: line-through;
}

/* 1. Date */
.ag-section-wrapper .ag-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.ag-section-wrapper .ag-date-month {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ag-text-main);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ag-section-wrapper .ag-date-day-num {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--ag-text-main);
  line-height: 1.1;
  margin: 4px 0;
  white-space: nowrap;
  letter-spacing: -0.5px;
}

/* 2. Image */
.ag-section-wrapper .ag-image-wrapper {
  width: 130px;
  height: 90px;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  background-color: #111;
}

.ag-section-wrapper .ag-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
  display: block;
}

.ag-section-wrapper .ag-card.ag-sold-out .ag-image-wrapper img {
  opacity: 0.4;
  filter: grayscale(100%);
}

.ag-section-wrapper .ag-badge-soldout {
  position: absolute;
  top: 6px;
  left: 6px;
  background: #000000;
  color: #ffffff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 3px;
  border: 1px solid #333;
  z-index: 2;
}

/* 3. Textes */
.ag-section-wrapper .ag-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.ag-section-wrapper .ag-title-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
}

.ag-section-wrapper .ag-title-row h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ag-text-main);
  margin: 0;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ag-section-wrapper .ag-badge-gira {
  flex-shrink: 0;
  color: var(--ag-red);
  border: 1px solid var(--ag-red);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 2px;
}

.ag-section-wrapper .ag-subtitle {
  font-size: 0.85rem;
  color: var(--ag-text-muted);
  margin: 0 0 6px;
}

.ag-section-wrapper .ag-location {
  font-size: 0.85rem;
  color: var(--ag-text-main);
  margin: 0;
}

.ag-section-wrapper .ag-location-venue {
  color: var(--ag-text-muted);
}

.ag-section-wrapper .ag-tour-dates-list {
  font-size: 0.75rem;
  color: #888888;
  margin: 6px 0 0;
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 4. Bouton */
.ag-section-wrapper .ag-action {
  display: flex;
  align-items: center;
}

.ag-section-wrapper .ag-btn {
  background-color: var(--ag-red);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  transition: background 0.2s ease;
  white-space: nowrap;
}

.ag-section-wrapper .ag-card:not(.ag-sold-out):hover .ag-btn {
  background-color: var(--ag-red-hover);
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 800px) {
  .ag-section-wrapper {
    padding: 40px 15px;
  }

  .ag-section-wrapper .ag-card {
    grid-template-columns: 60px 75px 1fr;
    grid-template-areas:
      "date image info"
      "action action action";
    gap: 12px;
    padding: 15px;
    align-items: center;
  }

  .ag-section-wrapper .ag-date {
    grid-area: date;
  }

  .ag-section-wrapper .ag-date-day-num {
    font-size: 1.1rem;
  }

  .ag-section-wrapper .ag-image-wrapper {
    grid-area: image;
    width: 75px;
    height: 75px;
  }

  .ag-section-wrapper .ag-info {
    grid-area: info;
  }

  .ag-section-wrapper .ag-title-row {
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 2px;
  }

  .ag-section-wrapper .ag-title-row h3 {
    font-size: 1rem;
  }

  .ag-section-wrapper .ag-subtitle,
  .ag-section-wrapper .ag-location {
    font-size: 0.8rem;
    margin-bottom: 2px;
  }

  .ag-section-wrapper .ag-tour-dates-list {
    margin-top: 2px;
    font-size: 0.7rem;
  }

  .ag-section-wrapper .ag-action {
    grid-area: action;
    width: 100%;
    margin-top: 5px;
  }

  .ag-section-wrapper .ag-btn {
    width: 100%;
    padding: 12px 10px;
    font-size: 0.9rem;
  }
}
