:root {
  --primary: #007782;
  --primary-dark: #005f68;
  --primary-light: #e6f2f3;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --border: #e4e4e4;
  --bg-soft: #f6f7f7;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.5;
}
a { color: inherit; }

/* HEADER */
header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.5px;
}
nav { display: flex; align-items: center; gap: 28px; }
nav a.link { color: var(--text); text-decoration: none; font-size: 15px; }
nav a.link:hover { color: var(--primary); }

/* ===== Menu utilisateur déroulant ===== */
.user-menu {
  position: relative;
}

.user-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: inherit;
  background: #f3f7f8;
  border: 1px solid #c9d4d6;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.user-toggle:hover,
.user-toggle[aria-expanded="true"] {
  background: #e6f3f4;
  border-color: #1f6f78;
}

.user-caret {
  font-size: 11px;
  transition: transform .2s;
}
.user-toggle[aria-expanded="true"] .user-caret {
  transform: rotate(180deg);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 190px;
  padding: 6px;
  background: #fff;
  border: 1px solid #dbe3e4;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  z-index: 1000;
}
.user-dropdown[hidden] {
  display: none;
}

.user-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  font-size: 14px;
  color: #1f2d30;
  text-decoration: none;
  border-radius: 8px;
}
.user-dropdown a i {
  width: 16px;
  text-align: center;
  color: #6b7a7d;
}
.user-dropdown a:hover {
  background: #f3f7f8;
}
.user-dropdown a.danger,
.user-dropdown a.danger i {
  color: #c0392b;
}
.user-dropdown a.danger:hover {
  background: #fdeaea;
}

/* Mobile : on garde le nom court */
@media (max-width: 640px) {
  .user-toggle .user-name {
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* BOUTONS */
.btn-outline {
  display: inline-block;
  border: 1px solid var(--primary);
  color: var(--primary);
  background: #fff;
  padding: 9px 20px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.btn-outline:hover { background: var(--primary-light); }
.btn-primary {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--primary);
  color: #fff;
  padding: 13px 20px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary:hover { background: var(--primary-dark); }

/* HERO */
.hero { background: var(--primary-light); padding: 72px 24px 96px; }
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 48px;
}
.hero-card {
  background: #fff;
  border-radius: 8px;
  padding: 40px;
  max-width: 440px;
  flex-shrink: 0;
}
.hero-card h1 { font-size: 32px; line-height: 1.2; margin-bottom: 14px; }
.hero-card p { color: var(--muted); margin-bottom: 24px; font-size: 16px; }
.hero-visual { flex: 1; display: flex; justify-content: center; }
.ticket {
  background: #fff;
  width: 280px;
  padding: 24px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-family: "Courier New", monospace;
  font-size: 13px;
  transform: rotate(3deg);
}
.ticket h4 { text-align: center; margin-bottom: 12px; font-size: 15px; }
.ticket .row { display: flex; justify-content: space-between; padding: 4px 0; }
.ticket .total {
  border-top: 1px dashed #999;
  margin-top: 10px;
  padding-top: 10px;
  font-weight: 700;
}

/* CHIFFRES CLES */
.stats {
  max-width: 1000px;
  margin: -48px auto 0;
  position: relative;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  padding: 28px 16px;
}
.stat { flex: 1; text-align: center; border-right: 1px solid var(--border); padding: 0 12px; }
.stat:last-child { border-right: none; }
.stat strong { display: block; font-size: 28px; color: var(--primary); }
.stat span { font-size: 14px; color: var(--muted); }

/* SECTIONS */
.section { max-width: 1100px; margin: 0 auto; padding: 72px 24px; }
.soft { background: var(--bg-soft); }
.section h2 { font-size: 28px; text-align: center; margin-bottom: 8px; }
.section .sub { text-align: center; color: var(--muted); margin-bottom: 40px; }

.split { display: flex; align-items: center; gap: 56px; }
.split.reverse { flex-direction: row-reverse; }
.split .text { flex: 1; }
.split .text h2 { text-align: left; }
.split .text p { color: var(--muted); margin-bottom: 14px; }
.split .text ul { list-style: none; margin-top: 16px; }
.split .text li { padding: 6px 0 6px 26px; position: relative; }
.split .text li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}
.split .visual { flex: 1; }

/* MOCK FORMULAIRE */
.mock {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
}
.mock .field { margin-bottom: 14px; }
.mock label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.mock .input {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 15px;
  background: #fff;
}
.mock .suggest {
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 4px 4px;
  font-size: 14px;
}
.mock .suggest div { padding: 8px 12px; }
.mock .suggest div:first-child { background: var(--primary-light); }
.mock .suggest small { color: var(--muted); display: block; }
.mock .btn-fake {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 12px;
  border-radius: 4px;
  font-weight: 500;
  margin-top: 6px;
}

/* ETAPES */
.steps { display: flex; gap: 24px; }
.step {
  flex: 1;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px 24px;
  text-align: center;
}
.step .num {
  width: 40px;
  height: 40px;
  line-height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  margin: 0 auto 14px;
}
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 15px; }

