/*
Theme Name: Paradize Family
Description: Thème photo clair pour le blog famille Emma, Maël & Timothée
Version: 1.0
Author: CD
*/

/* ── Variables ────────────────────────────────────────────────── */
:root {
    --bg:           #FFF9F5;
    --surface:      #FFFFFF;
    --text:         #3D3D3D;
    --text-light:   #888;
    --accent:       #E8557A;
    --accent-light: #FCE4EC;
    --border:       #EDE0D8;
    --shadow-sm:    0 2px 8px rgba(0,0,0,0.07);
    --shadow-md:    0 4px 20px rgba(0,0,0,0.10);
    --radius:       10px;
    --max-w:        1120px;
    --max-content:  780px;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.75;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ───────────────────────────────────────────────────── */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 64px;
    flex-wrap: wrap;
}
.site-branding { display: flex; flex-direction: column; gap: 1px; }
.site-title { font-size: 1.3rem; font-weight: 700; color: var(--accent); line-height: 1.2; }
.site-title a { color: inherit; text-decoration: none; }
.site-tagline { font-size: .8rem; color: var(--text-light); }

/* ── Nav groupée avec dropdowns ──────────────────────────────── */
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; position: relative; }
.site-nav > ul > li { position: relative; }
.site-nav a, .site-nav button.nav-group-btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 5px 13px;
    border-radius: 20px;
    font-size: .85rem; font-weight: 500;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    cursor: pointer; font-family: inherit;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.site-nav a:hover, .site-nav button.nav-group-btn:hover,
.site-nav .current-cat > a, .site-nav li.active > button {
    background: var(--accent); color: #fff; border-color: var(--accent); text-decoration: none;
}
.site-nav button.nav-group-btn .arrow { font-size: .65rem; transition: transform .2s; }
.site-nav li.open > button.nav-group-btn .arrow { transform: rotate(180deg); }

/* Dropdown */
.nav-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    min-width: 200px;
    padding: 8px;
    z-index: 200;
    flex-direction: column;
    gap: 2px;
}
.site-nav li.open > .nav-dropdown { display: flex; }
.nav-dropdown a {
    border-radius: 8px; border: none; background: none;
    justify-content: space-between; padding: 7px 12px;
    font-size: .83rem;
}
.nav-dropdown a:hover { background: var(--accent-light); color: var(--accent); }
.nav-dropdown .count { font-size: .72rem; color: var(--text-light); font-weight: 400; }
.nav-dropdown .group-label {
    font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
    color: var(--text-light); padding: 8px 12px 4px; display: block;
}
.nav-dropdown hr { border: none; border-top: 1px solid var(--border); margin: 4px 0; }
.header-search { display: flex; gap: 6px; }
.header-search input {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: .85rem;
    outline: none;
    background: var(--bg);
    width: 160px;
    transition: border-color .15s, width .2s;
}
.header-search input:focus { border-color: var(--accent); width: 200px; }
.header-search button {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: .85rem;
    cursor: pointer;
}

/* ── Barre chronologique ─────────────────────────────────────── */
.chrono-bar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 64px;
    z-index: 90;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.chrono-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: stretch;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.chrono-inner::-webkit-scrollbar { display: none; }

.chrono-label {
    font-size: .72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .07em; color: var(--text-light);
    padding: 0 14px 0 0; display: flex; align-items: center;
    border-right: 1px solid var(--border); margin-right: 12px;
    white-space: nowrap; flex-shrink: 0;
}

