@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

body {
    width: 75%;
    margin: auto;
    font-family: "Montserrat", sans-serif;
}

/* Barre de navigation */
.navbar {
    color: #333;
    padding: 50px 0;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.company-name {
    font-size: 1.75em;
}

.company-name a {
    text-decoration: none;
    color: #333;
}

.navbar-right {
    display: flex;
    gap: 25px;
}

.navbar-right a {
    position: relative;
    color: #333;
    text-decoration: none;
    display: inline-block;
    font-size: 0.75em;
}

.navbar-right a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px; 
    background: whitesmoke; /* Couleur du surlignement */
    bottom: -2px; 
    left: 0;
    transition: width 0.3s ease-out;  
}

.navbar-right a:hover::after {
    width: 100%;
}

.burger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.burger-menu div {
    width: 25px;
    height: 3px;
    background-color: darkgrey;
    margin: 4px;
}

.dropdown-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    /* top: 60px;
    right: 0;
    width: 100%; */
}

.dropdown-menu a {
    color: white;
    background: #626474;
    z-index: 2;
    padding: 15px;
    text-decoration: none;
}

.dropdown-menu a:first-child {
    border-bottom: 1px solid whitesmoke;
}

.dropdown-menu a:nth-child(2) {
    border-bottom: 1px solid whitesmoke;
}

.dropdown-menu a:hover {
    background-color: #585a68;
}

@media (max-width: 800px) {
    .navbar-container {
        padding: 15px 0;
    } 

    .navbar-right {
        display: none;
    }

    .burger-menu {
        display: flex;
    }

    .dropdown-menu {
        display: none;
        width: 75%;
    }

    .dropdown-menu.show {
        display: flex;
    }
}

.presentation, .contact, .thanks {
    display: flex;
    padding: 75px 25px;
    background: #f5f7fa;
    align-items: center;
}

.presentation > img {
    width: 50%;
}

.contact > img {
    width: 50%;
}

/* Style global de l'article */
.myself {
    display: flex;               /* Affichage en flexbox pour positionner l'image et le texte côte à côte */
    align-items: stretch;        /* Aligne les éléments sur la hauteur maximale possible */
    gap: 20px;                   /* Espace entre l'image et le texte */
    margin-bottom: 40px;
    justify-content: space-between;  /* S'assure que l'image et le texte sont espacés */
}

/* Style de l'image */
.myself img {
    max-width: 50%;              /* L'image occupe 50% de la largeur */
    height: auto;                /* L'image garde son ratio */
    object-fit: contain;         /* Adapte l'image au conteneur en conservant son ratio */
}

/* Style du texte */
.myself > div {
    flex-grow: 1;                /* Le texte occupe l'espace restant */
    padding: 0 20px;             /* Ajoute un peu de marge intérieure au texte */
}

.myself h2, .skills h2 {
    font-size: 1.75rem;             /* Taille de base des titres */
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: 1.5px;
}

.myself p {
    line-height: 1.5;            /* Espace entre les lignes pour améliorer la lisibilité */
    text-align: justify;
}

/* Media query pour les écrans entre 1400px et 1500px */
@media (max-width: 1500px) and (min-width: 1400px) {
    .myself h2 {
        font-size: 1.5em; /* 1.75em - 0.25em */
    }
    
    .myself p {
        font-size: 0.95em; /* 1em - 0.25em */
    }
}

/* Media query pour les écrans entre 1300px et 1400px */
@media (max-width: 1400px) and (min-width: 1300px) {
    .myself h2 {
        font-size: 1.25em; /* 1.5em - 0.25em */
    }
    
    .myself p {
        font-size: 0.90em; /* 0.75em - 0.25em */
    }
}

