/* ═══════════════════════════════════════════════════
   Actuaire en herbe — Design System
   Inspiré de supranormal.co, typo Playfair+Lora+Inter
   ═══════════════════════════════════════════════════ */

:root {
  --bg: #FAFAF9;
  --text: #1A1A1A;
  --text-secondary: #6B6B6B;
  --accent: #1A1A1A;
  --button-text: #FAFAF9;
  --border: #E5E5E5;
  --card-bg: #F3F3F2;
  --tag-bg: #EDEDEC;
  --glass-bg: rgba(255, 255, 255, 0.55);
  --content-width: 720px;
  --page-width: 1200px;
  --gh-font-heading: 'Playfair Display', Georgia, serif;
  --gh-font-body: 'Lora', Georgia, 'Times New Roman', serif;
}

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

body {
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(0,0,0,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.025) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: 0 0;
  color: var(--text);
  font-family: 'Lora', Georgia, 'Times New Roman', serif;
  font-size: 18px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Fond symboles mathematiques */
body.bg-math {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280' viewBox='0 0 280 280'%3E%3Cstyle%3Etext%7Bfont-family:Georgia,serif;fill:%231a1a1a;opacity:0.04%7D%3C/style%3E%3Ctext x='10' y='28' font-size='18'%3E%E2%88%AB%3C/text%3E%3Ctext x='70' y='22' font-size='13'%3E%CF%83%C2%B2%3C/text%3E%3Ctext x='130' y='30' font-size='16'%3E%CE%A3%3C/text%3E%3Ctext x='190' y='24' font-size='12'%3E%E2%88%9E%3C/text%3E%3Ctext x='240' y='28' font-size='14'%3E%CE%BC%3C/text%3E%3Ctext x='40' y='68' font-size='12'%3E%E2%88%82%3C/text%3E%3Ctext x='105' y='72' font-size='15'%3E%CF%80%3C/text%3E%3Ctext x='165' y='65' font-size='11'%3EP(X)%3C/text%3E%3Ctext x='225' y='70' font-size='14'%3E%E2%88%9A%3C/text%3E%3Ctext x='20' y='112' font-size='13'%3E%CE%BB%3C/text%3E%3Ctext x='80' y='108' font-size='11'%3EE%5BX%5D%3C/text%3E%3Ctext x='145' y='115' font-size='16'%3E%E2%88%8F%3C/text%3E%3Ctext x='205' y='110' font-size='12'%3E%CE%B1%3C/text%3E%3Ctext x='255' y='108' font-size='11'%3Ee%CB%A3%3C/text%3E%3Ctext x='50' y='152' font-size='14'%3E%CE%94%3C/text%3E%3Ctext x='115' y='148' font-size='11'%3EVar%3C/text%3E%3Ctext x='175' y='155' font-size='13'%3E%E2%88%87%3C/text%3E%3Ctext x='235' y='150' font-size='12'%3E%CE%B2%3C/text%3E%3Ctext x='15' y='195' font-size='12'%3E%CF%86%3C/text%3E%3Ctext x='75' y='190' font-size='14'%3E%CE%98%3C/text%3E%3Ctext x='140' y='198' font-size='11'%3Ef(x)%3C/text%3E%3Ctext x='200' y='192' font-size='13'%3E%E2%89%88%3C/text%3E%3Ctext x='250' y='195' font-size='12'%3E%CE%B3%3C/text%3E%3Ctext x='35' y='238' font-size='15'%3E%E2%88%AB%3C/text%3E%3Ctext x='95' y='232' font-size='11'%3ElogL%3C/text%3E%3Ctext x='160' y='240' font-size='13'%3E%CF%87%C2%B2%3C/text%3E%3Ctext x='220' y='235' font-size='12'%3E%E2%88%80%3C/text%3E%3Ctext x='10' y='270' font-size='11'%3En!%3C/text%3E%3Ctext x='65' y='275' font-size='12'%3E%CE%A9%3C/text%3E%3Ctext x='125' y='268' font-size='14'%3E%E2%89%A4%3C/text%3E%3Ctext x='185' y='272' font-size='11'%3EdF%3C/text%3E%3Ctext x='245' y='270' font-size='13'%3E%CF%81%3C/text%3E%3C/svg%3E");
  background-size: 280px 280px;
}

/* Fond neutre */
body.bg-none {
  background-image: none;
}

.container { max-width: var(--content-width); margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: var(--page-width); margin: 0 auto; padding: 0 24px; }
.container-toc { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ── TYPO ── */
h1, h2, h3, h4, h5 { font-family: 'Playfair Display', Georgia, serif; font-weight: 400; }
.serif { font-family: 'Lora', Georgia, serif; }
.sans { font-family: 'Inter', system-ui, sans-serif; }

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

/* (ancien header Brief supprime - remplace par topbar pillule v2.1) */

/* ── BUTTONS ── */
.btn-primary {
  display: inline-block;
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
  background: var(--accent); color: var(--button-text);
  padding: 14px 36px; border-radius: 3px; text-decoration: none;
  border: none; cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: #333; transform: translateY(-1px); color: var(--button-text); }

.btn-outline {
  display: inline-block;
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.08em;
  background: transparent; color: var(--text);
  padding: 14px 36px; border-radius: 3px;
  border: 1px solid var(--text); text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.btn-outline:hover { background: var(--text); color: var(--bg); }

.section-link {
  font-family: 'Inter', sans-serif; font-size: 13px;
  color: var(--text); text-decoration: none;
  border-bottom: 1px solid var(--text); padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.section-link:hover { color: var(--text-secondary); border-color: var(--text-secondary); }

/* ── HERO ── */
.hero {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 60px 48px 48px;
  gap: 64px;
  max-width: var(--page-width);
  margin: 0 auto;
}
.hero .hero-text { flex: 1 1 50%; max-width: 580px; }
.hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 400;
  line-height: 1.35;
  margin-bottom: 20px;
}
.hero h1 .fixed-line { display: block; }

/* Rotating words */
.hero h1 .rotating-wrapper {
  display: inline-block;
  position: relative;
  vertical-align: bottom;
  text-align: left;
  min-width: 300px;
  height: 1.3em;
  overflow: hidden;
}
.hero h1 .rotating-word {
  position: absolute;
  top: 0; left: 0;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(12px);
  animation: rotateWords 8s infinite;
  color: var(--text-secondary);
}
.hero h1 .rotating-word:nth-child(1) { animation-delay: 0s; }
.hero h1 .rotating-word:nth-child(2) { animation-delay: 2s; }
.hero h1 .rotating-word:nth-child(3) { animation-delay: 4s; }
.hero h1 .rotating-word:nth-child(4) { animation-delay: 6s; }
@keyframes rotateWords {
  0%, 15%   { opacity: 0; transform: translateY(12px); }
  20%, 40%  { opacity: 1; transform: translateY(0); }
  45%, 100% { opacity: 0; transform: translateY(-12px); }
}

.hero p {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.65;
}
.hero .hero-cta {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero .hero-media {
  flex: 1 1 45%;
  max-width: 520px;
  aspect-ratio: 4/3;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero .hero-media video, .hero .hero-media iframe { width: 100%; height: 100%; object-fit: cover; }
.hero .hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-placeholder {
  font-family: 'Inter', sans-serif; font-size: 12px;
  color: var(--text-secondary); text-transform: uppercase;
  letter-spacing: 0.08em; text-align: center;
}

/* ── BACK NAV ── */
.back-nav { padding: 40px 0 0; }
.back-nav .container-wide { display: flex; gap: 12px; justify-content: flex-start; }

/* ── PAGE HEADER ── */
.page-header { padding: 80px 0 48px; }
.page-header h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 400; margin-top: 0; line-height: 1.3;
}
.page-subtitle { font-size: 16px; color: var(--text-secondary); margin-top: 8px; }

/* ── ARTICLES GRID ── */
.articles-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px; padding-bottom: 80px;
}
.article-card {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--border); padding-top: 28px;
}
.article-card .card-tag {
  font-family: 'Inter', sans-serif; font-size: 10px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-secondary); margin-bottom: 12px;
}
.article-card h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px; font-weight: 400; line-height: 1.35; margin-bottom: 8px;
}
.article-card h2 a { color: var(--text); text-decoration: none; }
.article-card h2 a:hover { color: var(--text-secondary); }
.article-card .card-excerpt {
  font-size: 14px; color: var(--text-secondary); line-height: 1.65;
  margin-bottom: 16px; flex: 1;
}
.article-card .card-meta {
  font-family: 'Inter', sans-serif; font-size: 11px;
  color: #999; text-transform: uppercase; letter-spacing: 0.06em;
}
.article-card.featured {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px; align-items: center;
  border-top: 1px solid var(--text); padding-top: 32px; padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
.article-card.featured .card-image {
  aspect-ratio: 4/3; background: var(--card-bg);
  border: 1px solid var(--border); border-radius: 2px;
  overflow: hidden; order: 1;
}
.article-card.featured .card-image img { width: 100%; height: 100%; object-fit: cover; }
.article-card.featured .card-content { order: 0; }
.article-card.featured h2 { font-size: 26px; }
.article-card.featured .card-excerpt { font-size: 15px; }

@media (max-width: 768px) {
  .articles-grid { grid-template-columns: 1fr; gap: 32px; }
  .article-card.featured { grid-template-columns: 1fr; gap: 24px; }
  .article-card.featured .card-image { order: -1; aspect-ratio: 16/9; }
}

/* ── FEATURES SECTION ── */
.features-section { padding: 80px 0 60px; }
.features-layout { display: flex; gap: 48px; }
.features-sticky {
  width: 33%;
  flex-shrink: 0;
  position: sticky;
  top: 32px;
  align-self: flex-start;
}
.features-sticky h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(26px, 3.5vw, 34px);
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 16px;
}
.features-sticky .features-subtitle {
  font-size: 16px; color: var(--text-secondary); line-height: 1.6;
}
.features-sticky .features-subtitle strong { color: var(--text); font-weight: 500; }
.features-divider { width: 64px; height: 1px; background: var(--text); margin-top: 24px; }

.features-list { flex: 1; display: flex; flex-direction: column; gap: 64px; }
.feature-block { display: flex; gap: 24px; }
.feature-block .feature-number {
  font-family: 'Playfair Display', serif; font-size: 56px;
  font-weight: 400; color: var(--border); line-height: 1;
  flex-shrink: 0; width: 56px; user-select: none;
}
.feature-block .feature-content { flex: 1; }
.feature-block .feature-content h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px; font-weight: 400; margin-bottom: 12px; line-height: 1.3;
}
.feature-block .feature-content .feature-desc {
  font-size: 15px; color: var(--text-secondary); line-height: 1.65; margin-bottom: 20px;
}

