/* ============================================================
   MAISON e-SAHARA — « L'Excellence Industrielle Marocaine »
   Direction Artistique Premium Claire, Métallique et Dynamique
   ============================================================ */

:root {
  /* Nuancier Mode Clair Premium */
  --bg-main: #fbfaf6;       /* Alabastre clair satiné */
  --bg-card: #ffffff;       /* Blanc pur tactile */
  --bg-soft: #f3f0e8;       /* Ivoire de transition */
  --surface-glass: rgba(255, 255, 255, 0.75);

  /* Couleurs de Contraste (Espresso de marque) */
  --fg-main: #1d1714;       /* Noir Espresso intense */
  --fg-muted: #645a55;      /* Brun terreux adouci */
  --fg-ink: #2a201b;

  /* Métaux et Accents Électriques */
  --bronze: #b97b4e;        /* Cuivre de l'Atlas brossé */
  --bronze-light: #d69d73;
  --gold: #d29f68;          /* Or Désert chaud */
  --teal: #2c8e90;          /* Cyan e-Sahara intelligent */
  --teal-glow: rgba(44, 142, 144, 0.15);

  /* Hairlines et Bordures */
  --hair: rgba(29, 23, 20, 0.08);
  --hair-soft: rgba(29, 23, 20, 0.04);
  --hair-glow: rgba(44, 142, 144, 0.2);

  /* Paramètres Layout & Typo */
  --max: 1280px;
  --gutter: clamp(24px, 6vw, 80px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Jost", system-ui, -apple-system, sans-serif;
  --radius: 4px;
}

/* ============================================================
   STYLES DE BASE & RESET
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Garantir que l'attribut HTML [hidden] masque toujours les éléments,
   même si un display CSS est déclaré explicitement (ex: flex, grid) */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  background: var(--bg-main);
  color: var(--fg-main);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

img, video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  transition: all 300ms var(--ease);
}

::selection {
  background: var(--bronze);
  color: #ffffff;
}

:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 3px;
}

/* Texture Grain de Papier */
.grain {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Scrollbar Premium */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--bronze) transparent;
}
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-thumb {
  background: var(--bronze);
  border-radius: 4px;
}
*::-webkit-scrollbar-track {
  background: var(--bg-soft);
}

.container {
  width: min(var(--max), calc(100% - var(--gutter) * 2));
  margin: 0 auto;
}

/* ============================================================
   PRELOADER & SCROLL PROGRESS
   ============================================================ */

.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #fbfaf6;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 800ms var(--ease), visibility 800ms var(--ease);
}

.preloader.is-loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.preloader-logo {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--bronze);
  display: grid;
  place-items: center;
  animation: logo-pulse 2s infinite ease-in-out;
}

.preloader-logo img {
  width: 140px;
  height: 96px;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

.preloader-bar {
  width: 180px;
  height: 2px;
  background: var(--hair);
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}

.preloader-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--bronze), var(--gold));
  transition: width 300ms ease-out;
}

.preloader-kicker {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

@keyframes logo-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 20px rgba(185, 123, 78, 0.1);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 35px rgba(185, 123, 78, 0.25);
  }
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 150;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--bronze), var(--gold));
}

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 90px;
  padding: 0 var(--gutter);
  color: #ffffff; /* Initial text white to read over dark Hero video */
  background: transparent;
  transition: background 400ms var(--ease), color 400ms var(--ease),
    min-height 400ms var(--ease), backdrop-filter 400ms var(--ease),
    border-color 400ms var(--ease);
  border-bottom: 1px solid transparent;
}

.site-nav.is-scrolled {
  min-height: 70px;
  color: var(--fg-main);
  background: rgba(251, 250, 246, 0.88);
  backdrop-filter: blur(20px);
  border-bottom-color: var(--hair);
  box-shadow: 0 10px 40px rgba(29, 23, 20, 0.02);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  background: #14100d;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: border-color 400ms var(--ease);
}

.site-nav.is-scrolled .brand-mark {
  border-color: var(--hair);
}

