:root{
  --xs-white:#f6f8f7;
  --xs-deep:#1f2a32;
  --xs-ink:#0b1218;
  --xs-accent:#ff5a3c;

  --xs-shadow:0 18px 50px rgba(9,15,22,.10);
  --xs-shadow2:0 12px 28px rgba(9,15,22,.08);
  --xs-shadowHover:0 22px 60px rgba(9,15,22,.14);

  --xs-r:16px;
  --xs-r-lg:24px;

  --xs-max:1180px;
  --xs-pad:22px;

  --xs-header-h:78px;

  --xs-focus:rgba(255,90,60,.55);
  --xs-ease:cubic-bezier(.2,.7,.2,1);
}

@media (max-width:900px){
  :root{
    --xs-pad:16px;
    --xs-header-h:74px;
  }
}

/* Lock scroll for mobile menu (used by main.js / page JS) */
.xs-scrollLock{ overflow:hidden !important; }

/* =========================
   Base / Reset
   ========================= */
*,*::before,*::after{ box-sizing:border-box; }

html{
  -webkit-text-size-adjust:100%;
  overflow-x:hidden;
  scroll-behavior:smooth;

  /* ancres + header fixe */
  scroll-padding-top:calc(var(--xs-header-h) + 10px);
}

body{
  margin:0;
  padding:0;
  min-height:100%;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:var(--xs-deep);
  background:var(--xs-white);
  line-height:1.65;

  /* reserve fixed header space */
  padding-top:var(--xs-header-h);
}

/* Responsive media */
img,video{
  max-width:100%;
  height:auto;
  display:block;
}

/* Links */
a{ color:inherit; }

/* Global focus-visible */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible{
  outline:2px solid var(--xs-focus);
  outline-offset:3px;
  border-radius:10px;
}

/* Reduced motion */
@media (prefers-reduced-motion:reduce){
  html{ scroll-behavior:auto; }
  *{
    animation:none !important;
    transition:none !important;
    scroll-behavior:auto !important;
  }
}

/* =========================
   Layout global
   ========================= */
.xs-wrap{
  width:100%;
  position:relative;
  overflow-x:clip;
}

@supports not (overflow: clip){
  .xs-wrap{ overflow-x:hidden; }
}

.xs-container{
  max-width:var(--xs-max);
  margin:0 auto;
  padding:0 var(--xs-pad);
}

/* =========================
   Header + Navigation
   ========================= */
.xs-header{
  position:fixed;
  top:0; left:0; right:0;
  z-index:1000;

  background:rgba(246,248,247,.92);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);

  border-bottom:1px solid rgba(31,42,50,.10);
  padding:14px 0;

  transition:background .3s ease, box-shadow .3s ease;
}

/* stable height (avoid micro CLS) */
.xs-header.scrolled{
  background:rgba(246,248,247,.98);
  box-shadow:var(--xs-shadow);
}

.xs-header .xs-container{
  display:flex;
  align-items:center;
  justify-content:space-between;

  width:100%;
  max-width:var(--xs-max);
  margin:0 auto;
  padding:0 var(--xs-pad);

  gap:14px;
  min-width:0; /* allow flex children to shrink safely */
}

.xs-logo{
  font-size:21px;
  font-weight:900;
  letter-spacing:-.03em;
  color:var(--xs-deep);
  text-decoration:none;

  white-space:nowrap;
  flex:0 0 auto;
  line-height:1.15;
  padding:2px 2px 2px 0;

  transition:color .2s ease;
}

.xs-logo:hover{ color:var(--xs-accent); }

.xs-nav{
  flex:1 1 auto;
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:26px;
  white-space:nowrap;
}

.xs-nav a{
  font-size:15px;
  font-weight:700;
  color:var(--xs-deep);
  text-decoration:none;
  position:relative;
  transition:color .2s ease;
  white-space:nowrap;
}

.xs-nav a::after{
  content:"";
  position:absolute;
  bottom:-6px;
  left:0;
  width:0;
  height:2px;
  background:var(--xs-accent);
  transition:width .3s ease;
}

