:root {
    --accent: #0071E3;
    --radius-xl: 32px;
    --radius-md: 14px;
    --radius-sm: 8px;
  }

  html[data-theme="light"] {
    --bg: #FFFFFF;
    --surface: #F5F5F7;
    --text: #1D1D1F;
    --muted: #6E6E73;
    --border: #D2D2D7;
    --accent-soft: #E5F1FE;
  }

  html[data-theme="dark"] {
    --bg: #000000;
    --surface: #1D1D1F;
    --text: #F5F5F7;
    --muted: #98989D;
    --border: #38383C;
    --accent-soft: #062A4D;
  }

  * { box-sizing: border-box; }

  body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    transition: background 0.3s ease, color 0.3s ease;
  }

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

  .wrap { max-width: 1180px; margin: 0 auto; padding: 0 32px; }

  /* ---------- Header ---------- */
  header {
    position: sticky;
    top: 0;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    z-index: 10;
  }

  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
  }

  .logo { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }

  nav { display: flex; align-items: center; gap: 36px; }

  nav a { font-size: 14px; color: var(--muted); }
  nav a:hover { color: var(--text); }

  .header-right { display: flex; align-items: center; gap: 26px; }

  .lang-switch { display: flex; gap: 4px; font-size: 12px; color: var(--muted); }
  .lang-switch button {
    background: none; border: none; color: inherit; font: inherit;
    cursor: pointer; padding: 3px 6px; border-radius: var(--radius-sm);
  }
  .lang-switch button.active { color: var(--text); background: var(--surface); }

  .theme-toggle {
    width: 32px; height: 32px; border-radius: 50%;
    border: 1px solid var(--border); background: transparent;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
  }
  .theme-toggle svg { width: 15px; height: 15px; }

  /* ---------- Hero ---------- */
  .hero {
    text-align: center;
    padding: 120px 0 96px;
  }

  .hero h1 {
    font-size: clamp(40px, 6vw, 76px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin: 0 auto 20px;
    max-width: 15ch;
  }

  .hero p.intro {
    font-size: 19px;
    color: var(--muted);
    max-width: 46ch;
    margin: 0 auto 36px;
  }

  .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

  .btn {
    padding: 13px 26px;
    border-radius: 980px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
  }

  .btn-primary { background: var(--accent); color: #fff; border: none; }
  .btn-primary:hover { filter: brightness(1.15); }

  .btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
  .btn-secondary:hover { border-color: var(--muted); }

  /* ---------- Feature blocks ---------- */
  .feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: center;
    padding: 96px 0;
    border-top: 1px solid var(--border);
  }

  .feature.reverse .visual { order: 2; }
  .feature.reverse .content { order: 1; }

  .feature .visual {
    aspect-ratio: 4/3;
    background: var(--surface);
    border-radius: var(--radius-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--muted);
    overflow: hidden;
  }

  .feature .visual img { width: 100%; height: 100%; object-fit: cover; display: block; }

  .visual-badge {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: var(--accent-soft, var(--surface));
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .visual-badge svg { width: 34px; height: 34px; color: var(--accent); }


  .feature .content .eyebrow { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
  .feature h2 { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 16px; }
  .feature p { font-size: 16px; color: var(--muted); margin: 0 0 22px; max-width: 40ch; }
  .feature .link { font-size: 15px; font-weight: 600; color: var(--accent); border-bottom: 1px solid transparent; }
  .feature a:hover .link { border-bottom-color: var(--accent); }

  /* ---------- Testimonial ---------- */
  .testimonial {
    text-align: center;
    padding: 110px 0;
    border-top: 1px solid var(--border);
  }

  blockquote {
    font-size: 28px;
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.35;
    max-width: 700px;
    margin: 0 auto 26px;
  }

  .cite { color: var(--muted); font-size: 15px; }
  .cite strong { color: var(--text); font-weight: 600; }

  .dots { display: flex; justify-content: center; gap: 8px; margin-top: 30px; }
  .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border); cursor: pointer; border: none; padding: 0; }
  .dot.active { background: var(--accent); }

  /* ---------- Footer ---------- */
  footer {
    border-top: 1px solid var(--border);
    padding: 32px 0 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 13px;
  }

  .socials { display: flex; gap: 14px; }
  .socials a { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; }
  .socials a:hover { border-color: var(--accent); }
  .socials svg { width: 14px; height: 14px; }

  @media (max-width: 780px) {
    nav { display: none; }
    .feature, .feature.reverse { grid-template-columns: 1fr; gap: 32px; padding: 64px 0; }
    .feature.reverse .visual, .feature.reverse .content { order: unset; }
    footer { flex-direction: column; gap: 16px; text-align: center; }
    .hero { padding-top: 80px; }
  }

/* ---------- Page header (sous-titre de page) ---------- */
.page-header {
  padding: 64px 0 32px;
  text-align: center;
}

.page-header h1 {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}

.page-header p {
  color: var(--muted);
  font-size: 17px;
  max-width: 48ch;
  margin: 0 auto;
}

nav a.active { color: var(--text); }

/* ---------- About page ---------- */
.about-hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 64px;
  align-items: center;
  padding: 40px 0 96px;
}

