/* Site vitrine de Rainarr, piste A « Keynote » en scène centrale (17 octobre
   2026) : l'écran noir où le logo s'allume, le téléphone épinglé au centre
   dont l'écran change au défilement, les services en bento. Thème Signal
   Blanc de l'app : sombre par défaut, clair quand l'appareil le demande ;
   les valeurs sont celles d'app_palette.dart et d'app_colors.dart
   (docs/publication/vitrine-et-pub.md §2). Aucune ressource externe ; les
   animations cèdent devant prefers-reduced-motion. */

@font-face { font-family: Oxanium; font-weight: 400; font-display: swap; src: url(fonts/Oxanium-Regular.ttf) format("truetype"); }
@font-face { font-family: Oxanium; font-weight: 600; font-display: swap; src: url(fonts/Oxanium-SemiBold.ttf) format("truetype"); }
@font-face { font-family: Oxanium; font-weight: 700; font-display: swap; src: url(fonts/Oxanium-Bold.ttf) format("truetype"); }

:root {
  color-scheme: dark;
  /* Écran de l'allumage, les mêmes dans les deux apparences. */
  --screen: #07090B;
  --screen-text: #F5F5F2;
  --screen-text-2: #C9CBD1;
  --screen-line: #3A3E47;
  /* Signal Blanc, sombre. */
  --bg: #17181C;
  --bg-deep: #111215;
  --card: #202228;
  --card-raised: #2A2D34;
  --border: #3A3E47;
  --border-strong: #4C515C;
  --text: #F5F5F2;
  --text-2: #C9CBD1;
  --muted: #91959E;
  --action: #F2F2EE;
  --on-action: #111215;
  --scrim: rgba(24, 25, 30, .95);
  --success: #A3D9A5;
  --info: #7CC4FF;
  --pending: #B8A6FF;
  --unavailable: #E8C547;
  --plex: #EFC66E;
  --tautulli: #F8CF6A;
  --radarr: #FFDA83;
  --sonarr: #86DCF8;
  --seerr: #A1A3F7;
  --maintainerr: #F9C56D;
  --tint-share: 12%;
  --radius: 22px;
  --nav-h: 64px;
  --gutter: clamp(16px, 4vw, 40px);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #F2F2EE;
    --bg-deep: #E8E8E3;
    --card: #FFFFFF;
    --card-raised: #EDEDE8;
    --border: #D9D9D3;
    --border-strong: #BDBDB6;
    --text: #17181C;
    --text-2: #4A4D55;
    --muted: #686B73;
    --action: #17181C;
    --on-action: #F2F2EE;
    --scrim: rgba(242, 242, 238, .92);
    --success: #3D7344;
    --info: #1F6CAD;
    --pending: #6A4FD0;
    --unavailable: #806300;
    --plex: #8A6414;
    --tautulli: #886511;
    --radarr: #826625;
    --sonarr: #27728C;
    --seerr: #595CD5;
    --maintainerr: #916213;
    --tint-share: 8%;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.6 Oxanium, system-ui, sans-serif; overflow-x: hidden; }
