/* ///////////////////////////////////////////////////////////////////////////////////////////////////// 
   VARIABLES & BASE SETTINGS
*/
:root {
    /* Couleurs */
    --color-dark: rgba(19, 29, 40, 1);
    --color-gray-light: rgba(210, 210, 210, 1);
    --color-gray-dark: rgba(130, 130, 130, 1);
    --color-white: rgba(240, 240, 240, 1);
    --color-blue: rgba(100, 240, 255, 1);
    --color-gray-transparent: rgba(210, 210, 210, 0.8);
}

/* Reset et box model */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: "Ayuthaya";
    src: url('/assets/fonts/Ayuthaya.ttf');
}

body {
    color: var(--color-gray-light);
    background-color: var(--color-dark);
    font-family: "Ayuthaya", sans-serif;
}

/* Effets communs */
.hover-scale {
    transition: transform 0.3s ease;
    will-change: transform;
}

.hover-scale:hover {
    transform: scale(1.1);
}

/* ///////////////////////////////////////////////////////////////////////////////////////////////////// 
   HEADER & NAVIGATION
*/
  
header {
    margin-top: 1rem;
    text-align: center;
}
  
header img {
    width: 400px;
}
  
.hidden-h1 {
    position: absolute;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    white-space: nowrap; 
    width: 1px;
}
  
#divider {
    height: 1px;
    background-color: var(--color-gray-dark);
    max-width: 75rem;
    margin: 1.5rem auto;
}
  
nav {
    margin: .8rem auto 0;
    position: relative;
    width: 800px;
    height: 40px;
    font-size: 0;
}
  
nav a {
    width: 160px;
    line-height: 40px;
    height: 100%;
    font-size: 1rem;
    display: inline-block;
    position: relative;
    z-index: 1;
    text-decoration: none;
    text-transform: uppercase;
    text-align: center;
    cursor: pointer;
}
  
#card {
    cursor: default;
}
  
nav a:hover, #largeNav a:nth-child(3) {
    font-weight: bold;
    color: var(--color-white);
}
  
#largeNav .animation {
    position: absolute;
    height: 2px;
    bottom: 5px;
    z-index: 0;
    transition: all 0.5s ease 0s;
    border-radius: 8px;
    will-change: transform, width;
}
  
#largeNav a:hover~.animation,
#largeNav .start-home {
    width: 140px;
    background-color: var(--color-blue);
}
  
#largeNav a:nth-child(1):hover~.animation {
    left: 10px;
}
  
#largeNav a:nth-child(2):hover~.animation {
    left: 170px;
}
  
#largeNav .start-home,
#largeNav a:nth-child(3):hover~.animation {
    left: 330px;
}
  
#largeNav a:nth-child(4):hover~.animation {
    left: 490px;
}
  
#largeNav a:nth-child(5):hover~.animation {
    left: 650px;
}
  
#smallNav {
    display: none;
    margin-top: .5rem;
}

/* ///////////////////////////////////////////////////////////////////////////////////////////////////// 
   MAIN
*/
  
main {
    max-width: 1235px;
    margin: 0 auto;
}
  
h2 {
    color: var(--color-gray-light);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 0.8rem;
    margin-bottom: 1rem;
}
  
h2 img {
    margin-right: 1.3rem;
    vertical-align: bottom;
    height: 33px;
}
  
a {
    color: var(--color-gray-light);
    text-decoration: none;
}
  
a:hover {
    color: var(--color-white);
}

fieldset {
    border: 1px solid var(--color-gray-dark);
    border-radius: 15px;
}

/* ///////////////////////////////////////////////////////////////////////////////////////////////////// 
   1. PRÉSENTATION
*/

#presContainer {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s ease-out;
    width: 100%;
    margin: 0;
    padding: 0;
    /* Garder les styles de bordure même quand fermé */
    border: 1px solid var(--color-gray-dark);
    border-radius: 15px;
}

