/* =========================================
   CRVX CLUB — Blog Mode Éditorial
   Stack : Vanilla HTML/CSS — Zéro framework
   DA : Blanc + Orchidée / Rose-violet
   ========================================= */

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

/* ---- Variables ---- */
:root {
    --bg:           #FFFFFF;
    --bg-surface:   #F7F4F9;
    --bg-surface2:  #EDE8F2;
    --text:         #1a1015;
    --text-muted:   #4a3f4d;
    --text-faint:   #9a8fab;
    --violet:       #BF7DB5;
    --violet-dim:   #8A5085;
    --violet-glow:  #D4A0CB;
    --border:       #e4dde9;
    --border-mid:   #d0c5d8;
    --nav-h:        64px;
    --col:          680px;
    --font-serif:   'Georgia', 'Times New Roman', serif;
    --font-mono:    'Courier New', Courier, monospace;
    --font-sans:    'Helvetica Neue', Arial, sans-serif;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
}

/* ---- Navigation ---- */
.site-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    z-index: 100;
}
.nav-logo {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-decoration: none;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}
/* Petite croix CSS avant le logo */
.nav-logo::before {
    content: '✛';
    color: var(--violet);
    font-size: 14px;
    font-style: normal;
    line-height: 1;
}
.nav-logo span { font-style: italic; color: var(--violet); }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text-muted);
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--violet); }

/* ---- Méga-menu Marques (pleine largeur, alphabétique) ---- */
.nav-dropdown {
    position: static;
}
.nav-dropdown-trigger {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
    user-select: none;
}
.nav-dropdown.open .nav-dropdown-trigger { color: var(--violet); }

/* Le méga-menu est ancré sur la nav fixe */
.nav-dropdown-menu {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: #FFFFFF;
    border-bottom: 1px solid var(--border-mid);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    list-style: none;
    padding: 40px 48px 48px;
    z-index: 200;
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0;
}
.nav-dropdown.open .nav-dropdown-menu {
    display: grid;
    animation: megaFadeIn 0.2s ease;
}
@keyframes megaFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Colonne = une lettre + ses marques */
.mega-col {
    padding: 0 20px 24px 0;
}
.mega-letter {
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 400;
    font-style: italic;
    color: var(--violet-dim);
    line-height: 1;
    margin-bottom: 12px;
    display: block;
}
.mega-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.mega-col ul li a {
    display: block;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    padding: 5px 0;
    transition: color 0.15s;
    border-bottom: none;
}
.mega-col ul li a:hover { color: var(--violet); }

/* Overlay pour fermer le mega-menu au clic en dehors */
.mega-overlay {
    display: none;
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    z-index: 199;
}
.nav-dropdown.open ~ .mega-overlay { display: block; }

@media (max-width: 768px) {
    .nav-dropdown-menu {
        padding: 24px 20px 32px;
        grid-template-columns: repeat(2, 1fr);
        max-height: 70vh;
        overflow-y: auto;
    }
    .mega-letter { font-size: 20px; }
    .mega-col ul li a { font-size: 8px; }
}

/* ---- Main layout ---- */
.page-body { padding-top: var(--nav-h); }

/* ---- Hero (homepage) ---- */
.hero {
    padding: 80px 32px 64px;
    border-bottom: 1px solid var(--border);
    max-width: 1200px;
    margin: 0 auto;
}
.hero-eyebrow {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-faint);
    display: block;
    margin-bottom: 20px;
}
/* Croix décorative avant l'eyebrow */
.hero-eyebrow::before {
    content: '✛  ';
    color: var(--violet);
}
.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.01em;
    max-width: 700px;
    color: var(--text);
}
.hero-title em { font-style: italic; color: var(--violet); }
.hero-desc {
    margin-top: 24px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-muted);
    max-width: 560px;
}

