/* ==========================================================================
   2BKM — Feuille de styles
   Structure et logique d'animation inspirées de kpcm.fr (site de référence
   pour le style), contenu propre à 2BKM.
   ========================================================================== */

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500;1,600&family=Inter:wght@400;500;600;700&display=swap');

/* ---------- Tokens ---------- */
:root {
  --navy-950: #0b1626;
  --navy-900: #101d31;
  --navy-800: #16273e;
  --navy-700: #1f3552;
  --accent: #2f7de6;
  --accent-light: #6fa8f2;
  --accent-dark: #1b5bc4;
  --gold: #c9a24a;
  --bg: #f7f9fc;
  --bg-alt: #eef2f8;
  --white: #ffffff;
  --text: #16202e;
  --text-muted: #57657a;
  --text-on-dark: #eef3fb;
  --text-on-dark-muted: #a9b8cf;
  --border: #e1e7f0;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-soft: 0 20px 45px -22px rgba(16, 29, 49, 0.18);
  --shadow-card: 0 10px 30px -17px rgba(16, 29, 49, 0.12);
  --container: 1180px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Reset ---------- */
* , *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-family: 'Playfair Display', serif; font-weight: 600; line-height: 1.15; }
p { margin: 0; }
button { font: inherit; cursor: pointer; }
section[id] { scroll-margin-top: 90px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Reveal-on-scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
[data-reveal-delay="1"] { transition-delay: 0.08s; }
[data-reveal-delay="2"] { transition-delay: 0.16s; }
[data-reveal-delay="3"] { transition-delay: 0.24s; }
[data-reveal-delay="4"] { transition-delay: 0.32s; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(47, 125, 230, 0.4);
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 10px 20px -10px rgba(47, 125, 230, 0.45); }
.btn-outline {
  background: transparent;
  color: var(--text-on-dark);
  border-color: rgba(255, 255, 255, 0.35);
}
.btn-outline:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); transform: translateY(-3px); }
.btn-outline.on-light { color: var(--text); border-color: rgba(22, 32, 46, 0.2); }
.btn-outline.on-light:hover { border-color: var(--text); background: rgba(22, 32, 46, 0.04); }
.btn-small { padding: 10px 20px; font-size: 0.85rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 30px 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  box-shadow: 0 6px 20px -16px rgba(16, 29, 49, 0.15);
  transition: padding 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.site-header.scrolled {
  padding: 20px 0;
  box-shadow: 0 10px 30px -18px rgba(16, 29, 49, 0.18);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-img { height: 48px; width: auto; display: block; transition: height 0.4s var(--ease); }
.site-header.scrolled .logo-img { height: 40px; }
.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav a {
  font-size: 0.9rem; font-weight: 500; color: var(--text-muted);
  position: relative; padding: 4px 0;
  transition: color 0.3s var(--ease);
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 1px;
  background: var(--accent); transition: right 0.35s var(--ease);
}
.main-nav a:hover { color: var(--navy-900); }
.main-nav a:hover::after { right: 0; }
.header-cta { display: none; }
.nav-toggle {
  display: none; flex-direction: column; gap: 5px; width: 38px; height: 38px;
  align-items: center; justify-content: center; background: none; border: none;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--navy-900); border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.3s var(--ease); }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--navy-950);
  padding-top: 160px;
  padding-bottom: 90px;
}

/* Slider — prêt à recevoir de vraies photos : dépose des fichiers nommés
   assets/hero-slide-1.jpg à assets/hero-slide-5.jpg (ou moins), ils
   s'affichent devant le fond de secours ci-dessous et tournent automatiquement. */
.hero-slider { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
  position: absolute; inset: 0;
  background-color: var(--navy-950);
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.4s var(--ease);
}
.hero-slide.active { opacity: 1; }

.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(11,22,38,0.6) 0%, rgba(11,22,38,0.74) 55%, rgba(11,22,38,0.94) 100%);
}
.hero-grid { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; opacity: 0.2; }

.hero-inner { position: relative; z-index: 3; max-width: 760px; }
.hero-copy { transition: opacity 0.3s var(--ease); }
.hero-copy.is-fading { opacity: 0; }

.hero-dots {
  position: absolute; bottom: 92px; left: 50%; transform: translateX(-50%);
  z-index: 3; display: flex; gap: 10px;
}
.hero-dot {
  width: 9px; height: 9px; border-radius: 50%; padding: 0;
  background: rgba(255,255,255,0.3); border: none;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}
