/* --------------------------------------------------
   GLOBAL
-------------------------------------------------- */
body {
    font-family: Arial, sans-serif;
}

/* GRID GÉNÉRAL */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

.grid-item {
    background-color: #f4f7f2;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* --------------------------------------------------
   NAVBAR
-------------------------------------------------- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #333;
    color: #fff;
    padding: 0.5rem 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.nav-list li a {
    color: #ff5722;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-list li a:hover {
    color: #ffa040;
}

/* Mobile burger */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle .bar {
    height: 3px;
    width: 25px;
    background-color: #fff;
    border-radius: 2px;
}

/* --------------------------------------------------
   TIMELINE
-------------------------------------------------- */
.timeline {
    display: flex;
    overflow-x: auto;
    gap: 2rem;
    padding: 2rem 0;
    position: relative;
    align-items: flex-start;
}

/* Ligne horizontale */
.timeline::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 100%;
    background-color: #ff5722;
}

.timeline-item {
    background-color: #f4f7f2;
    color: #333;
    min-width: 250px;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.timeline-item:hover {
    transform: scale(1.05);
}

/* Point sous la carte */
.timeline-item::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    background-color: #ff5722;
    border-radius: 50%;
    border: 2px solid #fff;
}

.timeline-date {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #ff5722;
}

/* --------------------------------------------------
   POPUP / MODAL
-------------------------------------------------- */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    z-index: 50;
}

.modal-content {
    background: white;
    color: #333;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    animation: fadeIn 0.3s ease;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    font-size: 1.8rem;
    font-weight: bold;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}

/* --------------------------------------------------
   COMPÉTENCES : GRID DES CATÉGORIES
-------------------------------------------------- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Cartes */
.skill-card {
    background: #f4f7f2;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Hover effect */
.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.15);
}

/* Icône */
.skill-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

/* Titre */
.skill-card h3 {
    margin-bottom: 10px;
    font-size: 1.3em;
}

/* Liste */
.skill-card ul {
    list-style: none;
    padding: 0;
}

.skill-card li {
    margin: 5px 0;
}

/* --------------------------------------------------
   RESPONSIVE
-------------------------------------------------- */
@media (max-width: 768px) {

    /* Navbar */
    .menu-toggle {
        display: flex;
    }

    .nav-list {
        position: absolute;
        top: 60px;
        left: -100%;
        width: 100%;
        flex-direction: column;
        background-color: #333;
        text-align: center;
        transition: left 0.3s;
    }

    .nav-list.active {
        left: 0;
    }

    .nav-list li {
        margin: 1rem 0;
    }

    /* Timeline en colonne */
    .timeline {
        flex-direction: column;
        overflow: visible;
        align-items: flex-start;
    }

    .timeline-item {
        width: 100%;
    }

    .timeline-item::after {
        bottom: auto;
        left: -8px;
        top: 50%;
        transform: translateY(-50%);
    }

    .timeline::after {
        display: none;
    }
}


/* --------------------------------------------------
   DARK MODE
-------------------------------------------------- */
@media (prefers-color-scheme: dark) {

    body {
        background-color: #292828;
        color: #f4f4f4;
    }

    header,
    footer {
        background-color: #1f1f1f;
        color: #fff;
    }

    a {
        color: #fa9805;
    }

    .navbar {
        background-color: #1f1f1f;
    }

    .nav-list li a {
        color: #ffb74d;
    }

    .nav-list li a:hover {
        color: #ffd27f;
    }

    .grid-item {
        background-color: #6c5f5f;
        color: #f4f4f4;
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    }

    /* Timeline */
    .timeline::after {
        background-color: #ffa040;
    }

    .timeline-item {
        background-color: #6c5f5f;
        color: #f4f4f4;
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    }

    .timeline-item::after {
        background-color: #ffa040;
        border-color: #292828;
    }

    .timeline-date {
        color: #ffa040;
    }

/* --------------------------------------------------
   COMPÉTENCES : GRID INDIVIDUELLES
-------------------------------------------------- */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.skill-card {
    background: #f4f7f2;
    border-radius: 12px;
    padding: 20px 10px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.skill-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.2);
}

/* Images — taille uniforme */
.skill-card img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    margin-bottom: 10px;
}

/* Nom de la compétence */
.skill-card p {
    margin: 0;
    font-weight: 600;
    font-size: 1rem;
    color: #333;
}

/* --------------------------------------------------
   MODE SOMBRE
-------------------------------------------------- */

@media (prefers-color-scheme: dark) {

    .skill-card {
        background-color: #5a4d4d;
        color: #f4f4f4;
        box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    }

    .skill-card:hover {
        box-shadow: 0 8px 20px rgba(0,0,0,0.6);
    }

    .skill-card p {
        color: #f4f4f4;
    }
}
/* --------------------------------------------------
   CONTACT : CARDS CLIQUABLES
-------------------------------------------------- */

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Carte cliquable */
.contact-card {
    text-decoration: none;
    background: #f4f7f2;
    border-radius: 12px;
    padding: 25px 15px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.2);
}

/* Icônes */
.contact-card img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    margin-bottom: 10px;
}

/* Texte */
.contact-card p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    width: 100%;
    position: relative;
    bottom: 0;
}

/* --------------------------------------------------
   MODE SOMBRE
-------------------------------------------------- */

@media (prefers-color-scheme: dark) {

    .contact-card {
        background-color: #5a4d4d;
        box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    }

    .contact-card:hover {
        box-shadow: 0 8px 18px rgba(0,0,0,0.6);
    }

    .contact-card p {
        color: #f4f4f4;
    }
}
