/* ==========================================================================
   Chalet Victory — page Services (/services, /en/services)
   Valeurs relevées dans le CSS Framer de la page (classes .framer-zUK7l …) :
   desktop ≥ 1200 · tablette 810–1199 · mobile ≤ 809.
   ========================================================================== */

/* Ressort Framer 320 / 64 (sur-amorti) du texte du héros, échantillonné (fin à 99,9 % : 1,28 s) */
:root {
  --svc-ease-line: cubic-bezier(.2, .75, .25, 1);
  --svc-dur-line: 1.28s;
}
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --svc-ease-line: linear(0, .0898, .2251, .3478, .4522, .5401, .6139, .6759, .7279, .7716, .8082, .839, .8648, .8865, .9047, .92, .9329, .9436, .9527, .9603, .9667, .972, .9765, .9803, .9834, .9861, .9883, .9902, .9918, .9931, .9942, .9951, .9959, .9966, .9971, .9976, .998, .9983, .9986, .9988, 1);
  }
}

/* ------------------------------------------------------------------ héros */
/* Framer « Hero » : 77vh, image posée sous le header (top 77 px), voile noir 20 %, contenu centré */
.svc-hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 77vh;
  overflow: hidden;
}
.svc-hero__media {
  position: absolute;
  inset: 77px 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.svc-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.svc-hero__overlay {
  position: relative;
  display: flex;
  flex: 1 0 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 0;
  background-color: var(--c-black-20);
  overflow: hidden;
}
.svc-hero__title { flex: none; color: var(--c-white); white-space: pre; }
.svc-hero__details { display: flex; justify-content: center; width: 100%; overflow: hidden; }
.svc-hero__text { width: 500px; max-width: 100%; color: var(--c-white); text-align: center; white-space: pre-wrap; overflow-wrap: break-word; }

/* Apparition ligne par ligne (Framer « Appear », découpage « line ») : voir assets/js/pages/services.js.
   Avant le découpage le texte est masqué ; filet de sécurité : il réapparaît après 3 s si le script ne tourne pas. */
html.js .svc-hero__text:not(.is-split) { opacity: .001; animation: svc-show 0s 3s forwards; }
@keyframes svc-show { to { opacity: 1; } }
.svc-ch { display: inline-block; }
html.js .svc-hero__text.is-split .svc-ch {
  opacity: .001;
  transform: translateY(7px);
  transition: opacity var(--svc-dur-line) var(--svc-ease-line), transform var(--svc-dur-line) var(--svc-ease-line);
  transition-delay: var(--svc-d, 0s);
}
html.js .svc-hero__text.is-in .svc-ch { opacity: 1; transform: none; }
html.js .svc-hero__text.is-done .svc-ch { transition: none; }

/* ----------------------------------------------------------- Services inclus */
.svc-incl {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 50px 30px;
  overflow: hidden;
}
.svc-incl__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  width: 100%;
  max-width: 1590px;
  overflow: hidden;
}
.svc-incl__head {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
  padding-bottom: 10px;
  box-shadow: inset 0 -1px 0 var(--c-black-20);   /* filet Framer dessiné par-dessus (n'ajoute pas de hauteur) */
  overflow: hidden;
}
.svc-incl__title { white-space: pre; }
.svc-incl__grid { display: flex; align-items: flex-start; gap: 20px; width: 100%; overflow: hidden; }
.svc-card {
  display: flex;
  flex: 1 0 0;
  flex-direction: column;
  align-items: stretch;
  gap: 20px;
  min-width: 0;
  overflow: hidden;
}
.svc-card__media { position: relative; flex: none; width: 100%; height: 300px; border-radius: var(--radius); }
.svc-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  object-position: center;
}
.svc-card__title {
  padding-bottom: 10px;
  box-shadow: inset 0 -1px 0 var(--c-black-20);
  font-family: var(--f-display);
  font-size: 18px;
  line-height: 1.1em;
  color: var(--c-black-75);
  white-space: pre;
  overflow: hidden;
}
.svc-card__text {
  font-family: var(--f-body);
  font-size: 18px;
  line-height: 1.4em;
  color: var(--c-black);
  white-space: pre-wrap;   /* comme les textes Framer : espaces de fin de ligne conservés */
  overflow-wrap: break-word;
}
.svc-card--welcome .svc-card__text { max-width: 367.5px; }

