/* Fragments — Vague à l'âme
   DA : gris doux (#EBEBEB), Futura partout, posé. */

/* Adobe Fonts — Futura PT (kit Typekit Vague à l'âme / Fragments) */
@import url('https://use.typekit.net/qpk7gpb.css');

:root {
    --paper:        #ebebeb;
    --paper-deep:   #dcdcdc;
    --paper-soft:   #f5f5f5;
    --paper-white:  #ffffff;
    --ink:          #1a1a1a;
    --ink-soft:     #555555;
    --ink-faint:    #999999;
    --accent:       #333333;
    --line:         rgba(26, 26, 26, 0.10);
    --line-soft:    rgba(26, 26, 26, 0.05);
    --warn:         #b9533c;
    --ok:           #5a7d4f;
    --veil:         rgba(26, 26, 26, 0.78);

    --serif: 'futura-pt', 'Futura', 'Trebuchet MS', system-ui, sans-serif;
    --sans:  'futura-pt', 'Futura', 'Trebuchet MS', system-ui, sans-serif;

    --r-sm: 4px;
    --r-md: 10px;
    --r-lg: 18px;

    --max: 760px;

    --shadow-piece:    rgba(26, 26, 26, 0.10);
    --shadow-piece-up: rgba(26, 26, 26, 0.18);
}

/* === Dark mode === */
[data-theme="dark"] {
    --paper:        #141414;
    --paper-deep:   #0a0a0a;
    --paper-soft:   #1f1f1f;
    --paper-white:  #262626;
    --ink:          #f2f2f2;
    --ink-soft:     #c8c8c8;
    --ink-faint:    #9a9a9a;
    --accent:       #ffffff;
    --line:         rgba(235, 235, 235, 0.14);
    --line-soft:    rgba(235, 235, 235, 0.07);
    --shadow-piece:    rgba(0, 0, 0, 0.55);
    --shadow-piece-up: rgba(0, 0, 0, 0.7);
}

html { background: var(--paper); }
html, body { transition: background-color .35s ease, color .35s ease; }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--sans);
    font-weight: 300;
    color: var(--ink);
    background: var(--paper);
    min-height: 100dvh;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

main, header, footer, section { position: relative; z-index: 1; }

/* Typography */
h1, h2, h3 { font-family: var(--serif); font-weight: 300; letter-spacing: 0.005em; line-height: 1.15; margin: 0 0 0.4em; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
p  { margin: 0 0 1em; }
a  { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); transition: border-color .2s, color .2s; }
a:hover { color: var(--accent); border-color: var(--accent); }

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

/* Hero video bg */
.hero-bg {
    position: fixed; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.35;
}
.hero-bg.dim { opacity: 0.18; }
[data-theme="dark"] .hero-bg { opacity: 0.7; }
[data-theme="dark"] .hero-bg.dim { opacity: 0.4; }

/* === Landing === */
.page-landing main.landing {
    min-height: 100dvh;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center;
    padding: 4rem 1.5rem 8rem;
    gap: 1.2rem;
}
.landing-mark {
    width: 56px; height: 56px;
    border: 1px solid var(--ink); border-radius: 50%;
    margin-bottom: 1.4rem;
    position: relative;
    animation: breathe 6s ease-in-out infinite;
}
.landing-mark::after {
    content: ''; position: absolute; inset: 14px;
    background: var(--ink); border-radius: 50%;
    opacity: 0.85;
}
.landing-logo {
    width: clamp(80px, 14vw, 130px);
    height: auto;
    margin-bottom: 1.6rem;
    animation: breathe 6s ease-in-out infinite;
    transition: filter .35s ease;
}
[data-theme="dark"] .landing-logo { filter: invert(1); }
.landing-title {
    text-transform: uppercase;
    font-style: normal;
    font-weight: 500;
    margin: 0;
    font-size: clamp(1.6rem, 4.5vw, 2.6rem);
    letter-spacing: 0.16em;
    line-height: 1.1;
}
.landing-sub {
    text-transform: uppercase;
    letter-spacing: 0.42em;
    font-size: 0.72rem;
    color: var(--ink-soft);
    margin: 0 0 2.5rem;
    font-weight: 400;
}

@keyframes breathe {
    0%, 100% { transform: scale(1); opacity: .9; }
    50%      { transform: scale(1.06); opacity: 1; }
}