/* Articles previews */
.feature-articles { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.feature-article-card { padding-top: 12px; }
.feature-article-card h4 {
  font-family: 'Playfair Display', serif; font-size: 16px;
  font-weight: 400; line-height: 1.4;
}
.feature-article-card .article-tag {
  font-family: 'Inter', sans-serif; font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-secondary); margin-bottom: 4px;
}

/* Video carousel */
.video-carousel {
  display: flex; gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px; margin-bottom: 20px;
}
.video-carousel::-webkit-scrollbar { display: none; }
.video-carousel .video-card { flex: 0 0 260px; scroll-snap-align: start; }
.video-carousel .video-card .thumb {
  aspect-ratio: 16/9;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 10px;
}
.video-carousel .video-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-carousel .video-card h4 {
  font-family: 'Playfair Display', serif; font-size: 14px;
  font-weight: 400; line-height: 1.4; margin-bottom: 2px;
}
.video-carousel .video-card .meta {
  font-family: 'Inter', sans-serif; font-size: 10px;
  color: #999; text-transform: uppercase; letter-spacing: 0.06em;
}

/* ── SINGLE POST ── */
.post-feature-image { width: 100%; max-height: 480px; overflow: hidden; }
.post-feature-image img { width: 100%; height: 100%; object-fit: cover; }

