/* =========================================================================
   CAPSHAN, feuille de style unique
   Palette et typographie fournies par le client.
   ========================================================================= */

/* ------------------------------------------------------------- 1. Jetons */
:root {
  /* palette client */
  --bleu: #147bfc;
  --bleu-fonce: #0b5fcb;
  --ciel: #b0c6d2;
  --anthracite: #3a3837;
  --pierre: #a8a39b;
  --jaune: #fad035;
  --info: #8ab6e3; /* bleu clair desature : horizon, fiscalite, acces sous condition */
  --orange: #e48748;
  --blanc: #fff;

  /* declinaisons sombres pour les sections qui remontent sur l'image */
  --nuit: #2a2827;
  --nuit-2: #343130;
  --nuit-3: #403c3a;
  --texte-clair: #edeae6;
  --texte-clair-2: #b6b0a9;

  /* texte sur fond clair */
  --encre: #2a2827; /* le « gris tres fonce » du hero */
  --encre-2: #5c5754;
  --encre-3: #43403d; /* entre les deux : fil d'Ariane et chapo du hero */

  --rayon: 14px;
  --rayon-s: 9px;
  --gouttiere: clamp(20px, 5vw, 48px);
  --largeur: 1180px;
  --entete: 118px;
  /* Remontee visuelle du logo dans l'en-tete. Purement optique : le logo bouge,
     l'en-tete et le reste du site ne bougent pas. Augmenter pour le faire monter,
     mettre une valeur negative pour le faire descendre. */
  --logo-remonte: 8px;
  --ombre: 0 1px 2px rgba(42, 40, 39, 0.06), 0 8px 28px rgba(42, 40, 39, 0.08);
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --police:
    "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* --------------------------------------------------------- 2. Reglages */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--entete) + 24px);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--police);
  font-size: 1.0625rem;
  line-height: 1.72;
  font-weight: 300;
  color: var(--texte-clair);
  background: var(--nuit);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* sans ligatures : la ligature « fi » de Plus Jakarta Sans avale le point du i */
  font-variant-ligatures: no-common-ligatures;
  font-feature-settings: "liga" 0, "clig" 0;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
h1,
h2,
h3,
h4 {
  line-height: 1.2;
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.01em;
}
p {
  margin: 0 0 1.15em;
}
:focus-visible {
  outline: 2.5px solid var(--bleu);
  outline-offset: 3px;
  border-radius: 4px;
}

.contenant {
  width: 100%;
  max-width: var(--largeur);
  margin-inline: auto;
  padding-inline: var(--gouttiere);
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ------------------------------------- 3. Fond montagne fixe + empilement */
/* L'image ne bouge jamais : c'est le contenu sombre qui remonte par-dessus. */
.fond-montagne {
  position: fixed;
  inset: var(--entete) 0 0 0;
  z-index: 0;
  background: #e9edf0 url("../img/montagneciel.jpg") top right/cover no-repeat;
}
.fond-montagne::after {
  /* eclaircit la gouttiere gauche : contraste garanti pour le texte */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(238, 242, 245, 0.86) 0%,
    rgba(238, 242, 245, 0.55) 34%,
    rgba(238, 242, 245, 0) 62%
  );
}
.hero {
  position: relative;
  z-index: 1;
} /* laisse voir le fond fixe */
.apres-hero {
  position: relative;
  z-index: 2;
  background: var(--nuit);
} /* remonte sur l'image */

/* ------------------------------------------------------------ 4. En-tete */
.entete {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--blanc);
  border-bottom: 1px solid rgba(42, 40, 39, 0.07);
}
.entete__barre {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  height: var(--entete);
  max-width: none;
  padding-inline: clamp(18px, 2.6vw, 42px);
}
.marque {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.marque img {
  height: 81px;
  width: auto;
  transform: translateY(calc(-1 * var(--logo-remonte)));
}
.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav a {
  text-decoration: none;
  color: var(--encre-2);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 9px 15px;
  border-radius: var(--rayon-s);
  transition: var(--transition);
  white-space: nowrap;
}
.nav a:hover {
  color: var(--encre);
  background: rgba(42, 40, 39, 0.045);
}
.nav a[aria-current="page"] {
  color: var(--encre);
  font-weight: 700;
}
/* fine ligne verticale qui s'estompe en haut et en bas. Tracee en bordure et non en fond :
   un fond de 1 px peut disparaitre selon sa position (ecrans a 125 %, 150 %...), une bordure
   est toujours rendue sur au moins un pixel physique. */
.nav__sep {
  flex-shrink: 0;
  width: 0;
  height: 20px;
  margin-inline: 4px;
  border-left: 1px solid transparent;
  border-image: linear-gradient(
      to bottom,
      rgba(42, 40, 39, 0),
      rgba(42, 40, 39, 0.3) 50%,
      rgba(42, 40, 39, 0)
    )
    1;
}
.nav a.nav__accent {
  color: var(--bleu);
  font-weight: 700;
  margin-left: 10px;
}
.nav a.nav__accent:hover {
  color: var(--bleu-fonce);
  background: rgba(20, 123, 252, 0.07);
}
.burger {
  display: none;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
}
.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--encre);
  border-radius: 2px;
}
.burger span + span {
  margin-top: 5px;
}