.brand-mark img {
  width: 68px;
  height: 45px;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

.brand-copy {
  display: grid;
  gap: 2px;
  line-height: 1;
}

.brand-copy strong {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.brand-copy em {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.86rem;
  font-weight: 400;
  color: var(--gold);
}

.site-nav.is-scrolled .brand-copy em {
  color: var(--bronze);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.nav-links a {
  position: relative;
  padding: 10px 14px;
  color: currentColor;
  opacity: 0.8;
  font-size: 0.76rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: opacity 220ms var(--ease);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 280ms var(--ease);
}

.nav-links a:hover,
.nav-links a.is-active {
  opacity: 1;
}

.nav-links a.is-active::after,
.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  margin-left: 20px;
  padding: 10px 20px;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: currentColor;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius);
  transition: all 300ms var(--ease);
}

.site-nav.is-scrolled .nav-cta {
  border-color: var(--bronze);
  color: var(--bronze);
}

.nav-cta:hover {
  color: var(--bg-main) !important;
  background: var(--bronze);
  border-color: var(--bronze) !important;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 32px;
  height: 32px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  color: currentColor;
}

.nav-toggle span {
  display: block;
  height: 1px;
  width: 24px;
  background: currentColor;
  transition: transform 300ms var(--ease), opacity 300ms var(--ease);
}

/* ============================================================
   HERO SECTION
   ============================================================ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #1d1714;
}

.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(180deg, rgba(29, 23, 20, 0.5) 0%, transparent 20%),
    linear-gradient(90deg, rgba(29, 23, 20, 0.85) 0%, rgba(29, 23, 20, 0.45) 45%, transparent 75%),
    linear-gradient(0deg, rgba(29, 23, 20, 0.95) 0%, transparent 60%);
}

.hero-frame {
  position: absolute;
  inset: clamp(16px, 2.5vw, 36px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  pointer-events: none;
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  width: min(var(--max), calc(100% - var(--gutter) * 2));
  margin: 0 auto clamp(220px, 25vh, 280px);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.hero-kicker::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--gold);
}

.hero h1 {
  margin-top: 15px;
  font-family: var(--serif);
  font-size: clamp(3.8rem, 9.5vw, 7.8rem);
  line-height: 0.95;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.hero-lead {
  max-width: 580px;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.85);
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  font-weight: 300;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.hero-actions .button-primary {
  background: var(--bronze);
  color: #ffffff;
}

.hero-actions .button-primary:hover {
  background: var(--bronze-light);
  transform: translateY(-2px);
}

.hero-actions .button-ghost {
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.hero-actions .button-ghost:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.hero-scroll {
  position: absolute;
  right: var(--gutter);
  bottom: 220px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.64rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.hero-scroll i {
  width: 1px;
  height: 50px;
  background: linear-gradient(rgba(255, 255, 255, 0.3), transparent);
  overflow: hidden;
  position: relative;
}

.hero-scroll i::after {
  content: "";
  display: block;
  width: 1px;
  height: 15px;
  background: var(--gold);
  position: absolute;
  top: 0;
  animation: scroll-trace-light 2.2s var(--ease) infinite;
}

@keyframes scroll-trace-light {
  0% { transform: translateY(-15px); }
  100% { transform: translateY(50px); }
}

.hero-rail {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(var(--max), calc(100% - var(--gutter) * 2));
  transform: translateX(-50%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(29, 23, 20, 0.6);
  backdrop-filter: blur(16px);
  border-radius: 4px 4px 0 0;
}

.hero-rail article {
  padding: 22px 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-rail article:last-child {
  border-right: 0;
}

.hero-rail span {
  display: block;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-rail strong {
  display: block;
  margin-top: 6px;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2vw, 2.1rem);
  font-weight: 400;
  line-height: 1.1;
  color: #ffffff;
}

.hero-rail strong i {
  font-style: normal;
  font-size: 0.85rem;
  color: var(--gold);
}

/* ============================================================
   TECHNICAL SPEC STRIP
   ============================================================ */

.spec-strip {
  background: var(--bg-card);
  color: var(--fg-main);
  border-bottom: 1px solid var(--hair);
  box-shadow: 0 4px 30px rgba(29, 23, 20, 0.01);
}

.spec-strip-inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: min(var(--max), calc(100% - var(--gutter) * 2));
  margin: 0 auto;
}

.spec-strip article {
  padding: 38px 20px;
  border-right: 1px solid var(--hair);
  text-align: center;
}

.spec-strip article:last-child {
  border-right: 0;
}

.spec-strip strong {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--fg-main);
}

.spec-strip strong i {
  font-style: normal;
  font-size: 0.85rem;
  color: var(--bronze);
}

.spec-strip span {
  display: block;
  margin-top: 10px;
  color: var(--fg-muted);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* ============================================================
   GENERIC SECTIONS & REVEALS
   ============================================================ */

.section {
  position: relative;
  padding: clamp(70px, 9vw, 130px) 0;
  background: var(--bg-main);
  color: var(--fg-main);
}

.section.is-dark {
  /* Dynamic rich light transition styling to preserve premium details */
  background: var(--bg-soft);
  color: var(--fg-main);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}

.split-media-left {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.split-media-left .section-copy {
  order: 2;
}

.section-code {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--bronze);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.section-code em {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  letter-spacing: 0;
  font-weight: 400;
}

.section-copy h2,
.section-header h2 {
  margin-top: 18px;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.8vw, 3.6rem);
  line-height: 1.08;
  font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--fg-main);
  text-wrap: balance;
}

