/* ============================================
   Arnaud Simonnet — Theme
   Dark Space + Polynesian Aesthetic
   ============================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Raleway:wght@300;400;500;600;700&display=swap');

/* --- Variables --- */
:root {
  --color-bg: #0a0a12;
  --color-bg-alt: #111122;
  --color-bg-card: #161630;
  --color-surface: #1a1a35;
  --color-text: #e8e4df;
  --color-text-muted: #9a96a8;
  --color-gold: #d4a853;
  --color-gold-light: #f0d48a;
  --color-turquoise: #3ec9c9;
  --color-turquoise-dark: #2a9e9e;
  --color-coral: #e87461;
  --color-deep-blue: #1e3a5f;
  --color-accent: var(--color-gold);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Raleway', 'Segoe UI', sans-serif;
  --max-width: 1200px;
  --nav-height: 72px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: var(--color-gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-gold-light); }
img { max-width: 100%; height: auto; display: block; }

/* --- Star Background --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 40% 70%, rgba(255,255,255,0.3), transparent),
    radial-gradient(1px 1px at 60% 20%, rgba(255,255,255,0.4), transparent),
    radial-gradient(1px 1px at 80% 50%, rgba(255,255,255,0.2), transparent),
    radial-gradient(2px 2px at 10% 80%, rgba(212,168,83,0.3), transparent),
    radial-gradient(1.5px 1.5px at 90% 10%, rgba(62,201,201,0.3), transparent);
  background-size: 300px 300px, 400px 400px, 350px 350px, 250px 250px, 500px 500px, 450px 450px;
  animation: drift 120s linear infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes drift {
  to { background-position: 300px 300px, -400px 400px, 350px -350px, -250px 250px, 500px -500px, -450px 450px; }
}

/* --- Layout --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 2rem; position: relative; z-index: 1; }

/* --- Header / Navigation --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(10, 10, 18, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212, 168, 83, 0.15);
  z-index: 1000;
  transition: background var(--transition);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.site-logo img {
  height: 42px;
  width: auto;
}
.site-logo span {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-gold);
  letter-spacing: 0.02em;
}

/* Desktop Nav */
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}
.main-nav a {
  display: block;
  padding: 0.5rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: 4px;
  transition: all var(--transition);
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--color-gold);
  background: rgba(212, 168, 83, 0.08);
}

/* Burger Menu */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}
.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-gold);
  transition: all var(--transition);
}
.burger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile Nav */
@media (max-width: 900px) {
  .burger { display: flex; }
  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--color-bg-alt);
    border-left: 1px solid rgba(212,168,83,0.15);
    padding: 5rem 2rem 2rem;
    transition: right var(--transition);
    z-index: 999;
  }
  .main-nav.open { right: 0; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border-radius: 6px;
  }
  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
    z-index: 998;
  }
  .nav-overlay.active { opacity: 1; pointer-events: all; }
}

/* --- Main Content --- */
main {
  margin-top: var(--nav-height);
  min-height: calc(100vh - var(--nav-height));
  position: relative;
  z-index: 1;
}

/* --- Hero Section --- */
.hero {
  text-align: center;
  padding: 5rem 0 4rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: 1rem;
  letter-spacing: 0.04em;
  line-height: 1.2;
}
.hero .subtitle {
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--color-text-muted);
  max-width: 700px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

/* --- Section --- */
.section {
  padding: 4rem 0;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--color-gold);
  text-align: center;
  margin-bottom: 1rem;
  letter-spacing: 0.03em;
}
.section-subtitle {
  font-size: 1rem;
  color: var(--color-text-muted);
  text-align: center;
  max-width: 650px;
  margin: 0 auto 3rem;
  font-weight: 300;
}

/* Gold divider */
.divider {
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
  margin: 0 auto 2rem;
}

/* --- Book Cards --- */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2.5rem;
  margin-top: 2rem;
}
.book-card {
  background: var(--color-bg-card);
  border: 1px solid rgba(212,168,83,0.1);
  border-radius: 12px;
  overflow: hidden;
  transition: all var(--transition);
  position: relative;
}
.book-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212,168,83,0.3);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4), 0 0 0 1px rgba(212,168,83,0.1);
}
.book-card__image {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
}
.book-card__body {
  padding: 1.75rem;
}
.book-card__tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}
.book-card__tag--new {
  background: rgba(232,116,97,0.15);
  color: var(--color-coral);
}
.book-card__tag--sf {
  background: rgba(62,201,201,0.12);
  color: var(--color-turquoise);
}
.book-card__tag--en {
  background: rgba(212,168,83,0.12);
  color: var(--color-gold);
}
.book-card__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}
.book-card__desc {
  font-size: 0.92rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}
