/* ==========================================================
   SWM THEME — theme.css
   Basé sur la structure Hello Elementor, sans Elementor.
   Version optimisée PageSpeed
   ========================================================== */

/* ── Variables globales ──────────────────────────────────── */
:root {
    --swm-bg:           #1F1F1F;
    --swm-text:         #ffffff;
    --swm-accent:       #672068;
    --swm-footer-bg:    #434242;
    --swm-header-bg:    #333333;
    --swm-header-height: 100px;
    --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

/* ── Reset minimal (calqué Hello Elementor) ─────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

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

/* ── STICKY FOOTER — la clé pour éviter le footer flottant ── */
html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--swm-bg);
    color: var(--swm-text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
}

/* Wrapper central — pousse le footer vers le bas */
.swm-page-wrapper {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* ── HEADER ──────────────────────────────────────────────── */
#swm-masthead.swm-header {
    width: 100%;
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    margin: 0;
    padding: 0;
    z-index: 100;
    background-color: var(--swm-header-bg);
    flex-shrink: 0;
}

/* Couche interne pleine largeur */
.swm-header .swm-header-inner {
    width: 100%;
    background-color: var(--swm-header-bg);
}

/* Wrapper centré avec logo + nav */
.swm-header .header-wrapper {
    max-width: 1470px;
    margin: 0 auto;
    padding: 0 15px;
    min-height: var(--swm-header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    background-color: var(--swm-header-bg);
}

/* ── BRANDING / LOGO ─────────────────────────────────────── */
.swm-header .swm-logo-wrap {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.swm-header .swm-logo-wrap img {
    max-height: 60px;
    width: auto;
    height: auto;
    display: block;
}

.swm-header .swm-site-title {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
    line-height: 1.2;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

.swm-header .swm-site-title:hover {
    color: var(--swm-accent);
}

/* ── NAVIGATION DESKTOP ──────────────────────────────────── */
.swm-header .swm-nav {
    display: flex;
    align-items: center;
}

.swm-nav-menu {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0 25px;
    list-style: none;
    gap: 0;
}

.swm-nav-menu > li {
    position: relative;
    margin: 16px 0;
}

.swm-nav-menu > li + li {
    margin-left: 22px;
}

.swm-nav-menu > li > a {
    color: var(--swm-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s ease;
    display: block;
    padding: 4px 0;
}

.swm-nav-menu > li > a:hover {
    color: var(--swm-accent);
}

/* Sous-menu desktop */
.swm-nav-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--swm-header-bg);
    list-style: none;
    margin: 0;
    padding: 8px 0;
    z-index: 200;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.swm-nav-menu li:hover > .sub-menu {
    display: block;
}

.swm-nav-menu .sub-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--swm-text);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease, background 0.2s ease;
}

.swm-nav-menu .sub-menu a:hover {
    color: var(--swm-accent);
    background: rgba(255,255,255,0.05);
}

/* ── MAIN ────────────────────────────────────────────────── */
#swm-main.swm-main {
    flex: 1 0 auto;
    width: 100%;
}

/* ── CONTENU (pages/articles) ────────────────────────────── */
.entry-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 15px;
}

