/* ==========================================================================
   R. Emonet SA — Feuille de style
   Police titres : Bebas Neue · corps : Saira · mono : JetBrains Mono
   Couleur d'accent : #009a3e (vert R. Emonet)
   ========================================================================== */

/* --- Variables --- */
:root {
  --bg-dark: #0e110f;
  --bg-dark-2: #12150f;
  --bg-light: #f1efe8;
  --ink: #14140f;
  --paper: #f4f3ee;
  --green: #009a3e;
  --green-deep: #007a32;
  --grey: #4c565c;
  --pad-x: 44px;
}

/* --- Reset & base --- */
* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--bg-dark);
  font-family: 'Saira', system-ui, sans-serif;
  color: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: 'Bebas Neue', sans-serif; font-weight: 400; margin: 0; }
p { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--green); }
::selection { background: var(--green); color: #fff; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.section-pad { padding: 120px var(--pad-x) 130px; }
.wrap { max-width: none; margin: 0 auto; }

/* --- Boutons (effet position-aware) --- */
.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 3.5px solid var(--green);
  background: transparent;
  color: var(--green);
  padding: 18px 34px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: color .35s ease;
}
.btn.full { width: 100%; justify-content: center; }
.btn .fill {
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  border-radius: 50%;
  background: var(--green);
  transform: translate(-50%, -50%);
  transition: width .5s cubic-bezier(.16,.8,.3,1), height .5s cubic-bezier(.16,.8,.3,1);
  z-index: 0;
  pointer-events: none;
}
.btn:hover { color: #fff; }
.btn .lbl, .btn .arw { position: relative; z-index: 1; }
.btn .lbl { display: inline-block; transition: transform .35s cubic-bezier(.16,.8,.3,1); }
.btn:hover .lbl { transform: translateX(-11px); }
.btn .arw {
  position: absolute; right: 22px;
  display: inline-block;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity .35s ease, transform .35s cubic-bezier(.16,.8,.3,1);
}
.btn:hover .arw { opacity: 1; transform: translateX(0); }
.btn--light { color: var(--grey); border-color: var(--grey); }
.btn--white { color: #fff; border-color: #fff; }

/* --- Reveal au scroll --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .9s cubic-bezier(.16,.8,.3,1), transform .9s cubic-bezier(.16,.8,.3,1);
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .1s; }
.reveal.d2 { transition-delay: .2s; }
.reveal.d3 { transition-delay: .3s; }

/* --- Page Entreprise : timeline --- */
.timeline { display: flex; flex-direction: column; }
.tl-row { display: grid; grid-template-columns: 40px minmax(120px, 200px) 1fr; gap: 40px; padding: 44px 0; }
.tl-rail { position: relative; display: flex; justify-content: center; }
.tl-rail::before { content: ''; position: absolute; top: 12px; bottom: -88px; width: 1px; background: rgba(244,243,238,.16); }
.tl-row:last-child .tl-rail::before { display: none; }
.tl-dot { position: relative; z-index: 1; width: 13px; height: 13px; border-radius: 50%; background: var(--green); margin-top: 8px; box-shadow: 0 0 0 6px rgba(36,172,93,.14); }
.tl-year { font-family: 'Bebas Neue', sans-serif; font-size: clamp(52px, 6vw, 104px); line-height: .82; letter-spacing: -.02em; color: var(--paper); }
.tl-body { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: start; }
.tl-img { overflow: hidden; aspect-ratio: 4/3; background: #1c211a; }
.tl-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.16,.8,.3,1); }
.tl-row:hover .tl-img img { transform: scale(1.05); }
.tl-text { margin: 0; font-family: 'Saira', sans-serif; font-size: 17px; line-height: 1.62; color: rgba(244,243,238,.72); text-wrap: pretty; }

/* Timeline sur fond clair */
.timeline--light .tl-rail::before { background: rgba(20,20,15,.16); }
.timeline--light .tl-year { color: var(--ink); }
.timeline--light .tl-text { color: rgba(20,20,15,.66); }

/* --- Page Entreprise : valeurs --- */
.values { display: grid; grid-template-columns: 1.05fr .95fr; gap: 70px; align-items: center; }
.values__img { overflow: hidden; aspect-ratio: 4/5; }
.values__img img { width: 100%; height: 100%; object-fit: cover; }

/* --- Header / Hero --- */
.hero { position: relative; width: 100%; height: 100vh; min-height: 640px; overflow: hidden; background: #0a0c0a; }
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 1; }
.hero__scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,12,10,.40) 0%, rgba(10,12,10,0) 35%, rgba(10,12,10,.30) 100%); }
.hero__top { position: absolute; top: 34px; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 var(--pad-x); z-index: 5; }
.hero__kicker { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: rgba(244,243,238,.75); }
.hero__logo { height: 87px; width: auto; }
.hero__copy { position: absolute; left: var(--pad-x); bottom: 170px; right: var(--pad-x); z-index: 4; }
.hero__title { font-size: clamp(44px, 7vw, 104px); line-height: .96; font-weight: 500; letter-spacing: -.03em; max-width: 14ch; }
.hero__lead { margin-top: 22px; font-size: clamp(16px, 1.5vw, 20px); line-height: 1.5; max-width: 46ch; color: rgba(244,243,238,.82); font-family: 'Saira', sans-serif; }
.hero__cue { position: absolute; left: 0; right: 0; bottom: 118px; display: flex; justify-content: center; z-index: 4; font-size: 10px; letter-spacing: .3em; color: rgba(244,243,238,.5); text-transform: uppercase; }

