/* ============================================================
   ARCANES MYSTIQUES — Feuille de style principale
   Direction artistique : manuscrit enluminé — encre, or et papier
   Approche : Mobile First (base = mobile, media queries = min-width)
   ============================================================ */

/* ---------- Variables & Reset ---------- */
:root {
  --bg-primary:      #09080f;
  --bg-secondary:    #0e0c18;
  --bg-tertiary:     #14111f;

  --gold:            #c6a15f;
  --gold-light:      #e3c489;
  --gold-deep:       #9d793b;

  --wine-light:      #a5486a;

  --text-primary:    #efe8db;
  --text-secondary:  #ad9fc4;
  --text-muted:      #837a99;

  --line:            rgba(198,161,95,0.16);
  --line-strong:     rgba(198,161,95,0.42);

  --shadow-soft:      0 24px 60px rgba(0,0,0,0.45);

  --font-display:  'Cinzel', serif;
  --font-body:     'Raleway', sans-serif;

  --radius:        3px;
  --ease:          cubic-bezier(0.4, 0, 0.2, 1);
  --transition:    0.35s var(--ease);

  --space-sm:  1.4rem;
  --space-md:  2.2rem;
  --space-lg:  3.6rem;
  --space-xl:  6rem;
  --space-2xl: 9rem;

  --nav-height:    64px;
}

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

button, [role="button"] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  font-weight: 300;
  min-width: 320px;
}

img, video, iframe { max-width: 100%; height: auto; display: block; }
a  { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }
ul { list-style: none; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--gold-deep); }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }
::selection { background: var(--gold-deep); color: var(--bg-primary); }

/* ---------- Accessibility utilities ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 10000;
  background: var(--gold);
  color: var(--bg-primary);
  padding: 0.8rem 1.4rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: var(--radius);
  transition: top var(--transition);
}

.skip-link:focus {
  top: 1rem;
}

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

.faq-question:focus-visible {
  outline-offset: -2px;
}

/* ---------- Typography ---------- */
h1,h2,h3,h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.25;
  color: var(--text-primary);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow::before,
.eyebrow::after {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--line-strong);
}

.section-title {
  font-size: clamp(1.4rem, 6vw, 2.5rem);
  font-weight: 500;
  text-align: center;
  color: var(--gold-light);
  margin-bottom: 0.6rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 300;
  margin-bottom: 2.4rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-sm);
}

.section-divider span {
  display: block;
  height: 1px;
  width: 44px;
  background: var(--line-strong);
}

/* ---------- Utility ---------- */
.container, .nav-container {
  width: 94%;
  max-width: 1180px;
  margin: 0 auto;
}

.section { padding: var(--space-lg) 0; }

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.95rem 1.8rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
  text-transform: uppercase;
  overflow: hidden;
  isolation: isolate;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
  z-index: -1;
}

.btn-primary {
  color: var(--gold-light);
  border-color: var(--line-strong);
}

.btn-primary:hover {
  color: var(--bg-primary);
  border-color: var(--gold);
}

.btn-primary:hover::before { transform: scaleX(1); }

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--line);
}

.btn-secondary:hover {
  color: var(--gold-light);
  border-color: var(--line-strong);
}

.btn-sm {
  min-height: 40px;
  padding: 0.7rem 1.4rem;
  font-size: 0.7rem;
}

.btn.is-added {
  color: var(--bg-primary);
  border-color: var(--gold);
}

.btn.is-added::before { transform: scaleX(1); }

