body {
  font-family: Arial, sans-serif;
  margin: 20px;
  background-color: #000000;
  color: #fff;
  animation: fadeInUp 1s ease forwards;
}

h1{
  font-family: 'bebas neue';
  text-align: center;
  font-size: 4rem;
  margin: 2px;
  z-index: 1;
}

h2{
  font-family: 'open sans';
  text-align: center;
  font-size: 1.3rem;
  font-weight: 100;
  margin: 2px;
  color: #facfbf;
  z-index: 1;
  animation: fadeInUp 1s ease forwards;
}

.lottie{
  height: 100%;
}

.question-container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .question {
    position: absolute;
    text-align: center;
    font-size: 2rem;
    font-family: 'bebas neue';
    font-weight: bold;
    color: #fff;
    opacity: 0;
    transform: scale(0.6);
    white-space: pre-line;
  }

.main-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  margin: 40px;
  margin-top: 50px;
  flex-wrap: nowrap; 
}

 #video-tooltip {
      position: absolute;
      width: 120px;        
      height: 120px;      
      pointer-events: none;
      display: none;
      border-radius: 6px;
      overflow: hidden;
      box-shadow: 0 4px 15px rgba(0,0,0,0.3);
      z-index: 1000;
    }

    #tooltip-video {
      width: 100%;
      height: 100%;
      object-fit: cover;   
      display: block;
    }

.text-section {
  flex: 0 0 300px; 
  max-width: 300px;
  min-width: 0;    
  position: relative;
  top: 50px;
  height: fit-content;
}

.text-section h2 {
  font-size: 1.4rem;
  margin-bottom: 40px;
  font-family: 'bebas neue';
  color: #f7c1ae;
}

.text-section p {
  font-size: 0.9rem;
  color: rgb(208, 206, 206);
  line-height: 1.3;
  font-weight: lighter;
  font-family: 'helvetica';
}

.globes-container {
  flex: 1 1 auto;
  min-width: 600px; 
  flex-direction: row;
  flex-wrap: wrap; 
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeInUp 1s ease forwards;
  width: auto; 
  min-height: 600px;
}

.globe-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  flex: 0 0 50%;
  box-sizing: border-box; 
  max-width: 50%; 
}

.globe-wrapper h3 {
  margin-bottom: 10px;
  text-align: center;
  color: #e2e2e2;
  font-family: 'bebas neue';
}

.text-section .sub-caption {
    font-size: 12px; 
    color: #868686ff;
    font-style: normal;
    font-family: 'helvetica';
}


.map-wrapper {
  flex: 1;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 20px;
  border-radius: 15px;
  margin-top: 200px;
  cursor: pointer;
  gap: 4px; 
}

.map-wrapper .controls {
  text-align: center;
}

#carte {
  width: 100%;
  margin-top: 0;
  height: 500px;
}

/* Chart et tooltip */
.bar-group rect {
  stroke: #333;
  stroke-width: 1px;
}

.axis text {
  font-size: 12px;
}

.legend {
  font-size: 12px;
}

.legend rect {
  width: 15px;
  height: 15px;
  margin-right: 5px;
}

#chart-wrapper {
  width: 800px;
  height: 500px;
}

.slider {
  cursor: pointer;
  stroke: white;
  stroke-width: 1.5;
}

.second-section .text-section {
  margin-top:200px;
  margin-bottom: 50px;
  padding: 20px;
}

.second-section .text-section p {
  margin-bottom: 20px;
  line-height: 1.8;
}

.controls{
  color: #f7ad93;
  margin: 0;
  padding: 0;
  line-height: 1;
}
.controls label {
  font-family: 'bebas neue';
  font-size: 20px;
}

.controls select:focus {
  outline: none;
  border-color: #e67e22;
}
.controls select {
  border-radius: 5px;
  border: 1px solid #ccc;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.intro-earth-container {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.intro-earth-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.65);
  z-index: 0;
}

.intro-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 1;
  white-space: nowrap; 
}

.intro-text h1 {
  font-family: 'bebas neue';
  font-size: 5.5rem;
  margin: 0;
  color: #fff;
}

.intro-text h2 {
  font-family:'aptos';
  font-size: 1.4rem;
  font-weight: 200;
  color: #ffffff;
  margin: 0;

}
.intro-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
  flex-wrap: nowrap;
  margin-top: 40px;
}

