/*
 * « La lettre et tes heures » (redesign validated by Mickael, 2026-11-04).
 * Hiro writes to her on a white sheet (Fraunces, soft); the time she gives shows where she decides
 * (hour squares, the band of her day). Interface text, notes and buttons stay in Quicksand.
 */

:root {
    --ink-peach: #9E5238; /* Hiro's signature: 5.6:1 on white, 5.0:1 on the peach background */
    --voice: 'Fraunces', Georgia, serif;
    --ui: 'Quicksand', system-ui, sans-serif;
    --sheet-radius: 20px;
}

.voice {
    font-family: var(--voice);
    font-variation-settings: 'SOFT' 100, 'WONK' 0;
    font-weight: 400;
}

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

/* Wide pages leave the 480 px phone column: they lay themselves out. */
.app--wide { max-width: none; }

@media (min-width: 768px) {
    .app.app--wide { display: block; min-height: 0; padding: 0; }
}

.sign { color: var(--ink-peach); font-family: var(--voice); font-variation-settings: 'SOFT' 100; font-size: 22px; }
.kicker { font-family: var(--ui); font-size: 13px; font-weight: 700; color: var(--muted); }

/* ---------- The sheet: what Hiro writes ---------- */

.sheet {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
    margin: 4px 10px 16px;
    padding: 24px 18px 26px;
    border-radius: var(--sheet-radius);
    background: var(--card);
    overflow-wrap: anywhere;
}

.sheet__title { font-size: 32px; line-height: 1.12; font-weight: 420; overflow-wrap: normal; }
.sheet__lead { font-size: 19px; line-height: 1.5; }
.sheet__lead b, .say b { font-weight: 560; }

@media (min-width: 960px) {
    .sheet { margin: 0; padding: 52px 56px 56px; border-radius: 24px; gap: 22px; }
    .sheet__title { font-size: 46px; line-height: 1.08; font-weight: 400; }
    .sheet__lead { font-size: 21px; }
}

/*
 * A row of the letter with its margin note. On a computer the note sits in a margin column, line for
 * line, behind a peach rule; on a phone it follows the text.
 */
.lrow { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.margin {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-family: var(--ui);
    font-size: 14px;
    line-height: 1.5;
    color: var(--muted);
}
.margin b, .margin strong { color: var(--ink); font-size: 16px; font-weight: 700; }

/* A note that introduces its row on a phone (« Piste 1 · 4 h »), and sits in the margin on a computer. */
.margin--first { order: -1; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 10px; }

@media (min-width: 1100px) {
    .margin--first { order: 0; flex-direction: column; align-items: stretch; gap: 8px; }
    .lrow { display: grid; grid-template-columns: minmax(0, 1fr) 260px; column-gap: 48px; }
    .margin { padding: 26px 0 28px 22px; border-left: 1.5px solid var(--peach); }
}

/* ---------- Buttons of the redesign ---------- */

/* Buttons speak the interface, not Hiro's voice. */
.voice .btn, .voice button, .voice .kicker { font-family: var(--ui); }


.btn--quiet {
    background: var(--card);
    border: 1.5px solid var(--line);
    box-shadow: none;
}
.btn--quiet:active:not(:disabled) { transform: none; }
.btn--inline { display: inline-flex; width: auto; min-height: 52px; padding: 0 24px; font-size: 16px; border-radius: 18px; }
.btn--inline.btn--primary { min-height: 56px; padding: 0 30px; font-size: 17px; }

.chev {
    flex: none;
    width: 8px;
    height: 8px;
    margin: 0 4px 4px 2px;
    border-right: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}
details[open] > summary .chev { transform: rotate(-135deg); margin-bottom: -4px; }

.more > summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    font-family: var(--ui);
    font-size: 15px;
    font-weight: 700;
    list-style: none;
    cursor: pointer;
}
.more > summary::-webkit-details-marker { display: none; }

@media (prefers-reduced-motion: reduce) {
    .chev { transition: none; }
}

/* ---------- Hour squares: one square, one hour of her week ---------- */

