/* ===================================
   Kancom Modern Site - Custom Styles
   =================================== */

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

/* Prevent horizontal scroll on all elements */
* {
    box-sizing: border-box;
}

img, video, iframe {
    max-width: 100%;
    height: auto;
}

/* Gradient Animation */
@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient 5s ease infinite;
}

/* Particles Background */
#particles-js {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* Navbar Scroll Effect */
#navbar.scrolled {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Service Card Hover Effects */
.service-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 146, 204, 0.1) 0%, rgba(0, 191, 255, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.5s;
    border-radius: 1.5rem;
    z-index: -1;
}

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

/* Swiper Customization */
.swiper {
    padding-bottom: 50px !important;
}

.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: #0092cc;
    opacity: 0.5;
    transition: all 0.3s;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    transform: scale(1.3);
}

/* Nav Link Active State */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #0092cc, #00bfff);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Counter Animation */
.counter {
    display: inline-block;
    transition: all 0.3s;
}

/* Scroll to Top Button */
#scroll-top.visible {
    opacity: 1;
    pointer-events: all;
}

/* Adjust scroll-top button position when cookie banner is visible */
.cookie-banner.show ~ #scroll-top {
    bottom: 120px;
}

@media (max-width: 768px) {
    .cookie-banner.show ~ #scroll-top {
        bottom: 180px;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Form Focus Effects */
input:focus,
textarea:focus {
    border-color: #0092cc;
    box-shadow: 0 0 0 3px rgba(0, 146, 204, 0.1);
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Glass Morphism Effect */
.glass {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Text Gradient */
.text-gradient {
    background: linear-gradient(90deg, #0092cc, #00bfff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.text-Kan-prim{
    color:  #1a1449;

}
/* Button Hover Effects */
.btn-hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 146, 204, 0.3);
}

/* Skeleton Loading (if needed) */
@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0092cc, #00bfff);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #007aa3, #0099cc);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .service-card {
        margin-bottom: 1.5rem;
    }
    
    h1 {
        font-size: 2.5rem !important;
    }
    
    h2 {
        font-size: 2rem !important;
    }
}

/* Print Styles */
@media print {
    #navbar,
    #scroll-top,
    footer {
        display: none;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Visible */
:focus-visible {
    outline: 2px solid #0092cc;
    outline-offset: 2px;
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
    /* Can add dark mode styles here if needed */
}

/* ==================
   Modal Styles
   ================== */
.modal {
    animation: fadeIn 0.3s ease-out;
}

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

.modal-content {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Pas de scroll sur le conteneur principal */
}

/* Contenu scrollable de la modal */
.modal-content-body {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    overscroll-behavior: contain;
}

/* Modal Scrollbar - sur le contenu scrollable */
.modal-content-body::-webkit-scrollbar {
    width: 8px;
}

.modal-content-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-content-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0092cc, #00bfff);
    border-radius: 4px;
}

.modal-content-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #007aa3, #0099cc);
}

/* Modal Header - fixe en haut (flex-shrink-0 empêche la réduction) */
.modal-content > div:first-child {
    z-index: 10;
    flex-shrink: 0;
}

/* Modal Animation on Open */
.modal.flex .modal-content {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.95) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
        margin: 1rem;
    }
    
    .modal-content .sticky h2 {
        font-size: 1.5rem;
    }
}

/* ==================
   Logo Styles
   ================== */
/* Logo in navbar */
#navbar img[alt*="Logo"] {
    max-height: 64px;
    height: auto;
    width: auto;
}

/* Logo in footer - add filter if logo is too dark */
footer img[alt*="Logo"] {
    max-height: 48px;
    height: auto;
    width: auto;
    /* Uncomment if logo needs to be inverted for dark background */
     filter: brightness(0) invert(1); 
}

/* Logo hover effect */
a:hover img[alt*="Logo"] {
    filter: drop-shadow(0 4px 8px rgba(0, 146, 204, 0.3));
}

/* Responsive logo */
@media (max-width: 768px) {
    #navbar img[alt*="Logo"] {
        max-height: 48px;
    }
    
    footer img[alt*="Logo"] {
        max-height: 40px;
    }
}

/* ==================
   Cookie Banner Styles
   ================== */
.cookie-banner {
    border-top: 4px solid #0092cc;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
}

.cookie-banner.show {
    transform: translateY(0);
}

/* Cookie Banner Animation */
@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.cookie-banner.show {
    animation: slideUp 0.5s ease-out;
}

/* Cookie Toggle Switch */
input[type="checkbox"]:checked + div {
    background: linear-gradient(90deg, #0092cc, #00bfff);
}

/* Cookie Banner Responsive */
@media (max-width: 768px) {
    .cookie-banner {
        padding: 1rem;
    }
    
    .cookie-banner .flex-col {
        gap: 0.75rem;
    }
    
    .cookie-banner button {
        width: 100%;
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
    }
}

/* Masquer la bannière de cookies quand le modal est ouvert */
#cookieModal.flex ~ #cookie-banner,
#cookieModal.flex + #cookie-banner {
    display: none !important;
}

/* ==================
   Captcha Mathématique Styles
   ================== */
#refresh-captcha {
    transition: transform 0.3s ease;
}

#refresh-captcha:hover {
    transform: rotate(180deg);
}

#refresh-captcha:active {
    transform: rotate(360deg);
}

#captcha-answer:focus {
    border-color: #0092cc;
    box-shadow: 0 0 0 3px rgba(0, 146, 204, 0.1);
}

#captcha-answer.border-red-500 {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Style pour le champ honeypot - doit rester invisible */
#website {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

