:root {
  --primary-color: #177e89;
  --secondary-color: #cfe0c3;
  --third-color: #ef6013db;
  --fourth-color: #d4c2fc;
  --fifth-color: #8a7090;
  --sixth-color: #1f363d;
  --highlight: #ff1ead;
  --ecriture: #333;
  --fond: #e1e1e1;
}
*,
* :before,
*:after {
  box-sizing: border-box;
}
html,
body {
  font-family: "Manrope", sans-serif;
  background: url(/ressources/images/b4.png) fixed center center;
  margin: 0;
  padding: 0;
  height: auto;
  width: 100%;
  position: relative;
  color: var(--ecriture);
}
html {
  height: 100%;
  scroll-behavior: smooth;
  font-size: 100%;
}
h2 {
  font-size: clamp(0.4rem, 3vw + 1.9rem, 3.5rem);
  margin: 4rem 0 6rem 0;
  font-family: "Suranna", serif;
}
p {
  font-size: clamp(0.4rem, 1.5vw + 1.1rem, 1rem);
}

/* **********************************************        Nav Bar Burger    ********************************************** */

header {
  width: 100%;
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  z-index: 2;
  position: absolute;
  text-decoration: none;
}
header a {
  text-decoration: none;
  color: var(--primary-color);
}
header h2 {
  font-size: clamp(1.3rem, 2vw + 1rem, 1.8rem);
  margin: 0;
  position: absolute;
  top: 26px;
  left: 38px;
  font-weight: 400;
  line-height: 38px;
}
header .nav-title a {
  position: fixed;
  display: inline-block;
}
header .nav-title a:hover {
  color: #24afbe;
}
header .onglets {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0 2rem;
}
header .sous-onglets {
  display: none;
}
.sous-onglets a {
  font-size: clamp(0.6rem, 1vw + 0.7rem, 1rem);
  position: relative;
  display: inline-block;
  font-weight: 400;
  margin: 0 6px;
}
header .sous-onglets a::after {
  content: "";
  display: block;
  position: absolute;
  bottom: -2px;
  width: 100%;
  height: 1px;
  transform: scale(0);
  transform-origin: left;
  background-color: var(--primary-color);
  transition: transform 0.3s ease-out;
}
header .sous-onglets a:hover::after {
  transform: scaleX(1);
}
.sous-sous-onglets {
  display: none;
}
.header__burger {
  display: none;
}
.header__burger svg {
  stroke: var(--ecriture);
  width: 30px;
}
.header__nav__close {
  display: none;
}
.header__nav__close svg {
  stroke: var(--primary-color);
  width: 30px;
  position: absolute;
  top: 16px;
  left: 16px;
}

/* **********************************************        Side Bar        ********************************************** */

.side-bar {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  text-decoration: none;
}
.side-bar a {
  text-decoration: none;
  color: var(--primary-color);
  font-size: clamp(0.6rem, 1vw + 0.7rem, 1rem);
}
.side-bar .sous-onglets {
  display: flex;
  flex-direction: column;
  padding-left: 2rem;
}
.side-bar .sous-onglets a {
  margin: 10px 0;
  font-size: clamp(0.6rem, 1vw + 1.2rem, 1.3rem);
  font-weight: 400;
}
.side-bar .sous-onglets a:hover {
  color: #24afbe;
}
#so2 {
  font-weight: 600;
}
.side-bar .sous-sous-onglets a {
  margin: 6px 0px 6px 18px;
  font-size: clamp(0.1rem, 0.8vw + 0.7rem, 1rem);
}
.side-bar .sous-sous-onglets {
  display: flex;
  flex-direction: column;
}
.logos {
  display: flex;
  gap: 1rem;
  cursor: pointer;
  margin: 0.5rem 0;
}
.logos img {
  width: 20px;
  height: auto;
}
.logo1:hover {
  content: url("/ressources/rs/insta.png");
}
.logo2:hover {
  content: url("/ressources/rs/800px-Telegram_Messenger.png");
}
.logo3:hover {
  content: url("/ressources/rs/twitter.png");
}
.logo4:hover {
  content: url("/ressources/rs/github.png");
}
/* ********************************************       Dark mode       ********************************************* */
.darkmode-container {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0 20px 10px 0;
  z-index: 1;
}
.darkmode-container p {
  font-size: clamp(0.2rem, 0.8vw + 0.4rem, 1rem);
  color: var(--ecriture);
}
.theme-switch {
  width: 50px;
  height: 20px;
  background: #177e89;
  border-radius: 50px;
  position: relative;
  outline: 1px solid var(--ecriture);
  cursor: pointer;
}
.switch {
  width: 15px;
  height: 15px;
  background: var(--fond);
  border-radius: 100%;
  position: absolute;
  top: 2.8px;
  left: 4px;
  transition: 0.5s all ease;
}
body.dark {
  --ecriture: #d1d1d1;
  background: #333;
  --primary-color: #d1d1d1;
  --secondary-color: #1f363d;
}
body.dark .switch {
  transform: translateX(27px);
}

