/* -----------------------------BASICS---------------------- */
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: "Source Sans 3", sans-serif;
  overflow-x: hidden;
}

@font-face {
  font-family: VCR;
  src: url(../fonts/VCR_OSD_MONO_1.001.ttf);
}

.vcr {
  font-family: VCR, monospace;
}

.encode-sans,
h1,
h2,
h3,
h4,
h5,
h6 {
  /* font-family: "Encode Sans", sans-serif; */
  font-family: "Yanone Kaffeesatz", sans-serif;

  font-weight: 900;
}

.white {
  color: white;
}

.black {
  color: black;
}

.grey {
  color: #c9c9c9;
}

.background-black {
  background-color: black;
}

.center {
  text-align: center;
}

h1 {
  font-size: 50px;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: center;
}

/* -----------------------------HEADER---------------------- */

#header {
  width: 100%;
  /* full width */
  height: 100vh;
  /* full screen height */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  /* distribute vertically */
  align-items: center;
  padding: 1rem;
  box-sizing: border-box;
  overflow: hidden;
  /* prevent content overflow */
}

#logo-futur {
  max-width: 90%;
  /* scale with screen */
  max-height: 50vh;
  /* never exceed 20% of height */
  height: auto;
}

#logo-parallax {
  max-width: 90%;
  /* scale with screen */
  max-height: 20vh;
  /* never exceed 20% of height */
  height: auto;
}

#date {
  font-family: VCR, monospace;
  font-size: 40px;
  margin-bottom: 20px;
}

#btn-candidat {
  background-color: #ffd700;
  color: #000;
  font-weight: bold;
  padding: 12px 24px;
  text-decoration: none;
  margin-bottom: 40px;
  transition: background-color 0.3s, transform 0.2s;
  display: inline-block;
}

#date-btn-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* keep them centered */
  gap: 0.3rem;
  /* small space between date & button */
}

#btn-candidat:hover {
  background-color: #ffdd00;
  transform: scale(1.05);
}

#parallax-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 50px;
  /* keeps logo centered in the screen */
}

#edition {
  font-weight: bold;
  color: #0000ff;
  font-size: clamp(1rem, 4vw, 2rem);
  margin-top: 0.5rem;
  text-align: right;
  /* align text inside the logo’s width */
  width: 100%;
  /* take full width of parent */
  max-width: 90%;
  /* match the logo’s max-width */
}

h1 {
  font-size: clamp(1.5rem, 6vw, 3rem);
}

/* -----------------------------CONTENT---------------------- */

.size-large {
  max-width: 1200px;
  margin: auto;
  padding-top: 100px;
}

.size-small {
  max-width: 800px;
  margin: auto;
  padding-top: 100px;
}

.size-wide {
  max-width: 100%;
  margin: auto;
  padding-top: 100px;
}

#background-colored {
  /* background: url(../images/background.jpg) no-repeat; */
  background: #c079ee;
  background: linear-gradient(
    0deg,
    rgba(192, 121, 238, 1) 0%,
    rgba(101, 187, 148, 1) 64%,
    rgba(0, 14, 44, 1) 91%,
    rgba(0, 0, 0, 1) 100%
  );
}

#intro-text {
  font-size: 24px;
}

/* -----------------------------CATEGORIES---------------------- */

#categories {
  max-width: 800px;
  margin: 20px auto;
}
#categories ul {
  margin: 0 20px;
  padding: 0;
}

#categories h2 {
  text-align: center;
}
.category {
  font-size: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  padding: 10px 15px;
}

.category-title {
  flex-shrink: 0;
}

.category-dots {
  flex-grow: 1;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  margin: 0 15px;
  line-height: 1;
}

/* main dots content */
.category-dots::before {
  content: "................................................................................................................................................................................................................";
  display: inline-block;
  white-space: nowrap;
}

.category-arrow {
  flex-shrink: 0;
}

/* --- IMPORTANT: make these inline-block and relative so transform/animations work --- */
.category-title,
.category-dots,
.category-arrow i {
  display: inline-block;
  position: relative;
  z-index: 4;
  /* keep above the text-overlay pseudo-elements */
}

