/* Les salles de sport — CMS Heteractis */
:root {
    --color-primary: #4169e1;
    --color-primary-dark: #2d4bb5;
    --color-text: #333;
    --color-text-light: #666;
    --color-bg: #fff;
    --color-bg-alt: #f8f9fa;
    --color-border: #e0e0e0;
    --color-accent: #ff6b35;
    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-heading: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --max-width: 1200px;
    --content-width: 800px;
    --spacing: 1.5rem;
    --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.3;
    margin: 0 0 1rem;
    color: #1a1a1a;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.6rem; margin-top: 2rem; }
h3 { font-size: 1.3rem; margin-top: 1.5rem; }

p { margin: 0 0 1.25rem; }
ul, ol { margin: 0 0 1.25rem; padding-left: 1.5rem; }
li { margin-bottom: 0.5rem; }

.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--color-primary);
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 9999;
}
.skip-link:focus { top: 0; }

/* Header */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.site-logo { display: flex; align-items: center; }
.site-title-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-primary);
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.25rem;
}

.nav-item a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--color-text);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius);
    transition: background 0.2s, color 0.2s;
}

.nav-item a:hover,
.nav-item.active a {
    background: var(--color-bg-alt);
    color: var(--color-primary);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    position: relative;
    transition: transform 0.3s;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
}
.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

/* Main */
main {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 2rem var(--spacing);
    min-height: 60vh;
}

/* Articles */
.entry-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.entry-meta {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

figure {
    margin: 1.5rem 0;
}

figcaption {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-top: 0.5rem;
    text-align: center;
}

blockquote {
    border-left: 4px solid var(--color-primary);
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: var(--color-bg-alt);
    border-radius: 0 var(--radius) var(--radius) 0;
}

blockquote p:last-child { margin-bottom: 0; }

/* Info boxes from WordPress */
div[style*="background:#fff8e1"],
div[style*="background:#e8f5e9"],
div[style*="background:#f3e5f5"],
div[style*="background:#e3f2fd"] {
    border-radius: var(--radius);
    margin: 1.5rem 0;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    overflow-x: auto;
    display: block;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border: 1px solid var(--color-border);
}

th {
    background: var(--color-bg-alt);
    font-weight: 600;
}

/* Footer */
.site-footer {
    background: #1a1a2e;
    color: #ccc;
    padding: 3rem 0 0;
    margin-top: 4rem;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing);
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
}

.footer-col h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { color: #aaa; }
.footer-col a:hover { color: #fff; }

.footer-bottom {
    text-align: center;
    padding: 1.5rem var(--spacing);
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
    color: #888;
}

/* 404 */
.page-404 {
    text-align: center;
    padding: 4rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle { display: block; }

    .main-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid var(--color-border);
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }

    .main-nav.open { display: block; }

    .nav-list {
        flex-direction: column;
        padding: 0.5rem 0;
    }

    .nav-item a {
        padding: 0.75rem var(--spacing);
        border-radius: 0;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }

    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.3rem; }

    main { padding: 1.5rem var(--spacing); }
}

/* --- poser_meta_image.py : vignette des cartes de listing ------------------
   Les articles portaient deja leur image ; seul le listing ne la lisait pas. */
.blog-card-img { display: block; aspect-ratio: 16 / 10; overflow: hidden;
  background: #eee; border-radius: 8px 8px 0 0; margin: -1px -1px 0.9rem; }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* --- fil d'Ariane -----------------------------------------------------------
   Discret par construction : il sert a s'orienter, pas a attirer l'oeil. */
.he-ariane { max-width: 1180px; margin: 0 auto; padding: .9rem 1.2rem .2rem; }
.he-ariane ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem;
  margin: 0; padding: 0; font-size: .85rem; color: #777; }
.he-ariane li + li::before { content: "\203A"; margin-right: .4rem; color: #aaa; }
.he-ariane a { color: #777; text-decoration: none; }
.he-ariane a:hover { color: currentColor; text-decoration: underline; }

/* --- articles lies ----------------------------------------------------------
   Pose par poser_articles_lies.py : trois liens vers des articles proches, en
   fin de lecture. Discret, mais c'est le seul chemin qu'un lecteur arrive par
   un moteur avait vers le reste du site. */
.he-lies { margin: 2.5rem 0 0; padding: 1.2rem 1.4rem; background: #f6f7f6;
  border-left: 3px solid #cfd6cf; border-radius: 6px; }
.he-lies h2 { font-size: 1.05rem; margin: 0 0 .3rem; }
.he-lies p { font-size: .9rem; color: #6b6b6b; margin: 0 0 .8rem; }
.he-lies ul { margin: 0; padding-left: 1.1rem; }
.he-lies li { margin: .35rem 0; }

/* --- sommaire d'article -----------------------------------------------------
   Rend visible la structure qui existe deja dans l'article, et donne une ancre
   partageable vers chaque section. */
.he-sommaire { margin: 0 0 1.8rem; padding: 1rem 1.3rem; background: #f6f7f8;
  border-left: 3px solid #d5dade; border-radius: 6px; }
.he-sommaire-titre { margin: 0 0 .5rem; font-weight: 600; font-size: .95rem; }
.he-sommaire ol { margin: 0; padding-left: 1.3rem; }
.he-sommaire li { margin: .3rem 0; font-size: .93rem; }
.he-sommaire a { color: inherit; text-decoration: none; }
.he-sommaire a:hover { text-decoration: underline; }
