/* =================================================================
   MH DIGITAL STUDIO — style.css
   Design : Luxury Dark Tech
   ================================================================= */

/* --------- 1. VARIABLES CSS --------- */
:root {
  --bg-primary: #0A0A0F;
  --bg-secondary: #111118;
  --bg-card: #16161E;
  --accent-gold: #C9A84C;
  --accent-gold-soft: #E0C778;
  --accent-glow: #6366F1;
  --text-primary: #F0EEE9;
  --text-secondary: #8A8A9A;
  --border: rgba(201, 168, 76, 0.15);
  --border-strong: rgba(201, 168, 76, 0.35);

  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'Space Mono', 'Courier New', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;

  --shadow-soft: 0 12px 40px rgba(0, 0, 0, 0.45);
  --shadow-gold: 0 18px 50px rgba(201, 168, 76, 0.18);

  --max-width: 1280px;
  --nav-height: 88px;

  --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* Polices de secours si l’utilisateur refuse les contenus tiers (Google Fonts, etc.) */
html.mhds-no-media {
  --font-display: Georgia, 'Times New Roman', serif;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Mono', 'Consolas', 'Courier New', monospace;
}

/* --------- 2. RESET & BASE --------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  width: 100%;
  overflow-x: hidden;
}

@supports (overflow: clip) {
  html {
    overflow-x: clip;
  }
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  overflow-wrap: break-word;
}

@supports (overflow: clip) {
  body {
    overflow-x: clip;
  }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul {
  list-style: none;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

::selection {
  background: var(--accent-gold);
  color: var(--bg-primary);
}

/* --------- 3. UTILITAIRES & ÉLÉMENTS GLOBAUX --------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 max(28px, env(safe-area-inset-right, 0px)) 0 max(28px, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}

.gold-text {
  background: linear-gradient(120deg, var(--accent-gold) 0%, var(--accent-gold-soft) 50%, var(--accent-gold) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: italic;
  font-weight: 500;
  animation: shimmer 6s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.section {
  padding: 130px 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 80px;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 18px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 17px;
  max-width: 600px;
  margin: 0 auto;
}

/* --------- 4. BOUTONS --------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 16px 32px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 100px;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  border: 1px solid transparent;
}

.btn i {
  transition: transform var(--transition-fast);
}

.btn:hover i {
  transform: translateX(4px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-soft) 100%);
  color: var(--bg-primary);
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(201, 168, 76, 0.3);
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transition: left 0.7s ease;
}

.btn-primary:hover::after {
  left: 130%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 38px rgba(201, 168, 76, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.btn-outline:hover {
  background: rgba(201, 168, 76, 0.08);
  border-color: var(--accent-gold);
  transform: translateY(-2px);
  color: var(--accent-gold-soft);
}

/* --------- 5. GRAIN, BRUIT & CURSEUR --------- */
.noise-svg {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.06;
  filter: url(#noiseFilter);
  mix-blend-mode: overlay;
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  border-radius: 50%;
  z-index: 9999;
  transform: translate(-50%, -50%);
  will-change: transform;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-gold);
  transition: width 0.2s, height 0.2s, background 0.2s;
}

.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(201, 168, 76, 0.55);
  transition: width 0.25s, height 0.25s, border-color 0.25s, background 0.25s;
}

.cursor-ring.is-hovering {
  width: 64px;
  height: 64px;
  background: rgba(201, 168, 76, 0.08);
  border-color: var(--accent-gold);
}

@media (max-width: 1024px), (pointer: coarse) {
  .cursor-dot,
  .cursor-ring {
    display: none;
  }
}

/* Allègement mobile / tactile (classe posée par main.js) */
html.mhds-mobile-lite .grain {
  opacity: 0.02;
  filter: none;
  mix-blend-mode: normal;
}

html.mhds-mobile-lite .particles {
  display: none !important;
}

html.mhds-mobile-lite .navbar.is-scrolled {
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
}

