/* ==========================================================================
   Page « Solutions » (/solutions/) : styles propres à cette page, chargés seulement par elle.
   Réutilise les variables de style.css. Conçu d'abord pour 375 px, contrôlé à 320 px.
   Le bordeaux reste réservé au bouton « Étudier mon projet ». Aucune animation ajoutée
   (les transitions du site sont neutralisées sous prefers-reduced-motion par style.css).
   Mise en page éditoriale : pas de cartes répétitives, pas de grille 3 × 2 ; chapitres alternés sur ordinateur.
   ========================================================================== */

/* Repères communs */
.so-bloc .bloc-entete {
  margin-bottom: var(--s-7);
}

.so-num {
  display: block;
  font-family: var(--f-titre);
  font-size: 1.5rem;
  font-weight: var(--fw-titre);
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
  line-height: 1;
  color: var(--c-marine);
}

.so-accroche {
  font-size: 1.125rem;
  font-weight: var(--fw-demi);
  line-height: 1.4;
  color: var(--c-marine);
}

/* Liens secondaires (flèche dessinée par .lien-action) : zone tactile d'au moins 44 px */
.so-lien a,
.so-chapitre__lien a {
  display: inline-flex;
  align-items: center;
  min-height: var(--cible-min);
}

/* Images : coins adoucis, pleine largeur de leur colonne ; chaque emplacement fixe son ratio (le cadrage ne dépend pas du fichier) :
   B3 4:3, B4 3:2, B5 16:10 comme son illustration (4:3 sur téléphone ; décision du dirigeant du 21/10/2026) */
.so-chapitre__visuel img,
.so-projet__visuel img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--r-carte);
}

.so-chapitres--dimensions .so-chapitre__visuel img {
  aspect-ratio: 3 / 2;
}

@media (min-width: 48rem) {
  .so-projet__visuel img {
    aspect-ratio: 16 / 10;
  }
}

/* ---------- B1 : hero ---------- */
.so-hero {
  padding-bottom: 0;
}

.so-hero__grille {
  display: grid;
  gap: var(--s-7);
}

.so-hero__entete {
  margin-bottom: 0;
}

.so-hero__message {
  max-width: 34rem;
}

.so-hero__appel {
  display: grid;
  justify-items: start;
  gap: var(--s-3);
  margin-top: var(--s-6);
}

/* Ancre discrète vers B3 */
.so-ancre {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  min-height: var(--cible-min);
  font-size: var(--fs-petit);
  font-weight: var(--fw-medium);
  color: var(--c-texte-doux);
}

.so-ancre:hover {
  color: var(--c-marine);
}

/* Téléphone et tablette : photo sous le texte, d'un bord à l'autre de l'écran */
.so-hero__visuel {
  margin-inline: calc(-1 * var(--gouttiere));
}

.so-hero__visuel img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

@media (max-width: 37.4375rem) {
  .so-hero__appel,
  .so-hero__appel .bouton {
    width: 100%;
  }

  .so-hero__appel {
    justify-items: stretch;
  }

  .so-ancre {
    justify-content: center;
  }
}

/* Ordinateur : texte à gauche (5/12), grande photo à droite (7/12) qui s'étend jusqu'au bord droit de l'écran */
@media (min-width: 64rem) {
  .so-hero {
    padding-top: 0;
  }

  .so-hero__grille.conteneur {
    max-width: none;
    padding-inline: 0;
    grid-template-columns:
      [plein-debut] minmax(var(--gouttiere), 1fr)
      [texte-debut] minmax(0, calc(var(--conteneur) * 0.42))
      [texte-fin] var(--s-8)
      [visuel-debut] minmax(0, calc(var(--conteneur) * 0.58 - var(--s-8)))
      [contenu-fin] minmax(var(--gouttiere), 1fr) [plein-fin];
    align-items: center;
    gap: 0;
  }

  .so-hero__texte {
    grid-column: texte-debut / texte-fin;
    padding-block: var(--s-6) var(--s-8);
  }

  .so-hero__visuel {
    grid-column: visuel-debut / plein-fin;
    margin-inline: 0;
  }

  .so-hero__visuel img {
    max-height: 40rem;
  }
}

