/*
Theme Name: PatteGrise
Theme URI: https://pattegrise.fr
Author: PatteGrise
Description: Thème dédié au bien-être des chiens et chats seniors. Site d'affiliation.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: pattegrise
*/

/* ========================================
   VARIABLES
======================================== */
:root {
    --color-primary: #5a8a6a;       /* vert sauge */
    --color-primary-dark: #3d6b50;
    --color-accent: #e8a87c;        /* terracotta doux */
    --color-bg: #faf8f5;            /* beige très clair */
    --color-bg-card: #ffffff;
    --color-text: #2c2c2c;
    --color-text-light: #666666;
    --color-border: #e5e0d8;
    --color-success: #4caf7d;
    --color-warning: #f0a500;

    --font-main: 'Georgia', 'Times New Roman', serif;
    --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --radius: 8px;
    --radius-lg: 16px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 6px 24px rgba(0,0,0,0.14);

    --max-width: 860px;
    --max-width-wide: 1100px;
}

/* ========================================
   RESET & BASE
======================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 17px; scroll-behavior: smooth; }

body {
    font-family: var(--font-ui);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
}

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

/* ========================================
   TYPOGRAPHIE
======================================== */
h1, h2, h3, h4 {
    font-family: var(--font-main);
    line-height: 1.3;
    color: var(--color-text);
}

h1 { font-size: 2.2rem; margin-bottom: 1rem; }
h2 { font-size: 1.7rem; margin: 2rem 0 1rem; }
h3 { font-size: 1.3rem; margin: 1.5rem 0 0.7rem; }
p  { margin-bottom: 1.1rem; }

/* ========================================
   LAYOUT
======================================== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}
.container--wide {
    max-width: var(--max-width-wide);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ========================================
   HEADER & NAV
======================================== */
.site-header {
    background: #fff;
    border-bottom: 2px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.5rem;
    max-width: var(--max-width-wide);
    margin: 0 auto;
}
.site-logo {
    font-family: var(--font-main);
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-primary);
    text-decoration: none;
}
.site-logo span { color: var(--color-accent); }

.site-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}
.site-nav a {
    font-size: 0.95rem;
    color: var(--color-text);
    font-weight: 500;
    padding: 0.4rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s, color 0.2s;
}
.site-nav a:hover,
.site-nav a.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    text-decoration: none;
}

/* Burger menu (mobile) */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    margin: 5px 0;
    transition: 0.3s;
}

/* ========================================
   FOOTER
======================================== */
.site-footer {
    background: #2c2c2c;
    color: #ccc;
    padding: 3rem 1.5rem 2rem;
    margin-top: 4rem;
    font-size: 0.9rem;
}
.site-footer__grid {
    max-width: var(--max-width-wide);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}
.site-footer a { color: #aaa; }
.site-footer a:hover { color: #fff; }
.site-footer__bottom {
    max-width: var(--max-width-wide);
    margin: 0 auto;
    border-top: 1px solid #444;
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.82rem;
    color: #888;
}
.affiliate-disclaimer {
    background: #3a3a3a;
    border-left: 3px solid var(--color-accent);
    padding: 0.8rem 1rem;
    margin-top: 1.5rem;
    font-size: 0.82rem;
    color: #aaa;
    border-radius: 0 var(--radius) var(--radius) 0;
}

/* ========================================
   BOUTONS CTA
======================================== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.8rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    text-decoration: none;
    border: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn--primary { background: var(--color-primary); color: #fff; }
.btn--primary:hover { background: var(--color-primary-dark); color: #fff; }
.btn--accent { background: var(--color-accent); color: #fff; }
.btn--outline { background: transparent; border: 2px solid var(--color-primary); color: var(--color-primary); }
.btn--lg { padding: 1rem 2.4rem; font-size: 1.1rem; }
.btn--block { display: block; width: 100%; text-align: center; }

/* ========================================
   CARDS
======================================== */
.card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    transition: box-shadow 0.2s;
}
.card:hover { box-shadow: var(--shadow-hover); }

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

/* ========================================
   HERO (page d'accueil)
======================================== */
.hero {
    position: relative;
    background-color: #2d4a35;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 5rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
}
.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        rgba(28, 52, 34, 0.72) 0%,
        rgba(22, 44, 28, 0.78) 100%
    );
}
.hero h1 {
    font-size: 2.5rem;
    color: #fff !important;
    max-width: 700px;
    margin: 0 auto 1rem;
    text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.hero p.lead {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.92) !important;
    max-width: 580px;
    margin: 0 auto 2rem;
}
.hero .btn--outline {
    border-color: rgba(255,255,255,0.8);
    color: #fff;
}
.hero .btn--outline:hover {
    background: rgba(255,255,255,0.15);
    border-color: #fff;
    color: #fff;
    text-decoration: none;
}
.hero__badges {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}
.badge {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 50px;
    padding: 0.4rem 1rem;
    font-size: 0.88rem;
    color: var(--color-text-light);
}

