/* ==========================================================================
   HM TECHNOLOGIE — Design System 2026
   Author: Refonte web 2026
   ========================================================================== */

:root {
  /* Brand palette (tirée du logo et des decks) */
  --navy:      #0E2A47;
  --navy-2:    #12365F;
  --navy-3:    #0A2138;
  --blue:      #1C7FC4;
  --blue-hi:   #2A98E0;
  --cyan:      #33B8E1;
  --cyan-hi:   #5BCEEF;

  /* Neutrals */
  --ink:       #16263B;
  --ink-2:     #2A3B53;
  --mute:      #5E7088;
  --line:      #E1EAF2;
  --line-2:    #EEF3F8;
  --bg:        #FFFFFF;
  --bg-soft:   #F6F9FC;
  --bg-tint:   #EAF1F8;

  /* Semantic */
  --success:   #1F8A55;
  --warning:   #D58A1E;
  --danger:    #C73B3B;

  /* Typography */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Type scale (clamp for fluid responsive) */
  --fs-display: clamp(2.6rem, 6vw, 5.5rem);
  --fs-h1:      clamp(2.1rem, 4.4vw, 3.6rem);
  --fs-h2:      clamp(1.7rem, 3.0vw, 2.5rem);
  --fs-h3:      clamp(1.25rem, 1.8vw, 1.5rem);
  --fs-lead:    clamp(1.05rem, 1.25vw, 1.18rem);
  --fs-body:    1rem;
  --fs-small:   0.875rem;
  --fs-xs:      0.78rem;

  /* Spacing scale */
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem;
  --s-5: 1.5rem; --s-6: 2rem; --s-7: 3rem; --s-8: 4rem; --s-9: 6rem; --s-10: 8rem;

  /* Layout */
  --max:      1240px;
  --max-wide: 1440px;
  --gutter:   clamp(1.25rem, 3vw, 2rem);
  --radius:   14px;
  --radius-sm: 8px;
  --radius-lg: 24px;

  /* Effects */
  --shadow-sm:  0 1px 2px rgba(14,42,71,.06), 0 1px 1px rgba(14,42,71,.04);
  --shadow:     0 6px 18px rgba(14,42,71,.08), 0 2px 6px rgba(14,42,71,.05);
  --shadow-lg:  0 18px 48px rgba(14,42,71,.14), 0 6px 16px rgba(14,42,71,.08);
  --shadow-xl:  0 30px 70px rgba(14,42,71,.18), 0 10px 24px rgba(14,42,71,.10);

  --ease:     cubic-bezier(.2,.7,.2,1);
  --ease-out: cubic-bezier(.16,1,.3,1);

  --header-h: 76px;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root.theme-auto {
    --bg: #0B1A2D; --bg-soft: #0F2238; --bg-tint: #122A45;
    --ink: #E7EDF5; --ink-2: #C5D2E2; --mute: #8FA3BC;
    --line: #1B3251; --line-2: #15273F;
    --navy: #E7EDF5; --navy-2: #C5D2E2; --navy-3: #FFFFFF;
  }
}
:root.theme-dark {
  --bg: #0B1A2D; --bg-soft: #0F2238; --bg-tint: #122A45;
  --ink: #E7EDF5; --ink-2: #C5D2E2; --mute: #8FA3BC;
  --line: #1B3251; --line-2: #15273F;
  --navy: #E7EDF5; --navy-2: #C5D2E2; --navy-3: #FFFFFF;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--navy); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 var(--s-4) 0;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 600; }
p { margin: 0 0 var(--s-4) 0; color: var(--ink-2); }

.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 var(--s-3) 0;
}
.lead { font-size: var(--fs-lead); color: var(--ink-2); }

