/* MyBox Pro Quote Builder V2 - Dark Theme */

:root {
    --color-bg: #0f1419;
    --color-surface: #1a1f26;
    --color-surface-hover: #242a33;
    --color-border: #2d333b;
    --color-border-light: #373e47;
    --color-text: #e6edf3;
    --color-text-muted: #8b949e;
    --color-primary: #58a6ff;
    --color-primary-hover: #79b8ff;
    --color-primary-muted: #388bfd33;
    --color-success: #3fb950;
    --color-success-muted: #23863533;
    --color-warning: #d29922;
    --color-danger: #f85149;
    --color-danger-muted: #f8514933;
    --color-brouillon: #6e7681;
    --color-envoye: #58a6ff;
    --color-accepte: #3fb950;
    --color-refuse: #f85149;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow: 0 2px 8px 0 rgb(0 0 0 / 0.4);
    --shadow-md: 0 4px 16px 0 rgb(0 0 0 / 0.5);
    --radius: 8px;
    --radius-sm: 6px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-text);
    background: var(--color-bg);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--color-text);
}

.header-right {
    display: flex;
    gap: 12px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-primary {
    background: var(--color-primary);
    color: #0d1117;
}

.btn-primary:hover {
    background: var(--color-primary-hover);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
}

.btn-ghost:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
    border-color: var(--color-border-light);
}

.btn-danger {
    background: var(--color-danger);
    color: white;
}

.btn-danger:hover {
    background: #da3633;
}

.btn-success {
    background: var(--color-success);
    color: #0d1117;
}

.btn-success:hover {
    background: #2ea043;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-icon:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.btn-icon-danger:hover {
    background: var(--color-danger-muted);
    color: var(--color-danger);
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--color-surface);
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--color-text-muted);
}

.stat-status {
    grid-column: span 1;
}

.status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--color-text-muted);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    color: white;
}

.badge-brouillon { background: var(--color-brouillon); }
.badge-envoye { background: var(--color-envoye); color: #0d1117; }
.badge-accepte { background: var(--color-accepte); color: #0d1117; }
.badge-refuse { background: var(--color-refuse); }

/* Filters */
.filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 16px;
}

.search-box {
    flex: 1;
    max-width: 400px;
}

.search-box input {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    transition: border-color 0.15s ease;
}

.search-box input::placeholder {
    color: var(--color-text-muted);
}

.search-box input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-muted);
}

.filter-buttons {
    display: flex;
    gap: 8px;
}

.filter-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.filter-btn:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.filter-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #0d1117;
}

/* Table */
.quotes-list {
    background: var(--color-surface);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    overflow: hidden;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

.table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover {
    background: var(--color-surface-hover);
}

.id-cell {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 12px;
    color: var(--color-primary);
}

.client-name {
    font-weight: 500;
}

.client-company {
    font-size: 12px;
    color: var(--color-text-muted);
}

.date-cell {
    font-size: 13px;
    color: var(--color-text-muted);
}

.config-cell {
    font-size: 12px;
    color: var(--color-text-muted);
}

.price-cell {
    font-weight: 600;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    color: var(--color-success);
}

.actions-cell {
    display: flex;
    gap: 4px;
}

.loading-row td,
.error-cell {
    text-align: center;
    color: var(--color-text-muted);
    padding: 40px !important;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state p {
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--color-surface);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    max-width: 400px;
    width: 90%;
}

.modal-content h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.modal-content p {
    color: var(--color-text-muted);
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 20px;
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: 14px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    animation: slideIn 0.3s ease;
}

.toast.success {
    background: var(--color-success-muted);
    border-color: var(--color-success);
    color: var(--color-success);
}

.toast.error {
    background: var(--color-danger-muted);
    border-color: var(--color-danger);
    color: var(--color-danger);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Form */
.page-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
}

.form-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 24px;
    align-items: start;
}

.form-card {
    background: var(--color-surface);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    margin-bottom: 16px;
}

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

.form-card h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
}

.form-group {
    margin-bottom: 16px;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--color-text);
}

.form-group label .required {
    color: var(--color-danger);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    transition: border-color 0.15s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--color-text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-muted);
}

.form-group select {
    cursor: pointer;
}

.form-group select option {
    background: var(--color-surface);
    color: var(--color-text);
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

.form-check span {
    font-size: 14px;
}

/* Option quantity */
.option-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.option-row:last-child {
    margin-bottom: 0;
}

.option-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
}

