Files
bobinoo/src/index.css
T
2026-11-29 10:36:16 +00:00

310 lines
8.5 KiB
CSS

@import 'tailwindcss';
/*
* Thème Bobinoo « Encre » : blanc pur et noir (ou noir profond et blanc en sombre), une seule touche
* de vert d'eau pour les actions. Minimaliste : peu de cartes, des filets fins, coins droits.
* Police : Epilogue (embarquée). Seul élément décoratif gardé : le billet « Reprendre ».
*/
@theme {
--color-bg: #090909;
--color-surface: #121212;
--color-surface-2: #1b1b1b;
--color-line: #2b2b2b;
--color-line-strong: #424242;
--color-ink: #f2f2f0;
--color-ink-2: #c4c4c4;
--color-ink-3: #989898;
--color-accent: #53bfb6;
--color-accent-fill: #53bfb6;
--color-on-accent: #062b28;
--color-danger: #f97066;
--color-on-danger: #2b0a06;
/* Voile sombre derrière les fenêtres (identique dans toutes les apparences) */
--color-scrim: rgb(0 0 0 / 0.7);
--font-sans: 'Epilogue Variable', 'Epilogue', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
/* Coins droits partout (les classes rounded-xl / 2xl existantes suivent) ; affiches à peine arrondies */
--radius-sm: 0.125rem;
--radius-md: 0.125rem;
--radius-lg: 0.125rem;
--radius-xl: 0.125rem;
--radius-2xl: 0.125rem;
--radius-3xl: 0.125rem;
}
@layer base {
html,
body,
#root {
min-height: 100%;
background: var(--color-bg);
color: var(--color-ink);
color-scheme: dark;
}
body {
font-family: var(--font-sans);
font-synthesis: none;
-webkit-font-smoothing: antialiased;
-webkit-tap-highlight-color: transparent;
overscroll-behavior-y: none;
}
h1,
h2,
h3 {
font-weight: 700;
letter-spacing: -0.01em;
}
/* Évite le zoom automatique d'iOS sur les champs (police >= 16px) */
input,
select,
textarea {
font-size: 16px;
}
}
/* Écrans tactiles : iOS zoome sur tout champ en dessous de 16px (et reste zoomé ensuite).
Hors couche et prioritaire : aucune classe de taille (text-sm…) ne peut le faire revenir. */
@media (pointer: coarse) {
input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='file']),
select,
textarea {
font-size: 16px !important;
}
}
@layer base {
button {
cursor: pointer;
}
::selection {
background: var(--color-accent-fill);
color: var(--color-on-accent);
}
}
/*
* Apparences (thèmes de fond). Le bloc @theme ci-dessus reste la palette SOMBRE
* par défaut (utilitaires Tailwind bg-bg/text-ink/border-line), et « dark » est
* donc l'apparence par défaut. On redéfinit ici UNIQUEMENT les jetons de palette
* pour chaque apparence (l'accent compris).
*/
:root[data-theme='light'] {
--color-bg: #fefdfb;
--color-surface: #fefdfb;
--color-surface-2: #f4f3f1;
--color-line: #dbdbd8;
--color-line-strong: #bebebb;
--color-ink: #0d0d0d;
--color-ink-2: #383838;
--color-ink-3: #525252;
--color-accent: #00746d;
--color-accent-fill: #00746d;
--color-on-accent: #ffffff;
--color-danger: #b42318;
--color-on-danger: #ffffff;
color-scheme: light;
}
:root[data-theme='dark'] {
--color-bg: #090909;
--color-surface: #121212;
--color-surface-2: #1b1b1b;
--color-line: #2b2b2b;
--color-line-strong: #424242;
--color-ink: #f2f2f0;
--color-ink-2: #c4c4c4;
--color-ink-3: #989898;
--color-accent: #53bfb6;
--color-accent-fill: #53bfb6;
--color-on-accent: #062b28;
--color-danger: #f97066;
--color-on-danger: #2b0a06;
color-scheme: dark;
}
/* Anti-flash : avant que le JS ne pose data-theme, un utilisateur en préférence
claire ne doit pas voir la palette sombre le temps d'une frame. */
@media (prefers-color-scheme: light) {
:root:not([data-theme]) {
--color-bg: #fefdfb;
--color-surface: #fefdfb;
--color-surface-2: #f4f3f1;
--color-line: #dbdbd8;
--color-line-strong: #bebebb;
--color-ink: #0d0d0d;
--color-ink-2: #383838;
--color-ink-3: #525252;
--color-accent: #00746d;
--color-accent-fill: #00746d;
--color-on-accent: #ffffff;
--color-danger: #b42318;
--color-on-danger: #ffffff;
--color-danger: #b42318;
--color-on-danger: #ffffff;
color-scheme: light;
}
}
/* Petit libellé (champs, chiffres clés) : texte normal, pas de capitales espacées */
@utility eyebrow {
font-size: 13px;
font-weight: 500;
line-height: 1.3;
color: var(--color-ink-3);
}
/* Code d'épisode : « S1 É19 », chiffres alignés */
@utility code {
font-weight: 500;
font-variant-numeric: tabular-nums;
}
@layer components {
.field {
@apply w-full rounded-xl border border-line bg-surface px-3.5 py-2.5 text-ink placeholder:text-ink-3 outline-none transition-colors focus:border-accent;
}
.label {
@apply eyebrow mb-2 block;
}
.chip {
@apply inline-flex shrink-0 items-center gap-1.5 rounded-md border border-line px-3.5 py-1.5 text-sm text-ink-2 transition-colors active:scale-[0.97];
}
.chip-on {
@apply border-ink bg-ink text-bg;
}
.btn {
@apply inline-flex items-center justify-center gap-2 rounded-sm border border-transparent px-5 py-2.5 text-[15px] font-semibold transition-colors active:scale-[0.98] disabled:opacity-40;
}
.btn-primary {
@apply bg-accent-fill text-on-accent;
}
.btn-light {
@apply bg-ink text-bg;
}
.btn-ghost {
@apply border border-line-strong text-ink hover:border-ink-3;
}
.card {
@apply rounded-2xl border border-line bg-surface;
}
/* Progression des épisodes : une fine barre découpée, un segment par épisode (regroupés au-delà de 40) */
.film-strip {
height: 6px;
}
.film-strip i {
display: block;
}
/* Billet « Reprendre » : talon détachable (pointillés + deux encoches) */
.ticket-stub {
position: relative;
border-inline-start: 1.5px dashed var(--color-line-strong);
}
.ticket-stub::before,
.ticket-stub::after {
content: '';
position: absolute;
inset-inline-start: -7px;
width: 12px;
height: 12px;
border-radius: 9999px;
background: var(--color-bg);
border: 1px solid var(--color-line);
}
.ticket-stub::before {
top: -7px;
}
.ticket-stub::after {
bottom: -7px;
}
.no-scrollbar {
scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
display: none;
}
}
.safe-top {
padding-top: env(safe-area-inset-top);
}
/* Couche « base » : une marge du bas explicite (pb-16, pb-40…) passe devant, sinon elle était annulée
et le bas des fenêtres restait collé au bord (caché sous la barre des tâches ou la barre d'accueil). */
@layer base {
.safe-bottom {
padding-bottom: env(safe-area-inset-bottom);
}
/* Navigation au clavier : anneau visible (seulement au clavier, pas au toucher) */
:focus-visible {
outline: 2px solid var(--color-accent);
outline-offset: 2px;
}
}
/*
* Fenêtres plein écran (fiche, profil, recherche…) : figées à l'écran.
* Seul le contenu défile, verticalement ; ni rebond qui fait bouger la fiche, ni glissement de côté.
*/
@layer components {
.sheet {
position: fixed;
inset: 0;
z-index: 50;
display: flex;
flex-direction: column;
overflow: hidden;
overscroll-behavior: none;
background: var(--color-bg);
}
.sheet-scroll {
flex: 1;
min-height: 0;
overflow-x: hidden;
overflow-y: auto;
overscroll-behavior: contain;
touch-action: pan-y;
-webkit-overflow-scrolling: touch;
}
/* Carrousels horizontaux à l'intérieur d'une fenêtre */
.sheet-scroll .no-scrollbar {
touch-action: pan-x pan-y;
}
}
/* Apparition douce des feuilles (formulaire, recherche) — pas de fondu de couleur */
@keyframes sheet-in {
from {
transform: translateY(16px);
opacity: 0;
}
to {
transform: none;
opacity: 1;
}
}
.sheet-in {
animation: sheet-in 0.22s ease-out;
}
@media (prefers-reduced-motion: reduce) {
.sheet-in {
animation: none;
}
}
/*
* Grande image de fond d'une fiche (façon Letterboxd / TV Time) : elle se fond dans le fond du thème
* en bas (et sur les côtés sur ordinateur) grâce à un masque de transparence, sans couleur ajoutée.
*/
.hero-fade {
-webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 100%);
mask-image: linear-gradient(to bottom, #000 45%, transparent 100%);
}
@media (min-width: 64rem) {
.hero-fade {
-webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 100%), linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%);
-webkit-mask-composite: source-in;
mask-image: linear-gradient(to bottom, #000 40%, transparent 100%), linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%);
mask-composite: intersect;
}
}