/* By Night AdSense V3 — ads inherit the exact dimensions of native content cards. */
html[data-bynight-hero-ad="ad"] .hero-daily-feature{visibility:hidden}

.bynight-adsense-card{
  position:relative;
  box-sizing:border-box;
  overflow:hidden;
  color:#fff;
  isolation:isolate;
}
.bynight-adsense-label{
  position:absolute;
  z-index:8;
  top:5px;
  left:6px;
  max-width:calc(100% - 12px);
  padding:3px 7px;
  border-radius:999px;
  background:rgba(0,0,0,.68);
  color:rgba(255,255,255,.82);
  font:700 .46rem/1.1 "DM Sans",Arial,sans-serif;
  letter-spacing:.07em;
  text-transform:uppercase;
  white-space:nowrap;
  pointer-events:none;
}
.bynight-adsense-unit{
  display:block;
  width:100%;
  height:100%;
  min-width:1px;
  min-height:1px;
}

.bynight-adsense-card--demo{
  cursor:default!important;
  pointer-events:none!important;
  user-select:none;
  transform:none!important;
}
.bynight-demo-ad{
  position:absolute;
  z-index:4;
  inset:0;
  display:grid;
  grid-template-rows:54% 46%;
  width:100%;
  height:100%;
  background:#f7f7f7;
  color:#171717;
  overflow:hidden;
}
.bynight-demo-ad-visual{
  position:relative;
  display:flex;
  min-width:0;
  min-height:0;
  align-items:flex-end;
  justify-content:space-between;
  padding:10px;
  overflow:hidden;
  color:#fff;
}
.bynight-demo-ad-visual::before,
.bynight-demo-ad-visual::after{
  content:"";
  position:absolute;
  border-radius:50%;
  background:rgba(255,255,255,.16);
}
.bynight-demo-ad-visual::before{width:72%;aspect-ratio:1;right:-20%;top:-55%}
.bynight-demo-ad-visual::after{width:48%;aspect-ratio:1;left:-18%;bottom:-55%}
.bynight-demo-ad-visual>span{
  position:relative;
  z-index:2;
  font-size:clamp(1rem,2vw,2rem);
  line-height:1;
}
.bynight-demo-ad-visual>small{
  position:relative;
  z-index:2;
  font:800 clamp(.42rem,.62vw,.62rem)/1 "DM Sans",Arial,sans-serif;
  letter-spacing:.11em;
}
.bynight-demo-theme--sunset .bynight-demo-ad-visual{background:linear-gradient(135deg,#ff7b45 0%,#b51d54 48%,#34235d 100%)}
.bynight-demo-theme--riad .bynight-demo-ad-visual{background:linear-gradient(135deg,#8f6a3d 0%,#d7a85f 45%,#23453d 100%)}
.bynight-demo-theme--night .bynight-demo-ad-visual{background:linear-gradient(135deg,#111827 0%,#30205f 46%,#8b1f45 100%)}
.bynight-demo-theme--desert .bynight-demo-ad-visual{background:linear-gradient(135deg,#e7a85f 0%,#c96d38 48%,#6a3d2b 100%)}

.bynight-demo-ad-copy{
  display:flex;
  min-width:0;
  min-height:0;
  flex-direction:column;
  justify-content:center;
  gap:3px;
  padding:7px 9px 7px;
  overflow:hidden;
  background:#fff;
  text-align:left;
}
.bynight-demo-ad-copy>small{
  overflow:hidden;
  color:#666!important;
  font:700 clamp(.38rem,.48vw,.52rem)/1.1 "DM Sans",Arial,sans-serif!important;
  letter-spacing:.03em!important;
  text-overflow:ellipsis;
  text-transform:none!important;
  white-space:nowrap;
}
.bynight-demo-ad-copy>strong{
  display:-webkit-box;
  overflow:hidden;
  color:#171717!important;
  font:800 clamp(.52rem,.72vw,.78rem)/1.08 "DM Sans",Arial,sans-serif!important;
  text-shadow:none!important;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}
.bynight-demo-ad-desc{
  display:-webkit-box;
  overflow:hidden;
  color:#666!important;
  font:500 clamp(.38rem,.5vw,.54rem)/1.18 "DM Sans",Arial,sans-serif!important;
  text-shadow:none!important;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}
.bynight-demo-ad-cta{
  align-self:flex-start;
  margin-top:2px;
  padding:4px 7px;
  border-radius:5px;
  background:#2563eb;
  color:#fff!important;
  font:800 clamp(.38rem,.46vw,.5rem)/1 "DM Sans",Arial,sans-serif!important;
  text-shadow:none!important;
  white-space:nowrap;
}

/* À la une: preserve the native .hero-featured-card geometry exactly. */
.hero-daily-feature--adsense{min-width:0}
.hero-daily-feature--adsense .bynight-adsense-card--hero{width:100%}
.hero-daily-feature--adsense .bynight-demo-ad{
  grid-template-columns:44% 56%;
  grid-template-rows:100%;
}
.hero-daily-feature--adsense .bynight-demo-ad-copy{padding:clamp(10px,1.2vw,18px)}
.hero-daily-feature--adsense .bynight-demo-ad-copy>strong{font-size:clamp(.72rem,1.2vw,1.15rem)!important}
.hero-daily-feature--adsense .bynight-demo-ad-desc{font-size:clamp(.5rem,.72vw,.7rem)!important}
.hero-daily-feature--adsense .bynight-demo-ad-cta{padding:6px 10px;font-size:clamp(.45rem,.62vw,.62rem)!important}

/* News cards are naturally horizontal; demo creative follows the same silhouette. */
[data-home-section="news"] .bynight-demo-ad{
  grid-template-columns:38% 62%;
  grid-template-rows:100%;
}
[data-home-section="news"] .bynight-demo-ad-copy{padding:clamp(7px,.8vw,12px)}
[data-home-section="news"] .bynight-demo-ad-copy>strong{font-size:clamp(.56rem,.8vw,.82rem)!important}

/* Compact portrait cards: keep the copy readable without changing native dimensions. */
[data-home-section="guide"] .bynight-demo-ad-copy,
[data-home-section="events"] .bynight-demo-ad-copy,
[data-home-section="reports"] .bynight-demo-ad-copy{padding:6px 7px;gap:2px}
[data-home-section="guide"] .bynight-demo-ad-desc{display:none}
[data-home-section="guide"] .bynight-demo-ad-copy>strong{font-size:clamp(.44rem,.58vw,.6rem)!important}
[data-home-section="guide"] .bynight-demo-ad-cta{padding:3px 5px;font-size:.4rem!important}

@media(max-width:700px){
  .bynight-adsense-label{top:4px;left:4px;padding:2px 5px;font-size:.4rem}
  .bynight-demo-ad-copy{padding:5px 6px}
  .bynight-demo-ad-desc{-webkit-line-clamp:1}
  .hero-daily-feature--adsense .bynight-demo-ad-copy{padding:9px}
}
