/* CEN V150.2 — cohérence de l'interface, bandeau non masquant et événements sourcés. */
:root{
  --cen152-ticker-height:46px;
  --cen152-green:#145b30;
  --cen152-green-dark:#0d4325;
  --cen152-gold:#f2c522;
  --cen152-ink:#15344d;
  --v132-side-width:292px;
  --v132-admin-topbar-h:78px;
  --v132-public-nav-h:64px;
}

/* Le bandeau reste au premier plan, mais un espace équivalent lui est réservé. */
body.has-communique-ticker{padding-bottom:calc(var(--cen152-ticker-height) + env(safe-area-inset-bottom,0px))!important}
.communique-ticker.enhanced-ticker{
  position:fixed!important;right:0!important;bottom:0!important;
  min-height:var(--cen152-ticker-height)!important;height:var(--cen152-ticker-height)!important;
  padding:6px 12px!important;gap:10px!important;z-index:5000!important;
  border-top:2px solid #c99d00!important;
  box-shadow:0 -7px 24px rgba(24,45,34,.24)!important;
  overflow:hidden!important;
}
.communique-ticker[hidden]{display:none!important}
.communique-ticker .ticker-track{min-width:0!important;line-height:1.35!important}
.communique-ticker .ticker-track span{font-size:14px!important;text-shadow:none!important}
.communique-ticker .ticker-close{
  flex:0 0 34px!important;width:34px!important;height:34px!important;min-height:34px!important;
  display:grid!important;place-items:center!important;padding:0!important;border-radius:50%!important;
  font-size:24px!important;line-height:1!important;cursor:pointer!important;
}
body.has-communique-ticker .workspace-content{padding-bottom:calc(var(--cen152-ticker-height) + 24px)!important}
body.has-communique-ticker .app-footer{margin-bottom:var(--cen152-ticker-height)!important}

/* Les commandes déjà disponibles dans la barre admin ne flottent plus sur les données. */
body.admin-layout>.floating-help,
body.admin-layout>#install-pwa-button{display:none!important}

/* Menu financier : tous les liens retrouvent la même structure visuelle. */
body.admin-layout .side-menu-search+small+div+nav{margin-top:0!important}
body.admin-layout .side-submenu a{grid-template-columns:26px minmax(0,1fr)!important}

/* Sélecteurs de langue compacts, alignés et correctement nommés pour l'accessibilité. */
.workspace-language-wrap,.public-language-wrap{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  gap:7px!important;min-width:0!important;margin:0!important;white-space:nowrap!important;
}
.workspace-language-wrap>span,.public-language-icon{flex:0 0 auto!important;font-size:18px!important;line-height:1!important}
.workspace-language-wrap .language-select,.public-language-wrap .language-select{
  width:auto!important;min-width:112px!important;max-width:150px!important;height:42px!important;
  margin:0!important;padding:7px 30px 7px 10px!important;color:#193d2a!important;background-color:#fff!important;
  border:1px solid #bfd0c1!important;border-radius:11px!important;font-weight:800!important;
}

/* Barre supérieure : une grille stable empêche les contrôles de se chevaucher. */
@media (min-width:981px){
  body.admin-layout .app-shell{display:block!important;min-height:100vh!important;padding-left:var(--v132-side-width)!important}
  body.admin-layout .side-dashboard{left:0!important;width:var(--v132-side-width)!important}
  body.admin-layout .workspace{margin:0!important;width:100%!important;min-width:0!important}
  body.admin-layout .workspace-topbar{left:var(--v132-side-width)!important;right:0!important;width:auto!important}
  body.admin-layout .workspace-content{padding-top:calc(var(--v132-admin-topbar-h) + 16px)!important}
  body.admin-layout.sidebar-collapsed .app-shell{padding-left:0!important}
  body.admin-layout.sidebar-collapsed .workspace-topbar{left:0!important}
  body.admin-layout>.communique-ticker{left:292px!important}
  body.admin-layout.sidebar-collapsed>.communique-ticker{left:0!important}
  body.admin-layout .workspace-topbar{
    display:grid!important;
    grid-template-columns:auto minmax(180px,1fr) minmax(220px,340px) minmax(132px,auto) auto!important;
    align-items:center!important;justify-content:stretch!important;gap:12px!important;
    min-height:78px!important;height:78px!important;max-height:78px!important;
    padding:10px 16px!important;overflow:visible!important;
  }
  body.admin-layout .history-controls{display:flex!important;align-items:center!important;gap:6px!important;width:auto!important;max-width:none!important}
  body.admin-layout .history-btn{
    display:grid!important;place-items:center!important;flex:0 0 42px!important;
    width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;
    padding:0!important;border-radius:12px!important;font-size:19px!important;
  }
  body.admin-layout .history-btn span{display:none!important}
  body.admin-layout .history-controls .history-top{display:none!important}
  body.admin-layout .workspace-welcome{min-width:0!important;overflow:hidden!important}
  body.admin-layout .workspace-welcome strong,body.admin-layout .workspace-welcome small{
    overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;
  }
  body.admin-layout .workspace-welcome strong{font-size:17px!important}
  body.admin-layout .workspace-welcome small{font-size:13px!important;margin-top:2px!important}
  body.admin-layout .global-search-form{width:100%!important;min-width:0!important;max-width:340px!important;margin:0!important}
  body.admin-layout .advanced-search-field{min-width:0!important;width:100%!important}
  body.admin-layout .workspace-language-wrap{justify-self:start!important}
  body.admin-layout .top-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:7px!important;min-width:0!important}
  body.admin-layout .top-actions>a,body.admin-layout .topbar-action-button{
    flex:0 0 40px!important;width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important;
  }
  body.admin-layout .topbar-search-expand{display:none!important}
  body.admin-layout .top-date{min-width:72px!important;padding-left:8px!important}
  body.admin-layout .top-date strong{font-size:16px!important}
  body.admin-layout .topbar-toggle-label{display:none!important}

  body.public-layout>.top-nav.public-nav{
    overflow:visible!important;min-height:64px!important;height:64px!important;max-height:64px!important;
    padding:7px clamp(14px,2.2vw,40px)!important;gap:5px!important;
  }
  body.public-layout{padding-top:calc(var(--v132-public-header-h) + var(--v132-public-nav-h))!important}
  body.public-layout>.top-nav.public-nav a{
    min-height:42px!important;padding:8px clamp(8px,.75vw,13px)!important;font-size:clamp(12px,.78vw,15px)!important;
  }
  body.public-layout>.top-nav.public-nav .public-language-wrap{flex:0 0 auto!important;margin-left:3px!important}
  body.public-layout>.top-nav.public-nav .public-language{min-width:105px!important;max-width:132px!important;height:42px!important}
}

