/* ETHNOS R607 — Événements : bandeau outils compact + zone événements bleu profond continue.
   Périmètre strict : vue Événements uniquement. Les fonds Culture/Solidarité/Entraide R605 restent intacts. */

:root{
  --r607-events-deep:#061822;
  --r607-events-tools:#0a202b;
  --r607-events-line:rgba(101,191,202,.16);
}

/* 1. Toute la vue Événements reste bleu profond hors bandeau outils. */
html.ethnosConnectedUnified body .memberWorkspace.hasBodyView[data-body-view="events"]{
  background:var(--r607-events-deep) !important;
  background-image:none !important;
}
html body .bodyView-events.r561EventsHub{
  min-height:100% !important;
  background:var(--r607-events-deep) !important;
  background-image:none !important;
}
html body .bodyView-events.r561EventsHub > .bodyViewContent.r561EventsContent{
  display:grid !important;
  grid-template-rows:auto minmax(0,1fr) !important;
  align-content:stretch !important;
  gap:0 !important;
  width:100% !important;
  min-height:100% !important;
  margin:0 !important;
  padding:0 !important;
  background:var(--r607-events-deep) !important;
  background-image:none !important;
}

/* 2. Le seul bandeau plus clair contient titre, bouton et filtres. */
html body .bodyView-events.r561EventsHub .r605EventsControls{
  display:grid !important;
  grid-template-columns:max-content max-content !important;
  justify-content:start !important;
  align-items:center !important;
  gap:clamp(18px,1.6vw,30px) !important;
  width:100% !important;
  margin:0 !important;
  padding:clamp(14px,1.15vw,20px) clamp(18px,2vw,36px) !important;
  box-sizing:border-box !important;
  border:0 !important;
  border-radius:0 !important;
  background:var(--r607-events-tools) !important;
  box-shadow:none !important;
}
html body .bodyView-events.r561EventsHub .r605EventsDiscovery{
  width:max-content !important;
  min-width:0 !important;
  max-width:none !important;
  margin:0 !important;
  padding:0 !important;
}
html body .bodyView-events.r561EventsHub .r605EventsTitleLine{
  display:flex !important;
  align-items:center !important;
  flex-wrap:nowrap !important;
  gap:clamp(12px,1vw,18px) !important;
  width:max-content !important;
}
html body .bodyView-events.r561EventsHub .r605EventsTitleLine > strong{
  font-size:clamp(25px,1.55vw,32px) !important;
}
html body .bodyView-events.r561EventsHub .r605EventsTitleLine > button{
  min-height:38px !important;
  padding-inline:14px !important;
}
html body .bodyView-events.r561EventsHub .r605EventsDiscovery > p{
  max-width:520px !important;
  margin:6px 0 0 !important;
}
html body .bodyView-events.r561EventsHub .r605EventsDiscovery .r561EventsCount{
  margin-top:5px !important;
}

/* 3. Filtres courts, groupés près du bouton orange. */
html body .bodyView-events.r561EventsHub .r605EventsFilters{
  justify-self:start !important;
  display:grid !important;
  grid-template-columns:150px 145px 145px 190px !important;
  align-items:end !important;
  gap:9px !important;
  width:max-content !important;
  max-width:none !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}
html body .bodyView-events.r561EventsHub .r605EventsFilters label{
  width:auto !important;
  min-width:0 !important;
  margin:0 !important;
}
html body .bodyView-events.r561EventsHub .r605EventsFilters label > span{
  font-size:7px !important;
}
html body .bodyView-events.r561EventsHub .r605EventsFilters input,
html body .bodyView-events.r561EventsHub .r605EventsFilters select{
  width:100% !important;
  min-width:0 !important;
  min-height:36px !important;
  box-sizing:border-box !important;
  font-size:9px !important;
}
html body .bodyView-events.r561EventsHub .r605EventsFilters .isSearch{
  grid-column:auto !important;
}

/* 4. Les cartes reviennent immédiatement dans le bleu profond, qui se prolonge jusqu'en bas. */
html body .bodyView-events.r561EventsHub .r605EventTimeline{
  display:grid !important;
  grid-template-columns:repeat(auto-fill,minmax(min(100%,360px),520px)) !important;
  justify-content:start !important;
  align-content:start !important;
  align-items:stretch !important;
  gap:12px !important;
  width:100% !important;
  min-height:max(420px,58vh) !important;
  margin:0 !important;
  padding:clamp(18px,1.6vw,28px) clamp(18px,2vw,36px) 120px !important;
  box-sizing:border-box !important;
  background:var(--r607-events-deep) !important;
  background-image:none !important;
}

/* 5. Adaptation des formats Ethnos : on rapproche, on ne renvoie jamais les filtres à droite. */
@media (max-width:1707px){
  html body .bodyView-events.r561EventsHub .r605EventsControls{
    gap:18px !important;
  }
  html body .bodyView-events.r561EventsHub .r605EventsFilters{
    grid-template-columns:138px 132px 132px 172px !important;
    gap:8px !important;
  }
  html body .bodyView-events.r561EventsHub .r605EventsTitleLine > strong{
    font-size:clamp(24px,1.65vw,29px) !important;
  }
  html body .bodyView-events.r561EventsHub .r605EventsTitleLine > button{
    padding-inline:12px !important;
  }
}

@media (max-width:1366px){
  html body .bodyView-events.r561EventsHub .r605EventsControls{
    grid-template-columns:max-content max-content !important;
    gap:14px !important;
    padding:14px 18px !important;
  }
  html body .bodyView-events.r561EventsHub .r605EventsFilters{
    grid-template-columns:126px 120px 120px 158px !important;
    gap:7px !important;
  }
  html body .bodyView-events.r561EventsHub .r605EventsTitleLine{
    gap:10px !important;
  }
  html body .bodyView-events.r561EventsHub .r605EventsTitleLine > strong{
    font-size:24px !important;
  }
  html body .bodyView-events.r561EventsHub .r605EventsTitleLine > button{
    min-height:36px !important;
    padding-inline:10px !important;
    font-size:9px !important;
  }
  html body .bodyView-events.r561EventsHub .r605EventsDiscovery > p{
    max-width:430px !important;
  }
}

@media (max-width:1180px){
  html body .bodyView-events.r561EventsHub .r605EventsControls{
    grid-template-columns:1fr !important;
    align-items:start !important;
    gap:12px !important;
  }
  html body .bodyView-events.r561EventsHub .r605EventsDiscovery{
    width:auto !important;
  }
  html body .bodyView-events.r561EventsHub .r605EventsFilters{
    grid-template-columns:repeat(4,minmax(120px,1fr)) !important;
    width:100% !important;
  }
}

@media (max-width:760px){
  html body .bodyView-events.r561EventsHub .r605EventsTitleLine{
    align-items:flex-start !important;
    flex-direction:column !important;
    width:auto !important;
  }
  html body .bodyView-events.r561EventsHub .r605EventsFilters{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
  html body .bodyView-events.r561EventsHub .r605EventTimeline{
    min-height:460px !important;
    padding-bottom:96px !important;
  }
}
