/**
 * MULTISTREAM GRID - Grille pour afficher plusieurs streams simultanément
 * 
 * @package L'Envol des Gamers
 * @version 1.0.0
 */

.multistream-container {
    display: grid;
    gap: 10px;
    width: 100%;
    height: 100%;
    background: #0e0e10;
    padding: 10px;
}

/* Grille 2 streams */
.multistream-container.grid-2 {
    grid-template-columns: 3fr 1fr; /* 75% principal / 25% secondaire */
    grid-template-rows: 1fr;
}

/* Grille 3 streams */
.multistream-container.grid-3 {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

.multistream-container.grid-3 .stream-item:first-child {
    grid-column: 1 / -1;
}

/* Grille 4 streams */
.multistream-container.grid-4 {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

/* Grille 5-6 streams */
.multistream-container.grid-5,
.multistream-container.grid-6 {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

/* Stream item */
.stream-item {
    position: relative;
    background: #18181b;
    border-radius: 4px;
    overflow: hidden;
    min-height: 200px;
}

.stream-item iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Stream info overlay */
.stream-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 10px;
    color: white;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s;
}

.stream-item:hover .stream-info {
    opacity: 1;
}

.stream-name {
    font-weight: bold;
    margin-bottom: 4px;
}

.stream-viewers {
    font-size: 12px;
    color: #adadb8;
}

/* Responsive */
@media (max-width: 1024px) {
    .multistream-container.grid-5,
    .multistream-container.grid-6 {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .multistream-container {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
    }
    
    .stream-item {
        min-height: 250px;
    }
}

/* Loading state */
.stream-item.loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.stream-item.loading::after {
    content: "Chargement...";
    color: #adadb8;
    font-size: 14px;
}

/* Error state */
.stream-item.error {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #18181b;
}

.stream-item.error::after {
    content: "Stream indisponible";
    color: #ef4444;
    font-size: 14px;
}
