/* =========================================================
   No Bug — feuille de style principale
   Thème sombre, nébuleuse, élégant. Couleurs du logo :
   chaud (rouge/orange) à gauche, froid (bleu/cyan) à droite.
   ========================================================= */

:root {
  /* Fonds */
  --bg:          #070a14;
  --bg-soft:     #0b1020;
  --bg-card:     #0e1426;

  /* Texte */
  --text:        #eef2fb;
  --text-soft:   #aeb8d0;
  --text-muted:  #6b7793;

  /* Accents (issus du logo) */
  --warm:        #ff6b4a;
  --warm-2:      #ff9d5c;
  --cool:        #3fb6ff;
  --cool-2:      #6f7cff;
  --violet:      #9b6bff;

  /* Bordures / surfaces */
  --line:        rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  --radius:      18px;
  --radius-lg:   24px;
  --maxw:        1120px;

  --font-display: "Sora", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Halos d'ambiance en fond de page */
body::before,
body::after {
  content: "";
  position: fixed;
  width: 60vw;
  height: 60vw;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.20;
  z-index: -1;
  pointer-events: none;
}
body::before { top: 30%;  left: -20vw; background: radial-gradient(circle, var(--warm), transparent 70%); }
body::after  { top: 55%;  right: -20vw; background: radial-gradient(circle, var(--cool-2), transparent 70%); }

a { color: inherit; text-decoration: none; }

/* ---------- Topbar ---------- */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 48px);
  backdrop-filter: blur(6px);
  background: linear-gradient(to bottom, rgba(7, 10, 20, 0.55), transparent);
}
.topbar__brand {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: 0.28em;
  font-size: 0.82rem;
  color: var(--text-soft);
}

/* ---------- Sélecteur de langue ---------- */
.lang-switcher { display: flex; gap: 4px; }
.lang-btn {
  font-family: var(--font-display);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.is-active {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 480px;
  background: var(--bg);
  overflow: hidden;
  cursor: pointer; /* la zone est cliquable : haut = relancer, bas = descendre */
}
/* Le logo 16:9 (avec son sous-titre) est intégralement dans la vidéo :
   object-fit:contain garantit qu'il n'est jamais rogné. Les bandes sombres
   se fondent dans le fond. */
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--bg);
  z-index: 0;
}
/* Fondu discret vers le bas pour enchaîner avec la section suivante. */
.hero__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent 78%, var(--bg) 99%);
}

/* Titre accessible mais invisible (le visuel est dans la vidéo) */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.hero__scroll {
  position: absolute;
  z-index: 2;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  animation: bob 2.4s ease-in-out infinite;
}
.hero__scroll svg { width: 24px; height: 24px; }

/* ---------- Sections génériques ---------- */
.intro, .projects {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(70px, 11vw, 140px) clamp(20px, 5vw, 48px);
}
.kicker {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.26em;
  font-size: 0.72rem;
  color: var(--cool);
  margin-bottom: 16px;
}
.intro__title, .projects__title {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  letter-spacing: -0.01em;
  max-width: 18ch;
}
.intro__body {
  margin-top: 24px;
  max-width: 60ch;
  font-size: clamp(1rem, 1.5vw, 1.16rem);
  color: var(--text-soft);
}
/* ---------- Grille de projets ---------- */
.projects__title { margin-bottom: 48px; max-width: none; }
.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

/* ---------- Cartes ---------- */
/* Chaque carte porte deux couleurs d'accent (--c1, --c2) reprises de
   l'identité de l'appli. Toutes les touches colorées s'y réfèrent. */
