/* ==========================================================================
   Studio Reilbas - feuille de style unique
   Pas de framework : tout le design du site est ici.
   ========================================================================== */

/* ---------- Polices (hébergées localement, licence OFL) ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/outfit-latin.woff2") format("woff2");
}

/* ---------- Variables de design ---------- */
:root {
  --deep-violet: #0b0714;
  --surface: #171026;
  --mauve: #a855f7;
  --mauve-light: #e9d5ff;
  --white: #ffffff;

  --text-70: rgba(255, 255, 255, 0.7);
  --text-60: rgba(255, 255, 255, 0.6);
  --text-50: rgba(255, 255, 255, 0.5);
  --text-30: rgba(255, 255, 255, 0.3);
  --line: rgba(255, 255, 255, 0.05);
  --line-strong: rgba(255, 255, 255, 0.1);

  --font-display: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;

  --container: 72rem; /* 1152px */
  --gutter: 2rem;
  --radius: 1rem;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--deep-violet);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(168, 85, 247, 0.3);
}

h1,
h2,
h3,
p {
  margin: 0;
}

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

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

:focus-visible {
  outline: 2px solid var(--mauve);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--mauve);
  border-radius: 0.5rem;
  font-weight: 600;
}
.skip-link:focus {
  top: 1rem;
}

.section {
  padding: 6rem var(--gutter);
}
.section--tinted {
  background: rgba(23, 16, 38, 0.3);
}

.display {
  font-family: var(--font-display);
  font-weight: 700;
}

.muted {
  color: var(--text-50);
}

/* ---------- Navigation ---------- */
.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem var(--gutter);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.375rem;
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.wordmark b {
  font-weight: 700;
}
.wordmark span {
  font-weight: 300;
  color: var(--mauve-light);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-70);
}
.nav__links a {
  transition: color 0.15s;
}
.nav__links a:hover {
  color: var(--mauve);
}
.nav__links .nav__lang {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.nav__links .nav__cta {
  padding: 0.625rem 1.25rem;
  background: var(--mauve);
  color: var(--white);
  border-radius: 999px;
  transition: background 0.15s;
}
.nav__links .nav__cta:hover {
  color: var(--white);
  background: rgba(168, 85, 247, 0.9);
}

.flag {
  display: block;
  border-radius: 2px;
  outline: 1px solid rgba(255, 255, 255, 0.25);
  outline-offset: -1px;
}

.nav__toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 0.625rem;
  color: var(--white);
  cursor: pointer;
}
.nav__toggle span,
.nav__toggle span::before,
.nav__toggle span::after {
  display: block;
  width: 1.125rem;
  height: 2px;
  margin-inline: auto;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s;
}
.nav__toggle span {
  position: relative;
}
.nav__toggle span::before,
.nav__toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav__toggle span::before {
  top: -6px;
}
.nav__toggle span::after {
  top: 6px;
}
.nav__toggle[aria-expanded="true"] span {
  background: transparent;
}
.nav__toggle[aria-expanded="true"] span::before {
  transform: translateY(6px) rotate(45deg);
}
.nav__toggle[aria-expanded="true"] span::after {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 899px) {
  .nav__toggle {
    display: block;
  }
  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 1rem var(--gutter) 1.5rem;
    background: var(--deep-violet);
    border-bottom: 1px solid var(--line-strong);
  }
  .nav__links.is-open {
    display: flex;
  }
  .nav__links a {
    padding: 0.75rem 0;
    font-size: 1rem;
  }
  .nav__links .nav__cta {
    margin-top: 0.5rem;
    text-align: center;
  }
  .nav__links .nav__lang {
    align-self: flex-start;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
  }
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  font-weight: 700;
  transition: background 0.15s, border-color 0.15s;
}
.btn--light {
  background: var(--white);
  color: var(--deep-violet);
}
.btn--light:hover {
  background: var(--mauve-light);
}
.btn--ghost {
  background: var(--surface);
  border: 1px solid var(--line-strong);
}
.btn--ghost:hover {
  border-color: rgba(168, 85, 247, 0.5);
}

