/* ============================================
   NINA SIMONE — HOMMAGE QIMI-7 — style.css
   Page canonique : scannerlesens.com/nina-simone/
   Palette : anthracite / bronze / papier froid
   Design system hérité de Le Faux Centre
   ============================================ */

/* --- Design Tokens --- */
:root {
  --bg-primary: #FAFAFA;
  --bg-white: #FFFFFF;
  --text-primary: #1A1A1A;
  --text-secondary: #666666;
  --accent: #2C2C2C;
  --accent-hover: #1A1A1A;
  --accent-secondary: #8B8B8B;
  --accent-secondary-hover: #6E6E6E;
  --badge-gold: #999999;
  --badge-gold-bg: rgba(150, 150, 150, 0.08);
  --border-light: #E0E0E0;
  --bg-light: rgba(0, 0, 0, 0.02);
  --bg-accent-light: rgba(0, 0, 0, 0.03);

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --h1: clamp(32px, 5vw, 48px);
  --h2: clamp(24px, 4vw, 32px);
  --h3: clamp(18px, 3vw, 22px);
  --body: clamp(16px, 2vw, 18px);
  --small: 14px;

  --section-gap: clamp(48px, 8vw, 80px);
  --content-width: 800px;
  --content-wide: 1000px;
  --radius: 12px;
  --border: 1px solid var(--border-light);
}

/* --- Dark Theme --- */
[data-theme="dark"] {
  --bg-primary: #131316;
  --bg-white: #1A1A1E;
  --text-primary: #E8E4DC;
  --text-secondary: #9A9590;
  --accent: #C9B06B;
  --accent-hover: #DCC47A;
  --accent-secondary: #8A7D6B;
  --accent-secondary-hover: #A39280;
  --badge-gold: #C9B06B;
  --badge-gold-bg: rgba(201, 176, 107, 0.10);
  --border-light: #2A2A2E;
  --bg-light: rgba(255, 255, 255, 0.03);
  --bg-accent-light: rgba(201, 176, 107, 0.05);
}

[data-theme="dark"] .hero-image img {
  filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.4));
}

[data-theme="dark"] .hero-image:hover img {
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
}

[data-theme="dark"] .btn-primary {
  background: var(--accent);
  color: #131316;
  border-color: var(--accent);
}

[data-theme="dark"] .btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #131316;
}

[data-theme="dark"] .download-card {
  border-color: var(--border-light);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .download-card:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .author-block {
  border-color: var(--border-light);
}

[data-theme="dark"] .section-newsletter {
  background: linear-gradient(135deg, #0A0A0C 0%, #1A1A1E 50%, #0A0A0C 100%);
}

/* Logo swap: light shows day logo, dark shows night logo */
.logo--dark { display: none; }
[data-theme="dark"] .logo--light { display: none; }
[data-theme="dark"] .logo--dark { display: block; }

/* --- Theme Toggle Button --- */
.theme-toggle {
  background: none;
  border: 1px solid var(--border-light);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  flex-shrink: 0;
  padding: 0;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--bg-light);
}

.theme-icon {
  width: 18px;
  height: 18px;
}

/* In dark mode: show sun, hide moon */
[data-theme="dark"] .theme-icon--moon { display: none; }
[data-theme="dark"] .theme-icon--sun { display: block; }

/* In light mode: show moon, hide sun */
:root .theme-icon--sun,
[data-theme="light"] .theme-icon--sun { display: none; }
:root .theme-icon--moon,
[data-theme="light"] .theme-icon--moon { display: block; }

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

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

body {
  font-family: var(--font-body);
  font-size: var(--body);
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
}

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

/* --- Header --- */
.header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
}

.logo-link {
  flex-shrink: 0;
}

.logo {
  height: 54px;
  width: auto;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-desktop a {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.nav-desktop a:hover {
  color: var(--accent);
  background: var(--bg-light);
}

.menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-primary);
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 6px;
  transition: background 0.2s;
}

.menu-btn:hover {
  background: var(--bg-light);
}

.nav-mobile {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-white);
  flex-direction: column;
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 99;
}

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

.nav-mobile a {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 14px 24px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #f0f0f0;
  transition: color 0.2s, background 0.2s;
}

.nav-mobile a:hover {
  color: var(--accent);
  background: var(--bg-light);
}

/* --- Sections --- */
.section-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px;
}

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

.section + .section {
  border-top: 1px solid var(--border-light);
}

.section-alt {
  background-color: var(--bg-white);
}

