/* Portail Qastor : structure commune aux thèmes. Aucune couleur ici : tout vient des tokens --p-*
   du thème actif (tokens-<thème>.css), la composition propre à un thème vit dans theme-<thème>.css. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background: var(--p-bg);
  color: var(--p-text);
  font-family: var(--p-font-body);
  font-size: var(--p-body-size);
  line-height: var(--p-body-leading);
}

a {
  color: var(--p-link);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--p-primary);
  outline-offset: 2px;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

img,
svg {
  max-width: 100%;
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* « Aller au contenu » : invisible à la souris, affiché dès qu'il reçoit le focus au clavier. */
.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--p-radius);
  background: var(--p-primary);
  color: var(--p-on-primary);
  font-weight: 600;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* --- Gabarit ------------------------------------------------------------ */

.container {
  max-width: var(--p-container);
  margin: 0 auto;
  padding-left: clamp(16px, 4vw, 48px);
  padding-right: clamp(16px, 4vw, 48px);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--gap, 16px);
}

.cluster {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap, 12px 24px);
}

.split {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 64px;
  align-items: flex-start;
}

.split > * {
  min-width: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(var(--min, 240px), 100%), 1fr));
  gap: var(--gap, 32px);
}

.section {
  padding-block: clamp(48px, 7vw, 72px);
}

.section--surface {
  background: var(--p-surface);
  border-top: 1px solid var(--p-border);
  border-bottom: 1px solid var(--p-border);
}

.section--inverse {
  background: var(--p-inverse-bg);
  color: var(--p-inverse-text);
}

.section--inverse .text-muted {
  color: var(--p-inverse-muted);
}

/* --- Typographie -------------------------------------------------------- */

.display,
.title {
  font-family: var(--p-font-display);
  font-weight: var(--p-display-weight);
  letter-spacing: var(--p-display-tracking);
  text-wrap: balance;
}

.display {
  font-size: clamp(38px, 5vw, 66px);
  line-height: 1.04;
}

.title {
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.12;
}

.title--lg {
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.08;
}

.subtitle {
  font-family: var(--p-font-display);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.lede {
  max-width: 34em;
  font-size: 19px;
  line-height: 1.55;
  color: var(--p-text-soft);
}

.text-soft {
  color: var(--p-text-soft);
}

.text-muted {
  color: var(--p-text-muted);
}

.eyebrow {
  font-family: var(--p-font-accent);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--p-text-muted);
}

.kicker {
  font-family: var(--p-font-accent);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--p-kicker);
}

.numeral {
  font-family: var(--p-font-accent);
  font-size: 12px;
  color: var(--p-numeral);
}

.rule {
  width: 72px;
  height: var(--p-rule-weight);
  background: var(--p-rule);
}

/* --- Actions ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--p-radius);
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn--lg {
  min-height: 52px;
  padding: 0 26px;
  font-size: 16px;
}

.btn--primary {
  background: var(--p-primary);
  border-color: var(--p-primary);
  color: var(--p-on-primary);
}

.btn--primary:hover {
  background: var(--p-primary-hover);
  border-color: var(--p-primary-hover);
  color: var(--p-on-primary);
}

.btn--outline {
  background: transparent;
  border-color: var(--p-primary);
  color: var(--p-primary);
}

.btn--outline:hover {
  background: var(--p-surface);
  color: var(--p-primary);
}

.btn--inverse {
  background: var(--p-inverse-text);
  border-color: var(--p-inverse-text);
  color: var(--p-inverse-bg);
}

.btn--inverse-outline {
  background: transparent;
  border-color: var(--p-inverse-text);
  color: var(--p-inverse-text);
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 600;
  text-decoration: none;
  color: var(--p-link);
}

.link--underline {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.section--inverse .link,
.section--inverse .link--underline {
  color: var(--p-inverse-text);
}

/* --- En-tête ------------------------------------------------------------ */

.site-header {
  border-bottom: 1px solid var(--p-border);
}

.site-header__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 32px;
  padding-block: 14px;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  min-height: 44px;
  font-family: var(--p-font-display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.02em;
  color: var(--p-text);
  text-decoration: none;
}

.wordmark__dot {
  color: var(--p-wordmark-dot);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 28px;
  font-size: 15px;
  font-weight: 500;
}

.nav__link,
.header-tools__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--p-text);
  text-decoration: none;
}

.nav__link[aria-current="page"] {
  color: var(--p-link);
  box-shadow: inset 0 -2px 0 var(--p-rule);
}

.header-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 20px;
  font-size: 14px;
  font-weight: 500;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--p-font-accent);
  font-size: 12px;
}

.lang-switch a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--p-text-muted);
  text-decoration: none;
}

.lang-switch a[aria-current="true"] {
  color: var(--p-text);
  font-weight: 600;
}

/* --- Accueil ------------------------------------------------------------ */

.hero {
  padding-block: clamp(40px, 6vw, 72px);
}

.hero__main {
  flex: 1 1 520px;
}

.hero__aside {
  flex: 1 1 380px;
}

.publics__item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 18px;
  border-top: 2px solid var(--p-rule);
  color: var(--p-text);
  text-decoration: none;
}

