:root {
    --primary-color: #4a89dc;
    --secondary-color: #f6bb42;
    --dark-color: #0a0a08;
    --light-color: #e0e0e0;
    --success-color: #48cfad;
    --error-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --card-bg: rgba(74, 137, 220, 0.1);
    --card-border: 2px solid var(--primary-color);
    --text-primary: var(--light-color);
}

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

html {
    font-size: 16px;
}

@media (max-width: 768px) {
    html {
        font-size: 18px;
    }
}

body {
    font-family: 'Comic Neue', cursive, sans-serif;
    background-color: var(--dark-color);
    color: var(--light-color);
    line-height: 1.6;
    padding: 1rem;
    min-height: 100vh;
}

body.light-theme {
    background-color: var(--light-color);
    color: var(--dark-color);
    --card-bg: rgba(74, 137, 220, 0.05);
}

h1, h2, h3 {
    font-family: 'Press Start 2P', cursive;
    text-align: center;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2rem;
    margin: 1rem 0;
    text-shadow: 0 0 10px rgba(74, 137, 220, 0.5);
}

h2 {
    font-size: 1.5rem;
    margin: 2rem 0;
}

.subtitle {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.61rem; /* Augmenté de 15% */
    opacity: 0.9;
    font-family: 'Dancing Script', cursive;
    font-weight: 600;
    background: linear-gradient(45deg, #4a89dc, #48cfad, #f6bb42);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    margin-top: 4rem;
}

.btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 4px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    margin: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn:hover {
    background-color: #3a7bc8;
    transform: translateY(-2px);
}

.btn-primary {
    background-color: var(--primary-color);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--dark-color);
}

.btn-success {
    background-color: var(--success-color);
}

.btn-danger {
    background-color: var(--error-color);
}

.btn-small {
    padding: 0.3rem 0.6rem;
    font-size: 0.6rem;
}

.btn-save {
    background-color: var(--success-color);
}

.btn-cancel {
    background-color: var(--secondary-color);
    color: var(--dark-color);
}

.auth-btn, .access-btn {
    font-size: 0.7rem;
    padding: 0.6rem 1rem;
}

.access-section {
    text-align: center;
    margin: 4rem 0 2rem 0;
    padding: 2rem 0;
    border-top: 1px solid rgba(74, 137, 220, 0.3);
}

.control-btn {
    background: none;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.theme-language-selector {
    position: fixed;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1000;
    background: rgba(10, 10, 8, 0.9);
    padding: 0.5rem;
    border-radius: 8px;
    border: 2px solid var(--primary-color);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(74, 137, 220, 0.3);
}

.theme-toggle {
    background-color: var(--card-bg);
    border: 2px solid var(--primary-color);
    color: var(--light-color);
    padding: 0.4rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(74, 137, 220, 0.3);
}

.theme-toggle:hover {
    background-color: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(74, 137, 220, 0.6);
}

.light-theme .theme-toggle {
    color: var(--dark-color);
    background: rgba(224, 224, 224, 0.9);
}

.language-switcher {
    display: flex;
    gap: 0.3rem;
}

.language-btn {
    background-color: var(--card-bg);
    border: 2px solid var(--primary-color);
    color: var(--light-color);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6rem;
    box-shadow: 0 0 5px rgba(74, 137, 220, 0.2);
}

.language-btn.active,
.language-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(74, 137, 220, 0.5);
}

.light-theme .language-btn {
    color: var(--dark-color);
    background: rgba(224, 224, 224, 0.9);
}

.auth-container {
    position: fixed;
    top: 1rem;
    left: 1rem;
    display: flex;
    z-index: 100;
}

#userProfile {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem;
    background: var(--card-bg);
    border: var(--card-border);
    border-radius: 8px;
    position: relative;
    cursor: pointer;
}

#userProfile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    object-fit: cover;
    cursor: pointer;
}

#userProfile span {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    color: var(--primary-color);
    cursor: pointer;
}

.logout-btn {
    padding: 0.5rem 1rem;
    font-size: 0.7rem;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Press Start 2P', cursive;
}

.logout-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* ====== MENU UTILISATEUR ====== */
.user-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--dark-color), #1a1a1a);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    margin-top: 0.5rem;
    box-shadow: 0 0 20px rgba(74, 137, 220, 0.3);
    z-index: 1001;
}

