/* Variables - Thème Shadow Army */
:root {
    --dark-bg: #0a0a12;
    --darker-bg: #050508;
    --primary: #8a2be2;
    --primary-dark: #5f1d9e;
    --secondary: #ff4500;
    --accent: #00bfff;
    --text-light: #f0f0f0;
    --text-muted: #b0b0b0;
    --danger: #ff3333;
    --success: #33cc33;
    --warning: #ffcc00;
    
    /* Niveaux de difficulté */
    --facile: #4CAF50;
    --moyen: #FFC107;
    --difficile: #FF9800;
    --extreme: #F44336;
}

/* Base Styles */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Rajdhani:wght@400;600&display=swap');

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

body {
    font-family: 'Rajdhani', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-light);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(138, 43, 226, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(0, 191, 255, 0.1) 0%, transparent 50%);
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Orbitron', sans-serif;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--accent);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.site-header {
    background-color: rgba(10, 10, 18, 0.9);
    padding: 1rem 0;
    border-bottom: 1px solid var(--primary);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(5px);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.5);
}

.logo span {
    color: var(--primary);
}

.nav-main ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
}

.nav-main a {
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s;
}

.nav-main a:hover {
    background-color: var(--primary);
    color: white;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 5rem 0;
    text-align: center;
    background: 
        linear-gradient(135deg, rgba(138, 43, 226, 0.2) 0%, rgba(10, 10, 18, 0.9) 70%),
        url('https://images.unsplash.com/photo-1605106702734-205df224ecce?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80');
    background-size: cover;
    background-position: center;
    margin-bottom: 3rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(138, 43, 226, 0.3);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, var(--dark-bg) 70%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 0 10px rgba(0, 191, 255, 0.7);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.4);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(138, 43, 226, 0.6);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, #cc3700 100%);
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.4);
}

.btn-secondary:hover {
    box-shadow: 0 6px 20px rgba(255, 69, 0, 0.6);
    background: linear-gradient(135deg, #cc3700 0%, var(--secondary) 100%);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #cc0000 100%);
    box-shadow: 0 4px 15px rgba(255, 51, 51, 0.4);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #cc0000 0%, var(--danger) 100%);
    box-shadow: 0 6px 20px rgba(255, 51, 51, 0.6);
}

/* Sections */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    margin: 1rem auto 0;
    border-radius: 3px;
}

/* Admin Sections */
.admin-section {
    background: rgba(20, 20, 30, 0.7);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(138, 43, 226, 0.3);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.admin-table th {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1rem;
    text-align: left;
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(138, 43, 226, 0.1);
}

.admin-table tr:hover {
    background-color: rgba(138, 43, 226, 0.1);
}

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

/* Forms */
.admin-form {
    margin-top: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--accent);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 5px;
    color: var(--text-light);
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(138, 43, 226, 0.3);
}

/* Dashboard */
.dashboard-section {
    margin-bottom: 3rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: rgba(20, 20, 30, 0.7);
    border-radius: 10px;
    padding: 1.5rem;
    border: 1px solid rgba(138, 43, 226, 0.3);
    text-align: center;
    transition: transform 0.3s;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.big-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0.5rem 0;
    font-family: 'Orbitron', sans-serif;
}

.big-number span {
    font-size: 1rem;
    color: var(--text-muted);
}

/* Difficulty Badges */
.difficulty-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.facile {
    background-color: var(--facile);
    color: #000;
}

.moyen {
    background-color: var(--moyen);
    color: #000;
}

.difficile {
    background-color: var(--difficile);
    color: #000;
}

.extreme {
    background-color: var(--extreme);
    color: white;
}

/* Footer */
.site-footer {
    background-color: var(--darker-bg);
    padding: 3rem 0;
    margin-top: 5rem;
    border-top: 1px solid rgba(138, 43, 226, 0.3);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-column h3 {
    color: var(--accent);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column li {
    margin-bottom: 0.8rem;
}

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .nav-main ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .site-header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .btn-small {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* Cartes de mission améliorées */
.mission-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.2);
    border: 1px solid rgba(138, 43, 226, 0.3);
}

.mission-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: transform 0.5s ease;
}

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

.mission-tag {
    position: absolute;
    top: 10px;
    left: -25px;
    background-color: var(--accent);
    color: white;
    padding: 5px 30px;
    font-size: 0.8rem;
    transform: rotate(-45deg);
    font-family: 'Orbitron', sans-serif;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.popular-tag {
    background-color: var(--secondary);
}

.mission-content {
    padding: 1.5rem;
    background: rgba(20, 20, 30, 0.8);
}

.mission-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--accent);
    font-family: 'Orbitron', sans-serif;
}

.mission-stats {
    display: flex;
    gap: 1rem;
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.mission-price {
    margin: 1rem 0;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-currency {
    font-size: 1.2rem;
    color: var(--accent);
}

.price-amount {
    font-family: 'Orbitron', sans-serif;
}

.mission-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-icon {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.icon {
    font-size: 1.1rem;
}

/* Effets de survol navigation */
.nav-link {
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Animation du hero */
.hero-content {
    transform: translateY(20px);
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
}

@keyframes fadeInUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Style pour les missions réservées */
.reserved-tag {
    background-color: var(--danger);
}

.btn-disabled {
    background: #666 !important;
    cursor: not-allowed;
    opacity: 0.7;
}

.mission-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s;
}

.mission-card.reserved .mission-image::before {
    opacity: 1;
}

.form-group input[type="file"] {
    background: transparent;
    border: none;
    padding: 0.5rem 0;
    color: var(--text-light);
}

.mission-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: transform 0.3s ease;
    background-color: #2a2a2a; /* Fond si pas d'image */
}

/* Style pour la prévisualisation de l'image */
.image-preview {
    max-width: 200px;
    max-height: 150px;
    margin: 10px 0;
    display: none;
}

/* Style pour les messages d'erreur */
.error-message {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 0.2rem;
}

/* Style pour les images de mission */
.mission-image-thumb {
    width: 100px;
    height: 75px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--primary);
    background-color: #2a2a2a; /* Fond si image manquante */
}

/* Conteneur des images */
.image-container {
    width: 100px;
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 4px;
}

/* Style pour les missions */
.mission-item {
    transition: all 0.3s ease;
}

.mission-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.3);
}