/* Section Domaines */
.domaines {
    padding-top: 4rem;
    background-color: #f9fafc;
    position: relative;
    overflow: hidden;
}

.domaines::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/logo.png') repeat;
    opacity: 0.05;
    z-index: 0;
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0a203f;
    position: relative;
    display: inline-block;
    margin-top: -2rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #3a86ff, #8338ec);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Grille des domaines */
.domaines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 1;
}

/* Cartes de domaine */
.domaine-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.domaine-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(58, 134, 255, 0.1) 0%, rgba(131, 56, 236, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.domaine-card:hover .card-bg {
    opacity: 1;
}

.card-icon {
    width: 80px;
    height: 80px;
    margin: 2rem auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3a86ff, #8338ec);
    color: white;
    border-radius: 50%;
    font-size: 1.8rem;
    box-shadow: 0 10px 20px rgba(58, 134, 255, 0.2);
    transition: all 0.3s ease;
}

.domaine-card:hover .card-icon {
    transform: scale(1.1) rotate(10deg);
}

.card-content {
    padding: 0 2rem;
    flex-grow: 1;
}

.domaine-card h3 {
    font-size: 1.3rem;
    color: #0a203f;
    margin-bottom: 1rem;
    text-align: center;
    transition: color 0.3s ease;
}

.domaine-card:hover h3 {
    color: #3a86ff;
}

.domaine-card p {
    color: #6c757d;
    text-align: center;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.card-features {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.card-features li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #495057;
}

.card-features li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: #3a86ff;
}

.btn-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 auto 2rem;
    padding: 0.8rem 1.8rem;
    background: linear-gradient(135deg, #3a86ff, #8338ec);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(58, 134, 255, 0.3);
    border: none;
    overflow: hidden;
    position: relative;
}

.btn-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn-card:hover::before {
    left: 100%;
}

.btn-card:hover {
    box-shadow: 0 6px 20px rgba(58, 134, 255, 0.4);
    transform: translateY(-2px);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.domaine-card {
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
}

.domaine-card:nth-child(1) { animation-delay: 0.1s; }
.domaine-card:nth-child(2) { animation-delay: 0.2s; }
.domaine-card:nth-child(3) { animation-delay: 0.3s; }
.domaine-card:nth-child(4) { animation-delay: 0.4s; }
.domaine-card:nth-child(5) { animation-delay: 0.5s; }
.domaine-card:nth-child(6) { animation-delay: 0.6s; }

/* Responsive */
@media (max-width: 1200px) {
    .domaines-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
    
    .domaines {
        padding: 3rem 0;
    }
}

@media (max-width: 480px) {
    .domaines-grid {
        grid-template-columns: 1fr;
    }
    
    .card-icon {
        width: 70px;
        height: 70px;
        font-size: 1.5rem;
    }
}