.hours-squares { display: inline-flex; flex-wrap: wrap; gap: 3px; vertical-align: middle; }
.square {
    position: relative;
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--line);
    border-radius: 4px;
    background: var(--card);
    overflow: hidden;
}
.square--on { border-color: var(--peach-shadow); background: var(--peach); }
.square--zero { border-style: dashed; background: transparent; }
/* Beyond her hours: dashed peach ink with hatching, never a gradient. */
.square--over {
    border: 1.5px dashed var(--ink-peach);
    background: var(--peach-bg) repeating-linear-gradient(135deg, transparent 0 4px, var(--ink-peach) 4px 5.5px);
}

/* Her week, as a basket of squares (ten per row). */
.week-squares { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 3px; }
.week-squares .square { width: auto; height: 18px; transition: background-color 0.25s ease, border-color 0.25s ease; }

@media (prefers-reduced-motion: reduce) {
    .week-squares .square { transition: none; }
}

/* ---------- Shell: her days, with the menu ---------- */

.shell { min-height: 100dvh; }
.shell__page { min-width: 0; }

.brand {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--voice);
    font-variation-settings: 'SOFT' 100;
    font-size: 19px;
    text-decoration: none;
}
.brand img { width: 40px; height: 40px; }
.topbar > .brand { position: relative; z-index: 3; }

.topbar {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px 8px 18px;
}

.menu-m__toggle {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 22px;
    background: var(--card);
    font-size: 15px;
    font-weight: 700;
    list-style: none;
    cursor: pointer;
}
.menu-m__toggle::-webkit-details-marker { display: none; }
.menu-m__icon { display: inline-flex; flex-direction: column; gap: 3px; width: 16px; }
.menu-m__icon i { display: block; height: 2px; border-radius: 1px; background: var(--ink); transition: transform 0.2s ease, opacity 0.2s ease; }
.menu-m[open] .menu-m__icon i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu-m[open] .menu-m__icon i:nth-child(2) { opacity: 0; }
.menu-m[open] .menu-m__icon i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
.menu-m__close, .menu-m[open] .menu-m__open { display: none; }
.menu-m[open] .menu-m__close { display: inline; }
.menu-m[open] .menu-m__toggle { background: var(--soft); }

