/* HDF public refresh 2026-08-28.
   Chargé après hdf.css pour arbitrer les anciennes couches compatibles. */

/* Le master est RGBA : aucune tuile, ombre ou contour CSS autour du logo. */
.site-header .brand-mark,
.site-footer .brand-mark,
body.home-viewport .brand-mark {
  object-fit: contain;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  filter: none !important;
}

/* Six captures réelles, six compositions volontairement différentes. */
body.home-viewport #home-panel-vitrines .showcase-demo-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: clamp(9px, 1vw, 15px);
}

body.home-viewport #home-panel-vitrines .showcase-demo-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 0;
  box-shadow: 0 14px 34px color-mix(in srgb, var(--ink) 10%, transparent);
}

body.home-viewport #home-panel-vitrines .showcase-demo-card::before { display: none; }

body.home-viewport #home-panel-vitrines .showcase-demo-link {
  position: relative;
  z-index: 1;
  min-height: 0;
  text-decoration: none;
}

body.home-viewport #home-panel-vitrines .showcase-demo-miniature {
  align-self: stretch;
  min-height: 0;
  aspect-ratio: auto;
  border: 0;
  box-shadow: none;
}

body.home-viewport #home-panel-vitrines .showcase-demo-miniature::after {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

body.home-viewport #home-panel-vitrines .showcase-demo-card > ul {
  position: relative;
  z-index: 2;
  flex-wrap: nowrap;
  overflow: hidden;
  border: 0;
}

body.home-viewport #home-panel-vitrines .showcase-demo-card > ul li {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Marketplace / catalogue. */
body.home-viewport #home-panel-vitrines .is-commerce {
  border-radius: 24px 8px 24px 8px;
  background: #eaf2ff;
}

body.home-viewport #home-panel-vitrines .is-commerce .showcase-demo-link {
  grid-template-columns: minmax(0, 1.45fr) minmax(145px, 0.72fr);
  grid-template-rows: minmax(0, 1fr);
  padding: 9px;
  gap: 12px;
}

body.home-viewport #home-panel-vitrines .is-commerce .showcase-demo-miniature {
  border-radius: 17px 5px 17px 5px;
}

body.home-viewport #home-panel-vitrines .is-commerce .showcase-demo-content {
  align-content: end;
  padding: 10px 8px 7px 0;
}

body.home-viewport #home-panel-vitrines .is-commerce > ul {
  justify-content: flex-end;
  padding: 4px 10px 9px;
}

/* Dispatch d'intervention : capture plein fond. */
body.home-viewport #home-panel-vitrines .is-services {
  border-radius: 8px;
  background: #071d2a;
  color: #fff;
}

body.home-viewport #home-panel-vitrines .is-services .showcase-demo-link {
  display: block;
  padding: 0;
  color: #fff;
}

body.home-viewport #home-panel-vitrines .is-services .showcase-demo-miniature {
  position: absolute;
  inset: 0;
  border-radius: 0;
}

body.home-viewport #home-panel-vitrines .is-services .showcase-demo-miniature::after {
  background: linear-gradient(90deg, rgba(4, 22, 32, 0.97), rgba(4, 22, 32, 0.68) 48%, rgba(4, 22, 32, 0.1));
  box-shadow: none;
}

body.home-viewport #home-panel-vitrines .is-services .showcase-demo-content {
  position: relative;
  z-index: 1;
  width: min(59%, 310px);
  height: 100%;
  padding: clamp(15px, 1.7vw, 25px);
  align-content: center;
}

body.home-viewport #home-panel-vitrines .is-services .showcase-demo-content :is(small, strong, span) { color: #fff; }
body.home-viewport #home-panel-vitrines .is-services .showcase-demo-content b { color: #071d2a; background: #71e3dc; border-color: transparent; }
body.home-viewport #home-panel-vitrines .is-services > ul { justify-content: flex-start; padding: 7px 10px; color: #fff; background: #071d2a; }
body.home-viewport #home-panel-vitrines .is-services > ul li { color: #dffaf7; background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.16); }

