/* Variables CSS */
:root {
    /* Couleurs principales */
    --primary-color: #4CAF50;
    --secondary-color: #2196F3;
    --accent-color: #FF9800;
    --danger-color: #F44336;
    
    /* Couleurs thématiques */
    --nature-primary: #2E7D32;
    --nature-secondary: #4CAF50;
    --nature-light: #81C784;
    --nature-bg: #E8F5E8;
    
    --histoire-primary: #8D6E63;
    --histoire-secondary: #A1887F;
    --histoire-light: #BCAAA4;
    --histoire-bg: #F3E5AB;
    
    --science-primary: #1A237E;
    --science-secondary: #3F51B5;
    --science-light: #7986CB;
    --science-bg: #E8EAF6;
    
    --creativite-primary: #E91E63;
    --creativite-secondary: #2196F3;
    --creativite-accent: #FF9800;
    --creativite-bg: #FCE4EC;
    
    /* Typographie */
    --font-family: 'Arial', sans-serif;
    --font-size-base: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 24px;
    --font-size-xxl: 36px;
    
    /* Espacements */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset et base */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Page d'authentification */
.auth-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="70" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="70" cy="80" r="2.5" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: float 20s infinite linear;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: var(--spacing-xl);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.auth-title {
    color: var(--primary-color);
    font-size: var(--font-size-xxl);
    font-weight: bold;
    margin-bottom: var(--spacing-sm);
}

.auth-subtitle {
    color: #666;
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-lg);
}

.auth-input {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: var(--spacing-sm);
    font-size: var(--font-size-base);
    transition: var(--transition-normal);
}

.auth-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25);
    outline: none;
}

.auth-btn {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 10px;
    color: white;
    font-size: var(--font-size-lg);
    font-weight: bold;
    padding: var(--spacing-md);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.auth-btn:active {
    transform: translateY(0);
}

/* Page principale */
.main-container {
    min-height: 100vh;
    background: #f8f9fa;
}

.main-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: var(--spacing-sm) 0;
}

.brand-text {
    color: white;
    font-size: var(--font-size-xl);
    font-weight: bold;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: var(--spacing-xs) var(--spacing-sm) !important;
    border-radius: 8px;
    transition: var(--transition-normal);
    margin: 0 var(--spacing-xs);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white !important;
    transform: translateY(-1px);
}

.user-info {
    color: white;
    font-size: 14px;
}

.user-email {
    opacity: 0.9;
}

/* Sections */
.section-container {
    min-height: calc(100vh - 80px);
    padding: var(--spacing-lg) 0;
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-xl);
}

.btn-back {
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 8px;
    color: #333;
    padding: var(--spacing-xs) var(--spacing-sm);
    margin-right: var(--spacing-md);
    transition: var(--transition-normal);
}

.btn-back:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: translateX(-2px);
}

.section-title {
    font-size: var(--font-size-xxl);
    font-weight: bold;
    margin: 0;
}

/* Page d'accueil */
.home-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.home-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: var(--spacing-md);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.home-subtitle {
    font-size: var(--font-size-xl);
    margin-bottom: var(--spacing-xl);
    opacity: 0.9;
}

/* Cartes d'aventure */
.adventure-card {
    background: white;
    border-radius: 20px;
    padding: var(--spacing-lg);
    text-align: center;
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.adventure-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.card-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
}

.adventure-card h3 {
    color: #333;
    font-size: var(--font-size-xl);
    font-weight: bold;
    margin-bottom: var(--spacing-sm);
}

.adventure-card p {
    color: #666;
    font-size: var(--font-size-base);
    margin: 0;
}

/* Couleurs spécifiques des cartes */
.nature-card:hover {
    background: linear-gradient(135deg, var(--nature-bg), var(--nature-light));
}

.histoire-card:hover {
    background: linear-gradient(135deg, var(--histoire-bg), var(--histoire-light));
}

.science-card:hover {
    background: linear-gradient(135deg, var(--science-bg), var(--science-light));
}