/* ---------- Navigation ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: background 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: rgba(9,8,15,0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  flex-shrink: 0;
  white-space: nowrap;
}

.nav-logo::before {
  content: '';
  display: block;
  width: 1px;
  height: 1.6em;
  background: var(--gold);
  margin-right: 0.85em;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 2.2rem;
  flex: 1;
  justify-content: center;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  position: relative;
  padding-bottom: 6px;
  white-space: nowrap;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active { color: var(--gold-light); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-cta { display: none; flex-shrink: 0; }

.hamburger {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  border: none;
  background: none;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--gold);
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-top: var(--nav-height);
}

#starCanvas {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(20,17,31,0.25) 0%, rgba(9,8,15,0.7) 72%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 1rem;
  max-width: 780px;
}

.hero-badge,
.hero-title,
.hero-text,
.hero-btns {
  animation: heroRise 0.9s var(--ease) both;
}

.hero-badge { animation-delay: 0.05s; }
.hero-title { animation-delay: 0.15s; }
.hero-text  { animation-delay: 0.25s; }
.hero-btns  { animation-delay: 0.35s; }

@keyframes heroRise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-badge {
  display: inline-flex;
  margin-bottom: 2.2rem;
}

.hero-title {
  font-size: clamp(1.7rem, 9vw, 2.1rem);
  font-weight: 500;
  margin-bottom: 1.4rem;
  line-height: 1.18;
}

.hero-title span {
  font-style: italic;
  font-weight: 400;
  color: var(--gold-light);
}

.hero-text {
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-secondary);
  margin-bottom: 2.8rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-btns {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  justify-content: center;
}

.hero-btns .btn { justify-content: center; }

.hero-scroll {
  display: none;
  position: absolute;
  bottom: 2.4rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  color: var(--text-muted);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.scroll-arrow {
  width: 1px;
  height: 34px;
  background: linear-gradient(var(--gold), transparent);
  animation: scrollBounce 1.8s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%,100% { opacity: 0.3; transform: scaleY(1); }
  50%      { opacity: 1; transform: scaleY(1.15); }
}

/* ---------- Features ---------- */
.features { background: var(--bg-secondary); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.feature-card {
  padding: 0;
  text-align: left;
  border-left: none;
}

.feature-index {
  display: block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--gold-deep);
  letter-spacing: 0.1em;
  margin-bottom: 1.1rem;
}

.feature-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.7rem;
  letter-spacing: 0.02em;
}

.feature-card p {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---------- Ebooks Grid ---------- */
.ebooks-section { background: var(--bg-primary); }

.ebooks-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.ebook-card {
  background: var(--bg-primary);
  transition: background var(--transition);
  display: flex;
  flex-direction: column;
}

.ebook-card:hover { background: var(--bg-secondary); }

.ebook-cover {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.ebook-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ebook-cover:not(:has(img))::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(255,255,255,0.05) 0%, transparent 65%);
}

.ebook-cover:not(:has(img))::after {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(198,161,95,0.28);
  pointer-events: none;
}

