/* ========================================================================
   Lockpit — pages de contenu : blog et articles, FAQ, plan du site, pages
   légales, 404, et l'en-tête de la page d'analyse.
   ------------------------------------------------------------------------
   Le balisage de ces pages est sémantique et n'a pas bougé : cette feuille
   lui donne l'échelle et la matière de l'accueil. Le socle (lockpit.css)
   fournit la barre, le menu, les sections, les boutons et le pied de page.
   ======================================================================== */

body {
  --accent: var(--blue);
  --soft: #e9eeff;
}

/* ---------- EN-TÊTE DE PAGE : titre éditorial, révélé à l'arrivée ---------- */
.legal-hero {
  position: relative;
  padding-top: 56px;
  padding-bottom: 40px;
  overflow: clip;
}
.legal-hero::before {
  content: "";
  position: absolute;
  right: -10%;
  top: -40%;
  width: 55%;
  height: 130%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(53, 108, 244, 0.2), rgba(53, 108, 244, 0.05) 55%, transparent 75%);
  filter: blur(30px);
  pointer-events: none;
}
.legal-hero-inner {
  position: relative;
  max-width: 820px;
  margin: 0;
}
.legal-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 22px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  font: 500 11px "DM Sans";
  letter-spacing: 0.16em;
  text-transform: uppercase;
  animation: monte-doc 0.9s var(--ressort) both;
}
.legal-hero .eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}
.legal-hero h1 {
  margin: 0 0 22px;
  max-width: 12em;
  font: 700 clamp(40px, 5.6vw, 76px) / 0.96 "Bricolage Grotesque";
  letter-spacing: -0.05em;
  text-wrap: balance;
  animation: monte-doc 1s var(--ressort) 0.08s both;
}
.legal-hero-lead {
  max-width: 34em;
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.5;
  animation: monte-doc 1s var(--ressort) 0.18s both;
}
.legal-hero-lead + .legal-hero-lead {
  margin-top: 12px;
}
@keyframes monte-doc {
  from {
    opacity: 0;
    transform: translateY(24px);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}
.legal-hero + .section {
  padding-top: 24px;
}
.section-tone-sky,
.section-tone-sun {
  background: transparent;
}
.sun-shape {
  display: none !important;
}

/* Boutons hérités de la 404 : pilule encre, pilule blanche. */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
  animation: monte-doc 1s var(--ressort) 0.28s both;
}
.hero-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  text-decoration: none;
  font: 600 16px "DM Sans";
  transition: background 0.5s var(--ressort), transform 0.5s var(--ressort), color 0.5s var(--ressort);
}
.hero-actions .btn-primary {
  color: var(--paper);
  background: var(--ink);
}
.hero-actions .btn-primary:hover {
  background: var(--blue);
}
.hero-actions .btn-soft {
  color: var(--ink);
  background: white;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.12);
}
.hero-actions .btn-soft:hover {
  box-shadow: inset 0 0 0 1px var(--ink);
}
.hero-actions .btn:active {
  transform: scale(0.98);
}

/* ---------- CORPS DE DOCUMENT : légales, plan du site ---------- */
.legal-content {
  max-width: 820px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.legal-section {
  padding-top: 26px;
  border-top: 1px solid rgba(17, 24, 39, 0.12);
}
.legal-section h2 {
  margin: 0 0 14px;
  font: 700 clamp(24px, 2.4vw, 32px) / 1.08 "Bricolage Grotesque";
  letter-spacing: -0.035em;
}
.legal-section h3 {
  margin: 22px 0 8px;
  font: 700 19px "Bricolage Grotesque";
  letter-spacing: -0.02em;
}
.legal-section p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}
.legal-section p:last-child {
  margin-bottom: 0;
}
.legal-section a,
.legal-list a,
.article a,
.faq-a a,
.intro a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  background: linear-gradient(rgba(53, 108, 244, 0.35), rgba(53, 108, 244, 0.35)) no-repeat 0 100% / 100% 1px;
  transition: background-size 0.4s var(--ressort), color 0.4s var(--ressort);
}
.legal-section a:hover,
.legal-list a:hover,
.article a:hover,
.faq-a a:hover,
.intro a:hover {
  color: var(--blue);
  background-size: 100% 2px;
}
.legal-section ul:not(.legal-list) {
  margin: 0 0 12px;
  padding-left: 20px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}
