/*
Theme Name: FFE SIF Custom
Description: Theme custom pour ffesif.com — Federation Francaise d'Equitation SIF
Version: 1.0
Author: rank-up.io
*/

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

:root {
    --navy: #0f1b2d;
    --navy-light: #1a2d4a;
    --navy-medium: #243b5e;
    --blue: #2563eb;
    --blue-light: #3b82f6;
    --gold: #d4a843;
    --gold-light: #e8c96a;
    --gold-pale: #fdf6e3;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-500: #64748b;
    --gray-700: #334155;
    --gray-900: #0f172a;
    --text: #1e293b;
    --text-light: #475569;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
    --max-width: 1200px;
    --content-width: 800px;
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--gray-50);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold); }
img { max-width: 100%; height: auto; display: block; }

/* ── HEADER ── */
.site-header {
    background: var(--navy);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.site-logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -.02em;
}
.site-logo span { color: var(--gold); }

/* Nav */
.main-nav { display: flex; gap: .35rem; align-items: center; }
.main-nav a {
    color: var(--white) !important;
    font-size: .78rem !important;
    font-weight: 300 !important;
    font-family: 'Inter', sans-serif !important;
    padding: .25rem .7rem !important;
    border-radius: 20px !important;
    background: var(--gold) !important;
    text-transform: uppercase !important;
    letter-spacing: .05em !important;
    transition: all .2s !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    height: 28px !important;
}
.main-nav a:hover { background: var(--gold-light) !important; color: var(--navy) !important; }
.nav-item { position: relative; }
.nav-item:hover .sub-menu { display: block; }
.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--navy-light);
    border-radius: var(--radius);
    padding: .5rem 0;
    min-width: 240px;
    box-shadow: var(--shadow-lg);
    z-index: 200;
}
.sub-menu a {
    display: block;
    padding: .5rem 1.25rem;
    font-size: .8rem;
    border-radius: 0;
}
.sub-menu a:hover { background: var(--navy-medium); }

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: .5rem;
}

/* ── HERO (homepage) ── */
.hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-medium) 50%, var(--navy-light) 100%);
    color: var(--white);
    padding: 4rem 1.5rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212,168,67,.12) 0%, transparent 70%);
    border-radius: 50%;
}
.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -.03em;
    position: relative;
}
.hero h1 span { color: var(--gold); }
.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255,255,255,.75);
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}
.hero-badges {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}
.hero-badge {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    text-align: center;
    min-width: 140px;
}
.hero-badge-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--gold);
    display: block;
}
.hero-badge-label {
    font-size: .75rem;
    color: rgba(255,255,255,.6);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-top: .25rem;
}

/* ── SECTION ── */
.section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 1.5rem;
}
.section-alt { background: var(--white); }
.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: .75rem;
    letter-spacing: -.02em;
}
.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--gold);
    margin-top: .5rem;
    border-radius: 2px;
}
.section-intro {
    color: var(--text-light);
    font-size: 1.05rem;
    max-width: 700px;
    margin-bottom: 2rem;
}

/* ── CARDS GRID ── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    padding: 1.75rem;
    transition: all .25s;
}
.card:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.card-icon {
    width: 44px;
    height: 44px;
    background: var(--gold-pale);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--gold);
}
.card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: .5rem;
    color: var(--gray-900);
}
.card p {
    color: var(--text-light);
    font-size: .9rem;
    line-height: 1.6;
}
.card ul {
    list-style: none;
    margin-top: .75rem;
}
.card ul li {
    padding: .3rem 0;
    padding-left: 1.25rem;
    position: relative;
    font-size: .875rem;
    color: var(--text-light);
}
.card ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .65rem;
    width: 6px;
    height: 6px;
    background: var(--gold);
    border-radius: 50%;
}

/* ── FEATURE BLOCKS (2 col) ── */
.features-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.feature-block {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    padding: 2rem;
}
.feature-block h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: .75rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.feature-block h3 .badge {
    background: var(--gold);
    color: var(--navy);
    font-size: .65rem;
    padding: .15rem .5rem;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.feature-block p {
    color: var(--text-light);
    font-size: .9rem;
    line-height: 1.6;
}

/* ── DISCIPLINES LIST ── */
.disciplines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: .75rem;
}
.discipline-tag {
    background: var(--navy);
    color: var(--white);
    padding: .6rem 1rem;
    border-radius: var(--radius);
    font-size: .85rem;
    font-weight: 500;
    text-align: center;
    transition: background .2s;
}
.discipline-tag:hover { background: var(--navy-light); }

