/* Tablettes (768px à 1024px) */
@media screen and (max-width: 1024px) {
  /* Navigation */
  .nav-items {
    display: none;
  }

  /* Logo */
  .logo {
    position: fixed;
    top: 2em;
    left: 2em;
    z-index: 999;
  }

  .logo img {
    width: 150px;
    height: auto;
  }

  /* Menu Toggle */
  .menu-toggle {
    display: block;
    position: fixed;
    top: 2em;
    right: 2em;
    width: 120px;
    height: 60px;
    background-color: #0f0f0f;
    border-radius: 8em;
    transition: width 0.5s cubic-bezier(0.075, 0.82, 0.165, 1);
    transform-origin: right;
    z-index: 99;
  }

  .menu-toggle.opened {
    width: 60px;
  }

  .menu-copy {
    position: absolute;
    top: 50%;
    left: 30px;
    transform: translateY(-50%);
    color: white;
    transition: left 0.5s cubic-bezier(0.075, 0.82, 0.165, 1);
    z-index: 1;
  }

  .menu-toggle-icon {
    position: absolute;
    right: 0;
    width: 60px;
    height: 60px;
    border-radius: 100%;
    clip-path: circle(10% at 50% 50%);
    background-color: #00A0D3;
    transition: all 0.5s cubic-bezier(0.075, 0.82, 0.165, 1);
    z-index: 10;
  }

  

  .slider-container {
    height: 100%;
  }

  .slide-content h1 {
    font-size: 4.5rem;
    margin-top: 1.5em;
  }

  .slide-content p {
    font-size: 1.2rem;
    max-width: 80%;
  }

  /* Services Icons */
  .services-icons {
    flex-wrap: wrap;
    gap: 2em;
    justify-content: center;
    margin-top: 15em;
    position: relative;
  }

  .service-item {
    width: calc(33.33% - 2em);
  }

  /* Menu */
  .menu {
    flex-direction: column;
  }

  .menu .col-1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: auto;
    padding-top: 8em;
    padding-bottom: 2em;
  }

  .menu .col-2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2em;
    height: auto;
  }

  .menu .col-2 .icon-menu {
    display: none;
  }

  .links {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0;
    margin-top: 0em;
    left: 5em;
  }

  .link {
    text-align: center;
    margin: 0.5em 0;
  }

  .link > a {
    text-align: center;
  }

  .sub-links {
    position: relative;
    left: 0;
    text-align: center;
    padding-left: 0;
    margin-top: 0.5em;
  }

  .sub-links a {
    text-align: center;
    margin: 0.3em 0;
  }

  .copyright {
    text-align: center;
    width: 100%;
    padding: 1em 0;
    font-size: 0.8rem;
    background-color: transparent;
  }
}

