/* Hub MVP zeftik.org — barre favicons + bandeau logo collé (maquette) */

:root {
  color-scheme: dark;
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.92);
  --focus-ring: #ffd166;
  --header-bg: #020814;
  --hub-max-width: 72rem;
  /* Colonne de lecture (texte) : barre + héro alignés dessus */
  --hub-content-max: 48rem;
  /* Carré barre : Zeftik fixe + pastilles défilantes */
  --hub-nav-cell: min(15.84vw, 3.6rem);
  /* Logos bandeau héro + cartes Zeph / Zefpass : même hauteur visuelle */
  --hub-hero-logo-h: min(2.35rem, 12vw);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--vitrine-bg, #020e24);
  color: var(--text);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--focus-ring);
  color: #031b3d;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* Conteneur commun : barre + bandeau logo = même largeur, centrée, responsive */
.hub-shell {
  width: 100%;
  max-width: var(--hub-max-width);
  margin-left: auto;
  margin-right: auto;
}

.hub-shell--nav {
  padding: 0;
}

/* Barre d’icônes : même largeur centrée que .vitrine-body-column + même gouttière que .vitrine-body */
.hub-shell--nav .hub-nav {
  max-width: min(var(--hub-content-max), 100%);
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-inline: 1.25rem;
  box-sizing: border-box;
}