/* original arrow size */
i.lni.lni-arrow-angular-top-right {
  font-size: 40px;
  vertical-align: middle;
  transition: transform 0.25s ease;
}

/* hover base for whole category */
.category:hover {
  animation: glitch 0.3s ease-in-out;
}

/* Glitch identique pour titre, points et flèche */
.category:hover .category-title,
.category:hover .category-dots,
.category:hover .category-arrow i {
  animation: glitch-text 0.3s ease-in-out;
  text-shadow: -3px 0 #ff0040, 3px 0 #00ffff;
}

/* A slightly different icon-specific keyframe to add stronger color split effect */
@keyframes glitch-icon {
  0%,
  100% {
    transform: translate(0);
    text-shadow: none;
  }

  20% {
    transform: translate(-2px, 2px);
    text-shadow: -4px 0 #ff0040, 4px 0 #00ffff;
  }

  40% {
    transform: translate(2px, -2px);
    text-shadow: -2px 0 #ff0040, 2px 0 #00ffff;
  }

  60% {
    transform: translate(-1px, 1px);
    text-shadow: -3px 0 #ff0040, 3px 0 #00ffff;
  }

  80% {
    transform: translate(1px, -1px);
    text-shadow: -2px 0 #ff0040, 2px 0 #00ffff;
  }
}

/* apply the icon-specific glitch when hovering */
.category:hover .category-arrow i {
  animation: glitch-icon 0.3s ease-in-out;
}

/* existing glitch keyframes (kept from ton code) */
@keyframes glitch {
  0%,
  100% {
    transform: translate(0);
  }

  20% {
    transform: translate(-2px, 2px);
  }

  40% {
    transform: translate(-2px, -2px);
  }

  60% {
    transform: translate(2px, 2px);
  }

  80% {
    transform: translate(2px, -2px);
  }
}

@keyframes glitch-text {
  0%,
  100% {
    transform: translate(0);
    filter: hue-rotate(0deg);
  }

  20% {
    transform: translate(-1px, 1px);
    filter: hue-rotate(90deg);
  }

  40% {
    transform: translate(-1px, -1px);
    filter: hue-rotate(180deg);
  }

  60% {
    transform: translate(1px, 1px);
    filter: hue-rotate(270deg);
  }

  80% {
    transform: translate(1px, -1px);
    filter: hue-rotate(360deg);
  }
}

/* keep behavior when active (clicked) */
.category.active i.lni.lni-arrow-angular-top-right {
  transform: rotate(90deg);
}

.category-description {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.4s ease;
}

.category-description.show {
  max-height: 800px;
  opacity: 1;
  background: #001dff8a;
  border-radius: 10px;
  padding: 15px 30px;
  width: 75%;
  margin: auto;
  font-size: 22px;
}

.btn-yellow {
  background-color: #ffd700;
  color: #000;
  padding: 9px 20px;
  text-decoration: none;
  transition: background-color 0.3s, transform 0.2s;
  display: inline-block;
  margin: auto;
  display: block;
  min-width: 160px;
  text-align: center;
  margin-top: 30px;
  margin-bottom: 20px;
  font-size: 17px;
  cursor: pointer;
}

.btn-yellow:hover {
  background-color: #ffdd00;
  transform: scale(1.05);
}

/* ----------------------------VIDEO -----------------------*/
iframe {
  width: 100%;
  border-radius: 10px;
  min-height: 500px;
  height: auto;
}

#video-title {
  margin-bottom: 0;
}

#video-description {
  margin-top: 0;
  text-align: right;
  font-size: 35px;
}

/* ------------------------------PARTNERS-------------------- */

:root {
  --marquee-width: 100%;
  --marquee-height: 20vh;
  /* --marquee-elements: 12; */
  /* defined with JavaScript */
  --marquee-elements-displayed: 4;
  --marquee-element-width: calc(
    var(--marquee-width) / var(--marquee-elements-displayed)
  );
  --marquee-animation-duration: calc(var(--marquee-elements) * 3s);
}

.marquee {
  width: var(--marquee-width);
  height: var(--marquee-height);

  color: #eee;
  overflow: hidden;
  position: relative;
}

.marquee:before,
.marquee:after {
  position: absolute;
  top: 0;
  width: 10rem;
  height: 100%;
  content: "";
  z-index: 1;
}

