/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ROOT + BASE */
:root {
  --bg-hero-video: #050509;
  --bg-main: #1a1a1a;
  --bg-panel: #101018;
  --accent-1: #9b0021;
  --accent-2: #bb022a;
  --accent-3: #520012;
  --text-main: #f5f5f5;
  --text-muted: #a0a0b5;
  --border-soft: rgba(255, 255, 255, 0.08);
  --nav-height: 64px;
}

html {
  /* Compense la hauteur de votre menu fixe (64px) */
  scroll-padding-top: var(--nav-height); 
  
  /* Ajoute un bel effet de glissement au lieu d'un saut instantané */
  scroll-behavior: smooth; 
}

body {
  background: radial-gradient(circle at top, #141424 0, var(--bg-main) 55%);
  color: var(--text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}

/* TOP NAV */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  background: rgba(5, 5, 13, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-soft);
  z-index: 100;
}

.logo{
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-img {
  display: block;
  width: 300px;
  height: auto;
}

.logo-text {
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.text-pourpre {
  color: var(--accent-1)
}

.main-menu {
  display: flex;
  gap: 1.5rem;
}

.main-menu a {
  text-decoration: none;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  position: relative;
  padding-bottom: 4px;
  transition: color 0.25s ease;
}

.main-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  transition: width 0.25s ease;
}

.main-menu a:hover {
  color: var(--text-main);
}

.main-menu a:hover::after {
  width: 100%;
}

/* LAYOUT */
main {
  padding-top: var(--nav-height);
}

/* HERO */
.hero {
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem 3rem;
}

.hero-inner {
  max-width: 900px;
}

.hero-kicker {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

/* --- HERO BACKGROUND VIDEO --- */
.hero {
  position: relative;
  overflow: hidden; /* Empêche la vidéo de déborder de la section */
}

.hero-bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%); /* Centre la vidéo parfaitement */
  z-index: 0;
  object-fit: cover;
  opacity: 0.6; /* Baissez l'opacité si le feu est trop vif et gêne la lecture */
  /* Astuce pro : décommentez la ligne ci-dessous si votre vidéo a un fond très noir, ça fusionnera magnifiquement avec votre site */
  /* mix-blend-mode: screen; */
}

/* --- COLORISATION DE LA VIDÉO --- */
/* 1. On passe la vidéo en noir et blanc */
.hero-bg-video {
  filter: grayscale(100%) brightness(1.2); 
}

/* 2. On glisse un filtre de couleur pourpre par-dessus */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--accent-1); /* La couleur exacte de votre logo */
  mix-blend-mode: color; /* Le mode de fusion magique */
  z-index: 1;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  /* Un léger dégradé qui fond les bords de la vidéo dans la couleur de votre site */
  background: radial-gradient(circle at center, rgba(5,5,9,0.2) 0%, var(--bg-hero-video) 100%);
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 2; /* S'assure que le texte et le bouton cliquable restent au-dessus de tout */
}

/* fin NEW HERO */

.hero h1 {
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero-text {
  max-width: 32rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}


/* TRIPTYCH BAND (3 blocs simples) */
.triptych-band {
  display: flex;
  align-items: stretch;
  min-height: 45vh;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

/* Chaque panneau */
.band-item {
  flex: 1;
  padding: 2.5rem 2.5rem 3rem;
  background: var(--bg-panel);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 1rem;
  position: relative;       /* nécessaire pour .band-media absolute */
  overflow: hidden;
  transition:
    background 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease,
    filter 0.3s ease;
}

/* Légère teinte différente par panneau */
/*.band-games {
  background: linear-gradient(var(--accent-3), var(--bg-panel) 30%);
}

.band-consulting {
  background: linear-gradient(var(--accent-3), var(--bg-panel) 30%);
}

.band-other {
  background: linear-gradient(var(--accent-3), var(--bg-panel) 30%);
}
*/

/* Effet léger au survol (en plus de la vidéo) */
.triptych-band .band-item:hover {
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.55);
}

/* HEADER DANS LES RUBRIQUES : BARRES HORIZONTALES */
.band-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.band-header h2 {
  font-size: 1rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
}

.band-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.15), rgba(255,255,255,0));
}

/* TEXTE DANS LES RUBRIQUES */
.band-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 26rem;
}

.band-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-main);
  opacity: 0.9;
}

/* === VIDÉOS DANS LES RUBRIQUES === */
.band-media {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.band-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(0,0,0,0.2), rgba(0,0,0,0.65));
}

.band-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* vidéos visibles au hover du panneau */
.triptych-band .band-item:hover .band-media {
  opacity: 1;
}

/* Fait disparaître le voile noir quand on survole la section */
.triptych-band .band-item:hover .band-media::after {
  opacity: 0;
  transition: opacity 0.5s ease;
}
/* Grisage des autres panneaux quand on est dans la bande */
/*.triptych-band:hover .band-item {
  filter: grayscale(70%) brightness(0.7);
} */

/* Le panneau hovered redevient normal */
/*.triptych-band .band-item:hover {
  filter: none;
} */

