/* Reset et Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #1a1625; /* Fond violet très foncé */
    color: #f0e6ff; /* Texte clair lavande */
    line-height: 1.6;
}

/* Variables de couleurs */
:root {
    --primary-color: #a78bfa; /* Violet clair */
    --primary-soft: #bca7ff; /* Violet un peu plus clair que la bordure */
    --bg-light: #2a1f3d;
    --text-grey: #c4b5fd;
    --grey-soft: #d3c7ff; /* Variante éclaircie du gris lavande */
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background-color: rgba(26, 22, 37, 0.95);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(167, 139, 250, 0.2);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    font-size: 0.9rem;
    transition: color 0.3s;
}

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

/* Burger Menu (Mobile) */
.burger {
    display: none;
    cursor: pointer;
}
.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px;
    transition: all 0.3s ease;
}

/* Footer */
footer {
    background-color: var(--bg-light);
    padding: 40px 5%;
    text-align: center;
    border-top: 1px solid rgba(167, 139, 250, 0.2);
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

footer p {
    color: var(--text-grey);
    margin: 0;
}

/* Bouton de langue */
.lang-toggle {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    position: relative;
}

.lang-toggle:hover {
    background: rgba(167, 139, 250, 0.1);
    transform: scale(1.05);
}

.lang-icon {
    display: inline-block;
}

/* Menu déroulant de langues */
.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #2a1f3d;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    margin-top: 10px;
    display: none;
    flex-direction: column;
    gap: 0;
    min-width: 150px;
    z-index: 1001;
    box-shadow: 0 4px 15px rgba(167, 139, 250, 0.2);
}

.lang-dropdown.active {
    display: flex;
}

.lang-option {
    background: transparent;
    border: none;
    color: var(--primary-color);
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
}

.lang-option:hover {
    background: rgba(167, 139, 250, 0.2);
    padding-left: 20px;
}

.lang-option:first-child {
    border-radius: 3px 3px 0 0;
}

.lang-option:last-child {
    border-radius: 0 0 3px 3px;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5%;
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 10px;
}

.highlight {
    color: var(--primary-color);
    text-shadow: 0 0 20px rgba(167, 139, 250, 0.5);
}

.hero h2 {
    font-size: 2.5rem;
    color: var(--text-grey);
    margin-bottom: 20px;
}

.hero p {
    color: var(--text-grey);
    max-width: 500px;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* Boutons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: transparent;
    font-size: 1rem;
    margin-right: 15px;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-outline {
    border-color: var(--text-grey);
    color: var(--text-grey);
}
.btn-outline:hover {
    border-color: #e6f1ff;
    color: #e6f1ff;
    background: transparent;
}

/* Spécifique: boutons de la 1ère section (hero) -> fond de la même couleur que la bordure, un peu plus clair */
.hero .btn {
    background: var(--primary-soft);
    color: #1a1625;
    border-color: var(--primary-color);
}
.hero .btn:hover {
    background: color-mix(in srgb, var(--primary-soft) 80%, white 20%);
}
.hero .btn-outline {
    border-color: var(--text-grey);
    color: #1a1625;
    background: var(--grey-soft);
}
.hero .btn-outline:hover {
    background: color-mix(in srgb, var(--grey-soft) 80%, white 20%);
    color: #1a1625;
}

/* Bouton retour en haut */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: #1a1625;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(167, 139, 250, 0.4);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(167, 139, 250, 0.6);
}

/* Indicateur de progression */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #c4b5fd);
    z-index: 9999;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px rgba(167, 139, 250, 0.5);
}

/* Sections Globales */
.section {
    padding: 100px 5%;
}

/* Statistiques */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: var(--bg-light);
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    display: block;
    color: var(--text-grey);
    font-size: 0.9rem;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 50px;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 10px auto 0;
}

.bg-dark {
    background-color: var(--bg-light);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

/* About Text */
.about-text p {
    margin-bottom: 15px;
    color: var(--text-grey);
    font-size: 1.1rem;
    text-align: left; /* aligner à gauche dans la colonne texte */
    max-width: 720px;
    margin-left: 0;
    margin-right: 0;
}

/* Organisation de la 2ème section (À propos) en deux colonnes */
.about-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: start;
}

.about-tiles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    justify-items: stretch;
}

/* Tuiles type logo Microsoft (2x2) en s'appuyant sur stat-item) */
.about-tiles .stat-item {
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 6px;
    border-radius: 10px;
    padding: 0;
    background: var(--bg-light);
    border: 2px solid rgba(167, 139, 250, 0.25);
}

.about-tiles .stat-number { font-size: 2rem; }
.about-tiles .stat-label { font-size: 0.85rem; }

/* Variations de couleur douces pour rappeler un logo en 4 cases */
.about-tiles .stat-item:nth-child(1) { background: linear-gradient(135deg, rgba(167,139,250,0.20), rgba(167,139,250,0.10)); }
.about-tiles .stat-item:nth-child(2) { background: linear-gradient(135deg, rgba(196,181,253,0.22), rgba(196,181,253,0.10)); }
.about-tiles .stat-item:nth-child(3) { background: linear-gradient(135deg, rgba(172, 150, 255,0.22), rgba(172, 150, 255,0.10)); }
.about-tiles .stat-item:nth-child(4) { background: linear-gradient(135deg, rgba(158, 130, 245,0.22), rgba(158, 130, 245,0.10)); }

