/* Portfolio, charte « Salle noire » (Instrument Serif + Inter) */

@font-face { font-family: 'Inter'; src: url('/fonts/inter-var.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('/fonts/instrument-serif.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('/fonts/instrument-serif-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  --bg: #0B0B0C;
  --surface: #151517;
  --line: #2A2A2E;
  --text: #F3F2EF;
  --text2: #A3A3AB;
  --accent: #F2B544;
  --accent-hover: #F7CB74;
  --danger: #F87171;
  --radius: 12px;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--bg); }

.wrap { max-width: 1240px; margin-left: auto; margin-right: auto; padding-left: 32px; padding-right: 32px; }
.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; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--accent); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.eyebrow { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--text2); margin: 0; }
.meta { font-size: 14px; color: var(--text2); margin: 0; }
.link { color: var(--accent); font-size: 15px; border-bottom: 1px solid transparent; transition: border-color .2s; }
.link:hover { border-color: var(--accent); }
.linkbtn { color: inherit; text-decoration: underline; text-underline-offset: 3px; font-size: inherit; }
.linkbtn:hover { color: var(--text); }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent); color: var(--bg); font-weight: 600; font-size: 15px; line-height: 1.2; padding: 13px 22px; border-radius: 999px; border: 1px solid var(--accent); transition: background .2s, border-color .2s, transform .2s; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); font-weight: 500; }
.btn-ghost:hover { background: var(--surface); border-color: var(--text2); }
.btn-sm { font-size: 14px; padding: 9px 16px; }

/* En-tête */
.hd { position: sticky; top: 0; z-index: 20; background: rgba(11, 11, 12, .88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.hd-in { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { font-family: var(--serif); font-size: 28px; line-height: 1; letter-spacing: .2px; margin-right: auto; }
.nav { display: flex; gap: 26px; font-size: 14px; color: var(--text2); }
.nav a { padding: 6px 0; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); border-color: var(--accent); }
.burger { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 999px; position: relative; }
.burger i { position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--text); transition: transform .25s var(--ease); }
.burger i:nth-of-type(1) { top: 17px; }
.burger i:nth-of-type(2) { top: 25px; }
.burger[aria-expanded="true"] i:nth-of-type(1) { transform: translateY(4px) rotate(45deg); }
.burger[aria-expanded="true"] i:nth-of-type(2) { transform: translateY(-4px) rotate(-45deg); }

/* Accueil */
.hero { position: relative; padding: 104px 0 72px; overflow: hidden; }
.hero-in { position: relative; }
.halo { position: absolute; left: 50%; top: -120px; width: 900px; height: 520px; margin-left: -450px; background: radial-gradient(closest-side, rgba(242, 181, 68, .16), transparent); pointer-events: none; animation: breathe 8s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }
.h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 7.4vw, 108px); line-height: .98; margin: 22px 0 28px; max-width: 15ch; letter-spacing: -.01em; text-wrap: balance; }
.h1 em, .h2 em { color: var(--accent); font-style: italic; }
.h1-page { font-size: clamp(44px, 6vw, 84px); margin: 0 0 16px; max-width: 20ch; }
.lead { font-size: 19px; color: var(--text2); max-width: 52ch; margin: 0 0 36px; }
.lead p { margin: 0 0 12px; }
.lead-light { color: var(--text); font-size: 21px; line-height: 1.5; }
.featured { padding-bottom: 72px; }
.sec { padding: 72px 0; border-top: 1px solid var(--line); }
.sec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 36px; }
.h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4.4vw, 56px); line-height: 1.05; margin: 0; }
.h2-xl { font-size: clamp(40px, 6vw, 84px); margin-bottom: 28px; }
.h2-sm { font-size: clamp(28px, 3vw, 36px); margin-bottom: 16px; }
.cta-end { text-align: center; }
.cta-end .meta { margin-top: 12px; }

