@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #0a0a0a;
    --secondary-color: #f0f0f0;
    --accent-color: #f5003d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    line-height: 1.6;
    overflow-x: hidden;
}


.cursor, .cursor-follower {
    display: block; /* Réactivation du curseur */
}

/* Curseur personnalisé (activé sur écrans plus grands) */
@media (min-width: 769px) { /* Activé seulement sur écrans plus grands */
    .cursor {
        width: 20px;
        height: 20px;
        border: 2px solid var(--accent-color);
        border-radius: 50%;
        position: fixed;
        pointer-events: none;
        transition: 0.1s;
        z-index: 9999;
    }

    .cursor-follower {
        width: 8px;
        height: 8px;
        background-color: var(--accent-color);
        border-radius: 50%;
        position: fixed;
        pointer-events: none;
        transition: 0.15s;
        z-index: 9999;
    }
}

/* Header */
header {
    position: fixed;
    width: 100%;
    padding: 1rem;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
   
}

.logo-container {
    display: flex;
    align-items: center;
}

.fennec-logo {
    width: 80px; /* Réduction de la taille du logo sur mobile */
    height: auto;
    margin-right: 0.5rem; /* Réduction de la marge */
}

/* Menu burger */
.menu-wrapper {
    position: fixed;
    top: 20px;
    right: 20px;
    font-family: "bebas neue", sans-serif;
    
    font-weight: 400;
   
}

#menu-toggle {
    display: none;
}

.menu-button {
    display: block;
    width: 30px;
    height: 30px;
    position: relative;
    z-index: 2;
    cursor: pointer;
}

.menu-button span {
    display: block;
    width: 100%;
    height: 2px;
    margin-bottom: 5px;
    position: relative;
    background: #ff0000;
    border-radius: 3px;
    z-index: 1;
    transform-origin: 4px 0px;
    transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0),
                background 0.5s cubic-bezier(0.77,0.2,0.05,1.0),
                opacity 0.55s ease;
}

.menu-button span:first-child {
    transform-origin: 0% 0%;
}

.menu-button span:nth-last-child(2) {
    transform-origin: 0% 100%;
}

#menu-toggle:checked + .menu-button span {
    opacity: 1;
    transform: rotate(45deg) translate(0px, 0px);
    background: #ffffff;
}

#menu-toggle:checked + .menu-button span:nth-last-child(3) {
    opacity: 0;
    transform: rotate(0deg) scale(0.2, 0.2);
}

#menu-toggle:checked + .menu-button span:nth-last-child(2) {
    transform: rotate(-45deg) translate(0, -1px);
}

.menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    padding: 50px 0;
    background: rgba(0, 0, 0, 0.8);
    list-style-type: none;
    -webkit-font-smoothing: antialiased;
    transform-origin: 0% 0%;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0);
    font-size: 2rem;
}

.menu a {
    display: block;
    padding: 10px 20px;
    color: #ff0000;
    text-decoration: none;
    transition: color 0.3s ease;
}

.menu a:hover {
    color: #ffffff;
}

#menu-toggle:checked + .menu-button + .menu {
    transform: translateX(0);
    right: 0;
}

/* Ajustements du menu pour les petits écrans */
@media (max-width: 768px) {
    .menu {
        width: 100%;
        height: 100vh;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .menu a {
        font-size: 1.5rem;
        padding: 15px;
        display: block;
    }
}


    .menu-button {
        width: 35px; /* Ajustement de la taille du bouton burger */
        height: 25px;
    }

    .menu-button span {
        height: 3px; /* Ajustement de l'épaisseur des barres */
    }


/* Sections */
section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

/* Hero Section */
.hero {
    flex-direction: column;
    text-align: center;
}

.glitch {
    font-size: 3rem; /* Réduction de la taille du titre sur mobile */
    font-weight: 700;
    text-transform: uppercase;
    position: relative;
    color: var(--secondary-color);
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--accent-color);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--secondary-color);
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 7s infinite linear alternate-reverse;
    
}


@keyframes glitch-anim {
    0% { clip: rect(16px, 9999px, 78px, 0); }
    20% { clip: rect(44px, 9999px, 39px, 0); }
    40% { clip: rect(10px, 9999px, 81px, 0); }
    60% { clip: rect(79px, 9999px, 32px, 0); }
    80% { clip: rect(37px, 9999px, 98px, 0); }
    100% { clip: rect(61px, 9999px, 11px, 0); }
}



.projects {
  padding: 2rem 5%;
  background-color: #0a0a0a;
  display: flex;
  flex-direction: column;
  align-items: center; /* Centre horizontalement les éléments */
  text-align: center; /* Centre le texte */
}

