/* HéBAM V2 — language + dark/light preferences */

.site-preferences{
  display:flex;
  align-items:center;
  gap:7px;
}

.language-control{
  display:flex;
  align-items:center;
  gap:5px;
  min-height:38px;
  padding:0 7px 0 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(255,255,255,.035);
  color:#dce8f5;
  transition:border-color .2s,background .2s,transform .2s;
}

.language-control:hover{
  border-color:rgba(72,183,255,.35);
  background:rgba(255,255,255,.06);
}

.language-control__icon{
  color:var(--blue-2);
  font-size:.86rem;
}

.language-select{
  appearance:none;
  border:0;
  outline:0;
  background:transparent;
  color:inherit;
  cursor:pointer;
  font-size:.73rem;
  font-weight:800;
  letter-spacing:.04em;
  padding:0 12px 0 1px;
  min-width:36px;
  background-image:
    linear-gradient(45deg,transparent 50%,currentColor 50%),
    linear-gradient(135deg,currentColor 50%,transparent 50%);
  background-position:
    calc(100% - 5px) 48%,
    calc(100% - 1px) 48%;
  background-size:4px 4px,4px 4px;
  background-repeat:no-repeat;
}

.language-select option{
  background:#0b1826;
  color:#f6f9ff;
}

.theme-toggle{
  width:39px;
  height:39px;
  display:grid;
  place-items:center;
  grid-template-columns:1fr;
  border:1px solid var(--line);
  border-radius:50%;
  background:rgba(255,255,255,.035);
  color:#e8f3ff;
  cursor:pointer;
  position:relative;
  overflow:hidden;
  transition:transform .22s,border-color .22s,background .22s;
}

.theme-toggle:hover{
  transform:translateY(-1px) rotate(4deg);
  border-color:rgba(72,183,255,.35);
  background:rgba(255,255,255,.06);
}

.theme-toggle__sun,
.theme-toggle__moon{
  position:absolute;
  transition:opacity .25s,transform .35s cubic-bezier(.2,.8,.2,1);
}

html[data-theme="dark"] .theme-toggle__sun{
  opacity:1;
  transform:rotate(0deg) scale(1);
}

html[data-theme="dark"] .theme-toggle__moon{
  opacity:0;
  transform:rotate(-60deg) scale(.5);
}

html[data-theme="light"] .theme-toggle__sun{
  opacity:0;
  transform:rotate(60deg) scale(.5);
}

html[data-theme="light"] .theme-toggle__moon{
  opacity:1;
  transform:rotate(0deg) scale(1);
}

/* ---------------- LIGHT THEME ---------------- */

html[data-theme="light"]{
  color-scheme:light;
  --bg:#eef3f8;
  --bg-soft:#f7f9fc;
  --panel:#ffffff;
  --panel-2:#edf3f9;
  --panel-glass:rgba(255,255,255,.76);
  --text:#0d1b2a;
  --muted:#627386;
  --line:rgba(14,43,72,.12);
  --shadow:0 28px 70px rgba(36,68,101,.12);
}

