/* =========================================================
   CODE PHANTOM — 2026
   Design sombre / lumière / architecture
   Menu desktop et menu mobile volontairement séparés
   ========================================================= */

:root {
  --bg: #090909;
  --bg-soft: #111111;
  --panel: #151515;
  --panel-2: #1b1b1b;
  --text: #f4f1ea;
  --muted: #a9a49b;
  --line: rgba(255,255,255,.12);
  --accent: #d8c8aa;
  --accent-strong: #f0dfbe;
  --max: 1240px;
  --radius: 20px;
  --shadow: 0 24px 80px rgba(0,0,0,.42);
  --header-h: 92px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.mobile-menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }

.container {
  width: min(calc(100% - 42px), var(--max));
  margin-inline: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .72rem;
  color: var(--accent);
  font-weight: 700;
}
.eyebrow::before { content: ""; width: 34px; height: 1px; background: currentColor; }

h1, h2, h3 { margin: 0 0 .7em; line-height: 1.06; font-weight: 500; letter-spacing: -.035em; }
h1 { font-size: clamp(3.2rem, 9vw, 8.6rem); }
h2 { font-size: clamp(2.15rem, 5vw, 4.8rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.7rem); }
p { margin: 0 0 1.1em; }
.lead { font-size: clamp(1.22rem, 2.2vw, 1.75rem); line-height: 1.55; color: #dfdbd3; }
.muted { color: var(--muted); }
.strong-line { font-size: clamp(1.55rem, 3vw, 2.75rem); line-height: 1.25; max-width: 880px; margin-top: 30px; }

/* ========================= HEADER ========================= */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 3000;
  height: var(--header-h);
  background: linear-gradient(to bottom, rgba(9,9,9,.97), rgba(9,9,9,.86) 72%, rgba(9,9,9,.55));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.brand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
  letter-spacing: .16em;
  font-weight: 800;
  font-size: .98rem;
  white-space: nowrap;
}
.brand span:last-child {
  margin-top: 5px;
  font-size: .64rem;
  letter-spacing: .26em;
  color: var(--muted);
  font-weight: 500;
}

.desktop-nav { display: flex; align-items: center; gap: 28px; }
.desktop-nav > a,
.desktop-drop-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 12px 0;
  color: #d8d4cc;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
}
.desktop-nav > a:hover,
.desktop-drop-toggle:hover,
.desktop-nav .active { color: var(--accent-strong); }
.desktop-drop { position: relative; }
.desktop-drop-toggle::after { content: " +"; color: var(--accent); }
.desktop-drop-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: -22px;
  min-width: 220px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(18,18,18,.99);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}