.menu-m__backdrop { position: fixed; inset: 0; z-index: 1; background: rgb(52 50 74 / 38%); }
.menu-m__panel {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 2;
    padding: 64px 12px 22px;
    border-radius: 0 0 24px 24px;
    background: var(--card);
}
.menu-m__panel nav { display: flex; flex-direction: column; gap: 4px; }
.menu-m__item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 68px;
    padding: 6px 16px;
    border: 0;
    border-radius: 16px;
    background: none;
    color: var(--ink);
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}
.menu-m__item[aria-current] { background: var(--sky-bg); }
.menu-m__label { font-family: var(--voice); font-variation-settings: 'SOFT' 100; font-size: 26px; line-height: 1.2; }
.menu-m__sub { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.menu-m__rule { width: calc(100% - 32px); margin: 12px 16px; border: 0; border-top: 1px solid var(--track); }
.menu-m__logout { min-height: 52px; font-size: 16px; font-weight: 700; }
.menu-m__who { margin: 14px 16px 0; font-size: 13px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
    .menu-m__icon i { transition: none; }
}

.sidenav { display: none; }

@media (min-width: 960px) {
    .topbar { display: none; }

    .shell {
        display: grid;
        grid-template-columns: 220px minmax(0, 1fr);
        column-gap: 32px;
        align-items: start;
        max-width: 1360px;
        margin: 0 auto;
        padding: 32px 40px 40px;
    }
    .shell--side { grid-template-columns: 220px minmax(0, 1fr) 280px; }

    .sidenav { position: sticky; top: 32px; display: flex; flex-direction: column; gap: 26px; }
    .sidenav .brand { gap: 8px; font-size: 22px; }
    .sidenav .brand img { width: 52px; height: 52px; }
    .sidenav__nav { display: flex; flex-direction: column; gap: 2px; }
    .sidenav__nav a, .sidenav__logout {
        display: flex;
        align-items: center;
        min-height: 46px;
        padding: 0 14px;
        border: 0;
        border-radius: 14px;
        background: none;
        color: var(--ink);
        font: inherit;
        font-size: 16px;
        font-weight: 600;
        text-decoration: none;
        cursor: pointer;
    }
    .sidenav__nav a[aria-current] { background: var(--card); font-weight: 700; }
    .sidenav__nav a:hover, .sidenav__logout:hover { background: var(--sky-bg); }
    .sidenav__logout { margin-top: 14px; color: var(--muted); }
}

/* A right column next to the sheet (end of the day): question, goal, next day. */
.side { display: flex; flex-direction: column; gap: 14px; margin: 0 10px 24px; }
.side__card { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 20px; background: var(--card); font-size: 15px; }
.side__card--peach { background: var(--peach-bg); }
.side__card--sky { background: var(--sky-bg); }
.side__title { font-family: var(--voice); font-variation-settings: 'SOFT' 100; font-size: 22px; line-height: 1.3; }

@media (min-width: 960px) {
    .side { position: sticky; top: 32px; margin: 0; }
}

/* ---------- Guided steps (pistes, first plan): a left column with the step, her week and the button ---------- */

.guided { display: flex; flex-direction: column; min-height: 100dvh; }
.guided__side { display: contents; }
.guided__step { order: 0; padding: 20px 24px 12px; }
.guided__hiro { display: none; }
.guided__main { order: 1; display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 0 10px; }
.guided__main .sheet { margin: 0; }
.guided__tray {
    position: sticky;
    bottom: 0;
    z-index: 2;
    order: 2;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
    padding: 14px 24px 22px;
    border-top: 1px solid var(--track);
    background: var(--card);
}

.dotsteps { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
.dotsteps__dots { display: flex; gap: 4px; }
.dotsteps__dots i { display: block; width: 16px; height: 4px; border-radius: 2px; background: var(--track); }
.dotsteps__dots i.on { background: var(--ink); }

.tray__line { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.tray__line b { font-size: 17px; }
.tray__chosen { display: none; }

@media (min-width: 960px) {
    .guided {
        display: grid;
        grid-template-columns: 250px minmax(0, 1fr);
        column-gap: 32px;
        align-items: start;
        max-width: 1360px;
        min-height: 0;
        margin: 0 auto;
        padding: 40px;
    }
    .guided__side { position: sticky; top: 40px; display: flex; flex-direction: column; gap: 18px; }
    .guided__step { padding: 0; }
    .guided__hiro { display: block; width: 110px; height: 110px; margin-left: -8px; }
    .guided__main { padding: 0; gap: 24px; }
    .guided__tray { position: static; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--track); background: none; }
    .tray__line { flex-direction: column; gap: 4px; }
    .tray__line b { font-size: 22px; }
    .tray__chosen {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin: 4px 0 0;
        padding: 0;
        list-style: none;
        font-family: var(--voice);
        font-variation-settings: 'SOFT' 100;
        font-size: 15.5px;
        line-height: 1.35;
    }
    .tray__chosen li { display: flex; justify-content: space-between; gap: 10px; }
    .tray__chosen small { flex: none; font-family: var(--ui); font-size: 13px; font-weight: 700; color: var(--muted); }
}

/* ---------- Text of the letter ---------- */

.say { font-size: 19px; line-height: 1.5; }

@media (min-width: 960px) {
    .say { font-size: 21px; }
}

/* ---------- Ton plan ---------- */

.plan__head { display: flex; flex-direction: column; gap: 14px; padding-bottom: 8px; text-align: center; align-items: center; }
.plan__who { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.plan__hiro { width: 120px; height: 120px; }
.plan__part { display: flex; flex-direction: column; gap: 12px; padding-top: 22px; border-top: 1px solid var(--track); }
.plan__change { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }

.weeks { display: grid; grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); gap: 8px; width: 100%; padding: 0; list-style: none; font-family: var(--ui); }
.weeks li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 4px;
    border: 1.5px solid var(--track);
    border-radius: 14px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--muted);
    text-align: center;
}
.weeks li b { font-family: var(--voice); font-variation-settings: 'SOFT' 100; font-size: 24px; font-weight: 450; color: var(--ink); }
.weeks li em { font-size: 12px; font-style: normal; font-weight: 700; color: var(--ink); }
.weeks .weeks__now { border-color: var(--ink); background: var(--sky-bg); color: var(--ink); }