.projects-title {
    font-size: 2.5rem; /* Réduction de la taille du titre sur mobile */
    text-align: center;
    font-weight: bold;
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 3rem; /* Réduction de l'espacement */
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem; /* Réduction de l'espacement */
}

.project-card {
    background-color: #2c2c2c;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.833);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px); /* Réduction de l'effet au survol sur mobile */
}

.project-image {
    position: relative;
    border-radius: 5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  filter: grayscale(100%);
  transition: filter 0.3s ease; 
  cursor: pointer; 
}
.project-image:hover {
    filter: grayscale(0%);
}
.project-image img {
    width: 100%;
    height: auto;
    display: block;
}

.project-links {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-links {
    opacity: 1;
}

.project-detail {
    padding: 0.5rem 1rem;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
}

.project-detail:hover {
    background-color: rgba(0, 0, 0, 0.9);
}

.project-info {
    padding: 1rem;
}

.project-info h3 {
    font-size: 1.2rem; /* Réduction de la taille du titre du projet sur mobile */
    margin-bottom: 0.5rem; /* Réduction de l'espacement */
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tags span {
    background-color: #ff0000;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-size: 0.8rem; /* Réduction de la taille des tags */
}

/* Style du conteneur du bouton "En savoir plus" */
.more-project-button {
  margin-top: 2rem; /* Ajoute un espace au-dessus du bouton */
  text-align: center; /* Important pour centrer le bouton */
  width: 100%; /* Permet au bouton de prendre toute la largeur */
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem; /* Taille du bouton */
  font-size: 1.1rem; /* Taille de la police */
  background-color: var(--accent-color);
  color: var(--secondary-color);
  text-decoration: none;
  border-radius: 5px;
  transition: 0.3s;
}

.btn:hover {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}


/* Section À propos */
.about {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  background-color: #0a0a0a;
  gap: 30px;
  margin: 0 auto;
  max-width: 1200px;
  overflow-x: hidden; /* Empêche le défilement horizontal */
}

.about h2 {
  margin-bottom: 1rem;
  font-size: 1.75rem;
  color: var(--secondary-color);
}

.about-image {
  width: 350px;
  height: 350px;
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid transparent;
  transition: transform 0.4s ease, border-color 0.4s ease;
  margin-bottom: 0.5rem;
  position: relative; /* Ajout pour le positionnement de l'effet de survol */
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease-in-out;
}

.about-image:hover {
  transform: scale(1.05);
  border-color: #ff0000;
}

.about-image::before {
  content: "";
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 0, 0, 0.986) 0%, rgba(255,102,0,0) 70%);
  z-index: -1;
  transition: opacity 0.4s ease;
  opacity: 0;
  pointer-events: none; /* Empêche l'interaction avec cet élément */
}

.about-image:hover::before {
  opacity: 1;
}

.about-content {
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
}

