.bordure-top, .bordure-bottom,
.bordure-left, .bordure-right {
  position: fixed;
  background-color: var(--border-color-side); /* light cream color */
  z-index: 150; /* above intro elements */
  pointer-events: none;
  transition: transform 360ms cubic-bezier(.2,.9,.25,1), opacity 280ms ease;
}

/* Horizontal borders (top / bottom) */
.bordure-top, .bordure-bottom {
  left: 0;
  width: 100%;
  height: 8px; /* thickness */
}

/* Vertical borders (left / right) */
.bordure-left, .bordure-right {
  top: 0;
  height: 100%;
  width: 8px; /* thickness */
}

/* explicit positions */
.bordure-top { top: 1em; transform: translateY(0); }
.bordure-bottom { bottom: 1em; transform: translateY(0); }
.bordure-left { left: 1em; transform: translateX(0); }
.bordure-right { right: 1em; transform: translateX(0); }



/* hide/move borders once the intro/grid is revealed */
body.grid-visible .bordure-top { transform: translateY(-10px); opacity: 0; }
body.grid-visible .bordure-bottom { transform: translateY(10px); opacity: 0; }
body.grid-visible .bordure-left { transform: translateX(-10px); opacity: 0; }
body.grid-visible .bordure-right { transform: translateX(10px); opacity: 0; }

.intro-gradient-bg {
  position: fixed;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #1B1B1B 0%, #2B2B2B 44.23%, #323232 77.88%, #1B1B1B 100%);
  z-index: 100;
  pointer-events: none;
  transition: transform 2s ease;
  opacity: 1;
}

/* Contenu accueil derriÃƒÂ¨re rideaux */
#accueil-content {
  opacity: 0; /* on commence invisible */
  transition: opacity 2s ease; /* apparaÃƒÂ®t progressivement */
}

/* Rideaux */
.intro-bg {
  position: fixed;
  top: 0;
  width: 100%;
  height: 100%;
  background: #c3000000;
  z-index: 100;
}

.intro-gradient-bg { left: 0; transform: translateX(0); }
.intro-gradient-bg.open { opacity: 0; }


/* Texte intro */
.intro-text {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: #f6e8d8; /* light cream like mock */
  z-index: 101;
  opacity: 1;
  transition: opacity 1.6s ease;
  font-family: 'Montserrat', 'Lucida Sans', 'Lucida Grande', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Subtle full-screen single grid behind the intro */
  .intro-bg {
  pointer-events: none;
  /* single grid (adjust size to taste) */
  background-image:
    linear-gradient(rgba(246,232,216,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246,232,216,0.06) 1px, transparent 1px);
  background-size: 32px 32px, 32px 32px;
  background-position: 0 0, 0 0;
  mix-blend-mode: normal;
}

  /* Hide the main header while the intro is running
     JS will add `body.intro-running` at start and remove it when the intro finishes/skips */
  body.intro-running .header-container {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 260ms ease, transform 260ms cubic-bezier(.2,.9,.25,1);
  }
  /* when intro is done the body will get .grid-visible and header returns to normal */
  body.grid-visible .header-container {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  /* If your theme uses a gradient background wrapper, hide it when `.open` is added.
     The script now prefers `.intro-gradient-bg` over the legacy `#intro-bg` / `.intro-bg`. */
  .intro-gradient-bg {
    transition: opacity 1.8s ease, visibility 220ms ease;
  }
  .intro-gradient-bg.open {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }


.intro-text p {
  margin: 0.15rem 0;
  font-weight: 800;
  font-size: clamp(2.8rem, 8vw, 10rem); /* large responsive title */
  line-height: 0.9;
  transform-origin: center left;
}

.intro-text p:nth-child(2) {
  font-weight: 800;
  font-size: clamp(2.8rem, 8vw, 10rem); /* large responsive title */
  line-height: 0.9;
  transform-origin: center left;
}

.intro-text.fade-out { opacity: 0; }

/* Bouton intro (EntrÃƒÂ©e) */
.intro-btn {
  position: fixed;
  display: flex;
  align-items: baseline;
  left: 50%;
  bottom: 18%;
  transform: translateX(-50%);
  z-index: 102;
  padding: 0.6rem 1.1rem;
  font-size: 0.95rem;
  cursor: pointer;
  background: rgba(246,232,216,0.06); /* subtle beige */
  color: #f6e8d8;
  border: 1px solid rgba(246,232,216,0.6);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(246,232,216,0.03);
  letter-spacing: 0.12em;
  will-change: transform, box-shadow, background-color;
  animation: intro-btn-pulse 3s ease-in-out infinite;
  transition: transform 220ms cubic-bezier(.2,.9,.25,1), box-shadow 220ms ease, background-color 220ms ease, opacity 220ms ease;
}

.intro-btn::after {
  content: '\203A'; 
  display: inline-block;
  margin-left: 0.6rem;
  transform: translateX(3px);
  transition: transform .18s ease, color 180ms ease;
}

.intro-btn:hover {
  transform: translateX(-50%) scale(1.02);
  box-shadow: 0 18px 36px rgba(246,232,216,0.08);
  background: #2c1e0e19;
  transition: transform 200ms cubic-bezier(.2,.9,.25,1), box-shadow 200ms ease, background-color 300ms ease;
}

.intro-btn:hover span {
  color: var(--font-color);
}

.intro-btn:hover::after { transform: translateX(8px); }

.neon-pulse {
  border: 1px solid rgb(237, 218, 165);
  box-shadow: 0 0 10px rgba(219, 199, 23, 0.3);
  overflow: visible;
}

.neon-pulse::before,
.neon-pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1px solid rgb(232, 202, 119);
  border-radius: inherit;
  animation: pulseOut 2s ease-out infinite;
  opacity: 0;
}

.neon-pulse::after {
  animation-delay: 1s;
}

@keyframes pulseOut {
  0% {
    transform: scale(1.1, 1.3);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.4, 1.8);
    opacity: 0.2;
  }
  100% {
    transform: scale(1.7, 2.5);
    opacity: 0;
  }
}

