/* Animations magnifiques pour la page contact */

/* Animation du header de page */
.page-header {
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateY(0) scale(1);
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.page-header:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 15px 35px rgba(40, 167, 69, 0.3);
}

/* Animation du titre principal */
.page-header h1 {
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateX(0);
    position: relative;
    z-index: 2;
}

.page-header:hover h1 {
    transform: translateX(-10px) scale(1.05);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Animation de l'icône enveloppe */
.page-header h1 .fas.fa-envelope {
    transition: all 0.4s ease;
    display: inline-block;
}

.page-header:hover h1 .fas.fa-envelope {
    transform: rotate(-10deg) scale(1.2) translateY(-3px);
    color: #ffc107;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: rotate(-10deg) scale(1.2) translateY(-3px); }
    50% { transform: rotate(-10deg) scale(1.2) translateY(-8px); }
}

/* Animation du paragraphe lead */
.page-header .lead {
    transition: all 0.4s ease;
    transform: translateX(0);
    position: relative;
    z-index: 2;
}

.page-header:hover .lead {
    transform: translateX(-5px);
    color: #f8f9fa;
}

/* Animation des badges */
.page-header .badge {
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.page-header:hover .badge {
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Animation de l'icône comments */
.page-header .fas.fa-comments {
    transition: all 0.5s ease;
}

.page-header:hover .fas.fa-comments {
    transform: rotate(5deg) scale(1.1);
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: rotate(5deg) scale(1.1); }
    50% { transform: rotate(5deg) scale(1.2) translateY(-10px); }
}

/* Animation des alertes */
.alert {
    transition: all 0.4s ease;
    transform: translateY(0) scale(1);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.alert:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.alert-danger:hover {
    border-left: 5px solid #dc3545;
}

.alert-success:hover {
    border-left: 5px solid #28a745;
}

/* Animation des cartes de formulaire */
.contact-section .card {
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateY(0) scale(1);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.contact-section .card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Animation du header de carte */
.contact-section .card-header {
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
}

.contact-section .card:hover .card-header {
    transform: translateY(-2px);
}

.contact-section .card-header.bg-success:hover {
    background: linear-gradient(135deg, #218838, #1e7e34) !important;
}

.contact-section .card-header.bg-primary:hover {
    background: linear-gradient(135deg, #0056b3, #004085) !important;
}

.contact-section .card-header.bg-info:hover {
    background: linear-gradient(135deg, #0c5460, #063541) !important;
}

/* Animation des icônes de header */
.contact-section .card-header .fas {
    transition: all 0.3s ease;
}

.contact-section .card:hover .card-header .fas.fa-paper-plane {
    transform: rotate(-10deg) scale(1.2);
    animation: fly 2s ease-in-out infinite;
}

@keyframes fly {
    0%, 100% { transform: rotate(-10deg) scale(1.2); }
    50% { transform: rotate(-10deg) scale(1.3) translateY(-3px); }
}

.contact-section .card:hover .card-header .fas.fa-info-circle {
    transform: rotate(10deg) scale(1.2);
}

.contact-section .card:hover .card-header .fas.fa-share-alt {
    transform: rotate(-5deg) scale(1.2);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: rotate(-5deg) scale(1.2); }
    50% { transform: rotate(-5deg) scale(1.3); }
}

/* Animation des champs de formulaire */
.contact-section .form-control,
.contact-section .form-select {
    transition: all 0.3s ease;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.contact-section .form-control:focus,
.contact-section .form-select:focus {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 8px 16px rgba(40, 167, 69, 0.2);
    border-color: #28a745;
}

/* Animation des labels */
.contact-section .form-label {
    transition: all 0.3s ease;
    position: relative;
}

.contact-section .form-label .fas {
    transition: all 0.3s ease;
}

.contact-section .form-control:focus + .form-label .fas,
.contact-section .form-select:focus + .form-label .fas {
    transform: scale(1.2) rotate(5deg);
    color: #28a745;
}

/* Animation des boutons */
.contact-section .btn {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-section .btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.contact-section .btn-success:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 30px rgba(40, 167, 69, 0.4);
    background: linear-gradient(135deg, #218838, #1e7e34);
}

.contact-section .btn-outline-secondary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 20px rgba(108, 117, 125, 0.3);
}

/* Effet de vague sur les boutons */
.contact-section .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.8s, height 0.8s;
    z-index: 0;
}

.contact-section .btn:hover::before {
    width: 400px;
    height: 400px;
}

.contact-section .btn .fas {
    position: relative;
    z-index: 1;
}

/* Animation des checkboxes */
.contact-section .form-check-input {
    transition: all 0.3s ease;
}

.contact-section .form-check-input:checked {
    transform: scale(1.2);
    background-color: #28a745;
    border-color: #28a745;
}

.contact-section .form-check-label {
    transition: all 0.3s ease;
}

.contact-section .form-check-input:checked + .form-check-label {
    color: #28a745;
    font-weight: 600;
}

/* Animation des coordonnées */
.contact-section .card-body h6 {
    transition: all 0.3s ease;
    position: relative;
}

.contact-section .card:hover .card-body h6 {
    transform: translateX(5px);
}

.contact-section .card:hover .card-body h6 .fas {
    transform: scale(1.2) rotate(5deg);
}

.contact-section .card:hover .card-body h6 .fas.fa-map-marker-alt {
    color: #dc3545;
    animation: bounce 2s ease-in-out infinite;
}

.contact-section .card:hover .card-body h6 .fas.fa-phone {
    color: #28a745;
    animation: ring 1.5s ease-in-out infinite;
}

@keyframes ring {
    0%, 100% { transform: scale(1.2) rotate(5deg); }
    25% { transform: scale(1.2) rotate(15deg); }
    75% { transform: scale(1.2) rotate(-5deg); }
}

.contact-section .card:hover .card-body h6 .fas.fa-envelope {
    color: #007bff;
    animation: shake 2s ease-in-out infinite;
}

@keyframes shake {
    0%, 100% { transform: scale(1.2) rotate(5deg); }
    25% { transform: scale(1.2) rotate(-5deg); }
    75% { transform: scale(1.2) rotate(5deg); }
}

.contact-section .card:hover .card-body h6 .fas.fa-clock {
    color: #ffc107;
    animation: tick 1s ease-in-out infinite;
}

@keyframes tick {
    0%, 100% { transform: scale(1.2) rotate(5deg); }
    50% { transform: scale(1.2) rotate(15deg); }
}

/* Animation des réseaux sociaux */
.contact-section .fab {
    transition: all 0.3s ease;
    display: inline-block;
}

.contact-section .fab:hover {
    transform: translateY(-5px) scale(1.2) rotate(5deg);
}

.contact-section .fab.fa-facebook:hover {
    color: #1877f2 !important;
    text-shadow: 0 4px 8px rgba(24, 119, 242, 0.4);
}

.contact-section .fab.fa-x-twitter:hover {
    color: #000000 !important;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.contact-section .fab.fa-instagram:hover {
    color: #e4405f !important;
    text-shadow: 0 4px 8px rgba(228, 64, 95, 0.4);
}

.contact-section .fab.fa-linkedin:hover {
    color: #0077b5 !important;
    text-shadow: 0 4px 8px rgba(0, 119, 181, 0.4);
}

.contact-section .fab.fa-youtube:hover {
    color: #ff0000 !important;
    text-shadow: 0 4px 8px rgba(255, 0, 0, 0.4);
}

.contact-section .fab.fa-telegram:hover {
    color: #0088cc !important;
    text-shadow: 0 4px 8px rgba(0, 136, 204, 0.4);
}

.contact-section .fab.fa-whatsapp:hover {
    color: #25d366 !important;
    text-shadow: 0 4px 8px rgba(37, 211, 102, 0.4);
}

.contact-section .fab.fa-pinterest:hover {
    color: #bd081c !important;
    text-shadow: 0 4px 8px rgba(189, 8, 28, 0.4);
}

/* Animation de la carte */
.map-section .card {
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: scale(1);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.map-section .card:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.map-section .card:hover iframe {
    transform: scale(1.05);
    transition: transform 0.5s ease;
}

/* Animation du titre de carte */
.map-section h3 {
    transition: all 0.3s ease;
}

.map-section:hover h3 {
    transform: translateX(5px);
}

.map-section:hover h3 .fas.fa-map {
    transform: rotate(10deg) scale(1.2);
    color: #dc3545;
}

/* Animation des FAQ */
.faq-section .card {
    transition: all 0.4s ease;
    transform: translateY(0) scale(1);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.faq-section .card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.faq-section .card:hover .card-title {
    transform: translateX(5px);
}

.faq-section .card:hover .card-title .fas {
    transform: scale(1.2) rotate(5deg);
}

.faq-section .card:hover .card-title .fas.fa-clock {
    color: #28a745;
    animation: tick 1s ease-in-out infinite;
}

.faq-section .card:hover .card-title .fas.fa-newspaper {
    color: #007bff;
    animation: flip 2s ease-in-out infinite;
}

@keyframes flip {
    0%, 100% { transform: scale(1.2) rotate(5deg); }
    50% { transform: scale(1.2) rotate(-5deg); }
}

.faq-section .card:hover .card-title .fas.fa-users {
    color: #6f42c1;
    animation: bounce 2s ease-in-out infinite;
}

.faq-section .card:hover .card-title .fas.fa-bug {
    color: #dc3545;
    animation: shake 1.5s ease-in-out infinite;
}

.faq-section .card:hover .card-title .fas.fa-handshake {
    color: #fd7e14;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Animation d'entrée progressive */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-header,
.alert,
.contact-section .card,
.map-section .card,
.faq-section .card {
    animation: fadeInUp 0.8s ease-out;
    animation-fill-mode: both;
}

/* Délai d'animation pour chaque élément */
.page-header { animation-delay: 0.1s; }
.alert { animation-delay: 0.2s; }
.contact-section .card:nth-child(1) { animation-delay: 0.3s; }
.contact-section .card:nth-child(2) { animation-delay: 0.4s; }
.contact-section .card:nth-child(3) { animation-delay: 0.5s; }
.map-section .card { animation-delay: 0.6s; }
.faq-section .card:nth-child(1) { animation-delay: 0.7s; }
.faq-section .card:nth-child(2) { animation-delay: 0.8s; }
.faq-section .card:nth-child(3) { animation-delay: 0.9s; }
.faq-section .card:nth-child(4) { animation-delay: 1.0s; }

/* Effet de brillance animé */
.contact-section .card::before,
.map-section .card::before,
.faq-section .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.1), 
        rgba(255, 255, 255, 0.2),
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: left 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1;
    transform: skewX(-15deg);
}

.contact-section .card:hover::before,
.map-section .card:hover::before,
.faq-section .card:hover::before {
    left: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .page-header:hover {
        transform: translateY(-3px) scale(1.005);
    }
    
    .contact-section .card:hover {
        transform: translateY(-5px) scale(1.01);
    }
    
    .map-section .card:hover {
        transform: scale(1.01);
    }
    
    .faq-section .card:hover {
        transform: translateY(-3px) scale(1.01);
    }
    
    .contact-section .btn-success:hover {
        transform: translateY(-2px) scale(1.02);
    }
    
    .contact-section .btn-outline-secondary:hover {
        transform: translateY(-2px) scale(1.02);
    }
}

@media (max-width: 576px) {
    .page-header:hover {
        transform: translateY(-2px) scale(1);
    }
    
    .contact-section .card:hover {
        transform: translateY(-3px) scale(1);
    }
    
    .map-section .card:hover {
        transform: scale(1);
    }
    
    .faq-section .card:hover {
        transform: translateY(-2px) scale(1);
    }
}

/* Animation de chargement pour le formulaire */
.contact-section form {
    position: relative;
}

.contact-section form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(40, 167, 69, 0.05) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s;
    z-index: -1;
}

.contact-section form:hover::before {
    transform: translateX(100%);
}

/* Effet de focus amélioré */
.contact-section .form-control:focus,
.contact-section .form-select:focus {
    outline: none;
    border: 2px solid #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Animation du textarea */
.contact-section textarea:focus {
    resize: vertical;
    min-height: 120px;
}

/* Animation des messages d'aide */
.contact-section .text-muted {
    transition: all 0.3s ease;
}

.contact-section .form-control:focus ~ .text-muted {
    color: #28a745;
    font-weight: 500;
}