.publics__item .link {
  margin-top: 6px;
  min-height: 0;
  font-size: 15px;
}

.expertises__item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 0;
  border-top: 1px solid var(--p-border-strong);
}

/* --- Le cabinet --------------------------------------------------------- */

.firm-hero {
  padding-block: clamp(48px, 7vw, 72px) clamp(40px, 6vw, 56px);
}

.firm-hero__title {
  max-width: 16em;
}

.firm-hero__lede {
  font-size: 20px;
}

/* Titre de section à gauche, contenu à droite ; « Nos expertises » empile le titre au-dessus
   de la grille. */
.firm-split {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 64px;
  align-items: flex-start;
}

.firm-split > * {
  min-width: 0;
}

.firm-split__head {
  flex: 1 1 280px;
}

.firm-split__body {
  flex: 2 1 520px;
  max-width: 38em;
}

.firm-text {
  font-size: 18px;
  line-height: 1.65;
}

.firm-expertises .firm-split {
  flex-direction: column;
  gap: 32px;
}

.firm-expertises .firm-split__head {
  flex: none;
}

.firm-expertises__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr));
  gap: 0 64px;
  width: 100%;
}

.firm-expertise {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px 0;
  border-top: var(--p-rule-weight) solid var(--p-rule);
}

.firm-expertise__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.firm-expertise .subtitle {
  font-size: 24px;
}

.firm-expertise__questions {
  margin-top: 4px;
  padding-left: 1.2em;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 15px;
  color: var(--p-text-soft);
}

.card {
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  border-radius: var(--p-radius);
}

.card--accent {
  border-top: 3px solid var(--p-rule);
  border-radius: 2px 2px var(--p-radius) var(--p-radius);
}

/* --- Formulaires -------------------------------------------------------- */

.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 14px;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--p-field-border);
  border-radius: var(--p-radius-control);
  background: var(--p-field);
  color: var(--p-text);
  font: inherit;
}

.field textarea {
  padding: 12px 14px;
  line-height: 1.5;
  resize: vertical;
}

.form__note {
  font-size: 13px;
  color: var(--p-text-muted);
}

.field__optional {
  font-weight: 400;
  color: var(--p-text-muted);
}

.field__hint {
  font-size: 13px;
  color: var(--p-text-muted);
}

.field__error,
.form__errors {
  font-size: 14px;
  color: var(--p-danger);
}

.field--invalid input,
.field--invalid select,
.field--invalid textarea {
  border-color: var(--p-danger);
}

.field--check {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
}

.field--check input {
  width: 20px;
  min-height: 20px;
  margin-top: 2px;
  flex: 0 0 auto;
}

.field--check label {
  font-weight: 400;
}

/* Pot de miel : hors de l'écran, ignoré par les lecteurs d'écran et la tabulation. */
.form__trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.notice {
  padding: 16px 18px;
  border: 1px solid var(--p-primary);
  border-left-width: 4px;
  border-radius: var(--p-radius-control);
  background: var(--p-surface);
}

.notice--error {
  border-color: var(--p-danger);
  background: var(--p-danger-soft);
  color: var(--p-danger);
}

.steps {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: flex;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--p-border-strong);
}

.steps li:last-child {
  border-bottom: 1px solid var(--p-border-strong);
}

.steps__n {
  padding-top: 3px;
  font-family: var(--p-font-accent);
  font-size: 13px;
  color: var(--p-numeral);
}

/* Bouton WhatsApp flottant (numéro des réglages du portail). */
.wa-float {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--p-primary);
  color: var(--p-on-primary);
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 18px rgb(0 0 0 / 0.18);
}

.wa-float:hover {
  background: var(--p-primary-hover);
}

.legal {
  max-width: 46em;
}

.legal dl {
  display: grid;
  grid-template-columns: minmax(10em, auto) 1fr;
  gap: 6px 20px;
  margin: 0;
}

.legal dt {
  font-weight: 600;
}

.legal dd {
  margin: 0;
}

.to-complete {
  color: var(--p-danger);
  font-style: italic;
}

/* --- Pied de page ------------------------------------------------------- */

.site-footer {
  background: var(--p-inverse-bg);
  color: var(--p-inverse-text);
  border-top: var(--p-rule-weight) solid var(--p-rule);
}

.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 32px 48px;
  padding-block: 56px 40px;
}

.site-footer nav {
  display: flex;
  flex-direction: column;
}

.site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--p-inverse-text);
  font-size: 15px;
  text-decoration: none;
}

.site-footer .wordmark {
  color: var(--p-inverse-text);
}

.site-footer .text-muted,
.site-footer .eyebrow {
  color: var(--p-inverse-muted);
}

.site-footer .eyebrow {
  padding-bottom: 6px;
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 20px 32px;
  border-top: 1px solid var(--p-inverse-border);
  font-family: var(--p-font-accent);
  font-size: 12px;
  color: var(--p-inverse-muted);
}

.site-footer__legal a {
  color: var(--p-inverse-muted);
  text-decoration: none;
}