.site-header {
  background: var(--header-bg);
  flex-shrink: 0;
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

/* Barre : Zeftik fixe + rail (chevrons + zone scroll) */
.hub-nav {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  min-height: var(--hub-nav-cell);
}

.hub-nav__pin {
  flex: 0 0 var(--hub-nav-cell);
  width: var(--hub-nav-cell);
  align-self: stretch;
}

.hub-nav__rail {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: stretch;
}

.hub-nav__scroller {
  flex: 1 1 0;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scroll-behavior: smooth;
}

.hub-nav__rail--shadow-next .hub-nav__scroller {
  box-shadow: inset -12px 0 14px -10px rgba(0, 0, 0, 0.55);
}

.hub-nav__rail--shadow-prev .hub-nav__scroller {
  box-shadow: inset 12px 0 14px -10px rgba(0, 0, 0, 0.55);
}

.hub-nav__list--scroll {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0;
  width: max-content;
  min-height: var(--hub-nav-cell);
}

.hub-nav__list--scroll .hub-nav__item {
  margin: 0;
  flex: 0 0 var(--hub-nav-cell);
  width: var(--hub-nav-cell);
}

/* Chevrons : cible large, trait fin au centre */
.hub-nav__chev {
  font: inherit;
  cursor: pointer;
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 2.75rem;
  min-width: 2.75rem;
  align-self: stretch;
  z-index: 4;
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(90deg, var(--header-bg) 0%, rgba(2, 8, 20, 0.92) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.hub-nav__chev--next {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 2.75rem;
  min-width: 2.75rem;
  background: linear-gradient(270deg, var(--header-bg) 35%, rgba(2, 8, 20, 0.55) 100%);
}

.hub-nav__chev--next[hidden],
.hub-nav__chev--prev[hidden] {
  display: none !important;
}

.hub-nav__chev:focus:not(:focus-visible) {
  outline: none;
}

.hub-nav__chev:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: -3px;
  z-index: 6;
}

/* Carrés colorés + favicon */
.hub-nav__btn {
  --btn-brand: #031b3d;
  font: inherit;
  cursor: pointer;
  border: none;
  border-radius: 0;
  width: 100%;
  height: var(--hub-nav-cell);
  min-height: var(--hub-nav-cell);
  max-height: var(--hub-nav-cell);
  aspect-ratio: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--btn-brand);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.hub-nav__icon {
  width: clamp(1.5rem, 12vw, 2.5rem);
  height: clamp(1.5rem, 12vw, 2.5rem);
  object-fit: contain;
  pointer-events: none;
}

.hub-nav__btn:hover {
  filter: brightness(1.06);
}

.hub-nav__btn:focus:not(:focus-visible) {
  outline: none;
}

.hub-nav__btn:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: -3px;
  z-index: 1;
}

/* Pas de cadre « sélection » : seule une légère intensité si besoin */
.hub-nav__btn[aria-pressed="true"] {
  filter: brightness(1.05);
}

.vitrine-main {
  flex: 1;
  margin: 0;
  --vitrine-bg: #020e24;
  --hero-bar: #031b3d;
  background: var(--vitrine-bg);
  transition: background 0.2s ease;
}

.vitrine-main[data-panel="zeftik"] {
  --vitrine-bg: #020e24;
  --hero-bar: #031b3d;
}

.vitrine-main[data-panel="zefagora"] {
  --vitrine-bg: #4a0000;
  --hero-bar: #7f0000;
}

.vitrine-main[data-panel="zefplace"] {
  --vitrine-bg: #2a0073;
  --hero-bar: #4800ff;
}

.vitrine-main[data-panel="zefcloud"] {
  --vitrine-bg: #005a99;
  --hero-bar: #0094ff;
}

.vitrine-main[data-panel="zefchat"] {
  --vitrine-bg: #001f03;
  --hero-bar: #003805;
}

.vitrine-main[data-panel="zefsat"] {
  /* Charte Zefsat #B200FF : hero = signature, fond = violet assombri (même logique que Zefplace / Zefcloud) */
  --vitrine-bg: #4d006f;
  --hero-bar: #b200ff;
}

.vitrine-main[data-panel="zeph"] {
  --vitrine-bg: #2a2408;
  --hero-bar: #bc9d00;
}

.vitrine-main[data-panel="zefpass"] {
  --vitrine-bg: #3d2108;
  --hero-bar: #c14d00;
}

.hub-shell--main {
  padding: 0 0 3rem;
}

/* Bandeau logo : même largeur centrée que le texte vitrine */
.vitrine-hero--flush {
  background: var(--hero-bar);
  margin: 0 auto;
  padding: 0 1.25rem 0.125rem;
  max-width: min(var(--hub-content-max), 100%);
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  border: none;
}

/* Mobile : barre + bandeau sur toute la largeur du hub-shell (lisibilité des pastilles) */
@media (max-width: 42rem) {
  .hub-shell--nav .hub-nav {
    max-width: none;
    padding-inline: 0;
  }

  .vitrine-hero--flush {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding-inline: 0;
  }
}

.vitrine-hero__brand {
  display: block;
}

/* Pas d’anneau au focus programmatique (chargement / changement de panneau) ; anneau charte seulement au clavier. */
.vitrine-hero__brand:focus {
  outline: none;
}

.vitrine-hero__brand:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.vitrine-hero__link {
  display: block;
  text-decoration: none;
  line-height: 0;
}

.vitrine-hero__link:focus {
  outline: none;
}

.vitrine-hero__link:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Légende sous le bandeau hero : même style que l’ancien hint, fond = corps de vitrine (--vitrine-bg) */
.vitrine-after-hero-hint {
  margin: 0;
  padding: 0.35rem 0.75rem 0.65rem;
  max-width: 28rem;
  margin-inline: auto;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
  background: var(--vitrine-bg);
  box-sizing: border-box;
}

.vitrine-after-hero-hint strong {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
}

.vitrine-hero__logo {
  /* ~un tiers de l’affichage précédent pour limiter la hauteur du hero */
  max-width: min(7.35rem, calc(100% / 3));
  width: auto;
  height: var(--hub-hero-logo-h);
  max-height: var(--hub-hero-logo-h);
  object-fit: contain;
  display: block;
  margin: 0 auto;
  vertical-align: middle;
}

.vitrine-body-column {
  max-width: var(--hub-content-max);
  margin: 0 auto;
}

.vitrine-body {
  padding: 1.75rem 1.25rem 0;
}

.vitrine-panel {
  display: none;
}

.vitrine-panel.is-active {
  display: block;
}

.vitrine-body h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 1.75rem 0 0.65rem;
  color: var(--text);
  /* Largeur alignée sur la colonne (hero + image) : la mesure est déjà bornée par .vitrine-body-column */
  max-width: 100%;
  line-height: 1.3;
}

