/* ==========================================================
   mobile.css : adaptation téléphone / tablette du site
   À placer dans le même dossier que les pages .html
   (chargé en dernier dans chaque page, il complète le style existant)
   ========================================================== */

/* Sur ordinateur : le bouton menu n'existe pas, les liens restent tels quels */
.burger { display: none; }
.nav-links { display: contents; }

/* ---------- En-tête compact + menu burger (≤ 900 px) ---------- */
@media (max-width: 900px) {
  :root { --mh: 100px; }                       /* hauteur de l'en-tête */
  html, body { max-width: 100%; overflow-x: hidden; }
  body { padding-top: calc(var(--mh) + 10px) !important; }

  .top { height: var(--mh) !important; }

  /* Barre du haut : menu à gauche, panier à droite */
  .nav { position: absolute; top: 0; left: 0; right: 0; height: 52px; padding: 0 6px !important; gap: 0 !important;
         display: flex; flex-wrap: nowrap !important; justify-content: space-between !important; align-items: center;
         z-index: 2; pointer-events: none; }
  .nav > * { pointer-events: auto; }

  .burger { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
            width: 44px; height: 44px; padding: 0; background: none; border: 0; cursor: pointer; }
  .burger span { display: block; width: 22px; height: 2px; background: #111; transition: transform .25s, opacity .2s; }
  .nav.open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.open .burger span:nth-child(2) { opacity: 0; }
  .nav.open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav .cart { padding: 10px 14px; font-size: 20px; line-height: 1; }
  .nav .cart-count { top: 2px; right: 4px; }

  /* Liste des pages : panneau qui s'ouvre sous l'en-tête */
  .nav-links { display: none; position: absolute; top: var(--mh); left: 0; right: 0; flex-direction: column;
               background: rgba(255,255,255,.98); box-shadow: 0 14px 24px rgba(0,0,0,.12); padding: 4px 0 8px;
               max-height: calc(100vh - var(--mh)); overflow-y: auto; }
  .nav.open .nav-links { display: flex; }
  .nav-links a { padding: 15px 24px; font-size: 17px; border-bottom: 1px solid rgba(0,0,0,.07); text-decoration: none; }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-links a.active { font-weight: 700; box-shadow: inset 3px 0 0 #b59b5a; }

  /* Logo : nom au centre de la barre, slogan en dessous */
  .logo { position: absolute; top: 0; left: 0; right: 0; height: auto !important; padding: 0 !important; pointer-events: none; }
  .logo a { pointer-events: auto; }
  .logo .name { height: 52px !important; line-height: 52px !important; margin: 0 !important; font-size: 30px !important; }
  .logo .tagline { font-size: 13px !important; line-height: 1.25 !important; padding: 0 16px; }
}
@media (max-width: 380px) {
  .logo .name { font-size: 27px !important; }
  .logo .tagline { font-size: 12px !important; }
}

/* ---------- Contenu des pages (≤ 700 px) ---------- */
@media (max-width: 700px) {
  .credit, .credit-rights { font-size: 13px !important; padding-left: 12px; padding-right: 12px; }
  .credit-rights { padding-bottom: 14px !important; }

  /* Accueil : galerie à faire glisser au doigt, photos adaptées à l'écran */
  :root { --h: clamp(220px, 46vh, 400px) !important; }
  .carousel-wrap > .arrow { display: none; }
  .carousel { padding: var(--pad-top, 10px) 16px 10px !important; }
  .track { gap: 16px !important; }
  .carousel-img { height: auto !important; width: auto !important; max-height: var(--h); max-width: calc(100vw - 56px) !important; }
  .progress { width: 55%; }
  .lightbox-view { height: min(70vh, 620px); }

  /* Présentation */
  .page { padding: 24px 16px 16px !important; }
  main.page:has(.carousel-wrap) { padding-top: 0 !important; }
  .hero { gap: 40px !important; }
  .portrait-wrap::before { top: 12px !important; left: 12px !important; right: -12px !important; bottom: -12px !important; }
  .title { font-size: 30px !important; }
  .text p, .block p { font-size: 16px !important; }
  .divider { margin: 44px 0 !important; }
  .pull { font-size: 24px !important; margin: 28px auto !important; }
  .card { padding: 24px 20px 26px !important; }
  .card h3 { font-size: 22px !important; }
  .card p { font-size: 16px !important; }
  .media { margin: auto -20px -26px !important; }
  .cards { gap: 20px !important; }

  /* Actualité */
  .news { margin-top: 12px !important; padding: 0 12px !important; }
  .pdf-nav { width: 36px; height: 36px; font-size: 20px; }
  .pdf-link { font-size: 13px !important; }

  /* Contact */
  main:has(.contact-card) { padding: 20px 14px !important; }
  .contact-card { padding: 32px 18px !important; }
  .contact-card h1 { font-size: 34px !important; }
  .contact-card li { font-size: 15px !important; }
  .contact-card a, .contact-card button.copy { overflow-wrap: anywhere; font-size: 15px !important; }

  /* Panier */
  .wrap { width: calc(100% - 24px) !important; margin: 16px auto !important; padding: 18px 14px !important; }
  .wrap h1 { font-size: 22px !important; }
  .item .title { font-size: 15px !important; }
  .btn { padding-top: 14px; padding-bottom: 14px; }

  /* Réservation : champs à 16 px (évite le zoom automatique sur iPhone) */
  input, select, textarea { font-size: 16px !important; }
  .back { margin-top: 16px !important; }
  .places .info { flex-direction: column; gap: 4px; }
  .card #send, #send { width: 100%; text-align: center; }

  /* Boutique */
  .hero h1 { font-size: 30px !important; }
  .hero:not(.reveal) { margin: 24px auto !important; gap: 16px !important; }
  .hero p, .unique-note { font-size: 14px !important; }
  .products { gap: 12px !important; margin-bottom: 28px !important; }
  .product:hover { transform: none; }
  .product .actions button { padding: 9px 8px !important; font-size: 13px !important; }
  .soon { padding: 32px 18px !important; font-size: 15px !important; }
  .soon strong { font-size: 19px !important; }
  .modal { padding: 0 !important; }
  .modal-box { width: 100% !important; height: 100vh; height: 100dvh; max-height: none !important; grid-template-columns: 1fr !important; align-content: start; }
  .modal-img { min-height: 0 !important; }
  .modal-img img { max-height: 56vh !important; }
  .modal-info { padding: 20px 18px 28px !important; }
  .modal-info h2 { font-size: 22px !important; }
  .modal-info .price { font-size: 26px !important; }
  .modal-close { position: fixed !important; top: 12px !important; right: 12px !important; box-shadow: 0 2px 8px rgba(0,0,0,.3); }

  /* Ateliers */
  .workshop { grid-template-columns: minmax(0, 1fr) !important; }
  .details h3 { font-size: 20px !important; letter-spacing: .08em !important; }
  .infos dt { flex-basis: 74px !important; }
  .infos div { gap: 10px !important; }
  .details .btn, .private .btn, .no-workshop .btn { display: block; text-align: center; }
  .no-workshop { padding: 28px 20px 32px !important; margin-bottom: 50px !important; }
  .carousel .arrow { width: 34px; height: 34px; font-size: 20px; }
}