.section-copy p,
.section-header p {
  max-width: 58ch;
  margin-top: 18px;
  color: var(--fg-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.section-header {
  max-width: 800px;
  margin-bottom: clamp(36px, 4.5vw, 60px);
}

/* Base style for elements that reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1000ms var(--ease), transform 1000ms var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   IMAGE FRAME & DETAILED INFO BOXES
   ============================================================ */

.image-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--hair);
  background: var(--bg-soft);
  box-shadow: 0 20px 50px rgba(29, 23, 20, 0.05);
  border-radius: var(--radius);
}

.image-frame img,
.image-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1200ms var(--ease);
}

.image-frame:hover img {
  transform: scale(1.025);
}

.image-frame figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 18px 24px;
  background: linear-gradient(to top, rgba(29, 23, 20, 0.65), transparent);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* technical grid details */
.technical-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 30px;
}

.technical-grid article {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  transition: border-color 300ms var(--ease), box-shadow 300ms var(--ease);
}

.technical-grid article:hover {
  border-color: var(--bronze);
  box-shadow: 0 10px 25px rgba(185, 123, 78, 0.03);
}

.technical-grid strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--bronze);
}

.technical-grid span {
  display: block;
  margin-top: 5px;
  font-size: 0.76rem;
  color: var(--fg-muted);
}

/* ============================================================
   NEW INTERACTIVE SECTION: MOROCCAN INDUSTRIAL ECOSYSTEM
   ============================================================ */

.ecosystem-container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  background: var(--bg-card);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 44px);
  box-shadow: 0 15px 45px rgba(29, 23, 20, 0.02);
}

.ecosystem-map-container {
  position: relative;
  background: var(--bg-soft);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  min-height: 380px;
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: inset 0 10px 30px rgba(0,0,0,0.01);
}

.map-schematic-svg {
  width: 90%;
  height: 90%;
  opacity: 0.95;
  transition: all 400ms var(--ease);
}

/* Hub marker nodes */
.map-node {
  cursor: pointer;
}

.map-node circle.pulse {
  animation: pulse-ring 2s infinite var(--ease);
  transform-origin: center;
}

@keyframes pulse-ring {
  0% { r: 6; opacity: 0.9; }
  100% { r: 18; opacity: 0; }
}

.map-node text {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 500;
  fill: var(--fg-main);
  letter-spacing: 0.05em;
  transition: fill 200ms;
}

.map-node:hover text,
.map-node.is-active text {
  fill: var(--bronze);
  font-weight: 600;
}

/* Ecosystem Info Card Details */
.ecosystem-details-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 320px;
  padding: 10px;
}

.ecosystem-details-card h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--fg-main);
  border-bottom: 1px solid var(--hair);
  padding-bottom: 12px;
}

.ecosystem-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 20px 0;
}

.ecosystem-meta-item strong {
  display: block;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
}

.ecosystem-meta-item span {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--bronze);
  margin-top: 4px;
}

.ecosystem-details-card p {
  color: var(--fg-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* Ecosystem Node Selection Tabs */
.ecosystem-tabs {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  border-bottom: 1px solid var(--hair);
  padding-bottom: 12px;
}

.ecosystem-tab-btn {
  padding: 8px 16px;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
}

.ecosystem-tab-btn.is-active {
  color: #ffffff;
  background: var(--bronze);
  border-color: var(--bronze);
}

.ecosystem-tab-btn:hover:not(.is-active) {
  border-color: var(--bronze);
  color: var(--fg-main);
}

/* ============================================================
   TERRAINS SHIFT INTERACTIVE
   ============================================================ */

.terrain-stage {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: stretch;
}

.terrain-visual-container {
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(29, 23, 20, 0.04);
  border: 1px solid var(--hair);
}

.terrain-visual {
  width: 100%;
  height: 100%;
  aspect-ratio: 1.6;
  margin: 0;
  overflow: hidden;
}

.terrain-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--ease), object-position 900ms var(--ease);
}

.terrain-overlay {
  position: absolute;
  inset: 0;
  padding: 24px;
  background: linear-gradient(180deg, rgba(29, 23, 20, 0.05), rgba(29, 23, 20, 0.55));
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  color: #ffffff;
}

.terrain-stat {
  text-align: center;
}

.terrain-stat .stat-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  opacity: 0.75;
}

.terrain-stat .stat-val {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1.8vw, 1.7rem);
  font-weight: 400;
  color: var(--gold);
  margin-top: 4px;
}

.terrain-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
}

.terrain-card {
  padding: 22px;
  background: var(--bg-card);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 400ms var(--ease);
}

.terrain-card button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-soft);
  display: grid;
  place-items: center;
  color: var(--fg-main);
  margin-bottom: 12px;
  border: 1px solid var(--hair);
}

.terrain-card button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.terrain-card h3 {
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 400;
  margin-bottom: 6px;
  color: var(--fg-main);
}

.terrain-card p {
  font-size: 0.86rem;
  color: var(--fg-muted);
  line-height: 1.5;
}

