/* ═══════════════════════════════════════════════════════════
   shared.css — Dysa Studio
   Styles globaux partagés par toutes les pages
   ═══════════════════════════════════════════════════════════ */

/* ─── VARIABLES ──────────────────────────────────────────── */
:root {
  --dark:       #0a0402;
  --cream:      #fffbf8;
  --terracotta: #ea8760;
  --terra-l:    #f0a882;
  --bordeaux:   #6b1a1a;
  --text-muted: rgba(255, 251, 248, 0.45);
  --text-light: rgba(255, 251, 248, 0.85);
  --text-dark:  rgba(26, 10, 8, 0.85);
  --bg-card:    rgba(255, 255, 255, 0.04);
  --border:     rgba(255, 255, 255, 0.09);
  --green:      #002127;

  --font-title: "Bricolage Grotesque", sans-serif;
  --font-body:  "DM Sans", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--dark);
  color: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  cursor: none;
}

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

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

ul {
  list-style: none;
}

/* ─── CURSEUR PERSONNALISÉ ───────────────────────────────── */
#cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  background: var(--terracotta);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease, opacity 0.2s ease;
  top: 0;
  left: 0;
}
#cursor-ring {
  position: fixed;
  width: 32px;
  height: 32px;
  border: 1.5px solid rgba(234, 135, 96, 0.55);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease, opacity 0.2s ease;
  top: 0;
  left: 0;
}
#cursor-ring.hovering {
  width: 48px;
  height: 48px;
  border-color: var(--terracotta);
}
@media (pointer: coarse) {
  #cursor-dot, #cursor-ring { display: none; }
  body { cursor: auto; }
  a, button { cursor: pointer; }
}

/* ─── LOADER ─────────────────────────────────────────────── */
#loader {
  position: fixed;
  inset: 0;
  background: var(--dark);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transition: opacity 0.6s ease;
}
#loader.done {
  opacity: 0;
  pointer-events: none;
}
#loader-logo img {
  height: 48px;
  opacity: 0.9;
}
#loader-bar-track {
  width: 160px;
  height: 1px;
  background: rgba(255, 251, 248, 0.1);
  border-radius: 1px;
  overflow: hidden;
}
#loader-bar {
  height: 100%;
  width: 0%;
  background: var(--terracotta);
  border-radius: 1px;
  transition: width 0.3s ease;
}
#loader-pct {
  font-family: var(--font-title);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: rgba(255, 251, 248, 0.3);
}

/* ─── PAGE OVERLAY (transitions entre pages) ─────────────── */
#page-overlay {
  position: fixed;
  inset: 0;
  background: var(--dark);
  z-index: 9000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s ease;
}
#page-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ─── NAVBAR ─────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  background: rgba(100, 100, 100, 0.25);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 100px;
  padding: 1.3rem 2.5rem 1.3rem 2.2rem;
  min-width: 900px;
  max-width: 1150px;
  width: fit-content;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  opacity: 0;
}
#navbar.scrolled {
  background: rgba(80, 80, 80, 0.40);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
}

/* ─── NAVBAR SUR FOND CLAIR ─── */
#navbar.on-light {
  background: rgba(255, 251, 248, 0.75);
  border-color: rgba(10, 4, 2, 0.1);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
}
#navbar.on-light .nav-links a {
  color: rgba(10, 4, 2, 0.65);
}
#navbar.on-light .nav-links a:hover {
  color: var(--terracotta);
}
#navbar.on-light .nav-logo img {
  filter: brightness(0) saturate(100%) invert(40%) sepia(60%) saturate(500%) hue-rotate(340deg);
}
#navbar.on-light .nav-hamburger span {
  background: var(--terracotta);
}
.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}
.nav-logo img {
  height: 36px;
  filter: drop-shadow(0 1px 6px rgba(0,0,0,0.4));
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  list-style: none;
  flex: 1;
  justify-content: center;
}
.nav-links a {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  padding: 0.55rem 1.1rem;
  background: none;
  position: relative;
  transition: color 0.25s;
  white-space: nowrap;
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1.5px;
  background: var(--terracotta);
  transition: width 0.3s ease;
}
.nav-links a:hover::after {
  width: 60%;
}
.nav-links a:hover {
  color: var(--cream);
}
.nav-links a.active {
  color: var(--cream);
}
.nav-links a.active::after {
  width: 0;
}
.nav-cta {
  background: var(--terracotta);
  color: var(--cream) !important;
  padding: 0.6rem 1.3rem;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: background 0.25s, transform 0.2s, box-shadow 0.25s;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-block;
}
.nav-cta:hover {
  background: var(--terra-l);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(234, 135, 96, 0.35);
}
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: none;
  padding: 6px;
  pointer-events: all;
}
.nav-hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--cream);
  border-radius: 2px;
  transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.3s ease;
}