html.mhds-mobile-lite .mhds-cookie-banner {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

html.mhds-mobile-lite .mhds-cookie-inner {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Allègement Safari (filtres SVG, flous, canvas — coûteux sur WebKit) */
html.mhds-safari-lite .grain {
  opacity: 0.035;
  filter: none;
  mix-blend-mode: normal;
  background-image: radial-gradient(rgba(201, 168, 76, 0.12) 0.6px, transparent 0.6px);
  background-size: 4px 4px;
}

html.mhds-safari-lite .particles {
  display: none !important;
}

html.mhds-safari-lite .hero-mesh .blob {
  filter: blur(56px);
  animation: none;
  will-change: auto;
  transform: translateZ(0);
}

html.mhds-safari-lite .gold-text {
  animation: none;
  background-position: 50% 50%;
}

html.mhds-safari-lite .navbar.is-scrolled,
html.mhds-safari-lite .badge,
html.mhds-safari-lite .service-card,
html.mhds-safari-lite .contact-form,
html.mhds-safari-lite .mhds-cookie-banner,
html.mhds-safari-lite .mhds-cookie-inner {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

html.mhds-safari-lite .navbar.is-scrolled {
  background: rgba(10, 10, 15, 0.94);
}

html.mhds-safari-lite .badge {
  background: rgba(22, 22, 30, 0.92);
}

html.mhds-safari-lite .badge i {
  animation: none;
}

html.mhds-safari-lite .cursor-dot,
html.mhds-safari-lite .cursor-ring {
  display: none;
}

html.mhds-safari-lite .work-card:hover,
html.mhds-safari-lite .service-card:hover {
  transform: translateY(-4px);
}

html.mhds-aos-static [data-aos] {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* Sections hors écran : moins de travail de rendu au scroll */
.services,
.process,
.works,
.about,
.testimonials,
.contact,
.legal {
  content-visibility: auto;
  contain-intrinsic-size: auto 800px;
}

@supports not (content-visibility: auto) {
  .services,
  .process,
  .works,
  .about,
  .testimonials,
  .contact,
  .legal {
    content-visibility: visible;
    contain-intrinsic-size: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .grain,
  .particles,
  .hero-mesh .blob,
  .cursor-dot,
  .cursor-ring {
    display: none !important;
  }

  .gold-text,
  .badge i,
  .hero-mesh .blob {
    animation: none !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------- 6. BARRE DE PROGRESSION SCROLL --------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-glow));
  z-index: 200;
  pointer-events: none;
  transition: width 80ms linear;
}

/* --------- 7. NAVIGATION --------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: transparent;
  transition: background var(--transition), backdrop-filter var(--transition), border-color var(--transition);
  border-bottom: 1px solid transparent;
}

.navbar.is-scrolled {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom-color: var(--border);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-width: 0;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  user-select: none;
}

.nav-logo img {
  height: 64px;
  width: auto;
  filter: drop-shadow(0 6px 18px rgba(201, 168, 76, 0.22));
  transition: transform var(--transition), filter var(--transition);
}

.nav-logo:hover img {
  transform: scale(1.05);
  filter: drop-shadow(0 10px 26px rgba(201, 168, 76, 0.4));
}

@media (max-width: 480px) {
  .nav-logo img { height: 52px; }
}

.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
}

.nav-link {
  position: relative;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  padding: 8px 0;
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent-gold);
  transition: width var(--transition);
}

.nav-link:hover {
  color: var(--accent-gold);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  width: 100%;
}

.nav-link.is-active {
  color: var(--accent-gold);
}

.nav-cta {
  padding: 12px 24px;
  font-size: 14px;
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  position: relative;
  z-index: 115;
}

.burger span {
  display: block;
  width: 28px;
  height: 2px;
  background: var(--text-primary);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
  transform-origin: center;
}

.burger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.is-open span:nth-child(2) {
  opacity: 0;
}

.burger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1024px) {
  .nav-cta {
    display: none;
  }
}

@media (max-width: 768px) {
  .burger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 360px;
    height: 100vh;
    height: 100dvh;
    z-index: 105;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    padding: 80px max(32px, env(safe-area-inset-right, 0px)) 80px max(32px, env(safe-area-inset-left, 0px));
    border-left: 1px solid var(--border);
    transition: right var(--transition-slow);
    -webkit-overflow-scrolling: touch;
  }

  .nav-links.is-open {
    right: 0;
  }

  .nav-links .nav-link {
    position: relative;
    z-index: 1;
    touch-action: manipulation;
  }

  .nav-link {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 500;
  }
}

/* --------- 8. HERO --------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-height) + 60px) 0 80px;
  overflow: hidden;
  isolation: isolate;
}

.particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-mesh {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.hero-mesh .blob {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.45;
  will-change: transform;
}

.blob-1 {
  background: radial-gradient(circle, rgba(201, 168, 76, 0.45) 0%, transparent 70%);
  top: -10%;
  left: -10%;
  animation: floatBlob 22s ease-in-out infinite;
}

.blob-2 {
  background: radial-gradient(circle, rgba(99, 102, 241, 0.35) 0%, transparent 70%);
  bottom: -15%;
  right: -10%;
  animation: floatBlob 28s ease-in-out infinite reverse;
}

.blob-3 {
  background: radial-gradient(circle, rgba(201, 168, 76, 0.25) 0%, transparent 70%);
  top: 40%;
  left: 50%;
  width: 500px;
  height: 500px;
  animation: floatBlob 18s ease-in-out infinite;
}

@keyframes floatBlob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(60px, -80px) scale(1.08); }
  66% { transform: translate(-50px, 60px) scale(0.95); }
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center bottom, rgba(10, 10, 15, 0) 0%, var(--bg-primary) 90%);
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-gold-soft);
  margin-bottom: 36px;
  max-width: 100%;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
}

.badge i {
  color: var(--accent-gold);
  animation: spinSlow 8s linear infinite;
}

@keyframes spinSlow {
  to { transform: rotate(360deg); }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(52px, 8vw, 96px);
  line-height: 1.09;
  letter-spacing: -0.02em;
  max-width: 1100px;
  margin-bottom: 28px;
}

.hero-title .gold-text {
  display: inline-block;
  padding-bottom: 0.06em;
}

.hero-subtitle {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--text-secondary);
  max-width: 640px;
  margin-bottom: 48px;
  letter-spacing: 0.01em;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.scroll-indicator {
  position: absolute;
  bottom: 1px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 2;
  opacity: 0.7;
  transition: opacity var(--transition);
}

.scroll-indicator:hover {
  opacity: 1;
}

.mouse {
  width: 24px;
  height: 38px;
  border: 1.5px solid var(--accent-gold);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.wheel {
  width: 3px;
  height: 8px;
  background: var(--accent-gold);
  border-radius: 3px;
  animation: wheel 1.6s ease-in-out infinite;
}

@keyframes wheel {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(12px); opacity: 0; }
}

.scroll-text {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* --------- 9. SERVICES --------- */
.services {
  background: var(--bg-secondary);
  position: relative;
}

.services::before,
.services::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  max-width: 600px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

.services::before { top: 0; }
.services::after { bottom: 0; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  position: relative;
  padding: 44px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
  overflow: hidden;
  isolation: isolate;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.08), transparent 50%);
  opacity: 0;
  transition: opacity var(--transition);
  z-index: -1;
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-gold);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.12), rgba(201, 168, 76, 0.04));
  color: var(--accent-gold);
  border: 1px solid var(--border);
  margin-bottom: 24px;
  transition: all var(--transition);
}

