
.pl-cal-wrapper {
  max-width: 1200px;
  margin: 0 auto;
}

.pl-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.pl-cal-title h2 {
  margin: 0;
}

.pl-cal-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.pl-cal-select {
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
}

.pl-cal-legend {
  display: flex;
  gap: 16px;
  align-items: center;
  margin: 12px 0 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #333;
}

.pl-cal-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pl-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  display: inline-block;
}

.pl-dot-red { background: #ff2d2d; }
.pl-dot-green { background: #70d64b; }
.pl-dot-blue { background: #4a2cf0; }

/* Reprise du style bouton jaune */
.pl-btn-yellow {
  background: #F6D66B;
  color: #000;
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease;
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.pl-btn-yellow:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.14);
}

/* Calendar grid */
.pl-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.pl-cal-cell {
  min-height: 110px;
  border-right: 1px solid rgba(0,0,0,0.10);
  border-bottom: 1px solid rgba(0,0,0,0.10);
  padding: 10px 10px 8px;
  box-sizing: border-box;
}

.pl-cal-cell:nth-child(7n) {
  border-right: none;
}

.pl-cal-head {
  min-height: auto;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: #fafafa;
}

.pl-cal-empty {
  background: #fff;
}

.pl-cal-day {
  cursor: pointer;
}

.pl-cal-day:hover {
  background: rgba(0,0,0,0.02);
}

.pl-cal-daynum {
  font-size: 12px;
  opacity: .65;
  margin-bottom: 8px;
}

.pl-cal-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pl-cal-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 1.2;
  min-width: 0;
}

.pl-cal-item-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

/* Modal (même esprit que Dossiers) */
.pl-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
}

.pl-modal {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.25);
  overflow: hidden;
}

.pl-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.pl-modal-header h3 {
  margin: 0;
  font-size: 20px;
}

.pl-modal-close {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: none;
  background: rgba(0,0,0,0.06);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.pl-modal-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px;
}

.pl-modal-body label {
  font-weight: 600;
  font-size: 14px;
  margin-top: 6px;
}

.pl-modal-body input,
.pl-modal-body textarea,
.pl-modal-body select {
  width: 100%;
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
}

.pl-modal-body textarea {
  min-height: 90px;
  resize: vertical;
}

.pl-modal-row {
  margin-top: 6px;
}

.pl-modal-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
}

.pl-modal-footer {
  padding: 16px 20px 22px;
  display: flex;
  justify-content: center;
}

/* Lock scroll background quand modal ouverte */
body.pl-modal-open {
  overflow: hidden;
}

/* Grille 2 colonnes (dates/heures/rappel) */
.pl-modal-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 520px) {
  .pl-modal-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Zones conditionnelles */
.pl-rappel-zone,
.pl-share-zone {
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  background: rgba(0,0,0,0.02);
}


/* =========================================================
   FIX CLIC DATES PASSÉES (Divi / overlay / éléments enfants)
   - on force la grille au-dessus
   - on empêche les enfants (.pl-cal-items, texte, pastilles)
     de capter le clic : clic => toujours .pl-cal-day
   ========================================================= */
#pl-cal-monthly,
.pl-cal-grid,
.pl-cal-cell,
.pl-cal-day {
  position: relative;
  z-index: 2147483647;
  pointer-events: auto;
}

/* ✅ important : les éléments internes ne captent JAMAIS le clic */
.pl-cal-day * {
  pointer-events: none;
}
