/**
 * Styles pour l'onglet Channel Manager
 * Inspiré du design fourni par l'utilisateur
 * Utilise la couleur principale du site: #F97C5A
 */

/* Container principal */
.channel-manager-container {
    font-family: 'Circular', -apple-system, BlinkMacSystemFont, Roboto, Helvetica Neue, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    position: relative;
}

/* Indicateur de chargement */
.channel-manager-container.loading:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 10;
}

.channel-manager-container.loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin-left: -20px;
    margin-top: -20px;
    border: 3px solid rgba(249, 124, 90, 0.3);
    border-radius: 50%;
    border-top-color: #F97C5A;
    animation: spin 1s ease-in-out infinite;
    z-index: 11;
}

/* Grille de cartes */
.channel-manager-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

/* Style des cartes */
.channel-card {
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 25px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e0e0;
}

.channel-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
    border-color: #d0d0d0;
}

/* En-tête de la carte */
.channel-card-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.channel-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: #F97C5A !important;
    font-size: 20px;
    border: 1px solid #eeeeee;
}

.channel-info {
    flex: 1;
}

.channel-name {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #333;
}

.channel-category {
    font-size: 14px;
    color: #777;
    margin-bottom: 5px;
}

.channel-premium {
    display: inline-block;
    background-color: #fff8fa;
    color: #F97C5A;
    font-size: 12px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
    border: 1px solid rgba(228, 30, 91, 0.2);
}

/* Description */
.channel-description {
    font-size: 14px;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.5;
    flex-grow: 1;
}

/* Fonctionnalités */
.channel-features {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.channel-feature {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #666;
    background-color: #f9f9f9;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid #eeeeee;
}

.channel-feature i {
    margin-right: 6px;
    color: #F97C5A;
    font-size: 12px;
}

/* Actions */
.channel-actions {
    margin-top: auto;
}

.channel-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 18px;
    background-color: #fff;
    color: #F97C5A;
    border: 1px solid #F97C5A;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(228, 30, 91, 0.05);
}

.channel-button:hover {
    background-color: rgba(228, 30, 91, 0.05);
    text-decoration: none;
}

.channel-button.explore {
    border: solid 1px #F97C5A;
    background-color: #F97C5A !important;
    color: white !important;
}

.channel-button.explore:hover {
    background-color: #F97C5A !important;
}

.channel-button.disconnect {
    background-color: #fff;
    color: #666;
    border-color: #ddd;
}

.channel-button.disconnect:hover {
    background-color: #f7f7f7;
}

.channel-button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.channel-button.loading {
    position: relative;
    color: transparent !important;
}

.channel-button.loading:after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Message quand aucun channel n'est disponible */
.channel-manager-empty {
    text-align: center;
    padding: 40px;
    background-color: #f9f9f9;
    border-radius: 8px;
    color: #666;
}

/* Modals de connexion */
.awayout-channel-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    overflow-y: auto;
    padding: 20px;
}

.awayout-channel-modal-content {
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    margin: 50px auto;
    position: relative;
    overflow: hidden;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.awayout-channel-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.awayout-channel-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.awayout-channel-modal-close {
    font-size: 24px;
    color: #999;
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
}

.awayout-channel-modal-close:hover {
    color: #F97C5A;
}

.awayout-channel-modal-body {
    padding: 25px;
}

.awayout-form-group {
    margin-bottom: 20px;
}

.awayout-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.awayout-form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 14px;
}

.awayout-form-group input:focus {
    border-color: #F97C5A;
    outline: none;
    box-shadow: 0 0 0 2px rgba(228, 30, 91, 0.2);
}

.awayout-form-group .form-help {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
    line-height: 1.5;
    background-color: #f9f9f9;
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid #F97C5A;
}

.form-help p {
    margin: 0 0 8px 0;
}

.form-help p:last-child {
    margin-bottom: 0;
}

.form-help ol, .form-help ul {
    margin: 8px 0;
    padding-left: 20px;
}

.form-help li {
    margin-bottom: 5px;
}

.form-help strong {
    color: #333;
}

.form-help em {
    color: #F97C5A;
    font-style: italic;
}

.awayout-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
}

.awayout-button {
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.awayout-button.cancel {
    background-color: #f5f5f5;
    color: #666;
}

.awayout-button.cancel:hover {
    background-color: #eee;
}

.awayout-button.submit {
    background-color: #F97C5A;
    color: white;
}

.awayout-button.submit:hover {
    background-color: #c91a4e;
}

/* Responsive */
@media (max-width: 768px) {
    .channel-manager-grid {
        grid-template-columns: 1fr;
    }
    
    .awayout-channel-modal-content {
        margin: 20px auto;
        max-width: 100%;
    }
}