.cover-tone-1 { background: linear-gradient(160deg, #150b28 0%, #1d1338 100%); }
.cover-tone-2 { background: linear-gradient(160deg, #0c1626 0%, #142338 100%); }
.cover-tone-3 { background: linear-gradient(160deg, #12101f 0%, #1a1830 100%); }
.cover-tone-4 { background: linear-gradient(160deg, #1a0d28 0%, #241333 100%); }

.book-mark {
  position: relative;
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 600;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--gold);
  margin-bottom: 0.9rem;
}

.book-mark-lg {
  font-size: 4rem;
  -webkit-text-stroke: 1.4px var(--gold);
  margin-bottom: 1.1rem;
}

.cover-title {
  position: relative;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.ebook-body {
  padding: 1.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ebook-category {
  font-size: 0.68rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 0.7rem;
}

.ebook-title {
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 0.8rem;
  color: var(--text-primary);
}

.ebook-desc {
  font-size: 0.87rem;
  font-weight: 300;
  color: var(--text-secondary);
  flex: 1;
  margin-bottom: 1.3rem;
}

.ebook-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.3rem;
  border-top: 1px solid var(--line);
  gap: 0.8rem;
}

.ebook-footer .btn {
  width: 100%;
  justify-content: center;
  margin-top: 0.4rem !important;
}

.ebook-price {
  display: flex;
  flex-direction: column;
}

.price-current {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--gold-light);
}

.price-old {
  font-size: 0.76rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

/* ---------- Empty state ---------- */
.empty-state {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: var(--space-lg) 2rem;
  border: 1px solid var(--line);
}

.empty-state-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--gold-light);
  margin-bottom: 0.8rem;
}

.empty-state-text {
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.75;
}

/* ---------- Testimonials ---------- */
.testimonials { background: var(--bg-secondary); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.testimonials-wrapper {
  position: relative;
  overflow: hidden;
}

.testimonials-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.testimonial-card {
  min-width: 100%;
  padding: 0 1rem;
}

.testimonial-inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  padding-top: 1rem;
}

.quote-icon {
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-style: italic;
  color: var(--gold-deep);
  line-height: 1;
  margin-bottom: 0.6rem;
}

.testimonial-text {
  font-size: 0.92rem;
  font-weight: 300;
  font-style: italic;
  color: var(--text-primary);
  margin-bottom: 2.2rem;
  line-height: 1.75;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.author-name {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.author-title {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--text-muted);
}

.testimonials-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 2.6rem;
}

.testi-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  border: none;
  background: none;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 1.1rem;
  cursor: pointer;
  transition: color var(--transition), transform var(--transition);
}

.testi-btn:hover { color: var(--gold-light); }
.testi-prev:hover { transform: translateX(-3px); }
.testi-next:hover { transform: translateX(3px); }

.testi-dots {
  display: flex;
  gap: 0.5rem;
}

.testi-dot {
  box-sizing: content-box;
  width: 14px;
  height: 1px;
  padding: 17px 10px;
  background-color: var(--line-strong);
  background-clip: content-box;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.testi-dot.active {
  background-color: var(--gold);
  width: 26px;
}

/* ---------- FAQ ---------- */
.faq-section { background: var(--bg-primary); }

.faq-list {
  max-width: 760px;
  margin: 0 auto;
}

.faq-item {
  border-top: 1px solid var(--line);
}

.faq-list .faq-item:last-child { border-bottom: 1px solid var(--line); }

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.3rem 0.2rem;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  gap: 1rem;
  transition: color var(--transition);
  min-height: 44px;
}

.faq-question:hover { color: var(--gold-light); }

.faq-icon {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1.3rem;
  color: var(--gold);
  flex-shrink: 0;
  transition: transform var(--transition);
  line-height: 1;
}

.faq-item.open .faq-icon { transform: rotate(45deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.faq-answer-inner {
  padding: 0 1.6rem 1.2rem 0.2rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 300;
  line-height: 1.8;
}

.faq-item.open .faq-answer { max-height: 500px; }

/* ---------- Newsletter ---------- */
.newsletter {
  background: var(--bg-secondary);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: var(--space-lg) 0;
  text-align: center;
}

.newsletter .section-title { margin-bottom: 0.6rem; }

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: 460px;
  margin: 2.2rem auto 0;
}

.newsletter-form input {
  width: 100%;
  min-height: 44px;
  padding: 0.9rem 0.2rem;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1rem;
  outline: none;
}

.newsletter-form input::placeholder { color: var(--text-muted); }

.newsletter-form .btn {
  width: 100%;
  border: 1px solid var(--line-strong);
  padding: 0.9rem;
  color: var(--gold);
}

.newsletter-form .btn::before { display: none; }
.newsletter-form .btn:hover { color: var(--gold-light); }

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--line);
  padding: var(--space-lg) 0 2.4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.6rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 300;
  margin-top: 1.2rem;
  line-height: 1.75;
  max-width: 320px;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 1.6rem;
}

.social-links a {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}

.social-links a:hover { color: var(--gold); }

.social-links a:not(:last-child)::after {
  content: '';
  display: inline-block;
  width: 1px;
  height: 10px;
  background: var(--line-strong);
  margin-left: 1rem;
  vertical-align: middle;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.3rem;
}

.footer-col ul { display: flex; flex-direction: column; gap: 0.7rem; }

.footer-col ul li a {
  font-size: 0.86rem;
  font-weight: 300;
  color: var(--text-secondary);
  display: inline-block;
  min-height: 24px;
}

.footer-col ul li a:hover { color: var(--gold); }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 2.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.6rem;
  font-size: 0.78rem;
  font-weight: 300;
  color: var(--text-muted);
}

.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--gold); }

/* ---------- Contact Page ---------- */
.page-hero {
  min-height: 32vh;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-height) + 1.5rem) 1.5rem 3rem;
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  font-weight: 500;
  color: var(--gold-light);
  margin-bottom: 1rem;
}

.page-hero p {
  color: var(--text-secondary);
  font-weight: 300;
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.4rem;
  align-items: start;
}

.contact-info-card {
  border: 1px solid var(--line);
  padding: 1.6rem;
}

.contact-info-card h3 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--gold-light);
  margin-bottom: 1.8rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--line);
}

.contact-item {
  padding-bottom: 1.4rem;
  margin-bottom: 1.4rem;
  border-bottom: 1px solid var(--line);
}

.contact-item:last-child { border: none; margin-bottom: 0; padding-bottom: 0; }

