/* =========================================================
   EURL SOCIÉTÉ DENIS — CSS PRINCIPAL v2
   Charte : Bleu marine #1a3c6e · Or #f5a623
   Activités : Consulting · BE · AMO · Formation
   ========================================================= */

/* --- Variables ------------------------------------------ */
:root {
    --navy:        #1a3c6e;
    --navy-dark:   #122d56;
    --navy-light:  #2a5298;
    --gold:        #f5a623;
    --gold-light:  #f7b84b;
    --text:        #2c2c2c;
    --text-light:  #6b7280;
    --text-xlight: #9ca3af;
    --bg:          #fafafa;
    --bg-card:     #ffffff;
    --bg-blue:     #eef2f9;
    --bg-blue-alt: #f7faff;
    --border:      #dde3ed;
    --radius:      10px;
    --radius-lg:   16px;
    --shadow:      0 2px 16px rgba(26,60,110,0.08);
    --shadow-lg:   0 8px 40px rgba(26,60,110,0.14);
    --transition:  0.25s cubic-bezier(0.4,0,0.2,1);
}

/* --- Reset ---------------------------------------------- */
*, *::before, *::after {
    margin: 0; padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Outfit', Calibri, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* --- Header --------------------------------------------- */
.site-header {
    background: var(--navy);
    position: sticky;
    top: 0;
    z-index: 200;
    border-bottom: 3.5px solid var(--gold);
    box-shadow: 0 2px 20px rgba(26,60,110,0.25);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Conteneur logo — fond blanc pour préserver les couleurs (logo fond blanc natif) */
.brand-logo-wrap {
    width: 46px;
    height: 46px;
    background: #ffffff;
    border-radius: 8px;
    padding: 3px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Carrée 2000×2000 — object-fit:contain = zéro déformation */
.brand-logo {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: contain;
    object-position: center;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    border-left: 1px solid rgba(255,255,255,0.2);
    padding-left: 14px;
}

.brand-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.brand-tagline {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1.8px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    font-family: 'Outfit', sans-serif;
    font-size: 0.92rem;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all var(--transition);
}

.nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.nav-link.nav-active {
    color: #fff;
    background: rgba(255,255,255,0.15);
}

/* Contact : bordure dorée au repos, fond doré seulement sur la page contact */
.nav-link.nav-cta {
    border: 1.5px solid rgba(245,166,35,0.6);
    color: var(--gold);
    font-weight: 600;
    padding: 0.45rem 1.2rem;
}

.nav-link.nav-cta:hover {
    background: rgba(245,166,35,0.12);
    border-color: var(--gold);
    color: var(--gold);
}

.nav-link.nav-cta.nav-active {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--navy);
    font-weight: 700;
}

/* --- Main ----------------------------------------------- */
.site-main {
    min-height: 70vh;
}

/* --- Page hero banner ----------------------------------- */
.page-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
    padding: 4rem 2rem 3.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 4px;
    background: var(--gold);
}

.page-hero h1 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    color: #fff;
    margin-bottom: 0.75rem;
}

.page-hero p {
    font-size: 1rem;
    color: rgba(255,255,255,0.65);
    max-width: 540px;
    margin: 0 auto;
}

/* --- Container ------------------------------------------ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* --- Page title (ancienne version) ---------------------- */
.page-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 2.2rem;
    font-weight: 400;
    color: var(--navy);
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
    padding-bottom: 1rem;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 3.5px;
    background: var(--gold);
    border-radius: 2px;
}

/* --- Filters bar ---------------------------------------- */
.filters-bar {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    box-shadow: var(--shadow);
}

.filters-section {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: var(--text-xlight);
    min-width: 80px;
    padding-top: 8px;
}

.categories-filter,
.tags-filter {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.35rem 0.9rem;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
    transition: all var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

.filter-btn.tag-btn.active {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--navy);
    font-weight: 700;
}

.search-filter {
    position: relative;
    width: 100%;
    max-width: 340px;
}

.search-input {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    width: 100%;
    padding: 0.55rem 2.5rem 0.55rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: var(--bg-blue-alt);
    color: var(--text);
    outline: none;
    transition: border-color var(--transition);
}

.search-input:focus {
    border-color: var(--navy);
}

.search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-xlight);
    pointer-events: none;
}

/* --- News grid ------------------------------------------ */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.75rem;
}

@media (min-width: 1400px) {
    .news-grid { grid-template-columns: repeat(4, 1fr); }
}

.news-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
    box-shadow: var(--shadow);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--navy);
}

.card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: var(--bg-blue);
    color: var(--navy);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 0.5rem;
}

.card-content time {
    display: block;
    font-size: 0.78rem;
    color: var(--text-xlight);
    margin-bottom: 0.6rem;
}

