/* ==========================================================
   THEME.CSS — version corrigée (html.light / html.dark)
   ========================================================== */

/* --- Reset minimal --- */
html, body, div, span, p, a, img, footer, nav, section {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  vertical-align: baseline;
}

article, aside, footer, header, nav, section {
  display: block;
}

/* --- Corps global --- */
html, body {
  height: 100%;
  font-family: 'Roboto', sans-serif;
  line-height: 2rem;
  transition: background-color .3s ease, color .3s ease;
}

/* --- Liens généraux --- */
a {
  font-weight: bold;
  text-decoration: none;
  transition: color .25s ease;
}

#goLastPage {
  text-decoration: underline;
  font-weight: bold;
  font-size: 18px;
}

/* --- Boutons généraux --- */
button {
  background-color: transparent;
  outline: none;
  border: none;
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease;
}

/* ==========================================================
   NAVIGATION
   ========================================================== */
.topnav {
  box-shadow: 0 0 0.18em black;
  padding-top: 1.5%;
  margin-bottom: 3.5%;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  border: none;
  overflow: hidden;
  height: 3.5em;
  transition: background-color .3s ease, color .3s ease;
}

.topnav a {
  display: block;
  padding: 14px 16px;
  font-size: 16px;
}

#icon {
  display: none;
  width: 10%;
  font-size: 1.7em;
}

#navbar_header {
  padding: 0;
}

#logo {
  position: relative;
  top: -20.6%;
  padding: 0;
}

#logo:hover {
  background-color: transparent;
}

/* --- Dropdown --- */
#dropdown {
  float: left;
  overflow: hidden;
  position: relative;
}

#dropdown-content {
  display: none;
  position: absolute;
  min-width: 10%;
  z-index: 1;
  height: 6.8em;
  box-shadow: 0px -3.7px 0px 0px rgba(255, 255, 255, 0.4);
}

#dropdown-content a {
  float: none;
  padding: 12px 14px;
  display: block;
  position: relative;
  top: -0.2em;
}

#dropdown:hover #dropdown-content {
  display: block;
}

.topnav a:hover,
#dropdown:hover .dropbtn {
  background-color: #609dd2;
}

/* --- Bouton changement de thème --- */
#tmode-toggle, #de-en-fr-toggle,#eng-fr-toggle,#de-fr-en-toggle, #panel-toggle {
  cursor: pointer;
}

/* RESPONSIVE LIENS DANS TOPNAV */

/* ==========================================================
   RESPONSIVE NAVIGATION — avec effet expand/collapse fluide
   ========================================================== */
@media screen and (max-width: 600px) {
  .topnav {
    display: block;
    height: 3.75em;
    padding-top: 0;
    overflow: hidden;
    transition: height 0.5s ease-in-out, background-color 0.3s ease, color 0.3s ease;
  }

  /* ---- Liens du menu (cachés au départ) ---- */
  .topnav a,
  #dropdown .dropbtn,
  nav button[id=theme-toggle] {
    display: none;
    margin-left: auto;
    font-size: 0.95em;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
  }

  /* ---- Icône burger + logo : toujours visibles ---- */
  #icon,
  #logo {
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
  }

  #icon {
    font-size: 1.7em;
    cursor: pointer;
  }

  /* ---- Header du navbar ---- */
  .topnav #navbar_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  /* ---- États expand/collapse avec transition ---- */
  .topnav.responsiveheight1 {
    height: 31.3em;
  }

  .topnav.responsiveheight2 {
    height: 37.3em;
  }

  /* ---- Pas de hover sur mobile ---- */
  #dropdown:hover #dropdown-content {
    display: none;
  }

  /* ---- Liens visibles quand le menu est ouvert ---- */
  .topnav.responsive a,
  .topnav.responsive #dropdown .dropbtn,
  .topnav.responsive nav button[id=theme-toggle] {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .topnav.responsive button[id=theme-toggle] {
    display: block;
    width: 100%;
    padding: 6px 16px;
    text-align: left;
  }

  .topnav.responsive #dropdown {
    float: none;
  }

  .topnav.responsive #dropdown-content {
    position: relative;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  }

  .topnav.responsive #dropdown .dropbtn {
    display: block;
    width: 100%;
  }

  #dropdown-content a {
    top: initial;
  }

  /* ---- Logo ---- */
  #logo {
    margin-left: 0;
    display: block;
    top: -0.7em;
  }

  /* ---- Footer mobile ---- */
  #apropos {
    flex-direction: column;
    gap: 1em;
  }

  footer {
    padding-bottom: 6%;
  }

  /* ---- Bouton retour haut ---- */
  #topbtn {
    font-size: 20px;
  }
}

/* --- FIN RESPONSIVE NAV ---*/
/* ==========================================================
   CONTENU PRINCIPAL
   ========================================================== */
#home {
  max-width: 800px;
  margin: 60px auto;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 0 12px rgba(0,0,0,0.4);
}

h2 {
  text-align: center;
}

p {
  font-size: 16px;
  line-height: 1.8rem;
}

li {
  font-size: 16px;
}

/* ==========================================================
   FOOTER
   ========================================================== */
footer {
  text-align: justify;
  padding: 1.5%;
  box-shadow: 0 0 0.18em black;
  margin-top: auto;
}

#apropos {
  display: flex;
}

.lien_apropos {
  text-decoration: none;
}

@media screen and (max-width: 600px) {
  #apropos {
    flex-direction: column;
    gap: 1em;
  }
  footer {
    padding-bottom: 6%;
  }
}

/* ==========================================================
   BOUTON RETOUR HAUT
   ========================================================== */
#topbtn {
  display: block;
  position: fixed;
  bottom: 20px;
  right: 1%;
  z-index: 99;
  border: none;
  color: darkgrey;
  cursor: pointer;
  padding: 0;
  font-size: 25px;
  transition: opacity 1s;
  border-radius: 20px;
  visibility: hidden;
  pointer-events: none;
}

.fa-arrow-alt-circle-up:hover {
  color: white;
}

@media screen and (max-width: 600px) {
  #topbtn {
    font-size: 20px;
  }
}

/* ==========================================================
   THÈME CLAIR
   ========================================================== */
html.light {
  background-color: #f5f0e3;
  color: #151310;
}

html.light a {
  color: #242320;
}

html.light #dropdown-content {
  background-color: #2f2c25;
}

html.light #dropdown-content a {
  color: #f9f9f6;
}

html.light .topnav {
  background-color: #f9f9f6;
}

html.light #tmode-toggle {
  color: #2f2c25;
}

html.light h2 {
  color: #2f2c25;
}

html.light .texte_apropos {
  color: #2f2c25;
}

html.light .lien_apropos {
  color: #2f2c25;
}

/* ==========================================================
   THÈME SOMBRE
   ========================================================== */
html.dark {
  background-color: #222327;
  color: hsla(0, 0%, 100%, .8);
}

html.dark a {
  color: hsla(0, 0%, 100%, .9);
}

html.dark #dropdown-content {
  background-color: #f9f9f9;
}

html.dark #dropdown-content a {
  color: #000;
}

html.dark #goLastPage{ 
color:rgb(183,159,94);

}
html.dark .topnav {
  background-color: #1e1e1e;
}

html.dark #tmode-toggle {
  color: rgb(252, 186, 0);
}

html.dark h2 {
  color: rgb(183, 159, 94);
}

html.dark .texte_apropos {  
  color: white;
}

html.dark .lien_apropos {
  color: rgb(252, 186, 0);
}
.lang-flash {
  background: rgba(0, 255, 42, 0.6);
  transition: background 0.6s ease;
}