.creativite-card:hover {
    background: linear-gradient(135deg, var(--creativite-bg), #F8BBD9);
}

/* Sections thématiques */
.nature-section {
    background: linear-gradient(135deg, var(--nature-bg), #C8E6C9);
}

.nature-section .section-title {
    color: var(--nature-primary);
}

.histoire-section {
    background: linear-gradient(135deg, var(--histoire-bg), #D7CCC8);
}

.histoire-section .section-title {
    color: var(--histoire-primary);
}

.science-section {
    background: linear-gradient(135deg, var(--science-bg), #C5CAE9);
}

.science-section .section-title {
    color: var(--science-primary);
}

.creativite-section {
    background: linear-gradient(135deg, var(--creativite-bg), #F8BBD9);
}

.creativite-section .section-title {
    color: var(--creativite-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .home-title {
        font-size: 2rem;
    }
    
    .home-subtitle {
        font-size: var(--font-size-lg);
    }
    
    .auth-card {
        margin: var(--spacing-md);
        padding: var(--spacing-lg);
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .btn-back {
        margin-bottom: var(--spacing-sm);
        margin-right: 0;
    }
}

@media (max-width: 576px) {
    .adventure-card {
        margin-bottom: var(--spacing-md);
    }
    
    .card-icon {
        font-size: 3rem;
    }
    
    .adventure-card h3 {
        font-size: var(--font-size-lg);
    }
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus pour l'accessibilité */
button:focus,
input:focus,
.nav-link:focus,
.adventure-card:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Contraste élevé */
@media (prefers-contrast: high) {
    .auth-card {
        background: white;
        border: 2px solid #000;
    }
    
    .adventure-card {
        border: 2px solid #000;
    }
}



/* Chatbot Robin */
.robin-chatbot {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    overflow: hidden;
}

.chatbot-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: var(--spacing-sm);
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-normal);
}

.chatbot-header:hover {
    background: linear-gradient(135deg, #45a049, #1976D2);
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: var(--spacing-xs);
    object-fit: cover;
}

.chatbot-toggle {
    margin-left: auto;
    font-size: 1.2rem;
}

.chatbot-body {
    height: 300px;
    display: flex;
    flex-direction: column;
}

.chatbot-messages {
    flex: 1;
    padding: var(--spacing-sm);
    overflow-y: auto;
    max-height: 250px;
}

.message {
    margin-bottom: var(--spacing-sm);
    padding: var(--spacing-xs);
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.4;
}

.bot-message {
    background: #f0f0f0;
    color: #333;
    margin-right: 20px;
}

.user-message {
    background: var(--primary-color);
    color: white;
    margin-left: 20px;
    text-align: right;
}

.chatbot-input {
    display: flex;
    padding: var(--spacing-xs);
    border-top: 1px solid #eee;
}

.chatbot-input input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: var(--spacing-xs);
    margin-right: var(--spacing-xs);
    outline: none;
}

.chatbot-input button {
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    color: white;
    cursor: pointer;
    transition: var(--transition-normal);
}

.chatbot-input button:hover {
    background: #45a049;
    transform: scale(1.1);
}

/* Image Robin sur l'accueil */
.robin-image {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: var(--transition-normal);
}

.robin-image:hover {
    transform: scale(1.05);
}

/* Responsive chatbot */
@media (max-width: 768px) {
    .robin-chatbot {
        width: 280px;
        bottom: 10px;
        right: 10px;
    }
    
    .chatbot-body {
        height: 250px;
    }
}


/* Styles pour le chatbot amélioré */
.suggestions {
    background: #f8f9fa !important;
    border-left: 4px solid var(--primary-color);
}

.suggestion-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.suggestion-buttons .btn {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.suggestion-buttons .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Message avec formatage HTML */
.bot-message strong {
    color: var(--primary-color);
    font-weight: 600;
}

.bot-message br {
    line-height: 1.6;
}

/* Animation pour les nouveaux messages */
.message {
    animation: slideInMessage 0.3s ease-out;
}

@keyframes slideInMessage {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Amélioration du header du chatbot */
.chatbot-header {
    background: linear-gradient(135deg, #4CAF50, #45a049, #2196F3);
    position: relative;
    overflow: hidden;
}

.chatbot-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Indicateur de frappe */
.typing-indicator {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 10px;
    margin: 5px 20px 5px 0;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    background: #999;
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Badge pour les applications gratuites */
.free-badge {
    background: #4CAF50;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
}

/* Responsive pour le chatbot amélioré */
@media (max-width: 768px) {
    .suggestion-buttons {
        flex-direction: column;
    }
    
    .suggestion-buttons .btn {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .chatbot-messages {
        font-size: 13px;
    }
}


/* Correction des tailles d'images */
.animal-image, .character-image, .inspiration-image {
    width: 100%;
    max-width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.animal-image:hover, .character-image:hover, .inspiration-image:hover {
    transform: scale(1.05);
}

.solar-system-image, .telescope-image {
    width: 100%;
    max-width: 200px;
    height: auto;
    border-radius: 10px;
}

.treasure-map {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 15px;
    position: relative;
}

/* Styles pour les cartes d'activités */
.animal-card, .character-card, .inspiration-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
}

.animal-card:hover, .character-card:hover, .inspiration-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.telescope-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    height: 100%;
}

.space-facts {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 20px;
    height: 100%;
}

.fact-list {
    list-style: none;
    padding: 0;
}

.fact-list li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.fact-list li::before {
    content: "⭐";
    position: absolute;
    left: 0;
}

/* Styles pour les quiz */
.quiz-launch-card {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
    margin-bottom: 30px;
}

.quiz-launch-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.quiz-launch-card .btn {
    background: white;
    color: #4CAF50;
    border: none;
    padding: 12px 30px;
    font-weight: bold;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.quiz-launch-card .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Styles pour les jeux d'association */
.association-game {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
}

.game-animals, .game-habitats {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    flex-wrap: wrap;
    gap: 10px;
}

.draggable-animal, .habitat-zone {
    background: white;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    margin: 5px;
    cursor: move;
    transition: all 0.3s ease;
    min-width: 120px;
    text-align: center;
    font-weight: bold;
}

.draggable-animal:hover {
    background: #e3f2fd;
    border-color: #2196F3;
}

.habitat-zone {
    background: #f0f0f0;
    border-style: dashed;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.habitat-zone.drag-over {
    background: #e8f5e8;
    border-color: #4CAF50;
}

.habitat-zone.filled {
    background: #c8e6c9;
    border-color: #4CAF50;
    border-style: solid;
}

/* Styles pour la chronologie */
.timeline-container {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
}

.timeline-events {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 10px;
}

.timeline-event {
    background: #fff3e0;
    border: 2px solid #ff9800;
    border-radius: 10px;
    padding: 10px;
    cursor: move;
    transition: all 0.3s ease;
    min-width: 150px;
    text-align: center;
    font-size: 14px;
}

.timeline-event:hover {
    background: #ffe0b2;
    transform: scale(1.05);
}

.timeline-line {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: linear-gradient(to right, #8bc34a, #4caf50, #009688);
    height: 60px;
    border-radius: 30px;
    margin-top: 20px;
}

.timeline-slot {
    background: white;
    border: 3px solid #4caf50;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #4caf50;
    min-height: 60px;
}

.timeline-slot.filled {
    background: #4caf50;
    color: white;
}

/* Styles pour les expériences */
.experiment-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}

.experiment-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 150px;
    max-width: 200px;
}

.experiment-card:hover {
    border-color: #2196F3;
    background: #f3f8ff;
    transform: translateY(-3px);
}

/* Styles pour la créativité */
.color-palette-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    height: 100%;
}

.color-circles {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.color-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.color-circle:hover {
    transform: scale(1.2);
}

.story-creator {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
}

.prompt-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.prompt-buttons .btn {
    border-radius: 20px;
    padding: 8px 16px;
}

.story-editor textarea {
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    padding: 15px;
    font-size: 16px;
    line-height: 1.6;
}

.story-editor textarea:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.2);
}

/* Jeu des émotions */
.emotion-game {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
}

.emotions, .emotion-colors {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    flex-wrap: wrap;
    gap: 10px;
}

.emotion-card, .color-option {
    background: white;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
    text-align: center;
    font-weight: bold;
}

.emotion-card:hover, .color-option:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.color-option {
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Carte au trésor interactive */
.treasure-map-container {
    position: relative;
    display: inline-block;
    margin: 20px auto;
}

.map-points {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.map-point {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    border: 3px solid #ff9800;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.map-point:hover {
    transform: scale(1.2);
    background: #fff;
}

/* Responsive design */
@media (max-width: 768px) {
    .animal-image, .character-image, .inspiration-image {
        max-width: 120px;
        height: 120px;
    }
    
    .game-animals, .game-habitats, .timeline-events {
        flex-direction: column;
        align-items: center;
    }
    
    .draggable-animal, .habitat-zone, .timeline-event {
        width: 90%;
        max-width: 250px;
    }
    
    .experiment-container {
        flex-direction: column;
        align-items: center;
    }
    
    .prompt-buttons {
        flex-direction: column;
    }
    
    .emotions, .emotion-colors {
        flex-direction: column;
        align-items: center;
    }
}


/* Conteneur de quiz avancé */
.quiz-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quiz-error {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.quiz-error h3 {
    color: #e74c3c;
    margin-bottom: 15px;
}

.quiz-error p {
    color: #666;
    margin-bottom: 20px;
}


/* Onglets pour les modes d'histoire */
.story-mode-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.mode-tab {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.mode-tab:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.mode-tab.active {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border-color: #4CAF50;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.story-mode {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.voice-story-intro {
    text-align: center;
    margin-bottom: 20px;
}

.voice-story-intro h5 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: white;
}

.voice-story-intro p {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
    color: white;
}


/* Animation pour l'indicateur musical */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Styles pour l'indicateur musical */
#music-indicator {
    animation: bounce 1s infinite;
    transition: all 0.3s ease;
}

#music-indicator:hover {
    transform: scale(1.05);
    cursor: pointer;
}

/* Amélioration du bouton chanson de Robin */
.robin-song-btn {
    transition: all 0.3s ease;
    border: none;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.robin-song-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.robin-song-btn:active {
    transform: scale(0.95);
}

/* Animation pour les boutons de quiz */
.quiz-btn, button[onclick*="startAdaptiveQuiz"] {
    transition: all 0.3s ease;
}

.quiz-btn:hover, button[onclick*="startAdaptiveQuiz"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}



/* Footer Styles */
.site-footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-info {
    flex: 1;
    min-width: 250px;
}

.footer-brand {
    font-size: 20px;
    margin-bottom: 10px;
    color: #fff;
}

.footer-description {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 0;
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    font-size: 14px;
}

.footer-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-bottom p {
    margin: 0;
    font-size: 12px;
    opacity: 0.8;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    .site-footer {
        padding: 30px 0 15px;
    }
}


/* Chatbot Robin repositionné au-dessus du menu */
.robin-chatbot-top {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 10px 20px;
    z-index: 1050;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.robin-hero-container-top {
    display: flex;
    align-items: center;
    gap: 15px;
}

.robin-hero-image-top {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.robin-speech-bubble-top {
    background: white;
    padding: 10px 15px;
    border-radius: 20px;
    position: relative;
    max-width: 400px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.robin-speech-bubble-top::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 10px solid white;
}

.robin-speech-bubble-top p {
    margin: 0;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.robin-music-controls-top {
    margin-top: 8px;
}

.robin-song-btn-top {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    border: none;
    padding: 5px 12px;
    border-radius: 15px;
    color: white;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.robin-song-btn-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.chatbot-toggle-top {
    background: rgba(255,255,255,0.2);
    border: 2px solid white;
    padding: 8px 16px;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chatbot-toggle-top:hover {
    background: white;
    color: #667eea;
}

/* Styles pour le header et la navigation */
.main-header {
    margin-top: 80px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 80px;
    z-index: 1040;
}

.navbar {
    padding: 15px 0;
}

.navbar-brand .brand-text {
    color: white !important;
    font-size: 24px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.navbar-nav .nav-link {
    color: white !important;
    font-weight: 600;
    font-size: 16px;
    padding: 10px 20px !important;
    margin: 0 5px;
    border-radius: 25px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.navbar-nav .nav-link:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.navbar-nav .nav-link.active {
    background: rgba(255,255,255,0.3);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.navbar-toggler {
    border: 2px solid white;
    padding: 8px 12px;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .robin-chatbot-top {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }
    
    .robin-speech-bubble-top {
        max-width: 100%;
    }
    
    .main-header {
        margin-top: 120px;
        top: 120px;
    }
    
    .navbar-nav .nav-link {
        padding: 12px 20px !important;
        margin: 5px 0;
        text-align: center;
    }
}



/* Styles pour la carte Karaoké */
.karaoke-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.karaoke-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="music-pattern" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><text x="10" y="15" font-size="12" fill="rgba(255,255,255,0.1)" text-anchor="middle">🎵</text></pattern></defs><rect width="100" height="100" fill="url(%23music-pattern)"/></svg>');
    pointer-events: none;
}

.karaoke-card .card-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: musicPulse 2s infinite ease-in-out;
}

@keyframes musicPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.karaoke-card h3 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.karaoke-card p {
    font-size: 1rem;
    line-height: 1.4;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.karaoke-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.4);
}

/* Badge "NOUVEAU !" */
.card-special-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    animation: badgePulse 2s infinite ease-in-out;
    z-index: 10;
}

@keyframes badgePulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 5px 15px rgba(255, 107, 107, 0.5);
    }
}

/* Responsive pour la carte karaoké */
@media (max-width: 768px) {
    .karaoke-card .card-icon {
        font-size: 3rem;
    }
    
    .karaoke-card h3 {
        font-size: 1.3rem;
    }
    
    .karaoke-card p {
        font-size: 0.9rem;
    }
    
    .card-special-badge {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
}

/* Animation d'entrée pour la nouvelle carte */
.karaoke-card {
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

