/* =========================================
   1. Variables CSS pour les Thèmes
   ========================================= */
   :root {
    --color-primary: #1e1e1e;
    --color-secondary: #ffffff;
    --color-accent: #ff6347;
    --background-light: #f4f4f4;
    --background-dark: #121212;
    --text-light: #ffffff;
    --text-dark: #1e1e1e;
    --transition-speed: 0.3s;
    --font-family: 'Roboto', sans-serif;
}

[data-theme="dark"] {
    --color-primary: #ffffff;
    --color-secondary: #1e1e1e;
    --text-light: #1e1e1e;
    --text-dark: #ffffff;
    --background-light: #1e1e1e;
    --background-dark: #121212;
}

/* =========================================
   2. Styles Globaux
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: all var(--transition-speed) ease;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    background-color: var(--background-light);
    color: var(--text-dark);
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

/* =========================================
   3. Animations
   ========================================= */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* =========================================
   4. Préchargeur
   ========================================= */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    border: 8px solid var(--background-light);
    border-top: 8px solid var(--color-accent);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

/* =========================================
   5. Barre Latérale (Sidebar)
   ========================================= */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 80px;
    height: 100%;
    background-color: var(--color-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    transition: width var(--transition-speed);
    z-index: 1000;
    overflow: hidden;
}

.sidebar:hover {
    width: 200px;
}

.sidebar-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 50px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-secondary);
    margin-bottom: 10px;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

#theme-toggle {
    background: none;
    border: none;
    color: var(--color-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    margin-bottom: 10px;
}

.sidebar-nav ul {
    list-style: none;
    width: 100%;
    padding: 0;
}

.sidebar-nav ul li {
    width: 100%;
}

.sidebar-nav ul li .sidebar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 10px;
    background-color: var(--color-accent);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 25px;
    transition: background-color var(--transition-speed), transform var(--transition-speed), width var(--transition-speed), padding var(--transition-speed);
    overflow: hidden; 
}

.sidebar:hover .sidebar-nav ul li .sidebar-btn {
    width: 100%; 
    padding: 15px 20px; 
}

.sidebar-nav ul li .sidebar-btn i {
    margin-right: 10px;
    font-size: 1.2rem;
    transition: margin-right var(--transition-speed);
}

.sidebar-nav ul li .sidebar-btn span {
    opacity: 1;
    transition: opacity var(--transition-speed);
    white-space: nowrap;
}

.sidebar:not(:hover) .sidebar-nav ul li .sidebar-btn {
    width: 50px; 
    padding: 10px; 
    background-color: transparent; 
    border-radius: 50%; 
}

.sidebar:not(:hover) .sidebar-nav ul li .sidebar-btn span {
    opacity: 0; 
}

.sidebar:not(:hover) .sidebar-nav ul li .sidebar-btn i {
    margin-right: 0; 
}

.sidebar-nav ul li .sidebar-btn:hover {
    background-color: #e5533c;
    transform: translateY(-2px);
}

.sidebar-nav ul li .sidebar-btn {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-nav ul li a {
    display: flex;
    align-items: center;
    padding: 15px 10px;
    color: var(--color-secondary);
    text-decoration: none;
    transition: background-color var(--transition-speed), padding var(--transition-speed);
    white-space: nowrap;
}

.sidebar:hover .sidebar-nav ul li a {
    padding: 15px 20px;
}

.sidebar-nav ul li a i {
    margin-right: 10px;
    font-size: 1.2rem;
    min-width: 20px;
    text-align: center;
}

.sidebar-nav ul li a span {
    margin-left: 10px;
    opacity: 0;
    transition: opacity var(--transition-speed);
    pointer-events: none;
}

.sidebar:hover .sidebar-nav ul li a span {
    opacity: 1;
}

/* =========================================
   6. Contenu Principal
   ========================================= */
main {
    margin-left: 80px;
    padding: 20px;
    padding-top: 0;
    transition: margin-left var(--transition-speed);
}

.sidebar:hover ~ main {
    margin-left: 200px;
}

/* =========================================
   7. Sections
   ========================================= */

   .home-section {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
    position: relative;
    color: var(--text-light);
    text-align: center;
    overflow: hidden;
    background-attachment: fixed;
    transition: background 0.5s ease;
}

.home-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Dégradé amélioré */
    background: linear-gradient(135deg, rgba(255, 99, 71, 0.7), rgba(30, 144, 255, 0.7));
    z-index: 0;
}

