:root {
  --bg: #252525;
  --text: #e8e4dc;
  --dark: #171717;
  --light: #c3c2bf;
  --secondary: #636363;
  --tiersery: #464646;
  --muted: #444;
  --accent: #4364a8d8;
  --size: 200px;
  --gap: 28px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.icon {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: "liga";
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

body > header nav .icon,
body > footer nav .icon {
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 18px;
  background-color: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dashed var(--text);
}

.button {
  display: inline-block;
  border: 1px solid var(--secondary);
  border-radius: 8px;
  padding: 8px 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--secondary);
}

header {
  width: 100%;
  max-width: 1200px;
}
header nav {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  margin-top: 32px;
  padding: 0 20px;
  box-sizing: border-box;
  position: relative;
}
header nav .brand a {
  border: 0;
}
header nav .brand a img {
  width: 220px;
}
header nav .menu-toggle {
  display: none;
}
header nav .menu-button {
  display: none;
  cursor: pointer;
}
header nav .menu-button .close {
  display: none;
}
header nav ul {
  flex-grow: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  list-style: none;
  gap: 24px;
  font-size: 18px;
}
header nav ul li a {
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 0;
}
header nav ul .separator {
  flex-grow: 1;
}
header nav ul .ctas {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
header nav ul .ctas a {
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
header nav ul .ctas .cta {
  border: 1px solid var(--secondary);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  margin-right: 4px;
}
@media (max-width: 920px) {
  header nav {
    padding: 0 20px;
    box-sizing: border-box;
  }
  header nav .brand img {
    width: 220px;
  }
  header nav .menu-button {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  header nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    align-items: flex-end;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg);
    padding: 0 0 48px 0;
    z-index: 10;
    border-bottom: 1px solid var(--secondary);
  }
  header nav ul li {
    margin-right: 32px;
  }
  header nav .menu-toggle:checked ~ ul {
    display: flex;
  }
  header nav .menu-toggle:checked ~ .menu-button .open {
    display: none;
  }
  header nav .menu-toggle:checked ~ .menu-button .close {
    display: block;
  }
}

footer {
  padding-bottom: 96px;
  padding-top: 64px;
  background-color: var(--dark);
}
footer nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  gap: 24px;
  margin-bottom: 32px;
}
footer nav ul {
  display: flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  flex-wrap: wrap;
  gap: 24px;
  margin: 0;
  padding: 0;
}
footer nav .ctas {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
footer nav .ctas a {
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
footer nav .ctas .cta {
  border: 1px solid var(--secondary);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  margin-right: 4px;
}
footer nav .brand {
  margin: 0;
}
footer nav .brand a {
  display: flex;
}
footer nav .brand a img {
  width: 50px;
}
footer nav a {
  color: var(--text);
  text-decoration: none;
  border: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}
footer p {
  letter-spacing: 2px;
  line-height: 2rem;
}
footer .contribute {
  margin-top: 24px;
  font-size: 14px;
  padding: 4px 16px;
  border-radius: 99px;
  background-color: var(--light);
  color: var(--bg);
  font-weight: 800;
}

/* Carousel Logic */
.carousel-container {
  width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory; /* Enables the "snap" effect */
  scrollbar-width: none; /* Hides scrollbar on Firefox */
  -ms-overflow-style: none; /* Hides scrollbar on IE/Edge */
  -webkit-overflow-scrolling: touch; /* Smooth momentum scrolling on iOS */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.carousel-container::-webkit-scrollbar {
  display: none;
}

.carousel-list {
  display: flex;
  justify-content: center;
  width: max-content;
  min-width: 100%;
  list-style: none;
  padding: 0;
  margin: 0;
}

.carousel-list li {
  flex: 0 0 auto;
  scroll-snap-align: start; /* Snaps the item to the start of the view */
  padding: 0 10px;
  box-sizing: border-box;
}

/* Desktop adjustment */
.carousel-list img {
  width: 100%;
  height: auto;
  display: block;
}

.page-index {
  background-size: cover;
  background-position: center;
}
.page-index main {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
}
.page-index main section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 0;
}
.page-index main section > * {
  width: 100%;
  max-width: 1100px;
}
.page-index main .featured .carousel-container {
  max-width: none;
}
.page-index main .featured ul {
  display: flex;
  margin: 0;
  padding: 0;
}
.page-index main .featured ul li {
  margin: 0;
  padding: 0;
}
.page-index main .featured ul li figure {
  margin: 0;
  padding: 12px;
}
.page-index main .featured ul li figure img {
  border: 1px solid var(--secondary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  max-width: 280px;
  aspect-ratio: 1/1;
  object-fit: cover;
}
.page-index main .featured ul li figure figcaption {
  margin-top: 12px;
}
.page-index main .featured ul li figure figcaption a {
  color: var(--text);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  border: 0;
}
.page-index main .featured ul li figure figcaption a span {
  color: var(--light);
}
.page-index main .services {
  background-color: var(--tiersery);
  padding: 96px 0;
}
.page-index main .services > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  align-items: stretch;
  gap: 32px;
  max-width: 900px;
}
.page-index main .services > div .details {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.page-index main .services > div .details ul {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  list-style: none;
  gap: 24px;
  margin: 0;
  padding: 0;
}
.page-index main .services > div .details ul li {
  font-size: 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 0;
  padding: 0;
}
.page-index main .services > div .details ul li i {
  font-size: 28px;
}
.page-index main .services > div .demande {
  margin: 0 20px;
}
.page-index main .services > div .demande p {
  margin: 0 0 12px 0;
}
.page-index main .services > div .demande {
  display: flex;
  border: 1px dotted var(--bg);
  background-color: var(--secondary);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);
  padding: 24px 32px;
  max-width: 305px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.8em;
  letter-spacing: 1px;
  gap: 16px;
}
.page-index main .services > div .demande .cta {
  border: 1px solid var(--text);
  border-radius: 8px;
  padding: 4px 16px;
  font-size: 14px;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 18px;
  color: var(--text);
}
@media (max-width: 920px) {
  .page-index main .services > div {
    flex-direction: column;
    align-items: center;
    gap: 84px;
  }
  .page-index main .services > div ul li {
    padding: 0 32px !important;
  }
  .page-index main .services > div .demande {
    max-width: 450px;
  }
}
.page-index main .samples {
  background-color: var(--text);
  padding: 96px 0 84px 0;
}
.page-index main .samples > div {
  max-width: 800px;
}
.page-index main .samples > div iframe {
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);
}
.page-index main .media {
  background-color: var(--bg);
}
.page-index main .media .gallery {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 920px) {
  .page-index main .media .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .page-index main .media .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

.page-projets main {
  width: 100%;
  max-width: 1100px;
  padding: 64px 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.page-projets .portfolio {
  width: 100%;
}
.page-projets .portfolio h3 {
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 48px 0 24px 0;
  color: var(--light);
  font-size: 1rem;
}
.page-projets .portfolio ul {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.page-projets .portfolio ul li {
  border-radius: 4px;
  overflow: hidden;
}
.page-projets .portfolio ul li figure {
  margin: 0;
  aspect-ratio: 1/1;
  overflow: hidden;
  border: 1px solid var(--secondary);
}
.page-projets .portfolio ul li figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.page-projets .portfolio ul li figure {
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);
}
.page-projets .portfolio ul li .description {
  padding-top: 12px;
}
.page-projets .portfolio ul li .description h2 {
  font-size: 1.1rem;
  margin: 0 0 10px 0;
}
.page-projets .portfolio ul li .description h2 a {
  border: 0;
}
.page-projets .portfolio ul li .description p {
  font-size: 0.9rem;
  color: var(--light);
  margin: 0;
  line-height: 1.5;
}
@media (max-width: 920px) {
  .page-projets .portfolio ul {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .page-projets .portfolio ul {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .page-projets .portfolio ul {
    grid-template-columns: repeat(2, 1fr);
  }
}

.page-gear main {
  width: 100%;
  max-width: 1100px;
  padding: 64px 20px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 72px;
  align-items: start;
}
.page-gear main h1 {
  grid-column: 1/-1;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
}
.page-gear main div h2 {
  color: var(--light);
  border-bottom: 1px solid var(--muted);
  padding-bottom: 8px;
  margin-bottom: 16px;
  text-transform: uppercase;
  font-size: 1.2rem;
}
.page-gear main div ul {
  list-style: none;
  padding: 0;
}
.page-gear main div ul li {
  margin-bottom: 8px;
  display: flex;
  gap: 12px;
}
.page-gear main div ul li .qty {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--secondary);
  width: 22px;
  border-radius: 99px;
  font-size: 0.9rem;
}
@media (max-width: 1024px) {
  .page-gear main {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .page-gear main {
    grid-template-columns: 1fr;
  }
}

.page-client h1 {
  font-size: 24px;
  font-weight: 400;
  display: none;
}
.page-client main {
  max-width: 800px;
  width: 100%;
  padding: 64px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.page-client main header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 62px;
  border-bottom: 1px solid var(--secondary);
}
.page-client main header h2 {
  padding: 0;
  margin: 0;
}
.page-client main header .status {
  display: flex;
  background-color: var(--light);
  color: var(--bg);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 20px;
  font-weight: 500;
}
@media (max-width: 864px) {
  .page-client main header {
    flex-direction: column;
    align-items: center;
  }
  .page-client main header h2 {
    padding: 0 32px;
  }
}
.page-client form {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: stretch;
  border: 1px solid var(--muted);
  border-radius: 6px;
  margin-top: 128px;
  margin-bottom: 128px;
}
.page-client form input[type=text] {
  font-size: 22px;
  padding: 18px 24px;
  border: 0;
  background-color: transparent;
  color: var(--text);
}
.page-client form ::placeholder {
  color: var(--light);
}
.page-client form button {
  font-size: 22px;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  width: 48px;
  background-color: transparent;
  color: var(--text);
  margin-right: 8px;
}
.page-client form input:focus,
.page-client form textarea:focus,
.page-client form select:focus {
  outline: none;
  border: none;
}
.page-client section {
  display: flex;
  width: 100%;
  gap: 64px;
}
@media (max-width: 864px) {
  .page-client section {
    flex-direction: column;
    margin: 0 32px;
  }
}
.page-client section .tally h3 {
  font-size: 32px;
}
.page-client section .tally {
  flex-grow: 1;
}
.page-client section .tally table {
  width: 100%;
  font-size: 26px;
  margin-bottom: 32px;
}
.page-client section .tally table th {
  text-align: left;
  padding: 12px 0;
  border-bottom: 1px solid var(--secondary);
}
.page-client section .tally table td {
  padding: 12px 0;
  font-size: 22px;
  border-bottom: 1px solid var(--secondary);
  font-weight: 300;
}
.page-client section .tally table td:last-child {
  text-align: right;
  font-weight: 700;
}
.page-client section .total {
  display: flex;
  min-width: 250px;
  max-width: 40%;
  flex-direction: column;
  gap: 24px;
}
@media (max-width: 864px) {
  .page-client section .total {
    flex-direction: row;
    flex-wrap: wrap;
    max-width: 100%;
  }
  .page-client section .total > div {
    width: 100%;
  }
}
.page-client section .total h3 {
  font-size: 32px;
  margin-bottom: 12px;
  font-weight: 500;
  letter-spacing: 1px;
}
.page-client section .total .depense {
  text-align: center;
  padding: 0 24px 24px 24px;
  border: 1px dashed var(--text);
}
.page-client section .total .depense h3 {
  font-weight: 500;
  letter-spacing: 1px;
}
.page-client section .total .depense p {
  margin: 0;
  font-size: 44px;
  font-weight: 700;
}
.page-client section .total .links h3, .page-client section .total .contribution h3 {
  font-size: 22px;
  border-bottom: 1px solid var(--secondary);
}
.page-client section .total ul {
  padding: 0;
  margin: 24px 0 0 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}
.page-client section .total ul li {
  list-style-type: none;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 0;
  margin: 0 0 0 0;
  font-size: 22px;
}

.page-gallerie section {
  margin: 64px 0 96px 0;
}
.page-gallerie section h2 {
  background-color: var(--muted);
  margin: 0;
  padding: 16px;
  font-size: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 400;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: auto;
  gap: 20px;
  list-style: none;
  padding: 0 20px;
  margin: 32px auto;
  width: 100%;
  max-width: 1100px;
  box-sizing: border-box;
}
.gallery .item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background-color: var(--muted);
  aspect-ratio: 4/3;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.gallery .item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery .item .meta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.85);
  padding: 16px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 2;
  pointer-events: none;
}
.gallery .item .meta h3 {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  color: #fff;
}
.gallery .item .meta .description {
  font-size: 0.9rem;
  color: var(--light);
}
.gallery .item .meta .description p {
  margin: 0;
}
.gallery .item .meta .description a {
  color: #fff;
  border-bottom: 1px solid #fff;
  pointer-events: auto;
}
.gallery .item:hover .meta {
  transform: translateY(0);
}
@media (max-width: 920px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 768px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Unified Lightbox Overlay */
#lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 2000;
  user-select: none;
}
#lightbox-overlay.active {
  display: flex;
}
#lightbox-overlay .lightbox-content {
  width: 95%;
  max-width: 1000px;
  display: flex;
  flex-direction: column; /* Stack media and meta vertically */
  justify-content: center;
  align-items: center;
}
#lightbox-overlay .lightbox-content img {
  max-width: 100%;
  max-height: 70vh; /* Limit image height to leave space for meta */
  object-fit: contain;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.8);
}
#lightbox-overlay .lightbox-content iframe {
  width: 100%;
  aspect-ratio: 16/9; /* Maintain aspect ratio for videos */
  border: none;
  background: #000;
}
#lightbox-overlay .lightbox-content .lightbox-meta {
  width: 100%;
  padding-top: 24px;
  color: var(--text);
}
#lightbox-overlay .lightbox-content .lightbox-meta h3 {
  margin: 0 0 10px 0;
  font-size: 1.5rem;
}
#lightbox-overlay .lightbox-content .lightbox-meta p {
  margin: 0 0 12px 0;
  color: var(--light);
  line-height: 1.6;
}
#lightbox-overlay .lightbox-content .lightbox-meta a {
  color: var(--text);
  border-bottom: 1px dashed var(--text);
}
#lightbox-overlay .nav-btn, #lightbox-overlay .close-btn {
  position: absolute;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 15px;
}
#lightbox-overlay .nav-btn .icon, #lightbox-overlay .close-btn .icon {
  font-size: 48px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
#lightbox-overlay .close-btn {
  top: 20px;
  right: 20px;
}
#lightbox-overlay .prev {
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
}
#lightbox-overlay .next {
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

footer {
  width: 100%;
  text-align: center;
}