/* ------------------------------------------------------------- 5. Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: var(--rayon-s);
  border: 1.5px solid transparent;
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}
.btn--principal {
  background: var(--bleu);
  color: #fff;
  border-color: var(--bleu);
}
.btn--principal:hover {
  background: var(--bleu-fonce);
  border-color: var(--bleu-fonce);
  transform: translateY(-1px);
}
.btn--secondaire {
  background: var(--anthracite);
  color: #fff;
  border-color: var(--anthracite);
}
.btn--secondaire:hover {
  background: var(--nuit);
  transform: translateY(-1px);
}
.btn--fantome {
  background: transparent;
  color: var(--encre);
  border-color: rgba(42, 40, 39, 0.22);
}
.btn--fantome:hover {
  border-color: var(--encre);
  background: rgba(42, 40, 39, 0.04);
}
.btn--clair {
  background: transparent;
  color: var(--texte-clair);
  border-color: rgba(237, 234, 230, 0.28);
}
.btn--clair:hover {
  border-color: var(--texte-clair);
  background: rgba(237, 234, 230, 0.07);
}
.btn[disabled] {
  opacity: 0.42;
  pointer-events: none;
}

/* ------------------------------------------------------------- 6. Le hero */
.hero__interieur {
  min-height: calc(100vh - var(--entete));
  display: flex;
  align-items: center;
  padding-block: 52px;
}
.hero__texte {
  max-width: 680px;
} /* colonne de gauche, sur le ciel clair */
.hero h1 {
  font-size: clamp(2rem, 3.6vw, 2.6rem);
  color: var(--encre);
  letter-spacing: -0.028em;
  margin: 0 0 24px;
}
.hero h1 em {
  font-style: normal;
  color: var(--bleu);
}
.hero__chapo {
  font-size: clamp(1.05rem, 1.6vw, 1.1875rem);
  color: var(--encre-3);
  line-height: 1.68;
  margin: 0 0 20px;
  max-width: 52ch;
}
.hero__baseline {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--encre);
  margin: 0 0 30px;
  padding: 4px 0 4px 20px;
  border-left: 5px solid var(--bleu);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-bottom: 38px;
}
.hero__reperes {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  font-size: 0.8125rem;
  color: var(--encre-3);
}
.hero__reperes b {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--encre);
  line-height: 1.1;
}
/* hero compact des pages interieures */
.hero--bandeau .hero__interieur {
  min-height: clamp(240px, 38vh, 330px);
  align-items: flex-end;
}
.hero--bandeau .hero__texte {
  max-width: none;
}
.hero--bandeau h1 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.005em;
}
.hero--bandeau .hero__chapo {
  margin-bottom: 0;
  font-size: 1.0625rem;
  max-width: 62ch;
}
@media (min-width: 821px) {
  .hero--bandeau h1 {
    white-space: nowrap;
  }
}

/* Sous 1200 px, le texte deborde sur la montagne : image eclaircie sur toute sa hauteur,
   bordure du bouton fantome renforcee */
@media (max-width: 1199px) {
  /* image eclaircie sur toute sa hauteur : les textes restent lisibles en pleine largeur */
  .fond-montagne::after {
    background: linear-gradient(
      170deg,
      rgba(238, 242, 245, 0.93) 0%,
      rgba(238, 242, 245, 0.72) 45%,
      rgba(238, 242, 245, 0.3) 100%
    );
  }
  .hero .btn--fantome {
    border-color: var(--encre-3);
  }
}
/* Mobile et tablette : textes remontes vers l'en-tete, et la section suivante remonte
   juste sous les reperes au lieu d'attendre la fin d'un hero plein ecran */
@media (max-width: 820px) {
  .hero:not(.hero--bandeau) .hero__interieur {
    align-items: flex-start;
    min-height: 0;
    padding-block: 28px 56px;
  }
  .hero__reperes {
    margin-bottom: 0;
  }
}