/* --------------------------------------------------------------- Conciergerie */
/* Framer : bloc de 480 px de haut. Hauteur minimale ici : vers 810 px de large le texte passe sur 4 lignes et Framer
   rognait le haut du texte et le bouton « Contact » ; le cadre crème s'agrandit au besoin (rendu inchangé sinon). */
.svc-conc {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 480px;
  padding: 50px 30px;
  overflow: hidden;
}
.svc-conc__box {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  max-width: 1590px;
  padding: 20px 0;
  background-color: var(--c-cream);
  overflow: hidden;
}
.svc-conc__text {
  width: 65%;
  max-width: 100%;
  font-family: var(--f-display);
  font-size: 40px;
  line-height: 2em;
  text-align: center;
  color: var(--c-black-75);
  white-space: pre-wrap;
  overflow-wrap: break-word;
}
.svc-conc__rule { display: block; flex: none; width: 298px; max-width: 100%; height: 1px; background-color: var(--c-black-20); }

/* ---------------------------------------------------------- Services en plus */
.svc-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 50px 30px;
  background-color: var(--c-white);
  overflow: hidden;
}
.svc-more__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 1590px;
  overflow: hidden;
}
.svc-more__head { position: relative; z-index: 1; display: flex; width: 100%; padding: 30px; overflow: hidden; }
.svc-more__title { color: var(--c-taupe); white-space: pre; }
.svc-more__list { display: flex; flex: none; flex-direction: column; align-items: flex-start; width: 100%; overflow: hidden; }
.svc-row {
  display: flex;
  flex: none;
  justify-content: center;   /* Framer « place-content: flex-start center » (sans effet visible : les lignes s'allongent au lieu de déborder) */
  align-items: flex-start;
  gap: 40px;
  width: 100%;
  padding: 30px;
  box-shadow: inset 0 1px 0 var(--c-cream);   /* filet haut crème (Framer, par-dessus) */
  overflow: hidden;
}
.svc-row__title {
  flex: 1 0 0;
  min-width: 0;
  font-family: var(--f-display);
  font-size: 52px;
  line-height: 1.1em;
  color: var(--c-taupe);
  white-space: pre-wrap;
  overflow-wrap: break-word;
}
.svc-row__items {
  display: grid;
  flex: 1 0 0;
  align-self: stretch;
  grid-template-columns: repeat(2, minmax(50px, 1fr));
  grid-template-rows: repeat(2, min-content);
  grid-auto-rows: min-content;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}
.svc-row--life .svc-row__items { grid-template-rows: repeat(3, min-content); }
.svc-row__items li {
  place-self: start;
  width: 100%;
  font-family: var(--f-body);
  font-size: 18px;
  line-height: 1.4em;
  color: var(--c-taupe);
  white-space: pre-wrap;
  overflow-wrap: break-word;
}
.svc-row__media { position: relative; flex: none; width: 400px; height: 200px; border-radius: var(--radius); }
.svc-row__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  object-position: center;
}
/* desktop 1200–1310 px : « Transportation » (EN) ne tenait pas dans sa colonne (Framer : « Transportatio / n ») ;
   le titre se réduit juste assez dans cette plage (52 px au-delà) */
@media (min-width: 1200px) {
  .svc-row__title { font-size: min(52px, calc((100vw - 600px) * .0735)); }
}
.svc-row--life .svc-row__media img { object-position: center bottom; }
.svc-row--transport .svc-row__media img { object-position: center top; }
.svc-row--booking .svc-row__media img { object-position: 80% 50%; }

