/* --- GÃ©nÃ©ral & Polices --- */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

:root {
    /* Palette de couleurs Protection Civile */
    --primary-color: #024589;    /* Bleu principal */
    --primary-dark: #013a75;     /* Bleu plus foncÃ© pour les survols */
    --secondary-color: #f78d20;  /* Orange pour les accents et actions */
    --secondary-dark: #e87e13;   /* Orange plus foncÃ© pour les survols */
    
    --background-color: #f0f2f5;
    --surface-color: #ffffff;
    --text-color: #1c1e21;
    --text-light: #606770;
    --border-color: #dddfe2;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --neutral-color: #6c757d;
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    animation: pageLoad 0.8s ease-out;
}

/* --- Pages d'Authentification --- */
.auth-body { display: flex; justify-content: center; align-items: center; min-height: 100vh; }
.auth-container { background: var(--surface-color); padding: 2rem 2.5rem; border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); width: 100%; max-width: 400px; text-align: center; transition: all 0.3s ease; }
.auth-container:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); }
.auth-container .logo-title { display: block; max-width: 250px; margin: 0 auto 1.5rem; transition: transform 0.3s ease; }
.auth-container .logo-title:hover { transform: scale(1.05); }
.form-group { margin-bottom: 1.25rem; text-align: left; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 500; }
.form-group input { width: 100%; padding: 0.75rem; border: 1px solid var(--border-color); border-radius: 4px; box-sizing: border-box; font-size: 1rem; transition: all 0.3s ease; }
.form-group input:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(2, 69, 137, 0.1); outline: none; }
.auth-container button { width: 100%; padding: 0.8rem; background-color: var(--primary-color); color: white; border: none; border-radius: 4px; font-size: 1.1rem; font-weight: 700; cursor: pointer; transition: all 0.3s ease; }
.auth-container button:hover { background-color: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(2, 69, 137, 0.3); }
.auth-container button:active { transform: translateY(0); }
.error-message { color: var(--danger-color); font-weight: 500; animation: heartbeat 1.5s ease-in-out infinite; }
.auth-switch { margin-top: 1.5rem; color: var(--text-light); }
.auth-switch a { color: var(--primary-color); text-decoration: none; font-weight: 500; transition: color 0.3s ease; }
.auth-switch a:hover { color: var(--primary-dark); }

/* --- Structure Principale du Jeu --- */
.game-header { background-color: var(--surface-color); padding: 0 2rem; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); position: sticky; top: 0; z-index: 1000; }
.header-logo { height: 40px; margin-right: 1.5rem; transition: transform 0.3s ease; }
.header-logo:hover { transform: rotate(5deg) scale(1.05); }
.game-header h1 { color: var(--primary-color); font-size: 1.8rem; font-weight: 700; margin: 0.75rem 0; display: flex; align-items: center; }
.user-info { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.user-info .resource { font-weight: 500; font-size: 0.9rem; background-color: var(--background-color); padding: 0.4rem 0.8rem; border-radius: 20px; animation: countUp 0.5s ease-out; }
.user-info a.logout-btn { text-decoration: none; background-color: var(--background-color); color: var(--text-color); padding: 0.5rem 1rem; border-radius: 4px; font-weight: 700; transition: all 0.3s ease; }
.user-info a.logout-btn:hover { background-color: var(--primary-color); color: white; transform: translateY(-1px); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); }
.notification-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    background-color: var(--secondary-color);
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}
.notification-btn:hover {
    background-color: var(--secondary-dark);
    animation: bounce 0.6s ease;
}
.notification-btn:disabled {
    background-color: var(--neutral-color);
    cursor: not-allowed;
    animation: breathe 2s ease-in-out infinite;
}


