/* Style global */
body {
    font-family: raleway, sans-serif;
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.3;
}

/*-------------*/
/* Header fixe */
/*-------------*/

.fixed-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background-color: #333;
    color: white;
    position: fixed;
    width: 100%;
    height: 60px;
    top: 0;
    left: 0;
    padding: 0em 0.5em;
    z-index: 1000;
}

/* Icon et titre bannière */
.banner_icon{
	height: 100%;
}
.banner_icon #icon {
    background: url('img/icon.jpg') no-repeat;
    background-size: cover;
    background-position: center;
    height: 50px;
    width: 50px;
    display: block;
    margin: 5px;
    float: left;
}

.banner_icon #title {
    color: white;
	font-size: clamp(10px, 2vw, 15px);
    text-decoration: none;
    padding: 15px 5px;
	display: flex;
    align-items: center; /* Centre verticalement */
    justify-content: center; /* Centre horizontalement (optionnel) */
    height: 100%;
    box-sizing: border-box;
}

/* Container menu */
.fixed-header .container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-right: 4.5em;
}

.menu {
    display: flex;
    list-style-type: none;
    margin: 0;
    padding: 0;
	height:100%;
}

.menu li a {
    color: white;
	font-size:clamp(10px, 2vw, 15px);
    text-decoration: none;
    padding: 10px 20px;
	display: flex;
    align-items: center; /* Centre verticalement */
    justify-content: center; /* Centre horizontalement (optionnel) */
    height: 100%;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s;
}

.menu li a:hover {
    background-color: #ffb18c;
    color: #333;
}

/* Dropdown menu */
.dropdown-menu {
    display: none;
    position: absolute;
	z-index: 1000;
    background-color: #333;
    list-style: none;
    padding: 0;
    margin: 0;
	width: auto;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
	/* Animation */
	opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.dropdown-menu li a:hover {
    background-color: #ffb18c;
    color: #333;
}

/* Affichage au survol */
.dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0);
	transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

/*--------------------------------*/
/* --- Burger menu responsive --- */
/*--------------------------------*/

.menu-button-container {
  margin-left: auto; /* Pousse le menu burger à droite */
  display: none;
  height: 100%;
  width: 30px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
 }

#menu-toggle {
  display: none;
}

.menu-button,
.menu-button::before,
.menu-button::after {
  display: block;
  background-color: #fff;
  position: absolute;
  height: 4px;
  width: 30px;
  transition: transform 400ms cubic-bezier(0.23, 1, 0.32, 1);
  border-radius: 2px;
}

.menu-button::before {
  content: '';
  margin-top: -8px;
}

.menu-button::after {
  content: '';
  margin-top: 8px;
}

#menu-toggle:checked + .menu-button-container .menu-button::before {
  margin-top: 0px;
  transform: rotate(405deg);
}

#menu-toggle:checked + .menu-button-container .menu-button {
  background-color: rgba(255, 255, 255, 0);
}

#menu-toggle:checked + .menu-button-container .menu-button::after {
  margin-top: 0px;
  transform: rotate(-405deg);
}

/*----------------*/
/* -- Banniere -- */
/*----------------*/

.banner {
    height: 40vh;
    background: url('img/banner.jpg') no-repeat;
    background-size: cover;
    background-position: center;
    border-bottom: dotted #96a6b4;
	margin-top: 60px;
	margin-bottom: 50px;
}
.banner h1 {
	font-size: clamp(10px, 6vw, 40px);
    font-weight: normal;
	font-family: raleway, sans-serif;
    display: flex;
	padding: 0 40px;
	justify-content: center; /* Centre horizontalement */
	align-items: center; /* Centre verticalement */
	height: 100%; /* S'assure que le conteneur prend toute la hauteur disponible */
	color:#daa520;/*#ffe636*/
	background-color: rgba(0, 0, 0, 0.5);
}

/*--------------------*/
/* -- Menu flotant -- */
/*--------------------*/

#floating-menu {
    position: fixed;
    top: 60%;
    right: 1vw;
    transform: translateY(-50%);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    background-color: transparent;
}

#floating-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#floating-menu ul li {
    display: flex;
    justify-content: right;
	margin: 15px 0;
	padding: 5px 0;
}

#floating-menu ul li a {
    display: flex;
    align-items: center; /* Aligne verticalement le texte et le cercle */
    justify-content: space-between; /* Espacement entre le texte et le cercle */
    gap: 10px; /* Espace entre le texte et le cercle */
	padding: 1px 3px;
	text-decoration: none;
    color: transparent; /* Texte masqué */
    font-size: clamp(8px, 1vw, 12px);
}

/* Puces rondes SVG */
#floating-menu ul li svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: rgba(169, 100, 30, 0.8);
    stroke-width: 2;
    transition: fill 0.3s ease, stroke 0.3s ease, transform 0.3s ease;
}