/* Cartes projet */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 32px; }
.card { display: block; }
.thumb { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; background: var(--surface); }
.thumb-wide { aspect-ratio: 21 / 9; }
.thumb img, .thumb .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.ph { display: block; background: linear-gradient(135deg, #2b2118, #0f0f12); }
.card:hover .thumb img, .card:focus-visible .thumb img { transform: scale(1.03); }
.go { position: absolute; right: 16px; top: 16px; background: var(--accent); color: var(--bg); font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 999px; opacity: 0; transform: translateY(-6px); transition: opacity .3s, transform .3s; }
.card:hover .go, .card:focus-visible .go { opacity: 1; transform: none; }
.card h3 { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.1; margin: 16px 0 6px; }
.card-title-xl { font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 3.4vw, 40px); line-height: 1.1; margin: 18px 0 6px; }

/* Apparition au défilement (activée par le script uniquement) */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* Prestations */
.svc-list { list-style: none; margin: 0; padding: 0; }
.svc { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 24px 0; border-top: 1px solid var(--line); }
.svc:last-child { border-bottom: 1px solid var(--line); }
.svc-num { color: var(--text2); font-size: 14px; font-variant-numeric: tabular-nums; }
.svc h3 { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.15; margin: 0; }
.svc-desc { color: var(--text2); font-size: 15px; margin-top: 4px; }
.svc-desc p { margin: 0 0 6px; }
.svc-desc ul, .svc-desc ol { margin: 4px 0; padding-left: 20px; }
.svc-act { text-align: right; }
.devis { display: block; font-size: 13px; color: var(--text2); margin-bottom: 8px; }
.services-page { padding-bottom: 72px; }

/* En-têtes de page */
.page-head { padding-top: 64px; padding-bottom: 32px; }

/* Réalisations */
.works { padding-bottom: 96px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: 14px; color: var(--text2); transition: color .2s, border-color .2s, background .2s; }
.chip:hover { color: var(--text); border-color: var(--text2); }
.chip[aria-current="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.card-wrap[hidden] { display: none; }
.empty { color: var(--text2); padding: 32px 0; }

/* Page projet */
.project { padding-top: 40px; padding-bottom: 32px; }
.back { display: inline-block; margin-bottom: 28px; }
.project-head { margin-bottom: 32px; }
.project-head .h1-page { margin-bottom: 8px; }
.two { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 56px; }
.project-body { margin: 48px 0 56px; }
.prose { font-size: 17px; line-height: 1.7; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-family: var(--serif); font-weight: 400; font-size: 34px; line-height: 1.15; margin: 40px 0 12px; }
.prose h3 { font-size: 19px; font-weight: 600; margin: 28px 0 8px; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { font-weight: 600; }
.facts { margin: 0; }
.facts div { padding: 14px 0; border-top: 1px solid var(--line); }
.facts div:first-child { border-top: 0; padding-top: 0; }
.facts dt { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--text2); }
.facts dd { margin: 4px 0 0; }
.facts a { color: var(--accent); }

/* Lecteur vidéo */
.player { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; background: linear-gradient(135deg, #2b2118, #0f0f12); }
.player-media, .player-media img, .player-media .ph, .player-still img, .player-still .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.player iframe, .player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.play { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); transition: transform .25s var(--ease), background .2s; }
.play:hover { transform: scale(1.06); background: var(--accent-hover); }
.play i { display: block; border-left: 24px solid var(--bg); border-top: 14px solid transparent; border-bottom: 14px solid transparent; margin-left: 7px; }
.player-consent { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; padding: 24px; background: rgba(11, 11, 12, .82); }
.player-consent[hidden] { display: none; }
.player-consent p { max-width: 46ch; margin: 0; color: var(--text); }
.player-consent .row { justify-content: center; }
.noscript-watch { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); }
.js .noscript-watch { display: none; }

/* Galerie et visionneuse */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 56px; }
.gal-item { position: relative; display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); aspect-ratio: 3 / 2; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.gal-item:hover img { transform: scale(1.03); }
.gal-credit { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 6px; font-size: 11px; color: rgba(243, 242, 239, .8); background: linear-gradient(transparent, rgba(0, 0, 0, .7)); }
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(5, 5, 6, .96); display: flex; align-items: center; justify-content: center; padding: 56px 72px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 6px; }
.lightbox button { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: rgba(21, 21, 23, .9); font-size: 22px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.lightbox button:hover { border-color: var(--text2); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; margin-top: -24px; }
.lb-next { right: 16px; top: 50%; margin-top: -24px; }
.lb-caption { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; font-size: 13px; color: var(--text2); }

.credits { margin-bottom: 56px; max-width: 760px; }
.credits dl { margin: 0; }
.credits dl div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; }
.credits dt { color: var(--text2); }
.credits dd { margin: 0; text-align: right; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 32px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.box-title { font-family: var(--serif); font-size: 30px; line-height: 1.1; margin: 0 0 4px; }
.pn { display: flex; justify-content: space-between; gap: 16px; padding: 32px 0; }

/* À propos */
.about { padding-bottom: 96px; align-items: start; }
.portrait { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.portrait img { width: 100%; }

/* Contact */
.contact { padding-top: 64px; padding-bottom: 96px; }
.context { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; padding: 12px 16px; margin: 0 0 28px; }
.form { max-width: 640px; }
.field { margin-bottom: 22px; }
.field label { display: block; font-size: 14px; margin: 0 0 6px; }
.req { color: var(--accent); }
.opt { color: var(--text2); }
.field input, .field select, .field textarea { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 13px 14px; color: var(--text); transition: border-color .2s; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text2) 50%), linear-gradient(135deg, var(--text2) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field textarea { resize: vertical; min-height: 160px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--text2); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(242, 181, 68, .25); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.err { color: var(--danger); font-size: 14px; margin: 6px 0 0; }
.hint { font-size: 13px; color: var(--text2); margin: 6px 0 0; }
.form > .hint { margin: 0 0 20px; }
.alert { background: rgba(248, 113, 113, .1); border: 1px solid rgba(248, 113, 113, .45); color: #FECACA; border-radius: 10px; padding: 12px 16px; margin: 0 0 24px; }
.rgpd { font-size: 13px; color: var(--text2); margin: 20px 0 0; max-width: 60ch; }
.rgpd a { text-decoration: underline; text-underline-offset: 3px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-side { padding-top: 12px; }
.thanks { padding-top: 120px; padding-bottom: 140px; }
.thanks .h1 { max-width: 18ch; }

/* Pages légales */
.legal { padding-bottom: 96px; max-width: 860px; margin-left: auto; margin-right: auto; }
.legal .prose { color: var(--text); }

/* Pied de page */
.ft { border-top: 1px solid var(--line); padding: 56px 0 40px; color: var(--text2); font-size: 14px; }
.ft-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.ft .brand { display: inline-block; color: var(--text); margin-bottom: 12px; }
.ft p { margin: 0 0 6px; }
.ft a:hover { color: var(--text); }
.ft-h { margin: 0 0 12px; font: 600 12px/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--text); }
.ft-list { list-style: none; margin: 0; padding: 0; }
.ft-list li { margin: 0 0 8px; }
.ft-bottom { position: relative; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 20px; font-size: 13px; }
.ft-bottom::before { content: ''; position: absolute; top: 0; left: 32px; right: 32px; border-top: 1px solid var(--line); }

/* Bandeau cookies : Refuser et Accepter ont exactement le même aspect */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; margin: 0 auto; max-width: 760px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 24px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.consent[hidden] { display: none; }
.consent p { margin: 0; flex: 1 1 320px; font-size: 14px; color: var(--text2); }
.consent p a { text-decoration: underline; text-underline-offset: 3px; color: var(--text); }
.consent-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cbtn { border: 1px solid var(--text); border-radius: 999px; padding: 10px 22px; font-size: 14px; font-weight: 600; min-width: 112px; text-align: center; background: var(--text); color: var(--bg); transition: background .2s, border-color .2s; }
.cbtn:hover { background: var(--accent); border-color: var(--accent); }

/* Aperçu depuis le backoffice */
.preview-bar { position: sticky; top: 0; z-index: 40; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 10px 32px; background: var(--accent); color: var(--bg); font-size: 14px; }
.preview-bar + .hd { top: 44px; }
.preview-actions { display: flex; gap: 16px; align-items: center; }
.preview-actions a, .preview-actions button { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.preview-actions form { margin: 0; }

/* Mobile */
@media (max-width: 860px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  .ft-bottom::before { left: 20px; right: 20px; }
  .hd-in { gap: 12px; height: 64px; }
  .burger { display: block; }
  .hd-cta { display: none; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 20px 20px; font-size: 18px; color: var(--text); }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav a[aria-current="page"] { color: var(--accent); border-color: var(--line); }
  .hero { padding: 64px 0 48px; }
  .halo { width: 600px; margin-left: -300px; }
  .lead { font-size: 17px; }
  .grid { grid-template-columns: 1fr; gap: 40px; }
  .thumb-wide { aspect-ratio: 16 / 9; }
  .sec { padding: 56px 0; }
  .sec-h { flex-direction: column; align-items: flex-start; }
  .two { grid-template-columns: 1fr; gap: 32px; }
  .svc { grid-template-columns: 36px minmax(0, 1fr); gap: 16px; }
  .svc-act { grid-column: 2; text-align: left; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ft-grid { grid-template-columns: 1fr; }
  .lightbox { padding: 64px 12px; }
  .lb-prev, .lb-next { top: auto; bottom: 12px; margin-top: 0; }
  .lb-prev { left: calc(50% - 60px); }
  .lb-next { right: calc(50% - 60px); }
  .lb-caption { bottom: 72px; }
  .preview-bar { padding: 10px 20px; }
  .preview-bar + .hd { top: 0; position: relative; }
  .box { padding: 24px; }
  .pn { flex-direction: column; }
}
@media (max-width: 480px) {
  .gallery { grid-template-columns: 1fr; }
  .card h3, .svc h3 { font-size: 26px; }
  .consent { padding: 16px; }
  .consent-actions { width: 100%; }
  .cbtn { flex: 1 1 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  .hd, .ft, .consent, .play, .burger, .preview-bar { display: none !important; }
  body { background: #fff; color: #000; }
}