.service-card:hover .service-icon {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-soft));
  color: var(--bg-primary);
  transform: rotate(-6deg) scale(1.05);
}

.service-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 26px;
  margin-bottom: 12px;
}

.service-desc {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.65;
}

.service-num {
  position: absolute;
  top: 24px;
  right: 28px;
  font-family: var(--font-display);
  font-size: 60px;
  font-weight: 500;
  color: var(--accent-gold);
  opacity: 0.07;
  line-height: 1;
}

@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* --------- 10. PROCESS --------- */
.process {
  background: var(--bg-primary);
}

.process-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding-top: 40px;
}

.process-line {
  position: absolute;
  top: 75px;
  left: 8%;
  width: 84%;
  height: 4px;
  z-index: 0;
  pointer-events: none;
}

.process-line-bg {
  stroke: var(--border);
  stroke-width: 1.5;
  fill: none;
  stroke-dasharray: 6 8;
}

.process-line-fg {
  stroke: var(--accent-gold);
  stroke-width: 2;
  fill: none;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  filter: drop-shadow(0 0 8px rgba(201, 168, 76, 0.5));
  transition: stroke-dashoffset 1.6s ease-out;
}

.process-step {
  position: relative;
  text-align: center;
  padding: 0 12px;
}

.process-num {
  font-family: var(--font-display);
  font-size: 92px;
  font-weight: 500;
  color: var(--accent-gold);
  opacity: 0.1;
  line-height: 1;
  display: block;
  margin-bottom: 12px;
}

