/* ==========================================================================
   KF BTP — components shared by several pages: gallery, lightbox, CTA block
   ========================================================================== */

/* ---------- Gallery ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
/* Gallery filters stay at the top of the scroller while their section is on screen */
.card > .filters {
  position: sticky;
  top: 8px;
  z-index: 6;
  width: fit-content;
  max-width: calc(100% + 12px);
  margin: 0 0 clamp(18px, 2.2vw, 28px) -6px; /* the 6px pill padding hangs outside, so buttons line up with the title */
  padding: 6px;
  border-radius: 999px;
  transition: background var(--fast), box-shadow var(--fast);
}
.card > .filters.is-stuck {
  background: rgba(15, 20, 22, 0.82);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: inset 0 0 0 1px var(--line), 0 14px 30px -18px rgba(0, 0, 0, 0.8);
}
/* Less space between the gallery title and its filters */
.card > .section-head:has(+ .filters-sentinel, + .filters) { margin-bottom: 14px; }
/* the sentinel main.js uses to detect the stuck state */
.filters-sentinel { height: 1px; margin-bottom: -1px; }
.filters button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: var(--muted);
  transition: background var(--fast), color var(--fast), box-shadow var(--fast);
}
.filters button:hover { color: var(--text); }
.filters button[aria-pressed="true"] { background: var(--text); color: var(--accent-ink); box-shadow: none; }

.works {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: clamp(150px, 17vw, 230px);
  grid-auto-flow: dense;
  gap: clamp(10px, 1.2vw, 16px);
}
.work { position: relative; border-radius: var(--radius-sm); overflow: hidden; background: var(--card-raised); }
.work.is-wide { grid-column: span 2; }
.work.is-tall { grid-row: span 2; }
.work.is-big { grid-column: span 2; grid-row: span 2; }
.work[hidden] { display: none; }
.work.is-entering { animation: work-in 500ms var(--ease); }
@keyframes work-in { from { opacity: 0; transform: scale(0.96); } }
.work__btn { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.work img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 900ms var(--ease);
}
.work figcaption {
  position: absolute; inset: auto 0 0 0;
  display: flex; flex-direction: column; gap: 2px;
  padding: 40px 16px 14px;
  background: linear-gradient(180deg, transparent, rgba(10, 14, 16, 0.85));
  pointer-events: none;
  transform: translateY(8px);
  opacity: 0;
  transition: opacity 400ms var(--ease), transform 400ms var(--ease);
}
.work figcaption .label { color: var(--accent); }
.work figcaption strong { font-weight: 600; font-size: var(--text-sm); }
.work:hover img, .work:focus-within img { transform: scale(1.05); }
.work:hover figcaption, .work:focus-within figcaption { opacity: 1; transform: none; }
.works__more { display: flex; justify-content: center; margin-top: clamp(28px, 3.5vw, 44px); }

