/* --- CONTENEUR PRINCIPAL --- */
.clg-main-wrapper {
    width: 100% !important;
    display: block !important;
    clear: both !important;
    text-align: center !important;
    margin: 30px 0 !important;
}

.clg-form-card {
    display: inline-block !important;
    text-align: left !important;
    width: 95% !important;
    max-width: 650px !important; 
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    border: 1px solid #eee;
}

/* --- TEXTES --- */
.clg-card-title { color: #2c3e50; margin-bottom: 20px; text-align: center; font-weight: bold; }
.clg-intro-text { font-size: 0.95em; line-height: 1.6; color: #444; margin-bottom: 20px; }
.clg-notice-box {
    background: #fdf6e3;
    border-left: 5px solid #f1c40f;
    padding: 15px;
    font-size: 0.85em;
    color: #7d6608;
    margin-bottom: 25px;
}

/* --- FORMULAIRE D'AJOUT --- */
.clg-input-group {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 5px 10px;
    margin-bottom: 10px;
    background: #fff;
}
#choix_registre { border: none !important; flex: 1; padding: 8px; outline: none; }
#effacer_selection { cursor: pointer; opacity: 0.5; transition: 0.2s; }
#effacer_selection:hover { opacity: 1; }

#btn-add-item {
    width: 100%;
    padding: 12px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 25px;
    transition: 0.3s;
}
#btn-add-item:disabled { background: #dee2e6; color: #adb5bd; cursor: not-allowed; }

/* --- LA LISTE PRIORITAIRE --- */
#sortable-list {
    counter-reset: prio-counter; /* Initialise le compteur */
    list-style: none !important;
    padding: 0 !important;
    margin: 0 auto 30px auto !important;
    max-width: 100% !important;
}

.item {
    counter-increment: prio-counter; /* Incrémente à chaque ligne */
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border: 1px solid #eaeaea;
    margin-bottom: 10px;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: grab;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.item:hover { border-color: #3498db; background-color: #f0f7ff; }

/* Le numéro automatique #1, #2... */
.prio-number::before {
    content: "#" counter(prio-counter);
    background: #3498db;
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
    margin-right: 12px;
}

.item-content { display: flex; align-items: center; flex: 1; }
.handle { color: #ccc; margin-right: 12px; font-size: 1.2em; }

.item.dragging {
    opacity: 0.5;
    background: #e0e0e0;
    border: 2px dashed #3498db;
    cursor: grabbing;
}

/* BOUTONS ACTIONS */
.btn-remove {
    background: #ff4d4d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 5px 12px;
    font-weight: bold;
    font-size: 1.1em;
}
.btn-remove:hover { background: #cc0000; }

.clg-footer-action { text-align: center; border-top: 1px solid #eee; padding-top: 25px; }
#btn-save {
    background: #27ae60;
    color: white;
    border: none;
    padding: 15px 50px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1.1em;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}
#btn-save:hover { background: #219150; transform: translateY(-1px); }

.text-container {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.cote-label {
    font-weight: 500;
    margin-bottom: 5px;
}

.clg-comment-input {
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.85em;
    color: #666;
    background: #fcfcfc;
    width: 90%;
}

.clg-comment-input:focus {
    border-color: #3498db;
    outline: none;
    background: #fff;
}
#btn-add-item:disabled {
    cursor: not-allowed; /* Change le curseur en signe "interdit" */
    opacity: 0.5;
}