.btn {
  width: 200px;
  appearance: none;
  background-color: rgba(0, 0, 0, 0.259);
  border: 2px solid #ffffff;
  border-radius: 1em;
  box-sizing: border-box;
  color: #ffffff;
  cursor: pointer;
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  line-height: normal;
  padding: 0.9em 2.3em;
  text-align: center;
  text-decoration: none;
  transition: all 300ms cubic-bezier(.23, 1, 0.32, 1);
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  will-change: transform;
}

.btn:disabled {
  pointer-events: none;
  opacity: 0.6;
}

.btn:hover {
  color: #000;
  background-color: #ffffff;
  box-shadow: rgba(251, 246, 244, 0.4) 0 8px 15px;
  transform: translateY(-2px);
}

.btn:active {
  box-shadow: none;
  transform: translateY(0);
}


.main-section.third-section {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 20px;
  margin-top: 100px; 
}

.third-section .text-section {
  flex: 1;
  margin-top: 0; 
}

.third-section .text-section h2 {
    margin-top: 0; 
}

.pie-container {
  flex: 2;
  max-width: 60%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  margin-top: 0; 
}

.pie-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
.pie-echarts {
  width: 100%;
  max-width: 920px;
  height: 760px; 
  box-sizing: border-box;
  overflow: visible;
  margin: 0 auto; 
  padding: 0;
  position: relative; 
  display: block;
}

.main-section.fourth-section {
    display: block; 
    width: 100%;
    justify-content: center;
    align-items: center;
    text-align: center;
}

#bar {
  width: 100%;
  height: 600px;
}
.bar-container {
    align-items: center;
    width: 100%;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.bar-echarts {
    width: 100%;
    height: 100%;
}

.intro-section {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.intro-section h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: #f7c1ae;
  line-height: 1.2;
  letter-spacing: 1px;
  text-shadow: 0px 2px 5px rgba(0,0,0,0.5);
  margin-bottom: 30px;
  animation: fadeInUp 1s ease forwards;
}

.intro-section p {
  font-family: 'Times New Roman', Times, serif;
  font-size: 1.3rem;
  font-weight: 400;
  color: #dcdcdc;
  line-height: 1.4;
  max-width: 800px;
  animation: fadeInUp 1s ease forwards;
  animation-delay: 0.2s;
  align-items: center;
  text-align: center;
  margin: 0 auto;
}

.background-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  object-fit: cover;
  z-index: -1;
  filter: brightness(0.45);
}

.main-section.fifth-section {
    position: relative;
    width: 100%;
    max-width: none;
    padding: 0;
    margin: 0;
    margin-bottom: 50px;
}

#lineD3 {
    margin-top: 70px;
    width: 100%;
    height: 700px;
    position: relative;
}

#yAxisLabel {
    position: absolute;
    left: 30px;
    top: 160px;
    color: #eee;
    font-size: 14px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 1;
    transform: none;
}

#XAxisLabel {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  color: #eee;
  font-size: 14px;
  pointer-events: none;
  z-index: 1;
}

#main {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}

#filters {
  position: absolute;
  top: 0; left: 0;
  width: 280px;
  height: 100vh;
  padding: 12px;
  background: rgba(30,30,30,0.9);
  color: #fff;
  font-family: sans-serif;
  overflow-y: auto;
  z-index: 1;
  box-shadow: 2px 0 8px rgba(0,0,0,0.5);
}

#filters h3 { margin-top: 0;
  font-family: 'bebas neue';
  color: #f7c1ae;
  margin-top: 30px;
  font-size: 2rem;
  text-align: center;
}

#filters label { display: block; margin-top: 12px; font-size: 0.9em; }

#filters select,
#filters input[type=range],
#filters input[type=text] {
  box-sizing: border-box;
  width: 100%;
  margin-top: 6px;
  margin-bottom: 12px;
  background: #222;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px;
}
#filters input[type=range] {
  width: calc(100% - 12px);
  display: block;
  margin-left: auto;
  margin-right: auto;
  height: 40px;
  border-radius: 3px;
  background: #444;
  accent-color: #f7c1ae;
}


