/* ==========================================================================
   PACIFIQUE INFO — Adaptabilité (mobile d'abord)
   Points de rupture : 600px · 768px · 1024px · 1280px
   ========================================================================== */

/* --------------------------------------------------------------------------
   Tiroir de navigation mobile
   -------------------------------------------------------------------------- */
.mobile-nav-drawer {
  position: fixed; inset: 0; z-index: 1000;
  visibility: hidden; pointer-events: none;
  transition: visibility 0.25s ease;
}
.mobile-nav-drawer.open { visibility: visible; pointer-events: auto; }
.mobile-nav-overlay {
  position: absolute; inset: 0;
  background: rgba(4, 15, 59, 0.55); backdrop-filter: blur(2px);
  opacity: 0; transition: opacity 0.25s ease;
}
.mobile-nav-drawer.open .mobile-nav-overlay { opacity: 1; }
.mobile-nav-panel {
  position: absolute; top: 0; left: 0; height: 100%;
  width: 88%; max-width: 360px;
  background: #fff; box-shadow: 8px 0 30px rgba(0, 0, 0, 0.2);
  display: flex; flex-direction: column; overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-nav-drawer.open .mobile-nav-panel { transform: translateX(0); }

.mobile-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--color-border);
}
.mobile-drawer-header img { width: 150px; aspect-ratio: 3.7 / 1; object-fit: cover; object-position: center 52%; }
.mobile-drawer-close { font-size: 1.6rem; line-height: 1; width: 40px; height: 40px; }
.mobile-drawer-search { padding: 1rem 1.1rem; border-bottom: 1px solid var(--color-border); }
.mobile-drawer-search input {
  width: 100%; padding: 0.7rem 0.85rem; border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm); outline: none;
}
.mobile-drawer-live { display: flex; gap: 0.5rem; padding: 1rem 1.1rem 0.5rem; }
.mobile-drawer-live a { flex: 1; }

.mobile-drawer-links { padding: 0.25rem 0 1rem; }
.mobile-drawer-links > li { border-bottom: 1px solid var(--color-border); }
.mobile-drawer-links > li > a,
.mobile-drawer-links summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 1.1rem;
  font-family: var(--font-serif); font-size: 1.05rem; font-weight: 700; color: var(--color-ink);
  cursor: pointer; list-style: none;
}
.mobile-drawer-links summary::-webkit-details-marker { display: none; }
.mobile-drawer-links summary svg { transition: transform 0.2s ease; }
.mobile-drawer-links details[open] summary svg { transform: rotate(180deg); }
.mobile-drawer-links details ul { padding: 0 1.1rem 0.75rem 1.6rem; }
.mobile-drawer-links details li a { display: block; padding: 0.45rem 0; font-size: 0.9rem; color: var(--color-text-secondary); }
.mobile-drawer-links a:hover { color: var(--color-primary); }
.mobile-drawer-footer {
  margin-top: auto; padding: 1.1rem; background: var(--color-paper);
  border-top: 1px solid var(--color-border); font-size: 0.8125rem; color: var(--color-text-muted);
}
.mobile-drawer-footer nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin-bottom: 0.75rem; }
.mobile-drawer-footer nav a { font-weight: 600; color: var(--color-text-secondary); }

/* --------------------------------------------------------------------------
   Mobile (< 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .utility-links, .utility-edition, .utility-socials { display: none; }
  .utility-bar .container { min-height: 32px; justify-content: center; }

  .masthead { grid-template-columns: auto 1fr auto; padding-top: 0.6rem; padding-bottom: 0.6rem; gap: 0.5rem; }
  .masthead-menu-btn .label, .masthead .live-pill .label, .masthead .btn-subscribe { display: none; }
  .brand-logo { width: 168px; }
  .brand-tagline { display: none; }

  .primary-nav { display: none; }
  .mobile-cat-strip {
    display: block; position: sticky; top: 0; z-index: 500;
    background: #fff; border-top: 1px solid var(--color-border); border-bottom: 2px solid var(--color-rule);
  }
  .mobile-cat-strip ul {
    display: flex; gap: 0.25rem; overflow-x: auto; scrollbar-width: none;
    padding: 0 var(--gutter); -webkit-overflow-scrolling: touch;
  }
  .mobile-cat-strip ul::-webkit-scrollbar { display: none; }
  .mobile-cat-strip a {
    display: block; padding: 0.7rem 0.6rem; white-space: nowrap;
    font-size: 0.8125rem; font-weight: 600; color: var(--color-ink);
    border-bottom: 3px solid transparent; margin-bottom: -2px;
  }
  .mobile-cat-strip a.active { border-bottom-color: var(--color-red); }

  .breaking-label .label-long { display: none; }
  .breaking-item { font-size: 0.8125rem; }

  .demo-banner .demo-btn-hide { display: none; }
  .demo-text { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ad-size-desktop { display: none; }
  .ad-size-mobile { display: inline; }

  .section-title { font-size: 1.3rem; }
  .story--lead .story-title { font-size: 1.75rem; }

  .newsletter-form { flex-direction: column; }
  .article-byline-bar { align-items: flex-start; }
  .article-featured-media { margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); }
  .article-featured-media figcaption { padding-left: var(--gutter); padding-right: var(--gutter); }
  .article-body-prose { font-size: 1.0625rem; }
  .article-body-prose blockquote { font-size: 1.25rem; }

  .editor-table { display: block; overflow-x: auto; }

  /* Cartes horizontales sur mobile pour les listes */
  .story--row { grid-template-columns: 1fr 112px; gap: 0.9rem; }
  .story--row .story-media { order: 2; }
  .story--row .story-media img { aspect-ratio: 1 / 1; }
  .story--row .story-title { font-size: 1.05rem; }
  .story--row .story-summary { display: none; }
}

