/* YaTalent — shell mobile / PWA */
html {
  -webkit-text-size-adjust: 100%;
}

html.pwa-standalone,
html.pwa-standalone body {
  overscroll-behavior-y: none;
}

@media (max-width: 575px) {
  html.pwa-mobile-shell {
    min-height: 100%;
    min-height: 100dvh;
    background: #0d1b3e;
  }

  html.pwa-mobile-shell body {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    min-height: 100dvh;
    box-shadow: 0 0 32px rgba(0, 0, 0, 0.12);
  }

  html.pwa-mobile-shell .top-shell {
    padding-top: env(safe-area-inset-top, 0);
  }

  html.pwa-standalone .top-shell {
    padding-top: env(safe-area-inset-top, 0);
  }
}

html.pwa-standalone .nav-tabs,
html.pwa-standalone .bot-nav {
  padding-bottom: env(safe-area-inset-bottom, 0);
}

html.pwa-standalone .topbar {
  padding-top: calc(12px + env(safe-area-inset-top, 0));
}

html.pwa-install-visible .topbar,
html.pwa-install-visible .top-shell {
  margin-top: calc(44px + env(safe-area-inset-top, 0));
}

html.pwa-install-visible body.yt-mobile-app .screen.active {
  padding-top: 0;
}

#pwa-install-bar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-110%);
  width: 100%;
  max-width: 430px;
  z-index: 10000;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  padding-top: calc(10px + env(safe-area-inset-top, 0));
  background: linear-gradient(135deg, #0d1b3e 0%, #1a2f5e 100%);
  color: #fff;
  font-family: Inter, Cairo, sans-serif;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
  transition: transform 0.28s ease;
}

#pwa-install-bar.visible {
  display: flex;
  transform: translateX(-50%) translateY(0);
}

#pwa-install-bar .pwa-install-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  flex-shrink: 0;
  background: #fff;
  padding: 4px;
  object-fit: contain;
}

#pwa-install-bar .pwa-install-text {
  flex: 1;
  min-width: 0;
}

#pwa-install-bar .pwa-install-text strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

#pwa-install-bar .pwa-install-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

#pwa-install-bar button {
  border: none;
  border-radius: 16px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

#pwa-install-bar .pwa-install-go {
  background: #ad0041;
  color: #fff;
}

#pwa-install-bar .pwa-install-close {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

html.pwa-standalone #pwa-install-bar {
  display: none !important;
}

@media (min-width: 576px) {
  #pwa-install-bar {
    display: none !important;
  }
}

/* Modal guide installation */
.pwa-install-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(13, 27, 62, 0.55);
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.pwa-install-modal.open {
  display: flex;
}

.pwa-install-sheet {
  width: 100%;
  max-width: 430px;
  background: #fff;
  border-radius: 22px 22px 0 0;
  padding: 12px 20px calc(24px + env(safe-area-inset-bottom, 0));
  text-align: center;
  animation: pwaSlideUp 0.28s ease;
}

@keyframes pwaSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.pwa-install-handle {
  width: 34px;
  height: 4px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.12);
  margin: 0 auto 14px;
}

.pwa-install-sheet-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  padding: 6px;
  margin-bottom: 12px;
}

.pwa-install-sheet-title {
  font-family: Inter, Cairo, sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 6px;
}

.pwa-install-sheet-sub {
  font-family: Inter, Cairo, sans-serif;
  font-size: 14px;
  color: #6b6b6b;
  margin: 0 0 16px;
  line-height: 1.5;
}

.pwa-install-steps {
  text-align: left;
  margin: 0 0 18px;
  padding-left: 20px;
  font-family: Inter, Cairo, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: #1a1a1a;
}

.pwa-install-steps li {
  margin-bottom: 10px;
}

.pwa-install-steps strong {
  color: #ad0041;
}

html.pwa-modal-open {
  overflow: hidden;
}

/* Bouton flottant « Installer » (mobile navigateur) */
.pwa-install-fab {
  position: fixed;
  right: 14px;
  bottom: calc(78px + env(safe-area-inset-bottom, 0));
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border: none;
  border-radius: 24px;
  background: linear-gradient(135deg, #ad0041 0%, #8f0035 100%);
  color: #fff;
  font-family: Inter, Cairo, sans-serif;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 18px rgba(173, 0, 65, 0.45);
  cursor: pointer;
}

.pwa-install-fab i {
  font-size: 16px;
}

html.pwa-standalone .pwa-install-fab,
html.pwa-standalone #acc-pwa-row {
  display: none !important;
}

html.pwa-install-visible .pwa-install-fab {
  bottom: calc(78px + env(safe-area-inset-bottom, 0));
}

@media (min-width: 576px) {
  .pwa-install-fab {
    display: none !important;
  }
}

.pwa-install-sheet-primary {
  width: 100%;
  padding: 14px;
  margin-bottom: 10px;
  border: none;
  border-radius: 22px;
  background: #ad0041;
  color: #fff;
  font-family: Inter, Cairo, sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.pwa-install-sheet-close {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 22px;
  background: transparent;
  color: #6b6b6b;
  font-family: Inter, Cairo, sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

html.pwa-browser-mobile body {
  min-height: 100dvh;
}

html.pwa-standalone body.yt-mobile-app .screen.active {
  min-height: 100dvh;
}