/* --------------------------------------------------- 7. Sections sombres */
.section {
  padding-block: clamp(64px, 9vw, 108px);
}
.section--serree {
  padding-block: clamp(44px, 6vw, 72px);
}
.section--pierre {
  background: var(--nuit-2);
}
.section__entete {
  max-width: 660px;
  margin-bottom: clamp(36px, 5vw, 58px);
}
.section__entete--centre {
  margin-inline: auto;
  text-align: center;
}
.surtitre {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--bleu);
  margin: 0 0 15px;
}
.section h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  color: var(--blanc);
  margin-bottom: 16px;
  letter-spacing: -0.022em;
}
.section h2.titre-long {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  line-height: 1.3;
}
.section__entete p {
  color: var(--texte-clair-2);
  font-size: 1.0625rem;
  margin: 0;
}

/* ------------------------------------------------------------- 8. Cartes */
.grille {
  display: grid;
  gap: 20px;
}
.grille--2 {
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
}
.grille--3 {
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
}
.grille--4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.carte {
  background: var(--nuit-2);
  border: 1px solid rgba(237, 234, 230, 0.09);
  border-radius: var(--rayon);
  padding: 26px 26px 28px;
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}
.carte--lien {
  text-decoration: none;
  color: inherit;
}
/* A la souris, un calque pose sur toute la carte prolonge le lien. Au doigt (ecrans
   tactiles), pas de calque : seul le texte flechee est cliquable, pas la carte. */
@media (hover: hover) and (pointer: fine) {
  .carte--lien .carte__fleche::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
  }
  .carte--lien:hover {
    border-color: rgba(20, 123, 252, 0.5);
    background: var(--nuit-3);
    transform: translateY(-3px);
  }
  .carte--lien:hover .carte__fleche {
    gap: 12px;
  }
}
.carte h3 {
  font-size: 1.1875rem;
  color: var(--blanc);
  margin-bottom: 10px;
  letter-spacing: -0.015em;
}
.carte p {
  color: var(--texte-clair-2);
  font-size: 0.9375rem;
  line-height: 1.65;
  margin: 0;
}
.carte__index {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--pierre);
  margin-bottom: 16px;
  display: block;
}
.carte__fleche {
  margin-top: auto;
  padding-top: 20px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--bleu);
  display: flex;
  align-self: flex-start;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  transition: var(--transition);
}
a.carte__fleche:hover {
  color: #5aa6ff;
}
.carte__fleche span {
  transition: var(--transition);
}
.carte__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 14px;
  align-items: center;
}

/* jetons de risque */
.jeton {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  border: 1px solid currentColor;
}
.jeton--1 {
  color: #6fcf97;
}
.jeton--2 {
  color: #9bd4a6;
}
.jeton--3 {
  color: var(--jaune);
}
.jeton--4 {
  color: var(--orange);
}
.jeton--5 {
  color: #f2726f;
}
.jeton--neutre {
  color: var(--pierre);
}
.jeton--bleu {
  color: var(--bleu);
}
.jeton--info {
  color: var(--info);
}
/* sur le ciel clair du bandeau, le jaune et le gris sont illisibles :
   les jetons y prennent un fond sombre, comme sur le reste du site */
.hero .jeton {
  background: rgba(42, 40, 39, 0.88);
  border-color: transparent;
  padding: 6px 13px;
}
.hero .jeton--neutre {
  color: var(--texte-clair);
}
.hero .jeton--bleu {
  color: #5aa6ff;
}