.terrain-card:hover {
  border-color: var(--bronze-light);
  transform: translateX(4px);
  box-shadow: 0 10px 25px rgba(29, 23, 20, 0.02);
}

.terrain-card.is-active {
  border-color: var(--bronze);
  background: var(--bg-soft);
  box-shadow: 0 10px 30px rgba(185, 123, 78, 0.04);
}

.terrain-card.is-active button {
  background: var(--bronze);
  color: #ffffff;
  border-color: var(--bronze);
}

/* ============================================================
   RANGE CALCULATOR CONSOLE
   ============================================================ */

.range-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 50px;
  align-items: center;
}

.range-console {
  background: var(--bg-card);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 44px);
  box-shadow: 0 12px 40px rgba(29, 23, 20, 0.02);
}

.range-meter {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--hair);
  padding-bottom: 24px;
}

.range-meter span {
  font-family: var(--serif);
  font-size: clamp(3.8rem, 8vw, 5.5rem);
  line-height: 1;
  font-weight: 400;
  color: var(--bronze);
  letter-spacing: -0.02em;
}

.range-meter small {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--fg-muted);
  margin-top: 4px;
}

/* Premium Range Sliders */
.premium-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--bg-soft);
  outline: none;
  margin: 14px 0;
}

.premium-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bronze);
  border: 2px solid var(--bg-card);
  box-shadow: 0 4px 10px rgba(185, 123, 78, 0.3);
  cursor: pointer;
  transition: transform 200ms;
}

.premium-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

/* Custom Switch toggle */
.premium-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.premium-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--bg-soft);
  border: 1px solid var(--hair);
  border-radius: 24px;
  transition: 400ms var(--ease);
}

.switch-slider::before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--fg-muted);
  border-radius: 50%;
  transition: 400ms var(--ease);
}

.premium-switch input:checked + .switch-slider {
  background-color: var(--teal-glow);
  border-color: var(--teal);
}

.premium-switch input:checked + .switch-slider::before {
  transform: translateX(20px);
  background-color: var(--teal);
}

/* Wheel Selector radio button styling */
.jantes-selector {
  display: flex;
  gap: 6px;
  background: var(--bg-soft);
  padding: 4px;
  border-radius: var(--radius);
  border: 1px solid var(--hair);
}

.jante-option {
  position: relative;
  cursor: pointer;
}

.jante-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.jante-option span {
  display: block;
  padding: 6px 12px;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--fg-muted);
  border-radius: calc(var(--radius) - 2px);
  transition: all 250ms var(--ease);
}

.jante-option input:checked + span {
  background: var(--bg-card);
  color: var(--fg-main);
  box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}

/* ============================================================
   FINITIONS (TRIMS) SECTIONS
   ============================================================ */

.trim-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 40px;
  margin-top: 30px;
  align-items: start;
}

.trim-tabs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.trim-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  text-align: left;
  transition: all 400ms var(--ease);
}

.trim-tab strong {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--fg-main);
}

.trim-tab span {
  font-size: 0.76rem;
  color: var(--fg-muted);
  margin-top: 4px;
}

.trim-tab:hover {
  border-color: var(--bronze-light);
  transform: translateX(4px);
}

.trim-tab.is-active {
  border-color: var(--bronze);
  background: var(--bg-soft);
  box-shadow: 0 8px 30px rgba(185, 123, 78, 0.03);
}

.trim-panel {
  background: var(--bg-card);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 44px);
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 10px 40px rgba(29, 23, 20, 0.01);
}

.trim-panel small {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--bronze);
  font-weight: 500;
}

.trim-panel h3 {
  font-family: var(--serif);
  font-size: 2.1rem;
  font-weight: 400;
  margin-top: 6px;
  color: var(--fg-main);
}

.trim-panel p {
  color: var(--fg-muted);
  margin-top: 14px;
  font-size: 0.94rem;
  line-height: 1.6;
}

.trim-specs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 28px 0;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  padding: 20px 0;
}

.trim-specs article strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--fg-main);
}

.trim-specs article span {
  display: block;
  font-size: 0.7rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 2px;
}

.trim-features {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 20px;
}

.trim-features li {
  font-size: 0.84rem;
  color: var(--fg-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.trim-features li::before {
  content: "•";
  color: var(--bronze);
  font-size: 1.2rem;
}

/* ============================================================
   CONFIGURATEUR DÉSERT COUTURE
   ============================================================ */

.configurator-container {
  padding-top: 50px;
}

.config-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 50px;
  align-items: start;
}

.config-preview {
  position: sticky;
  top: 110px;
  background: var(--bg-card);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 10px 30px rgba(29, 23, 20, 0.01);
}

.config-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1.6;
  border-radius: calc(var(--radius) - 2px);
  overflow: hidden;
  background: var(--bg-soft);
}

.config-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  position: relative;
}

.color-backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
  transition: background 600ms var(--ease);
}

