/* ===== Polices locales ===== */
@font-face {
  font-family: "Urbanist";
  src: url("../assets/fonts/Urbanist.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Doto";
  src: url("../assets/fonts/Doto.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

/* ===== Variables ===== */
:root {
  --bg: #f4f0eb;
  --bg-deep: #ebe5de;
  --ink: #1c1a18;
  --ink-soft: #4a4540;
  --muted: #9b948c;
  --line: rgba(28, 26, 24, 0.08);
  --lime: #e3f27b;
  --lime-deep: #c9dc4a;
  --warn: #b5562e;
  --radius-xl: 36px;
  --shadow-card: 0 24px 40px -22px rgba(70, 45, 25, 0.45),
    0 2px 6px -2px rgba(70, 45, 25, 0.12);
  --font: "Urbanist", system-ui, sans-serif;
  --dot: "Doto", monospace;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 600px at 8% 0%, rgba(214, 170, 160, 0.45), transparent 70%),
    radial-gradient(800px 700px at 100% 100%, rgba(196, 160, 110, 0.35), transparent 70%),
    var(--bg-deep);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

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

.icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.dot {
  font-family: var(--dot);
  font-weight: 800;
  font-variation-settings: "ROND" 100;
  letter-spacing: 0.02em;
  line-height: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
}

/* ===== Coque de l'app ===== */
.app {
  position: relative;
  max-width: 440px;
  min-height: 100%;
  margin: 0 auto;
  padding-top: var(--safe-top);
  padding-bottom: calc(120px + var(--safe-bottom));
  overflow-x: hidden;
  background:
    radial-gradient(420px 320px at 100% 0%, rgba(222, 190, 182, 0.55), transparent 70%),
    radial-gradient(380px 300px at 0% 100%, rgba(232, 214, 196, 0.6), transparent 70%),
    var(--bg);
}

@media (min-width: 600px) {
  body {
    padding: 32px 0;
  }

  .app {
    min-height: calc(100vh - 64px);
    border-radius: 48px;
    box-shadow: 0 50px 80px -40px rgba(60, 40, 25, 0.45),
      0 0 0 1px rgba(255, 255, 255, 0.7) inset;
  }
}

.view {
  animation: viewIn 0.35s ease both;
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* ===== Messages ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(118px + var(--safe-bottom));
  z-index: 50;
  max-width: 380px;
  width: calc(100% - 40px);
  padding: 14px 18px;
  border-radius: 22px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  line-height: 1.4;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: 0.3s ease;
}

.toast.is-on {
  transform: translate(-50%, 0);
  opacity: 1;
}

.toast--error {
  background: var(--warn);
  color: #fff;
}

.loading {
  padding: 120px 0;
  text-align: center;
  color: var(--muted);
}

.loading .dot {
  font-size: 30px;
  color: var(--ink);
  animation: blink 1s infinite;
}

@keyframes blink {
  50% {
    opacity: 0.3;
  }
}

.empty {
  margin: 30px 26px;
  padding: 26px 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
}
