/* ==========================================================================
   Invassist — pages institutionnelles : Mentions légales, CGV, CGU, FAQ
   Réutilise base.css (variables, grille, .section, .seg). Lecture confortable :
   Hero compact, fond clair mat, colonne de texte limitée, sommaire des articles.
   ========================================================================== */

/* ---------------------------------------------------------------------------
   Hero compact
   --------------------------------------------------------------------------- */
.legal-hero { position: relative; background: var(--bg-dark); color: var(--text-light); overflow: hidden; }
.legal-hero__inner { position: relative; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.legal-hero__line { position: absolute; top: 0; bottom: 0; left: var(--line-x); width: 2px; background: var(--accent-red); transform-origin: 50% 0; }
.legal-hero__copy {
	padding-left: var(--indent); max-width: calc(var(--indent) + 980px);
	padding-top: calc(var(--header-h) + clamp(40px, 7vh, 72px) + var(--admin-offset)); padding-bottom: clamp(48px, 8vh, 80px);
}
.legal-hero__eyebrow {
	display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 0 0 clamp(18px, 2.8vh, 26px);
	font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--text-light);
}
.legal-hero__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-red-on-dark); box-shadow: 0 0 0 4px rgba(239, 74, 78, .18); }
.legal-hero__count { color: var(--dark-muted); }
.legal-hero__title { margin: 0; font-weight: 600; font-size: clamp(36px, 4.6vw, 68px); line-height: 1; letter-spacing: -.045em; color: var(--white); text-wrap: balance; }
.legal-hero__sub { max-width: 44em; margin: clamp(16px, 2.4vh, 22px) 0 0; font-size: clamp(15px, 1.2vw, 18px); line-height: 1.5; color: var(--dark-body); text-wrap: pretty; }

/* ---------------------------------------------------------------------------
   Corps : sommaire + document
   --------------------------------------------------------------------------- */
.legal-body__inner { padding-top: clamp(48px, 8vh, 88px); padding-bottom: clamp(80px, 12vh, 140px); }
.legal-body__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
@media (min-width: 1100px) {
	.legal-body__grid { grid-template-columns: minmax(220px, 280px) minmax(0, 760px); gap: clamp(48px, 5vw, 96px); align-items: start; }
}

/* Sommaire */
.legal-toc { min-width: 0; }
@media (min-width: 1100px) {
	.legal-toc { position: sticky; top: calc(var(--header-h) + 20px + var(--admin-offset)); max-height: calc(100vh - var(--header-h) - 40px - var(--admin-offset)); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
}
.legal-toc__box { border-top: 2px solid var(--accent-red); background: var(--plate); }
.legal-toc__summary {
	display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 12px 18px;
	font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dark);
	cursor: pointer; list-style: none;
}
.legal-toc__summary::-webkit-details-marker { display: none; }
.legal-toc__summary::after {
	content: ''; flex: none; width: 8px; height: 8px; margin-left: 4px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
	transform: translateY(-2px) rotate(45deg); transition: transform .3s var(--ease-out);
}
.legal-toc__box[open] > .legal-toc__summary::after { transform: translateY(2px) rotate(-135deg); }
.legal-toc__count { margin-left: auto; color: var(--text-soft); }
.legal-toc__summary:focus-visible { outline: 2px solid var(--accent-red); outline-offset: -2px; }
.legal-toc__list { list-style: none; margin: 0; padding: 4px 0 12px; }
.legal-toc__list a {
	position: relative; display: block; padding: 7px 18px 7px 20px; font-size: 14px; line-height: 1.35; color: var(--text-muted);
	transition: color .25s;
}
.legal-toc__list a::before {
	content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; background: var(--accent-red);
	transform: scaleY(0); transform-origin: 50% 0; transition: transform .35s var(--ease-out);
}
.legal-toc__list a:hover { color: var(--text-dark); }
.legal-toc__list a.is-current { color: var(--text-dark); font-weight: 500; }
.legal-toc__list a.is-current::before { transform: scaleY(1); }
.legal-toc__list a:focus-visible { outline: 2px solid var(--accent-red); outline-offset: -2px; }
/* Grand écran : sommaire toujours déplié (le résumé reste un simple intitulé). */
@media (min-width: 1100px) {
	.legal-toc--desk .legal-toc__summary { cursor: default; }
	.legal-toc--desk .legal-toc__summary::after { display: none; }
}

