:root {
  --beige-fond: #004643;
  --beige-clair: #f9bc60;
  --marron-clair: #8d6748;
  --marron-foncé: #5a3e2b;
  --accent: #b1945f;
  --blanc: #ffffff;
  --font-principale: 'Segoe UI', sans-serif;
  --color-button: #8c7851;
  --h3-color: #020826;
  --card-background: #272343;
  --card-color-text: #716040; 
  --color-paragraph: #2a2a2a;
  --background-section: #e8e4e6;
  --title-h3: #abd1c6;
  --hover: #f56e0e;
  --header-h1: #bb774a;
  --background-form: #e8e4e6;
  --title-cv: #0f3433;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;  
}


html {
  scroll-behavior: smooth;
  background-color: var(--beige-fond);
}

body {
  font-family: var(--font-principale);
  color: var(--color-paragraph);
  background-color: var(--beige-fond);
  width: 100%;
}

main, footer {
  width: 100%;
  box-sizing: border-box;
}

/* SECTION HEADER */
header {
  text-align: center;
  width: 100%;
}

header h1 {
  font-size: 3rem;
  color: var(--title-h3);
  margin: 0.5rem 0;
}

header h2 {
  font-size: 1.2rem;
  color: var(--blanc);
  font-weight: normal;
}

.container__burger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  
}

.container__logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 50%;
  margin: 1rem;
}

.logo {
  text-decoration: none;
  color: var(--title-h3);
}

.logo__name {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0;
}


.logo__job {
  font-size: 1rem;
  margin: 0 0 0 0;
  font-weight: normal;
}

.container__logo__nav{
  display: flex;
  flex-direction: row;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10000;
  background-color: var(--beige-fond);
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--beige-clair);
  padding: 0.5rem;
  width: 100%;
  margin: 0;
  
}
.navbar {
  font-size: 1.2rem;
  color: var(--beige-clair);
  transition: transform 0.4s ease;
}
.logo:hover {
  transform: scaleX(-1);
}
.burger {
  display: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--marron-foncé);
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  font-size: 1.3rem;
}
.nav-links li a {
  color: var(--blanc);
  text-decoration: none;
  position: relative;
  transition: color 0.3s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--hover);
  transition: width 0.3s ease-in-out;
}
.nav-links a:hover {
  color: var(--hover);
}
.nav-links a:hover::after {
  width: 100%;
}

#accueil {
  display: flex;
  flex-direction: row;
}

.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4rem 2rem;
  max-width: 1000px;
  margin: 0 auto;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 5rem;
  background-color: var(--beige-fond);
}




.hero .bitmoji {
  flex: 1 1 50%;
  width: 100%;
  max-width: 350px;
  height: auto;
}

.container__header{
  display: flex;
  flex-direction: row;
}

.container__name{
  display: flex;
  flex-direction: column;
}

.container__name > h2{
  font-size: 1.7rem;
  color: var(--background-section);
}

.container__name > h3 {
  border: none;
  color: var(--background-section);
  font-weight: 100;
  font-size: 1.5rem;

}

h3 {
  border-left: 4px solid var(--title-h3);
  padding-left: 0.5rem;
  color: var(--title-h3);
  margin-bottom: 3rem;
  font-size: 2rem;
}

/* section {
  padding: 2rem 1rem;
  max-width: 800px;
  margin: 0 auto;
  background-color: var(--beige-fond);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease-out forwards;
}
section:nth-of-type(2) { animation-delay: 0.2s; }
section:nth-of-type(3) { animation-delay: 0.4s; }
section:nth-of-type(4) { animation-delay: 0.6s; } */


/*SECTION PRESENTATION*/
#presentation{
  background-color: var(--background-section);
}

.container__presentation{
  padding: 2rem 1rem;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease-out forwards;
}

.presentation{
  color: var(--color-paragraph);
  font-size: 1.3rem;
  text-align: justify;
}

.container__presentation > h3{
  color: var(--title-cv);
  border-left: 4px solid var(--title-cv);
}


/*SECTION SKILLS*/
#skills{
  background-color: var(--beige-fond); 
  color: var(--beige-clair);
  width: 100%;
}


.container__skills {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
  width: 100%;
  box-sizing: border-box;
}

.skill {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 150px;
  max-width: 200px;
  text-align: center;
}

.skill img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

.skill legend {
  font-size: 1rem;
  margin-top: 0.5rem;
}

.skill:hover{
  transform: scale(1.05);
  transition-duration: 0.2s;
}

a {
  color: var(--marron-foncé);
  text-decoration: none;
}

/*SECTION CV*/
#section__cv{
  background-color: var(--background-section);
  width: 100%;
  padding: 5rem 0;
}

.section__cv {
  width: 100%;
  height: 100%;
  text-align: center;
  padding: 2rem;
  box-sizing: border-box;
}
.section__cv h2 {
  font-size: 2rem;
  margin-bottom: 3rem;
  color: var(--title-cv);
}
.container__cv {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.btn__cv {
  background-color: var(--title-h3);
  color: var(--color-paragraph);
  padding: 1rem 2rem;
  text-decoration: none;
  font-weight: bold;
  border-radius: 5px;
  transition: background-color 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 30%;
  max-width: 200px;
}
.btn__cv:hover {
  background-color: var(--hover);
  color: var(--blanc);
}
.icon__cv {
  width: 2rem;
  margin-left: 0.5rem;
}


/*SECTION PROJETS*/

#projets{
  background-color: var(--beige-fond);
}
 
