/* ============================
   Directory Page - Stylesheet
   ============================ */

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #373737;
    background: #fff;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
a { color: #dda83f; text-decoration: none; transition: color .2s; }
a:hover { color: #c4922e; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
h1, h2, h3, h4 { font-family: 'Jost', sans-serif; font-weight: 700; line-height: 1.3; color: #1a1a2e; }

/* Container */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ============================
   Header
   ============================ */
.site-header {
    background: #fff;
    border-bottom: 2px solid #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    padding-bottom: 12px;
}
.logo img { height: 48px; width: auto; }
.main-nav ul { display: flex; gap: 8px; }
.main-nav a {
    font-family: 'Jost', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    color: #373737;
    padding: 8px 18px;
    border-radius: 6px;
    transition: background .2s, color .2s;
}
.main-nav a:hover, .main-nav a.active {
    background: #dda83f;
    color: #fff;
}

/* Menu toggle (mobile) */
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.menu-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: #373737;
    margin: 5px 0;
    border-radius: 2px;
    transition: transform .3s, opacity .3s;
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* ============================
   Hero (Home)
   ============================ */
.hero {
    text-align: center;
    padding: 50px 0 40px;
}
.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 12px;
}
.hero h1 strong { color: #dda83f; }
.hero p {
    font-size: 1.15rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================
   Cards Grid
   ============================ */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    margin: 30px 0 50px;
}
.articles-grid--small {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.06);
    transition: transform .25s, box-shadow .25s;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,.10);
}
.card-image {
    display: block;
    overflow: hidden;
    aspect-ratio: 16/10;
}
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}
.card:hover .card-image img { transform: scale(1.05); }
.card-body { padding: 20px; }
.card-category {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.card-category a { color: #fff; }
.card-body time {
    display: block;
    font-size: .82rem;
    color: #999;
    margin: 8px 0 6px;
}
.card-body h2, .card-body h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}
.card-body h2 a, .card-body h3 a { color: #1a1a2e; }
.card-body h2 a:hover, .card-body h3 a:hover { color: #dda83f; }
.card-body p {
    font-size: .92rem;
    color: #666;
    line-height: 1.6;
}

/* ============================
   Article Single
   ============================ */
.article-single { max-width: 800px; margin: 0 auto; padding: 30px 0; }
.article-header { margin-bottom: 25px; }
.article-category {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: .82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 12px;
}
.article-category a { color: #fff; }
.article-header h1 { font-size: 2rem; margin-bottom: 10px; }
.article-header time { font-size: .9rem; color: #999; }
.article-image { margin: 20px 0 30px; border-radius: 12px; overflow: hidden; }
.article-image img { width: 100%; height: auto; }

.article-content { font-size: 1.05rem; line-height: 1.85; }
.article-content h2 {
    font-size: 1.5rem;
    margin: 35px 0 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}
.article-content h3 { font-size: 1.2rem; margin: 25px 0 12px; }
.article-content p { margin-bottom: 18px; }
.article-content ul, .article-content ol { margin: 15px 0; padding-left: 25px; }
.article-content li { margin-bottom: 8px; }
.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content strong { color: #1a1a2e; }
.article-content blockquote {
    border-left: 4px solid #dda83f;
    padding: 15px 20px;
    margin: 20px 0;
    background: #fdf8ef;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #555;
}

/* "Lire aussi" inline blocks (from original WordPress) */
.lire-aussi {
    background: #eaeaea;
    border-left: 4px solid #34495E;
    padding: 12px 18px;
    margin: 20px 0;
    border-radius: 0 6px 6px 0;
}
.lire-aussi strong { color: #34495E; }
.lire-aussi a { color: #1a1a2e; font-weight: 600; }
.lire-aussi a:hover { color: #dda83f; }

/* Internal links box */
.article-internal-links {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin: 35px 0;
    border-left: 4px solid #dda83f;
}
.article-internal-links h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: #1a1a2e;
}
.article-internal-links ul { list-style: none; padding: 0; }
.article-internal-links li { margin-bottom: 8px; }
.article-internal-links a {
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.article-internal-links a::before { content: '\2192'; }

/* Related articles */
.related-articles { margin: 50px 0 30px; }
.related-articles h2 { font-size: 1.4rem; margin-bottom: 20px; text-align: center; }

/* ============================
   Category Page
   ============================ */
.category-header { text-align: center; padding: 40px 0 20px; }
.category-header h1 { font-size: 2rem; margin-bottom: 10px; }
.category-description { font-size: 1.1rem; color: #666; max-width: 600px; margin: 0 auto 10px; }
.article-count { font-size: .9rem; color: #999; }

/* ============================
   Pagination
   ============================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 30px 0 50px;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: .95rem;
}
.pagination a {
    background: #f8f9fa;
    color: #373737;
    transition: background .2s;
}
.pagination a:hover { background: #dda83f; color: #fff; }
.pagination .current { background: #dda83f; color: #fff; }

/* ============================
   Page Content (mentions légales, sitemap)
   ============================ */
.page-content { max-width: 800px; margin: 30px auto; padding: 0 0 40px; }
.page-content h1 { font-size: 2rem; margin-bottom: 25px; }
.page-content h2 { font-size: 1.4rem; margin: 30px 0 12px; color: #dda83f; }
.page-content p { margin-bottom: 15px; line-height: 1.8; }
.page-content ul { padding-left: 20px; margin: 10px 0 20px; }
.page-content li { margin-bottom: 6px; }
.page-content li a { font-weight: 500; }

.sitemap-section { margin-bottom: 25px; }
.sitemap-section ul { list-style: disc; padding-left: 25px; }

/* ============================
   Breadcrumb
   ============================ */
.breadcrumb {
    font-size: .85rem;
    color: #999;
    padding: 20px 0;
    margin-top: 30px;
    border-top: 1px solid #f0f0f0;
}
.breadcrumb a { color: #dda83f; }

/* ============================
   404
   ============================ */
.page-404 { text-align: center; padding: 60px 0; }
.page-404 h1 { font-size: 3rem; margin-bottom: 15px; }
.page-404 p { font-size: 1.15rem; color: #666; margin-bottom: 25px; }
.actions-404 { display: flex; gap: 15px; justify-content: center; margin-bottom: 50px; }
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    background: #dda83f;
    color: #fff;
    transition: background .2s;
}
.btn:hover { background: #c4922e; color: #fff; }
.btn--outline { background: transparent; border: 2px solid #dda83f; color: #dda83f; }
.btn--outline:hover { background: #dda83f; color: #fff; }

/* ============================
   Footer
   ============================ */
.site-footer {
    background: #1a1a2e;
    color: #ccc;
    padding: 50px 0 0;
    margin-top: 60px;
}
.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 35px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-logo img { filter: brightness(1.2); margin-bottom: 12px; }
.footer-info p { font-size: .92rem; line-height: 1.6; }
.site-footer h3 {
    color: #dda83f;
    font-size: 1rem;
    margin-bottom: 14px;
    font-family: 'Jost', sans-serif;
}
.footer-nav a, .footer-links a {
    color: #ccc;
    font-size: .92rem;
    display: block;
    padding: 4px 0;
    transition: color .2s;
}
.footer-nav a:hover, .footer-links a:hover { color: #dda83f; }
.footer-bottom {
    text-align: center;
    padding: 20px 0;
    font-size: .85rem;
    color: #888;
}

/* Back to top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: #dda83f;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility .3s, transform .3s;
    box-shadow: 0 3px 12px rgba(0,0,0,.15);
    z-index: 90;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-3px); color: #fff; }

/* ============================
   Responsive
   ============================ */
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 8px 20px rgba(0,0,0,.08);
        padding: 15px;
    }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; gap: 4px; }
    .main-nav a { display: block; padding: 12px 18px; }

    .hero h1 { font-size: 1.6rem; }
    .articles-grid { grid-template-columns: 1fr; gap: 20px; }
    .article-header h1 { font-size: 1.5rem; }
    .footer-content { grid-template-columns: 1fr; gap: 25px; }
    .actions-404 { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
    .container { padding: 0 15px; }
    .hero { padding: 30px 0 25px; }
    .card-body { padding: 15px; }
    .article-content { font-size: 1rem; }
}
