/* ==========================================================================
   fred-marie.com — feuille de style principale
   Design system : voir CLAUDE.md
   ========================================================================== */

:root {
  --bg: #faf9f7;          /* fond blanc cassé */
  --ink: #1a1a1a;         /* encre */
  --text: #4a4a48;        /* gris texte */
  --sand: #8a8880;        /* gris sable */
  --line: #e5e2dc;        /* filets */
  --bg-alt: #f1efea;      /* fond alterné */

  --serif: "Iowan Old Style", Charter, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1200px;
  --wrap-text: 720px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
h3 { font-size: 1.25rem; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--bg); padding: 8px 16px; z-index: 100;
}
.skip:focus { left: 0; }

/* Retour à la ligne uniquement sur mobile (titres longs) */
.br-mobile { display: none; }
@media (max-width: 640px) { .br-mobile { display: inline; } }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.brand { display: flex; flex-direction: column; line-height: 1.2; }
.brand:hover { text-decoration: none; }
.brand-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.brand-sub {
  font-size: 0.78rem;
  color: var(--sand);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}

.site-nav ul { display: flex; gap: 28px; list-style: none; }
.site-nav a {
  font-size: 0.92rem;
  color: var(--text);
  letter-spacing: 0.02em;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"] { border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.site-nav a:hover { text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  padding: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block; width: 20px; height: 1.5px;
  background: var(--ink); margin: 4px 0;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

section { padding: 88px 0; }
section.alt { background: var(--bg-alt); }

.section-head { max-width: var(--wrap-text); margin-bottom: 56px; }

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 14px;
}

.lead { font-size: 1.15rem; margin-top: 18px; }

/* --------------------------------------------------------------------------
   Boutons — outline discrets
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  padding: 12px 28px;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn:hover { background: var(--ink); color: var(--bg); text-decoration: none; }

.link-more {
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}
.link-more:hover { border-color: var(--ink); text-decoration: none; }

/* --------------------------------------------------------------------------
   Animations — légères, esprit documentaire
   -------------------------------------------------------------------------- */

@keyframes hero-fade {
  from { opacity: 0; transform: scale(1.02); }
  to   { opacity: 1; transform: scale(1); }
}

/* .reveal est posée par JS : sans JS, tout reste visible */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-media img { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .project-card:hover .project-media img { transform: none; }
}

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

.hero { padding: 0; }

.hero-media {
  position: relative;
  height: min(78vh, 780px);
  background: linear-gradient(160deg, #d8d4cb 0%, #b9b4a8 45%, #8a8880 100%);
  overflow: hidden;
}
.hero-media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  animation: hero-fade 1.4s ease both;
}

.hero-text { padding-top: 64px; padding-bottom: 88px; }
.hero-text h1 { max-width: 900px; }
.hero-text .hero-role {
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 18px;
}
.hero-text .lead { max-width: var(--wrap-text); }

/* --------------------------------------------------------------------------
   Grille projets
   -------------------------------------------------------------------------- */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 32px;
}

.project-card { display: block; }
.project-card:hover { text-decoration: none; }

.project-media {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  margin-bottom: 18px;
}
.project-media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.project-card:hover .project-media img { transform: scale(1.02); }

