/* AutoDiag+ — landing autonome (alignée sur l’identité app) */
:root {
  --bg-deep: #011627;
  --bg-card: rgba(17, 34, 64, 0.72);
  --bg-card-solid: #152238;
  --accent: #ff9f1c;
  --accent-hover: #ffb03d;
  --text: #f4f7fb;
  --text-muted: #9aa8bc;
  --border: rgba(255, 159, 28, 0.22);
  --radius: 14px;
  --radius-btn: 12px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1100px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(255, 159, 28, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(255, 159, 28, 0.06), transparent 50%);
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 1rem 1.25rem;
  background: var(--accent);
  color: #111;
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(1, 22, 39, 0.88);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
  color: var(--accent);
}

.brand-mark {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: rgba(1, 22, 39, 0.6);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nav-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
}

.nav-main {
  justify-content: center;
}

@media (min-width: 641px) {
  /* Header centré : brand à gauche, nav centrée, CTA à droite */
  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    justify-content: initial;
    gap: 1rem;
  }

  .brand {
    justify-self: start;
  }

  .nav-main {
    justify-self: center;
  }

  .header-inner > .btn {
    justify-self: end;
  }
}

.nav-main a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-main a:hover {
  color: var(--accent);
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-btn);
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #1a1208;
  box-shadow: 0 4px 18px rgba(255, 159, 28, 0.35);
}

.btn-primary:visited {
  color: #1a1208;
}

.btn:visited {
  color: inherit;
}

a.btn {
  text-decoration: none;
}

