/* ========================================
   LANDING PAGES — SHARED STYLESHEET
   Rainbow Cam SEO Landing Pages
   Visuel aligne avec le SPA : style comic/sticker, palette peche pastel,
   fonts Bagel Fat One + Fredoka, accents rainbow gradient.
   ======================================== */

/* === FALLBACK METRICS (CLS fix) === */
/* Arial fallback aligne sur les metrics web fonts, evite le layout shift au chargement */
@font-face {
  font-family: 'Bagel Fat One Fallback';
  src: local('Arial Black'), local('Arial'), local('Helvetica Neue');
  size-adjust: 100%;
  ascent-override: 90%;
  descent-override: 25%;
  line-gap-override: normal;
}

@font-face {
  font-family: 'Fredoka Fallback';
  src: local('Arial'), local('Helvetica Neue'), local('Roboto');
  size-adjust: 100%;
  ascent-override: 95%;
  descent-override: 25%;
  line-gap-override: normal;
}

/* === SELF-HOSTED FONTS === */
/* Bagel Fat One — titres playful pride (logo, H1, gros titres) */
@font-face {
  font-family: 'Bagel Fat One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/bagel-fat-one-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Bagel Fat One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/bagel-fat-one-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Fredoka — body, paragraphes, boutons (chunky rounded) */
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/fredoka-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/fredoka-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/fredoka-latin-500-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/fredoka-latin-ext-500-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/fredoka-latin-600-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/fredoka-latin-ext-600-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/fredoka-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/fredoka-latin-ext-700-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* === CSS VARIABLES (mirror SPA palette) === */
:root {
  /* Backgrounds */
  --bg-app: #FFF1E6;
  --bg-card: #FFFFFF;
  --bg-card-warm: #FFE8D6;
  --bg-section: #FFE8D6;
  --bg-header: #FFFFFF;

  /* Accents */
  --accent-primary: #FF9F43;
  --accent-dark: #E07F1A;
  --accent-selected: #6BCB77;

  /* Text */
  --text-primary: #000000;
  --text-secondary: #2A2A2A;

  /* Comic style */
  --border-comic: 3px solid #000000;
  --border-comic-thin: 2px solid #000000;
  --shadow-comic: 4px 4px 0 #000000;
  --shadow-comic-sm: 2px 2px 0 #000000;
  --shadow-comic-lg: 6px 6px 0 #000000;
  --radius-comic: 20px;
  --radius-comic-sm: 14px;

  /* Rainbow gradient (6 colors aligned with SPA logo) */
  --rainbow-horizontal: linear-gradient(90deg, #FF6B6B, #FFA94D, #FFE066, #69DB7C, #4DABF7, #B197FC);
  --rainbow-diagonal: linear-gradient(135deg, #FF6B6B, #FFA94D, #FFE066, #69DB7C, #4DABF7, #B197FC);

  /* Per-line gradients (matches dropdown my-identity + FiltersCtaSection) */
  --gradient-male: linear-gradient(135deg, #FF6B6B, #FFA94D);
  --gradient-neutral: linear-gradient(135deg, #FFE066, #69DB7C);
  --gradient-female: linear-gradient(135deg, #4DABF7, #B197FC);

  /* Fonts */
  --font-heading: 'Bagel Fat One', 'Bagel Fat One Fallback', Arial, sans-serif;
  --font-body: 'Fredoka', 'Fredoka Fallback', Arial, sans-serif;

  /* Layout */
  --header-height: 72px;
  --max-content-width: 1100px;
}

/* === RESET & BASE === */
*, *::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-weight: 400;
  background: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: var(--header-height);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
  color: var(--text-primary);
}

p {
  font-family: var(--font-body);
  color: var(--text-secondary);
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

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

strong { font-weight: 600; color: var(--text-primary); }

/* === LAYOUT === */
.landing-container {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

main {
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* === HEADER === */
.landing-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: var(--header-height);
  background: var(--bg-header);
  border-bottom: var(--border-comic);
  box-shadow: 0 2px 0 #000;
}

.logo {
  display: flex;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--text-primary);
  text-decoration: none;
  gap: 0.4em;
}

.logo:hover { color: var(--text-primary); opacity: 0.85; }

.logo-icon {
  height: 1.6em;
  width: auto;
}

.logo-brand,
.logo-roulette {
  font-family: var(--font-heading);
  color: var(--text-primary);
}

/* === NAV BUTTONS === */
.landing-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.landing-nav .explore-link,
.landing-nav .cta-header-btn {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border: var(--border-comic-thin);
  border-radius: 9999px;
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-comic-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.landing-nav .cta-header-btn { background: var(--accent-selected); }

.landing-nav a:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 #000;
  color: var(--text-primary);
}

/* === LANG SWITCHER === */
.lang-switcher {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.85rem;
  padding: 0.4rem 0.6rem;
  border: var(--border-comic-thin);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  box-shadow: var(--shadow-comic-sm);
}

/* === HERO === */
.hero {
  text-align: center;
  padding: 3rem 1.5rem;
  max-width: var(--max-content-width);
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(1.75rem, 5vw, 3rem);
  margin-bottom: 1rem;
  line-height: 1.15;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto 2rem;
}

/* === CTA BUTTON (comic style) === */
.cta-button {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  padding: 0.85rem 1.75rem;
  background: var(--accent-selected);
  color: var(--text-primary);
  border: var(--border-comic);
  border-radius: var(--radius-comic-sm);
  box-shadow: var(--shadow-comic);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cta-button:hover {
  color: var(--text-primary);
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-comic-lg);
}

/* === CONTENT SECTIONS (comic cards) === */
.content-section {
  background: var(--bg-card);
  border: var(--border-comic);
  border-radius: var(--radius-comic);
  box-shadow: var(--shadow-comic);
  padding: 2rem 1.5rem;
  margin: 2.5rem 0;
}

.content-section:nth-child(odd) {
  background: var(--bg-card-warm);
  transform: rotate(-0.5deg);
}

.content-section:nth-child(even) { transform: rotate(0.5deg); }

.content-section h2 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  margin-bottom: 1.25rem;
}

.content-section p {
  font-size: 1rem;
  margin-bottom: 1rem;
}

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

/* === RAINBOW SEPARATOR === */
.rainbow-separator {
  height: 8px;
  background: var(--rainbow-horizontal);
  border: var(--border-comic-thin);
  border-radius: 4px;
  margin: 2.5rem auto;
  max-width: var(--max-content-width);
}

/* === FILTERS GRID === */
.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.filter-card {
  background: var(--bg-card);
  border: var(--border-comic-thin);
  border-radius: var(--radius-comic-sm);
  box-shadow: var(--shadow-comic-sm);
  padding: 1rem 1.25rem;
  color: var(--text-primary);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.filter-card:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 #000;
}


.filter-card h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.filter-card p {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text-primary);
  line-height: 1.5;
}

/* === FAQ === */
.faq-section { margin: 2.5rem 0; }

.faq-item {
  background: var(--bg-card);
  border: var(--border-comic-thin);
  border-left-width: 6px;
  border-radius: var(--radius-comic-sm);
  box-shadow: var(--shadow-comic-sm);
  margin-bottom: 1rem;
  padding: 0;
  overflow: hidden;
}

/* Border-left colored rainbow cycle */
.faq-item:nth-child(6n+1) { border-left-color: #FF6B6B; }
.faq-item:nth-child(6n+2) { border-left-color: #FFA94D; }
.faq-item:nth-child(6n+3) { border-left-color: #FFE066; }
.faq-item:nth-child(6n+4) { border-left-color: #69DB7C; }
.faq-item:nth-child(6n+5) { border-left-color: #4DABF7; }
.faq-item:nth-child(6n+0) { border-left-color: #B197FC; }

.faq-item summary {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  list-style: none;
  position: relative;
  user-select: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 1.25rem;
  font-size: 1.5rem;
  line-height: 1;
}

.faq-item[open] summary::after { content: '−'; }

.faq-answer {
  padding: 0 1.25rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* === CTA FINAL === */
.cta-final {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--bg-card-warm);
  border: var(--border-comic);
  border-radius: var(--radius-comic);
  box-shadow: var(--shadow-comic);
  margin: 2.5rem 0;
}

.cta-final h2 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  margin-bottom: 1.5rem;
}

/* === RELATED PAGES (cross-links) === */
.related-pages { margin: 3rem 0 2rem; }

.related-pages h3 {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.related-card {
  background: var(--bg-card);
  border: var(--border-comic);
  border-radius: var(--radius-comic);
  box-shadow: var(--shadow-comic);
  padding: 1.5rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.related-card:nth-child(odd) { transform: rotate(-1deg); }
.related-card:nth-child(even) { transform: rotate(1deg); }

.related-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-comic-lg);
  color: var(--text-primary);
}

.related-card h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.related-card p {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* === FOOTER === */
.landing-footer {
  background: var(--bg-card-warm);
  border-top: var(--border-comic);
  padding: 2.5rem 1.5rem 1.5rem;
  margin-top: 4rem;
}

.footer-top {
  max-width: var(--max-content-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem;
  flex: 1;
  min-width: 0;
}

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

.footer-col-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.footer-col a {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-decoration: none;
}

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

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.footer-rta a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-primary);
}

.rta-icon {
  width: 36px;
  height: 36px;
}

.rta-text {
  font-family: var(--font-body);
  font-size: 0.85rem;
}

.footer-logo a {
  display: flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--text-primary);
}

.footer-explore-link {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  background: var(--accent-selected);
  color: var(--text-primary);
  border: var(--border-comic-thin);
  border-radius: 9999px;
  box-shadow: var(--shadow-comic-sm);
  text-decoration: none;
}

.footer-explore-link:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 #000;
  color: var(--text-primary);
}

.footer-copyright {
  text-align: center;
  margin-top: 2rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  body { padding-top: 64px; }
  .landing-header { height: 64px; padding: 0 1rem; }
  .logo { font-size: 1.25rem; }
  .landing-nav { gap: 0.5rem; }
  .landing-nav .explore-link,
  .landing-nav .cta-header-btn {
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;
  }
  .lang-switcher { font-size: 0.75rem; padding: 0.3rem 0.4rem; }
  .hero { padding: 2rem 1rem; }
  .content-section { padding: 1.5rem 1.25rem; }
  .filters-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.75rem; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; }
  .footer-brand { order: -1; }
}

@media (max-width: 480px) {
  .content-section { transform: none; }
  .related-card { transform: none; }
  .filters-grid { grid-template-columns: 1fr; }
}

/* === RTL (Arabic, Hebrew) === */
html[dir="rtl"] body { direction: rtl; }
html[dir="rtl"] .landing-header { flex-direction: row-reverse; }
html[dir="rtl"] .landing-nav { flex-direction: row-reverse; }
html[dir="rtl"] .logo { flex-direction: row-reverse; }
html[dir="rtl"] .faq-item { border-left-width: 2px; border-right-width: 6px; }
html[dir="rtl"] .faq-item:nth-child(6n+1) { border-left-color: #000; border-right-color: #FF6B6B; }
html[dir="rtl"] .faq-item:nth-child(6n+2) { border-left-color: #000; border-right-color: #FFA94D; }
html[dir="rtl"] .faq-item:nth-child(6n+3) { border-left-color: #000; border-right-color: #FFE066; }
html[dir="rtl"] .faq-item:nth-child(6n+4) { border-left-color: #000; border-right-color: #69DB7C; }
html[dir="rtl"] .faq-item:nth-child(6n+5) { border-left-color: #000; border-right-color: #4DABF7; }
html[dir="rtl"] .faq-item:nth-child(6n+0) { border-left-color: #000; border-right-color: #B197FC; }
html[dir="rtl"] .faq-item summary::after { right: auto; left: 1.25rem; }
html[dir="rtl"] .footer-columns { text-align: right; }
html[dir="rtl"] .lang-switcher { direction: ltr; }

/* === ACCESSIBILITY === */
:focus-visible {
  outline: 3px solid var(--accent-primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .content-section,
  .related-card { transform: none !important; }
}