/* Effet de survol */
#floating-menu ul li a:hover svg {
    stroke: rgba(169, 126, 50, 0.8);
}

/* Indicateur d'ancre active */
#floating-menu ul li a.active {
    color: rgb(169 126 50 / 60%);
}
#floating-menu ul li a.active svg {
    fill: rgba(169, 126, 50, 0.8); 
    stroke: rgba(169, 126, 50, 0.8);
}

/* Style de base */
#floating-menu ul li a:hover {
    background-color: rgba(0, 0, 0, 0.7); /* Fond sombre */
    color: #fff; /* Texte blanc visible */
    padding: 5px 10px; /* Meilleur espacement */
    border-radius: 5px;
    white-space: nowrap;
    font-size: 11px;
    transition: all 0.3s ease; /* Ajoute une transition fluide */
}

/* Correction : ajouter un effet de survol sans pointer-events */
#floating-menu ul li {
    position: relative; /* Nécessaire pour positionner le contenu */
}


/*--------------------*/
/* -- Page section -- */
/*--------------------*/

section {
    padding: 50px 20px;
    border-bottom: 1px solid #ddd;
}
section:nth-child(even) {
    background-color: #eef1f5;
}
section .container {
    margin: 0 5vw;
    text-align: center;
}
section h2, h3 {
	text-align: justify;
    margin: 20px auto;
    color: #456e96;
	max-width: 800px;
}
section article {
	font-size: clamp(4px, 4vw, 18px);
    margin: 50px auto;
    max-width: 800px;
}
section p {
    font-size: clamp(4px, 4vw, 18px);
	font-family: times new roman;
	margin: 20px auto;
	text-align: justify;
}
section ul {
	font-family: times new roman;
}
section .image-container {
	text-align: center;
	margin: 20px 0;
}

section .image-container img {
	height: auto;
	max-height:450px;
	max-width:700px;
}
section .chronologie-item {
	text-align: justify;
	font-size: clamp(4px, 4vw, 18px);
    margin: 50px auto;
    max-width: 800px;
}
section .caption {
	text-align: center;
	font-size: clamp(10px, 2vw, 15px);
	color: #555;
	margin-top: 5px;
}

section iframe {
  width: 90%;
  height: 40vw;
  max-height:400px;
  max-width:700px;
}

section a {
	color: #1e90ff;
	text-decoration: none;
}

section a:hover {
	text-decoration: underline;
}

section .linkin {
	color: rgba(169, 100, 30, 0.8);
	text-decoration: underline;
}

section .linkin:hover {
	background-color: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
}

/*--------------------*/
/* -- Cartographes -- */
/*--------------------*/

#cartographes {
	margin-top: 50px;
	list-style: disc;
}
#cartographes h3 {
	margin: 10px 0;
}
#cartographes p {
	margin: 0;
	text-align:justify;
}

/*--------------------*/
/* -- Bibliographie -- */
/*--------------------*/

section .biblio {
	margin: 0 10vw;
    text-align: justify;
}


/*----------------------------*/
/* -- Tableau de mendeliev -- */
/*----------------------------*/

.mendeliev-table {
	max-width: 95%;
    margin: 0 8em;
    text-align: center;
}

.periodic-table {
  display: grid;
  grid-template-columns: repeat(18, minmax(4vw,5em));
  gap: 5px;
  justify-content: center;
}

