/* Inter Tight (SIL OFL 1.1), servie depuis le site : pas d'aller-retour vers
   Google Fonts avant le premier affichage. Sous-ensemble latin, variable 400 à 800. */
@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/fonts/inter-tight-latin.woff2) format('woff2');
}

/* kidonne.fr : mêmes couleurs que l'app (lib/core/theme.dart, AppColors). */
:root {
  --felt-900: #0e231b;
  --felt-800: #143025;
  --felt-700: #1a3d2f;
  --felt-600: #21503e;
  --cream-50: #fbf8f1;
  --cream-100: #f5efe2;
  --cream-300: #d8cbb0;
  --cream-400: #b3a37f;
  --leather-500: #9c5230;
  --brass: #c89b3c;
  --ink-900: #1a1410;
  --ink-600: #5e4f3a;
  --radius: 18px;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--cream-100);
  background-color: var(--felt-900);
  /* Le feutre de la table : un dégradé et une trame de points discrète. */
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.045) 1px, transparent 0),
    radial-gradient(ellipse at 50% -10%, var(--felt-700) 0%, var(--felt-900) 70%);
  background-size: 18px 18px, 100% 100%;
  background-attachment: fixed;
}

a {
  color: var(--brass);
}

img {
  max-width: 100%;
  height: auto;
}

/* ---- Accueil ----------------------------------------------------------- */

.hero {
  display: grid;
  gap: 40px;
  align-items: center;
  justify-items: center;
  text-align: center;
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 16px 56px;
}

.eyebrow {
  margin: 0;
  color: var(--brass);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 8px 0 16px;
  font-size: clamp(40px, 10vw, 68px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--cream-50);
}

.lede {
  margin: 0 auto;
  max-width: 34ch;
  font-size: clamp(19px, 4.6vw, 22px);
  line-height: 1.45;
  color: var(--cream-100);
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 28px;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
  padding: 10px 18px;
  border-radius: 14px;
  background: var(--cream-50);
  color: var(--ink-900);
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.15;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.store:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.store:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 3px;
}

.store svg {
  width: 26px;
  height: 26px;
  flex: none;
  fill: currentColor;
}

.store span {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.store small {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-600);
}

.fineprint {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--cream-400);
}

/* Captures de l'app dans un cadre de téléphone. */
.phone {
  margin: 0;
  width: min(260px, 72vw);
  padding: 8px;
  border-radius: 40px;
  background: #0b0b0a;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 30px 60px rgba(0, 0, 0, 0.5);
}

.phone picture {
  display: block;
}

.phone img,
.phone video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 32px;
}

main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}

h2 {
  margin: 0 0 14px;
  font-size: clamp(28px, 6vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--cream-50);
}

.feature {
  display: grid;
  gap: 28px;
  justify-items: center;
  align-items: center;
  padding: 48px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.feature-text {
  max-width: 34rem;
}

.feature-text p {
  margin: 0 0 12px;
  color: var(--cream-300);
}

.extras {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 40px 0 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.extras article {
  padding: 18px 16px;
  border-radius: var(--radius);
  background: var(--felt-800);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-top: 3px solid var(--leather-500);
}

.extras h3 {
  margin: 0 0 4px;
  font-size: 17px;
  color: var(--cream-50);
}

.extras p {
  margin: 0;
  font-size: 15px;
  color: var(--cream-300);
}

.cta {
  margin: 64px 0 24px;
  text-align: center;
}

.cta .stores {
  margin-top: 16px;
}

.cta .store {
  justify-content: center;
}

.footer {
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 16px 48px;
  text-align: center;
  font-size: 14px;
  color: var(--cream-400);
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin-bottom: 10px;
}

.footer a {
  color: var(--cream-300);
}

/* Liens vers les feuilles à imprimer : des cartes de papier. */
.sheets {
  padding: 48px 0 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.sheets p {
  color: var(--cream-300);
}

.sheets ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.sheets a {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--cream-50);
  color: var(--ink-900);
  font-weight: 700;
  text-decoration: none;
  transform: rotate(-1.5deg);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
}

.sheets li:nth-child(even) a {
  transform: rotate(1.5deg);
}

/* Gratuit / Supporter : honnête et court, pas un tunnel de vente. */
.supporter {
  padding: 56px 0 8px;
  text-align: center;
}

.supporter-lede {
  max-width: 36rem;
  margin: 0 auto 24px;
  color: var(--cream-300);
}

.supporter-card {
  max-width: 34rem;
  margin: 0 auto;
  padding: 24px 24px 20px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(200, 155, 60, 0.16), rgba(156, 82, 48, 0.12));
  border: 1px solid rgba(200, 155, 60, 0.35);
  text-align: left;
}

.supporter-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
  color: var(--cream-50);
}

