/* CSS Document */
:root {
 --bg-color: #0f0f11;
 --text-color: #f5f5f7;
 --accent-color: #ffffff;
 --line-height: 2px;
}

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

.header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1.5rem 3rem;
	/* Fixe l'en-tête en haut */
  	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 900;
	/* Dégradé du noir opaque (haut) vers le transparent (bas) */
  	background: linear-gradient( to bottom, rgba(15, 15, 17, 1) 0%, rgba(15, 15, 17, 0.75) 20%, rgba(15, 15, 17, 0) 100% );
	/* Retrait de la bordure solide du bas pour éviter de couper le dégradé */
  	border-bottom: none;
}

/* Menu de navigation bureau */
.nav-links {
	display: flex;
	gap: 2.5rem;
	list-style: none;
}

.nav-links a {
	color: var(--text-color);
	text-decoration: none;
	font-size: 0.95rem;
	letter-spacing: 1px;
	position: relative;
	padding-bottom: 6px;
	transition: color 0.3s ease;
}

/* Animation du trait sous les liens */
.nav-links a::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: var(--line-height);
	background-color: var(--accent-color);
	transform: scaleX(0);
	transform-origin: right;
	transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links a:hover::after, .nav-links a.active::after {
	transform: scaleX(1);
	transform-origin: left;
}


/* Bouton Hamburger rond blanc */
.menu-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 4px;
	width: 44px;
	height: 44px;
	background-color: #ffffff;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	z-index: 2000;
	margin-left: auto;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
	transition: transform 0.2s ease, background-color 0.3s ease;
}

.menu-toggle:hover {
	transform: scale(1.05);
}

/* Traits noirs à l'intérieur */
.menu-toggle .line {
	width: 18px;
	height: var(--line-height);
	background-color: #000000;
	border-radius: 1px;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Transformation des traits en "X" noir */
.menu-toggle.active .line:nth-child(1) {
	transform: translateY(6px) rotate(45deg);
}

.menu-toggle.active .line:nth-child(2) {
	opacity: 0;
}

.menu-toggle.active .line:nth-child(3) {
	transform: translateY(-6px) rotate(-45deg);
}

/* EFFET RESEAUX SOCIAUX */
.box {
  /* Transition pour un effet fluide */
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 1;
  transform: translateY(0);
}

/* Classe appliquée pendant le scroll */
.box.is-scrolling {
  opacity: 0;
  transform: translateY(20px); /* Glisse vers le bas */
  pointer-events: none; /* Désactive les clics quand invisible */
}


/* --- CONFIGURATION DOTS DE BASE : PC & MOBILE LANDSCAPE --- */
/* Puces centrées verticalement sur le côté droit */
.dots-navigation {
  position: fixed;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column; /* Alignement vertical */
  gap: 12px;
  
  background: rgba(0, 0, 0, 0.5);
  padding: 8px;
  border-radius: 20px;
  backdrop-filter: blur(5px);  
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.4);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background-color: #fff;
  transform: scale(1.3);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* Adaptabilité mobile */
@media (max-width: 768px) and (orientation: portrait) {
	.header {
		padding: 1.5rem 1.5rem;
	} 
	
	/* Affiche le burger */
 	.menu-toggle {
		display: flex;
		z-index: 9999;
	} 
	
  /* 1. Isolation propre du conteneur mobile */
  .nav-links {
    position: fixed;
    top: 30px;
    right: 30px;
    width: 50%;
    height: 50vh;
	background-color: rgba(153,0,0,1);
	
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.8rem;
    z-index: 9998;
    overflow-y: auto;

    transform-origin: calc(100% - 2.8rem) 2.8rem;
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
  }

  .nav-links.active {
    transform: scale(1);
    opacity: 1;
    pointer-events: auto;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
	
	border-radius:16px 16px 16px 16px;
  }

  .nav-links.is-closing {
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
  }

  /* 2. Isolation explicite des éléments de liste */
  .nav-links li {
    list-style: none;
    margin: 0;
    padding: 0;
    display: block;
  }

  /* 3. Déclaration complète du lien et du trait */
  .nav-links a {
    display: relative;
    position: relative;

    color: var(--text-color);
    text-decoration: none;
    padding-bottom: 6px;
    
    /* Force le navigateur à créer un nouveau contexte d'affichage pour l'animation */
    will-change: transform;
    -webkit-tap-highlight-color: transparent;
	
	/* Fixe la taille du texte des liens */
    font-size: 1rem; /* ~24px : modifiez cette valeur selon vos préférences */
    font-weight: 500;   /* Ajuste l'épaisseur du texte */
    line-height: 0.5;   /* Contrôle l'interlignage */
  }
 
  /* Redéfinition intégrale du trait ::after pour le mode mobile */
  .nav-links a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--line-height, 2px);
    background-color: var(--accent-color, #ffffff);
    
    /* Force le masquage par défaut */
    transform: scaleX(0) !important;
    transform-origin: right !important;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

  	/* Déclenchement garanti de l'affichage du trait */
  	.nav-links a.active::after,
  	.nav-links a:hover::after,
  	.nav-links a:focus::after,
  	.nav-links a:active::after {
    	transform: scaleX(1) !important;
    	transform-origin: left !important;
  	}
	
	/* Puces centrées horizontalement en haut sous le header */
    .dots-navigation {
    right: auto;
    left: 50%;
    top: 15px;
    transform: translateX(-50%);
    flex-direction: row; /* Alignement horizontal */
    background: rgba(0, 0, 0, 0.5);
  }
}

/* --- MENU PAYSAGE : EXTENSION PURE DEPUIS LE TOGGLE SANS GLISSEMENT --- */
@media (max-height: 500px) and (orientation: landscape) {

  .menu-toggle {
    display: flex;
    z-index: 9999;
  }

  .nav-links {
    position: fixed;
    top: 25px;
    left: 50%;
    right: auto;
    width: auto;
    max-width: 90vw;
    height: auto;
    padding: 0.8rem 1.5rem;
    
    background-color: rgba(153,0,0,1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 30px;
    
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    z-index: 9998;

    /* Ancrage virtuel vers le coin supérieur droit (vers le bouton toggle) */
    transform-origin: calc(100% + 30vw) -10px;

    /* ÉTAT MASQUÉ : Réduit à 0 au point d'ancrage, centré horizontalement */
    transform: translateX(-50%) scale(0);
    opacity: 0;
    pointer-events: none;
    
    /* Animation fluide de dépliage/agrandissement */
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  }

  /* ÉTAT ACTIF : Agrandissement jusqu'à sa taille réelle au centre */
  .nav-links.active {
    transform: translateX(-50%) scale(1);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    font-size: 0.85rem;
    line-height: 1;
    white-space: nowrap;
  }

  .dots-navigation {
    position: fixed;
    left: 15px;
    right: auto;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
  }
}