/* =============================================
   STUDIO NCLS — style.css
   Theme: Dark Blue Modern
   Font: Inter (Google Fonts)
============================================= */

/* ===== VARIABLES ===== */
:root {
  /* Colors */
  --bg:           #07070f;
  --bg-surface:   #0c0c1a;
  --bg-card:      #0f0f1e;
  --bg-card-h:    #141428;
  --accent:       #3b82f6;
  --accent-light: #60a5fa;
  --accent-dark:  #2563eb;
  --green:        #10b981;
  --gradient:     linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
  --gradient-rev: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
  --text:         #f1f5f9;
  --text-sec:     #94a3b8;
  --text-muted:   #475569;
  --border:       rgba(59, 130, 246, 0.12);
  --border-h:     rgba(59, 130, 246, 0.35);
  --glow:         rgba(59, 130, 246, 0.18);
  --glow-strong:  rgba(59, 130, 246, 0.35);

  /* Spacing & Sizing */
  --container:    1200px;
  --header-h:     88px;
  --radius:       16px;
  --radius-sm:    10px;
  --radius-xs:    6px;
  --radius-full:  9999px;

  /* Shadows */
  --shadow:       0 8px 32px rgba(0,0,0,0.45);
  --shadow-blue:  0 8px 40px rgba(59, 130, 246, 0.22);
  --shadow-card:  0 4px 24px rgba(0,0,0,0.35);

  /* Transitions */
  --ease:         cubic-bezier(0.4, 0, 0.2, 1);
  --transition:   0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Font */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ===== LIGHT MODE VARIABLES ===== */
[data-theme="light"] {
  --bg:           #f5f7fa;
  --bg-surface:   #edf0f5;
  --bg-card:      #ffffff;
  --bg-card-h:    #f8fafc;
  --text:         #0f172a;
  --text-sec:     #334155;
  --text-muted:   #64748b;
  --border:       rgba(59, 130, 246, 0.15);
  --border-h:     rgba(59, 130, 246, 0.4);
  --glow:         rgba(59, 130, 246, 0.08);
  --glow-strong:  rgba(59, 130, 246, 0.2);
  --shadow:       0 8px 32px rgba(15, 23, 42, 0.1);
  --shadow-blue:  0 8px 40px rgba(59, 130, 246, 0.14);
  --shadow-card:  0 4px 24px rgba(15, 23, 42, 0.06);
}

/* Transition douce sur tous les éléments lors du changement de thème */
.theme-transitioning *,
.theme-transitioning *::before,
.theme-transitioning *::after {
  transition:
    background-color 0.35s ease,
    border-color 0.35s ease,
    color 0.35s ease,
    box-shadow 0.35s ease !important;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea { font-family: inherit; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 { line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); }
h2 { font-size: clamp(2rem, 3.5vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
h4 { font-size: 1rem; font-weight: 600; }
p  { color: var(--text-sec); }

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== LAYOUT ===== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}

.section {
  padding: clamp(5rem, 10vw, 8rem) 0;
}
.section--alt {
  background: var(--bg-surface);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-light);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}
.section-title {
  margin-bottom: 1rem;
}
.section-desc {
  font-size: 1.05rem;
  line-height: 1.7;
}
.section-cta {
  text-align: center;
  margin-top: 3.5rem;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 45px;
  padding: 0 1.4rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
  cursor: pointer;
  border: none;
  font-family: var(--font);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
/* Shimmer sweep — tous les boutons */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    105deg,
    transparent 25%,
    rgba(255, 255, 255, 0.16) 50%,
    transparent 75%
  );
  transform: translateX(-150%);
  pointer-events: none;
  z-index: 2;
}
.btn:hover::after {
  animation: btn-shimmer 0.55s ease-out forwards;
}
.btn--primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 20px rgba(59,130,246,0.3);
}
.btn--primary:hover {
  animation: btn-glitch 2.8s ease infinite;
}
.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border-h);
}
.btn--outline:hover {
  color: var(--accent-light);
  background: rgba(59,130,246,0.06);
  animation: btn-border-pulse 1.6s ease infinite;
}
.btn--ghost {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border: 1.5px solid rgba(255,255,255,0.1);
}
.btn--ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
}
.btn--linkedin {
  background: #0077b5;
  color: #fff;
}
.btn--linkedin:hover {
  background: #006097;
  transform: translateY(-2px);
}
.btn--lg {
  height: 45px;
  padding: 0 1.8rem;
  font-size: 0.95rem;
}
.btn--full {
  width: 100%;
  justify-content: center;
}