.supporter-card ul {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.supporter-card li {
  position: relative;
  padding: 4px 0 4px 26px;
  color: var(--cream-100);
}

.supporter-card li::before {
  content: '♠';
  position: absolute;
  left: 2px;
  color: var(--brass);
}

.supporter-card p {
  margin: 0;
  font-size: 15px;
  color: var(--cream-300);
}

/* Les captures sont posées sur le tapis comme des cartes, un peu de travers,
   et se redressent quand on passe dessus. Pas d'apparition au défilement :
   le contenu est là, tout de suite. */
.phone {
  transform: rotate(-2deg);
  transition: transform 0.35s ease;
}

.feature.reverse .phone,
.guide-cta .phone {
  transform: rotate(2deg);
}

.hero-phone {
  transform: rotate(3deg);
}

@media (hover: hover) {
  .phone:hover,
  .feature.reverse .phone:hover {
    transform: rotate(0deg);
  }
}

/* Code Konami */
.konami-rain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 50;
}

.konami-rain span {
  position: absolute;
  top: -10vh;
  font-size: clamp(28px, 6vw, 44px);
  color: var(--ink-900);
  background: var(--cream-50);
  border-radius: 8px;
  padding: 2px 10px 6px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  animation-name: konami-fall;
  animation-timing-function: cubic-bezier(0.3, 0.1, 0.6, 1);
  animation-fill-mode: forwards;
}

.konami-rain span.red {
  color: #a8312a;
}

@keyframes konami-fall {
  to {
    transform: translateY(120vh) rotate(var(--spin));
  }
}

.konami-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--cream-50);
  color: var(--ink-900);
  font-size: 15px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  transform: translateX(-50%);
  animation: toast-in 0.3s ease;
  transition: opacity 0.4s ease;
}

.konami-toast.out {
  opacity: 0;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 12px);
  }
}

@media (min-width: 760px) {
  .hero {
    grid-template-columns: 1fr auto;
    justify-items: start;
    text-align: left;
    gap: 56px;
    padding: 56px 24px 80px;
  }

  .lede {
    margin: 0;
  }

  .hero .stores {
    justify-content: flex-start;
  }

  .phone {
    width: 280px;
  }

  .feature {
    grid-template-columns: auto 1fr;
    justify-items: start;
    gap: 64px;
    padding: 72px 0;
  }

  .feature.reverse .phone {
    order: 2;
  }

  .extras {
    grid-template-columns: repeat(4, 1fr);
  }

  main,
  .footer,
  .topbar-inner {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .store,
  .phone {
    transition: none;
  }

  .konami-toast {
    animation: none;
  }
}

/* ---- Pages légales : une feuille de papier posée sur le feutre ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(14, 35, 27, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1040px;
  height: 56px;
  margin: 0 auto;
  padding: 0 16px;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topnav-link {
  color: var(--cream-300);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}

.topnav-link:hover {
  color: var(--cream-50);
}

.topnav-cta {
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--brass);
  color: var(--ink-900);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}

/* Sur téléphone : la marque et « Télécharger » seulement ; les feuilles à
   imprimer restent dans la page et le pied de page. */
@media (max-width: 560px) {
  .topnav-link {
    display: none;
  }
}

/* Les ancres ne passent pas sous la barre. */
html {
  scroll-padding-top: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cream-50);
  text-decoration: none;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.brand img {
  border-radius: 8px;
}

.paper {
  max-width: 820px;
  margin: 12px auto 0;
  padding: 28px 20px 36px;
  border-radius: var(--radius);
  background: var(--cream-50);
  color: var(--ink-900);
  font-size: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  overflow-wrap: anywhere;
}

.paper h1 {
  font-size: clamp(28px, 6vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  margin: 0 0 16px;
}

.paper h2 {
  font-size: 22px;
  color: var(--ink-900);
  margin: 32px 0 8px;
}

.paper h3 {
  font-size: 18px;
  margin: 22px 0 6px;
}

.paper a {
  color: var(--leather-500);
}

.paper blockquote {
  margin: 16px 0;
  padding: 12px 16px;
  border-left: 4px solid var(--brass);
  background: var(--cream-100);
  border-radius: 0 10px 10px 0;
}

.paper blockquote p {
  margin: 0;
}

.paper .table {
  overflow-x: auto;
}

.paper table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.paper th,
.paper td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--cream-300);
  vertical-align: top;
}