.chrono-years { display: flex; gap: 2px; align-items: center; flex-shrink: 0; }
.chrono-year-btn {
    background: none; border: none; cursor: pointer;
    font-family: inherit; font-size: .88rem; font-weight: 700;
    color: var(--text-light); padding: 12px 12px;
    border-bottom: 3px solid transparent;
    transition: color .15s, border-color .15s;
    white-space: nowrap;
}
.chrono-year-btn:hover { color: var(--accent); }
.chrono-year-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.chrono-months {
    display: none;
    gap: 2px;
    align-items: center;
    padding-left: 8px;
    border-left: 2px solid var(--accent-light);
    margin-left: 4px;
    flex-shrink: 0;
}
.chrono-months.visible { display: flex; }
.chrono-month-link {
    display: inline-flex; flex-direction: column; align-items: center;
    padding: 6px 8px; border-radius: 6px; text-decoration: none;
    font-size: .72rem; color: var(--text-light); line-height: 1.2;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.chrono-month-link:hover { background: var(--accent-light); color: var(--accent); text-decoration: none; }
.chrono-month-link.active { background: var(--accent); color: #fff; }
.chrono-month-link .mcount { font-size: .65rem; opacity: .7; }

/* ── Hero banner (homepage only) ─────────────────────────────── */
.site-hero {
    background: linear-gradient(135deg, #FCE4EC 0%, #FFF9F5 60%, #E8F5E9 100%);
    padding: 36px 20px;
    text-align: center;
}
.site-hero h1 { font-size: clamp(1.5rem, 4vw, 2.4rem); color: var(--accent); font-weight: 800; }
.site-hero p  { color: var(--text-light); font-size: 1rem; margin-top: 6px; }

/* ── Container / Layout ───────────────────────────────────────── */
.site-container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 32px 20px;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 36px;
    align-items: start;
}
.site-container.no-sidebar { grid-template-columns: 1fr; }
.site-container.no-sidebar .site-content { max-width: var(--max-content); margin: 0 auto; }

/* ── Post cards grid (archive/home) ──────────────────────────── */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.post-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .2s;
}
.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.post-card-thumb {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
}
.post-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.post-card:hover .post-card-thumb img { transform: scale(1.04); }
.post-card-thumb .no-thumb {
    font-size: 2.5rem;
    opacity: .35;
}

.post-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.post-card-cat {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--accent);
}
.post-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}
.post-card-title a { color: inherit; text-decoration: none; }
.post-card-title a:hover { color: var(--accent); }
.post-card-meta {
    display: flex;
    gap: 10px;
    font-size: .75rem;
    color: var(--text-light);
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}
.post-card-meta span { display: flex; align-items: center; gap: 4px; }

/* ── Single post ─────────────────────────────────────────────── */
.single-layout {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 32px 20px;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 36px;
    align-items: start;
}

.entry { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.entry-header { padding: 28px 32px 16px; }
.entry-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.entry-cat-tag {
    background: var(--accent-light);
    color: var(--accent);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 3px 10px;
    border-radius: 20px;
}
.entry-title { font-size: clamp(1.3rem, 3vw, 1.8rem); font-weight: 800; line-height: 1.25; color: #2C3E50; }
.entry-meta-bar {
    display: flex;
    gap: 16px;
    font-size: .8rem;
    color: var(--text-light);
    margin-top: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.entry-meta-bar a { color: var(--text-light); }
.entry-meta-bar a:hover { color: var(--accent); }

.entry-thumb {
    width: 100%;
    max-height: 440px;
    overflow: hidden;
    background: var(--accent-light);
}
.entry-thumb img { width: 100%; height: 440px; object-fit: cover; }

.entry-content {
    padding: 28px 32px 32px;
    font-size: 1rem;
    line-height: 1.8;
}
.entry-content h1, .entry-content h2, .entry-content h3,
.entry-content h4, .entry-content h5 {
    margin: 28px 0 12px;
    color: #2C3E50;
    line-height: 1.3;
}
.entry-content h1 { font-size: 1.6rem; }
.entry-content h2 { font-size: 1.35rem; }
.entry-content h3 { font-size: 1.15rem; }
.entry-content h4, .entry-content h5 { font-size: 1rem; }
.entry-content p { margin-bottom: 16px; }
.entry-content ul, .entry-content ol { margin: 14px 0 14px 24px; }
.entry-content li { margin-bottom: 6px; }
.entry-content strong { font-weight: 700; }
.entry-content em { font-style: italic; }
.entry-content blockquote {
    border-left: 4px solid var(--accent);
    margin: 20px 0;
    padding: 12px 20px;
    background: var(--accent-light);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: #555;
}
.entry-content img {
    border-radius: 8px;
    margin: 16px auto;
    box-shadow: var(--shadow-sm);
}
.entry-content .aligncenter { margin: 16px auto; text-align: center; }
.entry-content .alignleft { float: left; margin: 8px 20px 8px 0; }
.entry-content .alignright { float: right; margin: 8px 0 8px 20px; }

/* ── Video wrapper (YouTube responsive) ──────────────────────── */
.video-wrapper {
    position: relative;
    padding-top: 56.25%;
    margin: 20px 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: #000;
}
.video-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

/* ── NextGen Gallery (custom renderer) ───────────────────────── */
.ngg-gallery-wrap {
    margin: 24px 0;
}
.ngg-gallery-title {
    font-size: .85rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: 12px;
}
.ngg-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
}
.ngg-thumb-link {
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 7px;
    background: var(--accent-light);
    cursor: pointer;
}
.ngg-thumb-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s, opacity .2s;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
}
.ngg-thumb-link:hover img { transform: scale(1.07); opacity: .9; }

/* ── Pagination ──────────────────────────────────────────────── */
.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 36px;
    flex-wrap: wrap;
}
.pagination .page-numbers {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: .9rem;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.pagination .current {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.pagination a:hover { background: var(--accent-light); border-color: var(--accent); text-decoration: none; }

/* ── Post navigation ─────────────────────────────────────────── */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 32px;
}
.nav-previous, .nav-next {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px;
    border: 1px solid var(--border);
    font-size: .85rem;
}
.nav-next { text-align: right; }
.nav-label { font-size: .72rem; color: var(--text-light); text-transform: uppercase; letter-spacing: .06em; display: block; margin-bottom: 4px; }
.nav-previous a, .nav-next a { font-weight: 600; color: var(--accent); }

/* ── Comments ────────────────────────────────────────────────── */
.comments-section {
    margin-top: 32px;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 28px 32px;
}
.comments-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: #2C3E50;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent-light);
}
.comment-list { list-style: none; display: flex; flex-direction: column; gap: 20px; }
.comment {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: var(--bg);
    border-radius: 8px;
    border-left: 3px solid var(--accent-light);
}
.comment .avatar { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; background: var(--accent-light); }
.comment-body { flex: 1; }
.comment-author-name { font-weight: 700; font-size: .9rem; color: var(--text); }
.comment-date { font-size: .75rem; color: var(--text-light); margin-bottom: 8px; }
.comment-text { font-size: .9rem; line-height: 1.6; }
.comment-text p { margin-bottom: 6px; }