/* ===== LOGO ===== */
.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  text-decoration: none;
}
.logo__studio {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-sec);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.logo__name {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 14px 0;
  background: transparent;
  pointer-events: none; /* clics passent à travers la zone vide autour du nav */
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  gap: 1.5rem;
  padding: 0 1.25rem 0 1.75rem;
  background: rgba(7, 7, 15, 0.78);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
  pointer-events: all; /* restaurer l'interactivité sur le nav flottant */
}
.header.scrolled .nav {
  background: rgba(7, 7, 15, 0.94);
  border-color: rgba(59, 130, 246, 0.22);
  box-shadow: 0 8px 28px rgba(0,0,0,0.4), 0 0 0 1px rgba(59,130,246,0.07);
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav__link {
  position: relative;
  padding: 0.45rem 0.8rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-sec);
  border-radius: var(--radius-xs);
  transition: var(--transition);
}
.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: calc(100% - 1.6rem);
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
  transition: transform 0.3s var(--ease);
}
.nav__link:hover,
.nav__link.active {
  color: var(--text);
}
.nav__link:hover::after,
.nav__link.active::after {
  transform: translateX(-50%) scaleX(1);
}
.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.nav__actions .btn {
  height: 45px; /* force explicite — évite le stretch dans le flex nav */
}
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* Mobile overlay */
.nav__overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 1001;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: all;
}
.nav__overlay.active {
  opacity: 1;
}

/* Mobile drawer */
.nav__drawer {
  position: fixed;
  top: 0; right: 0;
  width: min(340px, 88vw);
  height: 100vh;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  z-index: 1002;
  padding: 2rem;
  pointer-events: all;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  transform: translateX(110%);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nav__drawer.active {
  transform: translateX(0);
}
.nav__drawer-close {
  align-self: flex-end;
  padding: 0.5rem;
  color: var(--text-sec);
  transition: color var(--transition);
}
.nav__drawer-close:hover { color: var(--text); }
.nav__drawer-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}
.nav__drawer-links a {
  display: block;
  padding: 0.8rem 1rem;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-sec);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.nav__drawer-links a:hover {
  color: var(--text);
  background: rgba(59,130,246,0.08);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 4rem) 0 5rem;
  overflow: hidden;
}
.hero__grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}
.hero__glow {
  position: absolute;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(59,130,246,0.1) 0%, transparent 65%);
  pointer-events: none;
}
.hero__content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent-light);
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  margin-bottom: 2rem;
}
.hero__badge-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(34,197,94,0.4);
  animation: pulse-green 2s ease infinite;
}
@keyframes pulse-green {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
  70%  { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
.hero__title {
  margin-bottom: 1.5rem;
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
}
.hero__subtitle {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.7;
  max-width: 600px;
  margin-bottom: 2.5rem;
}
.hero__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 4rem;
}
.hero__stats {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}
.hero__stat-number {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero__stat-label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}
.hero__stat-sep {
  width: 1px;
  height: 40px;
  background: var(--border);
}
.hero__scroll {
  position: absolute;
  bottom: 2.5rem;
  left: clamp(1rem, 4vw, 2.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  z-index: 1;
}
.hero__scroll span {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  writing-mode: vertical-rl;
}
.hero__scroll-line {
  width: 1.5px;
  height: 60px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scroll-line 2s ease-in-out infinite;
}
@keyframes scroll-line {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ===== SERVICES ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity var(--transition);
}
.service-card:hover {
  border-color: var(--border-h);
  background: var(--bg-card-h);
  transform: translateY(-4px);
  box-shadow: var(--shadow-blue);
}
.service-card:hover::before {
  opacity: 1;
}
.service-card--featured {
  background: linear-gradient(160deg, rgba(59,130,246,0.08) 0%, var(--bg-card) 60%);
  border-color: rgba(59,130,246,0.25);
}
.service-card--featured::before {
  opacity: 1;
}
.service-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.service-card__icon {
  width: 52px;
  height: 52px;
  background: rgba(59,130,246,0.12);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-light);
}
.service-card__num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.service-card__title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}
.service-card__desc {
  font-size: 0.92rem;
  line-height: 1.65;
}
.service-card__list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}
.service-card__list li {
  font-size: 0.88rem;
  color: var(--text-sec);
  padding-left: 1.1rem;
  position: relative;
}
.service-card__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
}
.service-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-light);
  transition: gap var(--transition), color var(--transition);
  margin-top: auto;
}
.service-card__link:hover {
  gap: 0.7rem;
  color: var(--accent);
}

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.about__content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.about__content .section-label { text-align: left; }
.about__content .section-title { text-align: left; }
.about__text {
  font-size: 1rem;
  line-height: 1.75;
}
.about__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tag {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-sec);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  transition: var(--transition);
}
.tag:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 1.5rem;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 0;
  bottom: 0;
  width: 1.5px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}
