/* Modal CSS pour le popup plein écran */
:root {
    --primary-color: #8B1538;
    --bordeaux-red: #7A1D1D;
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --dark-gray: #333333;
    --overlay-bg: rgba(0, 0, 0, 0.75);
    --modal-radius: 12px;
    --transition-speed: 0.3s;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-bg);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-speed), visibility var(--transition-speed);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.modal-container {
    width: 95%;
    max-width: 1200px;
    height: 95vh;
    background-color: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform var(--transition-speed);
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Pour les écrans desktop, occuper tout l'espace */
@media (min-width: 1200px) {
    .modal-container {
        width: 100%;
        height: 100vh;
        max-width: none;
        border-radius: 0;
    }
    
    .modal-header {
        border-top-left-radius: 0;
        border-top-right-radius: 0;
    }
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

/* Modal Header */
.modal-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 25px 30px;
    background-color: transparent;
    color: var(--white);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.modal-header h2,
.modal-header h2#modal-facades-title {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    color: #ffffff !important;
    text-align: center;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #333;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: all var(--transition-speed);
    text-shadow: none;
    position: absolute;
    right: 20px;
    box-shadow: none;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: scale(1.05);
    border-color: rgba(0, 0, 0, 0.2);
    color: #000;
}

/* Modal Body */
.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 0 20px 0;
    margin-top: 0;
}

/* Contenu du modal */

/* Modal Content */
.modal-content {
    padding: 20px 30px;
}

/* Logo dans le modal */
.modal-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.logo-modal {
    width: auto;
    height: 60px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo-modal:hover {
    transform: scale(1.05);
}

.modal-content h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.5rem;
    text-align: center;
}

/* Style des cartes de services */
.services-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.service-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.2rem 1.2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(139, 21, 56, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card-img {
    margin-bottom: 1rem;
    border-radius: 10px;
    overflow: hidden;
    height: 140px;
}

.service-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(139, 21, 56, 0.08);
}

.service-card:hover .service-card-img img {
    transform: scale(1.05);
}

.service-card:hover h3 {
    color: var(--bordeaux-red);
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.service-card p {
    color: var(--dark-gray);
    line-height: 1.6;
    font-size: 1rem;
    margin: 0;
    text-align: center;
}

.services-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.service-item-modal {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.check-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    color: var(--bordeaux-red);
    font-size: 18px;
    font-weight: bold;
}

.service-category {
    color: var(--bordeaux-red);
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 0.2rem;
    font-weight: 600;
}

.service-item-modal strong {
    display: block;
    margin-bottom: 5px;
}

.service-item-modal p {
    margin: 0;
    color: var(--dark-gray);
    line-height: 1.4;
}

/* Boutons CTA */
.modal-cta {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 20px 30px;
    margin-top: 20px;
    flex-wrap: nowrap;
}

.modal-cta button {
    min-width: 160px;
    padding: 12px 15px;
    font-size: 0.95rem;
}

.modal-cta .btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 30px;
    transition: all 0.3s ease;
}

.modal-cta .btn-outline:hover {
    background-color: rgba(139, 21, 56, 0.05);
    transform: translateY(-2px);
}



/* Responsive adjustments */
@media (min-width: 1200px) {
    .modal-content h3 {
        font-size: 1.5rem;
        display: inline-block;
        margin-left: 6px;
        margin-bottom: 20px;
        vertical-align: baseline;
    }
    
    .service-category {
        display: inline-block;
        margin-bottom: 20px;
        vertical-align: middle;
        font-size: 1.1rem;
        font-style: italic;
    }
    
    .service-category:after {
        content: ":";
        margin-right: 4px;
    }
    
    /* Wrapper pour centrer les titres */
    .modal-content {
        text-align: center;
    }
    
    .services-card-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
        clear: both;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .services-card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    
    .service-card {
        padding: 1.5rem 1.2rem;
        width: 100%;
        max-width: none;
    }
    
    .service-card-img {
        height: 130px;
    }
}

@media (max-width: 576px) {
    .modal-container {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }

    .modal-cta {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        width: 100%;
    }

    .modal-cta .btn {
        flex: 1;
        min-width: auto;
        margin-bottom: 0;
        font-size: 0.9rem;
        padding: 12px 10px;
        white-space: nowrap;
    }
    
    .services-card-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        width: 100%;
        max-width: none;
        margin-left: auto;
        margin-right: auto;
        padding: 0;
    }
    
    .service-card {
        padding: 1.8rem 1.5rem;
        width: 100%;
        max-width: none;
        margin-left: auto;
        margin-right: auto;
    }
    
    .service-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.7rem;
    }
    
    .service-card-img {
        height: 140px;
        margin-bottom: 0.8rem;
    }
    
    /* Ajustements pour le titre de la catégorie de service */
    .service-category {
        font-size: 0.9rem;
        margin-bottom: 0.1rem;
    }
    
    .modal-content h3 {
        font-size: 1.5rem;
        margin-bottom: 1.2rem;
    }
    
    .modal-content {
        padding: 20px 15px;
    }
}
