@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in-right {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in-up {
    animation: fade-in-up 0.8s ease-out;
}

.animate-fade-in-right {
    animation: fade-in-right 0.8s ease-out 0.3s both;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive design pour l'image de profil */
@media (max-width: 768px) {
    .hero-content {
        display: flex;
        flex-direction: column-reverse;
        text-align: center;
    }

    .profile-section {
        margin-bottom: 2rem;
    }
}

/* Animation pour les anneaux décoratifs */
@keyframes ring-pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.08);
        opacity: 0.15;
    }
}

/* Nouvelle animation pour les cercles */
@keyframes subtle-pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.4;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.2;
    }
}

@keyframes subtle-pulse-reverse {
    0%,
    100% {
        transform: scale(1.05);
        opacity: 0.2;
    }

    50% {
        transform: scale(1);
        opacity: 0.4;
    }
}

.ring-1 {
    animation: subtle-pulse 4s ease-in-out infinite;
}

.ring-2 {
    animation: subtle-pulse-reverse 5s ease-in-out infinite;
}

/* Tooltips pour les technologies */
.tooltip {
    position: relative;
}

.tooltip-content {
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 33, 61, 0.95);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(20, 33, 61, 0.95);
}

.tooltip:hover .tooltip-content {
    opacity: 1;
    visibility: visible;
}

/* Particules animées */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.particle {
    position: absolute;
    background: #fca311;
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
    opacity: 0.1;
}

.particle:nth-child(1) {
    width: 4px;
    height: 4px;
    left: 10%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    width: 6px;
    height: 6px;
    left: 20%;
    animation-delay: 1s;
}

.particle:nth-child(3) {
    width: 3px;
    height: 3px;
    left: 30%;
    animation-delay: 2s;
}

.particle:nth-child(4) {
    width: 5px;
    height: 5px;
    left: 40%;
    animation-delay: 1.5s;
}

.particle:nth-child(5) {
    width: 4px;
    height: 4px;
    left: 50%;
    animation-delay: 0.5s;
}

.particle:nth-child(6) {
    width: 7px;
    height: 7px;
    left: 60%;
    animation-delay: 2.5s;
}

.particle:nth-child(7) {
    width: 3px;
    height: 3px;
    left: 70%;
    animation-delay: 0.8s;
}

.particle:nth-child(8) {
    width: 5px;
    height: 5px;
    left: 80%;
    animation-delay: 1.8s;
}

.particle:nth-child(9) {
    width: 4px;
    height: 4px;
    left: 90%;
    animation-delay: 3s;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.1;
    }

    90% {
        opacity: 0.1;
    }

    50% {
        transform: translateY(-10px) rotate(180deg);
        opacity: 0.3;
    }
}

.profile-image-container {
    margin: auto;
}

/* Adjustable mobile spacings */
:root {
    --hero-mobile-padding-top: 0rem; /* Ajuste l'espace sous la navbar en mobile */
    --hero-mobile-photo-margin: 0.75rem; /* Espace autour de la photo en mobile */
}

@media (max-width: 767.98px) {
    .hero-section {
        padding-top: var(--hero-mobile-padding-top) !important;
    }

    .hero-mobile-photo {
        margin-top: var(--hero-mobile-photo-margin) !important;
        margin-bottom: var(--hero-mobile-photo-margin) !important;
    }
}

/* Large screens: soften image shadow/glow and refine reveal */
@media (min-width: 1024px) {
    /* Remove the heavy drop shadow under the profile image on large screens */
    .profile-image-container {
        box-shadow: none !important; /* no drop shadow on large screens */
        transform: translateY(8px);
        opacity: 0;
        animation: profile-reveal 700ms ease-out 200ms forwards;
    }

    /* Soften the background glow elements */
    .profile-backglow {
        filter: blur(24px);
        opacity: 0.12 !important;
    }

    /* Tone down ring highlight on hover */
    .profile-image-container .ring-4 {
        box-shadow: none;
    }
}

@keyframes profile-reveal {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.995);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Nouvelles animations pour la section About moderne */
@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes gradient-shift {
    0%,
    100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes floating {
    0%,
    100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes glow-pulse {
    0%,
    100% {
        box-shadow: 0 0 20px rgba(252, 163, 17, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(252, 163, 17, 0.5),
            0 0 40px rgba(252, 163, 17, 0.2);
    }
}

@keyframes slide-in-stagger {
    from {
        opacity: 0;
        transform: translateY(30px) translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateX(0);
    }
}

/* Classes d'animation */
.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

.animate-floating {
    animation: floating 3s ease-in-out infinite;
}

.animate-glow-pulse {
    animation: glow-pulse 2s ease-in-out infinite;
}

.animate-slide-stagger {
    animation: slide-in-stagger 0.6s ease-out both;
}

/* Glassmorphism effects */
.glass-card {
    background: rgba(255, 255, 255, 0.25);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.glass-card-hover:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px 0 rgba(31, 38, 135, 0.25);
}

/* Gradient text effects */
.gradient-text-primary {
    background: linear-gradient(135deg, #14213d 0%, #2a3f5f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-accent {
    background: linear-gradient(135deg, #fca311 0%, #ffb347 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hover effects pour les cards technologies */
.tech-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tech-card:hover {
    transform: translateY(-12px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Effets de survol pour les compétences */
.skill-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(252, 163, 17, 0.1),
        transparent
    );
    transition: left 0.5s;
}

.skill-card:hover::before {
    left: 100%;
}

/* Responsive animations */
@media (max-width: 768px) {
    .tech-card:hover {
        transform: translateY(-6px) scale(1.02);
    }

    .glass-card-hover:hover {
        transform: translateY(-4px);
    }
}

/* Optimisations performance */
.tech-card,
.skill-card,
.glass-card {
    will-change: transform;
    backface-visibility: hidden;
}

/* Animation delays pour les éléments en stagger */
.stagger-1 {
    animation-delay: 0.1s;
}
.stagger-2 {
    animation-delay: 0.2s;
}
.stagger-3 {
    animation-delay: 0.3s;
}
.stagger-4 {
    animation-delay: 0.4s;
}
.stagger-5 {
    animation-delay: 0.5s;
}
.stagger-6 {
    animation-delay: 0.6s;
}
.stagger-7 {
    animation-delay: 0.7s;
}
.stagger-8 {
    animation-delay: 0.8s;
}

/* Scroll snap pour une section à la fois */
html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

.snap-section {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    height: 100vh;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    html {
        scroll-snap-type: y proximity;
    }

    .snap-section {
        height: auto;
        min-height: 100vh;
    }
}
