/**
 * Cabinet – Page « Nos services »
 *
 * Loaded on the /nos-prestations page and in the block editor. Colours come from
 * src/css/variables.css; the shared .cabinet-section / .cabinet-container /
 * .btn helpers come from global.css, and the CTA panel + scroll-reveal rules
 * from widgets.css.
 */

/* The section is focusable (tabindex="-1") so the hero's #parcours link moves
   the keyboard focus, not just the scroll. Drop the ring only when focus came
   from the anchor jump — :focus-visible still shows it to keyboard users. */
.cabinet-services-parcours:focus:not(:focus-visible) {
  outline: none;
}

/* ═══════════════════════════════════════════════════════════
   POURQUOI LA PLURIDISCIPLINARITÉ
   ═══════════════════════════════════════════════════════════ */
.cabinet-services-pourquoi {
  background: var(--color-white);
}

.cabinet-services-pourquoi__intro {
  margin: 0 0 var(--space-10);
  padding: 28px var(--space-8);
  border-left: 5px solid var(--color-teal);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #ebf8f8 0%, #f5fdfd 100%);
  box-shadow: var(--shadow-card);
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--color-text);
}
.cabinet-services-pourquoi__intro strong {
  color: var(--color-teal-dark);
  font-weight: var(--font-weight-extrabold);
}

/* Trois par ligne, pas davantage : au-delà, les cartes s'amincissent et leur
   texte tombe en colonnes étroites. Six bénéfices font alors deux rangées
   pleines, et le pavé se centre sous le titre. */
.cabinet-services-pourquoi__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
  max-width: 1000px;
  margin-inline: auto;
}

@media (max-width: 900px) {
  .cabinet-services-pourquoi__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .cabinet-services-pourquoi__grid {
    grid-template-columns: 1fr;
  }
}

.cabinet-benefice {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: 26px var(--space-6);
  border: 1.5px solid #e4edef;
  border-radius: var(--radius-lg);
  background: var(--color-white);
  transition:
    border-color var(--transition-normal),
    transform var(--transition-normal),
    box-shadow var(--transition-normal);
}
.cabinet-benefice:hover {
  border-color: var(--color-teal);
  transform: translateY(-4px);
  box-shadow: var(--shadow-teal);
}

.cabinet-benefice__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 12px;
}
.cabinet-benefice__icon svg {
  width: 25px;
  height: 25px;
}

.cabinet-benefice__title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: var(--font-weight-extrabold);
  line-height: 1.35;
  color: var(--color-navy);
}

.cabinet-benefice__text {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--color-muted);
}

/* ═══════════════════════════════════════════════════════════
   LE PARCOURS
   ═══════════════════════════════════════════════════════════ */
.cabinet-services-parcours {
  background: var(--color-bg);
}

.cabinet-services-parcours__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cabinet-etape {
  position: relative;
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 26px;
  padding-bottom: 34px;
}
.cabinet-etape:last-child {
  padding-bottom: 0;
}

/* Dotted connector between steps */
.cabinet-etape::before {
  content: "";
  position: absolute;
  left: 29px;
  top: 62px;
  bottom: -2px;
  width: 2px;
  background: repeating-linear-gradient(
    to bottom,
    rgba(58, 191, 191, 0.45) 0 6px,
    transparent 6px 12px
  );
}
.cabinet-etape:last-child::before {
  display: none;
}

.cabinet-etape__num {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border: 2px solid var(--color-teal-light);
  border-radius: 50%;
  background: var(--color-white);
  box-shadow: var(--shadow-card);
  font-family: var(--font-family-heading);
  font-size: 1.45rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-teal-dark);
  transition:
    background var(--transition-normal),
    border-color var(--transition-normal),
    color var(--transition-normal);
}
.cabinet-etape:hover .cabinet-etape__num {
  background: var(--color-teal);
  border-color: var(--color-teal);
  color: var(--color-white);
}

.cabinet-etape__body {
  padding: 24px var(--space-6);
  border: 1.5px solid transparent;
  border-radius: var(--radius-lg);
  background: var(--color-white);
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition-normal);
}
.cabinet-etape:hover .cabinet-etape__body {
  border-color: rgba(58, 191, 191, 0.4);
}

.cabinet-etape__label {
  display: block;
  margin-bottom: var(--space-1);
  font-size: 0.72rem;
  font-weight: var(--font-weight-extrabold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-teal-dark);
}

.cabinet-etape__title {
  margin: 0 0 var(--space-2);
  font-family: var(--font-family-heading);
  font-size: 1.2rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-navy);
}

