/* ========================================
   Jean-Thomas Trojani — Design System
   ======================================== */

:root {
    --brand: #2d4a3e;
    --brand-deep: #1c3028;
    --brand-light: #4d7163;
    --brand-pale: #e8f0ec;
    --brand-wash: #f4f7f5;
    --paper: #fafaf8;
    --white: #ffffff;
    --ink: #1a1a1a;
    --ink-secondary: #4b5563;
    --ink-muted: #9ca3af;
    --border: #e5e7eb;
    --border-light: #f0f1f0;
    --accent-warm: #c49a6c;
    --accent-green: #059669;
    --radius: 8px;
    --radius-lg: 16px;
}

/* ---- Reset ---- */

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

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

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--ink);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--brand);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--brand-light);
}

/* ---- Typography ---- */

h1, h2, h3, h4 {
    font-family: 'DM Sans', -apple-system, sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--ink);
}

.accent {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-weight: 400;
}

h1 {
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    letter-spacing: -0.035em;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
}

h3 {
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    letter-spacing: -0.015em;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1.25rem;
    color: var(--ink-secondary);
}

/* ---- Layout ---- */

.container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container--narrow {
    max-width: 760px;
}

section {
    padding: 5rem 0;
}

/* ---- Header / Nav ---- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav__brand {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--brand);
    letter-spacing: -0.02em;
}

.nav__links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav__links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ink-secondary);
    transition: color 0.2s ease;
}

.nav__links a:hover {
    color: var(--brand);
}

.nav__hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--ink);
}

/* ---- Hero ---- */

.hero {
    padding: 5rem 0 4rem;
    background: var(--brand-wash);
    border-bottom: 1px solid var(--border-light);
}

.hero__inner {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 4rem;
    align-items: center;
}

.hero__photo {
    order: -1;
}

.hero__content {
    max-width: 600px;
}

.hero__label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-warm);
    margin-bottom: 1.25rem;
    padding: 0.35rem 0.85rem;
    background: rgba(196, 154, 108, 0.1);
    border-radius: 4px;
}

.hero__title {
    margin-bottom: 1rem;
    color: var(--brand);
}

.hero__subtitle {
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    color: var(--ink-secondary);
    font-weight: 400;
    line-height: 1.55;
    margin-bottom: 1.5rem;
}

.hero__text {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--ink-secondary);
    margin-bottom: 2rem;
}

.hero__cta {
    display: inline-flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero__photo img {
    width: 280px;
    height: 360px;
    object-fit: cover;
    object-position: center top;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(28, 48, 40, 0.15);
}

/* ---- Buttons ---- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.6rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    text-decoration: none;
}

.btn--primary {
    background: var(--brand);
    color: var(--white);
    border-color: var(--brand);
}

.btn--primary:hover {
    background: var(--brand-deep);
    border-color: var(--brand-deep);
    color: var(--white);
}

.btn--ghost {
    background: transparent;
    color: var(--brand);
    border-color: var(--border);
}

.btn--ghost:hover {
    border-color: var(--brand);
    background: var(--brand-pale);
}

/* ---- Key Figures ---- */

.figures {
    padding: 3.5rem 0;
    background: var(--white);
    border-bottom: 1px solid var(--border-light);
}

.figures__grid {
    display: flex;
    justify-content: center;
    align-items: stretch;
}

.figure-card {
    text-align: center;
    padding: 1rem 2.5rem;
    flex: 1;
}

.figure-card + .figure-card {
    border-left: 1px solid var(--border);
}

.figure-card__number {
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    font-weight: 700;
    color: var(--brand);
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 0.4rem;
}

.figure-card__label {
    font-size: 0.82rem;
    color: var(--ink-muted);
    line-height: 1.4;
}

/* ---- Bio Section ---- */

.bio {
    padding: 5rem 0;
    background: var(--white);
}

.bio__label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--brand-light);
    margin-bottom: 1rem;
}

.bio__content {
    columns: 2;
    column-gap: 3rem;
    font-size: 1rem;
    line-height: 1.8;
}

.bio__content p {
    break-inside: avoid;
}

.bio__link {
    margin-top: 2rem;
    column-span: all;
}

/* ---- Milestones ---- */

.milestones {
    padding: 5rem 0;
    background: var(--brand-deep);
    color: var(--white);
}

.milestones h2 {
    color: var(--white);
    margin-bottom: 3rem;
}

.milestones__grid {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-left: 2.5rem;
}

.milestones__grid::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.15);
}

.milestone {
    position: relative;
    padding: 0 0 2.5rem 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

.milestone:last-child {
    padding-bottom: 0;
}

.milestone::before {
    content: '';
    position: absolute;
    left: -2.5rem;
    top: 0.35rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-warm);
    transform: translateX(calc(-50% + 6px));
}

.milestone:hover {
    transform: none;
}

.milestone__year {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-warm);
    margin-bottom: 0.5rem;
}

.milestone__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.milestone__text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.6;
    margin-bottom: 0;
    max-width: 600px;
}

/* ---- Articles Section ---- */

.articles-section {
    padding: 5rem 0;
    background: var(--paper);
}

.articles-section__header {
    margin-bottom: 2.5rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.article-card {
    background: var(--white);
    border: none;
    border-left: 3px solid var(--accent-warm);
    border-radius: var(--radius);
    padding: 1.75rem 2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.article-card__cat {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent-warm);
    margin-bottom: 0.65rem;
}

.article-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.35;
    margin-bottom: 0.65rem;
}