.legal-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.legal-list li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}
.legal-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(53, 108, 244, 0.14);
}
.legal-list strong {
  color: var(--ink);
  font-weight: 600;
}
.section > .intro {
  max-width: 820px;
  margin: 0;
}
.intro p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.55;
}

/* ---------- INDEX DU BLOG : des cartes qui se soulèvent ---------- */
.blog-list {
  display: grid;
  gap: 18px;
  max-width: none;
  margin: 0;
}
.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 32px 72px 30px 32px;
  border-radius: 30px;
  background: white;
  color: var(--ink);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.06), var(--ombre-douce);
  transition: transform 0.7s var(--ressort), box-shadow 0.7s var(--ressort);
}
.post-card:hover {
  transform: translateY(-6px);
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.08), var(--ombre-portee);
}
.post-card::after {
  content: "→";
  position: absolute;
  right: 24px;
  top: 24px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.06);
  font-size: 18px;
  transition: background 0.5s var(--ressort), color 0.5s var(--ressort), transform 0.5s var(--ressort);
}
.post-card:hover::after {
  background: var(--ink);
  color: var(--paper);
  transform: rotate(-45deg);
}
.post-card h2 {
  margin: 4px 0 0;
  max-width: 14em;
  font: 700 clamp(26px, 2.8vw, 36px) / 1.02 "Bricolage Grotesque";
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.post-card p {
  margin: 0;
  max-width: 34em;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}
.post-meta {
  color: var(--blue-texte);
  font: 600 11px "JetBrains Mono";
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.post-more {
  margin-top: 8px;
  color: var(--ink);
  font: 600 15px "DM Sans";
}
.blog-empty {
  color: var(--muted);
}

/* ---------- ARTICLE : une colonne de lecture large et calme ---------- */
.article {
  max-width: 760px;
  margin: 0;
}
.article .crumb {
  margin: 0 0 28px;
  color: var(--muted);
  font: 500 13px "DM Sans";
}
.article .crumb a {
  color: var(--muted);
  font-weight: 500;
  background: none;
}
.article .crumb a:hover {
  color: var(--blue);
}
.article .lead {
  margin: 0 0 32px;
  color: var(--ink);
  font: 500 clamp(19px, 1.7vw, 23px) / 1.5 "Bricolage Grotesque";
  letter-spacing: -0.015em;
}
.article h2 {
  margin: 56px 0 16px;
  font: 700 clamp(28px, 3vw, 40px) / 1.04 "Bricolage Grotesque";
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.article h3 {
  margin: 32px 0 10px;
  font: 700 22px / 1.15 "Bricolage Grotesque";
  letter-spacing: -0.025em;
}
.article p,
.article li {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}
.article p {
  margin: 0 0 18px;
}
.article ul {
  margin: 0 0 20px;
  padding-left: 22px;
}
.article li {
  margin-bottom: 10px;
}
.article strong {
  color: var(--ink);
  font-weight: 600;
}
.callout {
  margin: 32px 0;
  padding: 24px 26px;
  border-radius: 22px;
  background: white;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.06), var(--ombre-douce);
  border-left: 4px solid var(--blue);
}
.callout p {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
}
.ptable-wrap {
  margin: 28px 0;
  overflow-x: auto;
  border-radius: 22px;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.08), var(--ombre-douce);
}
.ptable {
  width: 100%;
  border-collapse: collapse;
  background: white;
  font-size: 16px;
}
.ptable th,
.ptable td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  line-height: 1.5;
}
.ptable tr:last-child td {
  border-bottom: 0;
}
.ptable th {
  color: var(--muted);
  font: 600 11px "JetBrains Mono";
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--paper);
}
.ptable td {
  color: var(--muted);
}
.ptable td:first-child {
  color: var(--ink);
  font-weight: 600;
}

