/* ================= RESET ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ================= BASE ================= */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
    line-height: 1.6;
}

/* ================= CURSOR ================= */
.cursor,
.cursor-follower {
    position: fixed;
    pointer-events: none;
    border-radius: 50%;
    mix-blend-mode: difference;
    z-index: 9999;
}

.cursor {
    width: 18px;
    height: 18px;
    border: 2px solid #fff;
    transition: transform 0.1s ease;
}

.cursor-follower {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255,255,255,.3);
    transition: transform .25s ease;
}

/* ================= NAV ================= */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    mix-blend-mode: difference;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
}

.logo {
    color: #fff;
    font-size: .9rem;
    letter-spacing: .1em;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 3rem;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: .85rem;
    letter-spacing: .1em;
    transition: opacity .3s;
}

.nav-links a:hover {
    opacity: .6;
}

/* ================= LAYOUT ================= */
section {
    min-height: 100vh;
    padding: 8rem 5%;
}

/* ================= HERO ================= */
.hero {
    max-width: 1000px;
    margin: auto;
    padding-bottom: 10rem;
}

.hero-subtitle {
    text-transform: uppercase;
    letter-spacing: .15em;
    color: #666;
    margin-bottom: 2rem;
    animation: fadeUp 1s forwards;
}

.hero h1 {
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 300;
    margin-bottom: 2rem;
    animation: fadeUp 1s .2s forwards;
    min-height: 8rem;
    display: flex;
    align-items: center;
}

.hero p {
    color: #888;
    max-width: 700px;
    margin-bottom: 3rem;
    animation: fadeUp 1s .4s forwards;
}

.hero-cta {
    border: 1px solid #333;
    padding: 1rem 2.5rem;
    color: #fff;
    text-decoration: none;
    letter-spacing: .1em;
    transition: .3s;
}

.hero-cta:hover {
    background: #fff;
    color: #000;
}

/* ================= TITRES ================= */
h2 {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .15em;
    font-size: .9rem;
    color: #666;
    margin-bottom: 4rem;
}

/* ================= PROJECTS ================= */
article {
    max-width: 900px;
    margin: 0 auto 4rem;
}

article h3 {
    font-size: 1.5rem;
    margin-bottom: .8rem;
}

article p {
    color: #888;
}

article ul {
    display: flex;
    gap: .8rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

article li {
    border: 1px solid #333;
    padding: .3rem .8rem;
    font-size: .75rem;
    color: #666;
}

/* ================= CONTACT ================= */
.contact p,
.contact a {
    font-size: 1.1rem;
    color: #fff;
    text-decoration: none;
}

.contact a:hover {
    opacity: .6;
}

/* ================= ROTATING TEXT ================= */
#rotating-text {
    display: inline-block;
    position: relative;
}

#rotating-text::after {
    content: '|';
    position: absolute;
    right: -10px;
    animation: blink 0.7s infinite;
    color: #fff;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* ================= SKILLS CAROUSEL ================= */
.skills-carousel {
    padding: 4rem 0;
    overflow: hidden;
    background: linear-gradient(to bottom, #0a0a0a 0%, #0f0f0f 50%, #0a0a0a 100%);
    border-top: 1px solid #1a1a1a;
    border-bottom: 1px solid #1a1a1a;
    margin-top: -5rem;
}

.carousel-track {
    display: flex;
    gap: 3rem;
    animation: scrollCarousel 30s linear infinite;
    width: fit-content;
}

.carousel-item {
    font-size: 1.2rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: .15em;
    white-space: nowrap;
    transition: color .3s ease;
    cursor: default;
}

.carousel-item:hover {
    color: #fff;
}

@keyframes scrollCarousel {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ================= ABOUT PAGE ================= */
.about-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 5%;
}

.about-container {
    max-width: 1200px;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 5rem;
    align-items: center;
}

/* Image avec décoration */
.about-image-wrapper {
    position: relative;
    animation: slideInLeft 1s ease forwards;
    opacity: 0;
}

.image-decoration {
    position: absolute;
    top: -20px;
    left: -20px;
    right: 20px;
    bottom: 20px;
    border: 2px solid #333;
    z-index: -1;
    transition: all 0.3s ease;
}

.about-image-wrapper:hover .image-decoration {
    top: -30px;
    left: -30px;
    right: 30px;
    bottom: 30px;
    border-color: #666;
}

.about-image {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(100%);
    transition: filter 0.5s ease, transform 0.3s ease;
}

.about-image:hover {
    filter: grayscale(0%);
    transform: scale(1.02);
}

/* Contenu texte */
.about-content {
    animation: slideInRight 1s ease forwards;
    opacity: 0;
    animation-delay: 0.2s;
}

.about-title {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 2rem;
    text-align: left;
    color: #fff;
    letter-spacing: 0.05em;
    position: relative;
    display: inline-block;
}

.about-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 2px;
    background: #fff;
    animation: expandWidth 1s ease forwards;
    animation-delay: 0.5s;
}

