/*
Theme Name: Poneys France
Theme URI: https://poneys-france.fr
Description: Le monde des poneys — Annuaire clubs, races, galops FFE et quiz pour jeunes cavaliers
Version: 1.0
Author: Poneys France
Text Domain: poneys-france
*/

/* ============================
   CSS CUSTOM PROPERTIES
   ============================ */
:root {
    --primary: #16a34a;
    --primary-dark: #15803d;
    --primary-darker: #166534;
    --primary-light: #dcfce7;
    --primary-pale: #f0fdf4;
    --accent: #d97706;
    --accent-dark: #b45309;
    --accent-light: #fef3c7;
    --quiz: #7c3aed;
    --quiz-light: #ede9fe;
    --bg: #f8faf8;
    --white: #ffffff;
    --text: #1a1a2e;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --max-width: 1200px;
    --content-width: 780px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    --transition: 0.2s ease;
}

/* ============================
   RESET & BASE
   ============================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-serif); line-height: 1.3; color: var(--text); }

/* ============================
   LAYOUT
   ============================ */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.content-width { max-width: var(--content-width); margin: 0 auto; padding: 0 24px; }

/* ============================
   HEADER
   ============================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}
.site-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
    flex-shrink: 0;
}
.site-brand span { color: var(--primary); }
.main-nav { display: flex; gap: 4px; list-style: none; align-items: center; }
.main-nav a {
    padding: 8px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    transition: all var(--transition);
    white-space: nowrap;
}
.main-nav a:hover, .main-nav a.current {
    background: var(--primary-light);
    color: var(--primary);
}
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    margin: 5px 0;
    border-radius: 2px;
    transition: var(--transition);
}

/* ============================
   HERO
   ============================ */
.hero {
    background: linear-gradient(135deg, rgba(22,163,74,0.88), rgba(21,128,61,0.82)), url('https://images.unsplash.com/photo-1553284965-83fd3e82fa5a?w=1400&h=600&fit=crop&q=80') center/cover no-repeat;
    color: #fff;
    padding: 80px 0 90px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    color: #fff;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}
.hero p {
    font-size: 1.15rem;
    opacity: 0.92;
    max-width: 650px;
    margin: 0 auto 32px;
    position: relative;
    z-index: 1;
}
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    position: relative;
    z-index: 1;
}
.hero-stats .stat { text-align: center; }
.hero-stats .stat-number { font-size: 1.8rem; font-weight: 700; }
.hero-stats .stat-label { font-size: 0.85rem; opacity: 0.8; }

/* ============================
   BUTTONS
   ============================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition);
    cursor: pointer;
    border: none;
    text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-white { background: #fff; color: var(--primary-dark); }
.btn-white:hover { background: var(--primary-light); color: var(--primary-darker); transform: translateY(-2px); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); color: #fff; transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-quiz { background: var(--quiz); color: #fff; }
.btn-quiz:hover { background: #6d28d9; color: #fff; transform: translateY(-2px); }

/* ============================
   SECTIONS
   ============================ */
.section { padding: 72px 0; }
.section-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    text-align: center;
    margin-bottom: 12px;
}
.section-desc {
    text-align: center;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 48px;
}

/* ============================
   FEATURE CARDS (homepage)
   ============================ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.feature-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all var(--transition);
}
a.feature-card { text-decoration: none; color: inherit; display: block; }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-card-icon { font-size: 2.5rem; margin-bottom: 16px; }
.feature-card h3 { font-family: var(--font); font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }
.feature-card p { color: var(--text-light); font-size: 0.88rem; line-height: 1.6; }

/* ============================
   SEARCH BAR
   ============================ */
.search-hero {
    background: var(--primary-light);
    padding: 48px 24px;
    text-align: center;
    border-radius: var(--radius);
    margin: -40px 24px 0;
    position: relative;
    z-index: 2;
    box-shadow: var(--shadow-md);
}
.search-hero h2 { font-size: 1.4rem; margin-bottom: 16px; }
.search-bar {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    gap: 8px;
}
.search-bar input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid var(--border);
    border-radius: 50px;
    font-size: 1rem;
    font-family: var(--font);
    outline: none;
    transition: border-color var(--transition);
}
.search-bar input:focus { border-color: var(--primary); }
.search-bar button {
    padding: 14px 28px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
}
.search-bar button:hover { background: var(--primary-dark); }

/* ============================
   ARTICLE CARDS
   ============================ */
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.article-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all var(--transition);
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.article-card-img { aspect-ratio: 16/10; overflow: hidden; background: var(--primary-light); }
.article-card-img img { width: 100%; height: 100%; object-fit: cover; }
.article-card-img-placeholder {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-pale));
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: var(--primary);
}
.article-card-body { padding: 20px; }
.article-card-cats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.article-card-cats a {
    font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
    color: var(--primary); background: var(--primary-light);
    padding: 3px 10px; border-radius: 50px;
}
.article-card-body h3 { font-family: var(--font); font-size: 1.05rem; font-weight: 600; line-height: 1.4; margin-bottom: 10px; }
.article-card-body h3 a { color: var(--text); }
.article-card-body h3 a:hover { color: var(--primary); }
.article-card-meta { display: flex; gap: 16px; font-size: 0.82rem; color: var(--text-muted); }

.article-card.featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.2fr 1fr; }
.article-card.featured .article-card-img { aspect-ratio: auto; min-height: 280px; }
.article-card.featured .article-card-body { padding: 32px; display: flex; flex-direction: column; justify-content: center; }
.article-card.featured h3 { font-size: 1.4rem; }