.site-footer__legal nav {
  flex-direction: row;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* --- Page d'une publication ---------------------------------------------- */

.preview-banner {
  background: var(--p-rule);
  color: var(--p-text);
  font-size: 14px;
  font-weight: 600;
  padding-block: 10px;
}

.pub__head {
  padding-block: clamp(32px, 5vw, 56px) 8px;
}

.pub__title {
  font-size: clamp(34px, 4.4vw, 54px);
  max-width: 20em;
}

.pub__summary {
  font-size: 21px;
}

.pub__meta {
  justify-content: space-between;
  font-size: 14px;
}

.share {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.share__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--p-field-border);
  border-radius: 999px;
  background: transparent;
  color: var(--p-text);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.pub__layout {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 64px;
  align-items: flex-start;
  padding-block: 32px 72px;
}

.pub__main {
  flex: 1 1 600px;
  min-width: 0;
  max-width: 760px;
}

.pub__aside {
  flex: 1 1 280px;
  min-width: 0;
  max-width: 340px;
}

.pub__aside:empty {
  display: none;
}

.pub__cover img,
.video__poster {
  width: 100%;
  height: auto;
  border-radius: var(--p-radius);
}

.prose {
  font-size: 18px;
  line-height: 1.7;
  max-width: 38em;
}

.prose > * + * {
  margin-top: 1.2em;
}

.prose h2,
.prose h3 {
  font-family: var(--p-font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-top: 1.6em;
}

.prose h2 {
  font-size: 28px;
}

.prose h3 {
  font-size: 22px;
}

.prose ul,
.prose ol {
  padding-left: 1.2em;
}

.prose li + li {
  margin-top: 0.4em;
}

.prose blockquote {
  margin: 1.4em 0;
  padding: 20px 24px;
  background: var(--p-surface);
  border: 1px solid var(--p-border);
  border-top: var(--p-rule-weight) solid var(--p-rule);
  border-radius: 2px 2px var(--p-radius) var(--p-radius);
  font-family: var(--p-font-display);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.35;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--p-radius);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

.prose th,
.prose td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--p-border);
  text-align: left;
  vertical-align: top;
}

.prose th {
  border-bottom: 2px solid var(--p-text);
}

.prose code {
  font-family: var(--p-font-accent);
  font-size: 0.9em;
}

.prose a {
  color: var(--p-link);
}

.video {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.video__play {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  border-radius: var(--p-radius);
  background: var(--p-inverse-bg);
  color: var(--p-inverse-text);
  overflow: hidden;
  cursor: pointer;
}

.video__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.video__btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border-radius: 999px;
  border: 2px solid var(--p-inverse-accent);
  background: rgb(0 0 0 / 0.35);
}

.video__frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: var(--p-radius);
}

.pub__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
  padding: 32px;
  border-radius: var(--p-radius);
}

.locked {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
}

.locked__row {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--p-border);
  color: var(--p-text);
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
}

.locked__row svg {
  flex: 0 0 18px;
  margin-top: 3px;
  color: var(--p-numeral);
}

/* --- Cartes, listes, filtres --------------------------------------------- */

.pcard {
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--p-text);
  text-decoration: none;
  border-radius: var(--p-radius);
  transition: transform 0.2s ease;
}

.pcard:hover {
  transform: translateY(-3px);
}

.pcard__media {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  background: var(--p-cover-bg);
  color: var(--p-on-primary);
  border-radius: var(--p-radius);
  overflow: hidden;
}

.pcard__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pcard__glyph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 2px solid var(--p-inverse-accent);
  font-family: var(--p-font-display);
  font-weight: 700;
  font-size: 26px;
}

.pcard__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pcard__title {
  font-family: var(--p-font-display);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.pcard--large .pcard__title {
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.15;
}

.pcard__summary {
  font-size: 15px;
}

.pcard__meta {
  font-family: var(--p-font-accent);
  font-size: 12px;
}

.latest {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 48px;
  align-items: flex-start;
}

.latest__featured {
  flex: 1.25 1 440px;
  min-width: 0;
}

.latest__list {
  flex: 1 1 380px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.latest__list .pcard {
  flex-direction: row;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--p-border);
  border-radius: 0;
}

.latest__list .pcard__media {
  flex: 0 0 96px;
  aspect-ratio: 1;
  border-radius: var(--p-radius-control);
}

.latest__list .pcard__glyph {
  width: 40px;
  height: 40px;
  font-size: 18px;
}

.latest__list .pcard__summary {
  display: none;
}

.listing__items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 40px 32px;
}

.filters {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.filters__row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 24px;
  align-items: flex-end;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--p-field-border);
  border-radius: 999px;
  color: var(--p-text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.chip--on {
  background: var(--p-primary);
  border-color: var(--p-primary);
  color: var(--p-on-primary);
}

.related {
  display: flex;
  flex-direction: column;
}

.related .eyebrow {
  padding-bottom: 10px;
}

.related__row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 0;
  border-top: 1px solid var(--p-border);
  color: var(--p-text);
  text-decoration: none;
}

.related__title {
  font-family: var(--p-font-display);
  font-weight: 600;
  line-height: 1.35;
}
