/* ---------------------------------- */
/*           Style général            */
/* ---------------------------------- */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    transition: background 0.5s ease-in-out, color 0.5s ease-in-out;
}

/* ---------------------------------- */
/*           Thèmes clairs et sombres  */
/* ---------------------------------- */
body.light {
    background: url('white.jpg') no-repeat center center fixed;
    background-size: cover;
    color: #000; /* Texte noir pour fond clair */
}

body.dark {
    background: url('black.jpg') no-repeat center center fixed;
    background-size: cover;
    color: #f0f0f0; /* Texte clair pour fond sombre */
}

/* ---------------------------------- */
/*           Navigation               */
/* ---------------------------------- */
.nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 20px;
}

.nav a {
    text-decoration: none;
    color: #000; /* Liens noirs en thème clair */
    font-weight: bold;
}

.nav a:hover {
    text-decoration: underline;
}

body.dark .nav a {
    color: #f0f0f0; /* Liens clairs en thème sombre */
}

/* ---------------------------------- */
/*           Section principale       */
/* ---------------------------------- */
.section {
    padding: 40px;
    max-width: 1000px;
    margin: auto;
}

/* ---------------------------------- */
/*           Carrousel                */
/* ---------------------------------- */
.carrousel {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-top: 20px;
    padding: 10px;
    gap: 10px;
    max-width: 100%; /* Ajustement pour éviter les débordements */
}

/* ---------------------------------- */
/*           Styles des cartes projets */
/* ---------------------------------- */
.project-card {
    flex-basis: calc(33% - 20px); /* Largeur flexible pour 3 cartes par ligne */
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 8px;
    text-align: center;
    text-justify: inter-word;
    transition: transform 0.2s ease-in-out;
    bottom: 20px;
    left: 50%;
    display: inline-block;
}

.project-card:hover {
    transform: scale(1.05);
}

body.dark .project-card {
    background: rgba(50, 50, 50, 0.8); /* Fond sombre pour les cartes en thème sombre */
}

/* ---------------------------------- */
/*           Style du texte et des titres */
/* ---------------------------------- */
h1, h2, h3, p, a {
    transition: color 0.5s ease-in-out;
}

body.light h1, body.light h2, body.light p, body.light a {
    color: #000; /* Texte noir pour le thème clair */
}

body.dark h1, body.dark h2, body.dark p, body.dark a {
    color: #f0f0f0; /* Texte clair pour le thème sombre */
}

/* ---------------------------------- */
/*           Style du bouton de thème  */
/* ---------------------------------- */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    cursor: pointer;
    background: #1d8020;
    color: #fff;
    border: none;
    border-radius: 5px;
    transition: background 0.3s ease, color 0.3s ease;
}

body.light .theme-toggle {
    background: #333; /* Fond sombre en thème clair */
    color: #fff;
}

body.dark .theme-toggle {
    background: #f0f0f0; /* Fond clair en thème sombre */
    color: #333;
}

.theme-toggle:hover {
    background: #555;
}

body.dark .theme-toggle:hover {
    background: #ddd;
}

/* ---------------------------------- */
/*           Consentement des cookies */
/* ---------------------------------- */
.cookie-consent {
    position: fixed;
    bottom: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.9); /* Fond clair */
    color: #333; /* Texte noir */
    padding: 10px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

.cookie-consent button {
    background: #00cc00;
    color: #fff;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 5px;
}

.cookie-consent button:hover {
    background: #009900;
}

.cookie-consent.hidden {
    visibility: hidden;
    opacity: 0;
}

body.dark .cookie-consent {
    background: rgba(0, 0, 0, 0.7); /* Fond sombre en thème sombre */
    color: #fff;
}

body.dark .cookie-consent button {
    background: #00cc00;
}

body.dark .cookie-consent button:hover {
    background: #009900;
}

