/* ──────────────────────────────────────────────────────────────
   Miikaa V2 — Light, warm, editorial tokens.
   Inspired by Didask: cream canvas, ink text, dark CTAs, serif display.
   ────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500;9..144,600&family=Instrument+Serif:ital@0;1&family=Inter:wght@400;450;500;600;700&display=swap');

:root {
  /* ── Surfaces (warm cream → ink stack) ────────────────────── */
  --mk2-canvas:      #F6F1EA;   /* page background, warm cream        */
  --mk2-canvas-2:    #EFE7DB;   /* alternating section, deeper warm   */
  --mk2-paper:       #FBF8F3;   /* card / inner surface               */
  --mk2-ivory:       #FFFFFF;   /* pure white — used sparingly        */

  /* Deep surface (for single dark moments: CTA band, footer) */
  --mk2-ink:         #14110E;   /* near-black with warm cast          */
  --mk2-ink-2:       #201C17;   /* ink surface lift                   */
  --mk2-ink-soft:    #2D2820;

  /* ── Accents (earthy + human, not techy gradient) ─────────── */
  --mk2-ember:       #C85A3C;   /* terracotta — primary warm accent   */
  --mk2-ember-soft:  #E8B6A3;
  --mk2-clay:        #E8DACB;   /* peach/clay tint (Didask hero tag)  */
  --mk2-sage:        #6B7F5E;   /* muted green — success, balanced    */
  --mk2-ocean:       #3D5A6C;   /* muted teal-blue                    */
  --mk2-amber:       #D4A574;   /* soft amber highlight               */

  /* ── Text on cream ────────────────────────────────────────── */
  --mk2-text:        #14110E;   /* headlines, emphasis                */
  --mk2-text-2:      #3A342C;   /* body                               */
  --mk2-muted:       #6B6355;   /* secondary                          */
  --mk2-muted-2:     #958A79;   /* caption, meta                      */
  --mk2-hair:        #D9CFBE;   /* hairline on cream                  */
  --mk2-hair-strong: #BFB19A;

  /* ── Text on ink ──────────────────────────────────────────── */
  --mk2-text-dark:   #F6F1EA;
  --mk2-muted-dark:  #A89E8D;

  /* ── Radii ────────────────────────────────────────────────── */
  --mk2-r-sm: 0.5rem;
  --mk2-r-md: 0.875rem;
  --mk2-r-lg: 1.25rem;
  --mk2-r-xl: 1.75rem;
  --mk2-r-pill: 9999px;

  /* ── Shadows (soft, earthy) ───────────────────────────────── */
  --mk2-shadow-sm:  0 1px 2px rgba(20, 17, 14, 0.06);
  --mk2-shadow:     0 8px 24px rgba(63, 48, 30, 0.08);
  --mk2-shadow-lg:  0 30px 60px -20px rgba(63, 48, 30, 0.25), 0 10px 20px -10px rgba(63, 48, 30, 0.10);

  /* ── Type families ────────────────────────────────────────── */
  --mk2-serif:  'Fraunces', 'Instrument Serif', 'Canela', Georgia, serif;
  --mk2-serif-italic: 'Instrument Serif', 'Fraunces', Georgia, serif;
  --mk2-sans:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mk2-mono:   ui-monospace, 'SF Mono', Menlo, monospace;

  /* ── Motion ───────────────────────────────────────────────── */
  --mk2-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Resets & global ─────────────────────────────────────────── */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--mk2-canvas);
  color: var(--mk2-text);
  font-family: var(--mk2-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}

/* ── Type utilities ─────────────────────────────────────────── */
.mk2-display {
  font-family: var(--mk2-serif);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  letter-spacing: -0.025em;
  line-height: 1.02;
  color: var(--mk2-text);
}
.mk2-italic {
  font-family: var(--mk2-serif-italic);
  font-style: italic;
  font-weight: 400;
}
.mk2-h2 {
  font-family: var(--mk2-serif);
  font-weight: 400;
  font-variation-settings: "opsz" 72;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--mk2-text);
}
.mk2-h3 {
  font-family: var(--mk2-sans);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--mk2-text);
}
.mk2-body {
  font-family: var(--mk2-sans);
  font-weight: 400;
  line-height: 1.65;
  color: var(--mk2-text-2);
}
.mk2-muted { color: var(--mk2-muted); }
.mk2-eyebrow {
  font-family: var(--mk2-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mk2-muted);
}
.mk2-caption {
  font-family: var(--mk2-sans);
  font-size: 13px;
  color: var(--mk2-muted);
}

