/* ===================================================
   BORNE IRVE Premium — main.css v2.0.0
   Thème FSE WordPress — POLYMAINT SERVICES
   =================================================== */

:root {
  --bi-bg: #07111E;
  --bi-bg-soft: #0C1726;
  --bi-card: rgba(255,255,255,0.04);
  --bi-card-solid: #112032;
  --bi-border: rgba(255,255,255,0.10);
  --bi-text: #F5F8FC;
  --bi-text-soft: rgba(245,248,252,0.88);
  --bi-text-muted: rgba(245,248,252,0.62);
  --bi-accent: #A6E22E;
  --bi-accent-2: #7ED957;
  --bi-shadow: 0 18px 44px rgba(0,0,0,0.28);
  --bi-radius-xl: 28px;
  --bi-radius-lg: 20px;
  --bi-radius-md: 14px;
}

html[data-theme="light"] {
  --bi-bg: #F7FAFC;
  --bi-bg-soft: #EDF2F7;
  --bi-card: #FFFFFF;
  --bi-card-solid: #FFFFFF;
  --bi-border: rgba(12,23,38,0.10);
  --bi-text: #0B1A2A;
  --bi-text-soft: rgba(11,26,42,0.86);
  --bi-text-muted: rgba(11,26,42,0.62);
  --bi-accent: #8CCF24;
  --bi-accent-2: #6FB51A;
  --bi-shadow: 0 18px 38px rgba(16,24,40,0.08);
}

/* === Base === */
html, body {
  background: var(--bi-bg) !important;
  color: var(--bi-text-soft);
  scroll-behavior: smooth;
}

body {
  transition: background-color .24s ease, color .24s ease;
}

body * {
  transition: background-color .24s ease, color .18s ease, border-color .24s ease, box-shadow .24s ease;
}

.wp-site-blocks,
.editor-styles-wrapper {
  background: var(--bi-bg) !important;
  color: var(--bi-text-soft);
}

/* === Typography === */
.wp-site-blocks h1,
.wp-site-blocks h2,
.wp-site-blocks h3,
.wp-site-blocks h4,
.wp-site-blocks h5,
.wp-site-blocks h6,
.wp-site-blocks .wp-block-heading,
.wp-site-blocks .wp-block-site-title,
.wp-site-blocks .wp-block-site-title a,
.wp-site-blocks .wp-block-post-title,
.wp-site-blocks .wp-block-query-title {
  color: var(--bi-text) !important;
}

.wp-site-blocks p,
.wp-site-blocks li,
.wp-site-blocks span,
.wp-site-blocks div,
.wp-site-blocks .wp-block-list,
.wp-site-blocks .wp-block-paragraph {
  color: inherit;
}

p, li, span, div {
  color: inherit;
}

a {
  color: var(--bi-text);
  text-decoration: none;
}

a:hover {
  color: var(--bi-accent);
}

/* === Header === */
header.wp-block-template-part {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(7, 17, 30, 0.85) !important;
}

html[data-theme="light"] header.wp-block-template-part {
  background: rgba(247, 250, 252, 0.9) !important;
}

.borneirve-header-sticky {
  position: relative;
}

.borneirve-phone-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--bi-border);
  background: var(--bi-card);
  color: var(--bi-text);
  transition: all .2s ease;
}

.borneirve-phone-btn:hover {
  border-color: var(--bi-accent);
  color: var(--bi-accent);
  background: rgba(166,226,46,.08);
}

.borneirve-phone-btn svg {
  width: 18px;
  height: 18px;
}

/* === Footer === */
.wp-site-blocks footer,
.wp-site-blocks footer p,
.wp-site-blocks footer li,
.wp-site-blocks footer a,
.wp-site-blocks footer .wp-block-heading {
  color: var(--bi-text-soft) !important;
}

.wp-site-blocks footer .wp-block-heading,
.wp-site-blocks footer .wp-block-site-title,
.wp-site-blocks footer strong {
  color: var(--bi-text) !important;
}

footer.wp-block-template-part {
  position: relative;
  z-index: 5;
}

/* === Sections & Cards === */
.has-bg-soft-background-color {
  background-color: var(--bi-bg-soft) !important;
}

.wp-block-separator.has-text-light-background-color,
.wp-block-separator.has-background {
  background-color: var(--bi-border) !important;
  color: var(--bi-border) !important;
  border-color: var(--bi-border) !important;
}

