/* ======= VARIABLES ======= */
:root {
    --primary-color: #f1f1f1;
    --secondary-color: #1f1f1f;
    --accent-color: #00bfff;
    --text-color: #ffffff;
    --text-second-color: #0d0d0d;
    --background-gradient: linear-gradient(to bottom, #0f2027, #203a43, #2c5364);
}

html, body {
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background: var(--background-gradient);
    color: var(--primary-color);
    line-height: 1.6;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 0, 50, 0.4), transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* ======= HEADER ======= */
.hero {
    background-color: transparent;
    color: var(--text-color);
    padding: 8rem 6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.hero-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    text-align: center;
}
.section p {
    font-size: 1.5rem; /* ou plus, selon ce que tu veux */
}

.hero-text {
    display: flex;
    flex-direction: column;
    align-items: center; /* centre le texte ET le bouton */
    text-align: center;
}


.hero h1 {
    font-size: 5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.9rem;
    color: var(--primary-color);
}

.btn {
    background-color: var(--accent-color);
    color: var(--text-second-color);
    padding: 0.8rem 2.3rem;
    border: none;
    border-radius: 9px;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    margin-top: 1.5rem;
}

.btn:hover {
    background-color: #009acd;
}

.profile-pic {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 4px solid var(--accent-color);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 5rem;
    margin: 1rem 0;
    padding: 1px;
}

nav a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.8rem;
    padding: 0.5rem 1rem;
}

nav a:hover {
    color: var(--accent-color);
}

/* ======= SECTIONS ======= */
.section {
    padding: 6rem 2rem;      /* plus d’espace intérieur */
    margin-top: 1rem;        /* espace entre les blocs */
    margin-bottom: 1.5rem;
    text-align: center;
    opacity: 0;
    transition: opacity 1.2s ease-out;
}


.section.visible {
    opacity: 1;
}

.section h2 {
    font-size: 4rem;
    margin-bottom: 2rem;
    color: var(--accent-color);
    text-transform: uppercase;
}

.section h3 {
    color: var(--accent-color);
    font-size: 1.9rem;
    margin-bottom: 1rem;
}

.skills-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.skills-block {
    width: 250px;
    background-color: #1a1a2e;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.skills-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.skills-list li {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}


.project-card {
    background-color: #1a1a2e;
    padding: 1.5rem;
    border-radius: 8px;
    color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0,0,0,0.4);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: scale(1.02);
}

.project-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
}

.project-link:hover {
    text-decoration: underline;
}

.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.contact-btn img {
    width: 60px;
    height: 60px;
    transition: transform 0.3s ease;
}

.contact-btn img:hover {
    transform: scale(1.1);
}

footer {
    text-align: center;
    padding: 1.5rem;
    background-color: #101010;
    color: var(--primary-color);
    margin-top: 2rem;
}

#scrollToTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--accent-color);
    color: #000;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    z-index: 999;
    transition: background-color 0.3s ease;
}

#scrollToTop:hover {
    background-color: #009acd;
}

@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
    }
    .skills-block {
        width: 90%;
    }
    nav ul {
        flex-direction: column;
        gap: 1rem;
    }
    .hero h1 {
        font-size: 2.8rem;
    }
    .section h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
  .projects-grid {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }

  .project-card {
    padding: 1rem;
  }
}

.profile-pic {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    border: 4px solid var(--accent-color);
    object-fit: cover;
    box-shadow: 0 0 20px rgba(0, 191, 255, 0.3);
    transition: transform 0.3s ease;
}

.profile-pic:hover {
    transform: scale(1.05);
}

.chart-container {
  width: 100%;
  max-width: 500px;   /* Limite la largeur */
  min-width: 280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.chart-container canvas {
  width: 100% !important;
  min-height: 250px !important; /* Force une lisibilité sur petit écran */
  max-height: 400px !important; /* Évite qu'il s'étire trop */
  height: auto !important;
  display: block;
  transition: all 0.3s ease-in-out;
  
}
#projects {
  opacity: 1 !important;
}