/* Media query pour les écrans entre 1200px et 1300px */
@media (max-width: 1300px) and (min-width: 1200px) {
    .myself h2 {
        font-size: 1.25em; /* 1.25em - 0.25em */
    }
    
    .myself p {
        font-size: 0.85em; /* 0.5em - 0.25em */
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .myself {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .myself > img {
        width: 95%;
        max-width: 100%;
    }
}

.presentation > div > h1 {
    font-size: 1.5em;
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: 1.5px;
}

.presentation > div > h2 {
    font-size: 1.17em;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 300;
    line-height: 1.25;
}

.presentation > div, .myself > div {
    padding: 25px;
}

.presentation > div > button {
    background: #585757;
    padding: 15px 25px;
    border: none;
    letter-spacing: 1.25px;
    cursor: pointer;
}

.presentation > div > button:hover {
    background: #474747; /* Couleur de fond lors du survol */
}

.presentation > div > button > a {
    color: white;
    text-decoration: none;
}

.contact > div > button > a {
    color: white;
    text-decoration: none;
}

.contact > div > h1 {
    font-size: 1.5em;
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: 1.5px;
}

.contact > div > h2 {
    font-size: 1.17em;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 300;
    line-height: 1.5;
}

.contact > div, .myself > div {
    padding: 25px;
}

.contact > div > button {
    background: #585757;
    padding: 15px 25px;
    border: none;
    letter-spacing: 1.25px;
    cursor: pointer;
}

.contact > div > button > a {
    color: white;
    text-decoration: none;
}

/* Responsive */
@media (max-width: 1200px) {
    .presentation, .contact {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .presentation > img {
        width: 95%;
    }
    .contact > img {
        width: 95%;
    }
}

/* Styles de la section skills */
.skills {
    padding: 75px 25px;
    background: #f5f7fa;
}

.skills h2, .skills h3 {
    text-align: center;
}

.skills h2 {
    margin-bottom: 0px;
}

.skills h3 {
    font-weight: 400;
    margin-top: 10px;
}

/* Styles de la section skills */
.skills {
    padding: 75px 25px;
    background: #f5f7fa;
}

.skills h2, .skills h3 {
    text-align: center;
}

/* Styles des cartes */
.cards-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colonnes par défaut */
    grid-gap: 20px; /* Espace entre les cartes */
    margin-top: 30px;
    justify-items: center; /* Centre les cartes horizontalement */
}

.card {
    background-color: #8b9ba18a;
    border: 1px solid #8b9ba12b;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 300px;
    height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px; /* Ajoute de l'espace entre les cartes */
    transition: transform 0.3s ease; /* Ajout de la transition pour l'agrandissement */
}

/* Agrandissement au hover */
.card:hover {
    transform: scale(1.05); /* Agrandissement de 5% */
}

.card-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.card-content h4 {
    margin: 10px 0;
    font-size: 1.25rem;
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: 1.5px;
}

.card-content p {
    margin: 0;
}

/* Icône de loupe */
.icon-container {
    position: absolute;
    bottom: 10px;
    right: 10px;
}

.loupe {
    width: 24px !important;
    height: 24px !important;
    cursor: pointer !important;
    transition: transform 0.3s ease;
}

.loupe:hover {
    transform: scale(1.3);
}

/* Styles de la popup */
.popup {
    display: none;
    position: fixed;
    z-index: 10;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(0 0 0 / 78%);
    justify-content: center;
    align-items: center;
}

.popup-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
}

.popup-content ul {
    list-style-type: disc;
    padding-left: 20px;
    line-height: 1.5;
}

.popup-content li {
    width: 95%;
    margin-bottom: 5px;
    font-size: 1.125em;
}

.popup-content h4 {
    font-size: 1.25rem;
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: 1.5px;
    text-align: center;
    border-bottom: 1px solid lightgrey;
}

.popup-content h5 {
    font-size: 1em;
    text-align: justify;
    font-weight: 400;
    line-height: 1.5;
}

.fonctionnalities li {
    font-size: 1em;
}

.button-row {
    display: flex;
    justify-content: end;
    margin-top: 30px;
}

.button-row a {
    text-decoration: none;
    color: white;
    background: #585757;
    padding: 15px;
    border: none;
    letter-spacing: 1.25px;
    cursor: pointer;
    margin-left: 15px;
}

.close-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 24px;
}

