/* Hub MVP my.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;
  /* 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;
}

.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);
}

.hub-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  justify-content: stretch;
  width: 100%;
}

.hub-nav__item {
  margin: 0;
  flex: 1 1 0;
  min-width: 0;
}

/* Carrés colorés + favicon : toute la largeur du hub-shell */
.hub-nav__btn {
  --btn-brand: #031b3d;
  font: inherit;
  cursor: pointer;
  border: none;
  border-radius: 0;
  width: 100%;
  aspect-ratio: 1;
  max-height: min(22vw, 5rem);
  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;
}

.hub-shell--main {
  padding: 0 0 3rem;
}

/* Bandeau logo : même couleur que le bouton actif, collé sous la barre (aucun espace) */
.vitrine-hero--flush {
  background: var(--hero-bar);
  margin: 0;
  padding: 0 0 0.125rem;
  text-align: center;
  border: none;
}

.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;
}

.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: 48rem;
  margin: 0 auto;
}

.vitrine-body {
  padding: 1.75rem 1.25rem 0;
}

.vitrine-panel {
  display: none;
}

.vitrine-panel.is-active {
  display: block;
}

.vitrine-body p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  max-width: 65ch;
}

.vitrine-body p:last-child {
  margin-bottom: 0;
}

.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);
}
