@import url('https://fonts.googleapis.com/css2?family=Afacad:wght@400;500;700&display=swap');

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

body {
    font-family: "Afacad", sans-serif;
    padding-top: 80px;
    background: #fff;
}

body.no-scroll {
  position: fixed;
  width: 100%;
}

.header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 80px;
    padding: 0 16px;
    background: white;
    display: flex;
    align-items: center;
    z-index: 10;
}

.logo {
    height: 40px;
}

.header-right {
    margin-left: auto;
    display: flex;
    gap: 16px;
    align-items: center;
}

.header-right i {
    font-size: 32px;
    color: black;
}

.avatar {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
}

.card-container {
    display: flex;
    justify-content: center;
    padding: 16px;
}

#card-stack {
    position: relative;
    width: 100%;
    max-width: 380px;
    aspect-ratio: 7 / 10;
}

.card {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background-size: cover;
    background-position: center;
    touch-action: pan-y;

    display: flex;
    flex-direction: column;   /* 🔥 important */
    justify-content: flex-end;

    padding-bottom: 24px;
    transition: transform 0.3s ease;
}



.choices {
    width: 100%;
    padding-bottom: 30px;
    display: flex;
    justify-content: space-around;
}

.choice-btn {
    position: relative;
    width: 80px;
    height: 80px;
    background: none;
    border: none;
}

.choice-btn img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(0.85);
    transition:
        opacity 0.18s ease,
        transform 0.18s ease;
}

/* état normal */
.choice-btn .like,
.choice-btn .next {
    opacity: 1;
    transform: scale(1);
}

.card.is-like .choice-btn.like .like {
    opacity: 0;
    transform: scale(0.9);
}

.card.is-like .choice-btn.like .like-after {
    opacity: 1;
    transform: scale(1);
}

.card.is-like .choice-btn.nope .next {
    opacity: 0;
    transform: scale(0.9);
}

.card.is-nope .choice-btn.nope .next {
    opacity: 0;
    transform: scale(0.9);
}

.card.is-nope .choice-btn.like .like {
    opacity: 0;
    transform: scale(0.9);
}

.card.is-nope .choice-btn.nope .next-after {
    opacity: 1;
    transform: scale(1);
}

.choice-btn:active img {
    transform: scale(0.9);
}

.overlay {
    position: absolute;
    top: 24px;
    padding: 8px 16px;
    font-size: 32px;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s ease;
}

.like-overlay {
    left: 24px;
    transform: rotate(-15deg);
    width: 100px;
}

.nope-overlay {
    right: 24px;
    transform: rotate(15deg);
    width: 88px;
}

.card-info {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 105%;
    background: white;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    transform: translateY(90%);
    transition: transform 0.25s ease;
    touch-action: none;
    will-change: transform, opacity;
}

/* poignée visuelle */
.card-info::before {
    content: "";
    position: sticky;
    top: 12px;
    margin: 10px auto 12px;
    display: block;
    width: 48px;
    height: 5px;
    border-radius: 4px;
    background: #ccc;
}

.infos {
    padding: 0 16px;
    color: white;
    display: flex;
    flex-direction: column;
    padding-bottom: 10px;
}

.title-row {
    display: flex;
    flex-direction: column;
    padding: 0 16px;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 22px;
}

.location-row {
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 8px;
    font-size: 19px;
    margin-bottom: 16px;
}

.location-row img {
    width: 16px;
    height: 16px;

}

.tags-row1, .tags-row2 {
    display: flex;
    gap: 8px;
    padding: 0 16px;
    margin-bottom: 5px;
}

.tag{
    color: black;
    background: white;
    border-radius: 8px;
    padding: 4px 12px;
    font-size: 19px;
    font-weight: bold;
}

.description {
    padding-top: 16px;
    padding-left: 24px;
    font-size: 22px;
}

.description-text {
    font-size: 18px;
    padding-top: 16px;
    padding-left: 24px;
    padding-right: 24px;
    padding-bottom: 20px;
}

.red-flag-title{
    display: flex;
    flex-direction: row;
    padding-left: 24px;
    font-size: 22px;
}

.red-flag-icon{
    width: 26px;
    height: 26px;
    margin-right: 8px;
}

.red-flag-row {
    display: flex;
    gap: 8px;
    padding-left: 24px;
    margin-top: 8px;
    margin-bottom: 16px;
}

.red-flag-tag{
    color: white;
    background: #FF6B6B;
    border-radius: 8px;
    padding: 4px 12px;
    font-size: 16px;
    font-weight: bold;
}

.green-flag-title{
    display: flex;
    flex-direction: row;
    padding-left: 24px;
    font-size: 22px;
}

.green-flag-icon{
    width: 26px;
    height: 26px;
    margin-right: 8px;
}

.green-flag-row {
    display: flex;
    gap: 8px;
    padding-left: 24px;
    margin-top: 8px;
    margin-bottom: 16px;
}

.green-flag-tag{
    color: white;
    background: #4FCD94;
    border-radius: 8px;
    padding: 4px 12px;
    font-size: 16px;
    font-weight: bold;
}

#retry-btn {
    font-family: Afacad, sans-serif;
    font-weight: bold;
    padding: 16px 32px;
    font-size: 24px;
    border-radius: 999px;
    border: none;
    background: black;
    color: white;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.retry-icon {
    width: 24px;
    height: 24px;
    filter: invert(1);
}

.end {
    position: fixed;
    inset: 0; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 999;
    text-align: center;
    gap: 20px;
}
