/* Agenda : listes d'événements, fiche d'un événement, cartes. Valeurs relevées sur l'ancien site. */

.cerm-muted { color: #8a8a8a; }
.cerm-events-page { padding-top: 0; }
.cerm-events-head { margin: 0 auto 10px; max-width: 1180px; text-align: center; }   /* titres et liste des événements à venir centrés (demande du 12 octobre 2026) */
.cerm-events-head .cerm-page__title { margin: 22px 0 14px; }
.cerm-upcoming { list-style: none; margin: 0 0 24px; padding: 0; line-height: 1.2; text-transform: uppercase; font-size: 12px; }
.cerm-upcoming li { margin: 0 0 6px; }
.cerm-upcoming small { color: #8a8a8a; }

.cerm-switch { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 22px; margin: 0 auto 26px; max-width: 760px; }
.cerm-switch .cerm-btn { min-width: 128px; }

.cerm-tagbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 auto 18px; max-width: 1180px; }
.cerm-tagbar > div { flex: 1 1 110px; background: #d9edf7; padding: 5px; text-align: center; line-height: 20px; font-size: 13px; }
.cerm-tagbar > div.is-current { background: var(--cerm-secondary); }
.cerm-tagbar > div.is-current a { color: #fff; }

.cerm-eventsearch { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 auto 18px; max-width: 1180px; }
.cerm-eventsearch input[type=search] { flex: 1 1 220px; min-width: 0; padding: 9px 12px; border: 1px solid #c9d3df; border-radius: 2px; font: inherit; color: #444; }
.cerm-clear { font-size: 13px; }
/* Recherche dynamique (assets/js/livesearch.js) : plus de bouton « Rechercher », les résultats suivent la frappe. */
.cerm-eventsearch.is-live button[type=submit] { display: none; }
[data-live-results].is-loading { opacity: .5; transition: opacity .15s; cursor: progress; }
.cerm-filter-info { max-width: 1180px; margin: 0 auto 14px; }

.cerm-eventlist { list-style: none; margin: 0 auto; padding: 0; max-width: 1180px; }
.cerm-eventlist__month {
  margin: 0 0 5px; padding: 5px; font-weight: 700; font-size: 14px; line-height: 20px; color: var(--cerm-text);
  background: #d5d8e1; border-radius: 4px; box-shadow: 2px 1px 2px rgba(203, 210, 217, .9);
}
.cerm-eventlist__month span { padding: 10px; }
.cerm-eventitem {
  display: flex; gap: 20px; align-items: flex-start; margin: 0 0 40px; padding: 20px; font-size: 14px; line-height: 20px;
  background: rgba(0, 175, 239, .12); border: 1px solid var(--cerm-secondary); border-radius: 1px; box-shadow: var(--cerm-shadow);
}
.cerm-eventitem.is-featured { background: rgba(28, 35, 138, .2); }
.cerm-eventitem__image { flex: none; width: 100px; line-height: 0; }
.cerm-eventitem__image img { width: 100%; height: auto; display: block; }
.cerm-eventitem__body { flex: 1; min-width: 0; }
.cerm-eventitem__body > * { margin: 0 0 5px; }
.cerm-eventitem__title { font-size: clamp(16px, 3vw, 20px); text-transform: uppercase; line-height: 1.2; font-weight: 600; }
.cerm-eventitem__title a { text-decoration: none; }
.cerm-eventitem__meta { display: flex; flex-wrap: wrap; gap: 0 14px; }
.cerm-eventitem__summary { text-align: justify; }
/* Grille (sorties, voyages) : vignettes sur 3 colonnes comme sur l'ancien site, 2 sur tablette, 1 sur téléphone. Même balisage que la liste. */
.cerm-eventgrid { list-style: none; margin: 0 auto 30px; padding: 0; max-width: 1180px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.cerm-eventgrid .cerm-eventitem { flex-direction: column; margin: 0; padding: 22px 24px; }
.cerm-eventgrid .cerm-eventitem__image { width: 100%; max-width: 240px; align-self: center; }
.cerm-eventgrid .cerm-eventitem__body { width: 100%; flex: none; }
.cerm-eventgrid .cerm-eventitem__meta { flex-direction: column; gap: 2px; }
/* Imbrication sans vide (assets/js/eventgrid.js règle « grid-row-end: span N » sur chaque vignette). */
.cerm-eventgrid.is-masonry { grid-auto-rows: 8px; row-gap: 0; grid-auto-flow: row dense; }
@media (max-width: 991.98px) {
  .cerm-eventgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
  .cerm-eventgrid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .cerm-eventgrid .cerm-eventitem { padding: 14px; }
}
@media (max-width: 575.98px) {
  .cerm-eventitem { flex-direction: column; padding: 14px; }
  .cerm-eventitem__image { width: 96px; }
}

/* Fiche d'un événement */
.cerm-event { max-width: 1180px; }
.cerm-event__title { margin: 8px 0 22px; font-size: clamp(20px, 4vw, 28px); text-transform: uppercase; line-height: 1.2; }
.cerm-event__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-bottom: 18px; }
.cerm-dropdown { position: relative; }
.cerm-dropdown__menu { position: absolute; z-index: 30; left: 0; top: 100%; margin: 4px 0 0; padding: 6px 0; list-style: none; min-width: 260px; background: #fff; border: 1px solid #ddd; box-shadow: 0 8px 24px rgba(0, 0, 0, .15); }
.cerm-dropdown__menu[hidden] { display: none; }
.cerm-dropdown__menu a { display: block; padding: 8px 16px; font-weight: 400; color: #333; }
.cerm-dropdown__menu a:hover { background: #f0f3f8; text-decoration: none; }
.cerm-rating { display: inline-flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.cerm-rating button { background: none; border: 0; padding: 2px; font-size: 20px; color: #e19900; cursor: pointer; line-height: 1; }
@media (pointer: coarse), (max-width: 900px) { .cerm-rating button { min-width: 40px; min-height: 40px; font-size: 22px; } .cerm-rating { gap: 0; } }
.cerm-rating[data-rated="1"] button { cursor: default; }
.cerm-event__details { display: flex; gap: 28px; align-items: flex-start; margin-bottom: 14px; flex-wrap: wrap; }
.cerm-event__image { margin: 0; flex: 0 0 auto; max-width: 300px; }
.cerm-event__image img { display: block; width: 100%; height: auto; border: 1px solid #dde2ea; padding: 4px; background: #fff; }
.cerm-event__info { flex: 1 1 280px; min-width: 0; }   /* informations puis fichiers, à droite de la vignette */
.cerm-event__facts { margin: 0; }
.cerm-event__facts > div { display: flex; gap: 8px; margin: 0 0 6px; line-height: 22px; }
.cerm-event__facts dt { font-weight: 400; flex: none; color: var(--cerm-primary); }
.cerm-event__facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
/* Fichiers à télécharger : encadré sous les informations, à droite de la vignette (demande du 12 octobre 2026) ; sur écran étroit, tout s'empile. */
.cerm-event__files { margin: 14px 0 0; max-width: 520px; padding: 12px 14px; background: #f3f6fa; border: 1px solid #dde2ea; border-radius: 3px; }
/* Inscription : cadre dépliant en pleine largeur sous la vignette et les informations, replié par défaut (demande du 12 octobre 2026). */
.cerm-event__register { margin: 0 0 16px; border: 1px solid #dde2ea; border-radius: 4px; background: #f7f9fc; }
.cerm-event__register > summary { list-style: none; cursor: pointer; padding: 12px 16px; }
.cerm-event__register > summary::-webkit-details-marker { display: none; }
.cerm-event__register > summary:focus-visible { outline: 2px solid var(--cerm-secondary); outline-offset: 2px; border-radius: 4px; }
.cerm-event__register > summary h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 18px; text-transform: none; }
.cerm-event__register > summary h2 small { font-weight: 400; font-size: 14px; color: #666; }
.cerm-event__register-chevron { font-size: 14px; color: var(--cerm-primary); transition: transform .2s; }
.cerm-event__register[open] > summary .cerm-event__register-chevron { transform: rotate(90deg); }
.cerm-event__register-body { padding: 0 16px 16px; }
.cerm-event__files h2 { margin: 0 0 8px; font-size: 15px; text-transform: none; color: var(--cerm-primary); }
.cerm-event__files li { overflow-wrap: anywhere; }
.cerm-event__share { margin: 6px 0 18px; }
.cerm-share-fb { display: inline-block; background: #3b5998; color: #fff; padding: 7px 14px; border-radius: 2px; font-size: 13px; }
.cerm-share-fb:hover { color: #fff; background: #2d4373; text-decoration: none; }
.cerm-event__description { margin: 0 0 20px; }
.cerm-event__section { border-top: 1px solid #dde2ea; padding: 16px 0 6px; margin-top: 16px; }
.cerm-event__section h2 { font-size: 18px; text-transform: none; margin-bottom: 14px; }
/* Inscription avec formules (Adulte, Enfant…) : tableau des formules, nombre de places par formule, total */
.cerm-tickets { grid-column: 1 / -1; }
.cerm-tickets__table th, .cerm-tickets__table td { padding: 8px 10px; border-bottom: 1px solid #e3e7ee; vertical-align: middle; }
.cerm-tickets__table input[type=number] { width: 80px; padding: 7px 8px; border: 1px solid #c9d3df; border-radius: 2px; font: inherit; }
.cerm-tickets__table tr.is-soldout td { color: #8a8a8a; }
.cerm-tickets__total { margin: 10px 0 0; font-size: 15px; }
/* Choix du règlement (inscription payante) : visible seulement quand le total est supérieur à 0 (events.js) */
.cerm-payment { margin: 14px 0 0; padding: 12px 14px; border: 1px solid #dde2ea; border-radius: 4px; background: #fafbfe; }
.cerm-payment legend { float: left; width: 100%; margin: 0 0 8px; font-weight: 600; font-size: 14px; color: var(--cerm-dark, #222); }
.cerm-payment__choice { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 8px; cursor: pointer; }
.cerm-payment__choice input { margin-top: 4px; flex: none; }
.cerm-payment__choice small { display: block; color: #666; font-size: 13px; }
.cerm-payment.has-error { border-color: var(--cerm-danger, #b02a37); }
.cerm-tickets.has-error .cerm-tickets__table { outline: 2px solid var(--cerm-danger, #b02a37); outline-offset: 2px; }
.cerm-field__error { color: var(--cerm-danger, #b02a37); font-size: 13px; margin: 8px 0 0; }
@media (max-width: 575.98px) {
  .cerm-tickets__table th:nth-child(3), .cerm-tickets__table td:nth-child(3) { display: none; }
  .cerm-tickets__table td[data-label="Formule"] { font-weight: 600; }
}
.cerm-files { list-style: none; margin: 0; padding: 0; }
.cerm-files li { margin: 0 0 6px; }
.cerm-sponsors, .cerm-speakers { display: flex; flex-wrap: wrap; gap: 14px; list-style: none; margin: 0; padding: 0; }
.cerm-sponsors li { width: 96px; padding: 6px; background: #fff; border: 1px solid #ecefef; box-shadow: 0 1px 3px rgba(218, 221, 219, .8); }
.cerm-sponsors img { width: 100%; height: auto; display: block; }
.cerm-speaker { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 130px; padding: 8px; background: #fff; border: 1px solid #e3e7ee; cursor: pointer; font: inherit; color: var(--cerm-link); text-align: center; }
.cerm-speaker img { width: 75px; height: 100px; object-fit: cover; }
.cerm-map { width: 100%; height: 360px; border: 0; background: #e8eef4; }
.cerm-bigmap { width: 100%; height: min(70vh, 620px); background: #e8eef4; border: 1px solid #cfd7e2; }
.cerm-placelist { margin: 20px 0 0; padding-left: 18px; columns: 2 320px; }
.cerm-back { margin-top: 26px; }

/* Texte riche (contenu saisi dans l'éditeur) */
.cerm-richtext { overflow-wrap: anywhere; }
.cerm-richtext img { max-width: 100%; height: auto; }
.cerm-richtext table { width: 100%; max-width: 100%; border-collapse: collapse; }
.cerm-richtext td, .cerm-richtext th { padding: 6px 8px; vertical-align: top; }
.cerm-richtext iframe { max-width: 100%; }
.cerm-richtext p { margin: 0 0 12px; }
@media (max-width: 767.98px) {
  .cerm-richtext table { display: block; overflow-x: auto; }
  .cerm-richtext img[style*="float"] { float: none !important; display: block; margin: 8px auto !important; }
}

/* Cadre « fiche de conférencier » */
.cerm-overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(0, 0, 0, .5); display: flex; align-items: center; justify-content: center; padding: 16px; }
.cerm-overlay[hidden] { display: none; }
.cerm-overlay__box { position: relative; background: #fff; width: min(100%, 560px); max-height: 90vh; overflow: auto; padding: 22px; border-radius: 6px; }
.cerm-overlay__close { position: absolute; top: 6px; right: 10px; background: none; border: 0; font-size: 28px; line-height: 1; cursor: pointer; }
.cerm-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Vidéos et sons insérés dans la description : rien ne démarre tout seul (voir Services\EventMedia). */
.cerm-media { display: block; margin: 1.2em 0; }
.cerm-media--video iframe { display: block; max-width: 100%; }
.cerm-media--audio audio { display: block; width: 100%; max-width: 420px; }
.cerm-media-print { display: block; margin: 0.4em 0; }
