/* ==========================================================================
   4lbum.fr — feuille de style
   ========================================================================== */

:root{
  --gold: #C6A15B;
  --gold-deep: #93712E;
  --gold-pale: #ECDFBF;

  --bg: #FBF9F5;
  --bg-alt: #F2ECDD;
  --surface: #FFFFFF;
  --text: #221E17;
  --text-muted: #6B6255;
  --border: #E3D9C2;

  --font-display: 'Iowan Old Style', 'Palatino Linotype', Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --radius: 2px;
  --container: 1140px;

  color-scheme: light;
}

[data-theme="dark"]{
  --bg: #14120D;
  --bg-alt: #1C1912;
  --surface: #1F1B14;
  --text: #F2EBDA;
  --text-muted: #B6AA92;
  --border: #362F22;
  --gold-pale: #3A3020;
  color-scheme: dark;
}

*, *::before, *::after{ box-sizing: border-box; }

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

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background .35s ease, color .35s ease;
}

h1, h2, h3{
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}

h1{ font-size: clamp(2.2rem, 4.4vw, 3.4rem); }
h2{ font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3{ font-size: 1.25rem; }

p{ margin: 0 0 1em; color: var(--text-muted); max-width: 62ch; }

a{ color: inherit; }

.section-inner{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.skip-link{
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold);
  color: #1a1408;
  padding: .6rem 1rem;
  z-index: 200;
}
.skip-link:focus{ left: 1rem; top: 1rem; }

:focus-visible{
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
}

/* ---------- Barre supérieure ---------- */

.topbar{
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar__inner{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand{
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
}
.brand__mark{ color: var(--gold-deep); display: inline-flex; }
.brand__tld{ color: var(--gold-deep); font-weight: 500; }

.theme-toggle{
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color .2s ease, transform .2s ease;
}
.theme-toggle:hover{ border-color: var(--gold); }
.theme-toggle .icon--moon{ display: none; }
[data-theme="dark"] .theme-toggle .icon--sun{ display: none; }
[data-theme="dark"] .theme-toggle .icon--moon{ display: block; }

/* ---------- Boutons ---------- */

.btn{
  display: inline-block;
  padding: .8rem 1.5rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  font-family: inherit;
  border: 1px solid transparent;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
button.btn{ cursor: pointer; background-color: transparent; }
.btn--gold{
  background: var(--gold)!important;
  color: #211705;
}
.btn--gold:hover{ background: var(--gold-deep); color: #fff; transform: translateY(-1px); }

.btn--ghost{
  border-color: var(--border);
  color: var(--text);
}
.btn--ghost:hover{ border-color: var(--gold); }

.btn--outline{
  border-color: var(--gold-deep);
  color: var(--text);
  display: block;
  text-align: center;
  margin-top: 1.6rem;
}
.btn--outline:hover{ background: var(--gold-pale); }

.btn--lg{ padding: 1rem 2rem; font-size: 1.05rem; }

/* ---------- Hero ---------- */

.hero{ position: relative; overflow: hidden; }
.hero__inner{
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5.5rem) 1.5rem 4rem;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 3rem;
  align-items: center;
}

.badge{
  display: inline-block;
  font-size: .8rem;
  color: var(--gold-deep);
  background: var(--gold-pale);
  padding: .35rem .8rem;
  border-radius: 100px;
  margin-bottom: 1.2rem;
}

.hero__lead{ font-size: 1.08rem; }
.hero__actions{ display: flex; gap: .9rem; flex-wrap: wrap; margin: 1.6rem 0 .9rem; }
.hero__fineprint{ font-size: .85rem; color: var(--text-muted); margin: 0; }

[data-reveal]{
  opacity: 0;
  transform: translateY(14px);
  animation: reveal .6s ease forwards;
}
.hero__copy > *:nth-child(1){ animation-delay: .02s; }
.hero__copy > *:nth-child(2){ animation-delay: .1s; }
.hero__copy > *:nth-child(3){ animation-delay: .18s; }
.hero__copy > *:nth-child(4){ animation-delay: .26s; }
.hero__copy > *:nth-child(5){ animation-delay: .32s; }
@keyframes reveal{ to{ opacity: 1; transform: translateY(0); } }

.hero__visual{ display: flex; justify-content: center; }
.album{
  position: relative;
  width: min(360px, 90vw);
  height: 300px;
}
.album__photo{
  position: absolute;
  width: 220px;
  height: 220px;
  border: 6px solid var(--surface);
  box-shadow: 0 12px 30px rgba(20,15,5,.16);
  overflow: hidden;
}
[data-theme="dark"] .album__photo{ box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.album__photo img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.album__photo--1{
  top: 10px; left: 10px;
  transform: rotate(-9deg);
  z-index: 1;
}
.album__photo--2{
  top: 40px; left: 90px;
  transform: rotate(6deg);
  z-index: 2;
}
.album__photo--3{
  top: 0; left: 55px;
  transform: rotate(-2deg);
  z-index: 3;
  width: 200px; height: 200px;
}
.album__corner{
  position: absolute;
  width: 16px; height: 16px;
  border: 2px solid var(--gold-deep);
  opacity: .55;
  z-index: 4;
}
.album__corner--tl{ top: -8px; left: -8px; border-right: none; border-bottom: none; }
.album__corner--tr{ top: -8px; right: -8px; border-left: none; border-bottom: none; }
.album__corner--bl{ bottom: -8px; left: -8px; border-right: none; border-top: none; }
.album__corner--br{ bottom: -8px; right: -8px; border-left: none; border-top: none; }

.album__chip{
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: .5rem .9rem;
  border-radius: 100px;
  font-size: .8rem;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(20,15,5,.12);
  z-index: 5;
}
.album__chip .sep{ color: var(--gold-deep); margin: 0 .15rem; }

.filmstrip{
  height: 14px;
  background-image: radial-gradient(circle, var(--border) 2.5px, transparent 2.6px);
  background-size: 22px 14px;
  background-repeat: repeat-x;
  background-position: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ---------- Pourquoi ---------- */

.why{ background: var(--bg-alt); padding: 3.5rem 0; }
.why__inner{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
.why__list{
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.why__list li{
  display: flex;
  align-items: center;
  gap: .7rem;
  font-weight: 600;
  color: var(--text);
}
.why__list svg{ color: var(--gold-deep); flex: none; }

/* ---------- Fonctionnalités ---------- */

.features{ padding: 4.5rem 0; }
.feature{
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2rem;
  align-items: center;
  padding: 2.4rem 0;
  border-bottom: 1px solid var(--border);
}
.features .feature:first-child{ padding-top: 0; }
.features .feature:last-child{ border-bottom: none; }

.feature__num{
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: var(--gold-pale);
  -webkit-text-stroke: 1px var(--gold-deep);
  line-height: 1;
}
[data-theme="dark"] .feature__num{ color: transparent; }

.feature__body h3{ margin-bottom: .4rem; }
.feature__body p{ margin: 0; }

.feature__demo{
  width: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-path{
  font-size: .78rem;
  color: var(--text-muted);
  display: flex;
  gap: .25rem;
  margin-bottom: .5rem;
  justify-content: center;
}
.demo-path .sep{ color: var(--border); }
.demo-path__active{ color: var(--gold-deep); font-weight: 700; }
.demo-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}
.demo-grid img{
  width: 26px; height: 26px;
  object-fit: cover;
  border: 1px solid var(--border);
  display: block;
}

.demo-roles{ list-style: none; margin: 0; padding: 0; font-size: .85rem; display: flex; flex-direction: column; gap: .55rem; }
.demo-roles li{ display: flex; align-items: center; gap: .5rem; color: var(--text); }
.dot{ width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot--private{ background: var(--text-muted); }
.dot--circle{ background: var(--gold); }
.dot--public{ background: #6E9B6A; }
.dot--admin{ background: var(--gold-deep); }

.demo-shield{ color: var(--gold-deep); }

.demo-devices{ display: flex; align-items: flex-end; gap: 1rem; color: var(--gold-deep); }

/* ---------- Mot du créateur / démo ---------- */

.story{ padding: 4.5rem 0; }
.story__inner{
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 3rem;
  align-items: center;
}

.story__photo-frame{
  position: relative;
  border: 6px solid var(--surface);
  box-shadow: 0 16px 34px rgba(20,15,5,.16);
  aspect-ratio: 4 / 5;
  overflow: hidden;
}
[data-theme="dark"] .story__photo-frame{ box-shadow: 0 16px 34px rgba(0,0,0,.5); }
.story__photo-frame img{
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.story__corner{
  position: absolute;
  width: 20px; height: 20px;
  border: 2px solid var(--gold);
  opacity: .7;
  z-index: 2;
}
.story__corner--tl{ top: 6px; left: 6px; border-right: none; border-bottom: none; }
.story__corner--br{ bottom: 6px; right: 6px; border-left: none; border-top: none; }

.story__text .badge{ margin-bottom: 1rem; }
.story__text h2{ margin-bottom: 1rem; }
.story__text p{ max-width: 54ch; }

.story__url{
  font-size: .82rem;
  margin-top: .8rem;
  color: var(--text-muted);
}

@media (max-width: 900px){
  .story__inner{ grid-template-columns: 1fr; }
  .story__photo-frame{ max-width: 360px; margin: 0 auto; }
}

/* ---------- Étapes ---------- */

.steps{ background: var(--bg-alt); padding: 4rem 0; }
.steps h2{ margin-bottom: 2.2rem; }
.steps__list{
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  counter-reset: step;
}
.steps__list li{ position: relative; padding-left: 0; }
.steps__num{
  display: block;
  font-family: var(--font-display);
  color: var(--gold-deep);
  font-size: 1rem;
  letter-spacing: .05em;
  margin-bottom: .4rem;
}
.steps__list h3{ margin-bottom: .3rem; }
.steps__list p{ margin: 0; }

/* ---------- Offres ---------- */

.pricing{ padding: 4.5rem 0; }
.pricing h2{ margin-bottom: .3rem; }
.pricing__lead{ margin-bottom: 2.5rem; }

.pricing__grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.8rem;
}

.plan{
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2.2rem;
}
.plan__corner{
  position: absolute;
  width: 20px; height: 20px;
  border: 2px solid var(--gold);
  opacity: .5;
}
.plan__corner--tl{ top: -1px; left: -1px; border-right: none; border-bottom: none; }
.plan__corner--br{ bottom: -1px; right: -1px; border-left: none; border-top: none; }

.plan--highlight{
  border-color: var(--gold-deep);
  background: linear-gradient(180deg, var(--gold-pale) 0%, var(--surface) 130px);
}

.plan__tag{
  font-size: .75rem;
  color: var(--gold-deep);
  font-weight: 700;
  margin: 0 0 .4rem;
}
.plan__name{ margin-bottom: .3rem; }
.plan__price{ margin: 0 0 1.4rem; }
.plan__amount{ font-family: var(--font-display); font-size: 2.4rem; color: var(--text); }
.plan__period{ color: var(--text-muted); font-size: .9rem; }

.plan__features{
  list-style: none;
  margin: 0 0 .5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.plan__features li{
  padding-left: 1.35rem;
  position: relative;
  font-size: .92rem;
  color: var(--text);
}
.plan__features li::before{
  content: "";
  position: absolute;
  left: 0; top: .45em;
  width: 8px; height: 8px;
  border-left: 2px solid var(--gold-deep);
  border-bottom: 2px solid var(--gold-deep);
  transform: rotate(-45deg);
}
.plan__features code{
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .82em;
  background: var(--bg-alt);
  padding: .05em .35em;
}

.pricing__footnote{
  text-align: center;
  margin-top: 2.2rem;
  font-size: .85rem;
}

/* ---------- CTA final ---------- */

.cta{ background: var(--bg-alt); padding: 4rem 0; }
.cta__inner{ text-align: center; }
.cta h2{ max-width: 26ch; margin-inline: auto; margin-bottom: 1.6rem; }

/* ---------- Footer ---------- */

.footer{ padding: 2.4rem 0; border-top: 1px solid var(--border); }
.footer__inner{
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.footer p{ font-size: .82rem; margin: 0; }
.brand--footer{ font-size: 1rem; color: var(--gold-deep); }

/* ---------- Modale d'inscription ---------- */

.modal{
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  background: rgba(15, 12, 6, .55);
}
[data-theme="dark"] .modal{ background: rgba(0,0,0,.7); }
.modal.is-open{ display: flex; }

.modal-content{
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  padding: 2.2rem 1.8rem 1.8rem;
  box-shadow: 0 24px 60px rgba(15,12,6,.28);
  animation: modal-in .25s ease;
}
[data-theme="dark"] .modal-content{ box-shadow: 0 24px 60px rgba(0,0,0,.6); }
@keyframes modal-in{
  from{ opacity: 0; transform: translateY(10px); }
  to{ opacity: 1; transform: translateY(0); }
}

.modal-close{
  position: absolute;
  top: .8rem; right: .8rem;
  width: 32px; height: 32px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  border-radius: 50%;
}
.modal-close:hover{ background: var(--bg-alt); color: var(--text); }

.modal-plan{
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  color: var(--gold-deep);
  background: var(--gold-pale);
  padding: .3rem .7rem;
  border-radius: 100px;
  margin-bottom: 1rem;
}

.modal-content h2{ margin-bottom: .4rem; font-size: 1.4rem; }
.modal-content > .modal-step > p{ margin-bottom: 1rem; }

.domain-input-wrapper{
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  background: var(--bg);
}
.domain-input-wrapper input{
  flex: 1;
  min-width: 0;
  padding: .75rem .9rem;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}
.domain-input-wrapper input:focus-visible{ outline: 2px solid var(--gold-deep); outline-offset: -2px; }
.domain-input-wrapper .fixed-suffix{
  padding: .75rem .9rem;
  background: var(--bg-alt);
  color: var(--text-muted);
  border-left: 1px solid var(--border);
  white-space: nowrap;
  font-size: .92rem;
  display: flex;
  align-items: center;
}

.modal-note{
  font-size: .82rem;
  color: var(--gold-deep);
  margin-top: .7rem;
}

.modal-nav{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.6rem;
}
.modal-nav .nav-btn{ margin-left: auto; }
.modal-nav .back{
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  padding: .4rem 0;
}
.modal-nav .back:hover{ color: var(--text); }

.form-group{ margin-bottom: 1.1rem; }
.form-group label{
  display: block;
  margin-bottom: .35rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
}
.form-group input,
.form-group textarea{
  width: 100%;
  padding: .7rem .8rem;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: .95rem;
  box-sizing: border-box;
}
.form-group textarea{ resize: vertical; min-height: 72px; }
.form-group input:focus-visible,
.form-group textarea:focus-visible{ outline: 2px solid var(--gold-deep); outline-offset: -1px; }

.error-message{
  color: #B23B3B;
  font-size: .82rem;
  margin: .35rem 0 0;
  min-height: 1em;
}
.success-message{
  margin-top: 1rem;
  padding: .8rem 1rem;
  background: var(--gold-pale);
  color: var(--gold-deep);
  font-size: .88rem;
  font-weight: 600;
}

.hp-field{
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 480px){
  .modal-content{ padding: 1.8rem 1.3rem 1.4rem; }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px){
  .hero__inner{ grid-template-columns: 1fr; }
  .hero__visual{ order: -1; }
  .why__inner{ grid-template-columns: 1fr; }
  .steps__list{ grid-template-columns: 1fr; gap: 2.4rem; }
  .pricing__grid{ grid-template-columns: 1fr; }
  .feature{ grid-template-columns: auto 1fr; }
  .feature__demo{ display: none; }
  .feature--reverse{ grid-template-columns: auto 1fr; }
}

@media (max-width: 560px){
  .topbar__inner{ padding: .75rem 1.25rem; }
  .hero__inner{ padding-top: 2rem; }
  .feature{ grid-template-columns: 1fr; row-gap: .6rem; }
  .feature__num{ font-size: 1.8rem; }
}
