/* ===== GOOGLE FONTS ===== */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700&display=swap");

/* ===== CSS VARIABLES ===== */
:root {
  /* Colors */
  --first-color: #34495e; /* Dark blue-grey */
  --white-color: #f5f5f5; /* Off-white */
  --dark-color: #2c3e50; /* Darker blue-grey */
  --text-color: #666666; /* Medium grey */

  /* Typography */
  --body-font: "Montserrat", sans-serif;
  --font-medium: 500;

  /* Font Sizes */
  --big-font-size: 6.25rem;
  --h2-font-size: 1.25rem;
  --h1-font-size: 1.1rem;
  --normal-font-size: 0.938rem;
  --small-font-size: 0.813rem;

  /* Layout */
  --header-height: 3rem;
  --mb-1: 0.5rem;
  --mb-2: 1rem;
  --mb-3: 1.5rem;
  --mb-4: 2rem;

  /* Z-Index */
  --z-fixed: 100;
}

/* ===== RESPONSIVE FONT SIZES ===== */
@media screen and (min-width: 768px) {
  :root {
    --big-font-size: 7rem;
    --h2-font-size: 2rem;
    --h1-font-size: 1.1rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;
  }
}

/* ===== BASE RESET ===== */
*,
::before,
::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: var(--header-height) 0 0 0;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  font-weight: var(--font-medium);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== COMMON ELEMENTS ===== */
ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: var(--text-color);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== COMMON CLASSES ===== */
.section {
  padding: 3rem 0;
}

.section-title {
  position: relative;
  font-size: var(--h2-font-size);
  color: var(--dark-color);
  margin: var(--mb-4) 0;
  text-align: center;
}

.section-title::after {
  position: absolute;
  content: "";
  width: 32px;
  height: 0.18rem;
  left: 0;
  right: 0;
  margin: auto;
  top: 2rem;
  background-color: var(--first-color);
}

.bd-grid {
  max-width: 1024px;
  display: grid;
  grid-template-columns: 100%;
  grid-column-gap: 2rem;
  width: calc(100% - 2rem);
  margin-left: var(--mb-2);
  margin-right: var(--mb-2);
}

.l-header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
  background-color: var(--first-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);

  /* Transition fluide pour l'animation */
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
}

/* Classe pour masquer le header */
.l-header--hidden {
  transform: translateY(-100%);
}

/* Alternative avec une ombre plus marquée */
.l-header-alt {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
  background-color: var(--first-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);

  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
}

.l-header-alt--hidden {
  transform: translateY(-100%);
}

/* Option avec dégradé d'ombre */
.l-header-gradient {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
  background-color: var(--first-color);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.1),
    0 8px 16px rgba(0, 0, 0, 0.1);

  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
}

.l-header-gradient--hidden {
  transform: translateY(-100%);
}

.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__menu {
  transition: 0.25s;
}

.nav__item {
  margin-bottom: var(--mb-4);
}

.nav__link {
  position: relative; /* CORRECTION: Ajouté pour le positionnement du pseudo-élément */
  color: var(--dark-color);
  text-decoration: none; /* CORRECTION: Enlève le soulignement par défaut */
  display: inline-block; /* CORRECTION: Améliore le rendu de l'effet hover */
  transition: color 0.3s ease; /* CORRECTION: Transition fluide pour la couleur */
}

.nav__link::after {
  content: "";
  position: absolute;
  bottom: -5px; /* espace entre le texte et la ligne */
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--first-color);
  transition: width 0.3s ease-in-out;
}

.nav__link:hover {
  color: var(--first-color);
}

.nav__link:hover::after {
  width: 100%;
}

.nav__logo {
  color: var(--white-color);
}

.nav__logo-img {
  width: 40px; /* Réduit la largeur à 40px */
  height: auto; /* Garde les proportions */
  max-width: 100%; /* Empêche de dépasser le conteneur */
  display: block; /* Supprime les petits espaces en bas de l'image */
}

