/* SyncArti — Vue artisan (pages publiques /t/{token}) */

/* --- Layout --- */
.sa-page { background: #f0f4f8; min-height: 100vh; }

/* --- Card chantier (index) --- */
a.sa-chantier-card {
    display: block;
    background: #fff;
    border-radius: 1rem !important;
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
    overflow: hidden;
    margin-bottom: 1rem;
    text-decoration: none !important;
    color: inherit;
    transition: transform .15s, box-shadow .15s;
}
.sa-chantier-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
    color: inherit;
    text-decoration: none;
}

/* --- Card chantier (detail) --- */
.sa-chantier {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

/* --- Header chantier (partagé index + detail) --- */
.sa-chantier-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 1.1rem 1.25rem .9rem;
    color: #fff;
}
.sa-chantier-card .sa-chantier-header,
.sa-chantier-card .sa-chantier-header *,
.sa-chantier .sa-chantier-header,
.sa-chantier .sa-chantier-header * {
    color: #fff !important;
}
.sa-chantier-nom { font-size: 1.05rem; font-weight: 700; margin-bottom: .25rem; }
.sa-chantier-lieu { font-size: .8rem; color: #94a3b8 !important; margin-bottom: .5rem; text-decoration: none; display: block; }
.sa-chantier-lieu:hover { color: #cbd5e1 !important; }
.sa-progress-row { display: flex; align-items: center; gap: .75rem; }
.sa-progress-bar { flex: 1; height: 6px; background: rgba(255,255,255,.15); border-radius: 9px; overflow: hidden; }
.sa-progress-fill { height: 100%; background: #f97316; border-radius: 9px; transition: width .4s; }
.sa-progress-pct { font-size: .8rem; color: #94a3b8; flex-shrink: 0; }

/* --- Body chantier (index) --- */
.sa-chantier-body { padding: .75rem 1.25rem; }
.sa-lot-line {
    display: flex; justify-content: space-between; align-items: center;
    padding: .4rem 0; border-bottom: 1px solid #f1f5f9;
    font-size: .85rem;
}
.sa-lot-line:last-child { border-bottom: none; }
.sa-lot-line-nom { color: #1e293b; font-weight: 500; }

/* --- Pills (index) --- */
.sa-pill {
    display: inline-block; padding: .25rem .7rem; border-radius: 999px;
    font-size: .75rem; font-weight: 700; white-space: nowrap;
}
.sa-pill--en_attente { background: #e2e8f0; color: #475569; }
.sa-pill--en_cours   { background: #3b82f6; color: #fff; }
.sa-pill--valide     { background: #22c55e; color: #fff; }
.sa-pill--bloque     { background: #ef4444; color: #fff; }

/* --- Lots (detail) --- */
.sa-lot { padding: 1rem 1.25rem; border-bottom: 1px solid #f1f5f9; }
.sa-lot:last-child { border-bottom: none; }
.sa-lot--valide { background: #f0fdf4; }
.sa-lot--bloque { background: #fff5f5; }
.sa-lot-nom { font-weight: 600; font-size: .95rem; color: #0f172a; }
.sa-lot-meta { font-size: .78rem; color: #64748b; margin-top: .15rem; }
.sa-lot-cmt { font-size: .8rem; color: #64748b; margin-top: .4rem; font-style: italic; }

/* --- Badges (detail) --- */
.sa-badge { display: inline-block; padding: .2rem .6rem; border-radius: 9px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.sa-badge--en_attente { background: #f1f5f9; color: #475569; }
.sa-badge--en_cours   { background: #eff6ff; color: #1d4ed8; }
.sa-badge--valide     { background: #dcfce7; color: #166534; }
.sa-badge--bloque     { background: #fee2e2; color: #991b1b; }

/* --- Actions lot --- */
.sa-actions { margin-top: .75rem; display: flex; gap: .5rem; }
.sa-actions .btn { flex: 1; font-weight: 700; font-size: .9rem; padding: .65rem 1rem; border-radius: .75rem; }

/* --- Messagerie --- */
.sa-msg-section { padding: 1rem 1.25rem; background: #f8fafc; border-top: 1px solid #e2e8f0; }
.sa-msg-title { font-size: .8rem; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .75rem; }
.sa-msg-list { display: flex; flex-direction: column; gap: .5rem; margin-bottom: .875rem; }
.sa-msg-empty { font-size: .82rem; color: #94a3b8; text-align: center; padding: .75rem; margin-bottom: .75rem; }

.sa-bubble-wrap { display: flex; flex-direction: column; }
.sa-bubble-wrap--own  { align-items: flex-end; }
.sa-bubble-wrap--other { align-items: flex-start; }
.sa-bubble-name { font-size: .7rem; color: #94a3b8; margin-bottom: .2rem; padding: 0 .25rem; }
.sa-bubble {
    max-width: 80%; padding: .55rem .8rem;
    border-radius: 1rem; font-size: .875rem; line-height: 1.45;
}
.sa-bubble--own   { background: #f97316; color: #fff; border-radius: 1rem 1rem 0 1rem; }
.sa-bubble--other { background: #fff; color: #1e293b; border-radius: 1rem 1rem 1rem 0; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.sa-bubble-time { font-size: .68rem; opacity: .65; margin-top: .25rem; text-align: right; }

.sa-bubble-actions { opacity: 0; transition: opacity .15s; }
.sa-bubble-wrap:hover .sa-bubble-actions,
.sa-bubble-wrap:focus-within .sa-bubble-actions { opacity: 1; }

/* --- Compose --- */
.sa-compose { display: flex; gap: .5rem; align-items: flex-end; }
.sa-compose textarea {
    flex: 1; border: 1.5px solid #e2e8f0; border-radius: .75rem;
    padding: .5rem .75rem; font-size: .875rem; font-family: inherit;
    resize: none; background: #fff;
}
.sa-compose textarea:focus { outline: none; border-color: #f97316; }
.sa-compose button {
    padding: .5rem .9rem; background: #f97316; color: #fff;
    border: none; border-radius: .75rem; font-weight: 700;
    font-size: .875rem; cursor: pointer; white-space: nowrap;
}

/* --- Messages système --- */
.sa-system-msg {
    text-align: center; padding: .75rem 1rem; border-radius: .75rem;
    font-size: .82rem; font-weight: 600; line-height: 1.5;
    margin: .5rem auto; max-width: 90%;
}
.sa-system-msg--valide, .sa-system-msg--valide_sup { background: #dcfce7; color: #166534; border: 1.5px solid #bbf7d0; }
.sa-system-msg--bloque { background: #fee2e2; color: #991b1b; border: 1.5px solid #fecaca; }
.sa-system-msg img { display: block; max-width: 100%; border-radius: .5rem; margin: .5rem auto 0; }
.sa-system-msg .sa-system-time { font-size: .7rem; opacity: .6; margin-top: .25rem; }
.sa-audio-player { display: block; width: 100%; margin-top: .35rem; height: 36px; border-radius: .5rem; }

/* --- Upload --- */
.sa-upload-form { margin-top: .75rem; }
.sa-upload-form label {
    display: block; padding: .65rem 1rem; background: #f1f5f9;
    border: 1.5px dashed #cbd5e1; border-radius: .75rem;
    font-size: .875rem; color: #475569; cursor: pointer; text-align: center;
    margin-bottom: .5rem;
}
.sa-upload-form input[type=file] { display: none; }
.sa-upload-form button {
    display: block; width: 100%; padding: .6rem 1rem;
    background: #f97316; color: #fff; border: none;
    border-radius: .75rem; font-weight: 700; font-size: .875rem; cursor: pointer;
}

/* --- Flash --- */
.sa-flash { margin: 1rem 0; padding: .65rem 1rem; border-radius: .75rem; font-size: .875rem; font-weight: 600; }
.sa-flash--success { background: #dcfce7; color: #166534; }
.sa-flash--danger  { background: #fee2e2; color: #991b1b; }

/* --- Divers --- */
.sa-empty { text-align: center; padding: 5rem 1.5rem; color: #94a3b8; }
.sa-empty-icon { font-size: 3.5rem; margin-bottom: 1rem; }
.sa-back { display: inline-flex; align-items: center; gap: .4rem; color: #94a3b8; font-size: .85rem; text-decoration: none; margin-bottom: 1rem; }
.sa-back:hover { color: #f97316; }
