/* ==========================================================================
   CTA Buttons - "Parlons-en" avec effet survol et néon
   Repositionnement en bas de la tuile (superposition)
   ========================================================================== */

/* Container service-cta - Positionné en bas de la card */
.service-card {
    position: relative;
    overflow: visible !important; /* Permet au bouton de dépasser */
    padding-bottom: 28px; /* Espace pour le bouton en superposition - ENCORE RÉDUIT */
    cursor: pointer; /* Indique que la tuile est cliquable */
}

/* Container du bouton CTA */
.service-card .service-cta {
    position: absolute;
    bottom: -22px; /* Superposition : moitié dans / moitié hors */
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 250px; /* Largeur réduite pour boutons moins larges */
    z-index: 5;

    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease-out; /* Plus rapide pour meilleure réactivité */
}

/* Affichage au survol de la tuile */
.service-card:hover .service-cta {
    opacity: 1;
    visibility: visible;
    bottom: -27px; /* Légèrement plus bas au survol */
}

/* Force l'affichage via JavaScript (fix problème de réactivité après scroll) */
.service-cta.force-visible {
    opacity: 1 !important;
    visibility: visible !important;
    bottom: -27px !important;
}

/* Le bouton CTA lui-même */
.service-cta-btn {
    width: 100%;
    padding: 18px 32px; /* Plus grand */
    border: none;
    border-radius: 8px;
    font-size: 1.15rem; /* Plus gros texte */
    font-weight: 600;
    color: white !important;
    cursor: pointer;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);

    /* Masquer le texte original et remplacer par "Parlons-en" */
    font-size: 0; /* Cache le texte original */
}

/* Afficher "Parlons-en" via CSS */
.service-cta-btn::after {
    content: "Parlons-en";
    font-size: 1.15rem; /* Restaurer la taille du texte */
    font-weight: 600;
}

/* Icône SVG dans le bouton */
.service-cta-btn svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

/* Supprimer les <br> dans les boutons (hérités du contenu) */
.service-cta-btn br {
    display: none;
}

/* Effet néon sur la tuile au survol */
.filiale-page.ia .service-card:hover {
    box-shadow: 0 0 30px rgba(57, 169, 53, 0.5),
                0 8px 24px rgba(0, 0, 0, 0.12);
}

.filiale-page.core .service-card:hover {
    box-shadow: 0 0 30px rgba(252, 62, 160, 0.5),
                0 8px 24px rgba(0, 0, 0, 0.12);
}