/* ---- Featured article ---- */
.featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
    border-bottom: 1px solid var(--border);
}
.featured-image { aspect-ratio: 4/3; background: var(--bg-surface); overflow: hidden; }
.featured-image img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.featured-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono); font-size: 10px;
    letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint);
}
.featured-content {
    padding: 48px 48px 48px 56px;
    display: flex; flex-direction: column; justify-content: center;
    background: var(--bg-surface);
}
.article-tag {
    font-family: var(--font-mono); font-size: 9px;
    letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--violet-dim); display: block; margin-bottom: 16px;
}
.featured-content h2 {
    font-family: var(--font-serif);
    font-size: clamp(22px, 2.5vw, 34px);
    font-weight: 400; line-height: 1.25; letter-spacing: -0.01em;
    color: var(--text);
}
.featured-content h2 a { text-decoration: none; color: var(--text); }
.featured-content h2 a:hover { color: var(--violet-glow); }
.featured-excerpt { margin-top: 16px; font-size: 14px; line-height: 1.7; color: var(--text-muted); }
.article-meta {
    margin-top: 24px; display: flex; gap: 16px; align-items: center;
    font-family: var(--font-mono); font-size: 9px;
    letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint);
}
.article-meta-sep { opacity: 0.4; }

/* ---- Article grid ---- */
.articles-section {
    max-width: 1200px; margin: 0 auto; padding: 0 32px 80px;
}
.articles-section-header {
    padding: 48px 0 0;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 0;
    border-bottom: 1px solid var(--border);
}
.articles-section-title {
    font-family: var(--font-mono); font-size: 10px;
    letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-faint);
}
.articles-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    border-left: 1px solid var(--border);
}
.article-card {
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 32px; text-decoration: none; color: inherit;
    display: block; transition: background 0.2s;
    background: var(--bg);
}
.article-card:hover { background: var(--bg-surface); }
.article-card-image {
    aspect-ratio: 3/2; background: var(--bg-surface2); margin-bottom: 20px; overflow: hidden;
}
.article-card-image img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; transition: transform 0.3s; }
.article-card:hover .article-card-image img { transform: scale(1.02); }
.card-placeholder {
    width: 100%; height: 100%; aspect-ratio: 3/2;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono); font-size: 9px;
    letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--text-faint); background: var(--bg-surface2);
}
.article-card h3 {
    font-family: var(--font-serif); font-size: 18px;
    font-weight: 400; line-height: 1.3; margin-bottom: 10px;
    color: var(--text);
}
.article-card-excerpt { font-size: 13px; line-height: 1.65; color: var(--text-muted); }
.article-card .article-meta { margin-top: 0; }

/* Footer d'une card : meta + like bouton côte à côte */
.article-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
}
.article-card-footer .like-btn { margin-top: 0; }

/* ---- Article page ---- */
.article-header {
    max-width: var(--col); margin: 56px auto 0; padding: 0 32px;
}
.article-header h1 {
    font-family: var(--font-serif);
    font-size: clamp(28px, 4vw, 52px);
    font-weight: 400; line-height: 1.15; letter-spacing: -0.02em;
    color: var(--text);
}
.article-header .article-lead {
    margin-top: 20px; font-size: 18px; line-height: 1.6; color: var(--text-muted);
    font-family: var(--font-serif); font-style: italic;
}
.article-header .article-meta {
    margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border);
}
.article-hero-image { max-width: 900px; margin: 40px auto; padding: 0 32px; }
.article-hero-image img { width: 100%; aspect-ratio: 16/9; object-fit: cover; object-position: top center; display: block; }
.article-hero-image .img-placeholder {
    aspect-ratio: 16/9; background: var(--bg-surface);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-mono); font-size: 10px;
    letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint);
}
.article-hero-image figcaption {
    margin-top: 10px; font-family: var(--font-mono); font-size: 10px;
    letter-spacing: 0.12em; color: var(--text-faint);
}
.article-body { max-width: var(--col); margin: 0 auto; padding: 0 32px 80px; }
.article-body p { font-size: 17px; line-height: 1.8; color: var(--text-muted); margin-bottom: 24px; }
.article-body p:first-child { font-size: 18px; color: var(--text); }
.article-body h2 {
    font-family: var(--font-serif); font-size: 26px; font-weight: 400;
    line-height: 1.3; margin: 48px 0 20px; color: var(--text);
}
.article-body h3 {
    font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em;
    text-transform: uppercase; color: var(--text-faint); margin: 36px 0 16px;
}
.article-body blockquote {
    border-left: 2px solid var(--violet); padding: 4px 0 4px 24px;
    margin: 36px 0; font-family: var(--font-serif); font-style: italic;
    font-size: 20px; line-height: 1.5; color: var(--violet-dim);
    background: var(--bg-surface); border-radius: 0;
}
.article-body a { color: var(--violet-dim); text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { color: var(--violet); }
.article-body .pullquote {
    font-family: var(--font-serif); font-style: italic; font-size: 22px;
    line-height: 1.5; color: var(--text); text-align: center;
    padding: 40px 0; border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border); margin: 40px 0;
}