/* ---------- B2 : la logique des solutions (quatre leviers, présentation éditoriale) ---------- */
.so-leviers {
  display: grid;
  gap: var(--s-6);
  margin: 0;
  padding: 0;
  list-style: none;
}

.so-levier {
  padding: var(--s-5);
  border: var(--bordure);
  border-radius: var(--r-carte);
  background: var(--c-fond);
}

.so-levier h3 {
  margin-top: var(--s-3);
}

.so-levier p {
  margin-top: var(--s-2);
  color: var(--c-texte-doux);
}

@media (min-width: 48rem) {
  .so-leviers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-7) var(--s-8);
  }
}

/* ---------- B3 et B4 : chapitres verticaux, alternés sur ordinateur ---------- */
.so-chapitres {
  display: grid;
  gap: var(--s-8);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Téléphone : une colonne ; la photo passe au-dessus du texte. Ordre visuel seulement : l'ordre du code et celui du clavier
   ne changent pas (l'image est décorative, le lien reste après le texte). Sur ordinateur, les zones de la grille décident. */
.so-chapitre {
  display: grid;
  gap: var(--s-5);
}

.so-chapitre__visuel {
  order: -1;
}

.so-chapitre__texte > * + * {
  margin-top: var(--s-3);
}

.so-chapitre__texte h3 {
  margin-top: var(--s-3);
}

.so-chapitre__lien {
  margin-top: calc(-1 * var(--s-2));
}

@media (min-width: 48rem) {
  .so-chapitres {
    gap: var(--s-9);
  }

  /* Le texte (et son lien) est centré verticalement face à l'image */
  .so-chapitre {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 1fr auto auto 1fr;
    grid-template-areas:
      ".      visuel"
      "texte  visuel"
      "lien   visuel"
      ".      visuel";
    column-gap: clamp(2rem, 1rem + 3vw, 4rem);
    row-gap: 0;
  }

  .so-chapitre:nth-child(even) {
    grid-template-areas:
      "visuel ."
      "visuel texte"
      "visuel lien"
      "visuel .";
  }

  .so-chapitre__texte {
    grid-area: texte;
  }

  .so-chapitre__visuel {
    grid-area: visuel;
    align-self: center;
  }

  .so-chapitre__lien {
    grid-area: lien;
    margin-top: var(--s-3);
  }
}

/* B4 « La pertinence avant la solution » : six cartes, photo en haut (une colonne sur téléphone, deux sur tablette, trois dès 1 024 px) */
.so-chapitres--dimensions {
  gap: var(--s-5);
}

.so-chapitres--dimensions .so-chapitre {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-4) var(--s-5);
  border: var(--bordure);
  border-radius: var(--r-carte);
  background: var(--c-fond);
}

/* La photo occupe toute la largeur de la carte (la règle commune la centre face au texte, pour l'alternance de B3) */
.so-chapitres--dimensions .so-chapitre__visuel {
  align-self: stretch;
}

@media (min-width: 48rem) {
  .so-chapitres--dimensions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-5);
  }
}