/* frise « La methode » (accueil) : etapes numerotees reliees par un trait */
.methode {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 36px;
}
.methode li {
  position: relative;
  padding-top: 62px;
}
.methode li::before {
  content: "";
  position: absolute;
  top: 21px;
  left: 54px;
  right: -26px;
  height: 1px;
  background: linear-gradient(to right, rgba(20, 123, 252, 0.55), rgba(237, 234, 230, 0.1));
}
.methode li:last-child::before {
  display: none;
}
.methode__num {
  position: absolute;
  top: 0;
  left: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--bleu);
  background: rgba(20, 123, 252, 0.1);
  color: var(--bleu);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.methode h3 {
  font-size: 1.1875rem;
  color: var(--blanc);
  margin: 0 0 10px;
  letter-spacing: -0.015em;
}
.methode p {
  color: var(--texte-clair-2);
  font-size: 0.9375rem;
  line-height: 1.65;
  margin: 0;
}
@media (max-width: 1000px) {
  .methode {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .methode li {
    padding: 8px 0 34px 66px;
  }
  .methode li:last-child {
    padding-bottom: 0;
  }
  .methode li::before {
    top: 52px;
    bottom: 10px;
    left: 21px;
    right: auto;
    width: 1px;
    height: auto;
    background: linear-gradient(to bottom, rgba(20, 123, 252, 0.55), rgba(237, 234, 230, 0.1));
  }
}

/* ------------------------------------------- 9. Corps de fiche redigee */
.fiche {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.sommaire {
  position: sticky;
  top: calc(var(--entete) + 32px);
  max-height: calc(100vh - var(--entete) - 64px);
  overflow-y: auto;
  padding-right: 8px;
}
/* barre de defilement fine et discrete (Chrome, Edge, Safari) */
.sommaire::-webkit-scrollbar {
  width: 5px;
}
.sommaire::-webkit-scrollbar-track {
  background: transparent;
}
.sommaire::-webkit-scrollbar-thumb {
  background: rgba(237, 234, 230, 0.14);
  border-radius: 3px;
}
.sommaire:hover::-webkit-scrollbar-thumb {
  background: rgba(237, 234, 230, 0.28);
}
.sommaire::-webkit-scrollbar-button {
  display: none;
}
/* Firefox (les navigateurs WebKit ignoreraient les regles ci-dessus si on la leur donnait) */
@supports not selector(::-webkit-scrollbar) {
  .sommaire {
    scrollbar-width: thin;
    scrollbar-color: rgba(237, 234, 230, 0.18) transparent;
  }
}
.sommaire__titre {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pierre);
  margin: 0 0 16px;
}
.sommaire ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid rgba(237, 234, 230, 0.13);
}
.sommaire li a {
  display: block;
  padding: 7px 8px 7px 16px;
  margin-left: -3px;
  border-left: 4px solid transparent;
  border-radius: 0 6px 6px 0;
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--texte-clair-2);
  transition: var(--transition);
}
.sommaire li a:hover {
  color: var(--texte-clair);
}
.sommaire li a.actif {
  color: var(--bleu);
  border-left-color: var(--bleu);
  background: rgba(20, 123, 252, 0.1);
  font-weight: 600;
}

.prose h2 {
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--blanc);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.32;
  margin: 52px 0 18px;
  padding-top: 26px;
  border-top: 1px solid rgba(237, 234, 230, 0.1);
}
.prose h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.prose h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--jaune);
  margin: 32px 0 12px;
}
.prose p {
  color: var(--texte-clair-2);
  line-height: 1.78;
  margin: 0 0 1.1em;
}
.prose strong {
  color: var(--texte-clair);
  font-weight: 600;
}

/* encart « ou l'acheter / que loger dedans » */
.encart {
  background: linear-gradient(
    160deg,
    rgba(20, 123, 252, 0.11),
    rgba(20, 123, 252, 0.03)
  );
  border: 1px solid rgba(20, 123, 252, 0.28);
  border-radius: var(--rayon);
  padding: 26px 28px;
  margin: 40px 0;
}
.encart--neutre {
  background: var(--nuit-2);
  border-color: rgba(237, 234, 230, 0.1);
}
.encart h3 {
  font-size: 1rem;
  color: var(--blanc);
  margin: 0 0 6px;
  text-transform: none;
}
.encart > p {
  font-size: 0.875rem;
  color: var(--texte-clair-2);
  margin: 0 0 18px;
}
.acces {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.acces__lien {
  display: flex;
  flex-direction: column;
  gap: 3px;
  height: 100%;
  padding: 12px 16px;
  border-radius: var(--rayon-s);
  background: rgba(237, 234, 230, 0.05);
  border: 1px solid rgba(237, 234, 230, 0.14);
  text-decoration: none;
  transition: var(--transition);
}
.acces__lien b {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--texte-clair);
}
.acces__lien small {
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--texte-clair-2);
}
.acces__lien:hover {
  border-color: var(--bleu);
  background: rgba(20, 123, 252, 0.12);
}

