.covoiturage-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    animation: fadeIn 0.3s ease-out;
}

.covoiturage-modal.closing {
    animation: fadeOut 0.3s ease-out;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.modal-content {
    position: relative;
    margin: clamp(20px, 5vh, 50px) auto;
    width: clamp(320px, 90vw, 1400px);
    height: clamp(400px, 85vh, 900px);
    background: white;
    border-radius: 8px;
    padding: 20px;
    animation: slideUp 0.3s ease-out;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.covoiturage-modal.closing .modal-content {
    animation: slideDown 0.3s ease-out;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 30px;
    border: none;
    background: none;
    cursor: pointer;
    z-index: 1;
    transition: transform 0.2s;
    color: #333;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    transform: scale(1.2) rotate(90deg);
    color: #000;
}

.modal-content iframe {
    width: 100%;
    height: calc(100% - 40px);
    border: none;
    border-radius: 4px;
}

/* Responsive breakpoints */
@media (max-width: 1024px) {
    .modal-content {
        width: 95vw;
        height: 90vh;
        margin: 20px auto;
    }
}

@media (max-width: 768px) {
    .modal-content {
        width: 100vw;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        padding: 10px;
    }

    .modal-close {
        top: 5px;
        right: 5px;
        font-size: 24px;
    }
}

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

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

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

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

/* Styles du bouton covoiturage */
a.covoituragesimple {
    background: none repeat scroll 0 0 black;
    color: white;
    display: inline-block;
    position: relative;
    padding: 10px 20px 10px 10px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

a.covoituragesimple:hover {
    background-color: #333;
}

a.covoituragesimple .covtext {
    padding-left: 40px;
}

a.covoituragesimple .covicon {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 40px;
    height: 31px;
    display: inline-block;
    background-image: url('/images/logo/current/logo.svg');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

a.covoituragesimple .covnbannonce {
    font-weight: bold;
    opacity: 0.9;
}