/* modals.css - Styles pour les modals et overlays */

/* ===== MODAL DES SERVICES ===== */
.service-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

.service-modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--bg-color);
    border-radius: var(--radius);
    max-width: 800px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-light);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
    z-index: 10;
}

.close-modal:hover {
    color: var(--primary-color);
    background-color: var(--bg-light);
    transform: rotate(90deg);
}

#modal-service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem auto 1.5rem;
    color: white;
    font-size: 2rem;
}

#modal-service-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    padding: 0 2rem;
    color: var(--text-color);
}

#modal-service-description {
    padding: 0 2rem;
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 2rem;
}

#modal-service-features {
    padding: 0 2rem;
    margin-bottom: 3rem;
}

#modal-service-features h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

#modal-service-features ul {
    list-style: none;
    margin-left: 0;
}

#modal-service-features li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    padding-left: 2rem;
    position: relative;
}

#modal-service-features li:last-child {
    border-bottom: none;
}

#modal-service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.modal-cta {
    padding: 2rem;
    background-color: var(--bg-light);
    border-radius: 0 0 var(--radius) var(--radius);
    text-align: center;
}

/* ===== SECTION PLUS DE PROJETS ===== */
.more-projects {
    padding: var(--section-spacing) 0;
    background-color: var(--bg-light);
    animation: fadeIn 0.5s ease;
}

.more-projects .project-card {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

.more-projects .project-card:nth-child(1) { animation-delay: 0.1s; }
.more-projects .project-card:nth-child(2) { animation-delay: 0.2s; }
.more-projects .project-card:nth-child(3) { animation-delay: 0.3s; }
.more-projects .project-card:nth-child(4) { animation-delay: 0.4s; }

.hide-more-projects {
    margin-top: 2rem;
}

/* ===== RESPONSIVE MODALS ===== */
@media (max-width: 768px) {
    .modal-content {
        max-height: 90vh;
        margin: 1rem;
    }
    
    #modal-service-title {
        font-size: 2rem;
        padding: 0 1rem;
    }
    
    #modal-service-description,
    #modal-service-features {
        padding: 0 1rem;
    }
    
    .modal-cta {
        padding: 1.5rem;
    }
    
    .close-modal {
        top: 1rem;
        right: 1rem;
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .service-modal {
        padding: 0.5rem;
    }
    
    .modal-content {
        margin: 0.5rem;
    }
    
    #modal-service-title {
        font-size: 1.75rem;
    }
    
    #modal-service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin: 1.5rem auto 1rem;
    }
}

/* ===== ANIMATIONS DE TRANSITION ===== */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== STYLES POUR LES LIENS ACTIFS ===== */
.service-link.active,
.project-link.active {
    color: var(--primary-color);
    transform: translateX(5px);
}

.service-link.active i,
.project-link.active i {
    transform: translateX(5px);
}

/* ===== OVERLAY DE CHARGEMENT ===== */
.modal-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: var(--radius);
}

.modal-loading .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--bg-light);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ===== EFFET DE SURBRILLANCE ===== */
.modal-highlight {
    position: relative;
    overflow: hidden;
}

.modal-highlight::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
  }
