/* Wax Studio · boutique de templates motion */

:root {
  --bg: #0d0c0b;
  --bg-2: #161310;
  --card: #1b1714;
  --line: #2e2721;
  --text: #f5efe6;
  --muted: #a39789;
  --ochre: #d9622e;
  --gold: #e3a13b;
  --grad: linear-gradient(120deg, var(--gold), var(--ochre));

  --font-title: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 16px;
  --gutter: clamp(16px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 var(--font-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-title); line-height: 1.04; letter-spacing: -.025em; margin: 0 0 .5em; }
h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 780px; }
section { padding: clamp(70px, 10vw, 120px) 0; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  background: var(--grad); color: #1a0f08; border: 0; padding: 14px 26px; border-radius: 999px; transition: transform .25s, box-shadow .25s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 40px -12px var(--ochre); }
.btn-small { padding: 9px 18px; font-size: .95rem; }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--gold); }
.btn-light { background: var(--text); color: var(--bg); }
.link-arrow { font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--line); padding-bottom: 2px; }
.link-arrow::after { content: " →"; }
.link-arrow:hover { border-color: var(--gold); }

/* En-tête */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(13,12,11,.75); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.site-header.scrolled { border-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { font-family: var(--font-title); font-weight: 800; font-size: 1.35rem; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.logo-light { font-weight: 500; color: var(--muted); margin-left: 2px; }
.logo-mark { width: 22px; height: 22px; border-radius: 50% 50% 50% 8px; background: var(--grad); animation: mark 8s ease-in-out infinite; }
@keyframes mark { 50% { border-radius: 8px 50% 50% 50%; transform: rotate(90deg); } }
nav ul { list-style: none; display: flex; align-items: center; gap: 26px; margin: 0; padding: 0; }
nav a:not(.btn) { text-decoration: none; font-weight: 600; color: var(--muted); }
nav a:not(.btn):hover { color: var(--text); }
@media (max-width: 720px) { .hide-sm { display: none; } nav ul { gap: 16px; } }

/* Hero */
.hero { padding-top: clamp(40px, 7vw, 90px); position: relative; }
.hero::before { content: ""; position: absolute; inset: -200px 0 auto; height: 700px; z-index: -1; pointer-events: none;
  background: radial-gradient(600px 380px at 75% 40%, rgba(217,98,46,.22), transparent 70%), radial-gradient(500px 300px at 15% 20%, rgba(227,161,59,.12), transparent 70%); }
.hero-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero-title { font-size: clamp(2.8rem, 6.4vw, 5.2rem); font-weight: 800; }
.hero-title em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ln { display: block; overflow: hidden; padding-bottom: .06em; }
.ln > span { display: inline-block; animation: rise 1s cubic-bezier(.2,.8,.2,1) both; }
.ln + .ln > span { animation-delay: .12s; }
@keyframes rise { from { transform: translateY(105%); } }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; margin: 28px 0; }
.hero-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; color: var(--muted); font-size: .95rem; }
.hero-points li::before { content: "✓"; color: var(--gold); font-weight: 800; margin-right: 10px; }
.hero-screen { position: relative; border-radius: 20px; padding: 10px; background: linear-gradient(145deg, #2a221c, #14110f); box-shadow: 0 40px 80px -30px rgba(0,0,0,.8), inset 0 0 0 1px var(--line); transform: rotate(1.5deg); }
.screen-tag { position: absolute; left: 22px; top: -14px; background: var(--text); color: var(--bg); font-size: .78rem; font-weight: 700; padding: 5px 12px; border-radius: 99px; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero-screen { transform: none; } }

/* Cadre d'aperçu (iframe mise à l'échelle) */
.frame { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 12px; background: #000; }
.frame-video { aspect-ratio: 16 / 9; }
.frame iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; pointer-events: none; }
.frame.loading::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.06) 50%, transparent 70%) var(--card); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Catalogue */
.catalog-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 40px; }
.catalog-head h2 { margin: 0; }
.filters { display: flex; gap: 4px; padding: 5px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); }
.filters button { font: inherit; font-weight: 600; font-size: .92rem; color: var(--muted); background: none; border: 0; padding: 9px 16px; border-radius: 99px; cursor: pointer; transition: background .25s, color .25s; }
.filters button[aria-selected="true"] { background: var(--text); color: var(--bg); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { display: flex; flex-direction: column; justify-content: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; cursor: pointer; transition: transform .35s cubic-bezier(.2,.8,.2,1), border-color .3s, opacity .35s; text-align: left; font: inherit; color: inherit; }
.card:hover { transform: translateY(-6px); border-color: #4a3d32; }
.card.hidden { display: none; }
.card .frame { aspect-ratio: 16 / 9; }
.card-body { padding: 16px 8px 8px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: baseline; }
.card-body h3 { margin: 0; font-size: 1.3rem; }
.card-price { font-family: var(--font-title); font-weight: 700; font-size: 1.15rem; color: var(--gold); }
.card-body p { grid-column: 1 / -1; color: var(--muted); font-size: .93rem; margin: 0; }
.badge { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; margin-left: 8px; vertical-align: middle;
  background: rgba(227,161,59,.14); color: var(--gold); }
.badge.video { background: rgba(120,150,255,.14); color: #a9b8ff; }
.badge.motion { background: rgba(255,107,44,.16); color: #ff9a6b; }
@media (max-width: 980px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid { grid-template-columns: 1fr; } }

/* Pack */
.pack { padding: 0; }
.pack-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; background: var(--grad); color: #1a0f08; border-radius: 28px; padding: clamp(32px, 5vw, 64px); position: relative; overflow: hidden; }
.pack-inner::after { content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; border: 50px solid rgba(255,255,255,.15); animation: spin 20s linear infinite; border-right-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.pack .eyebrow { color: #4a2410; }
.pack h2 { margin-bottom: .3em; }
.pack p { max-width: 50ch; }
.pack-buy { position: relative; z-index: 1; text-align: right; }
.pack-price { font-family: var(--font-title); font-weight: 800; font-size: clamp(2.6rem, 6vw, 4rem); margin: 0 0 12px; line-height: 1; }
.pack-price s { font-size: .4em; opacity: .6; font-weight: 500; }
@media (max-width: 820px) { .pack-inner { grid-template-columns: 1fr; } .pack-buy { text-align: left; } }

/* Comment ça marche */
.steps { list-style: none; padding: 0; margin: 40px 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.steps li { border-top: 2px solid var(--text); padding-top: 20px; }
.step-num { font-family: var(--font-title); font-weight: 800; color: var(--gold); display: block; margin-bottom: 14px; }
.steps p { color: var(--muted); font-size: .97rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.code-demo { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.code-tab { font-size: .85rem; color: var(--muted); padding: 12px 18px; border-bottom: 1px solid var(--line); }
.code-demo code { display: block; padding: 18px; font: 15px/1.6 ui-monospace, Consolas, monospace; overflow-x: auto; white-space: nowrap; color: #d8cfc4; }
.code-demo b { color: var(--gold); font-weight: 600; }

/* Sur mesure */
.custom { padding-top: 0; }
.custom-inner { border: 1px solid var(--line); border-radius: 28px; padding: clamp(32px, 5vw, 56px); text-align: center; }
.custom-inner h2 { margin-left: auto; margin-right: auto; max-width: 20ch; }
.custom-inner p { color: var(--muted); max-width: 56ch; margin: 0 auto 26px; }

/* FAQ */
.faq { padding-top: 0; }
details { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; padding: 22px 40px 22px 0; position: relative; font-weight: 700; font-size: 1.06rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 1.6rem; color: var(--gold); transition: transform .25s; font-weight: 400; }
details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details p { color: var(--muted); padding-bottom: 20px; margin: 0; }

/* Pied de page */
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 28px; }
.footer-inner p { margin: 0; }
.footer-inner b { color: var(--text); }

/* Fiche template */
.modal { width: min(1180px, calc(100% - 24px)); max-height: calc(100% - 24px); padding: 0; border: 1px solid var(--line); border-radius: 22px; background: var(--bg-2); color: var(--text); overflow: auto; }
.modal::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(6px); }
.modal[open] { animation: pop .4s cubic-bezier(.2,.8,.2,1); }
@keyframes pop { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.modal-inner { display: grid; grid-template-columns: 1.6fr 1fr; gap: 0; position: relative; }
.modal-preview { padding: 14px; background: #000; display: grid; align-items: center; }
.modal-preview .frame { border-radius: 10px; }
.modal-preview iframe { pointer-events: auto; }
.modal-info { padding: 32px 28px; }
.modal-info h2 { font-size: 2.2rem; }
.modal-info > p { color: var(--muted); }
.features { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 8px; font-size: .95rem; }
.features li { padding-left: 24px; position: relative; }
.features li::before { content: "✓"; position: absolute; left: 0; color: var(--gold); font-weight: 800; }
.modal-price { font-family: var(--font-title); font-size: 2rem; font-weight: 800; margin-bottom: 14px; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.buy-note { margin-top: 16px; font-size: .9rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; color: var(--muted); }
.buy-note a { color: var(--gold); font-weight: 700; }
.modal-close { position: absolute; right: 12px; top: 10px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.1); color: var(--text); font-size: 1.5rem; cursor: pointer; }
.modal-close:hover { background: rgba(255,255,255,.2); }
@media (max-width: 860px) { .modal-inner { grid-template-columns: 1fr; } .modal-info { padding: 22px 18px 28px; } }

/* Pages légales */
.legal { padding-top: 48px; }
.legal h1 { font-size: clamp(2rem, 4vw, 3rem); }
.legal h2 { font-size: 1.4rem; margin-top: 2em; }
.legal p, .legal li { color: #d8cfc4; }
.todo { background: rgba(227,161,59,.25); padding: 0 4px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