.about-photo {
  aspect-ratio: 1;
  background: var(--surface);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.about-photo svg { width: 40px; height: 40px; opacity: 0.5; }

.about-text h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 16px; }
.about-text p { color: var(--muted); font-size: 16px; margin: 0 0 16px; max-width: 56ch; }

.skills-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.skill-pill {
  padding: 8px 16px;
  border-radius: 980px;
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--muted);
}

@media (max-width: 780px) {
  .about-hero { grid-template-columns: 1fr; gap: 32px; }
  .about-photo { max-width: 220px; margin: 0 auto; }
}

/* ---------- Gallery page ---------- */
.filter-bar {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 8px 0 56px;
}

.filter-btn {
  padding: 9px 20px;
  border-radius: 980px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.filter-btn.active { background: var(--text); color: var(--bg); border-color: var(--text); }

.gallery-grid {
  columns: 3;
  column-gap: 24px;
  padding-bottom: 96px;
}

.gallery-card {
  display: block;
  width: 100%;
  break-inside: avoid;
  margin-bottom: 24px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  cursor: pointer;
}

.gallery-card .thumb {
  display: block;
  color: var(--muted);
}

.gallery-card .thumb img { width: 100%; height: auto; }

.gallery-card .thumb svg { width: 26px; height: 26px; opacity: 0.5; }

.gallery-card .info { padding: 16px 18px 20px; }
.gallery-card .info .tag { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.gallery-card .info .title { font-size: 15px; font-weight: 600; }

.gallery-card.hidden { display: none; }

@media (max-width: 900px) {
  .gallery-grid { columns: 2; }
}
@media (max-width: 560px) {
  .gallery-grid { columns: 1; }
}

/* ---------- Contact page ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 64px;
  padding: 24px 0 96px;
}

.form-group { margin-bottom: 22px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-row .form-group { margin-bottom: 22px; }

@media (max-width: 500px) {
  .form-row { grid-template-columns: 1fr; gap: 0; }
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
}

.form-group textarea { resize: vertical; min-height: 120px; }

.form-status { font-size: 14px; margin-top: 14px; display: none; }
.form-status.success { color: #1E7A3E; display: block; }
.form-status.error { color: #C0392B; display: block; }

.contact-side { background: var(--surface); border-radius: var(--radius-xl); padding: 36px; height: fit-content; }
.contact-side h3 { font-size: 18px; margin: 0 0 12px; }
.contact-side p { color: var(--muted); font-size: 15px; margin: 0 0 24px; }
.contact-side .socials { justify-content: flex-start; }

@media (max-width: 900px) {
  .contact-layout { grid-template-columns: 1fr; }
}

/* ---------- Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view { opacity: 1; transform: translateY(0); }

.btn { transition: transform 0.15s ease, filter 0.15s ease; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.feature .content .link { transition: border-color 0.2s ease; }

.gallery-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}
.gallery-card:hover { transform: translateY(-5px); box-shadow: 0 14px 28px rgba(0,0,0,0.09); }

html[data-theme="dark"] .gallery-card:hover { box-shadow: 0 14px 28px rgba(0,0,0,0.35); }

.gallery-card.fade-out { opacity: 0; transform: scale(0.96); }

.theme-toggle svg { transition: transform 0.4s ease; }
.theme-toggle.spin svg { transform: rotate(180deg); }

.skill-pill { transition: border-color 0.2s ease, color 0.2s ease; }
.skill-pill:hover { border-color: var(--accent); color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  .reveal, .btn, .gallery-card, .theme-toggle svg, .skill-pill {
    transition: none !important;
    animation: none !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- About page: additional sections ---------- */
.section-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  padding: 16px 0 40px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-bottom: 88px;
}

.service-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 28px;
}

.service-card svg { width: 24px; height: 24px; color: var(--accent); margin-bottom: 18px; }
.service-card h3 { font-size: 16px; margin: 0 0 8px; }
.service-card p { font-size: 14px; color: var(--muted); margin: 0; }

.process-list {
  display: flex;
  flex-direction: column;
  max-width: 640px;
  margin: 0 auto;
  padding-bottom: 88px;
}

.process-step {
  display: flex;
  gap: 24px;
  padding: 26px 0;
  border-top: 1px solid var(--border);
}

.process-step:last-child { border-bottom: 1px solid var(--border); }

.process-num { font-size: 14px; color: var(--muted); width: 26px; flex-shrink: 0; padding-top: 3px; }
.process-step h3 { font-size: 18px; margin: 0 0 6px; }
.process-step p { font-size: 15px; color: var(--muted); margin: 0; }