.xs-nav a:hover{ color:var(--xs-accent); }
.xs-nav a:hover::after{ width:100%; }

/* Progressive compression (desktop only) */
@media (max-width:1200px){
  .xs-nav{ gap:18px; }
  .xs-nav a{ font-size:14.5px; }
  .xs-logo{ font-size:20px; }
}
@media (max-width:1120px){
  .xs-nav{ gap:14px; }
  .xs-nav a{ font-size:14px; }
  .xs-logo{ font-size:19.5px; }
}

/* =========================
   Language switch (desktop)
   ========================= */
.xs-langSwitch{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(31,42,50,.14);
  background:rgba(255,255,255,.86);
  font-weight:900;
  font-size:12px;
  letter-spacing:.06em;
  text-decoration:none;
  white-space:nowrap;
  flex:0 0 auto;
}

/* do not underline like other nav items */
.xs-langSwitch::after{ display:none !important; }

@media (hover:hover) and (pointer:fine){
  .xs-langSwitch:hover{
    color:var(--xs-accent);
    border-color:rgba(255,90,60,.40);
  }
}

/* =========================
   Hamburger (premium + button safe)
   ========================= */
.xs-hamburger{
  display:none;
  flex-direction:column;
  gap:5px;

  cursor:pointer;
  padding:8px;
  flex:0 0 auto;
  border-radius:10px;

  /* button reset */
  background:transparent;
  border:0;
  -webkit-appearance:none;
  appearance:none;

  /* better tap */
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;

  transition:transform .18s ease;
}

@media (hover:hover) and (pointer:fine){
  .xs-hamburger:hover{ transform:translateY(-1px); }
}

.xs-hamburger span{
  width:26px;
  height:2px;
  background:var(--xs-deep);
  border-radius:2px;
  transition:transform .28s ease, opacity .2s ease, background .2s ease;
}

/* animate based on aria-expanded (robust, no JS "active" needed) */
.xs-hamburger[aria-expanded="true"] span:nth-child(1){
  transform:rotate(45deg) translate(5px,5px);
}
.xs-hamburger[aria-expanded="true"] span:nth-child(2){
  opacity:0;
}
.xs-hamburger[aria-expanded="true"] span:nth-child(3){
  transform:rotate(-45deg) translate(7px,-6px);
}

/* =========================
   Mobile menu (premium: opacity/transform)
   ========================= */
.xs-mobileMenu{
  position:fixed;
  inset:0;
  background:var(--xs-white);
  padding-top:calc(var(--xs-header-h) + 42px);

  display:flex;
  flex-direction:column;
  align-items:center;
  gap:26px;

  font-size:22px;
  font-weight:800;

  z-index:1100;

  /* premium open/close */
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translateY(-10px);
  transition:opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.xs-mobileMenu.open{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:none;
}

/* subtle top divider glow */
.xs-mobileMenu::before{
  content:"";
  position:absolute;
  left:0; right:0;
  top:0;
  height:1px;
  background:linear-gradient(90deg, transparent, rgba(31,42,50,.10), transparent);
  opacity:.9;
}

.xs-mobileMenu a{
  color:var(--xs-deep);
  text-decoration:none;
  padding:8px 14px;
  border-radius:999px;
  transition:background .18s ease, color .18s ease, transform .18s ease;
}

@media (hover:hover) and (pointer:fine){
  .xs-mobileMenu a:hover{
    color:var(--xs-accent);
    background:rgba(255,90,60,.10);
    transform:translateY(-1px);
  }
}

.xs-mobileLangSwitch{ font-weight:900; }
.xs-mobilePremium{
  background:rgba(255,90,60,.12);
  border:1px solid rgba(255,90,60,.28);
}

/* IMPORTANT: switch to hamburger earlier (nav is long + EN pill) */
@media (max-width:1080px){
  .xs-hamburger{ display:flex; }
  .xs-nav{ display:none; }
}

/* Optional perf: reduce blur on mobile (keeps premium feel) */
@media (max-width:900px){
  .xs-header{
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
    background:rgba(246,248,247,.97);
  }
}

/* =========================
   Buttons (global)
   ========================= */
.xs-cta,
.xs-miniCTA{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin:24px 0 0;
}

.xs-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:11px 18px;
  border-radius:999px;
  font-weight:900;
  font-size:13.5px;
  letter-spacing:.01em;
  text-decoration:none;
  white-space:nowrap;

  transition:transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  min-height:44px;

  /* better tap */
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}

