/* ===========================
   VARIABLES - Palette Personnalisée
   =========================== */
:root {
    --cream: #F7F3EE;
    --section-bg: #E8DCD0;
    --accent: #C9A27E;
    --text: #5A4A42;
    --text-secondary: #9C8F87;
}

/* ===========================
   RESET & BASE
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Syne', sans-serif;
    background: var(--cream);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.7;
}

/* ===========================
   BACKGROUND ANIMÉ
   =========================== */
.bg-grid {
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(201, 162, 126, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(232, 220, 208, 0.08) 0%, transparent 50%);
    z-index: -1;
}

/* ===========================
   ORBES LUMINEUX
   =========================== */
.orb {
    position: fixed;
    border-radius: 50%;
    opacity: 0.08;
    z-index: -1;
    animation: breathe 12s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent), transparent 70%);
    top: -200px;
    right: -200px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--section-bg), transparent 70%);
    bottom: -150px;
    left: -150px;
}

@keyframes breathe {
    0%, 100% { transform: scale(1); opacity: 0.08; }
    50% { transform: scale(1.15); opacity: 0.12; }
}

/* ===========================
   HEADER
   =========================== */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(247, 243, 238, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(201, 162, 126, 0.15);
    transition: all 0.3s;
}

.logo img {
    height: 70px;
    width: auto;
    display: block;
    object-fit: contain;
}

nav {
    display: flex;
    gap: 3.5rem;
}

nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    position: relative;
    transition: color 0.4s ease;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.4s ease;
}

nav a:hover {
    color: var(--accent);
}

nav a:hover::after {
    width: 100%;
}

/* ===========================
   HERO SECTION
   =========================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5%;
    position: relative;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    animation: fadeInUp 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-tag {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
    font-size: 0.85rem;
    margin-bottom: 1.2rem;
    letter-spacing: 1px;
    font-weight: 500;
    opacity: 0;
    animation: fadeIn 1s 0.4s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text);
    opacity: 0;
    animation: fadeIn 1s 0.6s forwards;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.8;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    animation: fadeIn 1s 0.8s forwards;
}

.cta-buttons {
    display: flex;
    gap: 1.2rem;
    opacity: 0;
    animation: fadeIn 1s 1s forwards;
    justify-content: center;
}

/* ===========================
   BOUTONS
   =========================== */
.btn {
    padding: 1.1rem 2.8rem;
    border: none;
    border-radius: 0;
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    display: inline-block;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 16px rgba(201, 162, 126, 0.25);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(201, 162, 126, 0.35);
    background: #B88E6E;
}

.btn-secondary {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-secondary:hover {
    background: var(--section-bg);
    transform: translateY(-2px);
}

/* ===========================
   SECTIONS
   =========================== */
section {
    padding: 8rem 5%;
}

#projets {
    background: var(--section-bg);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text);
    position: relative;
    padding-left: 3rem;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 35px;
    height: 3px;
    background: var(--accent);
    border-radius: 0;
}

/* ===========================
   PROJETS
   =========================== */
.projects-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 4rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 2rem;
    animation: scrollProjects 30s linear infinite;
}

.projects-grid::-webkit-scrollbar {
    height: 8px;
}

.projects-grid::-webkit-scrollbar-track {
    background: rgba(201, 162, 126, 0.1);
    border-radius: 10px;
}

.projects-grid::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 10px;
}

@keyframes scrollProjects {
    0% {
        scroll-padding-left: 0;
    }
    100% {
        scroll-padding-left: 100%;
    }
}

.project-card {
    background: white;
    border: 1px solid rgba(201, 162, 126, 0.2);
    border-radius: 0;
    padding: 2rem;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    min-width: 300px;
    max-width: 300px;
    flex-shrink: 0;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(201, 162, 126, 0.2);
    border-color: var(--accent);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.project-icon {
    font-size: 2.2rem;
    filter: grayscale(10%);
}

.project-links {
    display: flex;
    gap: 0.8rem;
}

.project-links a {
    color: var(--text-secondary);
    transition: all 0.3s;
    padding: 0.5rem;
}

.project-links a:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

.project-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--accent);
    font-weight: 700;
}

.project-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: 0.9rem;
}

/* ===========================
   TECH STACK
   =========================== */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}
 
.tech-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    padding: 0.4rem 0.9rem;
    background: var(--section-bg);
    border: none;
    border-radius: 0;
    color: var(--text);
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* ===========================
   COMPÉTENCES - Défilement Automatique
   =========================== */
.skills-container {
    display: flex;
    gap: 2rem;
    margin-top: 4rem;
    overflow: hidden;
    position: relative;
}
 
.skills-track {
    display: flex;
    gap: 2rem;
    animation: scrollSkills 15s linear infinite;
}
 
@keyframes scrollSkills {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}
 
