/* ============================================================
   COFONDE — Site vitrine
   Direction artistique : sombre, tech, moderne
   ============================================================ */

/* ----------  RESET  ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

img {
  max-width: 100%;
  display: block;
}

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

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ----------  TOKENS  ---------- */
:root {
  /* Couleurs de fond */
  --bg: #07070c;
  --bg-1: #0b0b13;
  --bg-2: #11111d;

  /* Surfaces */
  --surface: rgba(255, 255, 255, 0.025);
  --surface-2: rgba(255, 255, 255, 0.045);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  /* Texte */
  --text: #f5f5f9;
  --text-2: #b6b6c6;
  --text-3: #76768a;

  /* Marque Cofonde */
  --brand: #1800ad;
  --brand-2: #4a37ff;
  --brand-3: #8576ff;

  /* Marque Quieto */
  --quieto: #2fd9c9;
  --quieto-2: #79f0e3;

  /* Mesures */
  --radius: 18px;
  --radius-lg: 26px;
  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 64px);

  /* Typo */
  --font-serif: "Fraunces", "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ----------  BASE  ---------- */
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: var(--brand-2);
  color: #fff;
}

/* ----------  DECOR DE FOND  ---------- */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 80%);
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.5;
}

.glow--1 {
  width: 620px;
  height: 620px;
  top: -240px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--brand-2), transparent 70%);
}

.glow--2 {
  width: 480px;
  height: 480px;
  top: 1100px;
  left: -180px;
  background: radial-gradient(circle, #2a1d8a, transparent 70%);
  opacity: 0.35;
}

.glow--3 {
  width: 520px;
  height: 520px;
  bottom: 200px;
  right: -200px;
  background: radial-gradient(circle, var(--quieto), transparent 70%);
  opacity: 0.16;
}

/* ----------  LAYOUT  ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section {
  position: relative;
  padding-block: clamp(72px, 11vw, 140px);
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-3);
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--surface);
}

.section-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-2);
  box-shadow: 0 0 10px var(--brand-2);
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-top: 22px;
}

.section-intro {
  color: var(--text-2);
  font-size: clamp(1rem, 1.3vw, 1.12rem);
  max-width: 560px;
  margin-top: 18px;
}

.text-brand {
  color: var(--brand-3);
}

/* ----------  BOUTONS  ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 14px 26px;
  border-radius: 100px;
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    background 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  color: #fff;
  box-shadow: 0 8px 30px -8px rgba(74, 55, 255, 0.6);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px -8px rgba(74, 55, 255, 0.75);
}

.btn--ghost {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
}

.btn--ghost:hover {
  background: var(--surface-2);
  border-color: var(--brand-3);
  transform: translateY(-2px);
}

.btn--quieto {
  background: linear-gradient(135deg, var(--quieto-2), var(--quieto));
  color: #04332e;
  box-shadow: 0 8px 30px -8px rgba(47, 217, 201, 0.5);
}

.btn--quieto:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px -8px rgba(47, 217, 201, 0.7);
}

.btn .arrow {
  transition: transform 0.25s ease;
}

.btn:hover .arrow {
  transform: translateX(3px);
}

/* ----------  HEADER  ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.3s ease, border-color 0.3s ease,
    backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(7, 7, 12, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.nav__brand span {
  font-family: var(--font-serif);
  font-size: 1.42rem;
  letter-spacing: -0.01em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav__links a {
  font-size: 0.92rem;
  color: var(--text-2);
  padding: 9px 15px;
  border-radius: 100px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav__links a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav__cta {
  margin-left: 10px;
  padding: 11px 20px;
  font-size: 0.9rem;
}

/* ----------  HERO  ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* Padding haut/bas identique : le bloc de texte est pile au centre */
  padding-block: clamp(90px, 12vh, 130px);
}

.hero__chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.82rem;
  color: var(--text-2);
  padding: 8px 16px 8px 10px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--surface);
}

.hero__chip b {
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  padding: 3px 9px;
  border-radius: 100px;
}

.hero__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.7rem, 7vw, 5.6rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 30px auto 0;
  max-width: 16ch;
}

