/* ============================================
   Win'IZ — Site vitrine
   Charte : jeune, dynamique, sobre et pro
   ============================================ */

:root {
  /* Marque */
  --green: #2d8a5e;
  --green-dark: #23704a;
  --green-light: #e8f5ef;
  --yellow: #f5c842;
  --yellow-light: #fef9e7;
  /* Neutres */
  --black: #1a1a1a;
  --gray-800: #2d2d2d;
  --gray-600: #5c5c5c;
  --gray-400: #8a8a8a;
  --gray-200: #e5e5e5;
  --gray-100: #f5f5f5;
  --white: #ffffff;
  /* Surfaces type "appareil" (mockup téléphone, cadres) — restent sombres en dark mode */
  --device-bg: #1a1a1a;
  /* Typo */
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  /* Layout */
  --container: min(1120px, 92vw);
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.1);
  /* Header (fond semi-transparent) */
  --header-bg: rgba(255, 255, 255, 0.98);
}

/* Thème sombre : suit les préférences du système (device) */
@media (prefers-color-scheme: dark) {
  html {
    color-scheme: dark;
  }

  :root {
    --green-light: #1a2e24;
    --black: #f0f0f0;
    --gray-800: #e0e0e0;
    --gray-600: #b0b0b0;
    --gray-400: #808080;
    --gray-200: #404040;
    --gray-100: #2d2d2d;
    --white: #1a1a1a;
    --device-bg: #0d0d0d;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.45);
    /* Header : même fond que la section « Comment ça marche » (--gray-100) */
    --header-bg: rgba(45, 45, 45, 0.98);
  }

  /* Pages aide, reglement, confidentialite : bande pleine largeur, même couleur que le hero (index) en mode sombre */
  .legal-brand {
    background: var(--green-light);
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: 1rem calc(50vw - 50%);
    border-radius: 0;
    margin-bottom: 0.5rem;
  }
}

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

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--white);
}

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

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

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ----- Header (toujours au-dessus du menu mobile) ----- */
.header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-200);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 1.5rem;
  min-height: 64px;
}

.logo img {
  height: 52px;
  width: auto;
}

/* Navigation desktop (visible > 900px) */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-desktop a {
  color: var(--gray-800);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-desktop a:hover {
  color: var(--green);
}

/* Burger (visible uniquement en mobile) */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--gray-800);
  border-radius: var(--radius);
  transition: background 0.2s ease;
}

.burger:hover {
  background: var(--gray-100);
}

.burger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.burger[aria-expanded="true"] .burger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.burger[aria-expanded="true"] .burger-line:nth-child(2) {
  opacity: 0;
}

.burger[aria-expanded="true"] .burger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Overlay menu mobile (sibling du header, z-index en dessous = burger toujours cliquable) */
.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  background: var(--white);
  overflow-y: auto;
  padding: 5rem 1.5rem 2rem;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: visibility 0.25s ease, opacity 0.25s ease;
}

.nav-overlay.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.nav-mobile {
  display: none;
}

/* ----- Mobile (< 900px) ----- */
@media (max-width: 900px) {
  .nav-desktop {
    display: none;
  }

  .burger {
    display: flex;
  }

  .nav-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: calc(100vh - 7rem);
    padding: 0;
  }

  .nav-mobile a {
    display: block;
    width: 100%;
    max-width: 280px;
    padding: 1rem 1.25rem;
    text-align: center;
    color: var(--gray-800);
    font-weight: 600;
    font-size: 1.25rem;
    border-radius: var(--radius);
    transition: background 0.2s ease, color 0.2s ease;
  }

  .nav-mobile a:hover {
    background: var(--gray-100);
    color: var(--green);
  }
}

/* Sur desktop, ne pas afficher l’overlay */
@media (min-width: 901px) {
  .nav-overlay {
    display: none;
  }
}

/* ----- Hero ----- */
.hero {
  padding: 3rem 0 4rem;
  background: var(--green-light);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-mascot {
  width: 380px;
  max-width: 100%;
  height: auto;
  margin: 0 0 1rem;
  display: block;
}

.hero-title {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--black);
}

.hero-subtitle {
  margin: 0 0 2rem;
  font-size: 1.15rem;
  color: var(--gray-600);
  max-width: 420px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.badge-link img {
  height: 60px;
  width: auto;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-mockup {
  position: relative;
  width: min(320px, 85vw);
  border-radius: 2rem;
  padding: 0.75rem;
  background: var(--device-bg);
  box-shadow: var(--shadow-hover);
}

.hero-screenshot {
  border-radius: 1.5rem;
  width: 100%;
  height: auto;
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-mascot {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-badges {
    justify-content: center;
  }
}

/* ----- Sections communes ----- */
.section {
  padding: 4rem 0;
}

.section-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  color: var(--black);
  text-align: center;
}

.legal-title {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}

.legal-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.legal-logo {
  height: 48px;
  width: auto;
}

/* ----- Formulaire aide ----- */
.form-aide {
  max-width: 480px;
  margin: 0 auto 2rem;
}

.form-aide .form-group {
  margin-bottom: 1.25rem;
}

.form-aide label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--gray-800);
}