.timeline__item {
  position: relative;
  padding-bottom: 2.5rem;
}
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot {
  position: absolute;
  left: -1.5rem;
  top: 6px;
  width: 11px;
  height: 11px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
  transform: translateX(-50%);
}
.timeline__content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  transition: border-color var(--transition);
}
.timeline__content:hover { border-color: var(--border-h); }
.timeline__date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-light);
  letter-spacing: 0.05em;
}
.timeline__role {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0.3rem 0 0.15rem;
}
.timeline__place {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}
.timeline__desc {
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ===== SKILLS ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition);
}
.skill-category:hover {
  border-color: var(--border-h);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}
.skill-category__icon {
  width: 44px;
  height: 44px;
  background: rgba(59,130,246,0.12);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-light);
  margin-bottom: 1.25rem;
}
.skill-category__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.25rem;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.skill-tag {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-sec);
  background: rgba(59,130,246,0.07);
  border: 1px solid rgba(59,130,246,0.15);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  transition: var(--transition);
}
.skill-tag:hover {
  background: rgba(59,130,246,0.14);
  border-color: rgba(59,130,246,0.3);
  color: var(--accent-light);
}

/* ===== PORTFOLIO ===== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.portfolio-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}
.portfolio-card:hover {
  border-color: var(--border-h);
  transform: translateY(-5px);
  box-shadow: var(--shadow-blue);
}
.portfolio-card__img {
  position: relative;
  height: 200px;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}
.portfolio-card__img--1 { background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%); }
.portfolio-card__img--2 { background: linear-gradient(135deg, #1a0f2e 0%, #3b1f6e 100%); }
.portfolio-card__img--3 { background: linear-gradient(135deg, #0f2333 0%, #0e4d6e 100%); }
.portfolio-card__img--4 { background: linear-gradient(135deg, #0d1f0d 0%, #1a3d1a 100%); }
.portfolio-card__img--5 { background: linear-gradient(135deg, #1a1208 0%, #3d2f0d 100%); }
.portfolio-card__img--6 { background: linear-gradient(135deg, #200d0d 0%, #4a1515 100%); }

/* Decorative inner pattern for cards */
.portfolio-card__img::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 24px 24px;
}
.portfolio-card__category {
  position: relative;
  z-index: 1;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-light);
  background: rgba(59,130,246,0.15);
  border: 1px solid rgba(59,130,246,0.3);
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
}
.portfolio-card__body {
  padding: 1.25rem 1.5rem 1.5rem;
}
.portfolio-card__meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}
.portfolio-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.3;
}
.portfolio-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-light);
  transition: gap var(--transition), color var(--transition);
}
.portfolio-card__link:hover {
  gap: 0.7rem;
  color: var(--accent);
}

/* ===== STACK ===== */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.stack-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition);
}
.stack-category:hover {
  border-color: var(--border-h);
}
.stack-category__title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-light);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.stack-tag {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-sec);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  padding: 0.28rem 0.6rem;
  border-radius: var(--radius-xs);
  transition: var(--transition);
}
.stack-tag:hover {
  background: rgba(59,130,246,0.1);
  border-color: rgba(59,130,246,0.2);
  color: var(--accent-light);
}

/* ===== TESTIMONIALS ===== */
.testimonials-swiper {
  padding-bottom: 3.5rem !important;
}
.testimonials-swiper .swiper-wrapper {
  align-items: stretch;
}
.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  height: 100%;
  transition: border-color var(--transition);
}
.testimonial-card:hover { border-color: var(--border-h); }
.testimonial-card__quote { color: rgba(59,130,246,0.3); }
.testimonial-card__text {
  font-size: 0.95rem;
  line-height: 1.72;
  color: var(--text-sec);
  flex: 1;
  font-style: italic;
}
.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.testimonial-card__avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.testimonial-card__name {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}
.testimonial-card__role {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}
/* Swiper pagination */
.testimonials-pagination {
  bottom: 0 !important;
}
.testimonials-pagination .swiper-pagination-bullet {
  background: var(--text-muted);
  opacity: 1;
  width: 6px;
  height: 6px;
  transition: var(--transition);
}
.testimonials-pagination .swiper-pagination-bullet-active {
  background: var(--accent);
  width: 22px;
  border-radius: 3px;
}

