:root {
    --primary: #6a0dad;
    --secondary: #8a2be2;
    --bg-light: #f0e6f6;
    --text-light: #fff;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.1);
    --transition: 0.3s ease;
}


/* Réinitialisation de base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: url('Fond.png') no-repeat center center fixed;
    background-size: cover;
}




/* Rendre le texte bien lisible */
h1, h3, h4 {
    font-family: Bogart, Arial, sans-serif;
    background: rgb(86, 13, 173);
    padding: 10px;
    border-radius: 5px;
    color: rgb(255, 255, 255);
    margin: 30px auto; /* Augmenté et centré horizontalement */
    max-width: 800px; /* Limite la largeur pour les grands écrans */
    text-align: center; /* Centre le texte */
    width: 90%
}

.back {
    padding: 40px;
    border-radius: 12px;
    color: #fff;
    background-color: #560dad;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 90%; /* Réduit légèrement pour les petits écrans */
    margin: 30px auto; /* Centre la carte et ajoute de l'espace vertical */
    text-align: center;
    transition: transform 0.3s ease;
}

/* Ajout d'un effet de survol */
.back:hover {
    transform: translateY(-5px);
}

/* Media query pour les écrans plus petits */
@media (max-width: 768px) {
    h1, h3, h4 {
        padding: 20px;
        margin: 20px auto;
        max-width: 90%;
    }

    .back {
        padding: 30px;
        width: 95%;
    }
}

    

/* Style de la section des projets */
.projects-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.projects-horizontal {
    display: flex;
    overflow: hidden;
    transition: transform 0.5s ease;
    width: 100%;
    max-width: 1200px;
    gap: 30px;
}

.project-details {
    background-color: #34495e;
    border-radius: 10px;
    padding: 20px;
    width: 300px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.project-details img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}



/* Section globale et centrage */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }



/* Style général du header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #560dad;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, padding 0.3s ease;
}

/* Animation pour réduire la taille lors du défilement */
header.scroll {
    background-color: #7c3ce2;
    padding: 5px 20px;
}

/* Section des icônes sociales */
header .social-top ul {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

header .social-top li {
    display: inline-block;
}

/* Liens des icônes sociales */
header .social-top a {
    color: #fff;
    font-size: 20px;
    transition: transform 0.3s ease, color 0.3s ease;
}

header .social-top a:hover {
    color: #d9b3ff;
    transform: scale(1.2);
}



/* Hero section */
#hero {
    background-size: cover;
    background-position: center;
    height: 1vh;
    color: var(--text-light);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

#hero h2 {
    font-size: 1em;
    margin-bottom: 20px;
}

/* Section About */
#about h2 {
    color: #ffffff;
}

#about p {
    color: #ffffff;
}

/* Portfolio */
.projects {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.project-details {
    margin-top: 20px;
    background-color: var(--text-light);
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 100%;
    text-align: center;
}

.project-details img, .project-details iframe {
    width: 100%;
    max-width: 560px;
    height: auto;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-details:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(184, 55, 55, 0.2);
}

.project-details img:hover, .project-details iframe:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(101, 20, 158, 0.2);
}

/* Effet lightbox */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(184, 55, 55, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.3s ease;
}

.lightbox-overlay.active {
    visibility: none;
    opacity: 1;
}

.lightbox-content img, .lightbox-content iframe {
    max-width: 90%;
    max-height: 80%;
    border-radius: 10px;
}


/* Section Contact */
#contact .container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f8f0ff; /* Fond clair violet */
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Ombre légère */
    text-align: center;
}

#contact h3 {
    color: #fff; /* Violet principal */
    font-size: 1.8rem;
    margin-bottom: 20px;
}

/* Formulaire */
#contact-form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#contact-form input[type="text"],
#contact-form input[type="email"],
#contact-form textarea {
    width: 100%;
    max-width: 500px;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #d0b3ff; /* Bordure violette */
    border-radius: 5px;
    font-size: 1rem;
    background-color: #fff; /* Fond blanc */
    color: #333;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: #560dad; /* Bordure violette au focus */
    box-shadow: 0 0 5px rgba(86, 13, 173, 0.5); /* Effet lumineux */
}

