/* QuébecGestImmo — feuille de style
   Palette : bleu profond, ardoise, brume, papier, vert registre, lumière des fenêtres.
   Typographie : Instrument Sans, une seule famille pour les titres et le texte. */

@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bleu: #10283f;
  --bleu-nuit: #0b1e31;
  --bleu-doux: #1b3a57;
  --ardoise: #4a6178;
  --brume: #e9eff4;
  --papier: #fbfcfc;
  --blanc: #ffffff;
  --vert: #1e7b5c;
  --vert-clair: #63c9a2;
  --vert-fond: #e2f2eb;
  --vert-texte: #124a37;
  --lumiere: #f2c14e;
  --ligne: #d3dde6;
  --ligne-bande: #c5d2dd;
  --ligne-sombre: rgba(255, 255, 255, 0.18);
  --texte-sur-bleu: #d5e0ea;

  --texte: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --marge: 1.25rem;
  --large: 72rem;
  --colonne: 38rem;
  --entete: 4.25rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--entete) + 1rem);
}

body {
  margin: 0;
  background: var(--papier);
  color: var(--bleu);
  font-family: var(--texte);
  font-size: 1.125rem;
  line-height: 1.6;
}

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

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

svg {
  display: block;
}

:focus-visible {
  outline: 3px solid var(--vert-clair);
  outline-offset: 3px;
  border-radius: 2px;
}

.cadre {
  width: 100%;
  max-width: var(--large);
  margin-inline: auto;
  padding-inline: var(--marge);
}

.saut {
  position: absolute;
  left: -100rem;
  top: 0.5rem;
  z-index: 40;
  background: var(--blanc);
  color: var(--bleu);
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

.saut:focus {
  left: 0.5rem;
}

/* Titres */

h1,
h2 {
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
  font-variant-numeric: lining-nums;
}

h1 {
  font-size: clamp(2.35rem, 6.4vw, 3.75rem);
}

h1 span {
  display: block;
}

h2 {
  font-size: clamp(1.75rem, 4.2vw, 2.6rem);
}

/* Boutons */

.bouton {
  display: inline-block;
  padding: 0.95rem 1.6rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.bouton:hover {
  transform: translateY(-2px);
}

.bouton-clair {
  background: var(--blanc);
  color: var(--bleu);
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, 0.6);
}

.bouton-clair:hover {
  background: var(--vert-fond);
}

.bouton-petit {
  padding: 0.6rem min(1rem, 3.6vw);
  font-size: min(0.9375rem, 4vw);
  box-shadow: none;
  white-space: nowrap;
}

/* En-tête, toujours visible */

.entete {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(16, 40, 63, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--blanc);
  border-bottom: 1px solid var(--ligne-sombre);
}

.entete-rang {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--entete);
}

.marque {
  font-weight: 700;
  font-size: min(1.25rem, 5vw);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.menu {
  display: none;
  gap: 1.75rem;
  font-size: 1rem;
}

.menu a {
  text-decoration: none;
  color: var(--texte-sur-bleu);
  padding-block: 0.25rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.menu a:hover {
  color: var(--blanc);
  border-bottom-color: var(--vert-clair);
}

/* Ouverture */

.ouverture {
  background:
    radial-gradient(52rem 30rem at 88% 8%, rgba(58, 109, 152, 0.55), transparent 62%),
    radial-gradient(40rem 26rem at 0% 100%, rgba(30, 123, 92, 0.22), transparent 60%),
    var(--bleu);
  color: var(--blanc);
  overflow: hidden;
}

.ouverture-grille {
  display: grid;
  gap: 2.5rem;
  padding-block: 2.75rem 2.5rem;
}

.chapeau {
  margin-top: 1.5rem;
  max-width: 36rem;
  font-size: 1.1875rem;
  color: var(--texte-sur-bleu);
}

.appel {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

.appel-note {
  font-size: 1rem;
  color: var(--texte-sur-bleu);
}

.ouverture-fait {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--ligne-sombre);
  max-width: 34rem;
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.4;
  font-variant-numeric: lining-nums;
}

/* Scène illustrée */

.scene {
  position: relative;
  width: 100%;
  max-width: 34rem;
  margin-inline: auto;
}

.scene-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
}

.puce {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.8rem 0.55rem 0.6rem;
  background: var(--blanc);
  color: var(--bleu);
  border-radius: 10px;
  box-shadow: 0 16px 34px -14px rgba(0, 0, 0, 0.65);
  font-size: 0.8125rem;
  line-height: 1.25;
  white-space: nowrap;
}

.puce strong {
  display: block;
  font-weight: 650;
}

.puce small {
  display: block;
  font-size: 0.75rem;
  color: var(--ardoise);
}

.puce sup {
  font-size: 0.7em;
  line-height: 0;
}

.puce-coche,
.coche {
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--vert);
  color: var(--blanc);
}

