/* ============================================================
   tech.niezsellami.fr — feuille de style unique
   Direction « sombre premium épuré »
   ============================================================ */

/* === 1. VARIABLES === */
:root {
    --bg: #0c0c0f;
    --s1: #141418;
    --s2: #1b1b21;
    --line: #24242c;
    --line-2: #2e2e37;
    --t1: #f2f2f5;
    --t2: #a1a1ad;
    --t3: #8a8a95;
    --grad: linear-gradient(90deg, #a5b4fc, #c084fc);
    --accent: #c084fc;
    --theme: #b4a8fb;
    --ok: #34d399;
    --ok-text: #a6f4c5;
    --warn: #fbbf24;

    --font: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --r-box: 18px;
    --r-field: 10px;
    --r-code: 14px;
    --r-pill: 999px;

    --max: 1120px;
    --gutter: 36px;
    --section: 80px;
    --header-h: 68px;
}

/* === 2. BASE === */
*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--t1);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote {
    margin: 0;
}

:where(ul, ol)[class] {
    list-style: none;
    padding: 0;
}

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

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

::selection {
    background: rgba(192, 132, 252, 0.35);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -100px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: var(--r-pill);
    background: #fff;
    color: var(--bg);
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    top: 12px;
}

.icon {
    display: inline-block;
    flex-shrink: 0;
    width: 1.1em;
    height: 1.1em;
    vertical-align: -0.18em;
}

.container {
    width: 100%;
    max-width: calc(var(--max) + 2 * var(--gutter));
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.mono {
    font-family: var(--mono);
}

.grad {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

section[id],
[data-nav-section] {
    scroll-margin-top: calc(var(--header-h) + 16px);
}

/* === 3. EN-TÊTE === */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(12, 12, 15, 0.82);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    backdrop-filter: saturate(140%) blur(14px);
    border-bottom: 1px solid rgba(36, 36, 44, 0.6);
}

.nav {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: var(--header-h);
}

.logo {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.nav-pills {
    display: flex;
    gap: 2px;
    padding: 4px;
    background: var(--s1);
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
}

.nav-pills a {
    padding: 6px 14px;
    border-radius: var(--r-pill);
    color: var(--t2);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s, background-color 0.2s;
}

.nav-pills a:hover {
    color: var(--t1);
}

.nav-pills a.is-active,
.nav-pills a[aria-current="page"] {
    background: var(--s2);
    color: var(--t1);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.lang-switch {
    padding: 6px 2px;
    color: var(--t3);
    font-size: 12px;
    text-decoration: none;
}

.lang-switch:hover {
    color: var(--t2);
}

.lang-switch .is-current {
    color: var(--t1);
}

.nav-toggle {
    display: none;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    background: var(--s1);
    border: 1px solid var(--line);
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
}

.nav-toggle .icon-close,
.site-header.is-open .nav-toggle .icon-open {
    display: none;
}

.site-header.is-open .nav-toggle .icon-close {
    display: inline-block;
}

/* === 4. PIED DE PAGE === */
.site-footer {
    margin-top: var(--section);
    border-top: 1px solid var(--line);
}

.footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-block: 28px;
    color: var(--t3);
    font-size: 13px;
}

.footer-social {
    display: flex;
    gap: 8px;
}

.footer-social a {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--t2);
    font-size: 16px;
    transition: color 0.2s, border-color 0.2s;
}

.footer-social a:hover {
    border-color: var(--line-2);
    color: var(--t1);
}

/* === 5. COMPOSANTS === */
.box {
    padding: 24px;
    background: var(--s1);
    border: 1px solid var(--line);
    border-radius: var(--r-box);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: var(--r-pill);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.btn-primary {
    background: #fff;
    color: var(--bg);
}

.btn-primary:hover {
    background: #e2e2ea;
}

.btn-ghost {
    background: var(--s2);
    border-color: var(--line-2);
    color: var(--t1);
}

.btn-ghost:hover {
    border-color: #3d3d48;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
}

.btn:disabled {
    cursor: default;
}

.btn.is-success {
    background: var(--ok);
    color: #04261a;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    padding: 4px 10px;
    background: var(--s2);
    border: 1px solid var(--line-2);
    border-radius: var(--r-pill);
    color: #d4d4dc;
    font-size: 12px;
    line-height: 1.4;
}

.tag.is-dim {
    background: transparent;
    border-color: var(--line);
    color: var(--t3);
}

.dispo {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--ok-text);
    font-size: 13px;
}

.dispo::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ok);
    box-shadow: 0 0 10px var(--ok);
}