/* Inputs dans les éditeurs de composants (tarifs) */
.option-row input[type="text"],
.option-row input[type="number"] {
    padding: 10px 12px;
    font-size: 14px;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    transition: border-color 0.15s ease;
}

.option-row input[type="text"]:focus,
.option-row input[type="number"]:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-muted);
}

.option-row input[type="text"]::placeholder {
    color: var(--color-text-muted);
}

.option-row select {
    padding: 10px 12px;
    font-size: 14px;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.option-row select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-muted);
}

.option-row select option {
    background: var(--color-surface);
    color: var(--color-text);
}

.option-name {
    flex: 1;
    font-size: 14px;
}

.option-qty {
    display: flex;
    align-items: center;
    gap: 6px;
}

.option-qty input {
    width: 60px;
    text-align: center;
}

.option-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-muted);
    min-width: 80px;
    text-align: right;
}

/* Récapitulatif */
.recap-card {
    position: sticky;
    top: 24px;
    background: linear-gradient(145deg, var(--color-surface), #1e252e);
}

.recap-line {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

.recap-line.small {
    font-size: 13px;
    color: var(--color-text-muted);
    padding: 4px 0;
}

.recap-line.total {
    font-size: 18px;
    font-weight: 700;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 2px solid var(--color-primary);
    color: var(--color-success);
}

.recap-value {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
}

.recap-actions {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recap-actions .btn {
    width: 100%;
}

/* Tarifs page */
.tarifs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.tarif-card {
    background: var(--color-surface);
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    margin-bottom: 16px;
    transition: border-color 0.15s ease;
}

.tarif-card:hover {
    border-color: var(--color-border-light);
}

.tarif-card.current {
    border-color: var(--color-primary);
    border-width: 2px;
    background: linear-gradient(145deg, var(--color-surface), rgba(88, 166, 255, 0.05));
}

.tarif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tarif-version {
    font-size: 16px;
    font-weight: 600;
}

.tarif-date {
    font-size: 13px;
    color: var(--color-text-muted);
}

.tarif-info {
    display: flex;
    gap: 24px;
    color: var(--color-text-muted);
    font-size: 13px;
}

.tarif-actions {
    display: flex;
    gap: 8px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-border-light);
}

/* Utility */
.text-muted { color: var(--color-text-muted); }
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }
.text-right { text-align: right; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }

/* Responsive */
@media (max-width: 1024px) {
    .form-layout {
        grid-template-columns: 1fr;
    }

    .recap-card {
        position: static;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 16px;
    }

    .filters {
        flex-direction: column;
    }

    .search-box {
        max-width: none;
        width: 100%;
    }

    .filter-buttons {
        flex-wrap: wrap;
        width: 100%;
    }

    .filter-btn {
        flex: 1;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .table {
        font-size: 13px;
    }

    .actions-cell {
        flex-wrap: wrap;
    }
}

/* ============================================================
   OctoDrop — mise en page centrée (09/09/2026, façon SwissTransfer)
   Une seule colonne de 560 px au centre de l'écran, une carte qui porte
   tout le parcours : dépôt → options → envoi → liens. Tokens du thème V2,
   mouvements courts (≤ 250 ms), tout tient sans défilement sur un écran.
   ============================================================ */
.od-body {
    min-height: 100vh;
    background:
        radial-gradient(900px 520px at 50% -12%, rgba(88, 166, 255, 0.16), transparent 62%),
        radial-gradient(700px 420px at 100% 105%, rgba(63, 185, 80, 0.07), transparent 60%),
        var(--color-bg);
}

.od-stage {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 20px 36px;
}

.od-top {
    width: 100%;
    max-width: 560px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.od-brand {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-text);
    text-decoration: none;
}
.od-brand span { color: var(--color-primary); }

.od-main {
    width: 100%;
    max-width: 560px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    padding: 28px 0;
}

.od-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    padding: 28px;
    animation: odIn .22s ease both;
    transition: border-color .15s ease;
}
.od-card.dragover { border-color: var(--color-primary); }

@keyframes odIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes odPop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes odSlide { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* Dépôt */
.dropzone {
    border: 2px dashed var(--color-border-light);
    border-radius: 12px;
    padding: 40px 20px 34px;
    text-align: center;
    cursor: pointer;
    outline: none;
    transition: border-color .15s ease, background .15s ease, padding .2s ease;
}
.dropzone:hover,
.dropzone:focus-visible,
.dropzone.dragover {
    border-color: var(--color-primary);
    background: var(--color-primary-muted);
}
.dz-plus {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #0d1117;
    box-shadow: 0 10px 28px rgba(88, 166, 255, 0.35);
    transition: transform .18s ease, box-shadow .18s ease, width .2s ease, height .2s ease, margin .2s ease;
}
.dz-plus svg {
    display: block;
    width: 34px;
    height: 34px;
    transition: transform .2s ease, width .2s ease, height .2s ease;
}
.dropzone:hover .dz-plus,
.dropzone.dragover .dz-plus {
    transform: scale(1.08);
    box-shadow: 0 14px 32px rgba(88, 166, 255, 0.45);
}
.dropzone:hover .dz-plus svg,
.dropzone.dragover .dz-plus svg { transform: rotate(90deg); }
/* « Gloup » : le bouton avale le fichier qu'on vient d'ajouter */
.dz-plus.gulp { animation: odGulp .34s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes odGulp {
    0% { transform: scale(1); }
    35% { transform: scale(.86); }
    70% { transform: scale(1.14); }
    100% { transform: scale(1); }
}
.dz-text { min-width: 0; }
.dz-title { font-size: 18px; font-weight: 600; color: var(--color-text); }
.dz-hint { color: var(--color-text-muted); font-size: 13px; margin-top: 6px; }
.dz-link { color: var(--color-primary); text-decoration: underline; text-underline-offset: 2px; }
.dz-sub { color: var(--color-text-muted); font-size: 12px; margin-top: 14px; }
.od-form.busy .dropzone { pointer-events: none; opacity: .55; }

/* Dès qu'un fichier est dans la liste, la zone se replie en bandeau (deux fois moins haute) */
.dropzone.compact {
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    padding: 14px 18px;
}
.dropzone.compact .dz-plus { width: 40px; height: 40px; margin: 0; box-shadow: 0 6px 16px rgba(88, 166, 255, 0.3); }
.dropzone.compact .dz-plus svg { width: 20px; height: 20px; }
.dropzone.compact .dz-title { font-size: 14px; }
.dropzone.compact .dz-hint { margin-top: 2px; font-size: 12px; }
.dropzone.compact .dz-sub { display: none; }

/* Fichiers sélectionnés */
.od-files {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 16px;
    max-height: 232px;
    overflow: auto;
    padding-right: 2px;
}
.od-files:empty { display: none; }
.sf-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 13px;
}
/* Nouveau fichier : il tombe dans la liste avec un petit rebond et une lueur qui s'éteint */
.sf-row.sf-new { animation: odDropIn .3s cubic-bezier(.2, .8, .3, 1.15) both, odFlash .9s ease-out both; }
@keyframes odDropIn {
    0% { opacity: 0; transform: translateY(-14px) scale(.96); }
    60% { opacity: 1; transform: translateY(3px) scale(1.01); }
    100% { opacity: 1; transform: none; }
}
@keyframes odFlash {
    0% { background: var(--color-primary-muted); border-color: var(--color-primary); }
    100% { background: var(--color-bg); border-color: var(--color-border); }
}
.sf-ic { font-size: 16px; flex: none; }
.sf-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--color-text);
}
.sf-size { color: var(--color-text-muted); white-space: nowrap; }
.sf-remove {
    border: none;
    background: none;
    cursor: pointer;
    color: var(--color-text-muted);
    font-size: 18px;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color .15s ease, background .15s ease;
}
.sf-remove:hover { color: var(--color-danger); background: var(--color-danger-muted); }
.od-form.busy .sf-remove { visibility: hidden; }