.desktop-drop-menu a { display: block; padding: 10px 12px; border-radius: 9px; color: #d6d1c8; font-size: .9rem; }
.desktop-drop-menu a:hover { background: rgba(255,255,255,.06); color: #fff; }
.desktop-drop:hover .desktop-drop-menu,
.desktop-drop:focus-within .desktop-drop-menu { opacity: 1; visibility: visible; transform: translateY(0); }

.mobile-menu-toggle {
  display: none;
  position: relative;
  z-index: 3100;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.035);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mobile-menu-toggle span {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 1px;
  background: #fff;
  transition: transform .25s ease, top .25s ease;
}
.mobile-menu-toggle span:first-child { top: 20px; }
.mobile-menu-toggle span:last-child { top: 27px; }
.mobile-menu-toggle.is-open span:first-child { top: 23px; transform: rotate(45deg); }
.mobile-menu-toggle.is-open span:last-child { top: 23px; transform: rotate(-45deg); }

/* Menu mobile hors du header : aucun parent ne peut le masquer */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2500;
  background:
    radial-gradient(circle at 80% 17%, rgba(216,200,170,.13), transparent 24%),
    #090909;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-12px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.mobile-nav.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.mobile-nav-inner {
  min-height: 100%;
  padding-top: calc(var(--header-h) + 22px + env(safe-area-inset-top));
  padding-bottom: calc(32px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}
.mobile-nav-links { border-top: 1px solid var(--line); }
.mobile-nav-links > a,
.mobile-solutions-toggle {
  width: 100%;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
  font-size: clamp(1.35rem, 6vw, 2.15rem);
  line-height: 1.1;
  letter-spacing: -.025em;
  cursor: pointer;
}
.mobile-nav-links > a.active,
.mobile-solutions.active > .mobile-solutions-toggle { color: var(--accent); }
.mobile-arrow { color: var(--accent); font-size: 1.05rem; font-weight: 400; }
.mobile-plus { color: var(--accent); font-size: 1.8rem; font-weight: 300; transition: transform .25s ease; }
.mobile-solutions.is-open .mobile-plus { transform: rotate(45deg); }
.mobile-submenu {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .28s ease;
  border-bottom: 1px solid var(--line);
}
.mobile-submenu::before { content: ""; min-height: 0; }
.mobile-solutions.is-open .mobile-submenu { grid-template-rows: 1fr; }
.mobile-submenu { overflow: hidden; }
.mobile-submenu a {
  display: block;
  padding: 10px 0 10px 24px;
  color: var(--muted);
  font-size: 1rem;
  letter-spacing: .02em;
}
.mobile-submenu a:first-child { padding-top: 18px; }
.mobile-submenu a:last-child { padding-bottom: 20px; }
.mobile-submenu a:hover { color: #fff; }
.mobile-nav-foot {
  margin-top: auto;
  padding-top: 38px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: #777;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ========================= HERO ========================= */
.hero {
  min-height: 100svh;
  display: grid;
  align-items: end;
  position: relative;
  overflow: hidden;
  padding: 150px 0 74px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 20%, rgba(219,190,135,.17), transparent 24%),
    radial-gradient(circle at 82% 66%, rgba(255,255,255,.08), transparent 14%),
    linear-gradient(118deg, transparent 0 52%, rgba(232,219,190,.09) 52% 53%, transparent 53% 100%),
    linear-gradient(135deg, #060606 0%, #0e0e0e 55%, #17130e 100%);
}
.hero::after {
  content: "";
  position: absolute;
  width: 54vw;
  height: 125vh;
  top: -28vh;
  right: 2vw;
  background: linear-gradient(180deg, rgba(255,242,204,.30), rgba(255,255,255,.025) 55%, transparent 78%);
  transform: rotate(26deg);
  filter: blur(2px);
  opacity: .5;
  pointer-events: none;
}
.hero .container { position: relative; z-index: 2; }
.hero h1 { max-width: 1100px; }
.hero h1 em { display: block; font-style: normal; color: var(--accent); }
.hero-copy { max-width: 780px; margin: 30px 0 0 auto; }
.hero-actions { display:flex; gap:14px; flex-wrap:wrap; margin-top: 32px; }

.page-hero {
  padding: 180px 0 88px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 78% 25%, rgba(216,200,170,.12), transparent 25%),
    linear-gradient(135deg,#090909,#11100e);
}
.page-hero h1 { font-size: clamp(3.3rem, 8vw, 7.1rem); max-width: 1100px; }
.page-hero .lead { max-width: 850px; }

/* ========================= BUTTONS ========================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: .78rem;
  letter-spacing: .11em;
  text-transform: uppercase;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.28); }
.btn-primary { background: var(--text); color: #111; border-color: var(--text); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-link { border: 0; padding-inline: 0; border-radius: 0; border-bottom: 1px solid var(--accent); }

/* ========================= SECTIONS ========================= */
.section { padding: 110px 0; }
.section-sm { padding: 76px 0; }
.section-line { border-top: 1px solid var(--line); }
.section-intro { display: grid; grid-template-columns: .7fr 1.3fr; gap: 70px; align-items: start; margin-bottom: 64px; }
.section-intro .copy { max-width: 760px; }
.grid-2 { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 22px; }
.grid-3 { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 22px; }
.grid-4 { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; }
.grid-5 { display:grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 14px; }
.card {
  min-height: 260px;
  padding: 28px;
  background: linear-gradient(150deg, rgba(255,255,255,.055), rgba(255,255,255,.018));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.card::after { content: ""; position:absolute; width:170px; height:170px; right:-90px; bottom:-100px; border-radius:50%; background:rgba(216,200,170,.14); filter:blur(24px); }
.card .num { color: var(--accent); font-size: .78rem; letter-spacing:.18em; margin-bottom: 40px; display:block; }
.card p { color: var(--muted); }
.card .arrow { position:absolute; right:24px; bottom:22px; font-size: 1.3rem; color:var(--accent); }
a.card { transition: transform .25s ease, border-color .25s ease; }
a.card:hover { transform: translateY(-5px); border-color: rgba(216,200,170,.42); }
.process { counter-reset: step; }
.process-item { display:grid; grid-template-columns:86px 1fr 1.35fr; gap:24px; padding:28px 0; border-top:1px solid var(--line); align-items:baseline; }
.process-item:last-child { border-bottom:1px solid var(--line); }
.process-item::before { counter-increment:step; content:"0" counter(step); color:var(--accent); letter-spacing:.14em; font-size:.8rem; }
.process-item h3 { margin:0; }
.process-item p { margin:0; color:var(--muted); }
.quote-panel { padding:clamp(34px,6vw,74px); border-radius:28px; border:1px solid var(--line); background:radial-gradient(circle at 85% 20%, rgba(216,200,170,.16), transparent 20%),linear-gradient(145deg,#171717,#0f0f0f); }
.quote-panel p { font-size:clamp(1.8rem,4vw,4rem); line-height:1.15; letter-spacing:-.035em; margin:0; max-width:1000px; }
.bullets { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 28px; margin:30px 0 0; padding:0; list-style:none; }
.bullets li { padding:14px 0; border-bottom:1px solid var(--line); color:#d7d2ca; }
.bullets li::before { content:"—"; color:var(--accent); margin-right:10px; }
.protocols { display:flex; gap:12px; flex-wrap:wrap; margin-top:30px; }
.protocols span { border:1px solid var(--line); border-radius:999px; padding:10px 15px; color:#ddd7cd; }

/* ========================= PROJECTS ========================= */
.filters { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:30px; }
.filter { background:transparent; color:var(--muted); border:1px solid var(--line); border-radius:999px; padding:9px 14px; cursor:pointer; }
.filter:hover, .filter.active { color:#111; background:var(--text); }
.projects { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.project { min-height:420px; border-radius:22px; overflow:hidden; border:1px solid var(--line); position:relative; background:linear-gradient(to top,rgba(0,0,0,.88),rgba(0,0,0,.08) 58%),radial-gradient(circle at 60% 30%,rgba(230,207,163,.25),transparent 30%),linear-gradient(135deg,#1b1b1b,#0b0b0b); }
.project:nth-child(2n) { background:linear-gradient(to top,rgba(0,0,0,.9),rgba(0,0,0,.05) 60%),linear-gradient(135deg,#262019,#0a0a0a 72%); }
.project:nth-child(3n) { background:linear-gradient(to top,rgba(0,0,0,.9),rgba(0,0,0,.05) 60%),linear-gradient(160deg,#111,#292722); }
.project-content { position:absolute; left:26px; right:26px; bottom:24px; }
.project small { color:var(--accent); text-transform:uppercase; letter-spacing:.14em; }
.project h3 { margin:8px 0 0; font-size:1.55rem; }

/* ========================= CONTACT ========================= */
.contact-layout { display:grid; grid-template-columns:.82fr 1.18fr; gap:72px; }
.form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.field { display:flex; flex-direction:column; gap:8px; }
.field.full { grid-column:1/-1; }
.field label { font-size:.78rem; color:#cac5bc; text-transform:uppercase; letter-spacing:.1em; }
.field input, .field select, .field textarea { width:100%; border:1px solid var(--line); background:#101010; color:#fff; border-radius:12px; padding:14px 15px; outline:none; }
.field textarea { min-height:170px; resize:vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color:rgba(216,200,170,.58); }
.form-note { grid-column:1/-1; color:var(--muted); font-size:.86rem; }

/* ========================= FOOTER ========================= */
.cta { padding:100px 0; }
.cta-inner { border-top:1px solid var(--line); border-bottom:1px solid var(--line); padding:70px 0; display:flex; justify-content:space-between; gap:30px; align-items:end; }
.cta h2 { max-width:850px; margin:0; }
.site-footer { padding:52px 0 34px; }
.footer-grid { display:grid; grid-template-columns:1.2fr .8fr .8fr; gap:40px; }
.footer-links { display:flex; flex-direction:column; gap:8px; color:var(--muted); }
.footer-links strong { color:#ddd7cd; margin-bottom:4px; }
.footer-links a:hover { color:#fff; }
.footer-bottom { margin-top:46px; padding-top:22px; border-top:1px solid var(--line); display:flex; justify-content:space-between; gap:20px; color:#777; font-size:.82rem; }

/* Reveal */
.reveal { opacity:0; transform:translateY(18px); transition:opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity:1; transform:none; }

/* ========================= TABLET / MOBILE ========================= */
@media (max-width: 980px) {
  :root { --header-h: 82px; }
  .desktop-nav { display:none; }
  .mobile-menu-toggle { display:block; }
  .mobile-nav { display:block; }
  .section-intro, .contact-layout { grid-template-columns:1fr; gap:30px; }
  .grid-4, .grid-5 { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .grid-3 { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .process-item { grid-template-columns:56px 1fr; }
  .process-item p { grid-column:2; }
  .cta-inner { align-items:flex-start; flex-direction:column; }
}

@media (max-width: 680px) {
  :root { --header-h: 76px; }
  .container { width:min(calc(100% - 28px), var(--max)); }
  .brand { font-size:.88rem; }
  .brand span:last-child { font-size:.55rem; letter-spacing:.22em; }
  .mobile-menu-toggle { width:44px; height:44px; flex-basis:44px; }
  .mobile-menu-toggle span { left:13px; }
  .mobile-menu-toggle span:first-child { top:18px; }
  .mobile-menu-toggle span:last-child { top:25px; }
  .mobile-menu-toggle.is-open span:first-child,
  .mobile-menu-toggle.is-open span:last-child { top:21px; }
  .mobile-nav-inner { padding-top:calc(var(--header-h) + 18px + env(safe-area-inset-top)); }
  .mobile-nav-links > a, .mobile-solutions-toggle { min-height:64px; }
  .mobile-nav-foot { flex-direction:column; }
  .hero { padding-top:120px; min-height:92svh; }
  .page-hero { padding:132px 0 64px; }
  .page-hero h1 { font-size:clamp(2.75rem,13vw,4.6rem); }
  .section { padding:80px 0; }
  .section-sm { padding:58px 0; }
  .grid-2, .grid-3, .grid-4, .grid-5, .projects { grid-template-columns:1fr; }
  .bullets { grid-template-columns:1fr; }
  .form { grid-template-columns:1fr; }
  .field.full, .form-note { grid-column:auto; }
  .footer-grid { grid-template-columns:1fr; }
  .footer-bottom { flex-direction:column; }
  .project { min-height:340px; }
  .hero-actions .btn { width:100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior:auto !important; transition-duration:.01ms !important; animation-duration:.01ms !important; animation-iteration-count:1 !important; }
  .reveal { opacity:1; transform:none; }
}
