/* ── Révelis — CSS custom ───────────────────────────────────────────────── */

/* ── Design tokens ──────────────────────────────────────────────────────── */
:root {
  --white:       #ffffff;
  --cream:       #faf8f5;
  --cream-mid:   #f3ede6;
  --navy:        #232851;
  --navy-mid:    #3a4270;
  --flame:       #e94c1e;
  --flame-hover: #d43e14;
  --gold:        #fcbd0b;
  --text:        #232851;
  --text-mid:    #4a5278;
  --text-muted:  #5c607e;
  --border:      rgba(35,40,81,0.1);
  --border-mid:  rgba(35,40,81,0.16);
  --shadow-sm:   0 1px 8px rgba(35,40,81,0.06);
  --shadow:      0 4px 24px rgba(35,40,81,0.08);
  --shadow-lg:   0 12px 48px rgba(35,40,81,0.12);
  --page-px:     clamp(1rem, 3vw, 2.5rem);
  --page-maxw:   1200px;
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; max-width: 100%; overflow-x: hidden; }
body {
  background: var(--white);
  color: var(--text);
  font-family: 'DM Sans', system-ui, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  max-width: 100%;
}
img { max-width: 100%; height: auto; }

/* ── Scrollbar ──────────────────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 4px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--navy); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--flame); }

/* ── Selection ──────────────────────────────────────────────────────────── */
::selection { background: rgba(233,76,30,0.15); color: var(--navy); }

/* ── Page layout ────────────────────────────────────────────────────────── */
.page-wrap {
  max-width:     var(--page-maxw);
  margin-left:   auto;
  margin-right:  auto;
  padding-left:  var(--page-px);
  padding-right: var(--page-px);
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn-primary,
.btn-navy,
.btn-outline-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 28px;
  border-radius: 3px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  border: none;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.25s ease, transform 0.2s ease;
}
.btn-primary       { background: var(--flame); color: #fff; }
.btn-navy          { background: var(--navy);  color: #fff; letter-spacing: 0.01em; }
.btn-outline-white { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.4); padding: 11px 26px; }

@media (hover: hover) {
  .btn-primary:hover       { background: var(--flame-hover); transform: translateY(-1px); }
  .btn-navy:hover          { background: var(--navy-mid);    transform: translateY(-1px); }
  .btn-outline-white:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.7); }
}