.borneirve-shell,
.borneirve-section-dark,
.borneirve-section-soft,
.borneirve-card,
.borneirve-hero-panel,
.borneirve-proof,
.borneirve-kpi,
.borneirve-cta-box {
  border-radius: var(--bi-radius-lg);
}

.borneirve-section-soft {
  background: var(--bi-bg-soft);
}

.borneirve-card,
.borneirve-proof,
.borneirve-kpi,
.borneirve-cta-box,
.borneirve-hero-panel {
  background: var(--bi-card);
  border: 1px solid var(--bi-border);
  box-shadow: var(--bi-shadow);
  backdrop-filter: blur(12px);
}

html[data-theme="light"] .borneirve-card,
html[data-theme="light"] .borneirve-proof,
html[data-theme="light"] .borneirve-kpi,
html[data-theme="light"] .borneirve-cta-box,
html[data-theme="light"] .borneirve-hero-panel {
  backdrop-filter: none;
  box-shadow: 0 4px 24px rgba(16,24,40,0.06);
}

.borneirve-card {
  padding: 1.5rem;
  transition: transform .2s ease, box-shadow .2s ease;
}

.borneirve-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 48px rgba(0,0,0,0.18);
}

html[data-theme="light"] .borneirve-card:hover {
  box-shadow: 0 8px 32px rgba(16,24,40,0.10);
}

.borneirve-card h3,
.borneirve-card h4,
.borneirve-proof strong,
.borneirve-kpi strong {
  color: var(--bi-text);
}

/* === Accent & Tags === */
.borneirve-accent {
  color: var(--bi-accent) !important;
}

.borneirve-muted {
  color: var(--bi-text-muted) !important;
}

.borneirve-tag {
  display: inline-flex;
  gap: .45rem;
  align-items: center;
  padding: .5rem .9rem;
  border-radius: 999px;
  background: rgba(166,226,46,.12);
  border: 1px solid rgba(166,226,46,.24);
  color: var(--bi-text);
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: .5rem;
}

.borneirve-mini-note {
  font-size: .92rem;
  color: var(--bi-text-muted);
}

/* === Grids === */
.borneirve-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.borneirve-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.borneirve-process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

/* === Hero === */
.borneirve-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 3vw, 3rem);
  border-radius: var(--bi-radius-xl);
  background:
    radial-gradient(circle at top right, rgba(166,226,46,.20), transparent 28%),
    linear-gradient(145deg, rgba(255,255,255,.03), rgba(255,255,255,.01)),
    var(--bi-bg-soft);
  border: 1px solid var(--bi-border);
  box-shadow: var(--bi-shadow);
}

html[data-theme="light"] .borneirve-hero {
  background:
    radial-gradient(circle at top right, rgba(140,207,36,.15), transparent 28%),
    linear-gradient(145deg, rgba(255,255,255,.75), rgba(255,255,255,.95)),
    var(--bi-bg-soft);
}

.borneirve-hero:before {
  content: "";
  position: absolute;
  inset: auto -10% -20% auto;
  width: 340px;
  height: 340px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(166,226,46,.20), transparent 68%);
  pointer-events: none;
}

/* === Badges === */
.borneirve-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1.2rem;
}

.borneirve-badge {
  display: inline-flex;
  align-items: center;
  padding: .4rem .8rem;
  border-radius: 999px;
  background: rgba(166,226,46,.08);
  border: 1px solid rgba(166,226,46,.18);
  color: var(--bi-text-soft);
  font-size: .82rem;
  font-weight: 500;
}

/* === Service Cards === */
.borneirve-service-card {
  display: flex;
  flex-direction: column;
}

.borneirve-service-card .borneirve-icon {
  font-size: 1.5rem;
  margin-bottom: .8rem;
}

.borneirve-check-list {
  list-style: none;
  padding: 0;
  margin: .8rem 0;
}

.borneirve-check-list li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: .4rem;
  font-size: .92rem;
  color: var(--bi-text-soft);
}

.borneirve-check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--bi-accent);
  font-weight: 700;
}

.borneirve-link-arrow {
  display: inline-block;
  margin-top: auto;
  padding-top: .8rem;
  color: var(--bi-accent) !important;
  font-weight: 600;
  font-size: .92rem;
  text-decoration: none;
}

.borneirve-link-arrow:hover {
  text-decoration: underline;
}

/* === Process Steps === */
.borneirve-step {
  position: relative;
}