/* ------------------------------------------------------------ 10. Tableaux */
.tableau-cadre {
  overflow-x: auto;
  border-radius: var(--rayon);
  border: 1px solid rgba(237, 234, 230, 0.12);
}
.tableau-cadre::-webkit-scrollbar {
  height: 6px;
}
.tableau-cadre::-webkit-scrollbar-track {
  background: transparent;
}
.tableau-cadre::-webkit-scrollbar-thumb {
  background: rgba(237, 234, 230, 0.2);
  border-radius: 3px;
}
@supports not selector(::-webkit-scrollbar) {
  .tableau-cadre {
    scrollbar-width: thin;
    scrollbar-color: rgba(237, 234, 230, 0.2) transparent;
  }
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 720px;
  font-size: 0.875rem;
}
caption {
  text-align: left;
  padding: 0 0 14px;
  color: var(--texte-clair-2);
  font-size: 0.875rem;
}
th,
td {
  padding: 13px 15px;
  text-align: left;
  border-bottom: 1px solid rgba(237, 234, 230, 0.09);
}
thead th {
  background: var(--nuit-3);
  color: var(--blanc);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
tbody th {
  color: var(--texte-clair);
  font-weight: 700;
  background: rgba(237, 234, 230, 0.03);
}
tbody tr:last-child td,
tbody tr:last-child th {
  border-bottom: 0;
}
td {
  color: var(--texte-clair-2);
}

/* matrice actifs x supports */
.matrice td {
  text-align: center;
  padding: 0;
}
.matrice .case {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  width: 100%;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  padding: 8px 6px;
  transition: var(--transition);
}
.matrice .case--oui {
  color: #8fd6a5;
  background: rgba(111, 207, 151, 0.08);
}
.matrice .case--partiel {
  color: var(--info);
  background: rgba(138, 182, 227, 0.1);
}
.matrice .case--oui:hover,
.matrice .case--partiel:hover {
  background: var(--bleu);
  color: #fff;
}
.matrice .case--non {
  color: #6b6663;
  cursor: default;
}
.matrice thead th {
  font-size: 0.6875rem;
  vertical-align: bottom;
}
.matrice tbody th {
  font-size: 0.8125rem;
}
/* matrice : colonnes de largeur fixe (colgroup), defilement horizontal si l'ecran est etroit,
   colonne des actifs figee a gauche pour garder le reperage */
.matrice {
  table-layout: fixed;
  width: 1082px; /* largeur du contenant moins la bordure du cadre */
  min-width: 1082px;
}
.matrice thead th:not(:first-child) {
  text-align: center;
}
@media (min-width: 700px) {
  .matrice tbody th,
  .matrice thead th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
  }
}
.matrice tbody th {
  background: var(--nuit-2);
}
.matrice-defiler {
  display: none;
  font-size: 0.8125rem;
  color: var(--pierre);
  margin: 0 0 12px;
}
@media (max-width: 1179px) {
  .matrice-defiler {
    display: block;
  }
}
.legende-matrice {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 20px;
  font-size: 0.8125rem;
  color: var(--texte-clair-2);
}
.legende-matrice i {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  margin-right: 8px;
}

/* --------------------------------------------------------- 11. Formulaire */
.champ {
  margin-bottom: 22px;
}
.champ label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--texte-clair-2);
  margin-bottom: 9px;
}
.champ input,
.champ select {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--rayon-s);
  background: var(--nuit);
  border: 1.5px solid rgba(237, 234, 230, 0.18);
  color: var(--blanc);
  font-size: 1.0625rem;
  font-weight: 600;
  transition: var(--transition);
}
.champ input,
.champ select {
  height: 54px;
  line-height: 1.2;
}
.champ select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 44px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23b6b0a9' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 17px center;
  background-size: 12px 8px;
}
.champ select option {
  background: var(--nuit);
  color: var(--blanc);
}
.champ input:focus,
.champ select:focus {
  border-color: var(--bleu);
  outline: 0;
}
.champ__aide {
  font-size: 0.8125rem;
  color: var(--pierre);
  margin: 8px 0 0;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.saisie {
  position: relative;
}
.saisie input {
  padding-right: 44px;
}
.saisie .unite {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--pierre);
  font-weight: 600;
  pointer-events: none;
  font-size: 1.0625rem;
}
.reglages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
  align-items: start;
}