/* Portfolio artisan : manifeste puis photographie matière. */
body.home-viewport #home-panel-vitrines .is-artisan {
  border-radius: 0 26px 0 26px;
  background: #f2e8da;
}

body.home-viewport #home-panel-vitrines .is-artisan .showcase-demo-link {
  grid-template-columns: minmax(135px, 0.72fr) minmax(0, 1.28fr);
  grid-template-rows: minmax(0, 1fr);
  padding: 0;
  gap: 0;
}

body.home-viewport #home-panel-vitrines .is-artisan .showcase-demo-miniature { grid-column: 2; grid-row: 1; border-radius: 0 26px 0 0; }
body.home-viewport #home-panel-vitrines .is-artisan .showcase-demo-content { grid-column: 1; grid-row: 1; align-content: center; padding: clamp(14px, 1.6vw, 24px); }
body.home-viewport #home-panel-vitrines .is-artisan > ul { padding: 7px 12px; background: #3a2a21; }
body.home-viewport #home-panel-vitrines .is-artisan > ul li { color: #fff3e4; border-color: rgba(255,255,255,.14); background: transparent; }

/* Restaurant : capture ronde comme une assiette, informations menu à droite. */
body.home-viewport #home-panel-vitrines .is-restaurant {
  border-radius: 999px 26px 26px 999px;
  background: #fff4e8;
}

body.home-viewport #home-panel-vitrines .is-restaurant .showcase-demo-link {
  grid-template-columns: minmax(125px, 0.78fr) minmax(0, 1.22fr);
  grid-template-rows: minmax(0, 1fr);
  padding: 10px 16px 10px 10px;
  gap: 15px;
}

body.home-viewport #home-panel-vitrines .is-restaurant .showcase-demo-miniature {
  border: 5px solid #fff;
  border-radius: 50%;
  box-shadow: 0 9px 24px rgba(113, 42, 30, 0.18);
}

body.home-viewport #home-panel-vitrines .is-restaurant .showcase-demo-content { align-content: center; }
body.home-viewport #home-panel-vitrines .is-restaurant > ul { justify-content: flex-end; padding: 3px 18px 8px 28%; }

/* Événement : affiche verticale dans une scène sombre. */
body.home-viewport #home-panel-vitrines .is-events {
  border-radius: 14px;
  background: linear-gradient(135deg, #110b2e, #32127a);
}

body.home-viewport #home-panel-vitrines .is-events .showcase-demo-link {
  grid-template-columns: minmax(110px, 0.62fr) minmax(0, 1.38fr);
  grid-template-rows: minmax(0, 1fr);
  padding: 10px;
  gap: 15px;
  color: #fff;
}

body.home-viewport #home-panel-vitrines .is-events .showcase-demo-miniature { border-radius: 6px; }
body.home-viewport #home-panel-vitrines .is-events .showcase-demo-miniature img { object-position: 10% top; }
body.home-viewport #home-panel-vitrines .is-events .showcase-demo-content { align-content: end; padding: 8px 6px 8px 0; }
body.home-viewport #home-panel-vitrines .is-events .showcase-demo-content :is(small, strong, span) { color: #fff; }
body.home-viewport #home-panel-vitrines .is-events .showcase-demo-content b { color: #160c32; background: #ff75b8; border-color: transparent; }
body.home-viewport #home-panel-vitrines .is-events > ul { padding: 7px 10px; background: rgba(0,0,0,.18); }
body.home-viewport #home-panel-vitrines .is-events > ul li { color: #f4eaff; border-color: rgba(255,255,255,.15); background: rgba(255,255,255,.08); }

/* Hub vidéo : grand écran puis barre de chaîne horizontale. */
body.home-viewport #home-panel-vitrines .is-information {
  border-radius: 26px 26px 8px 8px;
  background: #090e18;
  color: #fff;
}

body.home-viewport #home-panel-vitrines .is-information .showcase-demo-link {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 8px;
  gap: 6px;
  color: #fff;
}

