/* Damien Lamouroux — composants (préfixe ld-). Classes pures, prêtes pour des templates Twig.
   Dépend de tokens.css (variables --bg-100, --font-display, --space-*, --radius-*...). */

/* ---------- Base ---------- */
.ld-root, .ld-root * { box-sizing: border-box; }
.ld-root { background: var(--bg-100); color: var(--ink-100); font-family: var(--font-text); font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
.ld-root :focus-visible, .ld-focusable:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.ld-h { font-family: var(--font-display); color: var(--ink-100); margin: 0; font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; font-variation-settings: 'opsz' 72; }
.ld-overline { font: 700 13px/1.3 var(--font-text); letter-spacing: .08em; text-transform: uppercase; color: var(--brand-700); display: inline-flex; align-items: center; gap: 10px; }
.ld-overline::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--brand-500); }
.ld-muted { color: var(--ink-200); }
.ld-link { color: var(--brand-700); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; font-weight: 600; }
.ld-link:hover { text-decoration-thickness: 3px; }
.ld-icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ld-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Boutons ---------- */
.ld-btn { --_bg: var(--brand-500); --_fg: var(--on-brand); --_bd: var(--brand-500);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 24px;
  border-radius: var(--radius-pill); border: 2px solid var(--_bd); background: var(--_bg); color: var(--_fg);
  font: 650 16px/1.2 var(--font-text); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease; }
.ld-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.ld-btn:active { transform: translateY(0); box-shadow: none; }
.ld-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.ld-btn .ld-icon { transition: transform .18s ease; }
.ld-btn:hover .ld-icon--move { transform: translateX(3px); }
.ld-btn--secondary { --_bg: transparent; --_fg: var(--ink-100); --_bd: var(--ink-100); }
.ld-btn--secondary:hover { --_bg: var(--bg-200); }
.ld-btn--ghost { --_bg: transparent; --_fg: var(--ink-100); --_bd: transparent; padding-inline: 14px; }
.ld-btn--ghost:hover { --_bg: var(--bg-300); box-shadow: none; }
.ld-btn--inverse { --_bg: var(--bg-inverse); --_fg: var(--ink-inverse); --_bd: var(--bg-inverse); }
.ld-btn--sm { min-height: 40px; padding: 8px 16px; font-size: 15px; }
.ld-btn--lg { min-height: 56px; padding: 16px 30px; font-size: 17px; }
.ld-btn--block { width: 100%; }
.ld-btn[disabled], .ld-btn[aria-disabled="true"] { --_bg: var(--bg-300); --_fg: var(--ink-200); --_bd: var(--bg-300); cursor: not-allowed; transform: none; box-shadow: none; }
.ld-btn[aria-busy="true"] { cursor: progress; }
.ld-btn[aria-busy="true"]::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: ld-spin .8s linear infinite; }
@keyframes ld-spin { to { transform: rotate(360deg); } }

/* ---------- Badges & puces ---------- */
.ld-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-s); font: 650 13px/1.3 var(--font-text); background: var(--bg-300); color: var(--ink-100); }
.ld-badge--brand { background: var(--brand-100); color: var(--brand-700); }
.ld-badge--accent { background: var(--accent-100); color: var(--accent-600); }
.ld-badge--solid { background: var(--brand-500); color: var(--on-brand); }
.ld-badge--success { background: var(--bg-200); color: var(--success); box-shadow: inset 0 0 0 1.5px currentColor; }
.ld-badge--warning { background: var(--bg-200); color: var(--warning); box-shadow: inset 0 0 0 1.5px currentColor; }
.ld-badge--danger { background: var(--bg-200); color: var(--danger); box-shadow: inset 0 0 0 1.5px currentColor; }
.ld-badge--example { background: transparent; color: var(--ink-200); box-shadow: inset 0 0 0 1.5px var(--line-200); border-radius: var(--radius-pill); font-weight: 600; font-size: 12px; }
.ld-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 18px; border-radius: var(--radius-pill); border: 1.5px solid var(--line-200); background: transparent; color: var(--ink-100); font: 600 15px/1 var(--font-text); cursor: pointer; transition: background-color .15s, border-color .15s; }
.ld-chip:hover { background: var(--bg-300); }
.ld-chip[aria-current="true"] { background: var(--ink-100); color: var(--bg-100); border-color: var(--ink-100); }
.ld-chip .ld-count { font-size: 12px; opacity: .75; }