#presContainer.open {
    opacity: 1;
    max-height: 600px;
    margin: .7rem auto 0;
    padding: 1.5rem;
}

#presContainer legend {
    opacity: 0;
    max-height: 0;
    transition: all 0.5s ease-out;
}
  
#presContainer.open legend {
    opacity: 1;
    max-height: 600px;
    margin-top: .7rem;
}
  
#presContent {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* gap: 20px; */
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.5s ease-out;
}
  
#presContent.open {
    max-height: 650px;
}
  
.col-pres-img {
    display: flex;
    align-items: center;
    justify-content: center; /* Ajouter cette ligne pour centrer horizontalement */
    text-align: center;
    width: 100%; /* Assurer que la div prend toute la largeur disponible */
}

.col-pres-img img {
    max-width: 100%;
    height: auto;
    display: block; /* Important pour éliminer les espaces non désirés */
    margin: 0 auto; /* Centrage alternatif si flex ne fonctionne pas */
}
  
.col-pres-txt {
    margin: 1.5rem 0 0;
    padding: 0 1rem;
    display: block; /* Remplacer flex par block pour un meilleur rendu du texte */
    max-height: 300px;
    overflow-y: auto; /* Ajouter l'ascenseur vertical */
    line-height: 1.5; /* Améliorer la lisibilité */
    scrollbar-width: thin; /* Pour Firefox - ascenseur fin */
    scrollbar-color: var(--color-blue) transparent;
}

/* Pour les navigateurs basés sur Webkit (Chrome, Safari) */
.col-pres-txt::-webkit-scrollbar {
    width: 6px;
}

.col-pres-txt::-webkit-scrollbar-thumb {
    background-color: var(--color-blue);
    border-radius: 3px;
}

/* Styles pour améliorer l'intégration des listes */
.col-pres-txt ul {
    margin: 10px 0 0;
    padding-left: 25px; /* Retrait pour la liste entière */
    list-style-type: disc; /* Type de puce */
}

.col-pres-txt li {
    margin-bottom: 10px; /* Espace entre les éléments */
    padding-left: 5px; /* Retrait supplémentaire pour chaque élément */
    line-height: 1.4;
}

.col-pres-txt li:last-child {
    margin-bottom: 0; /* Supprime la marge du dernier élément */
}


/* ///////////////////////////////////////////////////////////////////////////////////////////////////// 
   2. PARCOURS THÉMATIQUES
*/

#catContainer {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s ease-out;
    width: 100%;
    margin: 0;
    padding: 0;
    /* Garder les styles de bordure même quand fermé */
    border: 1px solid var(--color-gray-dark);
    border-radius: 15px;
}

#catContainer.open {
    opacity: 1;
    max-height: 600px;
    margin: .7rem auto 2rem;
    padding: 0 1rem 1rem;
}

#catContainer legend {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s ease-out;
}

#catContainer.open legend {
    opacity: 1;
    max-height: 600px;
    margin-top: .7rem;
}

#catContent {
    overflow: hidden;
    max-height: 0;
}

#catContent.open {
    max-height: 650px;
}

#catFilterBar {
    margin: 1rem auto .5rem;
    display: flex;
    gap: .8rem;
    justify-content: center;
}

.filter-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--color-gray-light);
    background: transparent;
    cursor: pointer;
    transition: transform .2s;
}

.filter-btn:hover,
.filter-btn.active {
    transform: scale(1.2);
}

/* Couleurs */
.filter-btn.rose  { background: #ff659d; }
.filter-btn.verte { background: #42d87e; }
.filter-btn.bleue { background: #57c8ff; }
.filter-btn.jaune { background: #ffd53b; }


#filterLabel {
    text-align: center;
    font-size: 1rem;
    font-weight: bold;
    margin-top: .8rem;
    color: var(--color-white);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

#images-list {
    display: grid;
    grid-gap: 35px;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    margin: 1.8rem auto 1rem;
}
  
#images-list a {
    display: flex;
    justify-content: center;
}
  
#images-list img { 
    border-radius: 15px;
    transition: transform 0.3s ease;
    will-change: transform;
}
    
#images-list img:hover, 
.nav-buttons img:hover, 
#popupContent button:hover {
    transform: scale(1.1);
}