.paper th {
  background: var(--cream-100);
}

@media (min-width: 720px) {
  .paper {
    padding: 44px 56px 52px;
  }
}

/* ---- Pages gabarits (feuille de Yams…) ------------------------------ */

.guide-main {
  max-width: 820px;
  padding-top: 24px;
}

.guide-main h1 {
  font-size: clamp(36px, 8vw, 56px);
}

.guide-main .lede {
  margin: 0;
}

.guide-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: 24px 0 28px;
  color: var(--cream-400);
  font-size: 14px;
}

.print-button {
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  padding: 12px 20px;
  border: 0;
  border-radius: 14px;
  background: var(--brass);
  color: var(--ink-900);
  cursor: pointer;
}

.print-button:focus-visible {
  outline: 3px solid var(--cream-50);
  outline-offset: 3px;
}

/* La feuille elle-même : du papier, à l'écran comme à l'impression. */
.print-sheet {
  padding: 20px 16px 14px;
  border-radius: var(--radius);
  background: #fff;
  color: #111;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  overflow-x: auto;
}

.print-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  font-size: 15px;
}

.print-head strong {
  font-size: 22px;
}

.score-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 14px;
}

.score-table th,
.score-table td {
  border: 1px solid #333;
  height: 30px;
  padding: 2px 6px;
}

.score-table thead th {
  height: 36px;
  text-align: left;
}

.score-table thead th:first-child,
.score-table tbody th {
  width: 34%;
  text-align: left;
  font-weight: 600;
}

.score-table small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: #555;
}

