/* ========================================
   LANDING PAGES — SHARED STYLESHEET
   Webcam Meet Stranger
   Thème : cyan-navy, harmonisé avec le SPA
   ======================================== */

/* === CSS VARIABLES (calquees sur le SPA WMS) === */
:root {
  --bg-primary: #0B0D14;
  --bg-secondary: #111520;
  --bg-card: #1E2538;
  --bg-card-hover: #2A3350;
  --bg-surface: #161A27;
  --bg-elevated: #232B3E;
  --accent: #29B6D6;
  --accent-dark: #1B3A5C;
  --accent-glow: 0 0 20px rgba(41, 182, 214, 0.5);
  --brand-highlight: #4F8EF7;
  --text-primary: #ffffff;
  --text-secondary: #C1C8D4;
  --text-muted: #72767d;
  --cta-gradient: linear-gradient(135deg, #29B6D6, #1B3A5C);
  --logo-violet: #4F8EF7;
  --border-subtle: rgba(41, 182, 214, 0.15);
  --header-height: 64px;
  --font-heading: 'Plus Jakarta Sans', Arial, sans-serif;
  --font-body: 'Plus Jakarta Sans', Arial, sans-serif;
}

/* === RESET & BASE === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-primary) 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(41, 182, 214, 0.04) 0px,
    rgba(41, 182, 214, 0.04) 1px,
    transparent 1px,
    transparent 28px
  );
  pointer-events: none;
  z-index: 0;
}

/* === 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"] .logo-icon {
  margin-left: 0.49em;
  margin-right: 0.55em;
}

html[dir="rtl"] .lang-switcher {
  direction: ltr;
}

html[dir="rtl"] .faq-item summary::after {
  margin-left: 0;
  margin-right: 1rem;
}

html[dir="rtl"] .footer-container {
  direction: rtl;
}

html[dir="rtl"] .footer-columns {
  text-align: right;
}

html[dir="rtl"] .footer-rta a {
  flex-direction: row-reverse;
}

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

a:hover {
  color: var(--logo-violet);
}

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

/* === LAYOUT === */
.landing-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* === HEADER === */
.landing-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: var(--header-height);
  background: var(--bg-secondary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.landing-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: radial-gradient(ellipse 50% 100% at 50% 100%, rgba(41, 182, 214, 1) 0%, rgba(41, 182, 214, 0.4) 40%, transparent 100%);
  box-shadow: 0 0 15px rgba(41, 182, 214, 0.6), 0 0 35px rgba(41, 182, 214, 0.25);
}

/* === LOGO === */
/* font-size: 1.875rem = Tailwind text-3xl, same base as SPA header-title */
.logo {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
  transition: opacity 0.2s ease;
}

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

.logo-icon {
  height: 34px;
  width: auto;
  filter: drop-shadow(0 0 8px rgba(79, 142, 247, 0.4));
}

.logo-brand {
  color: var(--brand-highlight);
}

/* === NAV — matches SPA btn-connexion + btn-success styles === */
.landing-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Nav links */
.landing-nav a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.4rem 0.5rem;
  transition: color 0.2s ease;
}

.landing-nav a:hover {
  color: var(--text-primary);
}

/* "Start Chat" button */
.cta-header-btn {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 0.45rem 1.1rem !important;
  border-radius: 4px;
  font-weight: 600 !important;
  font-size: 0.88rem !important;
  box-shadow: 0 0 10px rgba(41, 182, 214, 0.3);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease !important;
}

.cta-header-btn:hover {
  background: var(--accent-dark) !important;
  box-shadow: var(--accent-glow) !important;
  transform: translateY(-1px);
  color: #fff !important;
}

/* Language switcher */
.lang-switcher {
  appearance: none;
  -webkit-appearance: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: border-color 0.2s ease;
  outline: none;
  font-family: var(--font-body);
}

.lang-switcher:hover,
.lang-switcher:focus {
  border-color: var(--accent);
}

.lang-switcher option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* === HERO SECTION === */
.hero {
  background: transparent;
  text-align: center;
  padding: 5rem 1.5rem 4rem;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* hero::after gradient removed — body now has continuous gradient */

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
}

.hero-highlight {
  color: var(--brand-highlight);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

/* === CTA BUTTONS === */
.cta-button {
  display: inline-block;
  background: var(--cta-gradient);
  color: #fff;
  padding: 0.85rem 2.2rem;
  border-radius: 4px;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
  box-shadow: 0 0 20px rgba(41, 182, 214, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(41, 182, 214, 0.6);
  opacity: 0.95;
  color: #fff;
}

/* === CONTENT SECTIONS === */
main {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

.content-section {
  padding: 3.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.content-section:last-of-type {
  border-bottom: none;
}

.content-section h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
}

.content-section p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 1rem;
  line-height: 1.8;
}

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

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

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

.filter-card {
  background: var(--bg-card);
  border-radius: 4px;
  padding: 1.5rem;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  color: inherit;
  display: block;
}

.filter-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
  color: inherit;
}

.filter-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
}

.filter-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0;
  line-height: 1.6;
}

