/* Socle commun des sites clients Keynotr.
   Chaque site définit ses propres couleurs et polices (variables ci-dessous) et toute sa mise en page dans son fichier site.css.
   Variables attendues sur :root dans site.css :
   --c-bg, --c-ink, --c-sub, --c-line, --c-card, --c-accent, --c-on-accent, --c-focus,
   --font-body, --font-display, --radius, --shadow */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
html.is-embed { scroll-behavior: auto; }
body { margin: 0; background: var(--c-bg); color: var(--c-ink); font-family: var(--font-body); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2.5px solid var(--c-focus, var(--c-accent)); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: 10px; background: var(--c-ink); color: var(--c-bg); text-decoration: none; transition: top 0.2s ease; }
.skip:focus { top: 12px; }
[hidden] { display: none !important; }

/* Icônes en ligne (sprite) */
.ic { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* Apparitions */
html.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 0.85s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.95s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: var(--d, 0s); }
html.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Clic de démonstration */
.is-press { transform: scale(0.95) !important; filter: brightness(0.92); transition: transform 0.15s ease, filter 0.15s ease !important; }

/* Fenêtres (commande, réservation, devis) */
.kn-modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 20px; }
.kn-modal[hidden] { display: none; }
.kn-modal__backdrop { position: absolute; inset: 0; background: rgba(10, 10, 12, 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: kn-fade 0.3s ease both; }
.kn-modal__panel { position: relative; width: min(560px, 100%); max-height: calc(100dvh - 40px); overflow: auto; border-radius: calc(var(--radius, 18px) + 6px); background: var(--c-card, #FFFFFF); color: var(--c-ink); box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.6); animation: kn-rise 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.kn-modal__close { position: absolute; right: 14px; top: 14px; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--c-ink) 8%, transparent); color: var(--c-ink); }
.kn-modal__close:hover { background: color-mix(in srgb, var(--c-ink) 14%, transparent); }
html.kn-lock, html.kn-lock body { overflow: hidden; }
@keyframes kn-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes kn-rise { from { opacity: 0; transform: translateY(24px) scale(0.98); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
  .kn-modal { place-items: end center; padding: 0; }
  .kn-modal__panel { width: 100%; max-height: 92dvh; border-radius: 22px 22px 0 0; }
}

/* Notifications du site */
.kn-toasts { position: fixed; left: 50%; top: 18px; z-index: 150; display: flex; flex-direction: column; align-items: center; gap: 8px; transform: translateX(-50%); pointer-events: none; }
.kn-toast { display: flex; align-items: center; gap: 12px; min-width: 260px; max-width: min(92vw, 420px); padding: 12px 18px 12px 12px; border-radius: 16px; background: var(--c-toast-bg, #FFFFFF); color: var(--c-toast-ink, #111111); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 22px 50px -18px rgba(0, 0, 0, 0.45); animation: kn-toast-in 0.5s cubic-bezier(0.34, 1.32, 0.5, 1) both; }
.kn-toast.is-out { animation: kn-toast-out 0.35s ease forwards; }
.kn-toast__ic { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--c-accent); color: var(--c-on-accent); }
.kn-toast__ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.kn-toast b { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; }
.kn-toast small { display: block; font-size: 13.5px; line-height: 1.35; opacity: 0.72; }
@keyframes kn-toast-in { from { opacity: 0; transform: translateY(-14px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes kn-toast-out { to { opacity: 0; transform: translateY(-10px) scale(0.97); } }

/* Avant / après (curseur déplaçable) */
[data-ba] { --ba: 50%; position: relative; overflow: hidden; touch-action: pan-y; user-select: none; }
[data-ba] .ba__after, [data-ba] .ba__before { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
[data-ba] .ba__before { clip-path: inset(0 calc(100% - var(--ba)) 0 0); }
[data-ba] .ba__handle { position: absolute; top: 0; bottom: 0; left: var(--ba); width: 0; }
[data-ba] .ba__handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1.5px; width: 3px; background: #FFFFFF; box-shadow: 0 0 12px rgba(0, 0, 0, 0.3); }
[data-ba] .ba__knob { position: absolute; top: 50%; left: 0; display: grid; place-items: center; width: 56px; height: 56px; margin: -28px 0 0 -28px; border: 0; border-radius: 50%; background: #FFFFFF; color: #111111; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.5); cursor: ew-resize; }

/* Badge « site de démonstration » (affiché seulement quand le site est ouvert en grand) */
.kn-demo-badge { position: fixed; left: 14px; bottom: 14px; z-index: 90; display: inline-flex; align-items: center; gap: 10px; padding: 9px 14px 9px 10px; border-radius: 999px; background: rgba(16, 17, 20, 0.88); color: #FFFFFF; font: 500 13px/1.3 "Hanken Grotesk", system-ui, sans-serif; text-decoration: none; box-shadow: 0 14px 34px -14px rgba(0, 0, 0, 0.6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.kn-demo-badge i { display: block; width: 9px; height: 9px; border-radius: 50%; background: #4A58FF; box-shadow: 0 0 0 3px rgba(74, 88, 255, 0.3); }
.kn-demo-badge b { font-weight: 600; }
html.is-embed .kn-demo-badge { display: none; }
@media (max-width: 640px) { .kn-demo-badge { left: 10px; right: auto; bottom: 10px; font-size: 12px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html.js [data-reveal] { opacity: 1; transform: none; }
}
