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

/* ── Import polices ───────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Roboto:wght@400;500&family=Inter:wght@400;500&display=swap');

/* ── Variables globales ──────────────────────────────────── */
:root {
    --swm-bg:           #1F1F1F;
    --swm-text:         #ffffff;
    --swm-accent:       #672068;
    --swm-footer-bg:    #434242;
    --swm-header-bg:    #333333;
    --swm-header-height: 100px;
}

/* ── 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 ──
   body en colonne flex, swm-page-wrapper prend tout l'espace
   disponible → le footer est toujours poussé en bas.
   ─────────────────────────────────────────────────────────── */
html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;           /* fallback si height:100% ne suffit pas */
    background-color: var(--swm-bg);
    color: var(--swm-text);
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

/* Wrapper central — pousse le footer vers le bas */
#swm-content.swm-page-wrapper {
    flex: 1 0 auto;              /* grandit pour occuper l'espace libre */
    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;              /* ne rétrécit jamais */
}

/* 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;          /* ancre le hamburger (position:absolute) */
    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;
}

/* ── IMAGE PLEINE LARGEUR ────────────────────────────────── */
/* Classe utilitaire : .swm-fullwidth sur n'importe quel élément */
.swm-fullwidth {
    width: 100vw !important;
    max-width: 100vw !important;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    display: block;
}

.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: 'Poppins', sans-serif;
}

.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 {
    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;
    }
    /* Le plugin SWM Menu cache .swm-nav-menu en mobile */
}

@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;
    }
}
