/* RESET simple */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Georgia, serif;
  font-size: 20px;
  line-height: 1.6;
  background: #ffffff;
  color: #000000;
  margin: 0 auto;
  max-width: 1200px;
  padding: 0 20px;
}

/* Bloc logo */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: bold;
  color: #003366;
}

.logo-img {
  width: 60px;
  height: 60px;
}

.logo span {
  color: #003366;
  font-size: 20px;
  font-weight: bold;
}

/* HEADER */
header {
  background: #E0ECFF;
  color: #003366;
  padding: 10px 20px;
  border-bottom: 2px solid #99BBFF;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 15px;
}

.nav-links a {
  color: #003366;
  text-decoration: none;
  padding: 5px 10px;
  transition: background 0.3s, color 0.3s;
}

.nav-links a:hover {
  background: #99BBFF;
  color: #ffffff;
  border-radius: 4px;
}

/* MAIN */
main {
  padding: 20px;
}

main p {
  line-height: 1.7;
  margin-bottom: 1.2em;
}

/* FOOTER */
footer {
  background: #99BBFF;
  color: #003366;
  text-align: center;
  padding: 15px;
  margin-top: 30px;
  border-top: 2px solid #E0ECFF;
}

/* Bouton hamburger */
.hamburger {
  display: none;
  font-size: 1.5em;
  background: none;
  border: none;
  color: #003366;
  cursor: pointer;
}

/* Mode mobile */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    background: #E0ECFF;
    position: absolute;
    top: 60px;
    right: 0;
    width: 200px;
    padding: 10px;
    border-left: 2px solid #99BBFF;
    border-bottom: 2px solid #99BBFF;
  }

  .nav-links.show {
    display: flex;
  }

  .hamburger {
    display: block;
  }
}

/* Messages de page */
.page-message {
  margin-top: 1em;
  padding: 10px;
  border-radius: 8px;
  font-weight: bold;
  text-align: center;
  background: #E0ECFF;
  border: 1px solid #99BBFF;
  color: #003366;
}

