/*
 _______________________________________________________________________________________________________________________
|   _________________________________________________________________________________________________________________   |
|  |                                                                                                                 |  |
|  |     __             __________        __________     __________     __      __     __             __________     |  |
|  |    |  |           |   _______|      |   _______|   |___    ___|   |  |    |  |   |  |           |   _______|    |  |
|  |    |  |           |  |              |  |               |  |       |  |    |  |   |  |           |  |            |  |
|  |    |  |           |  |_______       |  |_____          |  |       |  |____|  |   |  |           |  |_______     |  |
|  |    |  |           |   _______|      |_______   |       |  |       |___    ___|   |  |           |   _______|    |  |
|  |    |  |           |  |                      |  |       |  |           |  |       |  |           |  |            |  |
|  |    |  |_______    |  |_______        _______|  |       |  |           |  |       |  |_______    |  |_______     |  | 
|  |    |__________|   |__________|      |__________|       |__|           |__|       |__________|   |__________|    |  |
|  |                                                                                                                 |  |        
|  |_________________________________________________________________________________________________________________|  |
|_______________________________________________________________________________________________________________________|

*/

:root {
  --bg-color: #121212;
  --text-color: #e0e0e0;
  --accent-color: #9c27b0;
  --card-bg: #1e1e1e;
  --hover-color: #7b1fa2;
  --shadow-color: rgba(156, 39, 176, 0.5);
}

/* Mise en page globale */
 
body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.5s, color 0.5s;
}

main {
  padding: 3rem 2rem;
}

.main-content {
  display: flex;
  justify-content: space-between;
  margin: 2rem 0;
}

header {
  background-color: var(--card-bg);
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-bottom: 2px solid var(--accent-color);
}

footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--accent-color);
  font-size: 0.9rem;
  color: var(--text-color);
}

/* Navigation */

.title {
  display: block;
  text-align: center;
  font-size: 2rem;
  font-weight: bold;
  color: var(--accent-color);
}

nav {
  display: flex;
  width: 100%;
  height: 300px;
  align-items: stretch;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
  transition: flex 0.3s ease;
  flex: 1;
  text-align: center;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  height: 300px;
}

nav:hover .nav-item:not(:hover) {
  flex: 0.8;
}

.nav-item:hover {
  flex: 1.2;
}

