/* 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%;
}

/* --- SÉLECTEUR DE LANGUE (FR/EN) --- */
.lang-switch {
  display: inline-flex; /* Permet d'aligner le drapeau et le texte */
  align-items: center; /* Centre verticalement */
  gap: 0.4rem; /* Espace entre le drapeau et le texte */
  
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  
  border-left: 1px solid var(--text-muted); 
  padding-left: 1.5rem; 
  margin-left: 0.5rem; 
  
  transition: color 0.3s ease;
}

/* On s'assure que le drapeau ne change pas de couleur au survol, seul le texte change */
.lang-switch:hover {
  color: var(--accent-1); 
  text-decoration: none !important;
}

/* Taille et style du petit drapeau */
.lang-switch .flag-icon {
  width: 20px; /* Largeur parfaite pour un menu */
  height: auto;
  border-radius: 2px; /* Adoucit un peu les angles */
  box-shadow: 0 0 3px rgba(0,0,0,0.2); /* Ajoute un tout petit relief */
}


/* 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.8rem !important;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 0;
  
  /* La magie du wrap-up (troncature avec ...) */
  display: -webkit-box;
  -webkit-line-clamp: 4; /* 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);
}

/* --- PAGE MENTIONS LÉGALES --- */
.legal-section h2 {
  margin-bottom: 2rem;
  color: var(--accent-1);
}

.legal-block {
  margin-bottom: 2rem;
}

.legal-block h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.legal-block p {
  color: var(--text-muted);
  line-height: 1.6;
}
/* 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);
  text-decoration: none;
}

/* --- ÉLÉMENT DE CONTACT STYLISÉ --- */
.contact-email-wrapper {
  margin-top: 1rem; /* Espace un peu par rapport au texte précédent */
}

.contact-email-link {
  display: inline-flex; /* Groupe l'icône et le texte */
  align-items: center; /* Aligne verticalement l'enveloppe et l'email au centre */
  gap: 0.75rem; /* Espace entre l'icône et le texte */
  text-decoration: none;
  font-size: 1.1rem;
  color: var(--text-main); /* Texte gris par défaut */
  transition: color 0.3s ease; /* Transition douce pour le pourpre */
}

.contact-icon {
  fill: var(--text-muted); /* Icône grisée par défaut */
  transition: fill 0.3s ease; /* Transition douce pour le pourpre */
}

/* --- EFFET DE SURVOL (Hover) --- */
/* Quand on survole le lien entier, le texte ET l'icône deviennent pourpres */
.contact-email-link:hover {
  color: var(--accent-1);
}

.contact-email-link:hover .contact-icon {
  fill: var(--accent-1); /* Colorie l'icône en pourpre */
}

/* Désactive TOUS les types de soulignages possibles sur le lien */
.contact-email-link,
.contact-email-link:hover,
.contact-email-link:visited {
  text-decoration: none !important;
  border-bottom: none !important; /* Casse la bordure inférieure */
  box-shadow: none !important; /* Casse les ombres portées */
  background: transparent !important; /* Casse les surlignages en arrière-plan */
  outline: none !important;
}

/* On s'assure que le texte à l'intérieur ne force pas non plus un trait */
.contact-email-link .contact-text {
  text-decoration: none !important;
  border-bottom: none !important;
}

/* --- SÉLECTEUR DE LANGUE (FR/EN) --- */

.lang-switch {
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  
  /* Création de la barre verticale de séparation (sur PC) */
  border-left: 1px solid var(--text-muted); 
  padding-left: 1.5rem; /* Espace entre la barre et le texte */
  margin-left: 0.5rem; /* Espace entre le dernier lien et la barre */
  
  transition: color 0.3s ease;
}

/* Effet au survol : on applique la couleur de votre logo mais SANS soulignage */
.lang-switch:hover {
  color: var(--accent-1); 
  text-decoration: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

/* * Si jamais votre soulignage de menu est fait avec une petite barre animée en CSS 
 * (avec un ::after), cette ligne va l'empêcher d'apparaître sous le FR/EN :
 */
.lang-switch::after {
  display: none !important;
}
/* --- AJUSTEMENT POUR LE MENU MOBILE --- */
@media (max-width: 768px) {
  .lang-switch {
    border-left: none; /* On enlève la barre verticale sur téléphone */
    padding-left: 0;
    margin-left: 0;
    
    /* On la remplace par une barre horizontale au-dessus du bouton */
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1); 
    width: 50%; /* Largeur de la barre */
    text-align: center;
    margin-top: 1rem; /* L'éloigne un peu des autres liens */
  }
}

/* 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;
  }
}


/* =========================================
   VERSION MOBILE & MENU BURGER
   ========================================= */

/* On cache le bouton burger sur les grands écrans */
.burger-btn {
  display: none;
}

@media (max-width: 768px) {
  
/* 1. Le header centre son contenu principal (la div .logo) */
  .top-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative; /* Sert de repère pour le bouton burger */
    width: 100%;
    padding: 1rem 0;
  }

  /* 2. On s'assure que le conteneur du logo gère bien le texte */
  .logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
  }

  /* 3. On masque l'image */
  .logo-img {
    display: none !important;
  }

  /* 4. On affiche le texte */
  .logo-text {
    display: block !important;
    text-align: center;
    font-size: 1.1rem; /* À ajuster selon vos préférences */
    font-weight: bold;
  }
  
  /* 1. On fait apparaître le bouton Burger */
  .burger-btn {
    /* Apparence du bouton (existant) */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 100;
    
    /* Positionnement à droite de l'en-tête (nouveau) */
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
  }

  .burger-bar {
    width: 100%;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 10px;
    transition: all 0.3s ease;
  }

  /* 2. On transforme le menu horizontal en panneau latéral caché */
  .main-menu {
    position: fixed;
    top: 0;
    right: -100%; /* Caché tout à droite de l'écran par défaut */
    width: 70%; /* Le menu prendra 70% de l'écran */
    height: 100vh;
    background-color: var(--bg-main);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transition: right 0.4s ease; /* L'animation de glissement */
    box-shadow: -5px 0 15px rgba(0,0,0,0.5);
    z-index: 99;
  }

  /* 3. La classe "active" qui fera glisser le menu dans l'écran */
  .main-menu.active {
    right: 0;
  }

  .lang-switch {
    border-left: none; 
    padding-left: 0;
    margin-left: 0;
    
    padding-top: 1.5rem; /* Un peu d'espace au-dessus */
    border-top: 1px solid var(--border-soft); /* La petite ligne séparatrice */
    width: 50%; 
    margin-top: 1rem;
    
    display: flex; 
    justify-content: center; /* Centre parfaitement le drapeau et le texte */
  }

  /* =========================================
     ANIMATION DE LA CROIX (BURGER ACTIF)
     ========================================= */
  
  /* La barre du haut descend au milieu et tourne à 45° */
  .burger-btn.active .burger-bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }

  /* La barre du milieu s'efface en fondu */
  .burger-btn.active .burger-bar:nth-child(2) {
    opacity: 0;
  }

  /* La barre du bas remonte au milieu et tourne à -45° */
  .burger-btn.active .burger-bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }
}