.page-message.accueil { background: #D6E4FF; }
.page-message.page1   { background: #CCE0FF; }
.page-message.page2   { background: #B3D1FF; }
.page-message.page3   { background: #99BBFF; color: #ffffff; }
.page-message.contact { background: #6699FF; color: #ffffff; }

/* Navigation Animaginaux */
.animaginaux-nav {
  margin-bottom: 20px;
  padding: 10px;
  background: #E0ECFF;
  border: 1px solid #99BBFF;
  border-radius: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.animaginaux-nav a {
  display: inline-block;
  padding: 6px 10px;
  color: #003366;
  text-decoration: none;
  font-weight: bold;
  border-radius: 4px;
  transition: background 0.3s, color 0.3s;
}

.animaginaux-nav a:hover {
  background: #6699FF;
  color: #ffffff;
}

/* Images style encyclopédie */
.animaginaux-figure {
  display: block;
  margin: 2em auto;
  max-width: 37.5%;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  overflow: hidden;
  position: relative;
}

.animaginaux-img {
  display: block;
  width: 100%;
  height: auto;
}

.animaginaux-figure figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 51, 102, 0.8);
  color: #fff;
  font-size: 0.9rem;
  text-align: center;
  padding: 6px 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.animaginaux-figure:hover figcaption {
  opacity: 1;
}

@media (max-width: 768px) {
  .animaginaux-figure { max-width: 70%; }
}
@media (max-width: 480px) {
  .animaginaux-figure { max-width: 90%; }
}

/* Navigation Glossaire */
.glossaire-nav {
  margin-top: 20px;
  padding: 10px;
  background: #E0ECFF;
  border: 1px solid #99BBFF;
  border-radius: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.glossaire-nav a {
  display: inline-block;
  padding: 6px 10px;
  color: #003366;
  text-decoration: none;
  font-weight: bold;
  border-radius: 4px;
  transition: background 0.3s, color 0.3s;
}

.glossaire-nav a:hover {
  background: #6699FF;
  color: #ffffff;
}

/* Fiches du glossaire */
.lexi-fiche {
  background: #fff;
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 4px 12px rgba(0,0,0,.05);
}

.lexi-fiche h2 {
  margin-top: 0;
  font-size: 1.8rem;
  color: #003366;
}

.lexi-fiche .prononciation {
  font-style: italic;
  color: #666;
  margin-bottom: 15px;
}

.lexi-fiche h3 {
  margin-top: 1em;
  font-size: 0.9rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #333;
}

.lexi-fiche ol { margin-left: 1.2em; }

.lexi-fiche .voir-aussi {
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px dashed rgba(0,0,0,.2);
  font-style: italic;
}

/* === Style global des liens (contenu uniquement) === */
a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed #ccc;
  padding-bottom: 2px;
  transition: border-color 0.3s ease;
}

a:hover {
  border-bottom-color: #666;
}

/* Exceptions : menus et bannières de navigation (pas de soulignement) */
.nav-links a,
.glossaire-nav a,
.animaginaux-nav a,
.dropdown-content li a {
  border-bottom: none !important;
}

/* ========================================= */
/* CORRECTION DU MENU DÉROULANT (SOUS-MENUS) */
/* ========================================= */

.dropdown {
  position: relative;
  display: inline-block;
}

/* Le conteneur du sous-menu */
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #ffffff; /* Fond blanc */
  min-width: 220px;
  box-shadow: 0px 8px 16px 0px rgba(0, 51, 102, 0.2); /* Ombre bleutée */
  z-index: 1000;
  list-style: none;
  padding: 0;
  margin: 0;
  top: 100%;
  left: 0;
  border-radius: 4px;
  border: 1px solid #99BBFF; /* Bordure bleue claire */
}

/* Liens dans le sous-menu */
.dropdown-content li a {
  color: #003366 !important; /* Texte bleu foncé obligatoirement */
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  border-bottom: 1px solid #E0ECFF; /* Séparateur bleu très clair */
  font-weight: normal;
  background-color: #ffffff;
}

/* Survol des liens du sous-menu */
.dropdown-content li a:hover {
  background-color: #E0ECFF !important; /* Fond bleu clair au survol */
  color: #003366 !important; /* Texte reste bleu foncé */
  border-bottom-color: #99BBFF;
}

/* Affichage au survol (Desktop uniquement) */
@media (min-width: 769px) {
  .dropdown:hover .dropdown-content {
    display: block;
  }
  
  .dropbtn::after {
    content: " ▼";
    font-size: 0.7em;
    vertical-align: middle;
    margin-left: 4px;
  }
}

/* Adaptation Mobile */
@media (max-width: 768px) {
  .dropdown-content {
    position: static;
    box-shadow: none;
    border: none;
    background-color: #D6E4FF; /* Fond légèrement plus foncé pour distinguer sur mobile */
    padding-left: 15px;
    display: none; /* Caché par défaut sur mobile, géré par JS */
  }
  
  .dropdown-content li a {
    border-bottom: 1px solid #99BBFF;
    font-size: 0.9em;
    color: #003366 !important;
    background-color: #D6E4FF !important;
  }
  
  .dropdown-content li a:hover {
    background-color: #99BBFF !important;
    color: #ffffff !important;
  }
}

/* ========================================= */
/* STYLE DES TABLEAUX (Charte Neologicon)    */
/* ========================================= */

/* Conteneur pour permettre le scroll sur mobile si le tableau est large */
.table-responsive {
  overflow-x: auto;
  margin: 20px 0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 51, 102, 0.1);
}

table {
  width: 100%;
  border-collapse: collapse;
  background-color: #ffffff;
  font-family: Georgia, serif;
  font-size: 0.95em; /* Légèrement plus petit que le texte courant pour la lisibilité */
  min-width: 600px; /* Force le scroll sur très petits écrans */
}

/* En-tête du tableau */
thead tr {
  background-color: #003366; /* Bleu foncé */
  color: #ffffff;
  text-align: left;
}

thead th {
  padding: 15px 18px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
}

/* Corps du tableau */
tbody tr {
  border-bottom: 1px solid #99BBFF;
  transition: background-color 0.2s ease;
}

/* Cellules du corps */
tbody td {
  padding: 12px 18px;
  color: #003366;
  border: none;
}

/* Alternance des couleurs (Zebra striping) */
tbody tr:nth-of-type(even) {
  background-color: #E0ECFF; /* Bleu très clair */
}

tbody tr:nth-of-type(odd) {
  background-color: #ffffff; /* Blanc */
}

/* Effet au survol d'une ligne */
tbody tr:hover {
  background-color: #D6E4FF; /* Bleu intermédiaire */
  cursor: default;
}

/* Dernière ligne sans bordure */
tbody tr:last-of-type {
  border-bottom: 2px solid #003366;
}

/* Adaptation Mobile */
@media (max-width: 768px) {
  .table-responsive {
    border: 1px solid #99BBFF;
  }
  
  thead th {
    font-size: 0.85em;
    padding: 10px;
  }
  
  tbody td {
    padding: 10px;
    font-size: 0.9em;
  }
}
/* FIN DU FICHIER - Les styles d'info-bulles ont été supprimés car gérés dans le HTML */