.nav__toggle {
  color: var(--white-color);
  font-size: 1.5rem;
  cursor: pointer;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.18rem;
  border: 1px solid rgba(245, 245, 245, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.language-switcher__button {
  min-width: 2rem;
  height: 1.75rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--white-color);
  cursor: pointer;
  font-family: var(--body-font);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.language-switcher__button:hover,
.language-switcher__button.active {
  background: var(--white-color);
  color: var(--first-color);
}

.language-switcher__button:focus-visible {
  outline: 2px solid var(--white-color);
  outline-offset: 2px;
}

@media screen and (max-width: 768px) {
  .nav__actions {
    gap: 0.45rem;
    margin-left: auto;
  }

  .language-switcher {
    gap: 0.12rem;
    padding: 0.12rem;
  }

  .language-switcher__button {
    min-width: 1.72rem;
    height: 1.5rem;
    padding: 0 0.35rem;
    font-size: 0.68rem;
  }
}

@media screen and (max-width: 380px) {
  .nav__actions {
    gap: 0.3rem;
  }

  .language-switcher__button {
    min-width: 1.5rem;
    height: 1.35rem;
    padding: 0 0.25rem;
    font-size: 0.62rem;
  }
}

/* BONUS: Variantes d'effet hover */

/* Effet hover avec ligne qui vient du centre */
.nav__link--center::after {
  left: 50%;
  transform: translateX(-50%);
}

.nav__link--center:hover::after {
  width: 100%;
}

/* Effet hover avec ligne colorée différente */
.nav__link--colored::after {
  background: linear-gradient(90deg, var(--first-color), #ff6b6b);
}

/* Effet hover avec animation plus rapide */
.nav__link--fast::after {
  transition: width 0.2s ease-out;
}

.show {
  right: 0;
}

.active::after {
  display: none;
}

/* ===== DROPDOWN MENU ===== */
.nav__dropdown {
  position: relative;
}

.nav__dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white-color);
  min-width: 180px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  border: 1px solid #e0e0e0;
  padding: 0.5rem 0;
}

.nav__dropdown:hover .nav__dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav__dropdown-link {
  display: block;
  padding: 0.7rem 1.2rem;
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  border-left: 3px solid transparent;
}

.nav__dropdown-link:hover {
  background: rgba(52, 73, 94, 0.1);
  color: var(--first-color);
  border-left-color: var(--first-color);
  padding-left: 1.5rem;
}

.nav__link i {
  margin-left: 0.5rem;
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.nav__dropdown:hover .nav__link i {
  transform: rotate(180deg);
}

/* Mobile dropdown styles */
@media screen and (max-width: 768px) {
  .nav__dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    color: #2c3e50;
    background: rgba(52, 73, 94, 0.05);
    margin-top: 0.5rem;
    border: none;
    border-radius: 4px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav__dropdown:hover .nav__dropdown-menu {
    max-height: 200px;
  }

  .nav__dropdown-link {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  .nav__dropdown-link:hover {
    background: rgba(52, 73, 94, 0.1);
    padding-left: 1.2rem;
  }
}

/* ===== HOME SECTION ===== */
.home {
  position: relative;
  background-color: var(--first-color);
  overflow: hidden;
}

.home__container {
  height: calc(100vh - var(--header-height));
  row-gap: 1rem;
  position: relative;
  z-index: 2;
}

.home__title {
  align-self: flex-end;
  font-size: var(--big-font-size);
  color: var(--white-color);
  line-height: 0.9;
  margin-top: 100px;
}

@keyframes blink-caret {
  50% {
    border-color: transparent;
  }
}

.home__title span {
  text-shadow: 0 20px 25px rgba(0, 0, 0, 0.5);
}

.home__cta {
  position: relative;
  z-index: 10;
  margin-top: var(--mb-3);
  margin-bottom: 4rem;
  display: flex;
  flex-direction: column; /* icons under the resume button */
  align-items: flex-start;
  gap: 1rem;
}

.home__social {
  display: flex;
  gap: 0.75rem;
}

.home__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  color: #ffffff;
  font-size: 1.4rem;
  transition: all 0.3s ease;
}

.home__social-link:hover {
  background-color: #ffffff;
  color: var(--first-color);
  transform: translateY(-3px);
}

.home__cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background-color: #ffffff !important;
  color: #34495e !important;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
  border: 2px solid #ffffff;
}

.home__cta-btn i {
  font-size: 1.25rem;
  transition: transform 0.3s ease;
  color: #34495e !important;
}

.home__cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  background-color: #2c3e50 !important;
  color: #ffffff !important;
  border-color: #ffffff;
}

.home__cta-btn:hover i {
  transform: translateY(2px);
  color: #ffffff !important;
}

.home__cta-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* Mobile styles for download button */
@media screen and (max-width: 768px) {
  .home__title {
  margin-top:0;
}
  .home__cta {
    margin-top:-45px;
  }

  .home__cta-btn {
    font-size: 0.813rem;
    padding: 0.5rem 1rem;
    background-color: #ffffff !important;
    color: #34495e !important;
    margin-bottom: 0;
  }

  .home__cta {
    row-gap: 0.85rem;
    margin-bottom: 2rem;
  }

  /* Less empty space above "Nour" on phones: the title row gets a smaller
     share of the screen height, the bottom row (Discover) takes the rest */
  .home__container {
    grid-template-rows: auto auto auto 1fr;
  }

  .home__container .home__title {
    margin-top: 1.75rem;
  }

  .home__container .home__cta {
    margin-top: 0;
  }

  .home__social-link {
    width: 42px;
    height: 42px;
    font-size: 1.25rem;
  }

  .home__cta-btn i {
    color: #34495e !important;
  }
}

.home__scroll {
  align-self: flex-end;
  padding-bottom: var(--mb-4);
}

.home__scroll-link {
  writing-mode: vertical-lr;
  transform: rotate(-180deg);
  color: var(--white-color);
}

.home__img {
  position: absolute;
  right: 0;
  bottom: 0px;
  width: 240px; /* phones (bigger on tablets/desktop below) */
}

/* ===== ABOUT SECTION ===== */
.about__container {
  justify-items: center;
  row-gap: 2rem;
  text-align: center;
}

.about__img {
  display: flex;
  justify-content: center;
  width: 180px;
}

.about__img img {
  width: 100%;
  height: 80%;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.3);
}

.about__subtitle {
  font-size: var(--h2-font-size);
  color: var(--first-color);
  margin-bottom: var(--mb-1);
}

.about__text {
  margin-bottom: var(--mb-4);
}

.about__profession {
  display: block;
  margin-bottom: var(--mb-4);
}
.about__social {
  text-align: center;
  margin-top: 5px;
}

