/* =========================================
   MINE2RIEN — Feuille de style principale
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Lato:wght@300;400;700&display=swap');

/* ── Variables ── */
:root {
  --noir:      #0d0d0d;
  --fond:      #141414;
  --surface:   #1c1c1c;
  --creme:     #f0ead8;
  --creme-dim: #a89e8a;
  --rose:      #c9748a;
  --or:        #c9a84c;
  --bordure:   #2e2e2e;

  --police-titre: 'Playfair Display', Georgia, serif;
  --police-corps: 'Lato', system-ui, sans-serif;
}

body.theme-jour {
  --noir:      #ffffff;
  --fond:      #f7f3ec;
  --surface:   #ede8df;
  --creme:     #1a1a1a;
  --creme-dim: #5a5248;
  --rose:      #b05a72;
  --or:        #a8873a;
  --bordure:   #c8c0b0;
}
body.theme-jour .nav {
  background: rgba(247,243,236,.95);
}
body.theme-jour .hero-titre,
body.theme-jour .hero-slogan {
  color: #f0ead8;
}
body.theme-jour .btn-contour {
  border-color: rgba(240,234,216,.6);
  color: #f0ead8;
}
body.theme-jour .btn-contour:hover {
  border-color: var(--rose);
  color: var(--rose);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--fond);
  color: var(--creme);
  font-family: var(--police-corps);
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1.8;
  min-height: 100vh;
  transition: background .3s, color .3s;
}

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

a {
  color: var(--rose);
  text-decoration: none;
  transition: color .2s;
}
a:hover { color: var(--or); }

/* ── Barre de navigation ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(13,13,13,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--bordure);
  transition: background .3s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 2.5rem;
}

.nav-logo-groupe {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.nav-logo {
  font-family: var(--police-titre);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--creme);
  letter-spacing: .04em;
}
.nav-logo:hover { color: var(--rose); }
.nav-logo-2 {
  display: inline-block;
  transform: scale(1.6);
  transform-origin: center bottom;
  margin: 0 .18em;
}

.nav-icone {
  color: var(--creme-dim);
  display: flex;
  align-items: center;
  line-height: 0;
  transition: color .2s;
}
.nav-icone:hover { color: var(--rose); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--creme-dim);
  font-size: .85rem;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: color .2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--creme); }

/* Menu burger mobile */
.btn-theme {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--creme);
  padding: 4px;
  opacity: .7;
  transition: opacity .2s;
}
.btn-theme:hover { opacity: 1; }
.btn-theme .icone-soleil { display: none; }
body.theme-jour .btn-theme .icone-lune { display: none; }
body.theme-jour .btn-theme .icone-soleil { display: block; }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--creme);
  border-radius: 2px;
  transition: .3s;
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

/* Image de fond hero */
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/hero-2.jpg');
  background-size: cover;
  background-position: center;
  filter: brightness(.25);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero-eyebrow {
  font-size: .75rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 1.2rem;
}

.hero-titre {
  font-family: var(--police-titre);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--creme);
  margin-bottom: 1.2rem;
}

.hero-slogan {
  font-style: italic;
  color: var(--creme-dim);
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
}

/* Ligne signature animée */
.ligne-signature {
  width: 0;
  height: 1px;
  background: var(--rose);
  margin: 0 auto 2.5rem;
  animation: etirer 1.4s ease forwards .4s;
}
@keyframes etirer { to { width: 120px; } }

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Boutons ── */
.btn {
  display: inline-block;
  padding: .7rem 1.8rem;
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
  border-radius: 2px;
  transition: .2s;
  cursor: pointer;
}

