/* ═══════════════════════════════════════════════════
   RABBIT SPACE — styles.css (partagé toutes pages)
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=League+Spartan:wght@300;400;500;600;700;800;900&family=Inter:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Cormorant+Garamond:ital,wght@1,300;1,400;1,600&display=swap');

/* ── TOKENS ─────────────────────────────────────── */
:root {
  --black:      #080808;
  --dark:       #111111;
  --dark-2:     #1a1a1a;
  --gold:       #c8a96e;
  --gold-light: #d9bc87;
  --gold-dim:   rgba(200,169,110,.13);
  --off-white:  #faf9f7;
  --cream:      #f5f2ed;
  --grey-light: #e8e5e0;
  --text-dark:  #1c1c1c;
  --text-body:  #3d3d3d;

  --display: 'League Spartan', sans-serif;
  --serif-i: 'Cormorant Garamond', Georgia, serif;
  --sans:    'Inter', system-ui, sans-serif;

  --ease: cubic-bezier(.25,.46,.45,.94);
  --nav-h: 72px;
}

/* ── RESET ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--text-body);
  background: var(--off-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a   { text-decoration: none; color: inherit; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }

/* ── ANIMATIONS ─────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .65s var(--ease), transform .65s var(--ease);
}
.fade-in { opacity: 0; transition: opacity .75s ease; }
.fade-up.visible, .fade-in.visible { opacity: 1; transform: none; }

/* ── TYPO HELPERS ───────────────────────────────── */
.eyebrow {
  font-family: var(--display);
  font-size: .62rem; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold);
}
.gold-line {
  display: block; width: 36px; height: 1px;
  background: var(--gold); margin: .9rem 0 1.5rem;
}

/* Section titles — League Spartan Bold + Cormorant italic accent */
.section-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.9rem, 3.8vw, 3rem);
  line-height: 1.08; letter-spacing: -.02em;
  color: var(--text-dark);
}
.section-title em {
  font-family: var(--serif-i);
  font-style: italic; font-weight: 400;
  color: var(--gold);
  font-size: 1.1em; letter-spacing: .01em;
}
.section-title--light        { color: var(--off-white); }
.section-title--light em     { color: var(--gold); }

.section-lead {
  font-size: clamp(.88rem, 1.4vw, 1rem);
  font-weight: 300; line-height: 1.82;
  color: var(--text-body);
}
.section-lead--light { color: rgba(250,249,247,.7); }

/* ── LAYOUT ─────────────────────────────────────── */
.section        { padding: clamp(4.5rem,9vw,7rem) clamp(1.5rem,5vw,4rem); }
.section--dark  { background: var(--dark); }
.section--black { background: var(--black); }
.section--cream { background: var(--cream); }
.section-inner  { max-width: 1280px; margin: 0 auto; }

/* ── BUTTONS ────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .9rem 2rem;
  font-family: var(--display); font-size: .68rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  border-radius: 2px; transition: .35s var(--ease); cursor: pointer;
}
.btn svg { width: 13px; height: 13px; transition: transform .3s ease; }
.btn:hover svg { transform: translateX(3px); }

.btn-gold         { background: var(--gold); color: var(--dark); }
.btn-gold:hover   { background: var(--gold-light); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(200,169,110,.28); }

.btn-outline-gold       { border: 1px solid var(--gold); color: var(--gold); }
.btn-outline-gold:hover { background: var(--gold); color: var(--dark); }

.btn-outline-light       { border: 1px solid rgba(250,249,247,.3); color: var(--off-white); }
.btn-outline-light:hover { border-color: var(--gold); color: var(--gold); }

/* ── NAV ────────────────────────────────────────── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  display: flex; align-items: center;
  padding: 0 clamp(1.5rem,5vw,4rem);
  transition: background .4s ease, box-shadow .4s ease;
}
#nav.scrolled {
  background: rgba(8,8,8,.94);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(200,169,110,.15);
}
.nav-inner {
  width: 100%; max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; }
.nav-logo img {
  height: 30px; width: auto;
  /* Fonctionne parfaitement avec un PNG fond transparent.
     En attendant : inversé pour fond blanc → blanc sur foncé. */
  filter: brightness(0) invert(1);
}
.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; }
.nav-links a {
  font-family: var(--display);
  font-size: .62rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: rgba(250,249,247,.68); transition: color .3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav-toggle span {
  display: block; width: 22px; height: 1.5px;
  background: var(--off-white);
  transition: .35s var(--ease); transform-origin: center;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.nav-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  font-size: 1.6rem; color: var(--off-white);
  cursor: pointer; padding: .4rem; line-height: 1; display: none;
}

/* ── PAGE HERO (sous-pages) ──────────────────────── */
.page-hero {
  position: relative; height: 58vh; min-height: 380px;
  display: flex; align-items: flex-end; overflow: hidden;
  padding-top: var(--nav-h);
}
.page-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.page-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(8,8,8,.3) 0%, rgba(8,8,8,.75) 100%);
}
.page-hero-content {
  position: relative; z-index: 2;
  padding: 0 clamp(1.5rem,5vw,4rem) clamp(3rem,5vw,4.5rem);
  width: 100%; max-width: 1280px; margin: 0 auto;
}
.page-hero-pre {
  font-family: var(--display);
  font-size: .6rem; font-weight: 700; letter-spacing: .22em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 1rem;
}
.page-hero-title {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 1.0; letter-spacing: -.025em;
  color: var(--off-white); margin-bottom: .9rem;
}
.page-hero-title em {
  font-family: var(--serif-i);
  font-style: italic; font-weight: 400;
  color: var(--gold); font-size: 1.08em; letter-spacing: .01em;
}
.page-hero-sub {
  font-size: clamp(.85rem,1.3vw,.95rem); font-weight: 300;
  color: rgba(250,249,247,.68); max-width: 520px; line-height: 1.72;
}