/* ---------- Cartes ---------- */
.ld-card { position: relative; background: var(--bg-200); border: 1px solid var(--line-100); border-radius: var(--radius-l); padding: var(--space-6); box-shadow: var(--shadow-1); transition: transform .22s ease, box-shadow .22s ease; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ld-card--link:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.ld-card__title { font: 700 21px/1.25 var(--font-display); letter-spacing: -0.01em; margin: 0; overflow-wrap: anywhere; }
.ld-card__title a { color: inherit; text-decoration: none; }
.ld-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* toute la carte cliquable */
.ld-card__text { margin: 0; color: var(--ink-200); font-size: 15px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.ld-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 6px; font: 600 15px/1.2 var(--font-text); color: var(--brand-700); }
.ld-card__foot .ld-icon { transition: transform .2s; }
.ld-card--link:hover .ld-card__foot .ld-icon { transform: translateX(4px); }
.ld-card__media { margin: calc(var(--space-6) * -1) calc(var(--space-6) * -1) 4px; aspect-ratio: 16/10; border-radius: var(--radius-l) var(--radius-l) 0 0; overflow: hidden; background: var(--bg-300); }
.ld-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Offre : pastille-disque numérotée */
.ld-offer__icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-100); color: var(--brand-700); }
.ld-offer__icon .ld-icon { width: 26px; height: 26px; }
.ld-offer--featured { background: var(--brand-500); border-color: var(--brand-500); color: var(--on-brand); }
.ld-offer--featured .ld-card__text, .ld-offer--featured .ld-card__foot { color: var(--on-brand); }
.ld-offer--featured .ld-offer__icon { background: var(--on-brand); color: var(--brand-500); }

/* Étude de cas */
.ld-case__meta { display: flex; flex-wrap: wrap; gap: 6px; }
.ld-case__result { display: flex; align-items: baseline; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line-100); }
.ld-case__result strong { white-space: nowrap; font: 800 34px/1 var(--font-display); color: var(--brand-700); letter-spacing: -0.03em; }
.ld-case__result span { font-size: 14px; color: var(--ink-200); line-height: 1.35; }

/* Témoignage */
.ld-quote { background: var(--bg-200); }
.ld-quote__mark { width: 44px; height: 44px; border-radius: 50%; background: var(--brand-500); color: var(--on-brand); display: grid; place-items: center; font: 800 34px/1 var(--font-display); padding-top: 12px; }
.ld-quote blockquote { margin: 0; font: 500 19px/1.5 var(--font-text); color: var(--ink-100); }
.ld-quote figcaption { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.ld-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--brand-200); color: var(--ink-100); display: grid; place-items: center; font: 700 16px/1 var(--font-display); flex: none; overflow: hidden; }
.ld-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ld-quote__who { font: 650 15px/1.3 var(--font-text); }
.ld-quote__role { font-size: 14px; color: var(--ink-200); }

/* Article */
.ld-article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font: 500 13px/1.4 var(--font-text); color: var(--ink-200); }