/* ---------- Lightbox ---------- */
.lightbox {
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh; /* 100vh ends under the mobile browser toolbar */
  max-width: none; max-height: none;
  margin: 0; padding: 0;
  border: 0;
  background: rgba(10, 14, 16, 0.94);
  color: var(--text);
}
.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; animation: fade 300ms var(--ease); }
@keyframes fade { from { opacity: 0; } }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; padding: 16px var(--gutter); }
.lightbox__stage { display: grid; place-items: center; min-height: 0; padding: 0 var(--gutter); }
.lightbox__stage img { max-width: 100%; max-height: calc(100dvh - 180px); object-fit: contain; border-radius: var(--radius-sm); }
.lightbox__foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px var(--gutter) 24px; }
.icon-btn {
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: background var(--fast);
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.1); }
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- CTA ---------- */
/* Rounded panel over a darkened villa photo; text on the left, glass card on the right */
.cta__panel {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4.5vw, 64px);
  align-items: center;
  padding: clamp(28px, 4.5vw, 64px);
  border-radius: var(--radius);
  overflow: hidden;
  isolation: isolate;
  box-shadow: inset 0 0 0 1px var(--line), 0 40px 80px -50px rgba(0, 0, 0, 0.8);
}
.cta__media { position: absolute; inset: 0; z-index: -1; }
.cta__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.cta__media::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 17, 20, 0.94) 0%, rgba(12, 17, 20, 0.8) 45%, rgba(12, 17, 20, 0.55) 100%),
    radial-gradient(90% 80% at 100% 0%, rgba(217, 196, 160, 0.16), transparent 60%);
}
.cta__title { font-size: clamp(1.8rem, 1rem + 3.4vw, 3.8rem); }
.cta__lead { margin-top: 18px; max-width: 46ch; color: rgba(238, 240, 238, 0.78); }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.cta__side {
  padding: clamp(20px, 2.4vw, 30px);
  border-radius: var(--radius-sm);
  background: rgba(15, 20, 22, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px rgba(217, 196, 160, 0.26);
}
.cta__side-title { margin-bottom: 8px; color: var(--accent); }
.cta .free-list li { padding: 12px 0; }
.cta .free-list li:first-child { border-top: 0; }
.free-list .free-list__icon {
  margin-left: 0; /* the "Offert" pill is the only item pushed right */
  display: grid; place-items: center;
  width: 40px; height: 40px; flex: none;
  border-radius: 50%;
  background: rgba(217, 196, 160, 0.12);
  box-shadow: inset 0 0 0 1px rgba(217, 196, 160, 0.25);
}
.free-list__icon svg { width: 18px; height: 18px; }
.cta .free-list span.label {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(217, 196, 160, 0.14);
}
/* Phone takes its natural width, the (longer) email gets the rest */
.cta .cta__contact { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; margin-top: 18px; }
.cta .cta__contact a {
  display: flex; align-items: center; gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 1rem;
  transition: box-shadow var(--fast), background var(--fast), transform var(--fast) var(--ease);
}
.cta .cta__contact a:hover { color: inherit; background: rgba(217, 196, 160, 0.08); box-shadow: inset 0 0 0 1px rgba(217, 196, 160, 0.45); transform: translateY(-2px); }
.cta__contact-icon {
  display: grid; place-items: center;
  width: 36px; height: 36px; flex: none;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
}
.cta .cta__contact-icon svg { width: 16px; height: 16px; color: inherit; }
.cta .cta__contact a > span:last-child { display: grid; gap: 1px; min-width: 0; }
.cta .cta__contact small { color: var(--muted); }
.cta .cta__contact strong { font-weight: 600; font-size: 0.95rem; overflow-wrap: anywhere; }
.free-list { display: grid; gap: 0; }
.free-list li {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.free-list li:first-child { border-top: 1px solid var(--line); }
.free-list svg { width: 22px; height: 22px; flex: none; color: var(--accent); }
.free-list strong { font-weight: 600; }
.free-list span { margin-left: auto; color: var(--accent); }
.cta__contact { display: grid; gap: 6px; margin-top: 24px; }
.cta__contact a { display: inline-flex; align-items: center; gap: 10px; font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem); font-weight: 500; transition: color var(--fast); }
.cta__contact a:hover { color: var(--accent); }
.cta__contact svg { width: 18px; height: 18px; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .works { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 200px; }
}
@media (max-width: 860px) {
  .cta__panel { grid-template-columns: minmax(0, 1fr); }
  .cta__media::after { background: linear-gradient(180deg, rgba(12, 17, 20, 0.8) 0%, rgba(12, 17, 20, 0.9) 100%); }
}
@media (max-width: 520px) {
  .cta .cta__contact { grid-template-columns: minmax(0, 1fr); }
  .cta { padding-inline: 10px; } /* give the panel the full phone width */
  .cta__panel { padding: 24px 16px; }
  .cta__panel .btn { white-space: normal; text-align: center; padding-inline: 16px; }
}
@media (max-width: 640px) {
  .works { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .work.is-big { grid-column: span 2; grid-row: span 2; }
  .work figcaption { opacity: 1; transform: none; padding: 28px 12px 10px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--card-pad) * -1); padding-inline: var(--card-pad); }
  /* Phones: a full-width band instead of a floating pill */
  .card > .filters { top: 0; width: auto; max-width: none; margin-inline: calc(var(--card-pad) * -1); border-radius: 0; padding: 8px var(--card-pad); scroll-padding-inline: var(--card-pad); }
  .card > .section-head:has(+ .filters-sentinel, + .filters) { margin-bottom: 6px; }
  .filters::-webkit-scrollbar { display: none; }
  .filters button { flex: none; }
  .cta__actions .btn { flex: 1 1 100%; }
}

/* ==========================================================================
   Shared with the inner pages (moved from home.css)
   ========================================================================== */

/* ---------- "Free" chips (homepage hero, page heroes) ---------- */
.hero__free { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}
.chip svg { width: 14px; height: 14px; color: var(--accent); }
/* Short labels and the "Gratuits :" tag are only used in the phone layout */
.chip__short, .hero__free-tag { display: none; }