.btn-rose {
  background: var(--rose);
  color: var(--noir);
}
.btn-rose:hover { background: #d9849a; color: var(--noir); }

.btn-contour {
  border: 1px solid var(--creme-dim);
  color: var(--creme);
}
.btn-contour:hover { border-color: var(--rose); color: var(--rose); }

/* ── Layout général ── */
.page-contenu {
  padding-top: 80px; /* hauteur nav */
}

.section {
  padding: 5rem 2rem;
}

.section-etroite {
  max-width: 780px;
  margin: 0 auto;
}

.section-large {
  max-width: 1100px;
  margin: 0 auto;
}

/* Titres de section */
.section-titre {
  font-family: var(--police-titre);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 600;
  color: var(--creme);
  margin-bottom: .5rem;
}

.section-sous-titre {
  font-style: italic;
  color: var(--creme-dim);
  margin-bottom: 1rem;
}

.separateur {
  width: 50px;
  height: 2px;
  background: var(--rose);
  margin: 1.2rem 0 2.5rem;
}

/* ── Fond alterné ── */
.bg-surface { background: var(--surface); }

/* ── Cartes livres / nouvelles ── */
.grille-cartes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.carte {
  background: var(--noir);
  border: 1px solid var(--bordure);
  border-radius: 3px;
  overflow: hidden;
  transition: transform .25s, border-color .25s;
  display: flex;
  flex-direction: column;
}
.carte:hover {
  transform: translateY(-4px);
  border-color: var(--rose);
}

/* Emplacement image dans une carte */
.carte-image {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.carte-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.carte-image img.img-complete {
  object-fit: contain;
}
/* Label placeholder visible si pas d'image */
.carte-image-placeholder {
  font-size: .75rem;
  letter-spacing: .1em;
  color: var(--bordure);
  text-transform: uppercase;
  text-align: center;
  padding: 1rem;
  pointer-events: none;
  position: absolute;
}

.carte-corps {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.carte-corps .carte-lien,
.carte-corps .btn {
  margin-top: auto;
}

.carte-label {
  font-size: .7rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: .5rem;
}

.carte-titre {
  font-family: var(--police-titre);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--creme);
  margin-bottom: .7rem;
  line-height: 1.3;
}

.carte-extrait {
  font-size: .9rem;
  color: var(--creme-dim);
  line-height: 1.7;
  margin-bottom: 1.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.carte-lien {
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--rose);
  font-weight: 700;
}
.carte-lien::after { content: ' →'; }
.carte-lien--sans-fleche::after { content: ''; }
.carte-lien:hover { color: var(--or); }

/* ── Bloc roman (2 colonnes image + texte) ── */
.bloc-roman {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: start;
  margin-bottom: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--bordure);
}
.bloc-roman:last-child { border-bottom: none; }

.bloc-roman-image {
  background: var(--surface);
  aspect-ratio: 2/3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--bordure);
  overflow: hidden;
  position: relative;
}
.bloc-roman-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-placeholder-label {
  font-size: .7rem;
  color: var(--bordure);
  text-transform: uppercase;
  letter-spacing: .1em;
  text-align: center;
  padding: 1rem;
  position: absolute;
}

.bloc-roman-citation {
  font-family: var(--police-titre);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--rose);
  border-left: 2px solid var(--rose);
  padding-left: 1rem;
  margin-bottom: 1.5rem;
}

.bloc-roman-texte p {
  color: var(--creme-dim);
  margin-bottom: 1rem;
  font-size: .95rem;
}

/* ── Boutons onglets (romans, poésies) ── */
.onglets {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: 2.5rem;
}

.onglet-btn {
  background: none;
  border: 1px solid var(--bordure);
  color: var(--creme-dim);
  font-family: var(--police-corps);
  font-size: .8rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: .45rem 1.1rem;
  border-radius: 2px;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.onglet-btn:hover { border-color: var(--rose); color: var(--creme); }
.onglet-btn.actif { background: var(--rose); border-color: var(--rose); color: var(--noir); font-weight: 700; }

/* ── Poésies ── */
.poesie-bloc {
  margin-bottom: 3.5rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid var(--bordure);
}
.poesie-bloc:last-child { border-bottom: none; }

.poesie-titre {
  font-family: var(--police-titre);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--creme);
  margin-bottom: 1.5rem;
}

.poesie-texte {
  font-size: .98rem;
  line-height: 2;
  color: var(--creme-dim);
  white-space: pre-line;
}

.poesie-image {
  margin-top: 2rem;
  max-width: 500px;
}
.poesie-image img {
  width: 100%;
  border: 1px solid var(--bordure);
}

/* ── Nouvelle (page dédiée) ── */
.nouvelle-hero {
  padding: 6rem 2rem 3rem;
  text-align: center;
  border-bottom: 1px solid var(--bordure);
}

.nouvelle-image-hero {
  max-width: 320px;
  margin: 2rem auto;
}
.nouvelle-image-hero img {
  width: 100%;
  border: 1px solid var(--bordure);
}

.nouvelle-corps {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.nouvelle-corps p {
  margin-bottom: 1.4rem;
  color: var(--creme-dim);
  font-size: 1rem;
  line-height: 1.9;
}

.nouvelle-corps blockquote {
  border-left: 2px solid var(--rose);
  padding-left: 1.2rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--creme);
}

