/* ============================================================
   HATMADA — Design system partagé
   Tokens extraits des 3 sites sources :
   - hatmadaprospection.com  (navy #172554 / bleu #2987d6)
   - hatmadacoaching.com     (navy #16224a / bleu #4A90E2)
   - hatmada-group.com       (navy #091025 / cyan #5EB8DB)
   ============================================================ */

*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

:root {
  /* --- Navy / socle de marque --- */
  --navy-950: #030713;
  --navy-900: #050a1a;
  --navy-850: #091025;
  --navy-800: #0d1533;
  --navy-700: #172554;
  --navy-600: #1a274c;
  --navy-500: #1e3a8a;

  /* --- Accents --- */
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-brand: #2987d6;
  --blue-academy: #4a90e2;
  --cyan-group: #5eb8db;
  --cyan-400: #22d3ee;
  --violet-400: #a78bfa;
  --violet-500: #8b5cf6;

  /* --- Neutres --- */
  --white: #ffffff;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;

  /* --- Sémantique --- */
  --ink: #ffffff;
  --ink-muted: rgba(255, 255, 255, 0.66);
  --ink-faint: rgba(255, 255, 255, 0.42);
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.18);
  --surface: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.06);

  --radius: 1rem;
  --radius-lg: 1.5rem;
  --radius-pill: 999px;

  --shell: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 96px;
}

body {
  font-family: var(--font-sans);
  background: var(--navy-900);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }

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

/* ------------------------------------------------------------
   Typo
   ------------------------------------------------------------ */
h1, h2, h3, h4 {
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.05;
  /* évite qu'un mot long ne fasse déborder la page */
  overflow-wrap: break-word;
}
/* césure réservée aux très petits écrans, où un mot seul peut dépasser */
@media (max-width: 420px) {
  h1, h2, h3, h4 { hyphens: auto; }
}

.h-xxl { font-size: clamp(2.15rem, 6.2vw, 4.5rem); }
@media (min-width: 480px) { .h-xxl { font-size: clamp(2.75rem, 6.2vw, 4.5rem); } }
.h-xl  { font-size: clamp(2.15rem, 4.6vw, 3.5rem); line-height: 1.08; }
.h-lg  { font-size: clamp(1.6rem, 2.8vw, 2.25rem); }
.h-md  { font-size: clamp(1.15rem, 1.7vw, 1.4rem); letter-spacing: -0.015em; }

.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: var(--ink-muted);
  line-height: 1.65;
  font-weight: 400;
  letter-spacing: -0.005em;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue-400);
}

.grad-text {
  background: linear-gradient(100deg, var(--cyan-400), var(--blue-500) 45%, var(--violet-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ------------------------------------------------------------
   Layout
   ------------------------------------------------------------ */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(4.5rem, 9vw, 8rem); position: relative; }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }

.section-head { max-width: 780px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head .eyebrow { display: block; margin-bottom: 1rem; }
.section-head .lead { margin-top: 1.25rem; }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------------------
   Décor : grille + halos (repris de hatmadaprospection)
   ------------------------------------------------------------ */
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(41, 135, 214, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(41, 135, 214, 0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 65% at 50% 30%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 65% at 50% 30%, #000 35%, transparent 100%);
  pointer-events: none;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.5;
  pointer-events: none;
}
.glow--blue   { background: rgba(41, 135, 214, 0.45); }
.glow--violet { background: rgba(139, 92, 246, 0.32); }
.glow--cyan   { background: rgba(94, 184, 219, 0.32); }

/* ------------------------------------------------------------
   Boutons
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.75rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  line-height: 1;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap;
  max-width: 100%;
}
/* sur très petit écran, les libellés longs se coupent plutôt que de déborder */
@media (max-width: 420px) {
  .btn { white-space: normal; text-align: center; }
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: linear-gradient(100deg, var(--blue-brand), var(--blue-500));
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(41, 135, 214, 0.75);
}
.btn--primary:hover { box-shadow: 0 18px 44px -12px rgba(41, 135, 214, 0.9); }

.btn--ghost {
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  color: #fff;
  backdrop-filter: blur(12px);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.32); }

.btn--light { background: #fff; color: var(--navy-700); }
.btn--lg { padding: 1.15rem 2.25rem; font-size: 1.02rem; }
.btn--block { width: 100%; }

.btn .arrow { transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ------------------------------------------------------------
   Cartes
   ------------------------------------------------------------ */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 2.4vw, 2rem);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease),
    background 0.35s var(--ease), box-shadow 0.35s var(--ease);
  position: relative;
  overflow: hidden;
}
.card:hover {
  transform: translateY(-5px);
  border-color: rgba(41, 135, 214, 0.45);
  background: var(--surface-2);
  box-shadow: 0 24px 60px -30px rgba(41, 135, 214, 0.6);
}
.card h3 { font-size: 1.15rem; margin-bottom: 0.6rem; letter-spacing: -0.02em; }
.card p { color: var(--ink-muted); font-size: 0.95rem; }

.card-icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 0.85rem;
  background: rgba(41, 135, 214, 0.14);
  border: 1px solid rgba(41, 135, 214, 0.3);
  color: var(--blue-400);
  margin-bottom: 1.25rem;
}
.card-icon svg { width: 22px; height: 22px; }

