* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    font-family: Georgia, "Times New Roman", serif;
    color: white;
    background: #111;
}


/* =========================================================
   PAGE
========================================================= */

.quiz-page {
    position: relative;
    width: 100%;
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 28px 20px;

    background-image: url("../images/fond-mariage.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.quiz-overlay {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            to bottom,
            rgba(15, 10, 10, 0.48),
            rgba(15, 10, 10, 0.76)
        );

    z-index: 1;
}


/* =========================================================
   CONTENEUR
========================================================= */

.quiz-container {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 940px;

    text-align: center;
}


/* =========================================================
   BARRE DU HAUT
========================================================= */

.quiz-topbar {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 12px;
}

.back-button {
    position: absolute;
    left: 0;

    padding: 9px 15px;

    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 999px;

    background: rgba(0, 0, 0, 0.22);

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    color: white;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.8rem;

    text-decoration: none;
}

.wedding-date {
    font-family: Arial, Helvetica, sans-serif;

    font-size: 0.72rem;
    font-weight: 600;

    letter-spacing: 0.32rem;

    color: rgba(255, 255, 255, 0.9);
}


/* =========================================================
   ENTETE
========================================================= */

.quiz-header h1 {
    margin-bottom: 18px;

    font-size: clamp(3rem, 7vw, 5.2rem);
    font-weight: 400;

    line-height: 1;
}

.question-number {
    margin-bottom: 12px;

    font-family: Arial, Helvetica, sans-serif;

    font-size: 0.76rem;
    font-weight: 600;

    text-transform: uppercase;

    letter-spacing: 0.2rem;

    color: #f2c9cb;
}

.question {
    max-width: 820px;

    margin: 0 auto 32px;

    font-size: clamp(1.9rem, 4.8vw, 3rem);
    font-weight: 400;

    line-height: 1.18;
}


/* =========================================================
   CHOIX
========================================================= */

.choices {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 24px;
}


/* =========================================================
   CARTES
========================================================= */

.choice-card {
    position: relative;

    min-height: 370px;

    overflow: hidden;

    padding: 0;

    border: 1px solid rgba(255, 255, 255, 0.46);
    border-radius: 26px;

    background:
        linear-gradient(
            145deg,
            rgba(105, 65, 64, 0.82),
            rgba(64, 46, 42, 0.78)
        );

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    color: white;

    cursor: pointer;

    box-shadow:
        0 12px 30px
        rgba(0, 0, 0, 0.26);

    transition:
        transform 0.22s ease,
        border-color 0.22s ease,
        box-shadow 0.22s ease,
        opacity 0.22s ease;
}

.choice-card:hover {
    transform: translateY(-5px);

    border-color:
        rgba(255, 255, 255, 0.75);

    box-shadow:
        0 18px 38px
        rgba(0, 0, 0, 0.32);
}

.choice-card:disabled {
    cursor: default;
}


/* =========================================================
   CARTE SELECTIONNEE
========================================================= */

.choice-card.selected {
    transform: scale(1.045);

    border:
        2px solid
        rgba(255, 245, 245, 1);

    box-shadow:
        0 0 0 4px
        rgba(255, 255, 255, 0.10),
        0 20px 45px
        rgba(0, 0, 0, 0.38);

    z-index: 3;
}

.choice-card:not(.selected):disabled {
    opacity: 0.88;
}


/* =========================================================
   REMPLISSAGE POURCENTAGE
========================================================= */

.choice-fill {
    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    height: 0%;

    background:
        linear-gradient(
            to top,
            rgba(188, 109, 116, 0.9),
            rgba(177, 99, 108, 0.58)
        );

    transition:
        height 0.9s
        cubic-bezier(
            0.2,
            0.8,
            0.2,
            1
        );

    z-index: 1;
}


/* =========================================================
   CONTENU
========================================================= */

.choice-content {
    position: relative;

    z-index: 2;

    min-height: 370px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 17px;

    padding: 25px 20px;
}


/* =========================================================
   PHOTO
========================================================= */

.photo-wrapper {
    position: relative;

    width: 205px;
    height: 205px;

    overflow: hidden;

    border-radius: 50%;

    border:
        3px solid
        rgba(255, 255, 255, 0.86);

    background:
        rgba(255, 255, 255, 0.08);

    box-shadow:
        0 10px 28px
        rgba(0, 0, 0, 0.25);
}

.choice-photo {
    position: relative;

    z-index: 2;

    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;
}

.photo-placeholder {
    position: absolute;

    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    font-family: Arial, Helvetica, sans-serif;

    font-size: 2.2rem;
    font-weight: 700;

    color:
        rgba(255, 255, 255, 0.7);

    z-index: 1;
}

.photo-wrapper:not(.no-photo)
.photo-placeholder {
    display: none;
}


/* =========================================================
   NOM
========================================================= */

.choice-name {
    font-size: 2rem;
    line-height: 1;
}


/* =========================================================
   POURCENTAGES
========================================================= */