img, video { max-width: 100%; display: block; }
a { color: var(--text); text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Barre : noire sur l'écran de l'allumage, puis à la couleur de la page. */
.nav { position: sticky; top: 0; z-index: 10; height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 var(--gutter); background: var(--scrim); border-bottom: 1px solid var(--border); backdrop-filter: blur(14px); transition: background .3s, border-color .3s, color .3s; }
.nav.over-screen { background: var(--screen); border-color: transparent; color: var(--screen-text); --text: var(--screen-text); --muted: var(--screen-text-2); --border: var(--screen-line); --action: #F2F2EE; --on-action: #111215; }
.brand { display: flex; align-items: center; min-height: 48px; color: inherit; }
.logo-h { height: 26px; width: auto; display: block; }
.logo-ink { fill: currentColor; }
.logo-screen { fill: var(--screen); }
.nav .brand { color: var(--text); }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a:not(.btn) { color: var(--muted); text-decoration: none; font-size: .95rem; min-height: 48px; display: inline-flex; align-items: center; }
.nav-links a:not(.btn):hover { color: var(--text); }
/* Choix de langue : FR · EN dans une pastille, la langue en cours pleine. */
.nav-links .lang { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 999px; font-size: .95rem; }
.nav-links .lang > a, .nav-links .lang > span { min-height: 30px; padding: 0 12px; border-radius: 999px; display: inline-flex; align-items: center; }
.nav-links .lang > [aria-current] { color: var(--text); background: var(--border); font-weight: 600; }

/* Boutons : une seule action pleine, en blanc cassé sur sombre. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 999px; font: 600 1rem Oxanium, sans-serif; text-decoration: none; transition: transform .2s, background .2s; }
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { color: var(--on-action); background: var(--action); }
.btn-ghost { color: var(--text); border: 1px solid var(--border-strong); background: transparent; }
.btn-small { min-height: 40px; padding: 0 18px; font-size: .92rem; }

/* Téléphone : un cadre graphite, le même dans les deux apparences. */
.phone { position: relative; aspect-ratio: 540 / 1170; border-radius: 14% / 6.5%; background: #111215; box-shadow: 0 0 0 1px #3A3E47, 0 40px 90px -40px rgba(0, 0, 0, .75); }
.phone video { position: absolute; inset: 7px; width: calc(100% - 14px); height: calc(100% - 14px); object-fit: cover; border-radius: 12.5% / 5.8%; background: #17181C; }
.demo-toggle { width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--text); background: var(--card); border: 1px solid var(--border-strong); }
.demo-toggle svg { width: 18px; height: 18px; }
.demo-toggle .i-pause { display: none; }
.demo-toggle[data-state="playing"] .i-pause { display: block; }
.demo-toggle[data-state="playing"] .i-play { display: none; }

/* Haut de page : l'écran noir de l'allumage, un léger balayage de tube. */
.hero { position: relative; min-height: calc(100svh - var(--nav-h)); display: flex; flex-direction: column; align-items: center; padding: clamp(24px, 5vh, 56px) var(--gutter) 0; overflow: hidden; text-align: center; background: radial-gradient(120% 70% at 50% 30%, #0E1115 0%, var(--screen) 65%); color: var(--screen-text); --text: var(--screen-text); --text-2: var(--screen-text-2); --border-strong: #4C515C; --card: #202228; --action: #F2F2EE; --on-action: #111215; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px); }
.hero-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; max-width: 980px; }
.hero-logo { width: clamp(140px, 15vw, 200px); margin: 0 0 clamp(16px, 3.4vh, 30px); }
.neon { display: block; width: 100%; height: auto; overflow: visible; }
.hero-title { margin: 0 0 18px; font-size: clamp(2.6rem, 7.4vw, 5.6rem); line-height: 1; letter-spacing: -.03em; font-weight: 700; }
.hero-title span { display: inline-block; }
.hero-lead { margin: 0 0 30px; max-width: 40ch; color: var(--screen-text-2); font-size: clamp(1.05rem, 1.7vw, 1.25rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.promise { margin: 22px 0 0; color: var(--screen-text-2); font-size: .9rem; }
.hero-phone { --pw: clamp(220px, 23vw, 320px); position: relative; z-index: 1; width: var(--pw); margin: clamp(26px, 5vh, 48px) 0 calc(var(--pw) * -1.05); }
.hero-toggle { position: absolute; left: calc(100% + 16px); top: 28px; }

/* Allumage « Néons » (splash_timeline.dart, 2,3 s) : paliers francs. */
.neon-dot { opacity: 0; animation: n-dot 2.3s step-end forwards; }
@keyframes n-dot { 0% { opacity: 0; } 6.52% { opacity: 1; } 10% { opacity: .1; } 14.35% { opacity: 1; } 100% { opacity: 1; } }
.neon-letter { opacity: 0; animation: n-letter 2.3s step-end forwards; }
@keyframes n-letter { 0% { opacity: 0; } 26.09% { opacity: .7; } 27.83% { opacity: 0; } 31.3% { opacity: .95; } 33.04% { opacity: .15; } 38.7% { opacity: 1; } 100% { opacity: 1; } }
.neon-over { opacity: 0; animation: n-over 2.3s forwards; }
@keyframes n-over { 0% { opacity: 0; animation-timing-function: step-end; } 38.7% { opacity: .25; animation-timing-function: linear; } 56.5% { opacity: 0; } 100% { opacity: 0; } }
.fringe { opacity: .55; mix-blend-mode: screen; }
.fringe-o { animation: n-fringe-o 1.2s ease-out .6s both; }
.fringe-c { animation: n-fringe-c 1.2s ease-out .6s both; }
@keyframes n-fringe-o { from { transform: translateX(-6.7px); } to { transform: translateX(-2.1px); } }
@keyframes n-fringe-c { from { transform: translateX(6.7px); } to { transform: translateX(2.1px); } }
.neon-chevron { opacity: 0; animation: n-chevron .2s step-end 1.1s forwards; }
.neon-chevron.n1 { animation-delay: 1.33s; }
.neon-chevron.n2 { animation-delay: 1.56s; }
@keyframes n-chevron { 0% { opacity: .85; } 25% { opacity: 0; } 55% { opacity: .6; } 75% { opacity: 0; } 100% { opacity: 1; } }
/* Le texte et le téléphone arrivent quand le logo se pose. */
.hero .d1, .hero .d2, .hero .d3, .hero .d4 { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.hero .d1 { animation-delay: 1.35s; }
.hero .d2 { animation-delay: 1.55s; }
.hero .d3 { animation-delay: 1.75s; }
.hero .d4 { animation-delay: 1.9s; animation-duration: 1.2s; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

/* Scène centrale : le téléphone épinglé, une phrase par étape. Sans
   JavaScript, les phrases se lisent en liste au-dessus du premier écran. */
.story { position: relative; background: var(--bg); }
.stage { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; justify-items: center; align-items: center; gap: clamp(12px, 2.4vh, 26px); padding: clamp(18px, 4vh, 44px) var(--gutter) clamp(14px, 3vh, 28px); }
.phrases { display: grid; gap: 28px; text-align: center; max-width: 900px; }
.phrase .kicker { margin: 0 0 6px; }
.phrase h3 { margin: 0 0 8px; font-size: clamp(1.75rem, 4.4vw, 3.4rem); line-height: 1.04; letter-spacing: -.025em; font-weight: 700; }
.phrase .detail { margin: 0 auto; max-width: 48ch; color: var(--text-2); font-size: clamp(1rem, 1.5vw, 1.15rem); }
.stage-phone { height: min(70vh, 640px); display: grid; place-items: center; }
.stage-phone .phone { height: 100%; }
.stage-phone video:not([data-step="0"]), .stage-phone video.only-light { display: none; }
.stage-foot { display: flex; align-items: center; gap: 18px; }
.dots { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); transition: transform .3s, background .3s; }
.dot.chapter-start { margin-left: 10px; }
.dot.is-active { transform: scale(1.6); background: var(--text); }
.js .stage { position: sticky; top: var(--nav-h); height: calc(100svh - var(--nav-h)); }
.js .phrases { gap: 0; }
.js .phrase { grid-area: 1 / 1; align-self: end; opacity: 0; transform: translateY(16px); transition: opacity .45s ease, transform .45s ease; }
.js .phrase.is-active { opacity: 1; transform: none; }
.js .stage-phone { height: 100%; min-height: 0; }
.js .stage-phone video { display: block; opacity: 0; transition: opacity .45s ease; }
.js .stage-phone video.is-active { opacity: 1; }
.js .markers { position: relative; margin-top: calc(-1 * (100svh - var(--nav-h))); pointer-events: none; }
.js .marker { height: 78svh; }
/* L'accueil en apparence claire quand l'appareil le demande. */
.js .stage-phone video.only-light { display: none; }
@media (prefers-color-scheme: light) {
  .js .stage-phone video.only-light { display: block; }
  .js .stage-phone video.only-dark { display: none; }
}

/* Sections */
section { padding: 100px var(--gutter); }
.hero, .story { padding-bottom: 0; }
.story { padding: 0; }
.wrap { max-width: 1180px; margin: 0 auto; }
h2 { font-size: clamp(1.9rem, 4.2vw, 3.2rem); line-height: 1.06; letter-spacing: -.02em; margin: 0 0 12px; font-weight: 700; }
.kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; font-size: .9rem; margin: 0 0 10px; letter-spacing: .06em; text-transform: uppercase; }
.section-lead { color: var(--text-2); font-size: 1.1rem; margin: 0 0 36px; max-width: 54ch; }

/* Services en bento : une carte par service, dans son pastel. */
.services { background: var(--bg-deep); }
.switch { display: inline-flex; padding: 4px; margin: 0 0 22px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); }
.switch button { min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: transparent; color: var(--text-2); font: 600 .95rem Oxanium, sans-serif; cursor: pointer; }
.switch button[aria-selected="true"] { background: var(--action); color: var(--on-action); }
.bento-title { margin: 30px 0 14px; font-size: 1.2rem; }
.js .switch + .bento-title, .js .bento-title { display: none; }
.switch { display: none; }
.js .switch { display: inline-flex; }
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(150px, auto); gap: 14px; }
.bento[hidden] { display: none; }
.tile { --tone: var(--plex); display: flex; flex-direction: column; gap: 16px; min-width: 0; padding: 18px; border-radius: var(--radius); background: color-mix(in srgb, var(--tone) var(--tint-share), var(--card)); border: 1px solid var(--border); }
.tile.l { grid-column: span 2; grid-row: span 2; }
.tile.w { grid-column: span 2; }
.tone-plex { --tone: var(--plex); }
.tone-tautulli { --tone: var(--tautulli); }
.tone-radarr { --tone: var(--radarr); }
.tone-sonarr { --tone: var(--sonarr); }
.tone-seerr { --tone: var(--seerr); }
.tone-maintainerr { --tone: var(--maintainerr); }
.tile-head { display: flex; align-items: center; gap: 12px; }
.mark { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; color: var(--tone); background: color-mix(in srgb, var(--tone) 18%, transparent); }
.mark img, .mark svg { width: 22px; height: 22px; }
.tile-head h3 { margin: 0; font-size: 1.05rem; line-height: 1.2; }
.tile-head p { margin: 2px 0 0; color: var(--tone); font-size: .85rem; font-weight: 600; }
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.row { display: flex; gap: 12px; align-items: center; min-width: 0; }
.poster { width: 54px; height: auto; aspect-ratio: 2 / 3; flex: none; border-radius: 8px; object-fit: cover; background: var(--card-raised); }
.tile.l .rows .poster { width: 72px; }
.row-text { display: grid; gap: 4px; min-width: 0; flex: 1; }
.row-text strong { font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-text > span { color: var(--text-2); font-size: .88rem; }
.meter { display: block; width: 100%; height: 6px; border-radius: 3px; overflow: hidden; }
.meter .track { fill: var(--border); }
.meter .fill { fill: var(--tone); }
.with-icon { display: inline-flex; align-items: center; gap: 6px; }
.with-icon svg { width: 15px; height: 15px; color: var(--tone); }
.count { margin: auto 0 0; display: grid; }
.count strong { font-size: 2.6rem; line-height: 1; color: var(--tone); }
.count span { color: var(--text-2); }
.bars { display: block; width: 100%; height: 54px; margin-top: auto; fill: var(--tone); }
.bars-total { margin: 0; color: var(--text-2); font-size: .9rem; }
.chips { display: flex; gap: 8px; margin-top: 4px; }
.chip { padding: 3px 12px; border-radius: 999px; font-size: .82rem; font-weight: 600; color: var(--text-2); border: 1px solid var(--border-strong); }
.chip-on { color: var(--on-action); background: var(--action); border-color: var(--action); }
.status { justify-self: start; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.status.s-ok { color: var(--success); background: color-mix(in srgb, var(--success) 16%, transparent); }
.status.s-info { color: var(--info); background: color-mix(in srgb, var(--info) 16%, transparent); }
.status.s-wait { color: var(--pending); background: color-mix(in srgb, var(--pending) 16%, transparent); }
.status.s-off { color: var(--unavailable); background: color-mix(in srgb, var(--unavailable) 16%, transparent); }
.shelf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: auto; }
.shelf .poster { width: 100%; }
.tile-text { margin: auto 0 0; color: var(--text-2); }
.marks-note { margin: 22px 0 0; color: var(--muted); font-size: .88rem; }

/* Bande-annonce */
.trailer-wrap { display: grid; justify-items: end; gap: 14px; }
.trailer { width: 100%; aspect-ratio: 16 / 9; margin: 0; border-radius: 26px; overflow: hidden; border: 1px solid var(--border); background: var(--screen); }
.trailer video { width: 100%; height: 100%; object-fit: cover; }

/* Étapes du test */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.step { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.step-num { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px; font-weight: 700; font-size: 1.25rem; color: var(--on-action); background: var(--action); }
.step h3 { margin: 0 0 8px; font-size: 1.35rem; line-height: 1.2; }
.step p { margin: 0 0 18px; color: var(--text-2); }
.step .hint { font-size: .88rem; margin: 12px 0 0; color: var(--muted); }

/* Questions et pied */
#questions { padding-top: 40px; }
.faq { max-width: 820px; margin: 0 auto; }
details { border-bottom: 1px solid var(--border); padding: 18px 4px; }
summary { cursor: pointer; font-weight: 600; font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; min-height: 32px; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-size: 1.4rem; line-height: 1; transition: transform .25s; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--text-2); margin: 12px 0 0; }
footer { padding: 50px var(--gutter) 60px; border-top: 1px solid var(--border); color: var(--muted); font-size: .92rem; background: var(--bg-deep); }
footer .wrap { display: grid; gap: 16px; }
.footer-logo { height: 30px; color: var(--text); }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer nav a { color: var(--muted); min-height: 32px; display: inline-flex; align-items: center; }
footer nav a:hover { color: var(--text); }
footer p { margin: 0; }

/* Apparitions au défilement, en cascade par .d0 à .d3. */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js [data-reveal].visible { opacity: 1; transform: none; }
.js .d1[data-reveal] { transition-delay: 90ms; }
.js .d2[data-reveal] { transition-delay: 180ms; }

@media (max-width: 960px) {
  .nav-links > a:not(.btn) { display: none; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile.l { grid-row: span 1; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  section { padding: 72px var(--gutter); }
  .nav-links .btn { display: none; }
  .logo-h { height: 22px; }
  .hero-actions .btn { width: 100%; }
  .hero-actions { width: 100%; max-width: 340px; }
  .tile.l, .tile.w { grid-column: span 2; }
  .shelf { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .js .stage-phone { max-height: 56svh; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .neon-dot, .neon-letter, .neon-chevron, .fringe, .neon-over { animation: none; }
  .neon-dot, .neon-letter, .neon-chevron { opacity: 1; }
  .neon-over { opacity: 0; }
  .fringe-o { transform: translateX(-2.1px); }
  .fringe-c { transform: translateX(2.1px); }
  .hero .d1, .hero .d2, .hero .d3, .hero .d4 { animation: none; }
  .js .phrase, .js .stage-phone video, .dot { transition: none; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}