/* N'applique le filtre gris qu'aux éléments NON survolés, 
   à condition qu'un élément de la bande SOIT actuellement survolé */
.triptych-band:has(.band-item:hover) .band-item:not(:hover) {
  filter: grayscale(70%) brightness(0.7);
}

/* SECTIONS CONTENU */
.content-section {
  padding: 3.5rem 2rem 3rem;
  max-width: 1092px;
  margin: 0 auto;
}

.section-title {
  font-size: 1rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.content-section p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.content-section a {
  color: var(--accent-2);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 79, 216, 0.4);
  padding-bottom: 1px;
}

/* FOOTER */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(3, 3, 8, 0.95);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
}

.footer-links a {
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: color 0.25s ease;
}

.footer-links a:hover {
  color: var(--text-main);
}

/* PROJECTS GRID */
/* --- CARROUSEL WORKS --- */
.carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 2rem;
}

.carousel-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  /* Masque la barre de défilement pour un look plus propre */
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding: 1rem 0; /* Évite de couper l'ombre au survol */
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

/* Fixe la taille des cartes pour qu'elles rentrent dans le carrousel */
.carousel-track .project-card {
  min-width: 320px; 
  width: 320px; /* Largeur fixe */
  height: 380px; /* Hauteur fixe pour que toutes les cartes soient identiques */
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
}

.carousel-btn {
  background: var(--bg-main);
  color: var(--text-main);
  border: 1px solid var(--border-soft);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.5rem;
  cursor: pointer;
  position: absolute;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  padding-bottom: 4px; /* Centre visuellement les chevrons */
}

.carousel-btn:hover {
  border-color: var(--accent-1);
  color: var(--accent-1);
  box-shadow: 0 0 15px rgba(155, 0, 33, 0.4);
}

.prev-btn { left: -22px; }
.next-btn { right: -22px; }

.project-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden; /* Ensures the image doesn't break out of the card */
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-1);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.project-image-wrapper {
  position: relative;
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  background: #151520; /* Placeholder background color while images load */
  overflow: hidden;
}

.project-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0; /* Invisible par défaut */
  transition: opacity 0.4s ease;
  pointer-events: none; /* Empêche la vidéo de bloquer la souris */
  z-index: 2; /* S'assure qu'elle passe au-dessus de l'image */
}

/* Fait apparaître la vidéo quand on survole la carte entière */
.project-card:hover .project-video {
  opacity: 1;
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-image {
  transform: scale(1.05); /* Slight zoom effect on the image when hovering the card */
}

.project-info {
  padding: 1.5rem;
  flex-grow: 1; /* Pushes the content to fill the card height if descriptions vary */
}

.project-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0;
  
  /* La magie du wrap-up (troncature avec ...) */
  display: -webkit-box;
  -webkit-line-clamp: 3; /* Nombre de lignes maximum affichées */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* TRUST / PARTNERS SECTION */
.trust-section {
  text-align: center;
}

.trust-section p {
  margin-bottom: 2.5rem;
}

.client-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 3rem;
}

.client-logos img {
  height: 45px; /* Adjust based on your logos' proportions */
  max-width: 150px;
  object-fit: contain;
  /* Makes logos monochrome and slightly transparent to fit the dark theme */
  filter: grayscale(100%) brightness(1.5) opacity(0.6);
  transition: all 0.3s ease;
}

.client-logos img:hover {
  /* Restores original colors and opacity on hover */
  filter: grayscale(0%) brightness(1) opacity(1);
  transform: scale(1.05);
}

/* CONTACT & SOCIALS */
.contact-methods {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-email {
  font-size: 1.05rem;
  font-weight: 500;
}

.social-links {
  display: flex;
  gap: 1.2rem;
  align-items: center;
}

.social-icon {
  color: var(--text-muted);
  transition: color 0.3s ease, transform 0.3s ease;
  display: flex; /* Helps align the SVG properly */
}

.social-icon:hover {
  color: var(--accent-1);
  transform: scale(1.15); /* Agrandissement stylisé au survol */
}

/* --- ICÔNES RÉSEAUX SOCIAUX --- */
/* État normal ET état visité : Gris et sans soulignement */
.content-section a.social-icon,
.content-section a.social-icon:visited {
  color: var(--text-muted); 
  border-bottom: none; 
  padding-bottom: 0;
}

/* État au survol : Rouge/Pourpre */
.content-section a.social-icon:hover {
  color: var(--accent-2); /* Utilisez var(--accent-1) si vous préférez un rouge plus sombre */
}

/* --- LIEN EMAIL --- */
/* Enlève juste le soulignement de l'email, garde sa couleur de base */
.content-section a.contact-email,
.content-section a.contact-email:visited {
  border-bottom: none;
  padding-bottom: 0;
  color: var(--accent-2); 
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .top-nav {
    padding: 0 1.25rem;
  }

  .triptych-band {
    flex-direction: column;
  }

  .band-item {
    min-height: auto;
  }

  .band-header {
    gap: 0.5rem;
  }

  .band-line {
    display: none;
  }
}