.about__social-icon {
  font-size: 27px;
  margin: var(--mb-1);
}

.about__social-icon:hover {
  color: var(--first-color);
}

/* ===== EXPERTISE SECTION STYLES ===== */
.about__expertise {
  margin-top: 2rem;
  padding: 2rem 0;
}

.expertise__title {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: var(--first-color);
  font-weight: var(--font-semi);
}

.expertise__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.expertise__card {
  background: var(--white-color);
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  border: 1px solid #f0f0f0;
}

.expertise__card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.expertise__icon {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 0.5rem;
  display: block;
}

.expertise__card h4 {
  color: var(--first-color);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  text-align: center;
  font-weight: var(--font-semi);
}

.expertise__card ul {
  list-style: none;
  padding: 0;
}

.expertise__card li {
  padding: 0.3rem 0;
  color: var(--text-color);
  position: relative;
  padding-left: 1rem;
}

.expertise__card li:before {
  content: "✓";
  color: var(--first-color);
  font-weight: bold;
  position: absolute;
  left: 0;
}

/* About Info Improvements */
.about__info .expertise__icon {
  font-size: 1.5rem;
  display: inline-block;
  margin-right: 0.5rem;
  vertical-align: middle;
}

/* ===== SKILLS SECTION ===== */
.skills__container {
  row-gap: 2rem;
}

.skills__subtitle {
  color: var(--first-color);
  margin-bottom: var(--mb-3);
}

.skills__name {
  display: inline-block;
  font-size: var(--small-font-size);
  margin-right: var(--mb-2);
  margin-bottom: var(--mb-3);
  padding: 0.25rem 0.5rem;
  background-color: var(--white-color);
  border-radius: 0.25rem;
}

.skills__name:hover {
  background-color: var(--first-color);
  color: var(--white-color);
}

.skills__img img {
  border-radius: 0.5rem;
}

.skills__icons {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 1.5rem;
  justify-content: center;
  text-align: center;
}

.skill__icon-circle {
  width: 70px;
  height: 70px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 8px rgba(0, 0, 0, 0.21);
  transition: transform 0.3s ease;
  position: relative;
}

.skill__icon-circle:hover {
  transform: translateY(-5px);
}

.skill__icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.skill__icon-circle i {
  font-size: 30px;
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio {
  background-color: var(--white-color);
}

.portfolio__container {
  justify-items: center;
  row-gap: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.portfolio__item {
  background: #fff;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.3s ease-out,
    box-shadow 0.2s; /* Réduit à 0.2s et changé à ease-out */
}

.portfolio__item:hover {
  box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.2);
}

.portfolio__img {
  position: relative;
  overflow: hidden;
}

.portfolio__img img {
  border-radius: 0.5rem;
  margin-bottom: 10px;
}

.portfolio__link {
  position: absolute;
  bottom: -100%;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 0.5rem;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: 0.3s;
}

.portfolio__img:hover .portfolio__link {
  bottom: 0;
}

.portfolio__link-name,
.portfolio__link-demo {
  display: inline-block;
  padding: 6px 11px;
  margin: 7px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 400;
  transition: background 0.3s;
}

.portfolio__link-name {
  background: var(--first-color);
  color: white;
}

.portfolio__link-name:hover {
  background: #283e55; /* Bleu encore plus foncé */
}

.portfolio__link-demo {
  background: #e3f2fd;
  color: var(--first-color);
}

.portfolio__link-demo:hover {
  background: #d2e8f7; /* Vert encore plus foncé */
}

.portfolio__link-details {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  margin: 7px;
  color: var(--first-color);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid currentColor;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.portfolio__link-details:hover {
  color: #283e55;
  transform: translateX(2px);
}

.portfolio__link-details i {
  font-size: 0.85rem;
  transition: transform 0.2s ease;
}

.portfolio__link-details:hover i {
  transform: translateX(4px);
}

.cyber-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 15px 0;
}

.tech-tag {
  background-color: #34495e;
  color: white;
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
  display: inline-block; /* Important pour l'affichage */
}

#cybersecurity .portfolio__item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

#cybersecurity .portfolio__img {
  height: 200px;
  overflow: hidden;
  border-radius: 8px;
}

#cybersecurity .portfolio__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

#cybersecurity .portfolio__item:hover .portfolio__img img {
  transform: scale(1.05);
}

/* ===== CONTACT SECTION ===== */
.contact__container {
  row-gap: 2rem;
}

.contact__subtitle {
  font-size: var(--normal-font-size);
  color: var(--first-color);
}

.contact__text {
  display: inline-block;
  margin-bottom: var(--mb-2);
}

.contact__inputs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 1rem;
}

.contact__input {
  width: 100%;
  padding: 0.8rem;
  outline: none;
  border: 1.5px solid var(--dark-color);
  font-size: var(--normal-font-size);
  margin-bottom: var(--mb-4);
  border-radius: 0.5rem;
}

.contact__button {
  display: block;
  background-color: var(--first-color);
  color: var(--white-color);
  padding: 0.75rem 2.5rem;
  margin-left: auto;
  border-radius: 0.5rem;
  border: none;
  outline: none;
  font-size: var(--normal-font-size);
  cursor: pointer;
}