/* Document */
.legal-doc { min-width: 0; max-width: 760px; font-size: 17px; line-height: 1.7; color: var(--text-body); overflow-wrap: anywhere; }
.legal-doc p { margin: 0 0 1em; }
.legal-doc strong { font-weight: 600; color: var(--text-dark); }
.legal-doc a { color: var(--text-dark); text-decoration: underline; text-decoration-color: var(--accent-red); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .25s; }
.legal-doc a:hover { color: var(--accent-red); }
.legal-doc a:focus-visible { outline: 2px solid var(--accent-red); outline-offset: 2px; }
.legal-doc__h2 {
	position: relative; margin: 2.4em 0 .8em; padding-top: 1.1em; border-top: 1px solid var(--line);
	font-size: clamp(21px, 1.8vw, 26px); font-weight: 600; line-height: 1.2; letter-spacing: -.02em; color: var(--text-dark);
	scroll-margin-top: calc(var(--header-h) + 24px + var(--admin-offset));
}
.legal-doc__h2::before { content: ''; position: absolute; left: 0; top: -1px; width: 40px; height: 2px; background: var(--accent-red); }
.legal-doc > .legal-doc__h2:first-child { margin-top: 0; }
.legal-doc__h3 { margin: 1.8em 0 .6em; font-size: 18px; font-weight: 600; line-height: 1.35; letter-spacing: -.01em; color: var(--text-dark); }
.legal-doc__list { margin: 0 0 1.1em; padding: 0; list-style: none; }
.legal-doc__list li { position: relative; margin: 0 0 .45em; padding-left: 22px; }
.legal-doc__list li::before { content: ''; position: absolute; left: 2px; top: .8em; width: 8px; height: 2px; background: var(--accent-red); }
.legal-doc__top { margin: 3em 0 0; padding-top: 1.4em; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.legal-doc__top a { text-decoration: none; color: var(--text-muted); }
.legal-doc__top a:hover { color: var(--text-dark); }

/* ---------------------------------------------------------------------------
   FAQ : accordéons
   --------------------------------------------------------------------------- */
.faq { max-width: 900px; border-top: 1px solid var(--line-strong); }
.faq__item { border-bottom: 1px solid var(--line-strong); }
.faq__q { margin: 0; font-size: inherit; font-weight: inherit; }
.faq__btn {
	--fq: 0; display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); width: 100%; min-height: 72px; padding: 20px 0;
	border: 0; background: none; color: var(--text-dark); font: inherit; text-align: left; cursor: pointer;
}
.faq__num { flex: none; width: 2.2em; font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .08em; color: var(--accent-red); }
.faq__label { flex: 1; min-width: 0; font-size: clamp(18px, 1.6vw, 23px); font-weight: 600; line-height: 1.3; letter-spacing: -.02em; transition: color .25s; text-wrap: pretty; }
.faq__icon { position: relative; flex: none; width: 40px; height: 40px; border: 1px solid var(--line-strong); border-radius: 50%; transition: background-color .3s, border-color .3s; }
.faq__icon::before, .faq__icon::after { content: ''; position: absolute; left: 50%; top: 50%; width: 14px; height: 1.5px; margin: -.75px 0 0 -7px; background: currentColor; transition: transform .35s var(--ease-out); }
.faq__icon::after { transform: rotate(90deg); }
.faq__btn[aria-expanded="true"] .faq__icon { background: var(--accent-red); border-color: var(--accent-red); color: var(--white); }
.faq__btn[aria-expanded="true"] .faq__icon::after { transform: rotate(0deg); }
.faq__btn:hover .faq__label { color: var(--accent-red); }
.faq__btn:hover .faq__icon { border-color: var(--accent-red); }
.faq__btn:focus-visible { outline: 2px solid var(--accent-red); outline-offset: 4px; }
.faq__a { overflow: hidden; }
.faq__a[hidden] { display: none; }
.faq__a-inner { padding: 0 calc(40px + clamp(14px, 2vw, 28px)) 26px calc(2.2em * 12 / 17 + clamp(14px, 2vw, 28px)); max-width: none; }
.faq__a-inner > :last-child { margin-bottom: 0; }

@media (max-width: 600px) {
	.legal-doc { font-size: 16px; line-height: 1.65; }
	.faq__btn { gap: 12px; min-height: 64px; padding: 16px 0; }
	.faq__num { width: auto; }
	.faq__icon { width: 34px; height: 34px; }
	.faq__a-inner { padding: 0 0 22px; }
}
