@import url("https://fonts.googleapis.com/css2?family=Roboto+Condensed:ital,wght@0,100..900;1,100..900&display=swap");

:root {
  --primary: #9e9e9e;
  --secondary: #f0f0f3;
  --primary-hover: #7a7a7a;
  --shadow-main: rgba(174, 174, 192, 0.4);
  --shadow-hover: rgba(174, 174, 192, 0.5);
  --shadow-strong: rgba(174, 174, 192, 0.6);
  --shadow-highlight: rgba(255, 255, 255, 1);
  --shadow-inset: rgba(174, 174, 192, 0.3);
  --shadow-inset-strong: rgba(174, 174, 192, 0.4);
  --shadow-inset-hover: rgba(174, 174, 192, 0.35);
  --shadow-inset-focus: rgba(174, 174, 192, 0.4);
  --shadow-inset-highlight: rgba(255, 255, 255, 0.8);
  --shadow-inset-highlight-strong: rgba(255, 255, 255, 0.9);
  --shadow-inset-highlight-hover: rgba(255, 255, 255, 0.85);
  --error-color: #e74c3c;
  --tooltip-bg: #333;
  --tooltip-text: #fff;
  --overlay-bg: rgba(0, 0, 0, 0.5);
  --ripple-effect: rgba(174, 174, 192, 0.2);
}

[data-theme="dark"] {
  --primary: #d5d5d5;
  --secondary: #2a2a2e;
  --primary-hover: #5a5a5a;
  --shadow-main: rgba(0, 0, 0, 0.5);
  --shadow-hover: rgba(0, 0, 0, 0.6);
  --shadow-strong: rgba(0, 0, 0, 0.7);
  --shadow-highlight: rgba(80, 80, 80, 0.8);
  --shadow-inset: rgba(0, 0, 0, 0.4);
  --shadow-inset-strong: rgba(0, 0, 0, 0.5);
  --shadow-inset-hover: rgba(0, 0, 0, 0.45);
  --shadow-inset-focus: rgba(0, 0, 0, 0.5);
  --shadow-inset-highlight: rgba(80, 80, 80, 0.6);
  --shadow-inset-highlight-strong: rgba(80, 80, 80, 0.7);
  --shadow-inset-highlight-hover: rgba(80, 80, 80, 0.65);
  --error-color: #ff6b6b;
  --tooltip-bg: #1a1a1a;
  --tooltip-text: #e0e0e0;
  --overlay-bg: rgba(0, 0, 0, 0.7);
  --ripple-effect: rgba(80, 80, 80, 0.3);
}

* {
  font-family: "Roboto Condensed", sans-serif;
}

/* Container principal du header avec largeur max */
header {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem;
}

.contener_header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  background-color: var(--secondary);
  padding: 1rem 1.5rem;
  border-radius: 15px;
  box-shadow: 10px 10px 30px var(--shadow-main),
    -10px -10px 30px var(--shadow-highlight);
  transition: all 0.3s ease;
}

.contener_header:hover {
  box-shadow: 15px 15px 40px var(--shadow-hover),
    -15px -15px 40px var(--shadow-highlight);
}

/* Format de l'image avec animation */
.img_header {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--primary);
  box-shadow: 10px 10px 30px var(--shadow-main),
    -10px -10px 30px var(--shadow-highlight);
  transition: all 0.4s ease;
}

.img_header:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 15px 15px 40px var(--shadow-strong),
    -15px -15px 40px var(--shadow-highlight);
  border-color: var(--primary-hover);
}

/* telechargement cv  */
.telechargementCV {
  text-decoration: none;
}

/* Animation soulignement header title */
.texteH {
  flex: 1;
  text-align: center;
  color: var(--primary);
  max-width: 500px;
}

.titreheader {
  position: relative;
  font-size: 2.5rem;
  margin: 0;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: all 0.3s ease;
  cursor: default;
}

.titreheader:hover {
  text-decoration-color: currentColor;
  transform: scale(1.05);
  color: var(--primary-hover);
}

/* message pour telecharger mon cv */
.headertips {
  position: relative;
  cursor: pointer;
}

.headertips::after {
  content: attr(
    data-tooltip
  ); /* Récupère le texte de l'attribut data-tooltip */
  position: absolute;
  bottom: 125%; /* Positionne l'infobulle au-dessus du texte */
  left: 50%;
  transform: translateX(-50%); /* Centre l'infobulle horizontalement */

  /* Apparence de l'infobulle */
  background-color: var(--tooltip-bg);
  color: var(--tooltip-text);
  padding: 8px 12px;
  border-radius: 5px;
  white-space: nowrap; /* Empêche le texte de l'infobulle de revenir à la ligne */
  font-size: 14px;

  /* Effets de transition pour une apparition douce */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 1;
}