/* Mobile (moins de 768px) */
@media screen and (max-width: 768px) {
  /* Logo */
  .logo {
    top: 1.5em;
    left: 1.5em;
  }

  .logo img {
    width: 120px;
  }

  .menu-logo {
    position: fixed;
    top: 1.5em;
    left: 1.5em;
  }
  #loader-logo {
    visibility: visible;
  }
  .menu-logo img {
    width: 120px;
  }

  /* Menu Toggle */
  .menu-toggle {
    top: 1.5em;
    right: 1.5em;
    width: 120px;
    height: 60px;
  }

  .menu-toggle-icon {
    width: 60px;
    height: 60px;
  }

  /* Menu Mobile */
  .menu {
    padding-top: 5em;
    padding-bottom: 2em;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 100vh;
    width: 100%;
  }

  .menu .col-1 {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    height: auto;
    padding: 2em 1em;
    margin-left: 0;
    margin-top: 1em;
    width: 100%;
    box-sizing: border-box;
  }

  .menu .col-2 {
    display: none;
  }

  .links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
    padding-left: 2em;
    margin-top: 2em;
    width: 100%;
  }

  .link {
    text-align: left;
    width: 100%;
    margin: 0.8em 0;
  }

  .link > a {
    text-align: left;
    font-size: 1.8rem;
    position: relative;
    display: block;
    padding: 0.3em 0;
  }

  .sub-links {
    position: relative;
    left: 0;
    text-align: left;
    padding-left: 1em;
    width: 100%;
    margin-top: 0.5em;
    display: none;
  }

  .sub-links.active {
    display: block;
  }

  .sub-links a {
    text-align: left;
    margin: 0.5em 0;
    padding: 0.3em 0;
    font-size: 1rem;
    display: block;
  }

  .menu .link > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #00a0d3;
    transition: width 0.3s ease;
  }

  .menu .link > a:active::after,
  .menu .link > a.active::after {
    width: 50px;
  }

  .menu .sub-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #00a0d3;
    transition: width 0.3s ease;
  }

  .menu .sub-links a:active::after,
  .menu .sub-links a.active::after {
    width: 30px;
  }

  .copyright {
    text-align: center;
    width: 100%;
    padding: 1em 0;
    font-size: 0.8rem;
    background-color: transparent;
  }

 
  .slider-container {
    height: 100%;
    border-radius: 1em;
  }

  .slide {
    height: 100%;
  }

  .slide img {
    height: 100%;
    object-fit: cover;
  }

  .slide-content {
    padding: 0 1em;
  }

  .slide-content h1 {
    font-size: 3.5rem;
    margin-top: 2.5em;
    margin-bottom: 0.5em;
  }

  .slide-content p {
    font-size: 1rem;
    margin-bottom: 1.5em;
    padding: 0 1em;
    max-width: 100%;
  }

  .cta-button {
    padding: 0.8em 1.6em;
    font-size: 0.9rem;
  }

  /* Services Icons */
  .services-icons {
    margin-top: 10em;
    padding: 2em 1em;
  }

  .service-item {
    width: calc(50% - 2em);
  }

  /* Marquee Section */
  .marquee-section {
    margin-top: 2em;
    position: relative;
  }
  .marquee-section span {
    font-size: 1.8rem;
  }
  .links {
    margin-top: -3em;
  }

  .link {
    margin: 0.4em 0;
  }

  /* Version mobile */
  .menu .sub-links {
    position: relative;
    left: 0;
    top: 0;
    width: 100%;
    height: 0;
    overflow: hidden;
    padding-left: 20px;
    transform: none;
    transition: all 0.3s ease;
  }

  .menu .link:hover .sub-links,
  .menu .sub-links.active {
    height: auto;
    opacity: 1;
    visibility: visible;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .menu .sub-links a {
    font-size: 1rem;
    padding: 8px 0;
    transform: translateY(10px);
    opacity: 0;
    transition: all 0.3s ease;
  }

  .menu .link:hover .sub-links a,
  .menu .sub-links.active a {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0s !important; /* Supprime les délais d'animation */
  }

  .menu .sub-links a:hover {
    padding-left: 10px;
  }

  .links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding-left: 2em;
  }

  .link {
    text-align: left;
    width: 100%;
  }

  .link > a {
    text-align: left;
  }

  .sub-links {
    position: relative;
    left: 0;
    text-align: left;
    padding-left: 1em;
    width: 100%;
  }

  .sub-links a {
    text-align: left;
    margin: 0.3em 0;
    padding-left: 0;
  }

  .menu .sub-links a::after {
    left: 0;
    transform: none;
  }

  .menu .sub-links a:active::after,
  .menu .sub-links a.active::after {
    width: 30px;
  }

  /* Réalisations Section */
  .realisations-slider {
    padding: 1em;
    position: relative;
  }

  .slider-wrapper {
    overflow: hidden;
    position: relative;
  }

  .slider-track {
    display: flex;
    gap: 1em;
    touch-action: pan-y pinch-zoom;
  }

  .realisation-slide {
    flex: 0 0 85%;
    position: relative;
    margin-bottom: 1em;
    height: 350px;
    border-radius: 1em;
    overflow: hidden;
  }

  .realisation-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 1em;
  }

  .realisation-slide .slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2em;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0) 100%);
    opacity: 1;
    transform: none;
    pointer-events: none;
  }

  .realisation-slide .slide-content h1 {
    font-size: 1.8rem;
    margin: 0 0 0.5em 0;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    opacity: 1;
    transform: none;
  }

  .realisation-slide .slide-content p {
    font-size: 1rem;
    margin-bottom: 1.5em;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    opacity: 1;
    transform: none;
  }

  .realisations-slider .nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 160, 211, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    cursor: pointer;
  }

  .realisations-slider .nav-btn.prev {
    left: 10px;
  }

  .realisations-slider .nav-btn.next {
    right: 10px;
  }

  .realisations-slider .nav-btn svg {
    width: 24px;
    height: 24px;
    stroke: white;
  }

  .realisation-slide .slide-content .cta-button {
    align-self: flex-start;
    padding: 0.8em 1.6em;
    font-size: 0.9rem;
    pointer-events: auto;
    opacity: 1;
    transform: none;
  }

  .menu .sub-links {
    display: none;
  }

  /* Ajustement des boutons de navigation */
  .slider-btn.prev {
    left: 0.5rem;
  }

  .slider-btn.next {
    right: 0.5rem;
  }

  .menu .col-2 .magnetic-area {
    display: none;
  }

  .main-slider {
    height: 40em !important;
    position: relative;
    top: 6em;
  }

  .slider-container {
    height: 100%;
  }
}