/* ///////////////////////////////////////////////////////////////////////////////////////////////////// 
   3. PARTENAIRES
*/

#partContainer {
    margin: 3rem auto;
    max-width: 100%;
    height: auto;
    opacity: 0;
    animation: fadeIn 1s ease-in-out forwards;
    animation-delay: 1s;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}
  
.part-flex {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
}
  
.part-flex a {
    flex: 1 1 calc(25% - 10px);
    min-width: 160px; 
    display: flex;
    justify-content: center;
    align-items: center;
}
  
.part-flex img {
    max-width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
    will-change: transform;
}

.part-flex img:hover {
    transform: scale(1.1);
}

/* ///////////////////////////////////////////////////////////////////////////////////////////////////// 
   4. RESPONSIVE
*/

/* @media (max-width: 1200px) {
    #images-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    #images-list {
        grid-template-columns: repeat(3, 1fr);
    }
    
    #presContent {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    #images-list {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 20px;
    }
    
    .part-flex a {
        flex-basis: calc(33.33% - 10px);
    }
}

@media (max-width: 576px) {
    #images-list {
        grid-template-columns: 1fr;
    }
    
    .part-flex a {
        flex-basis: calc(50% - 10px);
    }
} */
  
/* ///////////////////////////////////////////////////////////////////////////////////////////////////// CARDS /////////*/
  
#container {
    display: grid;
    grid-template-columns: 2fr 3fr;
}
  
#cardSection {
    max-width: 400px;
}
  
#cardTitle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0.2rem;
}
  
#cardVideo {
    margin-top: 1.25rem;
    max-width: 100%;
    height: auto;
    border-top : 1px solid var(--color-gray-dark);
    border-left : 1px solid var(--color-gray-dark);
    border-radius : 2rem;
}
  
/* ///////////////////////////////////////////////////////////////////////////////////////////////////// MENU CARDS RIGHT /////////*/
  
#cardMenu {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-auto-rows: 50px;
    margin-top: 0.2rem;
}
  
.menu-container {
    margin-top: 1.25rem;
}
  
.menu-icon {
    cursor: pointer;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}
  
.menu-icon img {
    height:33px;
    transition: transform 0.3s ease-in-out;
    will-change: transform;
}
    
.menu-icon:hover img {
    transform: scale(1.2);
}
    
#menuPdv, #menuCap, #menuTools {
    border-left:  2px solid var(--color-gray-dark);
}
  
/* ///////////////////////////////////////////////////////////////////////////////////////////////////// CONTENT CARDS RIGHT - FIELDSET /////////*/
  
fieldset {
    border : 1px solid var(--color-gray-dark);
    border-radius : 2rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}
  
.menu-container fieldset {
    display: grid;
    grid-template-rows: 1fr auto;
    height: auto;
    text-align: left;
}

/* Style pour la légende avec niveaux */
fieldset legend {
    color: var(--color-blue);
    font-size: 1.25rem;
    font-weight: 500;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: .7rem; /* Espace entre "Quiz" et les boutons */
}

.legend-levels {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* Espace entre les boutons */
}

.level-btn {
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--color-gray-dark);
    background-color: transparent;
    color: var(--color-gray-light);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.level-btn:hover:not(.disabled) {
    color: var(--color-white);
    border-color: var(--color-white);
}

.level-btn.active {
    background-color: var(--color-blue);
    color: black;
    border-color: var(--color-blue);
}

/* Style pour les boutons complétés mais pas désactivés */
.level-btn.completed {
    background-color: var(--color-dark);
    color: var(--color-blue);
    border: 1px solid var(--color-blue);
    text-decoration: line-through;
    opacity: 1;
    cursor: pointer;
}