.home-content {
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease-out;
}

.home-content h1 {
    font-family: 'Roboto Slab', serif;
    font-size: 3rem;
    margin-bottom: 10px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.home-content p {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-light);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
}

.btn-primary {
    position: relative;
    display: inline-block;
    padding: 14px 35px;
    background-color: var(--color-accent);
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: background-color var(--transition-speed), transform var(--transition-speed), box-shadow 0.3s ease;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(255, 99, 71, 0.4);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: all 0.5s ease;
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
}

.btn-primary:hover::after {
    width: 300%;
    height: 300%;
}

.btn-primary:hover {
    background-color: #e5533c;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 99, 71, 0.6);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background-color: rgba(255, 255, 255, 0.2);
    transition: all 0.5s ease;
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
}

.btn-primary:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

/* 7.2. Section À Propos */
.about-section {
    max-width: 1200px;
    margin: 50px auto;
    padding: 40px 20px;
    background-color: var(--color-secondary);
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
}

.about-section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 3rem;
    font-family: 'Roboto Slab', serif;
    position: relative;
    color: var(--color-primary);
}

.about-section h2::after {
    content: '';
    width: 60px;
    height: 4px;
    background-color: var(--color-accent);
    display: block;
    margin: 15px auto 0;
    border-radius: 2px;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.profile {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.profile-pic {
    width: 250px;
    height: 250px;
    border-radius: 15px;
    object-fit: cover;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.profile-pic:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.profile-info {
    flex: 1;
    min-width: 300px;
    padding: 20px;
}

.profile-info h3 {
    font-size: 2.5rem;
    font-family: 'Roboto Slab', serif;
    margin-bottom: 10px;
    color: var(--color-primary);
}

.profile-info h4 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--color-accent);
}

.profile-info p {
    font-size: 1.2rem;
    margin-bottom: 25px;
    line-height: 1.8;
    color: var(--text-dark);
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.btn-secondary {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--color-primary);
    color: var(--color-secondary);
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    transition: background-color var(--transition-speed), transform var(--transition-speed), box-shadow var(--transition-speed);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background-color: var(--color-accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

.btn-secondary::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 0;
    left: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: height 0.3s ease;
}

.btn-secondary:hover::after {
    height: 100%;
}

/* Additional Information */
.additional-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
}

.info-section {
    background-color: var(--background-light);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed), background-color var(--transition-speed);
}

.info-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    background-color: #f9f9f9;
}

.info-section h5 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: var(--color-primary);
    display: flex;
    align-items: center;
}

.info-section h5 i {
    margin-right: 10px;
    color: var(--color-accent);
    font-size: 1.4rem;
}

.info-section ul {
    list-style-type: disc;
    padding-left: 25px;
    line-height: 1.8;
    font-size: 1rem;
    color: var(--text-dark);
}

.info-section ul li {
    margin-bottom: 10px;
    position: relative;
}

.info-section ul li::marker {
    color: var(--color-accent);
    font-size: 1.2rem;
}

.info-section ul li:hover {
    color: var(--color-accent);
    transition: color var(--transition-speed);
}

/* 7.3. Section Projets */
.projects-section {
    max-width: 1200px;
    margin: 50px auto;
    padding: 40px 20px;
}

.projects-section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5rem;
    font-family: 'Roboto Slab', serif;
    position: relative;
}

.projects-section h2::after {
    content: '';
    width: 50px;
    height: 3px;
    background-color: var(--color-accent);
    display: block;
    margin: 10px auto 0;
    border-radius: 2px;
}

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

