/* Composants du site Balise Psy. Toutes les couleurs passent par les tokens
   de theme.css, pour rester cohérent en thème clair comme sombre. */

body { background: var(--bp-bg); color: var(--bp-ink); font-family: var(--bp-sans); }
h1, h2, h3 { font-family: var(--bp-serif); font-weight: 600; text-wrap: balance; letter-spacing: -.01em; }

/* ---------- Barre de navigation ---------- */
.bp-nav {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bp-bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--bp-border);
}
.bp-nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 18px; height: 72px; }
.bp-logo { display: flex; align-items: center; gap: 11px; font-family: var(--bp-serif); font-size: 1.28rem; font-weight: 600; text-decoration: none; color: var(--bp-ink); }
.bp-logo .mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--bp-anchor); flex: none; }
.bp-logo small { display: block; font-family: var(--bp-sans); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--bp-muted); font-weight: 600; }
.bp-nav .right { display: flex; align-items: center; gap: 20px; }
.bp-links { display: flex; gap: 24px; align-items: center; font-size: .92rem; }
.bp-links a { text-decoration: none; color: var(--bp-ink); opacity: .82; }
.bp-links a:hover { opacity: 1; color: var(--bp-lien); }
@media (max-width: 980px) { .bp-links, .bp-nav .btn-primary.nav-adhere { display: none; } }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 600; font-size: .92rem; text-decoration: none; cursor: pointer; border-radius: 999px; padding: 11px 20px; border: 1px solid transparent; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--bp-accent); color: #33230a; box-shadow: 0 6px 18px -8px var(--bp-accent); }
.btn-primary:hover { box-shadow: 0 10px 24px -8px var(--bp-accent); }
.btn-ghost { background: transparent; border-color: var(--bp-border); color: var(--bp-ink); }
.btn-ghost:hover { border-color: var(--bp-lien); }

/* ---------- Hero ---------- */
.bp-hero { position: relative; overflow: hidden; }
.bp-hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding-top: 76px; padding-bottom: 84px; }
.bp-hero .eyebrow { color: var(--bp-green); }
.bp-hero h1 { font-size: clamp(2.5rem, 5.2vw, 4.1rem); line-height: 1.02; margin: 16px 0 20px; }
.bp-hero p.lead { font-size: 1.12rem; line-height: 1.62; color: var(--bp-muted); max-width: 46ch; margin: 0 0 28px; }
.bp-hero .cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.bp-hero .meta { margin-top: 26px; font-size: .84rem; color: var(--bp-muted); display: flex; gap: 18px; flex-wrap: wrap; }
.bp-hero .meta b { color: var(--bp-ink); font-weight: 600; }
@media (max-width: 820px) { .bp-hero .wrap { grid-template-columns: 1fr; gap: 8px; } .bp-hero-phare { max-width: 280px; margin: 6px auto 0; } }

.bp-hero-phare { position: relative; aspect-ratio: 1; display: grid; place-items: center; }
.bp-hero-phare svg { position: relative; width: 84%; height: auto; }

/* ---------- Bande de repères ---------- */
.bp-stats { border-top: 1px solid var(--bp-border); border-bottom: 1px solid var(--bp-border); background: var(--bp-surface-2); }
.bp-stats .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; padding: 40px 24px; }
.bp-stat .n { font-family: var(--bp-serif); font-size: clamp(2.2rem, 4vw, 3rem); color: var(--bp-lien); line-height: 1; font-variant-numeric: tabular-nums; }
.bp-stat .l { margin-top: 10px; color: var(--bp-muted); font-size: .95rem; line-height: 1.45; max-width: 30ch; }
@media (max-width: 720px) { .bp-stats .wrap { grid-template-columns: 1fr; gap: 22px; } }

/* ---------- Sections génériques ---------- */
.bp-section { padding: 84px 0; }
.bp-section .head { max-width: 60ch; margin-bottom: 44px; }
.bp-section .head .eyebrow { color: var(--bp-accent); }
.bp-section h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); line-height: 1.08; margin: 12px 0 14px; }
.bp-section .head p { color: var(--bp-muted); font-size: 1.06rem; line-height: 1.6; margin: 0; }