.cabinet-etape__text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--color-muted);
}

.cabinet-etape__text--list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  list-style: none;
}
.cabinet-etape__text--list li {
  position: relative;
  padding-left: 20px;
}
.cabinet-etape__text--list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-teal);
  opacity: 0.55;
}

.cabinet-etape__meta {
  display: inline-block;
  margin-top: var(--space-3);
  padding: 4px 12px;
  border-radius: var(--radius-xl);
  background: rgba(245, 200, 66, 0.22);
  color: var(--color-yellow-text);
  font-size: 0.72rem;
  font-weight: var(--font-weight-extrabold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════
   PUBLICS CIBLES
   ═══════════════════════════════════════════════════════════ */
.cabinet-services-publics {
  background: var(--color-white);
}

.cabinet-services-publics__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.cabinet-public-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1.5px solid transparent;
  border-radius: var(--radius-lg);
  background: var(--color-white);
  box-shadow: var(--shadow-card);
  transition:
    transform var(--transition-normal),
    border-color var(--transition-normal),
    box-shadow var(--transition-normal);
}
.cabinet-public-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-teal);
  box-shadow: var(--shadow-teal);
}

.cabinet-public-card__head {
  padding: 26px var(--space-6) 22px;
  text-align: center;
}
.cabinet-public-card--enfance .cabinet-public-card__head {
  background: linear-gradient(135deg, #ebf8f8, #f5fdfd);
}
.cabinet-public-card--ado .cabinet-public-card__head {
  background: linear-gradient(135deg, #fff9e6, #fffdf5);
}
.cabinet-public-card--jeunes .cabinet-public-card__head {
  background: linear-gradient(135deg, #fff0ed, #fff9f7);
}

.cabinet-public-card__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 66px;
  height: 66px;
  margin: 0 auto var(--space-4);
  border-radius: 50%;
  background: var(--color-white);
  box-shadow: var(--shadow-md);
}
.cabinet-public-card__avatar svg {
  width: 32px;
  height: 32px;
}

.cabinet-public-card__title {
  margin: 0;
  font-family: var(--font-family-heading);
  font-size: 1.3rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-navy);
}

.cabinet-public-card__age {
  display: inline-block;
  margin-top: var(--space-2);
  padding: 4px 12px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.85);
  color: var(--color-muted);
  font-size: 0.74rem;
  font-weight: var(--font-weight-extrabold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cabinet-public-card__body {
  flex: 1;
  padding: 22px var(--space-6) 26px;
}

.cabinet-public-card__intro {
  margin: 0 0 var(--space-4);
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--color-muted);
}

.cabinet-public-card__motifs-label {
  margin: 0 0 var(--space-3);
  font-size: 0.72rem;
  font-weight: var(--font-weight-extrabold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-teal-dark);
}

.cabinet-public-card__motifs {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cabinet-public-card__motifs li {
  position: relative;
  padding-left: 22px;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--color-text);
}
.cabinet-public-card__motifs li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-teal);
  opacity: 0.55;
}

/* ═══════════════════════════════════════════════════════════
   LES SERVICES — une ligne par service
   Fiche du service à gauche, thérapeutes qui la portent à droite.
   Le contenu est celui de l'accueil (fiche + paquet de cartes),
   déplié : ici on lit, on ne manipule pas.
   ═══════════════════════════════════════════════════════════ */
/* Fond neutre et non plus le lavis turquoise de la section : ce sont les lignes
   qui portent la couleur maintenant, chacune celle de sa bulle. Un fond teinté
   les mettrait toutes en désaccord — sur l'accueil aussi, la fiche colorée est
   posée sur du clair. */
.cabinet-services-outils {
  background: var(--color-bg);

}

/* L'ancre d'une prestation (« En savoir plus » de l'accueil) cale sa fiche
   juste sous l'en-tête collé (--sticky-header-offset), avec un peu d'air : la
   fiche précédente sort de l'écran, on ne lit que celle qu'on a demandée.
   La première fait exception : elle se dégage aussi des ~135 px de titre et
   de sous-titre qui la précèdent, pour ne pas perdre de vue le titre de
   section, qui dit où l'on vient d'atterrir. */
.cabinet-service-row {
  scroll-margin-top: var(--space-4);
}
.cabinet-service-row:first-child {
  scroll-margin-top: 135px;
}

/* Sur un écran court, ces 135 px repousseraient la fiche hors de vue : elle
   passe devant le titre, et l'écart commun suffit. */
@media (max-width: 768px) {
  .cabinet-service-row,
  .cabinet-service-row:first-child {
    scroll-margin-top: 0;
  }
}