/* ---------- Hero ---------- */
.hero {
  padding: 5rem var(--gutter) 8rem;
}
.hero__grid {
  display: grid;
  gap: 4rem;
  align-items: center;
}
@media (min-width: 1024px) {
  .hero__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.25rem 0.75rem;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 999px;
  color: var(--mauve-light);
  font-size: 0.75rem;
  font-weight: 500;
}
.badge__dot {
  position: relative;
  width: 0.5rem;
  height: 0.5rem;
}
.badge__dot::before,
.badge__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--mauve);
  border-radius: 999px;
}
.badge__dot::before {
  opacity: 0.75;
  animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.hero__title {
  margin-bottom: 2rem;
  font-size: clamp(3rem, 8vw, 4.5rem);
  line-height: 1.1;
}
.gradient-text {
  background: linear-gradient(to right, var(--mauve), var(--mauve-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lead {
  max-width: 32rem;
  margin-bottom: 2.5rem;
  font-size: 1.125rem;
  line-height: 1.625;
  color: var(--text-60);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero__visual {
  position: relative;
  margin: 0;
}
.hero__glow {
  position: absolute;
  inset: 10% 5%;
  background: rgba(168, 85, 247, 0.16);
  border-radius: 999px;
  filter: blur(72px);
}
.lidar {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 6 / 5;
  touch-action: pan-y;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 60%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 60%, transparent 100%);
}
.hero__caption {
  position: relative;
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-50);
  text-align: center;
}
.hero__caption a {
  color: var(--mauve-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hero__caption .pointer-hint {
  display: none;
}
@media (hover: hover) {
  .hero__caption .pointer-hint {
    display: inline;
  }
}

/* ---------- En-têtes de section ---------- */
.section-head {
  max-width: 42rem;
  margin-bottom: 4rem;
}
.section-head--center {
  max-width: 48rem;
  margin-inline: auto;
  text-align: center;
}
.section-title {
  margin-bottom: 1rem;
  font-size: 2.25rem;
  line-height: 1.15;
}
.section-head--center .section-title {
  margin-bottom: 1.5rem;
}
.section-head--center p {
  font-size: 1.125rem;
  line-height: 1.625;
  color: var(--text-60);
}

/* ---------- Grilles & cartes ---------- */
.grid {
  display: grid;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 768px) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .grid--steps {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .grid--steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.services__note {
  margin-top: 2.5rem;
  color: var(--text-60);
}
.services__note a {
  color: var(--mauve-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.card {
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}
.card--hover:hover {
  border-color: rgba(168, 85, 247, 0.4);
}
.card--soft {
  background: rgba(23, 16, 38, 0.5);
}
.card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
}
.card p {
  font-size: 0.875rem;
  line-height: 1.625;
  color: var(--text-50);
}

/* Icônes des services (formes pures CSS, comme la version Lovable) */
.icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1.5rem;
  background: rgba(168, 85, 247, 0.1);
  border-radius: 0.5rem;
  color: var(--mauve);
  transition: transform 0.2s;
}
.card--hover:hover .icon {
  transform: scale(1.1);
}
.icon::after {
  content: "";
  border: 2px solid currentColor;
}
.icon--saas::after { width: 1.5rem; height: 1.5rem; border-radius: 2px; }
.icon--ai::after { width: 1.5rem; height: 1.5rem; border-radius: 999px; border-style: dashed; animation: spin 8s linear infinite; }
.icon--mobile::after { width: 1rem; height: 1.75rem; border-radius: 2px; }
.icon--backoffice::after { width: 1.5rem; height: 1rem; border-radius: 2px; }
.icon--desktop::after { width: 1.5rem; height: 1.5rem; border-radius: 0.5rem; }
.icon--web::after { width: 1.5rem; height: 1.5rem; border-radius: 2px; transform: rotate(12deg); }

.step__num {
  display: block;
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--mauve);
}

/* ---------- Réalisations ---------- */
.projects {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-strong);
}
.project {
  display: grid;
  gap: 0.75rem 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line-strong);
}
@media (min-width: 900px) {
  .project {
    grid-template-columns: 9rem 1fr 15rem;
    align-items: baseline;
  }
}
.project__meta {
  font-size: 0.875rem;
  color: var(--text-50);
}
.project__meta time {
  display: block;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--mauve);
}
.project h3 {
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
}
.project p {
  max-width: 38rem;
  line-height: 1.65;
  color: var(--text-60);
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tags li {
  padding: 0.25rem 0.625rem;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--mauve-light);
}
@media (min-width: 900px) {
  .project .tags {
    justify-content: flex-end;
  }
}

/* ---------- À propos ---------- */
.about {
  display: grid;
  gap: 3rem;
}
@media (min-width: 900px) {
  .about {
    grid-template-columns: 1.3fr 1fr;
    gap: 5rem;
  }
}
.about__text p {
  max-width: 38rem;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-70);
}
.about__text p + p {
  margin-top: 1rem;
}
.about h3 {
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--mauve-light);
}
.timeline {
  margin: 0 0 2.5rem;
  padding: 0;
  list-style: none;
}
.timeline li {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1rem;
  padding: 0.875rem 0;
  border-top: 1px solid var(--line-strong);
}
.timeline time {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--mauve);
}
.timeline strong {
  display: block;
  font-weight: 600;
}
.timeline span {
  font-size: 0.875rem;
  color: var(--text-50);
}

