/* =========================================================================
   MD Consulting — Feuille de style unique (vanilla CSS)
   Aucune dépendance externe. Mobile-first. Accessible.
   ========================================================================= */

/* --- Design tokens ------------------------------------------------------ */
:root {
  /* Couleurs */
  --c-ink:      #0d2238;   /* texte principal, navy profond */
  --c-ink-soft: #33485d;
  --c-muted:    #5d7185;   /* texte secondaire */
  --c-line:     #e2e8f0;   /* bordures fines */
  --c-bg:       #ffffff;
  --c-bg-alt:   #f5f8fb;   /* sections alternées */
  --c-bg-deep:  #0c2340;   /* sections sombres (footer, CTA) */
  --c-brand:    #0e63b3;   /* bleu MD */
  --c-brand-dk: #0a4d8c;
  --c-accent:   #14b8a6;   /* teal — efficacité / automatisation */
  --c-accent-dk:#0e9285;
  --c-on-dark:  #e8f0f8;
  --c-on-dark-muted: #a9bdd0;

  /* Typographie : pile système (rapide, zéro requête externe) */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  /* Échelle fluide */
  --step--1: clamp(0.83rem, 0.78rem + 0.18vw, 0.92rem);
  --step-0:  clamp(1rem, 0.95rem + 0.25vw, 1.13rem);
  --step-1:  clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --step-2:  clamp(1.45rem, 1.25rem + 1vw, 1.95rem);
  --step-3:  clamp(1.8rem, 1.4rem + 2vw, 2.6rem);
  --step-4:  clamp(2.2rem, 1.6rem + 3vw, 3.6rem);

  /* Espacements / rayons */
  --radius:    14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(13, 34, 56, .06), 0 2px 8px rgba(13, 34, 56, .05);
  --shadow-md: 0 8px 30px rgba(13, 34, 56, .10);
  --container: 1140px;
  --gap:       clamp(1.25rem, 4vw, 2rem);
}

/* --- Reset léger -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--c-brand); text-decoration-thickness: .08em; text-underline-offset: .15em; }
a:hover { color: var(--c-brand-dk); }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; color: var(--c-ink); font-weight: 760; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -0.01em; }

:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; border-radius: 4px; }

/* --- Utilitaires -------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(1rem, 5vw, 2rem); }
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section--alt { background: var(--c-bg-alt); }
.section__head { max-width: 46rem; margin-bottom: clamp(2rem, 5vw, 3rem); }
.eyebrow {
  display: inline-block; font-size: var(--step--1); font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--c-accent-dk);
  margin-bottom: .75rem;
}
.lead { font-size: var(--step-1); color: var(--c-ink-soft); line-height: 1.5; }
.text-muted { color: var(--c-muted); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 200;
  background: var(--c-ink); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-sm);
  transition: top .15s ease;
}
.skip-link:focus { top: 1rem; color: #fff; }

/* --- Boutons ------------------------------------------------------------ */
.btn {
  --btn-bg: var(--c-brand);
  display: inline-flex; align-items: center; gap: .5rem;
  font: inherit; font-weight: 650; line-height: 1;
  padding: .85rem 1.4rem; border: 1px solid transparent; border-radius: 999px;
  background: var(--btn-bg); color: #fff; cursor: pointer;
  text-decoration: none; white-space: nowrap;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { color: #fff; background: var(--c-brand-dk); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn--accent { --btn-bg: var(--c-accent); }
.btn--accent:hover { background: var(--c-accent-dk); }
.btn--ghost {
  background: transparent; color: var(--c-ink); border-color: var(--c-line);
}
.btn--ghost:hover { background: var(--c-bg-alt); color: var(--c-ink); border-color: var(--c-muted); }
.btn--lg { padding: 1rem 1.7rem; font-size: var(--step-0); }
.btn--block { width: 100%; justify-content: center; }
.btn .arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* --- En-tête / nav ------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #F2F1EE;
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--c-line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 760; color: var(--c-ink); text-decoration: none; letter-spacing: -0.01em; }
.brand:hover { color: var(--c-ink); }
.brand svg { width: 32px; height: 32px; }
.brand img { width: 36px; height: 36px; }
.brand--wordmark img { width: auto; height: 26px; }
.brand b { color: var(--c-brand); }
.nav__links { display: flex; align-items: center; gap: 1.6rem; list-style: none; padding: 0; }
.nav__links a { color: var(--c-ink-soft); text-decoration: none; font-weight: 550; font-size: var(--step--1); }
.nav__links a:hover { color: var(--c-brand); }
.nav__actions { display: flex; align-items: center; gap: 1rem; }
.lang-switch { font-size: var(--step--1); color: var(--c-muted); text-decoration: none; font-weight: 650; border: 1px solid var(--c-line); border-radius: 999px; padding: .35rem .7rem; }
.lang-switch:hover { border-color: var(--c-muted); color: var(--c-ink); }
.nav__toggle {
  display: none; background: none; border: 1px solid var(--c-line); border-radius: 10px;
  width: 44px; height: 44px; padding: 0; cursor: pointer; color: var(--c-ink);
}
.nav__toggle svg { width: 22px; height: 22px; margin: auto; }

@media (max-width: 860px) {
  .nav__toggle { display: inline-flex; }
  .nav__menu {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--c-line);
    box-shadow: var(--shadow-md);
    display: none; flex-direction: column; gap: 0; padding: .5rem 0 1rem;
  }
  .nav__menu[data-open="true"] { display: flex; }
  .nav__links { flex-direction: column; align-items: stretch; gap: 0; padding: 0 1rem; }
  .nav__links a { padding: .85rem .25rem; border-bottom: 1px solid var(--c-line); font-size: var(--step-0); }
  .nav__actions { padding: 1rem 1rem 0; flex-direction: column; align-items: stretch; }
  .nav__actions .btn { justify-content: center; }
}
@media (min-width: 861px) {
  .nav__menu { display: flex !important; align-items: center; gap: 1.6rem; }
}

