/* ------------------------------------------------------------
   guelairiadfodil.pro — feuille de style unique
   Zéro dépendance externe : pas de CDN, pas de police distante,
   pas de JavaScript. Tout est servi depuis ce domaine.
   ------------------------------------------------------------ */

:root {
  --bg: #0a0c14;
  --bg-2: #0e1120;
  --surface: #131729;
  --surface-2: #1a1f36;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eceef5;
  --muted: #a3a9bf;
  --faint: #6b7189;
  --accent: #8b7cf6;
  --accent-2: #38bdf8;
  --gold: #d9b85c;
  --gold-2: #f1d78a;
  --radius: 18px;
  --radius-sm: 12px;
  --max: 1120px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

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

:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }

/* ---------- Skip link ---------- */
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 12, 20, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; flex-wrap: wrap; padding-block: 0.6rem; }
.brand { display: flex; align-items: center; gap: 0.7rem; color: var(--text); font-weight: 700; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  font-size: 0.85rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.brand small { display: block; font-size: 0.75rem; font-weight: 500; color: var(--muted); line-height: 1.2; }
.nav { display: flex; align-items: center; gap: 0.25rem 1.1rem; flex-wrap: wrap; font-size: 0.95rem; }
.nav a { color: var(--muted); padding: 0.35rem 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); text-decoration: none; }
.nav .lang { border: 1px solid var(--border-strong); border-radius: 999px; padding: 0.25rem 0.75rem; font-weight: 600; font-size: 0.8rem; color: var(--text); }
.nav .lang:hover { border-color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.4rem; border-radius: 999px; font-weight: 600; font-size: 1rem;
  border: 1px solid transparent; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { color: #fff; background: linear-gradient(135deg, #7c6cf2, #4f8df7); box-shadow: 0 8px 30px rgba(124, 108, 242, 0.35); }
.btn-primary:hover { box-shadow: 0 12px 36px rgba(124, 108, 242, 0.5); }
.btn-gold { color: #1a1406; background: linear-gradient(135deg, var(--gold-2), var(--gold)); box-shadow: 0 8px 30px rgba(217, 184, 92, 0.3); }
.btn-gold:hover { box-shadow: 0 12px 36px rgba(217, 184, 92, 0.45); }
.btn-ghost { color: var(--text); border-color: var(--border-strong); background: rgba(255, 255, 255, 0.03); }
.btn-ghost:hover { border-color: var(--accent); background: rgba(255, 255, 255, 0.06); }
.btn svg { width: 18px; height: 18px; flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.8rem; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(4rem, 8vw, 6.5rem); }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--border); }
.section-head { max-width: 62ch; margin-bottom: 2.5rem; }
.eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent-2); margin-bottom: 0.8rem;
}
.eyebrow-gold { color: var(--gold); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(4rem, 9vw, 7.5rem); }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 15% 10%, rgba(124, 108, 242, 0.22), transparent 70%),
    radial-gradient(45% 45% at 90% 20%, rgba(56, 189, 248, 0.14), transparent 70%);
}
.hero .container { position: relative; display: grid; gap: 3rem; align-items: center; grid-template-columns: 1.15fr 0.85fr; }
.hero .grad { background: linear-gradient(90deg, #a5b4fc, #c4b5fd, #7dd3fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pill {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.85rem; border-radius: 999px;
  font-size: 0.82rem; font-weight: 600; color: var(--text); border: 1px solid var(--border-strong); background: rgba(255, 255, 255, 0.04);
  margin-bottom: 1.4rem;
}
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 12px var(--accent-2); }

.portrait { position: relative; justify-self: center; width: min(100%, 420px); }
.portrait img { border-radius: 28px; border: 1px solid var(--border-strong); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); }
.portrait .tag {
  position: absolute; left: -1.2rem; bottom: 1.6rem; padding: 0.7rem 1rem; border-radius: 14px;
  background: rgba(19, 23, 41, 0.92); border: 1px solid var(--border-strong); backdrop-filter: blur(8px);
  font-size: 0.85rem; line-height: 1.3; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}
