/* ===============================
main
=============================== */

@media (min-width: 769px) {
  .dropdown:hover .submenu,
  .dropdown:focus-within .submenu {
    opacity: 1;

    visibility: visible;

    pointer-events: auto;

    transform: translateX(-50%) translateY(0);
  }

  .burger {
    display: none;
  }

  .header-top {
    padding: 12px 32px;

    display: flex;

    justify-content: space-between;

    align-items: center;
  }

  /* NAV HORIZONTALE */

  .main-nav {
    position: relative;

    right: auto;

    top: auto;

    width: 100%;
  }

  .main-nav > ul {
    display: flex;

    justify-content: center;

    align-items: center;

    flex-wrap: wrap;

    gap: clamp(28px, 3vw, 60px);

    width: 100%;
  }

  .main-nav a {
    font-size: clamp(1.15rem, 1.3vw, 1.5rem);

    padding: 8px 0;
  }

  .header-right {
    display: flex;

    flex-direction: row;

    gap: 12px;

    align-items: center;
  }

  .dropdown-header {
    display: block;
  }

  .submenu-toggle {
    display: none;
  }
}

/* ===============================
MOBILE
=============================== */

@media (max-width: 768px) {
  body {
    margin: 0;
    padding: 0;
  }

  .titre-principal {
    flex: 1;
    min-width: 0;
  }

  .titre-principal h2 {
    font-size: 1.1rem;

    white-space: normal;
  }

  .titre-principal p {
    font-size: 0.75rem;

    white-space: normal;
  }

  header {
    position: fixed;

    top: 0;

    left: 0;

    width: 100%;
  }

  .header-top {
    display: flex;

    justify-content: space-between;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 18px;

    padding: var(--space-xs);

    box-shadow: none;
  }

  .header-left {
    gap: 6px;

    flex: 1;
  }

  .header-right {
    gap: 6px;
  }

  .logo {
    width: 58px;
    height: auto;
    flex-shrink: 0;
  }

  .btn-rdv {
    padding: 6px 10px;

    font-size: 0.85rem;
  }

  .social-btn {
    width: 46px;
    height: 46px;

    display: flex;
    justify-content: center;
    align-items: center;

    border-radius: 14px;
  }

  .social-btn img {
    width: 26px;
    height: 26px;
    object-fit: contain;
  }

  .titre-principal h2 {
    font-size: 1rem;

    line-height: 1.05;
  }

  .titre-principal p {
    font-size: 0.72rem;
    font-weight: 900;

    line-height: 1.15;
  }

  .titre-principal .invisible {
    display: none;
  }

  .main-nav {
    display: block;

    position: fixed;

    overflow: hidden;

    max-height: 0;

    opacity: 0;

    visibility: hidden;

    transition:
      max-height 0.4s ease,
      opacity 0.3s ease;

    top: 82px;

    left: 0;

    width: 100%;

    z-index: 10000;

    background: linear-gradient(
      180deg,
      rgba(6, 72, 105, 0.94),
      rgba(5, 67, 98, 0.88)
    );

    backdrop-filter: blur(24px) saturate(180%);
  }

  .main-nav.active {
    max-height: 100vh;

    opacity: 1;

    visibility: visible;
  }

  .main-nav > ul {
    display: flex;

    flex-direction: column;

    align-items: stretch;

    gap: 20px;

    padding: 20px;

    width: 100%;
  }

  .dropdown {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .main-nav li {
    display: flex;

    justify-content: flex-end;
  }

  .main-nav a {
    display: inline-block;

    position: relative;

    width: auto;
  }

  .dropdown-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    width: 100%;
  }

  .submenu-toggle {
    background: none;
    border: none;
    color: inherit;
    font-size: 1rem;
    cursor: pointer;
    padding: 4px;
    display: none;
    transition: transform 0.3s ease;
  }

  .dropdown.active .submenu-toggle {
    transform: rotate(180deg);
  }

  .dropdown .submenu {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: stretch;

    background: none;
    box-shadow: none;
    backdrop-filter: none;

    max-height: none;
    min-height: 0;
    min-width: auto;
    width: 100%;

    overflow: visible;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    padding-top: 10px;
    padding-bottom: 10px;
    margin: 0;
    transform: none;
  }

  .submenu li {
    display: flex;
    justify-content: flex-end;
    flex: none;
  }

  .submenu a {
    display: inline-block;
    width: auto;
    font-size: 0.9rem;
    padding: 6px 0;
    opacity: 0.9;
  }

  .burger {
    display: flex;
  }

  .burger-floating {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: var(--z-burger-floating);

    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);

    transition:
      opacity 0.3s,
      transform 0.3s,
      background 0.25s;

    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);

    background: linear-gradient(135deg, #1f87bf8b, var(--primary));
    color: white;
    backdrop-filter: blur(24px) saturate(180%);
  }

  .burger-floating.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .hero-home {
    padding: 120px 20px 60px;

    min-height: auto;

    background-position: center left;
  }

  .hero-home .container {
    padding: 0;

    width: 100%;
  }

  .carousel {
    padding: 16px 32px;
    scroll-padding-inline: 56px;
  }

  .carousel-item {
    width: 100%;
    height: 360px;
  }

  .carousel img {
    height: 100%;
  }

  .profile-card {
    position: static;

    max-width: 520px;

    margin-inline: auto;
  }

  .map-card {
    min-height: auto;
  }

  .map-card iframe {
    height: 320px;
  }

  .pack {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
  }

  .btn-pack {
    width: 100px;
    height: 100px;
  }

  .btn-pack h3 {
    font-size: xx-large;
  }

  .modal {
    align-items: center;
    padding: 0;
  }

  .modal-content {
    width: 80%;
    max-width: none;

    max-height: 85vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    padding: 28px 20px;

    border-radius: 24px 24px 24px 24px; /* coins arrondis seulement en haut */

    animation: popup-mobile 0.35s;
  }

  .modal-content h2 {
    font-size: 1.2rem;
    margin-bottom: 14px;
    padding-right: 30px; /* évite que le titre passe sous la croix de fermeture */
  }

  .modal-content p,
  #modal-text {
    font-size: 0.9rem;
    line-height: 1.2;
  }

  .close-modal {
    top: 12px;
    right: 14px;
    font-size: 1.6rem;
  }

  #modal-list {
    padding-left: 1.2rem;
  }

  #modal-list li {
    font-size: 0.9rem;
  }

  #modal-price {
    font-size: 1rem;
  }

  footer {
    font-size: smaller;
  }

  footer h3 {
    font-size: medium;
  }

  .footer-container {
    grid-template-columns: 1fr;

    text-align: center;
  }

  .footer-nav ul {
    flex-direction: column;

    gap: 12px;
  }
}

@keyframes popup-mobile {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
