*,
*::after,
*::before {
    box-sizing: border-box;
}

:root {
    font-size: 15px;
    
}

body {
    margin: 0;
    --color-text: #9f93b0;
    --color-bg: #ffffff;
    --color-link: rgba(255,255,255,0.7);
    --color-link-hover: #9f93b0;
    color: var(--color-text);
    background-color: var(--color-bg);
    font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif;
    font-weight: 500;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Page Loader */
.js .loading::before,
.js .loading::after {
    content: '';
    position: fixed;
    z-index: 1000;
}

.js .loading::before {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
}

.js .loading::after {
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    margin: -30px 0 0 -30px;
    border-radius: 50%;
    opacity: 0.4;
    background: var(--color-link);
    animation: loaderAnim 0.7s linear infinite alternate forwards;

}

@keyframes loaderAnim {
    to {
        opacity: 1;
        transform: scale3d(0.5,0.5,1);
    }
}

a {
    text-decoration: none;
    color: var(--color-link);
    outline: none;
}

a:hover {
    color: var(--color-link-hover);
    outline: none;
}

/* Better focus styles from https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible */
a:focus {
    /* Provide a fallback style for browsers
	 that don't support :focus-visible */
    outline: none;
    background: lightgrey;
}

a:focus:not(:focus-visible) {
    /* Remove the focus indicator on mouse-focus for browsers
	 that do support :focus-visible */
    background: transparent;
}

a:focus-visible {
    /* Draw a very noticeable focus style for
	 keyboard-focus on browsers that do support
	 :focus-visible */
    outline: 2px solid #fff;
    background: transparent;
}

.unbutton {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    cursor: pointer;
}

.unbutton:focus {
    outline: none;
}

body,
main {
    width: min-content;
}

.frame {
    z-index: 100;
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    padding: 1.5rem 2rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: 'title links sponsor' 'credits credits credits';
    grid-column-gap: 3vw;
    grid-row-gap: 1rem;
    justify-content: space-between;
    align-content: space-between;
    text-align: left;
}

.frame a {
    pointer-events: auto;
}

.frame__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    grid-area: title;
}

.frame__links {
    grid-area: links;
}

.frame__links a:not(:last-child) {
    margin-right: 1rem;
}

.frame__credits {
    grid-area: credits;
}

.grid {
    height: 65vh;
    margin-top: 17.5vh;
    display: grid;
    grid-auto-columns: 23.5vw;
    grid-auto-flow: column;
    width: min-content;
    gap: 2vw;
}

.grid__item {
    position: relative; /* nécessaire pour le pseudo-élément */
    height: 100%;
    background-size: cover;
    background-position: 50% 50%;
    border-radius: 5rem;
    z-index: 1;
}

/* Bord animé */
.grid__item::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 4px; /* épaisseur du bord */
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        #000000,
        #ff0000,
        #ffffff,
        #ff0000,
        #000000
    );
    background-size: 400% 400%;
    animation: animBorder 6s linear infinite;
    
    /* masque pour garder le centre transparent */
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

@keyframes animBorder {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}


@media screen and (min-width: 53em) {
    .frame {
        height: 100vh;
        align-items: space-between;
    }
}

@media screen and (max-width: 768px) {
    body,
    main {
        width: 100%;
        overflow-x: hidden; /* Empêche le défilement horizontal sur mobile */
    }
    
    .grid {
        height: auto; /* Hauteur automatique pour le contenu vertical */
        margin-top: 80px; /* Espace pour la navbar */
        width: 90%; /* Largeur de la grille sur mobile */
        margin-left: auto;
        margin-right: auto;
        
        /* Configuration pour l'affichage vertical */
        grid-auto-flow: row !important; /* Force l'affichage en lignes */
        grid-auto-rows: 70vh; /* Hauteur de chaque élément */
        grid-auto-columns: 100%; /* Largeur complète */
        gap: 20px; /* Espacement entre éléments */
    }
    
    .grid__item {
        width: 100%;
        min-height: 300px; /* Hauteur minimale */
    }
}


  
  .hero-video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
  }
  
  .hero-content {
    position: relative;
    z-index: 1;
    color: white;
    text-align: center;
    max-width: 80%;
    padding: 2rem;
    background: transparent; /* semi-transparent overlay */
    border-radius: 16px;
  }
  
  .hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
  }
  
  .hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
  }
  
  .cta-btn {
    padding: 1rem 2rem;
    background-color: #ff4d4f;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 8px;
    transition: background-color 0.3s ease;
  }
  
  .cta-btn:hover {
    background-color: #d9363e;
  }
   /* 2eme card*/
   .usecase-card {
    position: relative;
    width: 100vw;
    height: 100vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
  }
  
  .usecase-overlay {
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    padding: 2rem;
    border-radius: 16px 16px 0 0;
    text-align: center;
    color: white;
    width: 100%;
    max-width: 600px;
    animation: fadeInUp 1s ease forwards;
  }
  
  .usecase-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
  }
  
  .usecase-overlay h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
  }
  
  .usecase-overlay p {
    font-size: 1.2rem;
    line-height: 1.5;
  }
  
  /* Simple animation */
  @keyframes fadeInUp {
    from {
      transform: translateY(20px);
      opacity: 0;
    }
    to {
      transform: translateY(0px);
      opacity: 1;
    }
  }
  .logo {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    height: 60px; /* ou ajustable selon ton header */
    position: static;
    top: auto;
    left: auto;
    z-index: auto;
}
.logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
    vertical-align: middle;
}
.logo-li {
    margin-right: 1.5em;
    display: flex;
    align-items: center;
}

.tren-red {
    color: #e53935 !important;
}
.tren-black {
    color: #070707 !important;
}