/* Mathieu Consulting — feuille de style principale
   Direction artistique : élégante, premium, sérieuse, rassurante.
   Typographie serif (Playfair Display) + sans-serif (Manrope),
   palette bleu nuit / or discret, effets de profondeur 3D subtils. */

:root {
  /* Typographie */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Couleurs premium */
  --color-primary: #1b2a4a;       /* bleu profond nuit */
  --color-primary-dark: #101a30;  /* hover / accents foncés */
  --color-primary-soft: #e8ebf1;  /* fond très clair teinté navy */
  --color-gold: #c9a66b;          /* accent doré/cuivré, à utiliser avec parcimonie */
  --color-gold-dark: #86673a;     /* assombri pour un contraste ≥ 4.5:1 sur fonds clairs (WCAG AA) */
  --color-secondary: #1b2a4a;
  --color-text: #22252a;          /* anthracite */
  --color-text-muted: #565a5f;
  --color-bg: #fbfaf8;            /* blanc chaud */
  --color-bg-alt: #f4f1ec;        /* beige clair chaleureux */
  --color-success: #4c7a63;       /* vert sourdine, cohérent avec la palette */
  --color-border: #e5e0d8;

  /* Alias fonctionnels utilisés par les composants ci-dessous */
  --bg: var(--color-bg);
  --surface: var(--color-bg);
  --text: var(--color-secondary);
  --text-muted: var(--color-text-muted);
  --border: var(--color-border);
  --accent: var(--color-primary);
  --accent-dark: var(--color-primary-dark);
  --accent-soft: var(--color-primary-soft);

  /* Rayons cohérents */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;

  /* Ombres douces et diffuses */
  --shadow-rest: 0 20px 40px rgba(27, 42, 74, 0.08);
  --shadow-hover: 0 24px 48px rgba(27, 42, 74, 0.16);
  --shadow-btn: 0 6px 16px rgba(27, 42, 74, 0.22);
  --shadow: var(--shadow-hover);

  /* Espacements (multiples de 8px) */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-6: 48px;
  --space-8: 64px;
  --space-12: 96px;

  --container-w: 1200px;
  --ease-premium: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 var(--space-2);
  color: var(--color-secondary);
}

h1 {
  font-size: clamp(2.75rem, 5vw, 4rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 600;
}

/* Point focal discret sur l'accroche, quelle que soit sa longueur (évite de
   recolorer tout le titre si celui-ci tient sur une seule ligne) */
.hero-inner h1::first-letter {
  color: var(--color-gold-dark);
  font-style: italic;
}

h2 {
  font-size: clamp(2rem, 3.5vw, 2.5rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.4rem;
  font-weight: 600;
}

p {
  margin: 0 0 var(--space-2);
  color: var(--color-text);
  font-size: 1.0625rem;
  line-height: 1.6;
}

strong { font-weight: 700; color: var(--color-secondary); }

/* Emphase premium sur les passages déjà mis en avant dans le texte */
.hero-inner strong,
.hero-inner .lead strong {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 600;
  color: var(--color-gold-dark);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--color-gold-dark); }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 250, 248, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: var(--space-2) var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-right: auto;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid var(--color-gold);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-text strong {
  font-size: 1rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-style: normal;
  color: var(--color-secondary);
}

.logo-text span {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: var(--space-3);
}

.nav-links a {
  color: var(--color-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--color-primary);
  border-bottom-color: var(--color-gold);
}

.nav-actions {
  display: flex;
  gap: var(--space-1);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.nav-toggle:hover { border-color: var(--color-gold); }

/* Buttons — relief léger, enfoncement au clic */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: 13px var(--space-3);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease-premium), box-shadow 0.2s var(--ease-premium), background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(27, 42, 74, 0.28);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 3px 8px rgba(27, 42, 74, 0.2);
}

.btn-secondary {
  background: transparent;
  color: var(--color-secondary);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--color-gold);
  color: var(--color-gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(27, 42, 74, 0.08);
}

.btn-secondary:active {
  transform: translateY(1px);
  box-shadow: none;
}

.btn-sm { padding: 9px var(--space-2); font-size: 0.85rem; }
.btn-block { width: 100%; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: var(--space-12) var(--space-3) var(--space-8);
}

/* Élément visuel 3D discret : formes abstraites en dégradé, rotation très lente */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.35;
  pointer-events: none;
}

.hero::before {
  width: 480px;
  height: 480px;
  top: -180px;
  right: -140px;
  background: conic-gradient(from 90deg, var(--color-primary), var(--color-gold), var(--color-primary-soft), var(--color-primary));
  animation: hero-float 46s linear infinite;
}