body.home-viewport #home-panel-vitrines .is-information .showcase-demo-miniature { grid-row: 1; border-radius: 19px 19px 5px 5px; }
body.home-viewport #home-panel-vitrines .is-information .showcase-demo-content { grid-row: 2; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: center; gap: 0 10px; padding: 4px 5px; }
body.home-viewport #home-panel-vitrines .is-information .showcase-demo-content small { grid-column: 1; grid-row: 1 / 3; color: #65e6d7; }
body.home-viewport #home-panel-vitrines .is-information .showcase-demo-content strong { grid-column: 2; grid-row: 1; color: #fff; font-family: var(--font-sans); font-size: clamp(14px, 1.25vw, 19px); font-weight: 750; }
body.home-viewport #home-panel-vitrines .is-information .showcase-demo-content span { grid-column: 2; grid-row: 2; color: #aebcd0; }
body.home-viewport #home-panel-vitrines .is-information .showcase-demo-content b { grid-column: 3; grid-row: 1 / 3; color: #fff; border-color: #6572ff; background: #6572ff; }
body.home-viewport #home-panel-vitrines .is-information > ul { justify-content: flex-start; padding: 6px 12px; background: #111a2b; }
body.home-viewport #home-panel-vitrines .is-information > ul li { color: #dce6f5; border-color: #2b3850; background: #172338; }

/* Communauté : coque fixe ; seule la bulle du mur peut défiler. */
html:has(> body.community-page) { width: 100%; height: 100%; overflow: hidden; }

body.community-page {
  width: 100%;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  min-height: 0;
  max-height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  overscroll-behavior: none;
}

body.community-page > .site-header,
body.community-page > .site-footer { position: relative; z-index: 20; flex: none; }

body.community-page > .community-stage {
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: clamp(8px, 1.35vh, 14px) clamp(10px, 2vw, 30px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(7px, 1vh, 11px);
  overflow: hidden;
  scrollbar-gutter: auto;
}

body.community-page .community-hero {
  width: 100%;
  max-width: none;
  min-height: 0;
  margin: 0;
  padding: clamp(10px, 1.5vh, 16px) clamp(16px, 2.2vw, 30px);
  grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(18px, 3vw, 50px);
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(8, 20, 37, 0.13);
}

body.community-page .community-hero::before { right: -75px; bottom: -170px; width: 290px; height: 290px; }
body.community-page .community-hero .kicker { margin: 0 0 4px; font-size: 8px; }
body.community-page .community-hero h1 { max-width: 780px; margin: 0; font-size: clamp(25px, 2.55vw, 42px); line-height: .98; }
body.community-page .community-hero-copy > p:last-of-type { max-width: 760px; margin-top: 6px; font-size: clamp(9px, .85vw, 12px); line-height: 1.4; }
body.community-page .community-hero-actions { margin-top: 4px; gap: 8px; }
body.community-page .community-hero-actions .quiet-link { min-height: 24px; font-size: 9px; }

body.community-page .community-trust { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
body.community-page .community-trust article { min-height: 0; padding: 9px 10px 9px 34px; border-radius: 12px; }
body.community-page .community-trust article > .community-trust-mark { top: 11px; left: 12px; width: auto; height: auto; font-size: 9px; }
body.community-page .community-trust h2 { margin: 0 0 2px; font-size: 10px; }
body.community-page .community-trust p { font-size: 8px; line-height: 1.3; }

body.community-page .community-wall-section {
  width: 100%;
  max-width: none;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--blue) 18%, var(--line));
  border-radius: clamp(20px, 2vw, 30px);
  background: color-mix(in srgb, var(--surface-elevated) 94%, transparent);
  box-shadow: 0 16px 42px color-mix(in srgb, var(--ink) 10%, transparent);
}