#filters input[type=range] { accent-color: #f7c1ae; }

.suggestions {
  background: #333;
  border-radius: 6px;
  max-height: 150px;
  overflow-y: auto;
  position: relative;
  font-size: 0.8em;
}
.suggestions div {
  padding: 4px 6px;
  cursor: pointer;
}
.suggestions div:hover {
  background: #555;
}
#filters button {
  width: 125px;
  appearance: none;
  background-color: transparent;
  border: 2px solid #f7c1ae;
  border-radius: 1em;
  box-sizing: border-box;
  color: #f7c1ae;
  cursor: pointer;
  display: block;
  font-family: 'Helvetica';
  font-size: 16px;
  font-weight: 525;
  letter-spacing: 0.5px;
  line-height: normal;
  padding: 0.9em 2.3em;
  text-align: center;
  text-decoration: none;
  transition: all 300ms cubic-bezier(.23, 1, 0.32, 1);
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  will-change: transform;
  margin: 20px auto 0;
}

#filters button:disabled {
  pointer-events: none;
  opacity: 0.6;
}

#filters button:hover {
  color: #000;
  background-color: #f7c1ae;
  box-shadow: rgba(246, 232, 179, 0.4) 0 8px 15px;
  transform: translateY(1px);
}

#filters button:active {
  box-shadow: none;
  transform: translateY(0);
}
.home-button {
    position: fixed;
    top: 10px;
    left: 10px;
    font-size: 30px;
    text-decoration: none;
    color: #ffffff;
    background-color: rgba(0, 0, 0, 0.5); 
    padding: 10px 15px;
    border-radius: 8px;
    z-index: 1000; 
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

.home-button:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: scale(1.1); 
}
.sub-caption2 {
    font-size: 12px; 
    color: #868686ff;
    font-style: normal;
    font-family: 'helvetica';
    bottom: 10px;
    right: 10px;
    position: absolute;
    z-index: 1;
}

#scrollTopBtn {
  position: fixed;
  bottom: 1px;
  right: 10px;
  z-index: 1;
  background-color: #2c3e50;
  color: white;
  border: none;
  outline: none;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  transition: background-color 0.3s, transform 0.3s;
}

#scrollTopBtn:hover {
  background-color: #f39b28;
  transform: scale(1.1);
}

.synthese-container { overflow: hidden; }

.title {
  font-family: "Bebas Neue", sans-serif;
  color: white;
  font-size: 48px;
  text-align: center;
  margin: 15px 0;
  letter-spacing: 1px;
}
.viewer {
  width: 100vw;
  height: calc(100vh - 80px);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.viewer img {
  max-width: 90vw;
  max-height: 85vh;
  transform: translate(0,0) scale(1);
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
  cursor: grab;
}

@media (max-width: 1200px) {
  .intro-text h1 { font-size: 4rem; }
  .intro-text h2 { font-size: 1.25rem; }
  .pie-echarts { max-width: 820px; height: 700px; }
  .globes-container { min-height: 520px; }
}

@media (max-width: 1024px) {
  .main-section {
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 28px;
    margin: 30px auto;
  }

  .text-section {
    flex: 1 1 100%;
    max-width: 720px;
    text-align: center;
    top: 0;
    order: 1;
    margin: 0 auto;
  }

  .globes-container {
    min-width: 0;
    min-height: 420px;
    order: 2;
    padding: 10px;
  }

  .globe-wrapper { flex: 0 0 50%; max-width: 50%; }

  .pie-container { flex: 1 1 100%; max-width: 100%; }
  .pie-echarts { width: 100%; max-width: 760px; height: 640px; }

  #filters { width: 220px; max-height: 85vh; padding-bottom: 18px; }

  .intro-text h1 { font-size: 3.6rem; }
  .intro-text h2 { font-size: 1.15rem; }
}

@media (max-width: 768px) {
  .main-section {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    margin: 10px auto;
  }

  .text-section {
    flex: 1 1 100%;
    max-width: 95%;
    padding: 12px;
    text-align: center;
    top: 0;
  }

  .globes-container {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
    min-height: 360px;
    padding: 8px;
  }

  .globe-wrapper { flex: 0 0 100%; max-width: 100%; padding: 0 6px; }

  .map-wrapper { margin-top: 40px; padding: 12px; }
  #carte { height: 360px; }

  .pie-echarts { width: 100%; height: 420px; max-width: 100%; }

  #filters {
    position: static;
    width: 100%;
    height: auto;
    max-height: none;
    padding: 12px 14px;
    margin: 0;
    background: rgba(30,30,30,0.95);
    box-shadow: none;
  }

  .intro-text h1 { font-size: 2.6rem; white-space: normal; }
  .intro-text h2 { font-size: 1rem; }

  .intro-buttons { gap: 14px; flex-wrap: wrap; }
  .btn { width: 160px; padding: 0.7em 1.6em; }
}

