.body-auth-active #game-wrapper {
    display: none; /* Hide game when auth is active */
}

#auth-container {
    display: none; /* Hidden by default */
}

#auth-container.active {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://i.ibb.co/9kFJjsTw/Gemini-Generated-Image-7qj9zo7qj9zo7qj9-6.png'); /* Post-apocalyptic background */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 20px;
    box-sizing: border-box; /* Ensures padding is included in the element's total width and height */
    z-index: 1000; /* Ensure it's on top */
}

.auth-box {
    background: rgba(0, 0, 0, 0.8); /* Semi-transparent black background */
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 450px;
    text-align: center;
    color: #fff;
    backdrop-filter: blur(5px); /* Frosted glass effect */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.welcome-section {
    margin-bottom: 2rem;
}

.welcome-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #FFA500; /* A thematic red color */
    text-shadow: 0 0 10px rgba(229, 9, 20, 0.5);
}

.welcome-section p {
    font-size: 1.1rem;
    color: #e0e0e0;
    line-height: 1.5;
}

.auth-form h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

.input-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}

.input-group input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 12px 12px 45px; /* Add padding for the icon */
    border-radius: 8px;
    border: 1px solid #444;
    background-color: #333;
    color: #fff;
    font-size: 1rem;
}

.input-group input::placeholder {
    color: #888;
}

.input-group input:focus {
    outline: none;
    border-color: #FFA500;
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.3);
}

.primary-button {
    background-color: #FFA500;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
    width: 100%;
    margin-top: 1rem;
}

.primary-button:hover {
    background-color: #f6121d;
}

.form-switcher {
    margin-top: 1.5rem;
    color: #aaa;
}

.form-switcher a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.form-switcher a:hover {
    text-decoration: underline;
}

.error-message {
    color: #FFA500;
    margin-top: 1rem;
    font-weight: 500;
    min-height: 1.2em; /* Prevent layout shift */
}

/* Form display logic */
.auth-form {
    display: none;
}
.auth-form.active {
    display: block;
}

/* NOUVEAU STYLE POUR LE COMPTEUR DE JOUEURS */
.player-count-display {
    margin-top: 1.5rem;
    font-size: 1rem;
    color: #c0c0c0; /* Couleur gris clair */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
}

.player-count-display .fas {
    margin-right: 8px;
    color: #FFA500; /* Couleur accentuée du thème */
}

/* Companion Card Image Styles */
.companion-card-horizontal .card-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    background-color: #2c2c2c;
}

.companion-card-horizontal .card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ================================== */
/* == NOUVEAUX STYLES COMPAGNONS == */
/* ================================== */

.companion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.companion-profile-card {
    background-color: #2a2a2e;
    border-radius: 12px;
    border: 1px solid #444;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.companion-profile-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}

.companion-profile-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
}

.companion-profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.companion-profile-status {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(5px);
}

.companion-profile-status.available { background-color: rgba(40, 167, 69, 0.8); }
.companion-profile-status.wounded { background-color: rgba(220, 53, 69, 0.8); }
.companion-profile-status.on-mission { background-color: rgba(23, 162, 184, 0.8); }

.companion-profile-details {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.companion-profile-name {
    margin: 0 0 10px 0;
    font-size: 1.4rem;
    color: var(--accent-yellow);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.level-badge {
    background-color: var(--accent-yellow);
    color: #1a1a1e;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: bold;
}

.companion-profile-specialty {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #333;
    padding: 5px 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    color: #ddd;
}

.companion-profile-specialty i {
    color: var(--accent-yellow);
}

.companion-profile-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 0.95rem;
}
.companion-profile-stats span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ccc;
}
 .companion-profile-stats span i {
    color: #888;
 }

.companion-profile-traits .traits-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #888;
    margin: 0 0 5px 0;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
}

