/* ==========================================================================
   Design Tokens & Base — partagé par tout le site
   ========================================================================== */

/* ==========================================================================
   Split Layout — 35/65
   ========================================================================== */

.split-media {
  position: fixed;
  top: 0;
  right: 0;
  width: 65%;
  height: 100vh;
  background: #fff;
  z-index: 0;
  overflow: hidden;
}
.split-media img,
.split-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.split-media .slideshow {
  width: 100%;
  height: 100%;
  position: relative;
}
.split-media .slideshow img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease;
}
.split-media-credit {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  font-size: 0.65rem;
  color: rgba(255,255,255,0.7);
  background: rgba(0,0,0,0.25);
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  pointer-events: none;
  z-index: 2;
}
.split-media .slideshow img.active {
  opacity: 1;
}

.split-content {
  position: relative;
  width: 35%;
  min-height: 100vh;
  padding: 4rem 3rem;
  background: #fff;
}

/* Sticky header */
.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  padding: 1.25rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-bottom: 1px solid var(--color-rule);
}
.sticky-header.visible {
  transform: translateY(0);
}
.sticky-header .logo {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking);
  color: var(--color-text);
  text-decoration: none;
}
.sticky-header .logo:hover {
  opacity: 0.5;
}
/* Menu toggle (hamburger) — top-right, hidden when header visible */
.menu-toggle {
  position: fixed;
  top: 1.5rem;
  right: 2.5rem;
  background: none;
  border: none;
  cursor: pointer;
  width: 26px;
  height: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
  z-index: 1001;
  transition: opacity 0.3s, visibility 0.3s;
}
.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.2s;
  transform-origin: center center;
}
.menu-toggle.open span:first-child {
  transform: translateY(8px) rotate(45deg);
}
.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.open span:last-child {
  transform: translateY(-8px) rotate(-45deg);
}
.menu-toggle.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: none;
}

.sticky-header nav {
  display: flex;
  gap: 1.5rem;
  transition: padding-right 0.3s;
}
.burger-visible .sticky-header nav {
  padding-right: 3.5rem;
}
.sticky-header nav a {
  font-size: var(--text-xs);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: var(--tracking);
  color: var(--color-muted);
  text-decoration: none;
  transition: color 0.3s;
}
.sticky-header nav a:hover {
  color: var(--color-text);
}
.sticky-header nav a[aria-current="page"] {
  color: var(--color-text);
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-bottom: 1rem;
}
.breadcrumb a {
  color: var(--color-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.breadcrumb a:hover {
  color: var(--color-text);
}
.breadcrumb-sep {
  margin: 0 0.4rem;
  opacity: 0.4;
}
.breadcrumb-current {
  color: var(--color-text);
}

/* Split sections */
.split-section {
  padding: 3.5rem 0;
  margin: 0 -3rem;
  padding-left: 3rem;
  padding-right: 3rem;
  border-top: 1px solid var(--color-rule);
}
.split-section:first-of-type {
  border-top: none;
  padding-top: 0;
}
.split-section.no-border {
  border-top: none;
  padding-top: 1.5rem;
}

/* Split footer */
.split-footer {
  padding: 4rem 0 2rem 0;
  margin: 0 -3rem;
  padding-left: 3rem;
  padding-right: 3rem;
  border-top: 1px solid var(--color-rule);
}

/* Split intro text */
.split-intro {
  font-size: 1.25rem;
  line-height: var(--leading-body);
}
.split-intro p { margin-bottom: 1.25rem; }
.split-intro a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--color-rule);
  transition: text-decoration-color 0.3s;
}
.split-intro a:hover {
  text-decoration-color: var(--color-text);
}

