/* ============================================================
   Radio MLK — page agenda « Sortir à Malakoff » (lot 3, 16/10/2026)
   Traduction fidèle de la page Bricks 10156 relevée le 16/10/2026 (CSS post-10156, règles de base de Bricks
   pour section / container / div / image, CSS additionnel de WordPress qui forçait .brxe-shortcode et
   .brxe-container à 100 % sans marge à gauche).
   Toutes les règles sont limitées aux sections de la page : la navigation sans rechargement (mlk-nav.js)
   garde cette feuille chargée quand on quitte l'agenda.
   Points de bascule de Bricks : 478 px (mobile portrait).
   Référence : claude code/references/site-public-2026-10-16/ (bricks/lagenda-des-evenements-a-malakoff.json).
   ============================================================ */

/* ── Fond de la page (réglage « fond du site » de la page dans Bricks) ── */
html:has(.mlk-pa-s) { background-color: #212121; }
body:has(.mlk-pa-s) { background: none; }

/* ── Base commune (ce que Bricks donnait à tout le site, limité à la page) ── */
.mlk-pa-ban, .mlk-pa-s {
  font-family: -apple-system, "system-ui", "Segoe UI", roboto, helvetica, arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  font-size: 15px; line-height: 1.7; color: #363636;
}
:where(.mlk-pa-ban, .mlk-pa-s) *, :where(.mlk-pa-ban, .mlk-pa-s) *::before, :where(.mlk-pa-ban, .mlk-pa-s) *::after { box-sizing: border-box; }
/* :where() garde la priorité faible de la règle Bricks « img » (sinon elle écrase la hauteur de la bannière) */
:where(.mlk-pa-ban, .mlk-pa-s) img { border-style: none; height: auto; max-width: 100%; vertical-align: middle; }

/* ── Bannière (masquée sur téléphone, comme dans Bricks) ── */
.mlk-pa-ban {
  display: flex; flex-direction: column; flex-wrap: nowrap; align-items: flex-start;
  margin-left: auto; margin-right: auto; width: 100%; max-width: 100%;
}
.mlk-pa-ban-c {
  display: flex; flex-direction: column; flex-wrap: nowrap; align-items: flex-start;
  margin-left: 0; margin-right: auto; padding-left: 0; width: 100%; max-width: 100%;
}
.mlk-pa-ban-sc { width: 100%; max-width: 100%; margin-left: 0; padding-left: 0; }
.mlk-pa-ban .mlk-pub-wrap { --mlk-pub-h: 280px; }

/* ── Section de l'agenda ── */
.mlk-pa-s {
  display: flex; flex-direction: column; flex-wrap: nowrap; align-items: center;
  margin: -2px auto 20px; width: 100%; max-width: 100%;
}
/* Titre « Sortir à Malakoff » (image) */
.mlk-pa-titre-c {
  display: flex; flex-direction: column; flex-wrap: nowrap; align-items: flex-start;
  margin-top: 28px; margin-left: 0; margin-right: auto; padding-left: 0; width: 100%; max-width: 100%; /* plus d air sous la bannière (Emmanuel, 21/10/2026 ; 10px avant) */
}
.mlk-pa-titre { max-width: 100%; }
.mlk-pa-titre img { width: 100svh; } /* réglage Bricks : largeur = hauteur de l'écran, plafonnée à la colonne */
/* Liste des événements ([agenda_page]) */
.mlk-pa-liste-c {
  display: flex; flex-direction: column; flex-wrap: nowrap; align-items: flex-start;
  margin-left: 0; margin-right: auto; padding-left: 0; width: 100%; max-width: 100%;
}
.mlk-pa-liste { display: flex; margin-top: 20px; max-width: 100%; width: 100%; } /* largeur explicite : les cartes (container-type) n ont pas de largeur propre, sur téléphone la liste tombait à 0 (21/10/2026) */
.mlk-pa-liste-sc {
  width: 100%; max-width: 100%; margin-left: 0; padding-left: 0;
  color: #e0e0e0; font-family: "IBM Plex Sans Condensed"; font-weight: 300;
}
.mlk-pa-liste-sc #mlk-agenda {
  --mlk-ag-date-bg         : #D20658;
  --mlk-ag-date-color      : #f6f6f6;
  --mlk-ag-date-size       : 25px;
  --mlk-ag-date-size-m     : 11px;
  --mlk-ag-title-color     : #f6f6f6;
  --mlk-ag-title-size      : 28px;
  --mlk-ag-title-size-m    : 18px;
  --mlk-ag-time-color      : #D20658;
  --mlk-ag-time-size       : 20px;
  --mlk-ag-time-size-m     : 20px;
  --mlk-ag-loc-color       : #aaaaaa;
  --mlk-ag-loc-size        : 15px;
  --mlk-ag-loc-size-m      : 13px;
  --mlk-ag-meta-mb         : 8px;
  --mlk-ag-loc-hover-color : #f6f6f6;
  --mlk-ag-desc-color      : #cccccc;
  --mlk-ag-desc-size       : 15px;
  --mlk-ag-desc-size-m     : 14px;
  --mlk-ag-link-color      : #D20658;
  --mlk-ag-event-bg        : #212121;
  --mlk-ag-border          : rgba(255,255,255,0.1);
  --mlk-ag-proposed-size   : 18px;
  --mlk-ag-proposed-size-m : 14px;
  --mlk-ag-proposed-mt     : 13px;
  --mlk-ag-separator-w     : 4px;
  --mlk-ag-separator-w-m   : 4px;
  --mlk-ag-time-loc-gap    : 18px;
}

/* ── Mobile paysage de Bricks : sections et conteneurs passent à la ligne ── */
@media (max-width: 767px) {
  .mlk-pa-ban, .mlk-pa-ban-c, .mlk-pa-s, .mlk-pa-titre-c, .mlk-pa-liste-c { flex-wrap: wrap; }
}

/* ── Téléphone (mobile portrait de Bricks) ── */
@media (max-width: 478px) {
  .mlk-pa-ban { display: none; margin-top: 20px; }
  .mlk-pa-s { flex-direction: row; row-gap: 20px; }
  .mlk-pa-titre-c { margin-top: 20px; margin-bottom: 20px; }
  .mlk-pa-liste-sc { margin-top: -39px; font-size: 18px; padding-top: 0; }
}

/* ── Bandeau de date sur téléphone (16/10/2026, demande d'Emmanuel) ──
   « VENDREDI, 16 OCTOBRE 2026 » en 25 px sur une ligne débordait de 27 px à 375 px (déjà le cas avec Bricks) :
   la taille suit la largeur de l'écran (21 px à 375 px, 18 px à 320 px) ; la date la plus longue
   (« MERCREDI, 30 SEPTEMBRE 2026 ») tient encore à 320 px ; au-delà, coupure par « … » plutôt que débordement. */
@media (max-width: 478px) {
  .mlk-pa-s .mlk-ag-day-label {
    font-size: min(var(--mlk-ag-date-size, 25px), 5.6vw);
    flex-shrink: 1; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  }
}
