@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap');

/* Style du corps du site */
* {
    font-family: "Source Sans 3", sans-serif;
}
:root {
    --primary-color: #2ecc71;
    --secondary-color: #f1f1f1;
    --bg-body: #ffffff;
    --bg-card: #f8f9fa;
    --text-main: #1a1a1a;
    --text-muted: #515669;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --card-border: 1px solid #eeeeee;
}
html {
    scroll-behavior: smooth;
}
body {
    background-color: var(--bg-body);
    color: var(--text-muted);
    transition: background-color 0.5s ease, color 0.5s ease;
}
.container {
    margin: 0 auto;
    width: 50%;
}
.about-section {
    padding: 30px 50px;
}
.section-title {
    color: var(--text-main);
    font-size: 2.5rem;
    margin-bottom: 10px;
    position: relative;
}
.section-title::after {
    content: "";
    display: block;
    width: 50px;
    height: 4px;
    background-color: var(--primary-color);
    margin-top: 8px;
}
.subtitle {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin: 30px 0 20px 0;
}
.description {
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 900px;
    margin-bottom: 15px;
}

/* Grille de stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 40px 0;
}
.stat-card {
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease;
    border: var(--card-border);
    box-shadow: var(--card-shadow);
}
.stat-card:hover {
    transform: translateY(-5px);
}
.stat-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}
.stat-card h3 {
    margin-bottom: 2px;
}

/* Bouton CV */
.btn-cv {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s ease;
}
.btn-cv:hover {
    opacity: 0.9;
    transform: translateY(-5px);
}
.img-container {
	width: 100px;
	height: 100px;
	border-radius: 50%;
	border: 4px solid var(--primary-color);
	overflow: hidden;
}
.img-container img {
    width: 100%;
    height: auto;
    display: block;
}
.content {
	font-size: 16px;
	font-weight: 400;
	color: var(--text-muted);
}
span {
	color: var(--primary-color);
}
.link-container {
    display: inline-flex;
    justify-content: space-between;
    width: 50%;
}

.link-container a {
    text-decoration: none;
    color: var(--text-main);
    padding: 10px;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.link-container a:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}
.link-arrow::after {
	content: '→';
    margin-left: 5px;
    transition: transform 0.3s ease;
}
.social {
	display: flex;
    justify-content: space-between;
    width: 25%;
    padding: 10px;	
}
.social i {
	font-size: 20px;
	color: var(--primary-color);
	transition: transform 0.3s ease;
}
.social i:hover {
	transform: scale(1.1);
}
.skills-section {
    padding: 30px 50px;
}

.skill-category {
    margin-bottom: 40px;
}

.category-title {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 5px;
}

.category-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background-color: var(--primary-color);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}

.skill-item {
    background-color: var(--bg-card);
    border: var(--card-border);
    box-shadow: var(--card-shadow);
    border-radius: 8px;
    padding: 25px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.skill-item i {
    font-size: 2.2rem;
    color: var(--primary-color);
}

.skill-item span {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}
.services-section {
    padding: 30px 50px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.service-card {
    background-color: var(--bg-card);
    border: var(--card-border);
    box-shadow: var(--card-shadow);
    padding: 40px 30px;
    border-radius: 15px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Aligné à gauche comme sur la capture */
    text-align: left;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
}

.service-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

.service-card p {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 0.95rem;
}
.projects-section {
    padding: 30px 50px;
}

/* Filtres */
.filter-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--primary-color);
    font-weight: 400;
    color: var(--text-main);
    padding: 8px 25px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active, .filter-btn:hover {
    background: var(--primary-color);
    color: white;
    font-weight: bold;
}

/* Grille */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.project-card {
    width: 100%;
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.project-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image-container img {
    transform: scale(1.05);
}

/* Overlay au survol */
.project-details-overlay {
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    padding: 15px;
    box-sizing: border-box;
}

.project-card:hover .project-details-overlay {
    opacity: 1;
}

.details-content {
    text-align: center;
    color: white; /* Force le texte en blanc sur le fond sombre */
}

.project-title {
    font-size: 1.3rem;
    color: var(--primary-color); /* Utilise ta couleur d'accent (ex: vert) */
    margin-bottom: 10px;
}

.project-tags {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.tag {
    background-color: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
}

.project-description {
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 15px;
    color: #eeeeee;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Le bouton 'Voir le projet' encadré */
.btn-view-project {
    display: inline-block;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-view-project:hover {
    background-color: var(--primary-color);
    color: white;
}
.contact-section {
    padding: 30px 50px;
}

.contact-wrapper {
    display: flex;
    gap: 50px;
    margin-top: 40px;
    align-items: flex-start;
}

/* Infos de contact */
.contact-info {
    flex: 1;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    background: rgba(var(--primary-rgb), 0.1);
    padding: 15px;
    border-radius: 10px;
}

.info-item h4 {
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.info-item a, .info-item p {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.info-item a:hover {
    color: var(--primary-color);
}

.social-links {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

.social-links a {
    font-size: 1.5rem;
    color: var(--text-main);
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--primary-color);
}

/* Formulaire */
.contact-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input, .contact-form textarea {
    background-color: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    color: white;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s;
}

.contact-form input:focus, .contact-form textarea:focus {
    border-color: var(--primary-color);
}

.btn-submit {
    background-color: var(--primary-color);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s;
    margin-top: 10px;
}

.btn-submit:hover {
    opacity: 0.9;
}

footer {
    text-align: center;
    padding: 20px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 40px;
}

/* Responsive */
@media (max-width: 768px) {
    .contact-wrapper {
        flex-direction: column;
        gap: 30px;
    }
    .contact-form, .contact-info {
        width: 100%;
    }
    .btn-submit {
        width: 100%;
    }
    .img-container {
        margin: 0 auto 20px auto;
    }
}
/* Ajustement pour les petits écrans */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    .project-card {
        margin-top: 0 10px;
    }
}

@media (max-width: 480px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .projects-grid {
        /* Sur mobile, on repasse à 1 seule colonne pour éviter que ce soit trop petit */
        grid-template-columns: 1fr; 
    }
}
/* Styles du mode dark */
body.dark-mode {
	--bg-body: #0a0a0a;
    --bg-card: #161616;
    --secondary-color: #333;
    --text-muted: #f1f1f1;
    --text-main: #ffffff;
    --card-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
    --card-border: 1px solid rgba(255, 255, 255, 0.05);
}
/* Styles du bouton toggle */
.toggle-button {
    background-color: var(--secondary-color);
    border: 1px solid var(--primary-color);
    border-radius: 30px;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 10px 20px;
    transition: background-color 0.3s, color 0.3s;
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Styles pour l'effet de bascule */
.toggle-button i {
    transition: transform 0.3s;
}

body.dark-mode .toggle-button i {
    transform: rotate(180deg);
}
#backToTop {
    display: none;
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 99;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: 1px solid var(--primary-color);
    background-color: var(--secondary-color);
    color: var(--primary-color);
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, opacity 0.3s;
}

#backToTop:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    #backToTop {
        bottom: 70px; 
    }
}
/* Media Queries */
@media screen and (max-width: 768px) {
    .container {
        width: 100%;
    }

    div ul li {
        display: block;
        margin: 10px 0;
    }

    div ul {
        text-align: left;
        padding-left: 20px;
    }
}
@media screen and (max-width: 480px) {
	div ul {
		padding-left: 10px;
	}
	.img-container{
		margin-top: 20px;
	}
	.content {
		flex-direction: column;
		text-align: center;
		padding-right: 0;
	}
}