:root {
  --bg: #05060a;
  --text: #f5f5f5;
  --accent: #c0392b;
  --muted: #a0a0a0;
  --card: #111318;
  --shadow: 0 18px 45px rgba(0,0,0,0.75);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif;
  background: radial-gradient(circle at top, #171b2a 0, #05060a 55%, #000000 100%);
  color: var(--text);
  line-height: 1.6;
  scroll-behavior: smooth;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  opacity: 0.9;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* HEADER GLOBAL (logo + nav) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: linear-gradient(to bottom, rgba(5,6,10,0.95), rgba(5,6,10,0.6));
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: inherit;
}

.logo-img {
  height: 32px;
  width: auto;
  display: block;
}

.logo-text {
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--muted);
}

.main-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9rem;
}

.main-nav a {
  color: var(--muted);
  font-weight: 500;
}

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

@media (max-width: 768px) {
  .main-nav {
    display: none;
  }
  .site-header-inner {
    padding-inline: 1rem;
  }
}

/* HERO */
header {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 0 2rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.1fr);
  gap: 3rem;
  align-items: center;
}

@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
}

.hero-logo-large {
  margin-bottom: 1.8rem;
}

.hero-logo-img {
  max-width: 360px;
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 35px rgba(0,0,0,0.8));
}

@media (max-width: 768px) {
  .hero-logo-large {
    display: flex;
    justify-content: center;
  }
}

.hero-name-tag-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .hero-name-tag-row {
    justify-content: center;
    text-align: center;
  }
}

.hero-subtitle-name {
  font-size: 1.2rem;
  font-weight: 600;
}

.role-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.8rem;
  font-size: 0.85rem;
  border-radius: 999px;
  background: rgba(192,57,43,0.16);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-top: 0.35rem;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--muted);
  margin-top: 0.6rem;
  margin-bottom: 1.75rem;
  max-width: 520px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

@media (max-width: 768px) {
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-buttons {
    justify-content: center;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.7rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 55px rgba(0,0,0,0.9);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.22);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.04);
}

/* Focus clavier pour accessibilité */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* SECTIONS */
section {
  padding: 4rem 0;
}

#showreel {
  padding-top: 3.5rem;
  padding-bottom: 4rem;
}

.section-title {
  font-size: clamp(1.5rem, 4vw, 2.3rem);
  margin-bottom: 0.75rem;
  text-align: center;
}

.section-subtitle {
  color: var(--muted);
  margin-bottom: 3rem;
  text-align: center;
  font-size: 1.05rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* Cards génériques */
.card {
  background: var(--card);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.06);
}

/* ABOUT */
.about-grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 900px) {
  .about-grid {
    grid-template-columns: 1.7fr 1.3fr;
  }
}

.about-photo-card {
  padding: 0;
  overflow: hidden;
}

.about-photo-wrapper {
  width: 100%;
  height: 100%;
  max-height: 340px;
  overflow: hidden;
  border-radius: 20px;
}

.about-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.profile-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

.profile-photo-wrapper {
  width: 128px;
  height: 128px;
  border-radius: 999px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 0%;
  display: block;
}

.profile-text-and-cta {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  width: 100%;
}

.profile-cta-btn {
  align-self: flex-end;
}

.profile-title {
  margin-bottom: 0.6rem;
  font-size: 1.2rem;
}

.profile-intro {
  color: var(--muted);
  font-size: 0.98rem;
}

.about-last-paragraph {
  margin-top: 1.5rem;
}

.about-infos-card {
  margin-top: 1.75rem;
}

.about-infos-title {
  font-weight: 700;
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
}

@media (max-width: 768px) {
  .profile-card {
    align-items: center;
    text-align: center;
  }
  .profile-text-and-cta {
    align-items: center;
    text-align: center;
  }
  .profile-cta-btn {
    align-self: center;
  }
}

/* SHOWREEL / VIDEOS */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 3rem;
  background: #000;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.6rem;
  margin-top: 1.6rem;
}

.project-card {
  background: var(--card);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.2s ease;
  border: 1px solid rgba(255,255,255,0.05);
  padding: 0.5rem 0.5rem 0.7rem;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 45px rgba(0,0,0,0.9);
  border-color: rgba(192,57,43,0.45);
}