.marquee:before {
  left: 0;
}

.marquee:after {
  right: 0;
}

.marquee-content {
  list-style: none;
  height: 100%;
  display: flex;
  animation: scrolling var(--marquee-animation-duration) linear infinite;
}

/* .marquee-content:hover {
  animation-play-state: paused;
} */
@keyframes scrolling {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(
      calc(-1 * var(--marquee-element-width) * var(--marquee-elements))
    );
  }
}

.marquee-content li {
  display: flex;
  justify-content: center;
  align-items: center;
  /* text-align: center; */
  flex-shrink: 0;
  width: var(--marquee-element-width);
  max-height: 100%;
  font-size: calc(var(--marquee-height) * 3 / 4);
  /* 5rem; */
  white-space: nowrap;
}

.marquee-content li img {
  width: 85%;
  transition: transform 0.3s ease;
}

.marquee-content li img:hover {
  transform: scale(1.1);
}

footer {
  text-align: center;
  background: black;
  padding: 20px;
  color: white;
}

footer h2 {
  margin-bottom: 10px;
}

footer i.lni {
  font-size: 40px;
  padding: 0 15px;
  transition: transform 0.3s ease;
  color: #ffcd00;
}

footer i.lni:hover {
  transform: scale(1.1);
}

a#inforef {
  color: #0000ff;
}

a#inforef:hover {
  color: #ffcd00;
}

#partners {
  padding-bottom: 50px;
  padding-top: 150px;
}

#signature {
  padding-top: 50px;
}

/* ----------------------------MODAL-------------------- */
.modal,
.modal2 {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

.modal-content,
.modal-content2 {
  position: relative;
  background-color: #183bb1;
  padding: 20px;
  border-radius: 10px;
  max-width: 1000px;
  max-height: 80vh;
  width: 90%;
  text-align: left;
  animation: fadeIn 0.3s ease-in-out;
  overflow-y: auto;
  box-sizing: border-box;
  color: white;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close,
.close2 {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

/* --------------------------FORM------------------------ */

/* form {
            background: var(--card-bg);
            padding: 2rem;
            border-radius: var(--radius);
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
            width: 100%;
            max-width: 380px;
            animation: fadeIn 0.6s ease-in-out;
        } */

form input,
form select {
  width: 85%;
  padding: 0.9rem 1rem;
  margin: 0.5rem 0;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  font-size: 0.95rem;
  transition: border 0.2s, box-shadow 0.2s;
  margin: 35px auto;
  display: block;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

form input:focus,
form select:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

form button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

form button:active {
  transform: translateY(1px);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#alertMail {
  font-size: 13px;
  color: #c3c3c3;
  max-width: 80%;
  margin: auto;
  text-align: justify;
}

#alertMail a {
  color: #c3c3c3;
  text-decoration: none;
  font-weight: 600;
}

label a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
}

#alertMail a:hover,
label a:hover {
  text-decoration: underline;
}

#alertMail a:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

input#fileInput {
  margin-bottom: 6px;
}

#rules-checkbox input {
  width: auto;
  display: inline-block;
}

#rules-checkbox {
  max-width: 85%;
  margin: auto;
}

.button-style {
  appearance: auto;
  text-rendering: auto;
  color: buttontext;
  letter-spacing: normal;
  word-spacing: normal;
  line-height: normal;
  text-transform: none;
  text-indent: 0px;
  text-shadow: none;
  display: inline-block;
  text-align: center;
  cursor: default;
  box-sizing: border-box;
  background-color: buttonface;
  margin: 0em 0em 0em 0em;
  padding-block: 1px;
  padding-inline: 6px;
  border-width: 2px;
  border-style: outset;
  border-color: buttonborder;
  border-image: initial;
  background-color: #ffd700;
  color: #000;
  padding: 9px 20px;
  text-decoration: none;
  transition: background-color 0.3s, transform 0.2s;
  display: inline-block;
  margin: auto;
  display: block;
  min-width: 160px;
  text-align: center;
  margin-top: 30px;
  margin-bottom: 20px;
  font-size: 17px;
  cursor: pointer;
}
/* Mobile First Responsive Design */

