:root {
  --ink: #243132;
  --ink-soft: #566364;
  --cream: #f8f2e7;
  --paper: #fffdf8;
  --gold: #d99c2b;
  --gold-dark: #9d6818;
  --brown: #6c3f2c;
  --brown-dark: #3e261e;
  --teal: #2c7771;
  --line: rgba(36, 49, 50, 0.13);
  --shadow: 0 22px 65px rgba(55, 39, 28, 0.14);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.container { width: min(calc(100% - 40px), var(--container)); margin-inline: auto; }
.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; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 253, 248, 0.88);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid transparent;
  transition: .25s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 30px rgba(36,49,50,.06); }
.nav-wrap { min-height: 78px; display: flex; align-items: center; justify-content: space-between; }
.brand img { width: 180px; }
.main-nav { display: flex; align-items: center; gap: 28px; font-size: .95rem; font-weight: 600; }
.main-nav a { transition: color .2s ease; }
.main-nav a:hover { color: var(--gold-dark); }
.nav-cta { padding: 12px 18px; border-radius: 999px; background: var(--ink); color: white !important; }
.menu-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; align-items: center; justify-content: center; flex-direction: column; gap: 5px; cursor: pointer; }
.menu-toggle span { width: 24px; height: 2px; background: var(--ink); transition: .2s ease; }

