/* ============================================================
   upload_progress.css — Upload progress · mmpb-cloud · Paulo
   ============================================================ */

.card-theme {
    background: var(--c-surface) !important;
    border: 1px solid var(--c-border) !important;
    color: var(--c-text) !important;
}
.card-header-theme {
    background: var(--c-surface-2) !important;
    border-bottom: 1px solid var(--c-border) !important;
    color: var(--c-text) !important;
}
.text-theme-muted { color: var(--c-muted) !important; }

/* --- Zone de dépôt --- */
.upload-drop-zone {
    border: 1.5px dashed #3b82f6;
    border-radius: 12px;
    padding: 1.8rem 1rem;
    text-align: center;
    cursor: pointer;
    background: rgba(59,130,246,0.04);
    transition: background 0.2s, border-color 0.2s;
    position: relative;
    overflow: hidden;
}
.upload-drop-zone:hover,
.upload-drop-zone.drag-over {
    background: rgba(59,130,246,0.10);
    border-color: #1d4ed8;
}
.upload-drop-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    z-index: 2;
}
.upload-drop-zone .dz-icon {
    font-size: 2.4rem;
    color: #3b82f6;
    display: block;
    margin-bottom: .5rem;
    transition: transform 0.25s cubic-bezier(.34,1.56,.64,1);
}
.upload-drop-zone:hover .dz-icon {
    transform: translateY(-6px);
}
.upload-drop-zone .dz-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--c-text, #111827);
    margin-bottom: 3px;
}
.upload-drop-zone .dz-sub {
    font-size: 0.78rem;
    color: var(--c-muted, #6b7280);
}
.dz-formats {
    display: inline-flex;
    gap: 5px;
    margin-top: .5rem;
    flex-wrap: wrap;
    justify-content: center;
}
.dz-formats code {
    background: rgba(59,130,246,0.10);
    color: #1d4ed8;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
}

/* --- Badge fichier sélectionné --- */
.upload-file-badge {
    display: none;
    align-items: center;
    gap: 8px;
    background: rgba(59,130,246,0.08);
    border: 0.5px solid rgba(59,130,246,0.25);
    border-radius: 8px;
    padding: 6px 10px;
    margin: .6rem 0 .2rem;
    animation: fadeIn .3s ease both;
}
.upload-file-badge i {
    color: #3b82f6;
    font-size: 1rem;
    flex-shrink: 0;
}
.upload-file-badge .ufb-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: #1d4ed8;
    flex: 1;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.upload-file-badge .ufb-size {
    font-size: 0.73rem;
    color: var(--c-muted, #6b7280);
    white-space: nowrap;
}

/* --- Bouton submit --- */
#submitBtn {
    font-weight: 600;
    border-radius: 10px;
    letter-spacing: .02em;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}
#submitBtn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(37,99,235,0.35);
}
#submitBtn:active { transform: scale(0.98); }
#submitBtn:disabled { opacity: .72; cursor: not-allowed; transform: none !important; }

/* --- Bloc de progression (caché par défaut) --- */
.progress-container {
    display: none;
    margin-top: 1rem;
    padding: .9rem 1rem;
    background: rgba(59,130,246,0.06);
    border: 0.5px solid rgba(59,130,246,0.2);
    border-radius: 12px;
    text-align: left;
    animation: slideUp .35s cubic-bezier(.22,1,.36,1) both;
}

/* --- Méta (%, taille, vitesse) --- */
.progress-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: .5rem;
    flex-wrap: wrap;
}
.progress-percent {
    font-size: 0.85rem;
    font-weight: 700;
    color: #2563eb;
    min-width: 38px;
    font-variant-numeric: tabular-nums;
}
.progress-size {
    font-size: 0.77rem;
    color: var(--c-muted, #6b7280);
    font-variant-numeric: tabular-nums;
    flex: 1;
}
.progress-speed {
    font-size: 0.72rem;
    font-weight: 600;
    color: #2563eb;
    background: rgba(59,130,246,0.12);
    padding: 2px 8px;
    border-radius: 99px;
    white-space: nowrap;
    transition: opacity .3s;
}

/* --- Piste --- */
.custom-progress {
    height: 10px;
    background: rgba(59,130,246,0.10);
    border-radius: 99px;
    overflow: hidden;
    position: relative;
}

/* --- Barre bleue animée --- */
.custom-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #1d4ed8, #3b82f6, #60a5fa);
    background-size: 300% 100%;
    border-radius: 99px;
    transition: width .3s cubic-bezier(.4,0,.2,1);
    position: relative;
    overflow: hidden;
    animation: barShift 2s linear infinite;
}
.custom-progress-bar::after {
    content: "";
    position: absolute;
    top: 0; left: -60%;
    width: 40%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.52), transparent);
    animation: shimmer 1.8s ease-in-out infinite;
}

/* --- États finaux --- */
.progress-bar-success {
    background: linear-gradient(90deg, #15803d, #22c55e) !important;
    animation: none !important;
}
.progress-bar-success::after { animation: none !important; }

.progress-bar-error {
    background: linear-gradient(90deg, #b91c1c, #ef4444) !important;
    animation: none !important;
}
.progress-bar-error::after { animation: none !important; }

/* --- Message statut --- */
.upload-status {
    font-size: 0.78rem;
    min-height: 1.4rem;
    margin-top: .45rem;
    text-align: center;
    transition: color .25s;
}
.status-info    { color: var(--c-muted, #6b7280); }
.status-success { color: #15803d; font-weight: 700; }
.status-error   { color: #b91c1c; font-weight: 700; }

/* --- Keyframes --- */
@keyframes barShift {
    0%   { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}
@keyframes shimmer {
    100% { left: 160%; }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