/* Extra Small Devices - Phones (320px and up) */
@media (max-width: 479px) {
  h1 {
    font-size: 28px;
  }

  #header {
    padding: 20px;
    height: auto;
    min-height: 100vh;
  }

  #logo-futur {
    width: 250px;
    margin-bottom: 15px;
  }

  #date {
    font-size: 22px;
    margin-bottom: 15px;
  }

  #btn-candidat {
    padding: 10px 20px;
    font-size: 14px;
    margin-bottom: 30px;
  }

  #logo-parallax {
    max-width: 100%;
    width: 280px;
  }

  #edition {
    font-size: 28px;
  }

  .size-large,
  .size-small {
    padding: 20px;
    padding-top: 40px;
  }

  #intro-text {
    font-size: 18px;
  }

  .grid2 {
    display: block;
    gap: 15px;
  }

  .category {
    font-size: 22px;
    padding: 8px 12px;
    margin-bottom: 10px;
  }

  .category-arrow i {
    font-size: 28px;
  }

  iframe {
    min-height: 400px;
  }

  #video-description {
    font-size: 24px;
    text-align: center;
  }

  :root {
    --marquee-width: 100vw;
    --marquee-height: 12vh;
    --marquee-elements-displayed: 2;
  }

  .marquee:before,
  .marquee:after {
    width: 3rem;
  }

  footer i.lni {
    font-size: 30px;
    padding: 0 10px;
  }
}

/* Small Devices - Phones (480px to 767px) */
@media (min-width: 480px) and (max-width: 767px) {
  h1 {
    font-size: 35px;
  }

  #header {
    padding: 30px;
  }

  #logo-futur {
    width: 350px;
  }

  #date {
    font-size: 32px;
  }

  #logo-parallax {
    max-width: 100%;
    width: 400px;
  }

  #edition {
    font-size: 35px;
  }

  #categories li {
    font-size: 16px;
  }
  .size-large,
  .size-small {
    padding: 30px;
    padding-top: 60px;
  }

  #intro-text {
    font-size: 20px;
  }

  .grid2 {
    display: block;
    gap: 20px;
  }

  .category {
    font-size: 26px;
    padding: 10px 15px;
  }

  .category-arrow i {
    font-size: 35px;
  }

  iframe {
    min-height: 425px;
  }

  #video-description {
    font-size: 28px;
  }

  :root {
    --marquee-width: 100vw;
    --marquee-height: 14vh;
    --marquee-elements-displayed: 3;
  }

  .marquee:before,
  .marquee:after {
    width: 4rem;
  }
}

/* Medium Devices - Tablets (768px to 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  h1 {
    font-size: 42px;
  }

  #header {
    padding: 40px;
  }

  #logo-futur {
    width: 400px;
  }

  #date {
    font-size: 36px;
  }

  #logo-parallax {
    max-width: 100%;
    width: 600px;
  }

  #edition {
    font-size: 40px;
  }

  .size-large {
    padding: 40px;
    padding-top: 80px;
  }

  .size-small {
    padding: 40px;
    padding-top: 80px;
  }

  #intro-text {
    font-size: 22px;
  }

  .grid2 {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .category {
    font-size: 28px;
  }

  iframe {
    min-height: 400px;
  }

  #video-description {
    font-size: 32px;
  }

  :root {
    --marquee-width: 100vw;
    --marquee-height: 18vh;
    --marquee-elements-displayed: 4;
  }

  .marquee:before,
  .marquee:after {
    width: 6rem;
  }
}

/* Large Devices - Desktop (1024px and up) */
@media (min-width: 1024px) {
  #header {
    padding: 0 40px;
  }

  .size-large,
  .size-small {
    padding: 0 40px;
    padding-top: 100px;
  }

  :root {
    --marquee-width: 100vw;
    --marquee-height: 20vh;
    --marquee-elements-displayed: 5;
  }

  .marquee:before,
  .marquee:after {
    width: 8rem;
  }
}

/* Legacy mobile support */
@media (max-width: 600px) {
  :root {
    --marquee-width: 100vw;
    --marquee-height: 16vh;
    --marquee-elements-displayed: 3;
  }

  .marquee:before,
  .marquee:after {
    width: 5rem;
  }
}