.filiale-page.networks .service-card:hover {
    box-shadow: 0 0 30px rgba(239, 122, 78, 0.5),
                0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Couleurs des boutons par filiale */
.filiale-page.ia .service-cta-btn {
    background: linear-gradient(135deg, var(--everdata-ia-vert) 0%, #2d8829 100%);
}

.filiale-page.core .service-cta-btn {
    background: linear-gradient(135deg, var(--everdata-core-rose) 0%, #d93388 100%);
}

.filiale-page.networks .service-cta-btn {
    background: linear-gradient(135deg, var(--everdata-networks-orange) 0%, #d66540 100%);
}

/* Effet néon sur le bouton au survol */
.filiale-page.ia .service-cta-btn:hover {
    box-shadow: 0 0 25px rgba(57, 169, 53, 0.8),
                0 4px 20px rgba(0, 0, 0, 0.3);
    transform: scale(1.05);
}

.filiale-page.core .service-cta-btn:hover {
    box-shadow: 0 0 25px rgba(252, 62, 160, 0.8),
                0 4px 20px rgba(0, 0, 0, 0.3);
    transform: scale(1.05);
}

.filiale-page.networks .service-cta-btn:hover {
    box-shadow: 0 0 25px rgba(239, 122, 78, 0.8),
                0 4px 20px rgba(0, 0, 0, 0.3);
    transform: scale(1.05);
}

/* ==========================================================================
   Modal de contact
   ========================================================================== */

/* Masquer le modal par défaut (pas sur page d'accueil) */
.contact-modal {
    display: none !important; /* Forcé à none par défaut */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

/* Afficher seulement sur les pages filiales et Core */
body.page-template-template-filiale .contact-modal,
body.page-template-template-everdata-core .contact-modal {
    display: none; /* none par défaut, flex quand .active */
}

body.page-template-template-filiale .contact-modal.active,
body.page-template-template-everdata-core .contact-modal.active {
    display: flex !important;
}

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

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

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    position: relative;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--color-neutral-500);
    transition: color 0.2s;
    padding: 0;
    width: 32px;
    height: 32px;
    line-height: 32px;
}

.modal-close:hover {
    color: var(--color-neutral-800);
}

.modal-header h2 {
    color: var(--everdata-bleu-marine);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.modal-header p {
    color: var(--color-neutral-600);
    font-size: 0.95rem;
    margin-bottom: 30px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    color: var(--color-neutral-700);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.contact-form input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--color-neutral-300);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.contact-form input:focus {
    outline: none;
    border-color: var(--everdata-bleu-marine);
    box-shadow: 0 0 0 3px rgba(30, 44, 82, 0.1);
}

.contact-form .submit-button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

/* Couleurs du modal selon la filiale - VERSION RENFORCÉE */

/* IA - VERT #39A935 */
.filiale-page.ia .contact-form .submit-button {
    background: linear-gradient(135deg, #39A935 0%, #2d8829 100%) !important;
}

.filiale-page.ia .contact-form input:focus,
.filiale-page.ia .contact-form input:focus-visible {
    border-color: #39A935 !important;
    border-width: 2px !important;
    box-shadow: 0 0 0 4px rgba(57, 169, 53, 0.25) !important;
}

.filiale-page.ia .modal-header h2 {
    color: #39A935 !important;
}

.filiale-page.ia .modal-content {
    border-top: 4px solid #39A935;
}

/* CORE - ROSE #FC3EA0 */
.filiale-page.core .contact-form .submit-button {
    background: linear-gradient(135deg, #FC3EA0 0%, #d93388 100%) !important;
}

.filiale-page.core .contact-form input:focus,
.filiale-page.core .contact-form input:focus-visible {
    border-color: #FC3EA0 !important;
    border-width: 2px !important;
    box-shadow: 0 0 0 4px rgba(252, 62, 160, 0.25) !important;
}

.filiale-page.core .modal-header h2 {
    color: #FC3EA0 !important;
}

.filiale-page.core .modal-content {
    border-top: 4px solid #FC3EA0;
}

/* NETWORKS - ORANGE #EF7A4E */
.filiale-page.networks .contact-form .submit-button {
    background: linear-gradient(135deg, #EF7A4E 0%, #d66540 100%) !important;
}

.filiale-page.networks .contact-form input:focus,
.filiale-page.networks .contact-form input:focus-visible {
    border-color: #EF7A4E !important;
    border-width: 2px !important;
    box-shadow: 0 0 0 4px rgba(239, 122, 78, 0.25) !important;
}

.filiale-page.networks .modal-header h2 {
    color: #EF7A4E !important;
}

.filiale-page.networks .modal-content {
    border-top: 4px solid #EF7A4E;
}

.contact-form .submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.contact-form .submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Message de confirmation */
.confirmation-message {
    text-align: center;
    padding: 40px 20px;
}

.confirmation-message .success-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.confirmation-message h3 {
    color: var(--everdata-bleu-marine);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.confirmation-message p {
    color: var(--color-neutral-600);
    font-size: 1rem;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .service-card .service-cta {
        position: static;
        opacity: 1;
        visibility: visible;
        margin-top: 20px;
        transform: none;
        width: 100%;
        max-width: none;
    }

    /* Modale de contact - centrage parfait et pas de rognage */
    .contact-modal {
        padding: 1rem !important;
        box-sizing: border-box !important;
    }

    .modal-content {
        padding: 25px 15px !important;
        width: calc(100% - 2rem) !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
    }

    .modal-header h2 {
        font-size: 1.4rem !important;
    }

    .modal-header p {
        font-size: 0.9rem !important;
        margin-bottom: 20px !important;
    }

    .contact-form .form-group {
        margin-bottom: 15px !important;
    }

    .contact-form input {
        padding: 10px 12px !important;
        font-size: 0.95rem !important;
    }

    .contact-form .submit-button {
        padding: 12px !important;
        font-size: 1rem !important;
    }
}

@media (max-width: 480px) {
    .contact-modal {
        padding: 0.5rem !important;
    }

    .modal-content {
        padding: 20px 12px !important;
        width: calc(100% - 1rem) !important;
        border-radius: 12px !important;
    }

    .modal-close {
        top: 12px !important;
        right: 12px !important;
        font-size: 24px !important;
    }

    .modal-header h2 {
        font-size: 1.25rem !important;
        padding-right: 30px !important;
    }
}

/* ============================================
   PAGE IA - STYLES SPECIFIQUES
   ============================================ */

/* Bannière statistiques */
.ia-stats-banner {
    display: flex;
    justify-content: center;
    gap: 40px;
    background: transparent;
    border: 2px solid var(--everdata-ia-vert, #39A935);
    border-radius: 12px;
    padding: 30px 40px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.stat-item {
    text-align: center;
    color: #333;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #39A935;
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #555;
    margin-top: 5px;
}

/* Section différenciateurs */
.ia-differentiators {
    margin-top: 50px;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 12px;
}

.ia-differentiators h3 {
    text-align: center;
    color: var(--everdata-bleu-marine, #1E2C52);
    margin-bottom: 30px;
}

.differentiator-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.differentiator-item {
    text-align: center;
    padding: 20px;
}

.differentiator-item strong {
    display: block;
    color: var(--everdata-ia-vert, #39A935);
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.differentiator-item p {
    margin: 0;
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 1024px) {
    .ia-stats-banner {
        flex-wrap: wrap;
        gap: 30px;
    }
    
    .differentiator-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ia-stats-banner {
        flex-direction: column;
        gap: 20px;
        padding: 25px 20px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .differentiator-grid {
        grid-template-columns: 1fr;
    }
    
    .ia-differentiators {
        padding: 30px 20px;
    }
}
