:root {
    --bg-color: #f4f4f9;
    --card-bg: #ffffff;
    --text-color: #333;
    --primary-color: #4a90e2;
    --primary-text: #ffffff;
    --grey-light: #e0e0e0;
    --grey-dark: #888;
    --shadow: 0 4px 8px rgba(0,0,0,0.1);
    --border-radius: 8px;
    --success: #63b179;
    --warning: #f7b544;
    --danger: #e57373;
}

body.dark-mode {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --grey-light: #2c2c2c;
    --grey-dark: #aaa;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 16px;
    /*transition: background-color 0.3s, color 0.3s;*/
}

.container { 
    width: 100%;
    max-width: 500px;
}

header { 
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

h1 { 
    font-size: 24px;
}

#app-title {
    cursor: pointer;
    user-select: none; /* Empêche la sélection du texte au clic */
}

#theme-toggle {
    background: none;
    border: 1px solid var(--grey-dark);
    color: var(--text-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hidden { 
    display: none !important;
}

#welcome-screen, #app-screen {
    background-color: var(--card-bg);
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
}

#welcome-screen p { 
    margin-bottom: 16px;
}

.btn {
    background-color: var(--primary-color);
    color: var(--primary-text);
    border: none;
    padding: 10px 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    margin: 4px;
    transition: opacity 0.2s;
}

.btn:hover { 
    opacity: 0.9;
}

.btn-secondary { 
    background-color: var(--grey-light);
    color: var(--text-color);
}

.btn-quit { 
    background-color: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
}

#deck-info { 
    margin-bottom: 16px;
    color: var(--grey-dark);
}

/* ---- BLOC À REMPLACER ---- */
#card-container {
    min-height: 200px;
    margin-bottom: 16px;
    cursor: pointer;
    /* On retire la perspective qui n'est utile que pour l'animation 3D */
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    /* On retire toutes les propriétés liées à l'animation 3D */
}

/* Styles communs pour le recto et le verso */
.card-face {
    display: flex; /* Utilise flexbox pour un meilleur centrage */
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 20px;
    border: 1px solid var(--grey-light);
    border-radius: var(--border-radius);
    font-size: 20px;
    text-align: center;
    width: 100%;
    height: 100%;
}

/* Styles pour les éléments à l'intérieur d'une face */
.card-face > *:first-child { margin-top: 0; }
.card-face > *:last-child { margin-bottom: 0; }
.card-face p { margin: 10px 0; }
.card-face ul, .card-face ol { text-align: left; display: inline-block; }
.card-face code { background-color: var(--grey-light); padding: 2px 5px; border-radius: 4px; font-family: monospace; }

/* Par défaut, le verso est complètement caché */
.card-back {
    display: none;
}

/* Quand la carte est "retournée" (avec la classe .is-flipped)... */
#card-container.is-flipped .card-front {
    display: none; /* ...on cache le recto */
}

#card-container.is-flipped .card-back {
    display: flex; /* ...et on affiche le verso */
}

/* ---- FIN DU BLOC ---- */
#answer-buttons { 
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

#btn-again { background-color: var(--danger); }
#btn-hard { background-color: var(--warning); }
#btn-good { background-color: var(--success); }
#btn-easy { background-color: var(--primary-color); }

.controls { 
    margin-top: 24px;
    border-top: 1px solid var(--grey-light);
    padding-top: 16px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

/* --- Tree Menu Styles --- */
#deck-tree {
    list-style: none;
    text-align: left;
    padding-left: 0;
    border-top: 1px solid var(--grey-light);
    padding-top: 10px;
    margin-top: 10px;
}

#deck-tree ul {
    list-style: none;
    padding-left: 20px;
}

#deck-tree li span {
    cursor: pointer;
    padding: 5px;
    display: block;
    border-radius: 4px;
}

#deck-tree li span:hover {
    background-color: var(--grey-light);
}

.deck-folder > span::before {
    content: '► ';
    display: inline-block;
    transition: transform 0.2s;
}

.deck-folder:not(.collapsed) > span::before {
    transform: rotate(90deg);
}