/* ── Buttons ────────────────────────────────────────────────── */
.mk2-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--mk2-sans);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 22px;
  border-radius: var(--mk2-r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s var(--mk2-ease);
  text-decoration: none;
  white-space: nowrap;
}
.mk2-btn-primary {
  background: var(--mk2-ink);
  color: var(--mk2-text-dark);
}
.mk2-btn-primary:hover {
  background: #000;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -8px rgba(20,17,14,.35);
}
.mk2-btn-secondary {
  background: transparent;
  color: var(--mk2-text);
  border-color: var(--mk2-hair-strong);
}
.mk2-btn-secondary:hover {
  background: var(--mk2-paper);
  border-color: var(--mk2-text);
}
.mk2-btn-ember {
  background: var(--mk2-clay);
  color: var(--mk2-text);
}
.mk2-btn-ember:hover {
  background: var(--mk2-ember-soft);
}
.mk2-btn-ghost {
  background: transparent;
  color: var(--mk2-text-2);
  padding: 8px 14px;
}
.mk2-btn-ghost:hover { color: var(--mk2-text); }

/* ── Pills / tags ───────────────────────────────────────────── */
.mk2-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--mk2-r-pill);
  background: var(--mk2-paper);
  border: 1px solid var(--mk2-hair);
  font-size: 12px;
  font-weight: 500;
  color: var(--mk2-text-2);
}
.mk2-pill-new {
  background: var(--mk2-clay);
  border-color: transparent;
  color: var(--mk2-text);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
}

/* ── Card ───────────────────────────────────────────────────── */
.mk2-card {
  background: var(--mk2-paper);
  border: 1px solid var(--mk2-hair);
  border-radius: var(--mk2-r-lg);
  transition: all 0.25s var(--mk2-ease);
}
.mk2-card:hover {
  border-color: var(--mk2-hair-strong);
  transform: translateY(-2px);
  box-shadow: var(--mk2-shadow);
}

/* ── Container ──────────────────────────────────────────────── */
.mk2-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
.mk2-section { padding: 96px 0; }

/* ── Grain texture (very subtle, optional) ─────────────────── */
.mk2-grain {
  position: relative;
}
.mk2-grain::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.6;
  pointer-events: none;
  mix-blend-mode: multiply;
}

/* ── Subtle underline for serif emphasis ───────────────────── */
.mk2-underline-hand {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}
.mk2-underline-hand::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 10px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10' preserveAspectRatio='none'><path d='M2 6 Q 50 2, 100 5 T 198 4' stroke='%23C85A3C' stroke-width='2' fill='none' stroke-linecap='round'/></svg>") no-repeat center / 100% 100%;
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes mk2-fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mk2-fade-up { animation: mk2-fade-up 0.7s var(--mk2-ease) both; }

/* ── Responsive utility hooks ─────────────────────────────────
   Les composants V2 utilisent beaucoup d'inline styles. Pour
   éviter d'éditer chaque style en JS, on expose des classes
   "hook" surchargées en media queries avec !important. */

/* Empêche tout débordement horizontal venant de transformes 3D. */
html, body { overflow-x: hidden; max-width: 100%; }
img, video, iframe { max-width: 100%; }

/* Burger mobile */
.mk2-burger {
  display: none;
  background: none;
  border: 1px solid var(--mk2-hair);
  width: 40px; height: 40px;
  border-radius: 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--mk2-text);
}
.mk2-burger svg { display: block; }
.mk2-mobile-panel {
  display: none;
  flex-direction: column;
  padding: 12px 24px 24px;
  background: var(--mk2-canvas);
  border-bottom: 1px solid var(--mk2-hair);
  gap: 4px;
}
.mk2-mobile-panel.open { display: flex; }
.mk2-mobile-panel a, .mk2-mobile-panel button.mk2-mobile-link {
  display: flex;
  align-items: center;
  font-size: 16px;
  padding: 14px 4px;
  color: var(--mk2-text-2);
  text-decoration: none;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  font-family: var(--mk2-sans);
  border-bottom: 1px solid var(--mk2-hair);
}
.mk2-mobile-panel .mk2-btn { margin-top: 14px; width: 100%; }

/* ────── Tablette (≤ 1024 px) ────── */
@media (max-width: 1024px) {
  .mk2-container { max-width: 100%; padding: 0 24px; }
  .mk2-section { padding: 72px 0; }

  .mk2-grid-scenarios { grid-template-columns: repeat(2, 1fr) !important; }
  .mk2-grid-footer    { grid-template-columns: 1.4fr 1fr 1fr !important; gap: 32px !important; }
  .mk2-logos-grid     { grid-template-columns: repeat(3, 1fr) !important; gap: 20px !important; }
}