.post-layout { padding: 0 0 80px; }
.post-with-toc { display: flex; gap: 48px; align-items: flex-start; }
.post-toc-sidebar { width: 220px; flex-shrink: 0; position: sticky; top: 100px; }
.post-content { flex: 1; min-width: 0; max-width: var(--content-width); }
.toc-title {
  font-family: 'Inter', sans-serif; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-secondary); margin-bottom: 12px;
}
.post-toc { font-family: 'Inter', sans-serif; font-size: 13px; }
.post-toc .toc-link { color: var(--text-secondary); text-decoration: none; transition: color 0.15s; }
.post-toc .toc-link:hover, .post-toc .is-active-link { color: var(--text); }
.post-toc .toc-list { list-style: none; padding: 0; }
.post-toc .toc-list-item { margin-bottom: 6px; }
.post-toc .toc-list .toc-list { padding-left: 12px; }

.post-content .ghost-content { font-size: 18px; line-height: 1.9; }
.post-content .ghost-content p { margin-bottom: 24px; }
.post-content .ghost-content h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px; font-weight: 400; margin: 48px 0 16px;
}
.post-content .ghost-content h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px; font-weight: 400; margin: 36px 0 12px;
}
.post-content .ghost-content img {
  max-width: 100%; height: auto; margin: 32px 0;
}
.post-content .ghost-content blockquote {
  border-left: 2px solid var(--text);
  padding-left: 24px; margin: 32px 0;
  color: var(--text-secondary); font-style: italic;
}
.post-content .ghost-content pre {
  background: var(--card-bg); padding: 24px;
  border-radius: 2px; overflow-x: auto;
  font-size: 14px; margin: 24px 0;
}
.post-content .ghost-content code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.9em;
}

/* ── PRODUCTS PAGE ── */
.catalogue-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding-bottom: 80px; }
.product-card {
  border: 1px solid var(--border); padding: 40px 36px;
  border-radius: 2px; transition: border-color 0.2s;
}
.product-card:hover { border-color: var(--text-secondary); }
.product-card .product-icon { font-size: 28px; margin-bottom: 16px; }
.product-card h3 {
  font-family: 'Playfair Display', serif; font-size: 20px;
  font-weight: 600; margin-bottom: 12px;
}
.product-card .product-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.65; margin-bottom: 16px; }
.product-card .product-details { font-family: 'Inter', sans-serif; font-size: 12px; color: var(--text-secondary); margin: 16px 0; }
.product-card .product-details span { display: block; margin-bottom: 4px; }
.product-card .product-price { font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500; color: var(--text); margin-top: 16px; }