.hero { position: relative; overflow: hidden; padding: 80px 0 88px; background: linear-gradient(135deg, #fffaf0, #f3eadc); }
.hero-pattern { position: absolute; inset: 0; opacity: .5; background-image: radial-gradient(circle at 1px 1px, rgba(108,63,44,.15) 1px, transparent 0); background-size: 30px 30px; mask-image: linear-gradient(to right, black, transparent 70%); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: 55px; }
.eyebrow { margin: 0 0 16px; color: var(--gold-dark); font-size: .78rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.hero h1, .section h2 { font-family: "Marcellus", serif; font-weight: 400; line-height: 1.05; }
.hero h1 { max-width: 700px; margin: 0; font-size: clamp(3.1rem, 6vw, 5.8rem); letter-spacing: -.045em; }
.hero-text { max-width: 650px; margin: 26px 0 0; font-size: 1.15rem; color: var(--ink-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; border-radius: 999px; border: 0; font-weight: 700; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gold); color: #2d2114; box-shadow: 0 12px 28px rgba(217,156,43,.25); }
.btn-primary:hover { background: #e7aa39; }
.btn-secondary { background: rgba(255,255,255,.72); border: 1px solid rgba(36,49,50,.14); }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.hero-points span { padding: 9px 13px; background: rgba(255,255,255,.72); border: 1px solid rgba(36,49,50,.1); border-radius: 999px; font-size: .84rem; }

.hero-visual { position: relative; min-height: 530px; display: grid; place-items: center; }
.orbit { position: absolute; border: 1px solid rgba(108,63,44,.18); border-radius: 50%; }
.orbit-one { width: 460px; height: 460px; }
.orbit-two { width: 330px; height: 330px; border-style: dashed; transform: rotate(18deg); }
.book-stack { position: relative; width: 390px; height: 330px; }
.mini-book { position: absolute; width: 265px; height: 170px; padding: 22px; border: 7px solid white; border-radius: 8px; box-shadow: var(--shadow); color: white; transform-origin: center; }
.mini-book::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.28), transparent 32%), repeating-linear-gradient(135deg, transparent 0 17px, rgba(255,255,255,.07) 17px 19px); }
.mini-book > * { position: relative; z-index: 1; }
.mini-book strong { display: block; margin-top: 48px; font-family: "Marcellus", serif; font-size: 1.75rem; line-height: 1; }
.mini-book small { font-size: .72rem; opacity: .9; }
.mini-logo { font-size: .68rem; font-weight: 800; letter-spacing: .18em; }
.mini-book-red { left: 4px; top: 45px; background: #a74737; transform: rotate(-9deg); }
.mini-book-blue { right: 0; top: 12px; background: #316d90; transform: rotate(8deg); }
.mini-book-gold { left: 67px; bottom: 0; background: #c98724; transform: rotate(-1deg); }
.astrolab-character { position: absolute; right: 5px; bottom: 2px; width: 160px; height: 200px; z-index: 5; filter: drop-shadow(0 18px 20px rgba(56,35,20,.18)); }
.turban { position: absolute; top: 0; left: 37px; width: 86px; height: 56px; background: #fff; border: 3px solid var(--brown-dark); border-radius: 50% 50% 42% 42%; transform: rotate(-3deg); }
.turban::before, .turban::after { content: ""; position: absolute; border: 3px solid var(--brown-dark); border-radius: 50%; }
.turban::before { width: 78px; height: 25px; left: 1px; top: 12px; border-left-color: transparent; border-right-color: transparent; }
.turban::after { width: 28px; height: 28px; right: 0; top: 5px; background: white; }
.face { position: absolute; top: 40px; left: 43px; width: 74px; height: 58px; background: #e8b84f; border: 3px solid var(--brown-dark); border-radius: 45% 45% 50% 50%; z-index: -1; }
.face span { position: absolute; top: 21px; width: 9px; height: 12px; border: 2px solid var(--brown-dark); border-radius: 50%; background: #fff; }
.face span:first-child { left: 17px; }
.face span:last-child { right: 17px; }
.body-mark { position: absolute; top: 92px; left: 38px; width: 84px; height: 84px; display: grid; place-items: center; border: 4px solid var(--brown-dark); border-radius: 50%; background: #d79b2e; color: #fff3c6; font-size: 2.5rem; }
.arm, .leg { position: absolute; width: 5px; background: var(--brown-dark); border-radius: 999px; transform-origin: top; }
.arm { top: 112px; height: 65px; }
.arm-left { left: 43px; transform: rotate(54deg); }
.arm-right { right: 43px; transform: rotate(-54deg); }
.leg { top: 168px; height: 45px; }
.leg-left { left: 65px; transform: rotate(15deg); }
.leg-right { right: 65px; transform: rotate(-15deg); }

.intro-strip { background: var(--ink); color: white; }
.strip-grid { min-height: 118px; display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; }
.strip-grid div { display: flex; align-items: baseline; gap: 12px; padding: 0 28px; border-right: 1px solid rgba(255,255,255,.13); }
.strip-grid div:last-child { border-right: 0; }
.strip-grid strong { font-family: "Marcellus", serif; font-size: 2.2rem; color: #f4c865; }
.strip-grid span { font-size: .9rem; opacity: .82; }

.section { padding: 105px 0; }
.section-heading { display: grid; grid-template-columns: 1.2fr .8fr; align-items: end; gap: 50px; margin-bottom: 50px; }
.section h2 { margin: 0; font-size: clamp(2.4rem, 4vw, 4.2rem); letter-spacing: -.035em; }
.section-heading > p { margin: 0; color: var(--ink-soft); font-size: 1.02rem; }

.books-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.book-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; transition: transform .25s ease, box-shadow .25s ease; }
.book-card:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.book-cover { aspect-ratio: 1.42 / 1; position: relative; overflow: hidden; padding: 22px; border-radius: 15px; color: white; box-shadow: inset 0 0 0 6px rgba(255,255,255,.85); }
.book-cover::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.3), transparent 24%), repeating-linear-gradient(45deg, transparent 0 20px, rgba(255,255,255,.06) 20px 22px); }
.book-cover > * { position: relative; z-index: 2; }
.book-cover > span { font-size: .7rem; font-weight: 800; letter-spacing: .17em; }
.book-cover h3 { margin: 44px 0 3px; font-family: "Marcellus", serif; font-size: 1.75rem; }
.book-cover p { margin: 0; font-size: .76rem; opacity: .88; }
.cover-symbol { position: absolute; right: 26px; bottom: 21px; font-size: 4rem; opacity: .27; }
.cover-red { background: #9d4138; }
.cover-ochre { background: #b87727; }
.cover-purple { background: #73567e; }
.cover-blue { background: #367b9b; }
.cover-gold { background: #d09427; }
.cover-burgundy { background: #7b3241; }
.book-info { padding: 19px 4px 5px; }
.tag { display: inline-flex; padding: 6px 9px; border-radius: 999px; background: var(--cream); color: var(--brown); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.book-info h3 { margin: 14px 0 7px; font-size: 1.25rem; }
.book-info p { margin: 0; color: var(--ink-soft); font-size: .92rem; }
.book-info a { display: inline-flex; gap: 8px; margin-top: 16px; font-weight: 700; color: var(--brown); }

.universe { background: var(--cream); }
.universe-grid { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: 75px; }
.universe-visual { display: grid; place-items: center; }
.map-card { position: relative; width: min(100%, 470px); aspect-ratio: 1 / .85; border: 10px solid white; border-radius: 35px; background: #e5c888; box-shadow: var(--shadow); overflow: hidden; }
.map-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 20% 25%, rgba(67,105,91,.36) 0 10%, transparent 11%), radial-gradient(circle at 60% 32%, rgba(67,105,91,.34) 0 14%, transparent 15%), radial-gradient(circle at 48% 70%, rgba(67,105,91,.32) 0 14%, transparent 15%), radial-gradient(circle at 85% 70%, rgba(67,105,91,.28) 0 8%, transparent 9%); filter: blur(2px); }
.map-card::after { content: ""; position: absolute; inset: 0; background-image: repeating-linear-gradient(0deg, rgba(89,55,32,.07) 0 1px, transparent 1px 24px), repeating-linear-gradient(90deg, rgba(89,55,32,.06) 0 1px, transparent 1px 24px); }
.map-dot { position: absolute; z-index: 2; width: 16px; height: 16px; border-radius: 50%; background: var(--brown); border: 4px solid white; box-shadow: 0 5px 15px rgba(65,40,28,.25); }
.dot-1 { left: 17%; top: 34%; }.dot-2 { left: 48%; top: 22%; }.dot-3 { left: 58%; top: 67%; }.dot-4 { right: 12%; top: 46%; }
.map-line { position: absolute; z-index: 1; height: 3px; background: rgba(108,63,44,.7); transform-origin: left; border-radius: 99px; }
.line-1 { width: 145px; left: 20%; top: 37%; transform: rotate(-18deg); }.line-2 { width: 150px; left: 51%; top: 26%; transform: rotate(70deg); }.line-3 { width: 135px; left: 60%; top: 70%; transform: rotate(-45deg); }
.compass { position: absolute; z-index: 3; left: 28px; bottom: 24px; width: 72px; height: 72px; display: grid; place-items: center; border: 2px solid rgba(108,63,44,.55); border-radius: 50%; background: rgba(255,248,230,.6); color: var(--brown); font-size: 2rem; }
.universe-copy > p:not(.eyebrow) { color: var(--ink-soft); font-size: 1.02rem; }
.feature-list { margin-top: 34px; display: grid; gap: 14px; }
.feature-list article { display: grid; grid-template-columns: 52px 1fr; gap: 16px; padding: 17px; background: rgba(255,255,255,.62); border: 1px solid rgba(36,49,50,.08); border-radius: 17px; }
.feature-list article > span { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--ink); color: #f4c865; font-weight: 800; }
.feature-list h3, .feature-list p { margin: 0; }
.feature-list p { color: var(--ink-soft); font-size: .9rem; }

.parents { background: var(--brown-dark); color: white; }
.parents-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 70px; align-items: start; }
.eyebrow.light { color: #f4c865; }
.parents h2 { max-width: 560px; }
.parents-cards { display: grid; gap: 14px; }
.parents-cards article { display: grid; grid-template-columns: 42px 1fr; gap: 14px; padding: 22px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 18px; }
.parents-cards article > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #f0bf56; color: var(--brown-dark); font-weight: 900; }
.parents-cards h3, .parents-cards p { margin: 0; }
.parents-cards p { color: rgba(255,255,255,.72); font-size: .92rem; }

.newsletter { padding-top: 80px; padding-bottom: 80px; }
.newsletter-card { display: grid; grid-template-columns: 1fr .9fr; gap: 50px; align-items: center; padding: 50px; border-radius: var(--radius-xl); background: linear-gradient(130deg, #f3e4c8, #fff7e7); border: 1px solid rgba(108,63,44,.12); }
.newsletter-card h2 { font-size: clamp(2.2rem, 3.6vw, 3.5rem); }
.newsletter-card p { margin-bottom: 0; color: var(--ink-soft); }
.newsletter-form { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
.newsletter-form input { min-height: 54px; padding: 0 18px; border: 1px solid rgba(36,49,50,.18); border-radius: 999px; background: white; outline: none; }
.newsletter-form input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(217,156,43,.12); }
.form-message { grid-column: 1 / -1; min-height: 24px; font-size: .86rem; }

.site-footer { background: #1d2829; color: white; padding: 65px 0 25px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 45px; }
.footer-logo { width: 170px; }
.footer-grid p { color: rgba(255,255,255,.62); }
.footer-grid h3 { margin: 0 0 14px; font-size: .9rem; text-transform: uppercase; letter-spacing: .11em; color: #f4c865; }
.footer-grid a { display: block; margin: 8px 0; color: rgba(255,255,255,.68); font-size: .92rem; }
.footer-grid a:hover { color: white; }
.footer-bottom { display: flex; justify-content: space-between; gap: 25px; margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); color: rgba(255,255,255,.55); font-size: .85rem; }

@media (max-width: 1000px) {
  .main-nav { position: fixed; inset: 78px 20px auto 20px; display: none; flex-direction: column; align-items: stretch; gap: 0; padding: 16px; background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 13px 14px; }
  .nav-cta { margin-top: 6px; text-align: center; }
  .menu-toggle { display: flex; }
  .menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle.active span:nth-child(2) { opacity: 0; }
  .menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .hero-grid, .universe-grid, .parents-grid, .newsletter-card { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero-text { margin-inline: auto; }
  .hero-actions, .hero-points { justify-content: center; }
  .hero-visual { min-height: 460px; }
  .books-grid { grid-template-columns: repeat(2, 1fr); }
  .section-heading { grid-template-columns: 1fr; gap: 18px; }
  .universe-copy { order: -1; }
  .strip-grid { grid-template-columns: repeat(2, 1fr); padding: 18px 0; }
  .strip-grid div { min-height: 72px; border-right: 0; }
  .newsletter-form { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
  .footer-grid > div:last-child { grid-column: 2 / 3; }
}

@media (max-width: 680px) {
  .container { width: min(calc(100% - 24px), var(--container)); }
  .brand img { width: 150px; }
  .hero { padding-top: 55px; }
  .hero h1 { font-size: clamp(2.7rem, 13vw, 4.2rem); }
  .hero-text { font-size: 1rem; }
  .hero-visual { min-height: 390px; transform: scale(.9); margin: -20px -25px; }
  .book-stack { width: 350px; }
  .mini-book { width: 235px; height: 150px; }
  .mini-book strong { margin-top: 38px; font-size: 1.5rem; }
  .astrolab-character { right: 2px; transform: scale(.84); }
  .strip-grid { grid-template-columns: 1fr 1fr; }
  .strip-grid div { padding: 0 10px; flex-direction: column; gap: 0; align-items: center; text-align: center; }
  .strip-grid strong { font-size: 1.8rem; }
  .section { padding: 78px 0; }
  .books-grid { grid-template-columns: 1fr; }
  .book-card { padding: 14px; }
  .parents-grid { gap: 36px; }
  .newsletter-card { padding: 32px 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .footer-grid > div:last-child { grid-column: auto; }
  .footer-bottom { flex-direction: column; }
}

/* Personnalisation Astrolab — logo officiel et vraies couvertures */
.nav-wrap { min-height: 90px; }
.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.brand img {
  width: 118px;
  height: 74px;
  object-fit: contain;
}

.real-book-stack {
  width: 410px;
  height: 350px;
}
.hero-cover {
  position: absolute;
  width: 285px;
  aspect-ratio: 594 / 432;
  object-fit: contain;
  border: 7px solid #fff;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
  transform-origin: center;
}
.hero-cover-saladin {
  left: 0;
  top: 54px;
  transform: rotate(-9deg);
}
.hero-cover-ibn {
  right: 0;
  top: 10px;
  transform: rotate(8deg);
}
.hero-cover-tombouctou {
  left: 70px;
  bottom: 0;
  z-index: 3;
  transform: rotate(-1deg);
}

.books-grid {
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
}
.book-cover-image {
  display: block;
  width: 100%;
  aspect-ratio: 594 / 432;
  object-fit: contain;
  border-radius: 15px;
  background: #f4eee3;
  box-shadow: 0 12px 30px rgba(55, 39, 28, 0.14);
}
.book-info h3 { line-height: 1.2; }
.footer-logo-card {
  display: inline-flex;
  padding: 8px;
  border-radius: 14px;
  background: #fff;
}
.footer-logo {
  width: 105px;
  height: auto;
}

@media (max-width: 1000px) {
  .main-nav { inset: 90px 20px auto 20px; }
}

@media (max-width: 680px) {
  .nav-wrap { min-height: 78px; }
  .brand img { width: 92px; height: 62px; }
  .main-nav { inset: 78px 12px auto 12px; }
  .real-book-stack { width: 350px; height: 300px; }
  .hero-cover { width: 240px; }
  .hero-cover-saladin { left: 4px; top: 48px; }
  .hero-cover-ibn { right: 2px; top: 12px; }
  .hero-cover-tombouctou { left: 58px; }
}