/* ========================================
   COMPARATIF TABLE
======================================== */
.comparatif-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
}
.comparatif-table th {
    background: var(--color-primary);
    color: #fff;
    padding: 0.9rem 1rem;
    text-align: left;
    font-weight: 600;
}
.comparatif-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}
.comparatif-table tr:hover td { background: #f5f9f6; }
.comparatif-table .rank-1 { border-left: 4px solid var(--color-success); }
.comparatif-table .rank-2 { border-left: 4px solid var(--color-warning); }
.comparatif-table .rank-3 { border-left: 4px solid #aaa; }

.stars { color: var(--color-warning); letter-spacing: 2px; }

.product-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: #fff;
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 1.5rem;
    align-items: center;
}
.product-card.featured { border-color: var(--color-primary); box-shadow: 0 0 0 2px var(--color-primary); }
.product-card__badge {
    background: var(--color-primary);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.25rem 0.7rem;
    border-radius: 50px;
    display: inline-block;
    margin-bottom: 0.5rem;
}
.product-card__img { width: 100px; height: 100px; object-fit: contain; border-radius: var(--radius); }
.product-card__pros { list-style: none; }
.product-card__pros li::before { content: "✓ "; color: var(--color-success); font-weight: bold; }

/* ========================================
   GUIDE / SOMMAIRE
======================================== */
.toc {
    background: #f0f5f1;
    border: 1px solid #c8dece;
    border-radius: var(--radius);
    padding: 1.2rem 1.5rem;
    margin: 2rem 0;
    font-size: 0.95rem;
}
.toc h3 { margin: 0 0 0.8rem; font-size: 1rem; color: var(--color-primary); }
.toc ol { padding-left: 1.2rem; }
.toc li { margin-bottom: 0.4rem; }
.toc a { color: var(--color-text); }
.toc a:hover { color: var(--color-primary); }

.tip-box {
    background: #f0f5f1;
    border-left: 4px solid var(--color-primary);
    padding: 1rem 1.2rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 1.5rem 0;
}
.warning-box {
    background: #fff8ee;
    border-left: 4px solid var(--color-warning);
    padding: 1rem 1.2rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 1.5rem 0;
}

/* FAQ */
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-question {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 1.1rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-question::after { content: "+"; font-size: 1.4rem; color: var(--color-primary); }
.faq-question.open::after { content: "−"; }
.faq-answer { display: none; padding: 0 0 1rem; color: var(--color-text-light); }
.faq-answer.open { display: block; }

/* ========================================
   BREADCRUMB
======================================== */
.breadcrumb {
    font-size: 0.85rem;
    color: var(--color-text-light);
    padding: 1rem 0 0.5rem;
}
.breadcrumb a { color: var(--color-text-light); }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb span { margin: 0 0.4rem; }

/* ========================================
   PAGE CONTENT
======================================== */
.page-content { padding: 2.5rem 0 4rem; }
.entry-header { margin-bottom: 2rem; }
.entry-meta {
    font-size: 0.88rem;
    color: var(--color-text-light);
    margin-top: 0.5rem;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 768px) {
    html { font-size: 16px; }
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.4rem; }

    .site-nav { display: none; }
    .site-nav.open { display: block; position: absolute; top: 100%; left: 0; right: 0; background: #fff; padding: 1rem 1.5rem; border-top: 1px solid var(--color-border); box-shadow: var(--shadow); }
    .site-nav.open ul { flex-direction: column; gap: 0; }
    .site-nav.open a { display: block; padding: 0.7rem 0; border-bottom: 1px solid var(--color-border); }
    .nav-toggle { display: block; }

    .hero h1 { font-size: 1.8rem; }

    .product-card { grid-template-columns: 1fr; }
    .product-card__img { width: 80px; height: 80px; }

    .comparatif-table { font-size: 0.85rem; }
    .comparatif-table th, .comparatif-table td { padding: 0.6rem 0.5rem; }

    .site-footer__grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hero { padding: 2.5rem 1rem; }
    .container { padding: 0 1rem; }
}
