:root {
    --green: #2d5a3d;
    --green-light: #4a7c59;
    --cream: #faf8f4;
    --cream-dark: #f0ebe3;
    --text: #1a2e22;
    --muted: #5c6b62;
    --white: #ffffff;
    --shadow: 0 4px 24px rgba(45, 90, 61, 0.08);
    --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--cream);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-light); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--cream-dark);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 1rem;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--green);
}

.logo span { color: var(--green-light); font-weight: 400; }

.main-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.main-nav a {
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
}

.main-nav a:hover, .main-nav a.active { color: var(--green); }

.cart-link {
    position: relative;
    background: var(--green);
    color: var(--white) !important;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.9rem;
}

.cart-link:hover { background: var(--green-light); color: var(--white) !important; }

.cart-badge {
    background: #c9a227;
    color: var(--text);
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    margin-left: 0.35rem;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--green) 0%, #3d7350 50%, var(--green-light) 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 1rem; font-weight: 300; }
.hero p { font-size: 1.15rem; opacity: 0.95; max-width: 600px; margin: 0 auto 2rem; }
.hero .btn { background: var(--white); color: var(--green); }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--green);
    color: var(--white);
    border: none;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: transform 0.15s, background 0.15s;
}

.btn:hover { background: var(--green-light); color: var(--white); transform: translateY(-1px); }
.btn-outline { background: transparent; border: 2px solid var(--green); color: var(--green); }
.btn-outline:hover { background: var(--green); color: var(--white); }
.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    min-height: 2.5rem;
    line-height: 1.25;
    box-sizing: border-box;
}

.product-card .actions .btn:not(.btn-outline) {
    border: 2px solid transparent;
}

/* Sections */
.section { padding: 3rem 0; }
.section-title { font-size: 1.75rem; margin-bottom: 0.5rem; color: var(--green); }
.section-sub { color: var(--muted); margin-bottom: 2rem; }

/* Grid */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* Product card */
.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover { transform: translateY(-4px); }

.product-card > a:first-child {
    display: block;
    flex-shrink: 0;
}

.product-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: var(--cream-dark);
}

.product-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.product-card .category { font-size: 0.75rem; text-transform: uppercase; color: var(--muted); letter-spacing: 0.05em; }
.product-card h3 {
    font-size: 1.1rem;
    margin: 0.35rem 0;
    line-height: 1.35;
    flex: 1;
}

.product-card .price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--green);
    margin-top: 0.25rem;
}

.product-card .actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1rem;
    align-items: stretch;
}

.product-card .actions > a,
.product-card .actions > form {
    flex: 1;
    min-width: 0;
    display: flex;
    margin: 0;
}

.product-card .actions .btn {
    flex: 1;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
}

/* Filters */
.filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.filter-chip {
    padding: 0.4rem 1rem;
    border-radius: 999px;
    background: var(--white);
    border: 1px solid var(--cream-dark);
    color: var(--text);
    font-size: 0.9rem;
}

.filter-chip:hover, .filter-chip.active {
    background: var(--green);
    color: var(--white);
    border-color: var(--green);
}

/* Product detail */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 768px) {
    .product-detail { grid-template-columns: 1fr; }
}

.product-detail img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.product-detail .price { font-size: 2rem; color: var(--green); font-weight: 700; margin: 1rem 0; }
.benefits { list-style: none; margin: 1rem 0; }
.benefits li::before { content: "✓ "; color: var(--green); font-weight: bold; }

/* Blog */
.post-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.post-card img { width: 100%; height: 180px; object-fit: cover; }
.post-card-body { padding: 1.25rem; }
.post-card .date { font-size: 0.8rem; color: var(--muted); }

.article-content { max-width: 720px; margin: 0 auto; }
.article-content h2 { margin: 1.5rem 0 0.75rem; color: var(--green); }
.article-content p { margin-bottom: 1rem; }
.article-hero img { width: 100%; max-height: 400px; object-fit: cover; border-radius: var(--radius); margin-bottom: 2rem; }

/* Videos */
.video-grid { display: grid; gap: 1.25rem; }

.video-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1100px) {
    .video-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .video-grid-4 { grid-template-columns: 1fr; }
}

.video-item-title {
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
    line-height: 1.35;
}

.video-item-body p {
    font-size: 0.85rem;
}

.video-item {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
}

.video-item-body { padding: 1.25rem; }

/* Cart */
.cart-table { width: 100%; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.cart-table th, .cart-table td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--cream-dark); }
.cart-table img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; }
.cart-total { text-align: right; font-size: 1.5rem; font-weight: 700; color: var(--green); margin-top: 1.5rem; }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.35rem; font-weight: 500; }
.form-control {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--cream-dark);
    border-radius: 8px;
    font-size: 1rem;
}