.card-content h3 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--navy);
    line-height: 1.35;
    margin-bottom: 0.75rem;
}

.card-content h3 a:hover {
    color: var(--gold);
}

.card-excerpt {
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.card-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: color var(--transition);
}

.card-link:hover { color: var(--gold); }

/* --- Footer --------------------------------------------- */
.site-footer {
    background: var(--navy);
    color: rgba(255,255,255,0.75);
    position: relative;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem 2rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo-wrap {
    width: 34px;
    height: 34px;
    background: #ffffff;
    border-radius: 6px;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.footer-logo {
    display: block;
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.footer-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
}

.footer-activites {
    font-size: 0.72rem;
    color: var(--gold);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.footer-nav {
    display: flex;
    gap: 1.5rem;
}

.footer-nav a {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    transition: color var(--transition);
}

.footer-nav a:hover { color: var(--gold); }

.footer-legal {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.35);
}

.footer-gold-bar {
    height: 4px;
    background: var(--gold);
    width: 100%;
}

/* --- Filtrage articles ---------------------------------- */
.news-card {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.news-card.hidden {
    display: none;
}

.no-results-msg {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-xlight);
    font-size: 0.95rem;
}

/* --- No posts ------------------------------------------- */
.no-posts p {
    color: var(--text-xlight);
    text-align: center;
    padding: 3rem;
    font-size: 1rem;
}

/* --- Section title -------------------------------------- */
.section-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 2rem;
    font-weight: 400;
    color: var(--navy);
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 40px; height: 3px;
    background: var(--gold);
    border-radius: 2px;
}

/* --- Responsive ----------------------------------------- */
@media (max-width: 900px) {
    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-brand { justify-content: center; }
    .footer-nav { justify-content: center; }
    .footer-legal { align-items: center; }
}

@media (max-width: 640px) {
    .header-inner { padding: 0 1.25rem; }
    .brand-tagline { display: none; }
    .container { padding: 2rem 1.25rem; }
    .filters-bar { padding: 1rem 1.25rem; }
    .news-grid { grid-template-columns: 1fr; gap: 1.25rem; }
}

/* ========================================================
   MENU MOBILE
   ======================================================== */

/* Hamburger — caché sur desktop */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1.5px solid rgba(255,255,255,0.25);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.nav-toggle .bar {
    display: block;
    width: 20px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

/* Croix quand ouvert */
.nav-toggle.is-open .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open .bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.is-open .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Menu déroulant mobile — caché par défaut */
.mobile-menu {
    display: none;
    background: var(--navy-dark);
    border-top: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s ease;
}

.mobile-menu.is-open {
    max-height: 300px;
}

.mobile-menu nav {
    display: flex;
    flex-direction: column;
    padding: 0.75rem 1.5rem 1.25rem;
    gap: 0.25rem;
}

.mobile-nav-link {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.nav-active {
    background: rgba(255,255,255,0.1);
    color: #ffffff;
}

.mobile-nav-cta {
    margin-top: 0.5rem;
    background: var(--gold);
    color: var(--navy) !important;
    font-weight: 700;
    text-align: center;
}

.mobile-nav-cta:hover {
    background: var(--gold-light) !important;
    color: var(--navy) !important;
}

.mobile-nav-cta.nav-active {
    background: var(--gold) !important;
    color: var(--navy) !important;
}

/* ── Breakpoint mobile ───────────────────────────────────── */
@media (max-width: 768px) {
    /* Cacher nav desktop, montrer hamburger et menu mobile */
    .site-nav    { display: none; }
    .nav-toggle  { display: flex; }
    .mobile-menu { display: block; }

    /* Header légèrement moins haut */
    .header-inner { height: 64px; }

    /* Tagline cachée sur très petit écran */
    .brand-tagline { display: none; }

    /* Container padding réduit */
    .container { padding: 1.5rem 1rem; }

    /* Grille news en 1 colonne */
    .news-grid { grid-template-columns: 1fr; gap: 1rem; }

    /* Filters en colonne */
    .filters-bar { padding: 1rem; }
    .filters-section { flex-direction: column; gap: 0.5rem; }
    .filter-label { min-width: unset; padding-top: 0; }

    /* Footer en colonne */
    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.25rem;
        padding: 2rem 1rem;
    }
    .footer-brand   { justify-content: center; }
    .footer-nav     { justify-content: center; }
    .footer-legal   { align-items: center; }
}

@media (max-width: 480px) {
    .brand-name { font-size: 1rem; }
    .brand-logo-wrap { width: 40px; height: 40px; }
    .brand-logo { width: 34px; height: 34px; }
}