.card {
  --c1: var(--cool);
  --c2: var(--cool-2);
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 34px 32px 32px;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  animation: cardIn 0.6s ease both;
}
/* Préréglages d'accent */
.card--cool   { --c1: var(--cool);   --c2: var(--cool-2); }
.card--warm   { --c1: var(--violet); --c2: var(--warm); }
.card--echo   { --c1: #818cf8; --c2: #c4b5fd; } /* identité Écho : indigo → violet */
.card--growly { --c1: #34d399; --c2: #6366f1; } /* identité Growly : émeraude + indigo */

/* Lueur d'accent en haut de carte */
.card::before {
  content: "";
  position: absolute;
  inset: -1px -1px auto -1px;
  height: 130px;
  z-index: -1;
  opacity: 0.6;
  transition: opacity 0.35s ease;
  /* coins arrondis en haut : la lueur reste dans la carte sans overflow:hidden
     (qui couperait les bulles d'info des chips) */
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: radial-gradient(120% 100% at 30% 0%,
    color-mix(in srgb, var(--c1) 30%, transparent), transparent 70%);
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.8);
}
.card:hover::before { opacity: 1; }

.card__head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.card__icon {
  flex: none;
  width: 50px; height: 50px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}
.card__icon svg { width: 30px; height: 30px; }
.card__icon { color: var(--c1); }

.card__titles { display: flex; flex-direction: column; }
.card__tag {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.card__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1.2;
}
/* Wordmark : reprend la façon d'écrire chaque appli */
.card__name .grad {
  background: linear-gradient(135deg, var(--c1), var(--c2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.card__name b { color: var(--c1); font-weight: 800; }

/* Slogan accrocheur */
.card__lead {
  margin-top: 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  line-height: 1.35;
  color: var(--text);
}
.card__desc { margin-top: 12px; color: var(--text-soft); font-size: 0.96rem; }

/* Bandeau mis en avant : l'atout phare de l'app (teinté de son accent) */
.card__highlight {
  margin-top: 18px;
  padding: 12px 15px;
  border-radius: 13px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--c1) 38%, var(--line));
  background:
    linear-gradient(135deg,
      color-mix(in srgb, var(--c1) 16%, transparent),
      color-mix(in srgb, var(--c2) 7%, transparent));
}
.card__highlight b { color: var(--text); font-weight: 700; }

/* Accroche sous le bouton (ex : essai gratuit) */
.card__note {
  margin-top: 12px;
  align-self: flex-start;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.card__features {
  list-style: none;
  margin: 20px 0 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card__features li {
  position: relative;
  padding-left: 26px;
  font-size: 0.92rem;
  color: var(--text-soft);
}
.card__features li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, currentColor 0 3px, transparent 4px);
}
.card__features li::before { color: var(--c1); }

/* Chips : aperçu de l'étendue des fonctionnalités */
.card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.chip {
  position: relative;
  font-size: 0.74rem;
  letter-spacing: 0.01em;
  color: var(--text-soft);
  border: 1px solid color-mix(in srgb, var(--c1) 28%, var(--line));
  background: color-mix(in srgb, var(--c1) 8%, transparent);
  padding: 5px 11px;
  border-radius: 999px;
  white-space: nowrap;
  cursor: help;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  outline: none;
}
.chip[data-tip]:hover,
.chip[data-tip]:focus {
  color: var(--text);
  border-color: color-mix(in srgb, var(--c1) 55%, var(--line));
  background: color-mix(in srgb, var(--c1) 16%, transparent);
  z-index: 30;
}

/* Bulle d'info (au survol / focus) */
.chip[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 11px);
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  width: max-content;
  max-width: 230px;
  white-space: normal;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.42;
  letter-spacing: 0;
  color: var(--text);
  background: #121a2e;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  padding: 9px 12px;
  box-shadow: 0 14px 34px -12px rgba(0, 0, 0, 0.8);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 31;
}
/* Petite flèche sous la bulle */
.chip[data-tip]::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #121a2e;
  opacity: 0;
  transition: opacity 0.18s ease;
  z-index: 32;
}
.chip[data-tip]:hover::after,
.chip[data-tip]:focus::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.chip[data-tip]:hover::before,
.chip[data-tip]:focus::before {
  opacity: 1;
}

.card__cta {
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 12px 22px;
  border-radius: 999px;
  color: #07101f;
  transition: gap 0.25s ease, filter 0.25s ease, transform 0.25s ease;
}
.card__cta { background: linear-gradient(135deg, var(--c1), var(--c2)); }
.card__cta:hover { gap: 14px; filter: brightness(1.08); }
.card__cta-arrow { width: 17px; height: 17px; }

.card__cta--soon {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text-muted);
  cursor: default;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  text-align: center;
  padding: 56px 24px 64px;
}
.footer__logo {
  width: auto; height: 56px;
  object-fit: contain;
  border-radius: 10px;
  opacity: 0.9;
  margin-bottom: 18px;
}
.footer__tagline {
  font-family: var(--font-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.74rem;
  color: var(--text-soft);
}
.footer__legal {
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.6em;
  justify-content: center;
  flex-wrap: wrap;
}
.footer .dot { color: var(--text-muted); }

/* ---------- Animations & reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(6px); } }
@keyframes bobY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Mobile / portrait ---------- */
@media (max-width: 700px) {
  /* Hero à la hauteur de la vidéo (plus de grand vide en portrait) */
  .hero {
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 64px;
  }
  .hero__video {
    position: static;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
  .hero__veil { display: none; }
  .hero__scroll {
    position: static;
    transform: none;
    align-self: center;
    margin: 22px auto 26px;
    animation-name: bobY;
  }
  .card { padding: 28px 24px; }
}