/* ── ABOUT PAGE ── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; padding-bottom: 64px; }
.about-grid .about-image {
  aspect-ratio: 3/4; background: var(--card-bg);
  border: 1px solid var(--border); border-radius: 2px;
  overflow: hidden;
}
.about-grid .about-image img { width: 100%; height: 100%; object-fit: cover; }
.about-image-placeholder {
  font-family: 'Inter', sans-serif; font-size: 12px;
  color: var(--text-secondary); text-transform: uppercase;
  letter-spacing: 0.08em; text-align: center;
  display: flex; align-items: center; justify-content: center;
  height: 100%;
}
.about-grid .about-text { display: flex; flex-direction: column; gap: 16px; }
.about-description { font-size: 16px; color: var(--text-secondary); line-height: 1.7; }
.about-description p { margin-bottom: 12px; }
.about-description strong { color: var(--text); font-weight: 500; }
.about-content { font-size: 16px; color: var(--text-secondary); line-height: 1.7; }
.about-content p { margin-bottom: 12px; }
.about-content strong { color: var(--text); font-weight: 500; }
.about-grid .about-text h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px; font-weight: 400; line-height: 1.3;
}
.about-grid .about-text p { font-size: 16px; color: var(--text-secondary); line-height: 1.7; }
.about-grid .about-text strong { color: var(--text); font-weight: 500; }

/* Skills stack */
.skills-inline { margin-top: 32px; }
.skills-inline h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px; font-weight: 400; margin-bottom: 16px;
}
.skills-stack { display: flex; flex-wrap: wrap; gap: 10px; }

/* Soft skills inline (colonne droite) */
.soft-skills-inline { margin-top: 24px; }
.soft-skills-inline h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 18px; font-weight: 400; margin-bottom: 8px;
}
.bubble-cloud-sm {
  position: relative; width: 100%; height: 144px;
  cursor: grab; overflow: hidden;
}
.bubble-cloud-sm:active { cursor: grabbing; }

.skill-tag {
  font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500;
  color: var(--text);
  background: rgba(250, 250, 249, 0.5);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(26, 26, 26, 0.08);
  padding: 8px 18px; border-radius: 100px;
  cursor: default; position: relative;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.skill-tag:hover { border-color: rgba(26, 26, 26, 0.2); box-shadow: 0 2px 12px rgba(0,0,0,0.04); }

/* Liquid glass popup */
.skill-tag .skill-popup {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: rgba(250, 250, 249, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(26, 26, 26, 0.12);
  border-radius: 8px;
  padding: 16px 20px;
  width: 240px;
  text-align: left;
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s, transform 0.25s;
  pointer-events: none;
  z-index: 100;
  box-shadow: 0 8px 32px rgba(0,0,0,0.06);
}
.skill-tag .skill-popup::after {
  content: '';
  position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: rgba(250, 250, 249, 0.75);
}
.skill-tag:hover .skill-popup {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.skill-tag .skill-popup .popup-title {
  font-family: 'Inter', sans-serif; font-size: 12px;
  font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text); margin-bottom: 6px;
}
.skill-tag .skill-popup .popup-desc {
  font-family: 'Lora', Georgia, serif; font-size: 13px;
  line-height: 1.55; color: var(--text-secondary);
}

/* Pillars */
.pillars-section { padding: 0 0 80px; }
.pillars-section h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px; font-weight: 400; margin-bottom: 32px;
}
.pillars-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.pillar-card {
  background: rgba(250, 250, 249, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(26, 26, 26, 0.08);
  padding: 40px 36px;
  border-radius: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.pillar-card:hover {
  border-color: rgba(26, 26, 26, 0.18);
  box-shadow: 0 4px 24px rgba(0,0,0,0.04);
}
.pillar-card .pillar-icon { font-size: 32px; margin-bottom: 20px; }
.pillar-card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px; font-weight: 400; margin-bottom: 12px; line-height: 1.3;
}
.pillar-card .pillar-desc { font-size: 15px; color: var(--text-secondary); line-height: 1.65; margin-bottom: 20px; }
.pillar-card .pillar-items { list-style: none; margin-bottom: 24px; }
.pillar-card .pillar-items li {
  font-family: 'Inter', sans-serif; font-size: 13px;
  color: var(--text-secondary); margin-bottom: 6px;
  padding-left: 16px; position: relative;
}
.pillar-card .pillar-items li::before { content: '→'; position: absolute; left: 0; color: var(--text); }

/* Social links */
.social-links { display: flex; gap: 20px; margin-top: 8px; }
.social-links a {
  font-family: 'Inter', sans-serif; font-size: 13px;
  color: var(--text-secondary); text-decoration: none; transition: color 0.2s;
}
.social-links a:hover { color: var(--text); }

/* ── FOOTER (Brief style) ── */
.site-footer { padding: 64px 24px 32px; }
.footer-box {
  max-width: var(--page-width); margin: 0 auto 40px;
  background: var(--card-bg); border-radius: 8px;
  padding: 56px 48px;
  display: flex; flex-direction: row; align-items: center; justify-content: space-between;
  gap: 32px; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.footer-logo-link { margin-bottom: 4px; }
.footer-logo-img { height: 32px; width: auto; }
.footer-tagline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 22px; font-weight: 500; color: var(--text);
  line-height: 1.3; max-width: 400px;
}
.footer-desc {
  font-size: 15px; color: var(--text-secondary);
  line-height: 1.6; max-width: 440px;
}
.footer-divider { border: none; height: 1px; width: 100%; max-width: 320px; background: var(--border); }
.footer-watermark {
  position: absolute; bottom: -0.1em; left: -0.05em;
  font-family: 'Playfair Display', serif;
  font-size: clamp(80px, 10vw, 140px); font-weight: 600;
  background: linear-gradient(to top, var(--border), var(--card-bg));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.6; line-height: 1; white-space: nowrap;
  pointer-events: none; user-select: none; z-index: 0;
}
.footer-box > *:not(.footer-watermark) { position: relative; z-index: 1; }
.footer-newsletter-form { display: flex; gap: 12px; flex-wrap: wrap; }
.footer-newsletter-form input[type="email"] {
  font-family: 'Inter', sans-serif; font-size: 14px;
  padding: 14px 20px;
  border: 1px solid var(--border); background: var(--bg);
  border-radius: 6px; min-width: 260px; outline: none;
}
.footer-newsletter-form input[type="email"]:focus { border-color: var(--text); }
.footer-nav {
  display: flex; flex-wrap: wrap; gap: 20px;
}
.footer-nav a {
  font-family: 'Inter', sans-serif; font-size: 12px;
  color: var(--text-secondary); text-decoration: none;
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--text); }
.footer-bottom {
  max-width: var(--page-width); margin: 0 auto; text-align: center;
  font-family: 'Inter', sans-serif; font-size: 12px; color: var(--text-secondary);
}

/* ── ERROR / TAG / AUTHOR ── */
.error-page {
  max-width: var(--content-width); margin: 0 auto;
  padding: 120px 24px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.error-page h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(72px, 10vw, 120px); font-weight: 700;
  line-height: 1; color: var(--text);
}
.error-page h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(24px, 4vw, 32px); font-weight: 400;
  margin-bottom: 8px;
}
.error-text { font-size: 16px; color: var(--text-secondary); max-width: 440px; }
.error-actions { display: flex; gap: 12px; margin-top: 16px; }

