@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-body: #0f172a;       /* Slate 900 */
    --bg-card: #1e293b;       /* Slate 800 */
    --bg-element: #334155;    /* Slate 700 */
    --text-primary: #f8fafc;  /* Slate 50 */
    --text-secondary: #94a3b8;/* Slate 400 */
    --accent: #6366f1;        /* Indigo 500 */
    --accent-glow: rgba(99, 102, 241, 0.15);
    --border: #475569;        /* Slate 600 */

    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    padding: 40px 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
    overflow: hidden;
}

/* --- HEADER --- */
.header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    padding: 40px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
    letter-spacing: -0.025em;
}

.header .ticket-id {
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 12px;
    border-radius: 999px;
    display: inline-block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

/* --- INFO SECTION --- */
.info-section {
    padding: 30px;
    background: rgba(15, 23, 42, 0.3);
    border-bottom: 1px solid var(--border);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.info-item {
    background: var(--bg-element);
    padding: 15px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.info-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 6px;
}

.info-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* --- MESSAGES --- */
.messages-section {
    padding: 30px;
}

.messages-section h2 {
    font-size: 1.25rem;
    margin-bottom: 25px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.messages-section h2::before {
    content: '';
    display: block;
    width: 4px;
    height: 24px;
    background: var(--accent);
    border-radius: 2px;
}

.message {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 12px;
    background: transparent;
    border: 1px solid transparent;
    transition: background 0.2s;
}

.message:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.05);
}

.message-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
}

.message-author {
    font-weight: 600;
    color: var(--accent);
    font-size: 1rem;
}

.message-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.message-content {
    color: #cbd5e1;
    font-size: 0.95rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Pièces jointes */
.attachments {
    margin-top: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    font-size: 0.9rem;
}

.attachments a {
    color: var(--info);
    text-decoration: none;
}

.attachments a:hover {
    text-decoration: underline;
}

/* --- CANDIDATURE --- */
.candidature-section {
    padding: 30px;
    background: rgba(99, 102, 241, 0.05);
    border-top: 1px solid var(--border);
}

.candidature-section h2 {
    color: var(--accent);
    margin-bottom: 20px;
}

.question-item {
    background: var(--bg-element);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid var(--border);
}

.question-label {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.question-text {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.response {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 8px;
    color: #cbd5e1;
    border-left: 3px solid var(--success);
}

/* --- FOOTER --- */
.footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.3);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.no-messages {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-style: italic;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-body);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-element);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--border);
}

/* Mobile */
@media (max-width: 768px) {
    body { padding: 10px; }
    .header { padding: 20px; }
    .header h1 { font-size: 1.5rem; }
    .info-grid { grid-template-columns: 1fr; }
}