.level-btn.completed.active {
    text-decoration: line-through;
    color: black;
    background-color: var(--color-blue);
    border-color: var(--color-blue);
}

.level-btn.completed:hover {
    background-color: rgba(100, 240, 255, 0.2);
}

/* État désactivé pour les niveaux complétés */
.level-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    text-decoration: line-through;
}
  
fieldset .menu-content {
    grid-row: 1;
    height: 89%;
    margin-top: 1rem;
    padding: 0 .8rem;
}

#pdvContent, #toolsContent, #capContent {
    overflow-y: auto;
}
  
/* ///////////////////////////////////////////////////////////////////////////////////////////////////// FIELDSET NAV BTN - CONTENT CARDS RIGHT /////////*/

/* Styles pour les boutons de navigation */
.nav-buttons {
    grid-row: 2;
    display: flex;
    justify-content: space-between;
}

.nav-buttons button,
.nav-buttons a {
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.85;
    padding: 0;
    margin-bottom: .5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-buttons button img,
.nav-buttons a img {
    height: 35px; /* Hauteur uniforme pour toutes les images */
}

.nav-buttons .prev,
.nav-buttons button.prev {
    margin-left: 0.8rem;
}

.nav-buttons .next,
.nav-buttons button.next {
    margin-right: 0.8rem;
}

.nav-buttons button:hover, 
.nav-buttons button:focus {
    opacity: 1;
}
  
/* ///////////////////////////////////////////////////////////////////////////////////////////////////// Quiz ///////////////// */
  
#question {
    margin-top: 0;
    padding-bottom: 1rem;
    color: var(--color-white);
}

/* Conteneur commun pour les options et l'explication */
#quiz-content-container {
    height: auto; /* Ajustez cette valeur selon vos besoins */
    position: relative;
    margin-bottom: 10px; /* Espace avant le bouton Submit */
}

/* ///////////////////////////////////////////////////////////////////////////////////////////////////// EXPLANATIONS ///////////////// */

/* Les deux éléments sont positionnés de manière absolue dans le conteneur */
.input-group, #explanation {
    border: 1px solid var(--color-gray-dark);
    border-radius: 10px;
}

.input-group {
    padding: .5rem .5rem 1.3rem;
}

#explanation {
    background-color: var(--color-dark);
    padding: 15px;
    color: var(--color-white);
    box-sizing: border-box;
}

/* Style de la barre de défilement */
#explanation::-webkit-scrollbar {
    width: 6px;
}

#explanation::-webkit-scrollbar-track {
    background: rgba(100, 100, 100, 0.1);
}

#explanation::-webkit-scrollbar-thumb {
    background-color: var(--color-gray-dark);
    border-radius: 3px;
}
  
#explanation p {
    color: var(--color-gray-light);
}
  
#question.answered {
    cursor: pointer;
    position: relative;
}
  
/* Style pour l'icône de basculement */
.toggle-explanation-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--color-blue);
    color: black;
    text-align: center;
    line-height: 20px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    margin-left: 10px;
    transition: transform 0.3s ease;
    
    /* Nouvelles propriétés pour le repositionner */
    position: absolute;
    right: -7px;
    top: -7px;
}

.toggle-explanation-icon:hover {
    transform: scale(1.1);
}
  
input[type="radio"] {
    margin-top: 0.8rem;
    margin-left: 1rem;
}

#formSubmit {
    text-align: center;
}

#submitBtn {
    color: black;
    background-color: var(--color-blue);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    border-style: none;
    box-sizing: border-box;
    line-height: 15px;
    height: 33px;
    margin-top: .5rem;
    text-align: center;
    width: 85px;
    transition: transform 0.3s ease;
}
  
.submitBtn:hover, .nextBtn:hover {
    background-color: var(--color-blue);
    transform: scale(1.05);
}
  
.submitBtn {
    padding: 10px 16px;
}
  
.nextBtn {
    padding: 7px;
}
  