a.btn:hover {
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255, 159, 28, 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

.hero {
  padding: 3.2rem 0 3.5rem;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(1.85rem, 4.5vw, 2.65rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero .tagline {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 36rem;
  margin: 0 auto 1.75rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.store-note {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 32rem;
  margin: 0 auto;
}

.section {
  padding: 2.75rem 0;
  border-top: 1px solid var(--border);
}

.section-head {
  margin-bottom: 1.5rem;
}

.section-head h2 {
  font-size: 1.65rem;
  margin: 0 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  text-align: center;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
  max-width: 42rem;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.grid-features {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow);
}

.card .emoji {
  font-size: 1.85rem;
  display: block;
  margin-bottom: 0.65rem;
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.two-col {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.showcase {
  display: grid;
  gap: 1.25rem;
  align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.showcase .card ul {
  margin-top: 0.8rem;
}

.img-frame {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: 0.65rem;
  overflow: hidden;
}

.img-frame img {
  display: block;
  width: 100%;
  border-radius: calc(var(--radius) - 2px);
}

.img-link {
  display: block;
  border-radius: calc(var(--radius) - 2px);
  outline: none;
}

.img-link:hover img {
  transform: scale(1.01);
}

.img-link img {
  transition: transform 0.18s ease;
}

.img-link:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 159, 28, 0.35);
}

/* Consentement : mini-galerie compacte (cliquable/zoom) */
.consent-gallery {
  margin: 1rem 0 1.25rem;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  align-items: start;
}

.consent-gallery .img-frame {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.consent-gallery img {
  width: 100%;
  height: auto;
  max-height: 450px;
  object-fit: contain;
  background: rgba(1, 22, 39, 0.55);
}

.carousel {
  display: grid;
  gap: 0.65rem;
}

.carousel-viewport {
  position: relative;
  max-height: 480px;
  overflow: hidden;
  border-radius: calc(var(--radius) - 2px);
}

.carousel-slide {
  display: none;
}

.carousel-slide.is-active {
  display: block;
}

.carousel-slide img {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  background: rgba(1, 22, 39, 0.55);
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.carousel-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(17, 34, 64, 0.9);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.carousel-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.carousel-dots {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 159, 28, 0.45);
  background: rgba(255, 159, 28, 0.14);
  cursor: pointer;
}

.carousel-dot.is-active {
  width: 18px;
  background: var(--accent);
  border-color: var(--accent);
}

.lightbox {
  width: min(1100px, calc(100vw - 2rem));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(1, 22, 39, 0.92);
  color: var(--text);
  padding: 0.8rem;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.lightbox-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 82vh;
  margin: 0 auto;
  border-radius: calc(var(--radius) - 4px);
}

.lightbox-close {
  position: absolute;
  top: 0.3rem;
  right: 0.5rem;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(17, 34, 64, 0.9);
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.img-caption {
  margin: 0.8rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.list-check {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-muted);
}

.list-check li {
  margin-bottom: 0.5rem;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.legal-nav a {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-muted);
}

.legal-nav a:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
}

.legal-block {
  margin-bottom: 2.75rem;
  scroll-margin-top: 5.5rem;
}

.legal-details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(17, 34, 64, 0.35);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.legal-summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.1rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.legal-summary::-webkit-details-marker {
  display: none;
}

.legal-summary::after {
  content: "▾";
  color: var(--accent);
  font-size: 1.1rem;
  transform: rotate(0deg);
  transition: transform 0.15s ease;
}

.legal-details[open] .legal-summary::after {
  transform: rotate(180deg);
}

.legal-body {
  padding: 0.25rem 1.1rem 1.1rem;
}

.legal-block h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.6rem;
  color: var(--accent);
}

.legal-block p,
.legal-block li {
  color: var(--text-muted);
}

.legal-block ul {
  margin: 0.5rem 0 1rem;
  padding-left: 1.2rem;
}

.clause-highlight {
  background: rgba(255, 159, 28, 0.12);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 1.25rem 0;
  color: var(--accent);
  font-weight: 600;
}

.consent-banner {
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  margin-bottom: 2rem;
}

.consent-banner strong {
  color: var(--text);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.site-footer a {
  color: var(--accent);
}

.end-ctas {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.end-cta-title {
  margin: 1.5rem 0 0.6rem;
  text-align: center;
  font-size: 1.35rem;
  color: var(--text);
}

@media (max-width: 640px) {
  h2 {
    text-align: center;
  }

  .section-head h2 {
    justify-content: center;
  }

  .section-head p {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }
  .end-ctas .btn {
    width: 100%;
    max-width: 360px;
  }

  .end-cta-title {
    font-size: 1.2rem;
    margin-top: 1.2rem;
  }

  .end-ctas {
    gap: 0.9rem;
    margin-top: 1.15rem;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 1rem;
  }

  .section-head {
    text-align: center;
  }

  .header-inner {
    padding: 0.75rem 1rem;
    justify-content: center;
  }

  .brand {
    width: 100%;
    justify-content: center;
  }

  .brand-mark {
    margin: 0 auto;
  }

  .nav-main {
    width: 100%;
    justify-content: center;
    gap: 0.35rem 0.75rem;
  }

  .nav-main a {
    font-size: 0.9rem;
  }

  .btn {
    padding: 0.62rem 0.95rem;
    font-size: 0.95rem;
    border-radius: 12px;
  }

  .hero-ctas {
    justify-content: center;
    gap: 0.6rem;
  }

  .hero-ctas .btn {
    width: 100%;
    max-width: 360px;
  }

  .nav-main {
    width: 100%;
    justify-content: center;
  }

  .hero {
    padding: 2rem 0 2.5rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .section {
    padding: 2.1rem 0;
  }

  .card {
    padding: 1.1rem 1.1rem;
  }

  .carousel-viewport {
    max-height: 360px;
  }

  .carousel-slide img {
    max-height: 360px;
  }
  .legal-summary {
    font-size: 1.05rem;
    padding: 0.85rem 0.95rem;
  }

  .legal-body {
    padding: 0.15rem 0.95rem 0.95rem;
  }

  .legal-block h3 {
    margin-top: 1.15rem;
  }

  .legal-block p,
  .legal-block li {
    font-size: 0.98rem;
    line-height: 1.65;
  }
}