body.community-page .community-wall-heading {
  min-height: 52px;
  padding: 8px clamp(14px, 1.7vw, 24px);
  grid-template-columns: minmax(0, 1fr) minmax(240px, .8fr);
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

body.community-page .community-wall-heading .kicker { margin: 0; font-size: 7px; }
body.community-page .community-wall-heading h2 { margin: 1px 0 0; font-size: clamp(20px, 1.8vw, 29px); }
body.community-page .community-wall-meta { gap: 2px; }
body.community-page .community-wall-meta > p:last-child { margin: 0; font-size: 8px; }
body.community-page .community-source-status { min-height: 26px; margin: 0; padding: 5px 9px 5px 25px; font-size: 8px; }
body.community-page .community-source-status::before { left: 9px; }

body.community-page .community-wall-layout {
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 260px);
  align-items: stretch;
  gap: 10px;
  overflow: hidden;
}

body.community-page .community-wall-main {
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--blue) 56%, var(--line)) transparent;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
}

/* Les états masqués restent réellement hors rendu. La feuille historique
   attribue un display:grid à ces blocs, ce qui ne doit jamais neutraliser
   l'attribut HTML hidden pendant le chargement du mur. */
body.community-page [data-community-state][hidden],
body.community-page [data-community-feed][hidden] {
  display: none !important;
}

/* Les contenus métier viennent du serveur et peuvent comporter des noms ou
   titres longs. Chaque niveau accepte donc de rétrécir et replie le texte,
   sans jamais élargir le panneau ni le viewport mobile. */
body.community-page .community-publication,
body.community-page .community-publication-head,
body.community-page .community-publication-copy,
body.community-page .community-publisher,
body.community-page .community-publisher-meta,
body.community-page .community-engagement,
body.community-page .community-comments,
body.community-page .community-comment,
body.community-page .community-sharing {
  min-width: 0;
  max-width: 100%;
}

body.community-page .community-publication-copy h2,
body.community-page .community-publication-body,
body.community-page .community-publisher-name,
body.community-page .community-comment-body,
body.community-page .community-comment-meta,
body.community-page .community-sharing-label {
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}

