:root {
    --bg: #fffdf5;
    --surface: #ffffff;
    --ink: #1e1b4b;
    --ink-muted: #475569;
    --yellow: #facc15;
    --blue: #38bdf8;
    --blue-dark: #0284c7;
    --coral: #fb7185;
    --mint: #34d399;
    --purple: #a78bfa;
    --border: 3px solid var(--ink);
    --shadow: 5px 5px 0 var(--ink);
    --shadow-sm: 3px 3px 0 var(--ink);
    --radius: 18px;
    --max-width: 1120px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Fredoka", "Nunito", ui-rounded, "Segoe UI", system-ui, -apple-system, sans-serif;
    line-height: 1.65;
    color: var(--ink);
    background-color: var(--bg);
    background-image: radial-gradient(circle, rgba(30, 27, 75, 0.08) 1.5px, transparent 1.5px);
    background-size: 20px 20px;
}

a {
    color: var(--blue-dark);
    text-decoration: none;
    font-weight: 600;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* --- Header & Navigation --- */
.site-header {
    background: var(--yellow);
    border-bottom: var(--border);
    padding: 1.1rem 0;
    margin-bottom: 2rem;
}

.header-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--coral);
    color: #fff;
    border: var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    font-size: 1.4rem;
    font-weight: 800;
    transform: rotate(-4deg);
}

.site-title {
    margin: 0;
    font-size: 1.65rem;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.site-title a {
    color: var(--ink);
    text-decoration: none;
}

.site-tagline {
    margin: 0.2rem 0 0;
    font-size: 0.92rem;
    color: var(--ink);
    opacity: 0.85;
    font-weight: 600;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.nav-pill {
    display: inline-block;
    padding: 0.45rem 0.95rem;
    background: var(--surface);
    color: var(--ink);
    border: var(--border);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    font-size: 0.9rem;
    font-weight: 700;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.nav-pill:hover {
    text-decoration: none;
    background: var(--blue);
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow);
}

/* --- Hero Duo (Papa & Gabriel) --- */
.duo-hero {
    background: linear-gradient(135deg, #e0f2fe 0%, #fef9c3 100%);
    border: var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 2.25rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: center;
}

@media (min-width: 820px) {
    .duo-hero {
        grid-template-columns: 1.05fr 1fr;
        padding: 1.75rem 2rem;
    }
}

.duo-hero-kicker {
    display: inline-block;
    background: var(--mint);
    color: var(--ink);
    border: 2px solid var(--ink);
    border-radius: 999px;
    padding: 0.2rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.75rem;
    box-shadow: 2px 2px 0 var(--ink);
}

.duo-hero-title {
    margin: 0 0 0.65rem;
    font-size: 1.85rem;
    line-height: 1.2;
    font-weight: 800;
}

.duo-hero-text {
    margin: 0 0 1.15rem;
    color: var(--ink-muted);
    font-size: 1rem;
    font-weight: 500;
}

.duo-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.duo-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface);
    border: 2px solid var(--ink);
    border-radius: 999px;
    padding: 0.25rem 0.75rem 0.25rem 0.3rem;
    box-shadow: 2px 2px 0 var(--ink);
    font-size: 0.88rem;
    font-weight: 700;
}

.duo-chip img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--ink);
    object-fit: cover;
}

.duo-hero-media {
    border: var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: var(--surface);
}

.duo-hero-media img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* --- Grille Principale --- */
.layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 860px) {
    .layout-grid {
        grid-template-columns: minmax(0, 1fr) 310px;
    }
}