.traits-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.trait-chip {
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}
.trait-chip.positive { background-color: #28a745; color: white; }
.trait-chip.negative { background-color: #dc3545; color: white; }

.companion-profile-action {
    padding: 15px;
    background-color: #1f1f22;
    border-top: 1px solid #444;
    text-align: center;
}

.recruit-button .fa-coins {
    margin: 0 5px;
    color: #fff200;
}

/* Barre d'XP */
.xp-bar {
    background-color: #1a1a1e;
    border-radius: 5px;
    height: 20px;
    margin: 10px 0;
    position: relative;
    overflow: hidden;
    border: 1px solid #444;
}

.xp-bar-fill {
    background: linear-gradient(90deg, #3a7bd5, #00d2ff);
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease-in-out;
}

.xp-bar-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}


/* ======================================== */
/* == STYLES POUR L'ÉQUIPEMENT COMPAGNON == */
/* ======================================== */
.companion-equipment {
    margin-top: auto; /* Pushes the equipment section to the bottom */
    padding-top: 15px;
    border-top: 1px solid #444;
}

.equipment-slots-container {
    display: flex;
    justify-content: space-around;
    gap: 10px;
}

.equipment-slot {
    flex: 1;
    border: 1px solid #555;
    border-radius: 8px;
    padding: 8px;
    min-height: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background-color: #333;
    font-size: 0.85rem;
}

.equipment-slot.empty {
    border-style: dashed;
    cursor: pointer;
    color: #888;
    transition: all 0.2s ease;
    justify-content: center;
}

.equipment-slot.empty:hover {
    border-color: var(--accent-yellow);
    color: var(--accent-yellow);
    background-color: #444;
}

.equipment-slot .slot-title {
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: #aaa;
    margin-bottom: 5px;
}

.equipment-slot .empty-icon {
    font-size: 1.5rem;
}

.equipped-item-info {
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    flex-grow: 1;
}

.equipped-item-info strong {
    white-space: normal;
    word-break: break-word;
    font-size: 0.8rem;
    line-height: 1.2;
}

.unequip-button {
    margin-top: auto;
    padding: 2px 6px;
    font-size: 0.75rem;
}

.equipped-item-bonus {
    font-size: 0.7rem;
    color: #ccc;
    line-height: 1.2;
    margin-top: 4px;
    width: 100%;
}
.equipped-item-bonus div {
    margin-top: 1px;
}

/* Modal pour la sélection d'équipement */
.equipment-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
    max-height: 50vh;
    overflow-y: auto;
    padding: 10px;
}

.equipment-select-card {
    background-color: #333;
    border: 2px solid #555;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.equipment-select-card h4 {
    margin: 0 0 5px 0;
    font-size: 1rem;
}
.equipment-select-card p {
    font-size: 0.8rem;
    color: #ccc;
    flex-grow: 1;
    margin: 0 0 10px 0;
}


/* ======================================== */
/* == STYLES POUR MISSIONS DE COMPAGNONS == */
/* ======================================== */

.c-mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.c-mission-card {
    background-color: #2a2a2e;
    border: 1px solid #444;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.c-mission-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background-color: #1f1f22;
    border-bottom: 1px solid #444;
    border-radius: 8px 8px 0 0;
}

.c-mission-card-header i { 
    color: var(--accent-yellow); 
    font-size: 1.2rem; 
}

.c-mission-card-header h3 { 
    margin: 0; 
    font-size: 1.2rem;
}

.c-mission-card-body { 
    padding: 15px; 
    flex-grow: 1; 
}

.c-mission-card-body p { 
    margin: 0 0 10px 0; 
    color: #ccc;
}
.c-mission-card-body p i {
    color: #888;
    margin-right: 5px;
}

.c-mission-card-footer { 
    padding: 15px; 
    text-align: center; 
    border-top: 1px solid #444; 
    background-color: #1f1f22;
    border-radius: 0 0 8px 8px;
}

.c-mission-in-progress p {
    margin: 2px 0;
    color: #ccc;
}
.c-mission-in-progress .timer {
    color: var(--accent-yellow);
    font-weight: bold;
}

/* Modal for companion selection */
.companion-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
    max-height: 40vh;
    overflow-y: auto;
    padding: 5px;
}

.companion-select-card {
    background-color: #333;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-align: center;
}

.companion-select-card:hover {
    background-color: #444;
    border-color: #666;
}

.companion-select-card.selected {
    border-color: var(--accent-yellow);
    box-shadow: 0 0 10px var(--accent-yellow);
    transform: scale(1.05);
}

.companion-select-card.recommended {
    position: relative;
    overflow: hidden;
}

.companion-select-card.recommended::after {
    content: '★';
    position: absolute;
    top: 5px;
    right: 10px;
    color: #ffc107;
    font-size: 1.2rem;
    text-shadow: 0 0 5px black;
}

.companion-select-card img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 2px solid #555;
}

.companion-select-details {
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
}

/* Mission Reports List */
.reports-list .report-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr auto;
    align-items: center;
    padding: 10px 15px;
    background-color: #2a2a2e;
    border-bottom: 1px solid #444;
    gap: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.reports-list .report-item:hover {
    background-color: #3a3a3e;
}

.text-success { color: #28a745; font-weight: bold; }
.text-danger { color: #dc3545; font-weight: bold; }

/* Mission Report Modal */
.combat-log {
    max-height: 250px;
    overflow-y: auto;
    background-color: #1f1f22;
    padding: 10px;
    border-radius: 5px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    border: 1px solid #444;
    margin-top: 15px;
}

.combat-log-line {
    margin: 2px 0;
    padding: 2px 0;
    border-bottom: 1px dashed #333;
}
.combat-log-line:last-child {
    border-bottom: none;
}

/* ======================================== */
/* == STYLES POUR TALENTS DE COMPAGNONS  == */
/* ======================================== */
.talent-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
    background-color: #1f1f22;
    border-radius: 8px;
    margin-bottom: 20px;
}
.companion-selector-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}
.companion-selector-item img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #555;
    object-fit: cover;
}
.companion-selector-item span {
    font-size: 0.8rem;
    font-weight: 500;
}
.companion-selector-item:hover {
    background-color: #333;
}
.companion-selector-item.active {
    border-color: var(--accent-yellow);
    background-color: #2a2a2e;
}