/* Petits mobiles (moins de 480px) */
@media screen and (max-width: 480px) {
  /* Logo */
  .logo {
    top: 1em;
    left: 1em;
  }

  .logo img {
    width: 100px;
  }

  .menu-logo {
    top: 1em;
    left: 1em;
  }

  .menu-logo img {
    width: 100px;
  }

  /* Menu Toggle */
  .menu-toggle {
    top: 2em;
    right: 1em;
    width: 120px;
    height: 60px;
  }

  .menu-toggle-icon {
    width: 60px;
    height: 60px;
  }

 

  .slider-container {
    height: 100%;
  }

  .slide-content h1 {
    font-size: 2.8rem;
    margin-top: 1.5em;
  }

  .slide-content p {
    font-size: 0.9rem;
    padding: 0 0.5em;
  }

  .cta-button {
    padding: 0.7em 1.4em;
    font-size: 0.8rem;
  }

  /* Services Icons */
  .services-icons {
    margin-top: 8em;
  }

  .service-item {
    width: 100%;
    margin-bottom: 1.5em;
  }

  .links {
    margin-top: -2em;
  }

  .link {
    margin: 0.3em 0;
  }



  .copyright {
    padding: 0.8em 0;
    font-size: 0.7rem;
  }

  .link > a {
    font-size: 1.5rem;
  }

  .sub-links a {
    font-size: 0.9rem;
  }

  .links {
    padding-left: 1.5em;
  }
}

/* Ajustements pour les très petits écrans */
@media screen and (max-width: 320px) {
  /* Logo */
  .logo img,
  .menu-logo img {
    width: 80px;
  }

  /* Menu Toggle */
  .menu-toggle {
    width: 120px;
    height: 60px;
  }

  .menu-toggle-icon {
    width: 60px;
    height: 60px;
  }

  /* Slider principal */
  .main-slider {
    height: 65vh;
  }

  .slide-content h1 {
    font-size: 2.2rem;
    margin-top: 1.2em;
  }

  .slide-content p {
    font-size: 0.8rem;
  }

  .cta-button {
    padding: 0.6em 1.2em;
    font-size: 0.7rem;
  }
}

/* Ajustements pour les écrans en mode paysage */
@media screen and (max-height: 500px) and (orientation: landscape) {
  .main-slider {
    height: 120vh;
  }

  .slider-container {
    height: 100%;
  }

  .slide-content h1 {
    margin-top: 0.5em;
    font-size: 3rem;
  }
}

.loader-wrapper {
  background: #00A0D3;
}

.loader {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.loader img {
  position: absolute;
  width: 100px;
  height: auto;
  opacity: 0;
  transform: scale(0.8);
  animation: logoAppear 0.5s ease forwards;
  animation-delay: 0.2s;
  bottom: 12em;
  visibility: visible;
}

@keyframes logoAppear {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.slider-btn {
  background: rgba(255, 255, 255, 0.9);
}

.dot.active {
  background: #00A0D3;
}

.cta-button {
  border: 2px solid #00A0D3;
}

.cta-button::before {
  background-color: #00A0D3;
}

.service-title {
  color: #00A0D3;
}

.service-title::after {
  background-color: #00A0D3;
}



.realisations:hover ~ .cursor {
  width: 80px;
  height: 80px;
  border: none;
  background: url('./assets/logo3.png') center/contain no-repeat;
  mix-blend-mode: difference;
}

.realisations:hover ~ .cursor::after {
  display: none;
}

/* Retrait de l'effet de filtre sur le hover des slides */
.slide:hover {
  scale: 1.05;
  filter: none !important;
}

.loader-wrapper {
  background: #00A0D3;
}

/* Masquer le loader sur les pages autres que l'index */
.pages .loader-wrapper {
  display: none !important;
} 