/**
 * =====================================================
 * GESTION DES CRÉATIONS - STYLES
 * Utilise les variables globales de gbl_styles.css
 * =====================================================
 */

/* ===========================================
   LAYOUT PRINCIPAL
   =========================================== */

.gestion-content {
    padding-top: 120px;
    padding-bottom: 60px;
}

.section-gestion {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ===========================================
   TITRE ET SÉPARATEURS
   =========================================== */

.gestion-titre {
    font-size: var(--ht-texte-19);
    font-weight: var(--wg-texte-semibold);
    font-family:"Intertight", sans-serif;
    text-transform: uppercase;
    color: var(--cl-texte-i1);
    margin-bottom: 24px;
    text-align: center;
}

.separator {
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--cl-transparent-noir-i6) 20%, 
        var(--cl-transparent-noir-i6) 80%, 
        transparent 100%
    );
    margin: 32px 0;
}

/* ===========================================
   CONTAINER OBJETS
   =========================================== */

.objects-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.loading-message,
.empty-message {
    text-align: center;
    color: var(--cl-texte-i3);
    font-style: italic;
    padding: 40px 20px;
}

/* ===========================================
   CATÉGORIE D'OBJETS
   =========================================== */

.object-category {
    background: var(--cl-blanc-i2);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--cl-transparent-noir-i6);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--cl-transparent-noir-i6);
}

.category-title {
    font-size: var(--ht-texte-115);
    font-weight: var(--wg-texte-semibold);
    color: var(--cl-texte-i1);
    margin: 0;
}

.category-count {
    font-size: var(--ht-texte-08);
    color: var(--cl-texte-i3);
    background: var(--cl-blanc-i3);
    padding: 4px 12px;
    border-radius: 20px;
}

/* ===========================================
   LISTE D'OBJETS
   =========================================== */

.objects-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.object-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--cl-blanc-i1);
    border-radius: 8px;
    border: 1px solid var(--cl-transparent-noir-i6);
    transition: all 0.2s ease;
}

.object-item:hover {
    border-color: var(--cl-button-blue-transparent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.object-item.marked-for-deletion {
    opacity: 0.5;
    background: rgba(220, 53, 69, 0.08);
    border-color: var(--cl-data-invalide);
}

.object-item.marked-for-deletion .object-name {
    text-decoration: line-through;
    color: var(--cl-texte-i3);
}

/* Checkbox non sélectionnable quand marqué pour suppression */
.object-item.marked-for-deletion .object-checkbox {
    pointer-events: none;
    opacity: 0.3;
}

.object-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.object-name {
    font-weight: var(--wg-texte-medium);
    color: var(--cl-texte-i1);
}

.object-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

/* ===========================================
   BOUTON SUPPRESSION ICÔNE
   =========================================== */

.btn-delete-item {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: var(--cl-texte-i3);
}

.btn-delete-item:hover {
    background: rgba(220, 53, 69, 0.1);
    color: var(--cl-data-invalide);
}

.btn-delete-item svg {
    width: 18px;
    height: 18px;
}

/* ===========================================
   CHECKBOX PERSONNALISÉE
   =========================================== */

.object-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--cl-button-blue);
    flex-shrink: 0;
}

/* ===========================================
   ACTIONS GLOBALES
   =========================================== */

.gestion-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
}

#btn-supprimer-selection:disabled,
#btn-suppression-globale:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===========================================
   HEADER GESTION SPÉCIFIQUE
   =========================================== */

.sgbl-header-gestion .nav-right {
    display: flex;
    gap: 8px;
}

.sgbl-header-gestion .nav-right .nav-button-container h3 {
    font-size: var(--ht-texte-07);
    opacity: 0.7;
}

#btn-sauvegarder:disabled,
#btn-annuler-suppressions:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#compte-associe {
    font-weight: var(--wg-texte-regular);
    font-size: var(--ht-texte-09);
    opacity: 0.8;
}

#username-display {
    font-weight: var(--wg-texte-semibold);
}

/* ===========================================
   RESPONSIVE
   =========================================== */

@media (max-width: 600px) {
    .section-gestion {
        padding: 20px 16px;
    }
    
    .gestion-titre {
        font-size: 1.4rem;
    }
    
    .object-item {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .object-info {
        width: 100%;
    }
    
    .object-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .gestion-actions {
        flex-direction: column;
    }
    
    .gestion-actions button {
        width: 100%;
    }
}
