/* Styles pour la page overview */

/* ============================================
   Conteneur planète 3D
   ============================================ */
#planet3D {
    width: 100%;
    height: 600px;
}

/* ============================================
   Panneaux d'information
   ============================================ */
.ov-panels {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
}

.ov-panel {
    position: absolute;
    width: 235px;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    box-shadow: var(--panel-shadow);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

/* Positions et transforms de départ */
.ov-panel-tl {
    top: 15px;
    left: 15px;
    transform: translate(-20px, -20px);
    transition-delay: 0s;
}

.ov-panel-tr {
    top: 15px;
    right: 15px;
    transform: translate(20px, -20px);
    transition-delay: 0s;
}

.ov-panel-bl {
    bottom: 15px;
    left: 15px;
    transform: translate(-20px, 20px);
    transition-delay: 0s;
}

.ov-panel-br {
    bottom: 15px;
    right: 15px;
    transform: translate(20px, 20px);
    transition-delay: 0s;
}

/* État visible */
.ov-panels.active .ov-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translate(0, 0);
}

.ov-panels.active .ov-panel-tl {
    transition-delay: 0s;
}

.ov-panels.active .ov-panel-tr {
    transition-delay: 0.06s;
}

.ov-panels.active .ov-panel-bl {
    transition-delay: 0.12s;
}

.ov-panels.active .ov-panel-br {
    transition-delay: 0.18s;
}

/* Delays de fermeture (inversés) */
.ov-panels:not(.active) .ov-panel-tl {
    transition-delay: 0.12s;
}

.ov-panels:not(.active) .ov-panel-tr {
    transition-delay: 0.08s;
}

.ov-panels:not(.active) .ov-panel-bl {
    transition-delay: 0.04s;
}

.ov-panels:not(.active) .ov-panel-br {
    transition-delay: 0s;
}

/* ============================================
   En-tête des panneaux
   ============================================ */
.ov-panel-header {
    color: var(--panel-header-color);
    font-size: 12px;
    font-weight: bold;
    padding: 8px 10px;
    border-bottom: 1px solid var(--panel-header-border);
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.5px;
}

.ov-panel-header i {
    font-size: 13px;
    opacity: 0.7;
}

/* ============================================
   Corps des panneaux
   ============================================ */
.ov-panel-body {
    padding: 6px;
    max-height: 300px;
    overflow-y: auto;
}

.ov-panel-body::-webkit-scrollbar {
    width: 3px;
}

.ov-panel-body::-webkit-scrollbar-track {
    background: transparent;
}

.ov-panel-body::-webkit-scrollbar-thumb {
    background: var(--panel-border);
    border-radius: 3px;
}

/* ============================================
   Styles des tables (conservés et adaptés)
   ============================================ */
.infoplanete,
.infogenerales,
.prodressource,
.activiteplanete {
    border-collapse: collapse;
    text-align: center;
    width: 100%;
}

.infoplanete td,
.infogenerales td,
.prodressource td,
.activiteplanete td {
    border: 1px solid var(--panel-row-border);
    padding: 3px 5px;
}

.prodressource th {
    font-size: 10px;
    padding: 3px 5px;
    color: var(--font-color-2);
    font-weight: normal;
    border-bottom: 1px solid var(--panel-separator);
}

.prodressource th:first-child {
    width: 70%;
}

.ov-info-icon {
    font-size: 10px;
    color: var(--panel-border);
    cursor: pointer;
    vertical-align: middle;
}

.ov-info-icon:hover {
    color: var(--panel-header-color);
}

.ov-panel-edit {
    margin-left: auto;
    color: #fff;
    font-size: 12px;
    transition: color 0.2s ease;
}

.ov-panel-edit:hover {
    color: #fff;
}

/* ============================================
   Styles de défense (conservés)
   ============================================ */
.defense-stats {
    padding: 8px !important;
    text-align: left;
}

.defense-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.defense-item {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    padding: 2px 4px;
    background: var(--panel-hover);
    border-radius: 3px;
}

.defense-label {
    color: var(--font-color-2);
}

.defense-value {
    color: var(--font-color-1);
    font-weight: bold;
}

.defense-none {
    text-align: center;
    color: var(--gray-color);
    font-size: 10px;
    font-style: italic;
    margin-top: 4px;
}

.overview-container-padding {
    padding: 2px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 900px) {
    .ov-panel {
        width: 200px;
    }
}

@media (max-width: 600px) {
    .ov-panel {
        width: 45%;
    }

    .ov-panel-tl {
        top: 5px;
        left: 5px;
    }

    .ov-panel-tr {
        top: 5px;
        right: 5px;
    }

    .ov-panel-bl {
        bottom: 5px;
        left: 5px;
    }

    .ov-panel-br {
        bottom: 5px;
        right: 5px;
    }
}
/* Code couleur des statistiques de la planete (cases saturees, moral) */
.ov-stat-danger {
    color: var(--red-color);
    font-weight: bold;
}

.ov-stat-warn {
    color: var(--orange-color);
    font-weight: bold;
}

.ov-stat-mid {
    color: var(--yellow-color);
    font-weight: bold;
}

.ov-stat-good {
    color: var(--green-color);
    font-weight: bold;
}
