/* Yuunou — design mobile (v2), actif sur écran ≤ 640 px (pages marquées <html data-mv2>).
   Défilement libre. Chaque section est mise en page pour se lire d'un coup d'œil sur téléphone,
   le premier écran de l'accueil remplit l'écran, le contenu apparaît en douceur.
   Toutes les règles visent #root pour passer devant solide-responsive.css. */

@media (max-width: 640px) {
  html[data-mv2] { --nav: 73px; --screen: calc(100vh - var(--nav)); }
  @supports (height: 100svh) { html[data-mv2] { --screen: calc(100svh - var(--nav)); } }

  /* Le défilement aimanté se fait sur la page : body ne doit pas devenir un conteneur de défilement */
  html[data-mv2] body { overflow-x: visible; overflow-x: clip; }
  html[data-mv2] #root [data-s] { overflow-x: clip; }
  /* La section d'accueil avait overflow: hidden (= conteneur de défilement) : on rogne sans ce piège */
  html[data-mv2] #root [data-s=hero] { overflow: visible !important; overflow: clip !important; }
  @supports not (overflow: clip) {
    html[data-mv2] #root [data-s=hero] > [aria-hidden="true"] { display: none; }
  }

  /* ── Sections : hauteur du contenu ; le premier écran de l'accueil remplit l'écran ── */
  html[data-mv2] #root [data-mv=hero-text] {
    min-height: var(--screen);
    display: flex; flex-direction: column; justify-content: center;
  }
  html[data-mv2] #root [data-ch]:not([data-s=hero]) { padding-top: 48px !important; padding-bottom: 48px !important; }
  html[data-mv2] #root [data-s] > div:not([style*="position: absolute"]) { width: 100%; }
  /* Liens vers une section (#services, #contact…) : arrivée juste sous le menu fixe */
  html[data-mv2] #root [data-ch] { scroll-margin-top: var(--nav) !important; }
  html[data-mv2] #root [data-s] > [style*="pointer-events: none"] { display: none; }  /* pictos décoratifs */

  /* ── Apparition en douceur ── */
  html[data-mv2] .yb-rv {
    opacity: 0; transform: translateY(22px);
    transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
    transition-delay: calc(var(--i, 0) * 70ms);
  }
  html[data-mv2] .yb-rv.yb-rv-x { transform: translateX(40px); }
  html[data-mv2] .yb-rv.is-in { opacity: 1; transform: none; }

  /* ════════════════════════ ACCUEIL ════════════════════════ */

  /* 1. Accueil */
  html[data-mv2] #root [data-mv=hero-text] { padding: 20px 20px !important; }
  html[data-mv2] #root [data-s=hero] h1 { font-size: 30px !important; line-height: 1.08 !important; }
  html[data-mv2] #root [data-mv=hero-row] { margin-top: 16px !important; gap: 14px !important; }
  html[data-mv2] #root [data-mv=hero-row] p { font-size: 14.5px !important; line-height: 1.48 !important; }
  html[data-mv2] #root [data-mv=hero-ctas] { flex-wrap: nowrap !important; gap: 8px !important; }
  html[data-mv2] #root [data-mv=hero-ctas] a { padding: 13px 18px !important; font-size: 14px !important; white-space: nowrap; }
  html[data-mv2] .yb-v2-long { display: none; }
  html[data-mv2] .yb-v2-short { display: inline; }
  html[data-mv2] #root [data-mv=usp] { margin-top: 18px !important; padding-top: 14px !important; gap: 10px 18px !important; }
  html[data-mv2] #root [data-mv=usp] > div > div:nth-child(1) { margin-bottom: 6px !important; font-size: 10px !important; }
  html[data-mv2] #root [data-mv=usp] > div > div:nth-child(2) { font-size: 22px !important; margin-bottom: 4px !important; }
  html[data-mv2] #root [data-mv=usp] > div > div:nth-child(3) { font-size: 12px !important; line-height: 1.4 !important; }

  /* Photo de Moliets après l'accueil, avec l'effet de profondeur au défilement */
  html[data-mv2] #root [data-mv=band] { height: 62vh !important; height: 62svh !important; }

  /* 2. Qui sommes-nous */
  html[data-mv2] #root [data-s=intro] > div > div { gap: 14px !important; grid-template-columns: minmax(0, 1fr) !important; }
  html[data-mv2] #root [data-s=intro] > div > div > div { min-width: 0; }
  html[data-mv2] #root [data-mv=intro-small] { display: none; }
  html[data-mv2] #root [data-s=intro] > div > div > div:first-child > div:first-child { margin-bottom: 14px !important; }
  html[data-mv2] #root [data-mv=intro-map] {
    margin-top: 0 !important; width: 100% !important;
    display: grid; grid-template-columns: 58px 1fr; column-gap: 14px; align-items: center;
  }
  html[data-mv2] #root [data-mv=intro-map] img { grid-row: span 2; max-width: 58px !important; }
  html[data-mv2] #root [data-mv=intro-map] > div { margin-top: 0 !important; }
  html[data-mv2] #root [data-s=intro] p { font-size: 18.5px !important; line-height: 1.38 !important; }
  /* les trois points forts en petit carrousel */
  html[data-mv2] #root [data-mv=intro-features] {
    display: grid !important; grid-auto-flow: column; grid-template-columns: none !important;
    grid-auto-columns: 80%; gap: 12px !important;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 18px -20px 0 !important; padding: 0 20px 4px !important; scroll-padding-left: 20px;
    border-top: none !important;
  }
  html[data-mv2] #root [data-mv=intro-features]::-webkit-scrollbar { display: none; }
  html[data-mv2] #root [data-mv=intro-features] > div {
    scroll-snap-align: start; margin-top: 0 !important;
    padding: 14px 16px !important; border: none !important;
    background: rgba(8, 168, 157, 0.06); border-radius: 10px;
  }
  html[data-mv2] #root [data-mv=intro-features] > div > div:nth-child(1) { margin-bottom: 4px !important; font-size: 11px !important; }
  html[data-mv2] #root [data-mv=intro-features] > div > div:nth-child(2) { font-size: 16px !important; margin-bottom: 2px !important; }
  html[data-mv2] #root [data-mv=intro-features] > div > div:nth-child(3) { font-size: 13.5px !important; line-height: 1.45 !important; }

  /* 3. Articles */
  html[data-mv2] #root [data-s=blog] [style*="margin-bottom: 60px"] { margin-bottom: 18px !important; }

  /* 4. Services : lien « Voir tous les services » remonté sous l'introduction */
  html[data-mv2] #root #services { padding-top: 18px !important; padding-bottom: 18px !important; }
  html[data-mv2] #root [data-s=services] > div { display: flex; flex-direction: column; }
  html[data-mv2] #root [data-mv=sv-head] { margin-bottom: 0 !important; gap: 10px !important; }
  html[data-mv2] #root [data-mv=sv-head] > div > div:first-child { margin-bottom: 8px !important; }
  html[data-mv2] #root [data-mv=sv-head] h2 { font-size: 26px !important; }
  html[data-mv2] #root [data-mv=sv-head] p { font-size: 13.5px !important; line-height: 1.5 !important; }
  html[data-mv2] #root [data-mv=sv-foot] { order: 1; margin-top: 10px !important; text-align: left !important; }
  html[data-mv2] #root [data-mv=sv-foot] p { display: none; }
  html[data-mv2] #root [data-mv=sv-foot] a {
    background: none !important; color: #08a89d !important; padding: 0 !important;
    font-size: 14px !important; box-shadow: none !important;
  }
  html[data-mv2] #root [data-s=services] [data-swipe] { order: 2; margin-top: 12px !important; }
  html[data-mv2] #root [data-s=services] [data-swipe] img { aspect-ratio: 21 / 9 !important; }
  html[data-mv2] #root [data-s=services] [data-swipe] article > div:first-child { margin-bottom: 12px !important; }
  html[data-mv2] #root [data-s=services] [data-swipe] article > div:nth-child(2) { margin-bottom: 6px !important; }
  html[data-mv2] #root [data-s=services] [data-swipe] h3 { font-size: 19px !important; margin-bottom: 6px !important; }
  html[data-mv2] #root [data-s=services] [data-swipe] p { font-size: 13.5px !important; line-height: 1.5 !important; margin-bottom: 10px !important; }
  /* « En savoir plus » : invisible mais garde la carte entièrement cliquable (lien étiré) */
  html[data-mv2] #root [data-s=services] [data-swipe] .yb-card-link {
    display: block; height: 0; overflow: visible; font-size: 0 !important; line-height: 0; margin: 0;
  }

  /* 5. Une même méthode */
  html[data-mv2] #root [data-mv=method-inner] { padding: 0 20px !important; }
  html[data-mv2] #root [data-s=method] p { margin-top: 14px !important; font-size: 14.5px !important; line-height: 1.55 !important; }
  html[data-mv2] #root [data-mv=method-steps] { margin-top: 20px !important; padding-top: 16px !important; gap: 16px 16px !important; }
  html[data-mv2] #root [data-mv=method-steps] > div > div:nth-child(1) { margin-bottom: 6px !important; }
  html[data-mv2] #root [data-mv=method-steps] > div > div:nth-child(2) { font-size: 15px !important; margin-bottom: 4px !important; }
  html[data-mv2] #root [data-mv=method-steps] > div > div:nth-child(3) { font-size: 13px !important; line-height: 1.45 !important; }

  /* 6. Secteurs */
  html[data-mv2] #root [data-mv=sc-head] { margin-bottom: 16px !important; gap: 10px !important; }
  html[data-mv2] #root [data-mv=sc-head] > div > div:first-child { margin-bottom: 12px !important; }
  html[data-mv2] #root [data-mv=sc-head] p { font-size: 14px !important; line-height: 1.55 !important; }
  html[data-mv2] #root #secteurs [data-swipe] > a { aspect-ratio: 1 / 1 !important; }

  /* 7. À propos : portrait en médaillon à côté du titre */
  html[data-mv2] #root [data-mv=founder-box] { border: none !important; padding: 0 !important; background: none !important; }
  html[data-mv2] #root [data-mv=founder-label] { display: none; }
  html[data-mv2] #root [data-mv=founder-grid] {
    display: grid !important; grid-template-columns: 76px 1fr !important;
    column-gap: 14px !important; row-gap: 0 !important; align-items: center !important;
  }
  html[data-mv2] #root [data-mv=founder-photo] { grid-column: 1; grid-row: 1 / span 2; width: 76px; height: 76px; border-radius: 50% !important; }
  html[data-mv2] #root [data-mv=founder-photo] img {
    width: 76px !important; height: 76px !important; aspect-ratio: 1 / 1 !important;
    object-fit: cover; object-position: 28% 42% !important; border-radius: 50% !important;
  }
  html[data-mv2] #root [data-mv=founder-text] { display: contents; }
  html[data-mv2] #root [data-mv=founder-text] > div:first-child { grid-column: 2; align-self: end; margin-bottom: 4px !important; font-size: 11px !important; }
  html[data-mv2] #root [data-mv=founder-text] > h3 { grid-column: 2; align-self: start; font-size: 21px !important; line-height: 1.15 !important; margin-bottom: 0 !important; }
  html[data-mv2] #root [data-mv=founder-text] > p { grid-column: 1 / -1; font-size: 14px !important; line-height: 1.55 !important; margin: 12px 0 0 !important; }
  html[data-mv2] #root [data-mv=founder-text] > a { grid-column: 1 / -1; justify-self: start; margin-top: 16px; padding: 12px 20px !important; font-size: 14px !important; }

  /* 8. Contact : la case « Votre besoin » prend toute la place libre de l'écran */
  html[data-mv2] #root #contact form textarea {
    height: clamp(140px, calc(var(--screen) - 520px), 320px) !important;
  }

  /* ════════════════════════ SECTEURS ════════════════════════ */
  html[data-mv2] #root [data-s=sct-hero] h1 { font-size: 34px !important; line-height: 1.08 !important; }
  html[data-mv2] #root [data-s=sct-hero] p { margin-top: 18px !important; font-size: 15px !important; line-height: 1.55 !important; }
  html[data-mv2] #root [data-s=sct-why] h2 { font-size: 24px !important; margin-bottom: 22px !important; }
  html[data-mv2] #root [data-s=sct-list] > section:first-child { padding-top: 0 !important; padding-bottom: 14px !important; }
  html[data-mv2] #root [data-s=sct-list] > section:last-child { padding-bottom: 0 !important; }
  html[data-mv2] #root [data-s=sct-list] [data-swipe] article > div:first-child { height: 124px !important; }
  html[data-mv2] #root [data-s=sct-list] [data-swipe] article > div:nth-child(2) { padding: 14px 16px 6px !important; }
  html[data-mv2] #root [data-s=sct-list] [data-swipe] article p { font-size: 12.5px !important; line-height: 1.45 !important; }
  html[data-mv2] #root [data-s=sct-list] [data-swipe] article > div:nth-child(3) { padding: 0 16px 16px !important; gap: 5px !important; }
  html[data-mv2] #root [data-s=sct-list] [data-swipe] article > div:nth-child(3) > span { font-size: 10.5px !important; padding: 3px 8px !important; }

  /* ════════════════════════ À PROPOS ════════════════════════ */
  html[data-mv2] #root [data-s=ap-hero] h1 { font-size: 34px !important; line-height: 1.08 !important; }
  html[data-mv2] #root [data-s=ap-hero] p { margin-top: 18px !important; font-size: 15px !important; line-height: 1.55 !important; }
  /* Parcours : portrait en médaillon */
  html[data-mv2] #root [data-s=ap-bio] > div {
    display: grid !important; grid-template-columns: 76px 1fr !important;
    column-gap: 14px !important; row-gap: 0 !important; align-items: center !important;
  }
  html[data-mv2] #root [data-s=ap-bio] figure {
    grid-column: 1; grid-row: 1 / span 2; width: 76px !important; height: 76px; aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important; overflow: hidden;
  }
  html[data-mv2] #root [data-s=ap-bio] figure img { object-position: 28% 42% !important; }
  html[data-mv2] #root [data-s=ap-bio] > div > div { display: contents; }
  html[data-mv2] #root [data-s=ap-bio] > div > div > div:first-child { grid-column: 2; align-self: end; margin-bottom: 4px !important; }
  html[data-mv2] #root [data-s=ap-bio] h2 { grid-column: 2; align-self: start; font-size: 24px !important; line-height: 1.12 !important; margin: 0 !important; }
  html[data-mv2] #root [data-s=ap-bio] h2 br { display: none; }
  html[data-mv2] #root [data-s=ap-bio] > div > div > div:last-child { grid-column: 1 / -1; margin-top: 14px; }
  html[data-mv2] #root [data-s=ap-bio] p { font-size: 14px !important; line-height: 1.55 !important; margin-bottom: 12px !important; }
  /* Valeurs : icône à gauche, texte à droite */
  html[data-mv2] #root [data-s=ap-values] h2 { font-size: 24px !important; margin-bottom: 20px !important; }
  html[data-mv2] #root [data-s=ap-values] > div > div:last-child { grid-template-columns: 1fr !important; gap: 16px !important; text-align: left !important; }
  html[data-mv2] #root [data-s=ap-values] > div > div:last-child > div {
    display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; align-items: start; text-align: left;
  }
  html[data-mv2] #root [data-s=ap-values] > div > div:last-child > div > div:first-child {
    width: 44px !important; height: 44px !important; margin: 0 !important; grid-row: span 2;
  }
  html[data-mv2] #root [data-s=ap-values] > div > div:last-child > div > div:first-child svg { width: 20px; height: 20px; }
  html[data-mv2] #root [data-s=ap-values] h3 { margin: 2px 0 4px !important; text-align: left; }
  html[data-mv2] #root [data-s=ap-values] p { max-width: none !important; margin: 0 !important; text-align: left; font-size: 13px !important; line-height: 1.45 !important; }
  /* Démarche : étapes resserrées */
  html[data-mv2] #root [data-s=ap-method] > div { padding: 18px 16px !important; gap: 14px !important; }
  html[data-mv2] #root [data-s=ap-method] h2 { font-size: 24px !important; line-height: 1.12 !important; margin-bottom: 8px !important; }
  html[data-mv2] #root [data-s=ap-method] h2 br { display: none; }
  html[data-mv2] #root [data-s=ap-method] p { margin-bottom: 0 !important; }
  /* les cinq étapes se feuillettent, dans l'ordre */
  html[data-mv2] #root [data-s=ap-method] ol {
    display: grid !important; grid-auto-flow: column; grid-auto-columns: 82%; gap: 10px !important;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 6px -16px 0 !important; padding: 0 16px 4px !important; scroll-padding-left: 16px;
  }
  html[data-mv2] #root [data-s=ap-method] ol::-webkit-scrollbar { display: none; }
  html[data-mv2] #root [data-s=ap-method] li { scroll-snap-align: start; padding: 12px 14px 12px 12px !important; grid-template-columns: 34px 1fr !important; }
  html[data-mv2] #root [data-s=ap-method] li > div > div:first-child { font-size: 13.5px !important; margin-bottom: 2px !important; }
  html[data-mv2] #root [data-s=ap-method] li > div > div:last-child { font-size: 12px !important; line-height: 1.4 !important; }

  /* ════════════════════════ SERVICES (défilement libre) ════════════════════════ */
  /* Le premier écran montre le titre, l'introduction, le filtre et le début du carrousel */
  html[data-mv2] #root [data-s=sv-hero] { padding-top: 22px !important; padding-bottom: 10px !important; }
  html[data-mv2] #root [data-s=sv-hero] h1 { font-size: 30px !important; line-height: 1.08 !important; }
  html[data-mv2] #root [data-s=sv-hero] p { margin-top: 12px !important; font-size: 13.5px !important; line-height: 1.5 !important; }
  html[data-mv2] #root [data-s=sv-hero] + div { padding-top: 0 !important; padding-bottom: 12px !important; }
  html[data-mv2] #root [data-s=sv-hero] + div > p { display: none; }  /* « Sélectionnez un service… » */
  html[data-mv2] #root [data-s=sv-list] [data-swipe] [style*="aspect-ratio"] { aspect-ratio: 21 / 9 !important; }
  html[data-mv2] #root [data-s=sv-list] [data-swipe] h3 { font-size: 18px !important; margin-bottom: 6px !important; }
  html[data-mv2] #root [data-s=sv-list] [data-swipe] p { margin-bottom: 10px !important; }

  /* ════════════════════════ ENCADRÉS DE FIN DE PAGE ════════════════════════ */
  html[data-mv2] #root [data-cta] { padding-top: 8px !important; }
}