/* ---------- Formulaires ---------- */
.ld-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ld-label { font: 600 15px/1.3 var(--font-text); color: var(--ink-100); }
.ld-label .ld-req { color: var(--brand-700); margin-left: 2px; }
.ld-input, .ld-textarea, .ld-select { width: 100%; min-height: 52px; padding: 13px 16px; border-radius: var(--radius-m); border: 1.5px solid var(--line-200); background: var(--bg-200); color: var(--ink-100); font: 400 16px/1.4 var(--font-text); transition: border-color .15s, box-shadow .15s; }
.ld-textarea { min-height: 128px; resize: vertical; }
.ld-select { appearance: none; padding-right: 44px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.ld-input::placeholder, .ld-textarea::placeholder { color: var(--ink-200); opacity: .8; }
.ld-input:hover, .ld-textarea:hover, .ld-select:hover { border-color: var(--ink-200); }
.ld-input:focus, .ld-textarea:focus, .ld-select:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--accent-100), 0 0 0 1px var(--focus); }
.ld-help { font-size: 14px; color: var(--ink-200); line-height: 1.4; }
.ld-field--error .ld-input, .ld-field--error .ld-textarea, .ld-field--error .ld-select { border-color: var(--danger); }
.ld-msg { display: flex; gap: 6px; align-items: flex-start; font: 600 14px/1.4 var(--font-text); }
.ld-msg--error { color: var(--danger); }
.ld-msg--success { color: var(--success); }
.ld-field--success .ld-input { border-color: var(--success); }
.ld-input:disabled, .ld-textarea:disabled { background: var(--bg-300); color: var(--ink-200); cursor: not-allowed; border-style: dashed; }
.ld-check { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; font-size: 14px; line-height: 1.5; color: var(--ink-200); cursor: pointer; }
.ld-check input { appearance: none; width: 24px; height: 24px; margin: 0; border: 1.5px solid var(--line-200); border-radius: 7px; background: var(--bg-200); display: grid; place-items: center; cursor: pointer; }
.ld-check input::after { content: ""; width: 12px; height: 7px; border: 2.5px solid var(--on-brand); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.ld-check input:checked { background: var(--brand-500); border-color: var(--brand-500); }
.ld-check input:checked::after { opacity: 1; }
.ld-check input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- Alertes ---------- */
.ld-alert { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radius-m); background: var(--bg-200); border: 1.5px solid currentColor; font-size: 15px; line-height: 1.5; }
.ld-alert p { margin: 0; color: var(--ink-100); }
.ld-alert--success { color: var(--success); } .ld-alert--warning { color: var(--warning); } .ld-alert--danger { color: var(--danger); } .ld-alert--info { color: var(--accent-600); }

/* ---------- En-tête & navigation ---------- */
.ld-header { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 24px; height: 76px; padding: 0 32px; background: color-mix(in srgb, var(--bg-100) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-100); }
.ld-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink-100); font: 800 18px/1.1 var(--font-display); letter-spacing: -0.01em; }
.ld-brand img { width: 40px; height: 40px; }
.ld-brand small { display: block; font: 500 12px/1.2 var(--font-text); color: var(--ink-200); letter-spacing: 0; }
.ld-nav { display: flex; gap: 4px; margin-left: auto; }
.ld-nav a { padding: 10px 14px; border-radius: var(--radius-pill); color: var(--ink-100); text-decoration: none; font: 550 15px/1 var(--font-text); }
.ld-nav a:hover { background: var(--bg-300); }
.ld-nav a[aria-current="page"] { background: var(--ink-100); color: var(--bg-100); }
.ld-theme-toggle { display: inline-flex; padding: 4px; gap: 2px; border-radius: var(--radius-pill); background: var(--bg-300); border: 0; }
.ld-theme-toggle button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-200); display: grid; place-items: center; cursor: pointer; }
.ld-theme-toggle button[aria-pressed="true"] { background: var(--bg-200); color: var(--ink-100); box-shadow: var(--shadow-1); }
.ld-burger { display: none; width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--line-200); background: transparent; color: var(--ink-100); place-items: center; }
.ld-breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; font: 500 14px/1.4 var(--font-text); color: var(--ink-200); }
.ld-breadcrumb li + li::before { content: "/"; margin-right: 6px; opacity: .6; }
.ld-breadcrumb a { color: var(--ink-200); text-decoration: underline; text-underline-offset: 3px; }
.ld-breadcrumb [aria-current] { color: var(--ink-100); font-weight: 600; }

