/* --- Variables --- */
:root {
  --bg: #f4f1ec;
  --bg-elevated: #faf8f5;
  --bg-alt: #e8e4de;
  --bg-print: #f0ebe4;
  --ink: #1c1917;
  --muted: #57534e;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: rgba(79, 70, 229, 0.12);
  --accent-glow: rgba(79, 70, 229, 0.18);
  --violet-tint: rgba(124, 58, 237, 0.08);
  --card: #fffefb;
  --border: rgba(28, 25, 23, 0.1);
  --border-strong: rgba(28, 25, 23, 0.16);
  --shadow: 0 20px 50px rgba(28, 25, 23, 0.07);
  --shadow-hover: 0 24px 56px rgba(28, 25, 23, 0.11);
  --shadow-card: 0 4px 20px rgba(28, 25, 23, 0.05);
  --radius: 16px;
  --radius-sm: 10px;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --max: 1080px;
  --header-bg: #e2dfda;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.62;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 120% 80% at 0% -20%, var(--accent-glow), transparent 52%),
    radial-gradient(ellipse 90% 70% at 100% 10%, var(--violet-tint), transparent 48%),
    linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg) 28%, var(--bg) 100%);
  background-attachment: fixed;
}

/* Grain papier : voile de bruit fixe très léger sur toute la page */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.055'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.65rem 1.1rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: #fff;
  background: var(--accent);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top 0.2s var(--ease-out);
}

.skip-link:focus {
  top: 1rem;
  outline: none;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent);
}

.wrap {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.site-main {
  overflow-x: clip;
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(180deg, #ece9e4 0%, var(--header-bg) 100%);
  border-bottom: 1px solid var(--border-strong);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset, 0 6px 24px rgba(28, 25, 23, 0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: auto;
  padding: 0.55rem 0;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  min-width: 0;
  text-decoration: none;
  color: var(--ink);
}

.logo:hover,
.logo:focus-visible {
  background: transparent;
}

.logo:hover img.logo-img,
.logo:focus-visible img.logo-img {
  opacity: 0.92;
}

.logo-slot {
  display: block;
  position: relative;
  /* Largeur calée pour garder la même hauteur de logo qu'avant (~43px) */
  width: min(190px, calc((100vw - 6rem) / 3));
  aspect-ratio: 636 / 145;
  line-height: 0;
}

img.logo-img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: left center;
  box-sizing: border-box;
}

@media (max-width: 520px) {
  .header-inner {
    padding: 0.45rem 0;
  }

  .logo-slot {
    width: min(calc(512px / 3), calc((100vw - 5rem) / 3));
  }
}

.footer-brand {
  font-weight: 700;
  color: #e7e5e4;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.theme-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s var(--ease-out);
}

.theme-toggle:hover {
  background: #fff;
  border-color: var(--muted);
  transform: rotate(12deg);
}

.theme-toggle .icon-sun {
  display: none;
}

html.theme-dark .theme-toggle .icon-sun {
  display: block;
}

html.theme-dark .theme-toggle .icon-moon {
  display: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.4rem 0.55rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}

.site-nav a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.45);
}

.nav-cta {
  padding: 0.5rem 1.1rem;
  margin-left: 0.25rem;
  background: var(--ink);
  color: var(--bg) !important;
  border-radius: 999px;
  box-shadow: 0 2px 12px rgba(28, 25, 23, 0.15);
}

.nav-cta:hover {
  background: var(--accent);
  color: #fff !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.nav-toggle:hover {
  background: #fff;
  border-color: var(--muted);
}

.nav-toggle-bar {
  display: block;
  width: 1.25rem;
  height: 2px;
  margin: 0 auto;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.2s var(--ease-out), opacity 0.2s;
}