.process-dot {
  position: relative;
  width: 18px;
  height: 18px;
  margin: 0 auto 28px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--accent-gold);
  z-index: 1;
}

.process-dot::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--accent-gold);
  transform: scale(0);
  transition: transform var(--transition);
}

.process-step:hover .process-dot::after {
  transform: scale(1);
}

.process-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  margin-bottom: 10px;
}

.process-desc {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .process-timeline {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .process-line { display: none; }
  .process-step { padding-left: 56px; text-align: left; position: relative; }
  .process-step .process-num { font-size: 64px; }
  .process-step .process-dot {
    position: absolute;
    left: 14px;
    top: 30px;
    margin: 0;
  }
}

/* --------- 11. WORKS --------- */
.works {
  background: var(--bg-secondary);
  position: relative;
}

.works-filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 22px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-secondary);
  background: transparent;
  transition: all var(--transition);
}

.filter-btn:hover {
  color: var(--accent-gold);
  border-color: var(--border-strong);
}

.filter-btn.is-active {
  background: var(--accent-gold);
  color: var(--bg-primary);
  border-color: var(--accent-gold);
  font-weight: 600;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.work-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.work-card.is-hidden {
  display: none;
}

.work-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
}

.work-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  flex-shrink: 0;
}

.work-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}

.work-card:hover .work-image img {
  transform: scale(1.06);
}

.work-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 15, 0.1) 0%, rgba(10, 10, 15, 0.85) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 32px;
  opacity: 0;
  transition: opacity var(--transition);
}

.work-card:hover .work-overlay {
  opacity: 1;
}

.work-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: var(--accent-gold);
  color: var(--bg-primary);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  transform: translateY(20px);
  transition: transform var(--transition);
}

.work-card:hover .work-link {
  transform: translateY(0);
}

.work-info {
  padding: 22px 26px 26px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.work-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-gold);
}

.work-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.2;
}

@media (max-width: 1024px) {
  .works-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .works-grid { grid-template-columns: 1fr; }
}

/* --------- 12. ABOUT --------- */
.about {
  background: var(--bg-primary);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-text .section-title {
  text-align: left;
  margin-bottom: 24px;
}

.about-paragraph {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 32px;
}

.values {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 40px;
}

.values li {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  transition: border-color var(--transition);
}

.values li:hover {
  border-color: var(--border-strong);
}

.values li i {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(201, 168, 76, 0.1);
  color: var(--accent-gold);
  flex-shrink: 0;
  font-size: 14px;
}

.values li strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 20px;
  display: block;
  margin-bottom: 2px;
}

.values li span {
  color: var(--text-secondary);
  font-size: 14px;
}

.about-side {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.about-visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

.about-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.2) contrast(1.05);
}

.about-brand-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 5vw, 44px);
  background:
    radial-gradient(circle at top, rgba(201, 168, 76, 0.18), transparent 45%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
    var(--bg-card);
}

.about-brand-visual img {
  width: min(78%, 360px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.35));
}

.about-frame {
  position: absolute;
  inset: 14px;
  border: 1px solid var(--accent-gold);
  border-radius: calc(var(--radius-lg) - 8px);
  pointer-events: none;
  opacity: 0.7;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.stat {
  padding: 24px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  text-align: center;
  transition: border-color var(--transition);
}

.stat:hover {
  border-color: var(--accent-gold);
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 44px;
  line-height: 1;
  color: var(--accent-gold);
  margin-bottom: 6px;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 56px; }
  .about-side { gap: 24px; }
}

/* --------- 13. TESTIMONIALS --------- */
.testimonials {
  background: var(--bg-secondary);
}

.testimonials-track {
  display: grid;
  /* Mobile / tablette : une colonne par défaut (évite 3 cartes écrasées) */
  grid-template-columns: 1fr;
  gap: 24px;
  width: 100%;
  min-width: 0;
}