/* Bouton d'envoi */
#contact-form button {
    background-color: #560dad; /* Violet principal */
    color: #fff; /* Texte blanc */
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#contact-form button:hover {
    background-color: #7c3ce2; /* Violet plus clair */
    transform: scale(1.05); /* Léger agrandissement */
}

/* Type de contact (Radio Buttons) */
.contact-type {
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    max-width: 500px;
}

.contact-type label {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 1rem;
    color: #560dad; /* Violet principal */
    cursor: pointer;
}

.contact-type input[type="radio"] {
    margin-right: 10px;
    accent-color: #560dad; /* Couleur personnalisée pour les boutons radio */
    width: 18px;
    height: 18px;
    cursor: pointer;
}



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

/* Responsivité pour les petits écrans */
@media screen and (max-width: 768px) {
    .container {
        width: 90%;
    }
    #hero h2 {
        font-size: 1.8em;
    }
    .video-container iframe {
        width: 100%;
        height: auto;
    }
    header, footer {
        flex-direction: column;
        text-align: center;
    }
    header nav ul, header .social-top ul {
        flex-direction: column;
        gap: 10px;
    }
}

@font-face {
    font-family: 'Bogart';
    src: url('path/to/Bogart-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}


body {
    font-family: 'Bogart', Arial, sans-serif;
    background-color: #f4f4f4;
    line-height: 1.6;
}

/* Performance optimizations */
body, html {
    scroll-behavior: smooth;
    will-change: scroll-position;
}

.section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s, transform 0.5s;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Video Gallery */
.video-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.video-item {
    max-width: 45%;
    width: 100%;
}

.video-item iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 10px;
}

/* Autres styles optimisés... */
#scroll-to-top {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
}

/* Media queries pour la responsivité */
@media (max-width: 768px) {
    .video-item {
        max-width: 100%;
    }
}
.projects-horizontal {
    display: flex;
    flex-wrap: nowrap; /* Les éléments resteront sur une seule ligne */
    gap: 20px; /* Espacement entre les projets */
    overflow-x: auto; /* Permet le défilement horizontal si nécessaire */
    padding: 20px 0;
}

.projects-horizontal .project-details {
    min-width: 300px; /* Largeur minimale pour chaque projet */
    max-width: 400px; /* Largeur maximale */
    background-color: var(--text-light);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    flex-shrink: 0; /* Empêche les projets de se rétrécir */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.projects-horizontal .project-details img,
.projects-horizontal .project-details iframe {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.projects-horizontal .project-details:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

/* Défilement horizontal personnalisé */
.projects-horizontal::-webkit-scrollbar {
    height: 8px;
}

.projects-horizontal::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.projects-horizontal::-webkit-scrollbar-track {
    background: var(--background-light);
}


/* Section Étudiant en BUT MMI */
.hero-section {
    background-color: #62057e; /* Couleur de fond douce */
    padding: 50px 20px;
    text-align: center;
}

.hero-section .arvo-bold {
    font-family: 'Arvo', sans-serif;
}

.hero-section h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 15px;
}

.hero-section p {
    font-size: 1.2rem;
    color: #555;
}

/* Section À propos de moi */

.about-section .container {
    max-width: 900px;
    margin: 0 auto;
}

.about-section h2 {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 15px;
    background-color: #560dad;
    border-radius: 10%
    
}

.about-section p {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 15px;
    color: #666;
}

/* Espacement entre les sections */
.hero-section, .about-section {
    margin-bottom: 2px;
}
/* Section À propos de moi */
.about-section {
    display: flex;
    justify-content: center;
    padding: 50px 20px;
    background-color: none; /* Fond de la section */
}

.card-container {
    background-color: #560dad; /* Fond de la carte */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Ombre légère autour de la carte */
    border-radius: 12px; /* Coins arrondis */
    padding: 40px; /* Espace interne de la carte */
    max-width: 800px; /* Largeur maximale de la carte */
    width: 100%;
    text-align: center; /* Centrer le texte */
    transition: transform 0.3s ease; /* Effet de transition au survol */
}

.card-container:hover {
    transform: translateY(-10px); /* Déplacer légèrement la carte vers le haut lors du survol */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); /* Ombre plus forte au survol */
}

