/* =========================================================
   SUNTANGLE — Kit commun des sites de démonstration
   - Pastille « site de démonstration » (toujours visible, réductible)
   - Messages, apparitions au scroll
   - Composants pro réutilisables, thémés par chaque démo via :
     --k-bg --k-surface --k-text --k-muted --k-line --k-accent --k-on-accent
     --k-dark --k-on-dark --k-radius --k-font-d --k-font-b
   ========================================================= */
.st-demo, .st-demo *, .st-toast, .k-lightbox, .k-lightbox * { box-sizing: border-box; }

/* ---------- Pastille démo ---------- */
.st-demo {
  position: fixed; z-index: 9000; left: 16px; bottom: 16px;
  display: flex; align-items: center; gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 6px 6px 6px 8px;
  border: 1px solid rgba(255, 201, 60, 0.4); border-radius: 999px;
  background: rgba(4, 18, 12, 0.95);
  box-shadow: 0 14px 34px -12px rgba(0, 0, 0, 0.55);
  color: #fbf4de;
  font: 500 12.5px/1.25 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.st-demo a { color: inherit; text-decoration: none; }
.st-demo__brand { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.st-demo__brand svg { width: 24px; height: 24px; flex: none; }
.st-demo__brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-demo__brand b { color: #ffc93c; font-weight: 700; }
.st-demo__cta { flex: none; padding: 8px 13px; border-radius: 999px; background: linear-gradient(100deg, #ffd84a, #ffb21c 60%, #ff9440); color: #072014 !important; font-weight: 700; white-space: nowrap; transition: filter 0.3s; }
.st-demo__cta:hover { filter: brightness(1.08); }
.st-demo__close { flex: none; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.08); color: #fbf4de; font-size: 16px; line-height: 1; cursor: pointer; }
.st-demo__close:hover { background: rgba(255, 255, 255, 0.18); }
.st-demo a:focus-visible, .st-demo button:focus-visible { outline: 2px solid #ffc93c; outline-offset: 2px; }
.st-demo.is-min { padding: 5px; gap: 0; }
.st-demo.is-min .st-demo__brand span, .st-demo.is-min .st-demo__cta, .st-demo.is-min .st-demo__close { display: none; }
.st-demo__open { display: none; position: absolute; inset: 0; border: 0; border-radius: inherit; background: none; cursor: pointer; }
.st-demo.is-min .st-demo__open { display: block; }

.st-toast {
  position: fixed; z-index: 9001; left: 50%; bottom: 80px;
  width: max-content; max-width: min(460px, calc(100vw - 24px));
  padding: 14px 18px 14px 46px; border-radius: 16px;
  background: #0b2a1b; color: #fbf4de; border: 1px solid rgba(200, 240, 74, 0.4);
  box-shadow: 0 20px 44px -14px rgba(0, 0, 0, 0.6);
  font: 500 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  opacity: 0; transform: translate(-50%, 16px); pointer-events: none;
  transition: opacity 0.35s, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.st-toast::before { content: "✦"; position: absolute; left: 17px; top: 13px; font-size: 18px; color: #ffc93c; }
.st-toast b { color: #c8f04a; }
.st-toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.st-toast a { color: #ffc93c; font-weight: 700; }

/* ---------- Apparitions ---------- */
.rv { opacity: 0; transform: translateY(26px); transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1); transition-delay: var(--d, 0s); }
.rv.in { opacity: 1; transform: none; }
html.no-js .rv { opacity: 1; transform: none; }

/* ---------- Images ---------- */
/* Rien ne doit dépasser horizontalement (bandeaux inclinés, photos décalées) */
main { overflow-x: clip; }
.k-img { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--k-line, #ddd); }
.k-frame { position: relative; overflow: hidden; border-radius: var(--k-radius, 18px); background: var(--k-line, #ddd); }
.k-frame img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1); }

/* ---------- En-tête : barre d'infos + navigation ---------- */
.k-head { position: fixed; inset: 0 0 auto; z-index: 60; transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1); }
.k-topbar { height: 38px; background: var(--k-dark, #111); color: var(--k-on-dark, #eee); font: 500 13px var(--k-font-b, system-ui); }
.k-topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 100%; }
.k-topbar span, .k-topbar a { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; opacity: 0.9; white-space: nowrap; }
.k-topbar a:hover { opacity: 1; }
.k-topbar svg { width: 15px; height: 15px; flex: none; }
.k-topbar__group { display: flex; align-items: center; gap: 22px; }
.k-dot { width: 7px; height: 7px; border-radius: 50%; background: #7bd389; box-shadow: 0 0 0 3px rgba(123, 211, 137, 0.25); }
.k-dot.is-closed { background: #ef8a6a; box-shadow: 0 0 0 3px rgba(239, 138, 106, 0.25); }
.k-head.is-scrolled { transform: translateY(-38px); }
.k-head .header { position: relative; transition: background 0.35s, box-shadow 0.35s; }
@media (max-width: 760px) {
  .k-topbar { display: none; }
  .k-head.is-scrolled { transform: none; }
}

/* ---------- Barre d'action mobile ---------- */
.k-actionbar { display: none; }
@media (max-width: 760px) {
  .k-actionbar { position: fixed; z-index: 70; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--k-surface, #fff); box-shadow: 0 -10px 30px -12px rgba(0, 0, 0, 0.35); }
  .k-actionbar a, .k-actionbar button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 10px; border: 0; border-radius: calc(var(--k-radius, 18px) * 0.6); font: 700 15px var(--k-font-b, system-ui); text-decoration: none; cursor: pointer; }
  .k-actionbar svg { width: 18px; height: 18px; }
  .k-actionbar .k-a1 { background: transparent; color: var(--k-text, #111); box-shadow: inset 0 0 0 1.5px var(--k-line, #ccc); }
  .k-actionbar .k-a2 { background: var(--k-accent, #c45f3c); color: var(--k-on-accent, #fff); }
  body.has-actionbar { padding-bottom: 72px; }
  body.has-actionbar .st-demo { bottom: calc(80px + env(safe-area-inset-bottom)); left: 12px; }
  body.has-actionbar .st-toast { bottom: 140px; }
}

/* ---------- Avis ---------- */
.k-reviews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.k-review { display: flex; flex-direction: column; gap: 14px; padding: 28px 26px; border-radius: var(--k-radius, 18px); background: var(--k-surface, #fff); box-shadow: inset 0 0 0 1px var(--k-line, #ddd); }
.k-stars { display: flex; gap: 3px; color: #f2b01e; }
.k-stars svg { width: 18px; height: 18px; }
.k-review p { color: var(--k-text, #222); font-size: 16px; line-height: 1.6; flex: 1; }
.k-review footer { display: flex; align-items: center; gap: 12px; font: 600 14px var(--k-font-b, system-ui); color: var(--k-text, #222); }
.k-review footer i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--k-accent, #c45f3c); color: var(--k-on-accent, #fff); font-style: normal; font-weight: 700; }
.k-review footer small { display: block; font-weight: 500; color: var(--k-muted, #777); font-size: 13px; }
.k-rating { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 30px; }
.k-rating b { font: 700 2.6rem/1 var(--k-font-d, system-ui); color: var(--k-text, #222); }
.k-rating span { color: var(--k-muted, #777); font-size: 15px; }
.k-rating .k-stars { color: #f2b01e; }
.k-note { display: inline-block; margin-top: 18px; padding: 4px 11px; border-radius: 99px; background: var(--k-line, #eee); color: var(--k-muted, #666); font: 600 12px var(--k-font-b, system-ui); letter-spacing: 0.02em; }
@media (max-width: 900px) { .k-reviews { grid-template-columns: minmax(0, 1fr); max-width: 620px; } }

/* ---------- Galerie + visionneuse ---------- */
.k-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 220px; gap: 12px; }
.k-gallery button { position: relative; padding: 0; border: 0; border-radius: var(--k-radius, 18px); overflow: hidden; background: var(--k-line, #ddd); cursor: zoom-in; }
.k-gallery button img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s; }
.k-gallery button:hover img { transform: scale(1.06); }
.k-gallery button::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent 50%); opacity: 0; transition: opacity 0.4s; }
.k-gallery button:hover::after { opacity: 1; }
.k-gallery .w2 { grid-column: span 2; }
.k-gallery .h2 { grid-row: span 2; }
.k-gallery button:focus-visible { outline: 3px solid var(--k-accent, #c45f3c); outline-offset: 3px; }
@media (max-width: 760px) { .k-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 150px; gap: 8px; } }
.k-lightbox { position: fixed; inset: 0; z-index: 9600; display: grid; place-items: center; padding: 60px 70px; background: rgba(8, 8, 8, 0.92); opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0s 0.3s; }
.k-lightbox.is-on { opacity: 1; visibility: visible; transition: opacity 0.3s; }
.k-lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); object-fit: contain; }
.k-lightbox p { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; color: #eee; font: 500 14px system-ui, sans-serif; }
.k-lightbox button { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; }
.k-lightbox button:hover { background: rgba(255, 255, 255, 0.24); }
.k-lb-close { right: 18px; top: 18px; }
.k-lb-prev { left: 14px; top: 50%; margin-top: -24px; }
.k-lb-next { right: 14px; top: 50%; margin-top: -24px; }
@media (max-width: 640px) { .k-lightbox { padding: 70px 12px; } .k-lb-prev, .k-lb-next { top: auto; bottom: 14px; margin: 0; } .k-lb-prev { left: calc(50% - 60px); } .k-lb-next { right: calc(50% - 60px); } .k-lightbox p { bottom: 76px; } }

/* ---------- Pied de page ---------- */
.k-footer { padding: 70px 0 0; background: var(--k-dark, #111); color: var(--k-on-dark, #ccc); font: 400 15px/1.7 var(--k-font-b, system-ui); }
.k-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 36px; padding-bottom: 50px; }
.k-footer h3, .k-footer h4 { margin-bottom: 14px; font: 700 13px var(--k-font-b, system-ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--k-on-dark, #fff); opacity: 0.7; }
.k-footer a { color: inherit; text-decoration: none; opacity: 0.85; transition: opacity 0.3s; }
.k-footer a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.k-footer ul { list-style: none; display: grid; gap: 6px; }
.k-footer__brand p { margin-top: 14px; max-width: 320px; opacity: 0.75; }
.k-footer__social { display: flex; gap: 10px; margin-top: 18px; }
.k-footer__social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); opacity: 1; }
.k-footer__social a:hover { background: rgba(255, 255, 255, 0.1); text-decoration: none; }
.k-footer__social svg { width: 17px; height: 17px; }
.k-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding: 20px 0 84px; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 13.5px; opacity: 0.8; }
.k-footer__bottom nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.k-credit b { color: #ffc93c; font-weight: 700; }
@media (max-width: 900px) { .k-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .k-footer__grid { grid-template-columns: minmax(0, 1fr); gap: 26px; } }

@media (max-width: 640px) {
  .st-demo { left: 10px; bottom: 10px; max-width: calc(100vw - 20px); }
  .st-demo__brand span { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* Texte réservé aux lecteurs d'écran */
.k-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Aperçu intégré au site SUNTANGLE : pas de pastille ni de message */
.is-apercu .st-demo, .is-apercu .st-toast, .is-apercu .k-actionbar { display: none !important; }
