/* === RESET + BASE === */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--ff-sans);
  color: var(--text);
  background: radial-gradient(1200px 600px at 10% -10%, #182036 20%, transparent 60%) no-repeat, var(--bg);
  line-height: 1.6;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* === ACCESSIBILITÉ === */
.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  padding: .5rem .75rem;
  background: var(--primary);
  color: #001219;
  border-radius: 8px;
}

/* === LAYOUT === */
.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}
.section {
  padding-block: clamp(3rem, 6vw, 6rem);
  scroll-margin-top: 90px; /* confort ancrage sous header sticky */
  position: relative;
}

/* Séparateur doux (inoffensif) entre sections */
.section::after{
  content: "";
  display: block;
  height: 1px; width: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent);
  margin-top: clamp(2rem, 4vw, 3rem);
  pointer-events: none; /* NE capte PAS la souris */
}
.section:last-of-type::after{ display: none; }

.gradient-text {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* === HEADER / NAV === */
.header{
  position: sticky;
  top: 0;
  z-index: 1000; /* au-dessus de tout */
  background: rgba(16,23,38,.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.06);
  pointer-events: auto; /* sécurité */
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem 0;
}
.brand {
  font-weight: 700;
  letter-spacing: .3px;
}
.nav__link {
  padding: .5rem .75rem;
  border-radius: 999px;
  color: var(--text-muted);
}
.nav__link:hover {
  color: var(--text);
  background: rgba(255,255,255,.06);
}

/* === HERO === */
.hero {
  display: grid;
  gap: 1rem;
}
.hero__title {
  font-size: var(--fs-900);
  line-height: 1.1;
  margin: 0 0 .5rem;
}
.hero__subtitle {
  margin: 0 0 1rem;
  color: var(--text-muted);
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

/* === BOUTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem 1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
}
.btn--primary {
  background: linear-gradient(90deg, #1fbfd6, var(--primary));
  color: #001219;
  box-shadow: var(--shadow);
}
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: rgba(255,255,255,.12);
}
.btn--ghost:hover {
  background: rgba(255,255,255,.06);
}

/* Micro-interactions CTA */
.btn--primary:hover,
.btn--ghost:hover { transform: translateY(-2px); }
.btn--primary:active,
.btn--ghost:active { transform: translateY(0); }

/* Focus visibles et cohérents */
a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 10px;
}

/* Transitions douces globales */
a, .btn { transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease; }

/* === FOOTER === */
.footer {
  border-top: 1px solid rgba(255,255,255,.06);
  padding-block: 1.25rem;
  color: var(--text-muted);
}
.footer__grid{
  display: grid;
  gap: .75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px){
  .footer__grid{ grid-template-columns: 1fr auto; align-items: center; }
}
.footer__brand{ color: var(--text-muted); }
.footer__nav{ display: flex; gap: .75rem; flex-wrap: wrap; }
.footer__nav a{
  padding: .4rem .6rem; border-radius: 999px; color: var(--text-muted);
}
.footer__nav a:hover{
  background: rgba(255,255,255,.06); color: var(--text);
}

/* === FEATURES === */
.features__head {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: 2rem;
}
.features__sub { color: var(--text-muted); margin: .5rem 0 0; }

.features__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .features__grid { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: linear-gradient(180deg, var(--surface), rgba(16,23,38, .85));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s cubic-bezier(.2,.8,.2,1), border-color .25s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
  border-color: rgba(255,255,255,.12);
}
.card__icon {
  width: 36px; height: 36px;
  color: var(--primary);
  margin-bottom: .5rem;
}
.card__title { margin: .25rem 0 .25rem; font-size: var(--fs-600); }
.card__text { margin: 0; color: var(--text-muted); }

/* === PROFILES === */
.profiles__head {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: 2rem;
}
.profiles__sub { color: var(--text-muted); margin: .5rem 0 0; }

.profiles__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .profiles__grid { grid-template-columns: repeat(3, 1fr); }
}

.profile-card {
  background: linear-gradient(180deg, var(--surface), rgba(16,23,38, .85));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s cubic-bezier(.2,.8,.2,1);
}
.profile-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
}

.profile-card__avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin-inline: auto;
  margin-bottom: 1rem;
  border: 3px solid var(--primary);
}
.profile-card__name { margin: 0 0 .25rem; font-size: var(--fs-600); }
.profile-card__stack { margin: 0 0 .5rem; color: var(--text-muted); }
.profile-card__rating { margin: 0 0 1rem; color: var(--primary); font-size: .95rem; }

/* === TESTIMONIALS === */
.testimonials__head {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: 2rem;
}
.testimonials__sub { color: var(--text-muted); margin: .5rem 0 0; }

.testimonials__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .testimonials__grid { grid-template-columns: repeat(3, 1fr); }
}

.quote {
  background: linear-gradient(180deg, var(--surface), rgba(16,23,38,.85));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: .75rem;
}
.quote__stars {
  letter-spacing: 2px;
  color: var(--primary);
  font-size: 1.05rem;
}
.quote__text {
  margin: 0;
  color: var(--text);
}
.quote__author {
  display: flex; align-items: center; gap: .75rem;
  color: var(--text-muted);
}
.quote__avatar {
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--primary);
}

/* === CONTACT === */
.contact__head {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: 2rem;
}
.contact__sub { color: var(--text-muted); margin: .5rem 0 0; }

.form { display: grid; gap: 1rem; }
.form__grid {
  display: grid; gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px){
  .form__grid { grid-template-columns: repeat(2, 1fr); }
}

.field { display: grid; gap: .4rem; }
.label { font-weight: 600; }
.input, .textarea {
  width: 100%;
  padding: .85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(10,19,34,.85);
  color: var(--text);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.input::placeholder, .textarea::placeholder { color: var(--text-muted); }

.input:focus-visible, .textarea:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(110,231,248,.15);
}

/* États de validation natifs (HTML5) */
.input:required:invalid, .textarea:required:invalid { border-color: rgba(239,68,68,.6); }
.input:required:valid, .textarea:required:valid { border-color: rgba(52,211,153,.5); }

.form__hint { color: var(--text-muted); font-size: .95rem; }

/* === ANIMATIONS === */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.reveal {
  opacity: 0;
  animation: fadeUp .5s cubic-bezier(.2,.8,.2,1) .05s both;
}
.reveal--delay-1 { animation-delay: .1s; }
.reveal--delay-2 { animation-delay: .2s; }
.reveal--delay-3 { animation-delay: .3s; }

/* Respect des préférences utilisateur */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal--delay-1, .reveal--delay-2, .reveal--delay-3 {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* === SCROLL / NAV ACTIVE (ScrollSpy CSS-only) === */
html { scroll-behavior: smooth; }

body:has(#features:target)     .nav__link[href="#features"],
body:has(#profiles:target)     .nav__link[href="#profiles"],
body:has(#testimonials:target) .nav__link[href="#testimonials"],
body:has(#contact:target)      .nav__link[href="#contact"]{
  background: rgba(255,255,255,.10);
  color: var(--text);
}
/* Quand aucune section n’est ciblée (haut de page) */
body:not(:has(:target)) .nav__link[href="#features"]{
  background: rgba(255,255,255,.08);
  color: var(--text);
}

/* === BOUTON BACK-TO-TOP === */
.to-top{
  position: fixed;
  right: 1rem; bottom: 1rem;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--surface), rgba(16,23,38,.9));
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: var(--shadow);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  z-index: 900; /* sous la nav */
}
.to-top:hover{ transform: translateY(-2px); }
