/* ============================================================================
   Paconu — Calendrier de dates (v4)
   vert #06694f · plage #eafaf2 · sombre #07152d · gris #5d6676 / #a5aebc
   ============================================================================ */

/* Masque le contenu natif du champ (presets du thème, inputs) une fois notre
   calendrier en place : il ne reste que le <label> et notre déclencheur.
   En CSS !important pour survivre aux re-rendus de Vue. */
.date-filter[data-paconu-cal="1"] > *:not(label):not(.paconu-cal-trigger),
.datepicker-form-group[data-paconu-cal="1"] > *:not(label):not(.paconu-cal-trigger) {
  display: none !important;
}

.date-filter[data-paconu-cal="1"],
.datepicker-form-group[data-paconu-cal="1"] {
  display: block !important;
  height: 100% !important;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* ---- Déclencheur : même anatomie que le champ « Où ? » voisin ------------- */
.paconu-cal-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; height: 100%;
  background: transparent;
  border: none; border-bottom: 1.5px solid rgba(0, 0, 0, .2);
  border-radius: 0; box-shadow: none;
  cursor: pointer;
  padding: 6px 0; margin: 0;
  font-family: inherit; font-size: 15px; font-weight: 600; color: #1d1d23;
  text-align: left;
  transition: border-color .12s ease;
}
.paconu-cal-trigger:hover { border-bottom-color: rgba(0, 0, 0, .35); }
.paconu-cal-trlabel { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.paconu-cal-ph { color: #1d1d23; font-weight: 600; }
.paconu-cal-trigger.has-value { color: #06694f; font-weight: 700; border-bottom-color: rgba(6, 105, 79, .35); }
.paconu-cal-x {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 999px; color: #8a92a0;
  transition: background .12s ease, color .12s ease;
}
.paconu-cal-x:hover { background: rgba(7, 21, 45, .08); color: #07152d; }

/* ---- Panneau ------------------------------------------------------------- */
.paconu-cal-pop {
  position: fixed;
  z-index: 2147483000;
  background: #fff;
  border: 1px solid rgba(7, 21, 45, .10);
  border-radius: 22px;
  box-shadow: 0 22px 50px rgba(7, 21, 45, .16);
  padding: 20px 22px;
  width: 430px;
  max-width: calc(100vw - 16px);
  font-family: inherit;
  color: #07152d;
  -webkit-tap-highlight-color: transparent;
}
.paconu-cal-pop.two-months { width: 700px; }

/* ---- En-tête : Du / Au + navigation -------------------------------------- */
.paconu-cal-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0 0 16px;
}
.paconu-cal-fields { display: flex; gap: 8px; flex: 1; min-width: 0; }
.paconu-cal-fld {
  flex: 1; min-width: 0; text-align: left; cursor: pointer;
  border: 1.5px solid rgba(7, 21, 45, .14); border-radius: 14px;
  background: #fff; padding: 8px 14px;
  font-family: inherit;
}
.paconu-cal-fld.on { border-color: #06694f; background: #f3fbf8; }
.paconu-cal-fld b {
  display: block; font-size: 11px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; color: #8d96a5;
}
.paconu-cal-fld span {
  display: block; margin-top: 2px;
  font-size: 14.5px; font-weight: 700; color: #07152d;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.paconu-cal-fld span.ph { color: #a5aebc; font-weight: 600; }

.paconu-cal-nav { display: flex; gap: 4px; flex: 0 0 auto; }
.paconu-cal-nav button {
  width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: none; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center; color: #07152d;
}
.paconu-cal-nav button:hover:not([disabled]) { background: #f3f5f8; }
.paconu-cal-nav button[disabled] { color: #cfd5dd; cursor: default; }

/* ---- Mois ---------------------------------------------------------------- */
.paconu-cal-months { display: grid; grid-template-columns: 1fr; gap: 0 26px; }
.paconu-cal-pop.two-months .paconu-cal-months { grid-template-columns: 1fr 1fr; }

.paconu-cal-month h5 {
  margin: 0 0 10px; text-align: center;
  font-size: 14px; font-weight: 800; text-transform: capitalize; color: #07152d;
}
.paconu-cal-week { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 4px; }
.paconu-cal-week span {
  text-align: center; font-size: 11px; font-weight: 800; color: #a5aebc;
  text-transform: uppercase; letter-spacing: .3px;
}

/* 6 lignes de 38 px, toujours : c'est ce qui fige la hauteur du panneau et
   empêche le contenu de sauter quand on change de mois. */
.paconu-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(6, 38px);
}
.paconu-cal-cell { display: flex; align-items: center; justify-content: center; position: relative; }
.paconu-cal-cell.empty { pointer-events: none; }
.paconu-cal-cell.in { background: #eafaf2; }
.paconu-cal-cell.from { background: linear-gradient(90deg, transparent 50%, #eafaf2 50%); }
.paconu-cal-cell.to { background: linear-gradient(90deg, #eafaf2 50%, transparent 50%); }

.paconu-cal-day {
  width: 36px; height: 36px; border-radius: 999px;
  border: none; background: transparent; cursor: pointer; padding: 0;
  font-family: inherit; font-size: 13.5px; font-weight: 700; color: #07152d;
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
  transition: background .12s ease;
}
.paconu-cal-day:hover:not([disabled]) { background: #f3f5f8; }
.paconu-cal-day.edge { background: #06694f !important; color: #fff; }
.paconu-cal-day.edge:hover { background: #055840 !important; }
.paconu-cal-day.today { box-shadow: inset 0 0 0 1.5px rgba(7, 21, 45, .22); }
.paconu-cal-day.past,
.paconu-cal-day[disabled] { color: #c9ced8; cursor: default; }
.paconu-cal-day.past:hover { background: transparent; }

/* ---- Raccourcis ---------------------------------------------------------- */
.paconu-cal-presets {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid rgba(7, 21, 45, .08);
}
.paconu-cal-presets button {
  border: 1.5px solid rgba(7, 21, 45, .14); background: #fff;
  border-radius: 999px; padding: 9px 13px; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 700; color: #07152d;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.paconu-cal-presets button:hover { background: #eafaf2; border-color: #06694f; color: #06694f; }

/* ---- Pied --------------------------------------------------------------- */
.paconu-cal-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid rgba(7, 21, 45, .08);
}
.paconu-cal-sel { font-size: 13px; font-weight: 600; color: #8d96a5; text-align: center; flex: 1; }
.paconu-cal-sel.on { color: #5d6676; }
.paconu-cal-sel b { color: #07152d; font-weight: 800; }
.paconu-cal-clear {
  border: 0; background: none; cursor: pointer; padding: 8px 0;
  font-family: inherit; font-size: 13.5px; font-weight: 700; color: #5d6676;
  text-decoration: underline; text-underline-offset: 3px;
}
.paconu-cal-clear:hover:not([disabled]) { color: #07152d; }
.paconu-cal-clear[disabled] { opacity: .4; cursor: default; text-decoration: none; }
.paconu-cal-ok {
  border: 0; cursor: pointer;
  background: #06694f; color: #fff;
  font-family: inherit; font-size: 14px; font-weight: 800;
  padding: 11px 26px; border-radius: 999px;
  box-shadow: none;
  transition: background .12s ease;
}
.paconu-cal-ok:hover { background: #055840; }

/* ---- Téléphone : feuille par le bas -------------------------------------- */
.paconu-cal-back {
  position: fixed; inset: 0; z-index: 2147482999;
  background: rgba(7, 21, 45, .38);
}
html.paconu-cal-locked, html.paconu-cal-locked body { overflow: hidden; }

.paconu-cal-pop.is-sheet {
  left: 0 !important; right: 0 !important; bottom: 0 !important; top: auto !important;
  width: auto !important; max-width: none;
  border-radius: 24px 24px 0 0;
  border: 0;
  padding: 8px 16px 0;
  max-height: 88vh;
  display: flex; flex-direction: column;
  box-shadow: 0 -12px 40px rgba(7, 21, 45, .22);
}
.paconu-cal-pop.is-sheet:before {
  content: ''; display: block; width: 40px; height: 4px; border-radius: 2px;
  background: rgba(7, 21, 45, .15); margin: 4px auto 12px; flex: 0 0 auto;
}
.paconu-cal-pop.is-sheet .paconu-cal-top { flex: 0 0 auto; }
.paconu-cal-pop.is-sheet .paconu-cal-months {
  grid-template-columns: 1fr; gap: 24px;
  overflow: auto; -webkit-overflow-scrolling: touch;
  flex: 1 1 auto; min-height: 0; padding-bottom: 6px;
}
.paconu-cal-pop.is-sheet .paconu-cal-presets {
  flex: 0 0 auto; flex-wrap: nowrap; overflow: auto;
  margin: 0 -16px; padding: 14px 16px 0;
}
.paconu-cal-pop.is-sheet .paconu-cal-presets button { flex: 0 0 auto; }
.paconu-cal-pop.is-sheet .paconu-cal-presets::-webkit-scrollbar { display: none; }
.paconu-cal-pop.is-sheet .paconu-cal-foot {
  flex: 0 0 auto; margin: 0 -16px;
  padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
  background: #fff;
}
.paconu-cal-pop.is-sheet .paconu-cal-sel { display: none; }
.paconu-cal-pop.is-sheet .paconu-cal-ok { flex: 1; text-align: center; margin-left: 12px; }