/* ── MARQUEE ────────────────────────────────────── */
#marquee {
  background: var(--dark); overflow: hidden;
  border-top: 1px solid rgba(200,169,110,.1);
  border-bottom: 1px solid rgba(200,169,110,.1);
}
.marquee-track {
  display: flex; align-items: center;
  white-space: nowrap;
  animation: marqueeScroll 32s linear infinite;
  width: max-content; padding: 1.4rem 0;
}
.marquee-track:hover { animation-play-state: paused; }
.marquee-item {
  font-family: var(--display);
  font-size: clamp(.82rem, 1.3vw, 1rem); font-weight: 500;
  color: rgba(250,249,247,.48); padding: 0 2rem; flex-shrink: 0;
  letter-spacing: .06em; transition: color .3s;
}
.marquee-item:hover { color: var(--gold); }
.marquee-sep { color: var(--gold); opacity: .35; font-size: .5rem; flex-shrink: 0; }
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── DOMAINES GRID ──────────────────────────────── */
.domaines-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  border-top: 1px solid var(--grey-light);
}
.domaine-card {
  padding: 2.4rem 2rem;
  border-right: 1px solid var(--grey-light);
  border-bottom: 1px solid var(--grey-light);
  transition: background .3s; display: flex; flex-direction: column;
}
.domaine-card:hover { background: var(--cream); }
.domaine-card:nth-child(3n) { border-right: none; }
.domaine-icon { font-size: 1.5rem; margin-bottom: 1rem; }
.domaine-sector {
  font-family: var(--display);
  font-size: .58rem; font-weight: 700; letter-spacing: .18em;
  text-transform: uppercase; color: var(--gold); margin-bottom: .5rem;
}
.domaine-title {
  font-family: var(--display);
  font-size: clamp(1rem,1.8vw,1.2rem); font-weight: 700;
  color: var(--text-dark); margin-bottom: .7rem; line-height: 1.15;
}
.domaine-desc {
  font-size: .82rem; font-weight: 300; line-height: 1.78;
  color: var(--text-body); flex: 1; margin-bottom: 1.5rem;
}
.domaine-cta {
  display: inline-flex; align-items: center; gap: .4rem;
  font-family: var(--display);
  font-size: .6rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-dark);
  border-bottom: 1px solid var(--grey-light); padding-bottom: .2rem;
  align-self: flex-start; transition: color .3s, border-color .3s;
}
.domaine-card:hover .domaine-cta { color: var(--gold); border-color: var(--gold); }
.domaine-cta svg {
  width: 11px; height: 11px; stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; transition: transform .3s;
}
.domaine-card:hover .domaine-cta svg { transform: translateX(3px); }

