﻿/* ============================================================
   CDF COMPONENTS – Cards, Server Badge, Banners, Badges
============================================================ */

/* ============ CARDS ACCUEIL ============ */
.cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; padding: 0 20px; }
.card {
    background-image: url('camo.jpg'); background-size: cover;
    border-radius: var(--cdf-radius); padding: .6rem; text-align: center;
    min-height: 220px; max-width: 230px;
    box-shadow: 0 4px 8px var(--cdf-shadow); transition: .25s;
    flex: 1 1 calc(33% - 40px);
}
.card:hover { transform: translateY(-8px); box-shadow: 0 10px 18px var(--cdf-shadow); }
.card img { width: 50px; border-radius: 10px; }
.card h3 { font-family: 'armalite'; color: white; text-decoration: underline; margin: 12px 0 8px; }
.card p { color: #cfcfcf; }

/* ============ MISSION & VALEURS ============ */
.mission-valeurs-container { display: flex; gap: 20px; margin: 20px; }
.mission, .valeurs { flex: 1; background: var(--cdf-surface-2); padding: 20px; border-radius: var(--cdf-radius); box-shadow: 0 4px 8px var(--cdf-shadow); }
.mission p, .valeurs p { font-size: .9rem; }
@media(max-width:768px) { .mission-valeurs-container { flex-direction: column; } }

/* ============ MILITARY BANNER ============ */
.military-banner {
    width: 100%; max-width: 400px; height: 30px; margin: 8px auto 25px;
    background: url('/css/camo.jpg') center/cover no-repeat; border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,.45);
    border-top: 2px solid #141414; border-bottom: 2px solid #000;
    position: relative;
}
.military-banner::before, .military-banner::after {
    content: ""; position: absolute; top: 50%; width: 8px; height: 8px;
    background: #372e22; border-radius: 50%; box-shadow: inset 1px 1px 2px #000;
}
.military-banner::before { left: -16px; }
.military-banner::after { right: -16px; }

/* ============ BADGES MILITAIRES ANIMÉS ============ */
.badge-cdf {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 6px; font-size: 12px;
    font-weight: bold; text-shadow: 1px 1px 2px #000; position: relative;
}
.badge-ok { background: #7fa64b; color: #000; border: 1px solid #394622; overflow: visible; }
.badge-ok::after {
    content: ""; position: absolute; left: -8px; top: 50%; transform: translateY(-50%);
    width: 8px; height: 8px; border-radius: 50%; background: #9fff77;
    box-shadow: 0 0 10px #a1ff7b; animation: radarBlink 1.2s infinite ease-in-out;
}
@keyframes radarBlink { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .25; transform: scale(1.6); } }
.badge-ko { background: #b52f2f; color: #fff; border: 1px solid #4a0a0a; }
.badge-ko::after { content: "⚠"; margin-left: 4px; font-size: 10px; opacity: .9; }

/* ============ CAPACITY BAR ============ */
.capacity-bar {
    position: relative; width: 100%; height: 14px;
    background: rgba(0,0,0,.4); border: 1px solid var(--cdf-border);
    border-radius: 8px; overflow: hidden; box-shadow: inset 0 0 6px rgba(0,0,0,.6);
}
.capacity-fill { height: 100%; background: linear-gradient(90deg,#6fbf3f,#c7ff7c); transition: width .4s; }
.capacity-bar span { position: absolute; width: 100%; text-align: center; font-size: 10px; top: -18px; color: var(--cdf-accent-2); }

/* ============ SERVER BADGE ============ */
.server-badge {
    --bg: rgba(20,35,20,.92); --ok: #8fbf5a; --ko: #e05252; --ring: #9fdc6a;
    display: flex; align-items: center; padding: 8px 10px; margin: 0 12px;
    background: var(--bg); border: 1px solid var(--cdf-border);
    border-radius: 10px; box-shadow: 0 2px 8px var(--cdf-shadow);
}
.server-badge .badge-inner { display: flex; align-items: center; gap: 12px }
.server-badge .patch-wrap { position: relative; width: 46px; height: 46px }
.server-badge .patch { width: 46px; height: 46px; border-radius: 50%; box-shadow: 0 0 8px #000 }
.server-badge .radar-pulse { position: absolute; inset: 0; border-radius: 50%; border: 2px solid transparent; animation: none; }
.server-badge.online .radar-pulse { animation: radarPulse 2.5s ease-out infinite; border-color: var(--ring); }
@keyframes radarPulse { 0% { transform: scale(.9); opacity: .7 } 70% { transform: scale(1.35); opacity: .15 } 100% { transform: scale(1.5); opacity: 0 } }
.server-badge .siren-dot { position: absolute; right: -4px; top: -4px; width: 12px; height: 12px; border-radius: 50%; background: var(--ko); box-shadow: 0 0 8px #f33; animation: sirenBlink 1s infinite; }
@keyframes sirenBlink { 0%,100% { opacity: 1; transform: scale(1) } 50% { opacity: .3; transform: scale(1.25) } }
.server-badge .stats { display: flex; flex-direction: column; line-height: 1.05 }
.server-badge .line { display: flex; align-items: center; gap: 8px; white-space: nowrap }
.server-badge .line.small { font-size: 12px; opacity: .95 }
.server-badge .line .sep { opacity: .5; padding: 0 4px }
.server-badge .name { font-weight: 800 }
.server-badge.online .state { color: var(--ok) }
.server-badge.offline .state { color: var(--ko) }
.server-badge .btn-join { margin-left: 10px; font-family: 'BlackOpsOne'; padding: 6px 10px; border-radius: 8px; background: #7fa64b; border: 1px solid #394622; color: #000; }
.server-badge .btn-join:hover { background: #c7ff7c }
.server-badge .btn-join.disabled { background: #555; color: #ddd; border-color: #444; cursor: not-allowed }