/* ---------------------------------- */
/*           Style des boutons dans la section veille */
/* ---------------------------------- */
.veille-item button {
    padding: 10px 20px;
    background-color: #1d8020; /* Vert clair pour les boutons */
    color: #fff; /* Texte blanc */
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.veille-item button:hover {
    background-color: #155d15; /* Fond plus foncé au survol */
    transform: scale(1.05);
}

/* ---------------------------------- */
/*           Style des boutons de tri et autres éléments similaires */
/* ---------------------------------- */
body.dark select, body.dark button,
body.light select, body.light button {
    background-color: #1d8020; /* Vert clair pour les boutons dans les deux thèmes */
    color: #fff; /* Texte blanc */
    border: none; /* Pas de bordure */
    border-radius: 5px; /* Coins arrondis pour les boutons */
    padding: 8px 12px; /* Espacement interne pour les boutons */
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

body.dark select:hover, body.dark button:hover,
body.light select:hover, body.light button:hover {
    background-color: #155d15; /* Fond plus foncé au survol */
    transform: scale(1.05);
}

/* ---------------------------------- */
/*           Autres ajustements pour les boutons en thème clair et sombre */
/* ---------------------------------- */
body.light .veille-item button,
body.light .modal-content .btn-more,
body.light .modal-content .btn-pdf,
body.light .contact-btn,
body.light select,
body.light button {
    background-color: #1d8020; /* Vert clair pour le thème clair */
    color: #fff; /* Texte blanc */
}

body.light .veille-item button:hover,
body.light .modal-content .btn-more:hover,
body.light .modal-content .btn-pdf:hover,
body.light .contact-btn:hover,
body.light select:hover,
body.light button:hover {
    background-color: #155d15; /* Fond plus foncé au survol pour le thème clair */
}

/* ---------------------------------- */
/*          Boutons de veille pour le thème sombre */
/* ---------------------------------- */
body.dark .veille-item button,
body.dark .modal-content .btn-more,
body.dark .modal-content .btn-pdf,
body.dark .contact-btn,
body.dark select,
body.dark button {
    background-color: #1d8020; /* Vert clair pour le thème sombre */
    color: #fff; /* Texte blanc */
}

body.dark .veille-item button:hover,
body.dark .modal-content .btn-more:hover,
body.dark .modal-content .btn-pdf:hover,
body.dark .contact-btn:hover,
body.dark select:hover,
body.dark button:hover {
    background-color: #155d15; /* Fond plus foncé au survol pour le thème sombre */
}

/* ---------------------------------- */
/*           Style des articles de veille en thème sombre */
/* ---------------------------------- */
body.dark .veille-container .veille-item {
    background-color: rgba(50, 50, 50, 0.8); /* Fond plus clair et semi-transparent pour améliorer la visibilité */
    border-radius: 8px; /* Coins arrondis */
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7); /* Ombre plus marquée pour un meilleur contraste */
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* Lorsque l'on survole un article de veille en thème sombre */
body.dark .veille-container .veille-item:hover {
    transform: scale(1.02); /* Effet de zoom au survol */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.9); /* Ombre encore plus marquée au survol */
}

/* ---------------------------------- */
/*           Style des articles de veille en thème clair */
/* ---------------------------------- */
body.light .veille-container .veille-item {
    background-color: rgba(255, 255, 255, 0.9); /* Fond blanc clair pour le thème clair */
    border-radius: 8px; /* Coins arrondis */
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* Ombre légère pour le contraste */
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* Lorsque l'on survole un article de veille en thème clair */
body.light .veille-container .veille-item:hover {
    transform: scale(1.02); /* Effet de zoom au survol */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2); /* Ombre plus marquée au survol */
}


/* ---------------------------------- */
/*           Styles par défaut (clair) */
/* ---------------------------------- */
body.light .veille-item button {
    background-color: #1d8020; /* Vert clair pour les boutons en thème clair */
    color: #fff;
}

body.light .veille-item button:hover {
    background-color: #155d15; /* Fond plus foncé au survol pour le thème clair */
}

/* ---------------------------------- */
/*           Autres ajustements pour le thème sombre */
/* ---------------------------------- */
body.dark {
    background-color: #121212; /* Fond sombre pour tout le site */
    color: #f0f0f0; /* Texte clair pour le contenu général */
}

/* ---------------------------------- */
/*           Styles de l'en-tête et des liens */
/* ---------------------------------- */
.header, .nav a {
    color: inherit; /* S'adapte au thème actuel */
}

/* ---------------------------------- */
/*           Bouton de tri et filtres dans le thème sombre */
/* ---------------------------------- */
body.dark select, body.dark button {
    background-color: #1d8020;
    color: #f0f0f0;
    border: none; /* Pas de bordure pour les boutons dans le thème sombre */
    border-radius: 5px; /* Coins arrondis pour les boutons */
    padding: 8px 12px; /* Espacement interne pour les boutons */
}

/* ---------------------------------- */
/*           Pour ajuster toutes les images */
/* ---------------------------------- */
img {
    width: 70%; /* Réduit la taille des images à 70% */
    height: auto; /* Maintient les proportions de l'image */
    display: block; /* Supprime l'espace blanc en dessous des images inline */
    margin: 20px auto; /* Centre les images et ajoute un espacement vertical */
    transition: opacity 1s ease-in-out; /* Applique l'effet de fondu */
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2); /* Ajout d'un ombré léger */
}