@keyframes vibrate {
    0% { transform: translate(-4px); }
    25% { transform: translate(4px); }
    50% { transform: translate(-4px); }
    100% { transform: translate(4px); }
}
    
.vibrating {
    animation: vibrate 0.2s;
    animation-iteration-count: 1.5;
}
  
#resultInfo {
    margin-top: 0.8rem;
    margin-bottom: 1.3rem;
    text-align: center;
}
  
#resultInfo span {
    font-size: x-large;
    vertical-align: -0.15rem;
}
  
#progressContainer {
    position: relative;
    width: 100%;
    background-color: var(--color-white);
    border-radius: 7px;
    margin-bottom: 1.5rem;
}
    
#progressBar {
    width: 0%;
    height: 25px;
    background-color: var(--color-blue);
    text-align: center;
    line-height: 25px;
    border-radius: 7px;
    will-change: width;
}
  
#progressLabel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: black;
    white-space: nowrap; /* Empêche le texte de passer à la ligne */
    width: 100%; /* S'assure que le label utilise toute la largeur disponible */
    text-align: center; /* Centre le texte */
    font-size: 0.9rem; /* Assure une taille adaptée aux petits écrans */
}

/* Styles pour la barre de progression */
.progress-bar {
    transition: width 0.5s ease, background-color 0.5s ease;
}
  
/* S'assurer qu'il n'y a pas d'espaces indésirables */
#formSubmit.hidden {
    display: none !important;
    margin: 0;
    padding: 0;
    height: 0;
}
  
/* S'assurer que .hidden fonctionne correctement avec !important */
.hidden {
    display: none !important;
}

/* ///////////////////////////////////////////////////////////////////////////////////////////////////// Focus sur */
  
summary {
    color: var(--color-white);
}
  
summary:hover, summary:focus {
    cursor: pointer;
}
  
details {
    margin-bottom: 1rem;
}
  
details ul {
    margin-top: 1rem;
    padding-left: 2rem;
}
  
details p, 
details li {
    margin-top: 1rem;
    color: var(--color-gray-transparent);
}
  
/* ///////////////////////////////////////////////////////////////////////////////////////////////////// Conseils aux parents */
  
#capContent {
    color: var(--color-gray-light);
}
  
/* ///////////////////////////////////////////////////////////////////////////////////////////////////// Tools */
  
#toolsContent p {
    color: var(--color-white);
    margin: 0 auto 1rem;
}
  
#toolsContent img {
    margin-bottom: -0.2rem;
}
  
#toolsContent ul {
    margin-bottom: 1rem;
    padding-left: 1rem;
}
  
#toolsContent li {
    margin-left: 1.5rem;
    margin-bottom: 0.3rem;
}
  
.format {
    margin-right: 0.5rem;
    color: var(--color-blue);
}
  
#toolsContent a {
    color: var(--color-gray-transparent);
}
  
#toolsContent a:hover, #toolsContent a:focus, .tools-link:hover, .tools-link:focus {
    color: var(--color-white);
    cursor: pointer;
}
  
/* ---------------------------------------------------------------------------- Scroll To top icon */
.scroll-to-top {
    display: inline-flex;
    margin-left: 10px;
    width: 23px;
    height: 23px;
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid #333;
    justify-content: center;
    align-items: center;
}
  
.scroll-to-top img {
    width: 60%;
}

/* ---------------------------------------------------------------------------- Pop up */
.popup {
    display: none;
    position: fixed;
    left: 50%;
    top: 50px;
    z-index: 10; /* Augmenté pour assurer que la popup reste au-dessus des autres éléments */
    width: 450px;
    max-width: 90%;
    will-change: transform;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.3));
}

.popup-active {
    display: block;
    animation: slideDown 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; /* Animation plus fluide */
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.popup h2 {
    color: black;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 8px;
}

.popup h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--color-blue);
    border-radius: 1.5px;
}

.popup img {
    margin-bottom: 1rem;
}

