/* =====================================================
   Horizon Bleu — main.css
   CSS minimal et compatible Elementor
   ===================================================== */

/* ─── Variables ───────────────────────────────────── */
:root {
    --color-primary:    #0057a8;
    --color-primary-h:  #003f7d;
    --color-secondary:  #00b4d8;
    --color-accent:     #f4a261;
    --color-dark:       #1a1a2e;
    --color-light:      #f8f9fa;
    --color-text:       #2d2d2d;
    --color-muted:      #6c757d;
    --color-border:     #dee2e6;
    --color-white:      #ffffff;

    --font-body:        'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-heading:     var(--font-body);

    --radius:           8px;
    --radius-lg:        16px;
    --shadow:           0 2px 8px rgba(0, 0, 0, .08);
    --shadow-lg:        0 8px 32px rgba(0, 0, 0, .12);
    --transition:       .25s ease;

    --container-width:  1200px;
    --container-px:     clamp(1rem, 5vw, 2rem);

    --header-height:    70px;
}

/* ─── Reset léger ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-white);
    -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-h); }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 .75em; font-family: var(--font-heading); line-height: 1.25; }

/* ─── Accessibilité ───────────────────────────────── */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 3px solid var(--color-secondary); outline-offset: 2px; }

/* ─── Container ───────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin-inline: auto;
    padding-inline: var(--container-px);
}

/* ─── Boutons ─────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .625rem 1.375rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: .9375rem;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), box-shadow var(--transition);
    border: 2px solid transparent;
    text-decoration: none;
}
.btn--primary {
    background: var(--color-primary);
    color: var(--color-white);
}
.btn--primary:hover {
    background: var(--color-primary-h);
    color: var(--color-white);
    box-shadow: var(--shadow);
}
.btn--outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.btn--outline:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

/* ─── Header natif (fallback sans Elementor Pro) ──── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    height: var(--header-height);
    box-shadow: var(--shadow);
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.site-header__name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-dark);
}
.site-header__name:hover { color: var(--color-primary); }

/* Navigation */
.nav-menu {
    display: flex;
    gap: .25rem;
}
.nav-menu a {
    display: block;
    padding: .5rem .875rem;
    border-radius: var(--radius);
    color: var(--color-dark);
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
}
.nav-menu a:hover,
.nav-menu .current-menu-item > a {
    background: var(--color-light);
    color: var(--color-primary);
}

/* Burger mobile */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: .5rem;
}
.nav-toggle__bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-dark);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ─── Site content ────────────────────────────────── */
.site-content { min-height: calc(100vh - var(--header-height) - 200px); }
.site-main { padding-block: 3rem; }

/* ─── Grille de posts ─────────────────────────────── */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 2rem;
    margin-block: 2rem;
}

/* ─── Carte article ───────────────────────────────── */
.post-card {
    border-radius: var(--radius-lg);
    background: var(--color-white);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
    display: flex;
    flex-direction: column;
}
.post-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }

.post-card__thumbnail img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }

.post-card__body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    flex: 1;
}
.post-card__meta { font-size: .8125rem; color: var(--color-muted); }
.post-card__title { font-size: 1.125rem; margin: 0; }
.post-card__title a { color: var(--color-dark); }
.post-card__title a:hover { color: var(--color-primary); }
.post-card__excerpt { font-size: .9375rem; color: var(--color-muted); flex: 1; }
.post-card__cta { margin-top: auto; align-self: flex-start; }

/* ─── Footer natif (fallback) ─────────────────────── */
.site-footer {
    background: var(--color-dark);
    color: rgba(255,255,255,.75);
    padding-block: 3rem 1.5rem;
    margin-top: 4rem;
}
.site-footer__inner { display: flex; flex-direction: column; gap: 2.5rem; }
.site-footer__widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}
.site-footer__bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-size: .875rem;
}
.site-footer__copy { margin: 0; }
.site-footer__copy a { color: var(--color-secondary); }
.footer-menu { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.footer-menu a { color: rgba(255,255,255,.65); font-size: .875rem; }
.footer-menu a:hover { color: var(--color-white); }

/* ─── Pagination ──────────────────────────────────── */
.nav-links { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; margin-block: 2rem; }
.nav-links a, .nav-links span {
    padding: .5rem .875rem;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    font-size: .9375rem;
}
.nav-links .current { background: var(--color-primary); color: var(--color-white); border-color: var(--color-primary); }
.nav-links a:hover { background: var(--color-light); }

/* ─── Article / Page content ─────────────────────── */
.entry-header { margin-bottom: 2rem; }
.entry-title { font-size: clamp(1.75rem, 4vw, 2.75rem); }
.entry-meta { font-size: .875rem; color: var(--color-muted); display: flex; gap: 1rem; flex-wrap: wrap; margin-top: .5rem; }
.entry-thumbnail { margin-bottom: 2rem; border-radius: var(--radius-lg); overflow: hidden; }
.entry-thumbnail img { width: 100%; max-height: 520px; object-fit: cover; }
.entry-content { line-height: 1.8; }
.entry-content h2, .entry-content h3 { margin-top: 2rem; }
.entry-content p { margin-block: 1rem; }
.entry-content a { text-decoration: underline; }
.entry-footer { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border); }

/* ─── 404 ─────────────────────────────────────────── */
.error-404 { text-align: center; padding-block: 5rem; }
.error-404 .page-title { font-size: 3rem; color: var(--color-primary); }
.error-404 .page-content { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }

/* ─── Elementor — compatibilité ──────────────────── */

/* Template pleine largeur : retire le padding container */
.site-main--full { padding-block: 0; }
.entry-content--full { max-width: 100%; padding: 0; }

/* Empêche Elementor d'hériter des marges du thème */
.elementor-page .entry-content,
.elementor-page .page-content {
    padding: 0;
    max-width: 100%;
}

/* S'assure que les sections Elementor peuvent aller full-width */
.elementor-section.elementor-section-full_width {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* ─── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    .site-header__nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--color-white);
        border-bottom: 1px solid var(--color-border);
        padding: 1rem var(--container-px);
        box-shadow: var(--shadow-lg);
    }
    .site-header__nav.is-open { display: block; }
    .nav-menu { flex-direction: column; }
    .nav-menu a { padding: .75rem 1rem; }
}
