/**
 * S-Cloud — Visual polish v2.2.66
 * Empty states illustrés + Space chip + Greeting card.
 */

/* ── Empty states (chaleureux, illustrés) ─────────────────────────────── */
.sc-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 56px 24px;
    border-radius: 12px;
    background: linear-gradient(180deg, #FAFAFB 0%, #F5F2FB 100%);
    border: 1px dashed #E1D4F0;
    min-height: 280px;
    animation: scEmptyFadeIn .35s cubic-bezier(.1,.9,.2,1);
}
.sc-empty-illu {
    margin-bottom: 18px;
    opacity: .95;
}
.sc-empty-illu svg {
    max-width: 100%;
    height: auto;
}
.sc-empty-title {
    margin: 0 0 8px 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: #242424;
}
.sc-empty-text {
    margin: 0 0 18px 0;
    color: #605E5C;
    font-size: .9rem;
    max-width: 420px;
    line-height: 1.5;
}
.sc-empty-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
@keyframes scEmptyFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Space chip (pastille couleur + nom de l'espace) ──────────────────── */
.sc-space-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px 2px 6px;
    border-radius: 999px;
    background: rgba(92, 45, 145, 0.06);
    color: #242424;
    font-size: .72rem;
    line-height: 1.3;
    text-decoration: none;
    transition: background-color 120ms ease;
    border: 1px solid transparent;
    max-width: 180px;
}
.sc-space-chip:hover {
    background: rgba(92, 45, 145, 0.12);
    color: #242424;
    text-decoration: none;
    border-color: rgba(92, 45, 145, 0.2);
}
.sc-space-chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(0,0,0,.05);
}
.sc-space-chip-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sc-space-chip--xs { font-size: .68rem; padding: 1px 6px 1px 5px; }
.sc-space-chip--xs .sc-space-chip-dot { width: 6px; height: 6px; }
.sc-space-chip--md { font-size: .82rem; padding: 4px 10px 4px 8px; }
.sc-space-chip--md .sc-space-chip-dot { width: 10px; height: 10px; }

