:root {
    --bg-color: #050505;
    --text-color: #eeeeee;
    --text-muted: #999999;
    --accent-color: #888888;
    --link-color: #ffffff;
    --border-color: rgba(255, 255, 255, 0.12);
    --border-color-hover: rgba(255, 255, 255, 0.35);
    --card-bg: rgba(255, 255, 255, 0.02);
    --card-bg-hover: rgba(255, 255, 255, 0.04);
    
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --max-width: 820px;
    --canvas-z-index: -1;
}

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

:focus-visible {
    outline: 1px solid #ffffff;
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 200;
    padding: 0.45rem 0.8rem;
    background: #111111;
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: none;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100%;
    margin: 0;
    overflow-x: clip;
    font-family: var(--font-body);
    background-color: var(--bg-color); 
    color: var(--text-color);
    line-height: 1.75;
    font-weight: 300;
    letter-spacing: 0.015em;
    position: relative;
}

/* Background canvas */
#gears-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: var(--canvas-z-index);
    display: block;
    background-color: var(--bg-color);
}

#gears-canvas[hidden] {
    display: none;
}

body:has(.article-page) #gears-canvas,
body:has(.plain-page) #gears-canvas {
    display: none;
}

@media (max-width: 768px) {
    #gears-canvas {
        display: none;
    }
}

/* Sticky Top Navigation Bar */
.site-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(5, 5, 5, 0.8);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.nav-brand {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: var(--text-color);
    text-decoration: none;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.8rem;
}

.nav-link {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.25s ease;
    position: relative;
    padding: 0.2rem 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-color);
}

.nav-link.active::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--text-color);
}

/* Lang Switcher */
.lang-switch {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--accent-color);
    text-transform: uppercase;
    display: flex;
    align-items: center;
}

/* Wrapper */
.content-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start; 
    min-height: calc(100vh - 60px);
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3.5rem 2rem 5rem;
    position: relative;
    z-index: 1;
}

/* Sections scroll margin for sticky header */
.section, .hero, footer, .site-footer {
    scroll-margin-top: 5rem;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    font-family: inherit;
    font-weight: inherit;
    padding: 0;
    font-size: inherit;
    letter-spacing: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.lang-btn:hover {
    color: var(--text-color);
}

.lang-btn.active {
    color: var(--text-color);
    border-bottom: 1px solid var(--text-color);
    padding-bottom: 2px;
}

.separator {
    margin: 0 0.5rem;
    opacity: 0.3;
    font-weight: 300;
}

/* Availability Badge */
.availability-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    max-width: 100%;
    font-size: 0.8rem;
    font-family: var(--font-heading);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #cfcfcf;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    margin-bottom: 2rem;
    backdrop-filter: blur(6px);
}

.availability-badge .dot {
    width: 7px;
    height: 7px;
    flex-shrink: 0;
    border-radius: 50%;
    background-color: #c4a35a;
    box-shadow: 0 0 8px rgba(196, 163, 90, 0.45);
}

/* Hero Section */
.hero {
    margin-bottom: 3.5rem;
    width: 100%;
}

.hero-identity {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    margin-bottom: 0.85rem;
}

.hero-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    flex-shrink: 0;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    font-weight: 300;
    letter-spacing: 0.16em;
    margin: 0;
    text-transform: uppercase;
    text-shadow: 0 4px 20px rgba(0,0,0,0.9);
}

.hero .subtitle {
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    line-height: 1.55;
    text-transform: uppercase;
    color: var(--accent-color);
    margin: 0 0 1.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.hero .intro-text {
    max-width: 720px;
    font-size: 1.08rem;
    font-weight: 300;
    color: #e0e0e0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    line-height: 1.8;
}

.hero .intro-text p {
    margin-bottom: 1rem;
}

.hero .intro-text p:last-child {
    margin-bottom: 0;
}

.hero .intro-text strong {
    font-weight: 500;
    color: var(--text-color);
}

.hero-cta {
    display: inline-flex;
    margin-top: 1.5rem;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--link-color);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 2px;
}

.hero-cta:hover,
.hero-cta:focus-visible {
    border-bottom-color: var(--link-color);
}

.article-header .hero-cta,
.author-cta .hero-cta {
    margin-top: 0.5rem;
}

/* Sections */
.section {
    width: 100%;
    margin-bottom: 3.5rem;
}

.section-header {
    margin-bottom: 1.8rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.8rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-color);
}

.scope-list {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
}

.scope-list li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.7rem;
    font-size: 1.02rem;
    color: #cccccc;
    line-height: 1.6;
}

.scope-list li:last-child {
    margin-bottom: 0;
}