/* ********************************************        Section 1  Hero       ********************************************* */

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  background-color: rgba(0, 0, 0, 76%);
  display: none;
  z-index: 1;
}
.overlay.open {
  display: flex;
}
#grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 278px;
  gap: 20px;
  max-width: 820px;
  height: auto;
  margin: 0px auto;
  padding: 90px 0;
}

#grid :nth-child(4n + 1),
#grid :nth-child(4n + 4) {
  grid-column: span 2;
}
#nature-2 {
  border: solid 2px var(--ecriture);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.2rem, 2vw + 1rem, 2rem);
  cursor: default;
}
#nature-2 span {
  font-family: "Suranna", serif;
  color: var(--ecriture);
}
#nature-2:hover {
  transform: initial;
  box-shadow: initial;
  z-index: 1; /*bug correction */
  transform: initial;
  filter: initial;
}
.grid-item {
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s ease;
  position: relative;
}

.grid-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: all 1s ease;
  position: relative;
  opacity: 0;
  /* transition: opacity 0.3s ease; */
}
.grid-item p {
  position: absolute;
  z-index: 500;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  display: none;
  filter: brightness(0%);
}
.grid-item:hover {
  transform: scale(1.01);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
  z-index: 2; /*bug correction */
}

.grid-img:hover {
}

.grid-item:hover p {
  display: block;
  filter: none;
}

.gallery-image {
  height: 100%;
  min-width: 316px;
  overflow: hidden;
}

/* popup */

.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 83%;
  max-width: 1600px;
  height: 95vh;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 5;
  overflow: hidden;
  transition: 1s;
  opacity: 1;
}

.popup.active {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.popup.active .close-btn,
.popup.active .image-name,
.popup.active .index,
.popup.active .large-image,
.popup.active .arrow-btn {
  opacity: 1;
  transition: opacity 0.5s;
  transition-delay: 1s;
}

.top-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: #000;
  color: #fff;
  display: flex;
  font-weight: 300;
  align-content: center;
  justify-content: center;
  align-items: center;
}

.image-name {
  opacity: 1;
  font-size: 1.3rem;
}

#popup-close {
  position: absolute;
  top: 50%;
  right: 2%;
  transform: translate(50%, -50%);
  height: 40px;
  width: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 40px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#popup-close:hover {
  background-color: orange;
}
.arrow-btn {
  opacity: 0;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 10px;
  cursor: pointer;
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.47);
}

.left-arrow {
  left: 10px;
}

.right-arrow {
  right: 10px;
}

.arrow-btn:hover {
  color: white;
}
.output {
  font-size: clamp(0.6rem, 1vw + 0.8rem, 1.5rem);
  max-width: 70%;
  text-align: center;
}
.index {
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-size: 80px;
  font-weight: 100;
  color: rgba(255, 255, 255, 0.4);
  opacity: 0;
}

.large-image {
  margin-top: 2%;
  width: 100%;
  height: 85%;
  object-fit: contain;
  opacity: 0;
}