/* ===== FOOTER ===== */
.footer {
  color: var(--white-color);
  background-color: var(--dark-color);
}

.footer__container {
  row-gap: 2rem;
}

.footer__title {
  font-size: var(--normal-font-size);
  color: var(--white-color);
  margin-bottom: var(--mb-2);
}

.footer__link {
  color: var(--white-color);
  padding: 0.25rem 0;
}

.footer__link:hover {
  color: var(--first-color);
}

.footer__social {
  color: var(--white-color);
  font-size: 1.4rem;
  margin-right: var(--mb-1);
}

.footer__social:hover {
  color: var(--first-color);
}

.portfolio__video {
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
}
.about__info {
  text-align: center;
  margin-top: 10px;
}
.certificat__item {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap; /* Permet de passer à la ligne si l'écran est trop petit */
  gap: 1rem;
}
.certificat__item img {
  border-radius: 15px;
  box-shadow:
    2px 2px 8px rgba(0, 0, 0, 0.468),
    -2px -2px 8px rgba(177, 177, 177, 0.5);
}

.portfolio__item img {
  border-radius: 10px;
  aspect-ratio: 16/9;
  object-fit: contain;
}

/*Animation Coming Soon for projects*/
.coming-soon-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 250px;
  background-color: var(--white-color);
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.coming-soon-text {
  font-size: 1.8rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeIn 0.7s ease-out forwards;
}

.loading-dots {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.dot {
  width: 12px;
  height: 12px;
  background-color: #3498db;
  border-radius: 50%;
  opacity: 0;
}

.dot:nth-child(1) {
  animation: pulseDot 0.9s ease-in-out infinite;
  animation-delay: 0s;
}

.dot:nth-child(2) {
  animation: pulseDot 0.9s ease-in-out infinite;
  animation-delay: 0.18s;
}

.dot:nth-child(3) {
  animation: pulseDot 0.9s ease-in-out infinite;
  animation-delay: 0.36s;
}

.certificat__content {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap; /* Permet de passer à la ligne si l'écran est trop petit */
  gap: 1rem;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseDot {
  0% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.3;
  }
}

/* Add a subtle gradient background animation */
.coming-soon-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 1.6s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(50%);
  }
}

.chart-container {
  width: 90%;
  max-width: 500px;
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 11px rgba(0, 0, 0, 0.21);
  margin: 0 auto;
}

canvas {
  height: 300px !important;
  width: 100% !important;
}

/* Ajout dans style.css */
.thm-section {
  margin-top: 3rem;
  padding: 2rem 0; /* Padding vertical uniquement */
}

.thm-container {
  max-width: 1024px; /* Même largeur que les autres sections */
  width: calc(100% - 2rem); /* Marge pour les petits écrans */
  margin: 0 auto; /* Centrage */
  padding: 0 1rem; /* Padding interne */
}

.section-subtitle {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 1.5rem;
}

.section-subtitle i {
  font-size: 1.8rem;
  color: #3498db;
}

.section-subtitle h3 {
  color: white;
  font-size: 1.8rem;
  font-weight: 600;
}

.thm-card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.thm-card.beginner {
  border-top: 4px solid #3498db;
}

.thm-profile {
  display: flex;
  align-items: center;
  gap: 15px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
  margin-bottom: 20px;
}

.thm-avatar {
  width: 60px;
  height: 60px;
  background: #2c3e50;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  font-weight: bold;
}

.thm-info h4 {
  font-size: 1.4rem;
  color: #2c3e50;
  margin-bottom: 5px;
}

.thm-level {
  display: flex;
  gap: 10px;
  align-items: center;
}

.level-badge {
  background: #3498db;
  color: white;
  padding: 3px 10px;
  border-radius: 15px;
  font-size: 0.9rem;
  font-weight: 600;
}

.beginner-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-bottom: 25px;
}

.stat-item {
  text-align: center;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 10px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.9rem;
  color: #7f8c8d;
}

.thm-progress h5 {
  color: #2c3e50;
  font-size: 1.2rem;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f2f6;
}

.learning-path {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  align-items: flex-start;
}

.path-icon {
  width: 40px;
  height: 40px;
  background: #3498db;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.path-info {
  flex: 1;
}

.path-title {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 3px;
}

.path-desc {
  font-size: 0.9rem;
  color: #7f8c8d;
  margin-bottom: 8px;
}

.progress-bar {
  height: 8px;
  background: #ecf0f1;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3498db, #2ecc71);
  border-radius: 4px;
}

.thm-goals {
  margin-top: 30px;
}

.thm-goals h5 {
  color: #2c3e50;
  font-size: 1.2rem;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f2f6;
}

.learning-goals {
  list-style: none;
  padding-left: 0;
}