@media (min-width: 1200px) {
  .testimonials-track {
    grid-template-columns: repeat(3, 1fr);
  }
}

.testimonial-card {
  padding: 36px 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.testimonial-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-6px);
  box-shadow: var(--shadow-gold);
}

.stars {
  color: var(--accent-gold);
  display: flex;
  gap: 4px;
  font-size: 14px;
}

.testimonial-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-primary);
  flex-grow: 1;
  word-break: normal;
  overflow-wrap: break-word;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 1.5px solid var(--accent-gold);
  flex-shrink: 0;
}

.testimonial-author strong {
  display: block;
  font-weight: 600;
  font-size: 15px;
}

.testimonial-author span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.testimonials-bullets {
  display: none;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}

.testimonials-bullets button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(201, 168, 76, 0.25);
  transition: all var(--transition);
}

.testimonials-bullets button.is-active {
  background: var(--accent-gold);
  width: 32px;
  border-radius: 6px;
}

/* --------- 14. CONTACT --------- */
.contact {
  background: var(--bg-primary);
  position: relative;
}

.contact::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 50%;
  width: 80%;
  max-width: 800px;
  height: 400px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(201, 168, 76, 0.08), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.contact-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 56px;
  align-items: stretch;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.info-item i {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(201, 168, 76, 0.1);
  color: var(--accent-gold);
  flex-shrink: 0;
  font-size: 16px;
}

.info-item strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 4px;
  font-weight: 400;
}

.info-item a,
.info-item span {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}

.info-item a:hover {
  color: var(--accent-gold);
}

.socials {
  display: flex;
  gap: 12px;
  margin-top: auto;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.socials a {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 14px;
  transition: all var(--transition);
}

.socials a:hover {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: var(--bg-primary);
  transform: translateY(-3px);
}

.contact-form {
  padding: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: border-color var(--transition-fast), background var(--transition-fast);
  width: 100%;
}

.form-group textarea {
  resize: vertical;
  min-height: 130px;
  font-family: inherit;
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='%23C9A84C'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px 8px;
  padding-right: 40px;
}

.form-group select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent-gold);
  background: rgba(201, 168, 76, 0.04);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(138, 138, 154, 0.55);
}

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 1px !important;
  height: 1px !important;
}

.btn-submit {
  align-self: flex-start;
  margin-top: 8px;
}

.form-status {
  font-size: 14px;
  min-height: 20px;
  font-family: var(--font-mono);
}

.form-status.is-success { color: var(--accent-gold); }
.form-status.is-error { color: #ef4444; }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .form-row { grid-template-columns: 1fr; }
  .contact-info,
  .contact-form { padding: 28px; }
}

