/* ========================================
   Portfolio CSS - Amathéo Godard
   Design System et Styles Personnalisés
   ======================================== */

/* ========== Variables CSS ========== */
:root {
    /* Couleurs principales */
    --color-background: #F9FAFB;
    --color-text-primary: #111827;
    --color-text-secondary: #4B5563;
    --color-accent-primary: #6366F1;
    --color-accent-secondary: #22D3EE;

    /* Espacement */
    --spacing-section: 5rem;

    /* Animations */
    --transition-default: all 0.3s ease;
    --transition-long: all 0.5s ease;
}

/* ========== Reset et Base ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background-color: var(--color-background);
    color: var(--color-text-primary);
    line-height: 1.6;
}

/* ========== Header Styles ========== */
.header-nav {
    transition: var(--transition-default);
}

.header-nav.scrolled {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.nav-link {
    position: relative;
    transition: var(--transition-default);
}

.nav-link.active {
    color: var(--color-accent-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent-primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ========== Button Styles ========== */
.btn-primary {
    transition: var(--transition-default);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    transition: var(--transition-default);
}

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

/* ========== Card Styles ========== */
.timeline-card,
.skill-card,
.project-card {
    transition: var(--transition-default);
}

.timeline-card:hover,
.skill-card:hover,
.project-card:hover {
    transform: translateY(-8px);
}

/* ========== Hero Section ========== */
.hero-image-container {
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* ========== Form Styles ========== */
input:focus,
textarea:focus {
    outline: none;
}

input::placeholder,
textarea::placeholder {
    color: #9CA3AF;
}

/* ========== Utilities ========== */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========== Responsive Utilities ========== */
@media (max-width: 768px) {
    :root {
        --spacing-section: 3rem;
    }
}

/* ========== Animation Keyframes ========== */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

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

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ========== Custom Scrollbar ========== */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--color-accent-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5558E3;
}

/* ========== Selection Style ========== */
::selection {
    background-color: var(--color-accent-primary);
    color: white;
}

::-moz-selection {
    background-color: var(--color-accent-primary);
    color: white;
}

/* ========== Print Styles ========== */
@media print {

    header,
    footer,
    .btn-primary,
    .btn-secondary {
        display: none;
    }
}

/* Force les liens de l'overlay à être au-dessus de tout le reste dans la carte */
.project-card a {
    position: relative;
    z-index: 50;
    pointer-events: auto !important;
}

/* Empêche le clic du modal de se déclencher si on survole un bouton */
.project-card .group-hover\:opacity-100 {
    z-index: 40;
}