.config-summary-specs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 20px;
  border-top: 1px solid var(--hair);
  padding-top: 18px;
  text-align: center;
}

.config-spec-item strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--fg-main);
}

.config-spec-item small {
  display: block;
  font-size: 0.68rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.config-options {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.config-option-section h3 {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 400;
  border-bottom: 1px solid var(--hair);
  padding-bottom: 8px;
  margin-bottom: 16px;
  color: var(--fg-main);
}

.color-badge {
  transition: transform 300ms var(--ease);
}

.color-badge::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid transparent;
  border-radius: 50%;
  transition: border-color 300ms;
}

.color-badge.is-active::after {
  border-color: var(--bronze);
}

.color-badge:hover {
  transform: scale(1.1);
}

.wheel-option-btn {
  padding: 12px;
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  font-size: 0.76rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  background: var(--bg-card);
  transition: all 300ms var(--ease);
}

.wheel-option-btn.is-active {
  border-color: var(--bronze);
  background: var(--bg-soft);
  color: var(--fg-main);
  box-shadow: 0 4px 15px rgba(185, 123, 78, 0.04);
}

.wheel-option-btn:hover:not(.is-active) {
  border-color: var(--bronze-light);
  color: var(--fg-main);
}

.accessories-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.accessory-checkbox-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid var(--hair);
  background: var(--bg-card);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 300ms var(--ease);
}

.accessory-checkbox-card:hover {
  border-color: var(--bronze-light);
  background: var(--bg-soft);
}

.accessory-checkbox-card.is-checked {
  border-color: var(--bronze);
  background: var(--bg-soft);
  box-shadow: 0 6px 20px rgba(185, 123, 78, 0.03);
}

.accessory-checkbox {
  accent-color: var(--bronze);
  width: 18px;
  height: 18px;
}

.accessory-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.4;
}

.accessory-details strong {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--fg-main);
}

.accessory-details span {
  font-size: 0.74rem;
  color: var(--fg-muted);
}

.config-price-summary {
  background: var(--bg-soft);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  padding: 24px;
}

.price-row, .timeline-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.price-row span, .timeline-row span {
  font-size: 0.84rem;
  color: var(--fg-muted);
}

.price-row strong {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--bronze);
}

.timeline-row strong {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--fg-main);
}

.config-order-btn {
  width: 100%;
  margin-top: 18px;
  min-height: 52px;
  background: var(--fg-main);
  color: var(--bg-card);
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  border-radius: var(--radius);
}

.config-order-btn:hover {
  background: var(--bronze);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(185, 123, 78, 0.2);
}

/* ============================================================
   ORDER SUCCESS CONFIRMATION MODAL
   ============================================================ */

.config-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(29, 23, 20, 0.45);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 20px;
  transition: opacity 300ms var(--ease);
}

.config-modal-content {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  width: min(520px, 100%);
  padding: 40px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(29, 23, 20, 0.12);
  animation: modal-enter 500ms var(--ease);
}

@keyframes modal-enter {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 1.1rem;
  color: var(--fg-muted);
}

.modal-close-btn:hover {
  color: var(--fg-main);
}

.modal-success-icon {
  width: 56px;
  height: 56px;
  background: var(--teal-glow);
  color: var(--teal);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  margin: 0 auto 20px;
}

.config-modal-content h2 {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: 8px;
}

.config-modal-content p {
  font-size: 0.88rem;
  color: var(--fg-muted);
  line-height: 1.5;
}

.modal-config-summary {
  margin: 24px 0;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  padding: 16px 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
}

.summary-line span {
  color: var(--fg-muted);
}

.summary-line strong {
  font-weight: 500;
  color: var(--fg-main);
}

.summary-line.price-total {
  margin-top: 10px;
  border-top: 1px dashed var(--hair);
  padding-top: 10px;
  font-size: 0.94rem;
}

.summary-line.price-total strong {
  color: var(--bronze);
  font-family: var(--serif);
  font-size: 1.15rem;
}

.modal-disclaimer {
  font-size: 0.74rem !important;
  font-style: italic;
  margin-bottom: 24px;
}

.modal-confirm-btn {
  width: 100%;
  min-height: 48px;
  background: var(--fg-main);
  color: var(--bg-card);
  font-size: 0.76rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: var(--radius);
}

.modal-confirm-btn:hover {
  background: var(--bronze);
}

/* ============================================================
   COCKPIT SAHARA OS INTERACTIVE SCREEN SIMULATOR
   ============================================================ */

.section-cockpit {
  /* Dynamic light overlay indicator */
  cursor: pointer;
}

.cockpit-overlay-hint {
  position: absolute;
  inset: 0;
  background: rgba(29, 23, 20, 0.4);
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 350ms var(--ease);
  z-index: 3;
}

.image-frame:hover .cockpit-overlay-hint {
  opacity: 1;
}