.hero__cta-mobile { display: none; }

/* --- Section repères (chiffres + brique 3D) --- */
.stats { position: relative; background: var(--bg-light); color: var(--ink); padding: 120px var(--pad-x) 130px; overflow: hidden; }
.stats__kicker, .kicker { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--green); font-weight: 600; }
.stats__lead { margin: 18px 0 0; font-size: clamp(26px, 3vw, 46px); font-weight: 400; letter-spacing: -.02em; line-height: 1.15; text-wrap: balance; font-family: 'Bebas Neue', sans-serif; }
.stats__rows { position: relative; margin-top: 90px; }
.stats__canvas { position: absolute; left: 50%; top: 50%; width: 480px; height: 560px; transform: translate(-50%, -50%); z-index: 1; pointer-events: none; }
.stat-row { position: relative; z-index: 2; display: grid; grid-template-columns: 44px minmax(160px, auto) 180px 1fr minmax(200px, 320px); align-items: center; gap: 26px; padding: 34px 0; border-top: 1px solid rgba(76,86,92,.3); }
.stat-row__n { font-size: 13px; color: var(--green); }
.stat-row__value { font-size: clamp(57px, 7.7vw, 128px); font-weight: 500; letter-spacing: -.04em; line-height: .9; font-family: 'Bebas Neue', sans-serif; }
.stat-row__label { font-size: 16px; letter-spacing: .14em; text-transform: uppercase; color: var(--green); }
.stat-row__desc { font-size: 18px; line-height: 1.6; color: rgba(20,20,15,.6); text-wrap: pretty; }
.stats__baseline { border-top: 1px solid rgba(76,86,92,.3); }

