/* Showtime — section styles
   Palette echantillonnee dans l'app : le bleu est celui des CTA de l'onboarding. */

:root {
    --bg: #0b0b0c;
    --text: #f2f2f2;
    --muted: #97979c;
    --dim: #6c6c72;
    --rule: #232326;
    --accent: #0008c8;
    --accent-ink: #ffffff;
    --shell: 1040px;
    --measure: 68ch;
    /* marge laterale de la page, reprise par le carrousel pour sortir du cadre */
    --pad-x: 24px;
}

* {
    box-sizing: border-box;
}

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

html,
body {
    margin: 0;
    background: var(--bg);
}

/* font-size sur body uniquement : garder rem indexe sur la preference navigateur */
body {
    padding: 0 var(--pad-x) 80px;
    color: var(--text);
    /* system-ui en tete : resout correctement Segoe UI Variable (Win11) et Roboto (Android).
       Helvetica Neue / Arial evitent la chute sur DejaVu Sans sous Linux. */
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        "Helvetica Neue",
        Arial,
        sans-serif;
    font-size: 1.0625rem;
    line-height: 1.6;
}

.shell {
    width: min(100%, var(--shell));
    margin: 0 auto;
}

/* ---------- typographie ---------- */

/* Graisses : on reste sur 600/700, qui existent reellement dans SF Pro,
   Segoe UI et Roboto. Au-dela le navigateur synthetise et ca bave. */

h1,
h2,
h3 {
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.018em;
    line-height: 1.15;
}

h1 {
    font-size: clamp(2.1rem, 5.4vw, 3.3rem);
    letter-spacing: -0.026em;
    line-height: 1.06;
}

h2 {
    font-size: clamp(1.45rem, 2.6vw, 1.85rem);
    letter-spacing: -0.022em;
}

/* Approche resserree uniquement quand SF Pro est reellement disponible :
   ailleurs, la valeur de base plus douce s'applique. */
@supports (font: -apple-system-body) {
    h1 {
        letter-spacing: -0.035em;
    }

    h2 {
        letter-spacing: -0.028em;
    }
}

h3 {
    font-size: 1.02rem;
    letter-spacing: -0.012em;
}

p {
    margin: 0 0 1em;
    max-width: var(--measure);
}

/* les liens dans le corps de texte doivent se voir : souligne franc,
   pas le filet gris qui se confondait avec le texte */
a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.45);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 4px;
}

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

:focus-visible {
    outline: 2px solid #6f6fff;
    outline-offset: 3px;
    border-radius: 2px;
}

strong {
    font-weight: 600;
}

em {
    font-style: normal;
    color: #ffffff;
    font-weight: 600;
}

.muted {
    color: var(--muted);
}

/* ---------- fil d'ariane ---------- */