/* --- Hero --------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(3rem, 8vw, 5.5rem); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 55% at 15% 0%, rgba(20, 184, 166, .12), transparent 60%),
    radial-gradient(55% 60% at 100% 20%, rgba(14, 99, 179, .14), transparent 60%);
}
.hero__inner { max-width: 56rem; }
.hero h1 { margin-bottom: 1.1rem; }
.hero h1 .accent { color: var(--c-brand); }
.hero p { font-size: var(--step-1); color: var(--c-ink-soft); max-width: 44rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; align-items: center; }
.hero__note { font-size: var(--step--1); color: var(--c-muted); }

/* --- Grilles de cartes -------------------------------------------------- */
.grid { display: grid; gap: var(--gap); }
.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: 880px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card {
  background: var(--c-bg); border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 1.8rem); box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #cfdbe7; }
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--c-muted); }
.card__icon {
  display: inline-grid; place-items: center; width: 46px; height: 46px; margin-bottom: 1rem;
  border-radius: 12px; background: linear-gradient(135deg, var(--c-brand), var(--c-accent)); color: #fff;
}
.card__icon svg { width: 24px; height: 24px; }

/* Bloc « problèmes » : liste avec puces accent */
.problem-list { list-style: none; padding: 0; display: grid; gap: 1rem; }
.problem-list li {
  display: flex; gap: .9rem; align-items: flex-start;
  background: var(--c-bg); border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: 1.1rem 1.25rem; box-shadow: var(--shadow-sm);
}
.problem-list .tick {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(20, 184, 166, .14); color: var(--c-accent-dk);
  display: grid; place-items: center; margin-top: .15rem;
}
.problem-list .tick svg { width: 16px; height: 16px; }

/* --- Processus (étapes numérotées) ------------------------------------- */
.steps { counter-reset: step; display: grid; gap: var(--gap); }
.steps--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .steps--3 { grid-template-columns: 1fr; } }
.step {
  position: relative; background: var(--c-bg); border: 1px solid var(--c-line);
  border-radius: var(--radius); padding: 1.7rem 1.5rem 1.5rem; box-shadow: var(--shadow-sm);
}
.step__num {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  background: var(--c-ink); color: #fff; font-weight: 760; font-size: 1.1rem; margin-bottom: 1rem;
}
.step h3 { margin-bottom: .4rem; }
.step p { color: var(--c-muted); }
.step .badge { display:inline-block; margin-top:.6rem; font-size: var(--step--1); font-weight:650; color: var(--c-accent-dk); background: rgba(20,184,166,.12); padding:.25rem .6rem; border-radius:999px; }

/* --- Crédibilité / stats ----------------------------------------------- */
.about { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } }
.about p + p { margin-top: 1rem; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.stat {
  background: var(--c-bg); border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: 1.4rem 1.25rem; box-shadow: var(--shadow-sm);
}
.stat__num { font-size: var(--step-2); font-weight: 780; color: var(--c-brand); line-height: 1.1; letter-spacing: -0.02em; }
.stat__label { font-size: var(--step--1); color: var(--c-muted); margin-top: .25rem; }

/* --- Bandeau aides publiques ------------------------------------------- */
.aids { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; margin-top: 2rem; }
.aid-chip {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--c-bg); border: 1px solid var(--c-line); border-radius: 999px;
  padding: .5rem .95rem; font-size: var(--step--1); font-weight: 600; color: var(--c-ink-soft);
}
.aid-chip .flag { font-size: 1.05em; }