.deck-folder.collapsed > ul {
    display: none;
}

.deck-file > span::before {
    content: '📄 ';
}


.help-section {
    margin-bottom: 24px;
    border: 1px solid var(--grey-light);
    border-radius: var(--border-radius);
    text-align: left; /* <--- AJOUTEZ CETTE LIGNE */
}

/* --- Modal Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: left;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-content h3 { 
    text-align: center;
    margin-bottom: 20px;
}

.modal-content .btn { 
    display: block;
    width: 100%;
    margin-top: 20px;
}

.modal-content .radio-group { 
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-content label { 
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 18px;
}

.modal-content input[type="radio"] { 
    margin-right: 10px;
}

/* AJOUTEZ CECI À LA FIN DE VOTRE FICHIER css/style.css */

/* --- Styles pour le guide des boutons --- */
.guide-list {
    list-style: none; /* Enlève les puces de la liste */
    padding-left: 0;
}

.guide-item {
    display: flex;
    align-items: center; /* Aligne verticalement le bouton et le texte */
    gap: 8px; /* Espace entre le bouton et le texte */
    margin-bottom: 12px; /* Espace entre chaque ligne du guide */
}

.guide-item .btn {
    pointer-events: none; /* Rend les boutons non-cliquables */
    flex-shrink: 0; /* Empêche les boutons de se déformer */
    
    /* On réduit un peu la taille pour une meilleure intégration */
    padding: 4px 8px;
    font-size: 13px;
    margin: 0; /* Annule la marge par défaut des boutons */
}

#card-container.is-updating {
    /* Masque complètement l'élément et le retire du flux de la page */
    display: none !important; 
}

/* AJOUTEZ CECI À LA FIN DE VOTRE FICHIER css/style.css */

.deck-file {
    display: flex;
    align-items: center;
}

.deck-status {
    font-style: normal;
    margin-right: 8px;
}

/* AJOUTEZ CECI À LA FIN DE VOTRE FICHIER css/style.css */

/* --- Styles pour l'interrupteur de filtre --- */
.filter-switch-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--grey-dark);
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--grey-light);
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Dans css/style.css (à la fin du fichier) */

.error-message {
    background-color: #e57373; /* Couleur de danger de votre thème */
    color: #ffffff; /* Texte blanc pour la lisibilité */
    padding: 12px;
    border-radius: var(--border-radius);
    margin-bottom: 16px;
    text-align: center;
    font-weight: 500;
}

.card-inner.feedback-good {
    animation: flash-green 0.4s ease-out;
}
.card-inner.feedback-easy {
    animation: flash-blue 0.4s ease-out;
}
.card-inner.feedback-hard {
    animation: flash-orange 0.4s ease-out;
}
.card-inner.feedback-again {
    animation: flash-red 0.4s ease-out;
}

@keyframes flash-green {
    50% { box-shadow: 0 0 20px 5px var(--success); }
}
@keyframes flash-blue {
    50% { box-shadow: 0 0 20px 5px var(--primary-color); }
}
@keyframes flash-orange {
    50% { box-shadow: 0 0 20px 5px var(--warning); }
}
@keyframes flash-red {
    50% { box-shadow: 0 0 20px 5px var(--danger); }
}

/* Dans css/style.css */

.axis-container {
  position: relative; /* Contexte de positionnement pour la ligne */
  display: inline-block; /* Pour que le conteneur s'adapte au contenu */
  padding: 1em 0; /* Ajoute un peu d'espace vertical */
}

.axis-container hr {
  position: absolute;
  left: 0;
  right: 0;
  /* On remonte la ligne pour qu'elle passe au milieu des barres de graduation */
  top: 37%; /* Ajustez cette valeur si nécessaire (entre 30% et 40%) */
  transform: translateY(-50%);
  border: none;
  border-top: 1px solid var(--text-color);
  margin: 0;
}


.tickLabels {
  background-color: black;
  padding: 8px;
  border-radius: 3px;
}

.jsxbox {
  position: relative;
  overflow: hidden;
  line-height: 0;
}