.eyebrow {
    color: var(--t3);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section {
    padding-top: var(--section);
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.section-head h2 {
    margin-top: 8px;
    font-size: 30px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-lead {
    max-width: 400px;
    color: var(--t2);
    font-size: 15px;
    text-align: right;
}

.link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 2px;
    border-bottom: 1px solid var(--line-2);
    color: var(--t1);
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
}

.link:hover {
    border-color: var(--t2);
}

/* === 6. ACCUEIL === */
.hero {
    display: grid;
    grid-template-columns: 1.75fr 1fr 1fr;
    gap: 12px;
    padding-top: 24px;
}

.hero-main {
    grid-row: 1 / span 3;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    padding: 34px;
}

.hero h1 {
    margin: 20px 0 16px;
    font-size: 48px;
    font-weight: 600;
    line-height: 1.03;
    letter-spacing: -0.035em;
}

.lead {
    max-width: 510px;
    color: var(--t2);
    font-size: 16px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-photo {
    grid-row: 1 / span 3;
    min-height: 340px;
    padding: 0;
    overflow: hidden;
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.04);
}

.stat {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 18px 20px;
}

.stat-num {
    font-size: 34px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.stat-label {
    color: var(--t3);
    font-size: 13px;
}

.stat .tags {
    margin-top: 10px;
}

.offers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.offer {
    display: flex;
    flex-direction: column;
}

.offer-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 18px;
    background: var(--s2);
    border: 1px solid var(--line-2);
    border-radius: 12px;
    color: #c4b5fd;
    font-size: 19px;
}

.offer h3 {
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.offer p {
    color: var(--t2);
    font-size: 14px;
}

.offer .offer-proof {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    color: var(--t3);
    font-size: 13px;
}

.offer p + .offer-proof {
    margin-top: 18px;
}

.offer-proof strong {
    color: #d4d4dc;
    font-weight: 500;
}

.xp-list {
    padding: 4px 26px;
}

.xp-item {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 24px;
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
}

.xp-item:last-child {
    border-bottom: 0;
}

.xp-date {
    padding-top: 3px;
    color: var(--t3);
    font-size: 12.5px;
}

.xp-date.is-now {
    color: var(--ok-text);
}

.xp-date.is-now::before {
    content: "● ";
}

.xp-role {
    font-size: 16px;
    font-weight: 600;
}

.xp-co {
    color: var(--t2);
    font-weight: 400;
}

.xp-desc {
    max-width: 680px;
    margin: 6px 0 12px;
    color: var(--t2);
    font-size: 14px;
}

.xp-item.is-compact .xp-desc {
    margin-bottom: 0;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.skill-group h3 {
    margin-bottom: 14px;
    font-size: 15px;
    font-weight: 600;
}

.legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    margin-top: 14px;
    color: var(--t3);
    font-size: 13px;
}

.legend .tag {
    margin-right: 6px;
    padding: 1px 8px;
}

.edu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.edu-year {
    color: var(--t3);
    font-size: 12.5px;
}

.edu-title {
    margin: 6px 0 2px;
    font-size: 16px;
    font-weight: 600;
}

.edu-school {
    color: var(--t2);
    font-size: 14px;
}

.contact {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 12px;
}

.contact h2 {
    margin: 8px 0 12px;
    font-size: 30px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.contact-intro > p {
    color: var(--t2);
}

.contact-list {
    margin-top: 22px;
}

.contact-list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}

.contact-list div:last-child {
    border-bottom: 0;
}

.contact-list dt {
    color: var(--t3);
}

.contact-list dd {
    text-align: right;
    overflow-wrap: anywhere;
}

.contact-list a {
    text-decoration: none;
}

.contact-list a:hover {
    text-decoration: underline;
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-content: start;
    gap: 14px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field.is-full,
.form-actions {
    grid-column: 1 / -1;
}

.field label {
    color: var(--t2);
    font-size: 13px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--r-field);
    color: var(--t1);
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.field select {
    appearance: none;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a1a1ad' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.field textarea {
    min-height: 140px;
    resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
    color: #62626c;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.2);
}

.contact-form {
    position: relative;
}

/* Champ piège pour les robots : hors écran, ignoré par les lecteurs d'écran */
.hp-field {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-status {
    margin-top: 12px;
    font-size: 14px;
}

.form-status:empty {
    display: none;
}

.form-status.is-success {
    color: var(--ok-text);
}

.form-status.is-error {
    color: #fca5a5;
}

/* Page de résultat affichée par contact.php sans JavaScript */
.contact-result {
    max-width: 640px;
    margin-inline: auto;
    padding: 36px;
}

.contact-result h1 {
    margin: 10px 0 24px;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

/* === 7. LISTE D'ARTICLES === */
.list-page {
    padding-top: 28px;
}

.list-head {
    padding: 24px 0 30px;
}

.list-head h1 {
    margin-top: 10px;
    font-size: 44px;
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.list-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    padding: 7px 14px;
    background: var(--s1);
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    color: var(--t2);
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.chip span {
    margin-left: 4px;
    color: var(--t3);
}

.chip:hover {
    border-color: var(--line-2);
    color: var(--t1);
}

.chip.is-active {
    background: #fff;
    border-color: #fff;
    color: var(--bg);
    font-weight: 600;
}

.chip.is-active span {
    color: #55555f;
}

.list-count {
    color: var(--t3);
    font-size: 12.5px;
}

.cards-grid,
.latest-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.card {
    overflow: hidden;
    background: var(--s1);
    border: 1px solid var(--line);
    border-radius: var(--r-box);
    transition: border-color 0.2s, transform 0.2s;
}

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

.card[hidden] {
    display: none;
}

.card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.card-link:focus-visible {
    outline-offset: -3px;
    border-radius: var(--r-box);
}

.card-media {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}

.card-media .cover {
    position: absolute;
    inset: 0;
}

.card:hover .cover-tile--hub {
    scale: 1.06;
}

.card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 16px 18px 20px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--t3);
    font-size: 11.5px;
}

.card-theme {
    color: var(--theme);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.card-excerpt {
    display: -webkit-box;
    overflow: hidden;
    color: var(--t2);
    font-size: 13.5px;
    line-height: 1.55;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.cards-grid .card.is-featured {
    grid-column: 1 / -1;
}

.cards-grid .card.is-featured .card-link {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
}

.cards-grid .card.is-featured .card-media {
    height: 340px;
    aspect-ratio: auto;
    border-right: 1px solid var(--line);
    border-bottom: 0;
}

.cards-grid .card.is-featured .card-body {
    justify-content: center;
    gap: 12px;
    padding: 32px;
}

.cards-grid .card.is-featured .card-title {
    font-size: 26px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.cards-grid .card.is-featured .card-excerpt {
    font-size: 15px;
    -webkit-line-clamp: 4;
}

@media (max-width: 1023px) {
    .cards-grid,
    .latest-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .latest-grid .card:nth-child(3) {
        display: none;
    }

    .cards-grid .card.is-featured .card-link {
        grid-template-columns: 1fr;
    }

    .cards-grid .card.is-featured .card-media {
        height: auto;
        aspect-ratio: 16 / 9;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
}

@media (max-width: 639px) {
    .list-head h1 {
        font-size: 32px;
    }

    .cards-grid,
    .latest-grid {
        grid-template-columns: 1fr;
    }

    .latest-grid .card:nth-child(3) {
        display: block;
    }

    .cards-grid .card.is-featured .card-body {
        padding: 18px;
    }

    .cards-grid .card.is-featured .card-title {
        font-size: 20px;
    }
}

/* === 7b. COUVERTURES ANIMÉES ===
   Dessinées par tools/site_parts.render_cover. Les centres des pictogrammes sont en % et leur taille
   en cqh (hauteur de la couverture) : les liaisons restent justes quelles que soient les proportions. */
.cover {
    --a: #a5b4fc;
    --b: #c084fc;
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    isolation: isolate;
    background: var(--bg);
    container-type: size;
}

.cover--dev { --a: #34d399; --b: #22d3ee; }
.cover--ia { --a: #c084fc; --b: #f0abfc; }
.cover--cloud { --a: #60a5fa; --b: #818cf8; }
.cover--automation { --a: #fbbf24; --b: #fb923c; }
.cover--news { --a: #fb7185; --b: #f472b6; }

.cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1.2px);
    background-size: 18px 18px;
}

.cover-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.cover-orb--a {
    top: -25%;
    left: 28%;
    width: 78%;
    height: 135%;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--a) 55%, transparent), transparent);
}

.cover-orb--b {
    top: 28%;
    left: -12%;
    width: 56%;
    height: 100%;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--b) 30%, transparent), transparent);
}

.cover-wires {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.cover-wire,
.cover-flow {
    fill: none;
    vector-effect: non-scaling-stroke;
}

.cover-wire {
    stroke: color-mix(in srgb, var(--a) 40%, transparent);
    stroke-width: 1.2;
}

.cover-flow {
    stroke: var(--a);
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-dasharray: 4 100;
    stroke-dashoffset: 104;
    opacity: 0;
}

.cover-tile {
    position: absolute;
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    translate: -50% -50%;
    background: #16161b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22%;
    color: var(--b);
    transition: scale 0.5s ease;
}

.cover-icon {
    width: 46%;
    height: 46%;
}

.cover-tile--hub {
    z-index: 2;
    height: 46cqh;
    color: var(--a);
    box-shadow: 0 0 0 1px var(--a), 0 20px 60px rgba(0, 0, 0, 0.5);
}

.cover-tile--hub::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    box-shadow: 0 0 46px color-mix(in srgb, var(--a) 55%, transparent);
    opacity: 0.5;
}

.cover-tile--s1 { height: 23cqh; opacity: 0.85; }
.cover-tile--s2 { height: 19cqh; opacity: 0.75; }
.cover-tile--s3 { height: 16cqh; opacity: 0.6; }

@keyframes cover-drift-a { 50% { transform: translate(-8%, 6%) scale(1.08); } }
@keyframes cover-drift-b { 50% { transform: translate(10%, -8%) scale(0.92); } }
@keyframes cover-float { 50% { transform: translateY(-9%); } }
@keyframes cover-breathe { 50% { opacity: 1; } }

@keyframes cover-flow {
    0% { stroke-dashoffset: 104; opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { stroke-dashoffset: 0; opacity: 0; }
}

/* Animations seulement pour les couvertures visibles (site.js ajoute .is-playing) */
@media (prefers-reduced-motion: no-preference) {
    .cover.is-playing .cover-orb--a { animation: cover-drift-a 14s ease-in-out infinite; }
    .cover.is-playing .cover-orb--b { animation: cover-drift-b 18s ease-in-out infinite; }
    .cover.is-playing .cover-tile--s1 { animation: cover-float 6s ease-in-out infinite; }
    .cover.is-playing .cover-tile--s2 { animation: cover-float 7s ease-in-out -2s infinite; }
    .cover.is-playing .cover-tile--s3 { animation: cover-float 8s ease-in-out -4s infinite; }
    .cover.is-playing .cover-tile--hub::after { animation: cover-breathe 4s ease-in-out infinite; }
    .cover.is-playing .cover-flow { animation: cover-flow 3.2s ease-in-out infinite; }
    .cover.is-playing .cover-flow:nth-of-type(5) { animation-delay: 1.1s; }
    .cover.is-playing .cover-flow:nth-of-type(6) { animation-delay: 2.2s; }
}

/* === 8. PAGE D'ARTICLE === */
.article-page {
    padding-top: 28px;
}

.crumb {
    color: var(--t3);
    font-size: 12.5px;
}

.crumb a {
    color: var(--t2);
    text-decoration: none;
}

.crumb a:hover {
    color: var(--t1);
}

.article-head {
    max-width: 840px;
    padding: 18px 0 30px;
}

.article-title {
    font-size: 42px;
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.article-sub {
    max-width: 720px;
    margin-top: 14px;
    color: var(--t2);
    font-size: 18px;
    line-height: 1.55;
}

.byline {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
    color: var(--t2);
    font-size: 13px;
}

.byline img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    filter: grayscale(1);
}

.byline strong {
    display: block;
    color: var(--t1);
    font-size: 14px;
    font-weight: 600;
}

.byline span {
    display: block;
}

.article-cover {
    position: relative;
    aspect-ratio: 21 / 9;
    margin-bottom: 44px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--r-box);
}

.article-cover .cover {
    position: absolute;
    inset: 0;
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    align-items: start;
    gap: 56px;
}

.article-aside {
    position: sticky;
    top: calc(var(--header-h) + 20px);
    grid-column: 2;
    grid-row: 1;
}

.article-body {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
}

.toc {
    padding: 18px;
}

.toc summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--t3);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    list-style: none;
    cursor: pointer;
}

.toc summary::-webkit-details-marker {
    display: none;
}

.toc summary::after {
    content: "+";
    font-size: 18px;
    line-height: 1;
}

.toc[open] summary::after {
    content: "−";
}

.toc nav {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 300px);
    margin-top: 12px;
    overflow-y: auto;
}

.toc nav a {
    padding: 6px 0 6px 12px;
    border-left: 2px solid var(--line);
    color: var(--t2);
    font-size: 13px;
    line-height: 1.4;
    text-decoration: none;
    transition: color 0.2s, border-color 0.2s;
}

.toc nav a:hover {
    color: var(--t1);
}

.toc nav a.is-active {
    border-left-color: var(--accent);
    color: var(--t1);
}

.share {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.prose {
    max-width: 68ch;
    color: #d6d6de;
    font-size: 17px;
    line-height: 1.75;
}

.prose > * + * {
    margin-top: 1.15em;
}

.prose h2 {
    margin-top: 2em;
    color: var(--t1);
    font-size: 26px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
    scroll-margin-top: calc(var(--header-h) + 24px);
}

.prose > h2:first-child {
    margin-top: 0;
}

.prose h3 {
    margin-top: 1.6em;
    color: var(--t1);
    font-size: 20px;
    font-weight: 600;
    scroll-margin-top: calc(var(--header-h) + 24px);
}

.prose h4 {
    color: var(--t1);
    font-size: 16px;
    font-weight: 600;
}

.prose a {
    color: #c4b5fd;
    text-decoration: underline;
    text-decoration-color: rgba(196, 181, 253, 0.4);
    text-underline-offset: 3px;
}

.prose a:hover {
    text-decoration-color: currentColor;
}

.prose strong {
    color: var(--t1);
}

.prose ul,
.prose ol {
    padding-left: 1.3em;
}

.prose li + li {
    margin-top: 0.4em;
}

.prose li::marker {
    color: var(--t3);
}

.prose .lead {
    color: var(--t1);
    font-size: 19px;
}

.prose blockquote {
    padding: 4px 0 4px 18px;
    border-left: 3px solid var(--accent);
    color: var(--t2);
    font-style: italic;
}

.prose :not(pre) > code {
    padding: 0.1em 0.35em;
    background: var(--s2);
    border: 1px solid var(--line);
    border-radius: 6px;
    font-family: var(--mono);
    font-size: 0.86em;
}

.prose table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: 15px;
}

.prose th,
.prose td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.prose th {
    color: var(--t1);
    font-weight: 600;
}

.prose hr {
    margin: 2em 0;
    border: 0;
    border-top: 1px solid var(--line);
}

.code-block {
    overflow: hidden;
    background: #0a0a0d;
    border: 1px solid var(--line);
    border-radius: var(--r-code);
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 10px 8px 16px;
    border-bottom: 1px solid var(--line);
    color: var(--t3);
    font-family: var(--mono);
    font-size: 12px;
}

.code-copy {
    padding: 3px 10px;
    background: var(--s2);
    border: 1px solid var(--line-2);
    border-radius: var(--r-pill);
    color: var(--t2);
    font-family: var(--mono);
    font-size: 12px;
    cursor: pointer;
}

.code-copy:hover {
    color: var(--t1);
}

.code-block pre {
    margin: 0;
    padding: 16px;
    overflow-x: auto;
    color: #d4d4dc;
    font-family: var(--mono);
    font-size: 13.5px;
    line-height: 1.65;
}

.info-box,
.warning-box {
    display: flex;
    gap: 14px;
    padding: 16px 18px;
    border-radius: var(--r-code);
    font-size: 15.5px;
    line-height: 1.6;
}

.info-box {
    background: #15141f;
    border: 1px solid #2c2a45;
    color: #d8d4f0;
}

.warning-box {
    background: #1b160b;
    border: 1px solid #3d3215;
    color: #efe3c4;
}

.info-icon,
.warning-icon {
    flex-shrink: 0;
    padding-top: 2px;
    font-size: 20px;
    line-height: 1;
}

.info-icon {
    color: #c4b5fd;
}

.warning-icon {
    color: var(--warn);
}

.info-content h4,
.warning-content h4 {
    margin-bottom: 4px;
    font-size: 15px;
}

.info-content > * + *,
.warning-content > * + * {
    margin-top: 0.5em;
}

.prose .tags,
.prose .article-tags {
    margin-top: 2.4em;
    padding-top: 1.4em;
    border-top: 1px solid var(--line);
}

.author-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    margin-top: 56px;
}

.author-card img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    filter: grayscale(1);
}

.author-card strong {
    font-size: 16px;
}

.author-card p {
    margin-top: 2px;
    color: var(--t2);
    font-size: 14px;
}

@media (min-width: 1024px) {
    .toc summary {
        pointer-events: none;
    }

    .toc summary::after {
        content: none;
    }
}

@media (max-width: 1023px) {
    .article-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .article-aside {
        position: static;
        grid-column: 1;
        grid-row: 1;
    }

    .article-body {
        grid-row: 2;
    }

    .toc nav {
        max-height: none;
    }
}

@media (max-width: 639px) {
    .article-title {
        font-size: 30px;
    }

    .article-sub {
        font-size: 16px;
    }

    .article-cover {
        aspect-ratio: 16 / 9;
        margin-bottom: 28px;
    }

    .prose {
        font-size: 16.5px;
    }

    .prose h2 {
        font-size: 22px;
    }

    .author-card {
        grid-template-columns: auto 1fr;
    }

    .author-card .btn {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

/* === 9. ÉCRANS === */
@media (max-width: 1023px) {
    :root {
        --gutter: 24px;
        --section: 64px;
    }

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

    .hero-main {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .hero-photo {
        grid-row: span 3;
    }

    .offers,
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .offer:last-child {
        grid-column: 1 / -1;
    }

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

    .section-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .section-lead {
        text-align: left;
    }
}

@media (max-width: 860px) {
    .nav-toggle {
        display: grid;
    }

    .nav-pills {
        display: none;
    }

    .site-header.is-open .nav-pills {
        position: absolute;
        top: calc(var(--header-h) - 6px);
        right: var(--gutter);
        left: var(--gutter);
        display: flex;
        flex-direction: column;
        gap: 2px;
        padding: 8px;
        border-radius: var(--r-box);
        box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
    }

    .site-header.is-open .nav-pills a {
        padding: 12px 14px;
        border-radius: 12px;
        font-size: 16px;
    }
}

@media (max-width: 639px) {
    :root {
        --gutter: 16px;
        --section: 52px;
    }

    .box {
        padding: 20px;
    }

    .hero-main {
        padding: 24px;
    }

    .hero h1 {
        font-size: 34px;
    }

    .hero-photo {
        grid-column: 1 / -1;
        grid-row: auto;
        min-height: 0;
        padding: 0;
        aspect-ratio: 5 / 4;
    }

    .hero-photo img {
        object-position: center 22%;
    }

    .stat:last-child {
        grid-column: 1 / -1;
    }

    .offers,
    .skills-grid,
    .edu-grid,
    .contact-form {
        grid-template-columns: 1fr;
    }

    .offer:last-child {
        grid-column: auto;
    }

    .xp-list {
        padding: 4px 20px;
    }

    .xp-item {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .section-head h2,
    .contact h2 {
        font-size: 26px;
    }

    .nav-cta {
        display: none;
    }

    .footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* === 10. MOUVEMENT === */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }

    html.js [data-reveal] {
        opacity: 0;
        transform: translateY(14px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }

    html.js [data-reveal].is-visible {
        opacity: 1;
        transform: none;
    }
}
