/* style.css */

:root {
    --primary-color: #004080; /* 10% lighter blue */
    --background-color: #f0f2f5;
    --text-color: #333;
    --card-background: #fff;
}

body.dark-mode {
    --primary-color: #60a5fa;
    --background-color: #1f2937;
    --text-color: #f9fafb;
    --card-background: #374151;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between; /* Ensure space between nav and button */
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

#language-toggle {
    background: none;
    border: 2px solid white;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    margin-right: auto; /* Push the button to the far left */
}

#language-toggle:hover {
    background-color: white;
    color: var(--primary-color);
}

nav {
    display: flex;
    gap: 20px; /* Add spacing between menu items */
}

nav a {
    color: white;
    margin: 0 10px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    position: relative;
}

nav a::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: white;
    transition: width 0.3s;
}

nav a:hover::after {
    width: 100%;
}

nav a:hover {
    text-decoration: underline;
}

#dark-mode-toggle {
    background: none;
    border: 2px solid white;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    margin-left: auto; /* Push the button to the right */
}

#dark-mode-toggle:hover {
    background-color: white;
    color: var(--primary-color);
}

.container {
    max-width: 1000px;
    margin: 30px auto;
    padding: 20px;
    background: var(--card-background);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: background-color 0.3s;
}

h1, h2, h3 {
    color: var(--primary-color);
}

section {
    margin-bottom: 40px;
}

.filters {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

/* Style pour les tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.tags span {
    background-color: #f0f2f5;
    color: #3b82f6;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
}

#filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

#filter-tags label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: var(--text-color);
}

#filter-tags input {
    accent-color: var(--primary-color);
    cursor: pointer;
}

#reset-filters {
    background-color: #ff4d4d;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 15px;
}

#reset-filters:hover {
    background-color: #ff3333;
}


.filters select {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    background: var(--card-background);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}


/* Style global pour les filtres */
/* Style du bouton pour afficher/masquer les filtres */
.toggle-filters-btn {
    background-color: #007bff;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin-bottom: 20px;
    transition: background-color 0.3s;
}

.toggle-filters-btn:hover {
    background-color: #0056b3;
}

/* Cacher le conteneur des filtres par défaut */
#filters-container.filters-hidden {
    display: none;
}

#filters-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 20px;
    background-color: #f0f4f8;
    border-radius: 10px;
    margin-bottom: 30px;
}

#filters-container label {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

#filters-container select {
    margin: 5px 0;
    padding: 8px 12px;
    border: 2px solid #4e89c9;
    border-radius: 5px;
    background-color: #fff;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

#filters-container select:focus {
    border-color: #0066cc;
}

#filters-container select option {
    padding: 10px;
}

/* Style du bouton réinitialiser */
#filters-container button {
    background-color: #0066cc;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

#filters-container button:hover {
    background-color: #005bb5;
}

/* Style des tags sur les projets */

.projects-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.projects-group {
    display: flex;
    flex-direction: column;
    position: relative;
    padding-left: 20px;
    margin-left: 30px;
}

.projects-group-header {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.projects-group-header::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--primary-color);
}

.project {
    background-color: var(--card-background);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}


.project-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.project .tags {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.project .tags span {
    background-color: #e0f1ff;
    padding: 5px 10px;
    border-radius: 20px;
    color: #0066cc;
    font-size: 12px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.project .tags span:hover {
    background-color: #b3d9ff;
}

.project .truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    white-space: normal;
}

.project p {
    margin: 10px 0;
}

.year-label {
    padding-left: 10px;
    color: var(--primary-color);
}

.experiences-group {
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: relative;
    padding-left: 20px;
    margin-left: 30px;
}

.experience {
    position: relative;
    padding-left: 20px;
    border-left: 3px solid var(--primary-color);
}

.experience h2 {
    margin: 0;
    color: var(--primary-color);
}

.diplomas-group {
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: relative;
    padding-left: 20px;
    margin-left: 30px;
}

.diploma {
    position: relative;
    padding-left: 20px;
    border-left: 3px solid var(--primary-color);
}

.diploma h2 {
    margin: 0;
    color: var(--primary-color);
}

.certification {
    background-color: var(--card-background);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

.certification h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.certification p {
    color: var(--text-color);
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }
    nav {
        margin-top: 10px;
    }
}

.truncate {
    display: inline; /* Ensure text and "voir plus" are on the same line */
    white-space: nowrap; /* Prevent wrapping */
    overflow: hidden;
    text-overflow: ellipsis;
}

.truncate span {
    font-weight: bold;
    color: var(--primary-color); /* Use the site's primary color */
    cursor: pointer;
    text-decoration: none; /* Remove underline */
    transition: color 0.3s ease; /* Smooth color transition */
}

.truncate span:hover {
    color: #0056b3; /* Slightly darker shade on hover */
}

.voir-plus {
    font-weight: bold;
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: none;
    margin-left: 5px;
}

.voir-plus:hover {
    color: #0059b3; /* Slightly darker shade on hover */
}

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

a:hover {
    color: #0059b3; /* Slightly darker blue on hover */
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #003366; /* Darker blue on hover */
}

button#dark-mode-toggle {
    background: none;
    border: 2px solid white;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

button#dark-mode-toggle:hover {
    background-color: white;
    color: var(--primary-color);
}

.month-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    position: relative;
}

.month-divider span {
    font-weight: bold;
    color: var(--primary-color);
    background: white; /* Ensure text is readable */
    padding: 0 5px;
    z-index: 1; /* Ensure the text is above other elements */
}

.competences-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}