.breadcrumb {
    padding: 26px 0 0;
    font-size: 0.82rem;
    color: var(--dim);
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.breadcrumb li + li::before {
    content: "/";
    margin-right: 7px;
    color: var(--rule);
}

/* ---------- hero ---------- */

/* Le bras sort par le bord droit de la fenetre, pas par le bas.
   overflow-x: clip rogne a droite en laissant l'axe vertical intact —
   overflow-x: hidden creerait un conteneur de defilement et couperait aussi le bas. */
.hero-wrap {
    position: relative;
    overflow-x: clip;
    /* debord = gouttiere du shell + depassement hors ecran */
    --hero-bleed: calc(max(24px, (100vw - var(--shell)) / 2) + clamp(150px, 18vw, 320px));
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
    gap: 40px;
    align-items: center;
    padding: 52px 0 0;
}

.hero-copy {
    padding-bottom: 72px;
}

.hero-lede {
    margin-top: 22px;
    max-width: 34ch;
    font-size: 1.2rem;
    line-height: 1.5;
    color: #dcdcde;
}

.hero-sub {
    max-width: 40ch;
    color: var(--muted);
}

/* justify-self:end + marge droite negative : le bord droit reste ancre hors ecran,
   max-width ne fait que rentrer le bord gauche. */
.hero-hand {
    display: block;
    align-self: end;
    justify-self: end;
    width: calc(100% + var(--hero-bleed));
    max-width: 900px;
    height: auto;
    margin: 0 calc(-1 * var(--hero-bleed)) 0 0;
    /* le poignet s'efface au lieu d'etre tranche net, et se termine avant la galerie */
    -webkit-mask-image: linear-gradient(to bottom, #000 68%, transparent 93%);
    mask-image: linear-gradient(to bottom, #000 68%, transparent 93%);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    margin-top: 32px;
}

.btn {
    display: inline-block;
    padding: 13px 26px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.btn:hover {
    background: #1b1be0;
}

.actions .meta {
    font-size: 0.86rem;
    color: var(--dim);
}

/* ---------- galerie de captures ---------- */

.gallery {
    display: flex;
    gap: 16px;
    margin: 40px 0 88px;
    padding-bottom: 6px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.gallery::-webkit-scrollbar {
    display: none;
}

.gallery img {
    flex: 0 0 clamp(190px, 23vw, 244px);
    width: clamp(190px, 23vw, 244px);
    height: auto;
    border-radius: 14px;
    scroll-snap-align: start;
    display: block;
}

/* ---------- sections ---------- */

section {
    padding-top: 30px;
    margin-bottom: 76px;
    border-top: 1px solid var(--rule);
}

.section-head {
    max-width: var(--measure);
    margin-bottom: 34px;
}

.section-head p {
    margin: 12px 0 0;
    color: var(--muted);
}

/* grille de capacites */

.caps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 34px 48px;
}

.caps h3 {
    margin-bottom: 7px;
}

.caps p {
    margin: 0;
    color: var(--muted);
    font-size: 0.96rem;
}

/* variante illustree : vignette carree cadree dans l'interface */

.caps-shots img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: #000000;
}

.caps-shots h3 {
    margin-top: 0;
}

/* note a la premiere personne : filet lateral plutot que carte,
   pour marquer le changement de voix sans faire un encadre marketing */

.note-personal {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 48px;
    align-items: center;
    margin: 0 0 30px;
}

.note-body {
    max-width: 58ch;
    padding-left: 22px;
    border-left: 2px solid var(--rule);
}

.note-personal blockquote {
    margin: 0;
}

.note-personal p {
    max-width: none;
    color: #dcdcde;
    font-size: 1.05rem;
}

.note-personal p:last-child {
    margin-bottom: 0;
}

/* rapport natif de la source (974x1299) : aucun recadrage */
.note-photo {
    display: block;
    width: clamp(150px, 19vw, 210px);
    height: auto;
    aspect-ratio: 3 / 4;
    border-radius: 10px;
}

.byline {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
    margin-top: 22px;
}

.byline b {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
}

.byline a {
    font-size: 0.86rem;
    color: var(--dim);
    text-decoration: none;
}

.byline a:hover {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* bloc mis en avant */

.pull {
    max-width: 30ch;
    margin: 0 0 22px;
    font-size: clamp(1.3rem, 2.8vw, 1.7rem);
    font-weight: 600;
    letter-spacing: -0.022em;
    line-height: 1.3;
    color: #ffffff;
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
}

.split p {
    color: var(--muted);
}

/* fiche technique */

.spec {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.94rem;
}

.spec th,
.spec td {
    padding: 13px 0;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--rule);
}

.spec th {
    width: 42%;
    padding-right: 24px;
    font-weight: 400;
    color: var(--muted);
}

.spec td {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
    font-size: 0.88rem;
    color: var(--text);
}

.spec-note {
    margin-top: 22px;
    max-width: none;
    font-size: 0.9rem;
    color: var(--dim);
}

/* tableau comparatif : defile horizontalement plutot que de tasser les colonnes */

.table-scroll {
    overflow-x: auto;
    scrollbar-width: thin;
}

.compare {
    min-width: 720px;
}

.compare th[scope="col"] {
    width: auto;
    padding: 0 0 13px;
    color: var(--text);
    font-weight: 600;
    font-size: 0.92rem;
    border-bottom: 1px solid var(--rule);
}

.compare th[scope="row"] {
    width: 22%;
    padding-right: 20px;
}

.compare td,
.compare th[scope="col"] {
    padding-right: 20px;
}

.compare thead th:first-child {
    width: 22%;
}

/* listes */

.plain {
    margin: 0;
    padding: 0;
    list-style: none;
    max-width: var(--measure);
}

.plain li {
    padding: 11px 0;
    border-bottom: 1px solid var(--rule);
    color: var(--muted);
    font-size: 0.96rem;
}

.plain li:first-child {
    padding-top: 0;
}

/* un H3 qui introduit une liste, ou qui en suit une, a besoin d'air :
   sans ca le titre se lit comme un element de la liste */
h3 + .plain,
h3 + .steps {
    margin-top: 16px;
}

.plain + h3,
.steps + h3 {
    margin-top: 46px;
}

/* liste numerotee : compteur en monospace, aligne hors du texte */

.steps {
    counter-reset: step;
    max-width: var(--measure);
    margin: 0;
    padding: 0;
    list-style: none;
}

.steps li {
    position: relative;
    padding: 12px 0 12px 40px;
    border-bottom: 1px solid var(--rule);
    color: var(--muted);
    font-size: 0.96rem;
}

.steps li:first-child {
    padding-top: 0;
}

.steps li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
    font-size: 0.82rem;
    color: var(--dim);
}

.steps strong,
.plain strong {
    color: var(--text);
}

.links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px 40px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.links a {
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.45);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 4px;
}

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

.links span {
    display: block;
    margin-top: 3px;
    font-size: 0.9rem;
    color: var(--dim);
}

/* ---------- questions / reponses ---------- */

.qa {
    max-width: var(--measure);
}

.qa > div {
    padding: 22px 0;
    border-bottom: 1px solid var(--rule);
}

.qa > div:first-child {
    padding-top: 0;
}

.qa h3 {
    margin: 0 0 10px;
    font-size: 1.05rem;
}

.qa p {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 0.96rem;
}

.qa p:last-child {
    margin-bottom: 0;
}

/* ---------- changelog ---------- */

.page-head {
    padding: 48px 0 52px;
}

.page-head p {
    margin-top: 16px;
    color: var(--muted);
}

.release {
    padding-top: 28px;
    margin-bottom: 56px;
    border-top: 1px solid var(--rule);
}

.release-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 14px;
}