.cabinet-services-outils__list {
  display: flex;
  flex-direction: column;
  /* Les lignes ne sont plus des panneaux qui se touchent mais des scènes
     posées sur le fond : il leur faut plus d'air pour ne pas se lire comme un
     tableau. */
  gap: var(--space-16);

  /* Le repli, pour un service absent du logo : il n'a pas de bulle, donc pas de
     couleur à porter. Posé sur la liste et non sur la ligne — la teinte d'une
     bulle est déclarée par `[data-service-slot]` (widgets.css), à la même
     spécificité qu'une classe : sur la ligne elle-même, laquelle l'emporte
     dépendrait de l'ordre de chargement des deux feuilles. Héritée du parent,
     elle cède toujours. */
  --service-tint: var(--color-teal-light);
  --service-ink: var(--color-teal-dark);
}

/* L'habillage est celui de la fiche de l'accueil : lavis de la couleur du
   service depuis le coin haut-gauche, filet de la même couleur sur la tranche.
   Là-bas une seule fiche est visible à la fois et sa teinte suit la bulle
   cliquée ; ici les services sont tous dépliés, chacun porte la sienne en
   permanence (`data-service-slot`, posé par le rendu). */
.cabinet-service-row__card {
  position: relative;
  padding: var(--space-10) var(--space-10) var(--space-10) calc(var(--space-10) + 6px);
  border: 1px solid rgba(30, 74, 92, 0.08);
  border-radius: var(--radius-xl);
  /* Le lavis démarre hors cadre : la couleur pleine n'entre jamais dans la
     fiche, seule sa fin. */
  background:
    linear-gradient(140deg, var(--service-tint) -55%, rgba(255, 255, 255, 0) 48%),
    var(--color-white);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: box-shadow var(--transition-normal);
}

/* Le filet de tranche, comme sur la fiche de l'accueil — à ceci près qu'il ne
   relie plus une sélection : il identifie le service. */
.cabinet-service-row__card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--service-tint);
}

/* Arrivée depuis l'accueil : le service visé se démarque le temps qu'on le
   repère dans la liste — dans sa couleur, celle de la bulle qu'on vient de
   quitter. */
.cabinet-service-row:target .cabinet-service-row__card {
  box-shadow:
    0 0 0 2px var(--service-tint),
    0 6px 28px rgba(30, 74, 92, 0.16);
}

.cabinet-service-row__icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin-bottom: var(--space-4);
  border-radius: 18px;
  background: var(--service-tint);
  color: var(--service-ink);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.cabinet-service-row__icon svg,
.cabinet-service-row__icon .dashicons {
  width: 30px;
  height: 30px;
  font-size: 30px;
}

.cabinet-service-row__eyebrow {
  margin: 0 0 4px;
  font-size: 0.7rem;
  font-weight: var(--font-weight-extrabold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--service-ink);
}

.cabinet-service-row__title {
  margin: 0 0 var(--space-3);
  font-family: var(--font-family-heading);
  font-size: 1.35rem;
  font-weight: var(--font-weight-extrabold);
  line-height: var(--line-height-tight);
  color: var(--color-navy);
}

/* Le corps accueille un texte rédigé, potentiellement long et structuré : les
   intertitres, listes et mises en gras que l'éditeur pose depuis l'admin ont
   besoin d'un rythme, sinon le bloc sort en pavé. Il suit le titre de près :
   la mini-description qui s'intercalait appartient à l'accueil. */
.cabinet-service-row__text {
  margin-top: var(--space-2);
  font-size: 0.94rem;
  line-height: 1.75;
  color: var(--color-muted);
}
.cabinet-service-row__text p {
  margin: 0 0 var(--space-4);
}

/* Le texte se lit en bloc, justifié, avec césure (la page est déclarée en
   français). Un texte collé depuis un traitement de texte arrive souvent avec
   un `text-align: left` en ligne, que seul !important peut lever ; un
   centrage ou un alignement à droite posé exprès est respecté. En mobile, la
   colonne est trop étroite pour justifier sans creuser des trous : le texte
   reste aligné à gauche. */
@media (min-width: 681px) {
  .cabinet-service-row__text p:not([style*="center"]):not([style*="right"]),
  .cabinet-service-row__text li {
    text-align: justify !important;
    hyphens: auto;
    -webkit-hyphens: auto;
  }
}