.container__projets{
  padding: 2rem 1rem;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease-out forwards;
}

.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.card {
  background-color: var(--background-form);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}
.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.card-content {
  padding: 1rem;
}
.card-content h4 {
  margin: 0 0 0.5rem;
  color: var(--color-paragraph);
  text-align: center;
}
.card-content p {
  margin: 0 0 1rem;
  color: var(--color-paragraph);
}
.card-content a {
  color: var(--beige-clair);
  font-weight: bold;
  text-decoration: none;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: var(--beige-fond);
}
.modal-content {
  background-color: var(--background-section);
  margin: 10% auto;
  padding: 2rem;
  border-radius: 8px;
  max-width: 600px;
  color: var(--color-paragraph);
  position: relative;
  animation: fadeIn 0.4s ease;
}

.github-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--beige-clair);
  color: var(--background-section);
  padding: 0.5rem 1rem;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s;
  margin-top: 3rem;
}

.github-btn:hover {
  background-color: #444c56;
}

.github-btn svg {
  fill: #ffffff;
}

.close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
}


/*SECTION CONTACT*/
#contact{
  background-color: var(--background-section);
  color: var(--color-paragraph);
  width: 100%;
}

.big__container__contact{
  padding: 2rem 1rem;
  max-width: 800px;
  margin: 0 auto;
  background-color: var(--background-section);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease-out forwards;
  display: flex;
  flex-direction: column;
}

.big__container__contact > h3 {
  color: var(--title-cv);
  border-left: 4px solid var(--title-cv);
}

.container__contact{
  display: flex;
  flex-direction: row;
  align-items: center;
  
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

input, textarea {
  padding: 0.8rem;
  background-color: var(--title-h3);
  border: none;
  border-radius: 4px;
  font-size: 1rem;
}

.input__name {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.input__name > input {
  width: 40%;
}

button {
  background-color: var(--beige-fond);
  color: var(--background-section);
  padding: 0.8rem;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}
button:hover {
  background-color: var(--hover);
  transform: translateY(-2px);
}

.container__mail {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 5rem;
  font-size: 1.2rem;
  color: var(--color-paragraph);
}


/*SECTION FOOTER*/
footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--background-section);
}

.linkedin {
  width: 2.5rem;
  margin: 1rem;
  transition: transform 0.4s ease;
}
.linkedin:hover {
  transform: scaleX(-1);
}

.container__icons{
  display: flex;
  flex-direction: row;
}



@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}



/* RESPONSIVE*/
@media (max-width: 768px) {

  .container__logo__nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

 .container__burger {
    display: flex;
    justify-content: flex-end; 
    align-items: center;
    position: relative;
    left: 9rem;
  }

 .burger {
    display: block;
    font-size: 2rem;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--background-section);
    border: none;
}


 .container__logo {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
  }

  .logo__name,
  .logo__job {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.navbar {
  position: relative;
  width: 100%;
  overflow: visible;
}

.nav-links {
  position: fixed;
  top: 70px; 
  left: 0;
  width: 100%;
  background-color: var(--background-section);
  color: var(--beige-fond);
  display: flex;
  flex-direction: column;
  align-items: center;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-in-out;
  z-index: 1000; 
  padding: 0; 
}

.nav-links.show {
  max-height: 500px; 
}

.nav-links li {
  list-style: none;
  width: 100%;
  text-align: center; 
  margin-top: 0.3rem;
  margin-bottom: 0.3rem;
  color: var(--beige-fond);
}

.nav-links a {
  display: block;
  width: 100%;
  color: var(--beige-fond);
  text-decoration: none;
}


.nav-links li a {
  display: block;
  width: 100%;
  color: var(--beige-fond);
  text-decoration: none;
}



.hero {
    flex-direction: column;
    padding: 2rem 1rem;
    margin-top: 4rem;
}

.container__header {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.container__name h1 {
    font-size: 2rem;
}

.container__name h2,
.container__name h3 {
    font-size: 1.2rem;
}

.hero .bitmoji {
    max-width: 200px;
    margin-bottom: 1.5rem;
}

.skill {
    width: 50px;
}
.skill img {
    width: 50px;
    height: 50px;
}
.skill legend {
    font-size: 0.6rem;
}
.input__name > input {
    width: 40%;
}
#contact > div {
    flex-direction: column;
}
.container__mail {
    margin: 3rem;
}

.container__contact{
    display: flex;
    flex-direction: column;
}
}



/* Fond sombre semi-transparent */
.modal-success {
  display: none; 
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease;
}

/* Contenu de la modale */
.modal-success-content {
  background-color: #fdfdfd;
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  animation: slideDown 0.4s ease;
}

/* Bouton fermer */
.close-success {
  position: absolute;
  right: 1rem;
  top: 1rem;
  font-size: 24px;
  cursor: pointer;
  color: #555;
}

#btn-close-modal {
  margin-top: 1rem;
  padding: 0.5rem 1.5rem;
  border: none;
  background-color: #2c3e50;
  color: #fff;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
}

/* Animations */
@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}
@keyframes slideDown {
  from {transform: translateY(-50px); opacity:0;}
  to {transform: translateY(0); opacity:1;}
}