/* ================================================================ tablette + mobile */
@media (max-width: 1199px) {
  .svc-incl__grid { flex-direction: column; }
  .svc-card { flex: none; width: 100%; }
  .svc-card__title { font-size: 16px; }
  .svc-card--cleaning .svc-card__title { font-size: 18px; }   /* Framer : seul « Service Ménage » garde 18 px en tablette */

  .svc-row { flex-direction: column; }
  .svc-row__title { flex: none; width: 100%; font-size: 42px; }
  .svc-row__items { align-self: auto; width: 100%; }
  .svc-row__media { flex: 1 0 0; width: 100%; height: auto; min-height: 0; }
  .svc-row--delivery .svc-row__media { flex: none; width: 400px; height: 200px; }   /* image fixe 400 × 200 (Framer) */
}

/* tablette seule : Framer fixe le bloc à 1800 px (4 lignes égales de 418,45 px) et coupe ce qui dépasse
   (« Presse », « Matériel et forfait de ski »). Ici chaque ligne garde cette hauteur comme minimum et s'allonge si
   son contenu l'exige : rendu identique tant que tout tient, aucune ligne de liste coupée sinon. */
@media (min-width: 810px) and (max-width: 1199px) {
  .svc-card--welcome .svc-card__text { max-width: 100%; }   /* en mobile Framer garde 367,5 px */
  .svc-card--comfort .svc-card__media img { object-position: 30% 56.1%; }
  .svc-more__list { flex: none; }
  .svc-row { flex: none; gap: 20px; min-height: calc((1800px - 106.2px - 20px) / 4); }   /* (bloc − titre − gap) / 4 */
  .svc-row--life { align-items: center; }
  .svc-row__items { flex: 1 0 0; min-height: auto; overflow: visible; }   /* jamais plus petite que son contenu */
  .svc-row--booking .svc-row__items { flex: none; grid-template-rows: repeat(1, min-content); }
  .svc-row__media { min-height: 120px; }
}

/* ================================================================== mobile */
@media (max-width: 809px) {
  .svc-card__title, .svc-card--cleaning .svc-card__title { font-size: 13px; }
  .svc-card__text { font-size: 13px; }

  .svc-conc__text { font-size: 17px; }

  /* Titres sur une ligne chez Framer (white-space: pre) : rognés sous ~370 px (« Services sur mesure »,
     « Additional Services ») ; ici ils passent à la ligne s'ils ne tiennent pas (identiques sinon). */
  .svc-hero__title { max-width: 100%; text-align: center; white-space: pre-wrap; }

  /* Framer : lignes de 462 px de haut, listes coupées (« Gestion des bagages », « Presse »…) et image Livraison
     de 400 px qui déborde. Ici 462 px est une hauteur minimale : la ligne s'allonge si la liste l'exige, l'image
     garde au moins 120 px et l'image Livraison tient dans la colonne. */
  .svc-row { min-height: 462px; }
  .svc-row__title { font-size: 33px; }
  .svc-row__items { flex: 1 0 0; min-height: auto; overflow: visible; }
  .svc-row--life .svc-row__items, .svc-row--booking .svc-row__items { flex: none; }
  .svc-row__media { min-height: 120px; }
  .svc-row--delivery .svc-row__media { width: min(400px, 100%); }
}

/* « Additional Services » déborde sur la marge droite du bloc (rendu Framer) et n'est rogné que sous 374 px */
@media (max-width: 374px) {
  .svc-more__title { min-width: 0; white-space: pre-wrap; }
}
/* très petits écrans : titres de ligne réduits juste assez (« Transportation ») et listes sur une colonne
   (« Gouvernante », « Housekeeper », « Restaurants » étaient coupés au milieu du mot) */
@media (max-width: 349px) {
  .svc-row__title { font-size: min(33px, calc((100vw - 120px) * .147)); }
  .svc-row__items { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html.js .svc-hero__text:not(.is-split), html.js .svc-hero__text.is-split .svc-ch { opacity: 1; transform: none; transition: none; animation: none; }
}