/* ── Bibliothèque (grille photos livres) ── */
.biblio-intro {
  color: var(--creme-dim);
  font-style: italic;
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

.grille-biblio {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.2rem;
}

.biblio-livre {
  background: var(--surface);
  border: 1px solid var(--bordure);
  aspect-ratio: 2/3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 2px;
  transition: border-color .2s, transform .2s;
  position: relative;
}
.biblio-livre:hover {
  border-color: var(--rose);
  transform: translateY(-3px);
}
.biblio-livre img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.biblio-placeholder {
  font-size: .65rem;
  color: var(--bordure);
  text-transform: uppercase;
  letter-spacing: .08em;
  text-align: center;
  padding: .5rem;
  position: absolute;
}

/* ── Page biographie ── */
.bio-img-mobile { display: none; }

.bio-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: start;
}

.bio-photo {
  background: var(--surface);
  aspect-ratio: 3/4;
  border: 1px solid var(--bordure);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.bio-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bio-texte h2 {
  font-family: var(--police-titre);
  font-size: 2rem;
  margin-bottom: .5rem;
}
.bio-texte .separateur { margin-bottom: 1.5rem; }
.bio-texte p {
  color: var(--creme-dim);
  margin-bottom: 1.1rem;
  font-size: .97rem;
}

/* ── Contact ── */
.contact-bloc {
  text-align: center;
  padding: 4rem 2rem;
}
.contact-bloc p {
  color: var(--creme-dim);
  margin-bottom: .5rem;
}
.contact-lien {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  color: var(--rose);
  font-size: 1.05rem;
  margin-top: .5rem;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--bordure);
  padding: 2rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: .8rem;
  color: var(--creme-dim);
}

.footer-liens {
  display: flex;
  gap: 1.5rem;
}
.footer-liens a {
  color: var(--creme-dim);
  font-size: .8rem;
}
.footer-liens a:hover { color: var(--rose); }

/* ── Bouton retour en haut ── */
#btn-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 2.4rem;
  height: 2.4rem;
  background: var(--rose);
  color: var(--noir);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 999;
}
#btn-top.visible {
  opacity: 1;
  pointer-events: auto;
}
#btn-top:hover { transform: translateY(-3px); }

/* ── Page : texte long (nouvelle complète) ── */
.texte-long {
  font-size: 1rem;
  line-height: 1.95;
  color: var(--creme-dim);
}
.texte-long p { margin-bottom: 1.3rem; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  [style*="grid-template-columns:repeat(4,1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 768px) {
  .nav { padding: .8rem 1.2rem; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 58px; left: 0; right: 0;
    background: rgba(13,13,13,.97);
    padding: 1.5rem 2rem;
    gap: 1.2rem;
    border-bottom: 1px solid var(--bordure);
    transition: background .3s;
  }
  .nav-links.ouvert { display: flex; }
  .burger { display: flex; }
  body.theme-jour .nav-links { background: rgba(247,243,236,.97); }

  .section { padding: 3rem 1.2rem; }

  .bloc-roman {
    grid-template-columns: 1fr !important;
  }
  .bloc-roman-image { display: none; }
  .bloc-roman-texte { width: 100%; max-width: 100%; }

  /* Biographie */
  .bio-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .bio-photos-desktop { display: none; }
  .bio-img-mobile {
    display: block;
    max-width: 280px;
    margin: 1.5rem auto;
    overflow: hidden;
    border: 1px solid var(--bordure);
  }
  .bio-img-mobile img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
  }

  .footer { flex-direction: column; text-align: center; }

  .grille-cartes { grid-template-columns: 1fr; }
  [style*="grid-template-columns:repeat(4,1fr)"] {
    grid-template-columns: 1fr !important;
  }
  .carte-image { aspect-ratio: 16/9; }
  .carte-corps > .btn { display: block; width: fit-content; margin-top: .75rem; }
}

@media (max-width: 480px) {
  .section { padding: 2rem 1rem; }

  .section-titre { font-size: clamp(1.5rem, 7vw, 2rem); }

  /* Biographie */
  .bio-img-mobile { max-width: 100%; }
  .bio-texte p { font-size: .93rem; }

  /* Bouton retour en haut */
  #btn-top { bottom: 1.2rem; right: 1.2rem; width: 2.1rem; height: 2.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ligne-signature { animation: none; width: 120px; }
  .carte, .biblio-livre { transition: none; }
}