.light-theme .user-menu {
    background: linear-gradient(135deg, var(--light-color), #f5f5f5);
}

.user-menu-item {
    padding: 0.8rem 1rem;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-menu-item:hover {
    background: var(--primary-color);
    color: white;
}

.user-menu-divider {
    height: 1px;
    background: var(--primary-color);
    margin: 0.5rem 0;
    opacity: 0.3;
}

.virtues-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2rem auto;
    max-width: 1000px;
}

.virtues-grid .virtue-card:nth-child(13) {
    grid-column: 2;
}

.virtue-card {
    background: var(--card-bg);
    border: var(--card-border);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.virtue-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(74, 137, 220, 0.3);
}

.virtue-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.virtue-card p {
    font-family: 'Comic Neue', cursive;
    font-size: 0.9rem;
}

.dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.dialog-content {
    background: linear-gradient(135deg, var(--dark-color), #1a1a1a);
    border: 3px solid var(--primary-color);
    border-radius: 12px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    text-align: center;
    box-shadow: 
        0 0 30px rgba(74, 137, 220, 0.5),
        inset 0 0 20px rgba(74, 137, 220, 0.1);
}

.light-theme .dialog-content {
    background: linear-gradient(135deg, var(--light-color), #f5f5f5);
}

.close-dialog {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-dialog:hover {
    color: var(--secondary-color);
    transform: scale(1.2);
}

#dialogTitle {
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

#dialogDescription {
    font-family: 'Comic Neue', cursive;
    line-height: 1.6;
    text-align: center;
}

/* ====== STYLES POUR LES NOTIFICATIONS ====== */
.notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, var(--dark-color), #1a1a1a);
    border: 3px solid var(--primary-color);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    color: var(--primary-color);
    text-align: center;
    z-index: 2000;
    box-shadow: 
        0 0 30px rgba(74, 137, 220, 0.5),
        inset 0 0 20px rgba(74, 137, 220, 0.1);
    animation: notificationAppear 0.5s ease-out;
    min-width: 300px;
}

.notification-error {
    border-color: var(--error-color);
    color: var(--error-color);
    box-shadow: 
        0 0 30px rgba(231, 76, 60, 0.5),
        inset 0 0 20px rgba(231, 76, 60, 0.1);
}

.notification-success {
    border-color: var(--success-color);
    color: var(--success-color);
    box-shadow: 
        0 0 30px rgba(72, 207, 173, 0.5),
        inset 0 0 20px rgba(72, 207, 173, 0.1);
}

.notification-warning {
    border-color: var(--warning-color);
    color: var(--warning-color);
    box-shadow: 
        0 0 30px rgba(243, 156, 18, 0.5),
        inset 0 0 20px rgba(243, 156, 18, 0.1);
}

.notification-info {
    border-color: var(--info-color);
    color: var(--info-color);
    box-shadow: 
        0 0 30px rgba(52, 152, 219, 0.5),
        inset 0 0 20px rgba(52, 152, 219, 0.1);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notification-content i {
    font-size: 1.2rem;
}

@keyframes notificationAppear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* ====== STYLES POUR LE PROFIL UTILISATEUR ====== */
.profile-dialog-content {
    max-width: 700px;
    text-align: left;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.profile-avatar-section {
    text-align: center;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--primary-color);
}

#profileAvatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    object-fit: cover;
    margin-bottom: 1rem;
}

.profile-info-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    color: var(--primary-color);
}

.form-group input,
.form-group textarea {
    padding: 0.8rem;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    background: rgba(74, 137, 220, 0.1);
    color: var(--light-color);
    font-family: 'Comic Neue', cursive;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.light-theme .form-group input,
.light-theme .form-group textarea {
    color: var(--dark-color);
    background: rgba(74, 137, 220, 0.05);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(74, 137, 220, 0.5);
}

.form-group input:readonly {
    opacity: 0.7;
    cursor: not-allowed;
}

.profile-friends-section {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--primary-color);
}

.profile-friends-section h3 {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-align: left;
}

.add-friend-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.add-friend-form input {
    flex: 1;
    padding: 0.5rem;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    background: rgba(74, 137, 220, 0.1);
    color: var(--light-color);
    font-family: 'Comic Neue', cursive;
}

.friends-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.friend-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: rgba(74, 137, 220, 0.05);
    border-radius: 4px;
    border: 1px solid rgba(74, 137, 220, 0.2);
}