.tag-page, .author-page {
  max-width: var(--content-width); margin: 0 auto;
  padding: 80px 24px; text-align: center;
}
.tag-page h1, .author-page h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 400; margin-bottom: 16px;
}
.tag-page p { color: var(--text-secondary); }

/* ── POST FEED (Brief style) ── */
.post-feed { border-top: 1px solid var(--border); }
.post-card-h { }
.post-card-divider { border-bottom: 1px solid var(--border); }
.post-card-link {
  display: flex; align-items: center; gap: 24px;
  padding: 24px 0; color: var(--text-secondary); text-decoration: none;
  transition: background 0.15s;
}
.post-card-link:hover { background: linear-gradient(to right, var(--card-bg), var(--bg), var(--card-bg)); }
.post-card-img {
  flex: 1; max-width: 180px; aspect-ratio: 16/9;
  background: var(--card-bg); border-radius: 4px; overflow: hidden; flex-shrink: 0;
}
.post-card-img img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { flex: 2; display: flex; flex-direction: column; gap: 8px; }
.post-card-body h2 {
  font-family: 'Inter', sans-serif; font-size: 16px; font-weight: 600;
  line-height: 1.3; color: var(--text);
}
.post-card-link:hover .post-card-body h2 {
  background: linear-gradient(currentColor, currentColor);
  background-size: 0% 2px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size 0.3s;
}
.post-card-link:hover .post-card-body h2 { background-size: 100% 2px; }
.post-card-excerpt { font-size: 14px; line-height: 1.6; display: none; }
.post-card-info {
  font-size: 13px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.post-card-lock, .post-card-featured { font-size: 12px; }

@media (min-width: 640px) {
  .post-card-excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}
@media (max-width: 639px) {
  .post-card-link { flex-direction: column; align-items: flex-start; gap: 12px; }
  .post-card-img { max-width: 100%; width: 100%; }
}

/* ── AUTHOR AVATAR ── */
.author-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin-bottom: 16px; }

/* ── PAGINATION ── */
.pagination {
  display: flex; justify-content: center; align-items: center; gap: 12px;
  padding: 48px 0 80px; font-family: 'Inter', sans-serif; font-size: 13px;
}
.pagination a {
  display: flex; align-items: center; gap: 4px;
  padding: 8px 16px; border: 1px solid var(--border); border-radius: 6px;
  color: var(--text); text-decoration: none; transition: background 0.15s;
}
.pagination a:hover { background: var(--card-bg); }
.pagination .page-number { color: var(--text-secondary); }