/* ── Dashboard greeting card ─────────────────────────────────────────── */
.sc-greeting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    margin-bottom: 24px;
    border-radius: 12px;
    background: linear-gradient(135deg, #5C2D91 0%, #7A4183 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(92, 45, 145, .15);
    position: relative;
    overflow: hidden;
}
.sc-greeting::before {
    content: '';
    position: absolute;
    top: -40%; right: -10%;
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(255,255,255,.12) 0%, transparent 70%);
    pointer-events: none;
}
.sc-greeting-text { flex: 1; min-width: 0; z-index: 1; }
.sc-greeting-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.sc-greeting-emoji {
    font-size: 1.6rem;
    line-height: 1;
}
.sc-greeting-stats {
    margin: 0;
    font-size: .92rem;
    opacity: .94;
    line-height: 1.5;
}
.sc-greeting-stats strong { font-weight: 700; }
.sc-greeting-stats a {
    color: #fff;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
}
.sc-greeting-stats a:hover { color: #fff; text-decoration-style: solid; }
.sc-greeting-date {
    text-align: right;
    z-index: 1;
    font-size: .82rem;
    opacity: .9;
    white-space: nowrap;
}
.sc-greeting-date strong {
    display: block;
    font-size: 1.05rem;
    font-weight: 600;
    text-transform: capitalize;
}
@media (max-width: 640px) {
    .sc-greeting { flex-direction: column; align-items: flex-start; padding: 16px 18px; }
    .sc-greeting-date { text-align: left; margin-top: 4px; }
    .sc-greeting-title { font-size: 1.2rem; }
}

/* ── File thumbnail (vs icon) ─────────────────────────────────────────── */
.sc-file-thumb {
    display: block;
    object-fit: cover;
    border-radius: 6px;
    background: #F3F2F1;
    border: 1px solid #EDEBE9;
}

/* ── Hover preview popup (v2.2.67) ────────────────────────────────────── */
.sc-hover-preview {
    position: fixed;
    z-index: 10500;
    background: #fff;
    border: 1px solid #E1D4F0;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0,0,0,.15);
    padding: 10px;
    width: 280px;
    max-width: 90vw;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 160ms cubic-bezier(.1,.9,.2,1), transform 160ms cubic-bezier(.1,.9,.2,1);
    pointer-events: none;
}
.sc-hover-preview.is-visible { opacity: 1; transform: translateY(0); }
.sc-hp-thumb-img,
.sc-hp-thumb-ext {
    width: 96px;
    height: 96px;
    border-radius: 6px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    background-color: #F3EFFA;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5C2D91;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}
/* Couleurs MIME spécifiques */
.sc-hp-thumb-ext[data-ext="pdf"]  { background: #FFF2F0; color: #C5221F; }
.sc-hp-thumb-ext[data-ext="doc"],
.sc-hp-thumb-ext[data-ext="docx"] { background: #EBF3FE; color: #1A73E8; }
.sc-hp-thumb-ext[data-ext="xls"],
.sc-hp-thumb-ext[data-ext="xlsx"],
.sc-hp-thumb-ext[data-ext="csv"]  { background: #E6F4EA; color: #137333; }
.sc-hp-thumb-ext[data-ext="ppt"],
.sc-hp-thumb-ext[data-ext="pptx"] { background: #FEEFE5; color: #D93025; }
.sc-hp-thumb-ext[data-ext="zip"],
.sc-hp-thumb-ext[data-ext="rar"]  { background: #F4E5FC; color: #7B1FA2; }
.sc-hp-thumb-ext[data-ext="mp4"],
.sc-hp-thumb-ext[data-ext="mov"]  { background: #FFF8E1; color: #B17B00; }

.sc-hp-body {
    flex: 1;
    min-width: 0;
    padding-top: 2px;
}
.sc-hp-name {
    font-weight: 600;
    color: #242424;
    font-size: .92rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
    margin-bottom: 6px;
}
.sc-hp-meta {
    font-size: .78rem;
    color: #605E5C;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}
.sc-hp-sep { opacity: .5; }

/* ── Pin button (v2.2.68) ────────────────────────────────────────────── */
.sc-view-item { position: relative; }
.sc-pin-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(255,255,255,.94);
    border: 1px solid #EDEBE9;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #605E5C;
    cursor: pointer;
    opacity: 0;
    transition: opacity 160ms cubic-bezier(.1,.9,.2,1),
                background-color 160ms ease, color 160ms ease;
    padding: 0;
    z-index: 2;
}
.sc-view-item:hover .sc-pin-btn,
.sc-pin-btn.is-pinned,
.sc-pin-btn:focus-visible {
    opacity: 1;
}
.sc-pin-btn:hover {
    background: #F4EFFC;
    color: #5C2D91;
}
.sc-pin-btn.is-pinned {
    background: #F4EFFC;
    color: #5C2D91;
    border-color: #E1D4F0;
}
.sc-view-item.sc-pinned {
    border: 1px solid #E1D4F0;
    box-shadow: 0 2px 8px rgba(92, 45, 145, .08);
}

/* Anim "pop" au click */
.sc-pin-btn.is-popping { animation: scPinPop 380ms cubic-bezier(.5,1.8,.5,1); }
@keyframes scPinPop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.3); }
    70%  { transform: scale(.95); }
    100% { transform: scale(1); }
}

/* ── Drag-drop anywhere overlay (v2.2.69) ─────────────────────────────── */
.sc-drop-overlay {
    position: fixed;
    inset: 0;
    background: rgba(92, 45, 145, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 11000;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 200ms cubic-bezier(.1,.9,.2,1);
}
.sc-drop-overlay.is-visible {
    display: flex;
    opacity: 1;
}
.sc-drop-overlay-card {
    background: #fff;
    border-radius: 16px;
    padding: 36px 48px;
    text-align: center;
    color: #5C2D91;
    border: 2px dashed #5C2D91;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    animation: scDropPop 280ms cubic-bezier(.5,1.6,.5,1);
    max-width: 90vw;
}
.sc-drop-overlay-card svg { display: block; margin: 0 auto 12px; }
.sc-drop-overlay-title { margin: 0 0 8px; font-size: 1.4rem; font-weight: 600; }
.sc-drop-overlay-text { margin: 0; color: #605E5C; font-size: .95rem; }
.sc-drop-overlay-text strong { color: #5C2D91; }
@keyframes scDropPop {
    from { opacity: 0; transform: scale(.92); }
    to   { opacity: 1; transform: scale(1); }
}

/* Picker modal pour upload sans contexte */
.sc-drop-picker { position: fixed; inset: 0; z-index: 11050; }
.sc-drop-picker-backdrop {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.4);
    backdrop-filter: blur(2px);
}
.sc-drop-picker-modal {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    width: min(420px, 90vw);
    max-height: 80vh;
    overflow: auto;
    box-shadow: 0 14px 40px rgba(0,0,0,.25);
}
.sc-drop-picker-modal h3 { margin: 0 0 8px; font-size: 1.05rem; color: #242424; }
.sc-drop-picker-list { list-style: none; padding: 0; margin: 8px 0 0; }
.sc-drop-picker-list li { border-bottom: 1px solid #EDEBE9; }
.sc-drop-picker-list li:last-child { border-bottom: 0; }
.sc-drop-picker-list a {
    display: block;
    padding: 10px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: #242424;
}
.sc-drop-picker-list a:hover {
    background: #F4EFFC;
    color: #5C2D91;
}

/* ── Mobile bottom sheet pour actions fichier (v2.2.69) ──────────────── */
.sc-sheet {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 30px rgba(0,0,0,.18);
    transform: translateY(100%);
    transition: transform 260ms cubic-bezier(.1,.9,.2,1);
    z-index: 10800;
    max-height: 80vh;
    overflow-y: auto;
}
.sc-sheet.is-open { transform: translateY(0); }
.sc-sheet-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.4);
    backdrop-filter: blur(2px);
    z-index: 10799;
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
}
.sc-sheet-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}
.sc-sheet-handle {
    width: 36px; height: 4px;
    background: #C8C6C4;
    border-radius: 2px;
    margin: 0 auto 12px;
}
.sc-sheet-title {
    padding: 0 20px 8px;
    font-weight: 600;
    color: #242424;
    font-size: .95rem;
    border-bottom: 1px solid #EDEBE9;
    margin-bottom: 8px;
}
.sc-sheet-action {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    color: #242424;
    text-decoration: none;
    border: 0;
    background: transparent;
    width: 100%;
    text-align: left;
    font-size: .95rem;
    cursor: pointer;
}
.sc-sheet-action:hover, .sc-sheet-action:active {
    background: #F3F2F1;
    color: #242424;
}
.sc-sheet-action.is-danger { color: #C5221F; }
.sc-sheet-action.is-danger:hover { background: #FFF2F0; }
.sc-sheet-action svg { flex-shrink: 0; color: #605E5C; }
.sc-sheet-action.is-danger svg { color: #C5221F; }
.sc-sheet-action span:first-of-type { flex: 1; }

/* ── Respect reduced-motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .sc-empty { animation: none; }
    .sc-hover-preview { transition: none; }
    .sc-pin-btn { transition: none; }
    .sc-pin-btn.is-popping { animation: none; }
    .sc-drop-overlay { transition: none; }
    .sc-drop-overlay-card { animation: none; }
    .sc-sheet { transition: none; }
}