/* --- FAQ (accordéon natif <details>) ----------------------------------- */
.faq { max-width: 50rem; }
.faq details {
  border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-bg);
  margin-bottom: .85rem; box-shadow: var(--shadow-sm); overflow: hidden;
}
.faq details[open] { border-color: #cfdbe7; }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.1rem 1.3rem; font-weight: 650; cursor: pointer; list-style: none; color: var(--c-ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev { flex: 0 0 auto; transition: transform .2s ease; color: var(--c-brand); }
.faq details[open] summary .chev { transform: rotate(180deg); }
.faq summary:hover { color: var(--c-brand); }
.faq .faq__body { padding: 0 1.3rem 1.2rem; color: var(--c-muted); }

/* --- CTA sombre --------------------------------------------------------- */
.cta-band { background: var(--c-bg-deep); color: var(--c-on-dark); position: relative; overflow: hidden; }
.cta-band::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(50% 80% at 80% 0%, rgba(20,184,166,.22), transparent 60%);
}
.cta-band .container { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; }
.cta-band p { color: var(--c-on-dark-muted); font-size: var(--step-1); max-width: 42rem; }
.cta-band .cta-band__inner { display: grid; gap: 1.5rem; max-width: 44rem; }

/* --- Formulaire de contact --------------------------------------------- */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 880px) { .contact { grid-template-columns: 1fr; } }
.contact__aside h2 { margin-bottom: 1rem; }
.contact__points { list-style: none; padding: 0; display: grid; gap: 1rem; margin-top: 1.5rem; }
.contact__points li { display: flex; gap: .75rem; align-items: flex-start; color: var(--c-ink-soft); }
.contact__points .tick { flex: 0 0 auto; color: var(--c-accent-dk); margin-top: .2rem; }
.contact__direct { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--c-line); font-size: var(--step--1); color: var(--c-muted); }
.contact__direct a { font-weight: 650; }

.form {
  background: var(--c-bg); border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.2rem); box-shadow: var(--shadow-md);
}
.field { margin-bottom: 1.15rem; }
.field label { display: block; font-weight: 600; font-size: var(--step--1); margin-bottom: .4rem; color: var(--c-ink); }
.field .req { color: var(--c-accent-dk); }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; color: var(--c-ink);
  padding: .8rem .95rem; border: 1px solid var(--c-line); border-radius: var(--radius-sm);
  background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--c-brand); box-shadow: 0 0 0 3px rgba(14, 99, 179, .15);
}
.field textarea { resize: vertical; min-height: 130px; }
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem; }
@media (max-width: 520px) { .field--row { grid-template-columns: 1fr; gap: 0; } }
/* Pot de miel anti-spam : masqué pour humains, visible pour bots */
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form__consent { display: flex; gap: .6rem; align-items: flex-start; font-size: var(--step--1); color: var(--c-muted); }
.form__consent input { width: auto; margin-top: .25rem; flex: 0 0 auto; }
.form__status { margin-top: 1rem; padding: .9rem 1.1rem; border-radius: var(--radius-sm); font-size: var(--step--1); display: none; }
.form__status[data-state="ok"]  { display: block; background: rgba(20,184,166,.12); color: var(--c-accent-dk); border: 1px solid rgba(20,184,166,.3); }
.form__status[data-state="err"] { display: block; background: #fdecec; color: #b42318; border: 1px solid #f6c5c0; }

/* --- Pied de page ------------------------------------------------------- */
.site-footer { background: var(--c-bg-deep); color: var(--c-on-dark-muted); padding-block: 3rem 2rem; font-size: var(--step--1); }
.site-footer a { color: var(--c-on-dark); }
.site-footer a:hover { color: #fff; }
.footer__grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; }
.footer__brand { max-width: 22rem; }
.footer__brand .brand { color: #fff; margin-bottom: .75rem; }
.footer__brand .brand b { color: var(--c-accent); }
.footer__col h4 { color: #fff; font-size: var(--step--1); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .8rem; }
.footer__col ul { list-style: none; padding: 0; display: grid; gap: .5rem; }
.footer__col a { text-decoration: none; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.5rem; padding-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; }

/* --- Animations d'apparition (légères, respectent reduced-motion) ------ */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