.section h2 {
  font-family: var(--font-display);
  font-size: var(--h2);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.section p {
  margin-bottom: 16px;
  line-height: 1.7;
}

.section p:last-child {
  margin-bottom: 0;
}

/* --- Hero --- */
.hero {
  background-color: var(--bg-primary);
  padding: clamp(48px, 6vw, 80px) 24px;
  border-bottom: 1px solid var(--border-light);
  overflow: hidden;
  max-width: var(--content-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 56px;
}

.hero-content {
  flex: 1;
  text-align: left;
  min-width: 0;
}

.hero-badge {
  display: inline-block;
  background: var(--badge-gold-bg);
  color: var(--accent-secondary);
  border: 1px solid rgba(150, 150, 150, 0.20);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--h1);
  font-weight: 700;
  line-height: 1.05;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-family: var(--font-display);
  font-size: var(--h2);
  font-weight: 400;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.35;
  margin-bottom: 24px;
}

.hero-epigraph {
  border-left: 3px solid var(--accent-secondary);
  padding: 12px 18px;
  margin-bottom: 32px;
  color: var(--accent-secondary);
  font-style: italic;
  font-size: clamp(15px, 1.8vw, 17px);
  line-height: 1.6;
  background: var(--bg-accent-light);
  border-radius: 0 8px 8px 0;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.hero-meta {
  font-size: var(--small);
  color: var(--text-secondary);
  margin-top: 16px;
  letter-spacing: 0.02em;
}

.hero-counter {
  font-size: var(--small);
  color: var(--text-secondary);
  margin-top: 12px;
}

.hero-image {
  flex: 0 0 50%;
  max-width: 50%;
  overflow: hidden;
  cursor: zoom-in;
}

.hero-image img {
  max-width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.1));
  margin: 0 auto;
  transform: rotate(-2deg);
  transform-origin: center center;
  border-radius: 4px;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              filter 0.4s ease;
}

.hero-image:hover img {
  transform: scale(1.4) rotate(0deg);
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.18));
}

/* --- Buttons --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid var(--accent);
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  background: var(--accent);
  color: var(--bg-white);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--bg-white);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(58, 58, 58, 0.25);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

/* --- Download Card --- */
.download-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  transition: box-shadow 0.25s;
}

.download-card:hover {
  box-shadow: 0 8px 28px rgba(58, 58, 58, 0.10);
}