.no-friends {
    text-align: center;
    opacity: 0.7;
    font-style: italic;
    padding: 1rem;
}

.profile-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ====== STYLES POUR LES PARAMÈTRES ====== */
.settings-dialog-content {
    max-width: 500px;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.settings-section {
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--primary-color);
}

.settings-section h3 {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-align: left;
}

.danger-zone {
    border-color: var(--error-color);
    background: rgba(231, 76, 60, 0.1);
}

.danger-zone h3 {
    color: var(--error-color);
}

.danger-zone p {
    margin-bottom: 1rem;
    color: var(--error-color);
    opacity: 0.8;
}

.audio-player {
    background: linear-gradient(135deg, var(--dark-color), #1a1a1a);
    border: 3px solid var(--primary-color);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 700px;
    box-shadow: 
        0 0 20px rgba(74, 137, 220, 0.3),
        inset 0 0 20px rgba(74, 137, 220, 0.1);
    position: relative;
}

.audio-player::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--success-color));
    border-radius: 12px;
    z-index: -1;
    animation: borderGlow 3s ease-in-out infinite alternate;
}

@keyframes borderGlow {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

#nowPlaying {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    text-shadow: 0 0 10px rgba(246, 187, 66, 0.5);
    animation: textPulse 2s ease-in-out infinite alternate;
}

@keyframes textPulse {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
}

.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
}

.control-btn {
    background: linear-gradient(135deg, var(--card-bg), rgba(74, 137, 220, 0.2));
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.8rem 1.2rem;
    margin: 0 0.3rem;
    cursor: pointer;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    font-family: 'Press Start 2P', cursive;
}

.control-btn:hover {
    background: linear-gradient(135deg, var(--primary-color), #3a7bc8);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(74, 137, 220, 0.4);
}

.control-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.control-btn.recording {
    background: linear-gradient(135deg, var(--error-color), #c0392b) !important;
    animation: recordingPulse 1.5s ease-in-out infinite alternate;
}

@keyframes recordingPulse {
    0% { opacity: 0.8; box-shadow: 0 0 5px rgba(231, 76, 60, 0.5); }
    100% { opacity: 1; box-shadow: 0 0 20px rgba(231, 76, 60, 0.8); }
}

.progress-container {
    flex: 1;
    min-width: 250px;
    text-align: center;
}

.progress-container input[type="range"] {
    width: 100%;
    height: 8px;
    margin: 1rem 0;
    background: rgba(74, 137, 220, 0.2);
    border-radius: 4px;
    appearance: none;
    cursor: pointer;
}

.progress-container input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(74, 137, 220, 0.6);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(74, 137, 220, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--primary-color);
}

.volume-control i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.volume-control input[type="range"] {
    width: 100px;
    height: 6px;
    background: rgba(74, 137, 220, 0.3);
    border-radius: 3px;
    appearance: none;
    cursor: pointer;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--secondary-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 8px rgba(246, 187, 66, 0.6);
}

.recording-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.recording-controls input[type="text"] {
    padding: 0.5rem;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    background: transparent;
    color: var(--light-color);
    font-family: 'Comic Neue', cursive;
}

.light-theme .recording-controls input[type="text"] {
    color: var(--dark-color);
}

#audioLibrarySection {
    text-align: center;
    margin: 3rem auto;
    max-width: 1000px;
}

#audioLibrarySection h2 {
    font-family: 'Press Start 2P', cursive;
}

.audio-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem auto;
    justify-items: center;
}

.audio-item {
    background: var(--card-bg);
    border: var(--card-border);
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
}

.audio-item:hover {
    background-color: rgba(74, 137, 220, 0.2);
    transform: translateY(-2px);
}

