/* ==========================================================================
   Adrien Martinez — design tokens (charte graphique conservée : orange + gris)
   ========================================================================== */
:root {
  --orange-400: #fb923c;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --orange-700: #c2410c;

  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  --bg: #ffffff;
  --bg-soft: var(--gray-50);
  --text: var(--gray-900);
  --text-soft: var(--gray-600);
  --border: var(--gray-200);
  --card-bg: #ffffff;

  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.06);
  --shadow-md: 0 8px 24px rgba(17, 24, 39, 0.08);
  --shadow-lg: 0 20px 50px rgba(17, 24, 39, 0.12);

  --container: 1120px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

:root[data-theme="dark"] {
  --bg: var(--gray-900);
  --bg-soft: #171f2b;
  --text: var(--gray-50);
  --text-soft: var(--gray-400);
  --border: var(--gray-700);
  --card-bg: var(--gray-800);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--gray-900);
    --bg-soft: #171f2b;
    --text: var(--gray-50);
    --text-soft: var(--gray-400);
    --border: var(--gray-700);
    --card-bg: var(--gray-800);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.45);
  }
}

/* ---- reset ---- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 768px) {
  .container { padding: 0 2rem; }
}

.section { padding: 4.5rem 0; }
@media (min-width: 768px) { .section { padding: 7rem 0; } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange-600);
  background: color-mix(in srgb, var(--orange-500) 12%, transparent);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
  color: #fff;
  box-shadow: 0 10px 30px -8px rgba(234, 88, 12, 0.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -8px rgba(234, 88, 12, 0.6); }

.btn-secondary {
  background: var(--card-bg);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--orange-500); color: var(--orange-600); transform: translateY(-2px); }

/* ---- header ---- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--border); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--orange-400), var(--orange-600));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 2.25rem;
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--text-soft);
}
.nav-links a { transition: color 0.2s var(--ease); }
.nav-links a:hover { color: var(--orange-600); }

.nav-link-eleve {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  color: var(--text) !important;
  font-weight: 600;
}
.nav-link-eleve:hover {
  border-color: var(--orange-500);
  color: var(--orange-600) !important;
}

@media (min-width: 900px) {
  .nav-links { display: flex; }
}

.nav-actions { display: flex; align-items: center; gap: 0.75rem; }

.theme-toggle {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.theme-toggle:hover { border-color: var(--orange-500); color: var(--orange-600); }
.theme-toggle svg { width: 1.1rem; height: 1.1rem; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

.menu-toggle {
  display: flex;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--card-bg);
  align-items: center;
  justify-content: center;
  color: var(--text);
}
@media (min-width: 900px) { .menu-toggle { display: none; } }
.menu-toggle svg { width: 1.2rem; height: 1.2rem; }

.mobile-menu {
  position: fixed;
  inset: 0;
  top: 64px;
  background: var(--bg);
  z-index: 90;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.mobile-menu.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.mobile-menu a {
  padding: 1rem 0.25rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.mobile-menu .btn { margin-top: 1.5rem; }

@media (min-width: 900px) { .mobile-menu { display: none; } }

/* ---- hero ---- */
.hero {
  position: relative;
  padding: 8.5rem 0 4rem;
  overflow: hidden;
}
@media (min-width: 768px) { .hero { padding: 10.5rem 0 6rem; } }

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 3rem; }
}

.hero-content { text-align: center; }
@media (min-width: 960px) { .hero-content { text-align: left; } }

.hero-eyebrow { margin-bottom: 1.5rem; }

.hero h1 {
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 1.25rem;
}
.hero h1 .accent {
  background: linear-gradient(135deg, var(--orange-500), var(--orange-700));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lead {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-soft);
  max-width: 32rem;
  margin: 0 auto 2rem;
}
@media (min-width: 960px) { .hero p.lead { margin: 0 0 2rem; } }

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-items: center;
}
@media (min-width: 480px) { .hero-actions { flex-direction: row; justify-content: center; } }
@media (min-width: 960px) { .hero-actions { justify-content: flex-start; } }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}
@media (min-width: 960px) { .hero-stats { justify-content: flex-start; } }

.hero-stat { text-align: center; }
@media (min-width: 960px) { .hero-stat { text-align: left; } }
.hero-stat strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero-stat span {
  font-size: 0.8rem;
  color: var(--text-soft);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-glow {
  position: absolute;
  inset: -10%;
  background: radial-gradient(closest-side, rgba(249, 115, 22, 0.35), transparent 70%);
  filter: blur(40px);
  z-index: 0;
  animation: pulse-glow 5s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.06); }
}

.hero-photo-wrap {
  position: relative;
  z-index: 1;
  width: min(320px, 72vw);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  padding: 6px;
  background: linear-gradient(135deg, var(--orange-400), var(--orange-600));
  box-shadow: var(--shadow-lg);
}
.hero-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--bg);
  background: var(--gray-200);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

.hero-badge {
  position: absolute;
  z-index: 2;
  bottom: 0.5rem;
  right: -0.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
}
.hero-badge .dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

/* ---- reveal-on-scroll ---- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* ---- section head ---- */
.section-head {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 3rem;
}
.section-head .eyebrow { margin-bottom: 1.25rem; }
.section-head h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.section-lead { color: var(--text-soft); font-size: 1.05rem; }

/* ---- project cards ---- */
.projects-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1080px) {
  .projects-grid { grid-template-columns: repeat(3, 1fr); }
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--orange-500) 40%, var(--border));
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.project-icon {
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-icon img { width: 100%; height: 100%; object-fit: contain; }
.project-icon-youtube img { width: 1.9rem; height: auto; }
.project-icon-olab img { border-radius: 0.35rem; }
.project-icon-hublio img { border-radius: 0.35rem; }

.project-stats {
  display: flex;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-soft);
}
.project-stats strong { color: var(--text); }

.project-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.3rem;
}

.project-tag {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--orange-600);
  margin-bottom: 0.85rem;
}

.project-desc {
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.project-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  align-self: flex-start;
  transition: gap 0.2s var(--ease), color 0.2s var(--ease);
}
.project-cta svg { width: 1rem; height: 1rem; transition: transform 0.2s var(--ease); }
.project-cta:hover { color: var(--orange-600); gap: 0.6rem; }

/* ---- youtube videos ---- */
.videos-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .videos-grid { grid-template-columns: repeat(3, 1fr); }
}

.video-card {
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--orange-500) 40%, var(--border));
}

.video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--gray-200);
  overflow: hidden;
}
.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}
.video-card:hover .video-thumb img { transform: scale(1.05); }

.video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-play svg {
  width: 3rem;
  height: 3rem;
  color: #fff;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.45));
  transition: transform 0.25s var(--ease);
}
.video-card:hover .video-play svg { transform: scale(1.12); }

.video-title {
  padding: 1rem 1.1rem 1.2rem;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}

.videos-more {
  display: flex;
  justify-content: center;
  margin-top: 2.5rem;
}

/* ---- placeholder sections (à venir) ---- */
.section-placeholder {
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--text-soft);
}
.section-placeholder h2 {
  font-size: 1.6rem;
  color: var(--text);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

/* ---- footer ---- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  color: var(--text-soft);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.footer-socials { display: flex; gap: 1rem; }
.footer-socials a {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.footer-socials a:hover { border-color: var(--orange-500); color: var(--orange-600); }
.footer-socials svg { width: 1rem; height: 1rem; }