.portrait .tag strong { display: block; font-size: 0.95rem; }

/* ---------- Cards & grids ---------- */
.grid { display: grid; gap: 1.2rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.card .num { font-size: 0.8rem; font-weight: 700; color: var(--accent); letter-spacing: 0.1em; margin-bottom: 0.6rem; }
.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--muted); margin: 0; font-size: 0.98rem; }
.icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 1rem; background: rgba(139, 124, 246, 0.14); color: #c4b5fd; }
.icon-gold { background: rgba(217, 184, 92, 0.14); color: var(--gold-2); }
.icon svg { width: 22px; height: 22px; }

/* ---------- Book teaser (home) ---------- */
.teaser { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 3rem; align-items: center; }
.teaser .cover { justify-self: center; width: min(100%, 300px); }
.cover img { border-radius: 10px; box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--border-strong); }
.cover-tilt { transform: perspective(1200px) rotateY(-10deg); }
.cover-tilt:hover { transform: perspective(1200px) rotateY(0); }
.cover-tilt, .cover-tilt:hover { transition: transform 0.4s ease; }
.badges { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.2rem 0; }
.badge { font-size: 0.8rem; font-weight: 600; color: var(--muted); border: 1px solid var(--border-strong); border-radius: 999px; padding: 0.3rem 0.75rem; }

/* ---------- Book hero ---------- */
.book-hero::before {
  background:
    radial-gradient(55% 55% at 20% 15%, rgba(91, 56, 186, 0.35), transparent 70%),
    radial-gradient(40% 40% at 85% 25%, rgba(217, 184, 92, 0.14), transparent 70%);
}
.book-hero .container { grid-template-columns: 1.1fr 0.9fr; }
.book-hero .cover { justify-self: center; width: min(100%, 380px); }
.book-hero .grad { background: linear-gradient(90deg, var(--gold-2), #fff3c4, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Lists ---------- */
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.9rem; }
.checks li { display: grid; grid-template-columns: 26px 1fr; gap: 0.8rem; align-items: start; color: var(--muted); }
.checks li strong { color: var(--text); }
.checks li::before {
  content: ""; width: 26px; height: 26px; border-radius: 50%; margin-top: 2px;
  background: rgba(217, 184, 92, 0.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f1d78a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/14px no-repeat;
}

.chapters { list-style: none; padding: 0; margin: 0; counter-reset: ch; display: grid; gap: 0.6rem; }
.chapters li {
  display: grid; grid-template-columns: 56px 1fr; gap: 1rem; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem 1.2rem;
}
.chapters li span { font-weight: 800; font-size: 1.3rem; color: var(--accent); letter-spacing: -0.02em; }
.chapters li span.bonus { font-size: 0.75rem; color: var(--gold); letter-spacing: 0.1em; }
.chapters li b { display: block; }
.chapters li small { color: var(--muted); }

/* ---------- Quote ---------- */
.quote { position: relative; max-width: 50ch; margin: 0 auto; text-align: center; font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; }
.quote cite { display: block; margin-top: 1.2rem; font-style: normal; font-size: 0.95rem; color: var(--muted); font-weight: 500; }

/* ---------- Diagrams ---------- */
.figure { margin: 0; background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border-strong); }
.figure figcaption { background: var(--surface); color: var(--muted); font-size: 0.9rem; padding: 0.9rem 1.2rem; border-top: 1px solid var(--border); }

/* ---------- Author block ---------- */
.author { display: grid; grid-template-columns: 220px 1fr; gap: 2.5rem; align-items: center; }
.author img { border-radius: 20px; border: 1px solid var(--border-strong); }

/* ---------- FAQ ---------- */
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 1.3rem; margin-bottom: 0.7rem; }
.faq summary { cursor: pointer; padding: 1.05rem 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--accent); font-weight: 400; transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 1.1rem; margin: 0; }

