/* Page d'accueil — mesures relevées sur la maquette du 13/10 (plan de 1200 px). */

/* ---------- Hero : image + bandeau flottant + titre centré ---------- */
/* Remplit la hauteur de fenêtre sous l’en-tête : au chargement = hero (image + titre) ; « L'agence » seulement en descendant.
   Le bloc .home-hero commence au niveau du <main>, juste sous le header — le bon retrait est la hauteur du bandeau (voir mesure : ≈ --header-height), pas 7rem. */
.home-hero {
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - var(--header-height));
}
.home-hero__frame {
  position: relative;
  margin-top: var(--space-4);
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}   /* cadre blanc : même .container que le portrait « L'agence » + marge au-dessus de la photo */
/* La photo prend l'espace vertical restant dans la zone hero (flex) : hauteur variable selon la fenêtre, plus besoin d'aspect-ratio fixe ici */
.home-hero__media {
  flex: 1 1 auto;
  min-height: 12rem;
  width: 100%;
  height: 100%;
  background: var(--color-bg-soft);
  overflow: hidden;
}
.home-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.home-hero__intro { flex: none; }

/* Bandeau brun en bas à droite de l'image : titre (catégorie au-dessus, alignée à droite) puis description sur 3 lignes */
.home-hero__card {
  position: absolute; right: 0; bottom: 0.8125rem;              /* collé au bord droit, à 13 px du bas */
  display: flex; align-items: center; gap: 0.9375rem;
  width: 33.8125rem;                                             /* 541 px : dégradé de 626 à 1167 px sur la maquette */
  max-width: 100%;
  min-height: 3.625rem;                                          /* 58 px */
  padding: 0.5rem 0.75rem 0.5rem 5.5rem;                         /* le titre démarre à 88 px du bord gauche du dégradé (x = 714 px) */
  background: var(--gradient-hero-card);
  color: var(--color-text-on-dark);
}
/* La vignette entière reste cliquable (lien du bouton rond, invisible : la maquette n'en montre pas ici) */
.home-hero__card-link { position: absolute; inset: 0; }
.home-hero__card .btn-round { position: absolute; inset: 0; width: auto; height: auto; border: 0; border-radius: 0; opacity: 0; }
.home-hero__card .btn-round::before { content: none; }
.home-hero__card-head { flex: none; }
.home-hero__card-text { max-width: 16rem; }
.home-hero__card .project-card__category { text-align: right; font-weight: var(--weight-semibold); }
.home-hero__card-title { font-family: var(--font-serif); font-weight: var(--weight-regular); font-size: var(--fs-title-card); line-height: 1.3; text-align: right; }
.home-hero__card-text { font-size: var(--fs-caption); font-weight: var(--weight-semibold); line-height: 1.45; }

/* Moins d’air sous l’image : le bloc titre/sous-titre ne mange pas la fenêtre — l’image reste l’élément principal, on devine la bande « L’agence » en dessous sans l’avoir en premier plan */
.home-hero__intro { padding: 1rem var(--gutter) 1.25rem; text-align: center; }
.home-hero__title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.7vw, var(--fs-hero));                /* 44 px */
  font-weight: var(--weight-regular);
  line-height: 1.32;
  text-wrap: balance;
}
/* Titre CMS (Studio) : gabarit hero sans classes rt-* héritées du corps éditable */
.home-hero__intro :is(h1, h2, h3).cms-block--title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.7vw, var(--fs-hero));
  font-weight: var(--weight-regular);
  line-height: 1.32;
  text-wrap: balance;
  color: inherit;
  letter-spacing: normal;
}
.home-hero__intro .cms-block--title :where(span, b, strong, i, em, u) {
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  font-style: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: inherit;
}
.home-hero__subtitle { justify-content: center; margin-top: 0; font-size: var(--fs-lead); line-height: 1.5; }

/* ---------- L'agence : bande crème, portrait + titre + texte + bouton ---------- */
.home-approche { background: var(--color-bg-stats); }
.home-approche__inner {
  display: grid;
  /* Colonne photo un peu plus large qu’en maquette (285 px → ~328 px) : rectangle paysage plus lisible à hauteur fixe. */
  grid-template-columns: 20.5rem minmax(0, 1fr);
  column-gap: 3rem;
  padding-block: 3rem;
  align-items: stretch;
}
/* Même hauteur que la colonne texte jusqu’aux zones d’intervention (grille stretch) ; largeur fixe, image en cover. */
.home-approche__portrait {
  align-self: stretch;
  width: 100%;
  min-height: 12rem;
  overflow: hidden;
  background: var(--color-bg-taupe);
}
.home-approche__portrait img,
.home-approche__portrait picture {
  display: block;
  width: 100%;
  height: 100%;
}
.home-approche__portrait img { object-fit: cover; }
.home-approche__body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-top: 0.5rem;
  min-height: 100%;
  min-width: 0;
}
.home-approche__quote {
  font-family: var(--font-serif);
  font-weight: var(--weight-light);
  font-size: clamp(1.5rem, 3.4vw, var(--fs-title-xl));
  line-height: var(--lh-title);
}
.home-approche__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-6); margin-top: 0.375rem; }
.home-approche__text { max-width: 36.5rem; }
.home-approche__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.75rem 1rem; padding-right: 0.875rem; }
/* Lien « Mes prestations » (cta2) sous le cartouche Mon approche, calé à droite */
.home-approche__cta-secondary { display: flex; flex-direction: column; align-items: flex-end; margin-top: 0.625rem; padding-right: 0.875rem; }
.home-approche__cta-secondary .studio-link-slot { display: block; text-align: right; }
.home-approche__text p + p { margin-top: 0.75rem; }
.home-approche__zones {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 1rem;
  margin-top: auto;
  padding-top: 1.25rem;
  font-size: 0.875rem;
}
.home-approche__zones span { opacity: 0.7; }
.home-approche__zones a { text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 1px; }
.home-approche__zones a:hover { color: var(--color-accent); }

