/* ========================================
   css/footer.css - Footer responsive amélioré
======================================== */

.footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: white;
    margin-top: auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    padding: 3rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Footer Brand Section */
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-logo-icon {
    font-size: 2rem;
    background: linear-gradient(135deg, #00d4ff, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    max-width: 300px;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: rgba(0, 212, 255, 0.2);
    color: #00d4ff;
    transform: translateY(-2px);
}

/* Footer Sections */
.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: white;
    position: relative;
}

.footer-section-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, #00d4ff, #7c3aed);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    padding: 0.25rem 0;
}

.footer-links a:hover {
    color: #00d4ff;
    padding-left: 0.5rem;
}

/* Contact Section */
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

.contact-item i {
    color: #00d4ff;
    width: 20px;
    text-align: center;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.contact-item a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: #00d4ff;
}

/* Footer Bottom */
.footer-bottom {
    padding: 1.5rem 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-size: 0.9rem;
}

.footer-legal {
    display: flex;
    gap: 2rem;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: #00d4ff;
}

/* Client Demo Links */
.client-demo-link {
    position: relative;
}

.client-demo-link::after {
    content: '🔒';
    font-size: 0.8rem;
    margin-left: 0.5rem;
    opacity: 0.7;
}

/* ========================================
   RESPONSIVE DESIGN AMÉLIORÉ
======================================== */

/* Tablette */
@media (max-width: 1024px) {
    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
        padding: 2.5rem 0;
    }
    
    .footer-brand {
        grid-column: 1 / -1;
        text-align: center;
        max-width: none;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .footer-tagline {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .footer-social {
        justify-content: center;
    }
}

/* Mobile large (768px et moins) */
@media (max-width: 768px) {
    .footer-container {
        padding: 0 1rem;
    }
    
    .footer-main {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 0;
    }
    
    .footer-brand {
        text-align: center;
        grid-column: 1;
        order: 1;
    }
    
    .footer-logo {
        justify-content: center;
        margin-bottom: 1rem;
    }
    
    .footer-tagline {
        font-size: 0.95rem;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .footer-social {
        justify-content: center;
        margin-top: 1rem;
    }
    
    /* Réorganisation des sections sur mobile */
    .footer-section:nth-child(2) { order: 4; } /* Contact en dernier */
    .footer-section:nth-child(3) { order: 2; } /* Services en 2e */
    .footer-section:nth-child(4) { order: 3; } /* Solutions en 3e */
    
    /* Sections footer mobile */
    .footer-section {
        text-align: center;
    }
    
    .footer-section-title {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .footer-section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-links {
        gap: 1rem;
        align-items: center;
    }
    
    .footer-links a {
        padding: 0.5rem 1rem;
        border-radius: 6px;
        transition: all 0.3s ease;
        justify-content: center;
        min-height: 44px; /* Touch target */
    }
    
    .footer-links a:hover {
        background: rgba(255, 255, 255, 0.1);
        padding-left: 1rem; /* Override desktop hover */
    }
    
    /* Contact mobile amélioré */
    .footer-contact {
        gap: 1.5rem;
        align-items: center;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
        padding: 1rem;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 12px;
        min-height: 44px; /* Touch target */
        align-items: center;
        width: 100%;
        max-width: 280px;
    }
    
    .contact-item i {
        margin-top: 0;
        font-size: 1.2rem;
        width: auto;
    }
    
    .contact-item a {
        font-weight: 500;
        font-size: 1rem;
    }
    
    /* Footer bottom mobile */
    .footer-bottom {
        padding: 1.5rem 0;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .footer-legal {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
    }
    
    .footer-legal a {
        padding: 0.5rem 1rem;
        border-radius: 6px;
        transition: all 0.3s ease;
        min-height: 44px; /* Touch target */
        display: flex;
        align-items: center;
        font-size: 0.9rem;
    }
    
    .footer-legal a:hover {
        background: rgba(255, 255, 255, 0.1);
    }
}

/* Mobile petit (480px et moins) */
@media (max-width: 480px) {
    .footer-container {
        padding: 0 0.75rem;
    }
    
    .footer-main {
        gap: 1.5rem;
        padding: 1.5rem 0;
    }
    
    .footer-brand {
        gap: 1rem;
    }
    
    .footer-logo-text {
        font-size: 1.3rem;
    }
    
    .footer-logo-icon {
        font-size: 1.6rem;
    }
    
    .footer-tagline {
        font-size: 0.9rem;
        line-height: 1.5;
        max-width: 320px;
    }
    
    .footer-social {
        gap: 1rem;
        margin-top: 1.5rem;
    }
    
    .social-link {
        width: 44px; /* Touch target */
        height: 44px;
        font-size: 1.1rem;
    }
    
    /* Sections sur très petit mobile */
    .footer-section {
        padding: 0.5rem;
    }
    
    .footer-section-title {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .footer-links a {
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
        margin: 0.25rem 0;
    }
    
    /* Contact très petit mobile */
    .contact-item {
        padding: 1rem 0.75rem;
        font-size: 0.9rem;
        max-width: 100%;
    }
    
    .contact-item i {
        font-size: 1.1rem;
    }
    
    /* Footer bottom très petit mobile */
    .footer-bottom {
        padding: 1rem 0;
    }
    
    .footer-copyright {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .footer-legal {
        gap: 1rem;
    }
    
    .footer-legal a {
        font-size: 0.85rem;
        padding: 0.75rem;
        min-width: 44px; /* Touch target minimum */
    }
}

/* Mobile très petit (360px et moins) */
@media (max-width: 360px) {
    .footer-container {
        padding: 0 0.5rem;
    }
    
    .footer-tagline {
        font-size: 0.85rem;
        max-width: 280px;
    }
    
    .footer-legal {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
    
    .footer-legal a {
        width: 200px;
        text-align: center;
        justify-content: center;
    }
    
    .contact-item {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }
}

/* ========================================
   AMÉLIORATIONS SUPPLÉMENTAIRES
======================================== */

/* Animation d'entrée */
@keyframes footerSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.footer.animate {
    animation: footerSlideUp 0.6s ease-out;
}

/* Hover effects */
.footer-section:hover .footer-section-title::after {
    width: 50px;
    transition: width 0.3s ease;
}

/* Focus states pour l'accessibilité */
.footer-links a:focus,
.footer-legal a:focus,
.contact-item a:focus,
.social-link:focus {
    outline: 2px solid #00d4ff;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .footer {
        /* Déjà optimisé pour le mode sombre */
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .footer.animate {
        animation: none;
    }
    
    .footer-links a,
    .footer-legal a,
    .social-link {
        transition: none;
    }
}

/* Print styles */
@media print {
    .footer {
        background: none !important;
        color: black !important;
        border-top: 1px solid #ccc;
        padding: 1rem 0 !important;
    }
    
    .footer-main {
        grid-template-columns: 1fr 1fr !important;
        gap: 1rem !important;
        padding: 1rem 0 !important;
    }
    
    .footer-social,
    .footer-legal {
        display: none;
    }
    
    .footer-tagline {
        display: none;
    }
    
    .contact-item a::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}

/* States pour les touch devices */
@media (hover: none) and (pointer: coarse) {
    .footer-links a:hover,
    .footer-legal a:hover,
    .social-link:hover {
        transform: none; /* Disable hover transforms on touch */
    }
    
    .footer-links a:active,
    .footer-legal a:active,
    .social-link:active {
        background: rgba(255, 255, 255, 0.2);
        transform: scale(0.98);
    }
}