.xs-btn.primary{
  background:var(--xs-accent);
  color:#fff;
  border:1px solid rgba(255,90,60,.95);
}

.xs-btn.light{
  border:1px solid rgba(31,42,50,.16);
  background:rgba(255,255,255,.96);
  color:var(--xs-deep);
}

.xs-btn.ghost{
  border:1px solid rgba(255,255,255,.20);
  background:rgba(11,18,24,.16);
  color:#fff;
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}

@media (hover:hover) and (pointer:fine){
  .xs-btn:hover{
    transform:translateY(-2px) scale(1.04);
    box-shadow:var(--xs-shadowHover);
  }
  .xs-btn.primary:hover{
    transform:translateY(-2px) scale(1.06);
    box-shadow:0 22px 60px rgba(0,0,0,.22);
  }
}

@media (hover:none) and (pointer:coarse){
  .xs-btn:hover{ transform:none !important; }
}

/* =========================
   Text utilities (global)
   ========================= */
.xs-bullets{
  margin:0 0 14px;
  padding:0 0 0 18px;
  color:rgba(31,42,50,.82);
  line-height:1.75;
  font-size:15.5px;
}

.xs-bullets li{ margin:6px 0; }

.xs-secLead a,
.xs-lead a,
.xs-articleNarrow p a{
  color:var(--xs-accent);
  text-decoration:underline;
  text-underline-offset:3px;
  text-decoration-thickness:1.5px;
}

/* =========================
   Footer (global)
   ========================= */
.xs-footer{
  background:var(--xs-white);
  border-top:1px solid rgba(31,42,50,.10);
}

.xs-footerInner{
  max-width:var(--xs-max);
  margin:0 auto;
  padding:26px var(--xs-pad) 20px;
}

.xs-footerNarrative{
  max-width:760px;
  margin-bottom:22px;
}

.xs-footerTitle{
  margin:0;
  font-weight:900;
  letter-spacing:.14em;
  text-transform:uppercase;
  font-size:12px;
  color:var(--xs-deep);
}

.xs-footerText{
  margin:10px 0 0;
  color:rgba(31,42,50,.78);
  font-size:14.5px;
  line-height:1.75;
}

.xs-footerNav{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  margin:0 0 18px;
  padding:0;
}

.xs-footerNav--secondary{
  gap:12px;
  margin-bottom:16px;
}

.xs-footerLink{
  display:inline-flex;
  align-items:center;
  font-size:13.5px;
  font-weight:900;
  color:var(--xs-deep);
  text-decoration:none;
  border-bottom:1px solid rgba(255,90,60,.55);
  padding-bottom:2px;
  transition:color .18s ease, border-color .18s ease;
}

.xs-footerLink--muted{
  border-bottom:none;
  font-size:13px;
  font-weight:700;
  color:rgba(31,42,50,.70);
  padding-bottom:0;
}

.xs-footerMeta{
  margin-top:10px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  font-size:12.5px;
  color:rgba(31,42,50,.60);
}

.xs-footerMeta a{
  color:inherit;
  text-decoration:none;
}

@media (hover:hover) and (pointer:fine){
  .xs-footerLink:hover{
    color:var(--xs-accent);
    border-bottom-color:rgba(255,90,60,.85);
  }
  .xs-footerLink--muted:hover{ color:var(--xs-accent); }

  .xs-footerMeta a:hover{
    text-decoration:underline;
    text-underline-offset:3px;
  }
}

@media (max-width:520px){
  .xs-footerMeta{ justify-content:flex-start; }
}