.project-thumb {
  background: radial-gradient(circle at top, #444 0, #000 70%);
  aspect-ratio: 16 / 9;
  position: relative;
}

.project-thumb iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.project-body {
  padding: 0.45rem 0.6rem 0.5rem;
}

.project-title {
  font-weight: 700;
  margin-bottom: 0.12rem;
  font-size: 0.98rem;
}

.project-type {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Variantes Bandes-annonces */
.projects-grid.ba-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.project-card.ba-card {
  border-radius: 12px;
  padding: 0.25rem 0.25rem 0.4rem;
}

.project-card.ba-card .project-thumb {
  aspect-ratio: 16 / 9;
  background: #000;
}

.project-card.ba-card .project-body {
  padding: 0.3rem 0.4rem 0.35rem;
}

.project-card.ba-card .project-title {
  font-size: 0.86rem;
  margin-bottom: 0.08rem;
}

.project-card.ba-card .project-type {
  font-size: 0.76rem;
}

.ba-subtitle {
  color: var(--muted);
  margin-bottom: 0.5rem;
  max-width: 700px;
}

.ba-subheading {
  font-size: 1.05rem;
  margin-top: 0.6rem;
  margin-bottom: 0.2rem;
}

.ba-subheading--spaced {
  margin-top: 0.9rem;
}

/* Barres rouges pour titres de sous-sections */
.showreel-subsection-title {
  display: block;
  padding: 0.3rem 0.9rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--accent);
  color: #ffffff;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.showreel-subsection-title--spaced {
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.showreel-subsection-text {
  color: var(--muted);
  margin-bottom: 1.1rem;
  max-width: 700px;
}

/* SERVICES */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.service-title {
  font-weight: 700;
  margin-bottom: 0.75rem;
  font-size: 1.15rem;
}

.service-desc {
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.5;
  font-size: 0.98rem;
}

.service-meta {
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
}

/* CV */
.cv-grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 800px) {
  .cv-grid {
    grid-template-columns: 2fr 1fr;
  }
}

.cv-list {
  list-style: none;
}

.cv-item {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.cv-item:last-child {
  border-bottom: none;
}

.cv-year {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.cv-role {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.cv-place {
  font-size: 0.95rem;
  color: var(--muted);
}

.cv-card-side {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cv-block-title {
  font-weight: 700;
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.cv-block-text {
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.cv-linkedin {
  margin-top: 0.75rem;
}

/* CONTACT */
.contact-grid {
  display: grid;
  gap: 3rem;
}

@media (min-width: 800px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

form {
  display: grid;
  gap: 1.25rem;
}

label {
  font-weight: 600;
  margin-bottom: 0.25rem;
  display: block;
  font-size: 0.9rem;
}

input, textarea, select {
  width: 100%;
  padding: 0.9rem 1.1rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.18);
  font: inherit;
  font-size: 0.98rem;
  background: rgba(5,6,10,0.9);
  color: var(--text);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(10,12,18,1);
}

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

.honeypot {
  display: none;
}

.contact-card-side .contact-title {
  font-weight: 700;
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

/* FOOTER */
footer {
  padding: 3rem 0 2rem;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.7);
}

.footer-subtitle {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

/* BOUTONS RETOUR EN HAUT */
.back-to-top,
.back-to-top-top {
  position: fixed;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: none;
  background: rgba(0,0,0,0.75);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 14px 35px rgba(0,0,0,0.9);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 60;
}

.back-to-top {
  bottom: 20px;
  right: 20px;
}

.back-to-top-top {
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
}

.back-to-top:hover {
  transform: translateY(-2px);
  background: rgba(0,0,0,0.9);
}

.back-to-top-top:hover {
  transform: translateX(-50%) translateY(-2px);
  background: rgba(0,0,0,0.9);
}

.back-to-top.show,
.back-to-top-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top span,
.back-to-top-top span {
  font-size: 1.3rem;
  line-height: 1;
}

.back-to-top-tooltip,
.back-to-top-top-tooltip {
  position: absolute;
  right: 50%;
  transform: translateX(50%);
  background: rgba(0,0,0,0.9);
  color: #fff;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.back-to-top-tooltip {
  bottom: 52px;
}

.back-to-top-top-tooltip {
  top: 52px;
}

.back-to-top:hover .back-to-top-tooltip,
.back-to-top-top:hover .back-to-top-top-tooltip {
  opacity: 1;
}

/* RESPONSIVE DIVERS */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  section {
    padding: 3.5rem 0;
  }
  .projects-grid,
  .services-grid {
    grid-template-columns: 1fr;
  }
  .back-to-top {
    bottom: 16px;
    right: 16px;
  }
  .back-to-top-top {
    top: 56px;
  }
}

/* Placeholders Wistia */
wistia-player[media-id='cf88q5fgww']:not(:defined),
wistia-player[media-id='z2lm1s83tp']:not(:defined),
wistia-player[media-id='94u3wxyxyd']:not(:defined),
wistia-player[media-id='hxnfjv3lup']:not(:defined) {
  background: center / contain no-repeat url('https://fast.wistia.com/embed/medias/cf88q5fgww/swatch');
  display: block;
  filter: blur(5px);
  padding-top: 56.25%;
}

/* Show more / less */
.hidden {
  display: none;
}

.see-more-btn {
  margin-top: 1.4rem;
  padding: 0.55rem 1.1rem;
  font-size: 0.8rem;
  border-radius: 999px;
}

/* Thumbnails YouTube (toutes sections) */
.project-thumb.yt-thumb {
  cursor: pointer;
  overflow: hidden;
}

.project-thumb .thumb-image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

/* Overlay play commun (YouTube, Wistia, Vimeo) */
.project-thumb.thumb-overlay {
  position: relative;
  cursor: pointer;
}

.project-thumb .thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #ffffff;
  text-shadow: 0 0 12px rgba(0,0,0,0.75);
  background: radial-gradient(circle at center, rgba(0,0,0,0.15), rgba(0,0,0,0.55));
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.project-thumb.yt-thumb:hover .thumb-play,
.project-thumb.thumb-overlay:hover .thumb-play,
.project-thumb.vimeo-thumb:hover .thumb-play {
  opacity: 1;
}

.project-thumb.vimeo-thumb {
  cursor: pointer;
  overflow: hidden;
}