.filter-btn {
    padding: 10px 20px;
    background-color: var(--color-primary);
    color: var(--color-secondary);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color var(--transition-speed), transform var(--transition-speed);
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--color-accent);
    transform: translateY(-2px);
}

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

.project-card {
    background-color: var(--color-secondary);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s forwards;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

.project-image{
    width: 100%;
    overflow: hidden;
    padding: 10px;
}

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

.project-info {
    padding: 20px;
}

.project-info h3 {
    margin-bottom: 10px;
    font-size: 1.5rem;
    font-family: 'Roboto Slab', serif;
}

.project-info p {
    font-size: 1rem;
    margin-bottom: 15px;
}

.btn-project {
    padding: 8px 20px;
    background-color: var(--color-primary);
    color: var(--color-secondary);
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: background-color var(--transition-speed), transform var(--transition-speed);
    position: relative;
    overflow: hidden;
}

.btn-project:hover {
    background-color: #e5533c;
    transform: translateY(-2px);
}

.btn-project::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 0;
    left: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: height 0.3s ease;
}

.btn-project:hover::after {
    height: 100%;
}

/* 7.4. Section Compétences */
.skills-section {
    max-width: 1200px;
    margin: 50px auto;
    padding: 40px 20px;
    background-color: var(--color-secondary);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color var(--transition-speed);
}

.skills-section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5rem;
    font-family: 'Roboto Slab', serif;
    position: relative;
}

.skills-section h2::after {
    content: '';
    width: 50px;
    height: 3px;
    background-color: var(--color-accent);
    display: block;
    margin: 10px auto 0;
    border-radius: 2px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    justify-items: center;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--background-light);
    padding: 20px;
    border-radius: 10px;
    width: 100%;
    max-width: 200px;
    transition: transform var(--transition-speed), background-color var(--transition-speed);
    cursor: pointer;
}

.skill-item:hover {
    transform: translateY(-5px);
    background-color: var(--color-accent);
    color: var(--text-light);
}

.skill-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    transition: transform var(--transition-speed);
}

.skill-item:hover .skill-icon {
    transform: rotate(360deg);
}

.skill-item h3 {
    font-size: 1.2rem;
}

/* Compétences Professionnelles */
.professional-skills {
    margin-top: 40px;
    padding: 20px;
    background-color: var(--background-light);
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color var(--transition-speed);
}

.professional-skills h3 {
    font-size: 1.8rem;
    font-family: 'Roboto Slab', serif;
    margin-bottom: 20px;
    color: var(--color-primary);
    position: relative;
    text-align: center;
}

.professional-skills h3::after {
    content: '';
    width: 40px;
    height: 3px;
    background-color: var(--color-accent);
    display: block;
    margin: 10px auto 0;
    border-radius: 2px;
}

.professional-skills ul {
    list-style-type: disc;
    padding-left: 20px;
    line-height: 1.8;
    font-size: 1.1rem;
}

.professional-skills ul li {
    position: relative;
    padding-left: 10px;
}

.professional-skills ul li::before {
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-size: 1.2rem;
    top: 0;
}

/* 7.5. Section Expérience Professionnelle */
.experience-section {
    max-width: 1200px;
    margin: 50px auto;
    padding: 40px 20px;
    background-color: var(--color-secondary);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color var(--transition-speed);
}

.experience-section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5rem;
    font-family: 'Roboto Slab', serif;
    position: relative;
}

.experience-section h2::after {
    content: '';
    width: 50px;
    height: 3px;
    background-color: var(--color-accent);
    display: block;
    margin: 10px auto 0;
    border-radius: 2px;
}

.experience-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.experience-item {
    background-color: var(--background-light);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.experience-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.experience-item h3 {
    font-size: 1.5rem;
    font-family: 'Roboto Slab', serif;
    margin-bottom: 5px;
}

.experience-item h4 {
    font-size: 1.2rem;
    color: var(--color-accent);
    margin-bottom: 5px;
}

.experience-item span {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 15px;
    display: block;
}

.experience-item p {
    font-size: 1rem;
    line-height: 1.5;
}

.experience-item ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-top: 10px;
    line-height: 1.8;
}