.vitrine-body h2:first-child {
  margin-top: 0;
}

.vitrine-body p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  max-width: 100%;
}

.vitrine-body p:last-child {
  margin-bottom: 0;
}

.vitrine-manifeste-link {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.vitrine-manifeste-link a {
  font-weight: 600;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.vitrine-manifeste-link a:hover {
  color: rgba(255, 255, 255, 0.92);
}

.vitrine-manifeste-link a:focus {
  outline: none;
}

.vitrine-manifeste-link a:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Favicon "lettrine" en ouverture de vitrine */
.vitrine-dropcap-icon {
  float: left;
  width: 4.8em;
  height: 4.8em;
  margin: 0.1em 0.7em 0.35em 0;
  object-fit: contain;
  border-radius: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.14);
  padding: 0.2em;
}

.vitrine-body ul {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
  max-width: 100%;
  color: var(--text-muted);
}

.vitrine-body li {
  margin-bottom: 0.65rem;
}

.vitrine-body li:last-child {
  margin-bottom: 0;
}

.vitrine-body strong {
  color: var(--text);
  font-weight: 600;
}

.vitrine-body code {
  font-size: 0.95em;
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

/* Capture vitrine : largeur = colonne de lecture (comme le corps), hauteur auto */
.vitrine-body .vitrine-capture {
  margin: 0 0 1.25rem;
  padding: 0;
  max-width: 100%;
}

.vitrine-body .vitrine-capture img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  vertical-align: middle;
  border-radius: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-sizing: border-box;
}

.vitrine-body .vitrine-captures--dual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.62fr);
  gap: 0.9rem;
  align-items: start;
  margin: 0 0 1.25rem;
}

.vitrine-body .vitrine-captures--dual .vitrine-capture {
  margin: 0;
}

.vitrine-body .vitrine-capture__label {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.78);
}

.vitrine-body .vitrine-capture--mobile img {
  width: auto;
  max-width: min(100%, 12rem);
  max-height: 18rem;
  margin-inline: auto;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.18);
}

@media (max-width: 42rem) {
  .vitrine-body .vitrine-captures--dual {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.62fr);
    gap: 0.6rem;
  }

  .vitrine-body .vitrine-capture__label {
    font-size: 0.72rem;
  }

  .vitrine-body .vitrine-capture--mobile img {
    max-width: min(100%, 8.5rem);
    max-height: 11.5rem;
  }
}

.sat-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
  gap: 0.75rem;
  margin: 0 0 1.35rem;
}

.sat-card {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.18);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.sat-card__icon {
  width: 2.1rem;
  height: 2.1rem;
  object-fit: contain;
  border-radius: 0.32rem;
}

.sat-card__title {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.25;
}

.sat-card__desc {
  margin: 0;
  font-size: 0.83rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.88);
}

.sat-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.sat-card__links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.7rem;
  padding: 0.16rem 0.52rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  text-decoration: none;
  color: #fff;
  font-size: 0.74rem;
  line-height: 1.2;
}

.sat-card__links a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.zeph-chat {
  margin-top: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.6rem;
  background: rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.zeph-chat__note {
  margin: 0.65rem 0 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.7);
}

.zeph-chat__note strong {
  color: rgba(255, 255, 255, 0.88);
  font-weight: 650;
}