.hero::after {
  width: 320px;
  height: 320px;
  bottom: -160px;
  right: 12%;
  background: radial-gradient(circle at 30% 30%, var(--color-gold), transparent 70%);
  animation: hero-float 34s ease-in-out infinite reverse;
}

@keyframes hero-float {
  0%   { transform: perspective(800px) rotate(0deg) translateY(0); }
  50%  { transform: perspective(800px) rotate(180deg) translateY(24px); }
  100% { transform: perspective(800px) rotate(360deg) translateY(0); }
}

.hero-inner { position: relative; z-index: 1; max-width: 720px; }

.eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gold-dark);
  margin-bottom: var(--space-2);
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--color-gold);
}

.lead {
  font-size: 1.125rem;
  color: var(--color-secondary);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-3) 0;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}

.hero-meta div { display: flex; flex-direction: column; }

.hero-meta strong {
  font-family: var(--font-heading);
  font-style: normal;
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--color-gold-dark);
}

.hero-meta span {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--color-text-muted);
}

/* Sections */
.section { padding: var(--space-8) 0; }
.section-alt { background: var(--color-bg-alt); }

.section-head { max-width: 640px; margin-bottom: var(--space-4); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow::before { display: none; }

/* Apparition au scroll : fade-in + léger déplacement vertical, avec stagger (via main.js) */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-premium), transform 0.6s var(--ease-premium);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Grid & cards */
.grid { display: grid; gap: var(--space-4); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--color-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
  box-shadow: var(--shadow-rest);
  transform-style: preserve-3d;
  transition: transform 0.4s var(--ease-premium), box-shadow 0.4s var(--ease-premium), border-color 0.4s ease;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: perspective(1000px) rotateX(2deg) rotateY(-2deg) translateY(-4px);
  border-color: var(--color-gold);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--color-gold);
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.card-link {
  display: inline-block;
  margin-top: var(--space-1);
  font-weight: 600;
  font-size: 0.9rem;
}

/* Proof / offer-benefit list */
.proof {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-6);
  align-items: center;
}

.proof-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gold-dark);
  margin-bottom: var(--space-1);
}

.offer-benefit {
  display: flex;
  align-items: flex-start;
  gap: var(--space-1);
  font-size: 0.95rem;
  color: var(--color-secondary);
}

.offer-benefit .check {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(76, 122, 99, 0.12);
  color: var(--color-success);
  font-size: 0.75rem;
  font-weight: 700;
}

/* CTA band */
.cta-band {
  position: relative;
  overflow: hidden;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 15%, rgba(201, 166, 107, 0.25), transparent 55%);
  pointer-events: none;
}

.cta-band > * { position: relative; z-index: 1; }

.cta-band h2, .cta-band .eyebrow { color: #fff; }
.cta-band .eyebrow::before { background: var(--color-gold); }
.cta-band p { color: rgba(255,255,255,0.75); max-width: 560px; margin-left: auto; margin-right: auto; }
.cta-band .hero-cta { justify-content: center; }
.cta-band .btn-secondary { color: #fff; border-color: rgba(255,255,255,0.35); }
.cta-band .btn-secondary:hover { border-color: var(--color-gold); color: var(--color-gold); }
.cta-band .btn-primary { background: var(--color-gold-dark); box-shadow: 0 6px 16px rgba(0,0,0,0.28); }
.cta-band .btn-primary:hover { background: #6f5530; }

/* Offer detail blocks (solutions.html) */
.offer {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border);
}

.offer:first-of-type { padding-top: var(--space-1); }

.offer-number {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gold-dark);
  margin-bottom: var(--space-1);
}

.offer-tagline {
  font-weight: 500;
  color: var(--color-secondary);
}

.offer-benefits {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* Steps (a-propos.html) */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}

.step {
  background: var(--color-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
  box-shadow: var(--shadow-rest);
  transform-style: preserve-3d;
  transition: transform 0.4s var(--ease-premium), box-shadow 0.4s var(--ease-premium), border-color 0.4s ease;
}
.step:hover {
  box-shadow: var(--shadow-hover);
  transform: perspective(1000px) rotateX(2deg) rotateY(-2deg) translateY(-4px);
  border-color: var(--color-gold);
}

/* Contact page */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  background: var(--color-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-2);
  box-shadow: var(--shadow-rest);
  transition: transform 0.4s var(--ease-premium), box-shadow 0.4s var(--ease-premium);
}
.contact-info-item:hover {
  box-shadow: var(--shadow-hover);
  transform: perspective(1000px) rotateX(1.5deg) rotateY(-1.5deg) translateY(-3px);
}

.contact-info-item .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--color-gold);
  color: var(--color-primary);
  flex-shrink: 0;
}