.scope-list li::before {
    content: "–";
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

.scope-note {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 42rem;
}

.scope-note a {
    color: var(--link-color);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.scope-note a:hover {
    border-bottom-color: var(--link-color);
}

.formation-line {
    margin-top: 1.6rem;
}

/* Experience List (Parcours / Track Record) */
.experience-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.experience-item {
    padding-bottom: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.experience-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.item-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem 0.75rem;
    margin-bottom: 0.4rem;
}

.item-header strong {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
    letter-spacing: 0.03em;
}

.item-meta {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    color: var(--accent-color);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.experience-item p {
    font-size: 0.92rem;
    color: #cccccc;
    line-height: 1.6;
    margin: 0;
}

/* Articles List (Blog) */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
}

.article-card {
    display: grid;
    grid-template-columns: minmax(280px, 48%) 1fr;
    align-items: stretch;
    text-decoration: none;
    color: inherit;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    backdrop-filter: blur(8px);
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.article-card-cover {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: contain;
    background: #050505;
}

.article-card-body {
    padding: 1.5rem 1.6rem 1.6rem;
}

.article-card:not(:has(.article-card-cover)) .article-card-body {
    padding: 1.8rem;
}

.article-card:hover {
    border-color: var(--border-color-hover);
    background: var(--card-bg-hover);
    transform: translateY(-2px);
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 1rem;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--accent-color);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.article-tag {
    color: #cfcfcf;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    white-space: nowrap;
}

.article-card h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 500;
    line-height: 1.45;
    margin-bottom: 0.85rem;
    color: var(--text-color);
}

.article-card p {
    font-size: 0.98rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 1.2rem;
}

.article-read-more {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--link-color);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 2px;
}

.article-card:hover .article-read-more {
    border-bottom-color: var(--link-color);
}

/* Article Detail Page */
.article-page {
    width: 100%;
}

.back-nav {
    margin-bottom: 2.5rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-color);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--text-color);
}

.article-header {
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2rem;
}

.article-header h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.55rem, 4.4vw, 2.6rem);
    font-weight: 400;
    line-height: 1.35;
    margin-bottom: 1.1rem;
    letter-spacing: -0.01em;
}

.article-header .lead {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #d5d5d5;
    font-weight: 300;
}

.article-audio-anchor {
    margin: 0 0 1.5rem;
}

.article-audio {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--card-bg);
}

.article-audio[hidden] {
    display: none;
}

.article-audio audio {
    display: none;
}

.article-audio-play {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
}

.article-audio-play:hover {
    border-color: #ffffff;
}

.article-audio-play svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.article-audio-play .icon-pause {
    display: none;
}

.article-audio.is-playing .icon-play {
    display: none;
}

.article-audio.is-playing .icon-pause {
    display: block;
}

.article-audio-main {
    flex: 1;
    min-width: 0;
}

.article-audio-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.article-audio-label {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-color);
}

.article-audio-time {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    color: var(--text-muted);
    white-space: nowrap;
}

.article-audio-seek {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 2px;
    margin: 0.55rem 0 0;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.article-audio-seek:focus-visible {
    outline: 1px solid #ffffff;
    outline-offset: 4px;
}

.article-audio-seek::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
}

.article-audio-seek::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
}

.article-audio-rate {
    flex-shrink: 0;
    min-width: 44px;
    min-height: 36px;
    padding: 0.45rem 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    background: transparent;
    color: var(--accent-color);
    font-family: var(--font-heading);
    font-size: 0.68rem;
    letter-spacing: 0.06em;
    cursor: pointer;
}

.article-audio-rate:hover {
    color: var(--text-color);
    border-color: rgba(255, 255, 255, 0.35);
}

/* Docked / Sticky audio player (all platforms when scrolled past anchor while active) */
.article-audio.is-docked {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: min(calc(var(--max-width) - 4rem), calc(100vw - max(1.5rem, calc(env(safe-area-inset-left, 0px) + env(safe-area-inset-right, 0px) + 1.5rem))));
    bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    z-index: 95;
    margin: 0;
    background: rgba(5, 5, 5, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.55);
    border-color: rgba(255, 255, 255, 0.18);
    animation: audioDockIn 0.2s ease-out;
}

@keyframes audioDockIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

body.audio-docked .article-page {
    padding-bottom: 5.5rem;
}

.article-cover {
    margin: 0 0 1.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    background: #0a0a0a;
}

.article-cover img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: contain;
}

.article-body {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #e0e0e0;
}

.article-body h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 500;
    margin-top: 3rem;
    margin-bottom: 1.2rem;
    color: var(--text-color);
    letter-spacing: 0.02em;
}

.article-body h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 500;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    color: #f0f0f0;
}

.article-body p {
    margin-bottom: 1.6rem;
}