.cta-block {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 64px 40px;
  text-align: center;
  margin-bottom: 96px;
}

.cta-block h2 { font-size: 28px; margin: 0 0 12px; }
.cta-block p { color: var(--muted); margin: 0 auto 28px; max-width: 44ch; }

@media (max-width: 900px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .service-grid { grid-template-columns: 1fr; }
}

/* ---------- Vraies images (profil, galerie) ---------- */
.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-photo, .gallery-card .thumb {
  overflow: hidden;
}

/* ---------- Effet 3D léger sur les vignettes ---------- */
.gallery-card .thumb { perspective: 700px; cursor: pointer; }
.gallery-card .thumb img { transition: transform 0.2s ease; will-change: transform; }
.gallery-card.web-card .thumb { cursor: pointer; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  z-index: 100;
  padding: 32px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.lightbox.open { display: flex; opacity: 1; }

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }

.lightbox-stage {
  perspective: 1800px;
  max-width: 90vw;
  max-height: 78vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Photo simple : entrée en douceur avec un léger effet de bascule 3D */
.lightbox-simple img {
  max-width: 90vw;
  max-height: 78vh;
  border-radius: var(--radius-md);
  display: block;
  transform: rotateX(8deg) scale(0.94);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(.2,.8,.2,1), opacity 0.45s ease;
}
.lightbox.open .lightbox-simple img { transform: rotateX(0) scale(1); opacity: 1; }

/* Affiche : carte qui se retourne en 3D */
.flip-card {
  width: min(78vw, 420px);
  aspect-ratio: 438 / 614;
  perspective: 1800px;
  cursor: pointer;
}

.flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(.2,.8,.2,1);
  transform-style: preserve-3d;
  transform: rotateX(8deg) scale(0.94);
  opacity: 0;
}
.lightbox.open .flip-inner { opacity: 1; transform: rotateX(0) scale(1); }
.flip-inner.flipped { transform: rotateY(180deg) !important; }

.flip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.flip-back { transform: rotateY(180deg); }
.flip-face img { width: 100%; height: 100%; object-fit: cover; display: block; }

.lightbox-caption { color: rgba(255,255,255,0.85); font-size: 14px; text-align: center; }
.flip-hint {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: none;
  border-radius: 980px;
  padding: 9px 20px;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}
.flip-hint:hover { background: rgba(255,255,255,0.2); }

@media (prefers-reduced-motion: reduce) {
  .flip-inner, .lightbox-simple img { transition: none !important; }
}

/* ---------- Mini navigateur (aperçu du site web) ---------- */
.browser-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 32px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.browser-modal.open { display: flex; opacity: 1; }

.browser-window {
  width: min(92vw, 1000px);
  height: min(84vh, 720px);
  background: var(--bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
  transform: scale(0.94) translateY(10px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), opacity 0.35s ease;
}

.browser-modal.open .browser-window { transform: scale(1) translateY(0); opacity: 1; }

.browser-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.browser-dots { display: flex; gap: 7px; }
.browser-dots span { width: 11px; height: 11px; border-radius: 50%; display: block; }
.browser-dots span:nth-child(1) { background: #FF5F57; }
.browser-dots span:nth-child(2) { background: #FEBC2E; }
.browser-dots span:nth-child(3) { background: #28C840; }

.browser-address {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 980px;
  padding: 7px 16px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.browser-open, .browser-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  flex-shrink: 0;
}
.browser-open:hover, .browser-close:hover { border-color: var(--accent); }

.browser-window iframe {
  flex: 1;
  width: 100%;
  border: none;
  background: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .browser-window { transition: none !important; }
}

@media (max-width: 600px) {
  .browser-window { width: 100%; height: 100%; border-radius: var(--radius-md); }
}

/* ---------- Outils / logiciels maîtrisés ---------- */
.tools-section { padding-bottom: 16px; }

.tools-group { margin-bottom: 44px; }
.tools-group h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 22px;
}

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

.tool-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 78px;
  text-align: center;
}

.tool-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.02em;
}

.tool-badge span { font-size: 12px; color: var(--muted); line-height: 1.3; }

/* ---------- Champ anti-bot (honeypot), invisible pour un humain ---------- */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Écran de chargement ---------- */
.preloader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader-mark {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -0.02em;
  color: var(--text);
  animation: preloaderPulse 1.1s ease-in-out infinite;
}

@keyframes preloaderPulse {
  0%, 100% { opacity: 0.18; }
  50% { opacity: 1; }
}

.preloader.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .preloader-mark { animation: none; opacity: 0.6; }
}

/* ---------- Page 404 ---------- */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
}

.error-code {
  font-size: clamp(90px, 16vw, 160px);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--accent);
  line-height: 1;
  margin: 0;
}

.error-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 20px 0 12px;
}

.error-text {
  color: var(--muted);
  font-size: 16px;
  max-width: 42ch;
  margin: 0 0 32px;
}

.error-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
