/* assets/styles/post_show.css */

/* Style général de la page */
.post-show-container {
    background-color: #f8f9fa; /* Fond légèrement gris pour distinguer les cartes */
}

/* Styles pour les cartes de la colonne de gauche (édition) */
.edit-card {
    transition: all 0.3s ease;
}

.edit-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px -8px rgba(0,0,0,0.15) !important;
}

/* Checklist de complétion */
.completion-checklist .list-group-item {
    border: none;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.completion-checklist .list-group-item .icon-status {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    transition: all 0.3s ease;
}

.completion-checklist .list-group-item.completed .icon-status {
    color: #28a745; /* Vert succès */
}

.completion-checklist .list-group-item.pending .icon-status {
    color: #ffc107; /* Jaune avertissement */
}

.completion-checklist .list-group-item.completed .status-text {
    text-decoration: line-through;
    color: #6c757d; /* Gris */
}

/* Styles pour les onglets de prévisualisation */
.preview-tabs .nav-link {
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.preview-tabs .nav-link img {
    width: 18px;
    height: 18px;
}

/* Styles pour la section Média */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.media-card {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.1);
    background: #fff;
    height: 100%;
}

.media-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.1);
}

.media-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 100%; /* Ratio 1:1 */
    overflow: hidden;
}

.media-thumbnail img,
.media-thumbnail video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-actions {
    position: absolute;
    opacity: 0;
    transition: opacity 0.2s ease;
    display: flex;
    gap: 0.25rem;
}

.media-card:hover .media-actions {
    opacity: 1;
}

.media-action-buttons {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.5rem;
}

.video-play-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.video-play-btn {
    background-color: rgba(255, 255, 255, 0.8) !important;
    border-radius: 50% !important;
    width: 50px !important;
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.5rem !important;
    padding: 0 !important;
}

.media-info {
    padding: 0.75rem;
    font-size: 0.85rem;
}

.media-filename {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

/* Style pour le glisser-déposer */
.media-card.dragging {
    opacity: 0.5;
    border: 2px dashed #0d6efd;
}

.media-card.drag-over {
    border: 2px solid #0d6efd;
    background-color: rgba(13, 110, 253, 0.1);
}

/* Accordéon pour le contenu */
.content-accordion .accordion-button {
    font-weight: 500;
}

.content-accordion .accordion-button:not(.collapsed) {
    color: #5e72e4;
    background-color: #f8f9fa;
}

.content-accordion .accordion-body {
    background-color: #fff;
}

.accordion-button .chevron-icon {
    transition: transform 0.2s ease-in-out;
    margin-left: auto;
}

.accordion-button:not(.collapsed) .chevron-icon {
    transform: rotate(-90deg);
}

/* Override default Bootstrap icon */
.accordion-button::after {
    display: none;
}

/* Astronaut-tip styles */
.astronaut-tip-container {
    position: relative;
}

.astronaut-trigger {
    cursor: pointer;
    position: relative;
}

.astronaut-image {
    width: 40px; /* Smaller size */
    height: 40px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.astronaut-trigger:hover .astronaut-image {
    transform: scale(1.1);
}

.notification-dot {
    position: absolute;
    top: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background-color: #ffc107; /* Yellow */
    border-radius: 50%;
    border: 2px solid #fff;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

.speech-bubble {
    position: absolute;
    bottom: 100%; /* Position above the trigger */
    right: 0;
    transform: translate(25%, -15px); /* Adjust position */
    width: 300px;
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid #e9ecef;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 1000;
    max-height: 250px; /* Ajout de la hauteur maximale */
    overflow-y: auto; /* Ajout du défilement vertical */
}

/* Style de la barre de défilement pour Webkit */
.speech-bubble::-webkit-scrollbar {
    width: 6px;
}

.speech-bubble::-webkit-scrollbar-track {
    background: transparent;
}

.speech-bubble::-webkit-scrollbar-thumb {
    background-color: #ced4da;
    border-radius: 3px;
}

.speech-bubble::-webkit-scrollbar-thumb:hover {
    background-color: #adb5bd;
}

.astronaut-trigger:hover + .speech-bubble, .speech-bubble:hover {
    opacity: 1;
    visibility: visible;
    transform: translate(25%, -10px);
}

.speech-bubble:before {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 20px;
    border-width: 10px;
    border-style: solid;
    border-color: #fff transparent transparent transparent;
}

.speech-bubble .tips {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 0;
}

.speech-bubble .tips li {
    padding: 0.25rem 0;
    border-bottom: 1px solid #e9ecef;
}

.speech-bubble .tips li:last-child {
    border-bottom: none;
}