/* Cyberpunk styles that are difficult to implement with Tailwind utility classes alone */

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

::-webkit-scrollbar-track {
  background-color: var(--tw-color-cp-black);
  border-left: 2px solid var(--tw-color-cp-blue);
}

::-webkit-scrollbar-thumb {
  background-color: var(--tw-color-cp-blue);
  border: 1px solid var(--tw-color-cp-yellow);
  box-shadow: 0 0 5px var(--tw-color-cp-blue);
  transition: all 0.3s;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--tw-color-cp-green);
  border-color: var(--tw-color-cp-yellow);
  box-shadow: 0 0 10px var(--tw-color-cp-green);
}

/* Selection styling */
::selection {
  background-color: var(--tw-color-cp-blue);
  color: var(--tw-color-cp-black);
  text-shadow: 0 0 5px var(--tw-color-cp-white);
}

/* Cyberpunk scanlines */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    rgba(0, 0, 0, 0.05) 1px,
    transparent 2px
  );
  background-size: 100% 3px;
  z-index: 100;
  pointer-events: none;
  opacity: 0.3;
  animation: flicker 0.3s infinite;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('https://cdn.jsdelivr.net/gh/gwannon/Cyberpunk-2077-theme-css/images/noise.png');
  background-repeat: repeat;
  background-size: 100px;
  opacity: 0.03;
  z-index: 99;
  pointer-events: none;
}

/* Link styles */
a {
  position: relative;
  transition: all 0.3s;
  display: inline-block;
  line-height: 1.2;
}

a:hover {
  text-shadow: 0 0 6px #00ffc8;
}

a:hover:after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

a:after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: #fcee0a;
  transform-origin: bottom right;
  transition: transform 0.3s;
  box-shadow: 0 0 6px #fcee0a;
}

/* Tailwind doesn't have built-in clip-path utilities, so we define them here */
.clip-path-nav {
  clip-path: polygon(0 0, 100% 0, 98% 100%, 2% 100%);
}

.clip-path-header {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%);
}

.clip-path-tag {
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.clip-path-button {
  clip-path: polygon(0 0, 100% 0, 95% 100%, 5% 100%);
}

/* Cyberpunk section styling */
.cyber-section {
  padding: 20px;
  margin-bottom: 25px;
  border-width: 1px;
  position: relative;
  transition: all 0.3s ease;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%);
  background-color: rgba(2, 2, 18, 0.8);
  backdrop-filter: blur(2px);
  opacity: 1;
}

@media (min-width: 640px) {
  .cyber-section {
    padding: 30px;
  }
}

.cyber-section::before {
  content: '';
  position: absolute;
  top: -5px;
  left: -5px;
  width: 20px;
  height: 20px;
  border-top: 2px solid;
  border-left: 2px solid;
  border-color: inherit;
  z-index: 1;
  animation: corner-pulse 2s infinite alternate;
}

.cyber-section::after {
  content: '';
  position: absolute;
  bottom: -5px;
  right: -5px;
  width: 20px;
  height: 20px;
  border-bottom: 2px solid;
  border-right: 2px solid;
  border-color: inherit;
  z-index: 1;
  animation: corner-pulse 2s infinite alternate;
}

.cyber-section:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Text shadow for headings */
.text-shadow-glow {
  text-shadow: 0 0 5px #fcee0a;
}

.text-shadow-cyberpunk {
  text-shadow: 
    5px 5px 0 #ff5555,
    -2px -2px 0 #1db5cd;
  -webkit-text-stroke: 1px #020212;
}

/* Underline for section headings */
.cp-underline {
  position: relative;
}

.cp-underline:after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 100%;
  height: 3px;
  background: currentColor;
}

.cp-underline:before {
  content: '';
  position: absolute;
  width: 30px;
  height: 2px;
  background-color: #fcee0a;
  right: -40px;
  top: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 5px #fcee0a;
}

/* Losange supprimé comme demandé */

/* Neon text effect */
.neon-text {
  animation: neon-flicker 1.5s infinite alternate;
  text-shadow: 
    0 0 5px #1db5cd, 
    0 0 10px #1db5cd, 
    0 0 15px #1db5cd, 
    0 0 20px #1db5cd;
  position: relative;
}

.neon-text::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(29, 181, 205, 0.1) 50%, 
    transparent 100%);
  animation: neon-sweep 2s linear infinite;
}

@keyframes neon-sweep {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes neon-flicker {
  0%, 19.999%, 22%, 62.999%, 64%, 64.999%, 70%, 100% {
    opacity: 1;
  }
  20%, 21.999%, 63%, 63.999%, 65%, 69.999% {
    opacity: 0.4;
  }
}

/* Cyberpunk list style */
.cyber-list {
  list-style: none;
  padding-left: 0;
}

.cyber-list li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 10px;
}

.cyber-list li:before {
  content: '>';
  position: absolute;
  left: 0;
  color: #fcee0a;
  font-weight: bold;
}

/* Cyberpunk progress bars */
.cyber-progress {
  height: 8px;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  margin: 8px 0 15px;
  position: relative;
  overflow: hidden;
  border-left: 2px solid #1db5cd;
  border-right: 2px solid #00ffc8;
}

.cyber-progress::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(90deg, 
    transparent,
    transparent 50%,
    rgba(255, 255, 255, 0.05) 50%,
    rgba(255, 255, 255, 0.05) 100%
  );
  background-size: 10px 100%;
  z-index: 1;
}

.progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background-image: linear-gradient(90deg, #1db5cd, #00ffc8);
  animation: progress-anim 1.5s forwards cubic-bezier(0.25, 0.1, 0.25, 1);
  z-index: 0;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 5px;
  background-color: #fcee0a;
  box-shadow: 0 0 8px #fcee0a;
}

.progress-label {
  position: absolute;
  right: 0;
  top: -18px;
  font-size: 10px;
  font-family: 'Cyberpunk', monospace;
  color: #fcee0a;
  z-index: 2;
}

@keyframes progress-anim {
  from { width: 0; }
  to { width: var(--percent); }
}

/* Animations */
@keyframes corner-pulse {
  0% {
    border-color: #1db5cd;
    box-shadow: 0 0 0px #1db5cd;
  }
  100% {
    border-color: #fcee0a;
    box-shadow: 0 0 5px #fcee0a;
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.7;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes flicker {
  0% { opacity: 0.1; }
  2% { opacity: 0.1; }
  4% { opacity: 0.2; }
  6% { opacity: 0.3; }
  8% { opacity: 0.1; }
  10% { opacity: 0.2; }
  12% { opacity: 0.0; }
  14% { opacity: 0.1; }
  16% { opacity: 0.3; }
  18% { opacity: 0.0; }
  20% { opacity: 0.1; }
  /* ... rest of the animation */
  100% { opacity: 0.1; }
}

/* Glitch effect */
.glitch {
  position: relative;
  overflow: hidden;
}

.glitch h1 {
  position: relative;
  z-index: 1;
}

.glitch h1:before,
.glitch h1:after {
  content: attr(data-glitch);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.8;
}

.glitch h1:before {
  color: #1db5cd;
  z-index: -1;
  animation: glitch-effect 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
  text-shadow: -2px 0 #00ffc8;
}

.glitch h1:after {
  color: #ff5555;
  z-index: -2;
  animation: glitch-effect 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) reverse both infinite;
  text-shadow: 2px 0 #fcee0a;
}

.glitch::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: linear-gradient(
    rgba(254, 239, 0, 0.2) 0%,
    rgba(0, 0, 0, 0) 10%,
    rgba(0, 0, 0, 0) 90%,
    rgba(254, 239, 0, 0.2) 100%
  );
  animation: scan 3s linear infinite;
  z-index: -3;
  pointer-events: none;
}

@keyframes scan {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(100%);
  }
}

@keyframes glitch-effect {
  0% {
    transform: translate(0);
  }
  20% {
    transform: translate(-3px, 3px);
  }
  40% {
    transform: translate(-3px, -3px);
  }
  60% {
    transform: translate(3px, 3px);
  }
  80% {
    transform: translate(3px, -3px);
  }
  100% {
    transform: translate(0);
  }
}

/* Navigation menu styling */
.active {
  color: #00ffc8;
  text-shadow: 0 0 8px #00ffc8;
  background-color: rgba(0, 235, 200, 0.1);
}

.active::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00ffc8, transparent);
  transform: scaleX(1);
}

.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0, 235, 200, 0.1), transparent);
  opacity: 1;
  z-index: -1;
}

/* Logo hover effects */
.logo::before {
  content: '<';
  position: absolute;
  left: -5px;
  top: 50%;
  transform: translateY(-50%);
  color: #1db5cd;
  font-size: 1.5rem;
  opacity: 0;
  transition: all 0.3s ease;
}

.logo::after {
  content: '/>';
  position: absolute;
  right: -15px;
  top: 50%;
  transform: translateY(-50%);
  color: #1db5cd;
  font-size: 1.5rem;
  opacity: 0;
  transition: all 0.3s ease;
}

.logo:hover {
  transform: scale(1.1);
  text-shadow: 0 0 15px #fcee0a, 0 0 30px #fcee0a;
}

.logo:hover::before,
.logo:hover::after {
  opacity: 0.8;
}

/* Remove underline from logo links */
.no-underline:after {
  display: none;
}

/* Download CV button */
.download-cv-btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid #fcee0a;
  color: #fcee0a;
  text-transform: uppercase;
  font-weight: bold;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
  clip-path: polygon(0 0, 100% 0, 92% 100%, 8% 100%);
}

.download-cv-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  transition: transform 0.3s;
}

.download-cv-btn:hover {
  background-color: rgba(254, 239, 0, 0.1);
  box-shadow: 0 0 15px rgba(254, 239, 0, 0.5);
  text-shadow: 0 0 5px #fcee0a;
  color: #e1e1e1;
}

.download-cv-btn:hover::before {
  transform: translateX(100%);
}

/* Menu item separators */
.menu li {
  position: relative;
}

.menu li:not(:last-child)::after {
  content: '|';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #1db5cd;
  opacity: 0.5;
  font-size: 1.2rem;
}

/* Menu hover effects */
.menu li a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00ffc8, transparent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.menu li a::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0, 235, 200, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.menu li a:hover::before {
  transform: scaleX(1);
}

.menu li a:hover::after {
  opacity: 1;
}

.menu li a:hover {
  color: #00ffc8;
  text-shadow: 0 0 8px #00ffc8;
}

/* Media queries */
@media (max-width: 768px) {
  .clip-path-nav {
    width: 95%;
    clip-path: polygon(0 0, 100% 0, 96% 100%, 4% 100%);
    margin: 0 auto 15px;
  }
}