/* mobile.css — Ravinahitra — thème mobile (≤ 900 px), thème 1.8.0
 * Chargé sur toutes les pages publiques APRÈS main.css, homepage-v2.css (wp_head 20) et rnh-lang-css (wp_head 30) :
 * functions.php, wp_head 40, media (max-width: 900px). Mêmes couleurs que le site (rouge / vert / anthracite), Poppins.
 * - En-tête blanc compact : logo complet lisible, FR · EN, Se connecter / Mon espace (icône seule sous 360 px)
 * - Barre RavazoPay du haut retirée : la carte RavazoPay est dans le menu du bas
 * - Bouton WhatsApp flottant retiré : WhatsApp est dans la barre du bas
 * - Accueil resserré, pied de page en deux colonnes
 * Barre du bas et panneau « Menu » : mu-plugins/rnh-mobile-nav.php (menu de l'en-tête et hamburger masqués sur mobile).
 */
@media (max-width: 900px) {

  :root {
    --m-red: #D71920;
    --m-red-d: #B5151A;
    --m-green: #087A3D;
    --m-ink: #17221E;
    --m-muted: #66756E;
    --m-line: #E5EAE7;
    --m-soft: #F4F6F5;
    --m-dark: #12231D;
    --m-head: 58px;
    --m-radius: 14px;
  }

  html { scroll-padding-top: calc(var(--m-head) + 12px); }
  body { -webkit-tap-highlight-color: transparent; }

  /* ── Barre RavazoPay du haut : retirée (carte RavazoPay dans le menu du bas) ── */
  #rnh-rpay-bar { display: none !important; }
  body.rp-bar-on { padding-top: 0 !important; }

  /* ── Bouton WhatsApp flottant : retiré (WhatsApp dans la barre du bas) ── */
  .rnh-wa-float { display: none !important; }

  /* ── En-tête ───────────────────────────────────────────── */
  html body #rnh-nav.rnh-nav {
    top: 0 !important;
    height: var(--m-head);
    padding: 0 14px;
    gap: 10px;
    background: rgba(255, 255, 255, .97);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--m-line);
    box-shadow: 0 4px 18px rgba(18, 35, 29, .05);
  }
  #rnh-nav .rnh-logo-link { flex-shrink: 0; }
  #rnh-nav .rnh-logo-desktop { display: block !important; width: auto; height: 36px; }
  #rnh-nav .rnh-logo-mobile,
  #rnh-nav .rnh-hamburger { display: none !important; }

  #rnh-nav .rnh-nav-actions { margin-left: auto; gap: 8px !important; }

  /* FR · EN (mu-plugins/rnh-i18n.php) */
  #rnh-nav .rnh-lang {
    padding: 2px;
    border: 1px solid var(--m-line);
    border-radius: 999px;
    background: var(--m-soft);
    font-size: 11px;
  }
  #rnh-nav .rnh-lang-item { padding: 6px 8px; border-radius: 999px; color: var(--m-muted); }
  #rnh-nav a.rnh-lang-item:hover { color: var(--m-ink); background: transparent; }
  #rnh-nav .rnh-lang-item.is-active { background: var(--m-ink); color: #fff; }

  /* Se connecter / Mon espace */
  #rnh-nav .rnh-nav-cta,
  #rnh-nav .rnh-nav-cta:hover {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: var(--m-ink) !important;
    color: #fff !important;
    font: 600 12.5px/1 'Poppins', sans-serif;
    white-space: nowrap;
  }
  #rnh-nav .rnh-nav-cta::before {
    content: '';
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E") center / contain no-repeat;
  }

  /* ── Accueil (front-page.php) ──────────────────────────── */
  #rnh-main-content { padding-top: var(--m-head); }

  #rnh-main-content .rnh-hero,
  .rnh-hero-inner { min-height: 0; }
  .rnh-hero-left { padding: 26px 0 18px; }
  #rnh-main-content .rnh-hero .rnh-eyebrow { margin-bottom: 10px; }
  #rnh-main-content .rnh-hero h1 {
    margin-bottom: 12px;
    font-size: clamp(28px, 8.4vw, 38px);
    line-height: 1.08;
    letter-spacing: -1px;
  }
  .rnh-hero-description { margin-bottom: 20px; font-size: 15px; line-height: 1.6; }

  .rnh-hero-actions { flex-direction: column; gap: 10px; }
  .rnh-hero-action {
    width: 100%;
    height: 64px;
    padding: 0 16px;
    gap: 12px;
    border-radius: var(--m-radius);
    box-shadow: 0 10px 22px -12px rgba(215, 25, 32, .6);
  }
  .rnh-hero-action.green { box-shadow: 0 10px 22px -12px rgba(8, 122, 61, .6); }
  .rnh-hero-action-icon {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, .16);
    font-size: 16px;
  }
  .rnh-hero-action-text strong { font-size: 16px; }
  .rnh-hero-action-text small { margin-top: 3px; font-size: 12px; }
  .rnh-hero-action-arrow { font-size: 18px; }

  .rnh-hero-visual {
    min-height: 210px;
    margin: 6px 0 24px;
    border-radius: 18px;
  }
  .rnh-hero-image-gradient { display: none; }

  /* ── Pages (page.php et gabarits : .rnh-page-wrap) : sous l'en-tête, marges sur les côtés ── */
  .rnh-page-wrap {
    margin-top: var(--m-head) !important;
    padding: 26px 18px 36px !important;
  }
  .rnh-page-wrap table:not(.rnh-tarifs-table):not(.shop_table) {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  /* RavazoPay ([ravazopay_page]) : ses bandes restent pleine largeur */
  .rnh-page-wrap .rnh-rpay-page { margin: -26px -18px -36px; }

  /* ── Grille tarifaire ([rnh_tarifs]) : une carte par hub ── */
  .rnh-tarifs-wrap { margin: 0 !important; }
  .rnh-tarifs-wrap .rnh-tarifs-table,
  .rnh-tarifs-wrap .rnh-tarifs-table tbody {
    display: block;
    min-width: 0;
    overflow: visible;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .rnh-tarifs-table thead { display: none; }
  .rnh-tarifs-table tbody tr,
  .rnh-tarifs-table tbody tr:hover {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
    padding: 14px;
    border: 1px solid var(--m-line);
    border-radius: var(--m-radius);
    background: #fff;
    box-shadow: 0 8px 20px -14px rgba(18, 35, 29, .35);
  }
  .rnh-tarifs-table td { display: block; padding: 0; font-size: 13px; }
  .rnh-tarifs-table td:first-child { grid-column: 1 / -1; font-size: 16px; }
  .rnh-tarifs-table td.td-plat { grid-column: 1 / -1; margin-top: -4px; font-size: 12.5px; line-height: 1.45; }
  .rnh-tarifs-table td.td-plat:empty { display: none; }
  .rnh-tarifs-table td[data-label] {
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--m-soft);
    font-size: 13.5px;
    line-height: 1.25;
  }
  .rnh-tarifs-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    font: 600 10.5px/1.2 'Poppins', sans-serif;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--m-muted);
  }
  .rnh-tarifs-note { margin-top: 4px; border: 1px solid var(--m-line); border-radius: var(--m-radius); }

  /* ── Ultimate Member (connexion, inscription, compte) : boutons aux couleurs du site ── */
  .um .um-button:not(.um-alt),
  .um input[type=submit].um-button { background: var(--m-red) !important; border-radius: 12px !important; }
  .um .um-button.um-alt { border-radius: 12px !important; }

  /* Badge reCAPTCHA au-dessus de la barre du bas */
  .grecaptcha-badge { bottom: 80px !important; }

  /* ── Pied de page ──────────────────────────────────────── */
  .rnh-site-footer { padding: 36px 20px 28px; }
  .rsf-inner { grid-template-columns: 1fr 1fr; gap: 26px 18px; margin-bottom: 26px; }
  .rsf-brand { grid-column: 1 / -1; }
  .rsf-tagline { max-width: none; font-size: 13px; color: rgba(255, 255, 255, .5); }
  .rsf-contacts { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .rsf-contact-link {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    font-size: 13px;
    color: rgba(255, 255, 255, .75);
  }
  .rsf-col-title { margin-bottom: 8px; font-size: 11.5px; color: rgba(255, 255, 255, .9); }
  .rsf-col-link { margin: 0; padding: 7px 0; font-size: 14px; color: rgba(255, 255, 255, .6); }
  .rsf-bottom { flex-direction: column; gap: 10px; text-align: center; }
  .rsf-copy { line-height: 1.6; color: rgba(255, 255, 255, .35); }

  /* ── Petits écrans ─────────────────────────────────────── */
  @media (max-width: 360px) {
    #rnh-nav .rnh-logo-desktop { height: 32px; }
    #rnh-nav .rnh-nav-cta,
    #rnh-nav .rnh-nav-cta:hover { width: 36px; padding: 0; gap: 0; font-size: 0; }
    #rnh-nav .rnh-nav-cta::before { width: 17px; height: 17px; }
  }
}