.result-area {
    min-height: 45px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.percentage {
    opacity: 0;

    transform:
        translateY(6px);

    font-family: Arial, Helvetica, sans-serif;

    font-size: 2.1rem;
    font-weight: 700;

    color: white;

    text-shadow:
        0 2px 8px
        rgba(0, 0, 0, 0.28);

    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

.quiz-container.voted
.percentage {
    opacity: 1;

    transform:
        translateY(0);
}


/* =========================================================
   ACTIONS
========================================================= */

.quiz-actions {
    margin-top: 24px;
}

.vote-message {
    min-height: 24px;

    font-family: Arial, Helvetica, sans-serif;

    font-size: 0.92rem;

    color:
        rgba(255, 255, 255, 0.9);
}

.next-button {
    margin-top: 16px;

    padding: 14px 28px;

    border:
        1px solid
        rgba(255, 255, 255, 0.58);

    border-radius: 999px;

    background:
        rgba(114, 64, 65, 0.92);

    color: white;

    font-family: Arial, Helvetica, sans-serif;

    font-size: 0.95rem;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.next-button:hover {
    transform: translateY(-2px);

    background:
        rgba(140, 79, 81, 0.96);
}


/* =========================================================
   ECRAN DE FIN
========================================================= */

.end-screen {
    margin-top: 70px;

    padding: 45px 25px;

    border:
        1px solid
        rgba(255, 255, 255, 0.35);

    border-radius: 26px;

    background:
        rgba(91, 58, 55, 0.68);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.end-heart {
    margin-bottom: 15px;

    font-size: 3rem;
}

.end-screen h2 {
    margin-bottom: 14px;

    font-size: 2.5rem;

    font-weight: 400;
}

.end-screen p {
    margin-bottom: 28px;

    font-family: Arial, Helvetica, sans-serif;

    color:
        rgba(255, 255, 255, 0.88);
}

.home-button {
    display: inline-block;

    padding: 14px 26px;

    border:
        1px solid
        rgba(255, 255, 255, 0.55);

    border-radius: 999px;

    background:
        rgba(121, 70, 72, 0.9);

    color: white;

    font-family: Arial, Helvetica, sans-serif;

    text-decoration: none;
}


/* =========================================================
   RECAPITULATIF FINAL
========================================================= */

.summary-intro {
    margin-bottom: 28px;
}

.summary-list {
    display: flex;
    flex-direction: column;

    gap: 14px;

    margin: 25px auto 35px;

    width: 100%;
    max-width: 720px;

    text-align: left;
}

.summary-item {
    padding: 20px;

    border:
        1px solid
        rgba(255, 255, 255, 0.25);

    border-radius: 18px;

    background:
        rgba(255, 255, 255, 0.08);

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.summary-number {
    display: block;

    margin-bottom: 7px;

    font-family: Arial, Helvetica, sans-serif;

    font-size: 0.68rem;
    font-weight: 600;

    letter-spacing: 0.12rem;

    text-transform: uppercase;

    color: #efc6c9;
}

.summary-item h3 {
    margin-bottom: 16px;

    font-size: 1.35rem;

    font-weight: 400;

    line-height: 1.25;
}

.summary-results {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 10px;
}

.summary-results div {
    display: flex;

    align-items: center;
    justify-content: space-between;

    padding: 10px 13px;

    border-radius: 12px;

    background:
        rgba(0, 0, 0, 0.18);

    font-family: Arial, Helvetica, sans-serif;

    font-size: 0.85rem;
}

.summary-results span {
    font-weight: 700;

    font-size: 1rem;
}

.summary-user-vote {
    margin-top: 13px;

    font-family: Arial, Helvetica, sans-serif;

    font-size: 0.8rem;

    color:
        rgba(255, 255, 255, 0.72);
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 650px) {

    .quiz-page {
        min-height: 100dvh;

        align-items: flex-start;

        padding: 22px 10px 32px;
    }

    .quiz-topbar {
        justify-content: flex-end;

        margin-bottom: 16px;
    }

    .back-button {
        left: 0;
    }

    .wedding-date {
        font-size: 0.62rem;

        letter-spacing: 0.21rem;
    }

    .quiz-header h1 {
        margin-top: 10px;
        margin-bottom: 14px;

        font-size:
            clamp(
                2.5rem,
                13vw,
                3.6rem
            );
    }

    .question-number {
        font-size: 0.67rem;
    }

    .question {
        margin-bottom: 24px;

        font-size:
            clamp(
                1.65rem,
                7.5vw,
                2.2rem
            );
    }

    .choices {
        gap: 10px;
    }

    .choice-card {
        min-height: 290px;

        border-radius: 19px;
    }

    .choice-content {
        min-height: 290px;

        padding: 17px 7px;

        gap: 13px;
    }

    .photo-wrapper {
        width: 130px;
        height: 130px;

        border-width: 2px;
    }

    .photo-placeholder {
        font-size: 1.6rem;
    }

    .choice-name {
        font-size: 1.5rem;
    }

    .percentage {
        font-size: 1.65rem;
    }

    .choice-card.selected {
        transform: scale(1.025);
    }

    .quiz-actions {
        margin-top: 20px;
    }

    .end-screen {
        margin-top: 25px;

        padding: 28px 12px;
    }

    .summary-item {
        padding: 16px 12px;
    }

    .summary-item h3 {
        font-size: 1.15rem;
    }

    .summary-results {
        gap: 7px;
    }

    .summary-results div {
        padding: 9px 8px;

        font-size: 0.72rem;
    }
}


/* =========================================================
   PETITS TELEPHONES
========================================================= */

@media (max-width: 390px) {

    .wedding-date {
        display: none;
    }

    .quiz-topbar {
        justify-content: flex-start;
    }

    .back-button {
        position: static;
    }

    .choices {
        gap: 8px;
    }

    .choice-card,
    .choice-content {
        min-height: 265px;
    }

    .photo-wrapper {
        width: 110px;
        height: 110px;
    }

    .choice-name {
        font-size: 1.35rem;
    }

    .percentage {
        font-size: 1.45rem;
    }
}

[hidden] {
    display: none !important;
}