/* --------- 15. FOOTER --------- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding-top: 72px;
}

.footer-container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 48px;
  align-items: center;
  padding-bottom: 56px;
}

.footer-brand img {
  height: 88px;
  width: auto;
  margin-bottom: 16px;
  filter: drop-shadow(0 8px 22px rgba(201, 168, 76, 0.18));
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 14px;
}

.footer-brand .heart {
  color: var(--accent-gold);
  display: inline-block;
  animation: heartbeat 1.4s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.footer-nav {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

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

.footer-socials {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.footer-socials a {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  transition: all var(--transition-fast);
}

.footer-socials a:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 22px 0;
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-secondary);
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

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

.footer-cookie-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-cookie-btn:hover {
  color: var(--accent-gold);
}

/* Bandeau consentement cookies — modale centrée */
.mhds-cookie-banner {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: rgba(10, 10, 15, 0.58);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.mhds-cookie-inner {
  display: grid;
  gap: 10px;
  width: min(420px, 100%);
  max-width: 100%;
  max-height: min(90vh, 520px);
  overflow-y: auto;
  padding: 18px 20px 20px;
  background: rgba(17, 17, 24, 0.96);
  border: 1px solid rgba(201, 168, 76, 0.18);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.mhds-cookie-title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(138, 138, 154, 0.95);
  text-align: center;
}

.mhds-cookie-text {
  font-size: 12.5px;
  line-height: 1.55;
  color: rgba(240, 238, 233, 0.78);
  margin: 0;
}

.mhds-cookie-text a {
  color: rgba(201, 168, 76, 0.85);
  text-decoration: underline;
  text-decoration-color: rgba(201, 168, 76, 0.35);
  text-underline-offset: 2px;
  transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}

.mhds-cookie-text a:hover {
  color: var(--accent-gold-soft);
  text-decoration-color: rgba(224, 199, 120, 0.55);
}

.mhds-cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.mhds-cookie-actions .mhds-cookie-btn {
  min-height: 36px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 500;
  gap: 0;
  letter-spacing: 0.01em;
  border-radius: 8px;
  box-shadow: none;
  transform: none;
}

.mhds-cookie-actions .mhds-cookie-btn:hover {
  transform: none;
}

.mhds-cookie-actions .btn-primary {
  box-shadow: 0 2px 12px rgba(201, 168, 76, 0.18);
}

.mhds-cookie-actions .btn-primary:hover {
  box-shadow: 0 3px 16px rgba(201, 168, 76, 0.24);
}

.mhds-cookie-actions .btn-outline {
  border-color: rgba(201, 168, 76, 0.22);
  color: rgba(240, 238, 233, 0.85);
}

.mhds-cookie-actions .btn-outline:hover {
  transform: none;
  background: rgba(201, 168, 76, 0.06);
}

.mhds-cookie-link {
  background: none;
  border: none;
  padding: 6px 0 0;
  font: inherit;
  font-size: 11.5px;
  color: rgba(138, 138, 154, 0.95);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  justify-self: center;
  width: 100%;
  text-align: center;
}

.mhds-cookie-link:hover {
  color: var(--accent-gold);
}

@media (max-width: 480px) {
  .mhds-cookie-inner {
    width: 100%;
    padding: 16px 16px 18px;
  }
}

@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 32px;
  }
  .footer-socials,
  .footer-nav { justify-content: center; }
  .footer-bottom-inner { justify-content: center; text-align: center; }
}

/* --------- 16. BACK TO TOP --------- */
.back-to-top {
  position: fixed;
  bottom: max(28px, env(safe-area-inset-bottom, 0px));
  right: max(28px, env(safe-area-inset-right, 0px));
  width: 48px;
  height: 48px;
  background: var(--accent-gold);
  color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 16px;
  z-index: 90;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all var(--transition);
  box-shadow: var(--shadow-gold);
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--accent-gold-soft);
  transform: translateY(-4px);
}

/* --------- 17. RESPONSIVE GLOBAL --------- */
@media (max-width: 768px) {
  .section { padding: 90px 0; }
  .section-header { margin-bottom: 56px; }
  .container { padding: 0 max(20px, env(safe-area-inset-right, 0px)) 0 max(20px, env(safe-area-inset-left, 0px)); }
  .hero-ctas { flex-direction: column; width: 100%; max-width: 320px; }
  .hero-ctas .btn { width: 100%; }
  .services-grid,
  .works-grid,
  .about-grid,
  .contact-grid {
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .section { padding: 72px 0; }
  .btn {
    white-space: normal;
    text-align: center;
    line-height: 1.35;
  }
}

/* --------- 18. PAGES DE CONTENU (Légal / RGPD) --------- */
.page-hero {
  position: relative;
  padding: calc(var(--nav-height) + 100px) 0 80px;
  text-align: center;
  background: var(--bg-secondary);
  overflow: hidden;
  isolation: isolate;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 800px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(201, 168, 76, 0.08), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.page-hero::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 60%;
  max-width: 600px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

.page-hero-content {
  max-width: 820px;
}

.page-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(44px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 16px 0 22px;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.7;
  max-width: 660px;
  margin: 0 auto;
}

.page-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-top: 28px;
  opacity: 0.75;
}

.legal {
  padding: 100px 0 130px;
  background: var(--bg-primary);
  position: relative;
}

.legal-container {
  max-width: 880px;
  display: flex;
  flex-direction: column;
  gap: 56px;
  min-width: 0;
  width: 100%;
}

.legal-section {
  position: relative;
  padding: 36px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition);
  scroll-margin-top: calc(var(--nav-height) + 24px);
  min-width: 0;
  max-width: 100%;
}

.legal-section:hover {
  border-color: var(--border-strong);
}