/* ── ARTICLES ARCHIVE ── */
.archive-header {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-medium) 100%);
    color: var(--white);
    padding: 2.5rem 1.5rem;
    text-align: center;
}
.archive-header h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -.02em;
}
.archive-header p {
    color: rgba(255,255,255,.7);
    margin-top: .5rem;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}
.post-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    transition: all .25s;
}
.post-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--gold);
}
.post-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.post-card-body {
    padding: 1.25rem;
}
.post-card-cat {
    display: inline-block;
    background: var(--gold-pale);
    color: var(--gold);
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: .2rem .6rem;
    border-radius: 20px;
    margin-bottom: .5rem;
}
.post-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: .5rem;
    line-height: 1.4;
}
.post-card h3 a { color: inherit; }
.post-card h3 a:hover { color: var(--blue); }
.post-card-excerpt {
    font-size: .85rem;
    color: var(--text-light);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-card-footer {
    padding: .75rem 1.25rem;
    border-top: 1px solid var(--gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.post-card-date {
    font-size: .75rem;
    color: var(--gray-500);
}
.post-card-link {
    font-size: .8rem;
    font-weight: 600;
    color: var(--blue);
}

/* ── SINGLE POST ── */
.single-header {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-medium) 100%);
    color: var(--white);
    padding: 3rem 1.5rem 2rem;
    text-align: center;
}
.single-header h1 {
    font-size: 2rem;
    font-weight: 800;
    max-width: 800px;
    margin: 0 auto .75rem;
    letter-spacing: -.02em;
    line-height: 1.3;
}
.single-meta {
    color: rgba(255,255,255,.6);
    font-size: .85rem;
}
.single-meta a { color: var(--gold); }

.single-content {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    background: var(--white);
}
.single-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
    margin: 2.5rem 0 1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--gold-pale);
}
.single-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--gray-700);
    margin: 1.5rem 0 .75rem;
}
.single-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--text);
}
.single-content ul, .single-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}
.single-content li {
    margin-bottom: .4rem;
    line-height: 1.6;
}
.single-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: .9rem;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.single-content thead {
    background: var(--navy);
    color: var(--white);
}
.single-content thead th {
    padding: .75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.single-content tbody tr { border-bottom: 1px solid var(--gray-100); }
.single-content tbody tr:nth-child(even) { background: var(--gray-50); }
.single-content tbody td { padding: .65rem 1rem; }
.single-content tbody td strong { color: var(--navy); }
.single-content .wp-block-image img {
    border-radius: var(--radius);
    margin: 1.5rem 0;
}

.single-featured-img {
    max-width: var(--content-width);
    margin: -2rem auto 0;
    padding: 0 1.5rem;
    position: relative;
    z-index: 2;
}
.single-featured-img img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

/* ── SIDEBAR ── */
.content-with-sidebar {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}
.sidebar .widget {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.sidebar .widget h4 {
    font-size: .9rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--gold-pale);
}
.sidebar .widget ul { list-style: none; }
.sidebar .widget li {
    padding: .4rem 0;
    border-bottom: 1px solid var(--gray-100);
}
.sidebar .widget li:last-child { border-bottom: none; }
.sidebar .widget a { font-size: .85rem; color: var(--text-light); }
.sidebar .widget a:hover { color: var(--blue); }

/* ── PAGINATION ── */
.pagination {
    display: flex;
    justify-content: center;
    gap: .5rem;
    padding: 2rem 0;
}
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 .75rem;
    border-radius: var(--radius);
    font-size: .875rem;
    font-weight: 500;
    border: 1px solid var(--gray-200);
    color: var(--text);
    transition: all .2s;
}
.pagination a:hover { border-color: var(--gold); color: var(--gold); }
.pagination .current {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}

/* ── FOOTER ── */
.site-footer {
    background: var(--navy);
    color: rgba(255,255,255,.7);
    padding: 3rem 1.5rem 1.5rem;
}
.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
}
.footer-brand h3 {
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: .75rem;
}
.footer-brand h3 span { color: var(--gold); }
.footer-brand p { font-size: .85rem; line-height: 1.6; }
.footer-col h4 {
    color: var(--white);
    font-size: .85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 1rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: .5rem; }