@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1.25rem 1.25rem;
    background: linear-gradient(180deg, var(--header-bg) 0%, #dcd8d2 100%);
    border-bottom: 1px solid var(--border-strong);
    gap: 0;
    display: none;
    box-shadow: 0 16px 40px rgba(28, 25, 23, 0.08);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.85rem 0.5rem;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
  }

  .site-nav a:hover {
    background: rgba(255, 255, 255, 0.35);
  }

  .site-nav a:last-child {
    border-bottom: none;
    margin-top: 0.5rem;
    text-align: center;
    border-radius: 999px;
  }
}

/* --- Hero --- */
.hero {
  position: relative;
  padding: clamp(3.25rem, 9vw, 6rem) 0 clamp(4rem, 11vw, 6.5rem);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto -30%;
  height: 85%;
  background: radial-gradient(ellipse closest-side, var(--accent-soft), transparent 72%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  right: -8%;
  bottom: -25%;
  width: min(55vw, 480px);
  height: min(55vw, 480px);
  background: radial-gradient(circle at 40% 40%, rgba(124, 58, 237, 0.09), transparent 65%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
    max-width: 320px;
    margin-inline: auto;
  }
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin: 0 0 1rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 4.6vw, 3.2rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.035em;
  margin: 0 0 0.5rem;
  color: var(--ink);
  text-wrap: balance;
  scroll-margin-top: 5.5rem;
}

.brand-tagline {
  margin: 0 0 1.35rem;
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.lead {
  font-size: 1.08rem;
  color: var(--muted);
  margin: 0 0 2rem;
  max-width: 38ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.88rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background 0.22s var(--ease-out), color 0.22s, border-color 0.22s, transform 0.22s var(--ease-out), box-shadow 0.22s;
}

.btn:focus-visible {
  outline-offset: 4px;
}

.btn-primary {
  background: linear-gradient(135deg, #5b52f0 0%, var(--accent) 45%, #4338ca 100%);
  color: #fff;
  box-shadow: 0 4px 18px rgba(79, 70, 229, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #6d65f5 0%, var(--accent-hover) 50%, #3730a3 100%);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(79, 70, 229, 0.4);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  background: #fff;
  border-color: var(--ink);
  color: var(--ink);
  transform: translateY(-2px);
}

.hero-visual {
  display: flex;
  justify-content: center;
}

/* Fenêtre « éditeur de code » décorative */
.hero-code {
  width: 100%;
  max-width: 400px;
  background: linear-gradient(160deg, #24211e 0%, #1c1917 100%);
  border-radius: var(--radius);
  box-shadow: var(--shadow), 0 0 40px rgba(79, 70, 229, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
}

.hero-code::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.5), rgba(124, 58, 237, 0.2), transparent 55%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.hero-code-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.hero-code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.hero-code-dot:nth-child(1) { background: #f87171; }
.hero-code-dot:nth-child(2) { background: #fbbf24; }
.hero-code-dot:nth-child(3) { background: #34d399; }

.hero-code-tab {
  margin-left: 0.6rem;
  padding: 0.22rem 0.75rem;
  font-family: Consolas, "Cascadia Code", "JetBrains Mono", monospace;
  font-size: 0.72rem;
  color: #d6d3d1;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
}

.hero-code-body {
  margin: 0;
  padding: 1.35rem 1.25rem 1.5rem;
  font-family: Consolas, "Cascadia Code", "JetBrains Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.75;
  color: #e7e5e4;
  overflow-x: auto;
  white-space: pre;
}

.c-cmt  { color: #78716c; font-style: italic; }
.c-tag  { color: #a5b4fc; }
.c-attr { color: #7dd3fc; }
.c-str  { color: #fcd34d; }
.c-txt  { color: #f5f5f4; }

.hero-caret {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: #a5b4fc;
  border-radius: 1px;
  animation: caret-blink 1.1s steps(1) infinite;
}

@keyframes caret-blink {
  0%, 55% { opacity: 1; }
  56%, 100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-caret {
    animation: none;
  }
}

/* --- Sections --- */
.section {
  position: relative;
  padding: clamp(3.25rem, 7vw, 5rem) 0;
}

.section-alt {
  background: linear-gradient(180deg, #ebe7e1 0%, var(--bg-alt) 40%, #e0dcd5 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  border-bottom: 1px solid var(--border);
}

.section-print {
  z-index: 0;
  background: linear-gradient(180deg, var(--bg-print) 0%, #ebe4db 50%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

/* Grille de points façon papier à maquette, derrière le contenu */
.section-print::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(28, 25, 23, 0.16) 1px, transparent 1.6px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.35) 55%, transparent 95%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.35) 55%, transparent 95%);
}

.section-print::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), #7c3aed, #a855f7);
  opacity: 0.55;
}

.section-contact {
  background: linear-gradient(165deg, #e4e0f8 0%, #e8e4de 38%, #ddd9f0 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.2vw, 2.35rem);
  margin: 0 0 0.85rem;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--ink);
}

.section-title::after {
  content: "";
  display: block;
  width: 3.25rem;
  height: 4px;
  margin-top: 0.65rem;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), #7c3aed);
}

.contact-inner .section-title::after {
  margin-left: auto;
  margin-right: auto;
}

.section-intro {
  color: var(--muted);
  margin: 0 0 2.5rem;
  max-width: 52ch;
  font-size: 1.04rem;
}

.section-intro--tight {
  max-width: 62ch;
  margin-bottom: 1rem;
  font-size: 0.98rem;
  line-height: 1.58;
}

.section-foot--muted {
  margin-top: -0.25rem;
  margin-bottom: 2rem;
  font-size: 0.95rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.45);
  border-style: dashed;
  border-color: rgba(28, 25, 23, 0.14);
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 1.35rem;
}

.card {
  position: relative;
  background: linear-gradient(180deg, #fff 0%, var(--card) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem 1.45rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), border-color 0.25s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(79, 70, 229, 0.18);
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.22rem;
  margin: 0 0 0.65rem;
  color: var(--ink);
}

.card > p:not(.card-price) {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.58;
}

.card-price {
  display: inline-block;
  margin: 0 0 0.7rem;
  padding: 0.32rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, var(--accent));
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(79, 70, 229, 0.25);
}

.card-price-muted {
  color: #fff;
  background: linear-gradient(135deg, #78716c, #57534e);
  box-shadow: none;
}

.card-muted {
  opacity: 0.95;
  border-style: dashed;
  border-color: rgba(87, 83, 78, 0.35);
}

.card-muted:hover {
  border-color: rgba(87, 83, 78, 0.5);
}

/* --- Références (« Ils me font confiance ») --- */
.section-refs {
  background: linear-gradient(180deg, var(--bg) 0%, #eceee9 55%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.refs-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 420px));
  gap: 1.35rem;
}

.ref-card {
  position: relative;
  background: linear-gradient(180deg, #fff 0%, var(--card) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), border-color 0.25s;
}

.ref-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(79, 70, 229, 0.22);
}

/* Aperçu réel du site : iframe miniaturisée (lecture seule, clic = ouvrir le site) */
.ref-preview {
  display: block;
  position: relative;
  height: 250px;
  overflow: hidden;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.ref-preview iframe {
  width: 312.5%;
  height: 312.5%;
  border: 0;
  transform: scale(0.32);
  transform-origin: 0 0;
  pointer-events: none;
}

.ref-chrome {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.9rem;
  background: linear-gradient(180deg, #ece9e4, #e2dfda);
  border-bottom: 1px solid var(--border);
}

.ref-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(28, 25, 23, 0.18);
}

.ref-url {
  flex: 1;
  margin-left: 0.45rem;
  padding: 0.18rem 0.7rem;
  font-size: 0.74rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--border);
  border-radius: 999px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ref-body {
  display: block;
  padding: 1.35rem 1.45rem 1.5rem;
}

.ref-tag {
  display: inline-block;
  margin-bottom: 0.7rem;
  padding: 0.3rem 0.8rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, var(--accent));
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(79, 70, 229, 0.25);
}

.ref-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 700;
  margin-bottom: 0.55rem;
  color: var(--ink);
}

.ref-desc {
  display: block;
  margin-bottom: 0.9rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.58;
}

.ref-link {
  display: inline-block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

/* Lien « étiré » : toute la carte est cliquable */
.ref-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.ref-card:hover .ref-link {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cible-list {
  margin: 0 0 1.75rem;
  padding-left: 1.35rem;
  color: var(--muted);
  max-width: 58ch;
}

.cible-list li {
  margin-bottom: 0.55rem;
  padding-left: 0.15rem;
}

.cible-list li::marker {
  color: var(--accent);
}

.subsection-title {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 600;
  margin: 2.25rem 0 0.85rem;
  color: var(--ink);
}

.subsection-title::after {
  content: "";
  display: block;
  width: 2rem;
  height: 3px;
  margin-top: 0.45rem;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.7;
}

.ideas-list {
  margin-top: 0;
  border-left: 3px solid var(--accent-soft);
  padding-left: 1.1rem;
  margin-left: 0.15rem;
}

.faq-list {
  max-width: 58ch;
}

.faq-item + .faq-item {
  margin-top: 1.5rem;
}

.faq-list > .faq-item:first-child .subsection-title {
  margin-top: 0.75rem;
}

.faq-item p {
  margin: 0;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.55;
}

.section-foot {
  margin: 0;
  max-width: 58ch;
  color: var(--ink);
  font-size: 1.02rem;
  padding: 1.15rem 1.25rem;
  background: rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.placeholder {
  color: var(--muted);
  font-style: italic;
}

/* Étapes — blocs numérotés */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 52ch;
  counter-reset: step;
}

.steps li {
  position: relative;
  margin-bottom: 1rem;
  padding: 1.2rem 1.2rem 1.2rem 3.6rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), var(--card));
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  box-shadow: 0 2px 14px rgba(28, 25, 23, 0.04);
}

.steps li:last-child {
  margin-bottom: 0;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.85rem;
  height: 1.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.steps strong {
  color: var(--ink);
}

/* --- Contact --- */
.contact-inner {
  text-align: center;
}

.contact-inner .section-title,
.contact-inner .section-intro {
  margin-left: auto;
  margin-right: auto;
}

.contact-box {
  text-align: left;
  max-width: 500px;
  margin: 0 auto;
  padding: 2rem 1.85rem;
  background: linear-gradient(180deg, #fff 0%, #faf9f7 100%);
  border-radius: var(--radius);
  border: 1px solid rgba(79, 70, 229, 0.2);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

.contact-box p {
  margin: 0 0 0.85rem;
}

.contact-box p:last-child {
  margin-bottom: 0;
}

.contact-note {
  margin-top: 1.35rem !important;
  padding-top: 1.1rem;
  border-top: 1px solid var(--border);
  font-size: 0.86rem;
  color: #3f3a36;
  line-height: 1.55;
}

.placeholder-inline {
  color: var(--muted);
  font-style: italic;
}

/* --- Page mentions légales --- */
.legal-page {
  padding: clamp(2rem, 5vw, 3.5rem) 0 3rem;
}

.legal-inner {
  max-width: 56rem;
}

.legal-breadcrumb {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.legal-breadcrumb a {
  font-weight: 600;
}

.legal-title {
  margin-bottom: 0.75rem;
}

.legal-lead {
  margin-bottom: 2rem;
}

.legal-block {
  margin-bottom: 2.25rem;
}

.legal-block p {
  margin: 0.55rem 0;
  max-width: 65ch;
}

.legal-muted {
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: 1rem !important;
}

.legal-updated {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 2.5rem !important;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

/* --- Footer --- */
.site-footer {
  position: relative;
  padding: 2.35rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, #292524 0%, #1c1917 45%, #0f0e0d 100%);
  color: #d6d3d1;
  font-size: 0.9rem;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), #7c3aed, transparent);
  opacity: 0.45;
}

.footer-inner {
  text-align: center;
}

.footer-inner p {
  margin: 0.4rem 0;
}

.footer-small {
  font-size: 0.8rem;
  color: #e7e5e4;
  opacity: 1;
}

.site-footer code {
  color: #fafaf9;
  background: rgba(255, 255, 255, 0.12);
  padding: 0.15rem 0.4rem;
  border-radius: 5px;
  font-size: 0.88em;
}

.site-footer a {
  color: #e7e5e4;
}

.site-footer a:hover {
  color: #fff;
}

/* --- Mode sombre --- */
html.theme-dark {
  color-scheme: dark;
  --bg: #171412;
  --bg-elevated: #1e1a17;
  --bg-alt: #201c19;
  --bg-print: #1d1916;
  --ink: #e7e5e4;
  --muted: #a8a29e;
  --accent: #818cf8;
  --accent-hover: #a5b4fc;
  --accent-soft: rgba(129, 140, 248, 0.16);
  --accent-glow: rgba(99, 102, 241, 0.2);
  --violet-tint: rgba(139, 92, 246, 0.1);
  --card: #211d1a;
  --border: rgba(231, 229, 228, 0.12);
  --border-strong: rgba(231, 229, 228, 0.22);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 24px 56px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.35);
  --header-bg: #1e1a17;
}

/* Grain : en mode sombre on éclaircit au lieu d'assombrir */
html.theme-dark body::after {
  mix-blend-mode: screen;
  opacity: 0.6;
}

html.theme-dark .site-header {
  background: linear-gradient(180deg, #242019 0%, var(--header-bg) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 6px 24px rgba(0, 0, 0, 0.3);
}

html.theme-dark .site-nav a:hover {
  background: rgba(255, 255, 255, 0.07);
}

html.theme-dark .nav-toggle,
html.theme-dark .theme-toggle {
  background: rgba(255, 255, 255, 0.07);
}

html.theme-dark .nav-toggle:hover,
html.theme-dark .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
}

@media (max-width: 720px) {
  html.theme-dark .site-nav {
    background: linear-gradient(180deg, var(--header-bg) 0%, #14110f 100%);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  }

  html.theme-dark .site-nav a:hover {
    background: rgba(255, 255, 255, 0.06);
  }
}

html.theme-dark .btn-ghost {
  background: rgba(255, 255, 255, 0.07);
}

html.theme-dark .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--ink);
  color: var(--ink);
}

html.theme-dark .section-alt {
  background: linear-gradient(180deg, #1d1a17 0%, var(--bg-alt) 40%, #191613 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

html.theme-dark .section-print {
  background: linear-gradient(180deg, var(--bg-print) 0%, #1f1b17 50%, var(--bg) 100%);
}

html.theme-dark .section-print::after {
  background-image: radial-gradient(rgba(231, 229, 228, 0.13) 1px, transparent 1.6px);
}

html.theme-dark .section-refs {
  background: linear-gradient(180deg, var(--bg) 0%, #1b1916 55%, var(--bg) 100%);
}

html.theme-dark .section-contact {
  background: linear-gradient(165deg, #221f33 0%, #201c19 38%, #1f1c30 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

html.theme-dark .card,
html.theme-dark .ref-card {
  background: linear-gradient(180deg, #272220 0%, var(--card) 100%);
}

html.theme-dark .ref-chrome {
  background: linear-gradient(180deg, #2a2522, #221e1b);
}

html.theme-dark .ref-url {
  background: rgba(255, 255, 255, 0.08);
}

html.theme-dark .ref-dot {
  background: rgba(231, 229, 228, 0.2);
}

html.theme-dark .steps li {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), var(--card));
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.3);
}

html.theme-dark .section-foot {
  background: rgba(255, 255, 255, 0.06);
}

html.theme-dark .section-foot--muted {
  background: rgba(255, 255, 255, 0.04);
}

html.theme-dark .contact-box {
  background: linear-gradient(180deg, #242020 0%, #1e1b1a 100%);
  border-color: rgba(129, 140, 248, 0.3);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

html.theme-dark .contact-note {
  color: #b8b2ac;
}

html.theme-dark .nav-cta:hover {
  color: #1c1917 !important;
}
