/* ============================================================================
   SONCRUSH — AIDE & LÉGAL (premium)
   Héro de marque + sommaire collant (scroll-spy) + sections numérotées +
   tableaux premium + navigation croisée. Entièrement responsive.
   Chargé uniquement sur : confidentialité, CGU, cookies, contact.
   ============================================================================ */

html:has(.lg) { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html:has(.lg) { scroll-behavior: auto; } }
.lg { color: var(--sc-white); --lg-accent: var(--sc-gold); --lg-accent-light: var(--sc-gold-light); }

/* ---------- HÉRO ---------- */
.lg-hero {
  position: relative; overflow: hidden; text-align: center;
  padding: calc(env(safe-area-inset-top) + 64px) var(--sp-4) 40px;
  background:
    radial-gradient(130% 150% at 50% -30%, rgba(212,175,55,.16), transparent 58%),
    linear-gradient(180deg, var(--sc-black-2), var(--sc-black));
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.lg-hero__back {
  position: absolute; z-index: 3;
  top: calc(env(safe-area-inset-top) + 14px); left: 14px;
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px;
  border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  color: var(--sc-white); text-decoration: none; font-size: .88rem; backdrop-filter: blur(8px);
}
.lg-hero__back:active { transform: scale(.95); }
.lg-hero__icon {
  width: 68px; height: 68px; margin: 0 auto var(--sp-4); border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, rgba(212,175,55,.24), rgba(212,175,55,.04));
  border: 1px solid rgba(212,175,55,.42); color: var(--lg-accent-light);
  box-shadow: 0 16px 44px -14px rgba(212,175,55,.5);
}
.lg-hero__icon svg { width: 32px; height: 32px; }
.lg-hero__eyebrow { text-transform: uppercase; letter-spacing: .22em; font-size: .7rem; color: var(--lg-accent-light); margin-bottom: 12px; }
.lg-hero__title {
  font-family: var(--font-title); font-weight: 600;
  font-size: clamp(1.9rem, 5.4vw, 2.9rem); line-height: 1.06; letter-spacing: -.01em;
  text-wrap: balance; margin: 0 auto 14px; max-width: 16ch;
}
.lg-hero__sub { max-width: 560px; margin: 0 auto; color: var(--sc-grey); line-height: 1.6; font-size: 1.02rem; }
.lg-hero__meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 20px; }
.lg-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px;
  font-size: .74rem; color: var(--sc-grey); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
}
.lg-chip svg { width: 13px; height: 13px; }
.lg-chip--gold { color: var(--lg-accent-light); border-color: rgba(212,175,55,.3); background: rgba(212,175,55,.08); }

/* ---------- CORPS (grille) ---------- */
.lg-body { max-width: 1080px; margin: 0 auto; padding: 36px var(--sp-4) 72px; display: grid; grid-template-columns: 1fr; gap: var(--sp-6); }
@media (min-width: 920px) {
  .lg-body { grid-template-columns: 250px minmax(0, 1fr); gap: 56px; align-items: start; }
}

/* ---------- SOMMAIRE collant (desktop) ---------- */
.lg-toc { display: none; }
@media (min-width: 920px) {
  .lg-toc { display: block; position: sticky; top: 24px; align-self: start; max-height: calc(100vh - 48px); overflow: auto; }
  .lg-toc::-webkit-scrollbar { width: 0; }
}
.lg-toc__title { text-transform: uppercase; letter-spacing: .16em; font-size: .68rem; color: var(--sc-grey); margin-bottom: 14px; padding-left: 15px; }
.lg-toc__nav { display: flex; flex-direction: column; border-left: 1px solid rgba(255,255,255,.09); }
.lg-toc__nav a {
  padding: 7px 15px; margin-left: -1px; color: var(--sc-grey); text-decoration: none;
  font-size: .84rem; line-height: 1.35; border-left: 2px solid transparent; transition: color .15s, border-color .15s;
}
.lg-toc__nav a:hover { color: var(--sc-white); }
.lg-toc__nav a.is-active { color: var(--lg-accent-light); border-left-color: var(--lg-accent); font-weight: 600; }

