/* Styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

h1, h2, h3 {
    margin-bottom: 20px;
    transition: color 0.3s;
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 40px;
}

h3 {
    font-size: 1.8rem;
}

p {
    margin-bottom: 15px;
}

img {
    max-width: 100%;
}

a {
    text-decoration: none;
    transition: color 0.3s;
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: #3498db;
    color: white;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.3s;
}

.btn:hover {
    background-color: #2980b9;
}

/* Header et Navigation */
header {
    position: fixed;
    width: 100%;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: background-color 0.3s, box-shadow 0.3s;
}

nav {
    display: flex;
    justify-content: flex-start; /* Aligné à gauche plutôt que space-between */
    align-items: center;
    padding: 20px 0;
    padding-left: 30px; /* Ajoute de l'espace à gauche */
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #3498db;
    transition: color 0.3s;
    margin-right: auto; /* Pousse les éléments du menu vers la droite */
    padding-left: 20px; /* Espace supplémentaire à gauche du logo */
}

nav ul {
    display: flex;
    list-style: none;
    margin-right: 40px; /* Espace à droite du menu */
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: #333;
    font-weight: 600;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #3498db;
}

/* Section Accueil */
#accueil {
    height: 100vh;
    display: flex;
    align-items: center;
    background-image: url('images/accueil.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding-top: 80px;
    position: relative;
}

#accueil::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Superposition semi-transparente */
    z-index: 1;
}

#accueil .container {
    position: relative;
    z-index: 2;
    color: white; /* Pour que le texte soit lisible sur le fond */
}

/* Section À Propos */
.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text, .about-image {
    flex: 1;
}

.about-text p {
    font-size: 1.3rem;
    line-height: 1.6;
    text-align: justify;
}

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

.project-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, background-color 0.3s, box-shadow 0.3s;
}

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

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

.project-card h3, .project-card p, .project-card a {
    padding: 0 20px;
}

.project-card h3 {
    margin-top: 20px;
}

.project-card a {
    display: inline-block;
    margin: 20px;
}

/* Section Compétences avec icônes */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.skill-card {
    background-color: white;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.skill-icon {
    margin-bottom: 20px;
}

.skill-icon img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.skill-card h3 {
    margin: 0;
    font-size: 1.4rem;
    color: #333;
    transition: color 0.3s;
}

/* Ajout pour augmenter la taille de la section contact */
#contact {
    padding: 100px 0; /* Augmentation du padding vertical */
    min-height: 80vh; /* Hauteur minimale pour la section */
}

.contact-content {
    display: flex;
    gap: 80px; /* Augmentation de l'espace entre les colonnes */
    margin-top: 40px; /* Espace supplémentaire au-dessus du contenu */
}

