/* ============================================================
   Petteri Mäntynen — photographe indépendant
   Feuille de style unique. Polices système, aucune ressource
   distante : seules les photos du dossier /images sont chargées.
   ============================================================ */

/* ── Palette & réglages ────────────────────────────────── */
:root {
  --paper:      #f6f3ee;
  --paper-alt:  #ece7de;
  --ink:        #1b1a18;
  --ink-soft:   #4a4741;
  --ink-faint:  #8c877d;
  --line:       #d9d2c6;
  --accent:     #9a6b3f;
  --accent-ink: #fdfbf7;

  --wrap: 1120px;
  --radius: 3px;
  --shadow: 0 1px 2px rgba(27, 26, 24, .06), 0 12px 30px rgba(27, 26, 24, .07);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
           Georgia, "Times New Roman", serif;
  --sans:  ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
           "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #141311;
    --paper-alt:  #1c1a17;
    --ink:        #f0ebe3;
    --ink-soft:   #bdb6aa;
    --ink-faint:  #857f74;
    --line:       #322e29;
    --accent:     #d0a672;
    --accent-ink: #17150f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px rgba(0, 0, 0, .45);
  }
}

/* ── Base ──────────────────────────────────────────────── */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -.01em;
  margin: 0 0 .6em;
}

h1 { font-size: clamp(2.1rem, 5.6vw, 3.9rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.35rem); }
h3 { font-size: 1.12rem; }

p { margin: 0 0 1.1em; }

a { color: inherit; text-decoration-color: var(--line); text-underline-offset: .18em; }
a:hover { text-decoration-color: var(--accent); }

img { max-width: 100%; display: block; }

figure { margin: 0; }

::selection { background: var(--accent); color: var(--accent-ink); }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.eyebrow {
  font-size: .74rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1.4em;
}

.lede {
  font-size: clamp(1.02rem, 1.6vw, 1.16rem);
  color: var(--ink-soft);
  max-width: 56ch;
}

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 20;
  background: var(--ink);
  color: var(--paper);
  padding: .6rem 1rem;
  border-radius: var(--radius);
}

/* ── En-tête ───────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper); /* repli si color-mix() n'est pas géré */
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding-block: .9rem;
}

.brand { text-decoration: none; line-height: 1.25; }
.brand-name {
  display: block;
  font-family: var(--serif);
  font-size: 1.06rem;
}
.brand-role {
  display: block;
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(.9rem, 2.4vw, 1.9rem);
  font-size: .88rem;
}
.nav a { text-decoration: none; color: var(--ink-soft); }
.nav a:hover { color: var(--ink); }

.nav-cta {
  padding: .38rem .9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink) !important;
}
.nav-cta:hover { border-color: var(--accent); }

/* ── Boutons ───────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: .82rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: .92rem;
  text-decoration: none;
  transition: transform .18s ease, background-color .18s ease,
              border-color .18s ease, color .18s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); color: var(--accent-ink); }

.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ── Accueil (photo pleine largeur) ────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(5rem, 15vw, 10.5rem);
  color: #fff;
  background-color: #14130f;
  background-image:
    linear-gradient(78deg,
      rgba(10, 10, 9, .9) 0%,
      rgba(10, 10, 9, .62) 52%,
      rgba(10, 10, 9, .3) 100%),
    url("images/hero.jpg");
  background-size: cover;
  background-position: center 32%;
  background-repeat: no-repeat;
  border-bottom: 1px solid var(--line);
}

.hero-inner { position: relative; z-index: 1; }
.hero h1 {
  max-width: 22ch;
  color: #fff;
  text-shadow: 0 2px 26px rgba(0, 0, 0, .45);
}
.hero .eyebrow { color: rgba(255, 255, 255, .72); }
.hero .lede { color: rgba(255, 255, 255, .86); }

.hero .btn-primary { background: #fff; color: #1b1a18; }
.hero .btn-primary:hover { background: var(--accent); color: #fff; }
.hero .btn-ghost { border-color: rgba(255, 255, 255, .5); color: #fff; }
.hero .btn-ghost:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 2rem;
}

/* ── Sections ──────────────────────────────────────────── */
.section { padding-block: clamp(3.5rem, 9vw, 6.5rem); }
.section-alt {
  background: var(--paper-alt);
  border-block: 1px solid var(--line);
}

.section-head { max-width: 52ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-sub { color: var(--ink-soft); margin: 0; }

/* ── À propos ──────────────────────────────────────────── */
.about {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1.75rem, 5vw, 4rem);
  align-items: start;
}

.about-portrait {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.about-portrait img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.about-text h2 { margin-top: 0; }
.about-text p { color: var(--ink-soft); }

.facts {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  font-size: .93rem;
}
.facts li {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .8rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}
.facts strong {
  font-weight: 400;
  min-width: 9.5rem;
  font-size: .72rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ── Galerie ───────────────────────────────────────────── */
.gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: clamp(1rem, 2.4vw, 1.75rem);
}

.tile {
  position: relative;
  aspect-ratio: 4 / 5;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.25rem;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-alt);
  box-shadow: var(--shadow);
  transition: transform .28s ease, box-shadow .28s ease;
}
.tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 2px 4px rgba(27, 26, 24, .08), 0 22px 46px rgba(27, 26, 24, .16);
}

.tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.tile:hover img { transform: scale(1.045); }

/* voile sombre pour garder la légende lisible sur toute photo */
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(0, 0, 0, .72) 0%,
    rgba(0, 0, 0, .38) 28%,
    rgba(0, 0, 0, 0) 62%);
}

.tile-caption {
  position: relative;
  z-index: 1;
  color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .55);
}
.tile-caption h3 { margin: 0 0 .2em; color: #fff; }
.tile-caption p {
  margin: 0;
  font-size: .82rem;
  color: rgba(255, 255, 255, .84);
}

/* ── Prestations ───────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(1rem, 2.4vw, 1.75rem);
}

.card {
  padding: clamp(1.4rem, 2.6vw, 2rem);
  background: var(--paper-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card h3 { margin-bottom: .55em; }
.card p { color: var(--ink-soft); font-size: .95rem; }

.card-meta {
  margin: 0;
  padding-top: .9rem;
  border-top: 1px solid var(--line);
  font-size: .74rem !important;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint) !important;
}

/* ── Contact ───────────────────────────────────────────── */
.section-contact {
  background: var(--paper-alt);
  border-top: 1px solid var(--line);
  text-align: center;
}
.contact-inner .lede { margin-inline: auto; }

.btn-mail {
  margin-top: 1.4rem;
  font-family: var(--serif);
  font-size: clamp(1.02rem, 2.4vw, 1.3rem);
  padding: 1rem 2rem;
  word-break: break-word;
}

.contact-note {
  margin: 2rem auto 0;
  max-width: 46ch;
  font-size: .88rem;
  color: var(--ink-faint);
}
.contact-note strong { color: var(--ink-soft); font-weight: 400; }

/* ── Pied de page ──────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2rem;
  font-size: .84rem;
  color: var(--ink-faint);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.5rem;
  justify-content: space-between;
}
.footer-inner p { margin: 0; }

/* ── Adaptations petits écrans ─────────────────────────── */
@media (max-width: 760px) {
  .about { grid-template-columns: 1fr; }
  .about-portrait { max-width: 320px; }
  .hero h1 { max-width: none; }
  .hero { background-position: center 40%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
