/* --- HACKS GLOBAUX POUR L'APP --- */
header {
    display: none !important;
}

footer {
    padding: 0.5rem 0 !important;
    font-size: 0.625rem !important;
    opacity: 0.5;
}

.touch-none {
    touch-action: none;
    overflow: hidden;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* --- CONTENEUR PRINCIPAL --- */
.vote-app {
    width: 100%;
    /* Prend désormais 100% de la largeur pour laisser la carte sortir de l'écran */
    margin: 0 auto;
    position: relative;
    padding: 0 0.25rem;
    height: 92dvh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    user-select: none;
}


/* --- GESTION DES ECRANS (SPA) --- */
.screen {
    display: none;
    margin: auto;
    /* Centre l'écran horizontalement et verticalement */
    width: 100%;
    max-width: 24rem;
    /* La limite de largeur est descendue ici ! */
}

.screen.active-flex {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.screen.active-block {
    display: block;
}

/* --- CARTES DE VOTE --- */
.cards-container {
    width: 100%;
    height: 0;
    flex-grow: 1;
    position: relative;
    margin: 0.25rem 0;
}

.vote-card {
    width: 100%;
    height: 100%;
    background-color: var(--gray-800);
    border-radius: 1.5rem;
    border: 1px solid var(--gray-700);
    padding: 1rem;
    position: absolute;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
}

.vote-cover-wrapper {
    width: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0.5rem;
}

.vote-cover {
    width: 100%;
    height: auto;
    max-height: 35dvh;
    object-fit: contain;
    pointer-events: none;
}

.vote-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin-top: 1rem;
    overflow: hidden;
}

/* --- TAMPONS (STAMPS) --- */
.stamp {
    position: absolute;
    font-weight: 900;
    font-size: 1.875rem;
    padding: 0.25rem 0.75rem;
    border-radius: 0.75rem;
    border: 4px solid;
    z-index: 50;
    pointer-events: none;
    letter-spacing: 0.1em;
    background-color: rgba(17, 24, 39, 0.8);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    opacity: 0;
}

.stamp-nope {
    top: 2rem;
    right: 1.5rem;
    border-color: #ef4444;
    color: #ef4444;
    transform: rotate(12deg);
}

.stamp-like {
    top: 2rem;
    left: 1.5rem;
    border-color: #22c55e;
    color: #22c55e;
    transform: rotate(-12deg);
}

.stamp-fav {
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    border-color: #eab308;
    color: #eab308;
    white-space: nowrap;
}

/* --- LECTEUR AUDIO --- */
.player-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: rgba(3, 7, 18, 0.6);
    padding: 0.5rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(55, 65, 81, 0.4);
    flex-shrink: 0;
    margin-bottom: 0.25rem;
}

.audio-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    color: white;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.1s;
}

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

.audio-btn.play {
    background-color: var(--blue-600);
}

.audio-btn.pause {
    background-color: var(--blue-400);
}

.progress-track {
    height: 0.375rem;
    width: 100%;
    background-color: var(--gray-800);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background-color: var(--blue-600);
    width: 0;
    transition: width 0.15s;
}

/* --- CONTROLES DE VOTE (BOUTONS BAS) --- */
.vote-controls {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    margin-top: 0.5rem;
    width: 100%;
    flex-shrink: 0;
}

.btn-action {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--gray-800);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
    transition: background-color 0.15s;
}

.btn-action.small {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1.25rem;
    border: 1px solid var(--gray-700);
}

.btn-action.large {
    width: 4rem;
    height: 4rem;
    font-size: 1.5rem;
    border: 2px solid #eab308;
}

.btn-action:disabled {
    opacity: 0.2;
    cursor: not-allowed;
    border-color: var(--gray-700);
}

/* --- MODAL --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 50;
    display: none;
}

.modal-overlay.active {
    display: block;
}

.modal-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--gray-800);
    border: 1px solid var(--gray-700);
    width: 91.666%;
    max-width: 24rem;
    border-radius: 1rem;
    padding: 1.25rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-height: 80dvh;
    display: flex;
    flex-direction: column;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: 1.25rem;
    font-weight: bold;
    cursor: pointer;
}

.modal-content-scroll {
    overflow-y: auto;
    padding-right: 0.25rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--gray-300);
    line-height: 1.6;
}

/* --- ECRAN CHARGEMENT --- */
.screen.loading-container {
    display: none;
}

/* Quand il est actif, on le passe en plein écran absolu au-dessus de TOUT */
.screen.active-block.loading-container {
    display: flex !important;
    position: fixed;
    inset: 0;
    background-color: var(--gray-900);
    z-index: 9999;
    /* Passe au-dessus du footer et du header */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.loading-icon {
    display: inline-block;
    font-size: 3.5rem;
    margin-bottom: 1.25rem;
}

.loading-text {
    color: var(--gray-400);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}