.hero-dot.active { background: var(--accent-light); transform: scale(1.25); }
.hero-dot:hover { background: rgba(255,255,255,0.55); }
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 18px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text-on-dark-muted);
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 26px;
}
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-light); box-shadow: 0 0 0 4px rgba(111, 168, 242, 0.25); }
.hero h1 {
  color: #fff;
  font-size: clamp(2.2rem, 5.2vw, 3.5rem);
  margin-bottom: 22px;
}
.hero h1 em { font-style: italic; color: var(--accent-light); font-weight: 500; }
.hero-lead { color: var(--text-on-dark-muted); font-size: 1.08rem; max-width: 560px; margin-bottom: 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 40px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.hero-tags li {
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-on-dark-muted); position: relative; padding-left: 18px;
}
.hero-tags li::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 8px; height: 8px; border-radius: 2px; background: var(--accent);
}
.scroll-indicator {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  width: 30px; height: 46px; border: 1px solid rgba(255,255,255,0.3); border-radius: 20px;
  z-index: 3;
}
.scroll-indicator span {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 8px; border-radius: 2px; background: var(--accent-light);
  animation: scroll-dot 1.8s ease-in-out infinite;
}
@keyframes scroll-dot {
  0% { opacity: 0; top: 8px; }
  30% { opacity: 1; }
  80% { opacity: 0; top: 26px; }
  100% { opacity: 0; top: 26px; }
}

/* ---------- Section shells ---------- */
.section { padding: 120px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark {
  background: linear-gradient(160deg, var(--navy-900), var(--navy-950));
  color: var(--text-on-dark);
}
.section-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.section-dark .section-label { color: var(--accent-light); }
.section-label span { color: var(--text-muted); font-weight: 600; }
.section-dark .section-label span { color: var(--text-on-dark-muted); }
.section-head { max-width: 680px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 18px; }
.section-head p { color: var(--text-muted); font-size: 1.05rem; }
.section-dark .section-head p { color: var(--text-on-dark-muted); }

/* ---------- Présentation ---------- */
.presentation-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 70px; align-items: start; }
.presentation-media { display: flex; flex-direction: column; gap: 22px; }
.presentation-media img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-soft);
}
.info-stack { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.info-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 18px 16px; box-shadow: var(--shadow-card);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.info-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.info-card .value { font-family: 'Playfair Display', serif; font-size: 1.35rem; font-weight: 700; color: var(--navy-900); }
.info-card .label { font-size: 0.74rem; color: var(--text-muted); margin-top: 4px; }
.presentation-text p { color: var(--text-muted); margin-bottom: 18px; font-size: 1.02rem; }
.presentation-text h3 { font-size: 1.25rem; margin: 30px 0 12px; color: var(--navy-900); }

/* ---------- Domaines / cards grid ---------- */
.domains-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px;
}
.domain-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 30px 26px; box-shadow: var(--shadow-card);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
  position: relative;
}
.domain-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); border-color: rgba(47,125,230,0.35); }
.domain-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(47, 125, 230, 0.1); color: var(--accent); margin-bottom: 18px;
}
.domain-icon svg { width: 22px; height: 22px; }
.domain-card h3 { font-size: 1.08rem; font-family: 'Inter', sans-serif; font-weight: 700; color: var(--navy-900); margin-bottom: 8px; }
.domain-card p { color: var(--text-muted); font-size: 0.92rem; }

/* ---------- Approche ---------- */
.approche-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 70px; align-items: center; }
.approche-text p { color: var(--text-muted); font-size: 1.02rem; margin-bottom: 18px; }
.approche-visual { display: flex; flex-direction: column; gap: 24px; }
.approche-visual img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-soft);
}
.principle-list { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.principle-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px;
  background: var(--bg-alt); border: 1px solid var(--border);
  font-size: 0.85rem; font-weight: 600; color: var(--navy-900);
}
.principle-chip svg { width: 15px; height: 15px; color: var(--accent); flex-shrink: 0; }
.pull-card {
  background: var(--white); border-radius: var(--radius-lg); padding: 42px 36px;
  box-shadow: var(--shadow-soft); border: 1px solid var(--border);
  position: relative;
}
.pull-card::before {
  content: "\201C"; font-family: 'Playfair Display', serif; font-size: 5rem; color: rgba(47,125,230,0.18);
  position: absolute; top: 6px; left: 24px; line-height: 1;
}
.pull-card p { position: relative; font-family: 'Playfair Display', serif; font-style: italic; font-size: 1.3rem; color: var(--navy-900); line-height: 1.5; }
.pull-card span { display: block; margin-top: 22px; font-family: 'Inter', sans-serif; font-style: normal; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }

/* ---------- Vision (dark band + photo) ---------- */
.vision-band { position: relative; overflow: hidden; text-align: center; padding: 130px 0; }
.vision-media { position: absolute; inset: 0; z-index: 0; background-size: cover; background-position: center; }
.vision-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(160deg, rgba(11,22,38,0.9), rgba(11,22,38,0.95));
}
.vision-band .container { position: relative; z-index: 2; }
.vision-band .section-label { justify-content: center; width: 100%; }
.vision-band h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); max-width: 780px; margin: 0 auto 26px; color: #fff; }
.vision-band p { max-width: 700px; margin: 0 auto; color: var(--text-on-dark-muted); font-size: 1.08rem; }
.vision-band p + p { margin-top: 16px; }