/* === Buttons === */
.btn-primary, .btn-secondary, .btn-enter, button[type=submit] {
    font-family: var(--sans);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 0.95rem 1.8rem;
    border: 1px solid var(--ink);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    border-radius: 999px;
    transition: all .25s ease;
    text-decoration: none;
    display: inline-block;
}
.btn-primary, button[type=submit] { background: var(--ink); color: var(--paper); }
.btn-primary:hover, button[type=submit]:hover { background: var(--paper); color: var(--ink); }
.btn-secondary { background: transparent; }
.btn-secondary:hover { background: var(--ink); color: var(--paper); }
.btn-enter {
    margin-top: 1rem;
    padding: 1rem 2.4rem;
    font-size: 0.78rem;
    letter-spacing: 0.3em;
}
.btn-mini {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.45rem 0.95rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: transparent;
    color: var(--ink-soft);
    cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s, transform .15s;
    display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
}
.btn-mini:hover { border-color: var(--ink); color: var(--ink); }

.btn-mini.ok {
    color: var(--ok);
    border-color: var(--ok);
    background: rgba(90,125,79,0.06);
}
.btn-mini.ok:hover { background: var(--ok); color: #fff; border-color: var(--ok); }

.btn-mini.warn {
    color: var(--warn);
    border-color: var(--warn);
    background: rgba(185,83,60,0.06);
}
.btn-mini.warn:hover { background: var(--warn); color: #fff; border-color: var(--warn); }

.btn-mini.danger {
    color: var(--warn);
    border-color: var(--warn);
    background: rgba(185,83,60,0.06);
}
.btn-mini.danger:hover { background: var(--warn); color: #fff; border-color: var(--warn); }

.btn-mini.icon-only {
    padding: 0.45rem 0.55rem;
    color: var(--ink-faint);
    border-color: var(--line);
    background: transparent;
}
.btn-mini.icon-only:hover { color: var(--ink); border-color: var(--ink); background: transparent; }
.btn-mini.icon-only svg { width: 14px; height: 14px; display: block; }

/* === Forms === */
form label { display: block; margin: 0 0 1rem; font-size: 0.78rem; color: var(--ink-soft); letter-spacing: 0.04em; }
form input[type="text"],
form input[type="password"],
form input[type="email"],
form input[type="url"],
form input[type="number"],
form select,
form textarea {
    display: block;
    width: 100%;
    margin-top: 0.4rem;
    padding: 0.85rem 1rem;
    font: inherit;
    font-size: 1rem;
    color: var(--ink);
    background: var(--paper-white);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    transition: border-color .2s;
}
form input:focus, form select:focus, form textarea:focus {
    outline: none;
    border-color: var(--ink);
}
form fieldset { border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.2rem 1.4rem; margin: 0 0 1.2rem; }
form legend { padding: 0 0.6rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--ink-faint); }
form .checkbox { display: flex; align-items: center; gap: 0.6rem; }
form .checkbox input { width: auto; margin: 0; }

.input-big {
    font-size: 1.5rem !important;
    text-align: center;
    letter-spacing: 0.4em !important;
    padding: 1.1rem !important;
    margin-bottom: 1rem !important;
    text-transform: none;
}
.hp { position: absolute !important; left: -9999px !important; }

/* Alerts */
.alert {
    padding: 0.8rem 1rem;
    border-radius: var(--r-sm);
    font-size: 0.9rem;
    margin: 0 0 1rem;
    border-left: 3px solid;
}
.alert.error { color: var(--warn); border-color: var(--warn); background: rgba(185,83,60,0.06); }
.alert.ok    { color: var(--ok);   border-color: var(--ok);   background: rgba(90,125,79,0.08); }

/* === Enter (gate) === */
.page-enter main.enter {
    min-height: 100dvh;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 4rem 1.5rem 8rem;
    text-align: center;
    max-width: 480px; margin: 0 auto;
}
.enter-title { font-style: italic; }
.enter-hint {
    color: var(--ink-soft);
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 340px;
    margin: 0.8rem auto 1.6rem;
}
.back-link {
    position: absolute; top: 1.5rem; left: 1.5rem;
    width: 36px; height: 36px; line-height: 32px; text-align: center;
    border: 1px solid var(--line); border-radius: 50%;
    color: var(--ink); font-size: 1.1rem;
}
.back-link:hover { border-color: var(--ink); }

/* === Home (puzzle wall) === */
.home-header {
    text-align: center;
    padding: 3.5rem 1.5rem 1rem;
}
.home-sub {
    text-transform: uppercase;
    letter-spacing: 0.42em;
    font-size: 0.7rem;
    color: var(--ink-soft);
    margin: 0 0 0.6rem;
}
.home-title {
    font-style: italic;
    margin: 0;
    letter-spacing: 0.01em;
}
.home-progress {
    margin: 0.8rem 0 0;
    font-size: 0.78rem;
    color: var(--ink-faint);
    letter-spacing: 0.08em;
}

/* Puzzle layout — strict 3 cols × 4 rows numpad grid, gentle bob, no overlap */
.puzzle-stage {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 0.6rem;
    width: min(92vw, 640px);
    aspect-ratio: 3 / 4;
    margin: 1.5rem auto 4rem;
}

/* Numpad mapping :
    row1 (top):    10  11  12
    row2:           7   8   9
    row3:           4   5   6
    row4 (bottom):  1   2   3
*/
.piece[data-piece="10"] { grid-area: 1 / 1; }
.piece[data-piece="11"] { grid-area: 1 / 2; }
.piece[data-piece="12"] { grid-area: 1 / 3; }
.piece[data-piece="7"]  { grid-area: 2 / 1; }
.piece[data-piece="8"]  { grid-area: 2 / 2; }
.piece[data-piece="9"]  { grid-area: 2 / 3; }
.piece[data-piece="4"]  { grid-area: 3 / 1; }
.piece[data-piece="5"]  { grid-area: 3 / 2; }
.piece[data-piece="6"]  { grid-area: 3 / 3; }
.piece[data-piece="1"]  { grid-area: 4 / 1; }
.piece[data-piece="2"]  { grid-area: 4 / 2; }
.piece[data-piece="3"]  { grid-area: 4 / 3; }

.piece {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none !important;
    text-decoration: none;
    cursor: pointer;
    transition: transform .35s cubic-bezier(.2,.7,.2,1), filter .4s;
}

.piece img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    filter: drop-shadow(0 6px 14px var(--shadow-piece));
    user-select: none;
    -webkit-user-drag: none;
    will-change: transform;
    animation: piece-float 9s ease-in-out infinite;
    transition: filter .4s;
}

.piece.is-locked {
    cursor: default;
    pointer-events: none;
}
.piece.is-locked img {
    filter: brightness(0) opacity(0.10);
}
[data-theme="dark"] .piece img {
    filter: invert(1) drop-shadow(0 6px 14px var(--shadow-piece));
}
[data-theme="dark"] .piece.is-locked img {
    filter: brightness(0) invert(1) opacity(0.18);
}
.piece:not(.is-locked):hover {
    transform: scale(1.04);
    z-index: 5;
}
.piece:not(.is-locked):hover img {
    filter: drop-shadow(0 12px 22px var(--shadow-piece-up));
}
[data-theme="dark"] .piece:not(.is-locked):hover img {
    filter: invert(1) drop-shadow(0 12px 22px var(--shadow-piece-up));
}
.piece.is-unlocked img {
    filter: drop-shadow(0 8px 18px var(--shadow-piece-up));
}
[data-theme="dark"] .piece.is-unlocked img {
    filter: invert(1) drop-shadow(0 8px 18px var(--shadow-piece-up));
}

@keyframes piece-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-5px); }
}