/* questionnaire : hauteurs reservees (calculees en JS) pour que rien ne bouge */
#questionnaire {
  position: relative;
}
.q {
  margin-top: 32px;
}
.q__titre-zone {
  min-height: var(--q-titre, auto);
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* l'espace reserve se place au-dessus, le titre colle aux reponses */
}
.q__zone {
  min-height: var(--q-zone, auto);
}
.q--mesure {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  visibility: hidden;
  pointer-events: none;
}
.q--mesure .q__titre-zone,
.q--mesure .q__zone {
  min-height: 0;
}
.q__nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
}
.q__nav .btn {
  min-width: 150px;
}
.q__num {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--bleu);
  margin-bottom: 12px;
}
.q__titre-zone .q__titre {
  font-size: clamp(1.0625rem, 2vw, 1.3rem);
  color: var(--blanc);
  margin: 0;
  line-height: 1.42;
  letter-spacing: -0.01em;
}
.q__contexte {
  color: var(--texte-clair-2);
  font-size: 1rem;
  margin-bottom: 28px;
  white-space: pre-line;
}
.q__indicateur {
  font-size: 0.8125rem;
  color: var(--pierre);
  margin-top: 26px;
  font-style: italic;
}
.options {
  display: grid;
  gap: 11px;
}
.option {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 17px 20px;
  cursor: pointer;
  background: var(--nuit-2);
  border: 1.5px solid rgba(237, 234, 230, 0.11);
  border-radius: var(--rayon-s);
  transition: var(--transition);
  text-align: left;
  width: 100%;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--texte-clair);
}
.option:hover {
  border-color: rgba(20, 123, 252, 0.55);
  background: var(--nuit-3);
}
.option[aria-pressed="true"] {
  border-color: var(--bleu);
  background: rgba(20, 123, 252, 0.13);
  color: #fff;
}
.option__lettre {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(237, 234, 230, 0.1);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--texte-clair-2);
}
.option[aria-pressed="true"] .option__lettre {
  background: var(--bleu);
  color: #fff;
}

.jauge {
  height: 3px;
  background: rgba(237, 234, 230, 0.12);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 9px;
}
.jauge__barre {
  height: 100%;
  background: var(--bleu);
  width: 0;
  transition: width 0.35s ease;
  border-radius: 2px;
}
.jauge__legende {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--pierre);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}
.lien-reset {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: var(--pierre);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.lien-reset:hover {
  color: var(--texte-clair);
}

/* ------------------------------------------- 12. Resultat & allocations */
.profil-carte {
  background: linear-gradient(150deg, var(--nuit-2), var(--nuit));
  border: 1px solid rgba(20, 123, 252, 0.32);
  border-radius: var(--rayon);
  padding: clamp(28px, 4vw, 44px);
}
.profil-carte h2 {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  margin: 8px 0 14px;
}
.alerte {
  display: flex;
  gap: 15px;
  padding: 20px 24px;
  border-radius: var(--rayon);
  background: rgba(228, 135, 72, 0.11);
  border: 1px solid rgba(228, 135, 72, 0.4);
  margin: 26px 0;
}
.alerte strong {
  color: var(--orange);
  display: block;
  margin-bottom: 5px;
  font-size: 0.9375rem;
}
.alerte p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--texte-clair-2);
}

