/* Articles de sumbrel.com : mêmes couleurs, polices et ombres franches que la landing (site/en/index.html). */
:root {
  color-scheme: light;
  --paper: #FFFFFF;
  --ink: #2B2A3A;
  --ink-soft: #5E5B72;
  --line: #111018;
  --violet: #D48CF8;
  --violet-deep: #9B4DE0;
  --violet-wash: #F6EAFE;
  --lilac: #EEE3FC;
  --shadow: 4px 5px 0 var(--line);
  --font-display: "Montserrat", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-brand: "Baloo 2", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-display); font-size: 17px; line-height: 1.7; }
a { color: inherit; text-decoration-color: rgba(17,16,24,.4); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--violet-deep); }
img { max-width: 100%; height: auto; }

/* En-tête */
.top { max-width: 1180px; margin: 0 auto; padding: 20px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.top .logo { line-height: 0; }
.top .logo img { width: 132px; height: auto; }
.top nav { display: flex; align-items: center; gap: 22px; font-weight: 700; font-size: 15px; }
.top nav a:not(.btn) { text-decoration: none; }
.top nav a:not(.btn):hover { text-decoration: underline; }
.btn {
  font-family: var(--font-brand); font-weight: 800; font-size: 17px; line-height: 1.4;
  color: var(--line); background: var(--violet);
  border: 2.5px solid var(--line); border-radius: 999px; box-shadow: var(--shadow);
  padding: 10px 24px 8px; text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 6px 0 var(--line); }
@media (max-width: 620px) {
  .top nav a:not(.btn) { display: none; }
  .top .btn { font-size: 15px; padding: 8px 16px 6px; }
}

/* Article */
.article, .index { max-width: 760px; margin: 0 auto; padding: 12px 16px 40px; }
.crumbs { font-size: 14px; color: var(--ink-soft); margin-bottom: 18px; }
/* Lien vers l'autre langue : discret, à droite du fil d'Ariane (sous l'intro sur la liste). */
.lang-switch {
  float: right; font-family: var(--font-mono); font-size: 12.5px; font-weight: 700; color: var(--line); text-decoration: none;
  border: 2px solid var(--line); border-radius: 999px; padding: 2px 10px; background: #fff;
}
.lang-switch:hover { background: var(--violet-wash); }
.lang-line { margin: -16px 0 24px; }
.lang-line .lang-switch { float: none; display: inline-block; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tag, .soon {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .02em;
  border: 2px solid var(--line); border-radius: 999px; padding: 2px 10px; background: var(--violet-wash);
}
.soon { background: #FFF3C4; }
h1 { font-weight: 900; font-size: clamp(30px, 5.4vw, 50px); line-height: 1.08; letter-spacing: -0.03em; margin: 0 0 16px; text-wrap: balance; overflow-wrap: anywhere; }
.byline { color: var(--ink-soft); font-size: 15px; margin: 0 0 28px; }
.toc {
  border: 2.5px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
  padding: 16px 22px; margin: 0 0 34px; background: #fff; font-size: 15.5px;
}
.toc strong { font-family: var(--font-brand); font-size: 18px; }
.toc ol { margin: 8px 0 0; padding-left: 22px; }
.toc li { margin: 3px 0; }
.prose h2 { font-weight: 900; font-size: clamp(24px, 3.4vw, 31px); line-height: 1.2; letter-spacing: -0.02em; margin: 2.1em 0 .6em; scroll-margin-top: 16px; }
.prose h3 { font-weight: 800; font-size: 21px; line-height: 1.3; margin: 1.6em 0 .4em; scroll-margin-top: 16px; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1em; }
.prose li { margin: .35em 0; }
.prose strong { font-weight: 800; }
.prose code { font-family: var(--font-mono); font-size: .86em; background: var(--violet-wash); border: 1px solid #E2CDF7; border-radius: 6px; padding: 1px 5px; overflow-wrap: anywhere; }
.prose pre {
  background: var(--line); color: #F6EAFE; border-radius: 16px; border: 2.5px solid var(--line);
  box-shadow: 4px 5px 0 var(--violet); padding: 16px 18px; overflow-x: auto; margin: 0 0 1.4em;
  font-size: 14px; line-height: 1.6;
}
.prose pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; overflow-wrap: normal; }
.prose blockquote { margin: 0 0 1.2em; padding: 6px 0 6px 18px; border-left: 5px solid var(--violet); color: var(--ink-soft); }
.prose blockquote p { margin: 0; }
.table { overflow-x: auto; margin: 0 0 1.4em; border: 2.5px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.table table { border-collapse: collapse; width: 100%; font-size: 15px; }
.table th, .table td { text-align: left; padding: 9px 12px; border-bottom: 1.5px solid #E6E1EF; vertical-align: top; }
.table th { background: var(--violet-wash); font-weight: 800; }
.table tr:last-child td { border-bottom: 0; }

/* Appel à l'action, auteur, suite */
.cta {
  margin: 44px 0 28px; padding: 26px 26px 28px; background: var(--violet-wash);
  border: 2.5px solid var(--line); border-radius: 26px; box-shadow: 6px 7px 0 var(--line);
}
.cta-k { margin: 0 0 6px; font-family: var(--font-mono); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--violet-deep); }
.cta h2 { font-family: var(--font-brand); font-size: clamp(24px, 3.4vw, 30px); line-height: 1.15; margin: 0 0 10px; }
.cta p { margin: 0 0 18px; }
.author { border-top: 2px dashed #D9D2E6; padding-top: 18px; margin: 0 0 36px; font-size: 15.5px; color: var(--ink-soft); }
.author p { margin: 4px 0 0; }
.related h2 { font-weight: 900; font-size: 26px; margin: 0 0 16px; }
.cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.card {
  display: block; min-width: 0; overflow-wrap: anywhere; text-decoration: none; background: #fff; border: 2.5px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow); padding: 18px 20px; transition: transform .12s ease, box-shadow .12s ease;
}
.card:hover { transform: translate(-1px, -1px); box-shadow: 5px 6px 0 var(--line); }
.card .tags { margin-bottom: 8px; }
.card h3 { font-size: 20px; line-height: 1.25; font-weight: 800; margin: 0 0 6px; }
.card p { margin: 0 0 8px; color: var(--ink-soft); font-size: 15.5px; line-height: 1.55; }
.card .meta { font-size: 13px; color: var(--ink-soft); font-family: var(--font-mono); }
.preview-banner { background: #FFF3C4; border: 2px solid var(--line); border-radius: 12px; padding: 8px 14px; font-size: 14px; font-weight: 700; }

/* Index */
.kicker { font-family: var(--font-mono); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--violet-deep); margin: 8px 0 8px; font-size: 13px; }
.lead { font-size: 19px; color: var(--ink-soft); margin: 0 0 30px; }

/* Page blanche aux coins arrondis : le footer de la landing glisse dessous (ses styles sont ajoutés par build.py) */
.page { position: relative; z-index: 1; background: var(--paper); padding-bottom: 90px; border-radius: 0 0 44px 44px; overflow: clip; }

/* Images : couverture penchée qui se redresse au survol, autocollant du sujet, vignettes dans les cartes */
.cover {
  position: relative; margin: 0 0 34px; background: var(--violet-wash);
  border: 2.5px solid var(--line); border-radius: 24px; box-shadow: 6px 7px 0 var(--line); overflow: hidden;
  transform: rotate(-.8deg); transition: transform .35s cubic-bezier(.2,1.2,.3,1);
}
.cover:hover { transform: rotate(0) scale(1.01); }
.cover img { display: block; width: 100%; height: auto; }
.sticker {
  position: absolute; top: 14px; left: 14px; z-index: 1;
  font-family: var(--font-brand); font-weight: 800; font-size: 16px; line-height: 1.3; color: var(--line);
  background: var(--violet); border: 2.5px solid var(--line); border-radius: 999px; box-shadow: 3px 3px 0 var(--line);
  padding: 4px 14px 2px; transform: rotate(-6deg);
}
.card.has-img { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 20px; align-items: center; }
.card .thumb {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: var(--violet-wash);
  border: 2px solid var(--line); border-radius: 14px; transform: rotate(2deg); transition: transform .3s cubic-bezier(.2,1.2,.3,1);
}
.card:hover .thumb { transform: rotate(0) scale(1.04); }
@media (max-width: 620px) {
  .card.has-img { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .card .thumb { order: -1; }
  .sticker { font-size: 14px; top: 10px; left: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .cover, .card, .card .thumb, .btn { transition: none; }
  .cover { transform: none; }
}

/* Footer repris de la landing (site/en/index.html) */
/* ---------- Footer : ciel, nuages, pluie et parapluie à déplacer ---------- */
  .foot {
    /* glissé sous les coins arrondis de la page */
    margin-top: -44px; padding-top: 44px;
    background: #EEE3FC;
    overflow: hidden;
    position: relative;
  }
  /* Collé en bas de l'écran, sous la page : il se découvre quand la page remonte.
     Seulement s'il tient dans l'écran (sinon le haut du ciel resterait caché). */
  .foot.pin { position: sticky; bottom: 0; }
  .sky { position: relative; height: 340px; cursor: grab; touch-action: pan-y; }
  .sky:active { cursor: grabbing; }
  .sky-rain { position: absolute; inset: 0; width: 100%; height: 100%; }
  .cloud { position: absolute; width: 190px; animation: drift linear infinite; }
  .cloud svg { width: 100%; height: auto; display: block; }
  .c1 { top: 18px; left: -10%; animation-duration: 70s; }
  .c2 { top: 50px; left: 30%; width: 150px; animation-duration: 90s; animation-delay: -40s; }
  .c3 { top: 10px; left: 60%; width: 220px; animation-duration: 80s; animation-delay: -20s; }
  .c4 { top: 60px; left: 85%; width: 140px; animation-duration: 100s; animation-delay: -60s; }
  @keyframes drift { from { transform: translateX(-30vw); } to { transform: translateX(40vw); } }
  .umb { position: absolute; bottom: 22px; left: 0; width: 170px; display: flex; flex-direction: column; align-items: center; transform: translateX(-50%); will-change: left; pointer-events: none; }
  .umb svg { width: 150px; height: auto; transform-origin: 50% 90%; transition: transform .2s ease; }
  .saas {
    margin-top: -8px;
    font: 800 15px var(--font-brand); color: var(--line);
    background: #fff; border: 2.5px solid var(--line); border-radius: 999px;
    box-shadow: 3px 3px 0 var(--line); padding: 5px 14px 3px; white-space: nowrap;
  }
  .foot-main { max-width: 1180px; margin: 0 auto; padding: 54px 20px 40px; display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 40px; align-items: start; border-top: 3px dashed #C9B2EA; }
  .foot-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
  .foot-cta h2 { margin: 0; font-weight: 900; font-size: clamp(32px, 4vw, 52px); line-height: 1.03; letter-spacing: -0.035em; text-wrap: balance; }
  .foot-cta h2 em { font-style: normal; color: var(--violet-deep); }
  .foot-cta .btn { font-size: 18px; padding: 14px 28px 12px; }
  .foot-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .foot-links div { display: flex; flex-direction: column; gap: 10px; }
  .foot-links h3 { margin: 0 0 4px; font-size: 12.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #6B5A86; }
  .foot-links a { font-size: 15px; font-weight: 700; color: var(--line); text-decoration: none; }
  .foot-links a:hover { color: var(--violet-deep); text-decoration: underline; text-underline-offset: 3px; }
  .foot-bottom { max-width: 1180px; margin: 0 auto; padding: 18px 20px calc(24px + env(safe-area-inset-bottom, 0px)); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; font-size: 13px; font-weight: 600; color: #6B5A86; }
  @media (max-width: 760px) {
    .page { padding-bottom: 100px; border-radius: 0 0 30px 30px; }
    .foot { margin-top: -30px; padding-top: 30px; }
    .sky { height: 280px; }
    .foot-main { grid-template-columns: 1fr; padding-top: 40px; }
    .foot-links { grid-template-columns: 1fr 1fr; }
    .umb { width: 140px; } .umb svg { width: 120px; }
  }
  @media (prefers-reduced-motion: reduce) { .cloud { animation: none; } }