.element {
  position: relative;
  background-color: #2196F3;
  color: white;
  padding: 5px;
  border-radius: 5px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.element:hover {
  background-color: #1976D2;
  cursor: pointer;
}

.number {
  font-size: clamp(2px, 1vw, 12px);/*0.7em;*/
}

.symbol {
  font-size: clamp(4px, 1.5vw, 40px);/*1.4em;*/
  font-weight: bold;
}

.name {
  font-size: 0.5vw;/*clamp(1px, 1vw, 8px);0.47em;*/
}

.gaz {
	color: red;
}
.liquide {
	color: blue;
}
.solide {
	color: #c0c4b8;
}

/* Couleurs par catégories */
.metaux-alcalins { background-color: #FFB74D; }
.metaux-alcalino-terreux { background-color: #4DB6AC; }
.metaux-de-transition { background-color: #81C784; }
.metalloides { background-color: #FFD54F; }
.gaz-nobles { background-color: #4FC3F7; }
.non-metaux { background-color: #E57373; }
.metaux-post-transition { background-color: #98fb98; }
.proprietes-inconnues { background-color: #808080; }
.halogenes { background-color: #64B5F6; }
.lanthanides { background-color: #9575CD; }
.actinides { background-color: #F06292; }

.lanthanide-actinide-section .title {
	font-size: clamp(8px, 2vw, 15px);/*1.2em;*/
    padding: 15px;
    text-align: center;
    color: #5693bd;
}
.lanthanides-section, .actinides-section {
  display: grid;
  grid-template-columns: repeat(15, minmax(4vw,5em));
  gap: 5px;
  justify-content: center;

}

/* --- Bloc légende ---*/
.legende {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 40px;
  justify-content: center;
}

.legende-item {
  display: flex;
  align-items: center;
  font-family: Arial, sans-serif;
  font-size: clamp(8px, 1vw, 14px);
  color: #333;
}

.legende-item .circle {
  display: inline-block;
  width: clamp(8px, 1vw, 12px);
  height: clamp(8px, 1vw, 12px);
  margin-right: 8px;
  border-radius: 50%;
  border: 2px solid;
}

.metaux-alcalins {
  border-color: #00b8d4; /* Bleu cyan */
}

.metaux-alcalino-terreux {
  border-color: #ff1744; /* Rouge vif */
}

.metaux-transition {
  border-color: #9c27b0; /* Violet */
}

.metaux-post-transition {
  border-color: #4caf50; /* Vert */
}

.metalloides {
  border-color: #a57c52; /* Marron clair */
}

.non-metaux-reactifs {
  border-color: #2979ff; /* Bleu vif */
}

.gaz-nobles {
  border-color: #f50057; /* Rose vif */
}

.lanthanides {
  border-color: #1e88e5; /* Bleu foncé */
}

.actinides {
  border-color: #ff9100; /* Orange vif */
}

.proprietes-inconnues {
  border-color: #616161; /* Gris foncé */
}

/* Tooltip Style */
.tooltip {
  position: absolute; /* Position par rapport à la page */
  background-color: rgba(18, 31, 31, 0.87);
  color: white;
  padding: 15px;
  border-radius: 10px;
  font-size: clamp(8px, 2vw, 14px);
  max-width: clamp(100px, 50vw, 300px);
  z-index: 1000;
  display: none; /* Caché par défaut */
  white-space: normal; /* Autorise le retour à la ligne */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: left;
}

.tooltip img {
  max-width: clamp(100px, 3vw, 240px); /* S'assure que les images ne dépassent pas */
  max-height: clamp(100px, 3vw, 200px);
  border-radius: 5px;
  display: block;
  margin-bottom: 5px;
}

.tooltip #img_use {
  max-width: clamp(30px, 1vw, 60px);
  max-height: clamp(30px, 1vw, 60px);
  border-radius: 5px;
  margin-bottom: 5px;
  margin-top: 5px;
}

.tooltip strong {
  font-size: clamp(8px, 1vw, 16px);
  margin-bottom: 10px;
  display: inline-block;
}

/*---------------*/
/* -- End Link --*/
/*---------------*/

.end_link {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background-color: #f9f9f9; /* Couleur de fond pour le pied de page */
}

.next-page-link {
  display: inline-block;
  padding: 10px 20px;
  font-size: clamp(4px, 4vw, 18px);
  font-weight: bold;
  text-decoration: none;
  color: #5a4034; /* Couleur du texte */
  border: 2px solid #5a4034; /* Bordure de la boîte */
  border-radius: 30px; /* Coins arrondis */
  transition: all 0.3s ease; /* Animation au survol */
}

.next-page-link:hover {
  background-color: #5a4034; /* Couleur de fond au survol */
  color: #fff; /* Couleur du texte au survol */
}

/*----------------*/
/* -- Acteurs -- */
/*--------------*/

/* Section des acteurs */
.actors-list {
  display: flex; /* Utilisation de flexbox pour organiser les colonnes (catégorie + acteurs) */
  /*flex-wrap: wrap;  Permet le retour à la ligne si l'espace manque */
  gap: 1vw;  /*Espacement entre les colonnes */
  /*justify-content: center;  Centrer toutes les colonnes dans la section */
  margin: 2rem auto;
}

/* Colonne Catégorie + Acteurs */
.category-column {
  display: flex;
  flex-direction: column; /* Empiler le titre et les cartes d'acteurs */
  align-items: center;
  flex: 1 1 calc(20% - 2rem); /* Largeur flexible pour s'adapter à l'espace */
  min-width: 150px; /* Largeur minimale pour les petits écrans */
  max-width: 300px; /* Largeur maximale */
  box-sizing: border-box;
}

/* Titre de catégorie */
.category-title {
  background-color: #333;
  color: #fff;
  padding: 1vw 5px;
  font-size: 1.2vw;
  text-align: center;
  border-radius: 10px;
  text-transform: uppercase;
  width: calc(100% - 5px); /* Prend toute la largeur de la colonne */
  margin-bottom: 1vh; /* Espacement avec les acteurs */
}

/* Acteurs */
.actor-card {
  text-align: center;
  background-color: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  margin-bottom: 1rem; /* Espacement entre les cartes */
  width: 100%; /* Les cartes prennent toute la largeur de la colonne */
}

.actor-card:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.actor-card img {
  width: 100%;
  height: auto;
  max-height:100px;
  object-fit: contain;
  /* max-width:100px; */
  border-radius: 10px 10px 0 0;
}

.actor-card h3 {
  margin: 0;
  padding: 0.5rem;
  color: #333;
  font-size: 1rem;
  font-weight: bold;
}

/* Responsivité */
@media (max-width: 768px) {

  .actors-list {
  flex-wrap: wrap; /* Permet le retour à la ligne si l'espace manque */
  gap: 0.1rem;  /*Espacement entre les colonnes */
  justify-content: center; /* Centrer toutes les colonnes dans la section */
  }
  
  .category-column {
    flex: 1 1 calc(50% - 1rem); /* Réduire à 50% de la largeur par colonne */
  }

  .actor-card img {
    max-height: 80px; /* Réduire la hauteur de l'image */
  }
  
  .category-title {
    font-size: 0.5rem; /* Réduire la taille du texte */
  }
  
  .actor-card h3 {
    font-size: 0.6rem; /* Réduire la taille du texte */
  }
}

@media (max-width: 480px) {
  .category-column {
    flex: 1 1 100%; /* Une seule colonne par ligne */
  }

  .actor-card img {
    max-height: 70px; /* Réduire encore la hauteur sur petits écrans */
  }
}




/* Style des modales */
.modal {
  display: none; /* Cachée par défaut */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  overflow-y: auto; /* Permet le défilement si nécessaire */
}

.modal-content {
  background-color: #fff;
  margin: 5vh auto;
  padding: 1vw;
  border-radius: 10px;
  width: 90vw;
  max-width: 500px;
  max-height: 90vh; /* Limite la hauteur de la modal à 90% de la hauteur de l'écran */
  overflow-y: auto; /* Active le défilement interne si le contenu dépasse */
  text-align: center;
  position: relative;
  box-sizing: border-box; /* Inclure le padding dans les dimensions */
}

.modal-content h2 {
  margin-top: 0;
}

.modal-content p {
  margin: 1rem 0;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  color: #333;
  cursor: pointer;
}

.close-btn:hover {
  color: red;
}
@media (max-width: 480px) {
  .modal-content {
    width: 95vw; /* Ajuste la largeur pour les petits écrans */
    max-height: 85vh; /* Limite encore plus la hauteur */
  }
}

/*--------------------*/
/* -- Pied de page -- */
/*--------------------*/

footer {
    background-color: #333;
	font-size: clamp(4px, 4vw, 14px);
    color: #daa520;
    text-align: center;
    padding: 10px 0;
	width:100%;
	border-top: dotted #96a6b4;
	clear: both;
}

/*------------------*/
/* -- Responsive -- */
/*------------------*/

@media (max-width: 750px) {
  .menu-button-container {
    display: flex;
  }
  .menu {
	display: block;
    position: fixed;
    top: 0;
    margin-top: 60px;
    left: 0;
    width: 100%;
	height: auto;
  }
  #menu-toggle ~ .container .menu li {
    height: 0;
    transition: height 400ms cubic-bezier(0.23, 1, 0.32, 1);
  }
  #menu-toggle:checked ~ .container .menu li {
    /*border: 1px solid #fff;*/
	border-top-width: 1px;
	/*border-bottom-width: 1px;*/
	border-top-style: solid;
	/*border-bottom-style: solid;*/
	border-top-color: rgb(255, 255, 255);
	border-bottom-color: rgb(255, 255, 255);
    height: auto;
	box-sizing: border-box;
    padding: 0.5em;
    transition: height 400ms cubic-bezier(0.23, 1, 0.32, 1);
  }
  #menu-toggle ~ .container .menu li a {
	  display:none;
  }
  #menu-toggle:checked ~ .container .menu li a{
	  display:block;
  }
  .menu li {
    clear: both;
	float: left;
    width: 100%;
    background-color: #333;
	
  }
  
  .dropdown-menu {
	display: block;
	position: relative;
	padding-left: 30px;
	margin: 0;
	width: auto;
	box-shadow: inherit;
	transform: translateY(0px);
	opacity: 1;
  }

  .periodic-table {
	grid-template-columns: repeat(18, minmax(4.9vw,5em));
	gap: 2px;
  }
  .number {
  font-size: clamp(1px, 1vw, 5px);
  }
  .symbol {
  font-size: clamp(5px, 2vw, 20px);
  font-weight: bold;
  }
  .name {
  display:none;
  }
}