/* ── Ghost Koenig editor ── */
.kg-width-wide { max-width: 960px; margin-left: auto; margin-right: auto; }
.kg-width-full { max-width: 100vw; margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%); }
.kg-card { margin: 32px 0; }
.kg-image { max-width: 100%; height: auto; }
.kg-gallery-container { display: flex; flex-direction: column; gap: 8px; }
.kg-gallery-row { display: flex; gap: 8px; }
.kg-gallery-image img { width: 100%; height: auto; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .hero { gap: 40px; }
}
@media (max-width: 768px) {
  .hero { flex-direction: column; padding: 32px 24px; gap: 24px; }
  .hero .hero-media { order: -1; max-width: 100%; width: 100%; aspect-ratio: 16/9; }
  .hero .hero-text { max-width: 100%; order: 1; }
  .hero h1 { font-size: clamp(24px, 6vw, 32px); }

  .features-layout { flex-direction: column; gap: 40px; }
  .features-sticky { position: static; width: 100%; }
  .features-list { gap: 48px; }
  .feature-block .feature-number { font-size: 42px; width: 42px; }

  .post-feed { grid-template-columns: 1fr; gap: 32px; }
  .catalogue-grid { grid-template-columns: 1fr; }
  .pillars-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-grid .about-image { max-width: 300px; aspect-ratio: 4/3; }
  .footer-box { padding: 40px 24px; }
  .footer-newsletter-form { flex-direction: column; align-items: flex-start; }
  .footer-newsletter-form input[type="email"] { min-width: 100%; }
  .footer-watermark { font-size: clamp(48px, 12vw, 80px) !important; }
  .post-with-toc { flex-direction: column; }
  .post-toc-sidebar { width: 100%; position: static; margin-bottom: 32px; }

  .skill-tag .skill-popup { width: 200px; left: 0; transform: translateX(0) translateY(6px); }
  .skill-tag:hover .skill-popup { transform: translateX(0) translateY(0); }
  .skill-tag .skill-popup::after { left: 32px; }
}
@media (max-width: 480px) {
  .hero h1 .rotating-wrapper { min-width: 240px; display: block; margin-top: 4px; }
  .video-carousel .video-card { flex: 0 0 220px; }
}