#popupContent {
    background-color: var(--color-white);
    color: black;
    margin: 15% auto;
    padding: 20px 25px 20px; /* Padding plus généreux */
    border: 7px solid var(--color-blue);
    border-radius: 15px;
    text-align: center;
    font-weight: 300;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.15);
}

#popupContent p {
    font-size: .9rem;
    margin-bottom: 0.3rem;
    font-weight: 300;
}

/* Conserver le style par défaut pour les strong */
#popupContent strong {
    font-weight: bold;
}

/* Style spécifique pour les statistiques */
.stats-summary {
    background-color: rgba(240, 240, 240, 0.5);
    background-color: white;
    padding: 15px;
    border-radius: 10px;
    margin: 15px auto;
    max-width: 85%;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
    font-weight: 300;
}

.stats-summary p {
    margin: 5px 0;
}

/* Espacement après le titre des statistiques */
.stats-title {
    margin-bottom: 15px !important;
}

/* Espacement avant le nombre total de tentatives */
.total-attempts {
    font-weight: bold;
    margin-top: 15px !important;
}

#close {
    color: black;
    float: right;
    font-size: 28px;
    font-weight: bold;
    opacity: 0.7;
    transition: all 0.2s ease;
    margin-right: -10px;
    margin-top: -10px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    position: relative; /* Ajout */
    z-index: 1000; /* Ajout pour être sûr qu'il soit au-dessus des autres éléments */
    cursor: pointer; /* Ajout pour indiquer qu'il est cliquable */
}

#close:hover,
#close:focus {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.05);
    transform: scale(1.1);
    cursor: pointer;
    text-decoration: none;
}

#cancelBtn, #confirmBtn, #submitNameBtn {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    padding: 10px 20px;
    border: none;
    border-radius: 25px; /* Boutons plus arrondis */
    cursor: pointer;
    font-size: 1rem;   
    min-width: 120px;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    will-change: transform, background-color;
}

#cancelBtn {
    background-color: rgba(210, 210, 210, 0.7);
    color: black;
    margin-right: 10px;
}

#cancelBtn:hover {
    background-color: var(--color-gray-light);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

#confirmBtn, #submitNameBtn {
    background-color: var(--color-blue);
    color: black;
    margin-left: 10px;
}

#confirmBtn:hover, #submitNameBtn:hover {
    background-color: var(--color-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

/* Style pour l'entrée du nom */
.name-input-container {
    margin: 20px 0;
    padding: 15px;
    background-color: rgba(240, 240, 240, 0.5);
    border-radius: 10px;
}

#playerNameInput {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#playerNameInput:focus {
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(100, 240, 255, 0.25);
    outline: none;
}

/* Styles pour la fenêtre de récompense */

/* Modifications pour la popup de récompense - version améliorée */
.popup.reward-popup {
    width: 700px; /* Plus large pour accommoder les deux colonnes */
}

/* Suppression de la marge supérieure du h2 dans la popup */
.popup h2 {
    margin-top: 0;
}

.reward-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 10px;
}

.reward-image-column {
    flex: 1;
    max-width: 45%;
}

.reward-image-column img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.reward-info-column {
    flex: 1;
    max-width: 55%;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 15px; /* Espace entre les éléments */
}

/* Niveau et titre plus visible */
.reward-level {
    background-color: rgba(138, 43, 226, 0.1);
    padding: 15px;
    border-radius: 10px;
    font-size: 1.1em;
    text-align: center;
    border: 1px solid rgba(138, 43, 226, 0.2);
}

.reward-level strong {
    color: #9c27b0;
    font-size: 1.1em;
}

