/* Service Section Styles */
.service {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    position: relative;
    overflow: hidden;
}

.service::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(46, 125, 50, 0.05) 0%, transparent 40%),
                radial-gradient(circle at bottom left, rgba(32, 201, 151, 0.05) 0%, transparent 40%);
    pointer-events: none;
}

.service .container {
    position: relative;
    z-index: 1;
}

/* FAQ-style glass card for services header */
.faq-intro-container {
    position: relative;
    margin-bottom: 2rem;
}

.faq-glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.faq-glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2E7D32, #20c997);
    border-radius: 16px 16px 0 0;
}

.faq-glass-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(31, 38, 135, 0.25);
}

/* Stats styling to match FAQ */
.stat-item {
    padding: 0.9rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2E7D32;
    display: block;
    margin-bottom: 0.2rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-label {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Modern Service Cards with Enhanced Hover Effect */
.service-item {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    transition: all 0.4s ease;
    border: 2px solid transparent;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.1), rgba(32, 201, 151, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
    border-radius: 16px;
}

.service-item:hover {
    border-color: #2E7D32;
    box-shadow: 0 15px 35px rgba(46, 125, 50, 0.2);
    transform: translateY(0);
    z-index: 10;
}

.service-item:hover::before {
    opacity: 1;
}

.service-img {
    position: relative;
    overflow: hidden;
    border-radius: 14px 14px 0 0;
    transition: transform 0.4s ease;
    height: 200px;
}

.service-img img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.service-item:hover .service-img {
    transform: scale(1.02);
}

.service-item:hover .service-img img {
    transform: scale(1.05);
}

.service-content {
    padding: 1.8rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s ease;
    background: linear-gradient(to bottom, rgba(255,255,255,0.9), rgba(255,255,255,1));
}

.service-item:hover .service-content {
    background: linear-gradient(to bottom, rgba(255,255,255,1), rgba(255,255,255,1));
    transform: translateY(0);
}

.service-content-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Modern and attractive service title container */
.service-title-container {
    background: linear-gradient(135deg, #2E7D32, #20c997);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    text-align: center;
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.3);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    border: none;
}

.service-title-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.8s ease;
}

.service-item:hover .service-title-container::before {
    left: 100%;
}

/* Container for icon and title together */
.service-title-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.service-title-container .service-title-icon a.h4 {
    color: white;
    transition: all 0.4s ease;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0 !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    position: relative;
    z-index: 3;
}

.service-title-container .service-title-icon i {
    color: white;
    font-size: 1.2rem;
    transition: all 0.4s ease;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    position: relative;
    z-index: 3;
}

.service-item:hover .service-title-container .service-title-icon a.h4 {
    color: #fff;
    transform: translateY(0);
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.service-item:hover .service-title-container .service-title-icon i {
    transform: scale(1.1);
    color: #fff;
}

.service-content p {
    color: #6c757d;
    margin-bottom: 1.5rem;
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.6;
    transition: all 0.4s ease;
}

/* Modernized submit buttons with SNC green override */
.btn-primary {
    background: linear-gradient(135deg, #2E7D32, #20c997) !important;
    border: none !important;
    padding: 10px 15px !important;
    border-radius: 30px !important;
    color: white !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.4s ease !important;
    font-weight: 500 !important;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3) !important;
    align-self: center !important;
    position: relative !important;
    overflow: hidden !important;
    z-index: 1 !important;
    font-size: 0.9rem !important;
    gap: 6px !important;
    width: auto !important;
    box-sizing: border-box !important;
    min-height: auto !important;
    line-height: normal !important;
    cursor: pointer !important;
}

/* Override Bootstrap rounded-pill class specifically for service buttons */
.service .btn-primary.rounded-pill,
.service-item .btn-primary.rounded-pill,
.service-content .btn-primary.rounded-pill {
    border-radius: 30px !important;
    padding: 10px 15px !important;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.8s ease;
    z-index: -1;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #245E27, #1daa80) !important;
    color: white !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.4) !important;
    text-decoration: none !important;
    letter-spacing: 0.5px !important;
    padding: 10px 15px !important;
}

.btn-primary:hover::before {
    left: 100%;
}

/* Override any conflicting button styles from style.css */
.service .btn-primary,
.service-item .btn-primary,
.service-content .btn-primary {
    background: linear-gradient(135deg, #2E7D32, #20c997) !important;
    color: white !important;
    border: none !important;
    transition: all 0.4s ease !important;
}

.service .btn-primary:hover,
.service-item .btn-primary:hover,
.service-content .btn-primary:hover {
    background: linear-gradient(135deg, #245E27, #1daa80) !important;
    color: white !important;
    transform: translateY(-1px) !important;
}

/* Additional specific overrides for Bootstrap button classes */
.service .btn,
.service-item .btn,
.service-content .btn {
    font-weight: 500 !important;
    transition: all 0.4s ease !important;
}

.service .btn:hover,
.service-item .btn:hover,
.service-content .btn:hover {
    transform: translateY(-1px) !important;
}

/* Modern header styling like FAQ */
.text-primary {
    color: #2E7D32 !important;
    position: relative;
    display: inline-block;
}

.text-primary::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #2E7D32, #20c997);
    border-radius: 2px;
}

.display-4 {
    font-weight: 700;
    color: #2c3e50;
    text-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Prevent service styles from affecting back-to-top button - Override btn-primary green */
a.btn.btn-primary.back-to-top,
.btn.btn-primary.back-to-top,
a.back-to-top.btn-primary,
.back-to-top.btn-primary,
.back-to-top {
    position: fixed !important;
    right: 30px !important;
    bottom: 30px !important;
    transition: 0.5s !important;
    z-index: 99 !important;
    background: #D71C26 !important;
    background-image: none !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 50% !important;
    width: 45px !important;
    height: 45px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    font-size: 16px !important;
    box-shadow: 0 4px 15px rgba(215, 28, 38, 0.4) !important;
}

a.btn.btn-primary.back-to-top i,
a.btn.btn-primary.back-to-top .fa,
a.btn.btn-primary.back-to-top .fa-arrow-up,
.back-to-top i,
.back-to-top .fa,
.back-to-top .fas,
.back-to-top .fa-arrow-up {
    color: #ffffff !important;
    font-size: 16px !important;
}

a.btn.btn-primary.back-to-top:hover,
.btn.btn-primary.back-to-top:hover,
.back-to-top:hover {
    background: #b91c1c !important;
    background-image: none !important;
    color: #ffffff !important;
    text-decoration: none !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 20px rgba(215, 28, 38, 0.5) !important;
}

a.btn.btn-primary.back-to-top:hover i,
.back-to-top:hover i,
.back-to-top:hover .fa,
.back-to-top:hover .fas {
    color: #ffffff !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .service-item {
        margin-bottom: 1.5rem;
        transform: none !important;
    }
    
    .service-item:hover {
        transform: translateY(0) !important;
    }
    
    .service-content {
        padding: 1.2rem;
    }
    
    .service-content a.h4 {
        font-size: 1.1rem;
    }
    
    .btn-primary {
        padding: 12px 18px !important;
        font-size: 1rem;
    }
    
    .service .btn-primary.rounded-pill,
    .service-item .btn-primary.rounded-pill,
    .service-content .btn-primary.rounded-pill {
        padding: 12px 18px !important;
    }
    
    .faq-glass-card {
        padding: 1.2rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-item {
        padding: 0.7rem;
    }
    
    .service-title-container {
        padding: 0.6rem;
        margin-bottom: 0.8rem;
    }
    
    .service-title-container a.h4 {
        font-size: 0.7rem;
    }
    
    .service-title-icon {
        flex-direction: column;
        gap: 4px;
    }
    
    .service-title-container .service-title-icon i {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .service-img img {
        height: 180px;
    }
    
    .service-content {
        padding: 1rem;
    }
    
    .faq-glass-card {
        padding: 1rem;
    }
    
    .service-item:hover {
        transform: translateY(0) !important;
    }
    
    .btn-primary {
        padding: 14px 20px !important;
        font-size: 1.05rem;
    }
    
    .service .btn-primary.rounded-pill,
    .service-item .btn-primary.rounded-pill,
    .service-content .btn-primary.rounded-pill {
        padding: 14px 20px !important;
    }
    
    .service-title-container {
        padding: 0.5rem;
        margin-bottom: 0.6rem;
    }
    
    .service-title-container a.h4 {
        font-size: 0.65rem;
    }
    
    .service-title-container .service-title-icon i {
        font-size: 0.9rem;
    }
    
    .service-title-icon {
        flex-direction: row;
    }
}

/* Ajoutez ces styles à la fin de votre fichier CSS existant */

/* Animation pour les badges */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Classes d'animation */
.service-status-badge {
    animation: slideInRight 0.5s ease forwards;
}

.countdown-days {
    animation: pulse 2s infinite;
}

/* État des services selon le statut */
.service-item[data-status="ouverte"] {
    border-left: 4px solid #28a745;
}

.service-item[data-status="fermée"] {
    border-left: 4px solid #dc3545;
    opacity: 0.9;
}

.service-item[data-status="pas encore ouverte"] {
    border-left: 4px solid #17a2b8;
}

/* Effets de hover spécifiques */
.service-item[data-status="ouverte"]:hover {
    border-color: #28a745;
    box-shadow: 0 15px 35px rgba(40, 167, 69, 0.2);
}

.service-item[data-status="fermée"]:hover {
    border-color: #dc3545;
    box-shadow: 0 15px 35px rgba(220, 53, 69, 0.2);
}

.service-item[data-status="pas encore ouverte"]:hover {
    border-color: #17a2b8;
    box-shadow: 0 15px 35px rgba(23, 162, 184, 0.2);
}

/* Badges de statut */
.badge-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.badge-danger {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
    color: white;
}

.badge-info {
    background: linear-gradient(135deg, #17a2b8, #3498db);
    color: white;
}

/* Barre de progression stylisée */
.progress {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    border-radius: 10px;
    background: linear-gradient(90deg, #ffc107, #fd7e14);
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Indicateurs de statut */
.subscription-status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
}

.status-success {
    background: #28a745;
    box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.3);
}

.status-success::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 2px solid rgba(40, 167, 69, 0.2);
    animation: ripple 2s infinite;
}

.status-danger {
    background: #dc3545;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.3);
}

.status-info {
    background: #17a2b8;
    box-shadow: 0 0 0 4px rgba(23, 162, 184, 0.3);
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Bannière de statistiques */
.subscription-stats-banner {
    background: linear-gradient(135deg, #2E7D32 0%, #1565c0 100%);
    border-radius: 16px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.subscription-stats-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 70%
    );
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Responsive design amélioré */
@media (max-width: 768px) {
    .service-status-badge {
        font-size: 0.6rem;
        padding: 3px 8px;
    }
    
    .subscription-info {
        padding: 8px;
        font-size: 0.85rem;
    }
    
    .countdown-days {
        font-size: 1.1rem;
    }
    
    .stat-badge {
        padding: 6px 10px;
        min-width: 70px;
    }
    
    .stat-badge .stat-number {
        font-size: 1rem;
    }
    
    .subscription-stats-banner {
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .service-item {
        margin-bottom: 1.5rem;
    }
    
    .subscription-info {
        font-size: 0.8rem;
    }
    
    .service-status-badge {
        font-size: 0.55rem;
    }
    
    .stat-badge {
        padding: 4px 8px;
        min-width: 60px;
    }
    
    .stat-badge .stat-number {
        font-size: 0.9rem;
    }
    
    .stat-badge .stat-label {
        font-size: 0.6rem;
    }
}