@media (max-width: 600px) {
  .BG1 {
    width: 98%;
    padding: 0.5rem;
  }
  .BG1 h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
    width: 100%;
    word-break: break-word;
  }
  .BG1 p {
    font-size: 1rem;
    line-height: 1.4;
    margin: 0.5rem auto;
    text-align: center;
  }
  .code-python {
    width: 100%;
    max-width: 100%;
    margin-left: -2vw;
    margin-right: -2vw;
    padding: 0.7rem 2vw;
    font-size: 1.05rem;
    overflow-x: auto;
    box-sizing: border-box;
  }
  .code-python h3,
  .language-python {
    max-width: 100%;
    overflow-x: auto;
    box-sizing: border-box;
  }
  .code-python h3 {
    font-size: 1.2rem;
    text-align: center;
  }
  .language-python {
    font-size: 0.95rem;
    word-break: break-word;
    white-space: pre;
    overflow-x: auto;
    display: block;
  }
}
:root {
  --color-bg-body: #1D1D1B;
  --color-p-text: #EAE4DA;
  --color-title2a: #808BC5;
  --color-bg-card: #245E55;
  --color-title1: #EAC119;
  --color-a: #EAA7C7;
  --color-title2b: #ED773C;
  --sky: #9ED6DF;
  --color-ahover: #C63F3E;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg-body);
  color: var(--color-p-text);
   font-family: "DM Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
  margin: 0;
}





/* NAV */

nav {
  background-color: var(--color-p-text);
  color: var(--color-bg-body) !important;
  padding: 1rem;
  margin: 0;
  position: fixed;
  width: 100%;
  max-height: 5%;
  top: 0;
  z-index: 1000; /* Assure que la navbar est au-dessus des autres éléments */
   display: flex;
   flex-wrap: wrap;
   align-items: center;
   justify-content: center;
   gap: 5rem;
}

nav a {
  color: var(--color-bg-body);
  text-decoration: none;
}

.nav-ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin : auto auto;
  gap: 5rem;
  padding: 0;
  font-weight: 700;
  font-size: 1.5rem;
    max-height: 5%;

}
@media (max-width: 600px) {
  nav {
    padding: 0.5rem;
  }
  .nav-ul {
    flex-direction: row;
    font-size: 1rem;
    gap: 0.3rem;
  }
  .nav-ul li {
    min-width: 0;
    flex: 1 1 0;
    text-align: center;
  }
}



.BG1 {
  background-color: var(--color-bg-body);
  color: var(--color-p-text);
  width: 50%;
  padding: 2rem ;
  margin-top: 2%; /* Pour compenser la hauteur de la navbar */
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.BG1 h2 {
  font-size: 300%;
  margin-bottom: 0.5rem;
  text-align: center;
}

.BG1 p {
  font-size: 120%;
  line-height: 1.6;
  text-align: center;
  margin: auto;
}

.code-python {
  background-color: var(--color-p-text);
  width: 50%;
  color: var(--color-bg-body);
  padding: 2rem;
  margin-top: 1%; /* Pour compenser la hauteur de la navbar */
  margin-left: auto;
  margin-right: auto;
  border-radius: 3%;
}

.code-python h3{
    text-align: center;
    font-size: 200%;
}

.language-python {
    text-align: left;
}

.download-section {
  text-align: center;
  margin: 2% 0;
}

.download-section p {
  font-size: 100%;
  margin-bottom: 1rem;
  width: 50%;
  margin: auto;
}

.download-btn {
  background-color: var(--color-bg-card);
  color: var(--color-p-text);
  padding: 1rem 2rem;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease;
  margin-bottom: 1rem; /* Optionnel, espace en dessous */
  display: inline-block;
}

.download-btn:hover {
  background-color: var(--color-p-text);
  color: var(--color-bg-body);
  text-decoration: none;
}