.about-text {
    color: #888;
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.05rem;
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.about-text:nth-child(2) {
    animation-delay: 0.4s;
}

.about-text:nth-child(3) {
    animation-delay: 0.6s;
}

.about-text:nth-child(4) {
    animation-delay: 0.8s;
}

/* Boutons */
.about-buttons {
    display: flex;
    gap: 1.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.about-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.about-buttons .about-btn:nth-child(1) {
    animation-delay: 1s;
}

.about-buttons .about-btn:nth-child(2) {
    animation-delay: 1.2s;
}

.btn-primary {
    background: #fff;
    color: #0a0a0a;
    border: 2px solid #fff;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-primary:hover {
    color: #fff;
}

.btn-primary:hover::before {
    left: 0;
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border: 2px solid #333;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #fff;
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-secondary:hover {
    color: #0a0a0a;
    border-color: #fff;
}

.btn-secondary:hover::before {
    left: 0;
}

.about-btn svg {
    transition: transform 0.3s ease;
}

.about-btn:hover svg {
    transform: translateX(5px);
}

.btn-primary:hover svg {
    transform: translateY(3px);
}

/* Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes expandWidth {
    from {
        width: 0;
    }
    to {
        width: 60px;
    }
}

/* Responsive */
@media (max-width: 968px) {
    .about-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-image-wrapper {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .about-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 600px) {
    .about-buttons {
        flex-direction: column;
    }
    
    .about-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ================= CONTACT PAGE ================= */
.contact-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 5%;
}

.contact-container {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 5rem;
    align-items: start;
}

/* Formulaire */
.contact-form-wrapper {
    animation: slideInLeft 0.8s ease forwards;
    opacity: 0;
}

.contact-title {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    color: #fff;
    text-align: left;
}

.contact-subtitle {
    color: #666;
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.form-group:nth-child(1) { animation-delay: 0.2s; }
.form-group:nth-child(2) { animation-delay: 0.3s; }
.form-group:nth-child(3) { animation-delay: 0.4s; }
.form-group:nth-child(4) { animation-delay: 0.5s; }

.form-group label {
    color: #888;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.form-group input,
.form-group textarea {
    background: transparent;
    border: none;
    border-bottom: 2px solid #333;
    color: #fff;
    padding: 1rem 0;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-bottom-color: #fff;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #444;
}

.submit-btn {
    background: #fff;
    color: #0a0a0a;
    border: 2px solid #fff;
    padding: 1.2rem 2.5rem;
    font-size: 1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    animation-delay: 0.6s;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: #0a0a0a;
    transition: width 0.6s ease, height 0.6s ease;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.submit-btn:hover::before {
    width: 400px;
    height: 400px;
}

.submit-btn:hover {
    color: #fff;
}

.submit-btn svg {
    transition: transform 0.3s ease;
}

.submit-btn:hover svg {
    transform: translateX(5px);
}

/* Réseaux sociaux */
.contact-socials {
    animation: slideInRight 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.3s;
}

.socials-title {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
    color: #fff;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.2rem 1.5rem;
    background: transparent;
    border: 2px solid #333;
    color: #888;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.social-link:nth-child(1) { animation-delay: 0.5s; }
.social-link:nth-child(2) { animation-delay: 0.6s; }
.social-link:nth-child(3) { animation-delay: 0.7s; }
.social-link:nth-child(4) { animation-delay: 0.8s; }

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    transition: left 0.4s ease;
    z-index: -1;
}

.social-link svg {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.social-link span {
    font-size: 1rem;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

/* Couleurs spécifiques par réseau */
.social-link.linkedin::before {
    background: #0077b5;
}

.social-link.linkedin:hover {
    border-color: #0077b5;
    color: #fff;
}

.social-link.github::before {
    background: #333;
}

.social-link.github:hover {
    border-color: #333;
    color: #fff;
}

.social-link.instagram::before {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-link.instagram:hover {
    border-color: #e1306c;
    color: #fff;
}

.social-link.email::before {
    background: #666;
}

.social-link.email:hover {
    border-color: #666;
    color: #fff;
}

.social-link:hover::before {
    left: 0;
}

.social-link:hover svg {
    transform: scale(1.1) rotate(5deg);
}

/* Informations de contact */
.contact-info {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #333;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    animation-delay: 0.9s;
}

.info-text {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.info-text svg {
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 968px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
}

@media (max-width: 600px) {
    .contact-title {
        font-size: 2rem;
    }
    
    .social-link {
        padding: 1rem;
    }
}

/* ================= PROJECTS PAGE ================= */
.projects-section {
    min-height: 100vh;
    padding: 8rem 5%;
}

.projects-container {
    max-width: 1400px;
    margin: 0 auto;
}

.projects-main-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 1rem;
    color: #fff;
    animation: fadeInDown 0.8s ease forwards;
    opacity: 0;
}

.projects-subtitle {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 4rem;
    animation: fadeInDown 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.2s;
}

/* Filtres */
.filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.3s;
}

.filter-btn {
    background: transparent;
    border: 2px solid #333;
    color: #666;
    padding: 0.8rem 2rem;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #fff;
    transition: left 0.3s ease;
    z-index: -1;
}

.filter-btn:hover {
    border-color: #fff;
    color: #fff;
}

.filter-btn.active {
    background: #fff;
    color: #0a0a0a;
    border-color: #fff;
}

.filter-btn:hover::before {
    left: 0;
}

.filter-btn.active::before {
    display: none;
}

/* Grille de projets */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
}

.project-card {
    background: #0f0f0f;
    border: 1px solid #1a1a1a;
    overflow: hidden;
    transition: all 0.4s ease;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    cursor: pointer;
}

.project-card:nth-child(1) { animation-delay: 0.5s; }
.project-card:nth-child(2) { animation-delay: 0.6s; }
.project-card:nth-child(3) { animation-delay: 0.7s; }
.project-card:nth-child(4) { animation-delay: 0.8s; }
.project-card:nth-child(5) { animation-delay: 0.9s; }
.project-card:nth-child(6) { animation-delay: 1s; }
.project-card:nth-child(7) { animation-delay: 1.1s; }
.project-card:nth-child(8) { animation-delay: 1.2s; }
.project-card:nth-child(9) { animation-delay: 1.3s; }

.project-card.hide {
    display: none;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: #333;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* Image du projet */
.project-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    filter: grayscale(50%);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
    filter: grayscale(0%);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.project-link {
    color: #fff;
    text-decoration: none;
    padding: 1rem 2rem;
    border: 2px solid #fff;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.project-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #fff;
    transition: left 0.3s ease;
    z-index: -1;
}

.project-link:hover {
    color: #0a0a0a;
}

.project-link:hover::before {
    left: 0;
}

/* Contenu du projet */
.project-content {
    padding: 2rem;
}

.project-category {
    display: inline-block;
    color: #666;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
    padding: 0.3rem 0.8rem;
    border: 1px solid #333;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 400;
    color: #fff;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.project-card:hover .project-title {
    color: #ccc;
}

.project-description {
    color: #888;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: transparent;
    border: 1px solid #333;
    color: #666;
    padding: 0.3rem 0.8rem;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.project-card:hover .tag {
    border-color: #666;
    color: #888;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .filters {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .projects-main-title {
        font-size: 2rem;
    }
}

/* ================= FOOTER ================= */
footer {
    border-top: 1px solid #1a1a1a;
    padding: 3rem;
    text-align: center;
    color: #666;
    font-size: .85rem;
}

/* ================= ANIM ================= */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .cursor,
    .cursor-follower {
        display: none;
    }
}