/* ===== RESPONSIVE STYLES ===== */

/* Menu mobile amélioré */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  z-index: 1000;
  margin-left: auto;
}

.menu-toggle div {
  width: 28px;
  height: 3px;
  background-color: #fff;
  margin: 4px 0;
  transition: all 0.3s ease;
}

/* Animation du menu burger */
.menu-toggle.active div:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.menu-toggle.active div:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active div:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* TABLETTES ET ÉCRANS MOYENS */
@media screen and (max-width: 1023px) {
  /* Header */
  header {
    padding: 15px 20px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    position: relative;
    background-color: rgb(14, 14, 14);
  }

  .logo img {
    height: 40px;
    width: auto;
  }

  /* Section Hero */
  .inner-header {
    padding: 60px 20px;
  }

  .main h2 {
    font-size: 1.5em;
  }

  .main h2 span {
    font-size: 1.7em;
  }

  .main h3 {
    font-size: 1.2em;
    margin-bottom: 20px;
  }

  .button-who {
  }

  /* Section Profile */
  .profile {
    padding: 60px 20px;
  }

  .section-title {
    font-size: 1.5em;
    margin-bottom: 20px;
  }

  .about-profile {
    flex-direction: column;
  }

  .text-profile {
    font-size: 1em;
    line-height: 1.6;
    margin-bottom: 30px;
  }

  /* Skills Section */
  .skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
  }

  .skills-category {
    margin-bottom: 30px;
  }

  .category-title {
    font-size: 1.3em;
    margin-bottom: 15px;
  }

  .skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .skill-item {
    font-size: 0.9em;
    padding: 8px 12px;
  }

  /* Projects Section */
  .filter-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
  }

  .filter-btn {
    font-size: 0.9em;
    padding: 8px 12px;
  }

  .content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
  }

  .project-card {
    height: auto;
  }

  .project-img img {
    height: 290px;
    object-fit: cover;
  }

  .project-text {
    font-size: 1em;
  }

  .cv_button {
    padding: 8px 15px;
    font-size: 0.9em;
  }

  /* Contact Section */
  .contact {
    padding: 60px 20px;
  }

  .background {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .screen {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
  }

  .map {
    display: flex;
    justify-content: center;
  }

  /* Footer */
  .footer {
    padding: 20px;
    text-align: center;
  }

  .footer-title {
    font-size: 0.9em;
    margin-bottom: 10px;
  }

  .ss-icons a {
    font-size: 1.2em;
    margin: 0 10px;
  }

  /* Button to top */
  #myBtn {
    right: 15px;
    bottom: 15px;
    width: 40px;
    height: 40px;
  }
}

/* MOBILE DEVICES */
@media screen and (max-width: 767px) {
  /* Menu mobile */
  header {
    padding: 12px 15px;
  }

  .menu-toggle {
    display: flex;
  }

  nav {
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
  }

  nav ul {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: rgba(18, 14, 14, 0.95);
    padding: 10px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  nav ul.active {
    display: flex;
  }

  nav ul li {
    margin: 10px 0;
  }

  nav ul li a {
    display: block;
    padding: 10px;
    font-size: 1.1em;
  }

  /* Hero Section */
  .inner-header {
    padding: 40px 15px;
  }

  .main h2 {
    font-size: 1.3em;
  }

  .main h2 span {
    font-size: 1.5em;
  }

  .main h3 {
    font-size: 1em;
  }

  /* Card social media */
  .card-social {
    margin-top: 20px;
  }

  /* Skills Section */
  .title-skills {
    flex-direction: column;
  }

  .title-skills h3 {
    font-size: 1em;
    line-height: 1.5;
    margin-bottom: 15px;
    text-align: center;
  }

  .title-skills img {
    width: 60px;
    margin: 0 auto;
  }

  .skills-container {
    grid-template-columns: 1fr;
  }

  .skills-category {
    margin-bottom: 25px;
  }

  .skill-item {
    flex: 0 0 calc(50% - 10px);
    text-align: center;
  }

  .skill-item img {
    width: 20px;
    height: auto;
  }

  /* Projects Section */
  .filter-btn {
    font-size: 0.8em;
    padding: 6px 10px;
  }

  .content {
    grid-template-columns: 1fr;
  }

  .project-card {
    max-width: 350px;
    margin: 0 auto;
  }

  .project-overlay .project-category {
    font-size: 0.8em;
    padding: 4px 8px;
  }

  .project-title {
    flex-direction: column;
    gap: 10px;
  }

  .icon-span {
    margin-bottom: 5px;
  }

  .cv_button {
    padding: 6px 12px;
    font-size: 0.8em;
  }

  /* Contact Section */
  .screen-body {
    flex-direction: column;
  }

  .screen-body-item.left {
    margin-bottom: 30px;
  }

  .app-title {
    font-size: 1.2em;
  }

  .app-contact {
    font-size: 0.9em;
  }

  iframe {
    width: 100%;
    height: 300px;
    border-radius: 8px;
  }
}

/* PETITS MOBILES */
@media screen and (max-width: 380px) {
  .main h2 {
    font-size: 1.1em;
  }

  .main h2 span {
    font-size: 1.3em;
  }

  .main h3 {
    font-size: 0.9em;
  }

  .button-who {
    padding: 8px 16px;
    font-size: 0.9em;
  }

  .section-title {
    font-size: 1.3em;
  }

  .text-profile {
    font-size: 0.9em;
  }

  .skill-item {
    font-size: 0.8em;
    padding: 6px 10px;
  }

  .project-img img {
    height: 290px;
  }

  .project-text {
    font-size: 0.9em;
  }

  iframe {
    height: 250px;
  }

  .footer-title {
    font-size: 0.8em;
  }
}

/* TABLETTES ET ÉCRANS MOYENS - Orientation paysage */
@media screen and (min-width: 768px) and (max-width: 1023px) {
  .content {
    grid-template-columns: repeat(2, 1fr);
  }

  .skills-container {
    grid-template-columns: repeat(3, 1fr);
  }

  .about-profile {
    flex-direction: row;
    align-items: center;
  }

  .text-profile {
    flex: 2;
    padding-right: 20px;
  }

  .profile-image {
    flex: 1;
  }

  .background {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

/* ÉCRANS LARGES */
@media screen and (min-width: 1400px) {
  .container-fluid {
    max-width: 1320px;
    margin: 0 auto;
  }

  .content {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Animation pour le menu mobile */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

nav.active ul {
  animation: fadeIn 0.3s ease forwards;
}