/* 7.6. Section Contact */
.contact-section {
    max-width: 1200px;
    margin: 50px auto;
    padding: 40px 20px;
    background-color: var(--color-secondary);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color var(--transition-speed);
}

.contact-section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5rem;
    font-family: 'Roboto Slab', serif;
    position: relative;
}

.contact-section h2::after {
    content: '';
    width: 50px;
    height: 3px;
    background-color: var(--color-accent);
    display: block;
    margin: 10px auto 0;
    border-radius: 2px;
}

.contact-container {
    display: flex;
    gap: 40px;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
}

.contact-form {
    flex: 1;
    min-width: 300px;
    display: grid;
    gap: 20px;
    animation: fadeInUp 1s ease-out;
}

.contact-info {
    flex: 1;
    min-width: 300px;
    background-color: var(--background-light);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.contact-info:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.contact-info h3 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.8rem;
    font-family: 'Roboto Slab', serif;
    position: relative;
}

.contact-info ul {
    list-style: none;
    padding: 0;
}

.contact-info ul li {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.contact-info ul li i {
    margin-right: 10px;
    color: var(--color-accent);
    min-width: 20px;
    text-align: center;
    transition: transform var(--transition-speed);
}

.contact-info ul li:hover i {
    transform: scale(1.2);
}

.contact-info ul li a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.contact-info ul li a:hover {
    color: var(--color-accent);
}

.contact-info address {
    font-style: normal;
    line-height: 1.5;
}

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

.form-group label {
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input, 
.form-group textarea {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color var(--transition-speed);
}

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

.btn-submit {
    padding: 12px 30px;
    background-color: var(--color-primary);
    color: var(--color-secondary);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color var(--transition-speed), transform var(--transition-speed);
    position: relative;
    overflow: hidden;
}

.btn-submit:hover {
    background-color: #e5533c;
    transform: translateY(-3px);
}

.btn-submit::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 0;
    left: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: height 0.3s ease;
}

.btn-submit:hover::after {
    height: 100%;
}

.form-feedback {
    display: none;
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
}

.form-feedback.success {
    background-color: #d4edda;
    color: #155724;
}

.form-feedback.error {
    background-color: #f8d7da;
    color: #721c24;
}

/* =========================================
   8. Autres Composants
   ========================================= */

/* Styles de base de la modal */
.modal {
    display: none; /* Caché par défaut */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    transition: opacity 0.3s ease;
}

/* Overlay de la modal */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    cursor: pointer;
}

/* Contenu de la modal */
.modal-content {
    position: relative;
    background-color: var(--color-secondary);
    margin: 5% auto;
    padding: 30px;
    border: none;
    width: 90%;
    max-width: 700px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: slideDown 0.5s ease-out;
    overflow: hidden;
}

/* Animation d'apparition */
@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Bouton de fermeture */
.close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    font-weight: bold;
    color: var(--color-primary);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-button:hover {
    color: var(--color-accent);
}

/* En-tête de la modal */
.modal-header h2 {
    margin-bottom: 20px;
    font-size: 2rem;
    text-align: center;
    color: var(--color-primary);
}

/* Image de la modal */
.modal-img {
    text-align: center;
    margin-bottom: 20px;
}

.modal-img img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Description de la modal */
.modal-description p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-dark);
    text-align: justify;
}

/* Actions de la modal */
.modal-actions {
    text-align: center;
    margin-top: 20px;
}



.btn-project::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background-color: rgba(255, 255, 255, 0.2);
    transition: all 0.5s ease;
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
}

.btn-project:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

/* Affichage de la modal active */
.modal[aria-hidden="false"] {
    display: block;
    opacity: 1;
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background-color: var(--color-accent);
    color: var(--text-dark);
    border: none;
    padding: 10px 12px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: none;
    transition: background-color var(--transition-speed), transform var(--transition-speed);
    z-index: 1000;
}

#back-to-top:hover {
    background-color: #e5533c;
    transform: scale(1.1);
}