body.community-page .community-wall-main::-webkit-scrollbar { width: 8px; }
body.community-page .community-wall-main::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 999px; background: color-mix(in srgb, var(--blue) 56%, var(--line)); background-clip: padding-box; }
body.community-page .community-feed { min-height: 0; padding: 9px; overflow: visible; grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.community-page .community-state { min-height: 100%; border: 0; border-radius: 17px; box-shadow: none; }

body.community-page .community-participation {
  position: static;
  top: auto;
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: clamp(13px, 1.5vw, 20px);
  overflow: hidden;
  border-radius: 18px;
}

body.community-page .community-participation h2 { font-size: clamp(22px, 2vw, 30px); }
body.community-page .community-participation > p:not(.community-aside-kicker) { margin: 8px 0 10px; font-size: 9px; line-height: 1.4; }
body.community-page .community-participation .button { min-height: 36px; font-size: 9px; }
body.community-page .community-participation ul { margin-top: 8px; padding-top: 4px; }
body.community-page .community-participation li { padding: 5px 0 5px 13px; font-size: 8px; }
body.community-page .community-participation li::before { top: 9px; }

body.community-page .community-business-cta {
  width: 100%;
  min-height: 45px;
  margin: 0;
  padding: 6px clamp(14px, 1.7vw, 24px);
  gap: 16px;
  border-radius: 0;
  box-shadow: none;
}

body.community-page .community-business-cta > div { min-width: 0; max-width: none; display: flex; align-items: baseline; gap: 11px; }
body.community-page .community-business-cta .kicker { flex: 0 0 auto; font-size: 7px; }
body.community-page .community-business-cta h2 { flex: 0 0 auto; margin: 0; font-family: var(--font-sans); font-size: 13px; font-weight: 800; }
body.community-page .community-business-cta p:last-child { min-width: 0; margin: 0; overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
body.community-page .community-business-cta .button { min-height: 32px; padding-inline: 11px; font-size: 8px; }

body.community-page > .site-footer { min-height: 38px; padding: 0 clamp(12px, 2vw, 30px); border-top: 1px solid var(--line); background: var(--surface-elevated); }
body.community-page > .site-footer .footer-main { display: none; }
body.community-page > .site-footer .footer-bottom { min-height: 38px; padding: 0; align-items: center; border: 0; font-size: 8px; }

@media (max-width: 1180px) {
  body.home-viewport #home-panel-vitrines .showcase-demo-grid {
    grid-template-columns: repeat(3, minmax(360px, 1fr));
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: inline proximity;
  }
}

@media (max-width: 900px) {
  body.community-page .community-hero { grid-template-columns: minmax(230px, .85fr) minmax(0, 1.15fr); }
  body.community-page .community-trust p { display: none; }
  body.community-page .community-wall-layout { grid-template-columns: minmax(0, 1fr) minmax(180px, 215px); }
  body.community-page .community-feed { grid-template-columns: 1fr; }
  body.community-page .community-participation li span { display: none; }
}

@media (max-width: 680px) {
  body.community-page .community-stage { padding: 7px; gap: 6px; }
  body.community-page .community-hero { padding: 8px 10px; grid-template-columns: 1fr; gap: 6px; border-radius: 14px; }
  body.community-page .community-hero .kicker,
  body.community-page .community-hero-copy > p:last-of-type,
  body.community-page .community-hero-actions { display: none; }
  body.community-page .community-hero h1 { font-family: var(--font-sans); font-size: 17px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
  body.community-page .community-trust { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  body.community-page .community-trust article { padding: 6px 5px 6px 19px; border-radius: 8px; }
  body.community-page .community-trust article > .community-trust-mark { top: 7px; left: 7px; font-size: 7px; }
  body.community-page .community-trust h2 { overflow: hidden; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
  body.community-page .community-wall-section { border-radius: 15px; }
  body.community-page .community-wall-heading { min-height: 42px; padding: 6px 10px; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
  body.community-page .community-wall-heading .kicker,
  body.community-page .community-wall-meta > p:last-child { display: none; }
  body.community-page .community-wall-heading h2 { font-size: 16px; }
  body.community-page .community-source-status { max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.community-page .community-wall-layout { padding: 6px; grid-template-columns: minmax(0, 1fr); }
  body.community-page .community-participation { display: none; }
  body.community-page .community-feed { grid-template-columns: 1fr; padding: 6px; }
  body.community-page .community-state { min-height: 100%; padding: 14px; }
  body.community-page .community-business-cta { min-height: 39px; padding: 4px 8px; }
  body.community-page .community-business-cta .kicker,
  body.community-page .community-business-cta p:last-child { display: none; }
  body.community-page .community-business-cta h2 { font-size: 10px; }
  body.community-page .community-business-cta .button { min-height: 30px; }
  body.community-page > .site-footer .footer-bottom { justify-content: center; }
  body.community-page > .site-footer .footer-bottom > div { display: none; }

  body.home-viewport #home-panel-vitrines .showcase-demo-grid {
    grid-auto-flow: column;
    grid-auto-columns: minmax(310px, 88vw);
    grid-template-columns: none;
    grid-template-rows: repeat(2, minmax(185px, 1fr));
    overflow-x: auto;
    overflow-y: hidden;
  }
  body.home-viewport #home-panel-vitrines .showcase-demo-content span { display: none; }
  body.home-viewport #home-panel-vitrines .is-restaurant { border-radius: 100px 20px 20px 100px; }
}

@media (max-height: 680px) {
  body.community-page .community-hero-copy > p:last-of-type,
  body.community-page .community-hero-actions,
  body.community-page .community-trust p,
  body.community-page .community-participation > p:not(.community-aside-kicker),
  body.community-page .community-participation li span { display: none; }
  body.community-page .community-hero { padding-block: 7px; }
  body.community-page .community-wall-layout { padding-block: 6px; }
}

@media (forced-colors: active) {
  body.home-viewport #home-panel-vitrines .showcase-demo-card,
  body.community-page .community-hero,
  body.community-page .community-wall-section,
  body.community-page .community-wall-main,
  body.community-page .community-participation {
    border: 2px solid CanvasText;
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
  }
}