.learning-goals li {
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.learning-goals i {
  color: #3498db;
  font-size: 1.2rem;
  margin-top: 3px;
}

.thm-button {
  display: block;
  text-align: center;
  background: #3498db;
  color: white;
  padding: 12px 20px;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  margin-top: 25px;
  transition: all 0.3s ease;
}

.thm-button:hover {
  background: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.portfolio__overlay {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
  transition: opacity 0.3s;
}

.portfolio__img:hover .portfolio__overlay {
  opacity: 1;
  pointer-events: auto;
}

/* Responsive */
@media screen and (max-width: 768px) {
  .beginner-stats {
    grid-template-columns: 1fr;
  }

  .thm-profile {
    flex-direction: column;
    text-align: center;
  }

  .thm-level {
    justify-content: center;
  }
}

/* ===== MEDIA QUERIES ===== */
/* Small Devices */
@media screen and (max-width: 768px) {
  /* REMPLACER votre .nav__menu par ceci : */
  .nav__menu {
    position: fixed;
    top: var(--header-height);
    right: 0;
    width: 70%;
    height: calc(100vh - var(--header-height));
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.4); /* Opacité augmentée */
    transition: transform 0.5s ease-in-out;

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.3); /* Bordure ajoutée */

    transform: translateX(100%); /* Menu caché par défaut */
  }

  /* AJOUTER cette classe : */
  .nav__menu.show {
    transform: translateX(0); /* Menu visible */
  }

  .nav__menu.show {
    transform: translateX(0);
  }
  .chart-container {
    width: 95%;
    padding: 1rem;
  }

  .nav__logo-img {
    width: 32px; /* Réduit la largeur à 80px */
    height: auto; /* Garde les proportions */
    max-width: 100%; /* Empêche de dépasser le conteneur */
    display: block; /* Supprime les petits espaces en bas de l'image */
  }

  canvas {
    height: 300px !important;
  }
}

/* Extra Small Devices */
@media screen and (max-width: 320px) {
  .home__img {
    margin-top: 10px;
    width: 230px;
  }
}

/* Medium Devices and Up */
@media screen and (min-width: 768px) {
  body {
    margin: 0;
  }
  .section {
    padding-top: 4rem;
  }
  .section-title {
    margin-bottom: 3rem;
  }
  .section-title::after {
    width: 64px;
    top: 3rem;
  }

  .nav {
    height: calc(var(--header-height) + 1rem);
  }
  .nav__list {
    display: flex;
  }
  .nav__item {
    margin-left: var(--mb-4);
    margin-bottom: 0;
  }
  .nav__toggle {
    display: none;
  }
  .nav__link {
    color: var(--white-color);
  }
  .nav__link:hover {
    color: var(--white-color);
  }
  .home__container {
    height: 100vh;
    grid-template-rows: 1.7fr 1fr;
    row-gap: 0;
  }
  .home__img {
    width: 580px;
    right: 10%;
    bottom: 6rem; /* lift the illustration a little */
    transform: translateX(130px);
  }

  .about__container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    text-align: initial;
    padding: 4rem 0;
  }
  .about__img {
    width: 220px;
    height: 220px;
  }

  .about__img img {
    width: 100%;
    height: 100%;
    border-radius: 50%; /* Optionnel : ajoute des bords arrondis pour un meilleur design */
    box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.3);
  }

  .skills__container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
  }

  .portfolio__container {
    grid-template-columns: repeat(3, 1fr);
    column-gap: 2rem;
  }
  .contact__container {
    grid-template-columns: repeat(2, 1fr);
    justify-items: center;
  }
  .contact__form {
    width: 380px;
  }

  .footer__container {
    grid-template-columns: repeat(3, 1fr);
    justify-items: center;
  }
  .about__social-icon {
    margin-top: 20px;
  }
}

/* Large Devices */
@media screen and (min-width: 1024px) {
  .bd-grid {
    margin-left: auto;
    margin-right: auto;
  }
}

@media screen and (min-width: 768px) and (max-width: 1024px) {
  .home__img {
    width: 450px;
  }
}

/* ===== CYBERSECURITY SECTION ===== */
.cybersecurity {
  background-color: var(--white-color);
}

.cybersecurity .section-title {
  position: relative;
  font-size: var(--h2-font-size);
  color: var(--dark-color);
  margin: var(--mb-4) 0;
  text-align: center;
}

/* ===== PORTFOLIO SUBSECTIONS ===== */
.portfolio-subsection {
  margin-bottom: 4rem;
  background-color: #f5f5f5;
}

.portfolio-subsection-title {
  font-size: 1.5rem;
  color: var(--first-color);
  margin-bottom: 2rem;
  text-align: center;
  font-weight: 600;
  position: relative;
  padding-bottom: 1rem;
}

.portfolio-subsection-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--first-color), #3498db);
  border-radius: 2px;
}

/* Responsive pour les sous-sections */
@media screen and (max-width: 768px) {
  .portfolio-subsection-title {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
  }

  .portfolio-subsection {
    margin-bottom: 3rem;
  }
}

/* Style pour le nouveau sous-titre */
.home__subtitle {
  font-size: 1.1rem;
  color: white !important; /* Force la couleur */
  -webkit-text-fill-color: white !important; /* Pour Safari */
  margin-bottom: 2rem;
  margin-top: 15px;
  font-weight: 400;
  display: inline-block;
  width: 100%;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); /* Améliore la lisibilité */
}

/* Couleur bleue forcée pour tous les états */
.webfast-link,
.webfast-link:link,
.webfast-link:visited,
.webfast-link:active {
  color: #52d5f2 !important;
  -webkit-text-fill-color: #52d5f2 !important;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
  text-decoration-color: #52d5f2 !important;
  font-weight: 600;
  transition: all 0.3s ease;
}

.webfast-link:hover {
  color: #1d92ad !important;
  -webkit-text-fill-color: #1d92ad !important;
  text-decoration-thickness: 3px;
  text-decoration-color: #1d92ad !important;
}

