@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* === VARIABLES CSS === */
:root {
  --header-height: 3rem;

  /* Typographie */
  --font: 'Poppins', sans-serif;

  /* Couleurs */
  --primaire: #007bc4;
  --noire: #222;
  --blanche: #ffffff;
  --gris: #888;

  /* Marges */
  --mb-2: 1rem;
  --mb-4: 2rem;

  /* Ombres */
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

  /* Z-index */
  --z-fixed: 100;
}

/* === RESET & BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background-color: var(--blanche);
  color: var(--noire);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* === UTILITAIRES === */
.bd-grid {
  display: grid;
  gap: 2rem;
  width: 90%;
  max-width: 1024px;
  margin: 0 auto;
}

/* === SECTIONS === */
.section {
  padding: 4rem 0 2rem;
}

.section-title {
  font-size: 2rem;
  color: var(--primaire);
  text-align: center;
  margin-bottom: var(--mb-4);
}

/* === HEADER === */
.header-1 {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  background: var(--primaire);
  z-index: var(--z-fixed);
  box-shadow: var(--box-shadow);
}

/* === NAVIGATION === */
.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--noire);
}

.nav__logo span {
  color: #fff;
}

.nav__menu {
  display: flex;
}

.nav__list {
  display: flex;
  gap: 1.5rem;
}

.nav__link {
  font-weight: 500;
  color: var(--blanche);
  transition: 0.3s;
}

.nav__link:hover,
.nav__link.active {
  color: var(--noire);
}

.nav__toggle {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--primaire);
  background-color: var(--blanche);
}

/* === ACCUEIL === */
.ahome__img {
  border-radius: 1rem;
  box-shadow: var(--box-shadow);
}

.home__subtitle {
  font-size: 1.2rem;
  color: var(--primaire);
  margin-bottom: var(--mb-2);
}

.home__text {
  color: var(--noire);
}

/* === À PROPOS === */
.about__img img {
  border-radius: 1rem;
  box-shadow: var(--box-shadow);
}

.about__subtitle {
  font-size: 1.5rem;
  color: var(--primaire);
  margin-bottom: var(--mb-2);
}

/* === COMPÉTENCES === */
.skills__container {
  row-gap: 2rem;
  text-align: center;
}

.skills__subtitle {
  font-size: 1.3rem;
  margin-bottom: var(--mb-2);
}

.skills__data {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  padding: 0.5rem 1rem;
  margin-bottom: var(--mb-2);
  border-radius: 0.5rem;
  box-shadow: 0 4px 25px rgba(14, 36, 49, 0.15);
  position: relative;
}

.skills__names {
  display: flex;
  align-items: center;
  color: var(--primaire);
}

.skills__icon {
  font-size: 1.5rem;
  color: var(--primaire);
  margin-right: 0.5rem;
}

.skills__bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 8px;
  background-color: var(--gris);
  border-radius: 0.5rem;
  overflow: hidden;
  width: 100%;
}

.skills__html::before,
.skills__css3::before,
.skills__js::before {
  content: "";
  display: block;
  height: 100%;
  background-color: var(--primaire);
}

.skills__html::before { width: 95%; }
.skills__css3::before { width: 85%; }
.skills__js::before   { width: 70%; }

/* === RÉALISATIONS === */
.work__container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.work__img {
  background-color: var(--primaire);
  padding: 1rem;
  border-radius: 1rem;
  box-shadow: var(--box-shadow);
  text-align: center;
}

.work__img img {
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
}

.work__img h5 a {
  color: var(--blanche);
  font-weight: 600;
}

/* === CONTACT === */
.contact__form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  color: var(--primaire);
}

.contact__input {
  padding: 0.75rem 1rem;
  border: 2px solid var(--primaire);
  border-radius: 0.5rem;
  background: beige;
  font-size: 1rem;
  color: var(--noire);
}

.contact__button {
  background: var(--primaire);
  color: var(--blanche);
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 2rem;
  font-weight: bold;
  cursor: pointer;
  margin-left: auto;
  transition: background 0.3s;
}

.contact__button:hover {
  background: #52e0c4;
}

/* === FOOTER === */
.footer {
  background: var(--primaire);
  color: var(--blanche);
  text-align: center;
  padding: 2rem 0;
  margin-top: 3rem;
}

.footer span {
  font-weight: bold;
}

.footer__title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--blanche);
  font-weight: bold;
}

.footer__social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1rem 0;
}

.footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #52e0c4;
  color: var(--blanche);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.footer__social a:hover {
  transform: scale(1.1);
  background-color: yellowgreen;
}

.footer__social i {
  font-size: 1.25rem;
}

/* === RESPONSIVE === */
@media screen and (max-width: 768px) {
  .nav__menu {
    position: absolute;
    top: var(--header-height);
    right: 0;
    background-color: var(--primaire);
    width: 100%;
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
    flex-direction: column;
    align-items: center;
  }

  .nav__menu.show {
    height: 250px;
    padding: 1rem 0;
  }

  .nav__list {
    flex-direction: column;
    gap: 1.5rem;
  }

  .nav__toggle {
    display: block;
  }

  .home__container,
  .about__container,
  .skills__container,
  .contact__container {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media screen and (min-width: 768px) {
  .about__container,
  .skills__container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    text-align: initial;
  }

  .about__img img {
    width: 300px;
  }

  .contact__form {
    width: 360px;
  }

  .contact__container {
    justify-items: center;
  }
}