/* ---------- Pôles ---------- */
.bp-poles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 720px) { .bp-poles { grid-template-columns: 1fr; } }
.bp-pole { background: var(--bp-surface); border: 1px solid var(--bp-border); border-radius: var(--r); padding: 28px; display: flex; flex-direction: column; gap: 12px; transition: transform .18s, box-shadow .18s; }
.bp-pole:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -26px rgba(14, 58, 67, .4); }
.bp-pole .idx { display: inline-flex; align-items: center; gap: 9px; font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; color: var(--bp-green); }
.bp-pole .idx i { width: 26px; height: 2px; background: var(--bp-green); border-radius: 2px; font-style: normal; }
.bp-pole h3 { font-size: 1.42rem; margin: 2px 0 0; }
.bp-pole .role { font-family: var(--bp-serif); font-style: italic; color: var(--bp-accent); font-size: 1.02rem; margin-top: -4px; }
.bp-pole p { color: var(--bp-muted); line-height: 1.6; margin: 0; font-size: .98rem; }

/* ---------- Actus ---------- */
.bp-actus { background: var(--bp-surface-2); border-top: 1px solid var(--bp-border); }
.bp-actus-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 820px) { .bp-actus-grid { grid-template-columns: 1fr; } }
.bp-card { background: var(--bp-surface); border: 1px solid var(--bp-border); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.bp-card .thumb { height: 128px; background: linear-gradient(135deg, var(--bp-anchor), var(--bp-green)); position: relative; }
.bp-card:nth-child(2) .thumb { background: linear-gradient(135deg, var(--bp-accent), #c76b1f); }
.bp-card:nth-child(3) .thumb { background: linear-gradient(135deg, var(--bp-green), var(--bp-anchor)); }
.bp-card .thumb span { position: absolute; left: 14px; bottom: 12px; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: #fff; opacity: .92; }
.bp-card .body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.bp-card .date { font-size: .78rem; color: var(--bp-muted); font-weight: 600; }
.bp-card h3 { font-size: 1.18rem; margin: 0; }
.bp-card p { color: var(--bp-muted); font-size: .92rem; line-height: 1.55; margin: 0; flex: 1; }
.bp-card a.more { font-size: .86rem; font-weight: 600; color: var(--bp-lien); text-decoration: none; }
.bp-card a.more:hover { color: var(--bp-accent); }

/* ---------- Bloc adhérer ---------- */
.bp-adhere { padding-bottom: 84px; }
.bp-adhere .wrap { background: var(--bp-anchor); color: var(--bp-anchor-ink); border-radius: 22px; padding: 52px; display: grid; grid-template-columns: 1.3fr .7fr; gap: 30px; align-items: center; }
.bp-adhere h2 { color: #fff; font-size: clamp(1.7rem, 3vw, 2.4rem); margin: 0 0 12px; }
.bp-adhere p { margin: 0; opacity: .85; line-height: 1.6; }
.bp-adhere .cta-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.bp-adhere .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
@media (max-width: 720px) { .bp-adhere .wrap { grid-template-columns: 1fr; padding: 34px; } .bp-adhere .cta-row { justify-content: flex-start; } }

/* ---------- Pied de page ---------- */
.bp-foot { background: var(--bp-anchor); color: var(--bp-anchor-ink); }
.bp-foot .wrap { padding: 60px 24px 30px; }
.bp-foot .top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; padding-bottom: 34px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
@media (max-width: 720px) { .bp-foot .top { grid-template-columns: 1fr; gap: 24px; } }
.bp-foot h4 { font-family: var(--bp-sans); text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; opacity: .7; margin: 0 0 14px; font-weight: 700; }
.bp-foot p, .bp-foot li { opacity: .88; line-height: 1.7; font-size: .93rem; }
.bp-foot ul { list-style: none; margin: 0; padding: 0; }
.bp-foot a { text-decoration: none; }
.bp-foot a:hover { color: var(--bp-accent); }
.bp-partners { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.bp-partners span { font-size: .72rem; padding: 5px 10px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; opacity: .8; }
.bp-foot .legal { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 22px; font-size: .8rem; opacity: .65; }

/* ---------- Pages intérieures ---------- */
.bp-pagehead { background: var(--bp-surface-2); border-bottom: 1px solid var(--bp-border); }
.bp-pagehead .wrap { padding: 64px 24px 54px; }
.bp-pagehead .eyebrow { color: var(--bp-accent); }
.bp-pagehead h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); line-height: 1.04; margin: 12px 0 14px; max-width: 22ch; }
.bp-pagehead p { color: var(--bp-muted); font-size: 1.1rem; line-height: 1.6; max-width: 58ch; margin: 0; }

.bp-prose { padding: 64px 0; }
.bp-prose .wrap { max-width: 760px; }
.bp-prose h2 { font-size: 1.7rem; margin: 42px 0 12px; }
.bp-prose > .wrap > :first-child { margin-top: 0; }
.bp-prose h3 { font-size: 1.2rem; margin: 26px 0 8px; }
.bp-prose p, .bp-prose li { color: var(--bp-ink); line-height: 1.7; font-size: 1.02rem; }
.bp-prose p { margin: 0 0 16px; }
.bp-prose .muted { color: var(--bp-muted); }
.bp-prose ul { padding-left: 1.2em; margin: 0 0 16px; }
.bp-prose li { margin-bottom: 6px; }
/* `:not(.btn)` est indispensable : sans lui, cette règle (plus spécifique que
   `.btn-primary`) repeint le texte des boutons insérés dans le contenu avec la
   couleur des liens — le bouton ne ressemble plus aux autres du site.
   Signalé par Mike sur la page Adhérer, 2026-08-24. */
.bp-prose a:not(.btn) { color: var(--bp-lien); text-decoration: underline; text-underline-offset: 2px; }
.bp-prose a:not(.btn):hover { color: var(--bp-accent); }

.bp-callout { background: var(--bp-surface); border: 1px solid var(--bp-border); border-left: 4px solid var(--bp-accent); border-radius: 12px; padding: 20px 22px; margin: 0 0 24px; }
.bp-callout p:last-child { margin-bottom: 0; }

.bp-def { display: grid; grid-template-columns: auto 1fr; gap: 8px 22px; margin: 8px 0 24px; }
.bp-def dt { font-weight: 600; color: var(--bp-ink); }
.bp-def dd { margin: 0; color: var(--bp-muted); }

.bp-form { display: grid; gap: 16px; max-width: 560px; margin-top: 28px; }
.bp-field { display: grid; gap: 6px; }
.bp-field label { font-weight: 600; font-size: .9rem; }
.bp-field input, .bp-field textarea { font: inherit; padding: 12px 14px; border: 1px solid var(--bp-border); border-radius: 10px; background: var(--bp-surface); color: var(--bp-ink); }
.bp-field textarea { min-height: 130px; resize: vertical; }
.bp-consent { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--bp-muted); }
.bp-note { font-size: .85rem; color: var(--bp-muted); margin-top: 6px; }

/* ---------- Bandeau maquette ----------
   Affiché tant que PUBLIC_ALLOW_INDEX n'est pas défini au build (cf. Base.astro).
   Volontairement contrastant : il ne doit pas être pris pour un élément du site. */
.draft-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .4rem;
  padding: .6rem 1rem;
  background: var(--bp-accent);
  color: #1c1305;
  font-family: var(--bp-sans, system-ui, sans-serif);
  font-size: .88rem;
  line-height: 1.35;
  text-align: center;
  border-bottom: 2px solid #1c1305;
}
.draft-banner strong {
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 800;
}
.draft-banner-tag { font-size: 1.05em; }

.bp-contact-direct { margin-top: 28px; }
.bp-contact-direct .courriel-bouton { cursor: pointer; text-decoration: none; display: inline-block; }

/* Carte entièrement cliquable — le seul lien reste « En savoir plus → » (un
   lien, un libellé lisible par les lecteurs d'écran) ; son ::after recouvre la
   carte. Les liens du résumé passent au-dessus pour rester cliquables. */
.bp-card-cliquable { position: relative; transition: transform .15s, box-shadow .15s; }
.bp-card-cliquable .more::after { content: ""; position: absolute; inset: 0; }
.bp-card-cliquable .body p a { position: relative; z-index: 1; }
.bp-card-cliquable:hover, .bp-card-cliquable:focus-within { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, .08); }
.bp-card-cliquable:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.bp-card-cliquable:focus-within { outline: 3px solid var(--bp-accent); outline-offset: 2px; }
.bp-card-cliquable .more:focus-visible { outline: none; }