/* Correction spécifique pour Safari iOS */
@supports (-webkit-touch-callout: none) {
  .home__subtitle {
    -webkit-font-smoothing: antialiased;
  }
  .webfast-link {
    -webkit-tap-highlight-color: transparent;
  }
}

/* Responsive pour mobile */
@media screen and (max-width: 768px) {
  .home__subtitle {
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); /* Plus prononcé sur mobile */
  }
}
.tech-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.7rem;
  font-weight: var(--font-medium);
  color: var(--first-color);
  background-color: rgba(52, 73, 94, 0.1); /* --first-color avec opacité */
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
  transition: all 0.3s ease;
}

.tech-badge:hover {
  background-color: rgba(
    52,
    73,
    94,
    0.2
  ); /* --first-color légèrement plus foncé */
  transform: translateY(-1px);
}

/* Optionnel : styles supplémentaires pour différentes catégories de technologies */
.tech-badge.html {
  color: #e44d26;
  background-color: rgba(228, 77, 38, 0.1);
}

.tech-badge.css {
  color: #2965f1;
  background-color: rgba(41, 101, 241, 0.1);
}

.tech-badge.js {
  color: #f0db4f;
  background-color: rgba(240, 219, 79, 0.1);
}

.tech-badge.wordpress {
  color: #21759b;
  background-color: rgba(33, 117, 155, 0.1);
}

.tech-badge.php {
  color: #777bb3;
  background-color: rgba(119, 123, 179, 0.1);
}

.tech-badge.api {
  color: #6db33f;
  background-color: rgba(109, 179, 63, 0.1);
}

/* Bouton Voir tous les projets */
.portfolio__more-projects {
  text-align: center;
  margin-top: 3rem;
  padding: 2rem 0;
}

.more-projects-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--first-color) 0%, #1a73e8 100%);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.1rem;
  box-shadow: 0 4px 15px rgba(30, 136, 229, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.more-projects-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.more-projects-btn:hover::before {
  left: 100%;
}

.more-projects-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(30, 136, 229, 0.4);
  background: linear-gradient(135deg, #1a73e8 0%, var(--first-color) 100%);
}

.more-projects-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(30, 136, 229, 0.3);
}

.more-projects-btn i.fab {
  font-size: 1.2rem;
}

.more-projects-btn i.bx {
  font-size: 1.3rem;
  transition: transform 0.3s ease;
}

@media screen and (min-width: 768px) and (max-width: 1100px) {
  .nav__item {
    margin-left: 1rem;
  }

  .nav__link,
  .nav__dropdown-link {
    font-size: 0.82rem;
  }

  .language-switcher__button {
    min-width: 1.75rem;
    font-size: 0.7rem;
  }
}

/* 8 menu entries since the Experience link: keep them on one line */
@media screen and (min-width: 768px) {
  .nav__link {
    white-space: nowrap;
  }

  /* the wider menu must not squeeze the logo */
  .nav > div:first-child {
    flex-shrink: 0;
  }

  .nav__logo-img {
    min-width: 40px;
  }
}

@media screen and (min-width: 1101px) and (max-width: 1440px) {
  .nav__item {
    margin-left: 1.4rem;
  }
}

.portfolio__divider {
  margin: 10px 0;
  border: 0;
  border-top: 1px solid rgba(52, 73, 94, 0.12);
}

/* ===== PROJECT DETAIL PAGE ===== */
.project-detail-body {
  min-height: 100vh;
  background: #f5f7fb;
  color: #1f2933;
}

.detail-header {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.project-detail-body .language-switcher {
  border-color: #cdd8e5;
  background: #fff;
  box-shadow: 0 8px 20px rgba(31, 41, 51, 0.08);
}

.project-detail-body .language-switcher__button {
  color: var(--first-color);
}

.project-detail-body .language-switcher__button:hover,
.project-detail-body .language-switcher__button.active {
  background: var(--first-color);
  color: #fff;
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--first-color);
  font-weight: 700;
}

.project-detail-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 8px 0 56px;
}

.project-detail-status {
  border-radius: 8px;
  padding: 14px 16px;
  background: #eaf3ff;
  color: #174a7c;
  font-weight: 700;
}

.project-detail-status[data-type="error"] {
  background: #fff0ed;
  color: #9b2116;
}

.project-detail__hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
  align-items: center;
  gap: 32px;
  padding: 28px;
  border: 1px solid rgba(52, 73, 94, 0.1);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(31, 41, 51, 0.08);
}

.project-detail__eyebrow {
  margin: 0 0 8px;
  color: #607086;
  font-weight: 700;
  text-transform: uppercase;
}

.project-detail__hero h1 {
  margin: 0 0 18px;
  color: var(--first-color);
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.05;
}

.project-detail__hero img {
  width: 100%;
  border-radius: 8px;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: #f8fafc;
}

.project-detail__tech,
.project-detail__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.project-detail__section {
  margin-top: 28px;
}

.project-detail__section h2 {
  margin: 0 0 12px;
  color: var(--first-color);
  font-size: 1.4rem;
}

.project-detail__body {
  display: grid;
  gap: 14px;
  max-width: 860px;
  color: #34495e;
  line-height: 1.8;
}

.project-detail__body p {
  margin: 0;
}