/* ─── HAMBURGER → CROIX ─── */
.nav-hamburger.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ─── MENU MOBILE ────────────────────────────────────────── */
#mobileMenu {
  position: fixed;
  inset: 0;
  background: var(--dark);
  z-index: 999;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.77, 0, 0.175, 1);
  overflow-y: auto;
}
#mobileMenu.open {
  transform: translateX(0);
}
.mobile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 251, 248, 0.06);
  margin-bottom: 2rem;
}
.mobile-brand {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--cream);
}
.mobile-close {
  background: rgba(255, 251, 248, 0.07);
  border: none;
  color: var(--cream);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mobile-nav-links {
  list-style: none;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.mobile-nav-links a {
  font-family: var(--font-title);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: rgba(255, 251, 248, 0.35);
  text-decoration: none;
  display: block;
  padding: 0.5rem 0;
  transition: color 0.25s;
}
.mobile-nav-links a:hover,
.mobile-nav-links a.active {
  color: var(--cream);
}
.mobile-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 251, 248, 0.06);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.mobile-cta {
  display: block;
  background: var(--terracotta);
  color: var(--cream);
  text-align: center;
  padding: 1rem;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: background 0.25s;
}
.mobile-cta:hover { background: var(--terra-l); }
.mobile-socials {
  display: flex;
  gap: 1rem;
  justify-content: center;
}
.mobile-social {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 251, 248, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 251, 248, 0.5);
  transition: border-color 0.25s, color 0.25s;
}
.mobile-social:hover {
  border-color: var(--terracotta);
  color: var(--terracotta);
}

/* ─── FOOTER ─────────────────────────────────────────────── */
footer {
  background: var(--dark);
  border-top: 1px solid rgba(255, 251, 248, 0.06);
  padding: 2.5rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.footer-logo img {
  height: 28px;
  opacity: 0.7;
  transition: opacity 0.25s;
}
.footer-logo:hover img { opacity: 1; }
.footer-copy {
  font-size: 0.72rem;
  color: rgba(255, 251, 248, 0.25);
  letter-spacing: 0.04em;
}
.footer-socials {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}
.footer-social {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 251, 248, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 251, 248, 0.4);
  transition: border-color 0.25s, color 0.25s;
}
.footer-social:hover {
  border-color: var(--terracotta);
  color: var(--terracotta);
}

/* ─── LOGO & HAMBURGER BULLES MOBILE (partagé toutes pages) ─ */
@media (max-width: 768px) {
  /* Masquer la navbar pill — fond, bordure, liens, CTA */
  #navbar {
    background: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
    min-width: 0 !important;
    padding: 0 !important;
    pointer-events: none;
  }
  #navbar .nav-links,
  #navbar .nav-cta {
    display: none !important;
  }
  #navbar .logo-bubble {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-60px);
    width: 52px; height: 52px;
    border-radius: 50%;
    background: rgba(255, 251, 248, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 251, 248, 0.15);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    display: flex; align-items: center; justify-content: center;
    padding: 0; z-index: 1001; pointer-events: all;
  }
  #navbar .logo-bubble img { height: 30px; }
  #navbar .ham-bubble {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(8px);
    width: 52px; height: 52px;
    border-radius: 50%;
    background: rgba(255, 251, 248, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 251, 248, 0.15);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    display: flex; align-items: center; justify-content: center;
    padding: 0; z-index: 9999; pointer-events: all;
  }

  /* sur fond clair (offres, portfolio, etc.) */
  #navbar.on-light .logo-bubble,
  #navbar.on-light .ham-bubble {
    background: rgba(255, 251, 248, 0.85);
    border-color: rgba(10, 4, 2, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  }
  #navbar.on-light .ham-bubble span {
    background: var(--terracotta);
  }
}

/* ─── UTILITAIRES ────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