/* ---------- Why / values bento grid (homepage, about) ---------- */
/* ---------- Why KF BTP: bento grid (photo feature + 3 cards + CTA) ---------- */
.why {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, auto));
  gap: clamp(12px, 1.4vw, 20px);
}
.why__item {
  position: relative;
  display: flex; flex-direction: column;
  padding: clamp(22px, 2.4vw, 30px);
  border-radius: var(--radius-sm);
  background: var(--card-raised);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
  transition: transform 400ms var(--ease), box-shadow 400ms var(--ease);
}
.why__item::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 500ms var(--ease);
}
.why__item:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px rgba(217, 196, 160, 0.4); }
.why__item:hover::before { transform: scaleX(1); }
.why__top { display: flex; align-items: center; justify-content: space-between; }
.why__icon {
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(217, 196, 160, 0.12);
  box-shadow: inset 0 0 0 1px rgba(217, 196, 160, 0.28);
  color: var(--accent);
}
.why__icon svg { width: 22px; height: 22px; }
.why__num { font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.4rem); color: rgba(217, 196, 160, 0.22); line-height: 1; }
.why__item h3 { margin-top: auto; padding-top: 28px; font-size: clamp(1.02rem, 0.95rem + 0.3vw, 1.2rem); font-weight: 600; }
.why__item p { margin-top: 10px; color: var(--muted); font-size: var(--text-sm); }

/* Feature card: photo background, spans both rows */
.why__item--feature { grid-row: span 2; min-height: 420px; isolation: isolate; padding: 0; box-shadow: none; clip-path: inset(0 round var(--radius-sm)); }
.why__item--feature:hover { box-shadow: none; }
.why__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease); }
.why__item--feature::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(12, 17, 20, 0.2) 0%, rgba(12, 17, 20, 0.35) 40%, rgba(12, 17, 20, 0.92) 100%);
}
.why__item--feature:hover .why__img { transform: scale(1.05); }
.why__feature-body { display: flex; flex-direction: column; height: 100%; padding: clamp(22px, 2.4vw, 32px); }
.why__item--feature .why__icon { background: rgba(15, 20, 22, 0.6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.why__item--feature .why__num { color: rgba(217, 196, 160, 0.5); }
.why__item--feature h3 { font-size: clamp(1.3rem, 1rem + 1.2vw, 1.9rem); }
.why__item--feature p { color: rgba(238, 240, 238, 0.8); max-width: 40ch; font-size: var(--text-base); }

/* CTA card in the accent colour */
.why__cta {
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  padding: clamp(22px, 2.4vw, 30px);
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), #c9ae84);
  color: var(--accent-ink);
  transition: transform 400ms var(--ease), box-shadow 400ms var(--ease);
}
.why__cta:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -30px rgba(217, 196, 160, 0.6); }
.why__cta-label { opacity: 0.7; }
.why__cta strong { font-size: clamp(1.15rem, 0.95rem + 0.8vw, 1.6rem); line-height: 1.05; }
.why__cta-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: var(--text-sm); }
.why__cta-link svg { width: 16px; height: 16px; transition: transform var(--fast) var(--ease); }
.why__cta:hover .why__cta-link svg { transform: translate(3px, -3px); }

/* ---------- Glass number pill (service numbers, photo labels) ---------- */
.num-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 20, 22, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px rgba(217, 196, 160, 0.35);
  color: var(--accent);
  line-height: 1;
}

/* ---------- Rich "free" list: icon circles + pills (CTA panel, contact) ---------- */
.free-list--rich li { padding: 12px 0; }
.free-list--rich li:first-child { border-top: 0; }
.free-list--rich span.label { padding: 4px 10px; border-radius: 999px; background: rgba(217, 196, 160, 0.14); }

@media (max-width: 1080px) {
  .why { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .why__item--feature { grid-column: 1 / -1; grid-row: auto; min-height: 340px; }
}
@media (max-width: 640px) {
  .why { grid-template-columns: minmax(0, 1fr); }
  .why__item h3 { padding-top: 22px; }
  /* The three "free" chips become one compact row (ul.* beats the tablet rule in home.css) */
  ul.hero__free {
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(15, 20, 22, 0.55);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
    font-size: clamp(0.6rem, 2.7vw, 0.72rem);
    letter-spacing: 0.04em;
  }
  .hero__free .chip { gap: 5px; padding: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; white-space: nowrap; }
  /* Icon sized to the capital letters and nudged up: uppercase text sits above the middle of its line box */
  .hero__free .chip svg { width: 1.15em; height: 1.15em; transform: translateY(-0.12em); }
  .hero__free .chip, .hero__free-tag { line-height: 1; }
  .hero__free .chip__long { display: none; }
  .hero__free .chip__short { display: inline; }
  .hero__free-tag { display: block; color: var(--accent); font-weight: 600; white-space: nowrap; }
}

/* Phones: full-width hero buttons must never be wider than the content
   (long uppercase label + arrow): tighter padding, wrap as a last resort */
@media (max-width: 640px) {
  .works__more .btn { width: 100%; }
  .hero__actions .btn, .page-hero__actions .btn, .service__actions .btn, .cta__actions .btn, .form__foot .btn, .works__more .btn, .footer__cta, .menu__foot .btn { min-width: 0; padding-inline: 16px; gap: 8px; white-space: normal; text-align: center; }
}