.project-detail__gallery {
  display: grid;
  gap: 28px;
}

.project-detail__gallery-group {
  display: grid;
  gap: 12px;
}

.project-detail__gallery-group h3 {
  margin: 0;
  color: #34495e;
  font-size: 1rem;
}

.project-detail__gallery-grid {
  display: grid;
  gap: 18px;
  align-items: start;
}

.project-detail__gallery-grid--desktop {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.project-detail__gallery-grid--phone {
  grid-template-columns: repeat(auto-fit, minmax(170px, 220px));
  justify-content: start;
}

.project-detail__gallery-item {
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #070b10;
  border: 1px solid rgba(52, 73, 94, 0.1);
  box-shadow: 0 10px 24px rgba(31, 41, 51, 0.08);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.project-detail__gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(31, 41, 51, 0.14);
}

.project-detail__gallery-link {
  display: block;
  color: inherit;
}

.project-detail__gallery-item--phone {
  max-width: 220px;
}

.project-detail__gallery img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  display: block;
}

.project-detail__gallery-item--phone img {
  aspect-ratio: 9 / 16;
  object-fit: contain;
}

/* ===== EXPERIENCE SECTION (content from the admin panel) ===== */
.experience[hidden],
.nav__item[hidden] {
  display: none !important;
}

.experience__container {
  position: relative;
  box-sizing: border-box;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  row-gap: 1.5rem;
  padding-left: 1.5rem;
  border-left: 2px solid rgba(52, 73, 94, 0.18);
}

.experience__item {
  position: relative;
  background: #fff;
  border: 1px solid rgba(52, 73, 94, 0.1);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(31, 41, 51, 0.07);
  padding: 1.5rem;
}

.experience__item::before {
  content: "";
  position: absolute;
  left: calc(-1.5rem - 8px);
  top: 1.75rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--first-color);
  box-shadow: 0 0 0 4px var(--white-color);
}

.experience__header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.experience__logo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: contain;
  background: #f4f6f8;
  flex-shrink: 0;
}

.experience__heading {
  flex: 1;
  min-width: 0;
}

.experience__role {
  margin: 0 0 0.25rem;
  color: var(--dark-color);
  font-size: 1.1rem;
}

.experience__company {
  margin: 0;
  color: var(--text-color);
  font-size: var(--small-font-size);
}

.experience__company-link {
  color: var(--first-color);
  font-weight: 600;
}

.experience__company-link:hover {
  text-decoration: underline;
}

.experience__period {
  flex-shrink: 0;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(52, 73, 94, 0.1);
  color: var(--first-color);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.experience__summary {
  margin: 0 0 0.75rem;
  color: var(--text-color);
  line-height: 1.6;
}

.experience__highlights {
  margin: 0 0 1rem;
  padding-left: 1.1rem;
  list-style: disc;
  color: var(--text-color);
  line-height: 1.6;
}

.experience__highlights li {
  margin-bottom: 0.35rem;
}

.experience__tech {
  margin-top: 0.25rem;
}

@media screen and (max-width: 576px) {
  .experience__container {
    padding-left: 1rem;
  }

  .experience__item {
    padding: 1.1rem;
  }

  .experience__item::before {
    left: calc(-1rem - 8px);
  }

  .experience__header {
    flex-direction: column;
    gap: 0.5rem;
  }

  .experience__period {
    order: -1;
  }

  .experience__item {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

/* ===== ADMIN CMS ===== */
.admin-body {
  min-height: 100vh;
  background: #f5f7fb;
  color: #1f2933;
}

.admin-body [hidden] {
  display: none !important;
}

.admin-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.admin-header h1 {
  margin: 8px 0 6px;
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: var(--first-color);
}

.admin-header p {
  margin: 0;
  color: #607086;
}

.admin-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--first-color);
  font-weight: 600;
  text-decoration: none;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

.admin-stack {
  max-width: 980px;
  margin: 0 auto;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  background: #fff;
  border: 1px solid rgba(52, 73, 94, 0.1);
  border-radius: 10px;
}

.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 7px;
  padding: 10px 16px;
  background: transparent;
  color: #34495e;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.admin-tab:hover {
  background: #f2f6fa;
}

.admin-tab--active,
.admin-tab--active:hover {
  background: var(--first-color);
  color: #fff;
}

[data-panel][hidden] {
  display: none !important;
}

.admin-content-list {
  display: grid;
  gap: 16px;
}

.admin-content-field {
  display: grid;
  gap: 10px;
  margin: 0;
  border: 0;
  border-top: 1px dashed #d8e1ec;
  padding: 12px 0 0;
}

.admin-content-field legend {
  padding: 0 6px 0 0;
  color: var(--first-color);
  font-weight: 700;
}

.admin-content-field label {
  font-weight: 500;
  font-size: 0.9rem;
}

.admin-card {
  background: #fff;
  border: 1px solid rgba(52, 73, 94, 0.1);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(31, 41, 51, 0.08);
  padding: 24px;
}

.admin-card h2 {
  margin: 0 0 18px;
  color: var(--first-color);
  font-size: 1.25rem;
}

.admin-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

.admin-card__header h2 {
  margin-bottom: 6px;
}

.admin-card__header p {
  margin: 0;
  color: #607086;
}

.admin-search {
  display: grid;
  gap: 7px;
  margin-bottom: 18px;
  color: #34495e;
  font-weight: 600;
}

.admin-search input {
  width: 100%;
  border: 1px solid #d8e1ec;
  border-radius: 6px;
  padding: 11px 12px;
  font: inherit;
}

.admin-form {
  display: grid;
  gap: 16px;
}

.admin-form label {
  display: grid;
  gap: 7px;
  font-weight: 600;
  color: #34495e;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  width: 100%;
  border: 1px solid #d8e1ec;
  border-radius: 6px;
  padding: 11px 12px;
  font: inherit;
  color: #1f2933;
  background: #fff;
}

.admin-form textarea {
  resize: vertical;
}

.admin-language-group {
  display: grid;
  gap: 14px;
  border: 1px solid #e1e8f0;
  border-radius: 8px;
  padding: 16px;
  background: #fbfdff;
}

.admin-language-group h3 {
  margin: 0;
  color: var(--first-color);
  font-size: 1rem;
}

.admin-gallery-manager {
  display: grid;
  gap: 12px;
  border: 1px solid #e1e8f0;
  border-radius: 8px;
  padding: 16px;
  background: #fbfdff;
}

.admin-gallery-manager h3 {
  margin: 0;
  color: var(--first-color);
  font-size: 1rem;
}

.admin-gallery-list {
  display: grid;
  gap: 12px;
}

.admin-gallery-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 12px;
  border: 1px solid #e1e8f0;
  border-radius: 8px;
  background: #fff;
}

