/* AutoSeller – minimal, modern, responsive */

/* ========= Thème sombre (par défaut) ========= */
:root {
  --bg: #0b1220;
  --panel: #0f172a;
  --text: #e6edf6;
  --muted: #b6c2d1;
  --primary: #0ea5e9;
  --primary-600: #0284c7;
  --ring: rgba(14,165,233,0.35);
  --ok: #22c55e;
  --warn: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 10px 30px rgba(2,8,23,.35);

  /* Nouveaux tokens pour harmoniser les bordures/hover */
  --border: rgba(148,163,184,.12);
  --hover: rgba(148,163,184,.08);
}

/* ========= Thème clair (activer via .theme-light sur html/body) ========= */
:root.theme-light {
  --bg: #f6f8fb;          /* fond global doux */
  --panel: #ffffff;       /* cartes/panels */
  --text: #1a2230;        /* texte principal */
  --muted: #5f6b7a;       /* texte secondaire */
  --primary: #0ea5e9;
  --primary-600: #0284c7;
  --ring: rgba(2,132,199,.28);
  --ok: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;
  --shadow: 0 10px 30px rgba(0,0,0,.08);

  --border: rgba(2, 6, 23, .08);
  --hover: rgba(2, 6, 23, .05);
}

/* ========= Reset & base ========= */
* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  /* Fond sombre (dégradé + lueur) */
  background:
    radial-gradient(1200px 800px at 80% -10%, rgba(14,165,233,.15), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  -webkit-font-smoothing: antialiased;
}

/* Fond clair animé quand .theme-light est active */
.theme-light body {
  background:
    radial-gradient(1200px 800px at 80% -10%, rgba(14,165,233,.10), transparent 60%),
    linear-gradient(-45deg, #fafbfd, #eceff3, #f5f7fa, #e6eaf0);
  background-size: 400% 400%, 100% 100%;
  animation: gradientMove 22s ease infinite;
}

/* Animation pour le fond clair */
@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.container { width: min(1100px, 92vw); margin: 0 auto; }

.skip-link {
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus { position: static; width: auto; height: auto; padding: .5rem .75rem; background: var(--primary); color: #001018; }

/* ========= Header ========= */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0;
}
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: .2px; }
.brand img { filter: drop-shadow(0 2px 8px rgba(14,165,233,.4)); }

.nav-toggle {
  display: none;
  background: transparent; color: var(--text); border: 1px solid var(--border);
  padding: .5rem .75rem; border-radius: 10px; cursor: pointer;
}

.menu { display: flex; align-items: center; gap: 20px; list-style: none; margin: 0; padding: 0; }
.menu a { color: var(--muted); text-decoration: none; padding: .5rem .6rem; border-radius: 10px; }
.menu a:hover { color: var(--text); background: var(--hover); }

/* ========= Buttons ========= */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .8rem 1.1rem; border-radius: 12px; text-decoration: none; font-weight: 600; border: 1px solid transparent; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-600)); color: #001018; box-shadow: var(--shadow); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost { border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--hover); }

/* ========= Hero ========= */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; padding: 40px 0 20px; }
.hero h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.1; margin: 0 0 14px; }
.lead { color: var(--muted); font-size: 1.1rem; }
.hero-cta { margin: 20px 0 10px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 18px; flex-wrap: wrap; padding: 0; margin: 18px 0 0; list-style: none; color: var(--muted); }
.hero-stats strong { color: var(--text); font-size: 1.05rem; }

/* === Hero media carré & responsive === */
.hero-media {
  position: relative;
  min-height: 0;
  display: grid;
  place-items: center;
}