/* FONCTIONNALITES */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 26px 22px;
}
.feature h3 { font-size: 17px; margin-bottom: 8px; color: var(--primary); }
.feature p { color: var(--muted); font-size: 15px; }

/* RAPPORT */
.report { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 24px; }
.report h4 { margin-bottom: 4px; }
.report .total { font-size: 30px; font-weight: 700; color: var(--primary); margin-bottom: 16px; }
.bar { margin-bottom: 12px; font-size: 14px; }
.bar .label { display: flex; justify-content: space-between; margin-bottom: 4px; }
.bar .track { background: var(--bg-soft); border-radius: 4px; height: 8px; }
.bar .fill { background: var(--primary); height: 8px; border-radius: 4px; }

/* CATEGORIES */
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.chip {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 20px;
  padding: 8px 18px;
  font-size: 15px;
}

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
details { border-bottom: 1px solid var(--border); padding: 16px 0; }
summary { cursor: pointer; font-weight: 500; font-size: 17px; }
details p { color: var(--muted); margin-top: 10px; }

/* CTA */
.cta { background: var(--primary-light); text-align: center; padding: 64px 24px; }
.cta h2 { font-size: 28px; margin-bottom: 8px; }
.cta p { color: var(--muted); margin-bottom: 24px; }
.cta .btn-primary { display: inline-block; width: auto; padding: 13px 40px; }

/* FOOTER */
footer { background: #fff; border-top: 1px solid var(--border); }
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
  display: flex;
  gap: 48px;
  justify-content: space-between;
}
.footer-inner > div:first-child { max-width: 280px; }
.footer-inner p { color: var(--muted); font-size: 14px; margin-top: 8px; }
.footer-inner h5 { font-size: 14px; margin-bottom: 10px; }
.footer-inner a { display: block; color: var(--muted); text-decoration: none; font-size: 14px; padding: 3px 0; }
.footer-inner a:hover { color: var(--primary); }
.footer-inner a.logo { color: var(--primary); font-size: 22px; }
.copy {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 16px;
  font-size: 13px;
  color: var(--muted);
}