@media (min-width:981px) and (max-width:1450px){
  body.admin-layout .workspace-topbar{
    grid-template-columns:auto minmax(145px,.8fr) minmax(190px,1fr) 124px auto!important;gap:8px!important;padding-inline:11px!important;
  }
  body.admin-layout .top-date{display:none!important}
  body.admin-layout .top-actions{gap:5px!important}
  body.admin-layout .top-actions>a,body.admin-layout .topbar-action-button{width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important;flex-basis:38px!important}
  body.admin-layout .workspace-language-wrap>span{display:none!important}
  body.admin-layout .workspace-language-wrap .language-select{min-width:116px!important;max-width:124px!important}
}

/* Cartes événementielles : date, lieu et source restent lisibles même sans photo. */
.cen-activity-image-link:has(.cen-activity-date-placeholder){
  display:grid!important;place-items:center!important;min-height:210px!important;
  background:linear-gradient(145deg,#0d4b29,#18703a 68%,#d7ae12)!important;text-decoration:none!important;
}
.cen-activity-date-placeholder{
  width:150px!important;aspect-ratio:1!important;border-radius:50%!important;
  display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;
  color:#fff!important;background:rgba(255,255,255,.10)!important;border:3px solid rgba(255,255,255,.78)!important;
  box-shadow:0 16px 34px rgba(0,0,0,.18)!important;text-align:center!important;
}
.cen-activity-date-placeholder strong{font-size:58px!important;line-height:.95!important;color:#fff!important}
.cen-activity-date-placeholder small{margin-top:8px!important;color:#ffe272!important;font-size:15px!important;font-weight:900!important;letter-spacing:.08em!important}
.cen-event-meta{display:flex!important;flex-wrap:wrap!important;gap:7px 14px!important;margin:12px 0!important;padding:10px 12px!important;border-radius:12px!important;background:#eef7ef!important;color:#244c32!important;font-size:14px!important;font-weight:750!important}
.cen-event-detail{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important;margin-top:20px!important}
.cen-event-detail>div{padding:13px 15px!important;border:1px solid #cddfce!important;border-radius:14px!important;background:#f5faf5!important}
.cen-event-detail small{display:block!important;color:#53705c!important;font-weight:800!important;text-transform:uppercase!important;letter-spacing:.06em!important}
.cen-event-detail strong{display:block!important;margin-top:4px!important;color:#183d27!important;font-size:16px!important}
.cen-official-source{margin-top:24px!important;padding:20px!important;border:1px solid #bcd5c0!important;border-left:6px solid var(--cen152-green)!important;border-radius:16px!important;background:#f3faf4!important}
.cen-official-source>strong{color:#123f25!important;font-size:18px!important}.cen-official-source p{color:#385947!important}
.activity-event-summary{padding:10px 12px!important;border-radius:10px!important;background:#edf7ee!important;color:#254a31!important}

@media (max-width:980px){
  body.has-communique-ticker{padding-bottom:calc(var(--cen152-ticker-height) + env(safe-area-inset-bottom,0px))!important}
  .communique-ticker.enhanced-ticker{left:0!important;height:auto!important;min-height:var(--cen152-ticker-height)!important;max-height:64px!important;padding:5px 8px!important}
  .communique-ticker.enhanced-ticker>strong{font-size:0!important;width:34px!important;height:30px!important;padding:0!important;display:grid!important;place-items:center!important}
  .communique-ticker.enhanced-ticker>strong::before{content:"CEN"!important;font-size:11px!important}
  .communique-ticker .ticker-track span{font-size:12px!important}
  body.has-communique-ticker .app-footer{margin-bottom:var(--cen152-ticker-height)!important}
  body.public-layout .floating-help{bottom:calc(var(--cen152-ticker-height) + 10px + env(safe-area-inset-bottom,0px))!important}
  body.public-layout .install-pwa-button{bottom:calc(var(--cen152-ticker-height) + 70px + env(safe-area-inset-bottom,0px))!important}
  .public-language-wrap{width:100%!important;justify-content:flex-start!important;margin-top:8px!important}
  .public-language-wrap .language-select{width:100%!important;max-width:none!important}
  .cen-event-detail{grid-template-columns:1fr!important}
}

@media print{
  body.has-communique-ticker{padding-bottom:0!important}
  .communique-ticker,.workspace-language-wrap,.public-language-wrap{display:none!important}
}
