/* Couleurs : elles sont remplacées par celles réglées dans l'admin (Réglages > Couleurs) */
:root {
  --bg: #0e0e0e;
  --fg: #f2f0eb;
  --accent: #e8c547;
  --muted: color-mix(in srgb, var(--fg) 58%, var(--bg));
  --line: color-mix(in srgb, var(--fg) 14%, var(--bg));
  --card: color-mix(in srgb, var(--fg) 5%, var(--bg));
  --gutter: clamp(16px, 4vw, 48px);
  --display: "Syne", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --menu: "Kaushan Script", "Brush Script MT", cursive; /* police du menu */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--accent); color: #000; padding: 6px 10px; z-index: 99; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo { height: 40px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font: 800 22px/1 var(--display); letter-spacing: -0.01em; }
.brand-sub { font-size: 12px; color: var(--muted); letter-spacing: 0.04em; margin-top: 4px; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav > a {
  text-decoration: none; font-family: var(--menu); font-weight: 400; font-size: 20px; letter-spacing: .01em; color: var(--muted);
  position: relative; padding: 4px 0; transition: color .2s;
}
.site-nav > a:hover, .site-nav > a.active { color: var(--fg); }
.site-nav > a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--accent);
}
.socials { display: flex; gap: 14px; align-items: center; }
.socials a { display: grid; place-items: center; width: 22px; height: 22px; color: var(--muted); transition: color .2s, transform .2s; }
.socials a:hover { color: var(--accent); transform: translateY(-1px); }
.socials svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.menu-toggle { display: none; background: none; border: 0; width: 36px; height: 36px; cursor: pointer; position: relative; }
.menu-toggle span { position: absolute; left: 6px; right: 6px; height: 2px; background: var(--fg); transition: transform .25s; }
.menu-toggle span:first-child { top: 13px; }
.menu-toggle span:last-child { top: 21px; }
.menu-open .menu-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-open .menu-toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 760px) {
  .menu-toggle { display: block; }
  .site-nav {
    position: fixed; inset: 77px 0 auto 0; flex-direction: column; align-items: flex-start; gap: 18px;
    padding: 24px var(--gutter) 32px; background: var(--bg); border-bottom: 1px solid var(--line);
    transform: translateY(-120%); transition: transform .3s, visibility .3s; z-index: -1; visibility: hidden;
  }
  .menu-open .site-nav { transform: none; visibility: visible; }
  .site-nav > a { font-size: 28px; }
}

/* ---------- Contenu ---------- */
main { min-height: 70vh; outline: none; }
.loading { padding: 80px var(--gutter); color: var(--muted); }
.wrap { padding: 0 var(--gutter); max-width: 1600px; margin: 0 auto; }

.hero {
  position: relative; min-height: min(78vh, 760px); display: flex; align-items: flex-end;
  padding: var(--gutter); overflow: hidden; border-bottom: 1px solid var(--line);
}
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.03); animation: heroIn 1.4s ease-out forwards; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,.05) 60%); }
.hero--clean::after { display: none; }
.hero-content { position: relative; z-index: 1; color: #fff; max-width: 900px; }
.hero h1 { font: 800 clamp(44px, 9vw, 128px)/0.92 var(--display); margin: 0 0 14px; letter-spacing: -0.03em; }
.hero p { margin: 0 0 22px; font-size: clamp(15px, 1.6vw, 19px); opacity: .88; }
@keyframes heroIn { to { transform: scale(1); } }

.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px; background: var(--accent); color: #111;
  text-decoration: none; font-weight: 600; font-size: 15px; border: 0; cursor: pointer; transition: transform .2s, filter .2s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); }

.page-head { padding: clamp(40px, 7vw, 96px) 0 clamp(24px, 4vw, 48px); }
.page-head h1 { font: 800 clamp(40px, 7vw, 92px)/0.95 var(--display); margin: 0; letter-spacing: -0.03em; }
.page-head p { color: var(--muted); max-width: 640px; margin: 16px 0 0; font-size: 17px; }
.eyebrow { display: inline-block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }

