:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #121216;
  color: #f8f6f4;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: radial-gradient(circle at 78% 0%, #30242a 0, #121216 35rem);
}

button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
[hidden] { display: none !important; }

.app-shell { width: min(100%, 720px); min-height: 100vh; margin: 0 auto; padding: 24px 20px 42px; }
.landing { min-height: calc(100vh - 66px); display: flex; flex-direction: column; justify-content: center; }
.brand-mark { display: grid; width: 52px; height: 52px; margin-bottom: 28px; place-items: center; border-radius: 17px; background: #ff6b5e; color: #171318; font-size: 28px; font-weight: 900; transform: rotate(-8deg); }
.eyebrow { margin: 0 0 8px; color: #ff8b80; font-size: 11px; font-weight: 800; letter-spacing: .13em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(48px, 14vw, 68px); line-height: .94; letter-spacing: -.07em; }
.baseline { max-width: 310px; margin-bottom: 42px; color: #c9c3c1; font-size: 19px; line-height: 1.4; letter-spacing: -.02em; }
.landing-actions { display: grid; gap: 12px; }
.button { display: flex; min-height: 56px; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 16px; padding: 12px 20px; font-weight: 800; text-align: center; text-decoration: none; transition: transform .15s ease, background .15s ease; }
.button:active, .back-button:active { transform: scale(.98); }
.button-primary { background: #ff6b5e; color: #21171a; box-shadow: 0 10px 28px #ff6b5e33; }
.button-secondary { border-color: #4b4548; background: #211f24; color: #f8f6f4; }
.already-file { display: block; width: max-content; margin: 16px auto 0; color: #bcb4b6; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.privacy-note { margin: 24px 4px 0; color: #958e91; font-size: 13px; line-height: 1.5; }
.privacy-note span { color: #ff6b5e; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; clip-path: inset(50%); }

.results-header { display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: start; margin: 12px 0 26px; }
.back-button { width: 38px; height: 38px; border: 1px solid #474146; border-radius: 12px; background: #211f24; color: #fff; font-size: 22px; line-height: 1; }
.results-header h1 { margin-bottom: 6px; font-size: 31px; letter-spacing: -.045em; overflow-wrap: anywhere; }
.period { margin: 0; color: #aca5a7; font-size: 13px; line-height: 1.35; }
.message-count { display: grid; margin: 2px 0 0; color: #958e91; font-size: 11px; text-align: right; }
.message-count strong { color: #f8f6f4; font-size: 23px; line-height: 1; letter-spacing: -.04em; }
.coverage-note { margin: -10px 0 20px; padding: 12px 14px; border: 1px solid #765946; border-radius: 12px; background: #332821; color: #ebc8a5; font-size: 13px; line-height: 1.4; }
.stats-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-card, .author-card { border: 1px solid #383338; border-radius: 18px; background: #211f24; box-shadow: 0 12px 26px #00000014; }
.stat-card { min-height: 126px; padding: 17px; }
.stat-label { margin-bottom: 12px; color: #aaa2a5; font-size: 12px; font-weight: 700; }
.stat-value { display: block; font-size: 31px; line-height: 1; letter-spacing: -.06em; }
.stat-detail { margin: 9px 0 0; color: #c7bfc1; font-size: 12px; line-height: 1.35; }
.chart-card { grid-column: 1 / -1; min-height: 182px; }
.hourly-chart { display: grid; height: 117px; grid-template-columns: repeat(24, 1fr); align-items: end; gap: 3px; }
.chart-column { display: grid; height: 100%; grid-template-rows: 1fr 15px; align-items: end; min-width: 0; }
.chart-fill { display: block; width: 100%; min-height: 3px; align-self: end; border-radius: 4px 4px 1px 1px; background: #ff6b5e; }
.chart-hour { display: block; color: #8c8487; font-size: 8px; line-height: 15px; text-align: center; }
.level-0 { height: 3px; opacity: .22; }.level-1 { height: 5%; }.level-2 { height: 10%; }.level-3 { height: 15%; }.level-4 { height: 20%; }.level-5 { height: 25%; }.level-6 { height: 30%; }.level-7 { height: 35%; }.level-8 { height: 40%; }.level-9 { height: 45%; }.level-10 { height: 50%; }.level-11 { height: 55%; }.level-12 { height: 60%; }.level-13 { height: 65%; }.level-14 { height: 70%; }.level-15 { height: 75%; }.level-16 { height: 80%; }.level-17 { height: 85%; }.level-18 { height: 90%; }.level-19 { height: 95%; }.level-20 { height: 100%; }

.authors-section { margin-top: 38px; }
.section-heading h2 { margin-bottom: 16px; font-size: 25px; line-height: 1.05; letter-spacing: -.05em; }
.author-list { display: grid; gap: 12px; }
.author-card { padding: 18px; }
.author-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.author-heading h3 { margin: 0; font-size: 20px; letter-spacing: -.035em; overflow-wrap: anywhere; }
.author-share { flex: none; color: #ff8b80; font-size: 14px; font-weight: 800; }
.author-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 12px; margin: 0; }
.author-fact dt { margin-bottom: 4px; color: #958e91; font-size: 11px; }
.author-fact dd { margin: 0; font-size: 15px; font-weight: 750; letter-spacing: -.02em; }
.emoji-line { margin: 19px 0 0; padding-top: 14px; border-top: 1px solid #39343a; color: #f1dfd8; font-size: 15px; min-height: 35px; }
.media-note { margin: 10px 0 0; color: #aaa2a5; font-size: 12px; }

.error-panel { max-width: 390px; margin: 22vh auto 0; text-align: center; }
.error-icon { display: grid; width: 54px; height: 54px; margin: 0 auto 22px; place-items: center; border-radius: 50%; background: #452b2a; color: #ff8b80; font-size: 28px; font-weight: 900; }
.error-panel h2 { margin-bottom: 12px; font-size: 28px; letter-spacing: -.05em; }
.error-panel p { margin-bottom: 28px; color: #b7afb1; line-height: 1.5; }

.tutorial { min-height: calc(100vh - 66px); padding-bottom: 104px; }
.tutorial-content { min-height: calc(100vh - 170px); display: flex; flex-direction: column; padding-top: 15px; }
.tutorial-platform { margin: 3px 0 12px; color: #ff8b80; font-size: 11px; font-weight: 800; letter-spacing: .13em; }
.tutorial-step-number { margin: 0 0 8px; color: #aaa2a5; font-size: 14px; font-weight: 750; }
.tutorial h1 { margin-bottom: 12px; font-size: clamp(30px, 9vw, 42px); line-height: 1; letter-spacing: -.06em; }
.tutorial-instruction { max-width: 34ch; margin: 0 0 20px; color: #c9c3c1; font-size: 17px; line-height: 1.4; }
.tutorial-visual { position: relative; display: grid; min-height: 360px; flex: 1; overflow: hidden; place-items: center; border: 1px solid #3d373b; border-radius: 20px; background: #1a191d; }
.tutorial-visual img { display: block; width: 100%; height: auto; min-height: 360px; object-fit: cover; }
.tutorial-visual.is-fallback::after { content: "L'illustration sera disponible ici."; padding: 24px; color: #958e91; font-size: 14px; text-align: center; }
.tutorial-visual.is-fallback img, .tutorial-visual.is-fallback .tap-ring { display: none; }
.tap-anchor { position: relative; display: block; line-height: 0; }
.tap-ring { position: absolute; z-index: 1; width: 44px; height: 44px; border: 3px solid #ff6b5e; border-radius: 50%; box-shadow: 0 0 0 7px #ff6b5e33; pointer-events: none; transform: translate(-50%, -50%); animation: tutorial-pulse 1.5s ease-out infinite; }
@keyframes tutorial-pulse { 0% { transform: translate(-50%, -50%) scale(.76); opacity: 1; } 72% { transform: translate(-50%, -50%) scale(1.16); opacity: .8; } 100% { transform: translate(-50%, -50%) scale(1.16); opacity: 0; } }
.tutorial-actions { display: grid; gap: 10px; margin-top: 18px; }
.tutorial-actions .button { width: 100%; }
.tutorial-next { min-height: 46px; border: 0; background: transparent; color: #d4ccce; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }
.tutorial-bottom-bar { position: fixed; z-index: 4; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; width: min(100%, 720px); margin: 0 auto; padding: 12px 20px max(14px, env(safe-area-inset-bottom)); border-top: 1px solid #3c363a; background: #17161aeF; backdrop-filter: blur(12px); }
.tutorial-progress { display: flex; align-items: center; gap: 7px; }
.tutorial-progress span { display: block; width: 7px; height: 7px; border-radius: 50%; background: #5a5357; }
.tutorial-progress span[aria-current="step"] { width: 21px; border-radius: 5px; background: #ff6b5e; }
.tutorial-back, .tutorial-file-link { border: 0; background: transparent; color: #e9e3e3; font-size: 14px; font-weight: 750; }
.tutorial-file-link { color: #ff8b80; text-decoration: underline; text-underline-offset: 3px; }
.tutorial-back { grid-column: 1; justify-self: start; }
.tutorial-file-link { grid-column: 2; grid-row: 1 / span 2; align-self: center; justify-self: end; }
.tutorial-desktop-url { margin: 12px 0 26px; color: #ff8b80; font-size: clamp(34px, 11vw, 52px); font-weight: 900; letter-spacing: -.07em; }
.tutorial-desktop-note { margin-top: auto; padding: 18px; border: 1px solid #3d373b; border-radius: 18px; background: #211f24; color: #c9c3c1; line-height: 1.45; }

@media (min-width: 560px) {
  .app-shell { padding-top: 44px; }
  .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chart-card { grid-column: span 2; }
  .author-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tutorial-bottom-bar { right: max(20px, calc((100vw - 720px) / 2)); left: max(20px, calc((100vw - 720px) / 2)); width: auto; border-right: 1px solid #3c363a; border-left: 1px solid #3c363a; border-radius: 18px 18px 0 0; }
}