.article-body strong {
    font-weight: 500;
    color: #ffffff;
}

.article-body ul, .article-body ol {
    margin-bottom: 1.8rem;
    padding-left: 1.5rem;
}

.article-body li {
    margin-bottom: 0.6rem;
}

.article-body blockquote {
    border-left: 2px solid rgba(255, 255, 255, 0.4);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.02);
    font-style: italic;
    color: #cccccc;
}

.article-body blockquote p:last-child {
    margin-bottom: 0;
}

.article-body a {
    color: var(--text-color);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.3);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s ease, color 0.2s ease;
}

.article-body a:hover,
.article-body a:focus-visible {
    color: #ffffff;
    text-decoration-color: #ffffff;
}

.article-body code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9em;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    color: #f3f3f3;
}

.article-body pre {
    background: #0a0a0a;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
    margin: 2rem 0;
}

.article-body pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    font-size: 0.92rem;
    line-height: 1.6;
    color: #d9d9d9;
}

/* Coloration syntaxique (Pygments, classes hl-*) : palette sobre sur fond noir,
   trois teintes désaturées (bleu, ambre, vert) + blanc pour les noms, gris pour le reste */
.article-body pre code .hl-k,
.article-body pre code .hl-kn,
.article-body pre code .hl-kd,
.article-body pre code .hl-kr,
.article-body pre code .hl-kt,
.article-body pre code .hl-ow { color: #8ab4f8; font-weight: 600; }

.article-body pre code .hl-kc,
.article-body pre code .hl-m,
.article-body pre code .hl-mi,
.article-body pre code .hl-mf,
.article-body pre code .hl-mh { color: #f2c97d; }

.article-body pre code .hl-nc,
.article-body pre code .hl-nf,
.article-body pre code .hl-fm,
.article-body pre code .hl-nn { color: #ffffff; font-weight: 600; }

.article-body pre code .hl-nb,
.article-body pre code .hl-bp,
.article-body pre code .hl-nt { color: #7fd3d3; }

.article-body pre code .hl-nd { color: #f2c97d; }

.article-body pre code .hl-s,
.article-body pre code .hl-s1,
.article-body pre code .hl-s2,
.article-body pre code .hl-sa,
.article-body pre code .hl-sb,
.article-body pre code .hl-sd,
.article-body pre code .hl-se,
.article-body pre code .hl-si,
.article-body pre code .hl-sx { color: #a5d6a7; }

.article-body pre code .hl-c,
.article-body pre code .hl-c1,
.article-body pre code .hl-cm,
.article-body pre code .hl-cs,
.article-body pre code .hl-ch { color: #6f7a86; font-style: italic; }

.article-body pre code .hl-o,
.article-body pre code .hl-p { color: #9aa3ad; }

.article-body pre code .hl-n,
.article-body pre code .hl-na,
.article-body pre code .hl-nv,
.article-body pre code .hl-vi { color: #e3e3e3; }

.article-body pre code .hl-err { color: #e3e3e3; border: none; }

/* Callout Box inside Article */
.callout-box {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    padding: 1.5rem 1.8rem;
    margin: 2.5rem 0;
}

.callout-box h3 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.callout-box p:last-child {
    margin-bottom: 0;
}

/* Author Box at Bottom of Article */
.author-box {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.author-box h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
}

.author-box p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 0;
}

.author-cta {
    margin-top: 0.25rem;
}

.article-discussion {
    margin-top: 1.75rem;
}

.article-discussion a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px solid transparent;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.article-discussion a:hover,
.article-discussion a:focus-visible {
    color: var(--text-color);
    border-bottom-color: var(--border-color-hover);
}

.reading-progress-widget {
    --widget-ty: -50%;
    position: fixed;
    right: clamp(1.2rem, calc((100vw - var(--max-width)) / 2 - 88px), 4rem);
    top: 50%;
    z-index: 90;
    width: 58px;
    padding: 0.85rem 0.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.12rem;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    cursor: pointer;
    user-select: none;
    transform: translateY(var(--widget-ty));
    transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.reading-progress-widget.is-idle {
    opacity: 0.35;
    transform: translateY(var(--widget-ty)) scale(0.96);
}

.reading-progress-widget:hover {
    opacity: 1;
    transform: translateY(var(--widget-ty)) scale(1.03);
    border-color: rgba(255, 255, 255, 0.28);
}

.reading-widget-label,
.reading-time-sub {
    font-family: var(--font-heading);
    font-size: 0.58rem;
    font-weight: 500;
    color: var(--accent-color);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.reading-widget-percent,
.reading-time-val {
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-color);
    font-variant-numeric: tabular-nums;
}

.reading-time-val {
    font-size: 0.74rem;
    margin-top: 0.35rem;
}

.reading-gauge-track {
    width: 2px;
    height: 72px;
    margin: 0.45rem 0 0.15rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.reading-gauge-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--p, 0%);
    background: #ffffff;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.4);
    transition: height 0.08s ease-out, width 0.08s ease-out;
}

@media (max-width: 1080px) {
    .article-page {
        padding-bottom: 4.5rem;
    }

    .article-audio.is-docked {
        bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
    }

    body.audio-docked .reading-progress-widget {
        opacity: 0;
        pointer-events: none;
    }

    .reading-progress-widget {
        --widget-ty: 0%;
        top: auto;
        left: 50%;
        right: auto;
        bottom: max(0.85rem, env(safe-area-inset-bottom, 0px));
        width: max-content;
        flex-direction: row;
        gap: 0.5rem;
        padding: 0.4rem 0.8rem;
        border-radius: 999px;
        transform: translateX(-50%);
    }

    .reading-progress-widget.is-idle {
        opacity: 0;
        pointer-events: none;
        transform: translateX(-50%) translateY(12px);
    }

    .reading-progress-widget:hover {
        transform: translateX(-50%);
    }

    .reading-gauge-track {
        width: 36px;
        height: 2px;
        margin: 0;
    }

    .reading-gauge-fill {
        height: 100%;
        width: var(--p, 0%);
    }

    .reading-time-val {
        margin-top: 0;
        font-size: 0.72rem;
    }
}

/* Footer / Contact */
.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    padding-bottom: 0.5rem;
    width: 100%;
}

.footer-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.4rem;
    align-items: center;
    font-size: 0.95rem;
}

.footer-bar a {
    color: var(--link-color);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.footer-bar a:hover,
.footer-bar a:focus-visible {
    border-bottom-color: var(--link-color);
}

.footer-bar span {
    color: var(--accent-color);
}

.legal-notice {
    font-size: 0.8rem;
    color: #9a9a9a;
    margin-top: 1.25rem;
    width: 100%;
}

.legal-notice a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.legal-notice a:hover,
.legal-notice a:focus-visible {
    color: var(--text-muted);
    border-bottom-color: var(--text-muted);
}

.legal-body {
    font-size: 1.02rem;
    color: #d5d5d5;
}

.legal-body h2 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-color);
    margin: 2rem 0 0.7rem;
}

.legal-body h2:first-child {
    margin-top: 0;
}

.legal-body p {
    margin-bottom: 0.85rem;
}

.legal-body a {
    color: var(--link-color);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.legal-body a:hover,
.legal-body a:focus-visible {
    border-bottom-color: var(--link-color);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        padding: 0.75rem 1.25rem 0.65rem;
        gap: 0.55rem 1rem;
        flex-wrap: wrap;
        align-items: center;
    }

    .nav-brand {
        display: flex;
        font-size: 0.78rem;
        letter-spacing: 0.12em;
        flex: 1 1 auto;
        min-width: 0;
    }

    .lang-switch {
        flex: 0 0 auto;
        margin-left: auto;
    }

    .nav-links {
        order: 3;
        width: 100%;
        gap: 0.85rem;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 0.15rem 0 0.2rem;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-link {
        font-size: 0.7rem;
        letter-spacing: 0.05em;
        white-space: nowrap;
        flex: 0 0 auto;
    }

    .content-wrapper {
        padding: 2.5rem 1.25rem 3rem;
    }

    .hero-identity {
        gap: 1.1rem;
        margin-bottom: 1.4rem;
    }

    .hero-avatar {
        width: 80px;
        height: 80px;
    }

    .hero h1 {
        font-size: 1.55rem;
        letter-spacing: 0.12em;
    }

    .article-card {
        display: block;
    }

    .article-card-cover {
        aspect-ratio: 16 / 9;
        height: auto;
        min-height: 0;
    }
}

.articles-page-intro {
    max-width: 42rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0 0 2rem;
}

.articles-more {
    margin-top: 1.5rem;
}

.articles-more a {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--link-color);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 2px;
}

.articles-more a:hover {
    border-bottom-color: var(--link-color);
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0.7rem 1rem 0.55rem;
    }

    /* 5 entrées doivent tenir en 343 px : sinon « CONTACT » est coupé */
    .nav-links {
        gap: 0.5rem;
    }

    .nav-links a {
        font-size: 0.66rem;
        letter-spacing: 0.06em;
    }

    .reading-widget-label {
        display: none;
    }

    .article-audio {
        gap: 0.55rem;
        padding: 0.55rem 0.7rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .article-card,
    .nav-link,
    .lang-btn,
    .back-link,
    .article-discussion a,
    .article-audio.is-docked {
        transition: none;
        animation: none;
    }
}