.cabinet-service-row__text h3,
.cabinet-service-row__text h4,
.cabinet-service-row__text h5 {
  margin: var(--space-6) 0 var(--space-2);
  font-family: var(--font-family-heading);
  font-size: 1rem;
  font-weight: var(--font-weight-extrabold);
  line-height: var(--line-height-tight);
  color: var(--color-navy);
}
/* <b> autant que <strong> : un texte collé arrive avec l'un ou l'autre. */
.cabinet-service-row__text strong,
.cabinet-service-row__text b {
  color: var(--color-navy);
  font-weight: var(--font-weight-extrabold);
}

/* Les listes deviennent un encart : posées sur le lavis de la fiche, à la
   couleur de la prestation. Une puce ronde de la teinte du service remplace
   celle du navigateur. */
.cabinet-service-row__text ul,
.cabinet-service-row__text ol {
  display: grid;
  gap: var(--space-3);
  margin: 0 0 var(--space-5);
  padding: var(--space-5) var(--space-6);
  border: 1px solid rgba(30, 74, 92, 0.08);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  list-style: none;
  counter-reset: cabinet-service-item;
}
.cabinet-service-row__text li {
  position: relative;
  margin: 0;
  padding-left: 1.5rem;
}
.cabinet-service-row__text ul > li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.6em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--service-ink);
}
.cabinet-service-row__text ol > li {
  counter-increment: cabinet-service-item;
}
.cabinet-service-row__text ol > li::before {
  content: counter(cabinet-service-item) ".";
  position: absolute;
  left: 0;
  font-weight: var(--font-weight-extrabold);
  color: var(--service-ink);
}
/* Un texte collé enveloppe souvent chaque puce dans un paragraphe : sans
   ceci, sa marge creusait un vide entre deux puces. */
.cabinet-service-row__text li > p {
  margin: 0;
}

/* Un lien se voit comme tel : couleur de la prestation, soulignement. Un lien
   vers un autre site s'ouvre dans un nouvel onglet (voir services-outils.php)
   et porte la flèche qui l'annonce. */
.cabinet-service-row__text a {
  color: var(--service-ink);
  font-weight: var(--font-weight-extrabold);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.cabinet-service-row__text a:hover,
.cabinet-service-row__text a:focus-visible {
  text-decoration-thickness: 2px;
}
.cabinet-service-row__text a b,
.cabinet-service-row__text a strong {
  color: inherit;
}
.cabinet-service-row__text a[target="_blank"]::after {
  content: "\00a0↗";
  text-decoration: none;
  display: inline-block;
}

.cabinet-service-row__text > :first-child {
  margin-top: 0;
}
.cabinet-service-row__text > :last-child {
  margin-bottom: 0;
}

/* Le pied de la fiche de l'accueil (« En savoir plus », nombre de
   thérapeutes, widgets.css), décollé des encarts qui le précèdent. */
.cabinet-service-row__foot {
  margin-top: var(--space-8);
}

/* La même allure que l'encart d'intro de « Pourquoi la pluridisciplinarité ? »
   (.cabinet-services-pourquoi__intro) : une parenthèse rassurante en fin de
   liste mérite d'être lue, pas reléguée en petites capitales grises. */
.cabinet-services-outils__note {
  max-width: 760px;
  margin: var(--space-10) auto 0;
  padding: 28px var(--space-8);
  border-left: 5px solid var(--color-teal);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #ebf8f8 0%, #f5fdfd 100%);
  box-shadow: var(--shadow-card);
  font-size: 1.05rem;
  line-height: 1.75;
  text-align: left;
  color: var(--color-text);
}
.cabinet-services-outils__note strong {
  color: var(--color-teal-dark);
  font-weight: var(--font-weight-extrabold);
}

@media (max-width: 680px) {
  .cabinet-service-row__card {
    padding: var(--space-6) var(--space-6) var(--space-6) calc(var(--space-6) + 6px);
  }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .cabinet-services-publics__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .cabinet-etape {
    grid-template-columns: 46px 1fr;
    gap: var(--space-4);
  }
  .cabinet-etape__num {
    width: 46px;
    height: 46px;
    font-size: 1.15rem;
  }
  .cabinet-etape::before {
    left: 22px;
    top: 48px;
  }
  .cabinet-etape__body {
    padding: var(--space-5);
  }
}

/* ═══════════════════════════════════════════════════════════
   REDUCED MOTION
   The shared .cabinet-fade-up reset lives in widgets.css; this only
   neutralises the hover motion specific to this page.
   ═══════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .cabinet-benefice,
  .cabinet-benefice:hover,
  .cabinet-public-card,
  .cabinet-public-card:hover,
  .cabinet-etape__num,
  .cabinet-etape__body {
    transition: none;
    transform: none;
  }
}