/* ────── Mobile (≤ 720 px) ────── */
@media (max-width: 720px) {
  body { font-size: 15px; }
  .mk2-container { padding: 0 20px; }
  .mk2-section { padding: 56px 0; }

  /* Type plus compacte */
  .mk2-display { letter-spacing: -0.02em; }

  /* Boutons : laisser respirer, autoriser le retour */
  .mk2-btn { white-space: normal; }

  /* ── Nav ── */
  .mk2-nav-links, .mk2-nav-cta-desktop { display: none !important; }
  .mk2-burger { display: inline-flex; }
  .mk2-nav-bar { height: 60px !important; }

  /* ── Hero ── */
  .mk2-hero-section { padding: 48px 0 64px !important; }
  .mk2-hero-cta-row { flex-direction: column !important; align-items: stretch !important; }
  .mk2-hero-cta-row .mk2-btn { width: 100%; justify-content: center; }
  .mk2-hero-pill { font-size: 11px !important; padding: 4px 10px !important; }

  /* Product stack : on aplatit en flux vertical, on cache les écrans secondaires et callouts décoratifs */
  .mk2-product-stack { perspective: none !important; padding: 24px 0 0 !important; }
  .mk2-product-stack-inner { height: auto !important; display: flex; flex-direction: column; gap: 16px; }
  .mk2-stack-back, .mk2-stack-callout, .mk2-stack-floor { display: none !important; }
  .mk2-stack-front {
    position: static !important;
    left: auto !important; top: auto !important;
    width: 100% !important;
    transform: none !important;
  }

  /* ── Logos ── */
  .mk2-logos-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px !important;
  }
  .mk2-logos-grid > div { font-size: 16px !important; }

  /* ── Method ── */
  .mk2-method-head { grid-template-columns: 1fr !important; gap: 24px !important; margin-bottom: 48px !important; }
  .mk2-method-steps { grid-template-columns: 1fr !important; gap: 28px !important; }
  .mk2-method-section { padding: 72px 0 !important; }

  /* ── Use cases ── */
  .mk2-usecase-card { grid-template-columns: 1fr !important; min-height: 0 !important; }
  .mk2-usecase-card .mk2-usecase-copy { padding: 36px 24px !important; }
  .mk2-usecase-card .mk2-usecase-shot { padding: 28px 16px 36px !important; perspective: none !important; }
  .mk2-usecase-card .mk2-usecase-shot > div[style*="rotateY"] { transform: none !important; width: 100% !important; }
  /* L'ordre visuel : copy toujours en premier, image après — quel que soit l'index pair/impair */
  .mk2-usecase-card .mk2-usecase-copy { order: 1; }
  .mk2-usecase-card .mk2-usecase-shot { order: 2; }

  /* ── Testimonial ── */
  .mk2-testimonial-grid { grid-template-columns: 1fr !important; gap: 24px !important; text-align: center; }
  .mk2-testimonial-grid > div:first-child {
    width: 120px !important; height: 140px !important; margin: 0 auto !important;
  }
  .mk2-testimonial-meta { flex-wrap: wrap; justify-content: center; }

  /* ── CTA band ── */
  .mk2-ctaband { padding: 56px 28px !important; }
  .mk2-ctaband h2 { font-size: 32px !important; }

  /* ── Footer ── */
  .mk2-grid-footer {
    grid-template-columns: 1fr 1fr !important;
    gap: 32px 24px !important;
  }
  .mk2-grid-footer > div:first-child { grid-column: 1 / -1; }
  .mk2-footer-bottom { flex-direction: column !important; align-items: flex-start !important; gap: 8px !important; }

  /* ── Contact ── */
  .mk2-contact-grid { grid-template-columns: 1fr !important; gap: 40px !important; }
  .mk2-contact-form-names { grid-template-columns: 1fr !important; }
  .mk2-contact-tabs { flex-direction: column !important; }
  .mk2-contact-tabs button { border-right: none !important; border-bottom: 1px solid var(--mk2-hair) !important; }
  .mk2-contact-tabs button:last-child { border-bottom: none !important; }
  .mk2-contact-metrics { gap: 20px !important; }

  /* ── Scénarios ── */
  .mk2-grid-scenarios { grid-template-columns: 1fr !important; gap: 16px !important; }
  .mk2-scenarios-filter { padding: 12px 20px !important; gap: 10px !important; }
  .mk2-scenarios-filter > div:first-child { max-width: 100% !important; flex: 1 1 100% !important; }
  .mk2-scenarios-count { margin-left: 0 !important; }

  /* ── FAQ ── */
  .mk2-faq-item button { padding: 16px 0 !important; gap: 12px !important; }
  .mk2-faq-item button > span:first-child { font-size: 15px !important; }
}

/* ────── Très petits écrans (≤ 380 px) ────── */
@media (max-width: 380px) {
  .mk2-logos-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .mk2-grid-footer { grid-template-columns: 1fr !important; }
  .mk2-grid-footer > div:first-child { grid-column: auto; }
}