/* PAGE CONNEXION */
.login-page { background: var(--bg-soft); min-height: calc(100vh - 65px - 110px); padding: 56px 16px; }
.login-card {
  background: #fff;
  max-width: 440px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 36px 32px;
}
.login-card h1 { font-size: 26px; text-align: center; margin-bottom: 6px; }
.login-card .sub { text-align: center; color: var(--muted); margin-bottom: 26px; font-size: 15px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; margin-bottom: 6px; }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px;
  font-size: 15px;
  font-family: inherit;
}
.form-group input:focus { outline: none; border-color: var(--primary); }
.pwd-wrap { position: relative; }
.pwd-wrap button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--primary);
  font-size: 13px;
  cursor: pointer;
}
.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  margin-bottom: 22px;
}
.login-options a { color: var(--primary); text-decoration: none; }
.login-options a:hover { text-decoration: underline; }
.simple-footer { text-align: center; padding: 24px; font-size: 13px; color: var(--muted); background: #fff; border-top: 1px solid var(--border); }

/* MOBILE */
@media (max-width: 800px) {
  .hero-inner, .split, .split.reverse, .steps, .stats, .footer-inner { flex-direction: column; }
  .hero-card { max-width: 100%; }
  .features { grid-template-columns: 1fr; }
  .stat { border-right: none; border-bottom: 1px solid var(--border); padding: 12px 0; }
  .stat:last-child { border-bottom: none; }
  nav a.link { display: none; }
  .footer-inner { gap: 24px; }
}

/* PAGES D'ERREUR */
.error-page {
  background: var(--bg-soft);
  min-height: calc(100vh - 65px - 110px);
  padding: 72px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.error-card {
  background: #fff;
  max-width: 520px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 48px 32px;
  text-align: center;
}
.error-code {
  font-size: 84px;
  font-weight: 700;
  line-height: 1;
  color: var(--primary);
  letter-spacing: -2px;
  margin-bottom: 12px;
}
.error-card h1 { font-size: 26px; margin-bottom: 10px; }
.error-card p { color: var(--muted); margin-bottom: 28px; font-size: 16px; }
.error-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.error-actions .btn-primary { display: inline-block; width: auto; padding: 13px 28px; }
.error-actions .btn-outline { padding: 12px 28px; font-size: 16px; }

.login-footer-link { text-align: center; margin-top: 16px; font-size: 14px; }

/* ===== Bouton scindé "S'inscrire | Se connecter" (style Vinted) ===== */
.auth-split {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--primary);
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
}
.auth-split a {
  padding: 9px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s;
}
.auth-split a:hover { background: var(--primary-light); }
.auth-sep {
  width: 1px;
  height: 18px;
  background: var(--primary);
  opacity: .6;
}
.auth-split a[aria-current="page"] {
  background: var(--primary-light);
  font-weight: 600;
}
@media (max-width: 480px) {
  .auth-split a { padding: 8px 10px; font-size: 14px; }
}

/* ===== Sélecteur de langue ===== */
.lang-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
}
.lang-switch a {
  padding: 6px 12px;
  color: var(--muted);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.lang-switch a:hover { color: var(--primary); }
.lang-switch a[aria-current="true"] {
  background: var(--primary);
  color: #fff;
}

/* ===== Hero : badge, actions, lien secondaire ===== */
.badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.btn-block { width: 100%; text-align: center; }
.hero-small {
  margin-top: 16px;
  margin-bottom: 0 !important;
  font-size: 14px;
  text-align: center;
}
.hero-small a { color: var(--primary); text-decoration: none; }
.hero-small a:hover { text-decoration: underline; }

/* Animation légère du hero */
.hero-card {
  animation: fadeUp .6s ease both;
}

.ticket {
  animation: fadeIn .6s ease both;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.ticket { animation-delay: .15s; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Ticket incliné (section import) */
.visual-center { display: flex; justify-content: center; }
.ticket-tilt { transform: rotate(-3deg); animation: none; }

/* ===== Icônes des fonctionnalités ===== */
.feature {
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .06);
  border-color: #cfe3e5;
}
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
}

/* ===== Étapes : liaison visuelle ===== */
.step { position: relative; }
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 48px;
  right: -24px;
  width: 24px;
  border-top: 2px dashed var(--border);
}
.step { transition: transform .2s; }
.step:hover { transform: translateY(-3px); }

/* ===== Rapport : barres animées ===== */
.bar .fill {
  transition: width 1s ease;
}

/* ===== Chips interactives ===== */
.chip { transition: background .15s, border-color .15s, color .15s; cursor: default; }
.chip:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
}

/* ===== FAQ ===== */
details[open] summary { color: var(--primary); }
summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  font-size: 22px;
  line-height: 1;
  color: var(--primary);
  transition: transform .2s;
}
details[open] summary::after { transform: rotate(45deg); }

/* ===== CTA : bouton plus visible ===== */
.cta .btn-primary {
  box-shadow: 0 6px 16px rgba(0, 119, 130, .25);
}
.cta .btn-primary:hover { transform: translateY(-1px); }

/* ===== Accessibilité : focus visible ===== */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(0, 119, 130, .35);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== Respect des préférences de mouvement ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ===== Mobile : ajustements ===== */
@media (max-width: 800px) {
  .step:not(:last-child)::after { display: none; }
  .hero { padding: 48px 20px 72px; }
  .hero-card { padding: 28px 22px; }
  .hero-card h1 { font-size: 26px; }
  .stats { margin-top: -32px; }
  .section { padding: 56px 20px; }
  .section h2 { font-size: 24px; }
}

@media (max-width: 480px) {
  .header-inner { padding: 0 14px; gap: 10px; }
  .logo { font-size: 21px; }
  nav { gap: 10px; }
  .auth-split a { padding: 8px 11px; font-size: 13px; }
  .auth-sep { margin: 9px 0; }
  .btn-outline { padding: 8px 14px; font-size: 14px; }
}

/* Très petits écrans (≤ 360px) : on réduit encore */
@media (max-width: 360px) {
  .logo { font-size: 18px; }
  .auth-split a { padding: 7px 9px; font-size: 12px; }
}

.alert-success {
  background: #eaf7ee;
  border: 1px solid #b7e0c2;
  color: #1d6b35;
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 14px;
  margin-bottom: 18px;
}