.contact-item h4 {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.contact-item p  { font-size: 0.9rem; font-weight: 300; color: var(--text-secondary); }

.contact-form-card {
  border: 1px solid var(--line);
  padding: 1.6rem;
}

.contact-form-card h3 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--gold-light);
  margin-bottom: 2rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--line);
}

.form-grid { display: grid; grid-template-columns: 1fr; gap: 1.4rem; }
.form-full { grid-column: 1 / -1; }

.form-group { display: flex; flex-direction: column; gap: 0.6rem; }

.form-group label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
  min-height: 44px;
  padding: 0.85rem 0.1rem;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition);
  width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
}

.form-group select option { background: var(--bg-tertiary); }
.form-group textarea { resize: vertical; min-height: 130px; }

/* ---------- Product Detail Page ---------- */
.ebook-detail-hero {
  padding: calc(var(--nav-height) + 2rem) 0 var(--space-md);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--line);
}

.product-banner-frame {
  position: relative;
  aspect-ratio: 702 / 260;
  border: 1px solid var(--line);
  overflow: hidden;
  margin-bottom: 2rem;
}

.product-banner-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #150b28 0%, #1d1338 100%);
}

.product-fallback::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 25%, rgba(255,255,255,0.05) 0%, transparent 65%);
}

.product-fallback::after {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(198,161,95,0.28);
  pointer-events: none;
}

.product-fallback .book-mark-lg { margin-bottom: 0; }

.product-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

.ebook-detail-info h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 500;
  color: var(--gold-light);
  margin-bottom: 0.8rem;
}

.ebook-detail-category {
  font-size: 0.72rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 1.2rem;
}

.ebook-detail-desc {
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.85;
}

.buy-box {
  border: 1px solid var(--line);
  padding: 1.3rem;
}

.buy-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem;
  margin-bottom: 1.4rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--line);
}

.buy-price-current {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--gold-light);
}

.buy-price-old {
  font-size: 0.96rem;
  color: var(--text-muted);
  text-decoration: line-through;
  padding-bottom: 0.4rem;
}

.buy-save {
  color: var(--wine-light);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding-bottom: 0.4rem;
}

.buy-btns { display: flex; flex-direction: column; gap: 0.9rem; }
.buy-btns .btn { justify-content: center; }

.download-btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.download-note {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: -0.3rem;
}

.product-description-section { padding: var(--space-md) 0; }

.product-full-description p {
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.85;
  margin-bottom: 1.2rem;
}

.product-full-description p:last-child { margin-bottom: 0; }

.product-gallery-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--line);
  padding: var(--space-md) 0;
}

.product-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 2rem;
}

.product-gallery-item {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-primary);
}

.product-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.product-gallery-item:hover img { transform: scale(1.04); }

.related-ebooks { background: var(--bg-secondary); padding: var(--space-xl) 0; border-top: 1px solid var(--line); }

/* ---------- Reveal Animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Notification ---------- */
.toast {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--line-strong);
  border-left: 2px solid var(--gold);
  padding: 1.1rem 1.6rem;
  color: var(--text-primary);
  font-size: 0.86rem;
  font-weight: 300;
  box-shadow: var(--shadow-soft);
  z-index: 9999;
  max-width: none;
  transform: translateY(120%);
  transition: transform 0.5s var(--ease);
}

.toast.show { transform: translateY(0); }

/* ---------- Mobile Nav Overlay ---------- */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(9,8,15,0.98);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.4rem;
  overflow-y: auto;
  padding: 2rem 1rem;
}

.nav-overlay.open { display: flex; }

.nav-overlay a {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  padding: 0.4rem;
}

.nav-overlay a:hover { color: var(--gold); }