.admin-gallery-item img {
  width: 120px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
}

.admin-gallery-item__controls {
  display: grid;
  gap: 10px;
}

.admin-form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-switches {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.admin-switches label {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
}

.admin-switches input {
  width: auto;
}

.admin-actions,
.admin-project__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-button {
  border: 0;
  border-radius: 6px;
  background: var(--first-color);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 11px 16px;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.admin-button:hover {
  background: #283e55;
  transform: translateY(-1px);
}

.admin-button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.admin-button--ghost {
  border: 1px solid #cdd8e5;
  background: #fff;
  color: var(--first-color);
}

.admin-button--ghost:hover {
  background: #edf4fa;
}

.admin-button--danger {
  background: #b42318;
}

.admin-button--danger:hover {
  background: #8f1d14;
}

.admin-status {
  margin: 0 0 20px;
  border-radius: 6px;
  padding: 12px 14px;
  background: #eaf3ff;
  color: #174a7c;
  font-weight: 600;
}

.admin-status[data-type="success"] {
  background: #e9f8ef;
  color: #17633a;
}

.admin-status[data-type="error"] {
  background: #fff0ed;
  color: #9b2116;
}

.admin-projects {
  display: grid;
  gap: 18px;
}

.admin-project-group {
  display: grid;
  gap: 10px;
}

.admin-project-group__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e1e8f0;
  padding-bottom: 8px;
}

.admin-project-group__header h3 {
  margin: 0;
  color: var(--first-color);
  font-size: 1rem;
}

.admin-project-group__header span {
  border-radius: 999px;
  background: #edf4fa;
  color: #34495e;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.admin-project-group__list {
  display: grid;
  gap: 10px;
}

.admin-project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid #e1e8f0;
  border-radius: 8px;
  background: #fbfdff;
}

.admin-project--active {
  border-color: var(--first-color);
  background: #f2f8fd;
  box-shadow: inset 4px 0 0 var(--first-color);
}

.admin-project h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  color: #1f2933;
}

.admin-project p,
.admin-empty {
  margin: 0;
  color: #607086;
}

.admin-project__status {
  display: inline-flex;
  width: fit-content;
  margin-top: 8px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.admin-project__status--visible {
  background: #e9f8ef;
  color: #17633a;
}

.admin-project__status--hidden {
  background: #fff0ed;
  color: #9b2116;
}

@media screen and (max-width: 860px) {
  .project-detail__hero,
  .admin-grid,
  .admin-form__row {
    grid-template-columns: 1fr;
  }

  .admin-header,
  .detail-header,
  .admin-card__header,
  .admin-gallery-item,
  .admin-project {
    grid-template-columns: 1fr;
  }

  .admin-header,
  .detail-header,
  .admin-card__header {
    display: grid;
  }

  .detail-header {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
  }

  .detail-back {
    min-width: 0;
  }

  .detail-back span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .admin-gallery-item img {
    width: 100%;
  }

  .project-detail__gallery-grid--desktop,
  .project-detail__gallery-grid--phone {
    grid-template-columns: 1fr;
  }

  .project-detail__gallery-item--phone {
    width: min(100%, 240px);
    justify-self: center;
  }
}

@media screen and (max-width: 420px) {
  .detail-header {
    grid-template-columns: minmax(0, 1fr) auto;
    justify-items: stretch;
    gap: 8px;
  }

  .detail-header .language-switcher__button {
    min-width: 1.45rem;
    height: 1.35rem;
    padding: 0 0.22rem;
    font-size: 0.6rem;
  }
}

.more-projects-btn:hover i.bx {
  transform: translateX(5px);
}

/* Responsive */
@media screen and (max-width: 768px) {
  .more-projects-btn {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    gap: 0.5rem;
  }

  .portfolio__more-projects {
    margin-top: 2rem;
    padding: 1.5rem 0;
  }
}
