/* Fixed Emergency Button */
.fixed-emergency-btn {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 998;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(220, 53, 69, 0.4);
    animation: pulse-emergency 2s infinite;
    transition: all 0.3s ease;
}

.fixed-emergency-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(220, 53, 69, 0.6);
}

.fixed-emergency-btn i {
    font-size: 28px;
    color: white;
}

.emergency-btn-tooltip {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: #333;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.fixed-emergency-btn:hover .emergency-btn-tooltip {
    opacity: 1;
    visibility: visible;
    bottom: 80px;
}

.emergency-btn-tooltip::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #333;
}

@keyframes pulse-emergency {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(220, 53, 69, 0.4);
    }
    50% {
        box-shadow: 0 8px 24px rgba(220, 53, 69, 0.8);
    }
}

@media (max-width: 768px) {
    .fixed-emergency-btn {
        width: 55px;
        height: 55px;
        bottom: 90px;
        right: 20px;
    }

    .fixed-emergency-btn i {
        font-size: 24px;
    }

    .emergency-btn-tooltip {
        font-size: 12px;
    }
}

/* Emergency Notification Toast */
.emergency-notification-link {
    display: none;
}

/* Section Rubriques */
.rubriques-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.rubrique-card-link {
    text-decoration: none;
    display: block;
    height: 100%;
}

.rubrique-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.rubrique-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 135, 81, 0.2);
    border-color: #008751;
}

.rubrique-card-header {
    padding: 30px 25px;
    position: relative;
    color: #ffffff;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.rubrique-icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.rubrique-card:hover .rubrique-icon {
    transform: scale(1.1) rotate(5deg);
    background: rgba(255, 255, 255, 0.3);
}

.rubrique-icon i {
    font-size: 32px;
    color: #ffffff;
}

.rubrique-title {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.3;
}

.rubrique-card-body {
    padding: 25px;
}

.rubrique-description {
    font-size: 15px;
    color: #666666;
    line-height: 1.6;
    margin-bottom: 20px;
    min-height: 60px;
}

.rubrique-footer {
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.rubrique-link {
    color: #008751;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
}

.rubrique-card:hover .rubrique-link {
    color: #006b3f;
}

.rubrique-card:hover .rubrique-link i {
    transform: translateX(5px);
}

.rubrique-link i {
    transition: transform 0.3s ease;
}

/* Responsive */
@media (max-width: 767px) {
    .rubrique-card-header {
        min-height: 140px;
        padding: 25px 20px;
    }

    .rubrique-icon {
        width: 60px;
        height: 60px;
    }

    .rubrique-icon i {
        font-size: 28px;
    }

    .rubrique-title {
        font-size: 20px;
    }

    .rubrique-description {
        font-size: 14px;
        min-height: auto;
    }
}

/* Hero Carousel */
.min-vh-50 {
    min-height: 60vh;
}

#heroCarousel .carousel-control-prev,
#heroCarousel .carousel-control-next {
    width: 60px;
    height: 60px;
    background-color: rgba(0, 102, 204, 0.8);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}

#heroCarousel .carousel-indicators button {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: var(--ms-primary);
}

/* Quick Links */
.quick-link-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.quick-link-card:hover {
    background-color: white !important;
    border-color: var(--ms-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

/* Video Section */
.video-play-btn {
    width: 100px;
    height: 100px;
    background: rgba(0, 102, 204, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-play-btn:hover {
    background: rgba(0, 102, 204, 1);
    transform: scale(1.1);
}

.video-wrapper {
    position: relative;
    overflow: hidden;
}

.video-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.video-wrapper:hover::after {
    background: rgba(0, 0, 0, 0.5);
}

/* Event Cards */
.event-card {
    transition: all 0.3s ease;
}

.event-card:hover {
    transform: translateY(-10px);
}

/* E-Services Section avec Grid */
.eservices-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.eservices-carousel-wrapper {
    position: relative;
    padding: 0 60px;
}

.eservices-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
    padding: 20px 0;
}

.eservices-carousel::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

.eservice-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-align: center;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.eservice-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(40, 167, 69, 0.2);
    border-color: #28a745;
}

.eservice-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-radius: 50%;
    color: #ffffff;
}

.eservice-icon i {
    font-size: 28px;
}

.eservice-icon img {
    max-width: 40px;
    max-height: 40px;
    object-fit: contain;
}

.eservice-title {
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 10px;
    line-height: 1.3;
    min-height: 40px;
}

.eservice-description {
    font-size: 13px;
    color: #666666;
    line-height: 1.4;
    margin-bottom: 15px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Navigation Buttons */
.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #28a745;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.carousel-nav-btn:hover {
    background: #218838;
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 0;
}

.carousel-next {
    right: 0;
}

/* Pagination Dots */
.carousel-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.pagination-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d1d5db;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-dot.active {
    background: #28a745;
    width: 30px;
    border-radius: 5px;
}

/* Animation pour les cartes cachées */
.eservice-item {
    transition: all 0.5s ease;
}

.eservice-item.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .eservices-carousel-wrapper {
        padding: 0 50px;
    }

    .eservice-card {
        flex: 0 0 280px;
        min-height: 260px;
    }

    .carousel-nav-btn {
        width: 40px;
        height: 40px;
    }
}

/* Partners */
.partner-logo-link {
    text-decoration: none;
    display: block;
    height: 100%;
}

.partner-logo-box {
    transition: all 0.3s ease;
    min-height: 120px;
    border: 1px solid #e9ecef;
}

.partner-logo-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    border-color: var(--ms-primary);
}

.partner-logo-box img {
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.partner-logo-box:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Alert Banner */
.alert-banner {
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}