.footer-col a { color: rgba(255,255,255,.6); font-size: .85rem; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
    max-width: var(--max-width);
    margin: 2rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,.1);
    text-align: center;
    font-size: .75rem;
    color: rgba(255,255,255,.4);
}

/* ── BREADCRUMB ── */
.breadcrumb {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 1.5rem;
    font-size: .8rem;
    color: var(--gray-500);
}
.breadcrumb a { color: var(--gray-500); }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb span { margin: 0 .35rem; }

/* ── PAGE TEMPLATE ── */
.page-header {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-medium) 100%);
    color: var(--white);
    padding: 2.5rem 1.5rem;
    text-align: center;
}
.page-header h1 {
    font-size: 2rem;
    font-weight: 800;
}
.page-content {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}
.page-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
    margin: 2rem 0 .75rem;
}
.page-content p { margin-bottom: 1rem; line-height: 1.8; }
.page-content ul { margin: 1rem 0; padding-left: 1.5rem; }
.page-content li { margin-bottom: .4rem; }

/* ── 404 ── */
.error-404 {
    text-align: center;
    padding: 5rem 1.5rem;
}
.error-404 h1 {
    font-size: 6rem;
    font-weight: 800;
    color: var(--gold);
    line-height: 1;
}
.error-404 p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin: 1rem 0 2rem;
}
.btn {
    display: inline-block;
    background: var(--navy);
    color: var(--white);
    padding: .65rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: .9rem;
    transition: all .2s;
}
.btn:hover { background: var(--navy-light); color: var(--white); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-light); color: var(--navy); }

/* ── LEAD FORM ── */
.lead-form {
    display: flex;
    gap: .75rem;
    max-width: 500px;
    margin: 0 auto;
    justify-content: center;
}
.lead-input {
    flex: 1;
    padding: .75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: .95rem;
    font-family: inherit;
    outline: none;
    transition: border-color .2s;
    min-width: 0;
}
.lead-input:focus { border-color: var(--gold); }
.lead-btn {
    cursor: pointer;
    border: none;
    font-family: inherit;
    white-space: nowrap;
}
.lead-form-sidebar {
    flex-direction: column;
    max-width: 100%;
}
.lead-form-sidebar .lead-input { width: 100%; }
.lead-msg.success { color: var(--gold) !important; font-weight: 600; }
.lead-msg.error { color: #ef4444 !important; }

/* Widget lead highlight */
.widget-lead {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-medium) 100%) !important;
    border-color: var(--navy) !important;
    color: var(--white);
}
.widget-lead h4 {
    color: var(--gold) !important;
    border-bottom-color: rgba(255,255,255,.15) !important;
}
.widget-lead p { color: rgba(255,255,255,.7) !important; }
.widget-lead .lead-input {
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.2);
    color: var(--white);
}
.widget-lead .lead-input::placeholder { color: rgba(255,255,255,.4); }
.widget-lead .lead-input:focus { border-color: var(--gold); }

/* ── SEARCH BAR (archive) ── */
.search-bar {
    margin-bottom: 2rem;
    position: relative;
    max-width: 500px;
}
.search-input {
    width: 100%;
    padding: .85rem 1.25rem;
    padding-right: 7rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color .2s;
    background: var(--white);
}
.search-input:focus { border-color: var(--gold); }
.search-input::placeholder { color: var(--gray-300); }
.search-count {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: .8rem;
    color: var(--gold);
    font-weight: 600;
}

/* ── CARDS GRID 4 COLUMNS ── */
.cards-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
    .cards-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .lead-form { flex-direction: column; }
    .lead-form .lead-input { width: 100%; }
}
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .hero-badges { gap: 1rem; }
    .features-2col { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; }
    .content-with-sidebar { grid-template-columns: 1fr; }
    .single-header h1 { font-size: 1.5rem; }
    .cards-grid, .cards-grid-4 { grid-template-columns: 1fr; }
    .posts-grid { grid-template-columns: 1fr; }
    .disciplines-grid { grid-template-columns: repeat(2, 1fr); }
    .main-nav { display: none; }
    .main-nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--navy);
        padding: 1rem;
        box-shadow: var(--shadow-lg);
    }
    .main-nav.open .sub-menu {
        position: static;
        box-shadow: none;
        background: var(--navy-medium);
        border-radius: 0;
        margin-top: .25rem;
    }
    .menu-toggle { display: block; }
}