.card-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue-400);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  display: block;
}

/* ------------------------------------------------------------
   Chiffres clés
   ------------------------------------------------------------ */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat {
  background: var(--navy-900);
  padding: clamp(1.5rem, 3vw, 2.25rem) 1.25rem;
  text-align: center;
}
.stat b {
  display: block;
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(120deg, #fff, var(--blue-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat span {
  display: block;
  margin-top: 0.65rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ------------------------------------------------------------
   Badge / pill
   ------------------------------------------------------------ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  backdrop-filter: blur(12px);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.pill--mono {
  font-family: var(--font-mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--blue-400);
  border-color: rgba(74, 144, 226, 0.35);
  background: rgba(74, 144, 226, 0.08);
}

/* ------------------------------------------------------------
   Header / navigation (3 onglets)
   ------------------------------------------------------------ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease),
    backdrop-filter 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-stuck {
  background: rgba(5, 10, 26, 0.78);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 76px;
}
.brand { display: flex; align-items: center; gap: 0.7rem; flex-shrink: 0; }
.brand img { height: 26px; width: auto; }
.brand-sub {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-left: 0.7rem;
  border-left: 1px solid var(--line-strong);
}

.tabs { display: flex; align-items: center; gap: 0.25rem; }
.tab {
  position: relative;
  padding: 0.6rem 1.05rem;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-muted);
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}
.tab:hover { color: #fff; background: var(--surface-2); }
.tab.is-active { color: #fff; background: var(--surface-2); }
.tab.is-active::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 2px;
  transform: translateX(-50%);
  width: 18px; height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan-400), var(--violet-500));
}

.nav-cta { display: flex; align-items: center; gap: 0.75rem; }
.nav-cta .btn { padding: 0.72rem 1.35rem; font-size: 0.88rem; }

.burger {
  display: none;
  width: 42px; height: 42px;
  border-radius: 0.7rem;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  place-items: center;
}
.burger span {
  display: block; width: 18px; height: 2px; border-radius: 2px;
  background: #fff; transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.burger span + span { margin-top: 4px; }
.burger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 940px) {
  .tabs, .nav-cta .btn { display: none; }
  .burger { display: grid; }
  .brand-sub { display: none; }
}

.mobile-menu {
  position: fixed;
  inset: 76px 0 auto 0;
  background: rgba(5, 10, 26, 0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  padding: 1.25rem var(--gutter) 2rem;
  display: none;
  z-index: 99;
}
.mobile-menu.is-open { display: block; }
.mobile-menu a {
  display: block;
  padding: 0.95rem 0;
  font-size: 1.05rem;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.mobile-menu .btn { margin-top: 1.5rem; width: 100%; }

/* ------------------------------------------------------------
   Accordéon FAQ
   ------------------------------------------------------------ */
.faq { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.4rem 0;
  text-align: left;
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  transition: color 0.25s var(--ease);
}
.faq-q:hover { color: var(--blue-400); }
.faq-q i {
  flex-shrink: 0;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-style: normal;
  font-size: 1.1rem;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}
.faq-item.is-open .faq-q { color: var(--blue-400); }
.faq-item.is-open .faq-q i { transform: rotate(45deg); background: rgba(41, 135, 214, 0.2); }
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--ease);
}
.faq-item.is-open .faq-a { grid-template-rows: 1fr; }
.faq-a > div { overflow: hidden; }
.faq-a p { color: var(--ink-muted); padding-bottom: 1.5rem; max-width: 76ch; }