/* L'appel en fin d'article ou de FAQ : encre, arrondi, bouton pilule. */
.art-cta,
.faq-cta-box {
  max-width: 760px;
  margin: 56px 0 0;
  padding: 44px 36px;
  border-radius: 30px;
  text-align: left;
  color: var(--paper);
  background: var(--ink);
}
.art-cta h2,
.faq-cta-box h2 {
  margin: 0;
  max-width: 12em;
  font: 700 clamp(28px, 3.2vw, 44px) / 1.02 "Bricolage Grotesque";
  letter-spacing: -0.04em;
}
.art-cta p,
.faq-cta-box p {
  margin: 16px 0 26px;
  max-width: 30em;
  color: rgba(248, 246, 241, 0.65);
  font-size: 17px;
  line-height: 1.55;
}
.art-cta .btn,
.faq-cta-box .btn,
.art-cta a:not(.btn),
.faq-cta-box a:not(.btn) {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font: 600 16px "DM Sans";
  transition: background 0.5s var(--ressort), transform 0.5s var(--ressort);
}
.art-cta a:hover,
.faq-cta-box a:hover {
  background: white;
}
.art-cta a:active,
.faq-cta-box a:active {
  transform: scale(0.98);
}

/* ---------- FAQ : des groupes, des questions qui s'ouvrent ---------- */
.faq-groups {
  max-width: 820px;
  margin: 0;
  display: grid;
  gap: 64px;
}
.faq-group h2 {
  margin: 0 0 8px;
  font: 700 clamp(28px, 3vw, 40px) / 1.04 "Bricolage Grotesque";
  letter-spacing: -0.04em;
}
.faq-group h2 .fg-eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--blue-texte);
  font: 600 11px "JetBrains Mono";
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.faq-i {
  border-top: 1px solid rgba(17, 24, 39, 0.12);
}
.faq-i:last-child {
  border-bottom: 1px solid rgba(17, 24, 39, 0.12);
}
.faq-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 0;
  cursor: pointer;
  list-style: none;
}
.faq-h::-webkit-details-marker {
  display: none;
}
.faq-h h3 {
  margin: 0;
  font: 700 clamp(19px, 1.8vw, 24px) / 1.25 "Bricolage Grotesque";
  letter-spacing: -0.03em;
  transition: color 0.4s var(--ressort);
}
.faq-h:hover h3 {
  color: var(--blue);
}
.faq-chev {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.06);
  color: var(--ink);
  font-size: 16px;
  transition: transform 0.5s var(--ressort), background 0.5s var(--ressort), color 0.5s var(--ressort);
}
details[open] .faq-chev {
  transform: rotate(180deg);
  background: var(--ink);
  color: var(--paper);
}
.faq-a {
  margin: -6px 0 24px;
  max-width: 36em;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}
.faq-cta {
  max-width: 820px;
  margin: 0;
}

/* ---------- Réactif ---------- */
@media (min-width: 700px) {
  .legal-hero {
    padding-top: 72px;
    padding-bottom: 56px;
  }
  .blog-list {
    grid-template-columns: 1fr 1fr;
  }
  .post-card {
    padding: 40px 80px 38px 40px;
    min-height: 300px;
    justify-content: flex-end;
  }
  .post-meta {
    margin-bottom: auto;
  }
  .art-cta,
  .faq-cta-box {
    padding: 56px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .legal-hero .eyebrow,
  .legal-hero h1,
  .legal-hero-lead,
  .hero-actions {
    animation: none;
  }
  .post-card,
  .post-card::after,
  .faq-chev,
  .faq-h h3 {
    transition: none;
  }
}

/* Le plan du site : les listes de communes se lisent sur deux colonnes. */
.plan .legal-section ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px 32px;
}
.plan .legal-section li {
  position: relative;
  padding-left: 22px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}
