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

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

/* BASE */
body {
    font-family: 'Inter', sans-serif;
    background: #f6f6f7;
    color: #222;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: auto;
    padding: 20px;
}

/* HEADER */
.main-header {
    background: white;
    border-bottom: 1px solid #ddd;
    margin-bottom: 30px;
}

.main-header h1 {
    font-weight: 700;
    font-size: 1.8rem;
}

.main-header nav a,
.main-header .back {
    color: #333;
    text-decoration: none;
    font-size: 0.95rem;
    margin-left: 15px;
}

.main-header nav a:hover,
.main-header .back:hover {
    text-decoration: underline;
}

/* INDEX – CARDS */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
}

.post-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: 0.2s ease;
}

.post-card:hover {
    transform: translateY(-3px);
}

.post-card img,
.no-banner {
    width: 100%;
    height: 150px;
    object-fit: cover;
    background: #e1e1e1;
}

.post-card-body {
    padding: 15px;
}

.post-card-body h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 10px;
}

.excerpt {
    font-size: 0.9rem;
    color: #444;
}

/* VIEW POST */
.post-banner {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-bottom: 1px solid #ddd;
}

.post-page {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 30px;
}

.post-title {
    font-size: 2rem;
    margin-bottom: 10px;
}

.post-author {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 25px;
}

/* Contenu Quill */
.post-content h1,
.post-content h2,
.post-content h3 {
    margin-top: 25px;
    margin-bottom: 10px;
}

.post-content p {
    margin-bottom: 15px;
}

/* DELETE BUTTON */
.delete-form {
    margin-top: 30px;
    text-align: right;
}

.delete-btn {
    background: transparent;
    border: 1px solid #c33;
    color: #c33;
    padding: 8px 14px;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 4px;
}

.delete-btn:hover {
    background: #c33;
    color: white;
}
