/**
* Indexhibit - Menu horizontal fixe ultra fin, sections horizontales, dropdown, exhibit centré
* Hover color #5E00A1
*/

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400..800;1,400..800&family=Zain:ital,wght@0,200;0,300;0,400;0,700;0,800;0,900;1,300;1,400&display=swap');

:root {
  --margin: 4vw;
  --margin900px: 18px;
}

body {
  font-size: 16px;
  font-family: "Zain",'Helvetica Neue', Arial, Helvetica, Verdana, sans-serif;
  font-weight: 700;
  background: #fff;
  color: #000;
  line-height: 1.4em;
  padding-top: 3vw; /* ajusté pour barre très fine */
  margin: 0;
}

/* LIENS GLOBAUX */
a:link, a:visited { text-decoration: none; color: #000; }
a:hover { text-decoration: underline; color: #5E00A1; }
a:active { text-decoration: none; color: #00cc00; }

/* CONTENEUR */
.container { padding: var(--margin); max-width: 1200px; margin: 0 auto; }

/* MENU HORIZONTAL FIXE - barre ultra fine */
#topmenu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #fff;
  padding: 0.2vw 0.75vw;  /* barre très fine */
  border-bottom: 1px solid #ddd;
  z-index: 9999;
}

/* Conteneur englobant toutes les sections */
.menu-sections {
  display: flex;
  gap: 3vw;                 
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;  /* menu aligné à gauche */
}

/* Chaque UL section */
.menu-sections > ul.section {
  display: inline-flex;  
  flex-direction: row;
  gap: 1.5vw;            
  margin: 0;
  padding: 0;
}

/* LI dans chaque section */
.menu-sections ul.section li {
  display: inline-block;
  position: relative;   
}

/* LIENS dans chaque item */
.menu-sections ul.section li a {
  display: block;
  padding: 0.1vw 0.5vw;    /* padding minimal pour barre ultra fine */
  text-decoration: none;
  color: #000;
  font-weight: 700;
  font-size: 1.2vw;       
  transition: background 0.3s, color 0.3s;
}

/* Hover liens */
.menu-sections ul.section li a:hover {
  color: #5E00A1;
}

/* DROPDOWN (sous-menus) */
.menu-sections li ul {
  display: none;              
  position: absolute;
  top: 100%;                  
  left: 0;
  background: #fff;
  padding: 0;
  margin: 0;
  list-style: none;
  flex-direction: column;     
  gap: 0;
  z-index: 10000;
}

/* Affichage du dropdown au survol du parent */
.menu-sections li:hover > ul {
  display: flex;
}

/* LIENS DANS DROPDOWN */
.menu-sections li ul li a {
  padding: 0.1vw 0.5vw;
  white-space: nowrap;
  display: block;
  font-size: 1.1vw;       
}

/* Hover liens du dropdown */
.menu-sections li ul li a:hover {
  color: #5E00A1;
}

/* CONTENU DES PAGES - centré horizontalement */
#exhibit {
  margin: 3vw auto 0 auto;   
  max-width: 800px;           
  padding: 20px;
  text-align: center;         
}

/* Paragraphes et code */
#exhibit p, #exhibit code, #exhibit blockquote {
  max-width: 100%;
  margin: 0 auto 1em auto;
  line-height: 1.5em;
}

/* TITRES */
h1, h2, h3, h4 {
  margin-bottom: 1em;
  font-weight: bold;
}

/* RESPONSIVE */
@media only screen and (max-width: 900px) {
  body { padding-top: 6vw; }

  .menu-sections {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .menu-sections > ul.section,
  .menu-sections li ul {
    flex-direction: column;
    width: 100%;
    gap: 0;
    position: relative;
    border: none;
    border-radius: 0;
  }

  .menu-sections ul.section li a,
  .menu-sections li ul li a {
    width: 100%;
    padding: 10px;
    font-size: 4vw;
  }

  #exhibit {
    margin: 6vw auto 0 auto;
    padding: 10px;
  }
}
