:root {
  --white: #ffffff;
  --paper: #fbfaf7;
  --ink: #1b2238;
  --ink-soft: #4a5268;
  --muted: #7d8497;
  --line: #ece8df;
  --gold: #d9a03a;
  --gold-deep: #b97f1c;
  --gold-soft: #fff1cf;
  --sky: #eef4fb;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(27, 34, 56, .04), 0 12px 32px -12px rgba(27, 34, 56, .14);
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
em { font-style: italic; }
button { font: inherit; color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

.eyebrow {
  margin: 0 0 14px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.display {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -.01em;
}
.display em, .hero-title em, .brand em { color: var(--gold-deep); font-weight: 500; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px;
  border: 1px solid transparent; border-radius: 999px;
  font-weight: 600; font-size: .95rem; text-decoration: none;
  cursor: pointer; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, border-color .25s;
}
.btn svg { width: 18px; height: 18px; stroke-width: 2; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: .88rem; }
.btn-block { width: 100%; }
.btn-ink { background: var(--ink); color: #fff; box-shadow: 0 10px 24px -12px rgba(27, 34, 56, .6); }
.btn-gold {
  background: linear-gradient(135deg, #f2c35f, var(--gold) 55%, var(--gold-deep));
  color: #fff; text-shadow: 0 1px 0 rgba(120, 70, 0, .25);
  box-shadow: 0 10px 26px -10px rgba(217, 160, 58, .8);
}
.btn-gold:hover { box-shadow: 0 16px 32px -12px rgba(217, 160, 58, .9); }
.btn-ghost { background: rgba(255, 255, 255, .7); border-color: var(--line); backdrop-filter: blur(6px); }
.btn-ghost:hover { border-color: var(--gold); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

.icon-btn {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  transition: border-color .2s, transform .2s;
}
.icon-btn:hover { border-color: var(--gold); }
.icon-btn svg { width: 20px; height: 20px; }

/* Barre du haut */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px max(16px, calc((100% - 1180px) / 2));
  transition: background .3s, box-shadow .3s, padding .3s;
}
.topbar.scrolled { background: rgba(255, 255, 255, .86); backdrop-filter: blur(14px) saturate(1.4); box-shadow: 0 1px 0 var(--line); padding-block: 10px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-size: 1.5rem; font-weight: 600; letter-spacing: .01em; }
.brand-mark { width: 34px; height: 34px; color: var(--ink); }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { text-decoration: none; font-size: .92rem; font-weight: 500; color: var(--ink-soft); position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--gold); transform: scaleX(0); transition: transform .3s var(--ease); }
.nav a:hover::after { transform: scaleX(1); }

/* Hero */
.hero {
  position: relative; min-height: 100svh;
  display: grid; place-items: center; text-align: center;
  padding: 120px 16px 96px; overflow: hidden;
  background: radial-gradient(120% 70% at 50% 100%, #fff7e3 0%, #fff 55%);
}
.dawn { position: absolute; inset: 0; pointer-events: none; }
.rays {
  position: absolute; left: 50%; top: 78%;
  width: 220vmax; height: 220vmax; translate: -50% -50%;
  background: repeating-conic-gradient(from 0deg, rgba(240, 190, 90, .16) 0deg 3deg, transparent 3deg 12deg);
  mask: radial-gradient(circle, #000 0%, rgba(0, 0, 0, .5) 22%, transparent 48%);
  -webkit-mask: radial-gradient(circle, #000 0%, rgba(0, 0, 0, .5) 22%, transparent 48%);
  animation: spin 140s linear infinite;
}
.sun {
  position: absolute; left: 50%; top: 78%;
  width: min(62vmin, 520px); aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle, #fffdf6 0%, #ffeec4 38%, rgba(255, 220, 150, .35) 62%, transparent 70%);
  animation: rise 2.6s var(--ease) both, breathe 7s ease-in-out 2.6s infinite;
}
.halo {
  position: absolute; inset: auto 0 0; height: 38%;
  background: linear-gradient(to top, #fff 0%, rgba(255, 255, 255, 0) 100%);
}
@keyframes spin { to { rotate: 360deg; } }
@keyframes rise { from { top: 105%; opacity: 0; } to { top: 78%; opacity: 1; } }
@keyframes breathe { 50% { scale: 1.06; } }

.hero-inner { position: relative; max-width: 760px; }
.hero-title {
  margin: 0;
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(5rem, 19vw, 13rem);
  line-height: .86; letter-spacing: -.03em;
}
.hero-title .line { display: block; }
.hero-title .line:last-child { margin-top: -.04em; padding-left: .5em; }
.hero-lead { margin: 30px auto 0; max-width: 520px; font-size: clamp(1.02rem, 2.2vw, 1.18rem); color: var(--ink-soft); }
.hero-lead strong { color: var(--ink); font-weight: 700; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }

.scroll-hint { position: absolute; bottom: 28px; left: 50%; translate: -50% 0; width: 26px; height: 42px; border: 1.5px solid rgba(27, 34, 56, .25); border-radius: 14px; }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--gold); animation: wheel 2s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* Sections */
.section { padding: clamp(80px, 12vw, 150px) 0; }
.section-head { max-width: 720px; margin-bottom: 56px; }

.manifesto .display { max-width: 860px; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 64px; }
.pillar {
  position: relative; padding: 36px 30px 34px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, var(--paper));
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s;
}
.pillar:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: #f1dfb6; }
.pillar-num { font-family: var(--serif); font-size: 2.4rem; line-height: 1; color: var(--gold); font-style: italic; }
.pillar h3 { margin: 18px 0 10px; font-size: 1.12rem; letter-spacing: -.01em; }
.pillar p { margin: 0; color: var(--ink-soft); }

.ideas { background: var(--paper); border-block: 1px solid var(--line); }
.idea-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: idea; border-top: 1px solid var(--line); }
.idea { counter-increment: idea; position: relative; padding: 34px 28px 38px 0; border-bottom: 1px solid var(--line); }
.idea:not(:nth-child(3n + 1)) { padding-left: 28px; border-left: 1px solid var(--line); }
.idea::before { content: "0" counter(idea); font-family: var(--serif); font-size: 1.1rem; color: var(--gold-deep); font-style: italic; }
.idea h3 { margin: 10px 0 8px; font-family: var(--serif); font-size: 1.6rem; font-weight: 600; line-height: 1.15; }
.idea p { margin: 0; color: var(--ink-soft); font-size: .96rem; }

.verse { position: relative; padding: clamp(90px, 14vw, 170px) 16px; text-align: center; overflow: hidden; }
.verse-glow { position: absolute; left: 50%; top: 50%; width: 900px; height: 900px; translate: -50% -50%; background: radial-gradient(circle, #fff3d4 0%, rgba(255, 243, 212, 0) 60%); }
.verse blockquote { position: relative; margin: 0 auto; max-width: 900px; }
.verse p { margin: 0; font-family: var(--serif); font-style: italic; font-size: clamp(1.8rem, 4.4vw, 3.3rem); line-height: 1.2; }
.verse cite { display: inline-block; margin-top: 24px; font-style: normal; font-size: .8rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-deep); }

/* Galerie */
.gallery { padding-top: clamp(60px, 9vw, 110px); }
.gallery-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.gallery-head .muted { max-width: 520px; margin: 16px 0 0; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 6px; margin-bottom: 28px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 40px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  font-size: .88rem; font-weight: 600; color: var(--ink-soft);
  transition: all .2s;
}
.chip:hover { border-color: var(--gold); color: var(--ink); }
.chip[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .count { margin-left: 6px; opacity: .55; font-weight: 500; }

.masonry { columns: 3 300px; column-gap: 18px; }
.tile {
  position: relative; display: block; width: 100%;
  margin: 0 0 18px; padding: 0; border: 0; border-radius: 14px; overflow: hidden;
  background: var(--sky); cursor: zoom-in; break-inside: avoid;
  box-shadow: 0 1px 2px rgba(27, 34, 56, .06);
  animation: tileIn .6s var(--ease) both;
}
@keyframes tileIn { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.tile img { width: 100%; height: auto; transition: transform .7s var(--ease), opacity .5s; opacity: 0; }
.tile img.loaded { opacity: 1; }
.tile:hover img { transform: scale(1.04); }
.tile-info {
  position: absolute; inset: auto 0 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 10px;
  padding: 40px 14px 12px; text-align: left; color: #fff;
  background: linear-gradient(to top, rgba(20, 24, 40, .62), transparent);
  opacity: 0; transform: translateY(8px); transition: all .35s var(--ease);
}
.tile:hover .tile-info, .tile:focus-visible .tile-info { opacity: 1; transform: none; }
.tile-title { font-weight: 600; font-size: .92rem; line-height: 1.3; }
.tile-cat { display: block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.tile-dl {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: #fff; color: var(--ink); text-decoration: none; transition: transform .2s;
}
.tile-dl:hover { transform: scale(1.1); }
.tile-dl svg { width: 18px; height: 18px; stroke-width: 2; }

.empty { text-align: center; padding: 70px 16px 40px; }
.empty svg { width: 64px; height: 64px; margin: 0 auto 16px; color: var(--ink); }
.empty-title { font-family: var(--serif); font-size: 1.8rem; margin: 0 0 6px; }
.empty .btn { margin-top: 20px; }

.footer { padding: 56px 0 calc(40px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.footer-inner { display: grid; gap: 8px; justify-items: center; text-align: center; }
.footer p { margin: 0; }

/* Panneau d’envoi */
dialog { border: 0; padding: 0; color: var(--ink); }
dialog::backdrop { background: rgba(27, 34, 56, .38); backdrop-filter: blur(6px); }
.sheet {
  width: min(560px, 100% - 24px); max-height: calc(100svh - 24px);
  border-radius: 24px; background: #fff; box-shadow: 0 40px 80px -30px rgba(27, 34, 56, .5);
  overflow: auto;
}
.sheet[open] { animation: sheetIn .4s var(--ease); }
@keyframes sheetIn { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.sheet-body { display: grid; gap: 20px; padding: 26px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head h2 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 1.9rem; }

.drop {
  display: grid; justify-items: center; gap: 4px; padding: 30px 16px;
  border: 1.5px dashed #e3cf9f; border-radius: 18px; background: #fffcf3;
  text-align: center; cursor: pointer; transition: background .2s, border-color .2s;
}
.drop:hover, .drop.over { background: var(--gold-soft); border-color: var(--gold); }
.drop svg { width: 30px; height: 30px; color: var(--gold-deep); margin-bottom: 6px; }
.drop-title { font-weight: 700; }
.drop.compact { padding: 14px; grid-auto-flow: column; justify-content: center; align-items: center; gap: 10px; }
.drop.compact svg { width: 20px; height: 20px; margin: 0; }
.drop.compact .small { display: none; }

.previews { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.previews:empty { display: none; }
.previews li { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--sky); animation: tileIn .35s var(--ease) both; }
.previews img { width: 100%; height: 100%; object-fit: cover; }
.previews button {
  position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; border: 0; background: rgba(255, 255, 255, .92); cursor: pointer;
}
.previews button svg { width: 14px; height: 14px; stroke-width: 2.4; }

.cats { border: 0; margin: 0; padding: 0; }
.cats legend, .fields label { font-size: .82rem; font-weight: 700; margin-bottom: 8px; }
.cat-options { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-options label { position: relative; }
.cat-options input { position: absolute; opacity: 0; pointer-events: none; }
.cat-options span {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); font-size: .86rem; font-weight: 600; color: var(--ink-soft); cursor: pointer; transition: all .2s;
}
.cat-options input:checked + span { background: var(--gold-soft); border-color: var(--gold); color: var(--ink); }
.cat-options input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fields label { display: grid; gap: 6px; margin: 0; }
.fields .muted { font-weight: 500; }
.fields input {
  width: 100%; min-height: 46px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--paper); font: inherit; font-size: 16px;
  transition: border-color .2s, background .2s;
}
.fields input:focus { outline: none; border-color: var(--gold); background: #fff; }

.consent { margin: 0; font-size: .8rem; line-height: 1.5; color: var(--muted); }

.progress { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #f2c35f, var(--gold-deep)); transition: width .2s; }
.form-msg { margin: -6px 0 0; min-height: 0; font-size: .9rem; }
.form-msg:empty { display: none; }
.form-msg.error { color: #b3261e; }

/* Visionneuse */
.lightbox {
  width: 100vw; height: 100svh; max-width: none; max-height: none; margin: 0;
  background: #fffefb;
}
.lightbox[open] { display: grid; place-items: center; animation: fadeIn .3s ease; }
.lightbox::backdrop { background: transparent; }
@keyframes fadeIn { from { opacity: 0; } }
.lb-figure { margin: 0; display: grid; gap: 16px; justify-items: center; width: min(1100px, 100% - 32px); }
.lb-figure img { max-height: calc(100svh - 190px); width: auto; border-radius: 12px; box-shadow: var(--shadow); }
.lb-caption { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; max-width: 760px; }
.lb-caption strong { display: block; font-family: var(--serif); font-size: 1.5rem; font-weight: 600; line-height: 1.2; }
.lb-caption .muted { font-size: .86rem; }
.lb-close { position: fixed; top: 16px; right: 16px; z-index: 2; }
.lb-nav { position: fixed; top: 50%; translate: 0 -50%; z-index: 2; }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

.dropveil {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center;
  background: rgba(255, 249, 232, .9); border: 3px dashed var(--gold); pointer-events: none;
  opacity: 0; transition: opacity .2s;
}
.dropveil.show { opacity: 1; }
.dropveil p { font-family: var(--serif); font-size: 2.2rem; margin: 0; }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 100;
  translate: -50% 20px; opacity: 0; pointer-events: none;
  max-width: calc(100% - 32px); padding: 14px 22px; border-radius: 999px;
  background: var(--ink); color: #fff; font-weight: 600; font-size: .92rem; box-shadow: var(--shadow);
  transition: all .35s var(--ease);
}
.toast.show { translate: -50% 0; opacity: 1; }

/* Apparitions au défilement */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.hero .reveal { transition-duration: .9s; }

@media (max-width: 900px) {
  .pillars { grid-template-columns: 1fr; }
  .idea-list { grid-template-columns: 1fr 1fr; }
  .idea:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
  .idea:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .nav { display: none; }
  .topbar .btn { margin-left: auto; }
  .brand { font-size: 1.3rem; }
  .brand-mark { width: 30px; height: 30px; }
  .idea-list { grid-template-columns: 1fr; }
  .idea:nth-child(even) { padding-left: 0; border-left: 0; }
  .gallery-head { flex-direction: column; align-items: stretch; }
  .masonry { columns: 2; column-gap: 10px; }
  .tile { margin-bottom: 10px; border-radius: 10px; }
  .tile-info { opacity: 1; transform: none; padding: 28px 8px 8px; }
  .tile-title { font-size: .8rem; }
  .tile-cat { display: none; }
  .tile-dl { width: 34px; height: 34px; }
  .fields { grid-template-columns: 1fr; }
  .sheet { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 24px 24px 0 0; max-height: 92svh; }
  .sheet-body { padding: 22px 16px calc(22px + env(safe-area-inset-bottom)); }
  .lb-caption { flex-direction: column; align-items: stretch; text-align: center; }
  .lb-nav { top: auto; bottom: 20px; translate: none; }
  .lb-figure img { max-height: calc(100svh - 260px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