@media (max-width: 480px) {
  .intro-text h1 { font-size: 2rem; }
  .intro-text h2 { font-size: 0.95rem; }

  .pie-echarts { height: 320px; }
  #carte { height: 300px; }

  #filters { padding: 8px; }
  #filters h3 { font-size: 1.2rem; }
  #filters button { width: 100%; max-width: none; }

  .text-section h2 { font-size: 1.2rem; }
  .text-section p { font-size: 0.95rem; line-height: 1.45; }

  .btn { width: 140px; font-size: 15px; }
  .home-button { font-size: 22px; padding: 8px 10px; }
  #scrollTopBtn { width: 40px; height: 40px; }
}

.chart-container {
  width: 100%;
  height: 640px;
  border-radius: 12px;
}

#chart_title{
  font-family: 'Bebas Neue';
  text-align: center;
  font-size: 1.5rem;
  margin: 10px;
  color: #f7c1ae;
  margin-top: 200px;
}
#chart_subtitle{
  font-size: 14px;
  margin: 0 auto;
  color: #b3b2b2ff;
  line-height: 1.3;
  font-family: 'helvetica';
  max-width: 700px;
  align-items: center;
  text-align: center;
}
#chart_note{
  font-size: 9px; 
  margin: 0 auto;
  color: #868686ff;
  font-style: normal;
  font-family: 'helvetica';
  text-align: center;
  line-height: 3;
}

.synthese-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px;
  height: calc(100vh - 12px);
  background: #101010;
}

.viewer-card {
  width: 100vw;
  max-width: 1400px;
  height: 100%;
  background: rgba(30,30,30,0.95);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.8);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 12px;
}

.viewer {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #1e1e1e;
}

.viewer img {
  max-width: 100%;
  max-height: 100%;
  transition: transform 0.15s ease;
  cursor: grab;
  z-index: 1;
}

.meta-panel {
  position: absolute;
  top: 26px;
  left: 56px;
  z-index: 50;
  max-width: 320px;
  padding: 12px 14px;
  background: rgba(0,0,0,0.35);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 0;
}

.meta-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 32px;
  color: #ffffff;
  margin: 0;
  line-height: 1.8;
}

.meta-desc {
  margin: 0;
  color: #d1d1d1;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}

.meta-sources {
  margin: 0;
  color: #787777;
  font-size: 12px;
  margin-top: 6px;
}
.meta-sources span {
  color: #d1d1d1;
}

.toolbar.side {
  position: absolute;
  bottom: 16px;
  left: 16px;
  top: auto;
  transform: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 0;
  background: rgba(40,40,40,0.7);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
}

.toolbar-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-ghost {
  appearance: none;
  border: none;
  background: linear-gradient(135deg, #e69679, #ff6347);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
  min-width: 60px;
  text-align: center;
}

.btn-ghost:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.6);
  background: linear-gradient(135deg, #ff9478, #ff7f50);
}

.caption {
  position: absolute;
  bottom: 12px;
  right: 32px;
  transform: none;
  max-width: 400px;
  color: #bdbdbd;
  font-size: 12px;
  padding: 6px 12px;
  background: rgba(0,0,0,0.40);
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.06);
  z-index: 20;
  text-align: right;
  white-space: normal;
  line-height: 1.3;
}

.btn-ghost:focus {
  outline: 2px solid rgba(247,193,174,0.25);
  box-shadow: 0 6px 18px rgba(247,193,174,0.06);
}


#video-tooltip {
  position: absolute;
  width: 120px;
  height: 120px;
  pointer-events: none;
  display: none;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  z-index: 1000;
}

#tooltip-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