.comment-form-wrap {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.comment-form-wrap h3 { font-size: 1rem; font-weight: 700; margin-bottom: 16px; color: #2C3E50; }
.comment-form p { margin-bottom: 12px; }
.comment-form label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: 4px; color: var(--text-light); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: .9rem;
    font-family: inherit;
    background: var(--bg);
    outline: none;
    transition: border-color .15s;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--accent); }
.comment-form textarea { min-height: 120px; resize: vertical; }
.comment-form .submit-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.comment-form .submit-btn:hover { background: #d03c65; }

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.widget {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 20px;
}
.widget-title {
    font-size: .85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--accent);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-light);
}
.widget-cats ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.widget-cats .child-group { margin-bottom: 14px; }
.widget-cats .child-group:last-child { margin-bottom: 0; }
.widget-cats .child-name {
    font-size: .7rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: .07em; color: var(--accent);
    margin-bottom: 4px; padding: 4px 10px;
    background: var(--accent-light); border-radius: 6px;
    display: block;
}
.widget-cats ul { list-style: none; }
.widget-cats li a {
    display: flex;
    justify-content: space-between;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: .85rem;
    color: var(--text);
    transition: background .15s, color .15s;
}
.widget-cats li a:hover { background: var(--accent-light); color: var(--accent); text-decoration: none; }
.widget-cats li a .count {
    background: var(--border);
    font-size: .7rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
    color: var(--text-light);
}
.widget-recent ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.widget-recent li { display: flex; gap: 10px; align-items: flex-start; }
.widget-recent .recent-thumb {
    width: 56px; height: 56px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--accent-light);
}
.widget-recent .recent-thumb img { width: 56px; height: 56px; object-fit: cover; }
.widget-recent .recent-info { font-size: .83rem; }
.widget-recent .recent-info a { color: var(--text); font-weight: 600; line-height: 1.3; display: block; }
.widget-recent .recent-info a:hover { color: var(--accent); text-decoration: none; }
.widget-recent .recent-date { color: var(--text-light); font-size: .74rem; margin-top: 2px; }

/* ── Archive header ──────────────────────────────────────────── */
.archive-header {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--accent);
}
.archive-header h1 { font-size: 1.3rem; font-weight: 800; color: #2C3E50; }
.archive-header p { font-size: .88rem; color: var(--text-light); margin-top: 4px; }

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
    background: #2C3E50;
    color: #aaa;
    text-align: center;
    padding: 28px 20px;
    font-size: .82rem;
    margin-top: 48px;
}
.site-footer a { color: var(--accent); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
    .site-container, .single-layout {
        grid-template-columns: 1fr;
    }
    .sidebar { display: none; }
}
@media (max-width: 600px) {
    .entry-header, .entry-content, .comments-section { padding: 18px; }
    .entry-thumb img { height: 220px; }
    .header-search { display: none; }
    .post-navigation { grid-template-columns: 1fr; }
    .ngg-gallery-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 5px; }
}
