/* ==========================================================================
   MEDIA QUERIES — NOOLOGIA UI (CORRIGÉ)
   - width = portrait
   - height = landscape
   - desktop inchangé
   ========================================================================== */


/* ==========================================================================
   0) TABLETTE (<= 1024px)
   ========================================================================== */
@media (max-width: 1024px) {

  .ui-header { padding: 8px 12px; }

  .ui-brand {
    font-size: 18px;
    padding-left: 14px;
  }
  .ui-brand .subtitle { font-size: 12px; }

  .ui-main { padding: 80px 16px; }

  .wrapper {
    width: 96%;
    max-height: 85vh;
    padding: 3px;
  }

  .grid-4 {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .grid-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    justify-items: center;
  }

  .grid-col .tile:first-child {
    grid-column: 1 / -1;
  }

  .tile, .tile-small { max-width: 160px; }

  .article { padding: 0 12px; }
  .article .title { font-size: 1.8rem; }

  .hero-logo img { width: 220px; }
  .hero-intro h1 { font-size: 1.6rem; }

  .coffee-btn {
    font-size: 12px;
    padding: 6px 12px;
    opacity: 0.65;
    border-radius: 6px;
  }

  
}


/* ==========================================================================
   1) MOBILE PORTRAIT (<= 768px)
   ========================================================================== */
@media (max-width: 768px) and (orientation: portrait) {

  html, body { overflow-y: auto; }

  .ui-header { padding: 6px 10px; }
  .ui-burger { width: 38px; height: 38px; }

  .ui-brand {
    font-size: 16px;
    padding-left: 8px;
  }
  .ui-brand .subtitle { display: none; }

  .lang-menu .lang-current {
    font-size: 13px;
    padding: 6px 12px;
  }

  .ui-main {
    padding: 72px 12px 20px;
    min-height: 100vh;
  }

  .wrapper {
    width: 100%;
    padding: 16px;
    border-radius: 0;
  }

  .wrapper > .title {
    font-size: 1.9rem;
    margin: 1.4rem 0 1rem;
  }

  .grid-4 {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .tile, .tile-small { max-width: 140px; }
  .symbol { font-size: 32px; }

  .astro-card {
    width: 100%;
    max-width: 360px;
  }

  .article-image img {
    max-height: 360px;
  }

  .hero-logo img { width: 180px; }
  .hero-intro h1 { font-size: 1.4rem; }

  .ui-footer {
    position: relative;
    flex-direction: column;
    gap: 12px;
    padding: 16px 10px;
  }
}


/* ==========================================================================
   2) MOBILE LANDSCAPE STANDARD (361px → 420px)
   ========================================================================== */
@media (orientation: landscape) and (max-height: 480px) and (min-height: 361px) {

     html, body {
    overflow-y: auto;
    height: auto;
  }

  .ui-main {
    min-height: 100vh;
    height: auto;
    overflow: visible;
  }

  .ui-footer {
    position: relative;
    display: block;
  }

  .ui-header { padding: 4px 10px; }

  .ui-main {
    padding: 56px 10px 14px;
  }

  .hero-intro h1 {
    font-size: 1.2rem;
    margin-bottom: 4px;
  }

  .hero-intro p {
    font-size: 0.9rem;
    margin-bottom: 6px;
  }

  .wrapper {
    padding: 10px;
  }

  .grid-4 {
    gap: 12px;
    margin-top: 8px;
  }

  .tile-large {
    max-width: 240px;
    padding: 10px;
  }

  .ui-footer {
    padding: 10px 8px;
  }

  .ui-footer {
    position: relative;
    display: flex;
    flex-direction: row; /* ← verrouillé */
  }
}


/* ==========================================================================
   3) MOBILE LANDSCAPE CRITIQUE (<= 360px)
   ========================================================================== */
@media (orientation: landscape) and (max-height: 360px) {

  .ui-header { padding: 2px 8px; }

  .ui-main {
    padding: 48px 8px 10px;
  }

  .hero-logo img { width: 120px; }

  .hero-intro h1 {
    font-size: 1.05rem;
  }

  .hero-intro p {
    font-size: 0.8rem;
  }

  .tile, .tile-small {
    max-width: 110px;
  }

  .ui-footer {
    padding: 8px;
    font-size: 12px;
  }
}
