/* ========================================
   NOS CONTACTS - TOPCENTER
   Charte: #0D4FD8 (bleu) & #FF772A (orange)
   ======================================== */

/* Variables CSS */
:root {
    --topcenter-blue: #0D4FD8;
    --topcenter-orange: #FF772A;
    --topcenter-blue-light: rgba(13, 79, 216, 0.1);
    --topcenter-orange-light: rgba(255, 119, 42, 0.1);
    --topcenter-blue-dark: #0a3db0;
}

/* Hero Section */
.hero-contacts {
    background: linear-gradient(135deg, var(--topcenter-blue) 0%, var(--topcenter-orange) 100%);
    color: white;
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.hero-contacts::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.2;
}

.hero-contacts .display-4 {
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.hero-contacts .lead {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: 2rem;
}

/* Section Informations de Contact */
.contact-info-section {
    padding: 4rem 0;
    background: #f8f9fa;
}

.contact-title {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-title h2 {
    color: var(--topcenter-blue);
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.contact-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--topcenter-blue), var(--topcenter-orange));
    border-radius: 2px;
}

.contact-title .subtitle {
    color: #6c757d;
    font-size: 1.125rem;
    font-weight: 400;
}

/* Contact Cards */
.contact-card {
    background: white;
    border: none;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    text-align: center;
    height: 100%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--topcenter-blue), var(--topcenter-orange));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.contact-card:hover::before {
    transform: scaleX(1);
}

/* Icons de contact */
.contact-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--topcenter-blue-light), var(--topcenter-orange-light));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--topcenter-blue);
    transition: all 0.3s ease;
}

.contact-card:nth-child(2) .contact-icon {
    background: var(--topcenter-orange-light);
    color: var(--topcenter-orange);
}

.contact-card:hover .contact-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 20px rgba(13, 79, 216, 0.2);
}

.contact-card:nth-child(2):hover .contact-icon {
    box-shadow: 0 8px 20px rgba(255, 119, 42, 0.3);
}

/* Contenu des cartes */
.contact-card .card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--topcenter-blue);
    margin-bottom: 1rem;
}

.contact-card:nth-child(2) .card-title {
    color: var(--topcenter-orange);
}

.contact-card .card-text {
    color: #6c757d;
    line-height: 1.6;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

/* Numéros de téléphone cliquables */
.phone-link {
    color: var(--topcenter-blue);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.phone-link:hover {
    color: var(--topcenter-blue-dark);
    text-decoration: underline;
}

.contact-card:nth-child(2) .phone-link {
    color: var(--topcenter-orange);
}

.contact-card:nth-child(2) .phone-link:hover {
    color: #e6671f;
}

/* Adresse cliquable Google Maps */
.address-link {
    color: #6c757d;
    text-decoration: none;
    font-weight: 500;
    display: block;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.address-link:hover {
    color: var(--topcenter-blue);
    text-decoration: underline;
}

/* Section Formulaire de Contact */
.formulaire-section {
    padding: 4rem 0;
    background: white;
}

.form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.form-title {
    text-align: center;
    margin-bottom: 3rem;
}

.form-title h3 {
    color: var(--topcenter-blue);
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.form-title p {
    color: #6c757d;
    font-size: 1.125rem;
}

/* Styles du formulaire */
.contact-form .form-control {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    transition: all 0.2s ease;
    box-shadow: none;
}

.contact-form .form-control:focus {
    border-color: var(--topcenter-blue);
    box-shadow: 0 0 0 0.2rem var(--topcenter-blue-light);
    transform: translateY(-1px);
}

.contact-form .form-control::placeholder {
    color: #adb5bd;
}

.contact-form .form-label {
    color: var(--topcenter-blue);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.contact-form .btn-primary {
    background: linear-gradient(135deg, var(--topcenter-blue), var(--topcenter-orange));
    border: none;
    border-radius: 30px;
    padding: 0.875rem 2rem;
    font-weight: 600;
    width: 100%;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.contact-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(13, 79, 216, 0.3);
}

/* Section Carte Google Maps */
.map-section {
    padding: 4rem 0;
    background: #f8f9fa;
}

.map-container {
    position: relative;
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.map-placeholder {
    height: 100%;
    background: linear-gradient(135deg, var(--topcenter-blue-light), var(--topcenter-orange-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--topcenter-blue);
    font-size: 1.25rem;
    text-align: center;
    padding: 2rem;
}

.map-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

/* CTA Section */
.cta-contacts {
    background: linear-gradient(135deg, var(--topcenter-blue) 0%, var(--topcenter-orange) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.cta-contacts h2 {
    font-weight: 700;
    font-size: 2.25rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.cta-contacts .lead {
    font-size: 1.125rem;
    opacity: 0.95;
    margin-bottom: 2rem;
}

/* Boutons CTA */
.btn-contact-primary {
    background: white;
    color: var(--topcenter-blue);
    border: 2px solid white;
    border-radius: 30px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin: 0 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-contact-primary:hover {
    background: transparent;
    color: white;
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.btn-contact-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
    border-radius: 30px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin: 0 0.5rem;
}

.btn-contact-secondary:hover {
    background: white;
    color: var(--topcenter-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contact-card {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.contact-card:nth-child(1) { animation-delay: 0.1s; }
.contact-card:nth-child(2) { animation-delay: 0.2s; }
.contact-card:nth-child(3) { animation-delay: 0.3s; }

/* Responsive */
@media (max-width: 992px) {
    .contact-title h2 {
        font-size: 2rem;
    }
    
    .contact-card {
        margin-bottom: 2rem;
    }
    
    .map-container {
        height: 400px;
    }
    
    .form-title h3 {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {
    .hero-contacts {
        padding: 3rem 0 2.5rem;
    }
    
    .hero-contacts .display-4 {
        font-size: 2rem;
    }
    
    .contact-info-section,
    .formulaire-section,
    .map-section,
    .cta-contacts {
        padding: 3rem 0;
    }
    
    .contact-title h2 {
        font-size: 1.75rem;
    }
    
    .contact-card {
        padding: 2rem 1.5rem;
    }
    
    .contact-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .map-container {
        height: 350px;
    }
    
    .btn-contact-primary,
    .btn-contact-secondary {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .d-flex.flex-md-row {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    .contact-form .form-control {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-contacts .display-4 {
        font-size: 1.75rem;
    }
    
    .contact-card .card-title {
        font-size: 1.125rem;
    }
    
    .phone-link {
        font-size: 1rem;
    }
    
    .form-title h3 {
        font-size: 1.5rem;
    }
    
    .map-container {
        height: 300px;
    }
}

/* Accessibilité */
.contact-card:focus-within,
.form-control:focus {
    outline: 2px solid var(--topcenter-blue);
    outline-offset: 2px;
}

.phone-link:focus,
.address-link:focus {
    outline: 2px solid var(--topcenter-blue);
    outline-offset: 2px;
    border-radius: 4px;
    background: var(--topcenter-blue-light);
    padding: 2px 4px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .contact-card,
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    
    .contact-card:hover {
        transform: none;
    }
}

/* Print */
@media print {
    .hero-contacts,
    .cta-contacts {
        background: white !important;
        color: black !important;
        -webkit-print-color-adjust: exact;
    }
    
    .contact-card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
    
    .map-container {
        display: none;
    }
}