/* =========================================================
   PDM Calendrier d'Événements
   Réutilise les variables CSS du thème PDM Danhomè quand elles
   sont présentes (--pdm-laterite, --pdm-terre, etc.), avec des
   valeurs de repli pour fonctionner avec n'importe quel thème.
   ========================================================= */

.pdm-ec-empty{ text-align:center; color: var(--pdm-muted, #74675E); padding:20px 0; }

/* ---------------------------------------------------------
   Calendrier mensuel
   --------------------------------------------------------- */
.pdm-ec-calendar{
  background:#fff;
  border:1px solid var(--pdm-border, #e4d8c8);
  border-radius: var(--pdm-radius, 8px);
  padding:22px;
  box-shadow: var(--pdm-shadow, 0 16px 45px rgba(57,35,24,.08));
  margin-top:10px;
}
.pdm-ec-cal-head{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:16px;
}
.pdm-ec-cal-title{
  font-family: Georgia, "Times New Roman", serif;
  font-size:1.3rem;
  color: var(--pdm-terre, #4A2A1D);
  display:flex; align-items:center; gap:12px;
}
.pdm-ec-cal-today{
  font-family: system-ui, -apple-system, sans-serif;
  font-size:.7rem; text-transform:uppercase; letter-spacing:.06em; font-weight:700;
  color: var(--pdm-laterite, #9B4F2F);
  border:1px solid var(--pdm-laterite, #9B4F2F);
  border-radius:999px; padding:4px 10px;
}
.pdm-ec-cal-today:hover{ background: var(--pdm-laterite, #9B4F2F); color:#fff; text-decoration:none; }
.pdm-ec-cal-nav{
  width:36px; height:36px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background: var(--pdm-chamois, #E9D8B8);
  color: var(--pdm-terre, #4A2A1D);
  font-size:1.3rem; line-height:1;
  text-decoration:none !important;
}
.pdm-ec-cal-nav:hover{ background: var(--pdm-laterite, #9B4F2F); color:#fff; }

.pdm-ec-cal-grid{
  display:grid; grid-template-columns:repeat(7,1fr); gap:6px;
}
.pdm-ec-cal-weekdays{ margin-bottom:6px; }
.pdm-ec-cal-weekday{
  text-align:center; font-size:.72rem; font-weight:700; text-transform:uppercase;
  letter-spacing:.05em; color: var(--pdm-muted, #74675E); padding:4px 0;
}
.pdm-ec-cal-cell{
  min-height:84px;
  border:1px solid var(--pdm-border, #e4d8c8);
  border-radius:6px;
  padding:6px;
  background:#fff;
}
.pdm-ec-cal-cell.is-empty{ border-color:transparent; background:transparent; }
.pdm-ec-cal-cell.is-today{ border-color: var(--pdm-laterite, #9B4F2F); border-width:2px; }
.pdm-ec-cal-cell.has-events{ background: var(--pdm-ivoire, #F7F3EA); }
.pdm-ec-cal-daynum{
  display:block; font-size:.8rem; font-weight:700; color: var(--pdm-terre, #4A2A1D); margin-bottom:4px;
}
.pdm-ec-cal-cell.is-today .pdm-ec-cal-daynum{
  display:inline-flex; align-items:center; justify-content:center;
  width:22px; height:22px; border-radius:50%;
  background: var(--pdm-laterite, #9B4F2F); color:#fff;
}
.pdm-ec-cal-events{ list-style:none; margin:0; padding:0; }
.pdm-ec-cal-events li{ margin-bottom:2px; }
.pdm-ec-cal-events a{
  display:block; font-size:.68rem; line-height:1.3;
  color: var(--pdm-laterite-dark, #6F321F);
  background: var(--pdm-chamois, #E9D8B8);
  border-radius:3px; padding:2px 4px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.pdm-ec-cal-events a:hover{ background: var(--pdm-laterite, #9B4F2F); color:#fff; text-decoration:none; }
.pdm-ec-cal-more{ font-size:.65rem; color: var(--pdm-muted, #74675E); padding:0 4px; }

@media (max-width:680px){
  .pdm-ec-cal-grid{ gap:3px; }
  .pdm-ec-cal-cell{ min-height:56px; padding:3px; }
  .pdm-ec-cal-events{ display:none; }
  .pdm-ec-cal-cell.has-events .pdm-ec-cal-daynum::after{ content:""; display:block; width:5px; height:5px; border-radius:50%; background: var(--pdm-laterite, #9B4F2F); margin:3px auto 0; }
}

/* ---------------------------------------------------------
   Onglets "À venir / Passés"
   --------------------------------------------------------- */
.pdm-ec-tabs{ display:flex; gap:10px; margin-bottom:24px; }
.pdm-ec-tab{
  padding:9px 20px; border-radius:999px; font-weight:700; font-size:.88rem;
  background:#fff; color: var(--pdm-terre, #4A2A1D);
  border:1px solid var(--pdm-border, #e4d8c8);
  text-decoration:none !important;
}
.pdm-ec-tab.is-active, .pdm-ec-tab:hover{ background: var(--pdm-laterite, #9B4F2F); color:#fff; border-color: var(--pdm-laterite, #9B4F2F); }

/* ---------------------------------------------------------
   Badges et actions sur la fiche événement
   --------------------------------------------------------- */
.pdm-ec-badge{
  position:absolute; top:12px; left:12px;
  background: var(--pdm-laterite, #9B4F2F); color:#fff;
  font-size:.65rem; font-weight:800; text-transform:uppercase; letter-spacing:.05em;
  padding:4px 10px; border-radius:999px;
}
.news-thumb{ position:relative; }

.pdm-ec-status-badge{ font-weight:700; margin-bottom:22px; }
.pdm-ec-status-ongoing{ color:#2E7D32; }
.pdm-ec-status-past{ color: var(--pdm-muted, #74675E); }

.pdm-ec-actions{ display:flex; gap:12px; flex-wrap:wrap; }

.pdm-ec-description{ font-size:1.02rem; line-height:1.75; }
.pdm-ec-description img{ border-radius: var(--pdm-radius, 8px); }