/* ── CONTACT SECTION (partagée) ─────────────────── */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1.5fr;
  gap: clamp(3rem,6vw,5.5rem); align-items: start;
}
.contact-info-list {
  list-style: none; margin-top: 1.8rem;
  display: flex; flex-direction: column; gap: 1.3rem;
}
.contact-info-item { display: flex; align-items: flex-start; gap: 1rem; }
.contact-info-icon {
  flex-shrink: 0; width: 34px; height: 34px;
  background: var(--gold-dim); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.contact-info-icon svg {
  width: 14px; height: 14px;
  stroke: var(--gold); fill: none; stroke-width: 1.5; stroke-linecap: round;
}
.contact-info-label {
  font-family: var(--display);
  font-size: .56rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(250,249,247,.38); margin-bottom: .2rem;
}
.contact-info-value { font-size: .88rem; color: var(--off-white); }
.contact-info-value a:hover { color: var(--gold); }
.social-links { display: flex; gap: .7rem; margin-top: 2.2rem; }
.social-link {
  width: 38px; height: 38px;
  border: 1px solid rgba(255,255,255,.12); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .3s, background .3s;
}
.social-link:hover { border-color: var(--gold); background: var(--gold-dim); }
.social-link svg { width: 14px; height: 14px; fill: rgba(250,249,247,.52); transition: fill .3s; }
.social-link:hover svg { fill: var(--gold); }

.contact-form { display: flex; flex-direction: column; gap: .88rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .88rem; }
.form-group { display: flex; flex-direction: column; gap: .32rem; }
.form-group label {
  font-family: var(--display);
  font-size: .56rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(250,249,247,.38);
}
.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.09);
  border-radius: 2px; padding: .82rem 1rem;
  font-family: var(--sans); font-size: .85rem; font-weight: 300;
  color: var(--off-white); transition: border-color .3s, background .3s;
  outline: none; width: 100%;
}
.form-group select option { background: var(--dark); }
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(250,249,247,.22); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold); background: rgba(200,169,110,.04);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-success {
  display: none; padding: .9rem 1.1rem; margin-top: .5rem;
  background: rgba(200,169,110,.1); border: 1px solid rgba(200,169,110,.28);
  border-radius: 2px; font-size: .82rem; color: var(--gold);
}

/* ── FOOTER ─────────────────────────────────────── */
#footer {
  background: var(--black);
  border-top: 1px solid rgba(255,255,255,.05);
  padding: 2.5rem clamp(1.5rem,5vw,4rem);
}
.footer-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1.2rem;
}
.footer-brand img { height: 24px; filter: brightness(0) invert(1); opacity: .42; }
.footer-links { display: flex; gap: 1.8rem; list-style: none; flex-wrap: wrap; }
.footer-links a {
  font-family: var(--display);
  font-size: .6rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(250,249,247,.3); transition: color .3s;
}
.footer-links a:hover { color: var(--gold); }
.footer-copy { font-size: .6rem; color: rgba(250,249,247,.2); }

/* ── RESPONSIVE GLOBAL ──────────────────────────── */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-cta    { display: none; }
  .nav-links {
    position: fixed; inset: 0; background: var(--black);
    flex-direction: column; justify-content: center; align-items: center;
    gap: 2.2rem; opacity: 0; pointer-events: none;
    transition: opacity .4s; z-index: 999;
  }
  /* Quand le menu mobile est ouvert, on retire le backdrop-filter du #nav.scrolled :
     sinon il cr\u00e9e un "containing block" qui coupe le menu en hauteur de la barre.
     Double s\u00e9lecteur : :has() (navigateurs modernes) + classe body (fallback robuste). */
  body.nav-menu-open #nav,
  #nav:has(.nav-links.open) {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
  }
  .nav-links.open { opacity: 1; pointer-events: all; }
  .nav-links a {
    font-size: 1rem;
    color: var(--off-white);
    letter-spacing: .18em;
  }
  .nav-links a:hover, .nav-links a.active { color: var(--gold); }
  .nav-close { display: block; }
}
@media (max-width: 1024px) {
  .domaines-grid { grid-template-columns: repeat(2,1fr); }
  .domaine-card:nth-child(3n)  { border-right: 1px solid var(--grey-light); }
  .domaine-card:nth-child(2n)  { border-right: none; }
}
@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
  .form-row     { grid-template-columns: 1fr; }
  .domaines-grid { grid-template-columns: 1fr; }
  .domaine-card { border-right: none !important; }

  /* MOBILE — casse tous les grids 2 colonnes (texte+image, défi/solution, etc.)
     codés en inline style sur les pages secteur, photographie & scan-to-bim.
     Force 1 seule colonne pour que les paragraphes respirent. */
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1.4fr 1fr"],
  [style*="grid-template-columns:1fr 1.4fr"],
  [style*="grid-template-columns:1.5fr 1fr"],
  [style*="grid-template-columns:1.65fr 1fr"],
  [style*="grid-template-columns:auto 1fr"],
  [style*="grid-template-columns:repeat(2,1fr)"],
  [style*="grid-template-columns:repeat(2, 1fr)"] {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }

  /* Petits modules à 4 colonnes (moyens partenaire, etc.) -> 2 colonnes */
  [style*="grid-template-columns:repeat(4,1fr)"],
  [style*="grid-template-columns:repeat(4, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Figures texte+image dans les pages secteur :
     forcer le texte d'abord, image ensuite, quel que soit l'ordre desktop. */
  .section--black > .section-inner > figure.fade-up > figcaption {
    order: 0 !important;
  }
}
@media (max-width: 480px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
