/* Cooloria — DA « papier & encre » (révision VK du 6 juillet 2026).
   Encre profonde texturée d'un maillage esquissé (WebGL, js/bg.js), papier
   crème pour l'action principale, verre pour le secondaire, deux polices
   variables OFL : Unbounded (affiche) et Space Grotesk (tout le reste). */

@font-face {
  font-family: 'Unbounded';
  src: url('fonts/unbounded_wght.ttf') format('truetype');
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('fonts/spacegrotesk_wght.ttf') format('truetype');
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --ink: #0F0C13;
  --ink-raised: #181321;
  --cream: #F3EDE2;
  --grotesk: 'Space Grotesk', system-ui, sans-serif;
  --display: 'Unbounded', var(--grotesk);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* l'attribut hidden doit gagner contre nos display:flex */
[hidden] { display: none !important; }

html, body { height: 100%; }
body {
  background: var(--ink);
  color: var(--cream);
  font: 400 15px/1.5 var(--grotesk);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(243, 237, 226, 0.25); }
:focus-visible { outline: 2px solid rgba(243, 237, 226, 0.7); outline-offset: 2px; }

#bg { position: fixed; inset: 0; width: 100%; height: 100%; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ------------------------------------------------------------ écrans */

.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4.5vh);
  transition: opacity 0.3s, transform 0.3s ease-out, visibility 0s 0.3s;
}
.screen.active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.25s ease-out 0.08s, transform 0.25s ease-out 0.08s;
}

/* ------------------------------------------------------------ commandes */

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 58px;
  padding: 0 30px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, 0.05)),
    var(--cream);
  color: var(--ink);
  font: 700 15.5px/1 var(--grotesk);
  letter-spacing: 0.1px;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.35),
    0 0 32px rgba(243, 237, 226, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  animation: breath 2400ms ease-in-out infinite alternate;
  transition: transform 120ms ease-out, opacity 200ms;
  will-change: transform;
}
.cta:active { transform: scale(0.97); animation-play-state: paused; }
.cta:disabled { opacity: 0.55; pointer-events: none; }
.cta svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@keyframes breath { from { transform: scale(1); } to { transform: scale(1.012); } }

.glass {
  background: rgba(24, 19, 33, 0.4);
  backdrop-filter: blur(22px) saturate(1.15);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 12px 30px rgba(0, 0, 0, 0.3);
}

.circle {
  flex: none;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(24, 19, 33, 0.4);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.13);
  transition: transform 120ms ease-out;
}
.circle:active { transform: scale(0.94); }
.circle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--cream);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.linklike {
  padding: 10px;
  font: 500 14px/1 var(--grotesk);
  color: rgba(243, 237, 226, 0.72);
}

.bottom-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(92vw, 560px);
}
.grow { flex: 1; }

.footnote {
  font: 400 12px/1.5 var(--grotesk);
  color: rgba(243, 237, 226, 0.62);
  text-align: center;
}

/* ------------------------------------------------------------ accueil */

#s-home { justify-content: center; }
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 26px;
  gap: 0;
}
.wordmark {
  font: 800 clamp(46px, 8.5vw, 92px)/1.12 var(--display);
  letter-spacing: -0.015em;
  color: var(--cream);
}
.tagline {
  margin-top: 16px;
  font: 500 clamp(17px, 2.2vw, 21px)/1.42 var(--grotesk);
  color: rgba(243, 237, 226, 0.8);
}
.actions {
  margin-top: clamp(40px, 8vh, 84px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.actions .cta { min-width: min(86vw, 340px); }
.hint {
  font: 400 13px/1.55 var(--grotesk);
  color: rgba(243, 237, 226, 0.55);
  text-align: center;
}
.foot {
  padding: 0 26px calc(18px + env(safe-area-inset-bottom));
  font: 400 12.5px/1.5 var(--grotesk);
  color: rgba(243, 237, 226, 0.45);
  text-align: center;
}

/* ------------------------------------------------------------ confirmation */

#s-confirm { justify-content: space-between; padding: 24px 18px calc(18px + env(safe-area-inset-bottom)); }
.confirm-stage {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 18px;
}
#confirm-img {
  max-width: min(94vw, 1100px);
  max-height: 72vh;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

/* ------------------------------------------------------------ création */

#s-working { justify-content: flex-end; overflow: hidden; }
.blur-photo {
  position: absolute;
  inset: -40px;
  background-size: cover;
  background-position: center;
  filter: blur(25px);
  transform: scale(1.08);
}
.veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 12, 19, 0.78), rgba(15, 12, 19, 0.93));
}
.working-col {
  position: relative;
  width: min(92vw, 620px);
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 24px calc(16px + env(safe-area-inset-bottom));
}
#working-live, #working-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
/* hauteur FIXE de 3 lignes, texte ancré en bas : la barre ne bouge jamais */
.msgzone {
  position: relative;
  width: 100%;
  height: 78px;
}
.msgzone span {
  position: absolute;
  inset: auto 0 0 0;
  text-align: center;
  font: 600 19px/26px var(--grotesk);
  color: rgba(243, 237, 226, 0.92);
  opacity: 0;
  transition: opacity 700ms ease;
}
.pill {
  margin-top: 30px;
  width: min(66%, 430px);
  height: 8px;
  border-radius: 4px;
  background: rgba(243, 237, 226, 0.14);
  overflow: hidden;
}
#pill-fill {
  width: 2%;
  height: 100%;
  border-radius: 4px;
  background: var(--cream);
}
.pct {
  margin-top: 12px;
  font: 500 13px/1 var(--grotesk);
  color: rgba(243, 237, 226, 0.6);
}
#working-error h2 {
  font: 700 22px/30px var(--display);
  text-align: center;
}
#working-error p {
  margin: 12px 0 26px;
  font: 400 14.5px/21px var(--grotesk);
  color: rgba(243, 237, 226, 0.75);
  text-align: center;
}
#working-error .cta { min-width: min(72%, 340px); }
#btn-cancel { position: absolute; bottom: calc(16px + env(safe-area-inset-bottom)); }