/* Stagger animations so pieces don't all bob in unison */
.piece[data-piece="1"]  img { animation-delay: 0.0s;  animation-duration: 8s;  }
.piece[data-piece="2"]  img { animation-delay: 1.1s;  animation-duration: 9s;  }
.piece[data-piece="3"]  img { animation-delay: 2.3s;  animation-duration: 7.5s;}
.piece[data-piece="4"]  img { animation-delay: 3.6s;  animation-duration: 9.5s;}
.piece[data-piece="5"]  img { animation-delay: 4.7s;  animation-duration: 8s;  }
.piece[data-piece="6"]  img { animation-delay: 0.8s;  animation-duration: 7s;  }
.piece[data-piece="7"]  img { animation-delay: 2.0s;  animation-duration: 10s; }
.piece[data-piece="8"]  img { animation-delay: 3.1s;  animation-duration: 8.5s;}
.piece[data-piece="9"]  img { animation-delay: 5.4s;  animation-duration: 9s;  }
.piece[data-piece="10"] img { animation-delay: 1.5s;  animation-duration: 9.5s;}
.piece[data-piece="11"] img { animation-delay: 4.2s;  animation-duration: 8s;  }
.piece[data-piece="12"] img { animation-delay: 6.0s;  animation-duration: 7.5s;}

/* === Fragment page === */
.page-fragment main.fragment {
    max-width: var(--max);
    margin: 0 auto;
    padding: 3.5rem 1.5rem 6rem;
}
.fragment-head { text-align: center; margin-bottom: 2rem; }
.fragment-num {
    text-transform: uppercase; letter-spacing: 0.4em; font-size: 0.7rem;
    color: var(--ink-faint); margin: 0 0 0.4rem;
}
.fragment-title { font-style: italic; margin: 0; }
.fragment-sub { color: var(--ink-soft); font-style: italic; margin: 0.4rem 0 0; }
.fragment-description {
    max-width: 540px;
    margin: 1.4rem auto 0;
    text-align: center;
    color: var(--ink-soft);
    line-height: 1.65;
    font-size: 0.98rem;
    font-style: italic;
    white-space: normal;
}

