/* Styles pour la page questions */
.questions-page {
    background-color: var(--background-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.questions-content {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 1rem;
    margin-top: 60px; /* Pour éviter le chevauchement avec le header */
}

.question-counter {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-top: 1rem;
}

.question-card {
    background: #000;
    border-radius: 20px;
    padding: 3rem;
    width: 90%;
    max-width: 800px;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.question-text {
    text-align: center;
}

.question-text h1 {
    font-size: 2.5rem;
    line-height: 1.5;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
}

.highlight {
    background: white;
    color: black;
    padding: 0.2rem 0.5rem;
    margin: 0 0.2rem;
}

/* Style pour le conteneur des boutons d'action */
.answer-buttons {
    display: flex;
    gap: 1.5rem;
    width: 100%;
    max-width: 600px;
    margin-bottom: 2rem;
    justify-content: center;
}

/* Style commun pour les boutons principaux */
.view-answers-button, .record-button {
    flex: 1;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    border: none;
}

/* Style spécifique pour le bouton voir les réponses */
.view-answers-button {
    background-color: #1e1f28d6;
    color: #fff;
}

/* Style spécifique pour le bouton d'enregistrement */
.record-button {
    background: transparent;
    background-color: #1e1f2862;
    border: 1px solid #3B3EFF;
    color: white;
}

.record-button:hover,
.view-answers-button:hover {
    background-color: #3B3EFF;
}

/* Style pour les icônes */
.icon {
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Disposition des boutons */
.question-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

/* Style pour les boutons de navigation */
.navigation-buttons {
    display: flex;
    gap: 1rem;
}

.prev-button {
    background-color: #1E1F28;
}

.nav-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #355de6, #0032ff);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 108, 247, 0.2);
}

.nav-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 108, 247, 0.3);
}

.nav-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(74, 108, 247, 0.2);
}

.nav-button.premium-button {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    box-shadow: 0 4px 15px rgba(255, 165, 0, 0.2);
}

.nav-button.premium-button:hover {
    box-shadow: 0 6px 20px rgba(255, 165, 0, 0.3);
}

.nav-button .icon {
    font-size: 1.2rem;
}