/* Media Query entre 1453px et 1000px */
@media (max-width: 1453px) and (min-width: 1000px) {
    .cards-container {
        grid-template-columns: repeat(2, 1fr); /* 2 colonnes */
        grid-template-rows: auto auto; /* Plusieurs lignes */
    }
}

/* Media Query pour les écrans entre 999px et 768px */
@media (max-width: 999px) {
    .cards-container {
        grid-template-columns: 1fr; /* Une seule colonne */
        grid-gap: 20px; /* Ajoute de l'espace entre les cartes */
    }

    .card {
        width: 100%; /* Occupe toute la largeur */
    }
}

/* Media Query pour les très petits écrans (max-width: 768px) */
@media (max-width: 768px) {
    .cards-container {
        grid-template-columns: 1fr; /* Une seule colonne */
        grid-gap: 20px; /* Ajoute de l'espace entre les cartes */
    }

    .card {
        width: 90%; /* Ajuste légèrement la largeur pour les petits écrans */
    }
}

.projects {
    padding: 25px;
    background: #f5f7fa;
}

.projects h2 {
    font-size: 1.75rem;
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: 1.5px;
    text-align: center;    
    margin-bottom: 0px;
}

/* Styles du conteneur principal "projects" */
.projects {
    padding: 50px 25px;
    background: #f5f7fa;
}

.projects h3 {
    text-align: center;
    margin-top: 10px;
    font-weight: 400;
}

/* Styles des cartes */
.cards-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colonnes pour les cartes */
    grid-gap: 20px; /* Espace entre les cartes */
    margin-top: 30px;
    justify-items: center;
}

/* Styles individuels pour chaque card */
.card {
    position: relative;
    width: 300px;
    height: 250px;
    overflow: hidden;
    transition: transform 0.3s ease; /* Transition pour l'agrandissement */
}

.card:hover {
    transform: scale(1.05); /* Agrandissement au survol */
}

/* Image dans la carte */
.card-image {
    position: relative;
    width: 100%;
    height: 100%;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ajuste l'image pour couvrir tout l'espace */
}

/* Titre centré sur l'image */
.card-image h4 {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%); /* Centre le texte */
    color: white;
    font-size: 1.5rem;
    font-family: Arial, Helvetica, sans-serif;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); /* Légère ombre pour le texte */
    z-index: 1;
}

/* Icône de loupe en bas à droite */
.icon-container {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 2;
}

.front-stacks {
    margin-bottom: 8px;
}

.back-stacks {
    margin-top: 8px;
}

/* Media Query pour écrans entre 1000px et 1453px */
@media (max-width: 1453px) and (min-width: 1000px) {
    .cards-container {
        grid-template-columns: repeat(2, 1fr); /* 2 colonnes dans cette plage de taille */
    }
}

/* Media Query pour petits écrans */
@media (max-width: 999px) {
    .cards-container {
        grid-template-columns: 1fr; /* 1 colonne pour mobile */
    }

    .card {
        width: 100%; /* La carte occupe toute la largeur */
    }
}

.contact {
    padding: 75px 25px;
    background: #f5f7fa;
    text-align: center;
}

.contact h1 {
    font-size: 2rem;
    margin-bottom: 30px;
    letter-spacing: 1.5px;
    font-family: Arial, Helvetica, sans-serif;
    margin-top: 0px;
}

.contact h2 {
    text-align: justify;
    font-size: 1em !important;
}

.contact > div {
    width: 100%;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 1em;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 600;
    line-height: 1.25;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    border: 1px solid #ccc;
}

.form-group textarea {
    height: 50px;
}

.button-container {
    display: flex;               
    justify-content: flex-end;  
    margin-top: 20px;          
}

button {
    background: #585757;
    color: white;
    padding: 15px 25px;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

button:hover {
    background: #474747; /* Couleur de fond lors du survol */
}

.thanks h1 {
    margin: auto;
}

/* Footer */
footer {
    text-align: center;
    padding: 50px 0;
}


footer > a > img {
    width: 25px;
    height: 25px;
    padding: 0 2.5px;
}