.plan .legal-section li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(53, 108, 244, 0.14);
}
@media (min-width: 700px) {
  .plan .legal-section ul {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- Tout au centre : l'en-tête et la colonne de lecture ---------- */
.legal-hero-inner {
  margin: 0 auto;
  text-align: center;
}
.legal-hero h1,
.legal-hero-lead {
  margin-left: auto;
  margin-right: auto;
}
.legal-hero::before {
  right: auto;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
}
.hero-actions {
  justify-content: center;
}
.legal-content,
.faq-groups,
.faq-cta,
.article,
.art-cta,
.faq-cta-box,
.section > .intro {
  margin-left: auto;
  margin-right: auto;
}
.faq-group h2,
.faq-group h2 .fg-eyebrow {
  text-align: center;
}
.faq-a {
  max-width: none;
}
.art-cta,
.faq-cta-box {
  text-align: center;
}
.art-cta h2,
.faq-cta-box h2,
.art-cta p,
.faq-cta-box p {
  margin-left: auto;
  margin-right: auto;
}
.blog-list {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

/* La 404 : au milieu de l'écran. */
.page-404 {
  min-height: calc(100dvh - 96px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.page-404 .legal-hero::before {
  display: none;
}

/* ---------- Les couvertures des articles ---------- */
.post-card .post-cover {
  display: block;
  width: calc(100% + 104px);
  height: auto;
  margin: -32px -72px 14px -32px;
  border-radius: 30px 30px 0 0;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.post-card.avec-image::after {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 10px 30px -10px rgba(17, 24, 39, 0.4);
}
.post-card.avec-image:hover::after {
  background: var(--ink);
}
.article-cover {
  --rayon: 30px;
  --bord: 8px;
  max-width: 1000px;
  margin: 8px auto 56px;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.07), var(--ombre-portee);
  animation: monte-doc 1s var(--ressort) 0.3s both;
}
.article-cover .coeur img {
  display: block;
  width: 100%;
  height: auto;
}
@media (min-width: 700px) {
  .post-card .post-cover {
    width: calc(100% + 120px);
    margin: -40px -80px 18px -40px;
  }
  .post-card.avec-image {
    justify-content: flex-start;
  }
  .post-card.avec-image .post-meta {
    margin-bottom: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .article-cover {
    animation: none;
  }
}

/* Les blocs posés directement dans <main> (FAQ, blog) gardent une marge
   latérale sur téléphone, comme les sections. */
.faq-groups,
.faq-cta {
  width: min(100%, 860px);
  padding: 0 20px;
  box-sizing: border-box;
}
.blog-list {
  width: min(100%, 1140px);
  padding: 0 20px;
  box-sizing: border-box;
}
.faq-cta {
  margin-top: 56px;
  margin-bottom: 56px;
}
@media (max-width: 699px) {
  .faq-groups {
    gap: 44px;
  }
  .legal-hero {
    padding-top: 40px;
    padding-bottom: 32px;
  }
  .article h2 {
    margin-top: 40px;
  }
  .art-cta,
  .faq-cta-box {
    padding: 36px 26px;
  }
}

/* Les en-têtes et corps posés directement dans <main> (article, blog, FAQ,
   plan du site) gardent la même marge latérale que les sections. */
.legal-hero {
  padding-left: 20px;
  padding-right: 20px;
}
main > .article,
main > .legal-content,
main > .art-cta {
  width: min(100%, 860px);
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}
main > .art-cta {
  width: min(100%, 800px);
  margin-bottom: 56px;
}
main > .article-cover {
  width: min(100% - 40px, 1000px);
}