.download-card-title {
  font-family: var(--font-display);
  font-size: var(--h2);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.download-card-subtitle {
  font-family: var(--font-display);
  font-size: var(--h3);
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.download-card-info {
  font-size: var(--small);
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.download-card .btn-primary {
  width: 100%;
  justify-content: center;
  margin-bottom: 20px;
}

.download-card-license {
  font-size: var(--small);
  color: var(--text-secondary);
  margin-top: 16px;
}

.download-card-license a {
  color: var(--accent-secondary);
}

/* --- Integrity Block --- */
.integrity-block {
  background: var(--bg-white);
  border-left: 4px solid var(--accent-secondary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  margin: 24px 0;
}

.integrity-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  font-size: var(--small);
}

.integrity-row {
  display: contents;
}

.integrity-row dt {
  color: var(--text-secondary);
  font-weight: 500;
}

.integrity-row dd {
  font-family: var(--font-mono);
  word-break: break-all;
  color: var(--text-primary);
}

.integrity-hash {
  font-family: var(--font-mono);
  font-size: 12px;
  word-break: break-all;
}

/* --- Citation Block (Coran) --- */
.citation-block {
  text-align: center;
  padding: 24px 0;
}

.citation-arabe {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  font-style: normal;
  color: var(--text-primary);
}

.citation-arabe-text {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 600;
  font-style: italic;
  color: var(--accent-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.citation-traduction {
  font-family: var(--font-display);
  font-size: clamp(17px, 2.5vw, 21px);
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}

.citation-arabe cite {
  display: block;
  font-style: normal;
  font-size: var(--small);
  color: var(--accent-secondary);
  letter-spacing: 0.04em;
  font-family: var(--font-mono);
}

/* --- Author Block --- */
.author-block {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 40px;
}

.author-quote {
  font-family: var(--font-display);
  font-size: var(--h3);
  font-style: italic;
  color: var(--accent-secondary);
  line-height: 1.4;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
  border-left: 3px solid var(--accent-secondary);
  padding: 14px 20px 20px;
  margin: 0 0 24px;
  background: var(--bg-accent-light);
  border-radius: 0 8px 8px 0;
}

.author-name {
  font-weight: 700;
  font-size: clamp(16px, 2vw, 18px);
  color: var(--text-primary);
  margin-bottom: 4px;
}

.author-method {
  font-size: var(--small);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 8px;
}

/* --- Newsletter (dark section) --- */
.section-newsletter {
  background: linear-gradient(135deg, #1C1C1C 0%, #2A2A2A 50%, #1C1C1C 100%);
  color: #FFFFFF;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding-top: clamp(56px, 8vw, 88px);
  padding-bottom: clamp(56px, 8vw, 88px);
}

.section-newsletter::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -25%;
  width: 150%;
  height: 200%;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(201, 176, 55, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(139, 115, 85, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.section-newsletter .section-inner {
  position: relative;
  z-index: 1;
}

.section-newsletter h2 {
  font-family: var(--font-display);
  color: #FFFFFF;
  border-bottom: none;
  margin-bottom: 8px;
}

.newsletter-subtitle {
  color: rgba(255, 255, 255, 0.70);
  font-size: clamp(15px, 2vw, 17px);
  line-height: 1.65;
  max-width: 480px;
  margin: 0 auto;
}

.newsletter-form {}

.newsletter-fields {
  display: flex;
  gap: 10px;
  max-width: 520px;
  margin: 32px auto 0;
}

.newsletter-fields input[type="email"] {
  flex: 1;
  padding: 15px 18px;
  font-family: var(--font-body);
  font-size: 15px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #FFFFFF;
  outline: none;
  transition: all 0.25s ease;
}

.newsletter-fields input[type="email"]::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.newsletter-fields input[type="email"]:focus {
  border-color: var(--badge-gold);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 0 3px rgba(201, 176, 55, 0.12);
}

.newsletter-fields button {
  padding: 15px 26px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--badge-gold) 0%, #D4BC4A 100%);
  color: #1A1714;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(201, 176, 55, 0.25);
}

.newsletter-fields button:hover {
  background: linear-gradient(135deg, #D4BC4A 0%, #E0CA5C 100%);
  box-shadow: 0 4px 16px rgba(201, 176, 55, 0.35);
  transform: translateY(-1px);
}

.newsletter-fields button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.newsletter-msg {
  margin-top: 16px;
  font-size: var(--small);
  min-height: 20px;
  transition: all 0.3s ease;
}

.newsletter-msg.success {
  color: #8FD584;
}

.newsletter-msg.error {
  color: #F5A0A0;
}

.newsletter-privacy {
  margin-top: 20px;
  font-size: 12px;
  color: var(--badge-gold) !important;
  letter-spacing: 0.02em;
  opacity: 0.8;
}

/* --- Footer --- */
.footer {
  background: var(--bg-white);
  border-top: 1px solid var(--border-light);
  padding: 40px 24px 28px;
  text-align: center;
}

.footer-inner {
  max-width: 700px;
  margin: 0 auto;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
}

.footer-social a {
  color: var(--text-secondary);
  transition: color 0.2s;
  display: flex;
  align-items: center;
}

.footer-social a:hover {
  color: var(--accent);
}

.footer-license {
  font-size: var(--small);
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.5;
}

.footer-license a {
  color: var(--accent-secondary);
}

.footer-links {
  font-size: 13px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
}

.footer-links a {
  color: var(--text-secondary);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent);
}

/* --- Blockquote default --- */
blockquote {
  border-left: 3px solid var(--accent-secondary);
  padding: 14px 20px;
  margin: 24px 0;
  background: var(--bg-accent-light);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-secondary);
  font-size: clamp(15px, 1.8vw, 17px);
  line-height: 1.65;
}

blockquote cite {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-size: var(--small);
  color: var(--accent-secondary);
  letter-spacing: 0.02em;
}

/* --- Screen reader only --- */
.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;
}

/* --- Responsive — Mobile (max 767px) --- */
@media (max-width: 767px) {
  .header-inner {
    padding: 10px 16px;
    justify-content: center;
  }

  .nav-desktop {
    display: none;
  }

  .menu-btn {
    display: block;
    right: 12px;
    left: auto;
  }

  .theme-toggle {
    position: absolute;
    right: 52px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
  }

  .theme-icon {
    width: 16px;
    height: 16px;
  }

  .logo {
    height: 44px;
  }

  .section-inner {
    padding: 0 16px;
  }

  .hero {
    flex-direction: column;
    gap: 32px;
    padding: 0 16px;
    text-align: center;
  }

  .hero-content {
    text-align: center;
  }

  .hero-epigraph {
    text-align: left;
  }

  .hero-image {
    flex: none;
    max-width: 80%;
    width: 80%;
    margin: 0 auto;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn-primary {
    width: 100%;
    justify-content: center;
  }

  .author-block {
    padding: 28px 20px;
  }

  .footer-links {
    flex-direction: column;
    gap: 8px;
  }
}

/* --- Tablet (768px – 1023px) --- */
@media (min-width: 768px) and (max-width: 1023px) {
  .hero-image {
    max-width: 45%;
    flex: 0 0 45%;
  }

  .section-inner {
    padding: 0 24px;
  }
}

/* --- Newsletter mobile --- */
@media (max-width: 600px) {
  .newsletter-fields {
    flex-direction: column;
  }

  .newsletter-fields button {
    width: 100%;
  }
}

/* --- Print --- */
@media print {
  .header,
  .footer,
  .hero-actions,
  .btn-primary,
  .section-newsletter,
  .menu-btn {
    display: none !important;
  }

  body {
    background: #ffffff;
    color: #000000;
    font-size: 11pt;
    line-height: 1.6;
  }

  h1, h2, h3 {
    color: #000000;
    font-family: Georgia, serif;
  }

  .section {
    padding: 20pt 0;
    background: none !important;
    page-break-inside: avoid;
  }

  a {
    color: #000000;
    text-decoration: none;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #555555;
    font-style: italic;
  }

  a[href^="#"]::after {
    content: "";
  }

  blockquote {
    border-left: 3px solid #999999;
    background: none;
  }

  .hero-image img {
    max-width: 200pt;
    transform: none;
    filter: none;
  }
}
