/* ===================== SPLASH SCREEN ===================== */

.splash {
    width: 100vw;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    overflow: hidden;
    background-color: #191919;
    z-index: 2000;
  }
  
  /* Logo central */
  .splash_logo {
    position: absolute;
    margin: -15px 0 0 -25px;
    top: 50vh;
    z-index: 2005;
    left: 50vw;
    width: 50px;
    text-align: center;
    height: 30px;
    font-size: 26px;
    font-weight: 600;
    color: #ffffff;
    opacity: 1;
    will-change: opacity;
    animation: splash-logo-color 0.3s ease-in 0.8s forwards, splash-off 0.5s ease-in-out 1.8s forwards;
  }
  
  .splash_logo::before {
    display: block;
    position: absolute;
    left: 15px;
    bottom: -5px;
    width: 20px;
    height: 1px;
    background-color: #757474;
    content: "";
  }
  
  .splash_logo::after {
    display: block;
    position: absolute;
    left: 15px;
    top: -5px;
    width: 20px;
    height: 1px;
    background-color: #757474;
    content: "";
    will-change: width;
  }
  
  /* Responsive pour tablette */
  @media (min-width: 768px) and (max-width: 1024px) {
    .splash_logo {
      margin: calc(-15px * 0.9) 0 0 calc(-25px * 0.9);
      width: clamp(45px, 4.5vw, 50px);
      height: clamp(27px, 2.7vh, 30px);
      font-size: clamp(23px, 2.3vw, 26px);
    }
  
    .splash_logo::before,
    .splash_logo::after {
      left: clamp(13px, 1.3vw, 15px);
      width: clamp(18px, 1.8vw, 20px);
    }
  
    .text {
      margin: calc(-50px * 0.85) 0 0 calc(-150px * 0.85);
      width: clamp(280px, 35vw, 340px);
      height: auto;
      font-size: clamp(36px, 4.5vw, 42px);
    }
  
    .text p {
      margin-bottom: clamp(4px, 0.5vh, 8px);
    }
  
    .text button.splash-more-btn {
      padding: clamp(0.4rem, 0.5vh, 0.5rem) clamp(2rem, 2.5vw, 2.5rem);
      font-size: clamp(10px, 1.2vw, 12px);
      margin-top: clamp(8px, 1vh, 12px);
    }
  }
  
  /* Responsive pour mobile */
  @media (max-width: 767px) {
    .splash_logo {
      margin: calc(-15px * 0.7) 0 0 calc(-25px * 0.7);
      width: clamp(35px, 8vw, 45px);
      height: clamp(21px, 4.8vh, 27px);
      font-size: clamp(18px, 4.5vw, 23px);
    }
  
    .splash_logo::before,
    .splash_logo::after {
      left: clamp(10px, 2.5vw, 13px);
      width: clamp(14px, 3.5vw, 18px);
    }
  
    .text {
      margin: calc(-50px * 0.6) 0 0 calc(-150px * 0.6);
      width: clamp(200px, 75vw, 280px);
      max-width: calc(100vw - 40px);
      height: auto;
      font-size: clamp(24px, 6vw, 32px);
      padding: clamp(10px, 2.5vw, 15px);
      box-sizing: border-box;
    }
  
    .text p {
      margin-bottom: clamp(3px, 0.8vh, 6px);
      white-space: nowrap;
    }
  
    .text button.splash-more-btn {
      padding: clamp(0.45rem, 1vh, 0.55rem) clamp(1.5rem, 4vw, 2rem);
      font-size: clamp(10px, 2.5vw, 11px);
      margin-top: clamp(10px, 2vh, 15px);
      width: 100%;
      max-width: 200px;
    }
  }
  
  /* Rectangles */
  .splash_svg {
    position: relative;
    margin: auto;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    bottom: 0;
    right: 0;
    z-index: 2001;
  }
  
  .splash_svg svg {
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: visible;
    backface-visibility: visible;
  }
  
  .splash_svg rect {
    width: 100%;
    height: 100%;
    fill: var(--accent);
    stroke: 0;
    -webkit-clip-path: polygon(45vw 40vh, 55vw 40vh, 55vw 60vh, 45vw 60vh);
    clip-path: polygon(45vw 40vh, 55vw 40vh, 55vw 60vh, 45vw 60vh);
    animation: splash-expand 0.8s cubic-bezier(0.7, 0, 0.3, 1) forwards 1.1s;
  }
  
  .splash_minimize {
    position: absolute;
    margin: auto;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 2002;
  }
  
  .splash_minimize svg {
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: visible;
    backface-visibility: visible;
  }
  
  .splash_minimize rect {
    width: 100%;
    height: 100%;
    -webkit-clip-path: polygon(0vw 0vh, 100vw 0vh, 100vw 100vh, 0vw 100vh);
    clip-path: polygon(0vw 0vh, 100vw 0vh, 100vw 100vh, 0vw 100vh);
    animation: splash-scale 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards 0.2s, splash-hide 0.4s ease-out forwards 0.7s;
  }
  
  /* Texte + bouton - comme le modèle */
  .text {
    opacity: 0;
    position: absolute;
    z-index: 2007;
    text-align: left;
    margin: -50px 0 0 -150px;
    width: 360px;
    height: auto;
    min-height: 100px;
    top: 50%;
    left: 50%;
    font-size: 48px;
    font-weight: 700;
    color: #ffffff;
    font-family: 'Nunito', sans-serif;
    animation: splash-on 0.6s ease-in-out 2.0s forwards;
    box-sizing: border-box;
  }
  
  .text p {
    margin: 0 0 8px 0;
    white-space: nowrap;
    overflow: hidden;
    width: 100%;
    animation: splash-type 0.3s steps(60, end) 2.0s;
  }
  
  .text p:nth-child(2) {
    animation: splash-type2 0.5s steps(60, end) 2.0s;
  }
  
  .text button.splash-more-btn {
    border: 0;
    opacity: 0;
    background: #191919;
    color: var(--accent);
    border: 1px solid #191919;
    letter-spacing: 2px;
    padding: 0.5rem 2.5rem;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 12px;
    transition: color 0.5s, background-color 0.5s;
    animation: splash-on 0.6s ease-in-out 2.3s forwards;
  }
  
  .text button.splash-more-btn:hover {
    background: var(--accent);
    color: #191919;
    border: 1px solid #191919;
  }
  
  /* Hide splash on class */
  .splash.splash-hidden {
    animation: splash-off 0.6s ease-in-out forwards;
  }
  
  /* Hide text on class - même animation que splash */
  .text.text-hidden {
    animation: splash-off 0.6s ease-in-out forwards;
  }
  
  /* Splash Watermark */
  .splash-watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(60px, 18vw, 300px);
    font-weight: 900;
    color: rgba(255, 255, 255, 0.04);
    z-index: 2005; /* Behind .text (2007) */
    pointer-events: none;
    white-space: nowrap;
    opacity: 0;
    letter-spacing: 0.1em;
    animation: splash-on 1s ease-in-out 1.8s forwards;
    user-select: none;
  }
  
  /* Hide watermark on splash dismissal */
  .splash-watermark.watermark-hidden {
    animation: splash-off 0.6s ease-in-out forwards;
  }
  
  /* Responsive Watermark */
  @media (max-width: 768px) {
    .splash-watermark {
      font-size: 15vw;
      writing-mode: vertical-rl; /* Vertical text on mobile for style */
      text-orientation: mixed;
      letter-spacing: 0.3em;
    }
  }
  
  /* ===================== SPLASH SCREEN RESPONSIVE ===================== */
  
  /* Responsive pour tablette (768px - 1024px) */
  @media (min-width: 768px) and (max-width: 1024px) {
    .splash_logo {
      margin: calc(-15px * 0.9) 0 0 calc(-25px * 0.9) !important;
      width: clamp(45px, 4.5vw, 50px) !important;
      height: clamp(27px, 2.7vh, 30px) !important;
      font-size: clamp(23px, 2.3vw, 26px) !important;
    }
  
    .splash_logo::before,
    .splash_logo::after {
      left: clamp(13px, 1.3vw, 15px) !important;
      width: clamp(18px, 1.8vw, 20px) !important;
    }
  
    /* Carré parfait pour tablette (160px => 80px radius) */
    .splash_svg rect {
      -webkit-clip-path: polygon(calc(50vw - 80px) calc(50vh - 80px), calc(50vw + 80px) calc(50vh - 80px), calc(50vw + 80px) calc(50vh + 80px), calc(50vw - 80px) calc(50vh + 80px));
      clip-path: polygon(calc(50vw - 80px) calc(50vh - 80px), calc(50vw + 80px) calc(50vh - 80px), calc(50vw + 80px) calc(50vh + 80px), calc(50vw - 80px) calc(50vh + 80px));
      animation: splash-expand-tablet 0.8s cubic-bezier(0.7, 0, 0.3, 1) forwards 1.1s;
    }
  
    .splash_minimize rect {
      -webkit-clip-path: polygon(calc(50vw - 80px) calc(50vh - 80px), calc(50vw + 80px) calc(50vh - 80px), calc(50vw + 80px) calc(50vh + 80px), calc(50vw - 80px) calc(50vh + 80px));
      clip-path: polygon(calc(50vw - 80px) calc(50vh - 80px), calc(50vw + 80px) calc(50vh - 80px), calc(50vw + 80px) calc(50vh + 80px), calc(50vw - 80px) calc(50vh + 80px));
      animation: splash-scale-tablet 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards 0.2s, splash-hide 0.4s ease-out forwards 0.7s;
    }
  
    .text {
      margin: calc(-50px * 0.85) 0 0 calc(-150px * 0.85) !important;
      width: clamp(280px, 35vw, 340px) !important;
      height: auto !important;
      font-size: clamp(36px, 4.5vw, 42px) !important;
      padding: 10px !important;
      box-sizing: border-box !important;
    }
  
    .text p {
      margin-bottom: clamp(4px, 0.5vh, 8px) !important;
    }
  
    .text button.splash-more-btn {
      padding: clamp(0.4rem, 0.5vh, 0.5rem) clamp(2rem, 2.5vw, 2.5rem) !important;
      font-size: clamp(10px, 1.2vw, 12px) !important;
      margin-top: clamp(8px, 1vh, 12px) !important;
    }
  }
  
  /* Responsive pour mobile (max-width: 767px) */
  @media (max-width: 767px) {
    .splash_logo {
      margin: calc(-15px * 0.7) 0 0 calc(-25px * 0.7) !important;
      width: clamp(40px, 9vw, 50px) !important;
      height: clamp(40px, 9vw, 50px) !important;
      font-size: clamp(20px, 4.5vw, 26px) !important;
      display: flex;
      align-items: center;
      justify-content: center;
    }
  
    .splash_logo::before,
    .splash_logo::after {
      left: 50% !important;
      transform: translateX(-50%) !important;
      width: clamp(18px, 4vw, 22px) !important;
    }
  
    .splash_logo::before {
      bottom: calc(-5px * 0.7) !important;
    }
  
    .splash_logo::after {
      top: calc(-5px * 0.7) !important;
    }
  
    /* Ajuster le clip-path initial pour mobile (Carré parfait 120px => 60px radius) */
    .splash_svg rect {
      -webkit-clip-path: polygon(calc(50vw - 60px) calc(50vh - 60px), calc(50vw + 60px) calc(50vh - 60px), calc(50vw + 60px) calc(50vh + 60px), calc(50vw - 60px) calc(50vh + 60px));
      clip-path: polygon(calc(50vw - 60px) calc(50vh - 60px), calc(50vw + 60px) calc(50vh - 60px), calc(50vw + 60px) calc(50vh + 60px), calc(50vw - 60px) calc(50vh + 60px));
      animation: splash-expand-mobile 0.8s cubic-bezier(0.7, 0, 0.3, 1) forwards 1.1s;
    }
  
    .splash_minimize rect {
      -webkit-clip-path: polygon(calc(50vw - 60px) calc(50vh - 60px), calc(50vw + 60px) calc(50vh - 60px), calc(50vw + 60px) calc(50vh + 60px), calc(50vw - 60px) calc(50vh + 60px));
      clip-path: polygon(calc(50vw - 60px) calc(50vh - 60px), calc(50vw + 60px) calc(50vh - 60px), calc(50vw + 60px) calc(50vh + 60px), calc(50vw - 60px) calc(50vh + 60px));
      animation: splash-scale-mobile 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards 0.2s, splash-hide 0.4s ease-out forwards 0.7s;
    }
  
    .text {
      margin: calc(-50px * 0.6) 0 0 calc(-150px * 0.6) !important;
      width: clamp(200px, 75vw, 280px) !important;
      max-width: calc(100vw - 40px) !important;
      height: auto !important;
      font-size: clamp(24px, 6vw, 32px) !important;
      padding: clamp(10px, 2.5vw, 15px) !important;
      box-sizing: border-box !important;
    }
  
    .text p {
      margin-bottom: clamp(3px, 0.8vh, 6px) !important;
      white-space: nowrap !important;
    }
  
    .text button.splash-more-btn {
      padding: clamp(0.45rem, 1vh, 0.55rem) clamp(1.5rem, 4vw, 2rem) !important;
      font-size: clamp(10px, 2.5vw, 11px) !important;
      margin-top: clamp(10px, 2vh, 15px) !important;
      width: 100% !important;
      max-width: 200px !important;
    }
  }
  
  /* Splash keyframes - selon le modèle */
  @keyframes splash-scale {
    100% {
      -webkit-clip-path: polygon(45vw 40vh, 55vw 40vh, 55vw 60vh, 45vw 60vh);
      clip-path: polygon(45vw 40vh, 55vw 40vh, 55vw 60vh, 45vw 60vh);
    }
  }
  
  @keyframes splash-hide {
    100% {
      fill: transparent;
    }
  }
  
  @keyframes splash-off {
    100% {
      opacity: 0;
    }
  }
  
  @keyframes splash-on {
    100% {
      opacity: 1;
    }
  }
  
  @keyframes splash-logo-color {
    100% {
      color: #292929;
    }
  }
  
  @keyframes splash-type {
    0% {
      width: 0;
  }
  }
  
  @keyframes splash-type2 {
    0% {
      width: 0;
    }
    50% {
      width: 0;
    }
    100% {
      width: 100%;
    }
  }
  
  @keyframes splash-expand {
    0% {}
    25% {
      -webkit-clip-path: polygon(0vw 0vh, 55vw 40vh, 55vw 60vh, 45vw 60vh);
      clip-path: polygon(0vw 0vh, 55vw 40vh, 55vw 60vh, 45vw 60vh);
      fill: #ffffff;
    }
    50% {
      -webkit-clip-path: polygon(0vw 0vh, 100vw 0vh, 55vw 60vh, 45vw 60vh);
      clip-path: polygon(0vw 0vh, 100vw 0vh, 55vw 60vh, 45vw 60vh);
      fill: var(--accent);
    }
    75% {
      -webkit-clip-path: polygon(0vw 0vh, 100vw 0vh, 55vw 60vh, 0vw 100vh);
      clip-path: polygon(0vw 0vh, 100vw 0vh, 55vw 60vh, 0vw 100vh);
      fill: #ffffff;
    }
    100% {
      -webkit-clip-path: polygon(0vw 0vh, 100vw 0vh, 100vw 100vh, 0vw 100vh);
      clip-path: polygon(0vw 0vh, 100vw 0vh, 100vw 100vh, 0vw 100vh);
      fill: var(--accent);
    }
  }
  
  /* Keyframes responsive pour mobile */
  @media (max-width: 767px) {
    @keyframes splash-scale-mobile {
      100% {
        -webkit-clip-path: polygon(calc(50vw - 60px) calc(50vh - 60px), calc(50vw + 60px) calc(50vh - 60px), calc(50vw + 60px) calc(50vh + 60px), calc(50vw - 60px) calc(50vh + 60px));
        clip-path: polygon(calc(50vw - 60px) calc(50vh - 60px), calc(50vw + 60px) calc(50vh - 60px), calc(50vw + 60px) calc(50vh + 60px), calc(50vw - 60px) calc(50vh + 60px));
      }
    }
  
    @keyframes splash-expand-mobile {
      0% {
        -webkit-clip-path: polygon(calc(50vw - 60px) calc(50vh - 60px), calc(50vw + 60px) calc(50vh - 60px), calc(50vw + 60px) calc(50vh + 60px), calc(50vw - 60px) calc(50vh + 60px));
        clip-path: polygon(calc(50vw - 60px) calc(50vh - 60px), calc(50vw + 60px) calc(50vh - 60px), calc(50vw + 60px) calc(50vh + 60px), calc(50vw - 60px) calc(50vh + 60px));
      }
      25% {
        -webkit-clip-path: polygon(0 0, calc(50vw + 60px) calc(50vh - 60px), calc(50vw + 60px) calc(50vh + 60px), calc(50vw - 60px) calc(50vh + 60px));
        clip-path: polygon(0 0, calc(50vw + 60px) calc(50vh - 60px), calc(50vw + 60px) calc(50vh + 60px), calc(50vw - 60px) calc(50vh + 60px));
        fill: #ffffff;
      }
      50% {
        -webkit-clip-path: polygon(0 0, 100vw 0, calc(50vw + 60px) calc(50vh + 60px), calc(50vw - 60px) calc(50vh + 60px));
        clip-path: polygon(0 0, 100vw 0, calc(50vw + 60px) calc(50vh + 60px), calc(50vw - 60px) calc(50vh + 60px));
        fill: var(--accent);
      }
      75% {
        -webkit-clip-path: polygon(0 0, 100vw 0, 100vw 100vh, calc(50vw - 60px) calc(50vh + 60px));
        clip-path: polygon(0 0, 100vw 0, 100vw 100vh, calc(50vw - 60px) calc(50vh + 60px));
        fill: #ffffff;
      }
      100% {
        -webkit-clip-path: polygon(0 0, 100vw 0, 100vw 100vh, 0 100vh);
        clip-path: polygon(0 0, 100vw 0, 100vw 100vh, 0 100vh);
        fill: var(--accent);
      }
    }
  }
  
  /* Keyframes responsive pour tablette */
  @media (min-width: 768px) and (max-width: 1024px) {
    @keyframes splash-scale-tablet {
      100% {
        -webkit-clip-path: polygon(calc(50vw - 80px) calc(50vh - 80px), calc(50vw + 80px) calc(50vh - 80px), calc(50vw + 80px) calc(50vh + 80px), calc(50vw - 80px) calc(50vh + 80px));
        clip-path: polygon(calc(50vw - 80px) calc(50vh - 80px), calc(50vw + 80px) calc(50vh - 80px), calc(50vw + 80px) calc(50vh + 80px), calc(50vw - 80px) calc(50vh + 80px));
      }
    }
  
    @keyframes splash-expand-tablet {
      0% {
        -webkit-clip-path: polygon(calc(50vw - 80px) calc(50vh - 80px), calc(50vw + 80px) calc(50vh - 80px), calc(50vw + 80px) calc(50vh + 80px), calc(50vw - 80px) calc(50vh + 80px));
        clip-path: polygon(calc(50vw - 80px) calc(50vh - 80px), calc(50vw + 80px) calc(50vh - 80px), calc(50vw + 80px) calc(50vh + 80px), calc(50vw - 80px) calc(50vh + 80px));
      }
      25% {
        -webkit-clip-path: polygon(0 0, calc(50vw + 80px) calc(50vh - 80px), calc(50vw + 80px) calc(50vh + 80px), calc(50vw - 80px) calc(50vh + 80px));
        clip-path: polygon(0 0, calc(50vw + 80px) calc(50vh - 80px), calc(50vw + 80px) calc(50vh + 80px), calc(50vw - 80px) calc(50vh + 80px));
        fill: #ffffff;
      }
      50% {
        -webkit-clip-path: polygon(0 0, 100vw 0, calc(50vw + 80px) calc(50vh + 80px), calc(50vw - 80px) calc(50vh + 80px));
        clip-path: polygon(0 0, 100vw 0, calc(50vw + 80px) calc(50vh + 80px), calc(50vw - 80px) calc(50vh + 80px));
        fill: var(--accent);
      }
      75% {
        -webkit-clip-path: polygon(0 0, 100vw 0, 100vw 100vh, calc(50vw - 80px) calc(50vh + 80px));
        clip-path: polygon(0 0, 100vw 0, 100vw 100vh, calc(50vw - 80px) calc(50vh + 80px));
        fill: #ffffff;
      }
      100% {
        -webkit-clip-path: polygon(0 0, 100vw 0, 100vw 100vh, 0 100vh);
        clip-path: polygon(0 0, 100vw 0, 100vw 100vh, 0 100vh);
        fill: var(--accent);
      }
    }
  }
  
  /* Animation d'apparition moderne */
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* Photo de profil Splash Screen */
  .splash-portrait-container {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 30px rgba(0, 120, 212, 0.4);
    z-index: 2007;
    opacity: 0;
    /* Positionnement au-dessus du texte : translate(-50%, -50%) centre, on décale vers le haut */
    transform: translate(-50%, -160%);
    animation: splash-on 0.6s ease-in-out 1.8s forwards; /* Apparaît un peu avant le texte */
  }
  
  .splash-portrait-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.2);
    transition: transform 0.5s ease;
    transform: scale(1.3);
    display: block;
  }
  .splash-portrait-container .overlay {
    position: absolute;
    inset: 0;
    background: transparent;
    cursor: default;
  }
  
  .splash-portrait-container:hover img {
    transform: scale(1.1);
  }
  
  /* Hide portrait on dismissal */
  .splash-portrait-container.portrait-hidden {
    animation: splash-off 0.6s ease-in-out forwards;
  }
  
  /* Responsive Splash Portrait */
  @media (max-width: 768px) {
    .splash-portrait-container {
      width: 100px;
      height: 100px;
      transform: translate(-50%, -190%);
    }
  }
  