/* ------------------------------------------------------------
   Onglets de contenu (études de cas)
   ------------------------------------------------------------ */
.switch {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.3rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  flex-wrap: wrap;
}
.switch button {
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-muted);
  transition: all 0.25s var(--ease);
}
.switch button.is-active {
  background: linear-gradient(100deg, var(--blue-brand), var(--blue-500));
  color: #fff;
}
.panel { display: none; }
.panel.is-active { display: block; animation: fade-up 0.5s var(--ease) both; }

/* ------------------------------------------------------------
   Bandeau CTA
   ------------------------------------------------------------ */
.cta-band {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(ellipse 70% 120% at 50% 0%, rgba(41, 135, 214, 0.28), transparent 70%),
    var(--navy-850);
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 4vw, 3.5rem);
  text-align: center;
}
.cta-band .lead { margin: 1.25rem auto 0; max-width: 62ch; }
.cta-band .btn-row { margin-top: 2rem; }
.cta-points {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 0.75rem 1.75rem; margin-top: 2rem;
  font-size: 0.88rem; color: var(--ink-muted);
}
.cta-points li { display: flex; align-items: center; gap: 0.5rem; }
.cta-points li::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  background: rgba(41, 135, 214, 0.25);
  border: 1px solid var(--blue-400);
  flex-shrink: 0;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.btn-row--center { justify-content: center; }

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--navy-950);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 2.5rem;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-grid img { height: 26px; margin-bottom: 1.1rem; }
.footer-grid p { color: var(--ink-faint); font-size: 0.9rem; max-width: 34ch; }
.footer-col h4 {
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 1rem; font-weight: 700;
}
.footer-col a {
  display: block; padding: 0.35rem 0; font-size: 0.92rem;
  color: var(--ink-muted); transition: color 0.2s var(--ease);
}
.footer-col a:hover { color: #fff; }

.socials { display: flex; gap: 0.6rem; margin-top: 1.5rem; }
.socials a {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); transition: all 0.25s var(--ease);
}
.socials a:hover { background: var(--blue-brand); border-color: var(--blue-brand); transform: translateY(-2px); }
.socials svg { width: 16px; height: 16px; }

.footer-bottom {
  margin-top: 3rem; padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: center; justify-content: space-between;
  font-size: 0.85rem; color: var(--ink-faint);
}
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.footer-bottom a:hover { color: #fff; }

/* ------------------------------------------------------------
   Animations
   ------------------------------------------------------------ */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(41, 135, 214, 0.5); }
  70%  { box-shadow: 0 0 0 18px rgba(41, 135, 214, 0); }
  100% { box-shadow: 0 0 0 0 rgba(41, 135, 214, 0); }
}

/* L'état masqué n'est appliqué que si JS est actif (classe posée en <head>),
   sinon la page resterait invisible sans JavaScript. */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
html.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html.js [data-reveal] { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------
   Témoignages vidéo (format vertical 9:16)
   ------------------------------------------------------------ */
.video-testis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  max-width: 760px;
  margin-inline: auto;
}
@media (max-width: 620px) {
  .video-testis { grid-template-columns: minmax(0, 1fr); max-width: 400px; }
}
.video-card {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}
.video-card:hover {
  transform: translateY(-4px);
  border-color: rgba(41, 135, 214, 0.45);
  box-shadow: 0 24px 60px -30px rgba(41, 135, 214, 0.6);
}
.video-card video {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: #000;
}
.video-card figcaption {
  padding: 1rem 1.25rem 1.15rem;
  border-top: 1px solid var(--line);
}
.video-card figcaption b { display: block; font-size: 0.98rem; letter-spacing: -0.01em; }
.video-card figcaption span { font-size: 0.8rem; color: var(--ink-faint); }

/* Marquee logos / témoignages */
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 1.25rem; width: max-content; animation: marquee 42s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