.headertips::before {
  content: "";
  position: absolute;
  bottom: 75%; /* Positionne la flèche juste en dessous de l'infobulle */
  left: 50%;
  transform: translateX(-50%);

  /* Création de la flèche avec les bordures */
  border-width: 5px;
  border-style: solid;
  border-color: var(--tooltip-bg) transparent transparent transparent;

  /* Effets de transition identiques à l'infobulle */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 1;
}

.headertips:hover::after,
.headertips:hover::before {
  opacity: 1;
  visibility: visible;
}

/* Container des boutons */
.boutton_header {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  padding: 1rem;
  background-color: var(--secondary);
  box-shadow: 10px 10px 30px var(--shadow-main),
    -10px -10px 30px var(--shadow-highlight);
  border-radius: 20px;
  transition: all 0.3s ease;
}

.boutton_header:hover {
  box-shadow: 15px 15px 40px var(--shadow-hover),
    -15px -15px 40px var(--shadow-highlight);
}

/* Animation des boutons */
.btn-header {
  font-family: "Roboto Condensed", sans-serif;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  height: 3.5rem;
  min-width: 5rem;
  padding: 0 1.5rem;
  background-color: var(--secondary);
  color: var(--primary);
  border: none;
  border-radius: 15px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-header::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: var(--ripple-effect);
  transform: translate(-50%, -50%);
  transition: width 0.5s, height 0.5s;
}

.btn-header:hover::before {
  width: 300px;
  height: 300px;
}

.btn-header:hover {
  box-shadow: 10px 10px 30px var(--shadow-main),
    -10px -10px 30px var(--shadow-highlight);
  transform: translateY(-3px);
  color: var(--primary-hover);
}

.btn-header:active {
  transform: translateY(0);
  box-shadow: inset 5px 5px 10px var(--shadow-inset-strong),
    inset -5px -5px 10px var(--shadow-highlight);
}

/* Burger Menu */
.burger-menu {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  padding: 10px;
  background-color: var(--secondary);
  border-radius: 10px;
  box-shadow: 10px 10px 30px var(--shadow-main),
    -10px -10px 30px var(--shadow-highlight);
  transition: all 0.3s ease;
}

.burger-menu:hover {
  box-shadow: 15px 15px 40px var(--shadow-hover),
    -15px -15px 40px var(--shadow-highlight);
  transform: scale(1.05);
}

.burger-line {
  width: 30px;
  height: 3px;
  background-color: var(--primary);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.burger-menu.active .burger-line:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.burger-menu.active .burger-line:nth-child(2) {
  opacity: 0;
}

.burger-menu.active .burger-line:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

/* boutton dark theme */

.theme-toggle {
  background: var(--secondary);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 6px 6px 12px var(--shadow-main),
    -6px -6px 12px var(--shadow-highlight);
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  box-shadow: 8px 8px 16px var(--shadow-hover),
    -8px -8px 16px var(--shadow-highlight);
  transform: scale(1.05);
}

.theme-toggle:active {
  box-shadow: inset 4px 4px 8px var(--shadow-inset),
    inset -4px -4px 8px var(--shadow-inset-highlight);
}

.theme-toggle svg {
  width: 24px;
  height: 24px;
  fill: var(--primary);
  transition: all 0.3s ease;
}

/* Animation de rotation lors du changement */
.theme-toggle.rotating {
  animation: rotate 0.5s ease;
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .contener_header {
    flex-wrap: wrap;
    justify-content: center;
  }

  .texteH {
    order: -1;
    flex: 1 1 100%;
  }
}

@media (max-width: 768px) {
  .titreheader {
    font-size: 2rem;
  }

  .img_header {
    width: 80px;
    height: 80px;
  }

  .burger-menu {
    display: flex;
  }

  .boutton_header {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 70%;
    max-width: 300px;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 80px;
    gap: 1rem;
    z-index: 999;
    transition: right 0.4s ease;
  }

  .boutton_header.active {
    right: 0;
  }

  .btn-header {
    width: 80%;
    height: 3.5rem;
    font-size: 1.1rem;
    margin: 0 auto;
  }

  /* Overlay pour fermer le menu */
  .menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--overlay-bg);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.4s ease;
  }

  .menu-overlay.active {
    display: block;
    opacity: 1;
  }
}