/* ---------- SOMMAIRE mobile (repliable) ---------- */
.lg-toc-m { border: 1px solid rgba(255,255,255,.1); border-radius: 16px; background: var(--sc-black-2); overflow: hidden; margin-bottom: var(--sp-2); }
@media (min-width: 920px) { .lg-toc-m { display: none; } }
.lg-toc-m > summary { list-style: none; cursor: pointer; padding: 15px 18px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lg-toc-m > summary::-webkit-details-marker { display: none; }
.lg-toc-m > summary::after { content: '⌄'; color: var(--sc-grey); font-size: 1.1rem; line-height: 1; transition: transform .2s; }
.lg-toc-m[open] > summary { border-bottom: 1px solid rgba(255,255,255,.08); }
.lg-toc-m[open] > summary::after { transform: rotate(180deg); }
.lg-toc-m nav { display: flex; flex-direction: column; padding: 6px; }
.lg-toc-m nav a { padding: 10px 12px; color: var(--sc-grey); text-decoration: none; font-size: .92rem; border-radius: 10px; }
.lg-toc-m nav a:active { background: rgba(255,255,255,.05); color: var(--sc-white); }

/* ---------- CONTENU ---------- */
.lg-content { min-width: 0; }
.lg-lead {
  font-size: 1.06rem; line-height: 1.7; color: var(--sc-white);
  padding: 20px 22px; border-radius: 18px; margin-bottom: var(--sp-8);
  background: linear-gradient(160deg, rgba(212,175,55,.08), rgba(255,255,255,.02));
  border: 1px solid rgba(212,175,55,.2);
}
.lg-content h2 {
  counter-increment: lgsec; scroll-margin-top: 88px;
  font-family: var(--font-title); font-weight: 600; font-size: 1.4rem; line-height: 1.22; color: var(--sc-white);
  margin: 40px 0 var(--sp-3); padding-top: 28px; border-top: 1px solid rgba(255,255,255,.07);
  display: flex; align-items: baseline; gap: 14px;
}
.lg-content.is-numbered h2::before {
  content: counter(lgsec, decimal-leading-zero); flex-shrink: 0;
  font-family: var(--font-body); font-size: .8rem; font-weight: 700; letter-spacing: .04em;
  color: var(--lg-accent-light); background: rgba(212,175,55,.12); border: 1px solid rgba(212,175,55,.3);
  border-radius: 8px; padding: 4px 8px; line-height: 1;
}
.lg-content { counter-reset: lgsec; }
.lg-content h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.lg-content p, .lg-content li { color: var(--sc-grey); line-height: 1.75; }
.lg-content p { margin-bottom: var(--sp-3); }
.lg-content strong { color: var(--sc-white); font-weight: 600; }
.lg-content ul { margin: 0 0 var(--sp-4); padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.lg-content ul li { position: relative; padding-left: 22px; }
.lg-content ul li::before { content: ''; position: absolute; left: 4px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--lg-accent); box-shadow: 0 0 0 3px rgba(212,175,55,.15); }
.lg-content a { color: var(--sc-rose-soft); text-decoration: none; border-bottom: 1px solid rgba(255,125,169,.32); transition: border-color .15s; }
.lg-content a:hover { border-bottom-color: currentColor; }

/* ---------- TABLEAUX premium ---------- */
.legal__table {
  width: 100%; border-collapse: separate; border-spacing: 0; margin: var(--sp-2) 0 var(--sp-6);
  border: 1px solid rgba(255,255,255,.1); border-radius: 14px; overflow: hidden;
}
.legal__table th, .legal__table td { text-align: left; padding: 12px 15px; vertical-align: top; line-height: 1.5; }
.legal__table th {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700;
  color: var(--lg-accent-light); background: rgba(212,175,55,.08); white-space: nowrap;
}
.legal__table td { font-size: .9rem; color: var(--sc-grey); border-top: 1px solid rgba(255,255,255,.07); }
.legal__table tbody tr:nth-child(even) td { background: rgba(255,255,255,.02); }
@media (max-width: 620px) {
  .legal__table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .legal__table th { white-space: nowrap; }
}

/* ---------- NAVIGATION CROISÉE ---------- */
.lg-cross { margin-top: 48px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,.08); }
.lg-cross__t { text-transform: uppercase; letter-spacing: .16em; font-size: .7rem; color: var(--sc-grey); margin-bottom: var(--sp-4); }
.lg-cross__grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.lg-cross__card {
  display: flex; align-items: center; gap: 13px; padding: 16px; border-radius: 16px;
  background: var(--sc-black-2); border: 1px solid rgba(255,255,255,.08);
  text-decoration: none; color: var(--sc-white); transition: border-color .15s, transform .15s;
}
.lg-cross__card:hover { border-color: rgba(212,175,55,.4); transform: translateY(-2px); }
.lg-cross__card.is-current { border-color: rgba(212,175,55,.4); background: rgba(212,175,55,.06); }
.lg-cross__ic { flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(212,175,55,.12); color: var(--lg-accent-light); }
.lg-cross__ic svg { width: 20px; height: 20px; }
.lg-cross__tx b { display: block; font-size: .95rem; font-weight: 600; }
.lg-cross__tx span { font-size: .78rem; color: var(--sc-grey); }