/* Section temps écoulé */
.reward-time {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.reward-time-icon {
    font-size: 1.5em;
    margin-right: 15px;
    color: #607d8b;
}

.reward-time-text {
    font-weight: 500;
}

.reward-time-value {
    font-weight: bold;
    color: #607d8b;
}

/* Statistiques avec titre */
.reward-stats {
    padding: 15px;
    background-color: #f8f8f8;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.reward-stats-title {
    margin-top: 0;
    margin-bottom: 12px;
    font-weight: bold;
    color: #555;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
}

.reward-stats p {
    margin: 8px 0;
    font-size: 0.9em;
}

/* Ajuster la section performance pour aligner horizontalement */
.reward-performance {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background-color: rgba(255, 215, 0, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.reward-performance-label {
    font-weight: 500;
    color: #555;
    margin-right: 10px;
}

.reward-performance-icon {
    font-size: 1.5em;
    color: #ffa000;
    margin-right: 10px;
}

.stars-rating {
    font-size: 1.7em;
    color: gold;
    text-shadow: 0 2px 5px rgba(0,0,0,0.1);
    letter-spacing: 3px;
    margin: 0;
}
  
/* ///////////////////////////////////////////////////////////////////////////////////////////////////// FOOTER /////////*/
  
footer {
    margin: 1rem auto;
    text-align: center;
    font-size: .9rem;
}
  
#mailFooter span {
    font-weight: bold;
    color: var(--color-white);
}
  
#cardFooter {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
}
  
  
  /* ///////////////////////////////////////////////////////////////////////////////////////////////////// RESPONSIVE /////////*/
  @media (max-width: 1300px) {
      #partContainer, #presContainer {
          max-width: 85%;
      }
      #presContent {
        gap: 20px;
    }
    .col-pres-txt {
        margin: .5rem 0 0;
        max-height: 350px;
    }
    #images-list {
        grid-template-columns: 1fr 1fr 1fr 1fr;
        max-width: 85%;
    }
  }
  
  @media (max-width: 1130px) {
    fieldset {
        margin-left: 1.5rem;
    }
    #presContainer.open {
        padding: .5rem 0 1rem;
        max-height: none;
    }
    #presContent {
        display: block;
        margin: 0 auto;
    }
    .col-pres-img {
        margin-bottom: 1rem;
        padding: 0;
    }
    .col-pres-txt {
        display: block;
        margin: auto;
        font-size: .9rem;
        max-height: 270px;
    }
  }
  
  @media (max-width: 1035px) {
      #images-list {
          grid-template-columns: 1fr 1fr 1fr;
          max-width: 80%;
      }
      #partContainer, #presContainer {
          max-width: 80%;
      }
  }
  
  @media (max-width: 890px) {
      #images-list, #partContainer, #presContainer  {
          max-width: 90%;
      }
      #partContainer {
          margin: 2rem auto;
      }
      #divider {
          max-width: 75%;
          margin: 1rem auto;
      }
      #container {
          display: block;
      }
      #cardSection {
          margin: auto;
      }
      #cardVideo {
          border-top: none;
          border-left: none;
          margin-top: 0rem;
      }
      .menu-container {
          margin-top: 1rem;
      }
      #cardMenu {
          margin: .5rem auto;
          max-width: 450px;
      }
      .menu-container fieldset {
          margin: .5rem auto;
          max-width: 500px;
      }
      fieldset legend {
          font-size: 1.1rem;
      }
      #menuContainerQuiz fieldset {
          min-height: 437px;
          height: max-content;
      }
      #pdvContent, #toolsContent, #capContent {
          max-height: 360px;
      }
      #menuContainerPdv, #menuContainerCap, #menuContainerTools {
          display: none;
      }
      #cardFooter {
          position: relative;
      }
  }
  
  @media (max-width: 800px) {
      #presContainer.open{
          margin: 0 auto 2rem;
      }
      #images-list {
          grid-template-columns: 1fr 1fr;
          max-width: 70%;
          margin-top: 1rem;
      }
      #partContainer, #presContainer  {
          max-width: 70%;
      }
      nav {
          width: 100%;
      }
      #largeNav {
          display: none;
      }
      #smallNav {
          display: block;
      }
  }
  
  @media (max-width: 670px) {
      #images-list, #partContainer, #presContainer {
          max-width: 80%;
      }
      .pipe {
          display: none;
      }
      #mention {
          display: block;
      }
  }
  
  @media (max-width: 570px) {
      #partContainer, #presContainer, #images-list {
          max-width: 90%;
      }
      #images-list a img {
          max-width: 100%;
          height: auto;
      }
  }
  
  @media (max-width: 510px) {
      main {
          padding-right: 0rem;
          padding-left: 0rem;
      }
      #partContainer, #presContainer {
          max-width: 100%;
      }
      #images-list {
          max-width: 100%;
          grid-gap: 25px;
          margin-top: 0;
      }
      #images-list img:hover, .nav-buttons img:hover {
          transform: none;
      }
      h2 {
          font-size: 1.1rem;
      }
      h2 img, .menu-icon img {
          height: 30px;
      }
      #popupContent {
          padding: 0 10px 10px;
      }
      .popup h2 {
          font-size: 1rem;
      }
      fieldset legend {
        font-size: 1.1rem;
        gap: 0.6rem;
    }
    
    .level-btn {
        width: 1.3rem;
        height: 1.3rem;
        font-size: 0.8rem;
    }
  }
  @media (max-width: 470px) {
    #question {
        padding-bottom: 1rem;
    }
}

  @media (max-width: 400px) {
      header img {
          max-width: 100%;
          width: 100%;
      }
      #presContainer.open {
          padding: .5rem;
      }
      #presContainer img {
          max-width: 100%;
      }
      #partContainer {
          max-width: 100%;
      }
      .part-flex a {
          min-width: 130px; 
      }
      .col-pres-txt p {
          font-size: .85rem;
      }
  }
  
  @media (max-width: 320px) {
      #smallNav {
          margin: 0 auto;
      }
      #smallNav a {
          width: 150px;
          font-size: 0.9rem;
      }
  }
  
  @media (max-width: 300px) {
      #smallNav a {
          width: 140px;
      }
  }





  /* ///////////////////////////////////////////////////////////////////////////////////////////////////// 
   PAGE D'ACCUEIL - Styles spécifiques
*/

