/* Gosy - finition mobile V3
   IMPORTANT : ce fichier ne modifie rien au-dessus de 900 px.
   La version PC V2 reste donc inchangée. */

@media (max-width: 900px) {
  /* Images : on privilégie toujours l'image complète, jamais un recadrage forcé. */
  .pub-full-image,
  .pub-tab-media,
  .pub-birthday-media,
  .pub-pro-media {
    overflow: hidden;
  }
  .pub-full-image img,
  .pub-tab-media img,
  .pub-birthday-media img,
  .pub-pro-media img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain !important;
    object-position: center center;
  }

  /* Les panneaux onglet restent un seul bloc image + texte. */
  .pub-tab-panel,
  .product-panels .pub-tab-panel {
    grid-template-columns: 1fr !important;
    align-items: start;
  }

  /* Navigation onglets plus agréable au doigt. */
  .pub-tabs {
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding-bottom: 8px;
  }
  .pub-tabs button {
    scroll-snap-align: start;
  }
}

@media (max-width: 560px) {
  /* Plus de largeur utile sur iPhone, sans coller le contenu aux bords. */
  .pub-shell,
  .pub-birthday {
    width: min(calc(100% - 16px), var(--max));
  }

  /* Header mobile plus compact. */
  .pub-header-inner {
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .pub-logo img {
    width: 100px;
  }
  .pub-nav {
    gap: 14px;
    padding-top: 2px;
  }
  .pub-nav a {
    font-size: 13px;
  }

  /* Hero : moins de hauteur perdue, même hiérarchie. */
  .pub-hero {
    padding-top: 16px;
    padding-bottom: 22px;
    gap: 14px;
  }
  .pub-hero h1 {
    font-size: clamp(38px, 11vw, 44px);
    margin-bottom: 12px;
  }
  .pub-lead {
    font-size: 15px;
    line-height: 1.46;
  }
  .pub-location {
    margin: 12px 0 14px;
  }
  .pub-mini-chips {
    gap: 6px;
    margin-top: 12px;
  }
  .pub-mini-chips span {
    padding: 6px 9px;
    font-size: 11.5px;
  }
  .pub-hero-visual {
    border-radius: 18px;
  }

  /* Réduction des grands vides verticaux uniquement sur mobile. */
  .pub-section {
    padding-top: 28px;
    padding-bottom: 28px;
  }
  .pub-section-head,
  .pub-section-head.compact {
    gap: 6px;
    margin-bottom: 12px;
  }
  .pub-section h2,
  .pub-birthday-copy h2,
  .pub-pro h2,
  .pub-seo-copy h2 {
    font-size: 29px;
    line-height: 1.04;
  }
  .pub-section-head > p,
  .pub-actor p,
  .pub-birthday-copy > p,
  .pub-tab-copy p,
  .pub-pro-copy > p,
  .pub-seo-copy p {
    font-size: 14px;
    line-height: 1.48;
  }
  .pub-kicker {
    margin-bottom: 7px;
    font-size: 10.5px;
  }

  /* Onglets : image plus grande et texte rattaché visuellement juste dessous. */
  .pub-tab-panel {
    padding: 7px;
    gap: 4px;
    border-radius: 20px;
  }
  .pub-tab-media {
    width: 100%;
    border-radius: 15px;
    margin: 0;
  }
  .pub-tab-copy {
    padding: 10px 9px 11px;
  }
  .pub-tab-copy h3 {
    font-size: 24px;
    line-height: 1.06;
    margin-bottom: 9px;
  }
  .pub-tab-copy p {
    margin-bottom: 13px;
  }
  .pub-tabs {
    gap: 7px;
  }
  .pub-tabs button {
    padding: 9px 13px;
    font-size: 13px;
  }

  /* Catégories : correction du rognage des markers.
     Les fichiers sont plus hauts que larges : object-fit:contain garde le marker entier. */
  .pub-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .pub-category {
    padding: 10px 7px 11px;
    border-radius: 18px;
    min-width: 0;
  }
  .pub-category img {
    width: 72px;
    height: 86px;
    max-width: 100%;
    object-fit: contain !important;
    object-position: center center;
    border-radius: 0;
    margin: 0 auto 5px;
    padding: 2px;
  }
  .pub-category h3 {
    font-size: 14px;
    line-height: 1.16;
    margin-bottom: 5px;
    overflow-wrap: anywhere;
  }
  .pub-category p {
    font-size: 11.5px;
    line-height: 1.32;
  }

  /* "Et plus encore" : plus compact au repos. */
  .pub-more-categories {
    margin-top: 10px;
    border-radius: 18px;
  }
  .pub-more-categories summary {
    padding: 13px 14px;
    font-size: 14px;
  }
  .pub-more-grid {
    gap: 7px;
    padding: 0 9px 9px;
  }
  .pub-more-grid section {
    padding: 12px;
    border-radius: 15px;
  }
  .pub-more-grid h3 {
    font-size: 14px;
  }
  .pub-more-grid p {
    font-size: 11.5px;
    line-height: 1.38;
  }

  /* Bloc acteur / anniversaire : on resserre sans supprimer d'information. */
  .pub-actor-card,
  .pub-birthday-copy,
  .pub-pro-copy {
    padding: 16px;
    border-radius: 18px;
  }
  .pub-action-flow {
    margin-bottom: 11px;
  }
  .pub-action-flow span {
    padding: 6px 8px;
    font-size: 11.5px;
  }
  .pub-steps {
    margin: 14px 0;
    gap: 7px;
  }
  .pub-steps li {
    padding: 9px;
    font-size: 13px;
  }
  .pub-steps b {
    width: 28px;
    height: 28px;
  }

  /* Bloc Pro : compact, titre jaune conservé, visuel entièrement affiché. */
  .pub-pro-grid {
    gap: 10px;
  }
  .pub-pro-badge {
    margin-bottom: 10px;
    padding: 7px 12px;
    font-size: 12px;
  }
  .pub-pro h2 {
    margin-bottom: 11px;
  }
  .pub-pro-audiences {
    gap: 7px;
    margin: 13px 0;
  }
  .pub-pro-audiences article {
    padding: 10px 11px;
    border-radius: 14px;
  }
  .pub-pro-audiences h3 {
    font-size: 14px;
  }
  .pub-pro-audiences p {
    font-size: 12px;
    line-height: 1.36;
  }
  .pub-pro-benefits {
    gap: 6px;
    margin: 12px 0;
  }
  .pub-pro-benefits span {
    padding: 6px 8px;
    font-size: 11px;
  }
  .pub-pro-media {
    border-radius: 18px;
  }

  /* SEO : conserver le contenu indexable, avec une lecture mobile moins aérée. */
  .pub-seo-copy p {
    margin-top: 9px;
    margin-bottom: 9px;
  }

  .pub-final-cta {
    padding: 42px 16px;
  }
  .pub-final-cta h2 {
    font-size: 36px;
  }
}
