/* Général */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f4f4f4;
    color: #333;
}

/* Container global */
.container {
    width: 80%;
    margin: 0 auto;
}

/* Header */
header {
    height: 100vh; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-image: url('pictures/fond.webp'); 
    background-size: cover;
    background-position: center;
    background-attachment: fixed; 
    color: white;
}

.header-content h1 {
    font-size: 50px;
    font-weight: bold;
}

.header-content p {
    font-size: 24px;
}

header .header-image img {
    border-radius: 50%;
    width: 120px;
    height: 120px;
}

/* Sections */
section {
    min-height: 100vh; 
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px;
    scroll-snap-align: start;
    position: relative;
    background: linear-gradient(to bottom, #f4f4f4, #e0e0e0);
}

/* About */
#about {
    background-color: white;
}

/* Experience et Éducation */
#education, #experience {
    background-color: #f0f0f0;
    padding: 40px 0;
}

/* Projets */
#projects {
    display: flex;
    flex-direction: column; /* ✅ aligne le filtre au-dessus du contenu */
    align-items: center;
    gap: 2rem; /* espace entre le filtre et les cartes */
}

.project {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.project img {
    width: 100%;
    height: auto;
    margin-top: 10px;
}

/* Contact */
#contact {
    background-color: white;
}

#contact input, #contact textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    font-size: 16px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

#contact button {
    padding: 10px 20px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#contact button:hover {
    background-color: #555;
}

/* Social Icons */
.social-icons {
    margin-top: auto;
}

.social-icon {
    font-size: 32px;
    color: #ffffff;
    margin-right: 20px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-icon:hover {
    color: #0077b5;
}

/* Effet d'apparition */
.hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.show {
    opacity: 1;
    transform: translateY(0);
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    padding: 10px 0;
    text-align: center;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background: #333;
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 20px;
    box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
}

.timeline-item::before {
    content: '●';
    position: absolute;
    top: 20px;
    left: calc(100% + 10px);
    transform: translateX(-50%);
    font-size: 20px;
    color: #333;
}

.timeline-item:nth-child(even)::before {
    left: -10px;
}

.timeline-content {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

@media screen and (max-width: 768px) {
    .timeline::before {
        left: 20px; /* Déplace la ligne à gauche */
    }

    .timeline-item {
        width: 100%; /* Chaque élément prend toute la largeur */
        left: 0 !important;
        text-align: left; /* Alignement à gauche */
        padding-left: 40px; /* Décalage pour éviter que le texte touche la ligne */
    }

    .timeline-item::before {
        left: 10px; /* Place le point sur la ligne */
    }
}

.company-info {
    display: block; /* Cela aligne les éléments verticalement */
    margin-top: 10px; /* Espacement entre les éléments */
}

.company-logo {
    width: 75px; /* Ajuste la taille du logo */
    height: auto;
    margin-bottom: 10px; /* Espacement sous le logo */
}

.cards-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
}

.card {
  background-color: #fafafa;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 20px;
  width: 280px;
  text-align: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}


/* Titre des cartes */
.card h3 {
    font-size: 1.2em;
    margin-top: 20px;
    margin-bottom: 10px;
}

/* Texte des cartes */
.card p {
    color: #555;
    margin: 5px 0;
}

/* Style de base de la carte */
.card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* espace entre haut et bas */
    position: relative;
}

/* Image de la carte */
.card img {
    width: 100%;
    height: 200px; /* Ajuste cette valeur selon la taille que tu veux */
    object-fit: cover; /* L'image va couvrir la zone de l'élément */
    background-color: #eee;
}

/* Contenu caché par défaut */
.hidden-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, opacity 0.5s ease-out, padding 0.3s ease;
    padding: 0 0; /* pas de padding quand c'est fermé */
}

/* Quand la carte est active (ouverte) */
.card.active {
    background: #f9f9f9;
    box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.2);
}

/* Afficher le contenu quand la carte est active */
.card.active .hidden-content {
    max-height: 1000px; /* valeur très grande mais safe, juste pour transition */
    opacity: 1;
    padding: 10px 0; /* padding quand ouvert */
}

.github-icon {
    font-size: 40px; /* Taille de l'icône Discord */
    color: #000000; /* Optionnel, pour colorier l'icône Discord */
}

/* Section Competitions - Logo ajusté */
#competitions .competition-logo {
    width: 200px; /* Ajuste la taille du logo pour cette section */
    height: auto;
    margin-bottom: 10px;
}

.company-info p.justified {
    text-align: justify !important;
}

.card p.justified {
    text-align: justify !important;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* ✅ centre les boutons */
    gap: 1rem; /* espace entre les boutons */
    margin-bottom: 1rem;
}

.filter-btn {
    background-color: #f0f0f0;
    border: none;
    padding: 10px 18px;
    margin: 5px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: #333;
    color: #fff;
}

#projects .container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- COMPETITIONS SECTION --- */
#competitions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.competitions-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

/* Carte de compétition (style distinct des projets) */
.competition-card {
    background-color: #fafafa;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 20px;
    width: 280px;
    text-align: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.competition-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

/* Images dans les cartes */
.competition-card img.competition-logo {
    width: 100px;
    height: auto;
    margin: 10px 0;
    border-radius: 8px;
}

/* Texte */
.competition-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.competition-card p {
    font-size: 0.95rem;
    margin: 0.3rem 0;
}

/* Modal overlay */
.modal {
    display: none; /* caché par défaut */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
}

/* Modal content */
.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    text-align: center;
    position: relative;
}

.modal-content img {
    width: 100%;
    height: auto;
    margin: 15px 0;
}

/* Bouton de fermeture */
.modal .close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: color 0.2s;
}

.modal .close:hover {
    color: #000;
}

.skills {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.skills span {
    margin-bottom: 15px;
    background-color: #e0f7fa;
    color: #008eb9;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: transform 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.skills span:hover {
    transform: scale(1.1);
}

.social-icons2 {
    font-size: 32px;
    margin-top: auto !important;
    display: flex;
    justify-content: center; /* centre horizontalement */
    gap: 15px; /* espace entre les icônes */
}

.social-icons2 a {
  color: #000000;
  transition: color 0.3s ease, transform 0.3s ease;
}

.social-icons2 a:hover {
  color: #0077ff;
  transform: scale(1.1);
}