/* Animation de la fleche sur le button */
#intro-arrow {
  transition: transform 220ms ease;
  margin-left: 1em;
  align-self: revert;
}


@media (max-width: 700px) {
  .intro-text p:first-child { font-size: clamp(2.4rem, 12vw, 4.2rem); }
  .intro-text p:last-child { font-size: 1.1rem; }
  .intro-btn { bottom: 12%; padding: 0.5rem 0.9rem; }
}

/* Typing caret */
.typing-caret {
  display: inline-block;
  width: 2px; /* slightly thicker for visibility */
  height: 1.05em;
  background: linear-gradient(180deg, #fff 0%, #f6e8d8 100%);
  margin-left: 0.35rem;
  vertical-align: middle;
  will-change: opacity, transform, box-shadow;
  animation: caret-blink 1.1s steps(2, start) infinite, caret-bounce 900ms cubic-bezier(.2,.9,.25,1) infinite;
  box-shadow: 0 0 0 rgba(246,232,216,0);
}

/* subtle blink + glow */
@keyframes caret-blink {
  0% { opacity: 1; box-shadow: 0 0 0 rgba(246,232,216,0); }
  40% { opacity: 1; box-shadow: 0 0 6px rgba(246,232,216,0.06); }
  50% { opacity: 0; box-shadow: 0 0 0 rgba(246,232,216,0); }
  100% { opacity: 0; box-shadow: 0 0 0 rgba(246,232,216,0); }
}

/* tiny vertical motion to make the caret feel alive while typing */
@keyframes caret-bounce {
  0% { transform: translateY(0); }
  50% { transform: translateY(-6%); }
  100% { transform: translateY(0); }
}

/* Hide button until typing completes; JS toggles .show */
.intro-btn { opacity: 0; pointer-events: none; transition: opacity 220ms ease; }
.intro-btn.show { opacity: 1; pointer-events: auto; }

/* Full assembled phrase animation (appears after typing sequence) */
.intro-text .full-phrase {
  display: inline-block;
  opacity: 0;
  transform: translateY(12px) scale(0.99);
  transition: opacity 480ms cubic-bezier(.2,.9,.3,1), transform 480ms cubic-bezier(.2,.9,.3,1);
  will-change: opacity, transform;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.intro-text .full-phrase.show {
  opacity: 1;
  transform: none;
}


/* Final phrase line sizes */
.intro-text .full-phrase .fp-line {
  display: block;
  line-height: 0.95;
  color: #f6e8d8;
}
.intro-text .full-phrase .fp-line-1 {
  font-weight: 700;
  font-size: clamp(2rem, 5.5vw, 3.2rem); /* slightly smaller */
  letter-spacing: 0.06em;
}
.intro-text .full-phrase .fp-line-2 {
  display: flex;
  align-items: center;
}

/*Modifications : Changement du contenu dans la page de bienvenue
                  Affichage du logo de l'ExpoTIM
                  Effet d'ombre colorÃ©e animÃ©e sur le logo
*/
/* Par Malaïka Abevi***/
/* Modifications : Logo du TIM - Tablette et Desktop*/
.intro-text .full-phrase .fp-line-2 svg{
  height: auto;
  z-index: 2;
  width: clamp(27rem, 13.8571rem + 27.381vw, 40.5rem);
}

.svg-shadow {
  position: absolute;
  opacity: 0;
  transition: opacity 2s ease;
  filter: blur(10px);
  z-index: 2;
}

.svg-shadow.visible {
  opacity: 1;
}

.svg-shadow path {
  fill: url(#shadow-gradient);
  fill-opacity: 0.35;
}

.svg-shadow path:nth-last-of-type(1){
  fill: none;
  stroke: url(#shadow-gradient);
  fill-opacity: 0.35;
}

.stop1, .stop2, .stop3, .stop4{
	stop-color: #7D77D4;
}

.stop1 { animation: hueShift 6s infinite 1s alternate; }
.stop2 { animation: hueShift 6s infinite 2s alternate; }
.stop3 { animation: hueShift 6s infinite 3s alternate; }
.stop4 { animation: hueShift 6s infinite 4s alternate; }

@keyframes hueShift {
  0%{ stop-color: #7D77D4;}
  35%{ stop-color: #2FC7BF;}
  65%{ stop-color: #EECC7F;}
  100% { stop-color: #7D77D4;}
}
/* Fin des modifications **************************/

.intro-text .full-phrase .fp-line-3 {
  font-weight: 600;
  font-size: clamp(1rem, 2.6vw, 1.6rem); /* small year */
  margin-top: 0.35rem;
  opacity: 0.95;
}

@media (max-width:700px) {
  .intro-text .full-phrase .fp-line-2 { font-size: clamp(2.6rem, 12vw, 5rem); }
  .intro-text .full-phrase .fp-line-1 { font-size: clamp(1.6rem, 6.5vw, 2.4rem); }
  .intro-text .full-phrase .fp-line-3 { font-size: 1rem; }

  .fp-line {
    text-align: center;
  }
}

/* Enhanced reveal using pseudo-elements: clip + deblur + chromatic fringe */
.intro-text .full-phrase .fp-line {
  color: #f6e8d8;
  position: relative;
  overflow: visible;
}

/* per-character reveal */
.intro-text .full-phrase .fp-line .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(8px) scale(0.998);
  transition: opacity 1040ms cubic-bezier(.2,.9,.25,1), transform 260ms cubic-bezier(.2,.9,.25,1);
  will-change: opacity, transform;
}
.intro-text .full-phrase .fp-line .char.visible {
  opacity: 1;
  transform: none;
}

/* ensure space characters keep a visible gap */
.intro-text .full-phrase .fp-line .char.space {
  display: inline-block;
  width: 0.45em;
}

/* play reveal animations on show */
.intro-text .full-phrase.show .fp-line::before {
  animation: fp-clip 680ms cubic-bezier(.2,.9,.25,1) forwards;
}
.intro-text .full-phrase.show .fp-line::after {
  animation: fp-clip-fringe 820ms cubic-bezier(.2,.9,.25,1) forwards;
}
.intro-text .full-phrase.show .fp-line-1::before { animation-delay: 40ms; }
.intro-text .full-phrase.show .fp-line-2::before { animation-delay: 160ms; }
.intro-text .full-phrase.show .fp-line-3::before { animation-delay: 280ms; }
.intro-text .full-phrase.show .fp-line-1::after { animation-delay: 20ms; }
.intro-text .full-phrase.show .fp-line-2::after { animation-delay: 120ms; }
.intro-text .full-phrase.show .fp-line-3::after { animation-delay: 240ms; }

@keyframes fp-clip {
  0% {
    clip-path: inset(0 100% 0 0);
    transform: translateY(14px) rotateX(6deg) scale(0.996);
    filter: blur(6px) saturate(0.9);
    opacity: 0;
  }
  60% {
    clip-path: inset(0 8% 0 0);
    transform: translateY(-6px) rotateX(2deg) scale(1.006);
    filter: blur(1px) saturate(1.02);
    opacity: 1;
  }
  100% {
    clip-path: inset(0 0% 0 0);
    transform: none;
    filter: none;
    opacity: 1;
  }
}

@keyframes fp-clip-fringe {
  0% {
    clip-path: inset(0 100% 0 0);
    transform: translateY(10px) translateX(-8px);
    opacity: 0.9;
  }
  40% {
    opacity: 0.6;
  }
  100% {
    clip-path: inset(0 0% 0 0);
    transform: none;
    opacity: 0;
  }
}

.couleur-blob-1 {
  position: fixed;
  top: -150px;
  left: -150px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle at center, rgba(64, 50, 255, 1) 0%, rgba(195,0,0,0) 70%);
  filter: blur(100px);
  z-index: 90;
  pointer-events: none;
  animation: moveBlob1 10s infinite alternate ease-in-out;
}


.couleur-blob-2 {
  position: fixed;
  top: 200px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle at center, rgba(0, 151, 143, 1) 0%, rgba(195,0,0,0) 70%);
  filter: blur(100px);
  z-index: 90;
  pointer-events: none;
  /* slower, larger movement */
  animation: moveBlob2 18s infinite alternate ease-in-out;
}

.couleur-blob-3 {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle at center, rgba(255, 192, 0, 1) 0%, rgba(195,0,0,0) 70%);
  filter: blur(120px);
  z-index: 90;
  pointer-events: none;
  /* slower, larger movement while preserving the -50% anchor */
  animation: moveBlob3 20s infinite alternate ease-in-out;
}
@keyframes moveBlob1 {
  0%, 100% {
    left: 0;
  }
  50% {
    left: 150px;
  }
  75% {
    top: 100px;
    left: -200px;
  }
}

/* Blob2 movement - larger roaming area */
@keyframes moveBlob2 {
  0% { transform: translate(0px, 0px) scale(1) translateZ(0); opacity: .95; }
  20% { transform: translate(-180px, -140px) scale(1.07) translateZ(0); opacity: .9; }
  40% { transform: translate(-340px, -80px) scale(1.05) translateZ(0); opacity: .86; }
  60% { transform: translate(-140px, 10px) scale(1.02) translateZ(0); opacity: .9; }
  80% { transform: translate(160px, 48px) scale(0.98) translateZ(0); opacity: .93; }
  100% { transform: translate(0px, 0px) scale(1) translateZ(0); opacity: .95; }
}

/* Blob3 movement (keeps the -50% anchor on X but adds bigger translate) */
@keyframes moveBlob3 {
  0% { transform: translateX(-50%) translate(0px, 0px) scale(1) translateZ(0); opacity: .96; }
  18% { transform: translateX(-50%) translate(120px, -100px) scale(1.06) translateZ(0); opacity: .9; }
  36% { transform: translateX(-50%) translate(-160px, -180px) scale(1.05) translateZ(0); opacity: .85; }
  58% { transform: translateX(-50%) translate(200px, -60px) scale(1.03) translateZ(0); opacity: .9; }
  82% { transform: translateX(-50%) translate(-40px, -30px) scale(0.98) translateZ(0); opacity: .94; }
  100% { transform: translateX(-50%) translate(0px, 0px) scale(1) translateZ(0); opacity: .96; }
}


/*mobile--Mouvement des cercles arriere-plan*/
@media screen and (max-width: 767px) {
  .bordure-top, .bordure-bottom { height: 1px; }
  .bordure-left, .bordure-right { width: 1px; }
  .couleur-blob-1, .couleur-blob-2, .couleur-blob-3 {
    width: 200px;
    height: 200px;
  }

  .couleur-blob-1 {
    background: radial-gradient(circle at center, rgb(55, 41, 255) 0%, rgba(64, 50, 255, 0.724) 60%, rgba(195,0,0,0) 70%);
  }

  .couleur-blob-2 {
    background: radial-gradient(circle at center, rgb(0, 151, 143) 0%, rgba(0, 151, 143, 0.731) 60%, rgba(195,0,0,0) 70%);
  }

  .couleur-blob-3 {
    background: radial-gradient(circle at center, rgb(255, 183, 0) 0%, rgba(255, 191, 0, 0.614) 50%,  rgba(195,0,0,0) 70%);
  }
}

/*tablet--Mouvement des cercles arriere-plan*/
@media screen and (min-width: 767.02px){
  .bordure-top, .bordure-bottom { height: 1px; }
  .bordure-left, .bordure-right { width: 1px; }
  .bordure-top { top: 2em; transform: translateY(0); }
  .bordure-bottom { bottom: 2em; transform: translateY(0); }
  .bordure-left { left: 2em; transform: translateX(0); }
  .bordure-right { right: 2em; transform: translateX(0); }

  .couleur-blob-1, .couleur-blob-2, .couleur-blob-3 {
    width: 270px;
    height: 270px;
  }

  .couleur-blob-1 {
    background: radial-gradient(circle at center, rgb(64, 50, 255) 0%, rgba(64, 50, 255, 0.891) 0%, rgba(195,0,0,0) 70%);
  }

  .couleur-blob-2 {
    background: radial-gradient(circle at center, rgb(0, 151, 143) 0%, rgba(0, 151, 143, 0.921) 0%, rgba(195,0,0,0) 70%);
  }

  .couleur-blob-3 {
    background: radial-gradient(circle at center, rgb(255, 183, 0) 0%, rgba(255, 191, 0, 0.848) 60%,  rgba(195,0,0,0) 70%);
  }
}


/*laptop/grand ecran--Mouvement des cercles arriere-plan*/
@media  screen and (min-width: 1024px){
  .bordure-top, .bordure-bottom { height: 1px; }
  .bordure-left, .bordure-right { width: 1px; }
  .bordure-top { top: 2em; transform: translateY(0); }
  .bordure-bottom { bottom: 2em; transform: translateY(0); }
  .bordure-left { left: 2em; transform: translateX(0); }
  .bordure-right { right: 2em; transform: translateX(0); }

  .couleur-blob-1 {
    background: radial-gradient(circle at center, rgba(64, 50, 255, 1) 0%, rgba(195,0,0,0) 70%);
  }

  .couleur-blob-2 {
    background: radial-gradient(circle at center, rgba(0, 151, 143, 1) 0%, rgba(195,0,0,0) 70%);
  }

  .couleur-blob-3 {
    background: radial-gradient(circle at center, rgba(255, 192, 0, 1) 10%, rgba(195,0,0,0) 70%);
  }
}

/* Ajustement mobile*/
@media (max-width: 767px) {
  .intro-text {
    top: 46%;
    padding: 0 5vw;
    width: 90vw;
  }

  .intro-text p {
    font-size: clamp(1.6rem, 9vw, 3.6rem);
    line-height: 1;
  }

  .intro-text .full-phrase .fp-line-2 { font-size: clamp(1.8rem, 11vw, 4rem); }
  .intro-text .full-phrase .fp-line-1 { font-size: clamp(1.2rem, 6.5vw, 1.8rem); }
  .intro-text .full-phrase .fp-line-3 { font-size: .9rem; margin-top: .2rem; }

  .couleur-blob-1, .couleur-blob-2, .couleur-blob-3 {
    width: 140px;
    height: 140px;
    filter: blur(64px);
  }
  .couleur-blob-1 { top: -60px; left: -60px; }
  .couleur-blob-2 { top: 100px; right: -40px; }
  .couleur-blob-3 { bottom: -40px; width: 180px; height: 180px; }

    /* Modifications : Logo du TIM - Mobile*/
    .intro-text .full-phrase .fp-line-2 svg{
      width: 18rem;
    }
}

/* Very small screens / narrow phones */
@media (max-width: 420px) {
  .intro-text { top: 44%; padding: 0 10vw; }
  .intro-text p { font-size: clamp(1.4rem, 11vw, 2.6rem); }
  .intro-text .full-phrase .fp-line-2 { font-size: clamp(1.4rem, 13vw, 2.6rem); }
  .intro-text .full-phrase .fp-line-1 { font-size: clamp(1rem, 8vw, 1.2rem); }
  .intro-text .full-phrase .fp-line-3 { font-size: .8rem; }
  .couleur-blob-1, .couleur-blob-2, .couleur-blob-3 { width: 120px; height:120px; filter: blur(56px); }

  /* Modifications : Logo du TIM - Petit Mobile*/
  .intro-text .full-phrase .fp-line-2 svg{
    width: 13rem;
  }
}