* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    /* sur iPhone, 100vh dépasse la zone visible à cause de la barre d'adresse */
    min-height: 100dvh;
    padding: 16px;
    background: whitesmoke;
    /* Police système : neutre, elle ne laisse rien deviner avant l'ouverture,
       et elle s'affiche sans aller chercher quoi que ce soit en ligne */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    font-size: large;
    background-color: rgb(246, 211, 217);
}

.wrapper {
    width: min(100%, 420px);
}

/* Écran d'attente, tant que l'heure d'ouverture n'est pas passée */
[hidden] {
    display: none !important;
}

.attente {
    width: min(100%, 420px);
    text-align: center;
    /* la couleur du titre n'est portée que par h2, pas par le body */
    color: #e94d58;
}

.attente-titre {
    font-size: 1.5em;
}

.compte {
    margin: 22px 0 18px;
    font-size: 2em;
    letter-spacing: 0.02em;
}

.attente-note {
    font-size: 0.95em;
    line-height: 1.4;
    color: #b03a44;
}

h2 {
    text-align: center;
    font-size: 1.5em;
    color: #e94d58;
    margin: 15px 0;
}

.portrait-zone {
    position: relative;
    display: flex;
    justify-content: center;
}

/* Taille du GIF de fin */
.gif {
    height: auto;
    width: 100%;
}

/* Taille de la photo, qui est nettement plus haute que large */
.gif.portrait {
    width: auto;
    height: min(46vh, 380px);
    transform-origin: 50% 100%;
    animation: respire 4.5s ease-in-out infinite;
}

/* Un mouvement de respiration, sans rien retoucher de l'image */
@keyframes respire {
    0%, 100% { transform: scale(1) rotate(-1deg); }
    50%      { transform: scale(1.04) rotate(1deg); }
}

.coeur {
    position: absolute;
    bottom: 8%;
    color: #e94d58;
    opacity: 0;
    pointer-events: none;
    animation: monte 5.5s ease-in infinite;
}

.coeur:nth-of-type(1) { left: 16%; font-size: 1.1rem; animation-delay: 0s; }
.coeur:nth-of-type(2) { left: 30%; font-size: 1.5rem; animation-delay: 1.4s; }
.coeur:nth-of-type(3) { left: 63%; font-size: 1.2rem; animation-delay: 2.6s; }
.coeur:nth-of-type(4) { left: 76%; font-size: 1.6rem; animation-delay: 3.7s; }
.coeur:nth-of-type(5) { left: 46%; font-size: 1rem;   animation-delay: 4.6s; }

@keyframes monte {
    0%   { transform: translateY(0) scale(0.4); opacity: 0; }
    20%  { opacity: 0.85; }
    100% { transform: translateY(-220px) scale(1.2); opacity: 0; }
}

/* Respecte le réglage système de réduction des animations */
@media (prefers-reduced-motion: reduce) {
    .gif.portrait { animation: none; }
    .coeur { display: none; }
}

.relance {
    min-height: 1.5em;
    margin-top: 12px;
    font-size: 0.9em;
    text-align: center;
    color: #b03a44;
}

.btn-group {
    width: 100%;
    height: 58px;
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

button {
    position: absolute;
    width: 150px;
    height: inherit;
    font-size: 1.2em;
    line-height: 1;
    color: white;
    border-radius: 30px;
    outline: none;
    cursor: pointer;
    box-shadow: 0 2px 4px gray;
    border: 2px solid #e94d58;
    font-family: inherit;
    touch-action: manipulation;
}

/* Placement de part et d'autre du centre. Les marges négatives d'origine ne
   pouvaient pas fonctionner : sur un élément absolu dont left et right valent
   auto, margin-right ne décale rien. D'où left: 50% + translate, écart réduit
   sous 500px pour tenir sur un écran de téléphone. */
/* Le "Non" est volontairement le plus gros des deux : c'est lui qu'on vise.
   Le "Oui" reste au-dessus de la cible tactile minimale de 44 px, et le
   translateY le recentre verticalement face au "Non", plus haut. */
button:nth-child(1) {
    left: 50%;
    width: 108px;
    height: 44px;
    font-size: 1em;
    transform: translateX(calc(-50% - 100px)) translateY(7px);
    background: #e94d58;
    /* le "Oui" reste au-dessus si le "Non" atterrit dessus */
    z-index: 2;
}

button:nth-child(2) {
    left: 50%;
    width: 184px;
    height: 58px;
    font-size: 1.35em;
    transform: translateX(calc(-50% + 62px));
    background: white;
    color: #e94d58;
    z-index: 1;
}

@media (min-width: 500px) {
    button:nth-child(1) {
        transform: translateX(calc(-50% - 132px)) translateY(7px);
    }

    button:nth-child(2) {
        transform: translateX(calc(-50% + 94px));
    }
}

/* Bouton de fin : seul en piste, donc centré */
button.letsgo-btn {
    left: 50%;
    transform: translateX(-50%);
    width: min(260px, calc(100vw - 40px));
    height: 54px;
    font-size: 1.2em;
    background: #e94d58;
    color: white;
}