/* ===== FAQ ===== */
.faq-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 5rem;
  align-items: start;
}
.faq__header {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
}
.faq__header .section-title,
.faq__header .section-label { text-align: left; }
.faq__header .section-desc { text-align: left; }
.faq__list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-item__question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1.35rem 0;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  transition: color var(--transition);
}
.faq-item__question:hover { color: var(--accent-light); }
.faq-item__icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: var(--transition);
}
.faq-item__question[aria-expanded="true"] .faq-item__icon {
  border-color: var(--accent);
  color: var(--accent-light);
  background: rgba(59,130,246,0.1);
  transform: rotate(90deg);
}
.faq-item__answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s var(--ease), padding 0.3s;
}
.faq-item__answer p {
  font-size: 0.93rem;
  line-height: 1.72;
  padding-bottom: 1.5rem;
}
.faq-item__answer.open {
  max-height: 300px;
}

/* ===== CONTACT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: start;
}
.contact__form-wrap .section-label,
.contact__form-wrap .section-title { text-align: left; }
.contact__form-wrap .section-desc { text-align: left; }

/* Form */
.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.5rem;
}
.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-sec);
  letter-spacing: 0.03em;
}
.form-input,
.form-textarea {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.8rem 1rem;
  font-size: 0.92rem;
  width: 100%;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-muted); }
.form-input:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}
.form-textarea { resize: vertical; min-height: 130px; }

/* Contact info card */
.contact-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.contact-info-card__status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #22c55e;
}
.status-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse-green 2s ease infinite;
}
.contact-info-card__title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
}
.contact-info-card__text {
  font-size: 0.9rem;
  line-height: 1.65;
}
.contact-info-card__items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.contact-info-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.contact-info-item__icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-xs);
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-light);
  flex-shrink: 0;
}
.contact-info-item__label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.contact-info-item__value {
  display: block;
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
  margin-top: 0.1rem;
  transition: color var(--transition);
}
a.contact-info-item__value:hover { color: var(--accent-light); }

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
}
.footer__top {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.footer__tagline {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.footer__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-sec);
  transition: var(--transition);
}
.footer__social:hover {
  background: rgba(59,130,246,0.1);
  border-color: var(--accent);
  color: var(--accent-light);
  transform: translateY(-2px);
}
.footer__nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.footer__col-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-sec);
  margin-bottom: 1.1rem;
}
.footer__col ul {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.footer__col a {
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer__col a:hover { color: var(--accent-light); }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer__bottom p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  position: relative;
  width: 45px;
  height: 45px;
  border-radius: 8px;
  border: 1.5px solid var(--border-h);
  background: transparent;
  color: var(--text-sec);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: rgba(59, 130, 246, 0.07);
}
.theme-toggle__icon {
  position: absolute;
  transition: opacity 0.3s ease, transform 0.4s ease;
}
/* Dark mode : soleil visible, lune cachée */
.theme-toggle__sun  { opacity: 1; transform: rotate(0deg) scale(1); }
.theme-toggle__moon { opacity: 0; transform: rotate(90deg) scale(0.6); }
/* Light mode : lune visible, soleil caché */
[data-theme="light"] .theme-toggle__sun  { opacity: 0; transform: rotate(-90deg) scale(0.6); }
[data-theme="light"] .theme-toggle__moon { opacity: 1; transform: rotate(0deg) scale(1); }

/* ===== LIGHT MODE — overrides spécifiques ===== */

/* Nav flottant */
[data-theme="light"] .nav {
  background: rgba(245, 247, 250, 0.88);
}
[data-theme="light"] .header.scrolled .nav {
  background: rgba(245, 247, 250, 0.97);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.1), 0 0 0 1px rgba(59,130,246,0.1);
}

/* Hero — grid visible sur fond clair */
[data-theme="light"] .hero__grid-bg {
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
}
[data-theme="light"] .hero__glow {
  background: radial-gradient(circle, rgba(59,130,246,0.07) 0%, transparent 65%);
}
[data-theme="light"] .hero__scroll-line {
  background: linear-gradient(to bottom, var(--accent-dark), transparent);
}

/* Section labels plus contrastés sur fond clair */
[data-theme="light"] .section-label {
  color: var(--accent-dark);
  background: rgba(59, 130, 246, 0.07);
  border-color: rgba(59, 130, 246, 0.2);
}

/* Bouton ghost adapté */
[data-theme="light"] .btn--ghost {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.14);
  color: var(--text);
}
[data-theme="light"] .btn--ghost:hover {
  background: rgba(15, 23, 42, 0.07);
  border-color: rgba(15, 23, 42, 0.22);
}

/* Service cards */
[data-theme="light"] .service-card {
  box-shadow: var(--shadow-card);
}
[data-theme="light"] .service-card:hover {
  box-shadow: var(--shadow-blue);
}