/* Évite le débordement horizontal de l'adresse e-mail sur mobile */
.contact-info-item > div { min-width: 0; overflow-wrap: anywhere; }

.contact-info-item strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

/* Legal pages */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-3) var(--space-12);
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px var(--space-3);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
}

.legal-nav a { font-size: 0.9rem; font-weight: 500; color: var(--color-text-muted); }
.legal-nav a.active, .legal-nav a:hover { color: var(--color-gold-dark); }

.legal h2 { margin-top: var(--space-4); }
.legal .updated { font-size: 0.88rem; color: var(--color-text-muted); }

.legal-callout {
  background: var(--color-bg-alt);
  border: 1px solid var(--border);
  border-left: 3px solid var(--color-gold);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-3);
  font-size: 0.9rem;
  margin: var(--space-2) 0;
}

.placeholder {
  background: #fff3cd;
  color: #7a5b00;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.88em;
}

/* Footer */
footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.72);
  padding: var(--space-6) 0 var(--space-3);
  margin-top: var(--space-4);
}

footer p { color: rgba(255,255,255,0.65); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
}

.footer-brand p { font-size: 0.9rem; }

.footer-brand .logo-text strong,
.footer-brand .logo-text span { color: #fff; }

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-gold);
  margin-bottom: var(--space-2);
}

.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.footer-col a { font-size: 0.9rem; color: rgba(255,255,255,0.68); }
.footer-col a:hover { color: var(--color-gold); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-1);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(255,255,255,0.14);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
}

.footer-bottom a { color: rgba(255,255,255,0.55); }
.footer-bottom a:hover { color: var(--color-gold); }

/* Cookie banner */
#cookie-banner {
  position: fixed;
  bottom: var(--space-2);
  left: var(--space-2);
  right: var(--space-2);
  max-width: 520px;
  margin: 0 auto;
  background: var(--color-bg);
  border: 1px solid var(--border);
  border-top: 3px solid var(--color-gold);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
  padding: var(--space-3);
  z-index: 1000;
  display: none;
  max-height: calc(100vh - 2 * var(--space-2));
  overflow-y: auto;
}

#cookie-banner.visible { display: block; }

#cookie-banner p { font-size: 0.85rem; margin-bottom: var(--space-2); }

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

#cookie-prefs {
  display: none;
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--border);
}

#cookie-prefs.visible { display: block; }

/* Emplacement Calendly avant consentement (contact.html) */
.calendly-consent {
  padding: var(--space-6) var(--space-3);
  text-align: center;
}
.calendly-consent[hidden] { display: none; }
.calendly-consent p { max-width: 520px; margin-left: auto; margin-right: auto; color: var(--color-text-muted); }
.calendly-consent .cookie-actions { justify-content: center; }

.cookie-pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: 0.85rem;
  padding: var(--space-1) 0;
}

.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--border);
  border-radius: 999px;
  transition: background 0.2s ease;
}

.slider::before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.switch input:checked + .slider { background: var(--color-gold-dark); }
.switch input:checked + .slider::before { transform: translateX(18px); }
.switch input:disabled + .slider { opacity: 0.6; cursor: not-allowed; }

/* Responsive */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .proof { grid-template-columns: 1fr; }
  .offer { grid-template-columns: 1fr; gap: var(--space-2); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero::before, .hero::after { opacity: 0.22; }
}

@media (max-width: 640px) {
  .section { padding: var(--space-6) 0; }
  .hero { padding: var(--space-6) var(--space-3); }

  .nav-links, .nav-actions { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  /* Menu ouvert : liens puis boutons empilés sous le logo, dans le flux (aucun chevauchement) */
  .navbar-inner.menu-open .nav-links {
    display: flex;
    flex-direction: column;
    flex-basis: 100%;
    order: 3;
    padding-top: var(--space-1);
    gap: var(--space-2);
  }
  .navbar-inner.menu-open .nav-actions {
    display: flex;
    flex-basis: 100%;
    order: 4;
  }
  .navbar-inner { position: relative; flex-wrap: wrap; }
  .grid-3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .cta-band { padding: var(--space-4) var(--space-3); }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  .hero::before, .hero::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card, .step, .contact-info-item { transition: none; }
  .hero::before, .hero::after { animation: none; }
}