.allocation {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}
.beignet-bloc {
  text-align: center;
}
.beignet {
  width: 100%;
  max-width: 260px;
  margin-inline: auto;
}
.beignet-legende {
  margin: 14px 0 0;
  line-height: 1.3;
}
.beignet-legende b {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--blanc);
}
.beignet-legende span {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--pierre);
}
.legende {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.legende li {
  display: grid;
  grid-template-columns: 13px minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(237, 234, 230, 0.08);
}
.legende li:last-child {
  border-bottom: 0;
}
.legende .pastille {
  width: 13px;
  height: 13px;
  border-radius: 3px;
}
.legende .nom {
  font-size: 0.9375rem;
  color: var(--texte-clair);
  font-weight: 600;
  text-decoration: none;
}
.legende a.nom:hover {
  color: var(--bleu);
}
.legende .pct {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: var(--blanc);
  font-size: 1rem;
}
.legende .euros {
  font-variant-numeric: tabular-nums;
  color: var(--bleu);
  font-weight: 700;
  font-size: 0.9375rem;
  min-width: 82px;
  text-align: right;
}

/* indicateurs complementaires : une liste a deux colonnes, sans cartes */
.indicateurs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(28px, 5vw, 64px);
  border-top: 1px solid rgba(237, 234, 230, 0.1);
}
.indicateur {
  padding: 18px 0 20px;
  border-bottom: 1px solid rgba(237, 234, 230, 0.1);
}
.indicateur__tete {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.indicateur h4 {
  font-size: 0.6875rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--pierre);
  margin: 0 0 4px;
  font-weight: 700;
}
.indicateur b {
  display: block;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--blanc);
}
.indicateur .indicateur__note {
  margin: 0;
  flex-shrink: 0;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--blanc);
  font-variant-numeric: tabular-nums;
}
.indicateur__jauge {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.indicateur__jauge span {
  height: 5px;
  border-radius: 3px;
  background: rgba(237, 234, 230, 0.12);
  overflow: hidden;
}
.indicateur__jauge i {
  display: block;
  height: 100%;
  background: var(--bleu);
}

/* ------------------------------------------------------- 12 ter. Plan d'epargne */
.plan-saisie .champ {
  max-width: 360px;
}
.plan-saisie__profil {
  font-size: 0.875rem;
  color: var(--texte-clair-2);
  margin: 12px 0 0;
}
.plan-saisie__profil strong {
  color: var(--texte-clair);
  font-weight: 600;
}
.plan-saisie__profil a {
  color: var(--bleu);
}
.etapes {
  list-style: none;
  counter-reset: etape;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
  max-width: 76ch;
}
.etapes li {
  counter-increment: etape;
  position: relative;
  padding-left: 48px;
  color: var(--texte-clair-2);
  line-height: 1.7;
}
.etapes li::before {
  content: counter(etape);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(20, 123, 252, 0.15);
  color: var(--bleu);
  font-size: 0.875rem;
  font-weight: 800;
}
.etapes strong {
  color: var(--texte-clair);
  font-weight: 700;
}
.note-discrete {
  font-size: 0.875rem;
  color: var(--pierre);
  line-height: 1.65;
  max-width: 76ch;
  margin: 0;
}
.note-discrete strong {
  color: var(--texte-clair-2);
  font-weight: 600;
}
.note-discrete--separee {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(237, 234, 230, 0.1);
}

/* ------------------------------------------ 12 bis. Pourquoi cette repartition */
.pourquoi {
  margin-top: 56px;
}
.pourquoi__lead {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--texte-clair);
  max-width: 66ch;
  margin: 0 0 28px;
}
.pourquoi__liste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 15px;
  max-width: 76ch;
}
.pourquoi__liste li {
  position: relative;
  padding-left: 28px;
  color: var(--texte-clair-2);
  line-height: 1.72;
}
.pourquoi__liste li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--bleu);
  transform: rotate(45deg);
}

/* --------------------------------------------------------- 13. Pied de page */
.pied {
  background: #211f1e;
  border-top: 1px solid rgba(237, 234, 230, 0.09);
  padding-block: clamp(48px, 6vw, 72px) 32px;
  position: relative;
  z-index: 2;
}
.pied__haut {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(237, 234, 230, 0.09);
}
.pied__marque img {
  height: 56px;
  width: auto;
  margin-bottom: 18px;
  filter: invert(1) brightness(1.9);
}
.pied__marque p {
  font-size: 0.875rem;
  color: var(--texte-clair-2);
  max-width: 34ch;
  margin: 0;
}
.pied h4 {
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--pierre);
  margin: 0 0 16px;
  font-weight: 700;
}
.pied ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 11px;
}
.pied ul a {
  text-decoration: none;
  font-size: 0.9375rem;
  color: var(--texte-clair-2);
  transition: var(--transition);
}
.pied ul a:hover {
  color: var(--bleu);
}
.pied__bas {
  padding-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--pierre);
}
.avertissement {
  margin-top: 30px;
  font-size: 0.8125rem;
  color: var(--pierre);
  line-height: 1.65;
  max-width: 92ch;
}

/* -------------------------------------------------------- 14. Fil d'Ariane */
.fil {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--encre-3);
  margin-bottom: 20px;
}
.fil a {
  text-decoration: none;
  transition: var(--transition);
}
.fil a:hover {
  color: var(--bleu);
}
.fil span {
  color: var(--encre-3);
}