.skill-category {
    background: white;
    padding: 2.5rem;
    border: 1px solid rgba(201, 162, 126, 0.2);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    min-width: 400px;  /* ← Plus large */
    max-width: 400px;  /* ← Plus large */
    flex-shrink: 0;
}
 
.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(201, 162, 126, 0.15);
    border-color: var(--accent);
}
 
.skill-category h3 {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 0.8rem;
}
 
.skill-category h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--accent);
}
 
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}
 
.skill-item {
    padding: 0.6rem 1.2rem;
    background: var(--section-bg);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 0;
    transition: all 0.3s;
    border: 1px solid transparent;
}
 
.skill-item:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateY(-2px);
}
 
/* ===========================
   CONTACT
   =========================== */
#contact {
    background: var(--section-bg);
}
 
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    margin-top: 4rem;
}
 
.contact-info h3 {
    font-size: 2rem;
    color: var(--text);
    margin-bottom: 1.5rem;
    font-weight: 700;
}
 
.contact-info p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 3rem;
    font-size: 1.05rem;
}
 
.contact-details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
 
.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}
 
.contact-icon {
    font-size: 2rem;
    flex-shrink: 0;
}
 
.contact-item strong {
    display: block;
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}
 
.contact-item p {
    color: var(--text-secondary);
    margin: 0;
}
 
.contact-form {
    background: white;
    padding: 3rem;
    border: 1px solid rgba(201, 162, 126, 0.2);
}
 
.form-group {
    margin-bottom: 2rem;
}
 
.form-group label {
    display: block;
    color: var(--text);
    font-weight: 600;
    margin-bottom: 0.8rem;
    font-size: 0.95rem;
}
 
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid rgba(201, 162, 126, 0.3);
    background: var(--cream);
    color: var(--text);
    font-family: 'Syne', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s;
    resize: vertical;
}
 
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: white;
    box-shadow: 0 0 0 3px rgba(201, 162, 126, 0.1);
}
 
.contact-form .btn {
    width: 100%;
    margin-top: 1rem;
}
 
/* ===========================
   FOOTER
   =========================== */
footer {
    padding: 4rem 5%;
    text-align: center;
    border-top: 1px solid rgba(201, 162, 126, 0.2);
    background: white;
}
 
footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}
 
.footer-links {
    margin-top: 1rem;
}
 
.footer-links a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.85rem;
    transition: opacity 0.3s;
}
 
.footer-links a:hover {
    opacity: 0.7;
}
 
/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 768px) {
    header {
        padding: 1rem 4%;
    }

    .logo img {
        height: 50px;
    }

    nav {
        gap: 1.5rem;
        font-size: 0.85rem;
    }

    nav a {
        font-size: 0.85rem;
    }

    .hero {
        padding: 0 4%;
        min-height: 80vh;
    }

    .hero-content {
        max-width: 100%;
    }

    section {
        padding: 4rem 4%;
    }

    h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .section-title {
        font-size: 1.8rem;
        padding-left: 2.5rem;
    }

    .section-title::before {
        width: 30px;
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        padding: 1rem 2rem;
    }

    /* Projets */
    .projects-grid {
        justify-content: flex-start;
        flex-wrap: nowrap;
    }

    .project-card {
        min-width: 280px;
        max-width: 280px;
        padding: 1.5rem;
    }

    .project-card h3 {
        font-size: 1.2rem;
    }

    .project-card p {
        font-size: 0.85rem;
    }

    /* Compétences */
    .skills-track {
        animation: scrollSkills 10s linear infinite;
    }

    .skill-category {
        min-width: 280px;
        max-width: 280px;
        padding: 2rem;
    }

    .skill-category h3 {
        font-size: 1.3rem;
    }

    .skill-item {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }

    /* Contact */
    .contact-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .contact-info h3 {
        font-size: 1.6rem;
    }

    .contact-info p {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    .contact-details {
        gap: 1.5rem;
    }

    .contact-icon {
        font-size: 1.5rem;
    }

    .contact-item strong {
        font-size: 1rem;
    }

    .contact-form {
        padding: 2rem;
    }

    .form-group {
        margin-bottom: 1.5rem;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 0.9rem;
        font-size: 0.9rem;
    }

    /* Footer */
    footer {
        padding: 3rem 4%;
    }

    footer p {
        font-size: 0.85rem;
    }

    .footer-links a {
        font-size: 0.8rem;
    }
}

/* Très petits écrans */
@media (max-width: 480px) {
    .logo img {
        height: 40px;
    }

    nav {
        gap: 1rem;
    }

    nav a {
        font-size: 0.8rem;
    }

    h1 {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.5rem;
        padding-left: 2rem;
    }

    .project-card,
    .skill-category {
        min-width: 260px;
        max-width: 260px;
    }

    .contact-form {
        padding: 1.5rem;
    }
}