@media (min-width: 64rem) {
  .so-chapitres--dimensions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Conclusion de B3 : titre, texte, micro-signature discrète, lien vers la méthode */
.so-conclusion-b3 {
  max-width: 44rem;
  margin-top: var(--s-9);
  padding-top: var(--s-6);
  border-top: var(--bordure);
}

.so-conclusion-b3 > * + * {
  margin-top: var(--s-3);
}

.so-micro-signature {
  display: flex;
  gap: var(--s-3);
  align-items: baseline;
  font-size: var(--fs-petit);
  color: var(--c-texte-doux);
}

.so-micro-signature::before {
  content: "";
  flex: none;
  width: 1.5rem;
  height: 1px;
  background: var(--c-texte-doux);
  transform: translateY(-0.3em);
}

/* ---------- B4 : point culminant « Prioriser avant de multiplier les travaux » ---------- */
.so-prioriser {
  --c-titre: var(--c-blanc);
  --c-focus: var(--c-blanc);
  margin: var(--s-9) calc(-1 * var(--gouttiere)) 0;
  padding: var(--s-8) var(--gouttiere);
  color: var(--c-marine-pale);
  background: var(--c-marine);
}

.so-prioriser h3 {
  color: var(--c-blanc);
}

.so-phrase-forte {
  max-width: 34ch;
  margin-top: var(--s-4);
  font-family: var(--f-titre);
  font-size: var(--fs-accent);
  font-weight: var(--fw-titre);
  line-height: 1.25;
  color: var(--c-blanc);
}

.so-phrase-forte + p {
  margin-top: var(--s-6);
}

.so-prioriser p + p:not(.so-phrase-forte) {
  margin-top: var(--s-3);
}

@media (min-width: 48rem) {
  .so-prioriser {
    margin-inline: 0;
    padding: var(--s-8) clamp(2rem, 1rem + 4vw, 5rem);
    border-radius: var(--r-carte);
  }
}

/* Le principe RFH et sa phrase forte */
.so-principe {
  max-width: 44rem;
  margin-top: var(--s-9);
}

.so-principe > * + * {
  margin-top: var(--s-3);
}

.so-principe__phrase {
  margin-top: var(--s-5);
  font-family: var(--f-titre);
  font-size: var(--fs-accent);
  font-weight: var(--fw-titre);
  line-height: 1.3;
  color: var(--c-marine);
}

.so-principe > .so-principe__phrase {
  margin-top: var(--s-5);
}

/* Transition vers l'étude */
.so-transition {
  max-width: 44rem;
  margin-top: var(--s-8);
  padding-top: var(--s-6);
  border-top: var(--bordure);
}

.so-transition > * + * {
  margin-top: var(--s-3);
}

.so-transition > .so-transition__appel {
  margin-top: var(--s-5);
}

@media (max-width: 37.4375rem) {
  .so-transition__appel .bouton {
    width: 100%;
  }
}

/* ---------- B5 : construire un projet cohérent (éditorial, plus léger que B4) ---------- */
.so-projet__intro {
  max-width: 44rem;
}

.so-projet__intro > * + * {
  margin-top: var(--s-3);
}

.so-projet__visuel {
  max-width: 52rem;
  margin: var(--s-7) auto;
}

.so-projet__parties {
  display: grid;
  gap: var(--s-6);
  margin: 0;
  padding: 0;
  list-style: none;
}

.so-projet__parties li > * + * {
  margin-top: var(--s-2);
}

.so-projet__vision {
  max-width: 40rem;
  margin: var(--s-8) auto 0;
  padding-top: var(--s-6);
  border-top: var(--bordure);
  text-align: center;
}

.so-projet__vision p {
  margin: var(--s-3) auto 0;
  font-family: var(--f-titre);
  font-size: var(--fs-h3);
  font-weight: var(--fw-titre);
  line-height: 1.4;
  color: var(--c-marine);
}

@media (min-width: 56.25rem) {
  .so-projet__parties {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--s-7);
  }
}

/* ---------- B6 : action finale (bloc légèrement différencié, appel le plus visible de la page) ---------- */
.so-final {
  padding-block: calc(var(--s-section) * 1.1);
}

.so-final__parties {
  display: grid;
  gap: var(--s-6);
  margin: 0;
  padding: 0;
  list-style: none;
}

.so-final__parties li > * + * {
  margin-top: var(--s-2);
}

.so-final__appel {
  display: grid;
  justify-items: center;
  gap: var(--s-4);
  margin-top: var(--s-8);
  padding: var(--s-7) var(--s-5);
  border-radius: var(--r-carte);
  background: var(--c-fond);
  text-align: center;
}

.so-final__appel p {
  max-width: 34rem;
}

.so-final__bouton {
  min-height: 3.5rem;
  margin-top: var(--s-2);
  padding-inline: var(--s-7);
}

@media (max-width: 37.4375rem) {
  .so-final__bouton {
    width: 100%;
    padding-inline: var(--s-5);
  }
}

@media (min-width: 56.25rem) {
  .so-final__parties {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--s-7);
  }
}
