/*
Theme Name: OPEX Presse
Theme URI: https://opex-presse.com
Author: OPEX Presse
Description: Thème éditorial du site d'information OPEX Presse. Rapide, lisible, optimisé SEO.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: opexpresse
*/

:root {
    --ink: #101418;
    --paper: #ffffff;
    --accent: #c8102e;
    --navy: #0c1e34;
    --muted: #5f6b76;
    --line: #e6e9ec;
    --bg-soft: #f5f6f7;
    --serif: Georgia, 'Times New Roman', serif;
    --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --maxw: 1160px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--sans);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.6;
    font-size: 17px;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.skip-link {
    position: absolute; left: -9999px;
}
.skip-link:focus {
    left: 10px; top: 10px; background: var(--navy); color: #fff;
    padding: 8px 16px; z-index: 999;
}

/* ---------- Header ---------- */
.topbar {
    background: var(--navy);
    color: #cfd8e3;
    font-size: 13px;
}
.topbar .container {
    display: flex; justify-content: space-between; align-items: center;
    min-height: 34px; gap: 16px;
}
.topbar a { color: #fff; }
.topbar a:hover { color: #ffd7dd; }

.site-head { border-bottom: 1px solid var(--line); }
.site-head .container {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 22px; padding-bottom: 22px; gap: 20px; flex-wrap: wrap;
}
.brand { display: flex; flex-direction: column; gap: 2px; }
.brand-title {
    font-family: var(--serif);
    font-size: 40px; font-weight: 700; letter-spacing: -1px;
    line-height: 1; color: var(--navy);
}
.brand-title .brand-accent { color: var(--accent); }
.brand-tagline { color: var(--muted); font-size: 14px; }

/* ---------- Nav ---------- */
.site-nav {
    border-bottom: 3px solid var(--navy);
    background: #fff;
    position: sticky; top: 0; z-index: 50;
}
.site-nav .container { display: flex; align-items: center; }
.nav-toggle {
    display: none; background: none; border: 0; font-size: 26px;
    padding: 10px 14px; cursor: pointer; color: var(--navy);
}
.nav-menu {
    display: flex; list-style: none; gap: 4px; flex-wrap: wrap;
}
.nav-menu li a {
    display: block; padding: 14px 16px;
    font-weight: 600; font-size: 15px; text-transform: uppercase;
    letter-spacing: 0.4px; color: var(--navy);
}
.nav-menu li a:hover { color: var(--accent); }
.nav-menu li.nav-cta a { color: var(--accent); }

@media (max-width: 800px) {
    .brand-title { font-size: 30px; }
    .nav-toggle { display: block; }
    .nav-menu { display: none; flex-direction: column; width: 100%; padding-bottom: 10px; }
    .nav-menu.is-open { display: flex; }
}

/* ---------- Sections ---------- */
.section-title {
    font-family: var(--serif); font-size: 22px; color: var(--navy);
    border-left: 5px solid var(--accent); padding-left: 12px;
    margin: 38px 0 20px;
}

/* ---------- Hero ---------- */
.hero { margin-top: 30px; }
.hero-card {
    display: grid; grid-template-columns: 3fr 2fr; gap: 0;
    background: var(--navy); color: #fff; border-radius: 6px; overflow: hidden;
}
.hero-card .hero-media { min-height: 320px; background: #22354d; }
.hero-card .hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-card .hero-body { padding: 34px; display: flex; flex-direction: column; justify-content: center; }
.hero-card h2 {
    font-family: var(--serif); font-size: 30px; line-height: 1.25; margin: 10px 0 14px;
}
.hero-card h2 a { color: #fff; }
.hero-card h2 a:hover { color: #ffd7dd; }
.hero-card .excerpt { color: #c9d4e0; font-size: 15px; }
.hero-card .meta { color: #8fa3b8; }
@media (max-width: 800px) {
    .hero-card { grid-template-columns: 1fr; }
    .hero-card .hero-media { min-height: 200px; }
}

/* ---------- Cards ---------- */
.post-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px;
}
@media (max-width: 900px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .post-grid { grid-template-columns: 1fr; } }

.post-card {
    border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
    display: flex; flex-direction: column; background: #fff;
    transition: box-shadow .15s ease;
}
.post-card:hover { box-shadow: 0 6px 18px rgba(12, 30, 52, .1); }
.post-card .card-media { aspect-ratio: 16/9; background: var(--bg-soft); overflow: hidden; }
.post-card .card-media img { width: 100%; height: 100%; object-fit: cover; }
.post-card .card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card .card-title { font-family: var(--serif); font-size: 19px; line-height: 1.3; }
.post-card .excerpt { color: var(--muted); font-size: 14px; }

.cat-badge {
    display: inline-block; align-self: flex-start;
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px;
    color: var(--accent);
}
.meta { font-size: 13px; color: var(--muted); }
.meta a { font-weight: 600; color: var(--navy); }
.meta a:hover { color: var(--accent); }

/* ---------- Pagination ---------- */
.pagination { margin: 40px 0; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pagination .page-numbers {
    padding: 8px 14px; border: 1px solid var(--line); border-radius: 4px;
    font-size: 14px; font-weight: 600; color: var(--navy);
}
.pagination .page-numbers.current { background: var(--navy); color: #fff; }

/* ---------- Article ---------- */
.article-header { max-width: 780px; margin: 40px auto 0; }
.article-header h1 {
    font-family: var(--serif); font-size: 38px; line-height: 1.2; color: var(--navy);
    margin: 12px 0 16px;
}
.article-header .meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.article-header .meta img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.article-standfirst { font-size: 19px; color: var(--muted); margin-bottom: 8px; }

.article-hero { max-width: 980px; margin: 28px auto 0; }
.article-hero img { border-radius: 6px; width: 100%; }
.article-hero figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }

.article-content {
    max-width: 780px; margin: 30px auto; font-family: var(--serif);
    font-size: 19px; line-height: 1.75;
}
.article-content p { margin: 0 0 22px; }
.article-content h2, .article-content h3 {
    font-family: var(--serif); color: var(--navy); margin: 34px 0 14px; line-height: 1.3;
}
.article-content a { color: var(--accent); text-decoration: underline; }
.article-content img { border-radius: 6px; margin: 20px 0; }
.article-content blockquote {
    border-left: 4px solid var(--accent); padding: 4px 0 4px 20px;
    color: var(--muted); font-style: italic; margin: 24px 0;
}
.article-content ul, .article-content ol { margin: 0 0 22px 26px; }

.tag-list { max-width: 780px; margin: 0 auto 30px; display: flex; gap: 8px; flex-wrap: wrap; }
.tag-list a {
    font-size: 13px; background: var(--bg-soft); border: 1px solid var(--line);
    padding: 4px 12px; border-radius: 20px; color: var(--muted);
}

/* ---------- Author box ---------- */
.author-box {
    max-width: 780px; margin: 20px auto 50px;
    border: 1px solid var(--line); border-radius: 8px;
    padding: 24px; display: flex; gap: 20px; align-items: flex-start;
    background: var(--bg-soft);
}
.author-box img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-box .author-name { font-family: var(--serif); font-size: 20px; color: var(--navy); }
.author-box .author-job { font-size: 13px; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.author-box p { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.author-box .author-link { font-weight: 700; font-size: 14px; color: var(--navy); }
.author-box .author-link:hover { color: var(--accent); }
@media (max-width: 600px) { .author-box { flex-direction: column; } }

/* ---------- Archive ---------- */
.archive-header { margin: 40px 0 10px; }
.archive-header h1 {
    font-family: var(--serif); font-size: 32px; color: var(--navy);
    border-left: 6px solid var(--accent); padding-left: 14px;
}
.archive-header .archive-desc { color: var(--muted); margin-top: 8px; max-width: 700px; }

/* ---------- Page ---------- */
.page-content { max-width: 780px; margin: 40px auto 60px; }
.page-content h1 { font-family: var(--serif); font-size: 34px; color: var(--navy); margin-bottom: 20px; }
.page-content .entry { font-size: 17px; }
.page-content .entry p { margin-bottom: 18px; }

/* ---------- Formulaire inscription ---------- */
.form-card {
    max-width: 620px; margin: 30px auto 60px; border: 1px solid var(--line);
    border-radius: 8px; padding: 32px; background: #fff;
    box-shadow: 0 4px 16px rgba(12, 30, 52, .06);
}
.form-card .form-row { margin-bottom: 18px; }
.form-card label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--navy); }
.form-card input[type=text], .form-card input[type=email], .form-card textarea, .form-card select {
    width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 5px;
    font-size: 15px; font-family: var(--sans); background: #fff; color: var(--ink);
}
.form-card input:focus, .form-card textarea:focus { outline: 2px solid var(--navy); border-color: var(--navy); }
.form-card .form-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.btn {
    display: inline-block; background: var(--accent); color: #fff; border: 0;
    padding: 13px 28px; font-size: 15px; font-weight: 700; border-radius: 5px;
    cursor: pointer; font-family: var(--sans);
}
.btn:hover { background: #a30d26; color: #fff; }
.form-success {
    display: none; background: #eef8f0; border: 1px solid #bfe3c6; color: #1e6b30;
    padding: 14px 18px; border-radius: 6px; margin-bottom: 18px; font-size: 15px;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #b9c6d4; margin-top: 60px; font-size: 14px; }
.site-footer .container {
    display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px;
    padding-top: 46px; padding-bottom: 36px;
}
.site-footer .foot-title {
    color: #fff; font-family: var(--serif); font-size: 18px; margin-bottom: 14px; font-weight: 700;
}
.site-footer a { color: #dbe4ee; }
.site-footer a:hover { color: #ffd7dd; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 8px; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.12);
    padding: 16px 0; text-align: center; font-size: 13px; color: #8fa3b8;
}
@media (max-width: 800px) { .site-footer .container { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- 404 ---------- */
.error-404 { text-align: center; margin: 80px auto; }
.error-404 h1 { font-family: var(--serif); font-size: 60px; color: var(--navy); }
.error-404 p { color: var(--muted); margin: 14px 0 24px; }

/* ---------- WP core ---------- */
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: var(--muted); }
.aligncenter { margin-left: auto; margin-right: auto; }
.screen-reader-text { position: absolute; left: -9999px; }