/* Grille des galeries */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: clamp(12px, 1.6vw, 24px); padding-bottom: 80px; }
.project { position: relative; display: block; aspect-ratio: 4/3; overflow: hidden; background: var(--card); text-decoration: none; }
.project img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.7,.2,1), filter .4s; }
.project::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.65), transparent 55%); transition: opacity .4s; }
.project-title { position: absolute; left: 20px; bottom: 16px; right: 20px; z-index: 1; color: #fff; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.project-title h2 { font: 700 clamp(22px, 2.4vw, 32px)/1.05 var(--display); margin: 0; }
.project-title span { font-size: 13px; opacity: .75; white-space: nowrap; }
.project:hover img { transform: scale(1.05); }
.project:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Page galerie */
.gallery-section { margin-bottom: clamp(48px, 6vw, 88px); }
.gallery-section h2 { font: 700 clamp(22px, 2.6vw, 34px)/1.1 var(--display); margin: 0 0 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.masonry { columns: 3 320px; column-gap: 14px; }
.masonry figure { margin: 0 0 14px; break-inside: avoid; position: relative; cursor: zoom-in; overflow: hidden; background: var(--card); }
.masonry img { width: 100%; height: auto; transition: transform .6s ease, opacity .4s; }
.masonry figure:hover img { transform: scale(1.025); }
.masonry figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 10px; font-size: 14px; color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,.6), transparent); opacity: 0; transition: opacity .3s;
}
.masonry figure:hover figcaption, .masonry figure:focus-visible figcaption { opacity: 1; }
.masonry figure:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.empty { color: var(--muted); font-style: italic; }

.more { border-top: 1px solid var(--line); padding: 40px 0 80px; }
.more h3 { font: 700 20px var(--display); margin: 0 0 20px; }
.more .projects { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); padding: 0; }
.more .project-title h2 { font-size: 20px; }

/* Pages texte */
.text-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); padding-bottom: 96px; align-items: start; }
.text-page.has-photo { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.text-page .photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.prose { font-size: clamp(17px, 1.5vw, 20px); max-width: 680px; }
.prose p { margin: 0 0 1em; }
.prose strong { color: var(--accent); font-weight: 600; }
.prose ul { padding-left: 1.2em; }
.prose a { color: var(--accent); text-underline-offset: 3px; }
@media (max-width: 760px) { .text-page.has-photo { grid-template-columns: 1fr; } }

/* Contact */
.contact-form { display: grid; gap: 18px; max-width: 640px; padding-bottom: 96px; }
.contact-form label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.contact-form input, .contact-form textarea {
  font: inherit; color: var(--fg); background: var(--card); border: 1px solid var(--line);
  padding: 13px 14px; border-radius: 6px; transition: border-color .2s;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent); }
.contact-form textarea { min-height: 160px; resize: vertical; }
.contact-form .btn { justify-self: start; }
.form-status { font-size: 15px; }
.form-status.ok { color: var(--accent); }
.hp { position: absolute; left: -9999px; }

/* Pied de page */
.site-footer {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  padding: 28px var(--gutter); border-top: 1px solid var(--line); color: var(--muted); font-size: 14px;
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--fg); }

/* Visionneuse */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(5,5,5,.96); display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; display: grid; justify-items: center; gap: 12px; padding: 24px 0; }
.lightbox img { max-height: 84vh; max-width: 100%; object-fit: contain; }
.lightbox figcaption { color: #ccc; font-size: 14px; }
.lightbox button { background: none; border: 0; color: #fff; font-size: 44px; cursor: pointer; opacity: .7; height: 100%; }
.lightbox button:hover { opacity: 1; }
.lb-close { position: absolute; top: 8px; right: 16px; height: auto !important; font-size: 40px !important; }
@media (max-width: 600px) { .lightbox { grid-template-columns: 36px 1fr 36px; } .lightbox button { font-size: 32px; } }

.fade-in { animation: fade .5s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
