@tailwind base;
@tailwind components;
@tailwind utilities;

body {
    /* background: linear-gradient(135deg, #0F0F0F 0%, #1A1A1A 100%); */
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

/* Custom styles */
#hero-section {
    background-color: #00D9FF;
    background-size: cover;
    background-position: center;
}

:where([class^="ri-"])::before {
    content: "\f3c2";
}

.typing-animation {
    border-right: 2px solid #00D9FF;
    animation: typing 3s steps(30) infinite, blink 1s infinite;
}

@keyframes typing {
    0%, 50% { width: 0; }
    100% { width: 100%; }
}

@keyframes blink {
    0%, 50% { border-color: transparent; }
    51%, 100% { border-color: #00D9FF; }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animation d’apparition/disparition */
@keyframes fadeSlide {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    10% {
        opacity: 1;
        transform: translateY(0);
    }
    90% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-20px); 
    }
}



.glow-effect {
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
}

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 217, 255, 0.2);
}

.progress-bar {
    width: 0%;
    transition: width 2s ease-in-out;
}

.carousel-item {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-item.active {
    display: block;
    opacity: 1;
}

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

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

.gradient-text {
    background: linear-gradient(45deg, #00D9FF, #FF6B6B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #1A1A1A;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #00D9FF;
    border-radius: 4px;
}

.project-overlay {
    opacity: 0;
    transition: all 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.nav-sticky {
    backdrop-filter: blur(10px);
}

input, textarea {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    transition: all 0.3s ease;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #00D9FF;
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.3);
}

input::placeholder, textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.skill-bar {
    background: rgba(255, 255, 255, 0.1);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, #00D9FF, #FF6B6B);
    border-radius: 4px;
    transition: width 2s ease;
}

/* Additional custom styles */
.card-hover {
    transition: all 0.3s ease;
}

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

.btn-hover {
    transition: all 0.2s ease;
}

.btn-hover:hover {
    transform: translateY(-1px);
}

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

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Flash messages */
/* .flash-message {
    position: fixed;
    top: 90px; 
    left: 10%;
    transform: translateX(-10%) translateY(-20px);
    z-index: 9999;
    min-width: 300px;
    max-width: 600px;
    border-radius: 0;
    padding: 15px 40px 15px 15px;
    font-family: sans-serif;
    font-size: 14px;
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: opacity 0.5s ease, transform 0.5s ease;
    animation: fadeSlide 5s ease forwards;
    
    } */

.flash-message {
    position: fixed;
    top: 80px;           
    right: 20px;            /* 20px depuis le bord droit */
    z-index: 9999;
    min-width: 300px;
    max-width: 400px;
    border-radius: 8px;
    padding: 15px 20px;
    font-family: sans-serif;
    font-size: 14px;
    color: white;
    background: #333;       /* couleur de fond par défaut */
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: opacity 0.5s ease, transform 0.5s ease;
    animation: fadeSlide 5s ease forwards;
}

.flash-message.success { background-color: #38a169; }
.flash-message.error   { background-color: #e53e3e; }
.flash-message.warning { background-color: #f6ad55; color: #000; }
.flash-message.info    { background-color: #4299e1; }

.flash-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
}



/* page blog show */

.card-hover {
    transition: all 0.3s ease;
}

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

.btn-hover {
    transition: all 0.2s ease;
}

.btn-hover:hover {
    transform: translateY(-1px);
}

.share-btn {
    position: fixed;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 40;
}

.share-btn .share-item {
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

.share-btn .share-item:hover {
    transform: scale(1.1);
}

.article-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    color: #1f2937;
}

.article-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem 0;
    color: #374151;
}

.article-content p {
    margin-bottom: 1.25rem;
    line-height: 1.7;
    color: #4b5563;
}

.article-content ul,
.article-content ol {
    margin: 1.25rem 0;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: #4b5563;
}

.article-content blockquote {
    border-left: 4px solid #3B82F6;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #6b7280;
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
}

@media (max-width: 1024px) {
    .share-btn {
        display: none;
    }
}