.nav-button.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Style pour le pop-in */
.answer-popin {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.popin-content {
    background: var(--background-dark);
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 850px;
/*     box-shadow: 0 10px 30px var(--overlay-light-dark);*/
/*    border: 1px solid rgba(255, 255, 255, 0.1);*/
}

.popin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.popin-header h2 {
    color: white;
    font-size: 1.5rem;
    font-weight: 500;
}

.close-button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-button:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.answer-input {
    width: 100%;
    min-height: 150px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    color: white;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.answer-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Style pour le pop-in d'historique */
.answer-history-popin {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.answers-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    margin-top: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(255, 255, 255, 0.1);
}

.answers-list::-webkit-scrollbar {
    width: 6px;
}

.answers-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.answers-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.answer-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.answer-item:hover {
    transform: translateX(5px);
    border-color: rgba(26, 115, 232, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.answer-content {
    flex: 1;
}

.answer-text {
    color: white;
    margin-bottom: 1rem;
    line-height: 1.5;
    font-size: 1.1rem;
    white-space: pre-wrap;
}

.answer-date {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.answer-date::before {
    content: '🕒';
    margin-right: 6px;
    font-size: 0.9rem;
}

/* Animation d'entrée pour les réponses */
@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.answer-item {
    animation: slideInFromRight 0.3s ease forwards;
    animation-delay: calc(var(--item-index) * 0.1s);
}

/* Style pour l'item de réponse avec bouton de suppression */
.delete-answer-button {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.answer-item:hover .delete-answer-button {
    opacity: 0.6;
}

.delete-answer-button:hover {
    opacity: 1 !important;
    background: rgba(255, 59, 48, 0.1);
    transform: scale(1.1);
}

.delete-icon {
    font-size: 1.2rem;
}

/* Animation de suppression */
@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Style pour la question dans l'historique */
.answer-item .question-text {
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-style: italic;
}

/* Style pour le popin footer et sa question */
.popin-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.question-reminder {
    background: #000;
    border-radius: 12px;
    padding: 2rem;
    width: 100%;
    text-align: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 30px solid white;
}

.question-reminder h2 {
    font-size: 1.8rem;
    text-transform: uppercase;
    line-height: 1.4;
    font-weight: 600;
    color: white;
}

.popin-footer button {
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.popin-footer .cancel-button {
    background-color: #1e1f2862;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.popin-footer .cancel-button:hover {
    background-color: #1e1f28;
}

.popin-footer .save-button {
    background-color: var(--primary-color);
    color: white;
}

.popin-footer .save-button:hover {
    background-color: var(--primary-dark);
    transform: scale(1.02);
}

/* Styles pour les notifications toast */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem 2rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1100;
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast.success {
    background: #4CAF50;
}

.toast.error {
    background: #f44336;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Mobile styles */
@media screen and (max-width: 768px) {
    .questions-page {
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
        padding-top: 60px; /* Espace pour le header */
    }

    .questions-content {
        display: flex;
        flex-direction: column;
        padding: 0.5rem;
        padding-bottom: calc(140px + 1rem);
        position: relative;
        z-index: 1;
    }

    .question-counter {
        margin: 0.5rem 0;
        font-size: 0.8rem;
    }

    .question-card {
        margin-top: 1rem;
        height: 35vh;
        padding: 1rem;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        aspect-ratio: auto;
        position: relative;
        border:30px solid white;
        z-index: 2;
    }

    .question-text h1 {
        font-size: 1.7rem;
        line-height: 1.3;
        padding: 0 0.5rem;
    }

    .question-actions {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: rgba(0, 0, 0, 0.2);
        padding: 1rem;
        backdrop-filter: blur(10px);
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 100;
    }

    .answer-buttons {
        display: flex;
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .navigation-buttons {
        display: flex;
        gap: 1rem;
    }

    .nav-button,
    .record-button,
    .view-answers-button {
        flex: 1;
        white-space: nowrap;
        padding: 0.8rem;
        font-size: 0.9rem;
    }
}

.next-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.upgrade-message {
    display: none;
    background-color: #f8f9fa;
    border: 1px solid #3B3EFF;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.upgrade-message p {
    margin-bottom: 15px;
    color: #333;
}

.upgrade-button {
    background-color: #3B3EFF;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.upgrade-button:hover {
    background-color: #2A2DFF;
}

/* Styles spécifiques pour le modal mobile */
@media screen and (max-width: 768px) {
    .answer-popin {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        transition: opacity 0.3s ease;
        opacity: 0;
    }

    .answer-popin.active {
        opacity: 1;
    }

    .answer-popin .popin-content {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        height: 80vh;
        background: var(--background-dark);
        border-radius: 20px 20px 0 0;
        padding: 1.5rem;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .answer-popin.active .popin-content {
        transform: translateY(0);
    }

    .popin-header {
        position: relative;
        padding-top: 1.5rem;
        margin-bottom: 1rem;
        text-align: center;
        cursor: grab;
        touch-action: none;
        user-select: none;
        -webkit-user-select: none;
    }

    .popin-header:active {
        cursor: grabbing;
    }

    .drag-indicator {
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 5px;
        background-color: rgba(255, 255, 255, 0.2);
        border-radius: 100px;
        transition: background-color 0.2s ease;
    }

    .popin-header:active .drag-indicator {
        background-color: rgba(255, 255, 255, 0.4);
    }

    .popin-header h2 {
        font-size: 1.2rem;
        margin-top: 0.5rem;
    }

    .close-button {
        position: absolute;
        right: 0;
        top: 1.5rem;
    }

    .question-reminder {
        background: rgba(0, 0, 0, 0.3);
        border-radius: 12px;
        padding: 1rem;
        margin: 1rem 0;
    }

    .question-reminder h2 {
        font-size: 1rem;
        line-height: 1.4;
    }

    .answer-input {
        height: calc(100% - 250px);
        margin: 1rem 0;
        background: rgba(0, 0, 0, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .popin-footer {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 1rem 1.5rem;
        background: var(--background-dark);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .popin-footer button {
        min-width: 100px;
    }
}

.guest-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    z-index: 100;
}

.guest-content {
    max-width: 600px;
    margin: 0 auto;
    color: white;
    text-align: center;
}

.guest-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.guest-star {
    font-size: 1.8rem;
}

.guest-description {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.guest-features {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.guest-features li {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.guest-cta {
    margin-top: 1.5rem;
}

.auth-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: #3B3EFF;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.auth-button:hover {
    background: #2a2db3;
    transform: translateY(-2px);
}

.guest-note {
    margin-top: 0.8rem;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Styles pour mobile */
@media screen and (max-width: 768px) {
    .guest-container {
        padding: 1rem;
    }

    .guest-title {
        font-size: 1.2rem;
    }

    .guest-features li {
        font-size: 1rem;
    }

    .auth-button {
        padding: 0.8rem 1.5rem;
        width: 100%;
    }
}

/* Styles pour le changeur de fond d'écran */
.background-changer {
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 1rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.background-changer:hover {
    opacity: 1;
}

.background-change-link {
    background: none;
    border: none;
    color: white;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    background: rgba(255, 255, 255, 0.1);
}

.background-change-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.background-change-link .icon {
    font-size: 1.1rem;
}