/* ------------------------------------------------------------ résultat */

#s-result { justify-content: space-between; padding: 20px 22px calc(14px + env(safe-area-inset-bottom)); }
.result-stage {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding-bottom: 14px;
}
#result-img {
  max-width: min(94vw, 1200px);
  max-height: calc(100vh - 320px);
  border-radius: 20px;
  transition: opacity 260ms;
  background: #fff;
}
#result-img.dimmed { opacity: 0.28; }
#readjust {
  position: absolute;
  font: 600 17px/1 var(--grotesk);
  color: rgba(243, 237, 226, 0.92);
  opacity: 0;
  transition: opacity 300ms;
  pointer-events: none;
}
#readjust.visible { opacity: 1; transition: opacity 180ms; }

.controls {
  width: min(92vw, 560px);
  display: flex;
  flex-direction: column;
  gap: 0;
}
.selector {
  position: relative;
  display: flex;
  border-radius: 999px;
  padding: 4px;
  background: rgba(24, 19, 33, 0.4);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.13);
}
.selector .thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px) / var(--n, 2));
  border-radius: 999px;
  background: var(--cream);
  transform: translateX(calc(var(--i, 0) * 100%));
  transition: transform 340ms cubic-bezier(0.34, 1.3, 0.35, 1);
}
.selector button {
  flex: 1;
  position: relative;
  padding: 12px 0;
  border-radius: 999px;
  font: 600 14px/1 var(--grotesk);
  color: rgba(243, 237, 226, 0.72);
  transition: color 220ms;
}
.selector button.selected { color: var(--ink); }
.selector.disabled { pointer-events: none; }

.collapse {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 240ms ease-out, opacity 240ms ease-out;
}
.collapse > div { overflow: hidden; min-height: 0; }
.collapse > div > .selector { margin-top: 8px; }
.collapse.collapsed { grid-template-rows: 0fr; opacity: 0; }

.controls .bottom-bar { width: 100%; margin-top: 12px; }
.controls .footnote { margin-top: 8px; }
.controls .footnote[hidden] { display: none; }

/* ------------------------------------------------------------ tarifs */

#s-pricing { padding: 26px; }
.pricing-col {
  margin: auto;
  width: min(92vw, 560px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* les titres sont centrés — règle générale demandée par VK */
.pricing-title {
  font: 800 clamp(28px, 4vw, 40px)/1.28 var(--display);
  text-align: center;
}
.pricing-sub {
  font: 500 15px/1.4 var(--grotesk);
  color: rgba(243, 237, 226, 0.75);
  margin-bottom: 8px;
  text-align: center;
}
.pricing-stage {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}
#pricing-img {
  max-width: 100%;
  max-height: 30vh;
  border-radius: 18px;
}
.card {
  border-radius: 24px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 500 14.5px/1 var(--grotesk);
}
.card .price { font: 600 24px/1 var(--display); }
.packs { display: flex; gap: 10px; }
.pack {
  flex: 1;
  border-radius: 20px;
  padding: 13px 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  transition: transform 120ms ease-out;
}
.pack:active { transform: scale(0.97); }
.pack span { font: 500 12.5px/1 var(--grotesk); color: rgba(243, 237, 226, 0.8); }
.pack strong { font: 500 17px/1 var(--display); }
#btn-pricing-back { margin-top: 6px; }

/* ce que le déblocage apporte, en trois lignes cochées */
.gets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gets li {
  position: relative;
  padding-left: 26px;
  font: 400 13.5px/1.45 var(--grotesk);
  color: rgba(243, 237, 226, 0.85);
}
.gets li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 3px;
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--cream);
  border-bottom: 2px solid var(--cream);
  transform: rotate(-45deg);
  opacity: 0.9;
}

