/*
 * Chroniques Absurdes Studio IA — CSS — V1.3.0
 */

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4efe7;
    color: #261b12;
}

.topbar {
    min-height: 74px;
    padding: 14px 28px;
    background: #1d130c;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    overflow: hidden;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
    min-width: 220px;
}

.logo {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #b88746;
    color: #1d130c;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand span {
    display: block;
    color: #d9c4a7;
    font-size: 13px;
}

nav {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto;
}

.hero {
    background: linear-gradient(135deg, #2d1d12, #69431f);
    color: #fff;
    padding: 32px;
    border-radius: 24px;
    box-shadow: 0 18px 50px rgba(0,0,0,.14);
    margin-bottom: 24px;
}

.hero h1 { margin: 0 0 8px; font-size: 38px; }

.home-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.big-action {
    display: block;
    background: #fff;
    color: #261b12;
    text-decoration: none;
    padding: 24px;
    border-radius: 22px;
    box-shadow: 0 12px 34px rgba(0,0,0,.08);
    border: 1px solid rgba(80,50,20,.08);
}

.big-action strong {
    display: block;
    font-size: 24px;
    margin-bottom: 8px;
}

.big-action span { color: #745b3d; }

.page-title { margin-bottom: 18px; }
.page-title h1 { margin: 0 0 6px; font-size: 34px; }
.page-title p { margin: 0; color: #745b3d; }

.with-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tabs a {
    padding: 11px 16px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #d8c7ad;
    color: #261b12;
    font-weight: 800;
    text-decoration: none;
}

.tabs a.active {
    background: #7a451b;
    color: #fff;
    border-color: #7a451b;
}

.card {
    background: #fff;
    padding: 24px;
    border-radius: 22px;
    box-shadow: 0 12px 34px rgba(0,0,0,.08);
    border: 1px solid rgba(80,50,20,.08);
}

.narrow { max-width: 760px; }

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.split {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 20px;
}

.login-card { max-width: 480px; margin: 60px auto; }

.stat-card h2 { font-size: 36px; margin-bottom: 4px; }

h1, h2 { margin-top: 0; }

label {
    display: block;
    margin: 14px 0 6px;
    font-weight: 700;
}

input, textarea, select {
    width: 100%;
    border: 1px solid #d8c7ad;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 15px;
    background: #fffaf3;
}

textarea { resize: vertical; }

button, .button-link {
    display: inline-block;
    margin-top: 16px;
    background: #7a451b;
    color: #fff;
    border: 0;
    border-radius: 14px;
    padding: 12px 18px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
}

button:hover, .button-link:hover { background: #5d3212; }

.button-link.secondary { background: #8e7a62; }

.prompt-box {
    min-height: 190px;
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
    white-space: pre-wrap;
}

.prompt-box.large { min-height: 520px; }

.alert {
    background: #ffe4e4;
    border: 1px solid #e2a1a1;
    color: #7b1b1b;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 14px;
}

.success {
    background: #e7f8e8;
    border: 1px solid #9fd8a5;
    color: #1c6726;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 14px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 18px;
}

.person-card {
    display: block;
    background: #fff;
    border-radius: 20px;
    border: 1px solid rgba(80,50,20,.08);
    box-shadow: 0 10px 28px rgba(0,0,0,.08);
    overflow: hidden;
    color: #261b12;
    text-decoration: none;
    transition: transform .12s ease, box-shadow .12s ease;
}

.person-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 38px rgba(0,0,0,.12);
}

.person-card img,
.thumb-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    background: #fff4e4;
}

.thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #806344;
    font-weight: 700;
    padding: 14px;
    text-align: center;
}

.person-card div { padding: 14px; }
.person-card strong, .person-card small { display: block; }
.person-card small { color: #806344; margin-top: 4px; }

.detail-image {
    width: 100%;
    max-width: 460px;
    border-radius: 18px;
    border: 1px solid #e2d1b8;
    display: block;
    margin-bottom: 10px;
}

.delete-zone {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #eee0ce;
}

button.danger { background: #8c1f1f; }
button.danger:hover { background: #641313; }

.scene-list { display: grid; gap: 12px; }

.scene-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    background: #fff;
    border-radius: 18px;
    border: 1px solid rgba(80,50,20,.08);
    box-shadow: 0 8px 22px rgba(0,0,0,.06);
    color: #261b12;
    text-decoration: none;
}

.scene-row strong, .scene-row small { display: block; }
.scene-row small { color: #806344; margin-top: 4px; }

.footer {
    color: #7c6a55;
    text-align: center;
    padding: 28px;
    font-size: 13px;
}

@media (max-width: 900px) {
    .grid, .split, .home-actions { grid-template-columns: 1fr; }

    .topbar, .with-action {
        align-items: flex-start;
        flex-direction: column;
    }
}