.audio-item h4 {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.audio-item p {
    font-family: 'Comic Neue', cursive;
    font-size: 0.9rem;
    opacity: 0.8;
}

.audio-item.playing {
    background: linear-gradient(135deg, var(--primary-color), rgba(74, 137, 220, 0.3));
    color: white;
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(74, 137, 220, 0.4);
}

.audio-item.playing h4 {
    color: white;
}

.audio-item.playing::before {
    content: "♪ ";
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 1.2rem;
    animation: musicNote 2s ease-in-out infinite alternate;
}

@keyframes musicNote {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* ====== STYLES POUR LES COMMENTAIRES ====== */
#commentsSection {
    margin: 3rem auto;
    max-width: 800px;
    text-align: center;
}

.comments-list {
    margin: 2rem 0;
    padding: 0;
}

.comment-item {
    background: var(--card-bg);
    border: var(--card-border);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    text-align: left;
    position: relative;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    color: var(--primary-color);
}

.comment-actions {
    display: flex;
    gap: 0.5rem;
}

.comment-edit-btn,
.comment-delete-btn {
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.3rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.7rem;
    transition: all 0.3s ease;
}

.comment-edit-btn:hover {
    background: var(--primary-color);
    color: white;
}

.comment-delete-btn {
    border-color: var(--error-color);
    color: var(--error-color);
}

.comment-delete-btn:hover {
    background: var(--error-color);
    color: white;
}

.comment-text {
    font-family: 'Comic Neue', cursive;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.comment-date {
    font-size: 0.8rem;
    opacity: 0.7;
    text-align: right;
}

.comment-edit-form {
    margin-top: 1rem;
}

.comment-edit-textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.8rem;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    background: rgba(74, 137, 220, 0.1);
    color: var(--light-color);
    font-family: 'Comic Neue', cursive;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 0.5rem;
}

.light-theme .comment-edit-textarea {
    color: var(--dark-color);
}

.comment-edit-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.comment-form {
    background: var(--card-bg);
    border: var(--card-border);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.comment-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 1rem;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    background: transparent;
    color: var(--light-color);
    font-family: 'Comic Neue', cursive;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 1rem;
}

.light-theme .comment-form textarea {
    color: var(--dark-color);
}

.comment-form textarea:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(74, 137, 220, 0.5);
}

.login-prompt {
    background: var(--card-bg);
    border: var(--card-border);
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
}

.login-prompt p {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.9rem;
    color: var(--primary-color);
}

.site-footer {
    text-align: center;
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 1px solid var(--primary-color);
    background: linear-gradient(90deg, transparent, rgba(74, 137, 220, 0.1), transparent);
}

.site-footer p {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    opacity: 0.8;
}

.footer-link {
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--secondary-color);
}

/* ====== CORRECTION DU WIDGET DISCORD ====== */
#discordWidget {
    margin: 2rem auto;
    text-align: center;
    max-width: 400px;
    background: var(--card-bg);
    border: var(--card-border);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 0 20px rgba(74, 137, 220, 0.3);
}

#discordWidget h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 0.9rem;
}

#discordWidget iframe {
    border-radius: 8px;
    max-width: 100%;
    height: 400px;
}

.hidden {
    display: none !important;
}

/* ====== STYLES POUR LES MESSAGES D'ERREUR/INFO ====== */
.no-virtues, .no-audio, .no-comments {
    text-align: center;
    padding: 2rem;
    background: var(--card-bg);
    border: var(--card-border);
    border-radius: 8px;
    margin: 1rem 0;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    color: var(--primary-color);
    opacity: 0.8;
}

.audio-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--card-bg);
    border: var(--card-border);
    border-radius: 8px;
    margin: 1rem 0;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    color: var(--secondary-color);
}