/* --- Cartes d'Articles --- */
.comic-card {
    background: var(--surface);
    border: var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.75rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.post-card:hover {
    transform: translate(-2px, -2px);
    box-shadow: 7px 7px 0 var(--ink);
}

.post-badge {
    display: inline-block;
    padding: 0.18rem 0.65rem;
    background: var(--purple);
    color: var(--ink);
    border: 2px solid var(--ink);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 0.6rem;
}

.post-title {
    margin: 0 0 0.5rem;
    font-size: 1.45rem;
    line-height: 1.25;
    font-weight: 800;
}

.post-title a {
    color: var(--ink);
    text-decoration: none;
}

.post-title a:hover {
    color: var(--blue-dark);
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.85rem;
    font-size: 0.86rem;
    color: var(--ink-muted);
    margin-bottom: 1rem;
    font-weight: 600;
}

.post-excerpt p {
    margin: 0 0 0.9rem;
}

/* --- Boutons Cartoon --- */
.btn-comic {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1.05rem;
    background: var(--yellow);
    color: var(--ink);
    border: var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    font: inherit;
    font-weight: 800;
    font-size: 0.92rem;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.btn-comic:hover {
    text-decoration: none;
    background: var(--blue);
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow);
}

.btn-comic-primary {
    background: var(--coral);
    color: #fff;
}

.btn-comic-primary:hover {
    background: #f43f5e;
    color: #fff;
}

/* --- Contenu d'article --- */
.post-content img {
    max-width: 100%;
    height: auto;
    border: var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.post-content pre {
    background: #1e1b4b;
    color: #f8fafc;
    padding: 1rem 1.15rem;
    border-radius: 12px;
    border: var(--border);
    overflow-x: auto;
    font-size: 0.9rem;
}

.post-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.post-content p code {
    background: #fef9c3;
    border: 1.5px solid var(--ink);
    padding: 0.1rem 0.35rem;
    border-radius: 6px;
    font-size: 0.9em;
}

.post-content blockquote {
    margin: 1.25rem 0;
    padding: 0.75rem 1.1rem;
    background: #e0f2fe;
    border: 2px solid var(--ink);
    border-left: 6px solid var(--ink);
    border-radius: 12px;
    font-weight: 600;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
    border: var(--border);
}

.post-content th,
.post-content td {
    border: 2px solid var(--ink);
    padding: 0.55rem 0.75rem;
    text-align: left;
}

.post-content th {
    background: var(--yellow);
}

/* --- Tags & Pagination --- */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.tag-pill {
    display: inline-block;
    padding: 0.22rem 0.7rem;
    font-size: 0.84rem;
    font-weight: 700;
    background: #fef9c3;
    color: var(--ink);
    border: 2px solid var(--ink);
    border-radius: 999px;
    box-shadow: 2px 2px 0 var(--ink);
}

.tag-pill:hover {
    text-decoration: none;
    background: var(--mint);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 1.5rem 0;
}

/* --- Sidebar & Duo Widget --- */
.sidebar-widget {
    background: var(--surface);
    border: var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.2rem;
    margin-bottom: 1.5rem;
}

.sidebar-widget h3 {
    margin: 0 0 0.85rem;
    font-size: 1.05rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.sidebar-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-widget li {
    margin-bottom: 0.45rem;
    font-size: 0.93rem;
}

.duo-card-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.65rem;
    border: 2px solid var(--ink);
    border-radius: 14px;
    background: var(--bg);
    margin-bottom: 0.75rem;
}

.duo-card-item:last-child {
    margin-bottom: 0;
}

.duo-card-item img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: var(--border);
    object-fit: cover;
    flex-shrink: 0;
}

.duo-card-name {
    font-weight: 800;
    font-size: 0.98rem;
    line-height: 1.2;
}

.duo-card-role {
    font-size: 0.82rem;
    color: var(--ink-muted);
    font-weight: 600;
}

/* --- Formulaires & Commentaires --- */
.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-form input[type="search"],
.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
}

.comments-section {
    margin-top: 2rem;
}

.comment-item {
    position: relative;
    padding: 1rem 1.15rem;
    margin-bottom: 1rem;
    background: #fefce8;
    border: var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.comment-author {
    font-weight: 800;
}

.comment-date {
    font-size: 0.84rem;
    color: var(--ink-muted);
    margin-left: 0.5rem;
}

.comment-form .form-group {
    margin-bottom: 0.9rem;
}

.comment-form label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 700;
    font-size: 0.92rem;
}

.hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
}

.alert {
    padding: 0.75rem 1rem;
    border: 2px solid var(--ink);
    border-radius: 12px;
    margin-bottom: 1rem;
    font-weight: 700;
}

.alert-success { background: var(--mint); }
.alert-error { background: var(--coral); color: #fff; }

/* --- Footer --- */
.site-footer {
    margin-top: 2.5rem;
    padding: 1.5rem 0;
    background: var(--ink);
    color: #fff;
    border-top: var(--border);
    text-align: center;
    font-size: 0.92rem;
}

.site-footer a {
    color: var(--yellow);
}