/* Cadre carré responsive */
.phone-frame {
  width: min(520px, 100%);
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  padding: 0;
  background: linear-gradient(180deg, #111827, #0b1220); /* remappé plus bas pour clair */
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

/* Variante claire du phone-frame */
.theme-light .phone-frame {
  background: linear-gradient(180deg, #ffffff, #f2f5f9);
}

.phone-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  background: #0a0f1a;
}
.theme-light .phone-frame img { background: #eef2f7; }

/* Carousel in hero phone */
.hero-media .carousel { position: absolute; inset: 0; overflow: hidden; border-radius: 24px; }
.hero-media .carousel-track { display: flex; height: 100%; transition: transform .45s ease; }
.hero-media .carousel-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; }

.hero-media .carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 999px;
  border: 1px solid rgba(148,163,184,.28);
  background: rgba(2,8,23,.45); color: var(--text);
  display: grid; place-items: center; cursor: pointer;
}
.hero-media .carousel-btn:hover { background: rgba(2,8,23,.6); }
.hero-media .carousel-btn.prev { left: 10px; }
.hero-media .carousel-btn.next { right: 10px; }

.hero-media .carousel-dots {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px;
}
.hero-media .carousel-dots .dot {
  width: 7px; height: 7px; border-radius: 999px;
  background: rgba(230,237,246,.45); border: none; padding: 0; cursor: pointer;
}
.hero-media .carousel-dots .dot[aria-selected="true"] { background: var(--primary); }
.theme-light .hero-media .carousel-dots .dot { background: rgba(2,6,23,.35); }

/* Cartes flottantes (🤖 / ⚡) */
.card {
  position: absolute; right: -6px;
  background: #0f1a2f;
  border: 1px solid var(--border);
  color: var(--text); padding: 10px 12px; border-radius: 12px;
  display: inline-flex; gap: 10px; align-items: center; box-shadow: var(--shadow);
}
.card.ai { top: 14px; }
.card.publish { bottom: 14px; }
.card-icon { font-size: 18px; }
.card-text { color: var(--muted); font-size: .95rem; }
.theme-light .card { background: var(--panel); }

/* ========= Sections ========= */
.section { padding: 60px 0; }
.section-header { text-align: center; margin-bottom: 28px; }
.section-header h2 { margin: 0 0 8px; font-size: clamp(22px, 3.5vw, 32px); }
.section-header p { margin: 0; color: var(--muted); }

.grid.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 16px;
}
.feature-ico { font-size: 22px; }
.feature h3 { margin: 8px 0 6px; font-size: 1.05rem; }
.feature p { margin: 0; color: var(--muted); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; list-style: none; padding: 0; margin: 0; }
.steps li {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 16px;
}
.steps li span { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; background: var(--primary); color: #001018; font-weight: 800; margin-bottom: 8px; }
.steps h3 { margin: 4px 0 6px; font-size: 1.05rem; }
.steps p { margin: 0; color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.stat {
  background: linear-gradient(180deg, #0f1a2f, #0b1220);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 18px; text-align: center;
}
.theme-light .stat {
  background: linear-gradient(180deg, #ffffff, #f2f5f9);
}
.stat strong { display: block; font-size: 28px; }
.stat span { color: var(--muted); }

.quote {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 18px; color: var(--muted);
}
.quote p { margin: 0 0 6px; font-style: italic; }
.quote-meta { color: #93a4b7; font-size: .95rem; }
.theme-light .quote-meta { color: #6a7483; }

.integrations { display: flex; align-items: center; justify-content: center; gap: 18px; list-style: none; padding: 0; margin: 0 0 10px; flex-wrap: wrap; }
.integrations img { height: 28px; opacity: .9; filter: drop-shadow(0 4px 8px rgba(2,8,23,.35)); }
.integrations-note { text-align: center; color: var(--muted); }

/* ========= Testimonials ========= */
.testimonials { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.testimonial {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 18px; display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: start;
}
.avatar { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: linear-gradient(135deg, var(--primary), var(--primary-600)); color: #001018; box-shadow: var(--shadow); }
.testimonial-quote { margin: 0; color: var(--muted); font-style: italic; grid-column: 1 / -1; }
.testimonial-meta { grid-column: 2 / -1; color: var(--muted); }
.meta-name { color: var(--text); font-weight: 600; }
.meta-role { font-size: .95rem; opacity: .9; }

/* ========= CTA ========= */
.cta .cta-card {
  background: radial-gradient(600px 300px at 80% -40%, rgba(14,165,233,.18), transparent 50%), var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px; padding: 26px; text-align: center;
}
.theme-light .cta .cta-card {
  background: radial-gradient(600px 300px at 80% -40%, rgba(14,165,233,.12), transparent 50%), var(--panel);
}
.cta .cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }

/* ========= Footer ========= */
.site-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 24px 0 40px; color: var(--muted);
}
.footer-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.site-footer nav a { color: var(--muted); text-decoration: none; margin-right: 14px; }
.site-footer nav a:hover { color: var(--text); }

/* ========= Responsive ========= */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .phone-frame { width: min(82vw, 520px); }
  .grid.features { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .menu {
    display: none; position: absolute; right: 4vw; top: 64px;
    flex-direction: column; background: var(--panel);
    border: 1px solid var(--border); padding: 10px; border-radius: 12px;
    width: calc(92vw - 8px);
  }
  .nav-toggle { display: inline-block; }
  .menu.open { display: flex; }
  .grid.features { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .testimonials { grid-template-columns: 1fr; }
  .phone-frame { width: 88vw; }
}

/* ========= Préférence système (optionnel) ========= */
@media (prefers-color-scheme: light) {
  /* Si tu veux que le light soit par défaut quand l’OS est en light :
     enlève ce commentaire et mets :root { color-scheme: light; } et .theme-dark explicite si besoin */
}