/* Écrans peu hauts : le formulaire y est déjà plus compact, la case peut prendre plus de place relative */
@media (max-width: 640px) and (max-height: 700px) {
  html[data-mv2] #root #contact form textarea { height: clamp(120px, calc(var(--screen) - 450px), 320px) !important; }
}

@media (prefers-reduced-motion: reduce) {
  html[data-mv2] .yb-rv { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ── Portrait en médaillon : badge « agrandir » + photo en grand ─────────── */
@media (max-width: 640px) {
  /* le médaillon ne rogne plus : c'est l'image qui est ronde, le badge peut déborder */
  html[data-mv2] #root .yb-pz-thumb { position: relative; overflow: visible !important; }
  html[data-mv2] #root .yb-pz-thumb img { border-radius: 50% !important; cursor: zoom-in; -webkit-tap-highlight-color: transparent; }
  html[data-mv2] #root [data-s=ap-bio] figure img { width: 76px !important; height: 76px !important; object-fit: cover; }
  html[data-mv2] #root .yb-pz-thumb::after {
    content: ''; position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%;
    background: #08a89d url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FDFBF6' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M14 4h6v6M10 20H4v-6M20 4l-7 7M4 20l7-7'/%3E%3C/svg%3E") center / 13px no-repeat;
    box-shadow: 0 0 0 2px #FDFBF6; pointer-events: none;
  }
  html[data-mv2] #root .yb-pz-thumb img:focus-visible { outline: 3px solid #1faad8; outline-offset: 3px; }
}
.yb-pz { position: fixed; inset: 0; z-index: 120; }
.yb-pz-back { position: absolute; inset: 0; background: rgba(9, 24, 20, 0.88); }
.yb-pz-img {
  position: fixed; object-fit: cover; display: block; cursor: zoom-out;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.6); will-change: left, top, width, height;
}
.yb-pz-cap {
  position: fixed; left: 24px; right: 24px; margin: 0; text-align: center;
  font: 500 13.5px/1.45 'Manrope', system-ui, sans-serif; color: rgba(253, 251, 246, 0.85);
  pointer-events: none;  /* un toucher sur la légende ferme comme un toucher sur le fond */
}
.yb-pz-close {
  position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); right: 14px;
  width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: rgba(253, 251, 246, 0.94); color: #0E2A22;
}
.yb-pz-close:focus-visible { outline: 3px solid #1faad8; outline-offset: 3px; }