/* ---------- CTA band ---------- */
.cta {
  position: relative; overflow: hidden; text-align: center; padding: clamp(3rem, 6vw, 4.5rem) 1.5rem;
  border-radius: calc(var(--radius) + 6px); border: 1px solid var(--border-strong);
  background: linear-gradient(135deg, rgba(124, 108, 242, 0.18), rgba(56, 189, 248, 0.08)), var(--surface);
}
.cta-gold { background: linear-gradient(135deg, rgba(91, 56, 186, 0.35), rgba(217, 184, 92, 0.12)), var(--surface); }
.cta h2 { max-width: 24ch; margin-inline: auto; }
.cta p { max-width: 55ch; margin-inline: auto; color: var(--muted); }
.cta .actions { justify-content: center; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 2.5rem 0; color: var(--muted); font-size: 0.9rem; }
.footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: center; }
.footer nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero .container, .book-hero .container { grid-template-columns: 1fr; }
  .hero .portrait { order: -1; width: min(100%, 320px); }
  .book-hero .cover { order: -1; width: min(100%, 280px); }
  .cover-tilt { transform: none; }
  .teaser { grid-template-columns: 1fr; }
  .teaser .cover { width: min(100%, 240px); }
  .author { grid-template-columns: 1fr; }
  .author img { width: 180px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .portrait .tag { left: 0.8rem; right: 0.8rem; bottom: 0.8rem; }
  .btn { width: 100%; }
  .header .container { justify-content: center; }
  .nav { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* ---------- Divers ---------- */
.bonus-title { margin-top: 2.5rem; font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; }

/* ---------- Téléphone : en-tête compact, zones tactiles 44 px, hero plus court ---------- */
@media (max-width: 600px) {
  .header { position: static; }
  .header .container { padding-block: 0.5rem 0; gap: 0.2rem; }
  .nav {
    width: 100%; flex-wrap: nowrap; gap: 0;
    justify-content: flex-start; justify-content: safe center;
    overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.6rem; white-space: nowrap; }
  .nav .lang { min-height: 34px; margin: 5px 0 5px 0.3rem; }
  .hero { padding-block: 2rem 3rem; }
  .hero .container { gap: 1.8rem; }
  .hero .portrait { width: min(78%, 260px); }
  .book-hero .cover { width: min(62%, 210px); }
  .footer nav { gap: 0 0.4rem; }
  .footer nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 0.5rem; }
}
@media (max-width: 600px) {
  .header .container { position: relative; justify-content: flex-start; }
  .nav .lang { position: absolute; top: 0.85rem; right: 0; margin: 0; min-height: 34px; display: inline-flex; align-items: center; }
  .nav a { padding: 0 0.5rem; }
  .chapters li { grid-template-columns: 44px 1fr; gap: 0.7rem; padding: 0.9rem 1rem; }
}
@media (max-width: 360px) {
  .nav { font-size: 0.9rem; }
  .nav a { padding: 0 0.4rem; }
}
@media (max-width: 600px) {
  .brand { max-width: calc(100% - 64px); }
}
@media (max-width: 380px) {
  .nav { flex-wrap: wrap; justify-content: center; overflow: visible; }
}

/* ---------- En-têtes de section centrés, titres équilibrés ---------- */
.section-head { margin-inline: auto; text-align: center; }
.section-head .lead { margin-inline: auto; }
h1, h2, h3 { text-wrap: balance; }
.lead, .card p { text-wrap: pretty; }
.grid + p.small { text-align: center; margin-top: 1.2rem; }

/* ---------- Bandeau d'annonce (accueil) ---------- */
.announce { display: block; padding: 0.55rem 1.25rem; text-align: center; font-size: 0.9rem; font-weight: 600; line-height: 1.4; color: #1a1406; background: linear-gradient(90deg, var(--gold-2), var(--gold)); }
.announce:hover { text-decoration: none; filter: brightness(1.06); }
.announce b { display: inline-block; margin-right: 0.5rem; padding: 0.05rem 0.55rem; border-radius: 999px; background: #1a1406; color: var(--gold-2); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; vertical-align: 0.1em; }

/* ---------- Livres (accueil) ---------- */
.books { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
.book { display: grid; grid-template-columns: 140px 1fr; gap: 1.5rem; align-items: start; padding: 1.6rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.book-new { border-color: rgba(217, 184, 92, 0.45); background: linear-gradient(160deg, rgba(91, 56, 186, 0.3), rgba(217, 184, 92, 0.06)), var(--surface); }
.book .cover img { border-radius: 6px; }
.book h3 { font-size: 1.25rem; }
.book p { color: var(--muted); font-size: 0.98rem; margin: 0; }
.book .badges { margin: 0.9rem 0 0; }
.book .actions { margin-top: 1.2rem; }
.badge-top { display: inline-block; margin-bottom: 0.8rem; }
.badge-new { color: #1a1406; border-color: transparent; background: linear-gradient(135deg, var(--gold-2), var(--gold)); }

/* ---------- Méthode CLOSER ---------- */
.closer .letter { font-size: 2.6rem; font-weight: 800; line-height: 1; margin-bottom: 0.7rem; background: linear-gradient(135deg, var(--gold-2), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.checks-narrow { max-width: 760px; margin-inline: auto; }

/* ---------- Formulaire d'inscription (sans JavaScript) ---------- */
.signup { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.8rem, 4vw, 3rem); align-items: center; padding: clamp(1.4rem, 5vw, 3.5rem); border-radius: calc(var(--radius) + 6px); border: 1px solid var(--border-strong); }
.signup .checks { margin-top: 1.4rem; }
.form { position: relative; display: grid; gap: 0.45rem; padding: clamp(1.2rem, 3vw, 1.8rem); background: rgba(10, 12, 20, 0.6); border: 1px solid var(--border-strong); border-radius: var(--radius); }
.form label { font-weight: 600; font-size: 0.95rem; }
.form input[type="text"], .form input[type="email"] { width: 100%; min-height: 48px; margin-bottom: 0.7rem; padding: 0.7rem 0.95rem; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
.form input[type="text"]:focus-visible, .form input[type="email"]:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
.form .check { display: grid; grid-template-columns: 22px 1fr; gap: 0.7rem; align-items: start; margin: 0.2rem 0 0.9rem; font-weight: 400; font-size: 0.9rem; color: var(--muted); cursor: pointer; }
.form .check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--gold); }
.form button.btn { width: 100%; border: 0; cursor: pointer; font-family: inherit; white-space: normal; text-align: center; }
.signup > *, .book > * { min-width: 0; }
.form .small { margin: 0.7rem 0 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { display: none; margin: 0 0 0.8rem; padding: 0.8rem 1rem; font-size: 0.95rem; color: #fecaca; background: rgba(248, 113, 113, 0.12); border: 1px solid rgba(248, 113, 113, 0.4); border-radius: var(--radius-sm); }
.form-msg:target { display: block; scroll-margin-top: 6rem; }

/* ---------- Pages de texte (confidentialité) ---------- */
.prose { max-width: 72ch; }
.prose h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.prose h2 { font-size: 1.3rem; margin-top: 2.2rem; }
.prose p, .prose li { color: var(--muted); }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.5rem; }

@media (max-width: 960px) {
  .books, .signup { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .book { grid-template-columns: 1fr; text-align: center; }
  .book .cover { width: min(55%, 170px); justify-self: center; }
  .book .badges { justify-content: center; }
  .announce { font-size: 0.85rem; }
}

/* ---------- Ancres : le titre ne passe pas sous l'en-tête fixe ---------- */
@media (min-width: 601px) {
  section[id] { scroll-margin-top: 4.5rem; }
}