.btn-gold {
  background: linear-gradient(135deg, var(--color-gold), #c49a3d);
  color: var(--color-bg);
}
.btn-gold:hover {
  background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
  color: var(--color-bg);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212,168,83,0.3);
}
.btn-outline {
  background: transparent;
  color: var(--color-gold);
  border: 1px solid var(--color-gold);
}
.btn-outline:hover {
  background: rgba(212,168,83,0.1);
  color: var(--color-gold-light);
}
.btn-turquoise {
  background: linear-gradient(135deg, var(--color-turquoise), var(--color-turquoise-dark));
  color: var(--color-bg);
}
.btn-turquoise:hover {
  color: var(--color-bg);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(62,201,201,0.3);
}

/* --- Page Content (single pages) --- */
.page-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 0 4rem;
}
.page-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}
.page-content h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--color-gold-light);
  margin: 2.5rem 0 1rem;
}
.page-content h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-turquoise);
  margin: 2rem 0 0.75rem;
}
.page-content p {
  margin-bottom: 1.25rem;
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.8;
}
.page-content blockquote {
  border-left: 3px solid var(--color-gold);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(212,168,83,0.05);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--color-text-muted);
}
.page-content ul, .page-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
  color: var(--color-text);
}
.page-content li { margin-bottom: 0.5rem; }

/* --- Book Detail Page --- */
.book-hero {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: start;
  padding: 3rem 0;
}
.book-hero__cover {
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(212,168,83,0.1);
}
.book-hero__info { padding: 1rem 0; }
.book-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--color-gold);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}
.book-hero__subtitle {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  font-style: italic;
  color: var(--color-turquoise);
  margin-bottom: 1.5rem;
}
.book-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: var(--color-surface);
  border-radius: 8px;
  border: 1px solid rgba(212,168,83,0.08);
}
.book-meta__item {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.book-meta__item strong {
  color: var(--color-text);
  font-weight: 600;
}

/* Pillars / Features */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}
.pillar {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--color-surface);
  border: 1px solid rgba(212,168,83,0.08);
  border-radius: 12px;
  transition: all var(--transition);
}
.pillar:hover {
  border-color: rgba(212,168,83,0.2);
  transform: translateY(-2px);
}
.pillar__icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.pillar__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}
.pillar__text {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* Extracts */
.extract {
  background: var(--color-surface);
  border: 1px solid rgba(212,168,83,0.08);
  border-radius: 12px;
  padding: 2rem 2.5rem;
  margin: 2rem 0;
  position: relative;
}
.extract::before {
  content: '«';
  font-family: var(--font-display);
  font-size: 4rem;
  color: var(--color-gold);
  opacity: 0.3;
  position: absolute;
  top: 0.5rem;
  left: 1rem;
}
.extract__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-turquoise);
  margin-bottom: 1rem;
}
.extract__text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.9;
  color: var(--color-text);
}

/* --- BD Gallery (Lagoon Love) --- */
.bd-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.bd-gallery__item {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(212,168,83,0.08);
  transition: all var(--transition);
}
.bd-gallery__item:hover {
  transform: scale(1.02);
  border-color: rgba(212,168,83,0.2);
}
.bd-gallery__item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.bd-gallery__caption {
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  background: var(--color-bg-card);
}

/* --- Contact Form --- */
.contact-form {
  max-width: 600px;
  margin: 2rem auto;
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--color-surface);
  border: 1px solid rgba(212,168,83,0.15);
  border-radius: 6px;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(212,168,83,0.1);
}
.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

/* --- YouTube Embed --- */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: 12px;
  overflow: hidden;
  margin: 2rem 0;
  border: 1px solid rgba(212,168,83,0.1);
}
.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid rgba(212,168,83,0.1);
  padding: 2.5rem 0 2rem;
  margin-top: 4rem;
  position: relative;
  z-index: 1;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-nav a {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.footer-nav a:hover { color: var(--color-gold); }
.footer-copy {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* --- Cookie Banner --- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-bg-alt);
  border-top: 1px solid rgba(212,168,83,0.15);
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  z-index: 2000;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-banner p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0;
}
.cookie-banner a { text-decoration: underline; }

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}
.fade-in-d1 { animation-delay: 0.1s; }
.fade-in-d2 { animation-delay: 0.2s; }
.fade-in-d3 { animation-delay: 0.3s; }
.fade-in-d4 { animation-delay: 0.4s; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .book-hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  .book-hero__cover {
    max-width: 300px;
    margin: 0 auto;
  }
  .book-meta { justify-content: center; }
  .hero { padding: 3rem 0 2.5rem; }
  .section { padding: 2.5rem 0; }
  .footer-inner { flex-direction: column; text-align: center; }
  .container { padding: 0 1.25rem; }
}