.talent-tree-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.talent-card {
    background-color: #2a2a2e;
    border: 1px solid #444;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}
.talent-card.maxed {
    opacity: 0.7;
    border-style: dashed;
}
.talent-card-header {
    display: flex; align-items: center; gap: 10px;
    padding: 12px; background-color: #1f1f22;
    border-bottom: 1px solid #444;
}
.talent-card-header i { font-size: 1.5rem; color: var(--accent-yellow); }
.talent-card-header h3 { margin: 0; font-size: 1.1rem; }
.talent-card-body { padding: 15px; flex-grow: 1; }
.talent-description { font-size: 0.9rem; color: #ccc; margin-bottom: 15px; }
.talent-progress { margin-bottom: 10px; }
.talent-progress span { font-size: 0.9rem; font-weight: bold; }
.progress-bar { background-color: #1a1a1e; border-radius: 5px; height: 10px; overflow: hidden; margin: 5px 0; }
.progress-fill { background-color: var(--accent-yellow); height: 100%; transition: width 0.3s ease; }
.current-bonus, .next-level-info {
    font-size: 0.9rem;
    color: #ddd;
    margin: 5px 0 0 0;
}
.next-level-info .fa-microchip { color: var(--accent-yellow); }
.talent-card-footer { padding: 10px 15px; border-top: 1px solid #444; background-color: #1f1f22; }

/* ======================================== */
/* == STYLES POUR MISSION SPÉCIALE       == */
/* ======================================== */
.special-mission-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
}
.special-mission-enemy, .special-mission-squad {
    flex: 1;
    min-width: 320px;
    background-color: #2a2a2e;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
}
.special-mission-enemy h3, .special-mission-squad h3 {
    margin-top: 0;
    color: var(--accent-yellow);
    border-bottom: 1px solid #555;
    padding-bottom: 10px;
    margin-bottom: 15px;
}
.enemy-card {
    text-align: center;
}
.enemy-card img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    border: 2px solid #555;
    margin-bottom: 15px;
}
.enemy-card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    text-align: left;
}
.companion-checklist {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}
.companion-checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.companion-checklist-item:hover {
    background-color: #3a3a3e;
}
.companion-checklist-item input {
    width: 18px;
    height: 18px;
}
.companion-checklist-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.squad-actions {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.travel-info-box {
    text-align: center;
    padding: 30px;
    background-color: #1f1f22;
    border-radius: 8px;
}
.travel-info-box .timer {
    font-size: 2rem;
    color: var(--accent-yellow);
    display: block;
    margin: 10px 0;
}
.travel-info-box p {
    color: #ccc;
    max-width: 600px;
    margin: 15px auto 0 auto;
    line-height: 1.6;
}

/* ===================================================================================
   FEUILLE DE STYLE POUR L'ONGLET AFFECTATION (EXTENSIONS)
   =================================================================================== */

/* Grille principale des emplacements d'affectation */
.affectation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
    padding: 16px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

/* Style de base pour un emplacement (slot) */
.affectation-slot {
    background-color: var(--background-color-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    min-height: 100px;
    position: relative;
}

/* Emplacement vide */
.affectation-slot.empty {
    border-style: dashed;
    border-color: var(--text-muted);
    flex-direction: column;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
}

.affectation-slot.empty:hover {
    background-color: var(--background-color-hover);
    border-color: var(--accent-yellow);
    color: var(--accent-yellow);
}

.affectation-slot.empty .fas.fa-plus {
    font-size: 24px;
    margin-bottom: 8px;
}

/* Emplacement rempli */
.affectation-slot.filled {
    background-color: var(--background-color-medium);
}

.affectation-slot.filled img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.affectation-slot .slot-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.affectation-slot .slot-info strong {
    font-size: 1.1em;
    color: var(--text-color-primary);
}

.affectation-slot .slot-info small {
    color: var(--text-muted);
    font-size: 0.9em;
}

.affectation-slot .production-info {
    color: var(--accent-green);
    font-weight: bold;
}

/* NOUVELLE SECTION : Résumé de la production totale */
.total-production-summary {
    background-color: var(--background-color-medium);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.total-production-summary h3 {
    margin-top: 0;
    margin-bottom: 16px;
    text-align: center;
    color: var(--accent-yellow);
}

.total-prod-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.total-prod-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--background-color-light);
    padding: 8px 12px;
    border-radius: 6px;
}

.total-prod-label {
    font-weight: bold;
    color: var(--text-color-primary);
}

.total-prod-value {
    font-weight: bold;
    color: var(--accent-green);
    background-color: rgba(10, 240, 10, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
}
/* FIN NOUVELLE SECTION */

/* Bouton pour retirer un compagnon */
.affectation-slot .small-btn.danger-button {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 14px;
}

/* Grille des compagnons disponibles */
.companion-pool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

/* Carte d'un compagnon dans la liste des disponibles */
.companion-pool-card {
    background-color: var(--background-color-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.companion-pool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border-color: var(--accent-yellow);
}

.companion-pool-card img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 8px;
}

.companion-pool-card strong {
    font-size: 1em;
    color: var(--text-color-primary);
}

.companion-pool-card small {
    font-size: 0.85em;
    color: var(--accent-green);
}

.companion-pool-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #222;
}

.companion-pool-card.disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border-color);
}

.pool-card-status {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(23, 162, 184, 0.9);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: bold;
}


/* ===================================================================================
STYLES POUR L'ATELIER ET L'INVENTAIRE
=================================================================================== */

/* Grille pour les équipements */
.equipment-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
gap: 20px;
margin-top: 20px;
}

