/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --bg:           #0a0d14;
  --bg-card:      #111827;
  --bg-input:     #141c2e;
  --bg-header:    rgba(10, 13, 20, 0.88);

  --accent:       #6366f1;   /* indigo électrique */
  --accent-hover: #818cf8;
  --accent-warm:  #f59e0b;   /* ambre */
  --accent-glow:  rgba(99, 102, 241, 0.22);

  --text:         #f1f5f9;
  --text-muted:   #94a3b8;
  --border:       #1e293b;

  --radius:       12px;
  --ease:         0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--ease);
}
a:hover { color: var(--accent-warm); }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section { padding: 5rem 0; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-header {
  position: fixed;
  inset-block-start: 0;
  width: 100%;
  z-index: 100;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.nav-logo {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.925rem;
  font-weight: 500;
  transition: color var(--ease);
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }

/* Hamburger button — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  color: var(--text);
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 64px;
  background:
    radial-gradient(ellipse 70% 60% at 65% 35%, rgba(99,102,241,0.13) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(245,158,11,0.07) 0%, transparent 60%),
    var(--bg);
}

.hero-content { text-align: center; }

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.1s forwards;
}

.hero-name {
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, var(--text) 45%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  animation: fadeUp 0.65s ease 0.2s forwards;
}

.hero-tagline {
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 2.5rem;
  line-height: 1.65;
  opacity: 0;
  animation: fadeUp 0.65s ease 0.32s forwards;
}

.hero .btn {
  opacity: 0;
  animation: fadeUp 0.65s ease 0.44s forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background var(--ease), box-shadow var(--ease), transform var(--ease);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 24px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  box-shadow: 0 0 36px rgba(99,102,241,0.38);
  transform: translateY(-2px);
}
.btn-primary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about {
  background: linear-gradient(to bottom, var(--bg), #0d1322 50%, var(--bg));
}

.about-inner {
  display: flex;
  gap: 3.5rem;
  align-items: flex-start;
}

.about-photo { flex-shrink: 0; }

.photo-placeholder {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-warm) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  box-shadow: 0 0 48px var(--accent-glow);
  /* Replace with <img> when ready:
     width: 148px; height: 148px; border-radius: 50%; object-fit: cover; */
}

.about-text h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 1.1rem;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}
.about-text p:last-of-type { margin-bottom: 0; }

.about-text strong { color: var(--text); font-weight: 600; }
.about-text em     { color: var(--accent); font-style: normal; }

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin-top: 1.6rem;
}

.about-tags li {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ============================================================
   SERVICES
   ============================================================ */
.section-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-align: center;
  margin-bottom: 3rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease);
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(99,102,241,0.13);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  line-height: 1;
}

.card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.65rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.65;
}

/* ============================================================
   CONTACT / FORM
   ============================================================ */
.contact {
  background: linear-gradient(to bottom, var(--bg), #0d1322);
}

.contact-inner { max-width: 680px; }

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-top: -2rem;
  margin-bottom: 2.75rem;
}

/* Success & global error — visibility managed by Formspree SDK */
.form-success {
  display: none;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  color: #34d399;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.form-error-global {
  display: none;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  color: #f87171;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}
.form-error-global:not(:empty) { display: block; }

/* Form layout */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Labels */
label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
}

.required { color: var(--accent-warm); }

/* Inputs, selects, textareas */
input,
select,
textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  transition: border-color var(--ease), box-shadow var(--ease);
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
}

/* Custom select arrow */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2394a3b8' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* Select option colors (limited browser support, best-effort) */
select option { background: var(--bg-card); color: var(--text); }

input::placeholder,
textarea::placeholder { color: #364b6b; }

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

textarea { resize: vertical; min-height: 130px; }

/* Field-level errors — content injected by Formspree SDK */
.field-error {
  font-size: 0.8rem;
  color: #f87171;
  min-height: 1em;
}

/* Submit button */
.btn-submit {
  width: 100%;
  padding: 0.9rem;
  font-size: 1rem;
  margin-top: 0.25rem;
}


/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 0;
  text-align: center;
}

.site-footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ============================================================
   RESPONSIVE — mobile-first breakpoints
   ============================================================ */

/* --- Tablet & below (≤ 768px) --- */
@media (max-width: 768px) {
  .section { padding: 3.5rem 0; }

  /* Nav: show hamburger, hide links by default */
  .nav-toggle { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 1.5rem;
    gap: 1.1rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1rem; }

  /* About: stack vertically */
  .about-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .about-tags { justify-content: center; }

  /* Form: single column */
  .form-row { grid-template-columns: 1fr; }

  /* Section titles */
  .section-title { font-size: 1.65rem; }
}

/* --- Small mobile (≤ 400px) --- */
@media (max-width: 400px) {
  .hero-tagline { font-size: 1rem; }
  .photo-placeholder { width: 120px; height: 120px; font-size: 1.5rem; }
}

/* ============================================================
   ACCESSIBILITY — reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