.game-main-content { max-width: 1600px; margin: 0 auto; padding: 1.5rem; }
.game-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 1.5rem; }
.game-panel { background-color: var(--surface-color); border-radius: 8px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); padding: 1.5rem; display: flex; flex-direction: column; transition: all 0.3s ease; will-change: transform; }
.game-panel:hover { transform: translateY(-2px); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1); }
.game-panel h2 { margin-top: 0; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border-color); font-size: 1.2rem; color: var(--primary-color); }
.game-panel h3 { margin-top: 1rem; margin-bottom: 0.5rem; font-size: 1rem; color: var(--text-light); border-bottom: 1px solid #eee; padding-bottom: 5px; }

ul { list-style-type: none; padding: 0; margin: 0; }

.list-item { display: flex; flex-direction: column; padding: 0.75rem 0; border-bottom: 1px solid #f0f2f5; gap: 0.5rem; transition: all 0.3s ease; animation: fadeInUp 0.5s ease-out; will-change: transform; cursor: pointer; }
.list-item:hover { transform: translateX(5px); background-color: #f8f9fa; border-left: 4px solid var(--secondary-color); }
.list-item:last-child { border-bottom: none; }
.list-item:nth-child(1) { animation-delay: 0.1s; }
.list-item:nth-child(2) { animation-delay: 0.2s; }
.list-item:nth-child(3) { animation-delay: 0.3s; }
.list-item:nth-child(4) { animation-delay: 0.4s; }
.list-item:nth-child(5) { animation-delay: 0.5s; }
.list-item-header { display: flex; justify-content: space-between; align-items: center; width: 100%;}
.list-item-info { flex-grow: 1; display: flex; align-items: center; gap: 1rem; }
.list-item-info img { max-height: 40px; transition: transform 0.3s ease; }
.list-item:hover .list-item-info img { transform: scale(1.1); }
.list-item-info strong { font-weight: 500; }
.list-item-info small { color: var(--text-light); display: block; font-size: 0.85rem; }
.list-item-details { font-size: 0.9rem; color: var(--text-light); display: flex; justify-content: space-around; background-color: var(--background-color); padding: 0.5rem; border-radius: 4px; }
.list-item-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 0.25rem; }
.list-item-actions input[type="number"] { width: 80px; padding: 5px; border: 1px solid var(--border-color); border-radius: 4px; transition: border-color 0.3s ease; }
.list-item-actions input[type="number"]:focus { border-color: var(--primary-color); outline: none; }
.list-item-actions button, .action-button { padding: 0.4rem 0.8rem; border: none; border-radius: 4px; cursor: pointer; color: white; font-size: 0.9em; font-weight: 500; transition: all 0.3s ease; position: relative; overflow: hidden; will-change: transform; }
.list-item-actions button:hover, .action-button:hover { transform: translateY(-1px); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); }
.list-item-actions button:active, .action-button:active { transform: translateY(0); transition: transform 0.1s ease; }
.list-item-actions button:disabled, .action-button:disabled { background-color: var(--neutral-color) !important; opacity: 0.6; cursor: not-allowed; animation: breathe 2s ease-in-out infinite; }
.purchase-reason { color: var(--danger-color); font-size: 0.8rem; font-weight: 500; animation: shake 0.5s ease-in-out; }


/* Styles des boutons par fonction */
.action-button { background-color: var(--secondary-color); }
.action-button:hover { background-color: var(--secondary-dark); }
.action-button::before, .btn-orange::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}
.action-button:hover::before, .btn-orange:hover::before {
    width: 300px;
    height: 300px;
}
.btn-green { background-color: var(--success-color); position: relative; }
.btn-green:hover::after {
    content: '✨';
    position: absolute;
    top: -5px;
    right: -5px;
    animation: sparkle 0.6s ease-out;
}
.btn-red { background-color: var(--danger-color); }
.btn-orange { background-color: var(--secondary-color); position: relative; overflow: hidden; }
.btn-blue { background-color: var(--primary-color); }
.btn-grey { background-color: var(--neutral-color); }

/* Journal d'Ã©vÃ©nements */
#log-panel { height: 400px; }
#log-messages { height: 100%; overflow-y: auto; border: 1px solid var(--background-color); padding: 10px; background-color: #fafafa; font-size: 0.9em; line-height: 1.6; }
#log-messages p { margin: 0 0 5px 0; padding: 0; }
#log-messages p:first-child { font-weight: bold; overflow: hidden; white-space: nowrap; animation: typewriter 1s steps(40, end); }

/* --- STYLES POUR LES ONGLETS (GÃ©nÃ©ral et Boutique) --- */
.game-tabs, .shop-tabs { display: flex; flex-wrap: wrap; border-bottom: 2px solid var(--border-color); margin-bottom: 1.5rem; }
.tab-link, .shop-tab-link { padding: 1rem 1.5rem; cursor: pointer; border: none; background-color: transparent; font-weight: 500; color: var(--text-light); border-bottom: 3px solid transparent; transition: all 0.3s ease; position: relative; }
.tab-link { font-size: 1.1rem; }
.shop-tab-link { font-size: 1rem; padding: 0.8rem 1.2rem; }

.tab-link:hover, .shop-tab-link:hover { color: var(--primary-color); }
.tab-link.active, .shop-tab-link.active { color: var(--primary-color); border-bottom-color: var(--primary-color); position: relative; }
.tab-link.active::after, .shop-tab-link.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--secondary-color);
    animation: glow 2s ease-in-out infinite alternate;
}