/* Carte d'équipement de base */
.equipment-card {
background-color: var(--background-color-medium);
border: 2px solid var(--border-color);
border-radius: 8px;
display: flex;
flex-direction: column;
overflow: hidden;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Couleurs de bordure par rareté */
.equipment-card.rarity-common { border-color: #9d9d9d; }
.equipment-card.rarity-uncommon { border-color: #1eff00; }
.equipment-card.rarity-rare { border-color: #0070dd; }
.equipment-card.rarity-legendary { border-color: #a335ee; }

.equipment-card-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 12px 15px;
background-color: var(--background-color-light);
border-bottom: 1px solid var(--border-color);
}

.equipment-card-header h3 {
margin: 0;
font-size: 1.2em;
font-weight: bold;
}

.rarity-chip {
padding: 4px 10px;
border-radius: 12px;
font-size: 0.8em;
font-weight: bold;
color: #000;
display: flex;
align-items: center;
gap: 6px;
}
.rarity-chip i {
font-size: 0.9em;
}

.equipment-card-body {
padding: 15px;
flex-grow: 1;
}

.equipment-description {
font-size: 0.9em;
color: var(--text-muted);
margin-top: 0;
margin-bottom: 15px;
font-style: italic;
}

.equipment-effects {
font-size: 0.9em;
}

.equipment-effects strong {
color: var(--accent-yellow);
display: block;
margin-bottom: 8px;
}
.equipment-effects div {
margin-bottom: 4px;
}

.equipment-card-footer {
padding: 15px;
background-color: var(--background-color-light);
border-top: 1px solid var(--border-color);
display: flex;
flex-direction: column;
gap: 8px;
}

.equipment-card-footer .fa-coins {
color: gold;
}
.equipment-card-footer .fa-microchip {
color: var(--accent-cyan);
}

/* Filtres de l'inventaire */
.inventory-filters {
display: flex;
flex-wrap: wrap;
gap: 15px;
padding: 15px;
background-color: var(--background-color-medium);
border-radius: 8px;
margin-bottom: 20px;
}

.filter-group {
display: flex;
flex-wrap: wrap;
gap: 10px;
}

.inventory-filters .secondary-button.active {
background-color: var(--accent-yellow);
color: var(--background-color-dark);
font-weight: bold;
}

.inventory-filters .rarity-common.active { background-color: #9d9d9d; color: #000; }
.inventory-filters .rarity-uncommon.active { background-color: #1eff00; color: #000; }
.inventory-filters .rarity-rare.active { background-color: #0070dd; color: #fff; }
.inventory-filters .rarity-legendary.active { background-color: #a335ee; color: #fff; }

/* Groupe de boutons pour l'inventaire */
.button-group {
display: flex;
gap: 10px;
width: 100%;
}
.button-group .primary-button,
.button-group .secondary-button {
flex: 1;
padding: 8px 10px;
font-size: 0.9em;
}


/* =================================================================== */
/* STYLES POUR LA SECTION PARRAINAGE (PROFILE.JS)                     */
/* =================================================================== */

/* Conteneur principal de la section */
.profile-referral-section {
    padding: 20px;
    background-color: var(--background-color-darker); /* Un fond légèrement plus sombre pour la démarquer */
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-top: 20px;
}

/* Style du paragraphe d'introduction */
.profile-referral-section > p {
    font-size: 0.95em;
    color: var(--text-color-secondary);
    margin-bottom: 15px;
}

/* Style du groupe input + bouton copier */
.profile-referral-section .input-group {
    display: flex;
    margin-bottom: 25px;
}

/* Champ de texte pour le lien */
#referral-link-input {
    flex-grow: 1; /* Prend toute la place disponible */
    background-color: var(--background-color-darkest);
    border: 1px solid var(--border-color-light);
    color: var(--accent-yellow); /* Met le lien en valeur */
    font-family: 'Courier New', Courier, monospace; /* Police plus "technique" */
    font-size: 0.9em;
    padding: 10px;
    border-radius: 4px 0 0 4px; /* Coins arrondis seulement à gauche */
    outline: none;
}

/* Bouton copier */
#copy-referral-link-btn {
    border-radius: 0 4px 4px 0; /* Coins arrondis seulement à droite */
    border-left: none; /* Supprime la double bordure */
    transition: background-color 0.2s ease, color 0.2s ease;
}

#copy-referral-link-btn:hover {
    background-color: var(--accent-yellow);
    color: var(--background-color-darkest);
}

/* Conteneur pour les deux cartes (gains et filleuls) */
.referral-details {
    display: flex;
    gap: 20px; /* Espace entre les deux cartes */
    justify-content: space-between;
}

/* Style commun pour les deux cartes */
.referral-gains-card,
.referral-list-card {
    flex-basis: 48%; /* Chaque carte prend environ la moitié de l'espace */
    background-color: var(--background-color-dark);
    padding: 15px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.referral-gains-card h4,
.referral-list-card h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--text-color-primary);
    border-bottom: 1px solid var(--border-color-light);
    padding-bottom: 10px;
}

/* Style de la liste des gains */
.gains-list {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Espace entre les lignes de gains */
    margin-bottom: 15px;
    flex-grow: 1; /* Pousse le bouton "Récupérer" vers le bas */
}

.gains-list span {
    font-size: 1.1em;
    font-weight: bold;
}

.gains-list span i {
    margin-right: 8px;
    color: var(--accent-yellow);
    width: 20px; /* Aligne les icônes */
    text-align: center;
}

/* Style de la liste des filleuls */
#referrals-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 150px; /* Hauteur maximale avec une barre de défilement si besoin */
    overflow-y: auto;
}

#referrals-list li {
    padding: 5px 0;
    border-bottom: 1px solid var(--border-color-dark);
}

#referrals-list li:last-child {
    border-bottom: none;
}

#referrals-list li i {
    margin-right: 8px;
    color: var(--accent-success);
}


