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

body {
    font-family: Georgia, 'Times New Roman', Times, sans-serif;
    font-size: 1em;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #ffffff;
    min-height: 100vh;
}

/* Navigation */
.menu-nav {
    position: fixed;
    top: 0;
    left: 0;
    height: 5em;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(255, 0, 0, 0.3);
}

.container {
    width: 100%;
    display: flex;
    margin: 0 auto;
    justify-content: center;
    padding: 1.75em;
    list-style-type: none;
    gap: 5%;
}

.menu-item a {
    color: white;
    font-family: Arial, Helvetica, sans-serif;
    font-style: normal;
    font-weight: 800;
    text-decoration: none;
    text-align: center;
    padding: 0.5em 1.5em;
    transition: all 0.3s ease;
    border-radius: 5px;
}

.menu-item a:hover,
.menu-item a.active {
    background-color: #8B0000;
    color: white;
}

/* Section principale */
.strategies-section {
    margin-top: 7em;
    padding: 2em;
    min-height: calc(100vh - 7em);
}

.strategies-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* En-tête de session */
.session-header {
    background: linear-gradient(135deg, #8B0000 0%, #600000 100%);
    padding: 2em;
    border-radius: 15px;
    margin-bottom: 2em;
    box-shadow: 0 8px 32px rgba(139, 0, 0, 0.4);
}

.session-header h1 {
    margin-bottom: 1em;
    font-size: 2.5em;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.session-stats {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5em;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1em;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    min-width: 150px;
}

.stat-label {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 0.5em;
}

.stat-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #FFD700;
}

.clear-session-btn {
    padding: 0.8em 1.5em;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.clear-session-btn:hover {
    background: white;
    color: #8B0000;
    transform: scale(1.05);
}

/* Filtres */
.filters {
    display: flex;
    justify-content: center;
    gap: 1em;
    margin-bottom: 2em;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.8em 1.5em;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 1em;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: #8B0000;
    border-color: #8B0000;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.5);
}

/* Grille de stratégies */
.strategies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2em;
    margin-bottom: 3em;
}

.strategy-card {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border-radius: 15px;
    padding: 1.5em;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(139, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.strategy-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #8B0000, #FFD700);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.strategy-card:hover::before {
    transform: scaleX(1);
}

.strategy-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(139, 0, 0, 0.5);
    border-color: #8B0000;
}

.strategy-card.viewed {
    border-color: rgba(255, 215, 0, 0.5);
}

.strategy-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1em;
}

.strategy-title {
    font-size: 1.3em;
    font-weight: bold;
    color: #FFD700;
    margin: 0;
}

.favorite-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    transition: transform 0.2s ease;
    padding: 0;
}

.favorite-btn .star {
    filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.5));
}

.favorite-btn:hover {
    transform: scale(1.2);
}

.favorite-btn.active .star {
    color: #FFD700;
}

.strategy-category {
    display: inline-block;
    padding: 0.3em 0.8em;
    background: rgba(139, 0, 0, 0.7);
    border-radius: 15px;
    font-size: 0.85em;
    margin-bottom: 0.5em;
    font-weight: bold;
}

.strategy-difficulty {
    display: inline-block;
    padding: 0.3em 0.8em;
    border-radius: 15px;
    font-size: 0.85em;
    margin-bottom: 1em;
    margin-left: 0.5em;
    font-weight: bold;
}

.difficulty-debutant {
    background: rgba(0, 255, 0, 0.3);
    border: 1px solid rgba(0, 255, 0, 0.6);
}

.difficulty-intermediaire {
    background: rgba(255, 165, 0, 0.3);
    border: 1px solid rgba(255, 165, 0, 0.6);
}

.difficulty-avance {
    background: rgba(255, 0, 0, 0.3);
    border: 1px solid rgba(255, 0, 0, 0.6);
}

.strategy-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 1em;
}

.view-count {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.6);
    text-align: right;
}

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

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2em;
}

.modal-content {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    padding: 2em;
    border-radius: 20px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 2px solid #8B0000;
    box-shadow: 0 0 50px rgba(139, 0, 0, 0.5);
}

.close-modal {
    position: absolute;
    top: 1em;
    right: 1em;
    font-size: 2em;
    color: white;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 0, 0, 0.7);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: #8B0000;
    transform: rotate(90deg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5em;
    padding-right: 3em;
}

#modalTitle {
    font-size: 2em;
    color: #FFD700;
    margin: 0;
}

.favorite-btn-large {
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.favorite-btn-large:hover {
    transform: scale(1.2);
}

.favorite-btn-large.active .star {
    color: #FFD700;
}

.modal-body {
    color: rgba(255, 255, 255, 0.9);
}

.strategy-details,
.strategy-moves,
.strategy-notes {
    margin-top: 2em;
    padding: 1.5em;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border-left: 4px solid #8B0000;
}

.strategy-details h3,
.strategy-moves h3,
.strategy-notes h3 {
    color: #FFD700;
    margin-bottom: 1em;
}

#modalMoves {
    padding-left: 1.5em;
}

#modalMoves li {
    margin-bottom: 0.8em;
    line-height: 1.6;
}

#strategyNotes {
    width: 100%;
    min-height: 120px;
    padding: 1em;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    font-family: inherit;
    font-size: 1em;
    resize: vertical;
}

#strategyNotes:focus {
    outline: none;
    border-color: #8B0000;
    background: rgba(255, 255, 255, 0.15);
}

.save-notes-btn {
    margin-top: 1em;
    padding: 0.8em 2em;
    background: #8B0000;
    border: none;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1em;
    transition: all 0.3s ease;
}

.save-notes-btn:hover {
    background: #A00000;
    transform: scale(1.05);
}

/* Responsive */
@media screen and (max-width: 768px) {
    .session-header h1 {
        font-size: 1.8em;
    }
    
    .session-stats {
        flex-direction: column;
    }
    
    .strategies-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        padding: 1.5em;
        margin: 1em;
    }
    
    #modalTitle {
        font-size: 1.5em;
    }
    
    .filters {
        gap: 0.5em;
    }
    
    .filter-btn {
        padding: 0.6em 1em;
        font-size: 0.9em;
    }
}