/* Sahara OS tactile simulator modal container */
.cockpit-modal-container {
  position: relative;
  background: var(--bg-main);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  width: min(1000px, 95vw);
  max-height: 90vh;
  box-shadow: 0 40px 100px rgba(29, 23, 20, 0.15);
  animation: modal-enter 550ms var(--ease);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cockpit-modal-close {
  background: var(--fg-main);
  color: var(--bg-card);
  padding: 12px 24px;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 0 0 var(--radius) var(--radius);
  align-self: flex-end;
  margin-right: 24px;
  z-index: 10;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.cockpit-modal-close:hover {
  background: var(--bronze);
  transform: translateY(2px);
}

/* Sahara OS Simulated Screen styling */
.sahara-os-screen {
  background: #171210; /* Default Dark (Nuit du Désert) */
  color: #f5eedf;
  display: flex;
  flex-direction: column;
  height: 600px;
  font-family: var(--sans);
  position: relative;
  transition: background 500ms var(--ease), color 500ms var(--ease);
}

/* Light theme class overlay for the 15.6" simulated dashboard */
.sahara-os-screen.theme-light {
  background: #fbfaf5;
  color: #2b211a;
}

.sahara-header {
  height: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: border-color 500ms;
}

.sahara-os-screen.theme-light .sahara-header {
  border-bottom-color: rgba(43, 33, 26, 0.07);
}

.sahara-time {
  font-size: 0.8rem;
  font-weight: 600;
}

.sahara-body {
  flex: 1;
  display: grid;
  grid-template-columns: 180px 1fr;
  overflow: hidden;
}

/* Simulated System Sidebar */
.sahara-sidebar {
  border-right: 1px solid rgba(255,255,255,0.06);
  padding: 20px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0, 0, 0, 0.15);
  transition: border-color 500ms, background 500ms;
}

.sahara-os-screen.theme-light .sahara-sidebar {
  border-right-color: rgba(43, 33, 26, 0.07);
  background: rgba(43, 33, 26, 0.02);
}

.sahara-sidebar-btn {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.76rem;
  font-weight: 500;
  text-align: left;
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sahara-os-screen.theme-light .sahara-sidebar-btn {
  color: rgba(43, 33, 26, 0.6);
}

.sahara-sidebar-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
}

.sahara-os-screen.theme-light .sahara-sidebar-btn:hover {
  background: rgba(43, 33, 26, 0.04);
  color: var(--fg-main);
}

.sahara-sidebar-btn.is-active {
  background: rgba(44, 142, 144, 0.12) !important;
  color: var(--teal) !important;
  font-weight: 600;
}

.sahara-content-area {
  padding: 24px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.05);
  transition: background 500ms;
}

.sahara-os-screen.theme-light .sahara-content-area {
  background: rgba(255, 255, 255, 0.4);
}

.sahara-tab-panel {
  height: 100%;
}

/* GPS Simulator */
.gps-route-planner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  height: 100%;
}

.gps-map-placeholder {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: background 500ms, border-color 500ms;
}

.sahara-os-screen.theme-light .gps-map-placeholder {
  background: rgba(43, 33, 26, 0.03);
  border-color: rgba(43, 33, 26, 0.08);
}

.gps-route-svg {
  width: 100%;
  height: 100%;
}

/* Glowing route line animations */
.glowing-route-line.is-navigating {
  animation: route-draw 4s forwards linear;
}

@keyframes route-draw {
  to { stroke-dashoffset: 0; }
}

.pulse-node {
  animation: gps-glow 1.5s infinite alternate ease-in-out;
}

@keyframes gps-glow {
  0% { r: 5; opacity: 0.7; }
  100% { r: 9; opacity: 1; filter: drop-shadow(0 0 4px var(--bronze)); }
}

.gps-itinerary {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.itinerary-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step {
  padding-left: 20px;
  position: relative;
  font-size: 0.78rem;
  line-height: 1.4;
  opacity: 0.5;
  transition: opacity 400ms;
}

.step::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
}

.sahara-os-screen.theme-light .step::before {
  background: rgba(43,33,26,0.3);
}

.step.active {
  opacity: 1;
}

.step.active::before {
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}

.step span {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--teal);
}

.step strong {
  display: block;
  font-weight: 500;
}

.gps-start-btn {
  min-height: 44px;
  background: var(--teal);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: var(--radius);
}

.gps-start-btn:hover:not(:disabled) {
  background: #39a3a5;
  box-shadow: 0 4px 15px rgba(44, 142, 144, 0.3);
}

.gps-start-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Media simulator */
.music-wave-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 28px;
}

.wave-bar {
  display: block;
  width: 4px;
  height: 4px;
  background: var(--bronze);
  border-radius: 2px;
  transition: height 150ms;
}

.wave-bar.animate {
  animation: wave-bounce 1s infinite alternate linear;
}