/* --- STYLES ADDITIONNELS POUR LES CARTES DE TALENT DU SURVIVANT --- */

.talent-card.locked {
    opacity: 0.7;
    background-color: #222;
    border-color: #333;
}

.talent-card.locked .talent-card-header {
    background-color: #1a1a1e;
}

.talent-card.locked .talent-card-header h3 {
    color: #888;
}

.talent-card.locked .talent-card-header i {
    color: #555;
}

/* Style pour le texte des prérequis */
.talent-card .talent-prereq {
    font-size: 0.85em;
    color: var(--accent-red);
    font-style: italic;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-color);
}

/* Style pour le coût (déjà présent dans le tooltip, mais utile ici) */
.talent-card .talent-cost {
    font-size: 0.9em;
    font-weight: bold;
    color: #ddd;
    margin-top: 8px;
}

.talent-card .talent-cost i {
    color: var(--accent-yellow);
}



/* ---- RESPONSIVE : Pour les écrans plus petits ---- */
@media (max-width: 768px) {
    .referral-details {
        flex-direction: column; /* Les cartes se placent l'une sous l'autre */
    }
}



/* --- STYLES POUR LES CATÉGORIES DE TALENTS SURVIVANT --- */

/* Par défaut, l'icône est jaune (style déjà existant) */
.talent-card .talent-card-header i {
    color: var(--accent-yellow);
}

/* Catégorie: Production (Vert) */
.talent-card.talent-category-production .talent-card-header {
    background-color: #1a3c30; /* Fond vert sombre */
    border-bottom-color: #00e676;
}
.talent-card.talent-category-production .talent-card-header i {
    color: #00e676; /* Icone verte */
}

/* Catégorie: Stats de Combat (Orange) */
.talent-card.talent-category-stats .talent-card-header {
    background-color: #3d2c1e; /* Fond orange sombre */
    border-bottom-color: #ff6b05;
}
.talent-card.talent-category-stats .talent-card-header i {
    color: #ff6b05; /* Icone orange */
}

/* Catégorie: Vitesse / Temps (Bleu) */
.talent-card.talent-category-speed .talent-card-header {
    background-color: #1a3a4a; /* Fond bleu sombre */
    border-bottom-color: #00e5ff;
}
.talent-card.talent-category-speed .talent-card-header i {
    color: #00e5ff; /* Icone bleue */
}

/* Catégorie: Utilitaire / Autre (Violet) */
.talent-card.talent-category-utility .talent-card-header {
    background-color: #35264f; /* Fond violet sombre */
    border-bottom-color: #9c27b0;
}
.talent-card.talent-category-utility .talent-card-header i {
    color: #9c27b0; /* Icone violette */
}

/* NOUVEAU: Styles pour l'historique des coffres */
        .history-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-top: 15px;
        }
        .history-card {
            background: var(--background-color-darker);
            border: 1px solid var(--border-color-light);
            border-radius: 4px;
            padding: 12px;
        }
        .history-card-header {
            display: flex;
            align-items: center;
            gap: 10px;
            padding-bottom: 10px;
            margin-bottom: 10px;
            border-bottom: 1px solid var(--border-color-light);
            flex-wrap: wrap; /* Pour les petits écrans */
        }
        .history-timestamp {
            margin-left: auto;
            font-size: 0.85em;
            color: var(--text-secondary);
            flex-shrink: 0;
        }
        .history-card-body {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        .reward-chip {
            background: rgba(255, 255, 255, 0.1);
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 0.9em;
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }
        .reward-chip .fa-coins { /* Spécifique pour les jetons */
            color: var(--accent-yellow);
        }
        /* FIN NOUVEAU: Styles pour l'historique des coffres */

/* NOUVEAU : Style pour le panneau d'annonce Admin */
#admin-announcement-panel {
    background-color: var(--background-color-dark);
    /* Utilise la couleur dorée du cercle des parieurs pour un look "officiel" */
    border: 2px solid var(--accent-gold, #ffc107);
    border-radius: 8px;
    padding: 12px 40px 12px 15px; /* Laisse de la place à droite pour le bouton fermer */
    margin: 0 10px 10px 10px; /* Marge en haut et sur les côtés */
    display: flex; /* 'flex' est mieux que 'none' pour le JS, on le laisse gérer */
    align-items: center;
    gap: 15px;
    position: relative; /* Pour positionner le bouton fermer */
    color: var(--text-primary);
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.4);
    animation: pulse-gold 2.5s infinite; /* Réutilise l'animation dorée */
}

#admin-announcement-panel i {
    font-size: 1.5em;
    color: var(--accent-gold, #ffc107);
}

#admin-announcement-content {
    flex-grow: 1;
    font-size: 0.95em;
    line-height: 1.5;
}

/* Permet aux liens <a> dans votre annonce d'être cliquables et stylés */
#admin-announcement-content a {
    color: var(--accent-yellow);
    text-decoration: underline;
    font-weight: bold;
}

