/*
 * commande-irp.css – Styles pour le formulaire de commande groupée (tableau unifié)
 * Préfixe des classes : irp-cmd-
 */

/* ── Lignes existantes : inputs transparents, style "texte" au repos ─────── */
.irp-cmd-existing-row td input {
    width: 100%;
    box-sizing: border-box;
    padding: 2px 5px;
    border: 1px solid transparent;
    background: transparent;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.irp-cmd-existing-row:hover td input {
    border-color: #ddd;
    background-color: #fff;
}

.irp-cmd-existing-row td input:focus {
    border-color: #108fd1;
    background-color: #f0f8ff;
    outline: none;
}

/* ── Nouvelles lignes : style champ de saisie classique ─────────────────── */
.irp-cmd-row td input {
    width: 100%;
    box-sizing: border-box;
    padding: 2px 5px;
    border: 1px solid #ccc;
}

.irp-cmd-row td input:focus {
    outline: none;
    border-color: #108fd1;
    background-color: #f0f8ff;
}

.irp-cmd-row td input::placeholder {
    color: #bbb;
    font-style: italic;
}

/* ── Hover sur les lignes ────────────────────────────────────────────────── */
.irp-cmd-existing-row:hover,
.irp-cmd-row:hover {
    background-color: rgba(16, 143, 209, 0.04);
}

/* ── Animations (opacity uniquement, les transform posent problème sur <tr>) */
@keyframes irpCmdFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes irpCmdFadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

.irp-cmd-appear {
    animation: irpCmdFadeIn 0.22s ease both;
}

.irp-cmd-remove {
    animation: irpCmdFadeOut 0.18s ease both;
    pointer-events: none;
}

/* ── Cellule total de ligne ──────────────────────────────────────────────── */
.irp-cmd-cell-total {
    text-align: center;
    font-weight: bold;
    white-space: nowrap;
}

.irp-cmd-line-total {
    display: block;
    text-align: center;
    color: #333;
    font-size: 14px;
}

/* ── Cellule icône de suppression ────────────────────────────────────────── */
.irp-cmd-cell-del {
    width: 36px;
    text-align: center;
    white-space: nowrap;
}

/* ── Bouton Envoyer ──────────────────────────────────────────────────────── */
#formpasc .submit {
    margin-top: 24px;
}

/* ── Liens de suppression ────────────────────────────────────────────────── */
.irp-cmd-del,
.irp-cmd-del-existing {
    display: inline-flex;
    align-items: center;
    opacity: 0.3;
    transition: opacity 0.15s ease;
    border-bottom: none !important;
}

.irp-cmd-del:hover,
.irp-cmd-del-existing:hover {
    opacity: 1;
    border-bottom: none !important;
}