/* === FAQ === */
.faq-list {
  list-style: none;
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.faq-item {
  background: var(--bg-card);
  border-radius: 4px;
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.faq-item summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
}

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

.faq-item summary::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--accent);
  font-weight: 400;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item[open] summary {
  border-bottom: 1px solid var(--border-subtle);
}

.faq-item .faq-answer {
  padding: 1rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* === CTA FINAL === */
.cta-final {
  text-align: center;
  padding: 4rem 0 3rem;
}

.cta-final h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
}

/* === RELATED PAGES === */
.related-pages {
  padding: 3rem 0 4rem;
}

.related-pages h3 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent);
  margin-bottom: 1rem;
}

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

.related-card {
  background: var(--bg-elevated, #232B3E);
  border-radius: 4px;
  padding: 1.25rem;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  border: 1px solid var(--border-subtle);
  display: block;
  color: inherit;
}

.related-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
  color: inherit;
}

.related-card h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
}

.related-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* === LANDING FOOTER === */
.landing-footer {
  background: var(--bg-secondary);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
  padding: 1.5rem 2rem;
  position: relative;
  z-index: 1;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
}

/* === 4 COLONNES SUR UNE LIGNE === */
.footer-columns {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  gap: 0;
}

/* Les 3 premières colonnes : liens */
.footer-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0 2rem 0 0;
}

/* 4e colonne : brand (logo + rta) */
.footer-col-brand {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 0 0 0 2rem;
  min-width: 220px;
}

.footer-col-title {
  color: var(--accent);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.footer-col a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* Logo */
.footer-logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.35rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
  transition: opacity 0.2s ease;
}

.footer-logo-link:hover {
  opacity: 0.8;
  color: var(--text-primary);
}

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

.footer-logo-brand {
  color: var(--brand-highlight);
}

/* RTA */
.rta-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-primary);
  padding: 0.3rem 0.25rem;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.rta-link:hover {
  background: rgba(211, 47, 47, 0.1);
  transform: translateY(-2px);
}

.rta-icon {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.rta-link:hover .rta-icon {
  transform: scale(1.05);
}

.rta-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Copyright — ligne entière sous les colonnes */
.footer-copyright {
  margin: 1rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  width: 100%;
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* lg3 : 1000–1024px */
@media (max-width: 1024px) {
  .footer-col {
    padding-right: 1.5rem;
  }

  .footer-col-brand {
    padding-left: 1.5rem;
    min-width: 190px;
  }
}

/* zenbook : 850–999px */
@media (max-width: 999px) {
  .landing-footer {
    padding: 1.25rem 1.25rem;
  }

  .footer-col {
    padding-right: 1rem;
  }

  .footer-col-brand {
    padding-left: 1rem;
    min-width: 170px;
  }

  .footer-logo-link {
    font-size: 1.2rem;
  }
}

/* lg2 / lg : 768–849px — passer en 2 lignes */
@media (min-width: 768px) and (max-width: 849px) {
  .landing-header {
    padding: 0 1rem;
  }

  .hero {
    padding: 3.5rem 1rem 3rem;
  }

  main {
    padding: 0 1rem;
  }

  .filters-grid {
    grid-template-columns: 1fr;
  }

  .landing-footer {
    padding: 1rem 1rem;
  }

  .footer-columns {
    flex-wrap: wrap;
    gap: 1.5rem 0;
  }

  .footer-col {
    flex: 1 1 30%;
    padding: 0 1rem 0 0;
  }

  .footer-col:last-of-type {
    padding-right: 0;
  }

  .footer-col-brand {
    flex: 0 0 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    min-width: 0;
  }

  .footer-col a {
    font-size: 0.85rem;
  }
}

/* < 849px non-footer (header, hero, main) */
@media (max-width: 849px) {
  .landing-header {
    padding: 0 1rem;
  }

  .hero {
    padding: 3.5rem 1rem 3rem;
  }

  main {
    padding: 0 1rem;
  }

  .filters-grid {
    grid-template-columns: 1fr;
  }
}

/* < 768px footer : une seule colonne, tout centré */
@media (max-width: 767px) {
  .landing-footer {
    padding: 1rem 1rem;
  }

  .footer-columns {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .footer-col {
    flex: none;
    width: 100%;
    max-width: 260px;
    padding: 0;
    align-items: center;
    text-align: center;
  }

  .footer-col a {
    font-size: 0.85rem;
    text-align: center;
  }

  .footer-col-title {
    text-align: center;
  }

  .footer-col-brand {
    width: 100%;
    max-width: 260px;
    flex-direction: column;
    align-items: center;
    padding: 0;
    min-width: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1rem;
  }

  .footer-logo-link {
    font-size: 1.1rem;
  }

  .cta-button {
    width: 100%;
    text-align: center;
  }
}

/* Hide Explore link on small screens */
@media (max-width: 650px) {
  .explore-link {
    display: none;
  }
}

/* Hide Start Chat header button on very small screens */
@media (max-width: 400px) {
  .cta-header-btn {
    display: none;
  }
}
