/**
 * Styles pour le système de Stories
 * Congrégation de l'Assomption - Province d'Afrique
 */

.stories-section {
    position: relative;
    overflow: hidden;
}

.stories-container {
    position: relative;
    min-height: 500px;
}

/* Carrousel des stories */
.stories-carousel {
    position: relative;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    min-height: 600px;
    border: 1px solid rgba(25, 118, 210, 0.1);
}

.stories-slider {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
}

.story-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.story-item.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 2;
}

.story-item.prev {
    transform: translateX(-100%);
    z-index: 1;
}

.story-item.next {
    transform: translateX(100%);
    z-index: 1;
}

/* Story image - Design professionnel */
.story-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.story-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.5s ease;
}

.story-item.active .story-image {
    transform: scale(1);
}

.story-item.active:hover .story-image {
    transform: scale(1.02);
}

/* Overlay pour les images avec texte optionnel */
.story-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
    padding: 2rem;
    color: white;
    z-index: 3;
}

.story-image-overlay h3 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Boutons d'action pour les images */
.story-actions-overlay {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    gap: 0.5rem;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.story-item.active:hover .story-actions-overlay {
    opacity: 1;
}

.story-action-btn {
    background: rgba(255, 255, 255, 0.95) !important;
    border: none !important;
    color: #1e3a8a !important;
    padding: 10px 15px !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(10px);
}

.story-action-btn:hover {
    background: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2) !important;
}

.story-action-btn:active {
    transform: translateY(0);
}

/* Boutons d'action pour les textes */
.story-text-actions {
    margin-top: 2rem;
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(25, 118, 210, 0.1);
}

.story-text-actions .story-action-btn {
    min-width: 150px;
}

/* Amélioration de l'adaptation des images */
.story-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

/* Fallback pour images manquantes */
.story-image-wrapper .d-flex {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #6c757d;
}

/* Animation d'apparition pour les images */
.story-item.active .story-image {
    animation: imageFadeIn 0.8s ease-out;
}

@keyframes imageFadeIn {
    from {
        opacity: 0;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Amélioration du texte pour meilleure lisibilité */
.story-text {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.story-text .content {
    text-align: justify;
    hyphens: auto;
}

/* Effet de brillance sur les bordures */
.story-text::before,
.story-text::after {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

/* Story text - Design élégant */
.story-text {
    width: 100%;
    max-width: 900px;
    padding: 3rem 4rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    position: relative;
}

.story-text::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #10b981 0%, #3b82f6 100%);
}

.story-text::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #8b5cf6 0%, #ec4899 100%);
}

.story-text h3 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 1.5rem;
    line-height: 1.3;
    font-family: 'Georgia', serif;
}

.story-text .content {
    font-size: 1.3rem;
    line-height: 2;
    color: #37474f;
    font-weight: 400;
    max-width: 800px;
}

.story-text .content p {
    margin-bottom: 1.5rem;
}

.story-text .content p:last-child {
    margin-bottom: 0;
}

/* Contrôles de navigation - Design moderne */
.stories-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 10;
    pointer-events: none;
}

.stories-nav-btn {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(25, 118, 210, 0.2);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: all;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.stories-nav-btn:hover {
    background: white;
    border-color: rgba(25, 118, 210, 0.5);
    transform: scale(1.15) translateY(-2px);
    box-shadow: 0 8px 24px rgba(25, 118, 210, 0.3);
}

.stories-nav-btn:active {
    transform: scale(1.05) translateY(0);
}

.stories-nav-btn i {
    font-size: 1.4rem;
    color: #1e3a8a;
    font-weight: 600;
}

.stories-prev {
    left: 1.5rem;
}

.stories-next {
    right: 1.5rem;
}

/* Indicateurs - Design amélioré */
.stories-indicators {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 10;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.story-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.story-indicator.active {
    background: white;
    border-color: white;
    transform: scale(1.4);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

.story-indicator:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.2);
}

/* Modal historique */
#historyModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.history-item {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.history-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.history-item-image {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.history-item-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #37474f;
}

.history-item-title {
    font-weight: 600;
    color: #1e3a8a;
    margin-bottom: 0.5rem;
}

.history-item-date {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

/* Responsive */
@media (max-width: 991px) {
    .stories-carousel {
        min-height: 500px;
        border-radius: 16px;
    }
    
    .stories-slider {
        height: 500px;
    }
    
    .story-text {
        padding: 2.5rem 3rem;
    }
    
    .story-text h3 {
        font-size: 1.75rem;
    }
    
    .story-text .content {
        font-size: 1.15rem;
        line-height: 1.8;
    }
}

@media (max-width: 768px) {
    .stories-section .section-title {
        font-size: 2rem !important;
    }
    
    .stories-section .lead {
        font-size: 1rem !important;
    }
    
    .stories-carousel {
        min-height: 450px;
        border-radius: 12px;
    }
    
    .stories-slider {
        height: 450px;
    }
    
    .story-item {
        padding: 0;
    }
    
    .story-text {
        padding: 2rem 1.5rem;
    }
    
    .story-text h3 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .story-text .content {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .story-image-overlay {
        padding: 1.5rem;
    }
    
    .story-image-overlay h3 {
        font-size: 1.25rem;
    }
    
    .stories-nav-btn {
        width: 48px;
        height: 48px;
    }
    
    .stories-nav-btn i {
        font-size: 1.2rem;
    }
    
    .stories-prev {
        left: 1rem;
    }
    
    .stories-next {
        right: 1rem;
    }
    
    .stories-indicators {
        padding: 0.5rem 1rem;
        gap: 0.5rem;
    }
    
    .story-indicator {
        width: 8px;
        height: 8px;
    }
}

@media (max-width: 576px) {
    .stories-carousel {
        min-height: 400px;
    }
    
    .stories-slider {
        height: 400px;
    }
    
    .story-text {
        padding: 1.5rem 1rem;
    }
    
    .story-text h3 {
        font-size: 1.25rem;
    }
    
    .story-text .content {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .stories-nav-btn {
        width: 40px;
        height: 40px;
    }
    
    .stories-nav-btn i {
        font-size: 1rem;
    }
    
    .stories-prev {
        left: 0.75rem;
    }
    
    .stories-next {
        right: 0.75rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

.story-item.fade-in {
    animation: fadeIn 0.5s ease;
}

.story-item.slide-in-right {
    animation: slideInRight 0.5s ease;
}

.story-item.slide-in-left {
    animation: slideInLeft 0.5s ease;
}

/* Animation pour les cercles flottants */
@keyframes stats-float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    50% { 
        transform: translateY(-15px) rotate(3deg); 
    }
}