.borneirve-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(166,226,46,.14);
  color: var(--bi-accent);
  font-weight: 800;
  font-size: .95rem;
  margin-bottom: .8rem;
}

/* === Trust Grid === */
.borneirve-trust-item {
  padding: 1.2rem;
}

.borneirve-trust-item strong {
  display: block;
  margin-bottom: .4rem;
  color: var(--bi-text);
}

.borneirve-trust-item p {
  font-size: .92rem;
  margin: 0;
}

/* === Zone Links === */
.borneirve-zone-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.borneirve-zone-link {
  display: inline-flex;
  align-items: center;
  padding: .4rem .9rem;
  border-radius: 999px;
  background: var(--bi-card);
  border: 1px solid var(--bi-border);
  color: var(--bi-text-soft);
  font-size: .88rem;
  font-weight: 500;
  text-decoration: none;
  transition: all .2s ease;
}

a.borneirve-zone-link:hover {
  border-color: var(--bi-accent);
  color: var(--bi-accent);
  background: rgba(166,226,46,.06);
}

/* === Icon === */
.borneirve-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(166,226,46,.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--bi-accent);
  font-weight: 800;
}

/* === Theme Toggle === */
.theme-toggle {
  appearance: none;
  border: 1px solid var(--bi-border);
  background: var(--bi-card);
  color: var(--bi-text);
  padding: .72rem .95rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
  box-shadow: var(--bi-shadow);
  font-size: 1rem;
}

.theme-toggle:hover {
  border-color: var(--bi-accent);
  color: var(--bi-accent);
}

/* === Buttons === */
.borneirve-button-secondary .wp-block-button__link,
.is-style-outline > .wp-block-button__link {
  background: transparent !important;
  color: var(--bi-text) !important;
  border: 1px solid var(--bi-border) !important;
}

.borneirve-button-secondary .wp-block-button__link:hover,
.is-style-outline > .wp-block-button__link:hover {
  border-color: var(--bi-accent) !important;
  color: var(--bi-accent) !important;
}

.wp-block-button__link:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

/* === CTA Box === */
.borneirve-cta-box {
  background:
    radial-gradient(circle at bottom left, rgba(166,226,46,.12), transparent 40%),
    var(--bi-card);
  text-align: center;
}

/* === FAQ / Details === */
.wp-block-details.borneirve-card {
  margin-bottom: .8rem;
}

.wp-block-details.borneirve-card summary {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--bi-text);
  cursor: pointer;
  padding: .4rem 0;
}

.wp-block-details.borneirve-card[open] summary {
  color: var(--bi-accent);
  margin-bottom: .6rem;
}

/* === Contact & SEO Links === */
.borneirve-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.borneirve-contact-list li + li {
  margin-top: .7rem;
}

.borneirve-seo-links {
  list-style: none;
  padding: 0;
}

.borneirve-seo-links a {
  text-decoration: none;
}

.borneirve-seo-links a:hover {
  color: var(--bi-accent);
}

.borneirve-seo-links li + li {
  margin-top: .45rem;
}

/* === Light Mode Overrides === */
html[data-theme="light"] .wp-site-blocks,
html[data-theme="light"] .wp-site-blocks .wp-block-group,
html[data-theme="light"] .wp-site-blocks .wp-block-columns,
html[data-theme="light"] .wp-site-blocks .wp-block-column {
  color: var(--bi-text-soft) !important;
}

html[data-theme="light"] .wp-site-blocks h1,
html[data-theme="light"] .wp-site-blocks h2,
html[data-theme="light"] .wp-site-blocks h3,
html[data-theme="light"] .wp-site-blocks h4,
html[data-theme="light"] .wp-site-blocks h5,
html[data-theme="light"] .wp-site-blocks h6,
html[data-theme="light"] .wp-site-blocks .wp-block-heading,
html[data-theme="light"] .wp-site-blocks .wp-block-site-title,
html[data-theme="light"] .wp-site-blocks .wp-block-site-title a,
html[data-theme="light"] .wp-site-blocks .wp-block-post-title,
html[data-theme="light"] .wp-site-blocks .wp-block-query-title,
html[data-theme="light"] .wp-site-blocks .borneirve-hero h1,
html[data-theme="light"] .wp-site-blocks .borneirve-hero h2,
html[data-theme="light"] .wp-site-blocks .borneirve-hero h3,
html[data-theme="light"] .wp-site-blocks .borneirve-hero-panel h1,
html[data-theme="light"] .wp-site-blocks .borneirve-hero-panel h2,
html[data-theme="light"] .wp-site-blocks .borneirve-hero-panel h3,
html[data-theme="light"] .wp-site-blocks .borneirve-card h1,
html[data-theme="light"] .wp-site-blocks .borneirve-card h2,
html[data-theme="light"] .wp-site-blocks .borneirve-card h3,
html[data-theme="light"] .wp-site-blocks .borneirve-card h4 {
  color: var(--bi-text) !important;
  text-shadow: none !important;
}