.overlay-close {
  position: absolute;
  top: calc(var(--nav-height) + 0.5rem);
  right: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  background: none;
  border: none;
  color: var(--gold);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

/* ============================================================
   RESPONSIVE — Mobile First (min-width ascending)
   361 · 481 · 601 · 769 · 1025
   ============================================================ */

/* ----- ≥361px : grands petits téléphones ----- */
@media (min-width: 361px) {
  .hero-title { font-size: clamp(2.3rem, 5.6vw, 4rem); }
  .nav-logo { font-size: 1.02rem; }
  .section-title { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
}

/* ----- ≥481px : phablettes / petites tablettes ----- */
@media (min-width: 481px) {
  :root { --nav-height: 70px; }

  .container, .nav-container { width: 92%; }
  .section { padding: var(--space-xl) 0; }

  .section-subtitle { font-size: 1rem; margin-bottom: var(--space-lg); }

  .hero-content { padding: 1.5rem 1rem; }
  .hero-btns { flex-direction: row; flex-wrap: wrap; }
  .hero-scroll { display: flex; }
  .hero-text { padding: 0 0.5rem; }

  .features-grid { grid-template-columns: repeat(2, 1fr); gap: 2.4rem; }

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

  .nav-logo { font-size: 1.15rem; }

  .testimonial-text { font-size: 1rem; }
  .testimonials-controls { gap: 2rem; }

  .faq-question { font-size: 0.98rem; gap: 1.5rem; }
  .faq-answer-inner { padding: 0 3.5rem 1.6rem 0.2rem; font-size: 0.92rem; }

  .contact-info-card, .contact-form-card { padding: 2.6rem; }

  .buy-box { padding: 1.6rem; }
  .buy-price-current { font-size: 2.2rem; }
  .buy-price-row { flex-wrap: nowrap; gap: 1rem; }

  .book-mark-lg { font-size: 5.4rem; }

  .product-gallery { grid-template-columns: repeat(3, 1fr); }

  .newsletter { padding: var(--space-xl) 0; }
}

/* ----- ≥601px : tablettes portrait ----- */
@media (min-width: 601px) {
  .ebooks-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.2rem; }
}

/* ----- ≥769px : tablettes / petits ordinateurs portables ----- */
@media (min-width: 769px) {
  .container, .nav-container { width: 90%; }
  .section { padding: var(--space-2xl) 0; }

  .ebook-footer { flex-wrap: nowrap; gap: 1rem; }
  .ebook-footer .btn { width: auto; margin-top: 0 !important; }

  .testimonial-text { font-size: 1.15rem; }

  .newsletter-form {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    border-bottom: 1px solid var(--line-strong);
  }
  .newsletter-form input { flex: 1 1 200px; width: auto; border-bottom: none; }
  .newsletter-form .btn { width: auto; border: none; padding: 0.9rem 0.4rem; }

  .product-hero-grid { grid-template-columns: 1fr 320px; gap: 3rem; }

  .form-grid { grid-template-columns: 1fr 1fr; gap: 1.6rem; }

  .toast { left: auto; right: 2rem; bottom: 2rem; max-width: 320px; transform: translateX(120%); }
  .toast.show { transform: translateX(0); }

  .page-hero { padding: calc(var(--nav-height) + 2rem) 2rem 4rem; }
}

/* ----- ≥1025px : ordinateurs ----- */
@media (min-width: 1025px) {
  :root { --nav-height: 84px; }

  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .hamburger { display: none; }

  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.5fr; }
  .footer-grid--compact { grid-template-columns: 2fr 1fr 1.5fr; }
  .footer-bottom { flex-direction: row; text-align: left; }

  .features-grid { grid-template-columns: repeat(4, 1fr); gap: 0; }
  .feature-card { padding: 0 var(--space-md); border-left: 1px solid var(--line); }
  .feature-card:first-child { border-left: none; padding-left: 0; }

  .contact-grid { grid-template-columns: 1fr 1.6fr; gap: 4rem; }

  .product-hero-grid { grid-template-columns: 1fr 340px; gap: 4rem; }
  .product-gallery { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .scroll-arrow, .btn::before, .navbar,
  .hero-badge, .hero-title, .hero-text, .hero-btns {
    transition: none !important;
    animation: none !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Checkout modal (Chariow) ---------- */
.checkout-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 8, 15, 0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.6rem;
  z-index: 1000;
}

.checkout-modal {
  background: var(--bg-tertiary);
  border: 1px solid var(--line-strong);
  padding: 2rem;
  max-width: 440px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.checkout-modal h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--gold-light);
  margin-bottom: 0.6rem;
}

.checkout-modal p.checkout-modal-note {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.6rem;
}

.checkout-modal .form-grid { margin-bottom: 0.4rem; }

.checkout-modal-error {
  color: var(--wine-light);
  font-size: 0.82rem;
  margin-top: 1rem;
}

.checkout-modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.8rem;
}

.checkout-modal-actions .btn { flex: 1; justify-content: center; }