.wave-bar:nth-child(2) { animation-delay: 0.15s; }
.wave-bar:nth-child(3) { animation-delay: 0.3s; }
.wave-bar:nth-child(4) { animation-delay: 0.45s; }
.wave-bar:nth-child(5) { animation-delay: 0.2s; }
.wave-bar:nth-child(6) { animation-delay: 0.35s; }
.wave-bar:nth-child(7) { animation-delay: 0.1s; }
.wave-bar:nth-child(8) { animation-delay: 0.5s; }

@keyframes wave-bounce {
  0% { height: 4px; }
  100% { height: 28px; }
}

.media-control-action {
  transition: transform 200ms;
}

.media-control-action:hover {
  transform: scale(1.1);
  color: var(--bronze-light) !important;
}

/* Assistant Chat Simulator styling */
.assistant-chat-history {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.assistant-msg-bot {
  background: rgba(255,255,255,0.04);
  color: currentColor;
  padding: 10px 14px;
  border-radius: 12px 12px 12px 0;
  max-width: 80%;
  align-self: flex-start;
  font-size: 0.8rem;
  line-height: 1.5;
  transition: background 500ms;
}

.sahara-os-screen.theme-light .assistant-msg-bot {
  background: rgba(43, 33, 26, 0.04);
}

.assistant-msg-user {
  background: var(--teal);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 12px 12px 0 12px;
  max-width: 80%;
  align-self: flex-end;
  font-size: 0.8rem;
  line-height: 1.5;
}

.assist-suggest-btn {
  padding: 8px 14px;
  font-size: 0.72rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  transition: all 250ms var(--ease);
}

.sahara-os-screen.theme-light .assist-suggest-btn {
  background: #ffffff;
  border-color: rgba(43, 33, 26, 0.08);
}

.assist-suggest-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: rgba(44, 142, 144, 0.05);
}

/* Settings selectivity styling */
.premium-select {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  color: currentColor;
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 0.74rem;
  outline: none;
}

.sahara-os-screen.theme-light .premium-select {
  border-color: rgba(43, 33, 26, 0.1);
}

.premium-select option {
  background: #171210;
  color: #ffffff;
}

.sahara-os-screen.theme-light .premium-select option {
  background: #ffffff;
  color: var(--fg-main);
}

.ambient-color-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 200ms;
}

.ambient-color-btn.is-active {
  border-color: currentColor;
}

.ambient-color-btn:hover {
  transform: scale(1.1);
}

.diagnostic-test-btn {
  border: 1px solid var(--bronze);
  color: var(--bronze);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.74rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 300ms var(--ease);
}

.diagnostic-test-btn:hover:not(:disabled) {
  background: var(--bronze);
  color: #ffffff;
}

.diagnostic-test-btn:disabled {
  opacity: 0.5;
}

/* OS Bottom Menu Control bar */
.sahara-footer {
  height: 56px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(0,0,0,0.2);
  transition: border-color 500ms, background 500ms;
}

.sahara-os-screen.theme-light .sahara-footer {
  border-top-color: rgba(43, 33, 26, 0.07);
  background: rgba(43, 33, 26, 0.01);
}

.ac-controls-quick {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.76rem;
  font-weight: 500;
}

.temp-adjuster {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.04);
  padding: 3px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.06);
  transition: border-color 500ms;
}

.sahara-os-screen.theme-light .temp-adjuster {
  background: rgba(43, 33, 26, 0.03);
  border-color: rgba(43, 33, 26, 0.08);
}

.temp-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  display: grid;
  place-items: center;
  font-weight: bold;
}

.sahara-os-screen.theme-light .temp-btn {
  background: rgba(255,255,255,0.8);
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.temp-btn:hover {
  background: var(--bronze);
  color: #ffffff;
}

.quick-icons {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
}

.quick-icons span:hover {
  color: var(--teal);
}

/* Theme switch widget header */
.sahara-theme-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sahara-theme-btn {
  padding: 4px 8px;
  font-size: 0.65rem;
  font-weight: 500;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
}

.sahara-os-screen.theme-light .sahara-theme-btn {
  border-color: rgba(43,33,26,0.15);
  color: rgba(43,33,26,0.6);
}

.sahara-theme-btn.is-active {
  background: var(--gold);
  color: #171210 !important;
  border-color: var(--gold);
}

/* ============================================================
   MEDIA GALLERY GRID
   ============================================================ */

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.5vw, 32px);
  margin-top: 30px;
}

.media-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.15;
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--bg-soft);
  box-shadow: 0 10px 30px rgba(29, 23, 20, 0.01);
}

.media-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--ease);
}

.media-card-content {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(29, 23, 20, 0.85) 0%, rgba(29, 23, 20, 0.25) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  color: #ffffff;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 400ms var(--ease), transform 400ms var(--ease);
}

.media-card:hover img {
  transform: scale(1.04);
}

.media-card:hover .media-card-content {
  opacity: 1;
  transform: translateY(0);
}