.seats { display: flex; flex-wrap: wrap; gap: 6px; }
.seats i { display: block; width: 22px; height: 22px; border: 1.5px solid var(--line); border-radius: 50%; }
.seats i.on { border-color: var(--ink); background: var(--ink); }

.chapter__title { font-size: 22px; line-height: 1.3; font-weight: 450; }
.chapter__scale { display: flex; flex-direction: column; gap: 6px; }
.scale { display: flex; gap: 4px; }
.scale i { flex: 1 1 0; height: 8px; border-radius: 4px; background: var(--track); }
.scale i.on { background: var(--ink); }

.stages { display: grid; grid-template-columns: minmax(0, 1fr); padding: 0; list-style: none; font-family: var(--ui); }
.stages li { display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: 12px; padding-bottom: 14px; font-size: 16px; line-height: 1.4; color: var(--muted); }
.stages__dot { width: 22px; height: 22px; border: 1.5px solid var(--line); border-radius: 50%; background: var(--card); }
.stages .stages__here { color: var(--ink); font-weight: 700; }
.stages__here .stages__dot { display: flex; align-items: center; justify-content: center; border-color: var(--ink); background: var(--ink); }
.stages__here .stages__dot::after { content: ''; width: 4px; height: 9px; margin-top: -2px; border-right: 2px solid #FFFFFF; border-bottom: 2px solid #FFFFFF; transform: rotate(45deg); }
.stages__note { display: block; font-family: var(--voice); font-variation-settings: 'SOFT' 100; font-weight: 400; color: var(--ink-peach); }
.stages__count { display: block; font-size: 13.5px; font-weight: 700; color: var(--ink); }

@media (min-width: 960px) {
    .plan__head { text-align: left; align-items: stretch; }
    .plan__who { flex-direction: row; gap: 22px; }
    .plan__hiro { width: 140px; height: 140px; margin-left: -12px; }
    .chapter__title { font-size: 25px; font-weight: 430; }
    .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
}

/* ---------- Ta journée ---------- */

.today__head { display: flex; flex-direction: column; gap: 14px; padding-bottom: 6px; }
.today__hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.today__hello > div { order: -1; }
.today__hiro { flex: none; width: 84px; height: 84px; margin: -14px -6px -6px 0; }
.today__when { display: none; }
.objective-bar { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 0; background: none; border-radius: 0; }
.objective-bar__goal { display: block; font-size: 14px; font-weight: 700; color: var(--ink); }
.objective-bar__hiro { width: 40px; height: 40px; margin-right: 6px; vertical-align: middle; }
.objective-bar__status { font-size: 14px; color: var(--muted); }
.objective-bar__seats i { width: 16px; height: 16px; }

@media (min-width: 960px) {
    .today__hello { justify-content: flex-start; align-items: center; gap: 18px; }
    .today__hello > div { order: 0; }
    .today__hiro { width: 96px; height: 96px; margin: 0 0 0 -10px; }
}

@media (min-width: 1100px) {
    .today__when { display: block; }
    .today__context { padding-top: 18px; }
}

/* The band of her day: each action at the scale of its minutes. */
.band { font-family: var(--ui); }
.band__track { display: flex; gap: 4px; height: 30px; }
.band__seg { position: relative; min-width: 6px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--card); overflow: hidden; }
.band__seg::after { content: ''; position: absolute; inset: 0; background: var(--peach); transform: scaleX(0); transform-origin: left; transition: transform 0.6s ease 0.3s; }
.band__seg--done { border-color: var(--peach-shadow); }
.band__seg--done::after { transform: scaleX(1); }
.band__scale { position: relative; height: 20px; margin-top: 4px; font-size: 13px; font-weight: 700; color: var(--muted); }
.band__scale span { position: absolute; top: 0; white-space: nowrap; }
.band__scale span:not(:first-child):not(:last-child) { transform: translateX(-50%); }