#close-admin-announcement {
    position: absolute;
    top: 5px;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.8em;
    line-height: 1;
    padding: 0 5px;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s;
}
#close-admin-announcement:hover {
    color: var(--text-primary);
    opacity: 1;
    transform: scale(1.1);
}

/*
 * CORRECTION POUR LE LAYOUT MULTI-EXPÉDITION
 * Ceci force le planificateur du bloc multi-lancement
 * à s'étendre sur toutes les colonnes de la grille parente.
*/
.expedition-layout.multi-launch-layout .expedition-planner {
    /* Si votre .expedition-layout utilise 'display: grid' (le plus probable) */
    grid-column: 1 / -1; 
    
    /* * Option B: Si votre .expedition-layout utilise 'display: flex', 
     * vous aurez peut-être besoin de :
     * flex-basis: 100%; 
     * width: 100%;
    */
}

/* =================================
   STYLES ARÈNE PVP (VS SCREEN)
   ================================= */

/* --- Conteneur principal "VS" --- */
.arena-vs-layout {
    display: flex;
    flex-direction: row;
    align-items: stretch; /* Fait que les colonnes ont la même hauteur */
    justify-content: space-between;
    gap: 15px;
    width: 100%;
    margin-bottom: 20px;
    min-height: 380px; /* Donne de la hauteur à la section */
}

/* --- Colonnes Joueur et Adversaire --- */
.vs-team {
    flex: 1;
    background-color: var(--background-color-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.vs-team.player {
    border-left: 4px solid var(--accent-blue);
}
.vs-team.opponent {
    border-right: 4px solid var(--accent-red);
}

.vs-team h3 {
    margin: 0 0 15px 0;
    text-align: center;
    font-family: var(--font-title);
    font-size: 1.4em;
}
.vs-team.player h3 {
    color: var(--accent-blue);
}
.vs-team.opponent h3 {
    color: var(--accent-red);
}

/* --- Séparateur "VS" --- */
.vs-separator {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
    font-weight: bold;
    font-family: var(--font-title);
    color: var(--accent-yellow);
    text-shadow: 0 0 10px var(--accent-yellow);
    padding: 0 10px;
}

/* --- Conteneur des 3 slots --- */
.arena-team-slots-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

/* --- Carte de slot individuelle (style de base) --- */
.arena-slot-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    padding: 10px;
    position: relative;
    overflow: hidden;
    min-height: 100px;
}

/* --- Slot Vide (Cliquable) --- */
.arena-slot-card.empty {
    border: 2px dashed var(--border-color-light);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}
.arena-slot-card.empty:hover {
    border-color: var(--accent-yellow);
    color: var(--accent-yellow);
    background-color: var(--background-color-hover);
}
.arena-slot-card.empty .fa-plus {
    font-size: 2em;
    margin-bottom: 5px;
}

/* --- Slot Rempli (Infos Compagnon) --- */
.arena-slot-card.filled {
    background-color: var(--background-color-light);
    border: 1px solid var(--border-color-light);
    text-align: center;
}
.arena-slot-card.filled img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 8px;
    border: 2px solid var(--border-strong);
}
.arena-slot-card.filled strong {
    font-size: 0.95em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}
.arena-slot-card.filled small {
    font-size: 0.8em;
    color: var(--text-secondary);
}

/* --- Bouton "X" pour retirer --- */
.arena-slot-remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border: none;
    background-color: rgba(220, 53, 69, 0.8);
    color: white;
    border-radius: 50%;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    opacity: 0.6;
    transition: all 0.2s ease;
}
.arena-slot-card.filled:hover .arena-slot-remove-btn {
    opacity: 1;
}
.arena-slot-remove-btn:hover {
    background-color: #dc3545;
    transform: scale(1.1);
}

/* --- Slot Adversaire (Placeholder) --- */
.arena-slot-card.opponent {
    border: 2px dashed var(--border-color);
    color: var(--text-secondary);
    opacity: 0.6;
}
.arena-slot-card.opponent .fa-question {
    font-size: 2em;
    margin-bottom: 5px;
}

/* --- Barre de Statut (sous le "VS") --- */
.arena-status-box {
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    margin: 0 auto 20px auto;
    width: 100%;
    max-width: 800px;
    box-sizing: border-box;
    font-size: 1.1em;
    font-weight: 500;
}
.arena-status-box.idle {
    background-color: transparent;
    padding: 0; /* Pas de fond pour le bouton seul */
}
.arena-status-box.loading {
    background-color: var(--background-color-dark);
    color: var(--text-secondary);
}
.arena-status-box.queued {
    background-color: rgba(23, 162, 184, 0.2);
    border: 1px solid #17a2b8;
    color: #17a2b8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}
.arena-status-box.matched {
    background-color: rgba(220, 53, 69, 0.2);
    border: 1px solid #dc3545;
    color: #dc3545;
}

/* --- Sous-onglets de l'Arène (Style) --- */
.arena-sub-tabs {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 2px solid var(--border-color);
    margin-top: 20px;
}
.arena-sub-tab-button {
    background-color: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    padding: 12px 18px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    margin-bottom: -2px; /* Aligne avec la bordure parente */
}
.arena-sub-tab-button:hover {
    color: var(--text-primary);
    background-color: var(--background-color-hover);
}
.arena-sub-tab-button.active {
    color: var(--accent-yellow);
    border-bottom-color: var(--accent-yellow);
    font-weight: bold;
}
.sub-sub-content {
    padding-top: 20px;
}
.sub-sub-content:not(.active) {
    display: none;
}

/* --- Style pour les récompenses dans l'historique de l'arène --- */
.arena-report-rewards {
    display: flex;
    gap: 12px;
    font-size: 0.9em;
    color: var(--accent-green); /* Couleur verte pour les gains */
}
.arena-report-rewards span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* --- Styles pour la Modale d'Assignation --- */
.arena-assign-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
    max-height: 40vh;
    overflow-y: auto;
    padding: 10px;
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
}
.arena-assign-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--background-color-dark);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-align: left;
}
.arena-assign-card:hover {
    background-color: var(--background-color-hover);
    border-color: var(--accent-yellow);
    transform: scale(1.03);
}
.arena-assign-card img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color-light);
    flex-shrink: 0;
}
.arena-assign-details {
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
    overflow: hidden;
}
.arena-assign-details strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.arena-assign-details small {
    color: var(--text-secondary);
}