/* ── BUBBLES (soft skills) ── */
.bubbles-section { padding: 60px 0; }
.bubbles-section h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px; font-weight: 400; margin-bottom: 8px;
}
.bubbles-subtitle { font-size: 14px; color: var(--text-secondary); margin-bottom: 24px; max-width: 500px; }
.bubble-cloud {
  position: relative; width: 100%; max-width: 700px;
  margin: 0 auto; cursor: grab; overflow: hidden;
}
.bubble-cloud:active { cursor: grabbing; }
.bubble {
  position: absolute; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-weight: 700; text-align: center; line-height: 1.1;
  user-select: none; pointer-events: auto;
  background: var(--glass-bg, rgba(255,255,255,0.55));
  border: 2.5px solid rgba(0,0,0,0.7);
  color: var(--text);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: box-shadow 0.3s, border-color 0.3s;
  will-change: transform, left, top;
  z-index: 1;
}
.bubble:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.22);
  border-color: rgba(0,0,0,0.9);
  z-index: 10;
}
.bubble span { display: block; padding: 2px; max-width: 85%; word-break: break-word; }
.bubble-tooltip {
  display: none; position: fixed; z-index: 1000;
  background: rgba(255,255,255,0.65); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0,0,0,0.12); border-radius: 20px;
  padding: 18px 22px; box-shadow: 0 12px 40px rgba(0,0,0,0.10);
  max-width: 360px; pointer-events: auto;
  color: var(--text);
}
.bubble-tooltip.show { display: block; }
.bubble-tooltip h4 { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.bubble-tooltip p { font-size: 12px; color: var(--text-secondary); line-height: 1.6; }
.bubble-tooltip-close {
  position: absolute; top: 8px; right: 12px; background: none; border: none;
  font-size: 16px; cursor: pointer; color: var(--text-secondary); padding: 4px;
}
.bubble-tooltip-close:hover { color: var(--text); }

@media (max-width: 640px) {
  .bubble-cloud { max-width: 100%; }
  .bubble-tooltip { max-width: 280px; left: 10px !important; right: 10px !important; }
}

/* ═══════════════════════════════════════════════════
   v2.1 — Nouveaux composants (navbar pillule, articles, tag, footer droite)
   ═══════════════════════════════════════════════════ */

/* ── TOPBAR (navbar pillule glass) ── */
.topbar { position:sticky; top:0; z-index:50; padding:16px 24px 0; }
.topbar-pill {
  max-width: var(--page-width); margin:0 auto;
  background: var(--glass-bg); backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border:1px solid rgba(26,26,26,0.08); border-radius:100px;
  padding:10px 12px 10px 20px;
  display:flex; align-items:center; gap:6px;
  box-shadow:0 1px 3px rgba(0,0,0,0.03);
}
.topbar-logo {
  font-family: 'Playfair Display', Georgia, serif; font-size:18px; font-weight:600;
  color:var(--text); text-decoration:none; flex-shrink:0;
}
.topbar-nav { flex:1; display:flex; justify-content:center; gap:0; }
.topbar-nav .nav { display:flex; gap:0; list-style:none; }
.topbar-nav .nav li { display:flex; }
.topbar-nav .nav a {
  font-family:'Inter',sans-serif; font-size:13px; font-weight:500;
  color:var(--text-secondary); padding:8px 16px; border-radius:999px;
  text-decoration:none; transition:background 0.15s, color 0.15s;
}
.topbar-nav .nav a:hover, .topbar-nav .nav-current a {
  background:rgba(26,26,26,0.05); color:var(--text);
}
.topbar-actions { display:flex; align-items:center; gap:6px; flex-shrink:0; }
.topbar-search {
  display:flex; align-items:center; justify-content:center;
  width:36px; height:36px; border-radius:50%;
  background:transparent; border:none; cursor:pointer;
  color:var(--text-secondary); transition:background 0.15s, color 0.15s;
}
.topbar-search:hover { background:rgba(26,26,26,0.05); color:var(--text); }
.topbar-search svg { width:16px; height:16px; stroke:currentColor; stroke-width:1.5; fill:none; }
.topbar-btn {
  font-family:'Inter',sans-serif; font-size:12px; font-weight:500;
  background:transparent; color:var(--text-secondary);
  border:none; padding:8px 16px; border-radius:999px;
  text-decoration:none; cursor:pointer;
  transition:background 0.15s, color 0.15s;
}
.topbar-btn:hover { background:rgba(26,26,26,0.05); color:var(--text); }
.topbar-btn-primary {
  background:var(--accent); color:var(--button-text); padding:8px 20px;
}
.topbar-btn-primary:hover { opacity:0.85; background:var(--accent); }

/* Hamburger (mobile only) */
.topbar-hamburger {
  display:none; flex-direction:column; justify-content:center; align-items:center;
  width:36px; height:36px;
  background:none; border:none; cursor:pointer; padding:0;
  flex-shrink:0;
}
.topbar-hamburger span {
  display:block; width:20px; height:2px; background:var(--text);
  border-radius:1px; transition:transform 0.25s, opacity 0.2s;
  position:relative;
}
.topbar-hamburger span:nth-child(1) { top:-3px; }
.topbar-hamburger span:nth-child(2) { top:0; }
.topbar-hamburger span:nth-child(3) { top:3px; }
.nav-open .topbar-hamburger span:nth-child(1) { top:0; transform:rotate(45deg); }
.nav-open .topbar-hamburger span:nth-child(2) { opacity:0; }
.nav-open .topbar-hamburger span:nth-child(3) { top:0; transform:rotate(-45deg); margin-top:-4px; }

/* ── ARTICLES PAGE ── */
.search-wrapper { padding:0 0 56px; }
.search-input {
  width:100%; max-width:400px; padding:14px 18px;
  font-family:Inter,sans-serif; font-size:14px; text-align:left;
  border:1px solid var(--border); border-radius:100px;
  background:var(--bg); color:var(--text-secondary); cursor:pointer; outline:none;
  transition:border-color 0.2s;
}
.search-input:hover, .search-input:focus { border-color:var(--text); }
.category-section { padding-bottom:64px; }
.category-row { display:grid; grid-template-columns:1fr 1fr; gap:48px; align-items:start; }
.category-image-link { display:block; text-decoration:none; border-radius:6px; overflow:hidden; border:1px solid var(--border); aspect-ratio:4/3; transition:border-color 0.2s; }
.category-image-link:hover { border-color:var(--text-secondary); }
.category-image-img { width:100%; height:100%; object-fit:cover; }
.category-image-placeholder { width:100%; height:100%; background:var(--card-bg); display:flex; align-items:center; justify-content:center; font-family:Inter,sans-serif; font-size:11px; color:var(--text-secondary); text-transform:uppercase; letter-spacing:.06em; text-align:center; padding:16px; }
.category-content { display:flex; flex-direction:column; }
.category-header { margin-bottom:20px; }
.part-label { font-family:Inter,sans-serif; font-size:11px; font-weight:500; text-transform:uppercase; letter-spacing:.08em; color:var(--text-secondary); margin-bottom:8px; }
.category-header h2 { font-family:'Playfair Display',Georgia,serif; font-size:26px; font-weight:400; line-height:1.3; margin-bottom:8px; }
.category-header-desc { font-size:15px; color:var(--text-secondary); max-width:520px; line-height:1.7; }
.category-post-count { font-family:Inter,sans-serif; font-size:13px; color:var(--text-secondary); margin-bottom:8px; }
.article-list { border-top:1px solid var(--border); }
.article-list-item { display:flex; align-items:center; gap:12px; padding:16px 0; border-bottom:1px solid var(--border); text-decoration:none; color:var(--text-secondary); transition:background 0.15s, padding-left 0.2s; }
.article-list-item:hover { background:rgba(0,0,0,0.015); padding-left:8px; color:var(--text); }
.article-title { flex:1; font-size:15px; line-height:1.5; }
.article-meta { font-family:Inter,sans-serif; font-size:11px; color:#999; white-space:nowrap; }
.article-arrow { font-size:14px; color:#ccc; transition:color 0.2s, transform 0.2s; }
.article-list-item:hover .article-arrow { color:var(--text); transform:translateX(2px); }
.explore-link { display:inline-block; padding-top:18px; font-family:Inter,sans-serif; font-size:13px; font-weight:500; color:var(--text-secondary); text-decoration:none; transition:color 0.2s; }
.explore-link:hover { color:var(--text); }
.explore-link .arrow { display:inline-block; transition:transform 0.2s; }
.explore-link:hover .arrow { transform:translateX(4px); }

/* ── TAG PAGE ── */
.tag-frame-section { padding: 80px 0 48px; }
.tag-header-frame {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 56px 48px;
  text-align: center;
  background: var(--bg);
}
.tag-header-frame h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 12px;
}
.tag-header-desc {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 16px;
  line-height: 1.7;
}
.tag-post-count {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--text-secondary);
}

.glass-btn {
  font-family:'Inter',sans-serif; font-size:13px; font-weight:500;
  background:var(--glass-bg); backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  border:1px solid rgba(26,26,26,0.08); border-radius:100px;
  text-decoration:none; display:inline-flex; align-items:center; justify-content:center;
  padding:10px 24px; color:var(--text);
  transition:background 0.2s, border-color 0.2s;
}
.glass-btn:hover { background:rgba(250,250,249,0.8); border-color:rgba(26,26,26,0.15); }
.glass-btn.on-dark {
  background:rgba(250,250,249,0.12); border-color:rgba(250,250,249,0.2); color:#FAFAF9;
}
.glass-btn.on-dark:hover { background:rgba(250,250,249,0.2); border-color:rgba(250,250,249,0.35); }

/* ── ARTICLE LIST (centrée) ── */
.article-list-section { padding-bottom:32px; }

/* ── FOOTER DROITE ── */
.footer-left { display:flex; flex-direction:column; gap:12px; flex:1; min-width:280px; }
.footer-right { display:flex; flex-direction:column; gap:10px; flex-shrink:0; width:360px; }
.footer-newsletter-split { display:flex; gap:8px; }
.footer-newsletter-split input {
  flex:1; padding:12px 16px; font-family:Inter,sans-serif; font-size:14px;
  border:1px solid var(--border); border-radius:100px;
  background:var(--bg); color:var(--text); outline:none;
}
.footer-newsletter-split input:focus { border-color:var(--text); }
.footer-submit-btn {
  font-family:'Inter',sans-serif; font-size:12px; font-weight:500;
  background:var(--glass-bg); backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  border:1px solid rgba(26,26,26,0.08); border-radius:100px;
  padding:12px 24px; color:var(--text); cursor:pointer;
  white-space:nowrap;
  transition:background 0.2s, border-color 0.2s;
}
.footer-submit-btn:hover { background:rgba(250,250,249,0.8); border-color:rgba(26,26,26,0.15); }
.footer-disclaimer { font-size:11px; color:#aaa; }
.footer-nav .nav { display:flex; flex-wrap:wrap; gap:20px; list-style:none; }

/* ── MOBILE v2 ── */
@media (max-width:768px) {
  .topbar { padding:12px 12px 0; }
  .topbar-pill {
    display:flex; align-items:center; gap:6px;
    padding:10px 16px; border-radius:24px;
    flex-wrap:nowrap; position:relative;
  }
  /* Cacher nav + actions, montrer hamburger */
  .topbar-nav, .topbar-actions { display:none; }
  .topbar-hamburger { display:flex; margin-left:auto; }

  /* Etat ouvert */
  .nav-open.topbar-pill {
    flex-wrap:wrap; border-radius:20px; padding-bottom:16px;
  }
  .topbar-logo { order:0; flex:1; }
  .nav-open .topbar-hamburger { order:1; }

  .nav-open .topbar-nav {
    display:flex; order:3; width:100%;
    flex-direction:column; align-items:stretch;
    padding-top:12px; border-top:1px solid rgba(26,26,26,0.06);
    margin-top:8px;
  }
  .nav-open .topbar-nav .nav {
    display:flex; flex-direction:column; align-items:center; gap:2px;
    list-style:none;
  }
  .nav-open .topbar-nav .nav a {
    font-size:14px; padding:10px 16px; display:block;
    text-align:center; border-radius:8px; width:100%;
  }
  .nav-open .topbar-nav .nav a:hover { background:rgba(26,26,26,0.04); }

  .nav-open .topbar-actions {
    display:flex; order:4; width:100%;
    justify-content:center; padding-top:8px; gap:8px;
  }
  .nav-open .topbar-actions .topbar-search { display:none; }
  .nav-open .topbar-actions .topbar-btn-primary {
    width:100%; text-align:center; padding:10px 20px;
  }

  /* Autres ajustements mobile */
  .category-row { grid-template-columns:1fr; gap:24px; }
  .category-image-link { aspect-ratio:16/9; }
  .tag-header-frame { padding: 32px 24px; }
  .tag-header-frame h1 { font-size: 24px; }
  .footer-right { width:100%; }
  .footer-newsletter-split { flex-direction:column; }
}