/* moyens de paiement : de simples pastilles, pas de logos à entretenir */
.paywith {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.paywith span {
  font: 500 11.5px/1 var(--grotesk);
  letter-spacing: 0.02em;
  color: rgba(243, 237, 226, 0.78);
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
}
.paynote {
  font: 400 11.5px/1.5 var(--grotesk);
  color: rgba(243, 237, 226, 0.58);
  text-align: center;
}

/* packs pas encore ouverts : présents pour situer l'offre, sans mentir */
.pack { position: relative; }
.pack[data-soon] { opacity: 0.75; }
.pack em {
  position: absolute;
  top: 9px;
  right: 10px;
  font: 600 9.5px/1 var(--grotesk);
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(243, 237, 226, 0.7);
  padding: 4px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

/* ------------------------------------------------------------ navigation */

#nav {
  position: fixed;
  z-index: 5;
  display: flex;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(14px + env(safe-area-inset-bottom));
}
#nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 9px 20px 8px;
  border-radius: 999px;
  color: rgba(243, 237, 226, 0.72);
  transition: color 220ms, background-color 220ms;
}
#nav button span { font: 600 10.5px/1 var(--grotesk); letter-spacing: 0.2px; }
#nav svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#nav button.selected { background: var(--cream); color: var(--ink); }

/* grand écran : petite pilule en haut à droite, libellés en ligne */
@media (min-width: 720px) {
  #nav {
    left: auto;
    transform: none;
    top: 18px;
    right: 18px;
    bottom: auto;
  }
  #nav button { flex-direction: row; gap: 8px; padding: 10px 18px; }
  #nav button span { font-size: 13px; }
  #nav svg { width: 18px; height: 18px; }
}
/* petite hauteur d'écran mobile : le pied de l'accueil remonte au-dessus de la pilule */
@media (max-width: 719.5px) {
  .foot { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .page-col { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
}

/* ------------------------------------------------------------ collection & profil */

.page-col {
  width: min(92vw, 1100px);
  margin: 0 auto;
  padding-top: clamp(64px, 9vh, 104px);
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.page-col.narrow { width: min(92vw, 560px); }
.page-title {
  font: 800 clamp(30px, 4.4vw, 44px)/1.2 var(--display);
  text-align: center;
}
.page-sub {
  font: 500 14px/1.45 var(--grotesk);
  color: rgba(243, 237, 226, 0.62);
  text-align: center;
  margin-bottom: 18px;
}

.works {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (min-width: 720px) { .works { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1100px) { .works { grid-template-columns: repeat(5, 1fr); } }
.work {
  display: flex;
  flex-direction: column;
  gap: 7px;
  transition: transform 140ms ease-out;
}
.work:active { transform: scale(0.97); }
.work img {
  width: 100%;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}
.work time {
  font: 500 11.5px/1 var(--grotesk);
  color: rgba(243, 237, 226, 0.55);
  text-align: center;
}
.works-empty {
  margin-top: clamp(30px, 12vh, 120px);
  font: 500 15px/1.5 var(--grotesk);
  color: rgba(243, 237, 226, 0.55);
  text-align: center;
}

.profile-note {
  font: 400 13.5px/1.5 var(--grotesk);
  color: rgba(243, 237, 226, 0.75);
  text-align: center;
}
.page-col .card { width: 100%; }
.rows {
  width: 100%;
  border-radius: 24px;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
}
.prow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  font: 500 14.5px/1 var(--grotesk);
}
.prow + .prow { border-top: 1px solid rgba(255, 255, 255, 0.08); }
.prow em {
  font: 500 11.5px/1 var(--grotesk);
  font-style: normal;
  color: rgba(243, 237, 226, 0.4);
}

.legal {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 14px;
}
.foot .legal { margin-top: 10px; }
.legal a {
  font: 500 12px/1 var(--grotesk);
  color: rgba(243, 237, 226, 0.5);
  text-decoration: none;
}
.legal a:hover { text-decoration: underline; }
.version {
  margin-top: 16px;
  font: 400 11.5px/1 var(--grotesk);
  color: rgba(243, 237, 226, 0.35);
  text-align: center;
}

/* ------------------------------------------------------------ divers */

#toast {
  position: fixed;
  left: 50%;
  bottom: 118px;
  transform: translateX(-50%);
  max-width: min(86vw, 480px);
  padding: 13px 18px;
  border-radius: 22px;
  font: 500 13.5px/1.45 var(--grotesk);
  color: rgba(243, 237, 226, 0.95);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms;
  z-index: 10;
}
#toast.visible { opacity: 1; }

#drop-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 12, 19, 0.72);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms;
  z-index: 20;
}
#drop-overlay.visible { opacity: 1; }
#drop-overlay span {
  padding: 26px 44px;
  border: 1.5px dashed rgba(243, 237, 226, 0.6);
  border-radius: 26px;
  font: 600 19px/1 var(--grotesk);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