/* --- Styles pour l'onglet Classement (ranking.js) --- */
.ranking-list-container {
    display: flex;
    flex-direction: column;
}
.ranking-header {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    padding: 10px 15px;
    background-color: var(--background-color-dark);
    border-bottom: 2px solid var(--border-color);
    font-family: var(--font-title);
    color: var(--accent-blue);
    font-size: 0.9em;
    text-transform: uppercase;
}
.ranking-header span:last-child, .ranking-row .score {
    text-align: right;
}
.ranking-row {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
    align-items: center;
}
.ranking-row:hover {
    background-color: var(--background-color-hover);
}
.ranking-row.current-user {
    background-color: rgba(0, 229, 255, 0.1);
    border-left: 4px solid var(--accent-blue);
}
.ranking-row .rank {
    font-family: var(--font-title);
    font-size: 1.2em;
    color: var(--text-secondary);
}
.ranking-row.current-user .rank {
    color: var(--accent-blue);
}
.ranking-row .name {
    font-weight: bold;
}
.ranking-row .score {
    font-family: var(--font-title);
    font-size: 1.1em;
    color: var(--accent-yellow);
}

/* =================================
   STYLES POUR LE JOURNAL DE COMBAT DE L'ARÈNE
   ================================= */

/* Style le conteneur du log dans la modale */
.combat-log.arena-log {
    max-height: 250px;
    overflow-y: auto;
    background-color: #1f1f22;
    padding: 10px;
    border-radius: 5px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    border: 1px solid #444;
    margin-top: 15px;
    text-align: left; /* Assure que le texte du log est aligné à gauche */
}

/* Style de base pour une ligne de log */
.combat-log.arena-log p {
    margin: 2px 0;
    padding: 2px 0;
    border-bottom: 1px dashed #333;
}
.combat-log.arena-log p:last-child {
    border-bottom: none;
}

/* Style pour les en-têtes de tour */
.combat-log.arena-log .log-line-round {
    color: var(--accent-yellow);
    font-weight: bold;
    text-align: center;
    margin-top: 8px;
}

/* Style pour les événements de défaite/victoire */
.combat-log.arena-log .log-line-defeat {
    color: var(--accent-red);
    font-weight: bold;
}
.combat-log.arena-log .log-line-victory {
    color: var(--accent-success);
    font-weight: bold;
}


/* Style pour le slot adversaire rempli */
.arena-slot-card.opponent-found {
    background: rgba(255, 82, 82, 0.1);
    border: 1px solid var(--accent-red);
    color: var(--text-primary);
}
.arena-slot-card.opponent-found img {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    margin-bottom: 5px;
}
.arena-slot-card.opponent-found strong {
    font-size: 1em;
    color: #fff;
}
.arena-slot-card.opponent-found small {
    font-size: 0.85em;
    color: var(--text-secondary);
}

/* Style pour le compte à rebours */
.arena-countdown-timer {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--accent-yellow);
    margin: 8px 0;
    text-shadow: 0 0 5px var(--accent-yellow);
}

/* Style pour le statut "Combat en cours" */
.arena-status-box.matched-fighting {
    padding: 20px;
    background: var(--background-color-dark);
    border: 1px solid var(--border-color);
    text-align: center;
    font-size: 1.2em;
    color: var(--accent-yellow);
}

/* NOUVEAU: Style pour la limite d'achat chez Corvus */
.item-card-mn .item-limit {
    font-size: 0.85em;
    color: var(--accent-yellow);
    text-align: center;
    margin: -5px 0 5px 0; /* Se place entre le coût et le bouton */
    font-weight: bold;
}
/* FIN NOUVEAU STYLE */

#generic-modal-overlay {
    z-index: 10001; 
}