/* ---------- Projets coup de cœur : bande taupe + mosaïque ---------- */
.home-projets { background: var(--color-bg-taupe); color: var(--color-text-on-dark); padding-block: 2rem 1.75rem; }   /* 32 px / 28 px */
.home-projets__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-5); flex-wrap: wrap;
  margin-bottom: 2rem;                                            /* 32 px sous le titre */
}
.home-projets__head > div { display: grid; gap: 0.125rem; }

/* ---------- Chiffres clés ---------- */
.home-chiffres { background: var(--color-bg-stats); color: var(--color-accent); }
.home-chiffres__grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-block: 1.5rem 1.875rem;                                  /* 24 px / 30 px */
}
.stat { position: relative; min-height: 5.6875rem; display: grid; justify-items: center; align-content: start; text-align: center; padding-inline: var(--space-4); }
.stat + .stat::before { content: ""; position: absolute; left: 0; top: 0.0625rem; bottom: 0; border-left: var(--border-hair) solid var(--color-accent); }
.stat__value { font-family: var(--font-serif); font-weight: var(--weight-semibold); font-size: clamp(2.5rem, 5vw, var(--fs-stat)); line-height: 1.1; }
.stat__value[data-sign]::first-letter { font-size: 0.6em; font-weight: var(--weight-bold); }   /* le « + » est plus petit que le chiffre (maquette : 30,5 px / 50,8 px) */
.stat__label { font-size: var(--fs-lead); text-transform: uppercase; line-height: 1.2; }
.stat__note { font-size: var(--fs-caption); text-transform: uppercase; line-height: 1.2; }
/* Pastille sous le 3e chiffre : à cheval sur le bas de la bande (maquette : 10 px sous la précision) */
.stat__badge { position: absolute; top: calc(100% + 0.625rem); left: 50%; transform: translateX(-50%); margin: 0; z-index: 1; }
.stat__badge-empty { display: inline-block; padding: 0.25rem 0.75rem; border: 1px dashed currentColor; font-size: var(--fs-caption); }

/* ---------- Avis ---------- */
.home-avis { padding-block: 2.9375rem 4.6875rem; }                 /* 47 px au-dessus du surtitre, 75 px avant le bandeau final */
.home-avis .section-head { --head-aside: 22.0625rem; }
.section-head--tight { padding-bottom: 2.375rem; }                 /* filet à 38 px du titre (maquette) */
.section-head--tight .section-head__main { gap: 0.875rem; }