/* Options + envoi */
.od-options { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--color-border); }
.od-options[hidden] { display: none; }
.od-summary {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 14px;
}
.od-summary strong { color: var(--color-text); font-weight: 600; }
.od-summary.over,
.od-summary.over strong { color: var(--color-danger); }
.od-opt-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.od-field { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--color-text-muted); }
.od-field select {
    appearance: none;
    -webkit-appearance: none;
    padding: 9px 34px 9px 12px;
    background: var(--color-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%238b949e' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 11px center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: 14px;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.od-field select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-muted);
}
.od-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
    color: var(--color-text-muted);
}
.od-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.od-toggle-track {
    position: relative;
    flex: none;
    width: 38px;
    height: 22px;
    border-radius: 999px;
    background: var(--color-border-light);
    transition: background .15s ease;
}
.od-toggle-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform .15s ease;
}
.od-toggle input:checked + .od-toggle-track { background: var(--color-warning); }
.od-toggle input:checked + .od-toggle-track::after { transform: translateX(16px); }
.od-toggle input:focus-visible + .od-toggle-track { box-shadow: 0 0 0 3px var(--color-primary-muted); }
.od-toggle input:checked ~ .od-toggle-label { color: var(--color-text); }
.od-cta { width: 100%; padding: 13px 20px; font-size: 15px; font-weight: 600; }
.od-cta:disabled { opacity: .55; cursor: not-allowed; }
.od-cta.btn-primary:disabled:hover { background: var(--color-primary); }

