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

    body {
      background: #faf6f1;
      min-height: 100vh;
      padding: calc(2rem + env(safe-area-inset-top, 0px)) 1rem 5rem;
      font-family: 'Georgia', 'Times New Roman', serif;
      overflow-x: hidden;
    }

    .grid {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 0.8rem 0.3rem;
      max-width: 980px;
      margin: 0 auto;
      justify-items: center;
      padding: 1rem 0;
    }

    /* --- Heart card (flip container) --- */
    .heart-card {
      width: 180px;
      height: 168px;
      cursor: pointer;
    }

    .heart-inner {
      position: relative;
      width: 100%;
      height: 100%;
      transition: transform 0.6s ease;
      transform-style: preserve-3d;
    }

    .heart-card.flipped .heart-inner {
      transform: perspective(800px) rotateY(180deg);
    }

    .heart-front,
    .heart-back {
      position: absolute;
      inset: 0;
      backface-visibility: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .heart-back {
      transform: rotateY(180deg);
      /* No perspective needed here – it inherits the 3D context from .heart-inner */
    }

    /* --- Heart SVG --- */
    .heart-svg {
      width: 165px;
      height: 149px;
      transition: transform 0.25s ease, filter 0.25s ease;
      filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.1));
    }

    .heart-card:hover .heart-svg {
      transform: scale(1.1);
      filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
    }

    /* --- Back heart with message --- */
    .heart-back-wrap {
      position: relative;
      width: 180px;
      height: 162px;
    }

    .heart-back-wrap .heart-svg {
      width: 180px;
      height: 162px;
    }

    .heart-back-text {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: 20px 22px 30px;
      font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
      font-size: calc(var(--fs, 13) * 1px);
      line-height: 1.4;
      color: #f9e1e1;
      text-shadow: 0 1px 1px rgba(167, 115, 115, 0.25);
      overflow: hidden;
      word-break: break-word;
    }

    /* Gradient fade for truncated long text */
    .heart-back-text.long-text {
      -webkit-mask-image: linear-gradient(to bottom, black 55%, transparent 95%);
      mask-image: linear-gradient(to bottom, black 55%, transparent 95%);
    }

    /* In zoom mode: smaller font to fit all text, remove fade */
    .heart-card.zoomed .heart-back-text.long-text {
      --fs: 6.5 !important;
      line-height: 1.3;
      -webkit-mask-image: none;
      mask-image: none;
    }

    /* --- Zoom mode --- */
    .heart-card.zoomed {
      z-index: 50;
    }

    .heart-card.zoomed .heart-inner {
      transform: perspective(800px) rotateY(180deg) scale(2.5);
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }

    .heart-card.zoomed .heart-back-text {
      text-rendering: geometricPrecision;
    }

    /* --- Pulse animation for random --- */
    @keyframes pulse {

      0%,
      100% {
        transform: scale(1);
      }

      50% {
        transform: scale(1.2);
      }
    }

    .heart-card.pulse .heart-svg {
      animation: pulse 0.4s ease 2;
    }

    /* --- Button group --- */
    .btn-group {
      position: sticky;
      bottom: 5rem;
      width: fit-content;
      margin: 1.5rem auto 0;
      z-index: 100;
    }

    /* --- Main pill: "Au hasard" (always centered) --- */
    .random-btn {
      background: #fff;
      color: #d4556a;
      border: 3px solid #d4556a;
      border-radius: 50px;
      padding: 1rem 2rem;
      font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
      font-size: 1.5rem;
      font-weight: 600;
      cursor: pointer;
      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
      transition: background 0.2s, color 0.2s;
      white-space: nowrap;
      position: relative;
      z-index: 2;
    }

    .random-btn:hover {
      background: #fce8ec;
    }

    /* --- Zoom sliding pill (behind Au hasard, peeks right) --- */
    .zoom-slide {
      position: absolute;
      height: 80%;
      top: 50%;
      transform: translateY(-50%);
      display: flex;
      align-items: center;
      background: #fff;
      border: 3px solid #d4556a;
      border-radius: 20px;
      z-index: 1;
      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
      overflow: hidden;
      cursor: pointer;
      transition: left 0.35s ease, background 0.3s, border-color 0.3s;
      /* Collapsed: hidden behind Au hasard, only chevron peeks out */
      left: calc(100% - 90px);
    }

    /* Slid out: entire pill visible */
    .zoom-slide.open {
      left: calc(100% - 1.7rem);
    }

    /* Active (zoom on): fill entire pill */
    .zoom-slide.active {
      background: #d4556a;
      border-color: #d4556a;
    }

    .zoom-slide.active .zoom-label,
    .zoom-slide.active .zoom-chevron {
      color: #fff;
    }

    /* --- Zoom text label (hidden when collapsed) --- */
    .zoom-label {
      color: #d4556a;
      font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
      font-size: 1.5rem;
      font-weight: 600;
      white-space: nowrap;
      overflow: hidden;
      opacity: 1;
      padding: 0.8rem 0;
      transition: max-width 0.35s ease, opacity 0.25s ease, padding 0.35s ease;
    }

    .zoom-slide.open .zoom-label {
      max-width: 120px;
      opacity: 1;
      padding: .8rem 0.15rem 0.7rem 1.8rem;
    }

    /* --- Chevron (always visible, changes direction) --- */
    .zoom-chevron {
      color: #d4556a;
      font-size: 3.8rem;
      font-weight: 500;
      line-height: 1;
      padding: 0rem 0.1rem 0.5rem 1rem;
      transition: color 0.2s, padding 0.35s ease;
      flex-shrink: 0;
    }

    .zoom-slide.open .zoom-chevron {
      padding: 0rem 0.5rem 0.5rem 0rem;
    }

    /* --- À Propos pill (fixed top-right, hangs from top edge) --- */
    .about-pill {
      position: fixed;
      top: 0;
      right: calc((100vw - 980px) / 2);
      max-width: 980px;
      z-index: 200;
      background: #fff;
      border: 3px solid #d4556a;
      border-top: none;
      border-radius: 0 0 25px 25px;
      padding: 0 1.2rem 0.5rem;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
      cursor: pointer;
      text-align: center;
      width: auto;
      /* CLOSING: pill padding shrinks with the size */
      transition: padding 0.2s ease-in-out 0.15s;
    }

    .about-pill.visible {
      padding: 0 1.2rem 0.8rem;
      /* OPENING: pill padding grows with the size */
      transition: padding 0.25s ease-in-out 0.05s;
    }

    .about-pill:hover {
      background: #fef5f6;
    }

    .about-title {
      max-height: 0;
      max-width: 0;
      overflow: hidden;
      opacity: 0;
      /* CLOSING: text hides [0-0.15s], then width+height shrink together [0.15-0.4s] */
      transition: opacity 0s ease-in-out,
                  max-height 0.5s ease-in-out 0.3s,
                  max-width 0.5s ease-in-out 0.3s,
                  padding 0.4s ease-in-out 0.4s;
    }

    .about-pill.visible .about-title {
      max-height: 200px;
      max-width: 100%;
      opacity: 1;
      padding: 0.6rem 0 0.3rem;
      /* OPENING: width+height grow together [0.05-0.3s], then text fades in [0.3-0.5s] */
      transition: max-width 0.25s ease-in-out 0.05s,
                  max-height 0.25s ease-in-out 0.05s,
                  opacity 0.15s ease-in-out 0.35s,
                  padding 0.25s ease-in-out 0.05s;
    }

    .about-title h1 {
      font-family: 'Georgia', 'Times New Roman', serif;
      display: flex;
      align-items: center;
      font-size: 1.2rem;
      font-weight: 700;
      color: #d4556a;
      line-height: 1.35;
    }

    .about-label {
      display: block;
      font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
      font-size: 1.2rem;
      font-weight: 600;
      color: #d4556a;
      white-space: nowrap;
      max-height: 2rem;
      opacity: 1;
      overflow: hidden;
      /* SHOWING (closing pill): MERCI fades in at [0.4-0.5s] */
      transition: max-height 0.1s ease-in-out 0.4s,
                  opacity 0.1s ease-in-out 0.4s,
                  margin 0.1s ease-in-out 0.4s;
    }

    .about-label.hidden {
      max-height: 0;
      opacity: 0;
      margin: 0;
      /* HIDING (opening pill): MERCI disappears instantly at [0-0.05s] */
      transition: max-height 0.05s ease-in-out,
                  opacity 0.05s ease-in-out,
                  margin 0.05s ease-in-out;
    }

    /* --- Disclaimer footer --- */
    .disclaimer {
      text-align: center;
      font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
      font-size: 0.75rem;
      color: #c4a0a0;
      padding: 2rem 1rem 0.5rem;
      max-width: 980px;
      margin: 0 auto;
    }

    /* --- Responsive --- */
    @media (max-width: 980px) {
      .grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 760px;
      }

      .about-pill {
        right: calc((100vw - 760px) / 2);
        max-width: 760px;
      }

      body {
        padding-bottom: 7rem;
      }

      .btn-group {
        position: fixed;
        bottom: 2.5rem;
        left: 0;
        right: 0;
        width: fit-content;
        margin: 0 auto;
      }
    }

    @media (max-width: 760px) {
      .grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 560px;
        gap: 0.5rem 0.2rem;
      }

      .heart-card {
        width: 155px;
        height: 145px;
      }

      .heart-svg {
        width: 140px;
        height: 126px;
      }

      .heart-back-wrap {
        width: 155px;
        height: 140px;
      }

      .heart-back-wrap .heart-svg {
        width: 155px;
        height: 140px;
      }

      .heart-back-text {
        font-size: calc(var(--fs, 13) * 0.85px);
        padding: 18px 20px 28px;
      }

      .heart-card.zoomed .heart-inner {
        transform: perspective(800px) rotateY(180deg) scale(2);
      }

      .heart-card.zoomed .heart-back-text.long-text {
        --fs: 5.5 !important;
      }

      body {
        padding: calc(1rem + env(safe-area-inset-top, 0px)) 0.5rem 5rem;
      }

      .about-pill {
        right: calc((100vw - 560px) / 2);
        max-width: 560px;
      }
    }

    @media (max-width: 500px) {
      .grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 340px;
      }

      .about-pill {
        right: calc((100vw - 340px) / 2);
        max-width: 340px;
      }

      body {
        padding-bottom: 9rem;
      }

      /* Fixed button group at bottom of viewport */
      .btn-group {
        bottom: 3.5rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
      }

      /* Zoom always on: hide the button */
      .zoom-slide {
        display: none;
      }

      /* Zoom scale for phone screens */
      .heart-card.zoomed .heart-inner {
        transform: perspective(800px) rotateY(180deg) scale(1.8);
      }

      .heart-card.zoomed .heart-back-text.long-text {
        --fs: 5 !important;
      }
    }