.about-content p {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--secondary-color);
    width: 100%;
    max-width: 680px;
    padding: 0 1rem;
  
    
    white-space: normal; 
  

    overflow: visible; 
  
    
    animation: typing-text 5.5s steps(40, end) forwards;
  }
  
 
  @keyframes typing-text {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
  

/* Media Queries pour les écrans plus larges */
@media (min-width: 768px) {
  .about {
      flex-direction: row;
      text-align: left;
      gap: 50px;
  }

  .about-image {
      width: 250px;
      height: 250px;
      flex-shrink: 0; /* Empêche l'image de rétrécir */
  }

  .about-content {
      flex-grow: 1; /* Permet au contenu de prendre l'espace restant */
  }

  .about-content p {
      text-align: left;
      padding: 0;
  }
}

/* Compétences */
.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.skill {
    padding: 0.3rem 0.6rem;
    background-color: var(--accent-color);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 600;
}



/* Footer */
footer {
    text-align: center;
    padding: 0.5rem; /* Réduction du padding */
    background-color: var(--primary-color);
    font-size: 0.8rem; /* Réduction de la taille de la police */
}

/* Media Queries pour les écrans plus larges */
@media (min-width: 768px) {
    /* Général */
    section {
        padding: 3rem;
    }

    /* Hero */
    .glitch {
        font-size: 4rem;
    }

    .subtitle {
        font-size: 1.5rem;
    }

    /* Projets */
    .projects-title {
        font-size: 3rem;
        margin-bottom: 5rem;
    }

    .projects-grid {
        gap: 2rem;
    }

    .project-info h3 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .project-tags span {
        font-size: 0.9rem;
    }

   
    /* Footer */
    footer {
        display: flex;
        gap: 1rem;
        padding: 1rem;
        justify-content: center;
        align-items: center;
        font-size: 0.9rem;
    }
}

@media (min-width: 1024px) {
    /* Général */
    section {
        padding: 4rem;
    }

    /* Hero */
    .glitch {
        font-size: 7rem;
    }

    .subtitle {
        font-size: 1.8rem;
    }

    /* Projets */
    .projects-title {
        font-size: 3.5rem;
        margin-bottom: 7rem;
    }

    .projects-grid {
        gap: 2.5rem;
    }

    .project-info h3 {
        font-size: 1.7rem;
        margin-bottom: 1.2rem;
    }

    .project-tags span {
        font-size: 1rem;
    }

    /* À propos */
    .about {
        gap: 100px;
        padding: 4rem;
    }

    .about h2 {
        font-size: 2.5rem;
        margin-bottom: 2rem;
    }

    .about-image {
        width: 250px;
        height: 250px;
        margin-bottom: 1.5rem;
    }

    .about-content p {
        font-size: 1.1rem;
        line-height: 1.7;
    }
}

/* Animations */
@keyframes fennec-wiggle {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    75% { transform: rotate(-5deg); }
    100% { transform: rotate(0deg); }
}
@media (max-width: 768px) {
    .project-image {
        filter: none; /* Suppression du grayscale */
        transition: transform 0.3s ease-in-out;
    }

    .project-card:active .project-image {
        transform: scale(1.08); /* Zoom léger au toucher sur mobile */
    }
}
.fennec-logo:hover {
    animation: fennec-wiggle 0.5s ease-in-out;
}

/* QR Code Styles */
.qr-container {
    position: relative;
    display: inline-block;
    text-align: center;
}

/* QR Code */
.qr-code {
    width: 200px; /* Réduit la taille du QR code */
    height: auto;
    display: block;
    transition: transform 0.4s ease-in-out;
}

.qr-code:hover {
    transform: scale(1.1);
}

/* Message pop-up sur le côté */
.qr-message {
    position: absolute;
    top: 50%;
    left: 100%; /* Place le message à droite du QR code */
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 10px; /* Réduit le padding */
    border-radius: 4px; /* Réduit le border-radius */
    font-size: 12px; /* Réduit la taille de la police */
    font-weight: bold;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

/* Affichage du message au survol */
.qr-container:hover .qr-message {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(10px);
}


.cv-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px; /* Espace entre l'icône et le texte */
  background-color: #ffffff; /* Bleu dynamique */
  color: #fff; /* Texte blanc */
  padding: 10px 15px;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.2s;
}

.cv-download:hover {
  background-color: #ff0000; /* Bleu plus foncé au survol */
  transform: scale(1.05);
}

.cv-download::before {
  content: "📥"; /* Icône de téléchargement */
  font-size: 1.2em;
}


.typed-text {
    overflow: hidden;
    white-space: nowrap;
    border-right: 0.15em solid #000;
    width: 0;
    animation: typing 8.5s steps(30, end) forwards,
               blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: #000 }
}

/* Media query pour les écrans plus petits */
@media (max-width: 768px) {
    .typed-text {
        font-size: 1rem; /* Ajustez la taille de la police pour les petits écrans */
        animation: typing-small 3s steps(20, end) forwards,
                   blink-caret 0.75s step-end infinite;
    }

    @keyframes typing-small {
        from { width: 0 }
        to { width: 100% }
    }
}

/* Media query pour les écrans encore plus petits */
@media (max-width: 480px) {
    .typed-text {
        font-size: 0.8rem; /* Ajustez la taille de la police pour les très petits écrans */
        animation: typing-smallest 2.5s steps(15, end) forwards,
                   blink-caret 0.75s step-end infinite;
    }

    @keyframes typing-smallest {
        from { width: 0 }
        to { width: 100% }
    }
}

.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #00000071;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeOut 1.5s forwards;
}

.spinner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.spinner-container img {
    max-width: 200px;
    animation: pulse 1.5s infinite alternate;
}

.bar-loader {
    display: flex;
    align-items: center;
}

.bar-loader .bar {
    display: inline-block;
    width: 3px;
    height: 20px;
    background-color: rgba(255, 255, 255, .5);
    border-radius: 10px;
    animation: scale-up4 1s linear infinite;
}

.bar-loader .bar:nth-child(2) {
    height: 35px;
    margin: 0 5px;
    animation-delay: .25s;
}

.bar-loader .bar:nth-child(3) {
    animation-delay: .5s;
}

@keyframes scale-up4 {
    20% {
        background-color: #ffff;
        transform: scaleY(1.5);
    }
    40% {
        transform: scaleY(1);
    }
}

@keyframes pulse {
    from { transform: scale(0.9); }
    to { transform: scale(1.1); }
}

@keyframes fadeOut {
    0% { opacity: 1; visibility: visible; }
    90% { opacity: 1; visibility: visible; }
    100% { opacity: 0; visibility: hidden; }
}