.release-meta h2 {
    font-size: 1.5rem;
}

.release-meta time {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
    font-size: 0.82rem;
    color: var(--dim);
}

.release > p {
    color: #dcdcde;
}

/* ---------- barre collante ---------- */

/* revelee en JS une fois le CTA du hero sorti de l'ecran.
   Sans JS l'attribut hidden reste, la barre n'apparait jamais. */
.sticky-cta {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    padding: 10px 24px;
    background: rgba(11, 11, 12, 0.85);
    -webkit-backdrop-filter: saturate(150%) blur(14px);
    backdrop-filter: saturate(150%) blur(14px);
    border-bottom: 1px solid var(--rule);
    transform: translateY(-100%);
    transition: transform 0.24s ease;
}

.sticky-cta.is-visible {
    transform: translateY(0);
}

.sticky-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* La barre deborde la grille de 20 px de chaque cote sur grand ecran :
   le logo sort a gauche, le bouton a droite. Sous 900 px on reste dans la grille. */
@media (min-width: 900px) {
    .sticky-cta .shell {
        width: min(100%, calc(var(--shell) + 40px));
    }
}

.sticky-name {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.98rem;
    letter-spacing: -0.02em;
    text-decoration: none;
    white-space: nowrap;
}

/* rayon a 22 % : l'approximation courante du squircle des icones iOS */
.sticky-name img {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 22%;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

a.sticky-name:hover span {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.btn-sm {
    padding: 9px 18px;
    font-size: 0.9rem;
}

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

@media (max-width: 480px) {
    .sticky-cta {
        padding: 9px 18px;
    }

    .sticky-name {
        display: none;
    }

    .sticky-inner {
        justify-content: stretch;
    }

    .sticky-inner .btn-sm {
        flex: 1;
        text-align: center;
    }
}

/* ---------- pied de page ---------- */

.site-footer {
    padding-top: 26px;
    border-top: 1px solid var(--rule);
    font-size: 0.88rem;
    color: var(--dim);
}

.site-footer ul {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}

.site-footer a {
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* selecteur de langue, dernier element du menu de pied de page */
.site-footer .lang-switch {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.35);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 4px;
}

.site-footer .lang-switch:hover {
    text-decoration-color: currentColor;
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
    .split {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

@media (max-width: 760px) {
    .note-personal {
        grid-template-columns: 1fr;
        gap: 0;
    }

    /* la photo ne sert plus a rien une fois empilee sous la citation */
    .note-photo {
        display: none;
    }
}

/* Bascule a 700 et non 900 : au-dessus, garder deux colonnes evite
   que l'image en pleine largeur ne fasse 900px de haut. */
@media (max-width: 700px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 40px 0 0;
    }

    .hero-copy {
        padding-bottom: 24px;
    }

    /* meme mecanique qu'en deux colonnes, mais plafond plus bas :
       en pleine largeur l'image atteindrait 660px de haut. */
    .hero-hand {
        max-width: 560px;
    }
}

/* Carrousel bord a bord : on annule la marge laterale de la page par des marges
   negatives, et on la remet en padding pour que la premiere carte reste alignee
   sur le texte. scroll-padding garde cet alignement pendant le defilement. */
@media (max-width: 700px) {
    .gallery {
        margin-left: calc(-1 * var(--pad-x));
        margin-right: calc(-1 * var(--pad-x));
        padding: 0 var(--pad-x) 6px;
        scroll-padding-left: var(--pad-x);
    }
}

@media (max-width: 560px) {
    :root {
        --pad-x: 18px;
    }

    body {
        padding-bottom: 60px;
    }

    section {
        margin-bottom: 60px;
    }

    .gallery {
        margin-bottom: 64px;
    }
}
