 @supports (background-image: url(../images/banner/castel-slide-1920x550-new-2bis.webp)) {
     .banner {
         background-image: url(../images/banner/castel-slide-1920x550-new-2bis.webp) !important;
     }
 }

 .banner {
     font-family: 'Times New Roman', sans-serif;
     width: 1920px;
     height: 550px;
     margin: 0 auto;
     padding: 2rem;
     text-align: center;
     display: flex;
     flex-direction: column;
     justify-content: center;
     background-image: url(../images/banner/castel-slide-1920x550-new-2bis.jpg);
     background-size: cover;
     background-position: center;
     background-repeat: no-repeat;
     position: relative;
 }

 .banner::before {
     content: '';
     position: absolute;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     /* background: rgba(247, 247, 247, 0.4); */
     z-index: 0;
 }

 .banner h1,
 .castel-container {
     position: relative;
     z-index: 1;
 }

 .banner h1 {
     color: white;
     margin-bottom: 4rem;
     font-size: 32px !important;
     font-weight: 600;
     opacity: 0;
     animation: fadeIn 1s ease forwards;
 }


 .castel-container {
     display: flex;
     justify-content: center;
     gap: 2rem;
 }

 .letter-box {
     position: relative;
     width: 150px;
     height: 150px;
     /* Ajusté pour le nouveau ratio SVG */
     cursor: pointer;
     opacity: 0;
 }

 .letter-box:hover {
     transform: translateY(-5px);
 }


 @keyframes showWord {
     0% {
         opacity: 0;
         transform: translateX(-50%) translateY(10px);
     }

     100% {
         opacity: 1;
         transform: translateX(-50%) translateY(0);
     }
 }

 .letter-box::after {
     content: attr(data-word);
     position: absolute;
     bottom: -40px;
     left: 50%;
     transform: translateX(-50%);
     font-size: 2rem;
     font-weight: 600;
     opacity: 0;
     white-space: nowrap;
     font-family: 'Simonetta', sans-serif;
 }

 /* Animation séquentielle initiale */
 .letter-box:nth-child(1)::after {
     animation: showWord 1s ease 2s forwards;
 }

 .letter-box:nth-child(2)::after {
     animation: showWord 1s ease 3s forwards;
 }

 .letter-box:nth-child(3)::after {
     animation: showWord 1s ease 4s forwards;
 }

 .letter-box:nth-child(4)::after {
     animation: showWord 1s ease 5s forwards;
 }

 .letter-box:nth-child(5)::after {
     animation: showWord 1s ease 6s forwards;
 }

 .letter-box:nth-child(6)::after {
     animation: showWord 1s ease 7s forwards;
 }

 /* Classe pour garder les définitions visibles après l'animation */
 .definitions-visible .letter-box::after {
     opacity: 1;
     transform: translateX(-50%) translateY(0);
 }

 /* .letter-box::after {
     content: attr(data-word);
     position: absolute;
     bottom: -40px;
     left: 50%;
     transform: translateX(-50%);
     font-size: 2.5rem;
     font-weight: 600;
     opacity: 0;
     transition: opacity 0.3s ease;
     white-space: nowrap;
     font-family: 'Simonetta', sans-serif;
 } */



 .hexagon {
     width: 100%;
     height: 100%;
     transition: transform 0.3s ease;
 }

 .letter {
     font-family: 'Times New Roman', sans-serif;
     font-size: 40px;
     font-weight: 600;
     fill: white;
 }

 /* Couleurs des hexagones */
 .blue {
     color: #2563eb;
 }

 .letter-box[data-word="Conseil"]::after {
     color: white;
     font-family: 'Simonetta', sans-serif;
 }

 .green {
     color: #16a34a;
 }

 .letter-box[data-word="Accompagnement"]::after {
     color: white;
     font-family: 'Simonetta', sans-serif;
 }

 .red {
     color: #dc2626;
 }

 .letter-box[data-word="Stratégie"]::after {
     color: white;
     font-family: 'Simonetta', sans-serif;
 }

 .orange {
     color: #d97706;
 }

 .letter-box[data-word="Transparence"]::after {
     color: white;
     font-family: 'Simonetta', sans-serif;
 }

 .gray {
     color: #4b5563;
 }

 .letter-box[data-word="Éthique"]::after {
     color: white;
     font-family: 'Simonetta', sans-serif;
 }

 .brown {
     color: #854d0e;
 }

 .letter-box[data-word="Local"]::after {
     color: white;
     font-family: 'Simonetta', sans-serif;
 }

 /* Animations */
 @keyframes fadeIn {
     from {
         opacity: 0;
         transform: translateY(-20px);
     }

     to {
         opacity: 1;
         transform: translateY(0);
     }
 }

 .letter-box:nth-child(1) {
     animation: fadeIn 0.5s ease forwards 0.5s;
 }

 .letter-box:nth-child(2) {
     animation: fadeIn 0.5s ease forwards 0.7s;
 }

 .letter-box:nth-child(3) {
     animation: fadeIn 0.5s ease forwards 0.9s;
 }

 .letter-box:nth-child(4) {
     animation: fadeIn 0.5s ease forwards 1.1s;
 }

 .letter-box:nth-child(5) {
     animation: fadeIn 0.5s ease forwards 1.3s;
 }

 .letter-box:nth-child(6) {
     animation: fadeIn 0.5s ease forwards 1.5s;
 }

 @media (max-width: 1920px) {
     .banner {
         width: 100%;
         height: auto;
         min-height: 550px;
     }

     .letter-box {
         width: 150px;
         height: 150px;
     }

     .letter {
         font-size: 100px;
     }
 }

 @keyframes heartbeat {

     0%,
     100% {
         transform: scale(1);
         filter: brightness(1);
     }

     15% {
         transform: scale(1.05);
         filter: brightness(1.2);
     }

     30% {
         transform: scale(1);
         filter: brightness(1);
     }

     45% {
         transform: scale(1.03);
         filter: brightness(1.1);
     }

     60% {
         transform: scale(1);
         filter: brightness(1);
     }
 }

 .letter-box polygon,
 .letter-box text {
     transform-origin: center;
     transition: transform 0.3s ease;
 }

 /* Animation séquentielle */
 @keyframes sequence {

     0%,
     15% {
         --active: 0;
     }

     16%,
     31% {
         --active: 1;
     }

     32%,
     47% {
         --active: 2;
     }

     48%,
     63% {
         --active: 3;
     }

     64%,
     79% {
         --active: 4;
     }

     80%,
     95% {
         --active: 5;
     }

     96%,
     100% {
         --active: 0;
     }
 }

 .castel-container.beating {
     animation: sequence 12s infinite;
 }

 .castel-container.beating .letter-box:nth-child(1) polygon,
 .castel-container.beating .letter-box:nth-child(1) text {
     animation: heartbeat 2s ease-in-out infinite;
     animation-play-state: paused;
 }

 .castel-container.beating .letter-box:nth-child(2) polygon,
 .castel-container.beating .letter-box:nth-child(2) text {
     animation: heartbeat 2s ease-in-out infinite;
     animation-play-state: paused;
 }

 .castel-container.beating .letter-box:nth-child(3) polygon,
 .castel-container.beating .letter-box:nth-child(3) text {
     animation: heartbeat 2s ease-in-out infinite;
     animation-play-state: paused;
 }

 .castel-container.beating .letter-box:nth-child(4) polygon,
 .castel-container.beating .letter-box:nth-child(4) text {
     animation: heartbeat 2s ease-in-out infinite;
     animation-play-state: paused;
 }

 .castel-container.beating .letter-box:nth-child(5) polygon,
 .castel-container.beating .letter-box:nth-child(5) text {
     animation: heartbeat 2s ease-in-out infinite;
     animation-play-state: paused;
 }

 .castel-container.beating .letter-box:nth-child(6) polygon,
 .castel-container.beating .letter-box:nth-child(6) text {
     animation: heartbeat 2s ease-in-out infinite;
     animation-play-state: paused;
 }

 /* Animation active seulement pour la lettre courante */
 .castel-container.beating[style*="--active: 0"] .letter-box:nth-child(1) polygon,
 .castel-container.beating[style*="--active: 0"] .letter-box:nth-child(1) text {
     animation-play-state: running;
 }

 .castel-container.beating[style*="--active: 1"] .letter-box:nth-child(2) polygon,
 .castel-container.beating[style*="--active: 1"] .letter-box:nth-child(2) text {
     animation-play-state: running;
 }

 .castel-container.beating[style*="--active: 2"] .letter-box:nth-child(3) polygon,
 .castel-container.beating[style*="--active: 2"] .letter-box:nth-child(3) text {
     animation-play-state: running;
 }

 .castel-container.beating[style*="--active: 3"] .letter-box:nth-child(4) polygon,
 .castel-container.beating[style*="--active: 3"] .letter-box:nth-child(4) text {
     animation-play-state: running;
 }

 .castel-container.beating[style*="--active: 4"] .letter-box:nth-child(5) polygon,
 .castel-container.beating[style*="--active: 4"] .letter-box:nth-child(5) text {
     animation-play-state: running;
 }

 .castel-container.beating[style*="--active: 5"] .letter-box:nth-child(6) polygon,
 .castel-container.beating[style*="--active: 5"] .letter-box:nth-child(6) text {
     animation-play-state: running;
 }



 /* Tablette */
 @media (max-width: 768px) {
     .banner {
         height: 400px;
     }

     .letter-box {
         width: 100px;
         height: 100px;
     }

     .letter {
         font-size: 60px;
     }

     .letter-box::after {
         font-size: 1.5rem;
     }
 }

 @media (max-width: 640px) {
     .banner {
         height: 300px;
     }

     .letter-box {
         width: 80px;
         height: 80px;
     }

     .letter {
         font-size: 60px;
     }

     .letter-box::after {
         font-size: 1.2rem;
     }
 }

 @media (max-width: 480px) {
     .banner {
         height: 250px;
     }

     .letter-box {
         width: 60px;
         height: 60px;
     }

     .letter {
         font-size: 60px;
     }

     .letter-box::after {
         font-size: 0.8rem;
     }
 }