/* Content blocks — shared heading/paragraph/list styles */
.page-content h2,
.project-content h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 3rem 0 0.75rem;
  letter-spacing: -0.01em;
  line-height: var(--leading-tight);
}
.page-content h2:first-child,
.project-content h2:first-child {
  margin-top: 0;
}
.page-content h3,
.project-content h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 2.5rem 0 0.5rem;
}
.page-content p,
.project-content p {
  font-size: var(--text-xs);
  line-height: var(--leading-body);
  margin-bottom: 1rem;
}
.page-content ul,
.project-content ul,
.page-content ol,
.project-content ol {
  font-size: var(--text-xs);
  line-height: var(--leading-body);
  margin-bottom: 1rem;
  padding-left: 1.25rem;
}
.page-content li,
.project-content li {
  margin-bottom: 0.35rem;
}
.page-content ul li,
.project-content ul li {
  list-style: disc;
}
.page-content ol li,
.project-content ol li {
  list-style: decimal;
}
.page-content a,
.project-content a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-color: var(--color-rule);
  transition: text-decoration-color 0.3s;
}
.page-content a:hover,
.project-content a:hover {
  text-decoration-color: var(--color-text);
}

/* Podcast list — simple style */
.podcast-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.podcast-item {
  padding: 1.25rem 0;
}
.podcast-item:first-child {
  padding-top: 0;
}
.podcast-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.podcast-desc {
  font-size: var(--text-xs);
  color: var(--color-muted);
  margin-bottom: 0.6rem;
}
.audio-player audio {
  width: 100%;
  max-width: 100%;
  height: 36px;
}

/* Projects table — full bleed dans split */
.split-content .projects-table {
  width: calc(100% + 6rem);
  margin-left: -3rem;
}
.split-content .projects-table td:first-child {
  width: 65%;
  padding-left: 3rem;
  padding-right: 1rem;
}
.split-content .projects-table td:nth-child(2) {
  width: 27%;
}
.split-content .projects-table td:last-child {
  width: 8%;
  text-align: right;
  padding-right: 3rem;
}

/* Mobile */
@media (max-width: 900px) {
  .split-media {
    position: relative;
    width: 100%;
    height: 50vh;
  }
  .split-content {
    width: 100%;
    max-width: 100vw;
    padding: 2.5rem 1.5rem;
    overflow-x: hidden;
  }

  /* Menu toggle always visible on mobile */
  .menu-toggle {
    position: fixed !important;
    top: 1.25rem;
    right: 1.5rem;
    z-index: 1002;
    transition: none;
  }
  .menu-toggle.hidden {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: none;
  }

  /* Full-screen mobile menu overlay */
  .sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
    border-bottom: none;
    pointer-events: none;
  }
  /* On mobile, only show when menu-open class is set (not on scroll) */
  .sticky-header.visible {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
  }
  .sticky-header.menu-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .sticky-header .logo {
    font-size: 1.25rem;
    margin-bottom: 3rem;
  }
  .sticky-header nav {
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding-right: 0 !important;
  }
  .sticky-header nav a {
    font-size: 1.25rem;
    padding: 0.75rem 0;
    text-transform: uppercase;
    letter-spacing: var(--tracking);
    color: var(--color-text);
  }
  .sticky-header nav a[aria-current="page"] {
    font-weight: 700;
  }

  /* Page title smaller on mobile */
  .page-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: 2rem;
  }

  /* Breadcrumb */
  .breadcrumb {
    margin-bottom: 1.5rem;
  }

  /* Footer grid stack on mobile */
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid .footer-mentions {
    grid-column: auto;
  }

  /* Credit position on mobile */
  .split-media-credit {
    bottom: 0.5rem;
    right: 0.5rem;
  }

  /* Reset projects table on mobile */
  .split-content .projects-table {
    width: 100%;
    margin-left: 0;
  }
  .split-content .projects-table td:first-child {
    padding-left: 0;
    width: auto;
  }
  .split-content .projects-table td:last-child {
    padding-right: 0;
  }

  /* Disable project hover image on mobile */
  .project-hover-image {
    display: none !important;
  }
  .projects-table tr:hover {
    opacity: 1;
  }
}