.legal-section h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--text-primary);
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.legal-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent-gold);
  background: rgba(201, 168, 76, 0.08);
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.legal-section p {
  color: var(--text-secondary);
  font-size: 15.5px;
  line-height: 1.8;
  margin-bottom: 14px;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-section p strong {
  color: var(--text-primary);
  font-weight: 500;
}

.legal-section a {
  color: var(--accent-gold);
  text-decoration: none;
  border-bottom: 1px dashed rgba(201, 168, 76, 0.4);
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.legal-section a:hover {
  color: var(--accent-gold-soft);
  border-bottom-color: var(--accent-gold-soft);
}

.legal-table-wrap {
  overflow-x: auto;
  margin: 16px 0 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.legal-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.55;
  background: var(--bg-secondary);
}

.legal-table th,
.legal-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

.legal-table th {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-gold);
  background: rgba(201, 168, 76, 0.06);
}

.legal-table tbody tr:last-child th,
.legal-table tbody tr:last-child td {
  border-bottom: none;
}

.legal-table code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-primary);
  word-break: break-all;
}

.legal-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legal-list li {
  position: relative;
  padding: 14px 18px 14px 44px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

.legal-list li::before {
  content: '◆';
  position: absolute;
  left: 18px;
  top: 14px;
  color: var(--accent-gold);
  font-size: 10px;
}

.legal-list li strong {
  color: var(--text-primary);
  font-weight: 500;
}

.legal-info,
.legal-glossary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 8px;
}

.legal-info > div,
.legal-glossary > div {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  align-items: baseline;
}

.legal-info dt,
.legal-glossary dt {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-gold);
}

.legal-info dd,
.legal-glossary dd {
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

.legal-glossary dd {
  color: var(--text-secondary);
  font-size: 14.5px;
}

.legal-subtitle {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: 0.005em;
  color: var(--accent-gold-soft);
  margin: 22px 0 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.legal-subtitle i {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(201, 168, 76, 0.1);
  color: var(--accent-gold);
  font-size: 13px;
  flex-shrink: 0;
}

.rights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 18px 0 22px;
}

.right-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 22px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color var(--transition), transform var(--transition-fast);
  position: relative;
}

.right-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.right-card i {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(201, 168, 76, 0.1);
  color: var(--accent-gold);
  font-size: 14px;
  margin-bottom: 4px;
}

.right-card strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  color: var(--text-primary);
}

.right-card span {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.legal-callout {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 22px 24px;
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.08), rgba(99, 102, 241, 0.04));
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  margin-top: 24px;
  transition: border-color var(--transition), transform var(--transition-fast);
}

.legal-callout > i {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(201, 168, 76, 0.12);
  color: var(--accent-gold);
  font-size: 17px;
  flex-shrink: 0;
}

.legal-callout > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.legal-callout strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  color: var(--text-primary);
}

.legal-callout span {
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.55;
}

.legal-callout small {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-top: 6px;
  opacity: 0.85;
}

.legal-callout small strong {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-gold);
}

.legal-callout-link {
  text-decoration: none;
  cursor: pointer;
}

.legal-callout-link:hover {
  border-color: var(--accent-gold);
  transform: translateY(-2px);
}

.legal-callout-link span i {
  font-size: 11px;
  margin-left: 4px;
  color: var(--accent-gold);
}

.legal-back {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.legal-back .btn i {
  transition: transform var(--transition-fast);
}

.legal-back .btn:hover i {
  transform: translateX(-4px);
}

@media (max-width: 768px) {
  .page-hero { padding: calc(var(--nav-height) + 60px) 0 60px; }
  .legal { padding: 64px 0 90px; }
  .legal-container { gap: 36px; }
  .legal-section { padding: 26px 22px; }
  .legal-section h2 {
    font-size: 22px;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 18px;
  }
  .legal-info > div,
  .legal-glossary > div {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 14px 16px;
  }
  .rights-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .right-card { padding: 16px 18px; }
  .legal-callout {
    flex-direction: column;
    gap: 12px;
    padding: 18px 20px;
  }
  .legal-subtitle {
    font-size: 17px;
    gap: 10px;
  }
}

/* --------- 19. ACCESSIBILITY & PRINT --------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 3px;
  border-radius: 4px;
}
