/* Template: Home - Structure simple et propre */

/* Hero wrapper */
.home-hero-wrapper {
  position: relative;
  min-height: 135vh;
  margin-top: -3rem;
  padding: 0;
}

/* Hero background - fixed, doesn't affect flow */
.hero {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100vh;
  z-index: 1;
  overflow: hidden;
  background: #1a1a1a;
}

.hero-photo .img,
.hero-video .video,
.hero-slideshow .slideshow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.hero-photo .img img {
  display: block;
  width: 100%;
  min-width: 100%;
  height: 100vh;
  min-height: 100%;
  object-fit: cover;
  /* object-position défini via inline style avec focal point */
}

/* Hero content - normal flow */
.home-hero-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  text-align: center;
  padding: 0 2rem;
}

/* SUPPRIMÉ: règle .home-title déplacée dans hero-architecture.css */
/* .home-title {
  font-size: 4rem;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  max-width: 15ch;
  word-wrap: break-word;
  color: var(--color-white);
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.6);
  transform: translateY(100vh);
  opacity: 1;
} */

.name-container {
  position: relative;
  display: inline-block;
  width: 100%;
}

.name-line {
  display: inline-block;
  white-space: nowrap;
}

.letter {
  display: inline;
}

.name-amp {
  display: inline-block;
}

/* Section labels - petits titres pour chaque section */
.section-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 400;
  margin-bottom: 3rem;
  color: #000;
  text-align: center;
}

/* Intro section - Texte sur fond blanc qui pousse l'image */
.home-intro-section {
  background: var(--color-white);
  padding-top: 5rem;
  padding-bottom: 5rem;
  text-align: center;
  z-index: 3;
}

.home-intro {
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.25rem; /* Desktop base */
  line-height: 1.6;
}

.home-intro p {
  margin-bottom: 1.5rem;
}

.home-intro a {
  color: #000;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 0.125em solid #000;
  display: inline;
  line-height: 1.4;
  transition: all 0.2s ease;
}

.home-intro a:hover {
  opacity: 0.7;
}

/* Testimonial section - Un seul témoignage featured */
.home-testimonial-section {
  position: relative;
  padding-top: 5rem;
  padding-bottom: 5rem;
  z-index: 3;
  background: var(--color-light-dark);
}

.home-testimonial {
  max-width: 50rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--padding);
  padding-right: var(--padding);
}

/* Testimonials carousel - avec flèches de part et d'autre */
.testimonials-wrapper {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.testimonials-carousel {
  position: relative;
  min-height: 300px;
  flex: 1;
  display: flex;
  align-items: center;
}

.testimonial-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  pointer-events: none;
}

.testimonial-slide.active {
  opacity: 1;
  position: relative;
  pointer-events: auto;
}

.home-testimonial-text {
  font-size: 1.25rem; /* Desktop base */
  font-style: normal;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-weight: 300;
}

.home-testimonial-author {
  color: var(--color-text-grey);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Navigation arrows - de part et d'autre */
.testimonial-arrow {
  background: none;
  border: none;
  font-size: 3rem;
  color: #000;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.testimonial-arrow:hover {
  transform: scale(1.1);
}

.testimonial-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Projects section - Grid avec images au survol */
.home-projects-section {
  background: var(--color-white);
  padding-top: 5rem;
  padding-bottom: 5rem;
  z-index: 3;
}

.home-projects-table {
  width: 100%;
  max-width: 50rem;
  margin: 0 auto;
  border-collapse: collapse;
  table-layout: fixed;
}

.home-projects-table tr {
  cursor: pointer;
  transition: all 0.3s ease;
  border-bottom: 1px solid #e0e0e0;
}

/* Sur la home : simple last-child suffit (pas de filtrage) */
.home-projects-section .home-projects-table tr:last-child {
  border-bottom: none;
}

/* Sur la page projets : géré par JS avec la classe last-visible (filtrage) */
.projects-list .home-projects-table tr.last-visible {
  border-bottom: none !important;
}

.home-projects-table tr:hover {
  transform: scale(1.02);
  background: rgba(0, 0, 0, 0.02);
}

.home-projects-table tr:hover td {
  font-weight: 600;
}

.home-projects-table td a {
  color: inherit;
  text-decoration: none;
}

.home-projects-table td {
  padding: 1.5rem 0;
  vertical-align: middle;
  color: #000;
  text-transform: uppercase;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.home-projects-table .project-title {
  width: 15%;
}

.home-projects-table .project-title a {
  color: #000;
  text-decoration: none;
}

.home-projects-table .project-description {
  color: #000;
  width: 50%;
}

.home-projects-table .project-location {
  color: #000;
  width: 25%;
}

.home-projects-table .project-year {
  text-align: right;
  color: #000;
  width: 15%;
}

/* Project hover image */
.project-hover-image {
  position: fixed;
  width: 250px;
  height: 170px;
  pointer-events: none;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid #000;
}

.project-hover-image.visible {
  opacity: 1;
}

.project-hover-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Voir tous les projets button */
.projects-more {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.projects-more-button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid #000;
  background: transparent;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 300;
  line-height: 0;
  padding-bottom: 8px;
}

.projects-more-button:hover {
  background: #000;
  color: #fff;
  transform: scale(1.1);
}

/* Podcast section - Card avec player audio */
.home-podcast-section {
  position: relative;
  padding-top: 5rem;
  padding-bottom: 5rem;
  z-index: 3;
  background: var(--color-light-dark);
}

.podcast-card {
  max-width: 50rem;
  margin: 3rem auto 0;
  background: #fff;
  border: 1px solid #000;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.podcast-card-inner {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  padding: 2rem;
}

.podcast-cover {
  width: 200px;
  height: 200px;
  flex-shrink: 0;
  border-radius: var(--border-radius);
  overflow: hidden;
  background: var(--color-light);
}

.podcast-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.podcast-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
  color: #999;
}

.podcast-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

.podcast-title {
  font-size: 1.25rem; /* Réduit de 1.5rem pour cohérence */
  font-weight: 600;
  margin: 0;
  text-transform: none;
  letter-spacing: -0.02em; /* Même que les autres titres */
  line-height: 1.2;
}

.podcast-title a {
  color: #000;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.podcast-title a:hover {
  opacity: 0.6;
}

.podcast-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: #666;
}