@media (min-width: 960px) {
    .band__track { height: 34px; }
}

/* Her actions. On a phone: duration and piste, title, why, material, buttons. */
.today-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.today-list > li { border-top: 1px solid var(--track); }

.today-action { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 22px 0 24px; overflow-wrap: anywhere; }
.today-action__note { display: contents; }
.today-action__advice { order: 0; display: flex; align-items: center; gap: 8px; color: var(--ink-peach); font-size: 17px; }
.today-action__advice img { width: 36px; height: 36px; }
.today-action__meta { order: 1; display: flex; flex-wrap: wrap; gap: 0 6px; font-family: var(--ui); font-size: 14px; font-weight: 600; color: var(--muted); }
.today-action__minutes { color: var(--ink); font-weight: 700; }
.today-action__minutes::after { content: ' ·'; color: var(--muted); }
.today-action__head { order: 2; display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: baseline; }
.today-action__title { font-size: 21px; line-height: 1.35; font-weight: 450; }
.today-action__n { font-size: 22px; line-height: 1.2; }
.today-action__why { order: 3; font-family: var(--ui); font-size: 16px; line-height: 1.5; }
.today-action__body { order: 4; display: flex; flex-direction: column; gap: 12px; }
.today-action--next .today-action__title { font-size: 24px; line-height: 1.28; }

.today-action__buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.today-action__buttons form { display: contents; }

.today-contact { display: flex; flex-wrap: wrap; gap: 4px 12px; font-family: var(--ui); font-size: 14px; color: var(--muted); }
.today-contact__name { flex-basis: 100%; font-size: 16px; font-weight: 700; color: var(--ink); }

.today-material { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; padding: 16px 18px 12px; border-radius: 14px; background: var(--soft); font-family: var(--ui); }
.today-material__text { font-size: 15.5px; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; user-select: text; }
.today-material__copy { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.today-material__copied { font-size: 14px; font-weight: 700; color: var(--muted); }
.today-material__copied:empty { display: none; }

@media (min-width: 1100px) {
    /* The duration, the piste and the why move to the margin, line for line with the action. */
    .today-action { display: grid; grid-template-columns: minmax(0, 1fr) 260px; column-gap: 48px; row-gap: 12px; align-items: start; padding: 0; }
    .today-action > * { grid-column: 1; }
    .today-action__advice { padding-top: 26px; }
    .today-action__head { padding-top: 26px; grid-template-columns: 42px minmax(0, 1fr); }
    .today-action__title { font-size: 22px; }
    .today-action__advice + .today-action__note + .today-action__head { padding-top: 0; }
    .today-action__n { font-size: 26px; }
    .today-action__body { padding: 0 0 28px 42px; }
    .today-action--next .today-action__title { font-size: 27px; }
    .today-action__note {
        grid-column: 2;
        grid-row: 1 / span 4;
        display: flex;
        flex-direction: column;
        gap: 8px;
        align-self: stretch;
        padding: 28px 0 28px 22px;
        border-left: 1.5px solid var(--peach);
    }
    .today-action--next .today-action__note { padding-top: 72px; }
    .today-action__meta { flex-direction: column; gap: 8px; }
    .today-action__minutes { font-size: 16px; }
    .today-action__minutes::after { content: none; }
    .today-action__why { font-size: 14px; color: var(--muted); }
}

/* What she did today, signed by Hiro. */
.done-log { display: flex; flex-direction: column; gap: 4px; padding-top: 16px; border-top: 1px solid var(--track); }
.log { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; font-family: var(--voice); font-variation-settings: 'SOFT' 100; }
.log li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; column-gap: 10px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--track); font-size: 16.5px; line-height: 1.4; }
.log li:first-child { border-top: 0; }
.log__check { position: relative; top: 3px; width: 18px; height: 18px; border: 1.5px solid var(--peach-shadow); border-radius: 50%; background: var(--peach-bg); }
.log__check::after { content: ''; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border-right: 2px solid var(--ink-peach); border-bottom: 2px solid var(--ink-peach); transform: rotate(45deg); }
.log__time { font-family: var(--ui); font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }

/*
 * Hiro's signature, played on the action once the server recorded it: the check draws itself, Hiro
 * lands, his words appear; then the action folds away. Without motion: shown still, then removed.
 */
.today-signed { overflow: hidden; border-top: 1px solid var(--track); transition: opacity 0.3s ease, max-height 0.4s ease; max-height: 260px; }
.today-signed__inner { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; column-gap: 14px; align-items: center; margin: 18px 0; padding: 16px 18px; border-radius: 16px; background: var(--peach-bg); }
.today-signed__check { position: relative; width: 30px; height: 30px; border-radius: 50%; background: var(--peach); animation: signed-pop 0.4s ease both; }
.today-signed__check::after { content: ''; position: absolute; left: 11px; top: 6px; width: 7px; height: 14px; border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: rotate(45deg); transform-origin: bottom left; animation: signed-tick 0.35s ease 0.25s both; }
.today-signed__text { font-size: 18px; line-height: 1.45; animation: signed-words 0.5s ease 0.5s both; }
.today-signed__text .sign { font-size: 19px; }
.today-signed__hiro { width: 64px; height: 64px; animation: signed-land 0.7s cubic-bezier(.2, .8, .3, 1.2) 0.15s both; }
.today-signed--leaving { max-height: 0; opacity: 0; }
.today-celebration .today-signed__inner { margin-top: 0; }