/* Bouton Radio Sidebar */
#sidebar-radio-btn {
    margin-top: 10px;
    width: 100%;
    text-align: left;
    transition: all 0.3s;
}
#sidebar-radio-btn.active-signal {
    background-color: var(--accent-green); /* Vert radio */
    color: #000;
    font-weight: bold;
    border-color: #fff;
    animation: pulse-radio 2s infinite;
}
@keyframes pulse-radio {
    0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(46, 204, 113, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

/* Barre de Combo */
.daily-combo-bar {
    width: 100%;
    height: 20px;
    background: #444;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    margin-bottom: 10px;
}
.daily-combo-bar .combo-fill {
    height: 100%;
    background: linear-gradient(90deg, #f1c40f, #e67e22);
    transition: width 0.5s ease;
}
.daily-combo-bar .combo-text {
    position: absolute;
    width: 100%;
    text-align: center;
    top: 0;
    line-height: 20px;
    font-size: 0.8em;
    color: #fff;
    text-shadow: 1px 1px 1px #000;
}

/* --- Styles des Factions (Profil) --- */

.factions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.faction-item {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.2s;
}

.faction-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.05);
}

.faction-icon {
    font-size: 1.5em;
    margin-bottom: 5px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0,0,0,0.3);
}

/* Couleurs spécifiques aux factions */
.faction-icon.military { color: #ef4444; border: 1px solid #ef4444; } /* Rouge (L'Ordre) */
.faction-icon.nomads { color: #10b981; border: 1px solid #10b981; }   /* Vert (Nomades) */
.faction-icon.cult { color: #8b5cf6; border: 1px solid #8b5cf6; }     /* Violet (Culte) */

.faction-name {
    display: block;
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.faction-value {
    font-weight: bold;
    font-size: 1.1em;
}

.faction-value.positive { color: #4caf50; } /* Vert si > 0 */
.faction-value.negative { color: #f44336; } /* Rouge si < 0 */

/* Fixe la couleur de base à blanc (comme dans la solution précédente) */
#sidebar-radio-btn {
    color: var(--button-text-color) !important; 
}

/* * CORRECTION CRUCIALE : 
 * Force le texte à rester BLANC même lorsque la classe .active-signal est appliquée.
 * (Si vous utilisez le vert néon du thème, vous pouvez mettre var(--accent-neon-green) ici)
*/
#sidebar-radio-btn.active-signal {
    color: #ffffff !important; /* Le blanc force la lisibilité sur le vert */
}

/* Si le texte "SIGNAL !" est un élément distinct (à placer également) */
.sidebar-section #radio-status-text { /* (Si l'élément a cet ID ou une classe similaire) */
    color: var(--text-main);
    font-weight: bold;
}

/* --- STYLE ÉDITEUR DE TEXTE (Barre d'outils) --- */
.editor-toolbar {
    display: flex;
    gap: 5px;
    background-color: #2b2b2b;
    padding: 5px;
    border: 1px solid #444;
    border-bottom: none; /* Collé au textarea */
    border-radius: 4px 4px 0 0;
    align-items: center;
}

.editor-btn {
    background-color: #444;
    border: 1px solid #555;
    color: #ddd;
    width: 30px;
    height: 30px;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    transition: background 0.2s;
}

.editor-btn:hover {
    background-color: #555;
    color: #fff;
}

/* Input couleur discret */
.editor-color-picker {
    width: 30px;
    height: 30px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

/* Ajustement pour coller le textarea à la toolbar */
.classic-textarea.with-toolbar {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    margin-top: 0; /* Important */
}

/* --- STYLES DES BADGES DE RÔLE (PROFIL) --- */
.role-badge {
    font-size: 0.6em; /* Plus petit que le pseudo */
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    vertical-align: middle;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
    letter-spacing: 1px;
}

/* Administrateur (Rouge impérial) */
.role-admin {
    background: linear-gradient(135deg, #b71c1c, #d32f2f);
    color: #fff;
    border: 1px solid #ff5252;
    text-shadow: 0 0 3px rgba(0,0,0,0.5);
}

/* Modérateur (Bleu autorité) */
.role-mod {
    background: linear-gradient(135deg, #0d47a1, #1976d2);
    color: #fff;
    border: 1px solid #448aff;
}

/* Guide (Vert ou Violet sagesse) */
.role-guide {
    background: linear-gradient(135deg, #4a148c, #7b1fa2);
    color: #e1bee7;
    border: 1px solid #ea80fc;
}

/* La scène de combat */
.combat-stage {
    background-color: #1a1a1a;
    border: 2px solid #444;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 250px;
    position: relative;
    overflow: hidden;
    background-image: url('https://votre-image-de-fond-caverne.jpg'); /* Optionnel */
    background-size: cover;
}

/* Les camps */
.combat-side {
    width: 40%;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s;
}

/* Images des unités/monstres */
.combat-sprite {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    background: #000;
}

.player-side .combat-sprite { border-color: var(--accent-green); }
.enemy-side .combat-sprite { border-color: var(--accent-red); }

/* Animation d'attaque (le sprite avance et recule) */
@keyframes attack-right {
    0% { transform: translateX(0); }
    50% { transform: translateX(50px) scale(1.1); }
    100% { transform: translateX(0); }
}
@keyframes attack-left {
    0% { transform: translateX(0); }
    50% { transform: translateX(-50px) scale(1.1); }
    100% { transform: translateX(0); }
}

.anim-attack-player { animation: attack-right 0.4s ease-in-out; }
.anim-attack-enemy { animation: attack-left 0.4s ease-in-out; }

/* Texte de dégâts flottant */
.floating-damage {
    position: absolute;
    color: #ff3333;
    font-weight: bold;
    font-size: 1.5em;
    text-shadow: 0 0 5px black;
    animation: floatUp 1s forwards;
    pointer-events: none;
}

@keyframes floatUp {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-50px); opacity: 0; }
}