.tab-content .tab-pane, .shop-tab-content .shop-tab-pane { display: none; opacity: 0; transform: translateX(20px); transition: all 0.4s ease; }
.tab-content .tab-pane.active, .shop-tab-content .shop-tab-pane.active { display: block; opacity: 1; transform: translateX(0); }

/* --- Disposition onglet personnel --- */
.personnel-container {
    grid-template-columns: 1fr 1fr 1fr; /* 3 colonnes pour candidats, bÃ©nÃ©voles, formations */
}
#candidates-panel, #volunteers-panel, #training-panel {
    grid-column: auto;
}
.action-buttons-bar {
    margin-bottom: 1rem;
    display: flex;
    justify-content: flex-end;
}
@media (max-width: 900px) {
    .personnel-container {
        grid-template-columns: 1fr; /* Une seule colonne sur mobile */
    }
}


/* --- STYLES POUR LE NIVEAU ET L'XP --- */
#level-container {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* Espace entre le texte du niveau et la barre d'XP */
    padding: 0.4rem 1rem;
    min-width: 250px; /* Ajuster la largeur minimale */
}

.level-display {
    font-weight: 700;
    color: var(--text-color);
    white-space: nowrap; /* EmpÃªche le retour Ã  la ligne */
}

.level-display #player-level {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.xp-bar-container {
    flex-grow: 1; /* Permet Ã  la barre de prendre l'espace restant */
    height: 20px;
    background-color: #e0e0e0;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    border: 1px solid #ccc;
    min-width: 150px; /* Largeur minimale pour la barre */
}
.xp-bar-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    transform: translateX(-100%);
    animation: progressShine 3s ease-in-out infinite;
}
#xp-bar-progress {
    height: 100%;
    width: 0%; /* Sera modifiÃ© par JavaScript */
    background-color: var(--secondary-color);
    border-radius: 9px;
    transition: width 0.5s ease-in-out;
    position: relative;
    overflow: hidden;
}
#xp-bar-progress::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2s infinite;
}
#xp-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    font-size: 0.8rem;
    line-height: 20px;
    color: #000;
    font-weight: 700;
    text-shadow: 0 0 2px white;
    z-index: 1;
}

/* --- BOUTIQUE --- */
.shop-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.shop-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.shop-filters strong {
    margin-right: 0.5rem;
}

.filter-btn {
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background-color: var(--background-color);
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(2, 69, 137, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}
.filter-btn:hover::before {
    width: 200px;
    height: 200px;
}

.filter-btn:hover {
    background-color: var(--primary-dark);
    color: white;
    border-color: var(--primary-dark);
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: 700;
    transform: scale(1.05);
}

#vehicle-sort-select {
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    transition: border-color 0.3s ease;
}
#vehicle-sort-select:focus {
    border-color: var(--primary-color);
    outline: none;
}


/* --- MODAL --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none; /* CachÃ© par dÃ©faut */
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal-overlay.active {
    display: flex;
    opacity: 1;
}
.modal-content {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 500px;
    transform: scale(0.8) translateY(50px);
    transition: transform 0.3s ease;
}
.modal-content.full-details {
    max-width: 700px; /* Plus grand pour les dÃ©tails */
}
.modal-content h2 {
    margin-top: 0;
    color: var(--primary-color);
}
.modal-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}
.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

/* --- DÃ‰TAILS DES Ã‰LÃ‰MENTS (dans la modale) --- */
.details-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
}
.details-card img.main-image {
    max-width: 150px;
    margin-bottom: 1rem;
    border-radius: 50%;
    border: 3px solid var(--secondary-color);
}
.details-card h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--primary-color);
    border-bottom: none;
    padding-bottom: 0;
}
.details-card p.subtitle {
    margin: 0.2rem 0 1rem;
    color: var(--text-light);
    font-style: italic;
}
.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 100%;
    margin-top: 1.5rem;
    text-align: left;
}
.details-item {
    background-color: var(--background-color);
    padding: 0.75rem;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.5s ease-out;
}
.details-item strong {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.2rem;
}
.details-item span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
}


/* --- TABLEAU DE BORD --- */
#actions-panel {
    grid-column: 1 / -1;
}
.dashboard-chart-container {
    position: relative;
    width: 100%;
    height: 400px;
}

.dashboard-filters {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}
.dashboard-filters label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    transition: color 0.3s ease;
}
.dashboard-filters label:hover {
    color: var(--primary-color);
}