/* ---- Related articles ---- */
.related { background: var(--bg-surface); padding: 64px 32px; border-top: 1px solid var(--border); }
.related-inner { max-width: 1200px; margin: 0 auto; }
.related h2 {
    font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em;
    text-transform: uppercase; color: var(--text-faint); margin-bottom: 32px;
}
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.related-card { text-decoration: none; color: inherit; }
.related-card-image { aspect-ratio: 3/2; background: var(--bg-surface2); margin-bottom: 16px; overflow: hidden; }
.related-card-image img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; transition: transform 0.3s; }
.related-card:hover .related-card-image img { transform: scale(1.02); }
.related-card h3 { font-family: var(--font-serif); font-size: 16px; font-weight: 400; line-height: 1.35; margin-bottom: 8px; color: var(--text); }
.related-card p { font-size: 12px; color: var(--text-faint); font-family: var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; }
.related-card:hover h3 { color: var(--violet-glow); }

/* ---- Hero sub-line ---- */
.hero-sub {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-top: 16px;
    max-width: 640px;
    line-height: 1.9;
}

/* ---- Filter bar (Tendances / Récents / Anciens) ---- */
.filter-bar {
    display: flex;
    gap: 0;
    margin-bottom: -1px;
}
.filter-btn {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-faint);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 16px 20px 14px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.filter-btn:hover { color: var(--text-muted); }
.filter-btn.active { color: var(--violet); border-bottom-color: var(--violet); }

/* ---- Like button ---- */
.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-faint);
    background: none;
    border: 1px solid var(--border-mid);
    padding: 8px 16px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    margin-top: 32px;
}
.like-btn svg { width: 13px; height: 13px; transition: fill 0.2s; }
.like-btn:hover { color: var(--violet-glow); border-color: var(--violet-dim); }
.like-btn.liked { color: var(--violet); border-color: var(--violet); }
.like-btn.liked svg { fill: var(--violet); }

/* Like button on article pages */
.article-like-wrap {
    max-width: var(--col);
    margin: 0 auto 48px;
    padding: 0 32px;
}
.article-like-btn { margin-top: 0; }

/* Like count on article cards */
.article-card-likes {
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.08em;
    color: var(--text-faint);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.article-card-likes svg { width: 10px; height: 10px; }

/* ---- À propos section ---- */
.about-section {
    border-top: 1px solid var(--border);
    padding: 64px 32px;
    background: var(--bg-surface);
}
.about-inner {
    max-width: var(--col);
    margin: 0 auto;
}
.about-inner h2 {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 20px;
    font-style: italic;
    color: var(--text);
}
.about-inner p {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.85;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* ---- Footer ---- */
footer { background: var(--bg-surface); }
.site-footer {
    border-top: 1px solid var(--border); padding: 40px 32px;
    display: flex; justify-content: space-between; align-items: center;
    max-width: 1200px; margin: 0 auto;
}
.footer-copy { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); text-decoration: none; }
.footer-links a:hover { color: var(--violet); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .featured { grid-template-columns: 1fr; }
    .featured-content { padding: 32px; }
    .articles-grid { grid-template-columns: 1fr 1fr; }
    .related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .site-nav { padding: 0 20px; }
    .nav-links { display: none; }
    .hero { padding: 48px 20px 40px; }
    .articles-section { padding: 0 20px 48px; }
    .articles-grid { grid-template-columns: 1fr; }
    .article-card { padding: 24px 20px; }
    .related-grid { grid-template-columns: 1fr; }
    .article-header, .article-body { padding-left: 20px; padding-right: 20px; }
    .site-footer { flex-direction: column; gap: 16px; text-align: center; }
}