/* ── Forms ──────────────────────────────────────────────────────────────── */
.field {
  width: 100%;
  min-height: 44px;
  background: rgba(35,40,81,0.04);
  border: 1px solid rgba(35,40,81,0.12);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  color: #232851;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.field:focus { border-color: rgba(35,40,81,0.35); background: rgba(35,40,81,0.06); }

/* ── Custom select ───────────────────────────────────────────────────────── */
.cs-wrap       { position: relative; }
.cs-trigger    {
  width: 100%; min-height: 44px;
  background: rgba(35,40,81,0.04);
  border: 1px solid rgba(35,40,81,0.12);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px; color: #696d89;
  text-align: left; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.cs-trigger.has-value { color: #232851; }
.cs-trigger:focus,
.cs-trigger[aria-expanded="true"] { border-color: rgba(35,40,81,0.35); background: rgba(35,40,81,0.06); outline: none; }
.cs-trigger svg { flex-shrink: 0; transition: transform 0.2s ease; }
.cs-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }

.cs-options {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 200;
  background: #fff;
  border: 1px solid rgba(35,40,81,0.12);
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(35,40,81,0.1);
  overflow: hidden;
  opacity: 0; transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.cs-options.open { opacity: 1; transform: translateY(0); pointer-events: auto; }

.cs-option {
  padding: 0.75rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px; color: #5c607e;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  border-bottom: 1px solid rgba(35,40,81,0.06);
}
.cs-option:last-child    { border-bottom: none; }
.cs-option:hover         { background: rgba(35,40,81,0.04); color: #232851; }
.cs-option.selected      { color: #e94c1e; }
.cs-option[data-value=""]{ color: #696d89; font-style: italic; }

.field-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #5c607e;
  font-family: 'DM Sans', sans-serif;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

/* ── Opening animations ─────────────────────────────────────────────────── */
@keyframes rv-slide-up {
  from { transform: translateY(110%); }
  to   { transform: translateY(0); }
}
@keyframes rv-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.rv-slide-up { animation: rv-slide-up 1.15s cubic-bezier(0.16, 1, 0.3, 1) both; }
.rv-fade-in  { animation: rv-fade-in 1.1s ease both; }

/* ── Scroll animations ──────────────────────────────────────────────────── */
.anim-fade {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.anim-fade.is-visible { opacity: 1; transform: none; }

.anim-fade-x {
  opacity: 0;
  transform: translateX(-16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.anim-fade-x.is-visible { opacity: 1; transform: none; }

.anim-scale-x {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.anim-scale-x.is-visible { transform: scaleX(1); }

/* ── Scroll indicator ───────────────────────────────────────────────────── */
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50%       { transform: translateY(8px); opacity: 0.3; }
}
.scroll-indicator { animation: scrollBounce 2.2s ease-in-out infinite; }
@media (max-height: 600px) { .scroll-indicator { display: none; } }

/* ── Navbar ─────────────────────────────────────────────────────────────── */
.navbar-wrap {
  position: fixed;
  top: 16px;
  left: 0; right: 0;
  z-index: 40;
  pointer-events: none;
  padding-left:  clamp(1rem, 3vw, 2.5rem);
  padding-right: clamp(1rem, 3vw, 2.5rem);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.navbar-wrap.hidden-nav { transform: translateY(calc(-100% - 24px)); }

.navbar-pill {
  max-width: 1200px;
  margin: 0 auto;
  pointer-events: auto;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 50px;
  border: 1px solid rgba(35,40,81,0.1);
  box-shadow: 0 2px 20px rgba(35,40,81,0.07);
  height: clamp(64px, 10vw, 80px);
  padding-left: clamp(14px, 3vw, 20px);
  padding-right: clamp(10px, 2vw, 16px);
  overflow: visible;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: box-shadow 0.4s ease, background 0.4s ease;
}
.navbar-pill.scrolled {
  background: rgba(255,255,255,0.98);
  box-shadow: 0 4px 32px rgba(35,40,81,0.12), 0 1px 4px rgba(35,40,81,0.06);
}
@media (min-width: 1024px) {
  .navbar-pill { display: grid; grid-template-columns: 1fr auto 1fr; }
}

.navbar-logo { display: flex; align-items: center; padding: 0 1rem 0 0.5rem; text-decoration: none; }

.navbar-nav { display: none; gap: clamp(1.2rem, 2.5vw, 2.2rem); align-items: center; overflow: visible; }
@media (min-width: 1024px) { .navbar-nav { display: flex; } }

.navbar-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #4a5278;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.25s ease;
}
.navbar-link:hover,
.navbar-link.active { color: #232851; font-weight: 600; }
.navbar-link .nav-shape {
  position: absolute;
  bottom: -13px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.22s ease;
}
.navbar-link:hover .nav-shape,
.navbar-link.active .nav-shape { opacity: 1; }

.navbar-cta { display: none; }
@media (min-width: 1024px) { .navbar-cta { display: flex; justify-content: flex-end; align-items: center; padding-right: 6px; } }

.navbar-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #232851;
  color: #fff;
  border-radius: 8px;
  padding: 12px 24px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.25s ease, transform 0.2s ease;
}
@media (hover: hover) {
  .navbar-cta-btn:hover { background: #3a4270; transform: translateY(-1px); }
}

.navbar-burger {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
@media (min-width: 1024px) { .navbar-burger { display: none; } }
.navbar-burger span { display: block; height: 1px; background: #232851; transition: transform 0.3s ease, opacity 0.3s ease; }
.navbar-burger span:nth-child(1) { width: 22px; }
.navbar-burger span:nth-child(2) { width: 14px; }
.navbar-burger span:nth-child(3) { width: 22px; }
.navbar-burger.open span:nth-child(1) { transform: rotate(-45deg) translateY(3px); }
.navbar-burger.open span:nth-child(2) { opacity: 0; }
.navbar-burger.open span:nth-child(3) { transform: rotate(45deg) translateY(-3px); }

.navbar-mobile {
  position: fixed;
  top: calc(16px + clamp(64px, 10vw, 80px) + 8px);
  left: 0; right: 0;
  z-index: 39;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 0 0 24px 24px;
  border: 1px solid rgba(35,40,81,0.09);
  border-top: none;
  box-shadow: 0 8px 40px rgba(35,40,81,0.12);
  padding: 1.5rem clamp(1rem, 4vw, 2rem) 1.75rem;
  display: none;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.navbar-mobile.open { display: block; opacity: 1; transform: translateY(0); }
.navbar-mobile a:not(.btn-navy) {
  display: block;
  padding: 1.15rem 0;
  border-bottom: 1px solid rgba(35,40,81,0.05);
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(1.2rem, 4vw, 1.5rem);
  color: #232851;
  text-decoration: none;
}
.navbar-mobile a.active { color: #e94c1e; }
.navbar-mobile-footer { padding-top: 1.25rem; display: flex; align-items: center; justify-content: space-between; }

/* ── Section label (ligne + texte) ─────────────────────────────────────── */
.section-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}
.section-label::before {
  content: '';
  display: block;
  width: clamp(2rem, 5vw, 4rem);
  height: 1px;
  background: rgba(35,40,81,0.2);
  flex-shrink: 0;
}
.section-label-text {
  font-size: 9px;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: #696d89;
  font-family: 'DM Sans', sans-serif;
}
.section-label-dark::before             { background: rgba(255,255,255,0.2); }
.section-label-dark .section-label-text { color: rgba(255,255,255,0.75); }

/* ── Chapter header (texte + ligne pleine + numéro) ─────────────────────── */
.chapter-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}
.chapter-header-text {
  font-size: 10px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  font-family: 'DM Sans', sans-serif;
  color: #696d89;
  white-space: nowrap;
}
.chapter-header-line { flex: 1; height: 1px; background: rgba(35,40,81,0.08); }
.chapter-header-num  { font-size: 11px; font-family: ui-monospace, monospace; color: #696d89; }
.chapter-header-dark .chapter-header-text { color: rgba(255,255,255,0.55); }
.chapter-header-dark .chapter-header-line { background: rgba(255,255,255,0.14); }
.chapter-header-dark .chapter-header-num  { color: rgba(255,255,255,0.5); }

/* ── BgGeometry ─────────────────────────────────────────────────────────── */
.bg-geo         { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.bg-geo img     { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.bg-geo-overlay { position: absolute; inset: 0; background: rgba(8,14,42,0.15); }

/* ── Ghost numeral ──────────────────────────────────────────────────────── */
.ghost-num {
  position: absolute;
  font-family: 'Lora', Georgia, serif;
  font-weight: 400;
  line-height: 1;
  color: #232851;
  opacity: 0.028;
  user-select: none;
  pointer-events: none;
}

/* ── Responsive grids ───────────────────────────────────────────────────── */
.grid-2col     { display: grid; grid-template-columns: 1fr; gap: clamp(2rem,4vw,3rem) 6rem; }
.grid-approach { display: grid; grid-template-columns: 1fr; gap: clamp(2rem,5vw,6rem); }
.grid-portrait { display: grid; grid-template-columns: 1fr; gap: clamp(2rem,4vw,3rem) 4rem; }
.grid-about    { display: grid; grid-template-columns: 1fr; gap: clamp(2rem,4vw,4rem) 6rem; align-items: center; }
.grid-contact  { display: grid; grid-template-columns: 1fr; gap: clamp(1.5rem,3vw,2.5rem) 7rem; }
.grid-map      { display: grid; grid-template-columns: 1fr; gap: clamp(1rem,2vw,2rem) 6rem; align-items: start; }
.grid-form-row { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
.grid-formats  { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--border); }
.grid-features { display: grid; grid-template-columns: 1fr; border-top: 1px solid rgba(255,255,255,0.07); }
.grid-tech-inner { display: grid; gap: clamp(1rem,3vw,3rem); }

@media (min-width: 540px)  { .grid-form-row { grid-template-columns: 1fr 1fr; } }
@media (min-width: 768px)  { .grid-formats  { grid-template-columns: 1fr 1fr; } }
@media (min-width: 768px)  { .grid-features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .grid-2col     { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .grid-portrait { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .grid-about    { grid-template-columns: 3fr 2fr; } }
@media (min-width: 1024px) { .grid-contact  { grid-template-columns: 1fr 1.5fr; } }
@media (min-width: 1024px) { .grid-map      { grid-template-columns: 1fr 1.4fr; } }
@media (min-width: 1024px) { .grid-approach { grid-template-columns: 1fr 320px; } }
@media (min-width: 1024px) { .grid-tech-inner { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1280px) { .grid-approach { grid-template-columns: 1fr 360px; } }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
@media (min-width: 480px) {
  .footer-grid  { grid-template-columns: 1fr 1fr; row-gap: 2.5rem; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  .footer-grid  { grid-template-columns: 1fr auto auto auto; }
  .footer-brand { grid-column: auto; }
}
.footer-col-title {
  font-size: 9px;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: #696d89;
  margin-bottom: 1.25rem;
  font-family: 'DM Sans', sans-serif;
}
.footer-link {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--text-mid);
  display: flex;
  align-items: center;
  min-height: 44px;
  transition: color 0.3s ease;
}
.footer-link:hover { color: var(--navy); }

/* ── Hover interactions ─────────────────────────────────────────────────── */
.service-row:hover .service-name  { color: #e94c1e; }
.service-row:hover .service-desc  { opacity: 1; transform: translateY(0); }
.service-row:hover .service-arrow { opacity: 1; transform: translateX(4px); color: #e94c1e; }
.service-name  { transition: color 0.4s ease; }
.service-desc  { opacity: 0; transform: translateY(4px); transition: opacity 0.3s ease, transform 0.3s ease; }
.service-arrow { opacity: 0.35; color: var(--text-muted); transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease; }

.technique-row:hover .technique-name { color: #e94c1e; }
.technique-name { transition: color 0.3s ease; }

.value-row:hover .value-title { color: #e94c1e; }
.value-row:hover .value-arrow { stroke: #e94c1e; transform: translateX(4px); }
.value-title { transition: color 0.3s ease; }
.value-arrow { transition: stroke 0.3s ease, transform 0.3s ease; }

/* ── Contact & map links ────────────────────────────────────────────────── */
.contact-item-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Lora', Georgia, serif;
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  color: #232851;
  text-decoration: none;
  transition: color 0.25s ease;
}
.contact-item-link:hover { color: #e94c1e; }
.contact-item-icon { color: #e94c1e; flex-shrink: 0; }

.maps-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 0.75rem;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5c607e;
  text-decoration: none;
  transition: color 0.3s ease;
}
.maps-link:hover { color: #e94c1e; }

/* ── Closing section contact rows ───────────────────────────────────────── */
.closing-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.14);
  padding: clamp(1rem, 2.5vw, 1.75rem) 0;
  transition: color 0.3s ease;
}
.closing-row:hover { color: #e94c1e; }
.closing-row svg { margin-left: auto; opacity: 0; transition: opacity 0.3s ease, transform 0.3s ease; }
.closing-row:hover svg { opacity: 1; transform: translateX(4px); }

.closing-row-static {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.14);
  padding: clamp(1rem, 2.5vw, 1.75rem) 0;
}

/* ── Tag pills (section Opening) ────────────────────────────────────────── */
.tag-pill {
  display:        inline-block;
  font-size:      clamp(10px, 1.2vw, 13px);
  letter-spacing: 0.08em;
  color:          #5c607e;
  padding:        6px 14px;
  border:         1px solid rgba(35,40,81,0.15);
  border-radius:  2px;
  cursor:         default;
  transition:     color 0.25s ease, border-color 0.25s ease,
                  background 0.25s ease, transform 0.25s ease;
}
.tag-pill:hover {
  color:        #e94c1e;
  border-color: rgba(233,76,30,0.45);
  background:   rgba(233,76,30,0.06);
  transform:    translateY(-2px);
}

/* ── Accessibility : liens dans le contenu ──────────────────────────────── */
main p a, main li a, main label a, main address a {
  text-decoration: underline;
  text-decoration-color: rgba(35,40,81,0.3);
  text-underline-offset: 3px;
}
main p a:hover, main li a:hover, main label a:hover {
  text-decoration-color: currentColor;
}

/* ── Misc ───────────────────────────────────────────────────────────────── */
.hide-mobile  { display: none; }
.hide-desktop { display: block; }
@media (min-width: 768px) { .hide-mobile  { display: inline; } }
@media (min-width: 640px) { .hide-desktop { display: none; } }

/* ── Mobile overrides ───────────────────────────────────────────────────── */
@media (max-width: 480px) {
  /* Ghost numbers allégés sur très petits écrans */
  .ghost-num { opacity: 0.015; }

  /* Section label gap réduit */
  .section-label { margin-bottom: clamp(1.5rem, 5vw, 2.5rem); }

  /* Closing row : texte pas trop petit */
  .closing-row, .closing-row-static { gap: 0.75rem; }

  /* Boutons pleine largeur sur mobile si seuls */
  .btn-block-mobile { width: 100%; justify-content: center; }

  /* Footer centré sur mobile */
  .footer-grid       { text-align: center; }
  .footer-brand      { display: flex; flex-direction: column; align-items: center; }
  .footer-brand p    { max-width: 100% !important; }
  .footer-link       { justify-content: center; }
  .footer-col-title  { text-align: center; }
  .footer-grid address { display: flex; flex-direction: column; align-items: center; }
  .footer-grid [style*="justify-content:space-between"] { justify-content: center; gap: 0.75rem; }
}

@media (max-width: 640px) {
  /* Scroll indicator caché sur mobile (overlap avec contenu) */
  .scroll-indicator { display: none; }

  /* Tag pills : wrap propre */
  .tag-pill { font-size: 10px; padding: 5px 11px; }
}