.hero__title em {
  font-style: italic;
  background: linear-gradient(120deg, var(--brand-3), var(--quieto-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__sub {
  color: var(--text-2);
  font-size: clamp(1.02rem, 1.5vw, 1.22rem);
  max-width: 60ch;
  margin: 26px auto 0;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 38px;
}

.hero__scroll {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-3);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero__scroll .mouse {
  width: 24px;
  height: 38px;
  border: 1.5px solid var(--border-strong);
  border-radius: 100px;
  position: relative;
}

.hero__scroll .mouse::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 50%;
  width: 4px;
  height: 7px;
  margin-left: -2px;
  border-radius: 100px;
  background: var(--brand-3);
  animation: scrollwheel 1.8s ease-in-out infinite;
}

@keyframes scrollwheel {
  0% { opacity: 0; transform: translateY(0); }
  35% { opacity: 1; }
  70% { opacity: 0; transform: translateY(11px); }
  100% { opacity: 0; }
}

/* ----------  STUDIO  ---------- */
/* Moins d'espace en haut : la section colle mieux au Hero */
#studio {
  padding-top: clamp(36px, 5.5vw, 64px);
}

.studio__head {
  max-width: 720px;
}

.studio__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 56px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.3s ease, border-color 0.3s ease,
    background 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.card__num {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--brand-3);
}

.card__icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(74, 55, 255, 0.22), rgba(74, 55, 255, 0.05));
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.card__icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--brand-3);
}

.card h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.4rem;
  margin-bottom: 9px;
}

.card p {
  color: var(--text-2);
  font-size: 0.96rem;
}

/* Bandeau de chiffres */
.studio__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
  padding: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), transparent);
}

.stat {
  text-align: center;
}

.stat__value {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1;
  background: linear-gradient(120deg, #fff, var(--brand-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat__label {
  color: var(--text-3);
  font-size: 0.86rem;
  margin-top: 8px;
}

/* ----------  QUIETO  ---------- */
.quieto {
  border-top: 1px solid var(--border);
}

.quieto__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 7vw, 90px);
  align-items: center;
}

.quieto .section-tag {
  color: var(--quieto-2);
}

.quieto .section-tag::before {
  background: var(--quieto);
  box-shadow: 0 0 10px var(--quieto);
}

.quieto__appicon {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
}

.quieto__appicon img {
  width: 62px;
  height: 62px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 26px -10px rgba(47, 217, 201, 0.6);
}

.quieto__appicon span {
  font-size: 0.84rem;
  color: var(--text-3);
  line-height: 1.4;
}

.quieto__appicon b {
  display: block;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
}

.quieto__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-top: 22px;
}

.quieto__title .name {
  background: linear-gradient(120deg, var(--quieto-2), var(--quieto));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.quieto__desc {
  color: var(--text-2);
  margin-top: 18px;
  font-size: 1.04rem;
}

.quieto__actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

/* --- Capture de l'application Quieto --- */
.phone-wrap {
  display: flex;
  justify-content: center;
}

/* Couche 1 : profondeur 3D + flottement vertical continu */
.quieto-float {
  perspective: 1500px;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* Couche 2 : la capture, inclinée — suit la souris (voir main.js) */
.quieto-shot {
  width: 100%;
  max-width: 460px;
  height: auto;
  transform: rotateY(-14deg) rotateX(7deg);
  transition: transform 0.18s ease-out, filter 0.4s ease;
  filter:
    drop-shadow(-28px 32px 52px rgba(0, 0, 0, 0.62))
    drop-shadow(0 0 48px rgba(47, 217, 201, 0.28));
  will-change: transform;
}

.quieto-shot:hover {
  filter:
    drop-shadow(0 42px 70px rgba(0, 0, 0, 0.72))
    drop-shadow(0 0 90px rgba(47, 217, 201, 0.6));
}

/* ----------  FONDATEUR  ---------- */
.founder {
  border-top: 1px solid var(--border);
}

.founder__inner {
  display: flex;
  justify-content: center;
}

.founder__card {
  display: flex;
  align-items: center;
  gap: 30px;
  max-width: 660px;
  padding: 30px 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface-2), transparent);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.founder__card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.founder__photo {
  flex: none;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-strong);
  box-shadow: 0 10px 30px -10px rgba(74, 55, 255, 0.5);
}

.founder__role {
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-3);
}

