:root {
  --bg: #05070d;
  --bg-soft: #0d1320;
  --surface: rgba(14, 20, 32, 0.92);
  --surface-strong: #141b29;
  --text: #e7ecf8;
  --text-muted: #9cacbf;
  --primary: #4f8cff;
  --primary-strong: #2f6bf1;
  --accent: #13c3d8;
  --border: rgba(156, 171, 194, 0.22);
  --shadow: 0 20px 45px rgba(2, 5, 12, 0.5);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(19, 195, 216, 0.14), transparent 28%),
    radial-gradient(circle at 92% 16%, rgba(79, 140, 255, 0.16), transparent 32%),
    linear-gradient(135deg, #05070d 0%, #0b101b 65%, #0f1624 100%);
  line-height: 1.6;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.user-banner {
  display: none;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.95), rgba(6, 182, 212, 0.95));
  color: #fff;
  padding: 0.7rem 1.2rem;
  text-align: center;
  font-weight: 600;
}
.user-banner a { color: #fff; text-decoration: underline; }

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(3, 6, 12, 0.96);
  border-bottom: 1px solid rgba(156, 171, 194, 0.2);
}

body.site-shell {
  padding-top: clamp(164px, 18vw, 220px);
}
.navbar {
  width: min(1800px, calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto;
  grid-template-areas:
    "brand search quick"
    "links links links";
  align-items: center;
  padding: 0.65rem 0;
  gap: 1rem;
}
.navbar-left { grid-area: brand; }
.logo-link { display: inline-flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.logo { display: none; }
.logo-link::after {
  content: "";
  width: 260px;
  height: 72px;
  background: url("../images/logos/jp-digital-badge.svg") center / contain no-repeat;
  display: inline-block;
}

.navbar-search {
  grid-area: search;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  background: rgba(22, 26, 36, 0.95);
  border: 1px solid rgba(156, 171, 194, 0.25);
  border-radius: 8px;
  padding: 0.35rem 0.45rem;
}
.navbar-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  padding: 0.5rem 0.4rem;
}
.navbar-search input::placeholder { color: #aebad0; }
.navbar-search button {
  border: 0;
  background: transparent;
  color: #aebad0;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.3rem 0.4rem;
}

.navbar-search-preview {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 0;
  right: 0;
  display: grid;
  gap: 0.35rem;
  padding: 0.55rem;
  background: rgba(10, 15, 25, 0.98);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  z-index: 380;
}

.navbar-search-preview[hidden] {
  display: none;
}

.navbar-search-preview-item {
  display: grid;
  gap: 0.15rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  text-decoration: none;
  background: rgba(19, 28, 43, 0.82);
  border: 1px solid transparent;
}

.navbar-search-preview-item:hover,
.navbar-search-preview-item:focus-visible {
  border-color: rgba(79, 140, 255, 0.5);
  background: rgba(32, 45, 69, 0.95);
}

.navbar-search-preview-item strong {
  color: var(--text);
  font-size: 0.94rem;
}

.navbar-search-preview-item span {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.navbar-search-preview-empty {
  padding: 0.7rem 0.8rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.navbar-quick-actions {
  grid-area: quick;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.navbar-quick-actions .quick-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: 1px solid rgba(156, 171, 194, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #e7ecf8;
  background: rgba(22, 26, 36, 0.96);
  font-size: 1.2rem;
}
.navbar-quick-actions .quick-icon:hover {
  background: rgba(79, 140, 255, 0.2);
  border-color: rgba(79, 140, 255, 0.55);
}

.navbar-quick-actions .quick-icon.is-disabled {
  cursor: default;
  opacity: 0.72;
}
.navbar-quick-actions .quick-chevron {
  color: #c4d0e6;
  font-size: 1rem;
  user-select: none;
}

.navbar-links {
  grid-area: links;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.25rem;
  width: 100%;
  background: rgba(41, 44, 53, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.45rem 0.55rem;
  border-radius: 4px;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow: visible;
}
.navbar-dropdown {
  position: relative;
  z-index: 220;
}
.navbar-dropdown .dropdown-toggle {
  text-decoration: none;
  color: var(--text);
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.navbar-dropdown .dropdown-toggle::after {
  content: '▼';
  font-size: 0.68rem;
  line-height: 1;
  opacity: 0.85;
}
.navbar-dropdown .dropdown-toggle:hover,
.navbar-dropdown .dropdown-toggle:focus-visible,
.navbar-dropdown.is-open .dropdown-toggle,
.navbar-dropdown.is-active .dropdown-toggle {
  background: rgba(79, 140, 255, 0.16);
  color: #dbe7ff;
  transform: translateY(-1px);
}
.dropdown-content {
  position: absolute;
  top: calc(100% + 1.25rem);
  left: 0;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  background: rgba(12, 18, 29, 0.98);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 0.45rem;
  z-index: 360;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}
.dropdown-content a {
  color: var(--text);
  text-decoration: none;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
}
.dropdown-content a:hover,
.dropdown-content a:focus-visible {
  background: rgba(79, 140, 255, 0.16);
  color: #dbe7ff;
}
.navbar-dropdown:hover .dropdown-content,
.navbar-dropdown:focus-within .dropdown-content,
.navbar-dropdown.is-open .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.navbar-dropdown:hover,
.navbar-dropdown:focus-within,
.navbar-dropdown.is-open {
  z-index: 320;
}
.navbar-links a,
.navbar-links .cta-header {
  text-decoration: none;
  color: var(--text);
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.navbar-links a:hover,
.navbar-links a:focus-visible,
.navbar-links .cta-header:hover,
.navbar-links .cta-header:focus-visible {
  background: rgba(79, 140, 255, 0.16);
  color: #dbe7ff;
  transform: translateY(-1px);
}
.navbar-links .cta-header,
.navbar-links .cta-primary {
  background: linear-gradient(90deg, #c90000, #ff2b2b);
  color: #fff;
  font-weight: 700;
  flex: 0 0 auto;
}
.navbar-links .cta-header:hover,
.navbar-links .cta-primary:hover {
  color: #fff;
  box-shadow: 0 12px 24px rgba(201, 0, 0, 0.35);
}

.navbar-links #navCartLink,
.navbar-links #navAccountLink {
  display: none;
}
.nav-toggle {
  display: none;
  border: 0;
  background: var(--surface-strong);
  padding: 0.65rem;
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
  border-radius: 999px;
}
.top-info-bar {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  padding: 0.35rem 1rem 0.7rem;
  color: #b8c6dc;
  font-size: 0.85rem;
}

.top-info-bar.notice-ticker {
  overflow: hidden;
  position: relative;
  display: block;
  white-space: nowrap;
  padding: 0.55rem 0;
  background: linear-gradient(90deg, #0f1729 0%, #1b2842 62%, #16253d 100%);
  border-top: 1px solid rgba(240, 106, 33, 0.42);
  border-bottom: 1px solid rgba(79, 140, 255, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), inset 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.top-info-bar.notice-ticker .ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 1.75rem;
  width: max-content;
  min-width: max-content;
  will-change: transform;
  animation: topInfoTickerScroll 95s linear infinite;
}

.top-info-bar.notice-ticker .ticker-item {
  color: #f3f7ff;
  font-size: 0.92rem;
  font-weight: 700;
  opacity: 0.98;
  text-shadow: 0 1px 0 rgba(6, 10, 18, 0.55);
  position: relative;
  padding-right: 0.25rem;
}

.top-info-bar.notice-ticker .ticker-item.is-priority {
  color: #ffd7bf;
  font-weight: 800;
}

.top-info-bar.notice-ticker .ticker-item::after {
  content: '•';
  color: #f06a21;
  margin-left: 1rem;
  opacity: 0.9;
}

@keyframes topInfoTickerScroll {
  from { transform: translateX(100%); }
  to { transform: translateX(-100%); }
}

main { flex: 1; }
.page-hero,
.section-shell,
.footer {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
}
.page-hero {
  padding: 4.2rem 0 2rem;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.8rem;
  align-items: center;
}
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.84rem;
  margin: 0 0 0.8rem;
}
.hero-title {
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.1;
  margin: 0 0 1rem;
}
.hero-subtitle {
  font-size: 1.06rem;
  color: var(--text-muted);
  max-width: 660px;
  margin: 0 0 1.4rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 1.2rem;
}
.cta,
.cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cta {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.2);
}
.cta-secondary {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
}
.cta:hover,
.cta-secondary:hover,
.cta:focus-visible,
.cta-secondary:focus-visible {
  transform: translateY(-2px);
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  color: var(--text-muted);
}
.hero-badges span {
  background: rgba(19, 27, 42, 0.9);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-size: 0.92rem;
}
.hero-card {
  padding: 1.25rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(18, 27, 42, 0.96), rgba(13, 21, 34, 0.96));
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.hero-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.8rem;
}
.hero-card li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  color: var(--text-muted);
}
.hero-card li strong { color: var(--text); }
.hero-card .card-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 0.45rem;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  flex-shrink: 0;
}

/* Legacy light blocks forced to dark surface across pages */
body.site-shell .guide-sidebar,
body.site-shell .step-card,
body.site-shell .troubleshoot-card,
body.site-shell .problem-card,
body.site-shell .filter-box,
body.site-shell .category-card,
body.site-shell .product-card,
body.site-shell .product-modal-content,
body.site-shell .service-card,
body.site-shell .process-card,
body.site-shell .pricing-table,
body.site-shell .tip-card,
body.site-shell .tips-grid > div,
body.site-shell .config-summary,
body.site-shell .preset-card,
body.site-shell .component-option {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text);
}

body.site-shell .pricing-table td,
body.site-shell .pricing-table th,
body.site-shell .summary-item.label,
body.site-shell .service-body p,
body.site-shell .process-card p,
body.site-shell .step-card p,
body.site-shell .troubleshoot-card p {
  color: var(--text-muted);
}

body.site-shell .download-btn,
body.site-shell .action-buttons .secondary {
  background: rgba(79, 140, 255, 0.14) !important;
  color: var(--primary) !important;
  border-color: rgba(79, 140, 255, 0.5) !important;
}

body.site-shell a[style*="background: white"],
body.site-shell button[style*="background: white"] {
  background: rgba(79, 140, 255, 0.14) !important;
  color: var(--primary) !important;
  border-color: rgba(79, 140, 255, 0.5) !important;
}

body.site-shell div[style*="background: white"] {
  background: var(--surface) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

body.site-shell [style*="color: #333"],
body.site-shell [style*="color:#333"] {
  color: var(--text) !important;
}

body.site-shell [style*="color: #666"],
body.site-shell [style*="color:#666"],
body.site-shell [style*="color: #555"],
body.site-shell [style*="color:#555"],
body.site-shell [style*="color: #777"],
body.site-shell [style*="color:#777"],
body.site-shell [style*="color: #999"],
body.site-shell [style*="color:#999"],
body.site-shell [style*="color: #4b5563"],
body.site-shell [style*="color:#4b5563"],
body.site-shell [style*="color: #6b7280"],
body.site-shell [style*="color:#6b7280"] {
  color: var(--text-muted) !important;
}

/* Affiche/print page kept white by its dedicated stylesheet: force dark look on web */
body.site-shell .sheet,
body.site-shell .sheet .hero,
body.site-shell .sheet .card,
body.site-shell .sheet .notes .col {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

body.site-shell .sheet .brand h1,
body.site-shell .sheet .hero h2,
body.site-shell .sheet .card h3 {
  color: var(--text) !important;
}

body.site-shell .sheet .brand p,
body.site-shell .sheet .hero p,
body.site-shell .sheet .footer,
body.site-shell .sheet .card ol,
body.site-shell .sheet .notes .col .notes-list {
  color: var(--text-muted) !important;
}

/* Admin page dark fallback overrides */
body.admin-body {
  background:
    radial-gradient(circle at 12% 14%, rgba(79, 140, 255, 0.16) 0, transparent 26%),
    radial-gradient(circle at 84% 8%, rgba(19, 195, 216, 0.14) 0, transparent 24%),
    linear-gradient(135deg, #05070d 0%, #0b101b 65%, #0f1624 100%) !important;
  color: var(--text) !important;
}

body.admin-body .card,
body.admin-body .view,
body.admin-body .stats-grid article,
body.admin-body .dashboard-hero-shell article,
body.admin-body .dashboard-grid article,
body.admin-body .intervention-workspace article,
body.admin-body .module-shell,
body.admin-body .module-subcard {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

.stats-grid,
.features-grid,
.process-grid,
.testimonials-grid,
.contact-grid {
  display: grid;
  gap: 1.15rem;
}
.stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 1rem 0 2rem; }
.stat-card,
.feature-card,
.process-card,
.testimonial-card,
.contact-card,
.info-card,
.filter-panel,
.catalog-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}
.stat-card strong { display: block; font-size: 1.6rem; color: var(--primary); }
.stat-card span { color: var(--text-muted); }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.section-head h2 { margin: 0; font-size: clamp(1.35rem, 2vw, 1.8rem); }
.see-all { color: var(--primary); font-weight: 700; text-decoration: none; }

.features-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 2rem 0; }
.feature-card h3 { margin-top: 0; margin-bottom: 0.5rem; }
.feature-card p { margin: 0; color: var(--text-muted); }

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.product-card {
  background: var(--surface-strong);
  border-radius: 18px;
  border: 1px solid var(--border);
  padding: 1rem;
  box-shadow: 0 12px 28px rgba(2, 5, 12, 0.42);
}
.product-card h3 { margin: 0.55rem 0 0.3rem; font-size: 1.05rem; }
.product-card p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }
.product-card a { color: var(--primary); font-weight: 700; text-decoration: none; }

.process-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 2rem 0; }
.process-card .step-number {
  display: inline-flex;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 700;
  margin-bottom: 0.7rem;
}

.testimonials-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 2rem 0; }
.testimonial-card blockquote { margin: 0 0 1rem; color: var(--text-muted); }
.testimonial-card strong { display: block; }

.faq-list { display: grid; gap: 0.8rem; margin-top: 1rem; }
.faq-item { background: rgba(16, 24, 38, 0.9); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.faq-item button {
  width: 100%; border: 0; background: transparent; text-align: left; padding: 1rem 1.1rem; font-weight: 700; color: var(--text); cursor: pointer;
}
.faq-item .faq-answer { display: none; padding: 0 1.1rem 1rem; color: var(--text-muted); }
.faq-item.is-open .faq-answer { display: block; }

.contact-grid { grid-template-columns: 0.9fr 1.1fr; margin: 2rem 0 3rem; }
.contact-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
.contact-form-label,
.contact-field-spaced { display: flex; flex-direction: column; gap: 0.4rem; }
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 14px; padding: 0.85rem 1rem; background: rgba(10, 15, 25, 0.92); color: var(--text); }
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1rem; }
.contact-note { color: var(--text-muted); }
.contact-note-warning { color: #b45309; }
.contact-map-card { margin-top: 1rem; }
.contact-map-frame iframe { width: 100%; min-height: 240px; border: 0; border-radius: 16px; }

.footer {
  padding: 2rem 0 2.5rem;
  color: var(--text-muted);
}
.footer-top { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1rem 0; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: 0.95rem; border-top: 1px solid var(--border); padding-top: 1rem; }

[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 960px) {
  .hero-grid,
  .contact-grid,
  .features-grid,
  .process-grid,
  .testimonials-grid,
  .footer-top { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .navbar {
    grid-template-columns: auto auto;
    grid-template-areas:
      "brand toggle"
      "search search";
  }
  .navbar-left { grid-area: brand; }
  .nav-toggle { grid-area: toggle; justify-self: end; }
  .navbar-search { grid-area: search; }
  .navbar-quick-actions { display: none; }
  .logo-link::after { width: 210px; height: 58px; }
  .navbar-links {
    position: absolute;
    top: 100%;
    left: 1rem;
    right: 1rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    background: rgba(12, 18, 29, 0.98);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
  }
  .navbar-links #navCartLink,
  .navbar-links #navAccountLink {
    display: inline-flex;
  }
  .navbar-links.is-open { display: flex; }
  .navbar-dropdown {
    width: 100%;
  }
  .dropdown-content {
    position: static;
    min-width: 0;
    margin-top: 0.35rem;
    border-radius: 12px;
  }
  .navbar { position: relative; }
  .top-info-bar { justify-content: flex-start; }
  .hero-actions,
  .contact-form-actions { flex-direction: column; align-items: stretch; }
  .contact-form-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
}