/* ---------- Contact ---------- */
.contact {
  padding: 8rem var(--gutter);
  text-align: center;
}
.contact__inner {
  max-width: 56rem;
  margin-inline: auto;
}
.contact__title {
  margin-bottom: 2rem;
  font-size: clamp(2.25rem, 5vw, 3rem);
  line-height: 1.15;
}
.contact__lead {
  max-width: 36rem;
  margin: 0 auto 3rem;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text-60);
}
.cta-gradient {
  display: inline-block;
  padding: 0.25rem;
  background: linear-gradient(to right, var(--mauve), var(--mauve-light));
  border-radius: var(--radius);
}
.cta-gradient span {
  display: inline-block;
  padding: 1.25rem 3rem;
  background: var(--deep-violet);
  border-radius: 14px;
  font-size: 1.25rem;
  font-weight: 700;
  transition: background 0.2s, color 0.2s;
}
.cta-gradient:hover span {
  background: transparent;
}
.contact__mail {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-50);
}
.contact__mail a {
  color: var(--mauve-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Pied de page ---------- */
.footer {
  padding: 3rem var(--gutter);
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-50);
}
.footer p {
  margin-bottom: 0.5rem;
}
.footer a {
  display: inline-block;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}
.footer a:hover {
  color: var(--mauve-light);
}

/* ---------- Pages secondaires (mentions légales, 404) ---------- */
.page {
  max-width: 44rem;
  margin-inline: auto;
  padding: 4rem var(--gutter) 6rem;
}
.page h1 {
  margin-bottom: 2.5rem;
  font-size: clamp(2.25rem, 5vw, 3rem);
  line-height: 1.1;
}
.page h2 {
  margin: 2.5rem 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.375rem;
  color: var(--mauve-light);
}
.page p,
.page li {
  line-height: 1.7;
  color: var(--text-70);
}
.page p + p {
  margin-top: 0.75rem;
}
.page ul {
  margin: 0;
  padding-left: 1.25rem;
}
.page a:not(.btn) {
  color: var(--mauve-light);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.page .page__updated {
  margin-top: 2.5rem;
  color: var(--text-50);
}
.todo {
  padding: 0 0.25rem;
  background: rgba(250, 204, 21, 0.15);
  border-radius: 3px;
  color: #fde68a;
}

.not-found {
  min-height: 70vh;
  display: grid;
  place-items: center;
  padding: 4rem var(--gutter);
  text-align: center;
}
.not-found__code {
  margin-bottom: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4.5rem, 14vw, 7rem);
  line-height: 1;
}
.not-found__title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.2;
}
.not-found__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  color: var(--text-60);
}
.not-found__links a {
  transition: color 0.15s;
}
.not-found__links a:hover {
  color: var(--mauve-light);
}
.not-found__actions {
  justify-content: center;
}
.not-found p {
  margin: 1rem auto 2.5rem;
  max-width: 34rem;
  line-height: 1.7;
  color: var(--text-60);
}

/* ---------- Animations ---------- */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes ping {
  75%,
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

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