:root {
  --text-title: clamp(1.75rem, 2.5vw, 2.5rem);
  --text-body: 1.125rem;
  --text-sm: 1rem;
  --text-xs: 0.875rem;
  --leading-tight: 1.1;
  --leading-body: 1.6;
  --tracking: 0;
  --color-text: #111;
  --color-muted: #555;
  --color-rule: #e0e0e0;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body, button, input, textarea {
  font-family: 'TeX Gyre Heros', Helvetica, Arial, sans-serif;
  color: var(--color-text);
}

body {
  min-height: 100vh;
  background: #fff;
}

/* ==========================================================================
   Composants partagés
   ========================================================================== */

/* Page title */
.page-title {
  font-size: var(--text-title);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
}
.page-subtitle {
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin-top: -2.5rem;
  margin-bottom: 2rem;
}

/* Contact grid */
.contact-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.contact-item strong {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking);
  margin-bottom: 0.25rem;
}
.contact-item a {
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid var(--color-rule);
  transition: border-color 0.3s;
}
.contact-item a:hover {
  border-color: var(--color-text);
}

/* Note/list items */
.note-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-rule);
}
.note-item:last-child {
  border-bottom: none;
}
.note-item a {
  color: var(--color-text);
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  transition: opacity 0.2s;
}
.note-item a:hover {
  opacity: 0.6;
}
.note-item h2 {
  font-size: var(--text-sm);
  font-weight: 400;
}
.note-item time {
  font-size: var(--text-xs);
  color: var(--color-muted);
}
.note-date {
  font-size: var(--text-xs);
  color: var(--color-muted);
  display: block;
  margin-top: 1rem;
}

/* Project/episode navigation */
.project-nav-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.project-nav-link {
  font-size: var(--text-xs);
  color: var(--color-muted);
  text-decoration: none;
  transition: color 0.3s;
}
.project-nav-link:hover {
  color: var(--color-text);
}

/* Project detail */
.project-code {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--color-muted);
  margin-bottom: 1rem;
}
.project-meta {
  font-size: var(--text-xs);
  color: var(--color-muted);
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.project-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

/* Episode meta */
.episode-meta {
  font-size: var(--text-xs);
  color: var(--color-muted);
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.episode-player {
  margin-top: 1rem;
}
.episode-player audio {
  width: 100%;
}

/* Filter tags */
.filter-tag {
  font-size: var(--text-xs);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: var(--tracking);
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--color-rule);
  background: none;
  cursor: pointer;
  color: var(--color-muted);
  text-decoration: none;
  transition: all 0.2s;
}
.filter-tag:hover {
  border-color: var(--color-text);
  color: var(--color-text);
}
.filter-tag.active {
  background: var(--color-text);
  border-color: var(--color-text);
  color: #fff;
}

/* Section label */
.section-label {
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--tracking);
  color: var(--color-text);
  margin-bottom: 2rem;
}

/* Section header avec lien */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.5rem;
}
.section-header .section-label {
  margin-bottom: 0;
}
.section-link {
  color: var(--color-muted);
  text-decoration: none;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking);
  transition: color 0.3s;
}
.section-link:hover {
  color: var(--color-text);
}

/* Testimonials */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  opacity: 1;
  transition: opacity 0.3s ease;
}
.testimonials-grid.fade-out {
  opacity: 0;
}
.testimonial-card {
  display: flex;
  flex-direction: column;
}
.testimonial-text {
  font-size: var(--text-sm);
  line-height: var(--leading-body);
  margin-bottom: 0.75rem;
}
.testimonial-author {
  font-size: var(--text-xs);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: var(--tracking);
  color: var(--color-muted);
}