/* --- Réalisations (accordéon) --- */
.realise { background: var(--bg-light); color: var(--ink); padding: 120px var(--pad-x) 130px; position: relative; overflow: hidden; }
.realise__head { margin: 0 auto 46px; }
.realise__title { margin: 16px 0 0; font-size: clamp(34px, 5vw, 72px); letter-spacing: -.025em; line-height: 1; max-width: 18ch; }
.accordion { display: flex; gap: 10px; height: min(66vh, 560px); }
.panel { position: relative; flex-grow: 1; flex-shrink: 1; flex-basis: 0; min-width: 0; overflow: hidden; cursor: pointer; will-change: flex-grow; contain: layout paint; transition: flex-grow .55s cubic-bezier(.22,.61,.36,1); }
.panel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.panel__scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,12,10,.05) 40%, rgba(10,12,10,.72) 100%); }
.panel__label { position: absolute; left: 20px; bottom: 22px; right: 16px; display: flex; align-items: center; gap: 12px; }
.panel__dot { width: 8px; height: 8px; background: var(--green); flex: none; }
.panel__name { font-size: clamp(17px, 1.5vw, 22px); font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: #fff; white-space: nowrap; text-shadow: 0 2px 18px rgba(0,0,0,.5); }
.realise__foot { margin: 40px auto 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.realise__hint { font-size: 12px; letter-spacing: .05em; color: rgba(20,20,15,.5); }

/* --- Section histoire (panneaux sticky) --- */
.history { position: relative; }
.sp { position: sticky; background: var(--bg-light); border-top: 1px solid rgba(76,86,92,.55); min-height: 50vh; }
.sp:nth-child(1) { top: 0; }
.sp:nth-child(2) { top: 96px; }
.sp:nth-child(3) { top: 192px; }
.sp:nth-child(4) { top: 288px; }
.sp__head { padding: 26px var(--pad-x); font-size: 15px; letter-spacing: .18em; text-transform: uppercase; color: var(--green); font-weight: 600; }
.sp__grid { display: grid; grid-template-columns: 1.05fr 1.4fr; min-height: 50vh; }
.sp__img { overflow: hidden; }
.sp__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sp__text { padding: 44px; display: flex; flex-direction: column; justify-content: center; color: var(--ink); }
.sp__title { font-size: clamp(30px, 3.4vw, 54px); letter-spacing: -.02em; line-height: 1.04; max-width: 16ch; }
.sp__body { margin: 34px 0 0; font-size: 17px; line-height: 1.62; color: rgba(20,20,15,.68); max-width: 56ch; text-wrap: pretty; font-family: 'Saira', sans-serif; }

/* --- CTA + briques 3D --- */
.cta { background: var(--bg-light); color: var(--ink); padding: 150px var(--pad-x); text-align: center; }
.cta__title { margin: 0 auto; font-size: clamp(36px, 6vw, 90px); letter-spacing: -.03em; line-height: .98; max-width: 16ch; }
.brickyard { position: relative; width: 100vw; left: 50%; margin-left: -50vw; margin-top: 70px; height: 360px; touch-action: pan-y; }
.brickyard canvas { width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; }
.brickyard__hint { position: absolute; left: 0; right: 0; bottom: -30px; text-align: center; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: rgba(20,20,15,.4); }

/* --- Footer --- */
.footer { background: var(--bg-light); color: var(--ink); padding: 0; border-top: 1px solid rgba(76,86,92,.4); }
.footer::after { content: none; }
.footer__legal { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 0 40px; height: 120px; background: var(--green); font-family: 'Saira', sans-serif; }
.footer__copy { font-size: 14px; color: rgba(255,255,255,.92); }
.footer__sign { display: inline-flex; align-items: center; gap: 12px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: #fff; }
.footer__sign:hover { color: rgba(255,255,255,.75); }
.footer__sign img { width: 21px; height: 21px; display: block; transition: transform .5s cubic-bezier(.16,.8,.3,1); }
.footer__sign:hover img { transform: rotateY(180deg); }
.footer__grid { display: grid; grid-template-columns: 1fr 1fr 1fr; }
.footer__col { padding: 44px 40px 40px; border-bottom: 1px solid rgba(76,86,92,.4); }
.footer__col--brand, .footer__col--mid { border-right: 1px solid rgba(76,86,92,.4); }
.footer__brandname { font-size: 30px; font-family: 'Bebas Neue', sans-serif; }
.footer__logo-color { height: 56px; width: auto; }
.footer__h { font-size: 19px; font-weight: 600; letter-spacing: -.01em; font-family: 'Saira', sans-serif; }
.footer__links { margin-top: 22px; display: flex; flex-direction: column; gap: 14px; }
.footer__link { display: flex; align-items: center; gap: 12px; font-size: 15px; color: rgba(20,20,15,.65); }
.footer__link:hover { color: var(--green-deep); }
.footer__link .ic { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border: 1px solid currentColor; border-radius: 50%; font-size: 10px; }
.footer__block { padding: 40px; border-top: 1px solid rgba(76,86,92,.4); }
.footer__bottom { display: grid; grid-template-columns: 1fr 1fr 1fr; }
.footer__logo-big { padding: 30px 20px 26px; display: flex; justify-content: center; }
.footer__logo-big img { width: min(1400px, 92%); height: auto; }

/* --- Nav flottante + menu --- */
.dock { position: fixed; left: 0; right: 0; bottom: 26px; display: flex; justify-content: center; z-index: 60; pointer-events: none; }
.dock__inner { pointer-events: auto; display: flex; flex-direction: column; background: rgba(14,17,15,.9); backdrop-filter: blur(18px); border: 1px solid rgba(76,86,92,.35); border-radius: 6px; box-shadow: 0 18px 60px rgba(0,0,0,.5); overflow: hidden; width: 312px; transition: width .5s cubic-bezier(.16,.85,.3,1); }
.dock.is-open .dock__inner { width: min(520px, 92vw); }
.dock__menu { overflow: hidden; max-height: 0; opacity: 0; padding: 0 44px; transition: max-height .5s cubic-bezier(.16,.85,.3,1), opacity .4s ease, padding .5s cubic-bezier(.16,.85,.3,1); }
.dock.is-open .dock__menu { max-height: 72vh; opacity: 1; padding: 40px 44px 26px; }
.dock__menu-scroll { overflow-y: auto; max-height: 64vh; padding-right: 4px; }
.dock__menu-title { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: rgba(244,243,238,.5); margin-bottom: 20px; }
.dock__nav { display: flex; flex-direction: column; gap: 2px; }
.dock__link { cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: clamp(24px, 2.9vw, 32px); letter-spacing: -.02em; line-height: 1.32; font-family: 'Bebas Neue', sans-serif; color: var(--paper); }
.dock__link:hover { color: var(--green); }
.dock__chev { font-size: 13px; transition: transform .4s cubic-bezier(.16,.85,.3,1); color: var(--green); }
.dock__item.is-open .dock__chev { transform: rotate(180deg); }
.dock__item.is-open .dock__link { color: var(--green); }
.dock__sub { overflow: hidden; max-height: 0; opacity: 0; transition: max-height .45s cubic-bezier(.16,.85,.3,1), opacity .35s ease; }
.dock__item.is-open .dock__sub { max-height: 340px; opacity: 1; }
.dock__sub-inner { display: flex; flex-direction: column; gap: 1px; padding: 6px 0 10px 20px; border-left: 1px solid rgba(36,172,93,.35); margin: 4px 0 6px 4px; }
.dock__sub-inner a { cursor: pointer; font-size: clamp(15px, 1.6vw, 18px); letter-spacing: -.01em; line-height: 1.7; color: rgba(244,243,238,.82); font-family: 'Saira', sans-serif; }
.dock__sub-inner a:hover { color: var(--green); }
.dock__contact { display: flex; gap: 56px; margin-top: 30px; }
.dock__contact .mono { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: rgba(244,243,238,.45); }
.dock__bar { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid rgba(76,86,92,0); transition: border-color .4s ease; }
.dock.is-open .dock__bar { border-top-color: rgba(76,86,92,.35); }
.dock__home, .dock__burger { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; cursor: pointer; }
.dock__label { flex: 1; text-align: center; padding: 0 20px; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; }
.dock__burger { position: relative; }
.dock__burger span { position: absolute; display: block; width: 18px; height: 1.5px; background: var(--paper); transition: transform .4s cubic-bezier(.16,.85,.3,1); }
.dock__burger span:nth-child(1) { transform: translateY(-3px); }
.dock__burger span:nth-child(2) { transform: translateY(3px); }
.dock.is-open .dock__burger span:nth-child(1) { transform: rotate(45deg); }
.dock.is-open .dock__burger span:nth-child(2) { transform: rotate(-45deg); }
.backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(8,10,8,.6); backdrop-filter: blur(8px); transition: opacity .45s ease; opacity: 0; pointer-events: none; }
.backdrop.is-open { opacity: 1; pointer-events: auto; }

/* --- Pages secondaires --- */
.page { display: none; }
.page.is-active { display: block; }
.subhero { position: relative; width: 100%; height: 74vh; min-height: 520px; overflow: hidden; background: #0a0c0a; }
.subhero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.subhero__scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,12,10,.45), rgba(10,12,10,.55)); }
.subhero__copy { position: absolute; left: var(--pad-x); bottom: 120px; right: var(--pad-x); }
.subhero__title { margin: 14px 0 0; font-size: clamp(40px, 6vw, 92px); font-weight: 500; letter-spacing: -.03em; line-height: .98; max-width: 16ch; }
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.team-card__img { position: relative; overflow: hidden; aspect-ratio: 3/4; background: #1c211a; }
.team-card__img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.3); }
.team-card__name { margin-top: 14px; font-size: 16px; font-weight: 500; font-family: 'Saira', sans-serif; }
.team-card__role { margin-top: 4px; font-size: 11px; letter-spacing: .05em; color: rgba(244,243,238,.5); }
.domains-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 28px; }
.domains-grid a { display: block; cursor: pointer; }
.domains-grid .d-img { position: relative; overflow: hidden; background: #dcd9cf; }
.domains-grid .d-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.16,.8,.3,1); }
.domains-grid a:hover .d-img img { transform: scale(1.05); }
.domains-grid .d-name { position: absolute; left: 26px; bottom: 22px; font-size: clamp(24px, 2.4vw, 38px); font-weight: 500; color: #fff; letter-spacing: -.01em; text-shadow: 0 2px 24px rgba(0,0,0,.45); font-family: 'Bebas Neue', sans-serif; }
.contact { position: relative; width: 100%; min-height: 100vh; overflow: hidden; background: #0a0c0a; display: flex; align-items: center; }
.contact img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .4; }
.contact__scrim { position: absolute; inset: 0; background: linear-gradient(120deg, rgba(10,12,10,.75), rgba(10,12,10,.35)); }
.contact__grid { position: relative; z-index: 3; max-width: none; margin: 0 auto; width: 100%; padding: 0 var(--pad-x); display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; }
.contact__title { margin: 16px 0 0; font-size: clamp(38px, 5.5vw, 84px); font-weight: 500; letter-spacing: -.03em; line-height: .98; max-width: 15ch; }
.contact__card { background: rgba(18,21,15,.72); backdrop-filter: blur(14px); border: 1px solid rgba(76,86,92,.35); padding: 44px; }
.field { width: 100%; background: transparent; border: none; border-bottom: 1px solid rgba(76,86,92,.4); padding: 14px 0; color: var(--paper); font-family: 'Saira', sans-serif; font-size: 16px; outline: none; margin-bottom: 22px; }

/* --- Responsive --- */
@media (max-width: 980px) {
  .stat-row { grid-template-columns: 34px minmax(120px, auto) 1fr; gap: 14px 20px; }
  .stat-row > .stat-row__label { grid-column: 1 / -1; }
  .stat-row > .stat-row__desc { grid-column: 1 / -1; margin-top: 2px; }
  .stats__canvas { position: relative; left: auto; top: auto; transform: none; width: 100%; height: 280px; margin-bottom: 24px; display: block; }
  .accordion { flex-direction: column; height: auto; }
  .panel { height: 150px; flex: none; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .tl-row { grid-template-columns: 30px 1fr; gap: 20px 22px; }
  .tl-year { grid-column: 2; font-size: clamp(46px, 12vw, 80px); }
  .tl-body { grid-column: 2; grid-template-columns: 1fr; gap: 20px; }
  .tl-rail::before { bottom: -44px; }
  .values { grid-template-columns: 1fr; gap: 40px; }
  .domains-grid { grid-template-columns: repeat(2, 1fr); }
  .domains-grid a { grid-column: auto !important; }
  .sp__grid { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: 1fr; gap: 36px; }
  .footer__grid, .footer__bottom { grid-template-columns: 1fr; }
  .footer__col, .footer__col--brand, .footer__col--mid { border-right: none; }
}
@media (max-width: 640px) {
  :root { --pad-x: 22px; }
  .stat-row { grid-template-columns: 1fr; }
  .team-grid, .domains-grid { grid-template-columns: 1fr; }
  .hero__top { flex-direction: column; align-items: flex-start; gap: 6px; top: 20px; }
  .hero__logo { height: 54px; margin: 0; }
  .hero__kicker { font-size: 10px; }
  .hero__cta { display: none; }
  .hero__cta-mobile { display: inline-flex; margin-top: 26px; }
  .footer__legal { flex-direction: column; align-items: flex-start; height: auto; padding: 24px 22px 120px; gap: 12px; }
}