.card-container h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 20px;
}

.card-container p {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 15px;
}

/* Pour les petits écrans */
@media (max-width: 768px) {
    .card-container {
        padding: 30px;
    }
}
.project-details a img {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.project-details a:hover img {
    transform: scale(1.05); /* Légère augmentation de la taille au survol */
    opacity: 0.9; /* Effet de transparence */
} #competences {
    padding: 60px 20px;
    background-color: none; /* Couleur de fond cohérente avec votre palette */
    color: #fff;
    
}

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

.skill-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.skill-card i {
    font-size: 3rem;
    color: #6a0dad; /* Couleur principale */
    margin-bottom: 15px;
}

.skill-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #fff;
}

.skill-card p {
    font-size: 1rem;
    color: #555;
}

#lettre-motivation {
    text-align: center;
    padding: 60px 0;
    margin: 5%;
}

#lettre-motivation img {
    width: 100%;
    max-width: 700px;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

#lettre-motivation .cv-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary);
    color: var(--text-light);
    text-decoration: none;
    font-size: 16px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    margin: auto;
    
}

#lettre-motivation .cv-button:hover {
    background-color: var(--secondary);
}


/* Pour les écrans moyens (tablettes et petits ordinateurs) */
@media screen and (max-width: 992px) {
    .container {
        width: 95%;
    }
    
    .card-container,
    .skills-grid,
    .projects-horizontal,
    #cv img,
    #lettre-motivation img,
    #contact-form {
        width: 100%;
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .projects-horizontal {
        flex-direction: column;
        align-items: center;
    }
    
    .project-details {
        width: 100%;
        margin-bottom: 30px;
    }
}

/* Pour les tablettes */
@media screen and (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: center;
    }
    
   
    
    nav ul li {
        margin: 5px 10px;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Pour les smartphones */
@media screen and (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    .social-top {
        margin-bottom: 15px;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    #contact-form input,
    #contact-form textarea {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .project-details img,
    .project-details iframe {
        width: 100%;
        height: auto;
    }
}

#cv-lettre {
    padding: 50px 0;
}
.documents-container {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.document-wrapper {
    flex: 1;
    background-color: #ffffff;
    border-radius: 10px;
    padding: 10px;
    margin: 0 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    cursor: pointer;
    max-height: 1400px; 
    overflow: hidden;
}

.document-wrapper:hover {
    transform: scale(1.02);
}

.document-image {
    width: 100%;
    height: 400px; 
    object-fit: cover; 
    border-radius: 10px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.document-wrapper h3 {
    color: #ffffff;
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.download-button {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 1px;
    padding: 12px 20px;
    background-color: #560dad;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.download-button:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
}

.document-wrapper.expanded {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    width: auto;
    max-width: 95vw;
    height: auto;
    max-height: 100vh;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

.document-wrapper.expanded .document-image {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(95vh - 100px); /* Ajustez cette valeur selon vos besoins */
    object-fit: contain;
    margin-bottom: 10px;
}

.document-wrapper.expanded h3 {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.document-wrapper.expanded .download-button {
    width: auto;
    padding: 10px 20px;
    font-size: 0.9em;
}


.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 999;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .documents-container {
        flex-direction: column;
        gap: 20px;
    }

    .document-wrapper {
        margin: 0;
    }

    .document-image {
        height: 300px;
    }

    .document-wrapper.expanded {
        width: 95%;
        height: 95vh;
    }

    .document-wrapper.expanded .document-image {
        max-width: 95%;
        max-height: 70vh;
    }
}