.fragment-piece {
    margin: 2rem auto;
    text-align: center;
    max-width: 280px;
    transition: filter .8s;
    filter: brightness(0) opacity(0.10);
}
.fragment-piece.is-unlocked { filter: drop-shadow(0 10px 22px var(--shadow-piece-up)); }
[data-theme="dark"] .fragment-piece { filter: brightness(0) invert(1) opacity(0.18); }
[data-theme="dark"] .fragment-piece.is-unlocked { filter: invert(1) drop-shadow(0 10px 22px var(--shadow-piece-up)); }
.fragment-piece img { max-width: 100%; height: auto; }

.unlock {
    max-width: 360px;
    margin: 0 auto;
    text-align: center;
}
.recover-inline {
    display: block;
    text-align: right;
    font-size: 0.78rem;
    font-style: italic;
    color: var(--ink-soft);
    margin: -0.4rem 0 1.4rem;
    border: none;
    padding-right: 0.2rem;
}
.recover-inline:hover { color: var(--ink); border: none; }

.player-wrap {
    margin: 2rem auto 3rem;
    max-width: 520px;
}
audio.player, video.player {
    width: 100%;
    display: block;
    border-radius: var(--r-md);
    background: var(--paper-white);
    border: 1px solid var(--line);
}
audio.player { padding: 0.4rem; }
video.player {
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    background: #000;
}
.player-wrap:has(video.player) { max-width: 420px; }

/* === Post-its === */
.postits { margin-top: 3rem; padding-top: 2.5rem; border-top: 1px solid var(--line); }
.postits-title { font-style: italic; margin: 0 0 0.4rem; }
.postit-form {
    margin: 1.5rem 0 2.5rem;
    padding: 1.4rem;
    background: var(--paper-white);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
}
.postit-form label { display: none; }
.postit-form input[type="text"],
.postit-form textarea {
    margin-top: 0;
    margin-bottom: 0.7rem;
    background: var(--paper-soft);
}
.postit-form .btn-secondary { width: 100%; }
.char-counter {
    margin: -0.4rem 0 0.7rem;
    text-align: right;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}
.char-counter.is-near { color: var(--warn); }