/* Barre CTA mobile (au pouce) + bouton WhatsApp */
.ld-mobilebar { position: sticky; bottom: 0; display: grid; grid-template-columns: 1fr auto auto; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--bg-200); border-top: 1px solid var(--line-100); box-shadow: 0 -8px 24px rgba(0,0,0,.08); }
.ld-iconbtn { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--line-200); background: var(--bg-200); color: var(--ink-100); text-decoration: none; }
.ld-fab { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 20px 0 16px; border-radius: var(--radius-pill); background: var(--bg-inverse); color: var(--ink-inverse); font: 650 15px/1 var(--font-text); text-decoration: none; box-shadow: var(--shadow-2); transition: transform .2s; }
.ld-fab:hover { transform: scale(1.04); }
.ld-fab__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px var(--bg-inverse); }

/* ---------- Chiffres clés, méthode, FAQ ---------- */
.ld-stat { display: flex; flex-direction: column; gap: 6px; }
.ld-stat__value { font: 800 64px/1 var(--font-display); letter-spacing: -0.04em; color: var(--brand-700); font-variant-numeric: tabular-nums; }
.ld-stat__label { font-size: 15px; color: var(--ink-200); line-height: 1.4; max-width: 22ch; }
.ld-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: s; }
.ld-step { counter-increment: s; display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: start; }
.ld-step::before { content: counter(s); width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-500); color: var(--on-brand); font: 800 26px/1 var(--font-display); }
.ld-step h3 { font: 700 21px/1.25 var(--font-display); margin: 6px 0 4px; }
.ld-step p { margin: 0; color: var(--ink-200); font-size: 15px; }
.ld-step__time { font: 600 13px/1 var(--font-text); color: var(--accent-600); }
.ld-faq { border-top: 1px solid var(--line-100); }
.ld-faq details { border-bottom: 1px solid var(--line-100); }
.ld-faq summary { list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; min-height: 64px; padding: 16px 0; cursor: pointer; font: 650 18px/1.35 var(--font-display); }
.ld-faq summary::-webkit-details-marker { display: none; }
.ld-faq summary::after { content: "+"; flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-300); font: 500 22px/1 var(--font-text); transition: transform .2s, background-color .2s; }
.ld-faq details[open] summary::after { transform: rotate(45deg); background: var(--brand-500); color: var(--on-brand); }
.ld-faq details p { margin: 0 0 20px; color: var(--ink-200); max-width: 68ch; }

/* ---------- Bandeau cookies ---------- */
.ld-cookie { max-width: 560px; padding: 22px; border-radius: var(--radius-l); background: var(--bg-200); border: 1px solid var(--line-100); box-shadow: var(--shadow-2); display: grid; gap: 14px; }
.ld-cookie h2 { font: 700 18px/1.3 var(--font-display); margin: 0; display: flex; gap: 10px; align-items: center; }
.ld-cookie p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-200); }
.ld-cookie__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ld-cookie__actions .ld-btn { min-height: 48px; }

/* ---------- Motif disque (repris du logo) ---------- */
.ld-disc { border-radius: 50%; background: var(--brand-500); }
.ld-disc--soft { background: var(--brand-200); }
.ld-half { border-radius: 999px 999px 0 0; background: var(--brand-200); }

/* ---------- Animations au scroll ---------- */
.ld-reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.ld-reveal.is-in { opacity: 1; transform: none; }

@media (max-width: 760px) {
  .ld-header { height: 64px; padding: 0 16px; }
  .ld-nav, .ld-header .ld-btn { display: none; }
  .ld-burger { display: grid; margin-left: auto; }
  .ld-card { padding: var(--space-5); }
  .ld-card__media { margin: calc(var(--space-5) * -1) calc(var(--space-5) * -1) 4px; }
  .ld-stat__value { font-size: 48px; }
  .ld-fab { right: 16px; bottom: 84px; padding: 0; width: 56px; justify-content: center; }
  .ld-fab__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
@media (prefers-reduced-motion: reduce) {
  .ld-root *, .ld-btn, .ld-card, .ld-fab, .ld-reveal { transition: none !important; animation: none !important; }
  .ld-reveal { opacity: 1; transform: none; }
  .ld-btn:hover, .ld-card--link:hover { transform: none; }
}