.podcast-meta span:not(:last-child)::after {
  content: "•";
  margin-left: 1rem;
  color: #999;
}

.podcast-description {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #333;
}

.podcast-player {
  margin-top: auto;
}

.podcast-player audio {
  width: 100%;
  height: 50px;
}

.podcast-listen-link {
  margin-top: auto;
  color: #000;
  text-decoration: none;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 1rem;
  border-radius: 1.5rem;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  display: inline-block;
  font-size: 0.85rem;
  align-self: flex-start;
}

.podcast-listen-link:hover {
  border-color: #000;
  transform: scale(1.05);
}

/* Bouton tous les épisodes */
.podcast-more {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.podcast-more-button {
  color: #000;
  text-decoration: none;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 1rem;
  border-radius: 1.5rem;
  border: 1px solid #000; /* Border visible par défaut */
  transition: all 0.2s ease;
  display: inline-block;
  font-size: 0.85rem;
}

.podcast-more-button:hover {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .home-intro,
  .home-testimonial,
  .home-projects,
  .home-podcast-section {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  
  /* Témoignages mobile */
  .testimonial-arrow {
    display: none !important; /* Cache les flèches */
  }
  
  .testimonials-wrapper {
    justify-content: center;
  }
  
  /* .home-testimonial-text garde la taille desktop (1.25rem) */
  
  /* Projets mobile */
  .home-projects-table {
    padding: 0;
  }
  
  .home-projects-table td {
    font-size: 0.7rem; /* Encore plus petit pour mobile */
    padding: 1rem 0.5rem; /* Ajoute padding horizontal */
  }
  
  .home-projects-table .project-title {
    width: 15%;
    padding-right: 0.75rem;
  }
  
  .home-projects-table .project-description {
    width: 50%;
    padding-right: 0.75rem;
  }
  
  .home-projects-table .project-location {
    width: 25%;
    padding-right: 0.75rem;
  }
  
  .home-projects-table .project-year {
    width: 15%;
    text-align: right;
  }
  
  /* Désactiver hover preview en mobile */
  .project-preview {
    display: none !important;
  }
  
  /* Podcast mobile */
  .podcast-card-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .podcast-cover {
    margin: 0 auto;
  }
  
  .podcast-content {
    text-align: center;
  }
  
  .podcast-meta {
    justify-content: center;
  }
}

.home-podcast-cover {
  width: 12rem;
  height: 12rem;
  margin: 0 auto 2rem;
  border-radius: 50%;
  overflow: hidden;
}

.home-podcast-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-podcast-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.home-podcast-meta {
  color: var(--color-text-grey);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.home-podcast-description {
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.home-podcast-link {
  display: inline-block;
  text-decoration: none;
  font-weight: 500;
}

.home-podcast-link:hover {
  text-decoration: underline;
}

/* Responsive adjustments */
@media screen and (min-width: 60rem) {
  .home-title {
    font-size: 5rem; /* Grand écran */
  }
  
  .home-intro {
    font-size: 1.5rem; /* Grand écran */
  }
  
  .home-testimonial-text {
    font-size: 1.5rem; /* Grand écran */
  }
  
  .home-projects-table td {
    padding: 1.25rem 1rem;
  }
}

/* === FIX HERO: non-fixed + bandeau + clipping (HOME uniquement) === */
:where(.home) .home-hero-wrapper{
  position: relative;
  overflow: clip; /* empêche l'image de déborder sous les sections */
  /* si un min-height énorme existe, on le neutralise plus bas sur .hero */
}

/* SUPPRIMÉ: règle qui limitait hero à 60vh - conflit avec architecture 100vh */
/* :where(.home) .hero{
  position: relative !important;
  height: auto !important;
  min-height: clamp(40vh, 52vh, 60vh) !important;
  max-height: 60vh !important;
  z-index: 0 !important;
  overflow: hidden;
} */

:where(.home) .hero img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center; /* ajuste si besoin: top/center/bottom */
}

/* SUPPRIMÉ: règle qui forçait titre visible - GSAP doit contrôler */
/* :where(.home) .home-title{
  transform: none !important;
  opacity: 1 !important;
} */

/* === ANTI-LIGNE 1px ENTRE SECTIONS (HOME) === */
/* Forcer fond, supprimer marges/bordures et éviter artefacts de sous-pixel pendant l'anim */
:where(.home) main,
:where(.home) .content,
:where(.home) section{
  background: #fff; /* ou var(--page-bg, #fff) si tu utilises une variable */
}

:where(.home) .section--projets,
:where(.home) .section--podcast{
  position: relative;
  z-index: 2;         /* toujours au-dessus du hero */
  background: #fff;
  margin-block: 0;    /* aucune marge verticale externe */
  border: 0;          /* supprime les hairlines de bordure si existantes */
  isolation: isolate; /* nouveau stacking context → évite les fuites d'arrière-plan */
  contain: paint;     /* évite les artefacts pendant les transitions */
}

/* S'assurer qu'il n'y a pas d'espace résiduel à la jonction */
:where(.home) .section--projets + .section--podcast{
  margin-top: 0;
  border-top: 0;
}

/* Si tes sections ont des classes différentes, duplique ces règles en conséquence */

/* === HOME: HERO plein écran + title morph + parallax léger === */
:where(.home) .home-hero-wrapper{
  position: relative;
  min-height: 100vh;
  overflow: clip;          /* empêche que l'image passe sous les sections */
  isolation: isolate;      /* évite le bleed avec les bandes suivantes */
}

:where(.home) .hero{
  position: relative;      /* non-fixed: évite la fuite sous le contenu */
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
  z-index: 0;
}

/* Cible parallax: mets data-parallax sur le conteneur de l'image ou l'image elle-même */
:where(.home) .hero [data-parallax]{
  will-change: transform;
}

/* Title morph: état initial défini dans hero-architecture.css */
/* :where() a une spécificité faible, GSAP inline styles gagnent toujours */
:where(.home) .home-title .amp{ opacity:.9 }
:where(.home) .home-title .role{ display:inline-block; margin-left:.25ch; opacity:.9 }

/* SUPPRIMÉ: règle avec !important qui empêchait GSAP de fonctionner */
/* prefers-reduced-motion géré dans typography-hierarchy.css */

/* === PATCH: HERO HOME 100vh FIABLE === */
/* Cible explicite par structure plutôt que par .home pour éviter les collisions */
.home-hero-wrapper{
  position: relative;
  min-height: 100vh !important;
  height: auto;
  overflow: clip;     /* empêche le bleed du visuel sous les sections */
  isolation: isolate; /* new stacking context */
}
.home-hero-wrapper .hero{
  position: relative !important;    /* on garde non-fixed pour éviter de passer sous les bandes */
  min-height: 100vh !important;
  height: 100vh !important;
  max-height: none !important;      /* annule un éventuel max-height accidentel */
  inset: auto !important;
  overflow: hidden;
  z-index: 0;
}
/* Assurer que le conteneur image remplit le hero */
.home-hero-wrapper .hero img,
.home-hero-wrapper .hero [data-parallax]{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  will-change:transform;
}

/* === SUPPRIMÉ: conflit avec le patch plus bas === */

/* === CORRECTIF HERO MINIMAL === */

/* Hero: FORCER 100vh viewport */
.home .home-hero-wrapper {
  min-height: 100vh !important;
  min-height: 100dvh !important; /* dynamic viewport pour mobile */
}

.home .home-hero-wrapper .hero {
  min-height: 100vh !important;
  height: 100vh !important;
  min-height: 100dvh !important; /* dynamic viewport */
  height: 100dvh !important;
}

/* Image hero: léger agrandissement pour couvrir parallax */
.home .hero img,
.home .hero figure img {
  transform-origin: center;
  scale: 1.08; /* 8% suffit pour couvrir */
  object-fit: cover;
  object-position: center center;
  width: 100%;
  height: 100%;
}

/* SUPPRIMÉ: règle qui ciblait .home-title au lieu de .home-title-wrapper */
/* L'état initial est défini dans hero-architecture.css sur .home-title-wrapper */
/* GSAP anime .home-title-wrapper, pas .home-title directement */