/* Testimonials / Pagination nav */
.testimonials-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 1.5rem;
}
.testimonials-dots {
  display: flex;
  gap: 0.4rem;
}
.testimonials-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-rule);
  cursor: pointer;
  transition: background 0.3s;
}
.testimonials-dots span.active {
  background: var(--color-text);
}
.testimonials-nav {
  display: flex;
  gap: 0.5rem;
}
.testimonials-nav button {
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--color-rule);
  background: none;
  cursor: pointer;
  font-size: var(--text-xs);
  color: var(--color-muted);
  transition: all 0.3s;
}
.testimonials-nav button:hover {
  border-color: var(--color-text);
  color: var(--color-text);
}

/* Projects table */
.projects-table {
  width: 100%;
  border-collapse: collapse;
}
.projects-table tr {
  border-bottom: 1px solid var(--color-rule);
  cursor: pointer;
  transition: opacity 0.2s;
}
.projects-table tr:last-child,
.projects-table tr.last-visible {
  border-bottom: none;
}
.projects-table tr:hover { opacity: 0.6; }
.projects-table td {
  padding: 0.6rem 0;
  font-size: var(--text-xs);
  vertical-align: baseline;
}
.projects-table a { color: var(--color-text); text-decoration: none; }

/* Project hover image */
.project-hover-image {
  position: fixed;
  width: 200px;
  height: 140px;
  pointer-events: none;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.25s ease;
  overflow: hidden;
}
.project-hover-image.visible {
  opacity: 1;
}
.project-hover-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Audio player */
.audio-player {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1rem;
}
.audio-player .play-btn {
  width: 28px;
  height: 28px;
  border: 1px solid var(--color-rule);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  transition: all 0.3s;
  flex-shrink: 0;
}
.audio-player .play-btn:hover {
  border-color: var(--color-text);
}
.audio-player .play-btn.playing {
  background: var(--color-text);
  border-color: var(--color-text);
  color: #fff;
}
.audio-player .progress {
  flex: 1;
  height: 1px;
  background: var(--color-rule);
  cursor: pointer;
  position: relative;
}
.audio-player .progress-bar {
  height: 100%;
  background: var(--color-text);
  width: 0%;
}
.audio-player .time {
  font-size: var(--text-xs);
  color: var(--color-muted);
  min-width: 36px;
  text-align: right;
}

/* Podcast cards */
.podcast-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  align-items: stretch;
  margin-top: 1.5rem;
}
.podcast-card {
  background: #fff;
  border: 1px solid var(--color-rule);
  display: flex;
  flex-direction: column;
}
.podcast-content {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.podcast-title {
  font-size: var(--text-sm);
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  line-height: var(--leading-tight);
}
.podcast-title a {
  color: var(--color-text);
  text-decoration: none;
  transition: opacity 0.2s;
}
.podcast-title a:hover {
  opacity: 0.6;
}
.podcast-desc {
  font-size: var(--text-xs);
  color: var(--color-muted);
  line-height: 1.4;
  margin: 0;
  flex: 1;
}
.podcast-intro {
  font-size: var(--text-sm);
  margin-bottom: 2rem;
  color: var(--color-text);
  line-height: var(--leading-body);
}
.podcast-intro p { margin: 0; }

/* Footer */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 2rem;
  align-items: start;
}
.footer-grid .footer-column:first-child {
  grid-column: 1 / -1;
}
.footer-grid .footer-mentions {
  grid-column: 1 / -1;
}
.footer-column {
  font-size: var(--text-xs);
  line-height: var(--leading-body);
  color: var(--color-text);
}
.footer-column p {
  margin-bottom: 0;
  min-height: 1.5em;
}
.footer-column strong,
.footer-column b {
  font-weight: 700;
}
.footer-column a,
.footer-mentions a {
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid var(--color-rule);
  transition: border-color 0.3s;
}
.footer-column a:hover,
.footer-mentions a:hover {
  border-color: var(--color-text);
}
.footer-mentions {
  font-size: var(--text-xs);
  color: var(--color-text);
  line-height: var(--leading-body);
}
.footer-mentions p { margin: 0; }