.postit-grid {
    list-style: none;
    padding: 1.5rem 0 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.6rem 1.2rem;
}
.postit {
    position: relative;
    background: #ffffff;
    padding: 2.2rem 1.2rem 1.1rem;
    border-radius: 2px;
    box-shadow:
        0 1px 1px rgba(0,0,0,0.04),
        0 6px 16px rgba(0,0,0,0.07),
        0 12px 28px rgba(0,0,0,0.04);
    transform: rotate(-1.2deg);
    transition: transform .35s ease, box-shadow .35s ease;
    border: none;
}
.postit::before {
    /* ruban adhésif au-dessus du post-it */
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%) rotate(-3deg);
    width: 86px;
    height: 22px;
    background: rgba(26,26,26,0.10);
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    border-radius: 1px;
    backdrop-filter: blur(1px);
}
.postit:nth-child(2n) {
    transform: rotate(1.6deg);
    background: #fafafa;
}
.postit:nth-child(2n)::before {
    transform: translateX(-50%) rotate(2.5deg);
    width: 70px;
    background: rgba(26,26,26,0.07);
}
.postit:nth-child(3n) {
    transform: rotate(-0.6deg);
    background: #f6f6f6;
}
.postit:nth-child(3n)::before {
    transform: translateX(-50%) rotate(-1.8deg);
    width: 96px;
    left: 32%;
}
.postit:nth-child(5n) {
    transform: rotate(0.9deg);
}
.postit:nth-child(5n)::before {
    transform: translateX(-50%) rotate(4deg);
    width: 60px;
    left: 68%;
}
.postit:nth-child(7n) {
    transform: rotate(-2deg);
}
.postit:nth-child(7n)::before {
    transform: translateX(-50%) rotate(-4deg);
    width: 75px;
    left: 40%;
}
.postit:hover {
    transform: rotate(0) translateY(-3px);
    box-shadow:
        0 2px 2px rgba(0,0,0,0.06),
        0 10px 22px rgba(0,0,0,0.10),
        0 18px 36px rgba(0,0,0,0.06);
}
.postit-body {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 300;
    font-size: 1.08rem;
    line-height: 1.45;
    color: var(--ink);
    margin: 0 0 0.7rem;
    max-height: 220px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 0.4rem;
}
.postit-body::-webkit-scrollbar { width: 4px; }
.postit-body::-webkit-scrollbar-track { background: transparent; }
.postit-body::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 2px; }
[data-theme="dark"] .postit-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); }
.postit-body { scrollbar-width: thin; scrollbar-color: rgba(0,0,0,0.15) transparent; }
[data-theme="dark"] .postit-body { scrollbar-color: rgba(255,255,255,0.18) transparent; }
.postit-meta {
    margin: 0;
    font-size: 0.65rem;
    color: var(--ink-faint);
    text-align: right;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

/* Post-its : on garde le papier clair en dark mode mais on garde le texte sombre */
[data-theme="dark"] .postit { color: #1a1a1a; }
[data-theme="dark"] .postit-body { color: #1a1a1a; }
[data-theme="dark"] .postit-meta { color: #707070; }
[data-theme="dark"] .postit-body::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.20); }
[data-theme="dark"] .postit-body { scrollbar-color: rgba(0,0,0,0.20) transparent; }
/* Ruban adhésif : plus clair en dark pour rester visible contre le fond noir */
[data-theme="dark"] .postit::before { background: rgba(235,235,235,0.38); box-shadow: 0 1px 3px rgba(0,0,0,0.4); }
[data-theme="dark"] .postit:nth-child(2n)::before { background: rgba(235,235,235,0.30); }
[data-theme="dark"] .postit:nth-child(3n)::before { background: rgba(235,235,235,0.42); }
[data-theme="dark"] .postit:nth-child(5n)::before { background: rgba(235,235,235,0.32); }
[data-theme="dark"] .postit:nth-child(7n)::before { background: rgba(235,235,235,0.36); }

/* === Footer / socials === */
.frag-footer {
    margin-top: 4rem;
    padding: 2rem 1.5rem 2.5rem;
    text-align: center;
    border-top: 1px solid var(--line-soft);
}
.socials {
    display: flex; justify-content: center; gap: 1.6rem;
    margin-bottom: 1rem;
}
.socials a {
    border: 1px solid var(--line);
    width: 38px; height: 38px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--ink-soft);
    background: var(--paper-white);
    transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.socials a:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); transform: translateY(-2px); }
.socials a svg { width: 17px; height: 17px; display: block; }
.legal {
    margin: 0;
    font-size: 0.82rem;
    color: var(--ink-faint);
    font-style: italic;
    letter-spacing: 0.01em;
    line-height: 1.5;
}
.legal .sep { display: inline-block; margin: 0 0.5rem; opacity: 0.45; font-style: normal; }

/* Sur les pages avec vidéo de fond, on passe le texte de footer en pleine encre pour rester lisible */
.page-landing .legal,
.page-enter .legal {
    color: var(--ink);
}

.signout {
    position: fixed; bottom: 1rem; right: 1rem;
    font-size: 0.65rem; color: var(--ink-faint);
    border: none;
    background: var(--paper-white);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--line-soft);
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.signout:hover { color: var(--ink); }

/* === Theme + Lang toggles === */
.theme-toggle, .lang-toggle {
    position: fixed;
    top: 1rem;
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--paper-white);
    color: var(--ink-soft);
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    z-index: 50;
    transition: background .25s, color .25s, transform .25s, border-color .25s;
    font-family: var(--sans);
}
.theme-toggle { right: 1rem; }
.lang-toggle  { right: 4rem; font-size: 0.65rem; font-weight: 500; letter-spacing: 0.12em; }

/* Mobile : on empile lang sous theme pour ne pas mordre sur le contenu */
@media (max-width: 600px) {
    .lang-toggle { right: 1rem; top: 4rem; }
}

.theme-toggle:hover {
    color: var(--ink);
    border-color: var(--ink);
    transform: rotate(20deg);
}
.lang-toggle:hover {
    color: var(--ink);
    border-color: var(--ink);
}
.theme-toggle svg { width: 18px; height: 18px; display: block; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }


/* Mobile tuning */
@media (max-width: 600px) {
    .puzzle-stage { gap: 0.4rem; width: 96vw; }
    .home-header { padding-top: 2rem; }
    .postit-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
    .postit { padding: 0.9rem 0.8rem 0.7rem; }
    .postit-body { font-size: 0.95rem; }
}
@media (max-width: 380px) {
    .postit-grid { grid-template-columns: 1fr; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    .piece img, .landing-mark { animation: none !important; }
}
