:root {
    --primary: #3b82f6;
    --secondary: #1e40af;
    --dark: #1e293b;
    --light: #f8fafc;
    --text: #475569;
    --success: #10b981;
}

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

html {
    scroll-behavior: smooth;
}

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

/* Header / Hero */
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 5rem 2rem;
    text-align: center;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

header .intro {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    line-height: 1.8;
    opacity: 0.95;
    animation: fadeInUp 1s ease;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1.2s ease;
}

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

/* Navigation */
nav {
    background: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

nav a {
    color: var(--dark);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

nav a:hover {
    color: var(--primary);
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

section {
    background: white;
    margin: 2rem 0;
    padding: 3rem 2rem;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0,0,0,1);
}

h2 {
    color: var(--dark);
    margin-bottom: 1rem;
    font-size: 2.2rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--text);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.skills h2 i {
    margin-right: 0.5rem;
    color: var(--secondary);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: var(--dark);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.5rem;
    background-color: gainsboro;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.tech-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.tech-item img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5)); 
}

.tech-item span {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Certification Badge */
.certification {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    border-radius: 10px;
    margin: 2rem auto;
    max-width: 800px;
}

.certification h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.certification p {
    margin: 0.3rem 0;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    background: white;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

.project-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.project-card h3 {
    color: var(--dark);
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}

.project-card p {
    color: var(--text);
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.project-card ul {
    margin: 1rem 0 1rem 1.5rem;
    color: var(--text);
}

.project-card li {
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}

.btn-success {
    background: var(--success);
}

.btn-success:hover {
    background: #059669;
}

/* contact */
.contact-info {
    display: grid; 
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem; 
    max-width: 900px;
    margin: 0 auto 2rem auto;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-item i {
    font-size: 1.5rem; 
    color: var(--primary); 
    display: flex;
    align-items: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 1.2rem;
}

.social-btn:hover {
    background: var(--secondary);
    transform: translateY(-3px);
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    header .intro {
        font-size: 1.1rem;
    }

    nav ul {
        flex-direction: column;
        gap: 1rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    h2 {
        font-size: 1.8rem;
    }

    .contact-info {
    grid-template-columns: 1fr; /* Empile les éléments de contact sur une seule colonne */
}
}

/* Scroll to top */
#scrollTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
    transition: all 0.3s;
    z-index: 1000;
}

#scrollTop:hover {
    background: var(--secondary);
    transform: translateY(-5px);
}

#scrollTop.show {
    display: flex;
}