@keyframes signed-pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes signed-tick { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes signed-words { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes signed-land { from { opacity: 0; transform: translate(40px, -30px) rotate(-12deg); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
    .band__seg::after { transition: none; }
    .today-signed, .today-signed__check, .today-signed__check::after, .today-signed__text, .today-signed__hiro { animation: none; transition: none; }
}

/* End of her day. */
.today__end-head { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.today--end .say { margin-top: 4px; }
.today--rest { align-items: center; text-align: center; }
.today--quiet { align-items: center; gap: 22px; text-align: center; }
.side__ask { display: flex; align-items: flex-start; gap: 10px; }
.side__ask .side__title { font-size: 18px; line-height: 1.4; }
.side__ask img { flex: none; width: 44px; height: 44px; }
.side .seats i { width: 18px; height: 18px; }
.side .btn { min-height: 56px; font-size: 17px; }

@media (min-width: 960px) {
    .today__end-head { flex-direction: row; align-items: center; gap: 22px; text-align: left; }
    .today--rest { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; text-align: left; }
}

/* The old card look of an action (app.css) does not apply on the sheet. */
.sheet .today-action { padding-right: 0; padding-left: 0; border-radius: 0; background: none; }
.sheet .today-action--next { box-shadow: none; }
.sheet .today-action__buttons { flex-direction: row; }
.sheet .today-action__piste { font-size: inherit; color: inherit; }
.sheet .today-material__text { padding: 0; border: 0; border-radius: 0; background: none; font-size: 15.5px; white-space: pre-line; }
.sheet .today-material__copy { flex-direction: row; align-items: center; }
.sheet .today-material__copied { min-height: 0; }

@media (min-width: 1100px) {
    .sheet .today-action { padding: 0; }
}

/* ---------- Ce que j'ai trouvé: a letter, with where Hiro read each line in the margin ---------- */

.toc { display: none; }
.letter__head { display: flex; flex-direction: column; gap: 14px; padding-bottom: 10px; }
.letter__hiro { width: 72px; height: 72px; }
.letter__part { display: flex; flex-direction: column; }
.letter__part-head { padding: 22px 0 12px; border-top: 1px solid var(--track); }
.letter__part-title { font-size: 26px; line-height: 1.2; font-weight: 430; }

.start { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 18px 20px; border-radius: 18px; background: var(--soft); }
.start > .kicker { grid-column: 1 / -1; }
.start__item { display: flex; flex-direction: column; gap: 10px; font-size: 18px; line-height: 1.4; }
.start .seats i { width: 18px; height: 18px; }
.start .square { width: 12px; height: 12px; border-radius: 3px; }

.sheet .claims { gap: 0; }
.claim { padding-bottom: 20px; }
.claim__text { font-size: 18px; line-height: 1.58; }
.claim__note { gap: 4px; }
.sheet .sources { display: flex; flex-wrap: wrap; gap: 2px 10px; font-family: var(--ui); font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.sheet .sources a { color: var(--muted); text-underline-offset: 2px; }
.sources__label { font-weight: 700; }
.claims__more > summary { border-top: 1px solid var(--track); }
.claims__more { margin-bottom: 12px; }
.sheet .gap-list { gap: 12px; padding: 0 0 12px 1.1em; font-size: 18px; line-height: 1.55; }

@media (min-width: 960px) {
    .toc { display: flex; flex-direction: column; border-top: 1px solid var(--track); }
    .toc a { display: flex; justify-content: space-between; align-items: center; min-height: 44px; border-bottom: 1px solid var(--track); font-size: 15px; font-weight: 600; text-decoration: none; }
    .toc a span { font-size: 13px; color: var(--muted); }
    .letter__hiro { display: none; }
    .start { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
    .letter__part-title { font-size: 30px; }
    .claim__text { font-size: 19px; }
}

@media (min-width: 1100px) {
    .claim { padding-bottom: 0; }
    .claim__text { padding-bottom: 26px; }
    .claim__note { padding-top: 3px; }
    .sheet .sources { flex-direction: column; }
}

/* ---------- Tes pistes: cards, and her week as squares ---------- */

.pistes .sheet { gap: 16px; }
.pistes__legend { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.hiro-says[role='alert'] { padding: 0; border: 0; background: none; font-weight: 400; }

.lead-grid { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }

.sheet ~ .lead-grid .lead-card, .lead-grid .lead-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
    border: 1.5px solid var(--track);
    border-radius: 20px;
    background: var(--card);
    box-shadow: none;
    overflow-wrap: anywhere;
}
.lead-grid .lead-card:has(.lead-card__take input:checked) { border: 2px solid var(--peach-shadow); background: var(--peach-bg); }
.lead-card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.lead-card__tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--sky-bg); font-size: 13px; font-weight: 700; white-space: nowrap; }
.lead-card__tag img { width: 24px; height: 24px; }
.lead-card__hours { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.lead-card:has(.lead-card__take input:checked) .lead-card__square { border-color: var(--peach-shadow); background: var(--peach); }
.lead-grid .lead-card__title { display: block; overflow: visible; font-size: 18px; line-height: 1.35; font-weight: 700; -webkit-line-clamp: unset; line-clamp: none; }
.lead-grid .lead-card__reasoning { display: block; overflow: visible; font-size: 16px; line-height: 1.55; -webkit-line-clamp: unset; line-clamp: none; }
.lead-card__estimate { font-size: 15px; line-height: 1.45; font-weight: 600; color: var(--muted); }
.lead-card__difficulty { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; }
.difficulty { display: inline-flex; gap: 2px; }
.difficulty i { display: inline-block; width: 8px; height: 14px; border-radius: 2px; background: var(--track); }
.difficulty i.on { background: var(--ink); }
.lead-card__detail > summary { text-decoration: underline; text-underline-offset: 3px; }
.lead-card__more { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; font-size: 15px; line-height: 1.5; }
.lead-grid .lead-card__why { color: var(--ink); }
.lead-card__more .sources { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 13.5px; color: var(--muted); }
.lead-card__more .sources a { color: var(--muted); }
.lead-card__take {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 0 16px;
    border: 1.5px solid var(--line);
    border-radius: 14px;
    background: var(--card);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}
.lead-card:has(.lead-card__take input:checked) .lead-card__take { border-color: var(--peach-shadow); }
.lead-card__take input { width: 22px; height: 22px; margin: 0; accent-color: var(--ink); }
.lead-card__take:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 3px; }
.lead-card__over { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.lead-card__over .square { width: 14px; height: 14px; }

.tray__over { font-size: 16px; line-height: 1.45; }
.week { display: flex; flex-direction: column; gap: 8px; }
.guided__tray .btn { min-height: 56px; font-size: 18px; }

@media (min-width: 960px) {
    .lead-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
    .pistes .sheet { padding: 48px 56px 44px; }
    .pistes .letter__hiro { display: none; }
    .guided__tray .btn { min-height: 60px; }
}

/* ---------- Ton premier plan ---------- */

.rhythm__head { display: flex; flex-direction: column; gap: 14px; padding-bottom: 8px; }
.rhythm__cell { display: flex; flex-direction: column; gap: 14px; min-width: 0; margin: 0; padding: 22px 0 6px; border: 0; border-top: 1px solid var(--track); }
.rhythm__cell legend { float: left; width: 100%; margin-bottom: 14px; padding: 0; }
.rhythm__summary { display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.rhythm__summary b { color: var(--ink); }
.rhythm .tray__chosen { display: none; }

.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; clear: both; font-family: var(--ui); }
.day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 72px;
    padding: 6px 0;
    border: 1.5px solid var(--track);
    border-radius: 14px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
}
.day:has(input:checked) { border-color: var(--ink); background: var(--sky-bg); }
.day input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); cursor: pointer; }

.sheet .stepper { justify-content: flex-start; padding: 0; background: none; font-family: var(--ui); }
.sheet .stepper__btn { width: 48px; height: 48px; border: 1.5px solid var(--line); background: var(--card); }

.weeks-grid { display: grid; grid-template-columns: 28px repeat(7, minmax(0, 1fr)); gap: 4px; align-items: center; font-family: var(--ui); }
.weeks-grid__head, .weeks-grid__week { font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; }
.weeks-grid__week { text-align: left; }
.weeks-grid__day { display: flex; align-items: center; justify-content: center; height: 34px; border: 1.5px solid var(--line); border-radius: 8px; font-size: 12.5px; font-weight: 700; line-height: 1.1; text-align: center; }
.weeks-grid__day--on { border-color: var(--peach-shadow); background: var(--peach); }
.weeks-grid__day--rest { border-style: dashed; color: var(--muted); font-weight: 600; }
.weeks-grid__day--today { border: 2.5px solid var(--ink); }

@media (min-width: 960px) {
    .rhythm .tray__chosen { display: flex; padding-top: 12px; border-top: 1px solid var(--track); }
    .rhythm .sheet { padding: 56px; }
    .rhythm__cell { padding: 26px 0 14px; max-width: 760px; }
    .days { display: flex; flex-wrap: wrap; gap: 8px; }
    .day { flex-direction: row; min-height: 48px; padding: 0 14px; gap: 8px; font-size: 15px; }
    .weeks-grid { grid-template-columns: 36px repeat(7, minmax(0, 1fr)); gap: 6px; }
    .weeks-grid__day { height: 40px; font-size: 14px; }
}

@media (max-width: 959px) {
    /* On a phone the bar under the thumb stays short: the period and the button. */
    .rhythm .guided__tray .week, .rhythm__summary span { display: none; }
}

/* The day being prepared: one sheet, centred, no menu. */
.waiting { max-width: 640px; margin: 0 auto; padding: 40px 0; }

/* The conversation inside her days: the bar above counts in the height, a readable width on a computer. */
.shell__page .conversation { min-height: calc(100dvh - 60px); }

@media (min-width: 960px) {
    .shell__page .conversation { max-width: 820px; min-height: calc(100dvh - 72px); padding-top: 0; }
}