.audio-loading::before {
    content: "♪";
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* ====== PERSONNALISATION AUTH0 ====== */
.auth0-lock {
    font-family: 'Press Start 2P', cursive !important;
}

.auth0-lock-widget {
    background: linear-gradient(135deg, var(--dark-color), #1a1a1a) !important;
    border: 3px solid var(--primary-color) !important;
    border-radius: 12px !important;
    box-shadow: 
        0 0 30px rgba(74, 137, 220, 0.5),
        inset 0 0 20px rgba(74, 137, 220, 0.1) !important;
}

.auth0-lock-header {
    background: transparent !important;
    border-bottom: 2px solid var(--primary-color) !important;
}

.auth0-lock-header-logo {
    filter: brightness(0) saturate(100%) invert(42%) sepia(93%) saturate(1352%) hue-rotate(204deg) brightness(95%) contrast(86%) !important;
}

.auth0-lock-form {
    background: transparent !important;
}

.auth0-lock-input-wrap {
    background: rgba(74, 137, 220, 0.1) !important;
    border: 2px solid var(--primary-color) !important;
    border-radius: 8px !important;
}

.auth0-lock-input {
    background: transparent !important;
    color: var(--light-color) !important;
    font-family: 'Comic Neue', cursive !important;
    font-size: 1rem !important;
}

.auth0-lock-input::placeholder {
    color: rgba(224, 224, 224, 0.6) !important;
}

.auth0-lock-submit {
    background: linear-gradient(135deg, var(--primary-color), #3a7bc8) !important;
    border: none !important;
    border-radius: 8px !important;
    font-family: 'Press Start 2P', cursive !important;
    font-size: 0.8rem !important;
    text-transform: uppercase !important;
    padding: 0.8rem 1.5rem !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3) !important;
}

.auth0-lock-submit:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 12px rgba(74, 137, 220, 0.4) !important;
}

.auth0-lock-tabs {
    background: transparent !important;
    border-bottom: 1px solid var(--primary-color) !important;
}

.auth0-lock-tabs-current {
    background: var(--primary-color) !important;
    color: white !important;
    font-family: 'Press Start 2P', cursive !important;
    font-size: 0.7rem !important;
}

.auth0-lock-alternative {
    background: rgba(74, 137, 220, 0.1) !important;
    border: 1px solid var(--primary-color) !important;
    border-radius: 8px !important;
    color: var(--primary-color) !important;
    font-family: 'Comic Neue', cursive !important;
}

.auth0-lock-alternative:hover {
    background: var(--primary-color) !important;
    color: white !important;
}

/* ====== LOGO LUXARICANA DANS AUTH0 ====== */
.auth0-lock-header-logo::before {
    content: "";
    display: block;
    width: 80px;
    height: 80px;
    background-image: url('https://i.ibb.co/7tG7k4h/logo-luxaricana.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin: 0 auto 1rem auto;
    filter: drop-shadow(0 0 10px rgba(74, 137, 220, 0.6));
    animation: logoGlow 3s ease-in-out infinite alternate;
}

@keyframes logoGlow {
    0% { 
        filter: drop-shadow(0 0 10px rgba(74, 137, 220, 0.6));
        transform: scale(1);
    }
    100% { 
        filter: drop-shadow(0 0 20px rgba(74, 137, 220, 0.9));
        transform: scale(1.05);
    }
}

/* ====== RESPONSIVE DESIGN ====== */
@media (max-width: 900px) {
    .virtues-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .virtues-grid .virtue-card:nth-child(13) {
        grid-column: span 2;
        margin: 0 auto;
        max-width: 300px;
    }
}

@media (max-width: 600px) {
    .virtues-grid {
        grid-template-columns: 1fr;
    }
    
    .virtues-grid .virtue-card:nth-child(13) {
        grid-column: 1;
        margin: 0 auto;
        max-width: 300px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.2rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.7rem;
    }
    
    .auth-container {
        flex-direction: column;
        position: relative;
        top: auto;
        left: auto;
        margin-bottom: 1rem;
        justify-content: center;
    }
    
    .player-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .recording-controls {
        flex-direction: column;
    }
    
    header {
        margin-top: 5rem;
    }
    
    .theme-language-selector {
        position: fixed;
        top: 0.5rem;
        right: 0.5rem;
        background: rgba(10, 10, 8, 0.95);
        padding: 0.3rem;
        border-radius: 6px;
        gap: 0.3rem;
        box-shadow: 0 0 15px rgba(74, 137, 220, 0.4);
    }
    
    #userProfile {
        flex-direction: column;
        text-align: center;
    }
    
    .logout-btn {
        width: 100%;
    }
    
    .access-section {
        margin: 3rem 0 1rem 0;
        padding: 1.5rem 0;
    }
    
    .access-btn {
        width: 100%;
        max-width: 300px;
        padding: 1rem 2rem;
        font-size: 0.8rem;
    }
    
    #discordWidget iframe {
        width: 100%;
        height: 300px;
    }
    
    .dialog-content {
        width: 95%;
        padding: 1.5rem;
    }
    
    .profile-dialog-content {
        max-width: 95%;
    }
    
    .profile-form {
        gap: 1.5rem;
    }
    
    .profile-actions {
        flex-direction: column;
    }
    
    .add-friend-form {
        flex-direction: column;
    }
    
    .comment-edit-actions {
        flex-direction: column;
    }
    
    .user-menu {
        position: fixed;
        top: 4rem;
        left: 1rem;
        right: auto;
        width: 200px;
    }
    
    .notification {
        width: 90%;
        min-width: auto;
        font-size: 0.7rem;
    }
}