.zeph-chat__status {
  padding: 0.32rem 0.58rem;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.zeph-chat[data-zeph-ready="true"] .zeph-chat__status {
  background: rgba(24, 127, 54, 0.18);
}

.zeph-chat__dash {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.35rem 0.45rem;
  background: rgba(255, 255, 255, 0.07);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.zeph-gauge {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.45rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.25rem 0.3rem;
  text-align: center;
}

.zeph-gauge__label {
  margin: 0 0 0.08rem;
  font-size: 0.6rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.2;
}

.zeph-gauge__value {
  margin: 0 0 0.16rem;
  font-size: 0.69rem;
  font-weight: 650;
  color: #fff;
}

.zeph-gauge__bar {
  height: 0.3rem;
  width: 100%;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  overflow: hidden;
}

.zeph-gauge__bar-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: #2fcc71;
  transition: width 0.2s ease, background 0.2s ease;
}

.zeph-gauge--warn .zeph-gauge__bar-fill {
  background: #f7b731;
}

.zeph-gauge--danger .zeph-gauge__bar-fill {
  background: #ff5d5d;
}

@media (max-width: 42rem) {
  .zeph-chat__dash {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .zeph-gauge {
    padding: 0.22rem 0.26rem;
  }

  .zeph-chat__actions {
    flex-wrap: wrap;
  }
}

.zeph-chat__messages {
  min-height: 15rem;
  max-height: 26rem;
  overflow: auto;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.zeph-chat__msg {
  max-width: 92%;
  border-radius: 0.55rem;
  padding: 0.55rem 0.65rem;
  font-size: 0.9rem;
  line-height: 1.4;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.zeph-chat__msg--assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.09);
}

.zeph-chat__msg--assistant p {
  margin: 0 0 0.45rem;
}

.zeph-chat__msg--assistant p:last-child {
  margin-bottom: 0;
}

.zeph-chat__msg--assistant h2,
.zeph-chat__msg--assistant h3,
.zeph-chat__msg--assistant h4 {
  margin: 0 0 0.35rem;
  line-height: 1.25;
}

.zeph-chat__msg--assistant ul {
  margin: 0 0 0.45rem 1rem;
  padding: 0;
}

.zeph-chat__msg--assistant ol {
  margin: 0 0 0.45rem 1.1rem;
  padding: 0;
}

.zeph-chat__msg--assistant code {
  font-size: 0.92em;
  padding: 0.05em 0.28em;
  border-radius: 0.2rem;
  background: rgba(255, 255, 255, 0.14);
}

.zeph-chat__msg--assistant a {
  color: #c8e4ff;
}

.zeph-chat__msg--user {
  align-self: flex-end;
  background: rgba(255, 209, 102, 0.2);
  border-color: rgba(255, 209, 102, 0.4);
}

.zeph-chat__msg--system {
  align-self: center;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.82);
  border-style: dashed;
  background: rgba(255, 255, 255, 0.04);
}

.zeph-chat__composer {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0.7rem;
  display: grid;
  gap: 0.6rem;
}

.zeph-chat__input {
  width: 100%;
  resize: vertical;
  min-height: 4.2rem;
  max-height: 12rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.55rem 0.65rem;
  font: inherit;
  color: #fff;
  background: rgba(2, 8, 20, 0.65);
}

.zeph-chat__input:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 1px;
}

.zeph-chat__actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  justify-content: flex-end;
}

.zeph-cooldown {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.45rem;
  border: 1px solid rgba(255, 209, 102, 0.45);
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.12);
}

.zeph-cooldown[hidden] {
  display: none !important;
}

.zeph-cooldown__text {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.94);
  white-space: nowrap;
}

.zeph-cooldown__bar {
  width: 2.8rem;
  height: 0.28rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.zeph-cooldown__bar-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: #ffd166;
  transition: width 0.18s linear;
}

.zeph-chat__send,
.zeph-chat__clear {
  font: inherit;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.35rem 0.85rem;
  cursor: pointer;
}

.zeph-chat__send {
  background: rgba(255, 209, 102, 0.22);
  border-color: rgba(255, 209, 102, 0.55);
}

