/**
 * Custom CSS - Additional styles
 * 
 * @package Witinnov
 */

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

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

/* ========================================
   Hero Section Enhancements
======================================== */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(circle, rgba(195, 81, 47, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

.hero-logo-wrapper svg {
    width: 180px;
    height: auto;
}

/* ========================================
   Card Hover Effects
======================================== */
.expertise-card,
.innovation-card,
.actualite-card {
    position: relative;
    overflow: hidden;
}

.expertise-card::before,
.innovation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-orange), var(--color-blue));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.expertise-card:hover::before,
.innovation-card:hover::before {
    transform: scaleX(1);
}

/* ========================================
   Button Enhancements
======================================== */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn i {
    transition: transform 0.3s ease;
}

.btn:hover i {
    transform: translateX(5px);
}

/* ========================================
   Form Enhancements
======================================== */
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--color-orange);
    box-shadow: 0 0 0 4px rgba(195, 81, 47, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #94a3b8;
}

/* ========================================
   Navigation Enhancements
======================================== */
.nav-menu > li > a::after,
.nav-menu > li > button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-orange);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-menu > li > a:hover::after,
.nav-menu > li > button:hover::after {
    transform: scaleX(1);
}

.sub-menu {
    border-top: 3px solid var(--color-orange);
}

/* ========================================
   Secteur Cards Animation
======================================== */
.secteur-card {
    transition: all 0.3s ease, transform 0.3s ease;
}

.secteur-card:hover {
    transform: translateY(-5px);
    background-color: var(--color-white);
}

.secteur-card:hover .icon {
    animation: pulse 0.6s ease;
}

/* ========================================
   Actualites Cards
======================================== */
.actualite-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.actualite-card:hover {
    border-color: rgba(195, 81, 47, 0.5);
}

/* ========================================
   Offre Cards
======================================== */
.offre-card {
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.offre-card:hover {
    border-left-color: var(--color-orange);
    background-color: var(--color-white);
}

/* ========================================
   Footer Enhancements
======================================== */
.footer-nav ul li a {
    position: relative;
    display: inline-block;
}

.footer-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-white);
    transition: width 0.3s ease;
}

.footer-nav ul li a:hover::after {
    width: 100%;
}

.social-links a {
    transition: all 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
    background-color: var(--color-orange);
}

/* ========================================
   Responsive Design Fixes
======================================== */

/* Grilles responsive pour les templates */
@media (max-width: 1024px) {
  [style*="grid-template-columns: repeat(4"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  [style*="grid-template-columns: repeat(6"] {
    grid-template-columns: repeat(3, 1fr) !important;
  }
  
  [style*="grid-template-columns: 1fr 1fr;"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  [style*="grid-template-columns: repeat(4"] {
    grid-template-columns: 1fr !important;
  }
  
  [style*="grid-template-columns: repeat(3"] {
    grid-template-columns: 1fr !important;
  }
  
  [style*="grid-template-columns: repeat(6"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  
  /* Hero section mobile */
  .page-hero h1,
  [style*="font-size: 2.5rem"] {
    font-size: 1.75rem !important;
  }
  
  /* Container padding mobile */
  .container,
  [style*="max-width: 1280px"] {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Section padding mobile */
  [style*="padding: 5rem 0"] {
    padding: 3rem 0 !important;
  }
  
  /* Flex wrap pour les offres */
  [style*="display: flex"][style*="justify-content: space-between"] {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  
  /* Boutons full width sur mobile */
  .offre-card a[style*="display: inline-flex"],
  [style*="border-radius: 9999px"][style*="padding"] {
    width: 100% !important;
    justify-content: center !important;
    margin-top: 1rem !important;
  }
}

@media (max-width: 480px) {
  [style*="grid-template-columns: repeat(6"] {
    grid-template-columns: 1fr !important;
  }
  
  /* Stats bloc */
  [style*="grid-template-columns: 1fr 1fr"][style*="gap: 2rem"] {
    gap: 1rem !important;
  }
  
  [style*="font-size: 3rem"] {
    font-size: 2rem !important;
  }
}

/* ========================================
   Scroll to Top Button
======================================== */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--color-orange);
    color: var(--color-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(195, 81, 47, 0.3);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(195, 81, 47, 0.4);
}

/* ========================================
   Loading Animation
======================================== */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--color-white);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   Selection Color
======================================== */
::selection {
    background-color: var(--color-orange);
    color: var(--color-white);
}

/* ========================================
   Print Styles
======================================== */
@media print {
    .site-header,
    .site-footer,
    .scroll-to-top,
    .mobile-menu-toggle {
        display: none !important;
    }

    .hero-section {
        padding-top: 0 !important;
        min-height: auto !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }
}

/* ========================================
   Accessibility
======================================== */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

*:focus {
    outline: 2px solid var(--color-orange);
    outline-offset: 2px;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-blue);
    color: var(--color-white);
    padding: 1rem 2rem;
    z-index: 9999;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}
