*{box-sizing:border-box;margin:0;padding:0}
body{
    font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
    background:#f4f4f2;color:#1a1a1a;min-height:100vh;
    display:flex;flex-direction:column;align-items:center;
    justify-content:center;padding:1.5rem;gap:1rem;
}
.card{
    background:#fff;border:1px solid #e0ddd8;border-radius:14px;
    padding:0;width:100%;max-width:560px;
    box-shadow:0 4px 24px rgba(0,0,0,.07);overflow:hidden;
}
.card-header{
    background:#fff;padding:1.5rem 2rem 1.25rem;
    border-bottom:2px solid #8B1523;text-align:center;
}
.card-header img{height:44px;width:auto}
.card-header .tagline{font-size:.75rem;color:#888;margin-top:.35rem;letter-spacing:.5px;text-transform:uppercase}
.card-body{padding:1.75rem 2rem}
h1{font-size:1.15rem;color:#8B1523;font-weight:600;margin-bottom:.25rem}
.subtitle{color:#6b7280;font-size:.82rem;margin-bottom:1.5rem}
label{display:block;font-size:.8rem;color:#374151;margin-bottom:.35rem;font-weight:500}
input[type=text],input[type=password],input[type=date],input[type=number],textarea,select{
    width:100%;background:#fafafa;border:1px solid #d1d5db;border-radius:8px;
    color:#111827;padding:.6rem .8rem;font-size:.9rem;outline:none;
    transition:border-color .2s,box-shadow .2s;font-family:inherit;
}
input:focus,textarea:focus,select:focus{
    border-color:#8B1523;box-shadow:0 0 0 3px rgba(139,21,35,.1);background:#fff;
}
textarea{min-height:120px;resize:vertical}
input[type=file]{
    background:#fafafa;border:2px dashed #d1d5db;border-radius:8px;
    padding:1.25rem;width:100%;color:#6b7280;cursor:pointer;font-size:.85rem;
}
input[type=file]:hover{border-color:#8B1523;color:#8B1523}
.field{margin-bottom:1.1rem}
.row{display:flex;gap:1rem}
.row .field{flex:1}
.tabs{display:flex;gap:.5rem;margin-bottom:1.4rem}
.tab{
    flex:1;padding:.55rem .25rem;text-align:center;
    border:1.5px solid #e0ddd8;border-radius:8px;cursor:pointer;
    font-size:.8rem;color:#6b7280;transition:all .2s;user-select:none;background:#fafafa;
}
.tab:hover{border-color:#8B1523;color:#8B1523}
.tab.active{background:#8B1523;border-color:#8B1523;color:#fff;font-weight:500}
.tab .icon{font-size:1.1rem;display:block;margin-bottom:.2rem}
.btn{
    display:block;width:100%;background:#8B1523;color:#fff;border:none;
    border-radius:8px;padding:.75rem;font-size:.9rem;font-weight:600;
    cursor:pointer;transition:background .2s;text-align:center;text-decoration:none;
    letter-spacing:.2px;
}
.btn:hover{background:#6e101b}
.btn-sec{background:#f3f4f6;color:#374151;border:1px solid #d1d5db}
.btn-sec:hover{background:#e5e7eb;color:#111}
.btn-green{background:#16a34a}.btn-green:hover{background:#15803d}
.sep{border:0;border-top:1px solid #f0ede8;margin:1.25rem 0}
.alert{border-radius:8px;padding:.75rem 1rem;font-size:.85rem;margin-bottom:1rem;line-height:1.5}
.alert-warn{background:#fffbeb;border:1px solid #f59e0b;color:#92400e}
.alert-ok{background:#f0fdf4;border:1px solid #86efac;color:#166534}
.alert-err{background:#fef2f2;border:1px solid #fca5a5;color:#991b1b}
.alert-info{background:#eff6ff;border:1px solid #bfdbfe;color:#1e40af}
.result-row{
    background:#fafafa;border:1px solid #e5e7eb;border-radius:8px;
    padding:.7rem 1rem;margin-bottom:.6rem;display:flex;align-items:center;gap:.75rem;
}
.result-row label{margin:0;white-space:nowrap;font-size:.75rem;color:#9ca3af;min-width:90px}
.result-row span{flex:1;word-break:break-all;font-size:.875rem;font-family:monospace;color:#111827}
.copy-btn{
    background:#fff;border:1px solid #d1d5db;color:#6b7280;padding:.3rem .7rem;
    border-radius:6px;cursor:pointer;font-size:.75rem;white-space:nowrap;transition:all .2s;
}
.copy-btn:hover{background:#8B1523;color:#fff;border-color:#8B1523}
.result-row-col{flex-direction:column;align-items:flex-start;gap:.4rem}
.result-row-col label{margin:0}
.rv-wrap{width:100%}
.rv-link{
    display:block;font-family:monospace;font-size:.82rem;color:#8B1523;
    word-break:break-all;text-decoration:none;
}
.rv-link:hover{text-decoration:underline}
.rv-input{
    font-family:monospace;font-size:.875rem;color:#111827;background:#f9fafb;
    border:1px solid #e5e7eb;border-radius:6px;padding:.4rem .6rem;
    width:100%;cursor:text;
}
.content-pre{
    background:#fafafa;border:1px solid #e5e7eb;border-radius:8px;
    padding:1rem;white-space:pre-wrap;word-break:break-word;
    font-size:.875rem;max-height:350px;overflow-y:auto;line-height:1.7;
    margin-bottom:1rem;color:#111827;
}
.file-card{
    background:#fafafa;border:1px solid #e5e7eb;border-radius:8px;
    padding:1rem 1.25rem;display:flex;align-items:center;gap:1rem;margin-bottom:1rem;
}
.file-icon{font-size:2rem}
.file-name{font-weight:600;color:#111827;margin-bottom:.2rem}
.file-meta{font-size:.8rem;color:#6b7280}
.sftp-card{background:#fafafa;border:1px solid #e5e7eb;border-radius:8px;padding:1rem 1.25rem;margin-bottom:1rem}
.sftp-section-label{font-size:.75rem;font-weight:700;color:#8B1523;text-transform:uppercase;letter-spacing:.5px;margin-bottom:.6rem}
.sftp-row{display:flex;align-items:center;gap:.75rem;padding:.35rem 0;border-bottom:1px solid #f3f4f6}
.sftp-row:last-child{border-bottom:0}
.sftp-key{min-width:110px;font-size:.78rem;color:#6b7280;font-weight:500}
.sftp-val{font-family:monospace;font-size:.875rem;flex:1;word-break:break-all;color:#111827}
.badge{display:inline-block;background:#fee2e2;color:#991b1b;border-radius:20px;padding:.15rem .55rem;font-size:.72rem;margin-left:.4rem;font-weight:500}
.views-left{text-align:center;font-size:.8rem;color:#9ca3af;margin-top:.75rem}
.expiry-note{font-size:.75rem;color:#9ca3af;margin-top:.4rem;text-align:center}
.hidden{display:none}
.lock-info{display:flex;align-items:center;gap:.5rem;font-size:.78rem;color:#9ca3af;margin-bottom:1.25rem;justify-content:center}
.max-note{font-size:.75rem;color:#9ca3af;margin-top:.3rem}
.footer-bar{text-align:center;font-size:.75rem;color:#b0a89e;padding:.75rem}
@media(max-width:480px){
    .card-body{padding:1.25rem}
    .row{flex-direction:column;gap:0}
    .card-header{padding:1rem 1.25rem .75rem}
}
/* Calendrier natif stylisé */
input[type=date]::-webkit-calendar-picker-indicator{
    cursor:pointer;opacity:.6;filter:invert(15%) sepia(80%) saturate(500%) hue-rotate(330deg);
}
input[type=date]::-webkit-calendar-picker-indicator:hover{opacity:1}

/* Liste multi-fichiers SFTP */
.file-list-item { margin-bottom: 1.25rem; padding-bottom: 1.25rem; border-bottom: 1px solid #f0ede8; }
.file-list-item:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.file-list-item .file-card { margin-bottom: .5rem; }
.file-list-item .btn { padding: .55rem; font-size: .85rem; }
.file-name { word-break: break-all; }