/* ==========================================================================
   Layout
   ========================================================================== */
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.container-wide { max-width: var(--max-wide); }
.section { padding: clamp(var(--s-7), 8vw, var(--s-9)) 0; }
.section-sm { padding: clamp(var(--s-6), 5vw, var(--s-7)) 0; }
.grid { display: grid; gap: var(--gutter); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.text-center { text-align: center; }
.muted { color: var(--mute); }
.bg-soft { background: var(--bg-soft); }
.bg-dark { background: var(--navy); color: #E7EDF5; }
.bg-dark h1, .bg-dark h2, .bg-dark h3 { color: #FFFFFF; }
.bg-dark p { color: #C5D2E2; }
.bg-dark .eyebrow { color: var(--cyan); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--navy); color: #FFFFFF; }
.btn-primary:hover { background: var(--blue); color: #FFFFFF; box-shadow: var(--shadow); }
.btn-accent { background: var(--blue); color: #FFFFFF; }
.btn-accent:hover { background: var(--navy); color: #FFFFFF; box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }
.btn-light { background: rgba(255,255,255,.12); color: #FFFFFF; border-color: rgba(255,255,255,.25); backdrop-filter: blur(6px); }
.btn-light:hover { background: rgba(255,255,255,.22); color: #FFFFFF; }
.btn svg { width: 1.05em; height: 1.05em; }

/* ==========================================================================
   Header
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.header.is-scrolled {
  background: rgba(255,255,255,.94);
  border-bottom-color: var(--line);
}
:root.theme-dark .header,
:root.theme-auto .header {
  background: rgba(11,26,45,.78);
}
:root.theme-dark .header.is-scrolled,
:root.theme-auto .header.is-scrolled {
  background: rgba(11,26,45,.94);
}
.header-row {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  height: var(--header-h);
}
.logo-link { display: inline-flex; align-items: center; flex-shrink: 0; }
.logo-link img { height: 42px; width: auto; }
.nav { display: flex; gap: var(--s-2); margin-left: auto; align-items: center; }
.nav a {
  color: var(--ink); font-weight: 500; font-size: 0.95rem;
  padding: 0.55rem 0.85rem; border-radius: 8px;
  position: relative; transition: background .2s var(--ease), color .2s var(--ease);
}
.nav a:hover, .nav a[aria-current="page"] { background: var(--bg-tint); color: var(--navy); }
.nav-cta { margin-left: var(--s-3); }
.has-dropdown { position: relative; }
.dropdown {
  position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%) translateY(6px);
  min-width: 540px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: var(--s-5);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
}
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); pointer-events: auto;
}
.dropdown-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }
.dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  color: var(--ink); font-size: 0.92rem; font-weight: 500;
}
.dropdown a:hover { background: var(--bg-tint); color: var(--navy); }
.dropdown a .ico {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--bg-tint); color: var(--blue);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.dropdown a:hover .ico { background: var(--blue); color: #FFFFFF; }
.dropdown a .ico svg { width: 18px; height: 18px; }

.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line); background: var(--bg);
  border-radius: 10px; cursor: pointer;
  align-items: center; justify-content: center;
}
.menu-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); position: relative; }
.menu-toggle span::before, .menu-toggle span::after {
  content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink); transition: transform .25s var(--ease), top .25s var(--ease);
}
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }
.menu-open .menu-toggle span { background: transparent; }
.menu-open .menu-toggle span::before { top: 0; transform: rotate(45deg); }
.menu-open .menu-toggle span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 1100px) {
  .nav {
    position: fixed; inset: var(--header-h) 0 0 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); padding: var(--s-5) var(--gutter);
    border-top: 1px solid var(--line);
    transform: translateX(100%); transition: transform .3s var(--ease);
    overflow-y: auto;
  }
  .menu-open .nav { transform: translateX(0); }
  .nav a { padding: 0.9rem 0.6rem; border-bottom: 1px solid var(--line-2); border-radius: 0; }
  .nav-cta { margin: var(--s-4) 0 0 0; align-self: flex-start; }
  .menu-toggle { display: inline-flex; margin-left: auto; }
  .dropdown {
    position: static; transform: none; opacity: 1; visibility: visible; pointer-events: auto;
    min-width: 0; box-shadow: none; border: none; padding: 0 0 var(--s-4) var(--s-4);
    background: transparent;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3.5rem, 8vw, 6rem);
  overflow: hidden;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--bg-soft) 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(700px 380px at 90% -10%, rgba(51,184,225,.18), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(14,42,71,.06), transparent 60%);
  pointer-events: none;
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 980px) { .hero-inner { grid-template-columns: 1fr; } }
.hero h1 {
  font-size: var(--fs-display); margin-bottom: var(--s-5);
}
.hero .lead { max-width: 56ch; margin-bottom: var(--s-6); }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.hero-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/5;
  box-shadow: var(--shadow-xl);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-stat {
  position: absolute; left: -22px; bottom: 28px;
  background: var(--bg); border: 1px solid var(--line);
  padding: var(--s-4) var(--s-5);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex; gap: var(--s-4); align-items: center;
}
.hero-stat strong {
  font-family: var(--font-display); font-size: 2.2rem; color: var(--blue); display: block; line-height: 1;
}
.hero-stat span { font-size: var(--fs-small); color: var(--mute); }

/* Page hero (intermediate pages) */
.page-hero {
  background: var(--navy);
  color: #E7EDF5;
  padding: clamp(5rem, 9vw, 7rem) 0 clamp(3rem, 5vw, 4rem);
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(700px 400px at 90% 0%, rgba(51,184,225,.18), transparent 65%);
  pointer-events: none;
}
.page-hero h1 { color: #FFFFFF; max-width: 22ch; }
.page-hero .eyebrow { color: var(--cyan); }
.page-hero .lead { color: #C5D2E2; max-width: 60ch; margin-bottom: 0; }
.breadcrumb {
  display: flex; gap: 6px; flex-wrap: wrap; font-size: var(--fs-small); color: #8FA3BC;
  margin-bottom: var(--s-4);
}
.breadcrumb a { color: #C5D2E2; }
.breadcrumb a:hover { color: #FFFFFF; }

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s-5);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card-link { color: inherit; display: block; }
.card-link:hover { color: inherit; }

.card-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--bg-tint); color: var(--blue);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: var(--s-4);
}
.card:hover .card-icon { background: var(--blue); color: #FFFFFF; }
.card-icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: var(--s-3); }
.card p { color: var(--mute); font-size: 0.95rem; margin-bottom: var(--s-3); }
.card .arrow { color: var(--blue); font-weight: 600; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 4px; }
.card:hover .arrow { gap: 8px; }

.category-card {
  position: relative; overflow: hidden;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius);
  display: block; color: inherit;
  aspect-ratio: 4/3;
  isolation: isolate;
}
.category-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .55s var(--ease-out);
}
.category-card:hover img { transform: scale(1.05); }
.category-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(14,42,71,0) 50%, rgba(14,42,71,.78) 100%);
}
.category-card .label {
  position: absolute; left: var(--s-5); right: var(--s-5); bottom: var(--s-5);
  z-index: 2; color: #FFFFFF;
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-3);
}
.category-card .label h3 { color: #FFFFFF; margin: 0; }
.category-card .label .arrow {
  width: 40px; height: 40px; border-radius: 999px;
  background: rgba(255,255,255,.18); backdrop-filter: blur(6px);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.3);
  transition: background .25s var(--ease);
}
.category-card:hover .label .arrow { background: var(--blue); border-color: var(--blue); }
.category-card .label svg { width: 18px; height: 18px; color: #FFFFFF; }

/* Product card */
.product-card {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s-4);
  display: flex; flex-direction: column;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.product-card .thumb {
  aspect-ratio: 4/3; background: var(--bg-soft); border-radius: var(--radius-sm);
  display: grid; place-items: center; overflow: hidden; margin-bottom: var(--s-4);
}
.product-card .thumb img { max-width: 88%; max-height: 88%; object-fit: contain; transition: transform .35s var(--ease-out); }
.product-card:hover .thumb img { transform: scale(1.04); }
.product-card .brand { font-size: var(--fs-xs); color: var(--blue); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
.product-card h4 { font-family: var(--font-display); font-weight: 600; color: var(--navy); margin: 0 0 4px; font-size: 1.08rem; line-height: 1.25; }
.product-card .meta { font-size: var(--fs-small); color: var(--mute); margin-top: auto; padding-top: var(--s-3); }

/* Stat card */
.stat-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-5);
  padding: var(--s-6); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
@media (max-width: 900px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stat-row { grid-template-columns: 1fr; } }
.stat strong {
  display: block; font-family: var(--font-display); font-size: 2.6rem;
  color: var(--blue); line-height: 1; margin-bottom: 6px; letter-spacing: -0.02em;
}
.stat span { font-size: var(--fs-small); color: var(--mute); }

/* Feature row (icon + text rows) */
.feature-list { display: grid; gap: var(--s-5); }
.feature {
  display: grid; grid-template-columns: 48px 1fr; gap: var(--s-4); align-items: start;
}
.feature .ico {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--bg-tint); color: var(--blue);
  display: grid; place-items: center; flex-shrink: 0;
}
.feature .ico svg { width: 22px; height: 22px; }
.feature h4 { font-family: var(--font-sans); font-weight: 600; color: var(--navy); font-size: 1.05rem; margin: 4px 0 4px; }
.feature p { color: var(--mute); font-size: 0.95rem; margin: 0; }

/* Quote / highlight */
.quote {
  background: var(--bg-soft);
  border-left: 4px solid var(--cyan);
  padding: var(--s-5) var(--s-6);
  border-radius: var(--radius);
  font-family: var(--font-display); font-style: italic;
  font-size: 1.25rem; color: var(--navy);
  line-height: 1.4;
}

/* ==========================================================================
   Process / steps
   ========================================================================== */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-5); counter-reset: step; }
@media (max-width: 980px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s-5);
  position: relative;
  counter-increment: step;
}
.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; top: var(--s-4); right: var(--s-5);
  font-family: var(--font-display); font-size: 2.4rem; color: var(--bg-tint); font-weight: 700; line-height: 1;
}
.step .ico {
  width: 44px; height: 44px; border-radius: 11px;
  background: var(--bg-tint); color: var(--blue);
  display: grid; place-items: center; margin-bottom: var(--s-4);
}
.step .ico svg { width: 22px; height: 22px; }
.step h4 { font-family: var(--font-sans); font-weight: 600; color: var(--navy); font-size: 1.05rem; margin: 0 0 var(--s-2); }
.step p { font-size: 0.9rem; color: var(--mute); margin: 0; }

/* ==========================================================================
   Section heads
   ========================================================================== */
.section-head { margin-bottom: var(--s-7); max-width: 64ch; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { margin-bottom: var(--s-3); }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: var(--navy);
  color: #C5D2E2;
  padding: clamp(3rem, 6vw, 5rem) 0 var(--s-5);
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--s-7);
  margin-bottom: var(--s-7);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer img { height: 48px; margin-bottom: var(--s-4); filter: brightness(0) invert(1); opacity: .95; }
.footer h5 {
  color: #FFFFFF; font-family: var(--font-sans); font-size: 0.85rem;
  font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  margin: 0 0 var(--s-4);
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer ul li { margin-bottom: var(--s-3); }
.footer ul a { color: #C5D2E2; font-size: 0.95rem; }
.footer ul a:hover { color: #FFFFFF; }
.footer .contact-line { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-3); font-size: 0.95rem; }
.footer .contact-line svg { width: 18px; height: 18px; color: var(--cyan); flex-shrink: 0; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: var(--s-5);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s-3);
  font-size: 0.85rem; color: #8FA3BC;
}
.footer-bottom a { color: #8FA3BC; }
.footer-bottom a:hover { color: #FFFFFF; }

/* ==========================================================================
   Floating contact (WhatsApp + back to top)
   ========================================================================== */
.float-actions {
  position: fixed; right: 18px; bottom: 18px;
  display: flex; flex-direction: column; gap: var(--s-3);
  z-index: 40;
}
.float-btn {
  width: 56px; height: 56px; border-radius: 999px;
  display: grid; place-items: center;
  border: none; cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
  color: #FFFFFF;
}
.float-btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-xl); }
.float-btn svg { width: 28px; height: 28px; color: #FFFFFF; }
.float-whatsapp { background: #25D366; }
.float-chat { background: var(--blue); }
.float-top { background: var(--navy); }
.float-top { opacity: 0; pointer-events: none; transition: opacity .25s var(--ease), transform .25s var(--ease); }
.float-top.is-visible { opacity: 1; pointer-events: auto; }

/* ==========================================================================
   Chatbot
   ========================================================================== */
.chat-panel {
  position: fixed; right: 18px; bottom: 92px; z-index: 41;
  width: min(360px, calc(100vw - 36px));
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-xl);
  display: none; flex-direction: column;
  overflow: hidden;
  max-height: min(560px, calc(100vh - 120px));
}
.chat-panel.is-open { display: flex; animation: chatRise .3s var(--ease-out); }
@keyframes chatRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.chat-header {
  background: var(--navy); color: #FFFFFF;
  padding: var(--s-4) var(--s-5);
  display: flex; align-items: center; gap: var(--s-3);
}
.chat-header .avatar {
  width: 36px; height: 36px; border-radius: 999px;
  background: rgba(255,255,255,.95); display: grid; place-items: center; flex-shrink: 0;
}
.chat-header .avatar img { height: 24px; width: auto; }
.chat-header strong { font-size: 0.95rem; }
.chat-header span { font-size: 0.75rem; opacity: .85; display: block; }
.chat-close {
  margin-left: auto; background: transparent; border: none; color: #FFFFFF;
  cursor: pointer; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px;
}
.chat-close:hover { background: rgba(255,255,255,.12); }
.chat-body {
  padding: var(--s-4) var(--s-5);
  overflow-y: auto;
  display: flex; flex-direction: column; gap: var(--s-3);
  flex: 1;
}
.chat-msg {
  background: var(--bg-soft);
  padding: 10px 14px; border-radius: 14px 14px 14px 4px;
  font-size: 0.9rem; max-width: 88%; align-self: flex-start; line-height: 1.45;
}
.chat-msg.user { background: var(--blue); color: #FFFFFF; align-self: flex-end; border-radius: 14px 14px 4px 14px; }
.chat-options { display: flex; flex-direction: column; gap: 6px; padding: 0 var(--s-5) var(--s-4); }
.chat-options button {
  text-align: left; padding: 10px 12px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--line); color: var(--ink);
  cursor: pointer; font-size: 0.88rem;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.chat-options button:hover { background: var(--bg-tint); border-color: var(--blue); }

/* ==========================================================================
   Forms
   ========================================================================== */
.form-grid { display: grid; gap: var(--s-4); grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.field label .req { color: var(--danger); }
.field input, .field textarea, .field select {
  font: inherit; font-size: 0.95rem;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { min-height: 140px; resize: vertical; font-family: inherit; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(28,127,196,.15);
}
.form-msg { padding: var(--s-4); border-radius: 10px; font-size: 0.95rem; }
.form-msg.success { background: #E5F5EC; color: #1F8A55; border: 1px solid #B6E0C7; }
.form-msg.error { background: #FBE5E5; color: #C73B3B; border: 1px solid #F0B7B7; }

/* ==========================================================================
   Realisations gallery
   ========================================================================== */
.gallery {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--s-3);
  grid-auto-rows: 180px;
}
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 560px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
.gallery a { display: block; overflow: hidden; border-radius: var(--radius); position: relative; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s var(--ease-out); }
.gallery a:hover img { transform: scale(1.05); }
.gallery .span-4 { grid-column: span 4; }
.gallery .span-5 { grid-column: span 5; }
.gallery .span-6 { grid-column: span 6; }
.gallery .span-7 { grid-column: span 7; }
.gallery .span-8 { grid-column: span 8; }
.gallery .row-2 { grid-row: span 2; }
@media (max-width: 900px) {
  .gallery .span-4, .gallery .span-5, .gallery .span-6, .gallery .span-7, .gallery .span-8 { grid-column: span 3; }
  .gallery .row-2 { grid-row: span 1; }
}
@media (max-width: 560px) {
  .gallery .span-4, .gallery .span-5, .gallery .span-6, .gallery .span-7, .gallery .span-8 { grid-column: span 1; }
}

/* ==========================================================================
   Partners marquee + grid
   ========================================================================== */
.partners-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s-4);
}
@media (max-width: 900px) { .partners-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px) { .partners-grid { grid-template-columns: repeat(3, 1fr); } }
.partner {
  aspect-ratio: 3/2;
  display: grid; place-items: center;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--s-3);
  font-family: var(--font-display); font-weight: 600; color: var(--navy);
  font-size: 1.1rem; letter-spacing: -0.01em;
  text-align: center;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.partner:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

/* ==========================================================================
   Animations on scroll
   ========================================================================== */
.reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }
.reveal-delay-3 { transition-delay: .24s; }

/* ==========================================================================
   Utility
   ========================================================================== */
.split-2 { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split-2.reverse { grid-template-columns: 1fr 1.05fr; }
@media (max-width: 900px) { .split-2, .split-2.reverse { grid-template-columns: 1fr; } }
.media-frame {
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg);
  aspect-ratio: 5/4;
}
.media-frame img { width: 100%; height: 100%; object-fit: cover; }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--bg-tint); color: var(--navy);
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .04em;
}
.tag.dark { background: rgba(255,255,255,.12); color: #FFFFFF; border: 1px solid rgba(255,255,255,.2); }

.divider { border-top: 1px solid var(--line); margin: var(--s-6) 0; }

/* CTA band */
.cta-band {
  background: var(--navy); color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.5rem);
  display: grid; grid-template-columns: 1.5fr auto; gap: var(--s-6); align-items: center;
  position: relative; overflow: hidden;
}
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(500px 300px at 100% 0%, rgba(51,184,225,.25), transparent 60%);
  pointer-events: none;
}
.cta-band h2, .cta-band p { color: #FFFFFF; }
.cta-band p { color: #C5D2E2; margin: 0; }
.cta-band .cta-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); position: relative; }
@media (max-width: 800px) {
  .cta-band { grid-template-columns: 1fr; }
}

/* Print-friendly */
@media print {
  .header, .footer, .float-actions, .chat-panel { display: none !important; }
}
