/* style.css - Thème super-héros Cyber Patriot Jambar */

/* Variables */
:root {
    --bleu-nuit: #0a0e27;
    --bleu-hero: #1e2749;
    --bleu-accent: #2d3561;
    --rouge-hero: #ff4757;
    --jaune-energie: #ffd700;
    --vert-succes: #2ed573;
    --blanc: #ffffff;
    --gris-clair: #ecf0f1;
    --gris-moyen: #95a5a6;
    --ombre: rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: 'Segoe UI', 'Roboto', 'Arial', sans-serif;
    background: linear-gradient(135deg, var(--bleu-nuit) 0%, var(--bleu-hero) 50%, var(--bleu-accent) 100%);
    background-attachment: fixed;
    color: var(--blanc);
    min-height: 100vh;
    line-height: 1.6;
}

/* Navigation */
.main-nav {
    background: rgba(30, 39, 73, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px var(--ombre);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--rouge-hero);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--jaune-energie);
    text-shadow: 2px 2px 8px rgba(255, 215, 0, 0.5);
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--blanc);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    background: linear-gradient(135deg, var(--rouge-hero) 0%, #ff6b81 100%);
    color: var(--blanc);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.4);
}

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

/* Hero Section */
.hero {
    text-align: center;
    padding: 3rem 1rem;
    background: linear-gradient(135deg, var(--rouge-hero) 0%, #ff6b81 50%, var(--jaune-energie) 100%);
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 40px var(--ombre);
    position: relative;
    overflow: hidden;
}

.hero::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="50" cy="50" r="40" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    opacity: 0.1;
    animation: float 20s linear infinite;
}

@keyframes float {
    from { transform: translateY(0); }
    to { transform: translateY(-100px); }
}

.hero h1 {
    font-size: 2.8rem;
    color: var(--blanc);
    text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.7);
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    font-weight: 900;
}

.subtitle {
    font-size: 1.3rem;
    color: var(--blanc);
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--bleu-hero) 0%, var(--bleu-accent) 100%);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 6px 20px var(--ombre);
    transition: all 0.3s;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 215, 0, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--jaune-energie);
    box-shadow: 0 12px 35px rgba(255, 215, 0, 0.3);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--jaune-energie);
    margin: 0.5rem 0;
}

.stat-label {
    color: var(--gris-clair);
    font-size: 0.9rem;
}

/* Progress Bar */
.progress-section {
    background: var(--bleu-hero);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.progress-section h2 {
    margin-bottom: 1rem;
    color: var(--jaune-energie);
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: var(--bleu-nuit);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.3);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--rouge-hero) 0%, var(--jaune-energie) 50%, var(--vert-succes) 100%);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    position: relative;
}

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

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

.progress-text {
    text-align: center;
    margin-top: 0.5rem;
    color: var(--gris-clair);
}

/* Cards Grid */
.cards-grid, .lecons-grid, .quiz-grid, .dico-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.card, .lecon-card, .quiz-card, .dico-card {
    background: linear-gradient(135deg, var(--bleu-hero) 0%, var(--bleu-accent) 100%);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 6px 20px var(--ombre);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.card::before, .lecon-card::before, .quiz-card::before, .dico-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover, .lecon-card:hover, .quiz-card:hover, .dico-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 12px 40px rgba(255, 215, 0, 0.3);
    border-color: var(--jaune-energie);
}

.card:hover::before, .lecon-card:hover::before, .quiz-card:hover::before, .dico-card:hover::before {
    opacity: 1;
}

.card.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.card-icon {
    font-size: 2rem;
}

.card-rarity {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.card-rarity.Commune {
    background: #808080;
}

.card-rarity.Rare {
    background: #4169e1;
}

.card-rarity.Épique {
    background: #9370db;
}

.card-rarity.Légendaire {
    background: #ffd700;
    color: var(--bleu-nuit);
}

.card-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--jaune-energie);
    margin-bottom: 0.5rem;
}

.card-category {
    color: var(--gris-moyen);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.card-content {
    color: var(--gris-clair);
}

/* Filters */
.filters {
    background: var(--bleu-hero);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.filters label {
    color: var(--gris-clair);
}

.filters select,
.filters input[type="text"] {
    padding: 0.5rem 1rem;
    border-radius: 5px;
    border: none;
    background: var(--bleu-nuit);
    color: var(--blanc);
    font-size: 1rem;
}

.filters input[type="checkbox"] {
    margin-left: 0.5rem;
}

/* Buttons */
button, .action-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.action-btn {
    background: linear-gradient(135deg, var(--rouge-hero) 0%, #c7365f 100%);
    color: var(--blanc);
    text-align: center;
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.4);
}

.reset-btn {
    background: #555;
    color: var(--blanc);
    margin-top: 2rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.reset-btn:hover {
    background: var(--rouge-hero);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    overflow: auto;
}

.modal-content {
    background: var(--bleu-hero);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    position: relative;
}

.modal-content.modal-large {
    max-width: 800px;
}

.close {
    color: var(--gris-moyen);
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: var(--rouge-hero);
}

/* Actions Grid */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.action-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

/* Badges */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.badge {
    background: var(--bleu-hero);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s;
}

.badge:hover {
    transform: scale(1.05);
}

.badge-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.badge-name {
    font-size: 0.9rem;
    color: var(--jaune-energie);
    font-weight: bold;
}

.badge.locked {
    opacity: 0.3;
}

/* Debug Panel */
.debug-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--bleu-hero);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 9999;
    border: 2px solid var(--jaune-energie);
}

.debug-panel h3 {
    color: var(--jaune-energie);
    margin-bottom: 0.5rem;
}

.debug-panel p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.debug-panel button {
    margin-top: 0.5rem;
    width: 100%;
}

/* Page Headers */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--jaune-energie);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 0.5rem;
}

/* Sections spéciales */
.mission-card, .tip-card {
    background: var(--bleu-hero);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    margin-top: 1rem;
    border-left: 4px solid var(--jaune-energie);
}

.mission-text, .tip-card p {
    font-size: 1.1rem;
    color: var(--gris-clair);
}

/* Content sections (Parents page) */
.content-section {
    background: var(--bleu-hero);
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.content-section h2 {
    color: var(--jaune-energie);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--rouge-hero);
    padding-bottom: 0.5rem;
}

.content-section h3 {
    color: var(--gris-clair);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.content-section ul, .content-section ol {
    margin-left: 2rem;
    color: var(--gris-clair);
}

.content-section li {
    margin-bottom: 0.5rem;
}

/* Cards spéciales (conseils, activités) */
.conseil-card, .activite-card, .sequence-card, .ressource-card, .contact-card {
    background: var(--bleu-nuit);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid var(--jaune-energie);
}

.conseil-card h3, .activite-card h3, .sequence-card h4 {
    color: var(--jaune-energie);
    margin-bottom: 0.5rem;
}

.important {
    background: rgba(233, 69, 96, 0.2);
    padding: 1rem;
    border-left: 4px solid var(--rouge-hero);
    border-radius: 5px;
    margin: 1rem 0;
}

.tip {
    background: rgba(255, 215, 0, 0.1);
    padding: 1rem;
    border-left: 4px solid var(--jaune-energie);
    border-radius: 5px;
    margin: 1rem 0;
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cards-grid, .lecons-grid, .quiz-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 1.5rem;
    }
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--gris-moyen);
    font-style: italic;
}

/* Print styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .main-nav, .reset-btn, .debug-panel, .filters {
        display: none;
    }
    
    .container {
        max-width: 100%;
    }
}
