* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html,
body {
    margin: 0;
    width: 100%;
    min-height: 100%;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    padding: clamp(8px, 2vw, 24px);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #101827;
    color: white;
    font-family: Arial, sans-serif;
    text-align: center;
}

section {
    width: 100%;
    max-width: 1000px;
}

#message {
    max-height: calc(100dvh - 30px);
    padding: clamp(18px, 4vw, 40px);
    overflow: auto;
    background: #1e293b;
    border-radius: 20px;
}

#texte-message {
    margin-bottom: 25px;
    white-space: pre-wrap;
    font-size: clamp(1.1rem, 3vw, 2rem);
    line-height: 1.5;
}

#diaporama {
    width: 100%;
    height: calc(100vh - 30px);
    height: calc(100dvh - 30px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: clamp(8px, 2vh, 20px);
}

#photo,
#video {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

#photo.visible,
#video.visible {
    opacity: 1;
}

#commandes {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    flex-shrink: 0;
}

button {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    background: #ec4899;
    color: white;
    font-size: 1rem;
    cursor: pointer;
}

button:hover {
    background: #db2777;
}

@media (max-width: 600px) {
    button {
        padding: 9px 13px;
        font-size: 0.9rem;
    }
}