.article-card__title a {
    color: inherit;
}

.article-card__title a:hover {
    color: var(--brand);
}

.article-card__excerpt {
    font-size: 0.88rem;
    color: var(--ink-muted);
    line-height: 1.6;
    margin-bottom: 0;
    flex: 1;
}

.article-card__meta {
    display: none;
}

/* ---- Footer ---- */

.site-footer {
    padding: 3rem 0;
    background: var(--brand-deep);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer__links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.footer__links a {
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.2s ease;
}

.footer__links a:hover {
    color: var(--white);
}

/* ---- Responsive ---- */

@media (max-width: 1024px) {
    .hero__inner {
        grid-template-columns: 240px 1fr;
        gap: 3rem;
    }

    .hero__photo img {
        width: 240px;
        height: 310px;
    }

    .figures__grid {
        flex-wrap: wrap;
    }

    .figure-card {
        flex: 0 0 50%;
        padding: 1.25rem 1.5rem;
    }

    .figure-card:nth-child(odd) {
        border-left: none;
    }

    .figure-card:nth-child(n+3) {
        border-top: 1px solid var(--border);
        padding-top: 1.5rem;
    }

    .bio__content {
        columns: 1;
    }
}

@media (max-width: 768px) {
    section {
        padding: 3.5rem 0;
    }

    .nav__links {
        display: none;
    }

    .nav__links--open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--white);
        padding: 1.5rem;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
        gap: 1rem;
    }

    .nav__hamburger {
        display: block;
    }

    .hero {
        padding: 3rem 0;
    }

    .hero__inner {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero__photo {
        justify-self: center;
    }

    .hero__photo img {
        width: 200px;
        height: 260px;
    }

    .hero__content {
        max-width: 100%;
    }

    .hero__cta {
        justify-content: center;
    }

    .hero__label {
        margin-left: auto;
        margin-right: auto;
    }

    .figures__grid {
        flex-wrap: wrap;
    }

    .figure-card {
        flex: 0 0 50%;
        padding: 1rem 0.5rem;
    }

    .milestones__grid {
        padding-left: 2rem;
    }

    .milestones__grid::before {
        left: 4px;
    }

    .milestone::before {
        left: -2rem;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .footer__inner {
        flex-direction: column;
        text-align: center;
    }
}

/* ---- Article page styles ---- */

.article-page {
    padding: 3rem 0 5rem;
}

.article-page h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--brand);
}

.article-page h3 {
    margin-top: 2rem;
}

.article-page p {
    margin-bottom: 1.25rem;
}

.article-page ul, .article-page ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
    color: var(--ink-secondary);
}

.article-page li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.article-page blockquote {
    border-left: 3px solid var(--accent-warm);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: var(--brand-wash);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.article-page blockquote p {
    color: var(--brand);
    font-weight: 500;
    font-size: 1.05rem;
    margin-bottom: 0;
}

.article-page hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 3rem 0 2rem;
}

.article-page a {
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-page a:hover {
    color: var(--brand-light);
}

.article-page .btn {
    text-decoration: none;
}

.article-page .btn--primary {
    color: var(--white);
}

.article-page .btn--primary:hover {
    color: var(--white);
}

.article-page .btn--ghost {
    color: var(--brand);
}

.article-page .btn--ghost:hover {
    color: var(--brand);
}

.article-page strong {
    color: var(--ink);
    font-weight: 600;
}

/* ---- Baromètre / Data Article ---- */

.barometre-lead {
    font-size: 1.15rem;
    color: var(--ink-secondary);
    line-height: 1.75;
    margin-bottom: 1.5rem;
}

.barometre-figures {
    margin: 2.5rem 0 1rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--white);
}

.barometre-chart {
    margin: 1.5rem 0 3rem;
    padding: 1.5rem;
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
}

.barometre-chart--tall {
    padding: 1.5rem 1.5rem 2rem;
}

.barometre-heatmap {
    margin: 1.5rem 0 3rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.barometre-heatmap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    min-width: 720px;
}

.barometre-heatmap thead th {
    background: var(--brand-deep);
    color: var(--white);
    padding: 0.65rem 0.5rem;
    font-weight: 600;
    text-align: center;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
}

.barometre-heatmap thead th:first-child {
    text-align: left;
    padding-left: 1rem;
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--brand-deep);
}

.barometre-heatmap tbody td {
    padding: 0.55rem 0.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    font-weight: 500;
    font-size: 0.78rem;
    white-space: nowrap;
    transition: opacity 0.15s ease;
}

.barometre-heatmap tbody td:first-child {
    text-align: left;
    font-weight: 600;
    color: var(--ink);
    background: var(--paper);
    padding-left: 1rem;
    position: sticky;
    left: 0;
    z-index: 1;
    border-bottom: 1px solid var(--border-light);
}

.barometre-heatmap tbody tr:last-child td {
    border-bottom: none;
}

.barometre-source {
    font-size: 0.85rem;
    color: var(--ink-muted);
}

@media (max-width: 768px) {
    .barometre-chart {
        padding: 1rem 0.5rem;
        margin-left: -1.5rem;
        margin-right: -1.5rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .barometre-heatmap {
        margin-left: -1.5rem;
        margin-right: -1.5rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .barometre-figures {
        margin-left: -1.5rem;
        margin-right: -1.5rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}