/* ============================================================================
   CONTACT — formulaire premium + panneau latéral
   ============================================================================ */
.ct2 { max-width: 1000px; margin: 0 auto; padding: 36px var(--sp-4) 72px; display: grid; grid-template-columns: 1fr; gap: var(--sp-6); }
@media (min-width: 860px) { .ct2 { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: start; } }

.ct2-card { background: var(--sc-black-2); border: 1px solid rgba(255,255,255,.08); border-radius: 22px; padding: 26px; box-shadow: 0 24px 60px -30px rgba(0,0,0,.8); }
.ct2-form { display: flex; flex-direction: column; gap: 16px; }
.ct2-form label { display: flex; flex-direction: column; gap: 7px; font-size: .82rem; font-weight: 600; color: var(--sc-white); }
.ct2-form .req { color: var(--sc-rose); margin-left: 2px; }
.ct2-form .input, .ct2-form .textarea, .ct2-form .select {
  width: 100%; box-sizing: border-box; background: var(--sc-black); border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px; padding: 12px 14px; color: var(--sc-white); font-size: .95rem; font-family: inherit; transition: border-color .15s, box-shadow .15s;
}
.ct2-form .input:focus, .ct2-form .textarea:focus, .ct2-form .select:focus { outline: none; border-color: var(--lg-accent); box-shadow: 0 0 0 3px rgba(212,175,55,.15); }
.ct2-form .textarea { resize: vertical; min-height: 130px; line-height: 1.55; }
.ct2-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .ct2-row { grid-template-columns: 1fr; } }
.ct2-form .btn { margin-top: 4px; }
.ct2-note { display: flex; align-items: flex-start; gap: 8px; color: var(--sc-grey); font-size: .82rem; margin-top: 16px; line-height: 1.5; }
.ct2-note svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; color: var(--lg-accent-light); }

.ct2-side { display: flex; flex-direction: column; gap: 14px; }
.ct2-panel { background: var(--sc-black-2); border: 1px solid rgba(255,255,255,.08); border-radius: 18px; padding: 20px; }
.ct2-panel__row { display: flex; align-items: center; gap: 13px; }
.ct2-panel__ic { flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: rgba(212,175,55,.12); color: var(--lg-accent-light); }
.ct2-panel__ic svg { width: 20px; height: 20px; }
.ct2-panel__lbl { font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--sc-grey); }
.ct2-panel__val { font-size: .98rem; font-weight: 600; color: var(--sc-white); }
.ct2-panel__val a { color: var(--lg-accent-light); text-decoration: none; }
.ct2-panel h3 { font-size: .95rem; margin-bottom: 6px; color: var(--sc-white); }
.ct2-panel p { font-size: .86rem; color: var(--sc-grey); line-height: 1.6; }
.ct2-links { display: flex; flex-direction: column; }
.ct2-links a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 2px; color: var(--sc-white); text-decoration: none; font-size: .92rem; border-top: 1px solid rgba(255,255,255,.07); }
.ct2-links a:first-child { border-top: 0; }
.ct2-links a span.arw { color: var(--sc-grey); }
.ct2-links a:hover span.arw { color: var(--lg-accent-light); }