.entry-content a:not(.wp-block-button__link) {
    color: var(--swm-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.entry-content a:not(.wp-block-button__link):hover {
    color: var(--swm-accent);
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
    color: var(--swm-text);
    font-weight: 700;
    line-height: 1.3;
    font-family: var(--font-body);
}

/* ── IMAGE PLEINE LARGEUR (sans scroll, responsive) ── */

/* 1. Empêcher tout débordement horizontal sur le body */
body {
    width: 100%;
}

/* 2. Conteneur principal */


/* 3. L'image fullwidth */
.swm-fullwidth {
    width: calc(100% + 30px) !important;  /* 15px gauche + 15px droite */
    max-width: calc(100% + 30px) !important;
    position: relative;
    left: -15px !important;
    display: block;
}

/* 4. Coller au menu (compenser le padding-top) */
.entry-content > .swm-fullwidth:first-child {
    margin-top: -40px;
}

/* 5. Sur desktop, largeur totale de l'écran */
@media (min-width: 992px) {
    .swm-fullwidth {
        width: 100vw !important;
        max-width: 100vw !important;
        left: 50% !important;
        right: 50% !important;
        margin-left: -50vw !important;
        margin-right: -50vw !important;
    }
}

/* 6. L'image elle-même */
.swm-fullwidth img {
    width: 100%;
    height: auto;
    display: block;
}

/* ── SKIP LINK (accessibilité) ───────────────────────────── */
.swm-skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.swm-skip-link:focus {
    left: 6px;
    top: 6px;
    width: auto;
    height: auto;
    overflow: visible;
    z-index: 99999;
    padding: 8px 16px;
    background: #fff;
    color: #000;
    font-size: 14px;
    text-decoration: none;
}

/* ── FOOTER — ne rétrécit jamais ────────────────────────── */
#swm-colophon.swm-footer {
    flex-shrink: 0;
    width: 100%;
    background-color: var(--swm-footer-bg);
    padding: 40px 0 20px;
    font-family: var(--font-body);
}

.swm-footer .swm-footer-inner {
    width: 100%;
    max-width: 1470px;
    margin: 0 auto;
    padding: 0 15px;
}

.footer-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.footer-menu {
    text-align: center;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-links a {
    color: var(--swm-text);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--swm-accent);
}

.footer-copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.footer-copyright p {
	text-align: center !important;
    margin: 0;
    font-size: 12px;
    color: var(--swm-text);
    opacity: 0.8;
}

.footer-copyright a {
    color: var(--swm-text);
    text-decoration: none;
}

.footer-copyright a:hover {
    color: var(--swm-accent);
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 991px) {
    .swm-header .header-wrapper {
        min-height: 78px;
    }
}

@media (max-width: 767px) {
    .swm-header .header-wrapper {
        min-height: 70px;
        padding: 0 20px;
    }
    .swm-header .swm-site-title {
        font-size: 20px;
    }
    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
}

@media (max-width: 575px) {
    .swm-header .header-wrapper {
        min-height: 60px;
    }
}

/* ── LOGO TAILLE MOBILE ──────────────────────────────────── */
@media (max-width: 991px) {
    .swm-header .swm-logo-wrap img {
        max-height: 45px;
    }
}


/* Correction pour Firefox uniquement */
@-moz-document url-prefix() {
    .swm-page-wrapper,
    .entry-content {
        width: 100% !important;
        max-width: 1200px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    body {
        display: block !important;
    }
    
    .swm-nav-menu .sub-menu {
        /* Évite les NaN dans Firefox */
        left: 0 !important;
    }
}

/* Plan du site - Style neutre, sans couleurs imposées */
.rgpd-sitemap-shortcode {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: flex-start;
    align-items: flex-start;
}

.rgpd-sitemap-column {
    flex: 1;
    min-width: 250px;
}

.rgpd-sitemap-category {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.25em;
    font-weight: 600;
}

.rgpd-sitemap-list {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.rgpd-sitemap-list ul {
    margin-top: 8px;
    margin-bottom: 8px;
    padding-left: 20px;
    list-style: none;
}

.rgpd-sitemap-list li {
    margin-bottom: 8px;
    line-height: 1.4;
}

.rgpd-sitemap-list a {
    text-decoration: none;
}

.rgpd-sitemap-list a:hover {
    text-decoration: underline;
}

/* Style pour la date des articles (très discret) */
.rgpd-sitemap-date {
    font-size: 0.75em;
    opacity: 0.6;
    margin-left: 8px;
    white-space: nowrap;
}

/* Version responsive */
@media (max-width: 768px) {
    .rgpd-sitemap-shortcode {
        flex-direction: column;
        gap: 30px;
    }
    
    .rgpd-sitemap-column {
        width: 100%;
    }
}

/* Dans votre style.css */
img, picture, video, iframe {
    content-visibility: auto;
    contain-intrinsic-size: auto 300px; /* Taille par défaut */
}

.responsive-picture img {
    width: 100%;
    height: auto;
    aspect-ratio: attr(width) / attr(height);
}


/* Footer réseaux sociaux */
.footer-social {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin: 20px 0;
}

.footer-social .social-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 40px;
    text-decoration: none;
    transition: all 0.3s ease;
    color: #ffffff;
}

.footer-social .social-link:hover {
    background: #672068;
    transform: translateY(-2px);
}

.footer-social .social-link i {
    font-size: 16px;
}

.footer-social .social-link:hover i,
.footer-social .social-link:hover .social-pseudo {
    color: #ffffff !important;
}

.footer-social .social-pseudo {
    font-size: 13px;
    font-weight: 500;
    display: inline-block;
}

/* Responsive - pseudo visible partout */
@media (max-width: 767px) {
    .footer-social {
        gap: 12px;
    }
    .footer-social .social-link {
        padding: 8px 16px;
    }
    .footer-social .social-pseudo {
        font-size: 12px;
        display: inline-block;
    }
}

@media (max-width: 480px) {
    .footer-social {
        gap: 10px;
    }
    .footer-social .social-link {
        padding: 6px 14px;
    }
    .footer-social .social-pseudo {
        font-size: 11px;
        display: inline-block;
    }
}