
/* =========================================================
   TRINI WRAPPED — DESIGN SYSTEM
   Inspiré de l'identité visuelle de TriniJobs
   ========================================================= */

:root {
  --bg: #05070d;
  --panel: #0b1220;
  --panel2: #101a2e;
  --line: #1b2a47;
  --text: #e6ecf8;
  --muted: #8a99b8;
  --accent: #2f6fed;
  --accent2: #1d4ab8;
  --r: 14px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  min-height: 100%;
  background: var(--bg);
  color-scheme: dark;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  background: var(--bg);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overscroll-behavior-y: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1000px 520px at 50% -160px, #12254d, transparent 70%),
    radial-gradient(700px 420px at 100% 100%, #0a1836, transparent 70%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

/* =========================================================
   STRUCTURE GÉNÉRALE
   ========================================================= */

.wrap {
  width: min(100% - 32px, 920px);
  margin: 0 auto;
}

.site-header {
  width: min(100% - 32px, 920px);
  min-height: 72px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link {
  color: var(--muted);
  font-size: 13px;
  transition: color .15s;
}

.nav-link:hover {
  color: var(--text);
}

.site-footer {
  width: min(100% - 32px, 920px);
  margin: 48px auto 0;
  padding: 20px 0 28px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.section-block {
  margin-top: 48px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 17px;
}

.section-heading h2 {
  margin: 0;
  font-size: 20px;
}

.section-kicker {
  margin: 0 0 7px;
  color: #8db6ff;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 1.3px;
}

.section-note {
  color: var(--muted);
  font-size: 12px;
}

/* =========================================================
   LOGO ET IDENTITÉ
   ========================================================= */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -.5px;
}

.brand-light {
  color: var(--muted);
  font-weight: 500;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  border-radius: 9px;
  background: var(--accent2);
}

.brand-mark span {
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 4px;
  transform: rotate(45deg);
}

/* =========================================================
   BOUTONS
   ========================================================= */

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 19px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  color: #fff;
  background: var(--accent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

.button:hover {
  background: #4580f5;
  border-color: #4580f5;
}

.button:disabled {
  opacity: .6;
  cursor: default;
}

.button-small {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.button-secondary {
  color: var(--text);
  background: var(--panel);
  border-color: var(--line);
}

.button-secondary:hover {
  background: var(--panel2);
  border-color: var(--accent);
}

/* =========================================================
   PAGE D'ACCUEIL
   ========================================================= */

.public-hero {
  text-align: center;
  padding: 65px 12px 45px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 30px;
  color: #8db6ff;
  background: var(--panel);
  font-size: 12px;
  font-weight: 600;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.public-hero h1 {
  margin: 22px 0 15px;
  font-size: clamp(34px, 6vw, 48px);
  line-height: 1.12;
  letter-spacing: -1.7px;
}

.gradient-text {
  color: #6ea2ff;
}

.hero-lead {
  max-width: 620px;
  margin: auto;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 25px;
}

.hero-footnote {
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
}

.privacy-icon {
  color: #8db6ff;
  margin-right: 5px;
}

/* =========================================================
   SÉLECTION DES APPLICATIONS
   ========================================================= */

.app-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.app-tile {
  position: relative;
  min-height: 82px;
  padding: 17px;
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.app-tile-active {
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.app-tile-active:hover {
  border-color: var(--accent);
  background: var(--panel2);
}

.app-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-size: 20px;
  font-weight: 700;
}

.waze-icon {
  color: #d7efff;
  background: #18395b;
}

.spotify-icon {
  color: #b4f4ce;
  background: #163d32;
}

.strava-icon {
  color: #ffb18e;
  background: #4a2b25;
}

.maps-icon {
  color: #b6c8ff;
  background: #202f56;
}

.app-icon-image {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  object-fit: contain;
  border-radius: 10px;
}

.app-tile-copy {
  display: grid;
  gap: 4px;
}

.app-tile-copy strong {
  font-size: 14px;
}

.app-tile-copy small {
  color: var(--muted);
  font-size: 12px;
}

.tile-arrow {
  margin-left: auto;
  color: #8db6ff;
  font-size: 17px;
}

.available-label,
.soon-label {
  position: absolute;
  top: 9px;
  right: 12px;
  color: #8db6ff;
  font-size: 10px;
}

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

.app-tile-disabled {
  opacity: .6;
  cursor: default;
}

.info-strip {
  margin-top: 22px;
  padding: 17px 19px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
}

.info-strip div {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.info-strip strong {
  color: #8db6ff;
  font-size: 13px;
}

/* =========================================================
   PAGES INTERNES
   ========================================================= */

.page-view {
  padding: 35px 0 35px;
}

.page-back {
  display: inline-block;
  margin-bottom: 20px;
  color: #8db6ff;
  font-size: 14px;
  transition: color .15s;
}

.page-back:hover {
  color: #fff;
}

.page-title {
  margin: 0 0 9px;
  font-size: clamp(27px, 5vw, 36px);
  line-height: 1.2;
  letter-spacing: -.8px;
}

.page-description {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

/* =========================================================
   IMPORT WAZE
   ========================================================= */

.upload-panel,
.result-panel {
  margin-top: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
}

.drop-zone {
  min-height: 190px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  border: 1px dashed #35496c;
  border-radius: 12px;
  background: var(--panel2);
}

.upload-symbol {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 11px;
  color: #fff;
  background: var(--accent2);
  font-size: 22px;
}

.drop-zone strong {
  font-size: 15px;
}

.drop-zone p {
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 12px;
}

.file-input {
  display: none;
}

.file-name {
  margin-top: 12px;
  color: #8db6ff;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.password-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 20px 0;
}

.password-field label {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.password-input {
  width: 100%;
  min-height: 44px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  color: var(--text);
  background: var(--panel2);
  font: inherit;
}

.password-input:focus {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
}

.password-field p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

/* =========================================================
   STATISTIQUES
   ========================================================= */

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.stat-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel2);
}

.stat-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 25px;
  line-height: 1.2;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.wrapped-period {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 17px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel2);
}

.wrapped-period span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
}

.wrapped-period strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 650;
}

.archive-filename {
  margin: 8px 0;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.archive-details {
  margin: 20px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel2);
}

.archive-details summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.archive-details summary:hover {
  color: #8db6ff;
}

.file-list {
  padding-left: 19px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.archive-details .file-list {
  margin-top: 12px;
}

.status-message {
  margin-top: 15px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.status-message.error {
  color: #ff9292;
}

.status-message.success {
  color: #8eddb4;
}

/* =========================================================
   CARTES ET CONTENEURS
   ========================================================= */

.card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 700px) {
  .site-header {
    min-height: 64px;
  }

  .header-actions {
    gap: 12px;
  }

  .site-footer {
    margin-top: 35px;
    flex-direction: column;
    gap: 7px;
  }

  .section-block {
    margin-top: 38px;
  }

  .public-hero {
    padding: 48px 4px 35px;
  }

  .public-hero h1 {
    font-size: 36px;
    letter-spacing: -1.4px;
  }

  .hero-lead {
    font-size: 14px;
  }

  .app-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .app-tile {
    min-height: 76px;
  }

  .info-strip {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .page-view {
    padding-top: 26px;
  }

  .upload-panel,
  .result-panel {
    padding: 16px;
  }

  .result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .stat-card {
    padding: 13px;
  }

  .stat-card strong {
    font-size: 22px;
  }

  .wrapped-period strong {
    font-size: 16px;
  }
}

@media (max-width: 390px) {
  .wrap,
  .site-header,
  .site-footer {
    width: calc(100% - 24px);
  }

  .public-hero h1 {
    font-size: 32px;
  }

  .result-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stat-card strong {
    font-size: 20px;
  }

  .button {
    padding: 0 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* =========================================
   TRINI WRAPPED — MODE STORIES
========================================= */

.tw-player {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: #e6ecf8;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(47, 111, 237, .17), transparent 55%),
    #05070d;
  font-family: inherit;
}

.tw-progress {
  display: flex;
  gap: 5px;
  padding: 14px 16px 8px;
  z-index: 5;
}

.tw-progress-track {
  flex: 1;
  height: 3px;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(230, 236, 248, .2);
}

.tw-progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #e6ecf8;
  transition: width .05s linear;
}

.tw-topbar {
  position: relative;
  z-index: 6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
}

.tw-top-label,
.tw-bottom-brand {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
}

.tw-top-actions {
  display: flex;
  gap: 9px;
}

.tw-icon-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(230, 236, 248, .2);
  border-radius: 50%;
  color: #e6ecf8;
  background: rgba(11, 18, 32, .75);
  font-size: 19px;
  cursor: pointer;
}

.tw-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.tw-story-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 26px 90px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.025);
  transition:
    opacity .45s ease,
    transform .65s ease,
    visibility .45s;
  background:
    radial-gradient(circle at 50% 42%, rgba(47, 111, 237, .2), transparent 48%),
    #05070d;
}

.tw-story-content.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.tw-copy {
  position: relative;
  z-index: 2;
  width: min(100%, 760px);
  text-align: center;
  animation: tw-copy-in .7s both;
}

.tw-kicker {
  margin: 0 0 22px;
  color: #8a99b8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.tw-title {
  margin: 0 auto;
  max-width: 760px;
  color: #e6ecf8;
  font-size: clamp(42px, 9vw, 88px);
  font-weight: 850;
  line-height: 1.02;
  letter-spacing: -3px;
  overflow-wrap: anywhere;
}

.tw-description {
  max-width: 520px;
  margin: 24px auto 0;
  color: #aab7d0;
  font-size: clamp(15px, 2.5vw, 19px);
  line-height: 1.65;
}

.tw-extra {
  margin: 24px 0 0;
  color: #6fa0ff;
  font-size: 20px;
  font-weight: 750;
}

.tw-footer {
  margin: 35px 0 0;
  color: #8a99b8;
  font-size: 13px;
}

.tw-bottom-brand {
  position: absolute;
  bottom: 25px;
  left: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #8a99b8;
  transform: translateX(-50%);
  white-space: nowrap;
}

.tw-brand-symbol {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: #2f6fed;
  font-size: 14px;
  letter-spacing: 0;
}

.tw-glow {
  position: absolute;
  width: min(75vw, 650px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(47, 111, 237, .1);
  filter: blur(85px);
  animation: tw-glow 7s ease-in-out infinite alternate;
}

.tw-orbit {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(75vw, 620px);
  aspect-ratio: 1;
  border: 1px solid rgba(47, 111, 237, .13);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.tw-orbit-two {
  width: min(55vw, 440px);
  border-color: rgba(111, 160, 255, .12);
  animation: tw-rotate 35s linear infinite;
}

.tw-distance .tw-title,
.tw-sessions .tw-title,
.tw-days .tw-title,
.tw-records .tw-title {
  color: #fff;
  text-shadow: 0 0 45px rgba(47, 111, 237, .3);
}

.tw-moment .tw-title,
.tw-weekday .tw-title {
  color: #8db4ff;
}

.tw-hit-zones {
  position: absolute;
  inset: 65px 0 0;
  z-index: 4;
  display: flex;
  pointer-events: none;
}

.tw-hit {
  width: 50%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.tw-controls-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  z-index: 6;
  width: max-content;
  max-width: calc(100% - 30px);
  color: rgba(230, 236, 248, .45);
  font-size: 11px;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.tw-final-actions {
  position: absolute;
  right: 16px;
  bottom: 55px;
  left: 16px;
  z-index: 7;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.tw-final-actions[hidden] {
  display: none;
}

.tw-final-actions .button {
  min-width: 180px;
  text-align: center;
}

@keyframes tw-copy-in {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tw-glow {
  from {
    opacity: .5;
    transform: scale(.85);
  }
  to {
    opacity: 1;
    transform: scale(1.15);
  }
}

@keyframes tw-rotate {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@media (max-width: 600px) {
  .tw-progress {
    padding: 10px 10px 5px;
    gap: 3px;
  }

  .tw-topbar {
    padding: 7px 12px;
  }

  .tw-story-content {
    padding: 20px 20px 85px;
  }

  .tw-title {
    font-size: clamp(39px, 12vw, 66px);
    letter-spacing: -2px;
  }

  .tw-description {
    font-size: 15px;
  }

  .tw-orbit {
    width: 95vw;
  }

  .tw-orbit-two {
    width: 72vw;
  }

  .tw-final-actions {
    bottom: 48px;
  }

  .tw-final-actions .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tw-story-content,
  .tw-copy,
  .tw-glow,
  .tw-orbit-two {
    animation: none !important;
    transition: none !important;
  }
}

.tw-launch {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 25px;
  background:
    radial-gradient(circle at 50% 40%, rgba(47, 111, 237, .2), transparent 55%),
    #05070d;
  text-align: center;
}

.tw-launch.is-hidden {
  display: none;
}

.tw-launch-content {
  width: min(100%, 440px);
}

.tw-launch-logo {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin: 0 auto 25px;
  border-radius: 18px;
  background: #2f6fed;
  color: white;
  font-size: 32px;
  font-weight: 900;
}

.tw-launch-content > p {
  color: #8a99b8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 3px;
}

.tw-launch-content h2 {
  margin: 20px 0 30px;
  color: #e6ecf8;
  font-size: clamp(30px, 7vw, 46px);
  line-height: 1.1;
}

.tw-launch-content .button {
  min-width: 220px;
}

.tw-ranking {
  width: min(100%, 560px);
  margin: 32px auto 0;
  text-align: left;
}

.tw-ranking-item {
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid rgba(138, 153, 184, .2);
}

.tw-ranking-number {
  color: #6fa0ff;
  font-size: 19px;
  font-weight: 850;
}

.tw-ranking-name {
  min-width: 0;
  color: #e6ecf8;
  font-size: 14px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.tw-ranking-count {
  color: #8a99b8;
  font-size: 12px;
  white-space: nowrap;
}

@media (max-width: 500px) {
  .tw-ranking {
    margin-top: 20px;
  }

  .tw-ranking-item {
    gap: 8px;
    padding: 12px 0;
  }

  .tw-ranking-name {
    font-size: 12px;
  }
}
.brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}