/**
 * Styles personnalisés complémentaires à TailwindCSS
 * Portfolio de Johan Garcia
 */

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Sélection de texte personnalisée */
::selection {
    background-color: #2563eb;
    color: white;
}

::-moz-selection {
    background-color: #2563eb;
    color: white;
}

/* Scrollbar personnalisée (WebKit) */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: #2563eb;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1e40af;
}

/* Navigation sticky avec fond flou */
#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Liens de navigation actifs */
.nav-link.active {
    color: #2563eb;
    font-weight: 600;
}

/* Cartes de projet avec effet hover amélioré */
.project-card {
    will-change: transform;
}

.project-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Champ de formulaire avec focus amélioré */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* Boutons avec effet de chargement */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Animations de chargement */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

/* Message de succès/erreur */
.message-success {
    background-color: #10b981;
    color: white;
}

.message-error {
    background-color: #ef4444;
    color: white;
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Shadow personnalisées */
.shadow-primary {
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.1), 0 4px 6px -2px rgba(37, 99, 235, 0.05);
}

/* Effet de parallax */
.parallax {
    will-change: transform;
}

/* Responsive utilities supplémentaires */
@media (max-width: 640px) {
    .text-responsive-xl {
        font-size: 2rem;
    }
}

/* Cursor personnalisé pour les liens (optionnel) */
a, button {
    cursor: pointer;
}

/* Loading state pour les images */
img[data-src] {
    filter: blur(5px);
    transition: filter 0.3s;
}

img[data-src].loaded {
    filter: blur(0);
}

/* Grid layout amélioré pour les projets */
@media (min-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

/* Focus visible pour l'accessibilité */
*:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Transitions globales */
* {
    transition-property: background-color, border-color, color, fill, stroke;
    transition-duration: 200ms;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Désactiver les transitions pour les animations GSAP */
.no-transition {
    transition: none !important;
}

/* Hero background animation */
.hero-bg {
    background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
}

/* Professional card gradient */
.prof-card-gradient {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
}

/* Effet de survol sur les boutons sociaux */
.social-link {
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateY(-3px);
}

/* Badge animé */
.badge-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Section divider */
.section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #e5e7eb, transparent);
}