/* ------------------------------------------------ 14 bis. Bouton « remonter » */
.remonter {
  position: fixed;
  top: calc(var(--entete) + 12px);
  left: 50%;
  z-index: 19;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 6px 18px 6px 6px;
  border-radius: 999px;
  border: 1px solid rgba(237, 234, 230, 0.14);
  background: rgba(42, 40, 39, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  color: var(--texte-clair);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -10px);
  transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.2s ease;
}
.remonter--visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.remonter:hover {
  border-color: rgba(20, 123, 252, 0.6);
}
.remonter__fleche {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bleu);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 800;
}
.remonter__titre {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --------------------------------------------------------- 15. Responsive */
@media (max-width: 1000px) {
  .fiche {
    grid-template-columns: 1fr;
  }
  .sommaire {
    position: static;
    max-height: none;
    margin-bottom: 36px;
    background: var(--nuit-2);
    padding: 20px;
    border-radius: var(--rayon);
  }
  .pied__haut {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}
@media (max-width: 1000px) {
  :root {
    --entete: 96px;
  }
  .marque img {
    height: 62px;
  }
}
@media (max-width: 1240px) {
  .nav {
    gap: 2px;
  }
  .nav a {
    padding: 9px 10px;
  }
}
@media (max-width: 1100px) {
  .burger {
    display: block;
  }
  .nav__sep {
    display: none;
  }
  .nav a.nav__accent {
    margin-left: 0;
  }
  .nav {
    position: absolute;
    top: var(--entete);
    left: 0;
    right: 0;
    background: var(--blanc);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 14px var(--gouttiere) 22px;
    border-bottom: 1px solid rgba(42, 40, 39, 0.1);
    box-shadow: var(--ombre);
    display: none;
  }
  .nav[data-ouvert="true"] {
    display: flex;
  }
  .nav a {
    padding: 13px 12px;
    font-size: 1rem;
  }
  .nav .btn {
    margin: 10px 0 0;
    justify-content: center;
  }
}
@media (max-width: 820px) {
  :root {
    --entete: 84px;
  }
  .marque img {
    height: 54px;
  }
  .allocation {
    grid-template-columns: 1fr;
  }
  .hero__reperes {
    gap: 20px;
  }
  .legende li {
    grid-template-columns: 13px minmax(0, 1fr) auto;
    row-gap: 4px;
  }
  .legende .euros {
    grid-column: 2/4;
    text-align: left;
  }
}
@media (max-width: 560px) {
  body {
    font-size: 1rem;
  }
  .pied__haut {
    grid-template-columns: 1fr;
  }
  .hero__actions .btn {
    width: 100%;
  }
  .hero h1 {
    font-size: 1.75rem;
  }
  .hero__baseline {
    font-size: 1.0625rem;
    padding-left: 14px;
    border-left-width: 4px;
  }
  .hero--bandeau .hero__interieur {
    min-height: 0;
    padding-block: 36px 32px;
  }
  .hero--bandeau h1 {
    font-size: 1.45rem;
  }
  .hero--bandeau .hero__chapo {
    font-size: 0.975rem;
  }
  .section h2 {
    font-size: 1.45rem;
  }
  .section h2.titre-long {
    font-size: 1.3rem;
  }
  .section__entete p {
    font-size: 0.975rem;
  }
  .carte {
    padding: 22px 20px 22px;
  }
  .carte__fleche {
    font-size: 0.875rem;
    padding-block: 18px 4px;
  }
  .prose h2 {
    font-size: 1.125rem;
    margin-top: 40px;
  }
  .prose p {
    line-height: 1.7;
  }
  .encart {
    padding: 20px;
  }
  .acces {
    grid-template-columns: 1fr;
  }
  .profil-carte h2 {
    font-size: 1.75rem;
  }
  .indicateurs {
    grid-template-columns: 1fr;
  }
  /* questionnaire */
  .q {
    margin-top: 24px;
  }
  .q__titre-zone {
    margin-bottom: 18px;
  }
  .options {
    gap: 9px;
  }
  .option {
    padding: 13px 14px;
    gap: 12px;
    font-size: 0.9375rem;
  }
  .q__indicateur {
    font-size: 0.75rem;
    margin-top: 16px;
  }
  .q__nav {
    margin-top: 20px;
  }
  .q__nav .btn {
    flex: 1;
    min-width: 0;
    padding-inline: 12px;
  }
  .jauge__legende {
    font-size: 0.6875rem;
    letter-spacing: 0.04em;
  }
  .remonter {
    font-size: 0.75rem;
  }
  /* tableau du plan : une ligne par poche, empilee, plutot qu'un defilement horizontal */
  .tableau--empile {
    min-width: 0;
  }
  .tableau--empile thead {
    display: none;
  }
  .tableau--empile tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-bottom: 1px solid rgba(237, 234, 230, 0.09);
  }
  .tableau--empile tbody tr:last-child {
    border-bottom: 0;
  }
  .tableau--empile th {
    grid-column: 1 / -1;
    border-bottom: 0;
    background: none;
    padding: 14px 16px 6px;
  }
  .tableau--empile td {
    border-bottom: 0;
    padding: 4px 16px 10px;
    text-align: left !important;
    display: flex;
    flex-direction: column;
  }
  .tableau--empile td::before {
    content: attr(data-libelle);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pierre);
    margin-bottom: 2px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}
@media print {
  .entete,
  .pied,
  .sommaire,
  .fond-montagne {
    display: none;
  }
  body {
    background: #fff;
    color: #000;
  }
}