html[data-theme="light"] .wp-site-blocks p,
html[data-theme="light"] .wp-site-blocks li,
html[data-theme="light"] .wp-site-blocks span,
html[data-theme="light"] .wp-site-blocks ul,
html[data-theme="light"] .wp-site-blocks ol,
html[data-theme="light"] .wp-site-blocks .wp-block-list,
html[data-theme="light"] .wp-site-blocks .wp-block-paragraph,
html[data-theme="light"] .wp-site-blocks .borneirve-hero p,
html[data-theme="light"] .wp-site-blocks .borneirve-hero li,
html[data-theme="light"] .wp-site-blocks .borneirve-hero-panel p,
html[data-theme="light"] .wp-site-blocks .borneirve-hero-panel li,
html[data-theme="light"] .wp-site-blocks .borneirve-card p,
html[data-theme="light"] .wp-site-blocks .borneirve-card li {
  color: var(--bi-text-soft) !important;
}

html[data-theme="light"] .wp-site-blocks .borneirve-tag {
  color: var(--bi-text) !important;
}

html[data-theme="light"] .borneirve-section-soft {
  background: linear-gradient(180deg, #eef3f8 0%, #e7eef5 100%) !important;
}

/* === Footer Light Mode === */
.wp-site-blocks .wp-block-template-part,
.wp-site-blocks .wp-block-template-part * {
  color: inherit;
}

.wp-site-blocks footer,
.wp-site-blocks .wp-block-template-part footer,
.wp-site-blocks .wp-block-template-part .has-bg-soft-background-color {
  background: var(--bi-bg-soft) !important;
}

.wp-site-blocks .wp-block-template-part .has-bg-soft-background-color,
.wp-site-blocks .wp-block-template-part .has-bg-soft-background-color p,
.wp-site-blocks .wp-block-template-part .has-bg-soft-background-color li,
.wp-site-blocks .wp-block-template-part .has-bg-soft-background-color a,
.wp-site-blocks .wp-block-template-part .has-bg-soft-background-color .wp-block-heading,
.wp-site-blocks .wp-block-template-part .has-bg-soft-background-color strong {
  color: var(--bi-text-soft) !important;
}

.wp-site-blocks .wp-block-template-part .has-bg-soft-background-color .wp-block-heading,
.wp-site-blocks .wp-block-template-part .has-bg-soft-background-color .wp-block-site-title,
.wp-site-blocks .wp-block-template-part .has-bg-soft-background-color strong,
.wp-site-blocks .wp-block-template-part .has-bg-soft-background-color .wp-block-site-title a {
  color: var(--bi-text) !important;
}

html[data-theme="light"] .wp-site-blocks .wp-block-template-part .has-bg-soft-background-color {
  background: linear-gradient(180deg, #eef3f8 0%, #e7eef5 100%) !important;
}

html[data-theme="light"] .wp-site-blocks .wp-block-template-part .has-bg-soft-background-color,
html[data-theme="light"] .wp-site-blocks .wp-block-template-part .has-bg-soft-background-color p,
html[data-theme="light"] .wp-site-blocks .wp-block-template-part .has-bg-soft-background-color li,
html[data-theme="light"] .wp-site-blocks .wp-block-template-part .has-bg-soft-background-color a,
html[data-theme="light"] .wp-site-blocks .wp-block-template-part .has-bg-soft-background-color .wp-block-heading,
html[data-theme="light"] .wp-site-blocks .wp-block-template-part .has-bg-soft-background-color strong {
  color: var(--bi-text-soft) !important;
}

html[data-theme="light"] .wp-site-blocks .wp-block-template-part .has-bg-soft-background-color .wp-block-heading,
html[data-theme="light"] .wp-site-blocks .wp-block-template-part .has-bg-soft-background-color strong,
html[data-theme="light"] .wp-site-blocks .wp-block-template-part .has-bg-soft-background-color .wp-block-site-title,
html[data-theme="light"] .wp-site-blocks .wp-block-template-part .has-bg-soft-background-color .wp-block-site-title a {
  color: var(--bi-text) !important;
}

html[data-theme="light"] .wp-site-blocks .wp-block-template-part .wp-block-separator {
  background-color: rgba(11,26,42,0.18) !important;
  border-color: rgba(11,26,42,0.18) !important;
}

/* Light mode heading inversion fix */
html[data-theme="light"] .wp-site-blocks :is(h1, h2, h3, h4, h5, h6, .wp-block-heading, .wp-block-post-title, .wp-block-query-title, .wp-block-site-title, .wp-block-site-title a),
html[data-theme="light"] body :is(h1, h2, h3, h4, h5, h6, .wp-block-heading, .wp-block-post-title, .wp-block-query-title, .wp-block-site-title, .wp-block-site-title a) {
  color: var(--bi-text) !important;
}

html[data-theme="light"] .wp-site-blocks footer :is(h1, h2, h3, h4, h5, h6, .wp-block-heading, .wp-block-site-title, .wp-block-site-title a, strong),
html[data-theme="light"] body footer :is(h1, h2, h3, h4, h5, h6, .wp-block-heading, .wp-block-site-title, .wp-block-site-title a, strong) {
  color: var(--bi-text) !important;
}

/* === Responsive — Tablet === */
@media (max-width: 960px) {
  .borneirve-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .borneirve-grid-3,
  .borneirve-process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  header .wp-block-group.is-layout-flex {
    flex-wrap: wrap !important;
    gap: .9rem !important;
  }

  header .wp-block-navigation {
    width: 100%;
    order: 3;
    justify-content: flex-start;
  }

  header .wp-block-buttons {
    flex-wrap: wrap;
  }

  header .wp-block-site-title {
    font-size: 1.15rem !important;
  }

  .wp-block-columns {
    gap: 1.25rem !important;
  }
}

/* === Responsive — Mobile === */
@media (max-width: 782px) {
  header.wp-block-template-part {
    position: sticky;
    top: 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  header .wp-block-group[style*="border-bottom-color"] {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }

  header .wp-block-navigation__responsive-container-open,
  header .wp-block-navigation__responsive-container-close {
    color: var(--bi-text) !important;
  }

  .wp-block-buttons .wp-block-button,
  .wp-block-buttons .wp-block-button__link {
    width: 100%;
  }

  .theme-toggle {
    min-width: 42px;
    text-align: center;
  }

  footer .wp-block-columns {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 2rem !important;
  }

  .borneirve-hero {
    padding: 1.25rem !important;
  }

  .wp-site-blocks .borneirve-hero .wp-block-buttons {
    width: 100%;
    display: grid !important;
    grid-template-columns: 1fr;
    gap: .8rem;
  }

  .wp-site-blocks .borneirve-hero .wp-block-button,
  .wp-site-blocks .borneirve-hero .wp-block-button__link {
    width: 100%;
  }

  .wp-site-blocks .borneirve-hero-panel {
    margin-top: .5rem;
  }

  .wp-site-blocks .wp-block-template-part .wp-block-columns {
    gap: 1.15rem !important;
  }

  .borneirve-cta-box {
    padding: 1.5rem !important;
  }
}

@media (max-width: 640px) {
  .borneirve-grid-4,
  .borneirve-grid-3,
  .borneirve-process-grid {
    grid-template-columns: 1fr;
  }

  .borneirve-badges-row {
    gap: .4rem;
  }

  .borneirve-badge {
    font-size: .78rem;
    padding: .35rem .7rem;
  }

  .borneirve-zone-links {
    gap: .4rem;
  }

  .borneirve-zone-link {
    font-size: .82rem;
    padding: .35rem .7rem;
  }
}

/* === Navigation Premium === */
.borneirve-nav-premium .wp-block-navigation-item__content {
  padding: .5rem .8rem;
  border-radius: 8px;
  transition: background .2s ease;
}

.borneirve-nav-premium .wp-block-navigation-item__content:hover {
  background: rgba(166,226,46,.08);
  color: var(--bi-accent);
}

/* === Header Actions === */
.borneirve-header-actions {
  gap: .6rem !important;
}

@media (max-width: 782px) {
  .borneirve-header-actions .wp-block-buttons {
    display: none !important;
  }
}