/* Grille des cartes sur la page d'accueil */
#images-list .card {
    display: inline-block;
    transition: transform 0.3s ease;
}

#images-list .card:hover {
    transform: scale(1.05);
}

#images-list .card img {
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Message d'erreur */
.error-message {
    text-align: center;
    padding: 3rem;
    background: rgba(255, 100, 100, 0.1);
    border: 1px solid rgba(255, 100, 100, 0.3);
    border-radius: 15px;
    margin: 2rem auto;
    max-width: 500px;
}

.error-message h2 {
    color: #ff6b6b;
    margin-bottom: 1rem;
}

.error-message a {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.8rem 1.5rem;
    background: var(--color-blue);
    color: black;
    border-radius: 25px;
    font-weight: 500;
    transition: transform 0.3s ease;
}

.error-message a:hover {
    transform: scale(1.05);
}

/* Animation de chargement */
#images-list:empty::before {
    content: "Chargement des cartes...";
    display: block;
    text-align: center;
    padding: 3rem;
    color: var(--color-gray-light);
    font-style: italic;
}

/* Styles pour les liens de cartes (page index et category dans /cards/) */
.card-link {
    display: inline-block;
    transition: transform 0.3s ease;
}

.card-link:hover {
    transform: scale(1.05);
}

.card-link img {
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    max-width: 200px;
    height: auto;
}

/* Section cardsIndex dans /cards/index.html */
#cardsIndex {
    padding: 1rem;
}

#cardsIndex h2 {
    text-align: center;
    margin-bottom: 2rem;
}

#cardsList {
    display: grid;
    grid-gap: 35px;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    justify-items: center;
}

/* Section categoryView dans /cards/index.html */
#categoryView {
    padding: 1rem;
}

#categoryView h2 {
    text-align: center;
    margin-bottom: 2rem;
}

#categoryCards {
    display: grid;
    grid-gap: 35px;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    justify-items: center;
}