.nav-text {
  font-size: 1.5rem;
  transition: all 0.3s ease;
  z-index: 1;
  color: var(--text-color);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.nav-item:hover .nav-text {
  color: var(--accent-color);
  font-size: 1.6rem;
  top: 30%;
}

.nav-description {
  position: absolute;
  bottom: 10px;
  background-color: rgba(0, 0, 0, 0.5);
  color: var(--text-color);
  padding: 0.3rem;
  border-radius: 4px;
  font-size: 0.8rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-item:hover .nav-description {
  opacity: 1;
}

.nav-buttons {
  display: flex;
  gap: 0.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  border: 2px solid var(--accent-color);
  padding: 0.5rem;
  border-radius: 8px;
  background-color: rgba(126, 87, 194, 0.2);
}

.nav-item:hover .nav-buttons {
  opacity: 1;
}

.nav-button {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: var(--accent-color);
  color: var(--text-color);
  text-decoration: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.nav-button:hover {
  background-color: var(--hover-color);
}

/* Sommaire fixe (gauche et droit) */

.fixed-summary-left, .fixed-summary-right {
  position: fixed;
  top: 20%;
  display: none;
  width: 150px;
  background-color: var(--card-bg);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 0 15px var(--shadow-color);
  pointer-events: auto;
}

.fixed-summary-left {
  left: 0;
}

.fixed-summary-right {
  right: 0;
}

.fixed-summary-left .chapter-button, .fixed-summary-right .chapter-button {
  margin-bottom: 10px;
}

/* Sommaire principal */

.summary {
  background-color: var(--card-bg);
  padding: 2rem;
  margin: 1rem auto;
  border-radius: 8px;
  max-width: 1370px;
  box-shadow: 0 0 15px var(--shadow-color);
  text-align: center;
}

.summary h1 {
  color: var(--accent-color);
  margin-bottom: 1.5rem;
}

.summary-columns {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.column {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Progression */

progress {
  display: block;
  margin: 0 auto;
  width: 400px;
  height: 25px;
  border-radius: 12px;
  overflow: hidden;
  appearance: none; 
  box-shadow: 0 0 15px var(--shadow-color);
}

progress::-webkit-progress-bar {
  background-color: #333;
  border-radius: 12px;
}

progress::-webkit-progress-value {
  background-color: var(--accent-color);
  border-radius: 12px;
}

.progress-text {
  margin-top: 10px;
  font-size: 18px;
  text-align: center;
}

/* Sections des chapitres */

.chapter-button {
  display: block;
  padding: 0.75rem;
  background-color: var(--accent-color);
  color: var(--text-color);
  text-decoration: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  text-align: center;
}

.chapter-button:hover {
  background-color: var(--hover-color);
  transform: scale(1.05);
}

.chapter {
  margin: 2rem auto;
  max-width: 1400px;
  padding: 1rem;
  background-color: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 0 15px var(--shadow-color);
}

.chapter h2 {
  text-align: center;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.chapter h1 {
  text-align: center;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.chapter iframe {
  border: none;
  border-radius: 4px;
  margin-bottom: 1rem;
}

/* Fiches de révisions */

.fiche-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.fiche {
  flex: 1 1 25%;
  max-width: 700px;
  padding: 1rem;
  background-color: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 0 15px var(--shadow-color);
}

.fiche h2 {
  text-align: center;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.fiche iframe {
  border: none;
  border-radius: 4px;
  margin-bottom: 1rem;
}

/* Sections Info */

.section-info {
    flex: 1 1 600px;
    padding: 1.5rem;
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 0 15px var(--shadow-color);
    max-width: 750px;
    border: 1px solid var(--accent-color);
}

.person-card {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.person-left {
    width: 220px;
    flex-shrink: 0;
    text-align: center;
}

.person-left img {
    width: 200px;
    height: 200px;
    object-fit: cover;
}

.person-left h2 {
    margin: 12px 0 3px;
    font-size: 1.4rem;
}

.person-left h3 {
    margin: 0;
    font-size: 1rem;
    opacity: 0.65;
    text-transform: uppercase;
}

.person-left h3.undef {
    margin: 0;
    font-size: 1rem;
    color: red;
}

.person-info {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 25px;
}

.detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    opacity: 0.55;
}

.detail-value {
    font-size: 1rem;
}

.detail-value.undef {
    font-size: 1rem;
    color: red;
}

/* Sections */

.section-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.section {
  flex: 1 1 300px;
  padding: 2rem;
  background-color: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 0 15px var(--shadow-color);
  max-width: 400px;
  text-align: center;
  border: 1px solid var(--accent-color);
}

.title-sections {
  margin-top: 4rem;
  margin-bottom: 2rem;
  display: block;
  text-align: center;
  font-size: 2rem;
  font-weight: bold;
  color: var(--accent-color);
}

.section-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.section-text {
  margin: 0.5rem 0;
}

.section-button {
  padding: 0.4rem 0.5rem;
  margin-inline: 0.5rem;
  text-align: center;
  text-decoration: none;
  background-color: var(--accent-color);
  color: var(--text-color);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.section-button a {
  text-decoration: none;
  color: white;
}

.section-button-link {
  padding: 0.4rem 0.5rem;
  padding-top: 0.7rem;
  margin: 1rem;
  text-decoration: none;
  background-color: var(--accent-color);
  color: var(--text-color);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.section-button:hover {
  background-color: var(--hover-color);
}

.side-section img {
  width: 6%;
}

/* Statistiques */

.stats-container {
  display: flex;
  justify-content: space-around;
  margin: 2rem 0;
}

.stat-item {
  text-align: center;
  padding: 1rem;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: bold;
  color: var(--accent-color);
}

.stat-label {
  font-size: 1rem;
}

/* Connexion */

.login-screen {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.login-box {
    width: 360px;
    padding: 2.5rem;
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--accent-color);
    border-radius: 12px;
    box-shadow: 0 0 30px var(--shadow-color);
    text-align: center;
    animation: loginAppear 0.5s ease;
}

.login-box h1 {
    margin: 0 0 0.5rem;
    color: var(--accent-color);
    font-size: 2rem;
}

.login-subtitle {
    margin-bottom: 2rem;
    color: var(--text-color);
    opacity: 0.65;
    font-size: 0.9rem;
}

.login-box input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    background-color: var(--bg-color);
    color: var(--text-color);
    border: 1px solid #444;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: 0.25s;
}

.login-box input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 10px var(--shadow-color);
}

.login-box input::placeholder {
    color: #888;
}

.login-box form button {
    width: 100%;
    padding: 0.85rem;
    margin-top: 0.5rem;
    background-color: var(--accent-color);
    color: var(--text-color);
    border: none;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.login-box form button:hover {
    background-color: var(--hover-color);
    transform: scale(1.03);
    box-shadow: 0 0 15px var(--shadow-color);
}

.login-back-button {
    width: auto;
    padding: 0;
    margin-top: 0.75rem;
    background: none;
    border: none;
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: normal;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
}

.login-back-button:hover {
    background: none;
    color: var(--accent-color);
    transform: scale(1.08);
    box-shadow: none;
}

.login-error {
    display: none;
    margin-top: 1rem;
    color: #ff5252;
    font-size: 0.9rem;
}

@keyframes loginAppear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Hoverage des mots */

.word {
  display: inline-block;
  margin-right: 10px;
}

.letter {
  display: inline-block;
  transition: color 0.1s;
  margin-right: -6px;
  font-size: 3rem;
}

.letter:hover {
  color: var(--shadow-color);
}

.side-section {
  flex: 1;
  display: flex;
  justify-content: center;
}

/* Conteneur des matières */

.subject-container {
  flex: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.subject-item {
  flex: 1 1 calc(25% - 1rem);
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.3s ease, filter 0.3s ease;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 0 15px var(--shadow-color);
  transform: scale(1);
  filter: brightness(1);
  overflow: visible;
}

#subject-item-setup {
  height: 400px;
}

.subject-text {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  z-index: 2;
  transition: transform 0.3s ease;
}

.subject-description {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.7);
  color: var(--text-color);
  padding: 0.5rem;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease, bottom 0.3s ease;
  z-index: 1;
}

.subject-buttons {
  display: flex;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  position: absolute;
  bottom: 0px;
}

.subject-item:hover .subject-buttons {
  opacity: 1;
  transform: translateY(-20px);
}

.subject-item:hover .subject-text {
  transform: translateY(-40px);
}

.subject-item:hover .subject-description {
  opacity: 1;
  bottom: calc(72.5px);
}

.subject-item:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
  z-index: 2;
}

.subject-container:hover .subject-item:not(:hover) {
  filter: brightness(0.8);
  transform: scale(0.95);
}

.subject-button {
  padding: 0.4rem;
  padding-top: 0.2rem;
  margin: 0.5rem;
  background-color: var(--accent-color);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  font-size: 1rem;
  transition: background-color 0.3s;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 1.5rem;
  height: 1.5rem;
}

.subject-button img {
  width: 100%;
}

.subject-button:hover {
  background-color: var(--hover-color);
}

/* Timeline hall of fame */

.timeline-title{
    text-align:center;
    color:var(--accent-color);
    margin-top:40px;
    margin-bottom:40px;
    font-size:42px;
}

.timeline{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:30px;
    position:relative;
    margin-bottom:50px;
}

.timeline::before{
    content:"";
    position:absolute;
    width:100%;
    height:4px;
    background:var(--accent-color);
    z-index:0;
}

.timeline-date{
    width:65px;
    height:65px;
    border-radius:50%;
    border:none;
    cursor:pointer;
    background:var(--card-bg);
    color:var(--text-color);
    font-size:18px;
    font-weight:bold;
    position:relative;
    z-index:1;
    transition:.3s;
}

.timeline-date:hover{
    background:var(--hover-color);
    transform:scale(1.15);
}

.timeline-date.active{
    background:var(--accent-color);
    box-shadow:0 0 20px var(--shadow-color);
}

.timeline-content{
    width:90%;
    max-width:1400px;
    margin:auto;
}

.timeline-content section {
  margin: 2rem auto;
  max-width: 1400px;
  padding: 1rem;
  background-color: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 0 15px var(--shadow-color);
}

.timeline-content section h2 {
  text-align: center;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.timeline-content section h1 {
  text-align: center;
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.timeline-content section iframe {
  border: none;
  border-radius: 4px;
  margin-bottom: 1rem;
}

/* Nouveau sommaire matières */

.sommaires {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1340px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--card-bg);
    box-shadow: 0 0 15px var(--shadow-color);
    border-radius: 8px;
}

.sommaire {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem;
}

.sommaire-btn {
    margin: 0.75rem;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border: 1px solid var(--accent-color);
    border-radius: 5px;
    background-color: transparent;
    color: var(--text-color);
    font-size: 18px;
    transition: all 0.2s ease;
}

.sommaire-btn:hover {
    background-color: var(--hover-color);
    transform: scale(1.05);
}

.sommaire-btn.active {
    background-color: var(--accent-color);
    color: white;
}

.event {
    background: var(--card-bg);
    padding: 0.75rem;
    margin-bottom: 25px;
    border-radius: 5px;
    color: var(--text-color);
    animation: fade .4s;
    box-shadow: 0 0 20px var(--shadow-color);
}

@keyframes fade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Boutons des numéros */

.numero {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: var(--accent-color);
  color: var(--text-color);
  text-decoration: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.numero:hover {
  background-color: var(--hover-color);
  scale: 1.2;
}

.contact-toolbar{
    display:flex;
    gap:15px;
    margin:25px 0;
}

/* Barre de recherche */

#searchInput{
    flex:1;
    padding:10px 15px;
    border-radius:10px;
    border:none;
    font-size:16px;
}

.favoritesBtn{
    padding:10px 18px;
    border:none;
    border-radius:10px;
    background:var(--bg-color);
    color:var(--text-color);
    cursor:pointer;
    font-size:16px;
    transition:all .2s ease;
}

.favoritesBtn:hover{
    background:var(--hover-color);
}

.favoritesBtn.active{
    background:var(--accent-color);
    color:var(--card-bg-color);
    font-weight:bold;
}

.favoritesBtn.active:hover{
    background:var(--hover-color);
}

/* Projets */

#projets img {
  width: 40%;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#projets img:hover {
  transform: scale(1.05);
  transition: 0.3s;
}

/* Bouton de défilement */

.scroll-btn {
  display: inline-block;
  position: fixed;
  bottom: 20px;
  right: 20px;
  cursor: pointer;
  font-size: 1.2rem;
  background-color: var(--accent-color);
  color: var(--bg-color);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s;
}

.scroll-btn:hover {
  background-color: var(--hover-color);
}