/* --- MODULE MISSIONS --- */
.mission-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-dark);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 1rem;
}
.mission-category.locked p {
    color: var(--text-light);
    font-style: italic;
}
.mission-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1rem;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--background-color);
}
.mission-quote-input {
    width: 100px;
    padding: 5px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-right: 5px;
    transition: border-color 0.3s ease;
}
.mission-quote-input:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* --- CALENDRIER --- */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.calendar-header h2 {
    margin: 0;
    color: var(--primary-color);
}
.calendar-header button {
    transition: all 0.3s ease;
}
.calendar-header button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}
.calendar-day-header {
    text-align: center;
    font-weight: 700;
    padding: 0.5rem 0;
    color: var(--text-light);
}
.calendar-day {
    border: 1px solid var(--border-color);
    background-color: var(--surface-color);
    min-height: 120px;
    padding: 0.5rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.calendar-day::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(2, 69, 137, 0.1), transparent);
    transition: left 0.5s ease;
}
.calendar-day:hover::before {
    left: 100%;
}
.calendar-day.not-in-month {
    background-color: var(--background-color);
    color: #ccc;
}
.day-number {
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.calendar-event {
    background-color: var(--primary-color);
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: all 0.3s ease;
}
.calendar-event:hover {
    background-color: var(--primary-dark);
    transform: scale(1.05);
}

/* === ANIMATIONS ET KEYFRAMES === */
@keyframes pageLoad {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bounce {
    0%, 20%, 60%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    80% {
        transform: translateY(-5px);
    }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
    100% { transform: translateX(100%); }
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.05); }
    28% { transform: scale(1); }
    42% { transform: scale(1.05); }
    70% { transform: scale(1); }
}

@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes glow {
    from {
        box-shadow: 0 0 5px var(--secondary-color);
    }
    to {
        box-shadow: 0 0 15px var(--secondary-color);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes sparkle {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(180deg);
        opacity: 0;
    }
}

@keyframes breathe {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .game-panel:hover {
        transform: none;
    }
    
    .list-item:hover {
        transform: none;
    }
    
    .game-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .user-info {
        justify-content: center;
        width: 100%;
    }
    
    .user-info .resource {
        font-size: 0.8rem;
        padding: 0.375rem 0.75rem;
    }
    
    .game-main-content {
        padding: 1rem;
    }
    
    .game-panel {
        padding: 1.5rem;
    }
    
    .list-item {
        padding: 1rem;
    }
    
    .list-item-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .list-item-actions {
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
    }
    
    .calendar-grid {
        font-size: 0.75rem;
    }
    
    .calendar-day {
        min-height: 80px;
        padding: 0.5rem;
    }
    
    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .auth-container {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    #level-container {
        min-width: auto;
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .xp-bar-container {
        min-width: 200px;
    }
}

@media (max-width: 480px) {
    .shop-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .shop-filters {
        justify-content: center;
    }
    
    .filter-btn {
        flex-grow: 1;
        text-align: center;
    }
    
    .dashboard-filters {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .list-item-details {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .mission-details-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

/* --- Animations d'apparition en cascade pour les panneaux --- */
.game-panel:nth-child(1) { animation: fadeInUp 0.6s ease-out 0.1s both; }
.game-panel:nth-child(2) { animation: fadeInUp 0.6s ease-out 0.2s both; }
.game-panel:nth-child(3) { animation: fadeInUp 0.6s ease-out 0.3s both; }
.game-panel:nth-child(4) { animation: fadeInUp 0.6s ease-out 0.4s both; }

/* --- Animation de compteur pour les ressources --- */
@keyframes countUp {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* --- Effet de ondulation au clic --- */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* --- Effet de highlight pour les nouvelles informations --- */
@keyframes highlight {
    0% { background-color: rgba(247, 141, 32, 0.3); }
    100% { background-color: transparent; }
}

.new-info {
    animation: highlight 2s ease-out;
}

/* --- Animation des alertes --- */
.error-message, .success-message {
    animation: slideInDown 0.5s ease-out;
}

@keyframes slideInDown {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* --- Animation de chargement --- */
.loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '⚙️';
    display: inline-block;
    animation: spin 2s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- Amélioration de performance --- */
html {
    scroll-behavior: smooth;
}

.game-panel, .list-item, button, .tab-link {
    will-change: transform;
}

/* --- Barres de défilement personnalisées --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--text-light) 0%, var(--neutral-color) 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

/* --- Accessibilité --- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible pour l'accessibilitÃ© */
*:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* --- AmÃ©liorations pour l'impression --- */
@media print {
    .game-header,
    .notification-btn,
    .modal-overlay,
    button {
        display: none !important;
    }
    
    .game-panel {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}