/* ==========================================================================
   IDE International — Stylesheet
   Design system: Deep Navy / White / Graphite ink / subtle Gold
   Signature motif: blueprint / structural-drawing annotations
   (corner registration marks, coordinate labels, a single drawn "span" line
   echoing the bridge in the wordmark) — used once per section, not everywhere.
   ========================================================================== */

:root{
  --navy: #0B1F3A;
  --navy-deep: #061322;
  --ink: #111111;
  --surface: #F5F7FA;
  --gold: #B08D57;
  --ease-premium: cubic-bezier(.16,1,.3,1);
}

html{
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body{
  background-color: var(--surface);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* Focus visibility — accessibility floor */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible{
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection{ background: var(--gold); color: #fff; }

/* ---------------------------------------------------------------------
   Type rhythm
   --------------------------------------------------------------------- */
.font-display{ font-family: "Manrope", "Inter", sans-serif; }
.font-mono{ font-family: "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .04em; }

.eyebrow{
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
}

.tabular{ font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------------
   Blueprint grid backdrop — used sparingly (hero + dividers only)
   --------------------------------------------------------------------- */
.blueprint-grid{
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 48px 48px;
}
.blueprint-grid-light{
  background-image:
    linear-gradient(rgba(11,31,58,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11,31,58,.06) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Corner registration marks — the signature device.
   Four small crosshair brackets, like a drafting tool's alignment marks. */
.blueprint-corners{ position: relative; }
.blueprint-corners::before,
.blueprint-corners::after,
.blueprint-corners .corner-tl,
.blueprint-corners .corner-br{
  content:"";
  position:absolute;
  width: 14px; height: 14px;
  border-top: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  opacity: 0;
  transition: opacity .5s var(--ease-premium), transform .5s var(--ease-premium);
  transform: translate(4px,4px);
}
.blueprint-corners::before{ top: -1px; left: -1px; }
.blueprint-corners::after{
  bottom: -1px; right: -1px;
  border-top: none; border-left: none;
  border-bottom: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: translate(-4px,-4px);
}
.blueprint-corners:hover::before,
.blueprint-corners:hover::after,
.group:hover .blueprint-corners::before,
.group:hover .blueprint-corners::after{
  opacity: 1;
  transform: translate(0,0);
}

/* Section divider with a drawn span-line (bridge-cable echo) */
.span-divider{
  position: relative;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(11,31,58,.18) 15%, rgba(11,31,58,.18) 85%, transparent);
}
.span-divider .node{
  position: absolute; top: 50%; left: 50%;
  width: 7px; height: 7px;
  background: var(--gold);
  border-radius: 50%;
  transform: translate(-50%,-50%);
}

/* Animated draw-in underline used under hero eyebrow / headings */
.draw-line{
  display:block;
  height: 2px;
  background: var(--gold);
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 1.1s var(--ease-premium);
}
.is-revealed .draw-line{ transform: scaleX(1); }

/* ---------------------------------------------------------------------
   Reveal-on-scroll system (driven by IntersectionObserver in main.js)
   --------------------------------------------------------------------- */
[data-reveal]{
  opacity: 0;
  transition: opacity .8s var(--ease-premium), transform .8s var(--ease-premium);
  will-change: transform, opacity;
}
[data-reveal="fade-up"]{ transform: translateY(28px); }
[data-reveal="fade-left"]{ transform: translateX(-32px); }
[data-reveal="fade-right"]{ transform: translateX(32px); }
[data-reveal="fade-in"]{ transform: none; }
[data-reveal].is-revealed{
  opacity: 1;
  transform: translate(0,0);
}
@media (prefers-reduced-motion: reduce){
  [data-reveal]{ opacity: 1; transform: none; transition: none; }
}

/* ---------------------------------------------------------------------
   Navigation
   --------------------------------------------------------------------- */
.site-nav{
  transition: background-color .45s var(--ease-premium), box-shadow .45s var(--ease-premium), padding .35s var(--ease-premium), color .45s var(--ease-premium);
}
.site-nav.is-scrolled{
  background-color: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(11,31,58,.08), 0 12px 24px -16px rgba(11,31,58,.18);
  color: var(--navy);
}
.site-nav .nav-logo-dark{ display: none; }
.site-nav.is-scrolled .nav-logo-dark{ display: block !important; }
.site-nav.is-scrolled .nav-logo-light{ display: none !important; }

.nav-link{ position: relative; }
.nav-link::after{
  content:"";
  position:absolute; left:0; bottom:-6px;
  width:100%; height:1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease-premium);
}
.nav-link:hover::after,
.nav-link[aria-current="page"]::after{ transform: scaleX(1); }

.logo-mark img{ transition: transform .5s var(--ease-premium); }
.logo-mark:hover img{ transform: rotate(-3deg) scale(1.04); }

/* Mobile drawer */
.mobile-drawer{
  transition: transform .45s var(--ease-premium), opacity .45s var(--ease-premium);
}

/* ---------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------- */
.btn{
  position: relative;
  align-items: center;
  gap: .55rem;
  font-family: "Manrope", sans-serif;
  font-weight: 600;
  letter-spacing: .01em;
  transition: transform .35s var(--ease-premium), background-color .35s var(--ease-premium), color .35s var(--ease-premium), border-color .35s var(--ease-premium), box-shadow .35s var(--ease-premium);
}
.btn:active{ transform: translateY(1px); }

.btn-primary{
  background: var(--gold);
  color: #fff;
}
.btn-primary:hover{
  background: #c49d68;
  box-shadow: 0 14px 28px -12px rgba(176,141,87,.55);
  transform: translateY(-2px);
}

.btn-outline{
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
}
.btn-outline:hover{
  border-color: #fff;
  background: rgba(255,255,255,.08);
  transform: translateY(-2px);
}

.btn-outline-dark{
  border: 1px solid rgba(11,31,58,.25);
  color: var(--navy);
}
.btn-outline-dark:hover{
  border-color: var(--navy);
  background: rgba(11,31,58,.04);
  transform: translateY(-2px);
}

.btn-icon-shift svg{ transition: transform .35s var(--ease-premium); }
.btn-icon-shift:hover svg{ transform: translateX(4px); }

/* ---------------------------------------------------------------------
   Cards
   --------------------------------------------------------------------- */
.card-lift{
  transition: transform .45s var(--ease-premium), box-shadow .45s var(--ease-premium), border-color .45s var(--ease-premium);
}
.card-lift:hover{
  transform: translateY(-6px);
  box-shadow: 0 30px 60px -30px rgba(11,31,58,.35);
  border-color: rgba(11,31,58,.25);
}

/* Project gallery */
.gallery-card{ overflow: hidden; }
.gallery-card .gallery-media img,
.gallery-card .gallery-media svg{
  transition: transform .8s var(--ease-premium);
}
.gallery-card:hover .gallery-media img,
.gallery-card:hover .gallery-media svg{ transform: scale(1.08); }
.gallery-overlay{
  opacity: 0;
  transition: opacity .45s var(--ease-premium);
}
.gallery-card:hover .gallery-overlay{ opacity: 1; }

/* ---------------------------------------------------------------------
   Stat counters
   --------------------------------------------------------------------- */
.stat-figure{ font-family: "Manrope", sans-serif; font-weight: 800; }

/* ---------------------------------------------------------------------
   Timeline (Méthodologie)
   --------------------------------------------------------------------- */
.timeline-line{
  background: linear-gradient(to bottom, rgba(11,31,58,.18), rgba(11,31,58,.18));
}
.timeline-dot{
  box-shadow: 0 0 0 4px var(--surface);
}

/* ---------------------------------------------------------------------
   Scroll progress bar
   --------------------------------------------------------------------- */
#scroll-progress{
  position: fixed; top: 0; left: 0; height: 3px;
  background: var(--gold);
  width: 0%;
  z-index: 60;
  transition: width .12s linear;
}

/* Back to top */
#back-to-top{
  opacity: 0; visibility: hidden;
  transform: translateY(12px);
  transition: opacity .4s var(--ease-premium), transform .4s var(--ease-premium), visibility .4s;
}
#back-to-top.is-visible{
  opacity: 1; visibility: visible; transform: translateY(0);
}

/* ---------------------------------------------------------------------
   Form fields
   --------------------------------------------------------------------- */
.field input,
.field textarea{
  width: 100%;
  background: #fff;
  border: 1px solid rgba(11,31,58,.16);
  border-radius: .5rem;
  padding: .85rem 1rem;
  font-family: "Inter", sans-serif;
  transition: border-color .3s var(--ease-premium), box-shadow .3s var(--ease-premium);
}
.field input:focus,
.field textarea:focus{
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 4px rgba(11,31,58,.08);
}
.field label{
  font-family: "IBM Plex Mono", monospace;
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(11,31,58,.55);
}

/* Custom ordered-list reset for timeline / numbered process */
.reset-list{ list-style: none; margin: 0; padding: 0; }

/* Hero ambient zoom */
.hero-bg{
  animation: heroZoom 18s var(--ease-premium) forwards;
}
@keyframes heroZoom{
  from{ transform: scale(1.08); }
  to{ transform: scale(1); }
}

/* Marquee for sectors / trust strip */
.marquee-track{
  animation: marquee 32s linear infinite;
}
@keyframes marquee{
  from{ transform: translateX(0); }
  to{ transform: translateX(-50%); }
}
.marquee-wrap:hover .marquee-track{ animation-play-state: paused; }

/* Number ticks on blueprint divider (decorative, aria-hidden) */
.tick-row span{ font-family:"IBM Plex Mono", monospace; font-size: .65rem; letter-spacing:.08em; color: rgba(11,31,58,.35); }

/* Print: keep it sane */
@media print{
  .site-nav, #back-to-top, #scroll-progress, footer .social-row{ display:none !important; }
}


/* ---------------------------------------------------------------------
   Brand lockup — wordmark + tagline "Bureau d'études & Conseils"
   Sized in em so the tagline keeps the same proportion to the wordmark
   at every breakpoint.
   --------------------------------------------------------------------- */
.brand-lockup{
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
}
.brand-name{
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--gold);
}
.brand-tagline{
  display: block;
  margin-top: .5em;
  padding-top: .5em;
  border-top: 1px solid rgba(176,141,87,.6);
  font-weight: 600;
  font-size: .47em;
  letter-spacing: .065em;
  text-transform: uppercase;
  white-space: nowrap;
  color: currentColor;
  opacity: .82;
  transition: opacity .3s var(--ease-premium);
}
.logo-mark:hover .brand-tagline{ opacity: 1; }