textarea.form-control { min-height: 120px; }

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-success { background: #e8f5e9; color: #2e7d32; }
.alert-error { background: #ffebee; color: #c62828; }

/* Footer */
.site-footer {
    background: var(--green);
    color: var(--white);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.site-footer a { color: rgba(255,255,255,0.85); }
.site-footer a:hover { color: var(--white); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-bottom { text-align: center; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.2); font-size: 0.9rem; opacity: 0.8; }

/* Search */
.search-bar { display: flex; gap: 0.5rem; margin-bottom: 2rem; max-width: 400px; }
.search-bar input { flex: 1; }

/* Pagination */
.pagination { display: flex; gap: 0.5rem; justify-content: center; margin-top: 2rem; flex-wrap: wrap; }
.pagination a, .pagination span {
    padding: 0.5rem 0.85rem;
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--cream-dark);
}
.pagination .active span { background: var(--green); color: var(--white); border-color: var(--green); }

/* Admin */
.admin-header { background: #1a2e22; color: white; padding: 1rem 0; margin-bottom: 2rem; }
.admin-table { width: 100%; background: white; border-radius: var(--radius); box-shadow: var(--shadow); border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--cream-dark); }

/* Admin dashboard layout */
.admin-body {
    display: flex;
    min-height: 100vh;
    background: var(--cream);
}

.admin-sidebar {
    width: 240px;
    background: var(--green);
    color: white;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.admin-brand {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: white !important;
    margin-bottom: 2rem;
    display: block;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}

.admin-nav a {
    color: rgba(255, 255, 255, 0.85) !important;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    font-size: 0.95rem;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: rgba(255, 255, 255, 0.15);
    color: white !important;
}

.admin-logout { margin-top: auto; padding-top: 1rem; }

.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-topbar {
    background: white;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--cream-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-topbar h1 {
    font-size: 1.25rem;
    color: var(--green);
    font-weight: 600;
}

.admin-user {
    font-size: 0.9rem;
    color: var(--muted);
}

.admin-content {
    padding: 1.5rem;
}

.admin-alert {
    margin: 1rem 1.5rem 0;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.admin-stat-card {
    background: white;
    padding: 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.admin-stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--green);
}

.admin-stat-label {
    font-size: 0.85rem;
    color: var(--muted);
}

.admin-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.admin-action-card {
    background: white;
    padding: 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    color: var(--text) !important;
    border: 1px solid transparent;
    transition: border-color 0.15s;
}

.admin-action-card:hover {
    border-color: var(--green);
    color: var(--green) !important;
}

.admin-action-card span {
    font-size: 0.85rem;
    color: var(--muted);
}

.admin-action-card-accent {
    border: 2px dashed var(--green-light);
    background: #f4faf6;
}

.admin-form-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.admin-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--green) 0%, #3d7350 100%);
    padding: 1.25rem;
}

.admin-login-card {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 400px;
}

.admin-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
}

.admin-preview-img {
    max-width: 120px;
    margin-top: 0.75rem;
    border-radius: 8px;
    display: block;
}

.admin-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-checkboxes label {
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-editor {
    font-family: ui-monospace, monospace;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .admin-body { flex-direction: column; }
    .admin-sidebar { width: 100%; }
    .admin-nav { flex-direction: row; flex-wrap: wrap; }
    .admin-logout { margin-top: 1rem; }
}

.empty-state { text-align: center; padding: 3rem; color: var(--muted); }

/* Commentaires blog */
.comments-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--cream-dark);
    max-width: 720px;
}

.comments-list { list-style: none; margin-bottom: 2rem; }

.comment-item {
    background: var(--white);
    padding: 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.comment-header time { font-size: 0.8rem; color: var(--muted); }

.comment-item p { color: var(--text); }

.comments-empty { color: var(--muted); margin-bottom: 1.5rem; font-style: italic; }

.comment-form-wrap {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.comment-form-wrap h3 { margin-bottom: 1rem; color: var(--green); font-size: 1.1rem; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 600px) {
    .form-row { grid-template-columns: 1fr; }
}

.form-error { color: #c62828; font-size: 0.85rem; margin-top: 0.25rem; }

/* Témoignages — 4 sur une ligne */
.testimonials-section {
    background: var(--white);
}

.testimonials-section .testimonials-intro {
    margin-bottom: 1.5rem;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    align-items: stretch;
}

.testimonials-grid .testimonial-card {
    background: var(--cream);
    padding: 1.25rem;
    border-radius: var(--radius);
    border-left: 4px solid var(--green);
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    min-height: 200px;
    box-sizing: border-box;
}

@media (max-width: 900px) {
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

.testimonial-stars { color: #ddd; font-size: 1.1rem; letter-spacing: 2px; }
.testimonial-stars .star.filled { color: #c9a227; }

.testimonial-text {
    font-style: italic;
    color: var(--text);
    flex: 1;
    line-height: 1.65;
}

.testimonial-author { font-size: 0.9rem; }
.testimonial-location { color: var(--muted); font-weight: normal; }

.testimonial-product {
    display: block;
    font-size: 0.8rem;
    color: var(--green);
    font-style: normal;
    margin-top: 0.25rem;
}