.founder__name {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.75rem;
  line-height: 1.1;
  margin-top: 7px;
}

.founder__bio {
  color: var(--text-2);
  font-size: 0.97rem;
  margin-top: 10px;
}

/* ----------  CONTACT  ---------- */
.contact__card {
  position: relative;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface-2), transparent);
  padding: clamp(44px, 7vw, 80px) var(--gutter);
  overflow: hidden;
}

.contact__card::before {
  content: "";
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, var(--brand-2), transparent 70%);
  opacity: 0.3;
  filter: blur(70px);
}

.contact__card > * {
  position: relative;
}

.contact__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2rem, 4.6vw, 3.3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-top: 20px;
}

.contact__sub {
  color: var(--text-2);
  max-width: 48ch;
  margin: 16px auto 0;
}

.contact__email {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-top: 34px;
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2.6vw, 1.7rem);
  padding: 16px 30px;
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  background: var(--surface);
  transition: border-color 0.25s ease, background 0.25s ease,
    transform 0.25s ease;
}

.contact__email:hover {
  border-color: var(--brand-3);
  background: var(--surface-2);
  transform: translateY(-2px);
}

.contact__email svg {
  width: 20px;
  height: 20px;
  stroke: var(--brand-3);
}

/* ----------  FOOTER  ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 54px;
}

.footer__top {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: space-between;
  align-items: flex-start;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.footer__brand b {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.4rem;
}

.footer__brand p {
  color: var(--text-3);
  font-size: 0.88rem;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}

.footer__links a {
  color: var(--text-2);
  font-size: 0.92rem;
  transition: color 0.2s ease;
}

.footer__links a:hover {
  color: var(--brand-3);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 0.85rem;
}

/* ----------  PAGE LEGALE  ---------- */
.legal {
  padding-top: 150px;
  min-height: 100vh;
}

.legal__inner {
  max-width: 760px;
}

.legal h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  letter-spacing: -0.02em;
}

.legal__lead {
  color: var(--text-2);
  margin-top: 14px;
}

.legal h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.5rem;
  margin-top: 44px;
  margin-bottom: 12px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.legal p {
  color: var(--text-2);
  margin-bottom: 10px;
}

.legal a {
  color: var(--brand-3);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal .placeholder {
  color: var(--brand-3);
  background: rgba(74, 55, 255, 0.12);
  border: 1px dashed rgba(133, 118, 255, 0.45);
  border-radius: 6px;
  padding: 1px 7px;
  font-size: 0.92em;
}

.legal__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 50px;
  color: var(--text-2);
  font-size: 0.95rem;
}

.legal__back:hover {
  color: var(--brand-3);
}

/* ----------  PAGE 404  ---------- */
.notfound {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 150px var(--gutter) 90px;
}

.notfound__code {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(6rem, 22vw, 13rem);
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, var(--brand-3), var(--quieto-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.notfound__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  letter-spacing: -0.02em;
  margin-top: 6px;
}

.notfound__text {
  color: var(--text-2);
  max-width: 46ch;
  margin: 16px auto 34px;
}

/* ----------  ANIMATIONS REVEAL  ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal[data-delay="1"] { transition-delay: 0.09s; }
.reveal[data-delay="2"] { transition-delay: 0.18s; }
.reveal[data-delay="3"] { transition-delay: 0.27s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .quieto-float,
  .hero__scroll .mouse::after { animation: none; }
}

/* ----------  RESPONSIVE  ---------- */
@media (max-width: 900px) {
  .quieto__inner {
    grid-template-columns: 1fr;
  }

  .phone-wrap {
    order: -1;
  }

  /* Sur mobile : capture droite (pas d'inclinaison 3D) */
  .quieto-shot,
  .quieto-shot:hover {
    transform: none;
  }

  .studio__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .nav__cta {
    display: none;
  }

  .nav__links a {
    padding: 8px 11px;
    font-size: 0.88rem;
  }

  .nav__brand span {
    font-size: 1.28rem;
  }

  .studio__stats {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 32px 24px;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .footer__top {
    flex-direction: column;
    gap: 26px;
  }
}

@media (max-width: 560px) {
  .founder__card {
    flex-direction: column;
    text-align: center;
    gap: 20px;
    padding: 32px 26px;
  }
}
