/* ============================================================
   FUSION DIGITAL AGENCY — MAIN.CSS
   Polices, variables, base, préloader, curseur, navbar,
   titres de section, boutons, footer, animations.
============================================================ */

/* ── FONTS ────────────────────────────────────────────────── */
@font-face { font-family: 'Funnel Display'; src: url('/assets/fonts/FunnelDisplay-Light.ttf') format('truetype'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Funnel Display'; src: url('/assets/fonts/FunnelDisplay-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Funnel Display'; src: url('/assets/fonts/FunnelDisplay-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Funnel Display'; src: url('/assets/fonts/FunnelDisplay-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Funnel Display'; src: url('/assets/fonts/FunnelDisplay-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Funnel Display'; src: url('/assets/fonts/FunnelDisplay-ExtraBold.ttf') format('truetype'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'AccordAlt'; src: url('/assets/fonts/AccordAlt_Light.otf') format('opentype'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Miedinger'; src: url('/assets/fonts/Miedinger-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Digitron'; src: url('/assets/fonts/Digitron.otf') format('opentype'); font-weight: 400; font-display: swap; }

/* ── VARIABLES ────────────────────────────────────────────── */
:root {
  --f-blue:        #009BF3;
  --f-black:       #000000;
  --f-silver:      #C0C0C0;
  --f-white:       #FFFFFF;
  --f-footer-bg:   #161616;
  --f-footer-text: #848484;
  --f-grey-bg:     #111111;
  --f-card:        #1c1c1c;
  --f-line:        #2e2e2e;
  --f-font-title:  'Miedinger', 'Funnel Display', sans-serif;
  --f-font-body:   'AccordAlt', 'Funnel Display', sans-serif;
  --f-font-ui:     'Funnel Display', system-ui, sans-serif;
  --f-font-digit:  'Digitron', 'Funnel Display', monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--f-black);
  color: var(--f-white);
  font-family: var(--f-font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: inherit; }
button { font-family: inherit; cursor: pointer; }
p { margin: 0 0 1em; }
strong, b { font-weight: 600; color: var(--f-white); }
h1, h2, h3, h4 { margin: 0; font-weight: inherit; }

/* Marges latérales de la maquette : ~12 % de chaque côté */
.container { max-width: max(1040px, calc(76vw + 80px)); padding-left: 40px; padding-right: 40px; }
.text-center { text-align: center; }
::selection { background: var(--f-blue); color: #fff; }

/* ── PRELOADER ────────────────────────────────────────────── */
#preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: #000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  transition: opacity .7s ease;
}
#preloader.done { opacity: 0; pointer-events: none; }
/* Le header n'apparaît qu'à la sortie du preloader (animé par preloader.js) */
body:not(.loaded) #navbar { opacity: 0; }
.pl-tagline { font-family: var(--f-font-title); letter-spacing: .2em; text-transform: uppercase; font-size: 14px; color: var(--f-blue); }
.pl-bar { width: 220px; height: 2px; background: rgba(255,255,255,.12); overflow: hidden; }
.pl-fill { width: 0; height: 100%; background: var(--f-blue); animation: plGrow 2.2s ease forwards; }
@keyframes plGrow { to { width: 100%; } }
.pl-pct { font-family: var(--f-font-digit); font-size: 20px; color: var(--f-blue); letter-spacing: .1em; }

/* ── CURSEUR CUSTOM ───────────────────────────────────────── */
#cursor-wrap { position: fixed; inset: 0; pointer-events: none; z-index: 9998; }
#cursor-dot, #cursor-follower { position: fixed; top: 0; left: 0; border-radius: 50%; pointer-events: none; transform: translate(-50%, -50%); opacity: 0; }
body.has-mouse #cursor-dot, body.has-mouse #cursor-follower { opacity: 1; }
#cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--f-blue); transform: none; }
#cursor-follower { width: 34px; height: 34px; margin: -17px 0 0 -17px; transform: none; border: 1px solid rgba(0,155,243,.55); transition: width .25s, height .25s, margin .25s, background .25s, border-color .25s; }
body.cursor-link #cursor-follower { width: 54px; height: 54px; margin: -27px 0 0 -27px; background: rgba(0,155,243,.08); border-color: var(--f-blue); }
body.cursor-view #cursor-follower { width: 70px; height: 70px; margin: -35px 0 0 -35px; background: rgba(0,155,243,.12); }
@media (hover: none), (max-width: 991px) { #cursor-wrap { display: none; } }

/* ── NAVBAR ───────────────────────────────────────────────── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 30px 0;
  transition: background .35s ease, padding .35s ease;
}
#navbar.scrolled { background: rgba(0,0,0,.88); backdrop-filter: blur(10px); padding: 14px 0; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-logo img { height: 50px; width: auto; transition: height .35s ease; }
#navbar.scrolled .nav-logo img { height: 44px; }
.nav-links { list-style: none; display: flex; gap: 40px; margin: 0; padding: 0; }
.nav-links a { font-family: var(--f-font-ui); font-weight: 600; font-size: 16px; color: var(--f-white); transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--f-blue); }
.nav-right { display: flex; align-items: center; gap: 70px; }
.nav-lang { display: flex; align-items: center; gap: 7px; font-family: var(--f-font-ui); font-weight: 600; font-size: 14px; }
.nav-lang a { color: var(--f-white); opacity: .6; }
.nav-lang a.active { opacity: 1; }
.nav-lang a.is-disabled { cursor: not-allowed; }

.btn-onoff {
  position: relative; display: inline-flex; align-items: center;
  width: 108px; height: 48px; padding: 4px;
  border-radius: 30px; border: 0; background: #e9e9e9;
}
.btn-onoff .knob {
  width: 40px; height: 40px; border-radius: 50%;
  background: #000; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-font-ui); font-weight: 600; font-size: 11px;
}
.btn-onoff .off { position: absolute; right: 18px; font-family: var(--f-font-ui); font-size: 11px; color: #999; }
/* Bouton burger -> croix */
.navbar-toggler-custom {
  display: none; position: relative;
  width: 30px; height: 30px; padding: 0;
  background: none; border: 0;
}
.navbar-toggler-custom span {
  position: absolute; left: 3px; right: 3px; height: 2px; border-radius: 2px;
  background: #fff; transition: transform .3s ease, opacity .2s ease, top .3s ease;
}
.navbar-toggler-custom span:nth-child(1) { top: 8px; }
.navbar-toggler-custom span:nth-child(2) { top: 14px; }
.navbar-toggler-custom span:nth-child(3) { top: 20px; }
body.menu-open .navbar-toggler-custom span:nth-child(1) { top: 14px; transform: rotate(45deg); }
body.menu-open .navbar-toggler-custom span:nth-child(2) { opacity: 0; }
body.menu-open .navbar-toggler-custom span:nth-child(3) { top: 14px; transform: rotate(-45deg); }

/* Menu mobile plein écran (affiché sous 992px) */
.mobile-menu {
  position: fixed; inset: 0; z-index: 990;
  background: #000;
  display: flex; flex-direction: column; justify-content: center;
  padding: 110px 30px 40px;
  opacity: 0; visibility: hidden;
  transition: opacity .35s ease, visibility .35s;
}
body.menu-open .mobile-menu { opacity: 1; visibility: visible; }
body.menu-open #navbar { background: #000; }
.mobile-menu-links { list-style: none; margin: auto 0 0; padding: 0; text-align: center; }
.mobile-menu-links li { opacity: 0; transform: translateY(14px); transition: opacity .4s ease, transform .4s ease; }
body.menu-open .mobile-menu-links li { opacity: 1; transform: none; }
body.menu-open .mobile-menu-links li:nth-child(2) { transition-delay: .05s; }
body.menu-open .mobile-menu-links li:nth-child(3) { transition-delay: .1s; }
body.menu-open .mobile-menu-links li:nth-child(4) { transition-delay: .15s; }
.mobile-menu-links a {
  display: block; padding: 14px 0;
  font-family: var(--f-font-title); text-transform: uppercase;
  font-size: min(24px, calc((100vw - 60px) / 18.5)); color: var(--f-white);
}
.mobile-menu-links a.active { color: var(--f-blue); }
.mobile-menu-foot { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.mobile-menu-foot .nav-lang { font-size: 16px; }
.mobile-menu-mail { font-family: var(--f-font-ui); font-size: 14px; color: var(--f-footer-text); }

/* ── TITRES DE SECTION ────────────────────────────────────── */
.sec-line { display: block; width: 190px; height: 1px; background: #3a3a3a; margin-bottom: 46px; }
.sec-head.is-center { text-align: center; }
.sec-head.is-center .sec-line { margin-left: auto; margin-right: auto; }
.sec-title {
  font-family: var(--f-font-title);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: var(--f-blue);
  font-size: clamp(18px, 1.5vw, 27px);
  line-height: 1.25;
}
.sec-title .is-white { color: var(--f-white); }
.sec-title-sm { font-size: clamp(14px, .9vw, 17px); }
.sec-sub { font-family: var(--f-font-body); font-weight: 300; font-size: clamp(18px, 1.25vw, 23px); line-height: 1.35; color: var(--f-white); margin-top: 22px; }
.sec-sub-sm { font-size: clamp(17px, 1.1vw, 21px); margin-top: 16px; }
.sec-text { color: var(--f-silver); font-size: 16px; line-height: 1.75; margin-top: 18px; }
.sec-text strong { color: var(--f-white); }

/* ── PAGE HERO (pages internes) ───────────────────────────── */
.page-hero {
  position: relative;
  height: clamp(300px, 24vw, 470px);
  display: flex; align-items: center; justify-content: center;
  background-size: cover; background-position: center;
}
.page-hero::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.page-hero h1 {
  position: relative; z-index: 2;
  font-family: var(--f-font-title); font-weight: 700; text-transform: uppercase;
  color: var(--f-blue);
  font-size: clamp(22px, 1.85vw, 35px);
  letter-spacing: .02em;
  padding-top: 40px;
}

/* ── PILLS / TAGS ─────────────────────────────────────────── */
.f-tag {
  display: inline-block;
  border: 1px solid #3c3c3c;
  border-radius: 5px;
  padding: 3px 11px;
  font-size: 14px;
  color: var(--f-white);
  margin: 0 6px 9px 0;
  line-height: 1.5;
}

/* ── BOUTONS ──────────────────────────────────────────────── */
.btn-f {
  display: inline-block;
  border: 1px solid var(--f-blue);
  background: transparent;
  color: var(--f-white);
  border-radius: 10px;
  padding: 13px 22px;
  font-family: var(--f-font-ui);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: .02em;
  text-transform: uppercase;
  transition: background .25s ease, color .25s ease;
}
.btn-f:hover { background: var(--f-blue); color: #fff; }

/* ── STATS ────────────────────────────────────────────────── */
.f-num { display: inline-flex; align-items: baseline; gap: 10px; color: var(--f-blue); line-height: 1; }
.f-num .plus { font-family: var(--f-font-ui); font-weight: 300; font-size: .62em; }
.f-num .digits { font-family: var(--f-font-digit); letter-spacing: .02em; }
/* La valeur finale (invisible) réserve la largeur : aucun décalage pendant le comptage */
.f-num .digits[data-final] { display: inline-grid; text-align: right; }
.f-num .digits[data-final]::after { content: attr(data-final); visibility: hidden; grid-area: 1 / 1; }
.f-num .digits[data-final] > span { grid-area: 1 / 1; }
.f-num-label { font-family: var(--f-font-ui); font-weight: 400; text-transform: uppercase; color: #8d8d8d; font-size: 15px; line-height: 1.2; margin-top: 16px; }

/* ── FOOTER ───────────────────────────────────────────────── */
.footer { background: var(--f-footer-bg); color: var(--f-footer-text); padding: 80px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer-cta { font-family: var(--f-font-ui); font-weight: 400; font-size: clamp(22px, 1.6vw, 29px); line-height: 1.15; color: var(--f-footer-text); margin: 0 0 60px; text-transform: uppercase; }
.footer-cta b { font-weight: 700; color: var(--f-footer-text); }
.footer-logo img { height: 58px; width: auto; }
.footer-col-title { font-family: var(--f-font-body); font-size: 15px; text-transform: uppercase; color: var(--f-footer-text); margin-bottom: 18px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 0; line-height: 1.35; }
.footer-col a { font-family: var(--f-font-ui); font-size: 15px; color: var(--f-footer-text); transition: color .2s; }
.footer-col a:hover { color: var(--f-blue); }
.footer-col.is-center { text-align: center; }
.footer-col.is-right { text-align: right; }
.footer-col.is-right a { display: block; margin-bottom: 4px; }
.footer-social { display: flex; gap: 6px; justify-content: center; }
.footer-social a { display: block; width: 32px; height: 32px; transition: opacity .2s, transform .2s; }
.footer-social a:hover { opacity: .8; transform: translateY(-2px); }
.footer-social img { width: 100%; height: 100%; }
.footer-bottom { margin-top: 60px; text-align: center; font-family: var(--f-font-ui); font-size: 14px; }
.footer-bottom p { margin: 0 0 8px; }
.footer-bottom a { color: var(--f-footer-text); }
.footer-bottom a:hover { color: var(--f-blue); }

/* ── ANIMATIONS (pilotées par animations.js) ──────────────── */
[data-reveal] .reveal-wrap { display: block; overflow: hidden; padding-bottom: .08em; }
[data-reveal] .reveal-wrap .line { display: block; transform: translateY(110%); will-change: transform; }
[data-fade] { opacity: 0; will-change: opacity, transform; }

@media (prefers-reduced-motion: reduce) {
  [data-fade] { opacity: 1 !important; transform: none !important; }
  [data-reveal] .reveal-wrap .line { transform: none !important; }
  [data-img-reveal] { clip-path: none !important; }
}