/* Skill tags */
[data-theme="light"] .skill-tag {
  background: rgba(59, 130, 246, 0.06);
  border-color: rgba(59, 130, 246, 0.15);
}
[data-theme="light"] .skill-tag:hover {
  background: rgba(59, 130, 246, 0.12);
}

/* Stack tags */
[data-theme="light"] .stack-tag {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.1);
  color: var(--text-sec);
}
[data-theme="light"] .stack-tag:hover {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.2);
}

/* Portfolio card gradients — pastel sur fond clair */
[data-theme="light"] .portfolio-card__img--1 { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
[data-theme="light"] .portfolio-card__img--2 { background: linear-gradient(135deg, #ede9fe, #c4b5fd); }
[data-theme="light"] .portfolio-card__img--3 { background: linear-gradient(135deg, #cffafe, #a5f3fc); }
[data-theme="light"] .portfolio-card__img--4 { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
[data-theme="light"] .portfolio-card__img--5 { background: linear-gradient(135deg, #fef3c7, #fde68a); }
[data-theme="light"] .portfolio-card__img--6 { background: linear-gradient(135deg, #fee2e2, #fecaca); }
[data-theme="light"] .portfolio-card__img::before {
  background-image:
    linear-gradient(rgba(15,23,42,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,0.04) 1px, transparent 1px);
}

/* Formulaire */
[data-theme="light"] .form-input,
[data-theme="light"] .form-textarea {
  background: #ffffff;
  border-color: #e2e8f0;
}
[data-theme="light"] .form-input:focus,
[data-theme="light"] .form-textarea:focus {
  border-color: var(--accent);
}

/* FAQ icon */
[data-theme="light"] .faq-item__icon {
  border-color: rgba(15, 23, 42, 0.15);
  color: var(--text-muted);
}

/* Footer */
[data-theme="light"] .footer {
  background: #edf0f5;
}

/* ===== BUTTON KEYFRAMES ===== */

/* Shimmer : sweep lumineux gauche → droite */
@keyframes btn-shimmer {
  from { transform: translateX(-150%); }
  to   { transform: translateX(200%); }
}

/* Glitch : repos 80% du temps, puis corruption RGB rapide */
@keyframes btn-glitch {
  0%,  78%, 100% {
    transform: translate(0, -2px);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.45);
  }
  80% {
    transform: translate(-3px, -2px);
    box-shadow:
      -5px 0 0 rgba(16, 185, 129, 0.75),
       5px 0 0 rgba(96, 165, 250, 0.75),
      0 8px 32px rgba(59, 130, 246, 0.45);
  }
  84% {
    transform: translate(4px, -3px);
    box-shadow:
       5px 0 0 rgba(16, 185, 129, 0.6),
      -4px 0 0 rgba(59, 130, 246, 0.6),
      0 8px 32px rgba(59, 130, 246, 0.45);
  }
  88% {
    transform: translate(-2px, -1px);
    box-shadow:
      -3px 0 0 rgba(16, 185, 129, 0.45),
      0 8px 32px rgba(59, 130, 246, 0.45);
  }
  92% {
    transform: translate(3px, -2px);
    box-shadow:
       4px 0 0 rgba(96, 165, 250, 0.5),
      0 8px 32px rgba(59, 130, 246, 0.45);
  }
  96% {
    transform: translate(-1px, -2px);
    box-shadow:
      -2px 0 0 rgba(16, 185, 129, 0.3),
      0 8px 32px rgba(59, 130, 246, 0.45);
  }
}

/* Border pulse : halo bleu animé pour boutons outline */
@keyframes btn-border-pulse {
  0%, 100% {
    border-color: var(--accent);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
  50% {
    border-color: var(--accent-light);
    box-shadow:
      0 0 0 5px rgba(59, 130, 246, 0.1),
      0 0 20px rgba(59, 130, 246, 0.18);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1100px) {
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  /* Nav */
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
  .nav__overlay { display: block; }

  /* Sections */
  .services-grid { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .skills-grid { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .faq-wrapper { grid-template-columns: 1fr; gap: 2.5rem; }
  .faq__header { position: static; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer__nav { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .hero__stats { gap: 1.5rem; }
  .hero__stat-sep { display: none; }
  .hero__stats { flex-wrap: wrap; gap: 1.25rem; }
  .portfolio-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .stack-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer__nav { grid-template-columns: repeat(2, 1fr); }
  .footer__bottom { flex-direction: column; text-align: center; }
  .hero__actions { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .footer__nav { grid-template-columns: 1fr; }
}
