.cmr-year-hub{
  display:grid;
  gap:16px;
  margin:16px 0 22px;
}

.cmr-hub-top{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:14px;
}

/* Évite les débordements dans les thèmes à colonne (GeneratePress, etc.) */
.cmr-year-hub,
.cmr-hub-top,
.cmr-hub-card,
.cmr-hub-map,
.cmr-map-frame{
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
}

.cmr-hub-card,
.cmr-event,
.cmr-gallery,
.cmr-form-wrap{
  border:1px solid #d9e0ea;
  border-radius:14px;
  padding:16px;
  background:#fff;
  box-shadow:0 6px 22px rgba(17, 24, 39, 0.05);
}

.cmr-hub-card h3{
  margin:0 0 8px;
}

.cmr-hub-agenda{
  background:linear-gradient(135deg,#f6f9ff 0%,#e8f1ff 100%);
  border-color:#bfdbfe;
}
.cmr-hub-agenda h3{color:#1e40af;}

.cmr-hub-photos{
  background:linear-gradient(135deg,#f2f8ff 0%,#dbeafe 100%);
  border-color:#93c5fd;
}
.cmr-hub-photos h3{color:#1d4ed8;}

.cmr-hub-map{
  background:linear-gradient(135deg,#eff6ff 0%,#cfe3ff 100%);
  border-color:#60a5fa;
}
.cmr-hub-map h3{color:#1e3a8a;}


.cmr-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:8px 16px;
  border-radius:10px;
  border:1px solid #1d4ed8;
  background:#1d4ed8;
  color:#fff;
  text-decoration:none;
  font-weight:600;
}
.cmr-btn:hover,
.cmr-btn:focus{
  color:#fff;
  border-color:#1e40af;
  background:#1e40af;
}

.cmr-hub-agenda .cmr-btn{
  background:#2563eb;
  border-color:#2563eb;
}
.cmr-hub-agenda .cmr-btn:hover,
.cmr-hub-agenda .cmr-btn:focus{
  background:#1d4ed8;
  border-color:#1d4ed8;
}

.cmr-hub-photos .cmr-btn{
  background:#1d4ed8;
  border-color:#1d4ed8;
}
.cmr-hub-photos .cmr-btn:hover,
.cmr-hub-photos .cmr-btn:focus{
  background:#1e40af;
  border-color:#1e40af;
}

.cmr-hub-map .cmr-btn{
  background:#1e40af;
  border-color:#1e40af;
}
.cmr-hub-map .cmr-btn:hover,
.cmr-hub-map .cmr-btn:focus{
  background:#1e3a8a;
  border-color:#1e3a8a;
}

.cmr-filter{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
  gap:8px;
  margin:0 0 16px;
}
.cmr-filter input,
.cmr-filter select,
.cmr-filter button{
  min-height:40px;
  padding:7px 10px;
  border-radius:10px;
  border:1px solid #ccd6e2;
  background:#fff;
}

.cmr-event-list{display:grid;gap:8px;margin-bottom:14px;}
.cmr-event{
  position:relative;
  padding:12px 14px;
  line-height:1.3;
}
.cmr-event h3{
  margin:0 0 6px;
  line-height:1.2;
}

/* Icône “stylo” (édition) à côté du titre d'événement */
.cmr-edit-pencil{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-left:8px;
  text-decoration:none;
  vertical-align:middle;
}
.cmr-edit-pencil .dashicons{
  width:18px;
  height:18px;
  font-size:18px;
  line-height:18px;
}
.cmr-event:target{
  border-color:#2563eb;
  box-shadow:0 0 0 3px rgba(37, 99, 235, 0.18);
}

.cmr-section-title{
  margin:16px 0 10px;
  padding:8px 12px;
  border-left:4px solid #1d4ed8;
  background:#f4f8ff;
  border-radius:8px;
  font-size:1.15rem;
}

.cmr-meta{font-size:.93rem;color:#334155;margin:0 0 4px;line-height:1.25;}
.cmr-share{font-size:.9rem;margin-top:6px;line-height:1.25;}
.cmr-share a{margin-right:10px;}
.cmr-more{
  font-weight:600;
}

.cmr-excerpt{
  margin-top:4px;
  text-align:justify;
}
.cmr-excerpt p{
  margin:0 0 6px;
  line-height:1.35;
}
.cmr-excerpt p:last-child{
  margin-bottom:0;
}

.cmr-event-practical{
  margin:4px 0 8px;
  padding:8px 10px;
  border:1px solid #e2e8f0;
  border-radius:10px;
  background:#f8fbff;
}
.cmr-event-practical .cmr-meta:last-child{margin-bottom:0;}
.cmr-event-description{
  margin-top:8px;
  padding-top:8px;
  border-top:1px dashed #dbe5f0;
}
.cmr-event-description:empty{display:none;}

.cmr-thumb-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(120px,1fr));
  gap:8px;
  margin-top:8px;
}
.cmr-thumb-grid img{
  width:100%;height:120px;object-fit:cover;border-radius:8px;
}

.cmr-map{
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  height:560px;
  border-radius:12px;
  overflow:hidden;
  margin:14px 0;
  border:1px solid #d0d7e3;
}

.cmr-map-picker-wrap{
  border:1px solid #d6dde8;
  border-radius:12px;
  padding:12px;
  background:#f8fafc;
}
.cmr-map-picker{height:360px;margin:8px 0 4px;}

.cmr-help{
  margin:0 0 6px;
  color:#334155;
  font-size:.92rem;
}

.cmr-form{display:grid;gap:10px;}
.cmr-form label{display:grid;gap:6px;font-weight:600;}
.cmr-form input,
.cmr-form textarea,
.cmr-form select,
.cmr-form button{
  min-height:40px;
  padding:8px 10px;
  border:1px solid #ccd6e2;
  border-radius:10px;
  background:#fff;
}
.cmr-form textarea{min-height:120px;}
.cmr-form button{
  background:#0f766e;
  border-color:#0f766e;
  color:#fff;
  font-weight:700;
}
.cmr-form button:hover,
.cmr-form button:focus{
  background:#0c5f5a;
  border-color:#0c5f5a;
}

.cmr-form .cmr-row{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
  gap:10px;
}

.cmr-success{
  padding:10px 12px;
  background:#edf8ef;
  border:1px solid #b7e0bd;
  border-radius:8px;
}

.cmr-error-box,
.cmr-inline-error{
  padding:10px 12px;
  background:#fff1f2;
  border:1px solid #fecdd3;
  color:#9f1239;
  border-radius:8px;
}
.cmr-inline-error{
  margin:8px 0 0;
  font-size:.92rem;
}

.cmr-ads{margin:14px 0;}

@media(max-width:768px){
  .cmr-map{height:430px;}
  .cmr-map-picker{height:320px;}
}


.cmr-toolbar{display:flex;justify-content:flex-end;align-items:center;margin:0 0 12px;gap:10px;flex-wrap:wrap;}
.cmr-submit-inline{margin:0 0 16px;}
.cmr-btn{display:inline-flex;align-items:center;justify-content:center;padding:9px 13px;border-radius:10px;border:1px solid #1f4f8f;background:#20579c;color:#fff;text-decoration:none;font-weight:600;font-size:14px;}
.cmr-btn:hover{background:#18457d;color:#fff;}
.cmr-btn-ics{box-shadow:0 2px 6px rgba(0,0,0,.12);}


/* Carte des événements : filtres par rubrique (logos cliquables) */
.cmr-map-type-filters{
  display:flex;
  flex-wrap:nowrap;
  gap:8px;
  margin:8px 0 10px;
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
  overflow-x:auto;
  overflow-y:hidden;
  padding:2px 2px 6px;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:thin;
}

.cmr-map-type-filter{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:4px;
  width:92px;
  min-height:72px;
  padding:7px 5px;
  border:1px solid #bfdbfe;
  border-radius:12px;
  background:rgba(255,255,255,.8);
  color:#0f172a;
  cursor:pointer;
  box-shadow:0 2px 8px rgba(30,58,138,.05);
  flex:0 0 auto;
}
.cmr-map-type-filter:hover,
.cmr-map-type-filter:focus{
  border-color:#60a5fa;
  background:#fff;
}
.cmr-map-type-filter.is-off{
  opacity:.55;
  border-color:#cbd5e1;
  background:rgba(248,250,252,.9);
}
.cmr-map-type-filter__icon{
  width:30px;
  height:30px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.cmr-map-type-filter__icon img{
  width:100%;
  height:100%;
  object-fit:contain;
  filter:none;
}
.cmr-map-type-filter__icon--empty{
  border-radius:50%;
  background:#dbeafe;
}
.cmr-map-type-filter__label{
  display:block;
  width:100%;
  font-size:11px;
  line-height:1.15;
  text-align:center;
  color:#1e293b;
}

/* Carte : rendu des icônes (fidélité) */
.leaflet-marker-icon.cmr-marker-icon-default{
  filter:drop-shadow(0 0 3px rgba(255,255,255,.92)) drop-shadow(0 3px 6px rgba(15,23,42,.30));
}
/* Pour les icônes de rubriques fournies par l’admin (souvent SVG/PNG), éviter les filtres CSS
   qui peuvent dégrader le rendu (rasterisation). */
.leaflet-marker-icon.cmr-marker-icon-custom{
  filter:none;
}

/* Popup carte : badge rubrique en bas à droite */
.cmr-map-popup-card{
  position:relative;
  min-width:220px;
  padding-right:40px;
}
.cmr-map-popup-main strong{
  display:inline-block;
  margin-bottom:2px;
}
.cmr-map-popup-type-badge{
  position:absolute;
  right:2px;
  bottom:2px;
  width:28px;
  height:28px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:8px;
  background:rgba(255,255,255,.92);
  box-shadow:0 2px 8px rgba(15,23,42,.15);
  border:1px solid rgba(148,163,184,.35);
  overflow:hidden;
}
.cmr-map-popup-type-badge img{
  width:24px;
  height:24px;
  object-fit:contain;
}

@media(max-width:768px){
  .cmr-map-type-filters{gap:6px;flex-wrap:wrap;overflow-x:visible;}
  .cmr-map-type-filter{
    width:76px;
    min-height:66px;
    padding:6px 4px;
  }
  .cmr-map-type-filter__icon{width:26px;height:26px;}
  .cmr-map-type-filter__label{font-size:10.5px;}
}


/* Agenda v2.2.17 */
.cmr-filter-agenda{grid-template-columns:repeat(auto-fit,minmax(220px,1fr));}
.cmr-filter-agenda .cmr-filter-select{cursor:pointer;}
.cmr-filter-agenda .cmr-filter-select.cmr-filter-active{border-color:#1d4ed8;background:#eff6ff;box-shadow:0 0 0 2px rgba(29,78,216,.08) inset;color:#1e3a8a;font-weight:700;}
.cmr-btn-desktop-only{display:inline-flex;}
.cmr-btn-mobile-only{display:none;}
@media (max-width: 782px){ .cmr-btn-desktop-only{display:none;} .cmr-btn-mobile-only{display:inline-flex;} }
.cmr-date-separator{grid-column:1 / -1;margin:4px 0 0;padding:8px 12px;border-left:4px solid #2563eb;background:#eff6ff;border-radius:8px;font-weight:700;color:#1e3a8a;}
.cmr-event.has-corner{padding-right:94px;}
.cmr-event-corner{position:absolute;top:10px;right:10px;width:64px;height:64px;border-radius:10px;overflow:hidden;border:1px solid #dbe5f0;background:#fff;box-shadow:0 4px 12px rgba(15,23,42,.10);display:flex;align-items:center;justify-content:center;}
.cmr-event-corner img{width:100%;height:100%;object-fit:contain;background:#fff;}
.cmr-event-corner--poster img{object-fit:cover;}
.cmr-event.has-corner-icon{padding-right:82px;}
.cmr-event-corner--icon{width:50px;height:50px;top:12px;right:12px;border:none;background:transparent;box-shadow:none;overflow:visible;}
.cmr-event-corner--icon img{padding:0;background:transparent;filter:drop-shadow(0 0 3px rgba(255,255,255,1)) drop-shadow(0 2px 5px rgba(15,23,42,.25));}


/* Recurrence UI (public event form) */
.cmr-recurring-box{
  margin:.5rem 0 1rem;
  padding:.75rem;
  border:1px solid rgba(15,23,42,.08);
  border-radius:10px;
  background:#fbfdff;
}
.cmr-checkbox{
  display:flex;
  align-items:center;
  gap:.45rem;
  font-weight:600;
}
.cmr-help-compact{
  margin:.35rem 0 0;
  font-size:.92rem;
  color:#475569;
}
.cmr-recurring-panel{
  margin-top:.65rem;
  padding-top:.65rem;
  border-top:1px dashed rgba(15,23,42,.12);
}
.cmr-recurring-list__title{
  margin:.55rem 0 .5rem;
  font-weight:600;
}
.cmr-recurring-rows{
  display:flex;
  flex-direction:column;
  gap:.55rem;
}
.cmr-recurring-row{
  display:grid;
  grid-template-columns:1.3fr 1fr 1fr auto;
  gap:.5rem;
  align-items:end;
  padding:.5rem;
  border:1px solid rgba(15,23,42,.08);
  border-radius:8px;
  background:#fff;
}
.cmr-recurring-row label{margin:0;}
.cmr-recurring-row label span{
  display:block;
  margin-bottom:.25rem;
  font-size:.85rem;
  color:#334155;
}
.cmr-recurring-row input{width:100%;}
.cmr-recurring-add,
.cmr-recurring-remove{
  border:1px solid rgba(15,23,42,.16);
  background:#fff;
  border-radius:8px;
  padding:.4rem .65rem;
  cursor:pointer;
}
.cmr-recurring-add{margin-top:.6rem;}
@media (max-width: 767px){
  .cmr-recurring-row{
    grid-template-columns:1fr;
  }
  .cmr-recurring-remove,
  .cmr-recurring-add{
    width:100%;
  }
}


/* v2.2.20 — Agenda toolbar pleine largeur + couleurs distinctes */
.cmr-agenda .cmr-toolbar{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  justify-content:stretch;
  align-items:stretch;
  gap:10px;
}
.cmr-agenda .cmr-toolbar .cmr-btn{
  width:100%;
  min-height:46px;
  text-align:center;
}
.cmr-btn-add-event{background:#0f766e;border-color:#0f766e;}
.cmr-btn-add-event:hover,.cmr-btn-add-event:focus{background:#0c5f5a;border-color:#0c5f5a;}
.cmr-btn-view-map{background:#1d4ed8;border-color:#1d4ed8;}
.cmr-btn-view-map:hover,.cmr-btn-view-map:focus{background:#1e40af;border-color:#1e40af;}
.cmr-btn-print{background:#7c3aed;border-color:#7c3aed;}
.cmr-btn-print:hover,.cmr-btn-print:focus{background:#6d28d9;border-color:#6d28d9;}
.cmr-btn-ics{background:#b45309;border-color:#b45309;}
.cmr-btn-ics:hover,.cmr-btn-ics:focus{background:#92400e;border-color:#92400e;}

/* Carte des événements : bouton flottant */
.cmr-map-frame{
  position:relative;
}
.cmr-map-floating-action{
  position:absolute;
  left:12px;
  bottom:12px;
  z-index:520;
  box-shadow:0 6px 18px rgba(15,23,42,.20);
}
@media(max-width:768px){
  .cmr-map-floating-action{
    left:10px;
    right:10px;
    bottom:10px;
  }
}

/* Agenda : rendu plus professionnel des cartes d’événements */
.cmr-event-list{gap:12px;}
.cmr-event{
  border-color:#dbe5f0;
  box-shadow:0 10px 24px rgba(15,23,42,.06);
  transition:transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.cmr-event:hover{
  transform:translateY(-1px);
  box-shadow:0 14px 28px rgba(15,23,42,.10);
  border-color:#bfd3ea;
}
.cmr-event h3{
  font-size:1.08rem;
  margin:0 0 8px;
  color:#0f172a;
  padding-right:6px;
}
.cmr-event-practical{
  margin:6px 0 10px;
  padding:10px 12px;
  border-radius:12px;
  border-color:#dbe7f5;
  background:linear-gradient(180deg,#f8fbff 0%,#f4f8ff 100%);
}
.cmr-event-practical .cmr-meta{
  margin:0 0 6px;
  line-height:1.35;
}
.cmr-event-practical .cmr-meta:last-child{margin-bottom:0;}
.cmr-event-description{
  margin-top:10px;
  padding-top:10px;
  border-top:1px dashed #d5e2f0;
  color:#1f2937;
}
.cmr-event-description p{margin:0 0 8px;line-height:1.45;}
.cmr-event-description p:last-child{margin-bottom:0;}


/* Agenda : séparation description / partage */
.cmr-event-description{
  background:#ffffff;
  border:1px solid #e6eef7;
  border-radius:12px;
  padding:12px;
}
.cmr-event-share-wrap{
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid #e2e8f0;
}
.cmr-event-share-wrap .cmr-share{
  margin-top:0;
  padding:8px 10px;
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:10px;
}