.puce-coche {
  width: 1.6rem;
  height: 1.6rem;
}

.puce-coche svg,
.coche svg,
.picto svg,
.remonter svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.puce-coche svg {
  width: 0.95rem;
  height: 0.95rem;
  stroke-width: 3;
}

/* Petits écrans : les deux notifications du haut sont empilées au-dessus des immeubles */

.scene {
  padding-top: 4.5rem;
}

.puce-1 {
  top: 0;
  right: 0;
}

.puce-2 {
  top: 3.9rem;
  left: 0;
}

.puce-3 {
  bottom: 13%;
  right: 2%;
}

/* Ce que vous y gagnez : panneau qui chevauche l'ouverture */

.gains {
  position: relative;
  z-index: 2;
  margin-top: -1.5rem;
}

.gains-panneau {
  background: var(--blanc);
  border: 1px solid var(--ligne);
  border-radius: 16px;
  box-shadow: 0 30px 60px -40px rgba(16, 40, 63, 0.6);
  padding: 1.75rem 1.35rem;
}

.gains-panneau h2 {
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  margin-bottom: 1.5rem;
}

.gains-liste {
  display: grid;
  gap: 1.75rem;
}

.gains-liste h3 {
  font-size: 1.3125rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.gains-liste p {
  margin-top: 0.4rem;
  color: var(--ardoise);
  font-size: 1.0625rem;
  font-variant-numeric: lining-nums;
}

.picto.picto-vert {
  background: var(--vert-fond);
  color: var(--vert);
}

/* Blocs */

.bloc {
  padding-block: 4rem;
}

.bloc > h2 {
  margin-bottom: 2rem;
}

.texte h2 {
  margin-bottom: 1.5rem;
}

.texte p + p {
  margin-top: 1.1rem;
}

.texte {
  max-width: var(--colonne);
}

/* Services */

.services {
  display: grid;
  gap: 1rem;
}

.service {
  position: relative;
  padding: 1.35rem 1.35rem 1.45rem;
  background: var(--blanc);
  border: 1px solid var(--ligne);
  border-radius: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.service:hover {
  border-color: var(--vert-clair);
  box-shadow: 0 18px 36px -26px rgba(16, 40, 63, 0.55);
  transform: translateY(-3px);
}

.picto {
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 10px;
  background: var(--brume);
  color: var(--bleu);
  margin-bottom: 1rem;
}

.picto svg {
  width: 1.5rem;
  height: 1.5rem;
  stroke-width: 1.75;
}

.service h4 {
  font-size: 1.1875rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.service p {
  margin-top: 0.4rem;
  color: var(--ardoise);
  font-size: 1.0625rem;
}

.groupe {
  font-size: 1.1875rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin: 2.25rem 0 1rem;
}

h2 + .groupe {
  margin-top: 0;
}

.groupe-note {
  margin: -0.5rem 0 1.1rem;
  max-width: var(--colonne);
  color: var(--ardoise);
  font-size: 1.0625rem;
}

.service-option {
  background: var(--papier);
  border-style: dashed;
  border-color: #b9c8d6;
}

.etiquette {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: var(--brume);
  color: var(--ardoise);
  font-size: 0.8125rem;
  font-weight: 600;
}

.engagement {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-top: 2.25rem;
  padding: 1.5rem 1.35rem;
  border-radius: 14px;
  background: var(--bleu);
  color: var(--texte-sur-bleu);
}

.engagement-titre {
  color: var(--blanc);
  font-weight: 650;
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
}

.engagement p:not(.engagement-titre) {
  max-width: 44rem;
  font-size: 1.0625rem;
}

/* Entre vos mains */

.bande {
  background: var(--brume);
  padding-block: 3.5rem;
}

.bande h2 {
  margin-bottom: 1.75rem;
}

.mains {
  display: grid;
  gap: 0.85rem;
}

.mains li {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.1rem 1.15rem;
  background: var(--blanc);
  border-radius: 12px;
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.3;
}

.coche {
  width: 2rem;
  height: 2rem;
}

.coche svg {
  width: 1.1rem;
  height: 1.1rem;
  stroke-width: 3;
}

/* Méthode et dossier */

.deux {
  display: grid;
  gap: 3rem;
}

.dossier-pile {
  position: relative;
  max-width: 28rem;
}

.dossier-pile::before,
.dossier-pile::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: var(--blanc);
  border: 1px solid var(--ligne);
}

.dossier-pile::before {
  transform: rotate(-3deg) translate(-6px, 8px);
  background: var(--brume);
}

.dossier-pile::after {
  transform: rotate(2deg) translate(6px, 4px);
}

.dossier {
  position: relative;
  z-index: 1;
  background: var(--blanc);
  border: 1px solid var(--ligne);
  border-radius: 12px;
  box-shadow: 0 24px 48px -30px rgba(16, 40, 63, 0.55);
  overflow: hidden;
}

.dossier figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.15rem;
  background: var(--bleu);
  color: var(--blanc);
}

.dossier-titre {
  font-weight: 600;
  font-size: 1.0625rem;
}

.dossier-mention {
  font-size: 0.875rem;
  color: var(--texte-sur-bleu);
  white-space: nowrap;
}

.dossier-lignes li {
  display: grid;
  grid-template-columns: 4.6rem 1fr;
  gap: 0.25rem 0.9rem;
  padding: 0.95rem 1.15rem;
  border-top: 1px solid var(--ligne);
  font-size: 1rem;
  line-height: 1.45;
}

.dossier-lignes li:first-child {
  border-top: 0;
}

.dossier-lignes time {
  color: var(--ardoise);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dossier-lignes sup {
  font-size: 0.7em;
  line-height: 0;
}

.etat {
  grid-column: 2;
  justify-self: start;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: var(--vert-fond);
  color: var(--vert-texte);
}

/* Cas concret */

.cas {
  background:
    radial-gradient(46rem 26rem at 100% 0%, rgba(58, 109, 152, 0.4), transparent 60%),
    var(--bleu);
  color: var(--blanc);
  padding-block: 4rem;
}

.cas-photo {
  display: block;
  margin-top: 2rem;
}

.cas-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

.comparaison {
  margin-top: 2.25rem;
}

.rang {
  display: grid;
  gap: 0.4rem;
  padding-block: 0.9rem;
}

.rang-nom {
  color: var(--texte-sur-bleu);
  font-size: 1rem;
}

.rang-piste {
  height: 1.5rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
}

.barre {
  display: block;
  height: 100%;
  width: var(--part);
  border-radius: 4px;
  transform-origin: left center;
}

.barre-avant {
  background: #7b93aa;
}

.barre-apres {
  background: linear-gradient(90deg, #3fae86, var(--vert-clair));
}

.rang-somme {
  font-weight: 650;
  letter-spacing: -0.02em;
  font-size: clamp(2rem, 7vw, 3.1rem);
  line-height: 1.05;
  font-variant-numeric: lining-nums tabular-nums;
}

.comparaison figcaption {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  color: var(--texte-sur-bleu);
}

.cas-recit {
  margin-top: 2.5rem;
  max-width: var(--colonne);
  color: var(--texte-sur-bleu);
}

.cas-recit p + p {
  margin-top: 1.1rem;
}

.cas-recit .cas-reserve {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ligne-sombre);
  color: var(--blanc);
}

/* Parcours */

.parcours {
  display: grid;
  gap: 1.75rem;
}

.portrait {
  position: relative;
  display: block;
  max-width: 15rem;
}

.portrait::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: var(--vert-fond);
  transform: translate(14px, 14px);
}

.portrait img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.parcours-entree {
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* Fin */

.fin {
  background:
    radial-gradient(44rem 24rem at 12% 110%, rgba(30, 123, 92, 0.35), transparent 62%),
    radial-gradient(40rem 22rem at 95% -10%, rgba(58, 109, 152, 0.45), transparent 60%),
    var(--bleu);
  color: var(--blanc);
  padding-block: 4.5rem;
}

.fin h2 {
  font-size: clamp(2.1rem, 6vw, 3.4rem);
}

.fin p {
  margin-top: 1.25rem;
  max-width: 34rem;
  color: var(--texte-sur-bleu);
}

.fin .bouton {
  margin-top: 2rem;
}

.fin .fin-courriel {
  margin-top: 1.25rem;
  font-size: 1.0625rem;
  color: var(--blanc);
}

.fin-courriel a {
  text-decoration-color: var(--vert-clair);
  text-underline-offset: 0.25em;
}

/* Pied */

.pied {
  background: var(--bleu-nuit);
  color: var(--texte-sur-bleu);
  padding-block: 2.5rem;
  font-size: 0.9375rem;
}

.pied-rang {
  display: grid;
  gap: 1.25rem;
}

.pied .marque {
  font-size: 1.25rem;
  color: var(--blanc);
  margin-bottom: 0.25rem;
}

/* Bouton pour remonter */

.remonter {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 25;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--bleu);
  color: var(--blanc);
  border: 2px solid var(--blanc);
  box-shadow: 0 12px 26px -12px rgba(16, 40, 63, 0.8);
  transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.15s ease;
}

.remonter:hover {
  background: var(--vert);
}

.remonter svg {
  width: 1.35rem;
  height: 1.35rem;
  stroke-width: 2.25;
}

.js .remonter:not(.est-visible) {
  opacity: 0;
  transform: translateY(0.75rem);
  pointer-events: none;
}

/* Mouvement : uniquement si le visiteur ne l'a pas désactivé */

@media (prefers-reduced-motion: no-preference) {
  .js [data-apparait] {
    opacity: 0;
    transform: translateY(1.25rem);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: calc(var(--i, 0) * 70ms);
  }

  .js [data-apparait].est-visible {
    opacity: 1;
    transform: none;
  }

  .js .service.est-visible {
    transition: opacity 0.6s ease, transform 0.25s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    transition-delay: 0s;
  }

  .js .comparaison .barre {
    transform: scaleX(0);
    transition: transform 1.1s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .js .comparaison.est-visible .barre {
    transform: scaleX(1);
  }

  .js .comparaison.est-visible .barre-apres {
    transition-delay: 0.35s;
  }

  .ouverture-texte > * {
    animation: entree 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .ouverture-texte > :nth-child(2) {
    animation-delay: 0.1s;
  }

  .ouverture-texte > :nth-child(3) {
    animation-delay: 0.2s;
  }

  .ouverture-texte > :nth-child(4) {
    animation-delay: 0.3s;
  }

  .scene-photo {
    display: block;
    animation: entree 0.9s 0.15s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .puce {
    animation: puce 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
  }

  .puce-1 { animation-delay: 1.1s; }
  .puce-2 { animation-delay: 1.7s; }
  .puce-3 { animation-delay: 2.3s; }
}

@keyframes entree {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
}

@keyframes puce {
  from {
    opacity: 0;
    transform: translateY(0.75rem) scale(0.94);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .bouton:hover,
  .service:hover {
    transform: none;
  }
}

/* Écrans moyens */

@media (min-width: 46rem) {
  :root {
    --marge: 2.5rem;
  }

  .menu {
    display: flex;
  }

  .ouverture-grille {
    padding-block: 4rem 3.5rem;
  }

  .chapeau {
    font-size: 1.25rem;
  }

  .scene {
    padding-top: 0;
  }

  .puce-1 {
    top: -5%;
  }

  .puce-2 {
    top: 8%;
    left: -4%;
  }

  .puce {
    font-size: 0.9375rem;
    padding: 0.65rem 1rem 0.65rem 0.7rem;
  }

  .puce small {
    font-size: 0.8125rem;
  }

  .bloc {
    padding-block: 5.5rem;
  }

  .services {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .gains {
    margin-top: -2.5rem;
  }

  .gains-panneau {
    padding: 2.25rem 2.25rem 2.5rem;
  }

  .gains-liste {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.25rem;
  }

  .engagement {
    padding: 1.75rem 2rem;
    align-items: center;
  }

  .mains {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }

  .mains li {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
    font-size: 1.25rem;
  }

  .rang {
    grid-template-columns: 15rem 1fr;
    grid-template-areas:
      "nom piste"
      ". somme";
    column-gap: 1.5rem;
    align-items: center;
  }

  .rang-nom {
    grid-area: nom;
  }

  .rang-piste {
    grid-area: piste;
    height: 2rem;
  }

  .rang-somme {
    grid-area: somme;
  }

  .comparaison figcaption {
    margin-left: 16.5rem;
  }

  .cas,
  .fin {
    padding-block: 6rem;
  }

  .pied-rang {
    grid-template-columns: 1fr auto;
    align-items: end;
  }

  .pied-mentions {
    text-align: right;
  }

  .remonter {
    right: 1.5rem;
    bottom: 1.5rem;
  }
}

/* Grands écrans */

@media (min-width: 64rem) {
  .ouverture-grille {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
    gap: 3rem;
    padding-block: 5rem 4.5rem;
  }

  .scene {
    max-width: none;
  }

  .services {
    grid-template-columns: repeat(4, 1fr);
  }

  .deux {
    grid-template-columns: minmax(0, 1fr) minmax(0, 27rem);
    gap: 5rem;
    align-items: center;
  }

  .parcours {
    grid-template-columns: 17rem 1fr;
    grid-template-areas:
      "portrait titre"
      "portrait texte";
    grid-template-rows: auto 1fr;
    gap: 1.5rem 4.5rem;
    align-items: start;
  }

  .parcours h2 {
    grid-area: titre;
  }

  .parcours .portrait {
    grid-area: portrait;
    max-width: none;
  }

  .parcours .texte {
    grid-area: texte;
  }

  .cas-recit {
    margin-left: 16.5rem;
  }
}