/* ====== ANIMATIONS SUPPLÉMENTAIRES ====== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comment-item {
    animation: fadeIn 0.5s ease-out;
}

.audio-item {
    animation: fadeIn 0.3s ease-out;
}

.virtue-card {
    animation: fadeIn 0.4s ease-out;
}

/* ====== SCROLLBAR PERSONNALISÉE ====== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--dark-color);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 6px;
    border: 2px solid var(--dark-color);
}

::-webkit-scrollbar-thumb:hover {
    background: #3a7bc8;
}

.light-theme ::-webkit-scrollbar-track {
    background: var(--light-color);
    border: 2px solid var(--light-color);
}

.light-theme ::-webkit-scrollbar-thumb {
    border: 2px solid var(--light-color);
}

/* ====== FOCUS STYLES POUR L'ACCESSIBILITÉ ====== */
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

.btn:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* ====== ÉTATS DE CHARGEMENT ====== */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ====== ENHANCED AUTH0 DIALOG STYLING ====== */
.auth-dialog {
    max-width: 500px;
    background: linear-gradient(135deg, var(--dark-color), #1a1a1a) !important;
    border: 4px solid var(--primary-color) !important;
    border-radius: 16px !important;
    box-shadow: 
        0 0 40px rgba(74, 137, 220, 0.6),
        inset 0 0 30px rgba(74, 137, 220, 0.1),
        0 0 0 2px var(--secondary-color) !important;
    position: relative;
    overflow: hidden;
}

.auth-dialog::before {
    content: "";
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color), var(--success-color));
    border-radius: 16px;
    z-index: -1;
    animation: borderGlow 3s ease-in-out infinite alternate;
}

.auth-dialog-header {
    text-align: center;
    padding: 2rem 2rem 1rem 2rem;
    background: rgba(74, 137, 220, 0.1);
    border-bottom: 2px solid var(--primary-color);
    position: relative;
}

.auth-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 15px rgba(74, 137, 220, 0.8));
    animation: logoGlow 3s ease-in-out infinite alternate;
}

.auth-dialog-header h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px rgba(74, 137, 220, 0.5);
}

.auth-subtitle {
    font-family: 'Dancing Script', cursive;
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin: 0;
    font-weight: 600;
}

.auth-content {
    padding: 2rem;
}

.retro-border {
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    background: rgba(74, 137, 220, 0.05);
    position: relative;
}

.retro-border::before {
    content: "◆ ◆ ◆ ◆ ◆";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-color);
    color: var(--primary-color);
    padding: 0 1rem;
    font-size: 0.8rem;
}

.btn-auth {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), #3a7bc8) !important;
    font-size: 1rem !important;
    padding: 1rem 2rem !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
}

.btn-auth::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-auth:hover::before {
    left: 100%;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    background: rgba(74, 137, 220, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    font-family: 'Comic Neue', cursive;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(74, 137, 220, 0.2);
    transform: translateX(5px);
}

.feature-item i {
    color: var(--secondary-color);
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

/* ====== ENHANCED RETRO DIALOGS ====== */
.retro-dialog {
    max-width: 600px;
    background: linear-gradient(135deg, var(--dark-color), #1a1a1a) !important;
    border: 4px solid var(--primary-color) !important;
    border-radius: 12px !important;
    box-shadow: 
        0 0 30px rgba(74, 137, 220, 0.5),
        inset 0 0 20px rgba(74, 137, 220, 0.1),
        0 0 0 2px var(--secondary-color) !important;
    position: relative;
    overflow: hidden;
}

.retro-dialog::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--success-color));
    animation: scanline 2s linear infinite;
}

@keyframes scanline {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.dialog-header {
    text-align: center;
    padding: 2rem;
    border-bottom: 2px solid var(--primary-color);
    background: rgba(74, 137, 220, 0.1);
}

.dialog-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px rgba(74, 137, 220, 0.6));
    animation: logoFloat 3s ease-in-out infinite alternate;
}

