@import url("line.css");
@import url("https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,500&display=swap");

@font-face {
  font-family: 'Fira_Code';
  src: url('../Font/Fira_Code/FiraCode-VariableFont_wght.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

:root {
  --shiny-cta-bg: #000000;
  --shiny-cta-bg-subtle: #2a2a2a;
  --shiny-cta-fg: #00ff00;
  --shiny-cta-highlight: #B87333;
  --shiny-cta-highlight-subtle: #D1A36C;
}

*,
::before,
::after {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  height: 100vh;
  font-family: 'Fira_Code', Arial, Helvetica, sans-serif;
}

/*-------------Animation du titre-------------*/
@property --gradient-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@property --gradient-angle-offset {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@property --gradient-percent {
  syntax: "<percentage>";
  initial-value: 5%;
  inherits: false;
}

@property --gradient-shine {
  syntax: "<color>";
  initial-value: #B87333; /* Cuivre principal */
  inherits: false;
}

.shiny-cta {
  grid-area: tl;
  height: 60px;
  align-self: start;
  --animation: gradient-angle linear infinite;
  --duration: 3s;
  --shadow-size: 2px;
  isolation: isolate;
  position: relative;
  overflow: hidden;
  /* cursor: pointer; */
  outline-offset: 4px;
  padding: 1.25rem 2.5rem;
  font-family: inherit;
  font-size: 1.125rem;
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: 360px;
  color: var(--shiny-cta-fg);
  background: linear-gradient(var(--shiny-cta-bg), var(--shiny-cta-bg))
      padding-box,
    conic-gradient(
      from calc(var(--gradient-angle) - var(--gradient-angle-offset)),
      transparent,
      var(--shiny-cta-highlight) var(--gradient-percent),
      var(--gradient-shine) calc(var(--gradient-percent) * 2),
      var(--shiny-cta-highlight) calc(var(--gradient-percent) * 3),
      transparent calc(var(--gradient-percent) * 4)
    )
      border-box;
  box-shadow: inset 0 0 0 1px var(--shiny-cta-bg-subtle);
  &::before,
  &::after,
  span::before {
    content: "";
    pointer-events: none;
    position: absolute;
    inset-inline-start: 50%;
    inset-block-start: 50%;
    translate: -50% -50%;
    z-index: 0;
  }
  &:active {
    translate: 0 1px;
  }
}

/* Dots pattern */
.shiny-cta::before {
  --size: calc(100% - var(--shadow-size) * 3);
  --position: 2px;
  --space: calc(var(--position) * 2);
  width: var(--size);
  height: var(--size);
  background: radial-gradient(
      circle at var(--position) var(--position),
      white calc(var(--position) / 4),
      transparent 0
    )
    padding-box;
  background-size: var(--space) var(--space);
  background-repeat: space;
  mask-image: conic-gradient(
    from calc(var(--gradient-angle) + 45deg),
    black,
    transparent 10% 90%,
    black
  );
  border-radius: inherit;
  opacity: 0.4;
  z-index: 0;
}

/* Inner shimmer */
.shiny-cta::after {
  --animation: shimmer linear infinite;
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(
    -50deg,
    transparent,
    var(--shiny-cta-highlight),
    transparent
  );
  mask-image: radial-gradient(circle at bottom, transparent 40%, black);
  opacity: 0.6;
}

.shiny-cta span {
  z-index: 2;
  &::before {
    --size: calc(100% + 1rem);
    width: var(--size);
    height: var(--size);
    box-shadow: inset 0 -1ex 2rem 4px var(--shiny-cta-highlight);
    opacity: 0;
  }
}

/* Animate */
.shiny-cta {
  --transition: 800ms cubic-bezier(0.25, 1, 0.5, 1);
  transition: var(--transition);
  transition-property: --gradient-angle-offset, --gradient-percent,
    --gradient-shine;
  &,
  &::before,
  &::after {
    animation: var(--animation) var(--duration),
      var(--animation) calc(var(--duration) / 0.4) reverse paused;
    animation-composition: add;
  }
  span::before {
    transition: opacity var(--transition);
    animation: calc(var(--duration) * 1.5) breathe linear infinite;
  }
}

.shiny-cta:is(:hover, :focus-visible) {
  --gradient-percent: 20%;
  --gradient-angle-offset: 95deg;
  --gradient-shine: #D1A36C; /* Cuivre plus clair */
  &,
  &::before,
  &::after {
    animation-play-state: running;
  }
  span::before {
    opacity: 1;
  }
}

@keyframes gradient-angle {
  to {
    --gradient-angle: 360deg;
  }
}

@keyframes shimmer {
  to {
    rotate: 360deg;
  }
}

@keyframes breathe {
  from,
  to {
    scale: 1;
  }
  50% {
    scale: 1.2;
  }
}

body {
  -webkit-font-smoothing: antialiased;
}
/*---------------------------------------------*/

/* Masquer la barre de défilement pour les navigateurs WebKit (Chrome, Safari) */
.modal-body::-webkit-scrollbar {
  display: none;
}

/* Masquer la barre de défilement pour Firefox */
.modal-body {
  scrollbar-width: none; /* Firefox */
}

/* Assurez-vous que le contenu est défilable */
.modal-body {
  overflow-y: scroll;
}

.bg-shadow {
  background: #2a2a2a;
  border: 2px solid #4a4a4a;
}
.bg-green {background: #006400;}
.green {color: #00ff00;}
.cuivre {color: #B87333;}

.hide {display: none;}

/* Transition pour le modal apparaissant depuis la gauche */
.modal.left .modal-dialog {
  position: fixed;
  margin-left: 100px;
  width: 100%;
  height: 300px;
  top: 50px;
  left: 0;
  transform: translateX(-100%);
  transition: transform 0.5s ease-out;
}
.modal.left .modal-content {
  height: 100%;
  overflow-y: auto;
}
.modal.left.show .modal-dialog {
  transform: translateX(0);
}
/*------------------------------------------------------------*/

/* Transition pour le modal apparaissant depuis la gauche2 */
.modal.left2 .modal-dialog {
  position: fixed;
  margin-left: 100px;
  width: 100%;
  height: 300px;
  bottom: 50px;
  left: 0;
  transform: translateX(-100%);
  transition: transform 0.5s ease-out;
}
.modal.left2 .modal-content {
  height: 100%;
  overflow-y: auto;
}
.modal.left2.show .modal-dialog {
  transform: translateX(0);
}
/*------------------------------------------------------------*/

/* Transition pour le modal apparaissant depuis le haut */
.modal.top .modal-dialog {
  position: fixed;
  margin-top: 50px;
  width: 100%;
  height: 300px;
  top: 0;
  right: 20%;
  transform: translateY(-100%);
  transition: transform 0.5s ease-out;
}
.modal.top .modal-content {
  height: 100%;
  overflow-y: auto;
}
.modal.top.show .modal-dialog {
  transform: translateY(0);
}

/*-------------------------------------------------------------------*/

/* Transition pour le modal apparaissant depuis la droite */
.modal.right .modal-dialog {
  position: fixed;
  margin-right: 100px;
  width: 100%;
  height: 300px;
  top: 40%;
  right: 0;
  transform: translateX(100%);
  transition: transform 0.5s ease-out;
}
.modal.right .modal-content {
  height: 100%;
  overflow-y: auto;
}
.modal.right.show .modal-dialog {
  transform: translateX(0);
}
/*------------------------------------------------------------*/

/* Transition pour le modal apparaissant depuis le bas */
.modal.bottom .modal-dialog {
  position: fixed;
  margin-bottom: 50px;
  width: 100%;
  height: 300px;
  bottom: 0;
  right: 20%;
  transform: translateY(100%);
  transition: transform 0.5s ease-out;
}
.modal.bottom .modal-content {
  height: 100%;
  overflow-y: auto;
}
.modal.bottom.show .modal-dialog {
  transform: translateY(0);
}

/*-------------------------------------------------------------------*/


/*--------------------------Modal middle--------------------------*/
.modal-dialog-centered{
  height: 90vh;
}

.modal-content {
  height: 300px;
}

.modal-title {height: 50px;}
/*-------------------------------------------------------------------*/

.motherboard {
  display: grid;
  grid-template-areas:
    "pre . . deb tl"
    ". . . . ."
    ". . cv . res"
    "tp . . cont .";
  gap: 20px;
  background-color: transparent;
  /* background-color: #1a1a1a; */
  padding: 40px;
  border-radius: 10px;
  /* box-shadow: 0 0 20px rgba(0, 255, 0, 0.2); */
  align-items: center;
  justify-items: end;
}

.presentation {
  grid-area: pre;
}
.debuts {
  grid-area: deb;
}
.cv {
  grid-area: cv;
}
.reseaux {
  grid-area: res;
}
.tp {
  grid-area: tp;
}
.contact {
  grid-area: cont;
}

.reseaux,
.contact {
  justify-self: start;
}

.chip {
  width: 170px;
  height: 170px;
  background-color: #2a2a2a;
  border: 2px solid #4a4a4a;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #00ff00;
  font-size: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.chip:hover {
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
  border-color: #00ff00;
}

.chip:hover::before {
  content: "";
  width: 60%;
  height: 5px;
  background-color: #00ff00;
  position: absolute;
  top: 10px;
}

.chip button {
  width: 100%;
  height: 100%;
}

.chip-label {
  margin-top: 70px;
}

.hidden {
  visibility: hidden;
  opacity: 0;
}

.visible {
  visibility: visible;
  opacity: 1;
}

#staticBackdropRight .modal-body,
#staticBackdropBottom .modal-body {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-around;
}

#staticBackdropRight .modal-body a,
#staticBackdropBottom .modal-body a {
  height: 100%;
}

#staticBackdropRight .modal-body img,
#staticBackdropBottom .modal-body img {
  width: 100%; 
  height: 100%; 
}

/*----------Responsive en portrait-----------*/

@media (max-width: 880px) and (orientation: portrait) {
  body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  }

  .motherboard {
    grid-template-areas:
      "tl tl tl"
      "pre . deb"
      "tp . cv"
      "res . cont"; 
      width: 100%;
      align-items: center;
      justify-items: center;
      gap: 0;
  }

  .shiny-cta {
    top: 0;
    left: 0;
    align-self: center;
  }

  #staticBackdropRight .modal-body a,
  #staticBackdropBottom .modal-body a {
    height: 70%;
    margin: 0 15px;
  }

  #staticBackdropRight .modal-body img,
  #staticBackdropBottom .modal-body img {
    width: 100%;
    height: 100%;
  }

  .reseaux,
.contact {
  justify-self: center;
}

/*-------Modals centrales à 800px-------*/
.modal-mobile .modal-dialog {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
  width: 90% !important;
  max-width: 400px !important;
}

.modal-mobile.left .modal-dialog,
.modal-mobile.left2 .modal-dialog,
.modal-mobile.right .modal-dialog,
.modal-mobile.top .modal-dialog,
.modal-mobile.bottom .modal-dialog {
  transform: translate(-50%, -50%) !important;
}
}
/*------------------------------------------*/

@media (max-width: 450px) and (orientation: portrait) {

  body {
    height: 100vh;
    width: 100vw;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  }

  .motherboard {
    height: 90%;
    width: 110%;
    align-self: start;
    justify-self: center;
    gap: 5px;
  }

  .shiny-cta {
    width: 220px;
  }  

  .fade {
    width: 100%;
    height: 100%;
  }

  .chip{
    width: 130px;
    height: 130px;
  }
 
  .chip button{
    font-size: small;
  }

  .fade {
    width: 100%;
    height: 100%;
  }

  #staticBackdropRight .modal-body a,
  #staticBackdropBottom .modal-body a {
    height: 50%;
  }
}