/* --------------------------------------------------------------------------
   ≥ 600px
   -------------------------------------------------------------------------- */
@media (min-width: 600px) {
  .featured-row { grid-template-columns: repeat(2, 1fr); }
  .news-grid-3, .news-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .cat-block-grid { grid-template-columns: 1.3fr 1fr; }
  .newsletter-box { grid-template-columns: 1.2fr 1fr; gap: 2.5rem; }
  .footer-top-grid { grid-template-columns: repeat(2, 1fr); }
}

/* --------------------------------------------------------------------------
   ≥ 768px (tablette)
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
  .ad-slot--leaderboard .ad-slot__body { max-width: 728px; min-height: 90px; }
  .ad-slot--billboard .ad-slot__body { max-width: 728px; min-height: 90px; }
  .ad-slot--inarticle .ad-slot__body { min-height: 280px; }

  .front-grid { grid-template-columns: 1fr 1fr; }
  .front-col-lead { grid-column: 1 / -1; }

  .story--row { grid-template-columns: 240px 1fr; gap: 1.5rem; }

  .multimedia-grid { grid-template-columns: 1.4fr 1fr; }
  .cat-blocks { grid-template-columns: repeat(2, 1fr); }
  .editor-dashboard-grid { grid-template-columns: 1fr 1fr; }
  .author-box { grid-template-columns: 72px 1fr; }
}

/* --------------------------------------------------------------------------
   ≥ 1024px (bureau)
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) {
  .ad-slot--billboard .ad-slot__body { max-width: 970px; min-height: 250px; }

  /* La une : colonne secondaire | manchette | fil en continu */
  .front-grid { grid-template-columns: 1fr 2.1fr 1fr; gap: 0; }
  .front-col-lead { grid-column: auto; order: 2; padding: 0 1.75rem; border-left: 1px solid var(--color-border); border-right: 1px solid var(--color-border); }
  .front-col-side { order: 1; padding-right: 1.75rem; }
  .front-col-live { order: 3; padding-left: 1.75rem; }

  .featured-row { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
  .featured-row > * + * { border-left: 1px solid var(--color-border); padding-left: 1.5rem; }

  .main-with-sidebar-layout, .layout-sidebar { grid-template-columns: minmax(0, 1fr) 320px; gap: 3rem; }
  .article-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 4rem; }
  .article-main { margin: 0; }
  .article-hero { margin: 0; }
  .article-featured-media { margin-left: 0; }

  .news-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .news-grid-4 { grid-template-columns: repeat(4, 1fr); }

  .footer-top-grid { grid-template-columns: 1.6fr repeat(3, 1fr); gap: 3rem; }
}

/* Méga-menu & navigation complète réservés aux grands écrans pointeurs */
@media (min-width: 768px) and (max-width: 1099px) {
  .nav-link { padding: 0 0.55rem; font-size: 0.8125rem; }
  .nav-link--media .label-long { display: none; }
  .mega-panel { grid-template-columns: 200px 1fr; }
  .mega-stories { grid-template-columns: repeat(2, 1fr); }
  .mega-stories > :nth-child(3) { display: none; }
  .utility-links a:nth-child(n+4) { display: none; }
}

/* --------------------------------------------------------------------------
   ≥ 1280px
   -------------------------------------------------------------------------- */
@media (min-width: 1280px) {
  .brand-logo { width: 300px; }
  .front-grid { grid-template-columns: 1fr 2.2fr 1fr; }
}

/* --------------------------------------------------------------------------
   Impression : article lisible sans habillage
   -------------------------------------------------------------------------- */
@media print {
  .utility-bar, .header-ad-band, .primary-nav, .mobile-cat-strip, .breaking-bar, .demo-banner,
  .ad-slot, .sidebar-column, .site-footer, .back-to-top-btn, .article-share-buttons,
  .article-share-end, .reading-progress, .masthead-left, .masthead-right { display: none !important; }
  .article-layout { display: block; }
  body { color: #000; }
}