/* Placeholders gradient — recouverts automatiquement par les vraies photos */
.ph-1 { background: linear-gradient(150deg, #cfcabf 0%, #a29d91 100%); }
.ph-2 { background: linear-gradient(150deg, #d6d2c8 0%, #8f8b80 100%); }
.ph-3 { background: linear-gradient(150deg, #c8c3b8 0%, #9b968a 100%); }
.ph-4 { background: linear-gradient(150deg, #dcd8cf 0%, #a8a396 100%); }
.ph-5 { background: linear-gradient(150deg, #cbc6bb 0%, #8a8880 100%); }
.ph-6 { background: linear-gradient(150deg, #d2cdc2 0%, #96917f 100%); }

a.project-card:hover .project-kicker { color: var(--ink); }
.project-kicker {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sand);
}

/* --------------------------------------------------------------------------
   Split (bio)
   -------------------------------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 64px;
  align-items: center;
}

.split-media {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}
.split-media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

.split .body p + p { margin-top: 16px; }
.split .body .actions { margin-top: 32px; }

/* --------------------------------------------------------------------------
   Presse
   -------------------------------------------------------------------------- */

.press-list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 48px;
  list-style: none;
  margin: 40px 0;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.press-list li {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--ink);
}

.award-note { color: var(--text); max-width: var(--wrap-text); }
.award-note strong { color: var(--ink); font-weight: 600; }

/* --------------------------------------------------------------------------
   Deux colonnes discrètes (livres / formations)
   -------------------------------------------------------------------------- */

.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.duo-item {
  border: 1px solid var(--line);
  padding: 40px;
  background: var(--bg);
}
.duo-item h3 { margin-bottom: 12px; }
.duo-item p { margin-bottom: 24px; }

/* --------------------------------------------------------------------------
   Page projet — galerie éditoriale
   -------------------------------------------------------------------------- */

.project-hero { padding: 0; }
.project-hero .hero-media { height: min(92vh, 1000px); }

.project-intro { padding: 72px 0 40px; }
.project-intro .wrap { max-width: var(--wrap-text); }
.project-intro h1 { margin-bottom: 20px; }
.project-intro .lead { color: var(--text); }

.gallery { padding: 24px 0 96px; }
.gallery .wrap { display: flex; flex-direction: column; gap: 56px; }

.gallery figure { margin: 0; }
.gallery img { width: 100%; height: auto; }
.gallery figcaption {
  font-size: 0.85rem;
  color: var(--sand);
  margin-top: 12px;
  max-width: var(--wrap-text);
}

.gallery-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.project-nav {
  border-top: 1px solid var(--line);
  padding: 40px 0 72px;
}
.project-nav .wrap {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

@media (max-width: 640px) {
  .gallery-pair { grid-template-columns: 1fr; gap: 40px; }
  .gallery .wrap { gap: 40px; }
  .project-hero .hero-media { height: 70vh; }
}

/* --------------------------------------------------------------------------
   Vidéo — façade YouTube (iframe injectée au clic, youtube-nocookie)
   -------------------------------------------------------------------------- */

.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}
.video-embed iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.video-facade {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  padding: 0; border: 0;
  background: none;
  cursor: pointer;
  display: block;
}
.video-facade img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity 0.2s ease;
}
.video-facade:hover img { opacity: 0.85; }
.video-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(26, 26, 26, 0.8);
  transition: background 0.2s ease;
}
.video-play::after {
  content: "";
  position: absolute;
  top: 50%; left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 13px 0 13px 22px;
  border-color: transparent transparent transparent #faf9f7;
}
.video-facade:hover .video-play { background: rgba(26, 26, 26, 0.95); }

/* --------------------------------------------------------------------------
   Page About — mentions presse
   -------------------------------------------------------------------------- */

.mentions { list-style: none; }
.mentions li {
  border-top: 1px solid var(--line);
  padding: 24px 0;
}
.mentions li:last-child { border-bottom: 1px solid var(--line); }
.mentions .mention-source {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 6px;
}
.mentions > li > a {
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.35;
}
.mentions .mention-extra { font-family: var(--sans); font-size: 0.9rem; color: var(--text); margin-top: 4px; }
.mentions .mention-extra a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* --------------------------------------------------------------------------
   Page Publications — mosaïque de parutions
   -------------------------------------------------------------------------- */

.mosaic {
  columns: 4;
  column-gap: 28px;
}
.mosaic img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 28px;
  break-inside: avoid;
  border: 1px solid var(--line);
  background: #fff;
}

/* Bloc des couvertures : grille en lignes (ordre de lecture), avant la mosaïque */
.mosaic-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  align-items: start;
  margin-bottom: 28px;
}
.mosaic-covers img { margin-bottom: 0; }

@media (max-width: 900px) {
  .mosaic { columns: 3; column-gap: 20px; }
  .mosaic img { margin-bottom: 20px; }
  .mosaic-covers { grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 20px; }
}
@media (max-width: 640px) {
  .mosaic { columns: 2; column-gap: 16px; }
  .mosaic img { margin-bottom: 16px; }
  .mosaic-covers { grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 16px; }
}

/* --------------------------------------------------------------------------
   Page Books
   -------------------------------------------------------------------------- */

.books-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.book-card {
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 32px;
  display: flex;
  flex-direction: column;
}
.book-media {
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.book-media img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}
.book-card h2 { font-size: 1.3rem; margin-bottom: 10px; }
.book-card p { font-size: 0.95rem; flex: 1; margin-bottom: 20px; }
.book-card .link-more { align-self: flex-start; }

@media (max-width: 900px) { .books-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; } }
@media (max-width: 640px) { .books-grid { grid-template-columns: 1fr; gap: 20px; } }

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 0;
  font-size: 0.9rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}

.footer-title { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); margin-bottom: 8px; }
.footer-tag { color: var(--sand); max-width: 380px; }
.footer-tag a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-tag a:hover { color: var(--ink); }

.footer-fuji { margin-top: 24px; }
.footer-fuji img { width: auto; height: 48px; margin-bottom: 8px; }
.footer-fuji p { color: var(--sand); font-size: 0.82rem; }

.site-footer nav a, .footer-social a {
  display: block;
  color: var(--text);
  padding: 3px 0;
}

.footer-legal {
  border-top: 1px solid var(--line);
  padding: 20px 0;
  color: var(--sand);
  font-size: 0.8rem;
}

/* --------------------------------------------------------------------------
   Mobile
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split-media { max-width: 480px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 640px) {
  section { padding: 64px 0; }

  .nav-toggle { display: block; }
  .site-nav { display: none; width: 100%; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding-top: 16px; }
  .site-nav li { border-top: 1px solid var(--line); }
  .site-nav a { display: block; padding: 14px 0; }
  .header-inner { flex-wrap: wrap; }

  .projects-grid { grid-template-columns: 1fr; }
  .duo { grid-template-columns: 1fr; }
  .hero-media { height: 60vh; }
  .press-list li { font-size: 1.1rem; }
}
