/* Famille « temps » — feuille autonome, pensée d'abord pour le mobile */
:root { --ink: #1d1538; --mute: #6b6488; --dim: #9a94b5; --line: #e9e6f7; --card: #fff; --bg: #faf8ff; --v: #7c3aed; --v2: #a855f7; --ok: #059669; --red: #dc2626; --amber: #d97706; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
html.tm-noscroll, html.tm-noscroll body { overflow: hidden; }
body.tm, body.tm[data-mts-cluster="studio"] { margin: 0; font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: var(--ink); background: radial-gradient(900px 500px at 0% -10%, rgba(124, 58, 237, .10), transparent 60%), radial-gradient(700px 400px at 100% 0%, rgba(14, 165, 233, .08), transparent 60%), var(--bg) !important; min-height: 100vh; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { opacity: .45; cursor: default; }
.hidden { display: none !important; }
aside.sidebar { display: none !important; }
header.sticky { position: relative !important; }
.mts-cluster-subnav { position: relative !important; top: auto !important; }

/* en-tête */
body.tm header.tm-header.sticky { background: rgba(255, 255, 255, .94) !important; border-bottom: 1px solid var(--line) !important; }
.tm-header-in { max-width: 1100px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tm-logo { font-weight: 900; font-size: 20px; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.tm-logo span, .tm-header .mts-brand-suite { color: var(--v) !important; }
.tm-header .mts-brand-word { color: var(--ink) !important; }
.tm-login { border: 0; background: var(--ink); color: #fff; border-radius: 12px; padding: 9px 14px; font-size: 11px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
#userProfile { display: flex; align-items: center; gap: 10px; }
#userProfile.hidden { display: none !important; }
#userName { margin: 0; font-size: 11px; font-weight: 800; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#userStatus { margin: 0; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; color: var(--mute); }
.tm-icon { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--mute); }

.tm-main { max-width: 980px; margin: 0 auto; padding: 12px 14px 60px; }
.tm-hero { text-align: center; padding: 14px 4px 6px; }
.tm-hero h1 { margin: 0; font-size: clamp(26px, 6.4vw, 42px); line-height: 1.08; letter-spacing: -.03em; font-weight: 900; }
.tm-hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--v), #0ea5e9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tm-hero p { margin: 8px auto 0; max-width: 620px; color: var(--mute); font-size: 15px; line-height: 1.5; }
.tm-crumb { font-size: 12px; color: var(--dim); margin-bottom: 6px; }
.tm-crumb a { color: var(--mute); }

/* onglets entre les outils */
.tm-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 14px -14px 12px; padding: 2px 14px; justify-content: safe center; }
.tm-tabs::-webkit-scrollbar { display: none; }
.tm-tabs a { flex: none; text-decoration: none; color: var(--mute); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 13px; font-size: 13px; font-weight: 800; white-space: nowrap; }
.tm-tabs a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tm-tabs a.obs { color: var(--v); border-color: #ddd0ff; }

/* carte de l'outil */
.tm-card { background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 14px; box-shadow: 0 18px 50px rgba(40, 20, 90, .08); }
.tm-screen { position: relative; border-radius: 20px; background: linear-gradient(160deg, #1b1240, #0f0a24); color: #fff; text-align: center; padding: 22px 12px 18px; overflow: hidden; min-height: 230px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tm-lbl { margin: 0 0 4px; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #c4b5fd; }
.tm-big { font-size: clamp(64px, 19vw, 150px); font-weight: 900; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tm-end { margin: 8px 0 0; min-height: 20px; font-size: 14px; font-weight: 700; color: #a5a0c8; }
.tm-bar { width: min(420px, 86%); height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .12); margin-top: 14px; overflow: hidden; }
.tm-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, #a78bfa, #38bdf8); transition: width .25s linear; }
.tm-screen.tm-urgent .tm-big { color: #fca5a5; }
.tm-screen.tm-done { animation: tmFlash 1s ease-in-out infinite; }
@keyframes tmFlash { 0%, 100% { background: linear-gradient(160deg, #1b1240, #0f0a24); } 50% { background: linear-gradient(160deg, #7c3aed, #db2777); } }
@media (prefers-reduced-motion: reduce) { .tm-screen.tm-done { animation: none; background: linear-gradient(160deg, #7c3aed, #db2777); } }
.tm-stop { margin-top: 14px; border: 0; border-radius: 14px; padding: 12px 20px; background: #fff; color: var(--ink); font-weight: 900; font-size: 15px; }
.tm-fsx { display: none; position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .08); color: #fff; font-size: 18px; }

/* plein écran (natif ou repli) */
.tm-screen:fullscreen, .tm-screen.tm-max { border-radius: 0; background: #07051a; justify-content: center; }
.tm-screen:-webkit-full-screen { border-radius: 0; background: #07051a; width: 100%; height: 100%; }
.tm-screen.tm-max { position: fixed; inset: 0; z-index: 99999; }
.tm-screen:fullscreen .tm-fsx, .tm-screen.tm-max .tm-fsx { display: block; }
.tm-screen:fullscreen .tm-big, .tm-screen.tm-max .tm-big { font-size: min(26vw, 48vh); }
.tm-screen:fullscreen .tm-lbl, .tm-screen.tm-max .tm-lbl, .tm-screen:fullscreen .tm-end, .tm-screen.tm-max .tm-end { font-size: clamp(16px, 2.6vw, 30px); }
.tm-screen:fullscreen .tm-bar, .tm-screen.tm-max .tm-bar { width: 70%; height: 10px; }

/* commandes */
.tm-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.tm-go { flex: 1 1 200px; max-width: 340px; border: 0; border-radius: 16px; padding: 15px 18px; font-size: 18px; font-weight: 900; color: #fff; background: linear-gradient(90deg, var(--v), var(--v2)); box-shadow: 0 10px 24px rgba(124, 58, 237, .28); }
.tm-go.pause { background: var(--ink); box-shadow: none; }
.tm-btn { border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 12px 15px; font-weight: 800; font-size: 14px; color: var(--ink); }
.tm-btn:hover { border-color: #cfc3fb; }
.tm-btn.sq { width: 52px; padding: 12px 0; font-size: 18px; }
.tm-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }
.tm-chips button, .tm-recent button { border: 1px solid var(--line); background: #faf8ff; border-radius: 12px; padding: 8px 12px; font-weight: 800; font-size: 13px; color: var(--mute); }
.tm-chips button.on { background: #f1ebff; border-color: var(--v); color: var(--v); }
.tm-recent { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; margin-top: 8px; font-size: 12px; color: var(--dim); min-height: 0; }
.tm-recent:empty { display: none; }
.tm-set { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 14px; }
.tm-set label { display: flex; align-items: center; gap: 4px; font-weight: 800; color: var(--mute); font-size: 13px; }
.tm-set input { width: 64px; text-align: center; font-size: 24px; font-weight: 900; border: 1.5px solid var(--line); border-radius: 12px; padding: 7px 4px; background: #fff; font-variant-numeric: tabular-nums; }
.tm-set input:focus { outline: none; border-color: var(--v); }
.tm-set input:disabled { background: #f6f4fc; color: var(--dim); }
.tm-opts { display: flex; flex-wrap: wrap; gap: 10px 14px; justify-content: center; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--mute); font-weight: 700; }
.tm-opts select, .tm-field select { border: 1px solid var(--line); border-radius: 10px; padding: 7px 8px; background: #fff; font-weight: 700; }
.tm-opts label { display: inline-flex; align-items: center; gap: 6px; }
.tm-opts input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--v); }
.tm-link { border: 0; background: none; color: var(--v); font-weight: 800; padding: 4px; }
.tm-kbd { text-align: center; font-size: 12px; color: var(--dim); margin: 10px 0 0; }
.tm-kbd kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; background: #fff; font-family: inherit; font-size: 11px; color: var(--mute); }

/* chronomètre */
.tm-lapnow { margin: 8px 0 0; min-height: 20px; font-size: 15px; font-weight: 700; color: #a5a0c8; font-variant-numeric: tabular-nums; }
.tm-laps { margin-top: 14px; }
.tm-laps table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 15px; }
.tm-laps th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); padding: 6px 10px; }
.tm-laps td { padding: 9px 10px; border-top: 1px solid var(--line); font-weight: 700; }
.tm-laps td:first-child { color: var(--dim); width: 60px; }
.tm-laps tr.best td { color: var(--ok); }
.tm-laps tr.worst td { color: var(--red); }
.tm-laps .scroll { max-height: 320px; overflow-y: auto; }
.tm-laps .acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }

/* compte à rebours vers une date */
.tm-dhms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: min(640px, 100%); margin-top: 6px; }
.tm-dhms div { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1); border-radius: 16px; padding: 12px 4px 8px; }
.tm-dhms b { display: block; font-size: clamp(34px, 10vw, 76px); font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.tm-dhms small { display: block; margin-top: 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: #a5a0c8; }
.tm-screen:fullscreen .tm-dhms, .tm-screen.tm-max .tm-dhms { width: 92%; gap: 2vw; }
.tm-screen:fullscreen .tm-dhms b, .tm-screen.tm-max .tm-dhms b { font-size: min(13vw, 30vh); }
.tm-form { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 14px; }
@media (min-width: 640px) { .tm-form { grid-template-columns: 2fr 1.3fr 1fr; } }
.tm-field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 800; color: var(--mute); }
.tm-field input { border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 12px; font-size: 16px; font-weight: 700; background: #fff; min-width: 0; }
.tm-field input:focus { outline: none; border-color: var(--v); }
.tm-events { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }
.tm-events a { text-decoration: none; border: 1px solid var(--line); background: #faf8ff; border-radius: 12px; padding: 8px 12px; font-weight: 800; font-size: 13px; color: var(--mute); }
.tm-events a.on { border-color: var(--v); color: var(--v); background: #f1ebff; }
.tm-saved { margin-top: 18px; }
.tm-saved h2, .tm-side h2 { font-size: 16px; margin: 0 0 8px; font-weight: 900; }
.tm-sv { display: flex; gap: 6px; margin-bottom: 6px; }
.tm-sv button:first-child { flex: 1; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 10px 12px; min-width: 0; }
.tm-sv b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-sv small { color: var(--dim); font-weight: 700; font-size: 12px; }
.tm-sv .x { border: 1px solid var(--line); background: #fff; border-radius: 14px; width: 44px; color: var(--dim); }
.tm-empty { color: var(--dim); font-size: 13px; margin: 0; }

/* horloge */
.tm-date { margin: 10px 0 0; font-size: clamp(15px, 3.6vw, 22px); font-weight: 700; color: #d6d2f0; }
.tm-date::first-letter { text-transform: uppercase; }
.tm-city { margin: 0 0 6px; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #c4b5fd; }
.tm-analog { display: none; width: min(300px, 70vw); height: auto; }
.tm-screen.tm-ana .tm-analog { display: block; }
.tm-screen.tm-ana .tm-big { display: none; }
.tm-screen:fullscreen .tm-analog, .tm-screen.tm-max .tm-analog { width: min(80vh, 80vw); }
.tm-screen:fullscreen .tm-date, .tm-screen.tm-max .tm-date { font-size: clamp(18px, 3vw, 36px); }
.tm-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tm-seg button { border: 0; background: #fff; padding: 8px 12px; font-weight: 800; color: var(--mute); }
.tm-seg button.on { background: var(--ink); color: #fff; }
.tm-prec { text-align: center; font-size: 13px; color: var(--mute); margin: 12px 0 0; min-height: 18px; }
.tm-world { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 16px; }
.tm-world div { border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; background: #faf8ff; }
.tm-world small { display: block; font-size: 12px; font-weight: 800; color: var(--mute); }
.tm-world b { font-size: 24px; font-weight: 900; font-variant-numeric: tabular-nums; }

/* Pomodoro */
.tm-phases { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.tm-phases button { border: 1px solid var(--line); background: #faf8ff; border-radius: 999px; padding: 8px 14px; font-weight: 800; font-size: 13px; color: var(--mute); }
.tm-phases button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
body[data-ph="short"] .tm-screen:not(.tm-done) { background: linear-gradient(160deg, #064e3b, #022c22); }
body[data-ph="long"] .tm-screen:not(.tm-done) { background: linear-gradient(160deg, #0c4a6e, #082f49); }
.tm-dots { display: flex; gap: 8px; margin-top: 12px; min-height: 12px; }
.tm-dots i { width: 12px; height: 12px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.tm-dots i.ok { background: #f87171; }
.tm-dots i.cur { background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); }
.tm-task { margin: 8px 0 0; min-height: 20px; font-size: 15px; font-weight: 700; color: #e9e5ff; max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-taskin { width: 100%; margin-top: 12px; border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 15px; font-weight: 600; }
.tm-taskin:focus { outline: none; border-color: var(--v); }
.tm-settings { margin-top: 12px; border: 1px solid var(--line); border-radius: 16px; padding: 4px 14px; }
.tm-settings summary { cursor: pointer; font-weight: 800; padding: 10px 0; color: var(--mute); font-size: 14px; }
.tm-settings .grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 4px 0 14px; }
@media (min-width: 640px) { .tm-settings .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tm-stats { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 14px; }
@media (min-width: 640px) { .tm-stats { grid-template-columns: 1fr 1fr; } }
.tm-stat { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; background: #faf8ff; }
.tm-stat p { margin: 0; font-weight: 800; }
.tm-stat p + p { margin-top: 4px; color: var(--mute); font-size: 13px; }
.tm-week { display: flex; gap: 8px; align-items: flex-end; height: 74px; }
.tm-week span { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.tm-week i { display: block; width: 100%; max-width: 26px; min-height: 3px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, #f87171, #ef4444); }
.tm-week small { font-size: 11px; font-weight: 800; color: var(--dim); text-transform: uppercase; }

/* bandeau Studio / OBS */
.tm-banner { display: flex; align-items: center; gap: 12px; border-radius: 18px; padding: 12px 14px; margin: 16px 0 0; background: linear-gradient(90deg, #f5f0ff, #eef6ff); border: 1.5px solid #e4dcff; text-decoration: none; color: inherit; }
.tm-banner .ic { font-size: 26px; flex: none; }
.tm-banner .tx { flex: 1; min-width: 0; font-size: 13px; color: var(--mute); }
.tm-banner .tx b { display: block; color: var(--ink); font-size: 14px; }
.tm-banner .b { flex: none; border-radius: 12px; padding: 9px 12px; font-size: 12px; font-weight: 900; background: var(--v); color: #fff; }

/* contenu éditorial */
.tm-content { max-width: 820px; margin: 46px auto 0; font-size: 15px; color: #3b3355; }
.tm-content h2 { font-size: clamp(20px, 4.6vw, 25px); color: var(--ink); margin: 32px 0 10px; line-height: 1.2; font-weight: 900; }
.tm-content p, .tm-content li { line-height: 1.7; }
.tm-content table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; border-radius: 14px; overflow: hidden; }
.tm-content th, .tm-content td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.tm-content th { background: #f6f3ff; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--mute); }
.tm-content details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 8px 0; }
.tm-content summary { font-weight: 800; cursor: pointer; color: var(--ink); }
.tm-content a { color: var(--v); font-weight: 700; }
.tm-more { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tm-more a { text-decoration: none; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 7px 11px; font-size: 13px; }
.tm-footer { text-align: center; color: var(--dim); font-size: 12px; padding: 30px 14px 30px; }
.tm-footer a { color: var(--mute); }
#tmToast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(14px); background: var(--ink); color: #fff; font-weight: 800; font-size: 13px; padding: 11px 16px; border-radius: 14px; opacity: 0; pointer-events: none; transition: all .2s; z-index: 100000; max-width: 92vw; text-align: center; }
#tmToast.on { opacity: 1; transform: translateX(-50%); }