/*----------Responsive en paysage-----------*/

@media (max-width: 932px) and (orientation: landscape) {
  body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 85vh;
    margin: 0;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  }

  .motherboard {
    grid-template-areas:
      "tl tl tl"
      "pre cv deb"
      "tp res cont"; 
      width: 100%;
      align-items: center;
      justify-items: center;
      gap: 1;
  }

  .shiny-cta {
    top: 0;
    left: 0;
    align-self: center;
  }

  .chip {
    width: 115px;
    height: 115px;
  }

  #staticBackdropRight .modal-body a,
  #staticBackdropBottom .modal-body a {
    height: 70%;
    margin: 0 15px;
  }

  #staticBackdropRight .modal-body img,
  #staticBackdropBottom .modal-body img {
    width: 100%;
    height: 100%;
  }

  .reseaux,
.contact {
  justify-self: center;
}

/*-------Modals centrales à 932px en landscape-------*/
.modal-mobile .modal-dialog {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
  width: 90% !important;
  max-width: 400px !important;
}

.modal-mobile.left .modal-dialog,
.modal-mobile.left2 .modal-dialog,
.modal-mobile.right .modal-dialog,
.modal-mobile.top .modal-dialog,
.modal-mobile.bottom .modal-dialog {
  transform: translate(-50%, -50%) !important;
}
}