/* ----- Style général ----- */
body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, 
      #8400ffa1,  
      #ff13759f,
      #ffae0091,  
      #ff004091,  
      #ea00ffa1,  
      #8400ffa8  
  );
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: #2d2d2d;
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ----- Conteneur principal ----- */
main {
  scroll-behavior: smooth;
  flex-grow: 1;
  background: #ffbfbf75;
  border-radius: 20px;
  margin: 20px;
  padding: 30px;
  overflow-y: auto;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

/* ----- Conteneur latéral (aside) ----- */
aside {
  width: 70px; /* réduit par défaut */
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 25px 10px;
  border-radius: 0 20px 20px 0;
  box-shadow: 4px 0 20px rgba(0,0,0,0.1);
  transition: width 0.8s cubic-bezier(0.46, -0.01, 0.33, 0.99), 
              padding 0.8s cubic-bezier(0.46, -0.01, 0.33, 0.99), 
              align-items 0.8s cubic-bezier(0.46, -0.01, 0.33, 0.99); /* Transition plus lente */
  position: relative;
  z-index: 10;
}

aside:hover {
  width: 250px;
  align-items: flex-start;
  padding-left: 20px;
}

/* ----- Logos dans la navbar ----- */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 116px;
  position: relative; /* Ajouté pour que le positionnement de logo soit relatif à la navbar */
}

.logo-mini {
  display: block;
  opacity: 1;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.logo-full {
    display: none;
    opacity: 0;
    transition: opacity 0.5s 
ease, transform 0.5s 
ease;
    position: absolute;
    top: 12%;
    left: -7%;
    transform: translate(-50%, -50%);
}
img.logo-mini {
  width: 100%;
}

aside:hover .logo-mini {
  opacity: 0;
  transform: scale(0.8);
}

aside:hover .logo-full {
  display: block;
  opacity: 1;
  transform: scale(1);
}

/* ----- Navigation ----- */
nav {
  display: flex;
  flex-direction: column;
  width: 100%;
  font-weight: 700;
  transition: all 0.8s ease; /* Transition plus douce sur tous les changements */
      margin-top: -60%;
}

nav a {
  color: #e0e7ff;
  text-decoration: none;
  padding: 12px;
  margin: 21px 0;
  border-radius: 12px;
  transition: background-color 0.3s ease, color 0.3s ease; /* Transition douce sur fond et couleur du texte */
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  overflow: hidden;
  width: 100%;
}

nav a span {
  display: none;
  transition: opacity 0.3s ease;
}

aside:hover nav a span {
  display: inline;
}

nav a:hover,
nav a.active {
  background-color: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* ----- Icones dans la navbar ----- */
nav a i {
  font-size: 20px;
  width: 24px;
  text-align: center;
}

/* ----- Menu de navigation ----- */
nav {
  display: flex;
  flex-direction: column;
  width: 100%;
  font-weight: 700;
}

nav a:hover, 
nav a.active {
  background-color: rgba(255, 255, 255, 0.15);
  color: #fff;
  width: auto;
}

/* ----- Bouton Premium ----- */
.upgrade {
  margin-top: auto;
  background: #f472b6;
  border: none;
  padding: 12px 25px;
  border-radius: 12px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.upgrade:hover {
  background: #ec4899;
}

/* ----- Sections du contenu principal ----- */
section {
  background: #fdfdff;
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 25px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
  margin-top: 20px;
}

.section-description {
  margin-bottom: 5px;
}

h1 {
  margin-left: 10px;
}

.titrepage {
  color: #dd00ff;
  font-weight: 900;
  margin-bottom: 60px;
}

h2 {
  color: #312e81;
  margin-bottom: 15px;
}

/* ----- Slider ----- */
label, #yearValue {
  font-weight: 500;
  color: #4b5563;
}

input[type="range"] {
  width: 300px;
  margin: 10px;
  accent-color: #6366f1;
}

/* ----- Carte et graphiques ----- */
#map, canvas, #chartProjection {
  border-radius: 10px;
  overflow: hidden;
}

/* Scroll doux */
main::-webkit-scrollbar {
  width: 8px;
}

main::-webkit-scrollbar-thumb {
  background-color: rgba(99, 102, 241, 0.4);
  border-radius: 8px;
}

footer {
  width: 73px;
  color: white;
}

div#accueil {
  color: rgb(255, 255, 255);
}