.reviews { display: grid; grid-template-columns: 361fr 381fr 362fr; margin-top: 2.375rem; }   /* étoiles à 38 px sous le filet */
.reviews__more { display: flex; justify-content: center; margin-top: var(--space-6); }
.review { display: grid; align-content: start; gap: 0.625rem; padding-inline: 1.25rem; }
.review:first-child { padding-left: 0; }
.review + .review { border-left: var(--border-hair) solid var(--color-rule); }
/* Texte d’avis : plus discret qu’un title-quote, 5 lignes max + lien (voir Gabarit avis) */
.review__text {
  margin: 0;
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: var(--weight-regular);
  font-size: clamp(0.8125rem, 1.65vw, 0.9375rem);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
}
.review__text--edit {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
  font-size: var(--fs-quote);
  line-height: var(--lh-quote);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: var(--weight-light);
}
.review__text::before { content: "\201C\00a0"; }
.review__text::after { content: "\00a0\201D"; }
.review__more { margin: 0; }
.review__more-link {
  font-size: var(--fs-caption);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  color: var(--color-accent);
}
.review__more-link:hover { color: var(--color-text); }
.review__by { margin-top: 0.35rem; line-height: 1.35; font-size: 0.8125rem; text-transform: none; letter-spacing: 0.01em; }
.review__sig { font-weight: var(--weight-semibold); }
.review__by strong { font-weight: var(--weight-bold); }
/* Étoiles pleines colorées : 5 × 14 px (maquette 70 × 16) */
.stars {
  display: block; width: 4.375rem; height: 0.875rem; background: var(--color-accent);
  -webkit-mask: url("../icons/star-filled-9d80195a7840043c76c85571ad5b47f9.svg") 0 0 / 0.875rem 0.875rem repeat-x;
          mask: url("../icons/star-filled-9d80195a7840043c76c85571ad5b47f9.svg") 0 0 / 0.875rem 0.875rem repeat-x;
}
/* Emplacement de développement : bien visible, jamais montré au visiteur */
.review--placeholder { outline: 2px dashed #b3261e; outline-offset: -2px; padding: 0.75rem 1.125rem; }
.review--placeholder:first-child { padding-left: 1.125rem; }

/* Studio : ancre des boutons à lien éditable */
.studio-link-slot { display: inline-block; }

/* ---------- Responsive tablette + mobile (≤ 80rem) — hero : image entière (maquette mobile : cadre = largeur utile, pas de rognage) ---------- */
@media (max-width: 80rem) {
  .home-hero { min-height: 0; }
  .home-hero__frame { flex: 0 1 auto; min-height: 0; }
  .home-hero__media {
    flex: none;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: auto;
    overflow: hidden;
    background: transparent;
  }
  .home-hero__media img,
  .home-hero__media picture {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
  }
  .home-hero__media[data-focus] img {
    object-fit: contain;
    transform: none;
    object-position: center;
  }
}

/* ---------- Responsive mobile (≤ 60rem) ---------- */
@media (max-width: 60rem) {
  /* Tablette / téléphone : le bandeau est masqué, c'est toute l'image qui devient le lien du projet */
  .home-hero__card { position: static; width: auto; min-height: 0; padding: 0; background: none; }
  .home-hero__card-head, .home-hero__card-text { display: none; }
  /* Titre « Agence de décoration… » sur 2 lignes : interligne plus serré qu’en desktop (1.32). */
  .home-hero__title { line-height: var(--lh-title); }
  /* Zones d’intervention : retours à la ligne autorisés (évite le débordement horizontal). */
  .home-hero__subtitle {
    font-size: clamp(0.6875rem, 2.85vw, var(--fs-btn));
    line-height: 1.15;
    white-space: normal;
    text-wrap: balance;
    letter-spacing: -0.02em;
  }
  .home-hero__subtitle::before { width: 1.15em; }
  .home-hero__intro { padding-block: var(--space-5) var(--space-6); }

  /* Hero mobile : rectangle 4/3 rempli (cover), comme la préprod — pas un « cadre » avec bandes. */
  .home-hero__media {
    aspect-ratio: 4 / 3;
    height: auto;
    overflow: hidden;
    background: var(--color-bg-soft);
  }
  .home-hero__media img,
  .home-hero__media picture {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
  .home-hero__media[data-focus] img {
    object-fit: cover;
    object-position: var(--fx, 50%) var(--fy, 50%);
    transform: scale(var(--fz, 1));
    transform-origin: var(--fx, 50%) var(--fy, 50%);
  }

  .home-approche__inner { grid-template-columns: 1fr; row-gap: var(--space-4); padding-block: var(--space-6); }
  /* Mobile / tablette : même largeur que la colonne desktop (≈328 px), pas pleine largeur du conteneur. */
  .home-approche__portrait {
    width: 100%;
    max-width: 20.5rem;
    margin-inline: auto;
    min-height: 0;
    align-self: start;
    aspect-ratio: 285 / 192;
    overflow: hidden;
  }
  .home-approche__portrait img,
  .home-approche__portrait picture {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
  .home-approche__body { min-height: 0; padding-top: 0; }
  .home-approche__zones { margin-top: 1.25rem; padding-top: 0; }
  .home-approche__foot { flex-direction: column; align-items: flex-start; }
  .home-approche__actions { padding-right: 0; justify-content: flex-start; }
  .home-approche__cta-secondary { align-items: flex-start; padding-right: 0; }
  .home-approche__cta-secondary .studio-link-slot { text-align: left; }

  .home-projets { padding-block: var(--space-5); }
  .home-projets__head { margin-bottom: var(--space-4); }

  .home-chiffres__grid { grid-template-columns: 1fr; row-gap: var(--space-5); padding-block: var(--space-6); }
  .stat + .stat::before { left: 15%; right: 15%; top: calc(-1 * var(--space-3)); bottom: auto; border-left: 0; border-top: var(--border-hair) solid var(--color-accent); }

  .home-avis { padding-bottom: var(--space-7); }
  .reviews { grid-template-columns: 1fr; row-gap: var(--space-6); }
  .review { padding-inline: 0; }
  .review + .review { border-left: 0; border-top: var(--border-hair) solid var(--color-rule); padding-top: var(--space-5); }
  .review--placeholder, .review--placeholder:first-child { padding: 0.75rem; }
}

/* Présentation courte sous le titre : phrase d'identité (métier, lieu, territoire) */
.home-hero__lead { margin: 0.5rem auto 0; max-width: 46rem; font-size: var(--fs-body); line-height: var(--lh-body); text-wrap: balance; }
