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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5em;
}

/* ===== ONGLETS ===== */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #667eea;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ===== SÉLECTEUR DE RENCONTRE ===== */
.encounter-selector {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.encounter-selector label {
    font-weight: 600;
    color: #333;
}

.encounter-selector select {
    flex: 1;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
}

/* ===== RENCONTRES ===== */
.encounters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.encounters-list {
    display: grid;
    gap: 15px;
}

.encounter-card {
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border-left: 4px solid #667eea;
    transition: all 0.3s;
}

.encounter-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

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

.encounter-title {
    font-size: 1.3em;
    font-weight: 700;
    color: #333;
}

.encounter-creatures {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.encounter-creature-item {
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.encounter-creature-name {
    font-weight: 600;
}

.encounter-creature-init {
    color: #667eea;
    font-weight: 700;
}

.encounter-actions {
    display: flex;
    gap: 10px;
}

/* ===== BOUTONS ===== */
.actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

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

.btn-player {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.btn-monster {
    background: linear-gradient(135deg, #f44336 0%, #e53935 100%);
	padding: 6px 10px;
}

.btn-delete {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
}

/* ===== LISTE D'INITIATIVE ===== */
.initiative-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.creature-card {
    padding: 20px;
    background: white;
    border-radius: 12px;
    border-left: 5px solid #ccc;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
    display: grid;
    grid-template-columns: 80px 1fr 400px 120px;
    gap: 20px;
    align-items: center;
}

.creature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.creature-card.player {
    border-left-color: #4CAF50;
    background: linear-gradient(135deg, #f0fff4 0%, #e8f5e9 100%);
}

.creature-card.monster {
    border-left-color: #f44336;
    background: linear-gradient(135deg, #fff5f5 0%, #ffebee 100%);
}

.creature-card.active-turn {
    border-left-width: 8px;
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
    animation: pulse 2s infinite;
}

.creature-card.dead {
    opacity: 0.5;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%) !important;
    border-left-color: #9e9e9e !important;
}

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

/* Colonne 1 : Initiative */
.creature-initiative {
    font-size: 2em;
    font-weight: 700;
    color: #667eea;
    text-align: center;
}

/* Colonne 2 : Nom */
.creature-name {
    font-size: 1.3em;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Colonne 3 : Points de Vie */
.creature-hp-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hp-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hp-text {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    min-width: 90px;
}

.hp-bar-container {
    flex: 1;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.hp-bar {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 10px;
}

.hp-bar.high {
    background: linear-gradient(90deg, #4CAF50, #66BB6A);
}

.hp-bar.medium {
    background: linear-gradient(90deg, #FFC107, #FFD54F);
}

.hp-bar.low {
    background: linear-gradient(90deg, #FF9800, #FFB74D);
}

.hp-bar.critical {
    background: linear-gradient(90deg, #F44336, #EF5350);
}

.hp-controls {
    display: grid;
    grid-template-columns: repeat(4, 1fr) 80px;
    gap: 5px;
    align-items: center;
}

.hp-btn {
    padding: 6px 8px;
    border: none;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.hp-btn-quick {
    background: #e3f2fd;
    color: #1976d2;
}

.hp-btn-quick:hover {
    background: #1976d2;
    color: white;
}

.hp-input {
    grid-column: span 2;
    padding: 6px;
    border: 2px solid #ddd;
    border-radius: 6px;
    text-align: center;
    font-size: 0.9em;
}

.hp-input:focus {
    outline: none;
    border-color: #667eea;
}

.hp-btn-action {
    padding: 6px 10px;
    font-size: 0.85em;
}

.hp-btn-damage {
    background: linear-gradient(135deg, #f44336 0%, #e53935 100%);
    color: white;
}

.hp-btn-heal {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

.hp-btn-damage:hover,
.hp-btn-heal:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Colonne 4 : Actions */
.creature-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9em;
}

/* ===== CONTRÔLES DE TOUR ===== */
.turn-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* ===== MESSAGE VIDE ===== */
.empty-message {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 1.2em;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-content h2 {
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-actions {
    display: flex;
    gap: 10px;
}

.form-actions .btn {
    flex: 1;
}

/* ===== SÉLECTEUR DE MONSTRES ===== */
.monster-selector-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin: 20px 0;
    max-height: 500px;
    overflow-y: auto;
}

.monster-selector-item {
    padding: 15px;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe0e0 100%);
    border-radius: 10px;
    border-left: 4px solid #f44336;
    cursor: pointer;
    transition: all 0.3s;
}

.monster-selector-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-left-width: 6px;
}

.monster-selector-name {
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.monster-selector-stats {
    display: flex;
    gap: 35px;
    font-size: 0.9em;
    color: #666;
}

.monster-stat {
    display: flex;
    flex-direction: column;
}

.monster-stat-label {
    font-size: 1em;
    color: #999;
    font-weight: 600;
}

.monster-stat-value {
    font-weight: 700;
    color: #333;
	font-size: 1.2em;
}

/* ===== BESTIAIRE ===== */
.bestiary-header {
    margin-bottom: 20px;
}

.bestiary-header h2 {
    margin-bottom: 15px;
    color: #333;
}

.search-input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1.1em;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
}

.bestiary-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.monster-card {
    padding: 15px;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe0e0 100%);
    border-radius: 10px;
    border-left: 4px solid #f44336;
    transition: all 0.3s;
}

.monster-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.monster-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.monster-card h3 {
    color: #333;
    font-size: 1.2em;
}

.monster-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;

}

.monster-card-actions {
    display: flex;
    gap: 10px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .creature-card {
        grid-template-columns: 70px 1fr 350px 100px;
        gap: 15px;
    }
    
    .hp-controls {
        grid-template-columns: repeat(4, 1fr);
        gap: 4px;
    }
    
    .hp-input {
        grid-column: span 4;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .creature-card {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .creature-actions {
        justify-content: center;
    }
    
    .hp-controls {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bestiary-list,
    .encounters-list {
        grid-template-columns: 1fr;
    }
    
    .monster-selector-list {
        grid-template-columns: 1fr;
    }
}
/* ===== BADGE RENCONTRE ACTIVE ===== */
.current-encounter-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1em;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.current-encounter-badge strong {
    font-weight: 700;
}

.current-encounter-badge button {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    padding: 5px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s;
}

.current-encounter-badge button:hover {
    background: white;
    color: #667eea;
}

/* ===== BADGE ACTIF SUR RENCONTRE ===== */
.encounter-card.active-encounter {
    border-left-color: #28a745;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
}

.active-badge {
    background: #28a745;
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7em;
    font-weight: 700;
    margin-left: 10px;
}
/* ===== SYSTÈME DE NOTIFICATIONS ===== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1em;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.notification-error {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
    color: white;
}

.notification-info {
    background: linear-gradient(135deg, #17a2b8, #3498db);
    color: white;
}
