/* Styles pour CDG Conquête : Bataille Territoriale */
:root {
    --bg-dark: #0f172a;
    --bg-panel: #1e293b;
    --bg-card: #182234;
    --border-color: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-gold: #f59e0b;
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-red: #ef4444;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Barre de Ressources Supérieure (HUD) */
.resource-bar {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border-bottom: 2px solid #334155;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    position: sticky;
    top: 0;
    z-index: 1050;
}

.resource-pill {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.resource-pill:hover {
    border-color: var(--accent-gold);
    transform: translateY(-1px);
}

.resource-icon {
    font-size: 1.4rem;
}

.resource-val {
    font-weight: 700;
    font-size: 1.05rem;
    color: #ffffff;
}

.resource-rate {
    font-size: 0.72rem;
    color: #10b981;
    font-weight: 600;
}

/* Bandeau Démo 1-Clic */
.demo-banner {
    background: linear-gradient(90deg, #1e1b4b 0%, #31104b 50%, #1e1b4b 100%);
    border-bottom: 1px solid #6366f1;
    padding: 8px 16px;
    font-size: 0.88rem;
}

.demo-chip {
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 4px 12px;
    color: #e0e7ff;
    font-weight: 500;
    font-size: 0.8rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.demo-chip:hover {
    background: rgba(99, 102, 241, 0.4);
    border-color: #818cf8;
    color: #ffffff;
    transform: scale(1.03);
}

.demo-chip.active {
    background: #4f46e5;
    border-color: #a5b4fc;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.6);
}

/* Cartes de Bâtiments */
.building-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.building-card:hover {
    border-color: #64748b;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.building-level-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid #f59e0b;
    color: #f59e0b;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* Unités */
.unit-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 14px;
    transition: all 0.2s;
}

.unit-card:hover {
    border-color: #3b82f6;
    background: #243248;
}

/* Carte de France interactive */
.france-map-container {
    background: radial-gradient(circle at center, #1e293b 0%, #090d16 100%);
    border: 2px solid #334155;
    border-radius: 16px;
    position: relative;
    width: 100%;
    height: 700px;
    overflow: hidden;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8);
}

.cdg-node {
    cursor: pointer;
    transition: all 0.25s ease;
}

.cdg-node:hover {
    filter: drop-shadow(0 0 10px #f59e0b);
}

.cdg-node circle {
    transition: all 0.2s;
}

.cdg-node:hover circle.marker-dot {
    r: 10;
    stroke: #ffffff;
    stroke-width: 2.5;
}

.cdg-pulse {
    animation: pulseAnimation 2s infinite ease-out;
}

@keyframes pulseAnimation {
    0% {
        r: 6;
        opacity: 0.8;
    }
    100% {
        r: 22;
        opacity: 0;
    }
}

/* Ligne de marche offensive */
.march-path {
    stroke-dasharray: 6 6;
    animation: marchDash 1.2s linear infinite;
}

@keyframes marchDash {
    to {
        stroke-dashoffset: -24;
    }
}

/* Alertes d'attaque clignotantes */
.alert-incoming-attack {
    animation: sirenFlashing 1s infinite alternate;
    background: rgba(220, 38, 38, 0.2);
    border: 2px solid #ef4444;
}

@keyframes sirenFlashing {
    0% {
        box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
    }
    100% {
        box-shadow: 0 0 25px rgba(239, 68, 68, 0.9);
    }
}

/* Rapport de bataille */
.report-card {
    background: #182234;
    border: 1px solid #334155;
    border-radius: 12px;
    overflow: hidden;
}

.report-header-win {
    background: linear-gradient(90deg, #064e3b 0%, #065f46 100%);
    border-bottom: 2px solid #10b981;
}

.report-header-loss {
    background: linear-gradient(90deg, #7f1d1d 0%, #991b1b 100%);
    border-bottom: 2px solid #ef4444;
}

/* Badge général */
.badge-cdg {
    background: #334155;
    color: #f8fafc;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 0.8rem;
    font-weight: 600;
}