.zeph-chat__send[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.zeph-chat__send:focus-visible,
.zeph-chat__clear:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.tool-block {
  margin-top: 1.75rem;
  padding: 1.25rem;
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Cartes outils panneau Zeftik — couleur charte + en-tête favicon + logo (même hauteur que logo héro) */
.tool-block--zeph {
  --tool-brand: #bc9d00;
  background: var(--tool-brand);
  border: 1px solid rgba(0, 0, 0, 0.2);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

.tool-block--zefpass {
  --tool-brand: #c14d00;
  background: var(--tool-brand);
  border: 1px solid rgba(0, 0, 0, 0.2);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

.tool-block--zeph .tool-block__brand,
.tool-block--zefpass .tool-block__brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  margin: -0.25rem 0 1rem;
  line-height: 0;
}

.tool-block--zeph .tool-block__favicon,
.tool-block--zeph .tool-block__logo,
.tool-block--zefpass .tool-block__favicon,
.tool-block--zefpass .tool-block__logo {
  height: var(--hub-hero-logo-h);
  width: auto;
  max-height: var(--hub-hero-logo-h);
  object-fit: contain;
  display: block;
}

.tool-block--zeph p,
.tool-block--zefpass p {
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.tool-block p {
  margin-bottom: 0.75rem;
}

.tool-block p:last-child {
  margin-bottom: 0;
}

.tool-block a {
  color: var(--text);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.tool-block--zeph a,
.tool-block--zefpass a {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.tool-block a:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

/* Sortie PWA (Retour sur la base d’historique) — overlay ; visibilité par classe (--open), pas [hidden]+flex. */
.hub-quit-layer {
  position: fixed;
  inset: 0;
  z-index: 250;
  box-sizing: border-box;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.hub-quit-layer.hub-quit-layer--open {
  display: flex !important;
}

.hub-quit-layer__backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(2, 8, 20, 0.88);
  cursor: pointer;
  pointer-events: auto;
}

.hub-quit-dialog--card {
  position: relative;
  z-index: 1;
  pointer-events: auto;
  max-width: min(22rem, calc(100vw - 2rem));
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0.75rem;
  background: #031b3d;
  color: var(--text);
  box-shadow: 0 0.5rem 2rem rgba(0, 0, 0, 0.45);
}

.hub-quit-dialog__inner {
  padding: 1.25rem 1.35rem 1.35rem;
}

.hub-quit-dialog__title {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
}

.hub-quit-dialog__text {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.hub-quit-dialog__actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

@media (min-width: 28rem) {
  .hub-quit-dialog__actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

.hub-quit-dialog__btn {
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0.55rem 1rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: var(--text);
}

.hub-quit-dialog__btn--primary {
  background: var(--focus-ring);
  color: #031b3d;
  border-color: var(--focus-ring);
}

.hub-quit-dialog__btn:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.hub-quit-hint {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 200;
  max-width: min(22rem, calc(100vw - 2rem));
  margin: 0;
  padding: 0.65rem 1rem;
  border-radius: 0.5rem;
  background: #031b3d;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.9rem;
  text-align: center;
  color: var(--text-muted);
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.35);
}

/* Aperçu image vitrine plein écran (tap/clic sur la capture). */
.hub-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  touch-action: none;
}

.hub-image-lightbox.hub-image-lightbox--open {
  display: flex !important;
}

.hub-image-lightbox__backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(2, 8, 20, 0.94);
  cursor: zoom-out;
}

.hub-image-lightbox__figure {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: min(92vw, 80rem);
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}

.hub-image-lightbox__close {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top));
  right: max(1rem, env(safe-area-inset-right));
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(2, 8, 20, 0.82);
  color: #fff;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.hub-image-lightbox__close:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.hub-image-lightbox__img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 0.6rem 2.2rem rgba(0, 0, 0, 0.55);
  background: #000;
  touch-action: none;
  cursor: zoom-in;
  transform-origin: center center;
  transition: transform 0.12s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.hub-image-lightbox__controls {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top));
  right: calc(max(1rem, env(safe-area-inset-right)) + 3.1rem);
  z-index: 2;
  display: flex;
  gap: 0.35rem;
}

.hub-image-lightbox__ctrl-btn {
  min-width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(2, 8, 20, 0.82);
  color: #fff;
  font: inherit;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.65rem;
}

.hub-image-lightbox__ctrl-btn:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Panneau Zeftik — compte / paramètres activation (V1) */
.hub-account {
  padding: 0 1.25rem 1.25rem;
}

.hub-account__guard {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: rgba(255, 209, 102, 0.14);
  border: 1px solid rgba(255, 209, 102, 0.45);
  color: var(--text);
}

.hub-account__guest,
.hub-account__settings {
  padding: 1.25rem 1rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hub-account h2 {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
  font-weight: 700;
}

.hub-account p {
  margin: 0 0 0.85rem;
  color: var(--text-muted);
}

.hub-account__lead {
  font-size: 0.95rem;
}

.hub-account__login {
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: 0.5rem;
  background: #031b3d;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.hub-account__login:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.hub-account__session {
  margin: 0 0 0.85rem;
}

.hub-account__logout {
  font-weight: 600;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.hub-account__logout:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 2px;
}

.hub-svc {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hub-svc__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.hub-svc__name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.hub-svc__status {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.12);
}

.hub-svc__status[data-status="off"] {
  background: rgba(255, 255, 255, 0.1);
}

.hub-svc__status[data-status="pending"] {
  background: rgba(255, 209, 102, 0.22);
}

.hub-svc__status[data-status="active"] {
  background: rgba(72, 187, 120, 0.25);
}

.hub-svc__status[data-status="error"] {
  background: rgba(248, 113, 113, 0.25);
}

.hub-svc__mode {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hub-svc__form {
  margin-top: 0.75rem;
}

.hub-svc__fieldset {
  margin: 0 0 0.75rem;
  padding: 0;
  border: 0;
}

.hub-svc__legend {
  margin: 0 0 0.5rem;
  font-weight: 600;
}

.hub-svc__choice {
  display: block;
  margin: 0.35rem 0;
  cursor: pointer;
}

.hub-svc__field {
  margin: 0.5rem 0;
}

.hub-svc__field label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.hub-svc__field input {
  width: 100%;
  max-width: 28rem;
  padding: 0.45rem 0.55rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
}

.hub-svc__field input:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 1px;
}

.hub-svc__submit {
  margin-top: 0.5rem;
  padding: 0.5rem 0.9rem;
  border: 0;
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.14);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

.hub-svc__submit:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.hub-settings {
  margin-top: 0.5rem;
}

.hub-settings__rail {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -0.25rem 1rem;
  padding: 0 0.25rem 0.35rem;
}

.hub-settings__tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hub-settings__tab-item {
  flex: 0 0 auto;
}

.hub-settings__tab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 0.65rem;
  background: var(--btn-brand, #031b3d);
  cursor: pointer;
}

.hub-settings__tab.is-active {
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35);
}

.hub-settings__tab:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.hub-settings__tab-icon {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  pointer-events: none;
}

.hub-settings__panel {
  margin: 0;
  padding: 1rem;
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--settings-brand, #031b3d) 42%, #020e24);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hub-settings__section-title {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.hub-settings__identity {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hub-settings__identity-lead {
  margin: 0 0 0.85rem;
  color: var(--text-muted);
}

.hub-settings__empty {
  margin: 0;
  color: var(--text-muted);
}

.hub-settings__secondary {
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0.45rem;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

.hub-settings__secondary:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.hub-nav-order__hint {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.hub-nav-order__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hub-nav-order__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.55rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.65rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  touch-action: pan-y;
  user-select: none;
}

.hub-nav-order__item.is-grabbing {
  cursor: grabbing;
}

.hub-nav-order__item.is-dragging {
  opacity: 0.92;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.hub-nav-order__favicon {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  flex-shrink: 0;
}

.hub-nav-order__logo {
  width: auto;
  max-width: 100%;
  height: 2.25rem;
  object-fit: contain;
  object-position: left center;
  justify-self: start;
}

.hub-nav-order__actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.hub-nav-order__move {
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.hub-nav-order__move:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 1px;
}

.hub-nav-order__status {
  margin: 0.65rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hub-nav-order__status--error {
  color: #ffb4b4;
}

.hub-settings__panel .hub-svc {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