.form-aide input,
.form-aide textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  font-family: var(--font);
  font-size: 1rem;
  color: var(--gray-800);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  transition: border-color 0.2s ease;
}

.form-aide input:focus,
.form-aide textarea:focus {
  outline: none;
  border-color: var(--green);
}

.form-aide textarea {
  resize: vertical;
  min-height: 120px;
}

.form-aide .form-submit {
  display: block;
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.85rem 1.5rem;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  background: var(--green);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s ease;
}

.form-aide .form-submit:hover {
  background: var(--green-dark);
}

.aide-success {
  max-width: 480px;
  margin: 0 auto 1.5rem;
  padding: 1rem 1.25rem;
  text-align: center;
  font-weight: 600;
  color: var(--green-dark);
  background: var(--green-light);
  border-radius: var(--radius);
}

.section-intro {
  margin: 0 auto 2.5rem;
  max-width: 560px;
  text-align: center;
  color: var(--gray-600);
  font-size: 1.05rem;
}

/* ----- Étapes ----- */
.steps {
  background: var(--gray-100);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.step-card {
  background: var(--white);
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.step-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 1rem;
  font-weight: 800;
  font-size: 1.125rem;
  color: var(--white);
  background: var(--green);
  border-radius: 10px;
}

.step-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--black);
}

.step-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--gray-600);
}

@media (max-width: 900px) {
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .steps-grid {
    grid-template-columns: 1fr;
  }
}

/* ----- Screenshots ----- */
.screenshots-section {
  background: var(--white);
}

.screenshots-wrap {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.screenshots-track {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.screenshot-item {
  flex: 0 0 auto;
  width: min(180px, 42vw);
  padding: 0.5rem;
  background: var(--device-bg);
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: var(--shadow-hover);
  cursor: pointer;
}

.screenshot-item img {
  width: 100%;
  height: auto;
  border-radius: 1rem;
  display: block;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0.2s ease, opacity 0.2s ease;
}

.lightbox.is-open {
  visibility: visible;
  opacity: 1;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* ----- Avis ----- */
.reviews {
  background: var(--green-light);
}

.reviews .section-intro {
  font-size: 1.35rem;
  font-weight: 500;
}

.reviews .reviews-lead {
  margin-bottom: 0.5rem;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.review-card {
  margin: 0;
  padding: 1.5rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.review-stars {
  color: var(--yellow);
  font-size: 1.125rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.review-card p {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--gray-800);
  font-style: italic;
}

.review-card cite {
  font-size: 0.875rem;
  color: var(--gray-600);
  font-style: normal;
}

@media (max-width: 700px) {
  .reviews-grid {
    grid-template-columns: 1fr;
  }
}

/* ----- Départements ----- */
.departments {
  background: var(--gray-100);
}

.departments-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.departments-list li {
  padding: 0.75rem 1.25rem;
  background: var(--white);
  border-radius: var(--radius);
  font-weight: 600;
  color: var(--gray-800);
  box-shadow: var(--shadow);
}

/* ----- CTA ----- */
.cta-section {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: var(--white);
}

.cta-section .section-title,
.cta-section .section-intro {
  color: var(--white);
}

.cta-section .section-intro {
  opacity: 0.95;
}

.cta-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.cta-badges .badge-link img {
  height: 62px;
  width: auto;
}

/* ----- Footer ----- */
.footer {
  background: var(--white);
  color: var(--gray-800);
  font-size: 0.95rem;
  border-top: 1px solid var(--gray-200);
}

.footer-inner {
  display: flex;
  justify-content: flex-start;
  padding: 3rem 1.5rem 2rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 3rem;
  width: 100%;
  text-align: center;
}

.footer-block {
  text-align: center;
}

.footer-block h4 {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--black);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-block p,
.footer-block a {
  margin: 0 0 0.5rem;
  color: var(--gray-600);
}

.footer-block a:hover {
  color: var(--green);
}

.footer-bottom {
  border-top: 1px solid var(--gray-200);
  padding: 1.25rem 1.5rem;
}

.footer-bottom .container p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--gray-600);
  text-align: center;
}

@media (max-width: 700px) {
  .footer-links {
    flex-direction: column;
    gap: 1.5rem;
  }
}