html[data-theme="light"] body{
  background:
    radial-gradient(circle at 72% 13%,rgba(22,140,255,.08),transparent 26rem),
    linear-gradient(180deg,#f7faff 0%,#edf3f8 45%,#f5f8fb 100%);
  color:var(--text);
}

html[data-theme="light"] body::before{
  background-image:
    linear-gradient(rgba(17,60,98,.035) 1px,transparent 1px),
    linear-gradient(90deg,rgba(17,60,98,.035) 1px,transparent 1px);
}

html[data-theme="light"] .site-header.is-scrolled{
  background:rgba(249,252,255,.86);
  border-bottom-color:rgba(14,43,72,.1);
}

html[data-theme="light"] .nav-links a{color:#405165}
html[data-theme="light"] .nav-links a:hover,
html[data-theme="light"] .nav-links a[aria-current="page"]{color:#0d1b2a}

html[data-theme="light"] .language-control,
html[data-theme="light"] .theme-toggle{
  background:rgba(255,255,255,.75);
  color:#20364b;
  border-color:rgba(14,43,72,.13);
}

html[data-theme="light"] .language-select option{
  background:#fff;
  color:#172b3f;
}

html[data-theme="light"] .menu-toggle{color:#15283b}

html[data-theme="light"] .hero{
  background:
    radial-gradient(circle at 76% 43%,rgba(22,140,255,.13),transparent 24rem),
    radial-gradient(circle at 78% 48%,rgba(255,139,34,.07),transparent 17rem),
    linear-gradient(180deg,#f9fcff,#edf4fa);
}

html[data-theme="light"] .hero h1{color:#0b1826}
html[data-theme="light"] .hero__lead{color:#526579}
html[data-theme="light"] .btn--ghost{
  color:#17324d;
  border-color:rgba(19,56,90,.18);
  background:rgba(255,255,255,.6);
}
html[data-theme="light"] .trust-item strong{color:#17283a}
html[data-theme="light"] .trust-item span{color:#66788a}
html[data-theme="light"] .trust-icon{
  background:rgba(255,255,255,.7);
  border-color:rgba(22,140,255,.18);
}

html[data-theme="light"] .expertise-wrap{
  background:#f7f9fc;
}

html[data-theme="light"] .products-wrap{
  background:
    radial-gradient(circle at 50% -5%,rgba(22,140,255,.12),transparent 34rem),
    #edf3f8;
  color:#0d1b2a;
}

html[data-theme="light"] .products-wrap::before{
  background-image:
    linear-gradient(rgba(22,58,91,.035) 1px,transparent 1px),
    linear-gradient(90deg,rgba(22,58,91,.035) 1px,transparent 1px);
}

html[data-theme="light"] .section-heading--center{color:#0d1b2a}
html[data-theme="light"] .section-heading--center p{color:#637487}

html[data-theme="light"] .product-card{
  background:linear-gradient(180deg,rgba(255,255,255,.97),rgba(247,250,253,.98));
  border-color:rgba(18,52,82,.10);
  box-shadow:0 22px 55px rgba(43,77,111,.10);
  color:#102033;
}

html[data-theme="light"] .product-card p{color:#627488}
html[data-theme="light"] .product-card a{color:#0876d6}
html[data-theme="light"] .product-card__icon{
  background:#eef5fb;
  border-color:rgba(18,52,82,.08);
}
html[data-theme="light"] .chip{
  color:#5a6d80;
  border-color:rgba(18,52,82,.11);
  background:#f0f5fa;
}

html[data-theme="light"] .stats-shell{
  background:rgba(255,255,255,.78);
  border-color:rgba(18,52,82,.10);
  color:#102033;
}
html[data-theme="light"] .stat span{color:#6a7c8f}

html[data-theme="light"] .tech-panel,
html[data-theme="light"] .page-card,
html[data-theme="light"] .contact-panel,
html[data-theme="light"] .contact-form,
html[data-theme="light"] .client-shell{
  background:linear-gradient(145deg,#ffffff,#f6f9fc);
  border-color:rgba(18,52,82,.10);
  color:#102033;
  box-shadow:0 22px 55px rgba(43,77,111,.08);
}

html[data-theme="light"] .tech-pill{
  background:#f1f6fb;
  border-color:rgba(18,52,82,.09);
}
html[data-theme="light"] .tech-pill small,
html[data-theme="light"] .page-card p,
html[data-theme="light"] .contact-panel p,
html[data-theme="light"] .client-shell p{color:#65778a}

html[data-theme="light"] .cta{
  background:linear-gradient(180deg,#edf3f8,#f7f9fc);
}
html[data-theme="light"] .cta-box{
  background:linear-gradient(135deg,#fff,#edf5fb);
  border-color:rgba(18,52,82,.11);
  color:#102033;
  box-shadow:0 22px 55px rgba(43,77,111,.08);
}
html[data-theme="light"] .cta-box p{color:#637487}

html[data-theme="light"] .page-hero{
  background:
    radial-gradient(circle at 80% 10%,rgba(22,140,255,.11),transparent 25rem),
    #f7faff;
}
html[data-theme="light"] .page-hero h1{color:#102033}
html[data-theme="light"] .page-hero p{color:#65778a}

html[data-theme="light"] .field label{color:#40546a}
html[data-theme="light"] .field input,
html[data-theme="light"] .field textarea,
html[data-theme="light"] .field select{
  background:#fff;
  color:#102033;
  border-color:rgba(18,52,82,.16);
}

html[data-theme="light"] .contact-meta div{
  background:#f0f5fa;
  border-color:rgba(18,52,82,.09);
}

html[data-theme="light"] .site-footer{
  background:#e8eef4;
  border-top-color:rgba(18,52,82,.09);
  color:#102033;
}
html[data-theme="light"] .footer-grid p,
html[data-theme="light"] .footer-col a{color:#617386}
html[data-theme="light"] .footer-col a:hover{color:#0876d6}
html[data-theme="light"] .footer-bottom{
  border-top-color:rgba(18,52,82,.10);
  color:#6c7e90;
}

@media (max-width:850px){
  .site-preferences{margin-left:auto}
  .nav-actions{gap:7px}
  html[data-theme="light"] .nav-links{
    background:rgba(249,252,255,.97);
    border-color:rgba(18,52,82,.11);
  }
}

@media (max-width:590px){
  .language-control{padding-left:8px}
  .language-control__icon{display:none}
  .language-select{min-width:32px}
  .theme-toggle{width:37px;height:37px}
}