.contact-info {
    flex: 1;
    padding: 30px;
    background-color: white; /* Même couleur que le formulaire */
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #eaeaea; /* Même bordure que le formulaire */
    transition: background-color 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.contact-info p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.contact-info p i {
    margin-right: 10px;
    color: #3498db;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
    font-size: 1.2rem;
}

.dark-mode .contact-info p i {
    color: #64b5f6;
}

.contact-form {
    flex: 1.5; /* Plus d'espace pour le formulaire */
    padding: 40px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #eaeaea;
    transition: all 0.3s ease;
}

.contact-form {
    display: flex;
    flex-direction: column;
}

.contact-form .form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.contact-form .form-field {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.contact-form label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #3498db;
    transition: color 0.3s;
}

.contact-form input, 
.contact-form textarea {
    padding: 15px; /* Champs plus grands */
    font-size: 1.1rem; /* Texte plus grand */
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
    margin-bottom: 20px;
}

.contact-form .btn {
    padding: 15px 30px; /* Bouton plus grand */
    font-size: 1.1rem; /* Texte du bouton plus grand */
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.contact-form .btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.dark-mode .contact-form .btn {
    background-color: #64b5f6;
}

.dark-mode .contact-form .btn:hover {
    background-color: #90caf9;
}

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

.social-links a {
    margin-right: 25px;
    margin-bottom: 15px;
    color: #3498db;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    transition: color 0.3s, transform 0.3s;
}

.social-links a:hover {
    color: #2980b9;
    transform: translateY(-2px);
}

/* Adaptation pour le mode sombre */
.dark-mode .contact-info,
.dark-mode .contact-form {
    background-color: #1e1e1e;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
}

.dark-mode .contact-form label {
    color: #64b5f6;
}

.dark-mode .contact-form input,
.dark-mode .contact-form textarea {
    background-color: #252525;
    border-color: #444;
    color: #e0e0e0;
}

.dark-mode .contact-form input::placeholder,
.dark-mode .contact-form textarea::placeholder {
    color: #888;
}

.dark-mode .contact-form input:focus,
.dark-mode .contact-form textarea:focus {
    border-color: #64b5f6;
    box-shadow: 0 0 0 2px rgba(100, 181, 246, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .contact-content {
        flex-direction: column;
        gap: 40px;
    }
    
    .contact-info,
    .contact-form {
        padding: 25px;
    }
}
/* Footer */
footer {
    background-color: #333;
    color: white;
    padding: 30px 0;
    text-align: center;
    transition: background-color 0.3s;
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        padding-left: 10px;
    }
    
    nav ul {
        margin-top: 20px;
        margin-right: 10px;
    }
    
    .logo {
        padding-left: 5px;
    }
    
    .about-content, .contact-content {
        flex-direction: column;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* Styles pour le bouton de basculement de thème */
#dark-mode-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

#dark-mode-toggle:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

/* Styles pour le thème sombre */
.dark-mode {
    /* Couleurs de base */
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --heading-color: #ffffff;
    --primary-color: #64b5f6; /* Bleu plus clair */
    --secondary-color: #90caf9;
    --card-bg: #1e1e1e;
    --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    --nav-bg: #1a1a1a;
    --border-color: #333;
    
    /* Application des couleurs */
    background-color: var(--bg-color);
    color: var(--text-color);
}

.dark-mode h1, 
.dark-mode h2, 
.dark-mode h3 {
    color: var(--heading-color);
}

.dark-mode .btn {
    background-color: var(--primary-color);
}

.dark-mode .btn:hover {
    background-color: var(--secondary-color);
}

.dark-mode header {
    background-color: var(--nav-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.dark-mode .logo {
    color: var(--primary-color);
}

.dark-mode nav ul li a {
    color: var(--text-color);
}

.dark-mode nav ul li a:hover {
    color: var(--primary-color);
}

/* Pour la section "A propos" */
.dark-mode #apropos {
    background-color: var(--bg-color);
}

/* Pour les cartes de projet */
.dark-mode .project-card {
    background-color: var(--card-bg);
    box-shadow: var(--card-shadow);
}

.dark-mode .project-card h3 {
    color: var(--heading-color);
}

/* Pour les compétences */
.dark-mode .skill-card {
    background-color: var(--card-bg);
    box-shadow: var(--card-shadow);
}

.dark-mode .skill-card h3 {
    color: var(--heading-color);
}

/* Pour le formulaire de contact */
.dark-mode .contact-form input,
.dark-mode .contact-form textarea {
    background-color: #252525;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

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

/* Footer en mode sombre */
.dark-mode footer {
    background-color: #0a0a0a;
}

/* Scrollbar personnalisée */
/* Pour Webkit (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

/* Pour Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #3498db rgba(0, 0, 0, 0.05);
}

/* Version pour le thème sombre */
.dark-mode::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.dark-mode::-webkit-scrollbar-thumb {
    background: #64b5f6;
}

.dark-mode::-webkit-scrollbar-thumb:hover {
    background: #90caf9;
}

.dark-mode * {
    scrollbar-color: #64b5f6 rgba(255, 255, 255, 0.05);
}