/* Compétences Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    text-align: center;
}

.skill-card {
    background: #2a1f3d;
    padding: 20px;
    border-radius: 8px;
    transition: transform 0.3s;
    box-shadow: 0 5px 15px rgba(167, 139, 250, 0.1);
    border: 1px solid rgba(167, 139, 250, 0.2);
}

.skill-card:hover {
    transform: translateY(-5px);
}

.skill-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Projets Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--bg-light);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s;
    border: 2px solid rgba(167, 139, 250, 0.4);
    box-shadow: 0 4px 15px rgba(167, 139, 250, 0.1);
    display: flex;            /* Permet de caler le lien en bas */
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-img {
    height: 200px;
    background-color: #3d2f52;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-img {
    color: var(--text-grey);
    font-weight: bold;
}

.project-info {
    padding: 25px;
    display: flex;            /* Colonne pour gérer la hauteur uniforme */
    flex-direction: column;
    flex: 1;                  /* Prend la hauteur restante du card */
}

.project-info h3 {
    margin-bottom: 10px;
    color: #e6f1ff;
}

.project-info p {
    color: var(--text-grey);
    font-size: 0.9rem;
    margin-bottom: 20px;
    min-height: 90px;         /* Hauteur minimale pour uniformiser les blocs */
    display: -webkit-box;     /* Optionnel: clamp pour mieux gérer les longs textes */
    line-clamp: 5;            /* Propriété standard complémentaire */
    -webkit-line-clamp: 5;    /* 5 lignes max (ajustable) */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tech-stack {
    margin-bottom: 20px;
}

.tech-stack span {
    font-size: 0.8rem;
    color: var(--primary-color);
    margin-right: 15px;
}

.project-link {
    color: #e6f1ff;
    font-weight: 600;
    margin-top: auto;         /* Pousse le lien en bas du card pour alignement */
}
.project-link:hover {
    color: var(--primary-color);
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 30px auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #233554;
    background: #0a192f;
    color: #e6f1ff;
    font-family: inherit;
}

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

.social-links {
    text-align: center;
    margin-top: 40px;
}

.social-links a {
    font-size: 1.5rem;
    margin: 0 15px;
    color: var(--text-grey);
    transition: color 0.3s;
}

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

.form-status {
    margin-top: 10px;
    font-size: 0.95rem;
    color: var(--text-grey);
}

.form-status.success {
    color: #7ae27a;
}

.form-status.error {
    color: #ff9f9f;
}

footer {
    text-align: center;
    padding: 20px;
    background: #0a192f;
    color: var(--text-grey);
    font-size: 0.9rem;
}

/* Responsive Tablette/Mobile */
@media screen and (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 0px;
        height: 92vh;
        top: 8vh;
        background-color: var(--bg-light);
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 50%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
    }

    .nav-links li {
        opacity: 0;
        margin: 30px 0;
    }

    .burger {
        display: block;
    }

    .nav-active {
        transform: translateX(0%);
    }

    @keyframes navLinkFade {
        from { opacity: 0; transform: translateX(50px); }
        to { opacity: 1; transform: translateX(0px); }
    }

    .hero h1 { font-size: 2.5rem; }
    .hero h2 { font-size: 1.8rem; }

    /* Empiler les colonnes en mobile */
    .about-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .about-text p {
        text-align: left;
    }
    .about-tiles {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* ===== STYLES PAGE PROJET ===== */
.project-detail {
    min-height: 100vh;
    padding: 120px 5% 60px;
}

.project-header {
    text-align: center;
    margin-bottom: 60px;
}

.project-header h1 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.project-header .tech-tags {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.tech-tags span {
    background: var(--bg-light);
    padding: 10px 20px;
    border-radius: 5px;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    font-size: 0.9rem;
}

.project-content {
    max-width: 1200px;
    margin: 0 auto;
}

.project-image {
    width: 100%;
    max-width: 900px;
    margin: 0 auto 40px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid rgba(167, 139, 250, 0.4);
    box-shadow: 0 4px 20px rgba(167, 139, 250, 0.2);
}

.project-image img {
    width: 100%;
    height: auto;
    display: block;
}

.project-section {
    background: var(--bg-light);
    padding: 40px;
    border-radius: 10px;
    margin-bottom: 30px;
    border: 1px solid rgba(167, 139, 250, 0.2);
}

.project-section h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
}

.project-section h3 {
    color: var(--text-grey);
    font-size: 1.5rem;
    margin-top: 30px;
    margin-bottom: 15px;
}

.project-section p {
    color: var(--text-grey);
    line-height: 1.8;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.project-section ul {
    color: var(--text-grey);
    line-height: 1.8;
    margin-left: 20px;
    margin-bottom: 20px;
}

.project-section li {
    margin-bottom: 10px;
    list-style: disc;
}

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

.feature-card {
    background: rgba(167, 139, 250, 0.05);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid rgba(167, 139, 250, 0.2);
    transition: transform 0.3s ease;
}

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

.feature-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: block;
}

.feature-card h4 {
    color: #f0e6ff;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.feature-card p {
    color: var(--text-grey);
    font-size: 0.95rem;
    margin: 0;
}

.project-links {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

.project-links .btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.back-link {
    display: inline-block;
    margin-bottom: 30px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.back-link:hover {
    transform: translateX(-5px);
}

.back-link i {
    margin-right: 8px;
}

/* Responsive page projet */
@media (max-width: 768px) {
    .project-header h1 {
        font-size: 2rem;
    }

    .project-section {
        padding: 25px;
    }

    .project-section h2 {
        font-size: 1.5rem;
    }
}
