/* Ships Page Styles - FlightDock Design */

.ships-page {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
    background: var(--primary-bg);
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Filtres */
.ships-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 2px var(--shadow-light);
}

.filter-group select option {
    background: var(--secondary-bg);
    color: var(--text-primary);
}

/* Grille de vaisseaux */
.ships-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Par défaut 4 colonnes */
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Configurations de colonnes */
.ships-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.ships-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.ships-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.ships-grid.cols-5 {
    grid-template-columns: repeat(5, 1fr);
}

.ships-grid.cols-6 {
    grid-template-columns: repeat(6, 1fr);
}

.ship-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
}

.ship-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-gold), var(--accent-orange));
    transform: scaleX(0);
    transition: transform 0.3s ease;
    z-index: 1;
}

.ship-card:hover::before {
    transform: scaleX(1);
}

.ship-card:hover {
    transform: translateY(-4px);
    border-color: rgba(244, 162, 97, 0.5);
    box-shadow: 0 8px 28px rgba(244, 162, 97, 0.18);
    background: var(--hover-bg);
}

.ship-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--secondary-bg), var(--hover-bg));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.ship-card-image::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 40%;
    background: linear-gradient(to top, var(--card-bg), transparent);
    pointer-events: none;
}

.ship-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.ship-card:hover .ship-card-image img {
    transform: scale(1.06);
}

.no-image-placeholder {
    font-size: 4rem;
    opacity: 0.3;
}

.ship-badges {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
}

.badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.badge-ready {
    background: var(--accent-blue);
    color: var(--text-primary);
}

.badge-matrix {
    background: var(--accent-gold);
    color: var(--primary-bg);
    font-weight: 600;
}

.badge-concept {
    background: rgba(160, 100, 240, 0.85);
    color: #fff;
    font-weight: 600;
}

.concept-note {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.4);
    font-style: italic;
    padding: 0.25rem 0;
    display: block;
    text-align: center;
}

.ship-card-action {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #00d4ff;
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ship-card:hover .ship-card-action {
    opacity: 1;
}

.ship-card-content {
    padding: 1rem 1.1rem 1.1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ship-manufacturer {
    color: var(--accent-gold);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.ship-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.ship-role-career {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 0.75rem;
}

.ship-role-career .career {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    background: rgba(244, 162, 97, 0.15);
    border: 1px solid var(--accent-gold);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--accent-gold);
    font-weight: 500;
}

.ship-role-career .role {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    background: rgba(42, 157, 143, 0.15);
    border: 1px solid var(--accent-blue);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--accent-blue);
    font-weight: 500;
}

.ship-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 0.95rem;
    color: var(--accent-gold);
    font-weight: 600;
}

/* Ship Pricing */
.ship-price {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.price-eur {
    font-size: 0.88rem;
    color: var(--accent-gold);
    font-weight: 700;
}

.price-auec {
    font-size: 0.82rem;
    color: var(--accent-cyan);
    font-weight: 600;
    opacity: 0.85;
}

.stat-label {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ship-spec-value {
    font-size: 1rem;
    font-weight: 600;
    color: #00ff88;
    margin-top: 0.25rem;
}

/* Loading state */
.loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--shadow-light);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading p {
    margin-top: 1rem;
    color: var(--text-secondary);
}

/* Empty state */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.error-state {
    background: rgba(255, 0, 0, 0.05);
    border: 1px solid rgba(255, 0, 0, 0.2);
    border-radius: 10px;
}

.retry-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-orange));
    border: none;
    border-radius: 8px;
    color: var(--primary-bg);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--shadow-medium);
}

/* Responsive */
@media (max-width: 768px) {
    .ships-filters {
        grid-template-columns: 1fr;
    }
    
    .ships-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
}
