/* ============================================================
   base.css — La Maisonnette
   Shared foundation loaded by every page: design tokens, reset,
   typography, links, buttons, forms, comment component.
   Group sheets: main.css / films.css / reader.css / auth.css
   ============================================================ */

:root {
    /* palette — the site's identity: dark charcoal + lime accent */
    --bg: #0d0d0d;
    --surface: #1c1c1c;
    --surface-2: #262626;
    --surface-3: #333333;
    --border: #3a3a3a;
    --text: #f2f2f2;
    --muted: #b8b8b8;

    --accent: rgb(182, 236, 33);   /* lime green — primary */
    --accent-hover: rgb(31, 241, 119); /* green — hover state */
    --accent-dark: #7a9a12;
    --star: gold;

    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.45);

    --font: Arial, "Helvetica Neue", Helvetica, system-ui, sans-serif;
}

/* ---- reset ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

html { font-family: var(--font); }

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
    background-color: var(--bg);
    min-height: 100vh;
}

/* nothing ever overflows sideways on phones */
img, video { max-width: 100%; height: auto; }

/* ---- links: never default blue again ---- */
a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover { color: var(--accent-hover); }

/* ---- buttons ---- */
button,
.btn {
    display: inline-block;
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #101010;
    font-family: var(--font);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.08s ease, filter 0.15s ease;
}
button:hover, .btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}
button:active { transform: translateY(0); }

/* secondary / ghost variant */
button.ghost, .btn.ghost {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}
button.ghost:hover, .btn.ghost:hover {
    background: rgba(182, 236, 33, 0.12);
}

/* ---- form controls ---- */
input:not([type="radio"]):not([type="checkbox"]),
textarea, select {
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(182, 236, 33, 0.18);
}
label { color: var(--text); }

textarea { resize: vertical; min-height: 96px; max-height: 320px; line-height: 1.4; }

/* ---- headings ---- */
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: clamp(20px, 2.5vw, 28px); }
h2 { font-size: clamp(18px, 2.2vw, 24px); }
h3 { font-size: clamp(16px, 2vw, 19px); }

/* ============================================================
   Comments — shared component (film pages + manga list)
   markup: .comments > .comment* | form.comment-form
   ============================================================ */
.comments {
    width: min(900px, 92%);
    margin: 26px auto;
}
.comment {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 12px;
}
.comment img {
    margin-right: 10px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    vertical-align: middle;
}
.comment p {
    margin: 10px 0 4px;
    font-size: 17px;
    color: var(--text);
    overflow-wrap: anywhere;
}
.comment-form {
    width: min(900px, 92%);
    margin: 30px auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
}
.comment-form textarea { background: var(--surface-2); color: var(--text); }
.comment-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
}
.comment-actions .help { color: var(--muted); font-size: 14px; }
.must-login { text-align: center; color: var(--muted); margin: 14px auto; }

@media (max-width: 640px) {
    .comment-actions { flex-direction: column-reverse; align-items: stretch; }
    .comment-actions button { width: 100%; }
}

/* small screens: give everything breathing room */
@media (max-width: 480px) {
    body { font-size: 15px; }
}