@keyframes logoFloat {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-5px); }
}

.building-content {
    padding: 2rem;
    text-align: center;
}

.building-animation {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.building-animation i {
    color: var(--secondary-color);
    animation: buildingBounce 1.5s ease-in-out infinite;
}

.building-animation i:nth-child(1) { animation-delay: 0s; }
.building-animation i:nth-child(2) { animation-delay: 0.5s; }
.building-animation i:nth-child(3) { animation-delay: 1s; }

@keyframes buildingBounce {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

.progress-bar-container {
    margin-top: 2rem;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(74, 137, 220, 0.2);
    border: 2px solid var(--primary-color);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    animation: progressFill 4s ease-in-out infinite;
    position: relative;
}

.progress-fill::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: progressShine 2s linear infinite;
}

@keyframes progressFill {
    0% { width: 0%; }
    50% { width: 75%; }
    100% { width: 90%; }
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    display: block;
    margin-top: 0.5rem;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    color: var(--primary-color);
    animation: textBlink 2s ease-in-out infinite;
}

@keyframes textBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ====== SYNCHRONIZATION STATUS ====== */
.sync-status {
    position: fixed;
    top: 50%;
    right: 2rem;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--dark-color), #1a1a1a);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    z-index: 1500;
    box-shadow: 0 0 20px rgba(74, 137, 220, 0.3);
    transition: all 0.3s ease;
}

.sync-success {
    border-color: var(--success-color);
    color: var(--success-color);
    box-shadow: 0 0 20px rgba(72, 207, 173, 0.3);
}

.sync-warning {
    border-color: var(--warning-color);
    color: var(--warning-color);
    box-shadow: 0 0 20px rgba(243, 156, 18, 0.3);
}

.sync-error {
    border-color: var(--error-color);
    color: var(--error-color);
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.3);
}

.sync-icon {
    font-size: 1rem;
}

.spinning {
    animation: spin 1s linear infinite;
}

/* ====== ACCESS SECTION ENHANCEMENT ====== */
.access-section {
    text-align: center;
    margin: 4rem 0 2rem 0;
    padding: 3rem 0;
    border-top: 2px solid rgba(74, 137, 220, 0.3);
    border-bottom: 2px solid rgba(74, 137, 220, 0.3);
    background: linear-gradient(135deg, transparent, rgba(74, 137, 220, 0.05), transparent);
    position: relative;
}

.access-section::before {
    content: "◆ ◆ ◆";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-color);
    color: var(--primary-color);
    padding: 0 1rem;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
}

.access-description {
    margin-top: 1rem;
    font-family: 'Dancing Script', cursive;
    font-size: 1.2rem;
    color: var(--secondary-color);
    font-weight: 600;
    opacity: 0.9;
}

.access-btn {
    font-size: 1rem !important;
    padding: 1rem 2rem !important;
    background: linear-gradient(135deg, var(--success-color), #48cfad) !important;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 3px solid var(--success-color) !important;
    box-shadow: 
        0 0 20px rgba(72, 207, 173, 0.4),
        inset 0 0 10px rgba(72, 207, 173, 0.1);
}

.access-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.access-btn:hover::before {
    left: 100%;
}

/* ====== CORRECTIONS FINALES ======
.dialog-content h2 {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    margin-bottom: 1.5rem;
}

.dialog-content p {
    text-align: justify;
    line-height: 1.8;
    font-size: 1rem;
}

#luxaricanaDialogTitle, #sipaDialogTitle {
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
    font-family: 'Press Start 2P', cursive;
    font-size: 1.2rem;
    text-shadow: 0 0 10px rgba(74, 137, 220, 0.5);
}

#luxaricanaDialogContent, #sipaDialogContent {
    font-family: 'Press Start 2P', cursive;
    line-height: 1.6;
    text-align: center;
    font-size: 1.4rem;
    color: var(--secondary-color);
    text-shadow: 0 0 5px rgba(246, 187, 66, 0.5);
    animation: textGlow 2s ease-in-out infinite alternate;
}

@keyframes textGlow {
    0% { text-shadow: 0 0 5px rgba(246, 187, 66, 0.5); }
    100% { text-shadow: 0 0 15px rgba(246, 187, 66, 0.8); }
}