.media-card-content h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 4px;
}

.media-card-content p {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.4;
}

/* ============================================================
   LIGHTBOX GALERIE DETAILED
   ============================================================ */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(29, 23, 20, 0.95);
  backdrop-filter: blur(15px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
  transition: opacity 400ms var(--ease);
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: grid;
  place-items: center;
  color: #ffffff;
  transition: background 300ms;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.15);
}

.lightbox-close svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.5;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: grid;
  place-items: center;
  color: #ffffff;
  z-index: 10;
  transition: background 300ms, transform 300ms;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-50%) scale(1.05);
}

.lightbox-prev { left: 40px; }
.lightbox-next { right: 40px; }

.lightbox-body {
  width: 100%;
  max-width: min(1000px, 90vw);
  max-height: 70vh;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-body img {
  display: block;
  max-width: 100%;
  max-height: 70vh;
  width: auto;
  height: auto;
  margin: 0 auto;
}

.lightbox-caption {
  text-align: center;
  margin-top: 24px;
  color: #ffffff;
}

.lightbox-caption h3 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--gold);
}

.lightbox-caption p {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 8px;
  max-width: 600px;
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: var(--fg-main);
  color: #ffffff;
  padding: 80px 0 40px;
  position: relative;
  overflow: hidden;
}

.footer-watermark {
  position: absolute;
  bottom: -20px;
  right: -20px;
  font-family: var(--serif);
  font-size: clamp(8rem, 18vw, 16rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.02);
  line-height: 0.8;
  pointer-events: none;
  user-select: none;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 50px;
}

.footer-brand img {
  width: 180px;
  height: auto;
  opacity: 0.95;
}

.footer-brand p {
  margin-top: 12px;
  font-size: 0.84rem;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.05em;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 0.74rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(255,255,255,0.75);
  transition: color 250ms;
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-fine {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding-top: 30px;
  font-size: 0.74rem;
  color: rgba(255,255,255,0.4);
}

/* ============================================================
   RESPONSIVE DESIGN & MOBILE LAYOUT ADJUSTMENTS
   ============================================================ */

@media (max-width: 1024px) {
  .split, .split-media-left {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .split-media-left .section-copy {
    order: 0;
  }
  .trim-layout, .config-layout, .terrain-stage, .range-layout, .ecosystem-container {
    grid-template-columns: 1fr;
  }
  .config-preview {
    position: static;
    margin-bottom: 30px;
  }
  .media-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .spec-strip-inner {
    grid-template-columns: repeat(3, 1fr);
  }
  .spec-strip article:nth-child(4), .spec-strip article:nth-child(5) {
    border-bottom: 0;
  }
}

@media (max-width: 768px) {
  :root {
    --gutter: 20px;
  }
  body {
    font-size: 16px;
  }
  .site-nav {
    min-height: 70px;
  }
  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    height: 0;
    overflow: hidden;
    flex-direction: column;
    background: var(--bg-card);
    align-items: stretch;
    padding: 0;
    gap: 0;
    transition: height 400ms var(--ease), padding 400ms var(--ease);
    border-bottom: 0 solid var(--hair);
    box-shadow: 0 15px 30px rgba(0,0,0,0.05);
  }
  .nav-links.is-open {
    height: calc(100vh - 70px);
    padding: 20px 0;
    border-bottom-width: 1px;
  }
  .nav-links a {
    padding: 16px var(--gutter);
    border-bottom: 1px solid var(--hair-soft);
    color: var(--fg-main) !important;
    opacity: 0.9;
    font-size: 0.86rem;
  }
  .nav-toggle {
    display: flex;
  }
  .nav-cta {
    display: none;
  }
  .hero-rail {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-rail article {
    padding: 16px var(--gutter);
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .hero-rail article:nth-child(even) {
    border-right: 0;
  }
  .spec-strip-inner {
    grid-template-columns: repeat(2, 1fr);
  }
  .spec-strip article {
    padding: 24px 10px;
  }
  .spec-strip article:nth-child(even) {
    border-right: 0;
  }
  .gps-route-planner {
    grid-template-columns: 1fr;
    height: auto;
  }
  .gps-map-placeholder {
    height: 220px;
  }
  .media-grid {
    grid-template-columns: 1fr;
  }
  .technical-grid {
    grid-template-columns: 1fr;
  }
  .trim-specs {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 8px;
  }
  .trim-features {
    grid-template-columns: 1fr;
  }
  .sahara-body {
    grid-template-columns: 1fr;
  }
  .sahara-sidebar {
    flex-direction: row;
    overflow-x: auto;
    padding: 10px;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .sahara-os-screen.theme-light .sahara-sidebar {
    border-bottom-color: rgba(43, 33, 26, 0.07);
  }
  .sahara-sidebar-btn {
    white-space: nowrap;
    width: auto;
  }
}
