.logo {
  font-family: 'Milling Trial Triplex 2,5mm', sans-serif !important;
  font-size: 4em;
  margin: 0;
  margin-bottom: 3px;
  margin-top: -5px;
  margin-left: -16px;
  color: var(--main-color);
  transform: scaleX(0.9);
  text-decoration: none;
  display: inline-block;
}

:root {
  --main-color: #0A1E40;
  --play-button-color: #F5F5F5;
}

@font-face {
  font-family: 'Milling Trial Triplex 2,5mm';
  src: url('fonts/MillingTrial-Triplex25mm.otf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@media screen and (min-width: 414px) and (max-width: 768px) {
  header {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    padding: 10px 20px;
    justify-content: space-between;
  }

  .mobile-divider {
    display: none;
    border: none;
    border-top: none;
    width: 100vw;
    margin: 4px 0;
    position: static;
    left: 50%;
    transform: translateX(-50%);
    opacity: 90%;
  }

  .logo-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: auto;
  }

  .other-projects {
  display: none;
  text-align: center;
  margin-top: 90px;
  }

.other-projects ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.other-projects li {
  margin: 12px 0;
}

.other-projects a {
  color: var(--main-color);
  text-decoration: none;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 1em;
  opacity: 80%;
}

.other-projects {
    display: none;
  }

    .dropdown-active .other-projects {
    opacity: 0;
    pointer-events: none;
  }

  .logo {
    font-size: 2.8em;
    font-family: 'Milling Trial Triplex 2,5mm', sans-serif !important;
    margin-right: 20px;
    flex-shrink: 0;
  }

  .subtitle {
    display: block;
    font-size: 0.4em;
    margin-top: 3px;
    margin-left: -4px;
    text-align: left;
    color: var(--main-color);
  }

  nav {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-end;
    padding-left: 0;
    margin-left: 0;
    height: 100%;
    font-size: 0.7em;
    opacity: 90%;
    position: relative;
    z-index: 9999;
    gap: 0 !important;
  }

  .dropdown {
    position: relative;
    overflow: visible;
    z-index: 9999;
    align-self: flex-start;
  }

  nav > a,
  nav > div.dropdown {
    padding-left: 0;
    margin-left: 0;
    width: auto;
    text-align: right;
    margin-bottom: 4px;
    align-self: flex-end;
  }

  .dropdown > a {
    padding-left: 0;
  }

  .dropdown,
  nav > a {
    width: auto;
  }

  .dropdown-content {
    position: absolute;
    display: none;
    background-color: #F5F5F5;
    width: max-content;
    min-width: 100vw;
    padding: 10px 0;
    border-top: none;
    animation: dropdownFadeSlide 0.3s ease forwards;
    top: 100%;
    right: 0;
    left: auto;
    transform-origin: top;
  }

    .side-text {
    position: static; /* plus fixed, pour ne pas gêner */
    width: auto;
    max-width: 100%;
    font-size: 1em;
    text-align: center;
    margin: 10px 0;
    margin-bottom: 10px;
    pointer-events: auto; /* pour pouvoir sélectionner si besoin */
    user-select: text;
  }
  
  .side-text.left,
  .side-text.right {
    margin-bottom: 10px;
    margin-top: 10px;
    left: auto;
    right: auto;
    top: auto;
  }

  .side-text.right {
    margin-bottom: 120px;
  }
  /* On peut les placer dans main en colonne */
  main {
    padding-top: 160px; /* réduire le padding si besoin */
  }
  
  /* Si tu veux, tu peux aussi réordonner avec flexbox */
  main {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .side-text.left {
    order: -2; /* pour qu'elle soit au dessus */
  }
  
  .side-text.right {
    order: -1; /* en dessous du reste */
  }

  .dropdown.open .dropdown-content {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: scaleY(1);
  }

  .dropdown-content a {
    transform: none !important;
    opacity: 1 !important;
    transition: none;
    padding: 10px 20px;
    font-size: 1.3em;
    display: block;
  }

  .dropdown-toggle {
    display: inline-block;
    position: relative;
    width: 100%;
    transition: transform 0.3s ease;
    cursor: pointer;
    z-index: 10000;
  }

  .dropdown.open .dropdown-toggle {
    position: fixed;
    top: 10px;
    left: 0;
    width: 100vw;
    background-color: #F5F5F5;
    padding: 10px 20px;
    z-index: 10000;
  }

  @keyframes dropdownFadeSlide {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  body.dropdown-mode header > .logo-container,
  body.dropdown-mode nav > .dropdown:not(.open),
  body.dropdown-mode nav > a,
  body.dropdown-mode main {
    display: none !important;
  }

body.dropdown-mode .other-projects {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -1 !important;
    position: relative !important;
  }

  body.dropdown-mode .dropdown.open {
    width: 100vw;
  }

  body.dropdown-mode .dropdown.open .dropdown-toggle {
    position: fixed;
    top: 10px;
    left: 0;
    width: 100vw;
    background-color: #F5F5F5;
    padding: 10px 20px;
    margin-left: 70px;
    z-index: 10000;
  }

  body.dropdown-mode .dropdown.open .dropdown-content {
    display: block !important;
    position: fixed;
    top: 50px;
    left: 0px;
    width: 100vw;
    border-top: none;
    z-index: 9999;
  }

  body.dropdown-mode .dropdown.open .dropdown-toggle {
    animation: moveAndGrow 0.4s ease forwards;
  }

  @keyframes moveAndGrow {
    from {
      transform: translateX(50%) scale(1);
      font-size: 1em;
      text-align: center;
    }
    to {
      transform: translateX(5%) scale(1.4);
      font-size: 1.4em;
      text-align: left;
    }
  }

  @keyframes slideOut {
    from {
      transform: translateX(0) scale(1.4);
      font-size: 1.4em;
      text-align: left;
    }
    to {
      transform: translateX(50%) scale(1);
      font-size: 1em;
      text-align: center;
    }
  }

  .dropdown-toggle.animate-in {
    animation: moveAndGrow 0.4s ease forwards;
  }

  .dropdown-toggle.animate-out {
    animation: slideOut 0.4s ease forwards;
  }

  .dropdown-toggle.return-transition {
    transition: transform 0.4s ease, font-size 0.4s ease;
    transform: translateX(0) scale(1);
    font-size: 1em;
  }

  .video-wrapper {
    width: 105% !important;
    max-width: 105% !important;
    margin-left: -10px;  /* Ajuste en fonction de tes paddings globaux */
    margin-right: -10px;
  }

    h2 {
    font-size: 0.75em;
    text-align: left;
    margin-left: -10px;
    margin-right: auto;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: visible;
    text-overflow: unset;
    max-width: none;
  }

  video {
    width: 100% !important;
    height: auto !important;
  }
}

@media screen and (max-width: 413px) {
    header {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    padding: 10px 20px;
    justify-content: space-between;
  }

  .mobile-divider {
    border-top: none;
    width: 100vw;
    margin: 4px 0;
  }

  .logo-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: auto;
  }

  .logo {
    font-size: 2.3em;
    font-family: 'Milling Trial Triplex 2,5mm', sans-serif !important;
    margin-right: 20px;
    flex-shrink: 0;
  }

  .subtitle {
    display: block;
    font-size: 0.2em;
    margin-top: 2px;
    margin-left: -4px;
    text-align: left;
    color: var(--main-color);
  }

      .other-projects {
    display: none;
  }

    body.dropdown-mode .other-projects {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: -1 !important;
  position: relative !important;
}


  nav {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    padding-left: 10px;
    margin-left: 0;
    height: 100%;
    font-size: 0.6em;
    opacity: 90%;
    position: relative;
    z-index: 9999;
    gap: 0 !important;
  }

  .dropdown {
    position: relative;
    overflow: visible;
    z-index: 9999;
    align-self: flex-start;
  }

  nav > a,
  nav > div.dropdown {
    padding-left: 0;
    margin-left: 0;
    width: 100%;
    text-align: right;
    margin-bottom: 4px;
  }

  .dropdown > a {
    padding-left: 0;
  }

  .dropdown,
  nav > a {
    width: auto;
  }

  .dropdown-content {
    position: absolute;
    display: none;
    background-color: #F5F5F5;
    width: max-content;
    min-width: 100vw;
    padding: 10px 0;
    border-top: none;
    animation: dropdownFadeSlide 0.3s ease forwards;
    top: 100%;
    right: 0;
    left: auto;
    transform-origin: top;
  }

  .side-text {
    position: static; /* plus fixed, pour ne pas gêner */
    width: auto;
    max-width: 100%;
    font-size: 0.8em;
    text-align: center;
    margin: 10px 0;
    margin-bottom: 10px;
    pointer-events: auto; /* pour pouvoir sélectionner si besoin */
    user-select: text;
  }
  
  .side-text.left,
  .side-text.right {
    margin-bottom: 10px;
    margin-top: 10px;
    left: auto;
    right: auto;
    top: auto;
  }
    .side-text.right {
    margin-bottom: 70px;
  }
  .side-text.left {
    margin-top: -30px;
  }
  
  /* On peut les placer dans main en colonne */
  main {
    padding-top: 160px; /* réduire le padding si besoin */
  }
  
  /* Si tu veux, tu peux aussi réordonner avec flexbox */
  main {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .side-text.left {
    order: -2; /* pour qu'elle soit au dessus */
  }
  
  .side-text.right {
    order: -1; /* en dessous du reste */
  }

  .dropdown.open .dropdown-content {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: scaleY(1);
  }

  .dropdown-content a {
    transform: none !important;
    opacity: 1 !important;
    transition: none;
    padding: 10px 20px;
    font-size: 1.3em;
    display: block;
  }

  .dropdown-toggle {
    display: inline-block;
    position: relative;
    width: 100%;
    transition: transform 0.3s ease;
    cursor: pointer;
    z-index: 10000;
  }

  .dropdown.open .dropdown-toggle {
    position: fixed;
    top: 10px;
    left: 0;
    width: 100vw;
    background-color: #F5F5F5;
    padding: 10px 20px;
    z-index: 10000;
  }

  @keyframes dropdownFadeSlide {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  body.dropdown-mode header > .logo-container,
  body.dropdown-mode nav > .dropdown:not(.open),
  body.dropdown-mode nav > a,
  body.dropdown-mode main {
    display: none !important;
  }

  body.dropdown-mode .dropdown.open {
    width: 100vw;
  }

  body.dropdown-mode .dropdown.open .dropdown-toggle {
    position: fixed;
    top: 10px;
    left: 0;
    width: 100vw;
    background-color: #F5F5F5;
    padding: 10px 20px;
    margin-left: 70px;
    z-index: 10000;
  }

  body.dropdown-mode .dropdown.open .dropdown-content {
    display: block !important;
    position: fixed;
    top: 50px;
    left: 0px;
    width: 100vw;
    border-top: none;
    z-index: 9999;
  }

  body.dropdown-mode .dropdown.open .dropdown-toggle {
    animation: moveAndGrow 0.4s ease forwards;
  }

  @keyframes moveAndGrow {
    from {
      transform: translateX(50%) scale(1);
      font-size: 1em;
      text-align: center;
    }
    to {
      transform: translateX(0) scale(1.4);
      font-size: 1.4em;
      text-align: left;
    }
  }

  @keyframes slideOut {
    from {
      transform: translateX(0) scale(1.4);
      font-size: 1.4em;
      text-align: left;
    }
    to {
      transform: translateX(50%) scale(1);
      font-size: 1em;
      text-align: center;
    }
  }

  .dropdown-toggle.animate-in {
    animation: moveAndGrow 0.4s ease forwards;
  }

  .dropdown-toggle.animate-out {
    animation: slideOut 0.4s ease forwards;
  }

  .dropdown-toggle.return-transition {
    transition: transform 0.4s ease, font-size 0.4s ease;
    transform: translateX(0) scale(1);
    font-size: 1em;
  }

  .video-wrapper {
    width: 105% !important;
    max-width: 105% !important;
    margin-left: -10px;  /* Ajuste en fonction de tes paddings globaux */
    margin-right: -10px;
  }

    h2 {
    font-size: 0.65em;
    text-align: left;
    margin-left: -10px;
    margin-right: auto;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: visible;
    text-overflow: unset;
    max-width: none;
  }

  video {
    width: 100% !important;
    height: auto !important;
  }

    body.dropdown-other.other-projects {
display: none !important;
}
}