/* ---------------------------------- */
/*           Pour s'assurer que les images sont réactives */
/* ---------------------------------- */
@media (max-width: 768px) {
    img {
        width: 80%; /* Pour que les images prennent tout l'espace sur mobile */
    }

    .modal-content {
        width: 95%; /* Plus large sur petits écrans */
        max-width: none; /* Désactive la limite de largeur */
        aspect-ratio: auto; /* Supprime le ratio pour éviter l'étroitesse */
    }
}

/* ---------------------------------- */
/*           Styles pour la modale pop up réalisations */
/* ---------------------------------- */
.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.8);
    width: 100%;
    height: 100%;
}

.modal-content {
    position: relative;
    background-color: #fff;
    padding: 20px;
    max-width: 600px;
    margin: auto;
    border-radius: 8px;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
}

.btn-more {
    margin-top: auto; /* Pousse le bouton vers le bas */
    align-self: center; /* Centre horizontalement le bouton */
    padding: 10px 20px;
    background-color: #1d8020;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    display: inline-block;
    text-align: center;
    transition: background-color 0.3s ease;
    bottom: 20px;
}

.btn-pdf {
    display: block;
    margin-top: 20px;
    text-align: center;
    padding: 10px 20px;
    background-color: #1d8020;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

/* ---------------------------------- */
/*           Style pour le contenu de la modale avec fond blanc et texte noir */
/* ---------------------------------- */
.modal-content {
    background-color: #ffffff; /* Fond blanc */
    color: #000000; /* Texte noir */
    padding: 20px;
    width: 80%; /* Augmenter la largeur à 80% */
    max-width: 900px; /* Limiter la largeur à 900px pour écrans larges */
    aspect-ratio: 1 / 1.414; /* Ratio proche d'A4 */
    max-height: 90vh; /* Conserver la hauteur max */
    overflow-y: auto; /* Une seule barre de défilement */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Ombre subtile */
    margin: auto; /* Centrer */
}

/* ---------------------------------- */
/*           Justifier le texte pour les sections Accueil et Entreprise */
/* ---------------------------------- */
.section p, .section h1 {
    text-align: justify;
}

.image-wrapper img {
    max-width: 100%; /* Évite que l'image dépasse de son conteneur */
    height: auto; /* Maintient les proportions */
    display: block;
    margin: 10px auto; /* Centre l'image horizontalement */
}

/* ---------------------------------- */
/*           Profile container        */
/* ---------------------------------- */
.profile-container {
    display: flex;
    flex-direction: row; /* Assure que les éléments sont côte à côte sur les grands écrans */
    gap: 20px;
    align-items: flex-start;
    justify-content: center;
    margin-top: 50px;
}

/* ---------------------------------- */
/*           Photo                    */
/* ---------------------------------- */
.profile-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 14px 10px rgba(0, 0, 0, 0.1);
}

/* ---------------------------------- */
/*           Timeline                 */
/* ---------------------------------- */
.timeline {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 15px;
    animation: fadeInUp 0.6s ease-out;
}

.timeline-item {
    position: relative;
    padding-left: 30px;
    border-left: 3px solid #4CAF50; /* Ligne verticale */
    animation: fadeInUp 0.6s ease-out;
}