/* Footer */
footer {
    background-color: var(--color-primary);
    color: var(--color-secondary);
    text-align: center;
    padding: 20px;
    position: relative;
}

.social-links {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-links a {
    color: var(--color-secondary);
    font-size: 1.5rem;
    text-decoration: none;
    transition: color var(--transition-speed);
}

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

/* =========================================
   9. Listes et Progressions
   ========================================= */

/* Liste des Langues */
.language-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left; 
}

.language-list li {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 15px;
}

.language-name {
    display: flex;
    align-items: center;
    justify-content: flex-start; 
    margin-bottom: 8px;
    align-self: flex-start;
}

.flag-icon {
    margin-right: 10px; 
    width: 24px;
    height: 24px;
    display: inline-block;
}

.progress-bar {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.progress {
    height: 8px;
    background-color: var(--color-accent);
    border-radius: 10px;
}

.info-section[data-aos="fade-up"] .progress {
    width: 0;
}

.info-section[data-aos="fade-up"] .progress {
    width: 100%;
}

.info-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-section ul li {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    color: var(--text-dark);
    transition: color var(--transition-speed);
}

.info-section ul li i {
    margin-right: 10px;
    color: var(--color-accent);
    font-size: 1rem;
}

.info-section ul li:hover {
    color: var(--color-accent);
}

.info-section ul li:hover i {
    transform: scale(1.2);
}

/* =========================================
   10. Responsive Design
   ========================================= */

@media (max-width: 1024px) {
    .sidebar {
        width: 60px;
    }

    .sidebar:hover {
        width: 180px;
    }

    main {
        margin-left: 60px;
    }

    .sidebar:hover ~ main {
        margin-left: 180px;
    }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .projects-section .projects-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .sidebar-nav ul li a {
        padding: 15px 10px;
    }

    .sidebar-nav ul li a span {
        display: none;
    }

    .sidebar:hover .sidebar-nav ul li a span {
        display: inline;
    }

    .additional-info {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .contact-container {
        flex-direction: column;
        align-items: normal;
    }

    .contact-form {
        padding: 0 10px;
    }

    .form-group {
        width: 100%;
    }

    .btn-submit {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 768px) {
    li{
        margin-bottom: 10px;
    }
    .sidebar {
        display: none;
    }

    .sidebar-toggle {
        display: block;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1100;
    }

    main {
        margin-left: 0;
    }

    .home-content h1 {
        font-size: 2.5rem;
    }

    .home-content p {
        font-size: 1.2rem;
    }

    .btn-primary {
        padding: 12px 30px;
        font-size: 1rem;
    }

    .projects-section{
        padding: 0;
    }

    .info-section:hover {
        transform: none;
        box-shadow: none;
    }

    .about-section {
        padding: 30px 15px;
    }

    .experience-section {
        padding: 30px 15px;
    }

    .profile-pic {
        width: 200px;
        height: 200px;
    }

    .profile-info h3 {
        font-size: 2rem;
    }

    .profile-info h4 {
        font-size: 1.6rem;
    }

    .profile-info p {
        font-size: 1rem;
        margin-bottom: 20px;
    }

    .skills-section {
        padding: 30px 15px;
    }

    .skills-section h2 {
        font-size: 2rem;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .skill-item h3 {
        font-size: 1rem;
    }

    .professional-skills {
        padding: 15px;
    }

    .professional-skills h3 {
        font-size: 1.5rem;
    }

    .professional-skills ul {
        font-size: 1rem;
    }

    .contact-container {
        flex-direction: column;
        align-items: normal;
    }

    .contact-form {
        padding: 0 10px;
    }

    .form-group {
        width: 100%;
    }

    .btn-submit {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .home-content h1 {
        font-size: 2rem;
    }

    .home-content p {
        font-size: 1rem;
    }

    .sidebar {
        width: 50px;
    }

    .sidebar:hover {
        width: 150px;
    }

    .projects-section{
        padding: 0;
    }
 
    .language-name {
        flex-direction: column;
        align-items: flex-start;
    }

    .flag-icon {
        margin-bottom: 5px;
    }

    .language-list .progress-bar {
        width: 100%;
        background-color: #e0e0e0;
        border-radius: 10px;
        overflow: hidden;
    }

    .language-list .progress {
        height: 8px;
        background-color: var(--color-accent);
        width: 0;
        border-radius: 10px;
        transition: width 1s ease-in-out;
    }
    .contact-container{
        align-items: center;
    }
    .contact-form {
        padding: 0 5px;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .form-group input, 
    .form-group textarea {
        font-size: 0.9rem;
        padding: 10px;
    }

    .btn-submit {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    li{
        margin-bottom: 10px;
    }
    .home-content h1 {
        font-size: 2rem;
    }

    .home-content p {
        font-size: 1rem;
    }

    .btn-primary {
        padding: 10px 25px;
        font-size: 0.9rem;
    }

    .sidebar {
        width: 50px;
    }

    .sidebar:hover {
        width: 150px;
    }

    main{
        padding: 0;
    }

    .about-section{
        border-radius: 0;
    }

    .about-section h2{
        font-size: 2rem;
    }

    .profile{
        gap: 0;
        display: block;
    }

    .profile-info{
        padding: 5px;
    }

    .language-name {
        flex-direction: row;
        align-items: flex-start;
    }

    .flag-icon {
        margin-bottom: 5px;
    }

    .language-list .progress-bar {
        width: 100%;
        background-color: #e0e0e0;
        border-radius: 10px;
        overflow: hidden;
    }

    .language-list .progress {
        height: 8px;
        background-color: var(--color-accent);
        width: 0;
        border-radius: 10px;
        transition: width 1s ease-in-out;
    }

    .contact-container{
        align-items: normal;
    }

    .contact-form {
        padding: 0 5px;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .form-group input, 
    .form-group textarea {
        font-size: 0.5rem;
        padding: 10px;
    }

    .btn-submit {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 375px) {
    li{
        margin-bottom: 10px;
    }
    .home-content h1 {
        font-size: 2rem;
    }

    .home-content p {
        font-size: 1rem;
    }

    .sidebar {
        width: 50px;
    }

    .sidebar:hover {
        width: 150px;
    }

    main{
        padding: 0;
    }

    .about-section{
        border-radius: 0;
    }

    .about-section h2{
        font-size: 2rem;
    }

    .profile{
        gap: 0;
        display: block;
    }

    .profile-info{
        padding: 5px;
    }

    .profile-info h3{
        font-size: 1.5rem;
    }

    .profile-info h4{
        font-size: 1.2rem;
    }

    .info-section h5{
        font-size: 1.2rem;
    }

    .skills-section{
        border-radius: 0;
        padding: 40px 10px;
    }

    .skills-section h2{
        font-size: 2rem;
    }

    .professional-skills h3{
        font-size: 1.5rem;
    }

    .experience-section{
        border-radius: 0;
        padding: 40px 10px;
    }

    .experience-content{
        padding: 0;
    }

    .experience-item{
        padding: 10px;
    }

    .experience-section h2{
        font-size: 2rem;
    }

    .experience-item h3{
        font-size: 1.5rem;
    }

    .projects-section{
        padding: 0;
        border-radius: 0;
    }
 
    .language-name {
        flex-direction: row;
        align-items: flex-start;
    }

    .flag-icon {
        margin-bottom: 5px;
    }

    .language-list .progress-bar {
        width: 100%;
        background-color: #e0e0e0;
        border-radius: 10px;
        overflow: hidden;
    }

    .language-list .progress {
        height: 8px;
        background-color: var(--color-accent);
        width: 0;
        border-radius: 10px;
        transition: width 1s ease-in-out;
    }

    .contact-section{
        border-radius: 0;
        padding: 40px 10px;
    }

    .contact-container{
        align-items: normal;
    }

    .contact-form {
        padding: 0 5px;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .form-group input, 
    .form-group textarea {
        font-size: 0.5rem;
        padding: 10px;
    }

    .btn-submit {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}