/* ============================
   CTA SECTION
   ============================ */
.cta-section {
    background: linear-gradient(135deg, var(--primary-darker), var(--primary));
    color: #fff;
    text-align: center;
    padding: 64px 24px;
    border-radius: var(--radius);
    margin: 0 24px;
}
.cta-section h2 { color: #fff; font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 12px; }
.cta-section p { opacity: 0.9; margin-bottom: 28px; max-width: 500px; margin-left: auto; margin-right: auto; }

/* ============================
   SINGLE POST / PAGE
   ============================ */
.post-header { text-align: center; padding: 48px 0 32px; }
.post-header .post-cats { display: flex; gap: 8px; justify-content: center; margin-bottom: 16px; }
.post-header .post-cats a { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; color: var(--primary); background: var(--primary-light); padding: 4px 14px; border-radius: 50px; }
.post-header h1 { font-size: clamp(1.6rem, 4vw, 2.6rem); max-width: 800px; margin: 0 auto 16px; }
.post-meta { display: flex; gap: 20px; justify-content: center; color: var(--text-muted); font-size: 0.9rem; }
.post-thumbnail { max-width: 900px; margin: 0 auto 40px; border-radius: var(--radius); overflow: hidden; }
.post-content { max-width: var(--content-width); margin: 0 auto; padding: 0 24px; }
.post-content p { margin-bottom: 1.4em; }
.post-content h2 { font-size: 1.6rem; margin: 2em 0 0.8em; }
.post-content h3 { font-size: 1.3rem; margin: 1.5em 0 0.6em; }
.post-content ul, .post-content ol { margin: 0 0 1.4em 1.5em; }
.post-content li { margin-bottom: 0.4em; }
.post-content img { border-radius: var(--radius-sm); margin: 1.5em 0; }
.post-content blockquote { border-left: 4px solid var(--primary); padding: 16px 24px; margin: 1.5em 0; background: var(--primary-pale); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-style: italic; }
.post-content a { text-decoration: underline; }
.post-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
.post-content th, .post-content td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
.post-content th { background: var(--primary-pale); font-weight: 600; font-size: 0.9rem; }
.post-content tr:hover td { background: var(--primary-pale); }
.post-nav { max-width: var(--content-width); margin: 48px auto; padding: 0 24px; display: flex; justify-content: space-between; gap: 24px; }
.post-nav a { font-size: 0.9rem; font-weight: 500; padding: 12px 20px; background: var(--white); border-radius: var(--radius-sm); box-shadow: var(--shadow); transition: all var(--transition); }
.post-nav a:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* Page */
.page-header { text-align: center; padding: 48px 0 32px; }
.page-header h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
.page-content { max-width: var(--content-width); margin: 0 auto; padding: 0 24px 48px; }

/* Archive */
.archive-header { text-align: center; padding: 48px 0 40px; }
.archive-header h1 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 8px; }
.archive-header p { color: var(--text-light); max-width: 600px; margin: 0 auto; }
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 48px; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; font-size: 0.9rem; font-weight: 500; background: var(--white); color: var(--text); box-shadow: var(--shadow); transition: all var(--transition); }
.pagination a:hover { background: var(--primary-light); color: var(--primary); }
.pagination .current { background: var(--primary); color: #fff; }

/* Search */
.search-form-inline { display: flex; max-width: 500px; margin: 0 auto 40px; gap: 8px; }
.search-form-inline input[type="search"] { flex: 1; padding: 12px 20px; border: 2px solid var(--border); border-radius: 50px; font-size: 1rem; font-family: var(--font); outline: none; transition: border-color var(--transition); }
.search-form-inline input[type="search"]:focus { border-color: var(--primary); }
.search-form-inline button { padding: 12px 24px; background: var(--primary); color: #fff; border: none; border-radius: 50px; font-weight: 600; cursor: pointer; transition: background var(--transition); }
.search-form-inline button:hover { background: var(--primary-dark); }

/* 404 */
.error-404 { text-align: center; padding: 80px 24px; }
.error-404 h1 { font-size: 4rem; color: var(--primary); margin-bottom: 16px; }
.error-404 p { color: var(--text-light); margin-bottom: 32px; font-size: 1.1rem; }

/* ============================
   FOOTER
   ============================ */
.site-footer {
    background: var(--text);
    color: rgba(255,255,255,0.7);
    padding: 64px 0 0;
    margin-top: 72px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}
.footer-brand p { font-size: 0.9rem; line-height: 1.7; margin-top: 12px; }
.footer-col h4 { color: #fff; font-family: var(--font); font-size: 0.95rem; font-weight: 600; margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: rgba(255,255,255,0.7); font-size: 0.9rem; transition: color var(--transition); }
.footer-col a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 48px; padding: 20px 24px;
    text-align: center; font-size: 0.85rem;
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 1024px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .articles-grid { grid-template-columns: 1fr 1fr; }
    .article-card.featured { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .hero-stats { gap: 24px; }
}
@media (max-width: 700px) {
    .main-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--white); flex-direction: column; padding: 16px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md); }
    .main-nav.open { display: flex; }
    .mobile-toggle { display: block; }
    .features-grid { grid-template-columns: 1fr; }
    .articles-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero { padding: 56px 0 64px; }
    .hero-stats { flex-direction: column; gap: 16px; }
    .section { padding: 48px 0; }
    .post-nav { flex-direction: column; }
    .search-bar { flex-direction: column; }
}