.timeline-date {
    font-weight: bold;
    font-size: 1.1em;
    color: #4CAF50;
    margin-bottom: 5px;
}

.timeline-description {
    font-size: 1em;
    color: #333;
}

/* ---------------------------------- */
/*           Animation fadeInUp       */
/* ---------------------------------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------------------------------- */
/*           Responsivité pour mobile */
/* ---------------------------------- */
@media screen and (max-width: 768px) {
    .profile-container {
        flex-direction: column; /* Sur petits écrans, les éléments s'empilent verticalement */
        align-items: center;
    }

    .profile-photo {
        margin-bottom: 20px;
    }

    .timeline {
        align-items: center;
    }
}

/* ---------------------------------- */
/*           LinkedIn logo            */
/* ---------------------------------- */
.linkedin-logo img {
    width: 90px;  /* Taille initiale du logo */
    height: auto; /* Pour garder les proportions */
    transition: transform 0.3s ease; /* Animation lors du survol */
}

.linkedin-logo img:hover {
    transform: scale(1.1); /* Agrandit légèrement l'image lors du survol */
}

@media (max-width: 600px) {
    .linkedin-logo img {
        width: 60px;  /* Réduit la taille sur les petits écrans */
    }
}

/* ---------------------------------- */
/*           Timeline description en thème sombre */
/* ---------------------------------- */
body.dark .timeline-description {
    color: #f0f0f0; /* Texte clair pour le thème sombre */
}

/* ---------------------------------- */
/*           Modale en thème sombre    */
/* ---------------------------------- */
body.dark .modal-content {
    background-color: #2e2e2e; /* Fond plus sombre pour la modale en thème sombre */
    color: #f0f0f0; /* Texte clair pour le thème sombre */
}

/* ---------------------------------- */
/*           Boutons dans la modale en thème sombre */
/* ---------------------------------- */
body.dark .modal-content .btn-more,
body.dark .modal-content .btn-pdf {
    background-color: #1d8020;
    color: #fff;
}

body.dark .modal-content .btn-more:hover,
body.dark .modal-content .btn-pdf:hover {
    background-color: #1d8020;
}

/* ---------------------------------- */
/*           Style pour la section de contact */
/* ---------------------------------- */
.contact-section {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

/* ---------------------------------- */
/*           Style du bouton "Me contacter" */
/* ---------------------------------- */
.contact-btn {
    padding: 10px 20px;
    background-color: #1d8020;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.contact-btn:hover {
    background-color: #1d8020;
    transform: scale(1.05);
}

/* ---------------------------------- */
/*           Style du bouton "Compétences & Certif" */
/* ---------------------------------- */

.volet-deroulant {
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
    text-align: center;
    font-family: Arial, sans-serif;
}

.btn-volet {
    background-color: #007BFF;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.btn-volet:hover {
    background-color: #0056b3;
}

.contenu-cache {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.5s ease-out;
    margin-top: 10px;
    border: 1px solid #ccc;
    padding: 0 15px;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.contenu-visible {
    max-height: 500px; /* Ajustez selon la hauteur maximale nécessaire */
    padding: 15px;
}

.categorie {
    display: flex;
    justify-content: center; /* Centrer les boutons horizontalement */
    gap: 10px; /* Espacement entre les boutons */
    flex-wrap: wrap; /* Permettre le retour à la ligne si nécessaire */
}

.categorie h3 {
    margin-bottom: 10px;
    font-size: 18px;
    color: #333;
}

.btn-pdf {
    background-color: #1d8020;
    color: white;
    padding: 8px 15px;
    margin: 5px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.btn-pdf:hover {
    background-color: #1d8020;
}

/* Thème sombre */
body.dark .contenu-cache {
    background-color: #2e2e2e;
    color: #f1f1f1;
    border-color: #444;
}

body.dark .categorie h3 {
    color: #f1f1f1;
}

body.dark .btn-pdf {
    background-color: #1d8020;
}

body.dark .btn-pdf:hover {
    background-color: #1d8020;
}


.footer-content {
    border-radius: 8px;
    text-align: center;
    text-justify: inter-word;
    transition: transform 0.2s ease-in-out;
}