.score-table .section-row th {
  height: 24px;
  background: #eee;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.score-table .sum-row th,
.score-table .sum-row td {
  background: #f6f6f6;
}

.score-table .total-row th,
.score-table .total-row td {
  height: 38px;
  font-size: 16px;
  border-top: 2px solid #111;
}

.print-foot {
  margin: 10px 0 0;
  font-size: 11px;
  color: #666;
  text-align: right;
}

.guide-text {
  margin: 48px 0 0;
}

.guide-text h3 {
  margin: 28px 0 8px;
  font-size: 20px;
  color: var(--cream-50);
}

.guide-text p {
  color: var(--cream-100);
}

.guide-text .table {
  overflow-x: auto;
}

.guide-text table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.guide-text th,
.guide-text td {
  padding: 9px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.guide-text th {
  color: var(--cream-400);
  font-weight: 600;
}

.fineprint-dark {
  font-size: 14px;
  color: var(--cream-400) !important;
}

.guide-cta {
  display: grid;
  gap: 28px;
  justify-items: center;
  align-items: center;
  margin: 56px 0 0;
  padding: 40px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.guide-cta p {
  color: var(--cream-300);
}

.guide-cta .stores {
  justify-content: flex-start;
}

@media (min-width: 760px) {
  .guide-cta {
    grid-template-columns: auto 1fr;
    gap: 48px;
  }

  .guide-main {
    padding-left: 24px;
    padding-right: 24px;
  }
}

.faq {
  margin: 48px 0 0;
}

.faq details {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 0;
}

.faq summary {
  cursor: pointer;
  padding: 12px 0;
  font-weight: 600;
  font-size: 17px;
  color: var(--cream-50);
}

.faq details p {
  margin: 0 0 14px;
  color: var(--cream-300);
}

.score-table.fixed {
  table-layout: fixed;
}

.score-table.fixed thead th:first-child,
.score-table.fixed tbody th {
  width: auto;
}

.score-table.compact thead th:first-child,
.score-table.compact tbody th {
  width: 9%;
}

.score-table .sub {
  font-size: 11px;
  font-weight: 500;
  color: #555;
  text-align: center;
}

.score-table td.split {
  border-left-style: dotted;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 12mm;
  }

  @page landscape {
    size: A4 landscape;
    margin: 10mm;
  }

  :root {
    color-scheme: light;
    background: #fff;
  }

  body {
    background: #fff !important;
    color: #000;
  }

  .topbar,
  .footer,
  .guide-main h1,
  .guide-main .lede,
  .guide-actions,
  .guide-text,
  .faq,
  .guide-cta {
    display: none !important;
  }

  /* Feuilles larges (Skull King, Tarot) : A4 à l'italienne. */
  .print-sheet.landscape {
    page: landscape;
  }

  .guide-main {
    max-width: none;
    padding: 0;
  }

  .print-sheet {
    padding: 0 1mm;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
  }

  .score-table {
    min-width: 0;
    font-size: 13pt;
  }

  .score-table th,
  .score-table td {
    height: 11mm;
  }

  .score-table .section-row th {
    height: 7mm;
  }

  .print-sheet.landscape .score-table th,
  .print-sheet.landscape .score-table td {
    height: 9mm;
  }
}

/* ---- Page des feuilles ---------------------------------------------- */

.sheet-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.sheet-list a {
  display: block;
  height: 100%;
  padding: 18px 18px 16px;
  border-radius: 12px;
  background: var(--cream-50);
  color: var(--ink-900);
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.3);
  transform: rotate(-1deg);
  transition: transform 0.2s ease;
}

.sheet-list li:nth-child(even) a {
  transform: rotate(1deg);
}

.sheet-list a:hover,
.sheet-list li:nth-child(even) a:hover {
  transform: rotate(0deg);
}

.sheet-list strong {
  display: block;
  font-size: 19px;
}

.sheet-list span {
  font-size: 14px;
  color: var(--ink-600);
}

.hub-note {
  margin: 36px 0 0;
  color: var(--cream-300);
}

/* ---- 404 : maldonne ------------------------------------------------- */

.notfound {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  padding: 16px;
}

.notfound h1 {
  font-size: clamp(44px, 11vw, 72px);
  margin: 28px 0 8px;
}

.notfound p {
  margin: 4px 0;
  color: var(--cream-100);
}

.misdeal {
  display: flex;
  justify-content: center;
}

.pc {
  position: relative;
  width: 84px;
  height: 118px;
  margin: 0 -10px;
  border-radius: 10px;
  background: var(--cream-50);
  color: var(--ink-900);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  transform: rotate(-12deg) translateY(6px);
}

.pc:nth-child(3) {
  transform: rotate(12deg) translateY(6px);
}

.pc.odd {
  z-index: 1;
  transform: rotate(-4deg) translateY(-10px);
  outline: 3px dashed var(--brass);
  outline-offset: 4px;
}

.pc.red {
  color: #a8312a;
}

.pc b {
  position: absolute;
  top: 6px;
  left: 9px;
  font-size: 24px;
  line-height: 1;
}

.pc i {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 40px;
}

.redeal {
  display: inline-block;
  margin-top: 18px;
  padding: 12px 20px;
  border-radius: 14px;
  background: var(--brass);
  color: var(--ink-900);
  font-weight: 700;
  text-decoration: none;
}

/* ---- /app : le lien « Partager Kidonne » vu depuis un ordinateur ---- */

.get-app-icon {
  border-radius: 26px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

.get-app .stores {
  margin-top: 20px;
}

.get-app-more {
  margin-top: 20px !important;
}

/* FAQ de l'accueil : même style que celle des feuilles, en colonne lisible. */
.home-faq {
  max-width: 44rem;
  margin: 56px auto 0;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.home-faq h2 {
  text-align: center;
}

.faq details a {
  color: var(--brass);
}