/* Progression */
.progress-wrap { display: none; margin-top: 14px; }
.progress-wrap.active { display: block; }
.progress-track { height: 8px; background: var(--color-bg); border-radius: 999px; overflow: hidden; }
.progress-fill {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-hover));
    transition: width .12s linear;
}
.progress-fill.indeterminate { width: 40%; animation: odSlide 1s ease-in-out infinite; }
.progress-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 8px;
}

/* Résultat */
.od-result { text-align: center; animation: odIn .22s ease both; }
.od-result-icon {
    width: 64px;
    height: 64px;
    margin: 4px auto 16px;
    border-radius: 50%;
    background: var(--color-success-muted);
    color: var(--color-success);
    font-size: 30px;
    line-height: 64px;
    animation: odPop .3s cubic-bezier(.2, .9, .3, 1.3) both;
}
.od-result-title { font-size: 20px; font-weight: 700; margin-bottom: 6px; color: var(--color-text); }
.od-result-name { font-size: 14px; color: var(--color-text); word-break: break-word; }
.od-result-meta { color: var(--color-text-muted); font-size: 13px; margin: 4px 0 22px; }
.od-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(210, 153, 34, .16);
    color: var(--color-warning);
    vertical-align: 1px;
}
.od-links { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.od-link {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 12px 14px;
}
.od-link-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; color: var(--color-text-muted); }
.link-tag {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    padding: 3px 7px;
    border-radius: 4px;
    white-space: nowrap;
}
.link-tag.page { background: var(--color-primary-muted); color: var(--color-primary); }
.link-tag.direct { background: var(--color-success-muted); color: var(--color-success); }
.od-link-row { display: flex; gap: 8px; }
.link-input {
    flex: 1;
    min-width: 0;
    padding: 9px 10px;
    font-size: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
}
.link-input:focus { outline: none; border-color: var(--color-primary); }
.copy-btn { padding: 8px 14px; font-size: 13px; white-space: nowrap; min-width: 92px; }
.copy-btn.done,
.od-copy.done { background: var(--color-success); color: #0d1117; border-color: var(--color-success); }
.od-result-note { font-size: 12px; color: var(--color-warning); margin: 16px 0 18px; }

/* Partages précédents (mémoire de cette page seulement) */
.od-history { animation: odIn .22s ease both; }
.od-history[hidden] { display: none; }
.od-history-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--color-text-muted);
    margin: 0 4px 10px;
}
.od-hist-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin-bottom: 8px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    font-size: 13px;
    animation: odIn .18s ease both;
}
.od-hist-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--color-text);
}
.od-hist-meta { color: var(--color-text-muted); font-size: 12px; white-space: nowrap; }
.btn-sm { padding: 6px 10px; font-size: 12px; }
.od-copy { min-width: 64px; }

.od-foot {
    max-width: 560px;
    font-size: 12px;
    color: var(--color-text-muted);
    text-align: center;
    line-height: 1.6;
}

/* Toasts (bas droite) */
.toast-zone {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 100;
}
.od-toast {
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    border-left: 3px solid var(--color-primary);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 13px;
    box-shadow: var(--shadow-md);
    min-width: 220px;
    max-width: 360px;
    animation: odIn .2s ease;
    transition: opacity .25s ease;
}
.od-toast.success { border-left-color: var(--color-success); }
.od-toast.error { border-left-color: var(--color-danger); }

/* Même fond et mêmes arrondis sur la connexion et la page de téléchargement */
.od-body .login-card,
.od-body .dl-card { border-radius: 16px; }

@media (max-width: 600px) {
    .od-stage { padding: 18px 14px 26px; }
    .od-main { padding: 20px 0; }
    .od-card { padding: 20px; border-radius: 14px; }
    .dropzone { padding: 30px 14px 26px; }
    .od-link-row { flex-direction: column; }
    .copy-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .od-card, .od-result, .od-result-icon, .sf-row, .od-history, .od-hist-row, .od-toast,
    .progress-fill.indeterminate, .sf-row.sf-new, .dz-plus.gulp { animation: none; }
}