/* ---------- Contact CTA ---------- */
.contact-band {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-950));
  border-radius: var(--radius-lg);
  padding: 70px 60px;
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center;
  position: relative; overflow: hidden;
}
.contact-band::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 100% at 100% 0%, rgba(47,125,230,0.18), transparent 60%);
  pointer-events: none;
}
.contact-band h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 14px; position: relative; }
.contact-band p { color: var(--text-on-dark-muted); font-size: 1.02rem; position: relative; max-width: 480px; }
.contact-actions { display: flex; flex-direction: column; gap: 14px; position: relative; }
.contact-line { display: flex; align-items: center; gap: 12px; color: var(--text-on-dark-muted); font-size: 0.95rem; }
.contact-line svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--accent-light); }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-alt); color: var(--text-muted); padding: 80px 0 30px; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 50px; margin-bottom: 60px; }
.footer-about .logo-img { height: 52px; }
.footer-about p { margin-top: 18px; font-size: 0.92rem; max-width: 320px; }
.footer-col h4 { font-family: 'Inter', sans-serif; font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--navy-900); margin-bottom: 18px; }
.footer-col p, .footer-col a { display: block; font-size: 0.92rem; margin-bottom: 10px; transition: color 0.3s var(--ease); }
.footer-col a:hover { color: var(--navy-900); }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 26px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px;
  font-size: 0.82rem;
}
.footer-bottom a:hover { color: var(--navy-900); }
.back-to-top {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border);
  color: var(--navy-900);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}
.back-to-top:hover { background: var(--white); transform: translateY(-3px); }

/* ---------- Legal page ---------- */
.legal-main { padding: 160px 0 100px; max-width: 880px; margin: 0 auto; }
.legal-main h1 { font-size: 2.1rem; margin-bottom: 10px; }
.legal-main .updated { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 50px; }
.legal-main h2 { font-size: 1.3rem; margin: 46px 0 18px; color: var(--navy-900); }
.legal-main h2:first-of-type { margin-top: 0; }
.legal-main p { color: var(--text-muted); margin-bottom: 14px; }
.legal-table { width: 100%; border-collapse: collapse; margin: 18px 0 8px; }
.legal-table tr { border-bottom: 1px solid var(--border); }
.legal-table td { padding: 12px 4px; font-size: 0.94rem; vertical-align: top; }
.legal-table td:first-child { color: var(--text-muted); width: 40%; font-weight: 500; }
.legal-note {
  background: var(--bg-alt); border: 1px dashed var(--border); border-radius: var(--radius-sm);
  padding: 16px 20px; font-size: 0.88rem; color: var(--text-muted); margin: 10px 0 30px;
}
.legal-main ul { margin: 0 0 16px; padding-left: 20px; list-style: disc; color: var(--text-muted); }
.legal-main ul li { margin-bottom: 8px; }
.legal-back { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-weight: 600; color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .presentation-grid, .approche-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-band { grid-template-columns: 1fr; padding: 50px 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  /* Header plus compact sur mobile : sur un écran étroit, un header aussi
     grand que sur desktop mange trop de hauteur utile. */
  .site-header { padding: 16px 0; }
  .site-header.scrolled { padding: 12px 0; }
  .logo-img { height: 34px; }
  .site-header.scrolled .logo-img { height: 30px; }

  /* Le bouton menu doit toujours rester cliquable et visible au-dessus du
     panneau de navigation, même si celui-ci est imbriqué dans le header. */
  .nav-toggle { display: flex; position: relative; z-index: 110; width: 44px; height: 44px; }

  /* Menu mobile : panneau plein écran, fond clair (cohérent avec le header),
     grands liens faciles à toucher, avec sa propre croix de fermeture. */
  .main-nav {
    position: fixed; inset: 0; height: 100dvh; width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    display: flex; flex-direction: column; align-items: stretch;
    justify-content: center; gap: 4px; padding: 100px 32px 60px;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
    z-index: 95;
  }
  .main-nav.open { transform: translateX(0); }
  .main-nav a {
    font-family: 'Playfair Display', serif; font-weight: 600;
    font-size: 1.5rem; color: var(--navy-900);
    padding: 16px 4px; border-bottom: 1px solid var(--border);
  }
  .main-nav a::after { display: none; }
  .main-nav a:hover, .main-nav a:active { color: var(--accent); }

  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .section { padding: 70px 0; }
  .domains-grid { grid-template-columns: 1fr 1fr; }

  /* Hero : trop de contenu pour tenir sur un écran de téléphone sans
     ajustement — on resserre les espacements et on retire les éléments
     purement décoratifs (mots-clés, indicateur de scroll). */
  .hero { padding-top: 110px; padding-bottom: 50px; min-height: 100dvh; }
  .hero h1 { font-size: 1.8rem; margin-bottom: 14px; }
  .hero-lead { font-size: 0.98rem; margin-bottom: 22px; }
  .hero-actions { margin-bottom: 0; }
  .hero-tags, .scroll-indicator { display: none; }
  .hero-dots { bottom: 22px; }
}
@media (max-width: 520px) {
  .domains-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
  .contact-band { padding: 40px 22px; }
  .info-stack { grid-template-columns: 1fr 1fr; }
}
