/* Design tokens */
:root{
  --main:#009127;
  --accent:#D54408;
  --bg-custom:#F2F9F4;
  --grey:#000F04;
  --custom-white:#FAFDFB;

  /* Typography scale (px) */
  --h1:56; --lh1:64;
  --h2:44; --lh2:52;
  --h3:35; --lh3:42;
  --h4:28; --lh4:34;
  --h5:22; --lh5:28;
  --deck:24; --lh-deck:32;
  --body:18; --lh-body:30;
  --body-sm:16; --lh-body-sm:26;
  --caption:14; --lh-caption:22;
  --label:12; --lh-label:16;
}

.bg-custom { background-color: var(--bg-custom); }

html, body { font-family: "Domine", serif; color: var(--grey); background: var(--custom-white); margin: 0; padding: 0 !important; }

/* Headings use Source Serif 4 */
h1,h2,h3,h4,h5,.brand,.hero-title,.section-title{ font-family: "Source Serif 4", serif; }

/* Scale */
h1,.display-4,.hero-title{ font-size: calc(var(--h2)*1px); line-height: calc(var(--lh1)*1px); }
h2,.section-title{ font-size: calc(var(--h2)*1px); line-height: calc(var(--lh2)*1px); }
h3{ font-size: calc(var(--h3)*1px); line-height: calc(var(--lh3)*1px); }
h4{ font-size: calc(var(--h4)*1px); line-height: calc(var(--lh4)*1px); }
h5{ font-size: calc(var(--h5)*1px); line-height: calc(var(--lh5)*1px); }
p, .lead, .card-text{ font-size: calc(var(--body)*1px); line-height: calc(var(--lh-body)*1px); }

.small, small{ font-size: calc(var(--body-sm)*1px); line-height: calc(var(--lh-body-sm)*1px); }

/* Colors helpers */
.text-main{ color: var(--main)!important; }
.link-main{ color: var(--main); text-decoration: none; }
.link-main:hover{ text-decoration: underline; }
.navbar-nav .nav-link {
  color: var(--grey);
  transition: color .2s ease;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link.active {
  color: var(--main);
}
.navbar-nav .nav-link i { pointer-events: none; }
.btn-accent{ background: var(--accent); color:#fff; padding: 12px 32px; gap:10px }
.btn-accent:hover{ background: #bd3b07; color:#fff; }

.bg-custom-white{ background: var(--custom-white); }
.text-custom-white{ color: var(--custom-white)!important; }
.latest-card{
  background: var(--bg-custom);
  background-color: var(--bg-custom)!important;
  --bs-card-bg: var(--bg-custom);
  --bs-card-border-color: transparent;
  color: var(--grey);
}
.latest-card .card-body{
  background: transparent;
  padding: 0;
}
.latest-card h3{
  background: var(--main);
  color: var(--custom-white);
  display: block;
  width: 100%;
  padding: .65rem 1rem;
  border-radius: .35rem .35rem 0 0;
  margin: 0;
}
.latest-card .latest-list,
.latest-card .latest-list li{ background: transparent; }
.latest-card .latest-list{ padding: 1rem; margin: 0; }
.latest-card .latest-list li{ border-bottom: 1px dashed rgba(0,0,0,.08); color: var(--grey); }
.latest-card .latest-list .time{ color: #6c757d; }
.latest-card .latest-list a{ color: var(--grey); }
.latest-card .latest-list a:hover{ color: var(--main); }

/* Topbar */
.topbar{ background: var(--main); }
.topbar .brand{ font-size: 1.25rem; font-family: "Source Serif 4", serif; }
/* Make sure desktop/mobile bars have vertical breathing even with absolute centering */
.topbar .container{ padding-top: .5rem; padding-bottom: .5rem; }
/* Clickable brand area spacing */
.topbar-brand{ display:inline-flex; align-items:center; flex-direction:column; padding: .35rem .75rem; }
@media (min-width: 992px){ .topbar-brand{ padding: .5rem 1rem; } }

/* Ensure exact centering of logo/tagline on desktop topbar */
.topbar-desktop .container { position: relative; }
.topbar-desktop .topbar-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

/* couleurs & logo */
.bg-main { background: var(--main); }
.logo-topbar { height: 34px; } /* ajuste selon ton SVG */

/* icône loupe superposée au burger */
.search-on-burger{
  position: absolute;
  left: 18px; top: -6px; /* ajuste ces valeurs pour affiner la superposition */
  line-height: 1;
}

/* liens offcanvas */
.offcanvas .nav-link { color: var(--grey); font-weight: 600; }
.offcanvas .nav-link:hover { color: var(--main); }
.btn-main { background: var(--main); color:#fff; }
.btn-main:hover { background: #007a20; }

/* Hero */
.hero-feature{ background:#000; }
.hero-img{ height: 460px; object-fit: cover; display:block; }
.hero-overlay{ position:absolute; inset:0; background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.65) 70%); }
.hero-content{
  position:absolute; left:0; right:0; bottom:0;
  color:#fff; padding: 1.25rem 1.25rem 1.75rem 1.25rem;
}
.hero-title{ margin:0; font-weight:800; }
.kicker{ letter-spacing:.06em; font-weight:700; font-size: .85rem; }

/* Cards */
.card-title{ font-family:"Source Serif 4", serif; }
.avatar{ width: 28px; height:28px; border-radius:999px; }

.section-title{ font-weight:800; display:flex; align-items:center; gap:.5rem; }
.section-title::after{ content:""; display:inline-block; width: 18px; height: 18px; border-right: 3px solid var(--main); border-top: 3px solid var(--main); transform: rotate(45deg); margin-left:.25rem; }

.home-section{ border-top: 2px solid var(--main); padding-top: 1.25rem; }

/* Latest list */
.latest-list li{ display:flex; align-items:start; gap:.5rem; padding:.5rem 0; border-bottom: 1px dashed rgba(0,0,0,.08); }
.latest-list .time{ color:#6c757d; width: 3.5rem; display:inline-block; }
.latest-list a{ color: var(--grey); text-decoration: none;}
.latest-list a:hover{ color: var(--main); text-decoration: none;}

/* Billboard vertical (pubs qui glissent du haut vers le bas) */
.billboard-vertical {
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  height: 200px; /* ou la hauteur que tu veux afficher */
  overflow: hidden;
  position: relative;
}

.billboard-vertical .billboard-track {
  display: flex;
  flex-direction: column; /* aligne les pubs en colonne */
  animation: slideY 15s linear infinite;
}

.billboard-vertical img {
  display: block;
  width: 100%;
  height: auto;
}
@keyframes slideY {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-100%); }
}
.billboard-fade {
  position: relative;
  width: 100%;
  height: 150px; /* hauteur fixe */
  overflow: hidden;
}

.billboard-fade img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: fadeCycle 12s infinite;
}
#billboardCarousel .carousel-inner { height: 180px; }
#billboardCarousel .carousel-item img { height: 100%; object-fit: cover; }

@keyframes fadeCycle {
  0%, 100%   { opacity: 0; }
  10%, 30%   { opacity: 1; } /* reste visible un moment */
}


/* Sidebar vertical ad scroller */
.ad-vertical{ overflow:hidden; }
.ad-scroll{ display:flex; flex-direction:column; gap:0; height: 600px; overflow:hidden; position:relative; }
.ad-scroll img{ width:100%; height:auto; display:block; }
.ad-scroll{ animation: slideY 24s linear infinite; }
@keyframes slideY{
  0%{ transform: translateY(0); }
  100%{ transform: translateY(-100%); }
}

/* Footer */
.footer{ background: var(--main); color:#fff; }
.footer .btn-outline-light {
  color: #fff;
  border-color: rgba(255,255,255,.75);
  padding: 12px 32px;
}

.footer .btn-outline-light:hover,
.footer .btn-outline-light:focus {
  color: var(--main);
  background-color: #fff;
  border-color: #fff;
}
.text-white-75{ color: rgba(255,255,255,.85)!important; }

/* Utilities */
.rounded-3{ border-radius: 1rem!important; }

/* Search*/
/* Modal recherche */
#searchModal .modal-content {
  background: var(--custom-white);
}
.btn-main {
  background: var(--main);
  color: #fff;
}
.btn-main:hover {
  background: #007a20;
}

/* Responsive tweaks */
@media (max-width: 991.98px){
  .hero-img{ height: 360px; }
}
@media (max-width: 575.98px){
  .hero-img{ height: 260px; }
}
/* === Topbar Option 2 tweaks === */
.logo-topbar { height: 40px; } /* larger for logo-only line */
.topbar + .topbar { /* tighten spacing between the two green bars */
  margin-top: -0.25rem;
}
/* keep search overlay position */
.search-on-burger{ position:absolute; left: 18px; top: -6px; line-height:1; }

.hero-title {
  font-weight: 700;
  line-height: 1.2;
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 1.5rem; /* ≈24px */
    line-height: 1.4;
  }
}

@media (min-width: 577px) and (max-width: 991px) {
  .hero-title {
    font-size: 2rem; /* ≈32px */
    line-height: 1.3;
  }
}

@media (min-width: 992px) {
  .hero-title {
    font-size: 3rem; /* ≈48px */
    line-height: 1.2;
  }
}
/* === Sections — carte à la une === */
.soco-feature {
  background-color: #fff;
}

.soco-feature__image {
  position: relative;
  min-height: 220px;
  overflow: hidden;
}

.soco-feature__image img {
  transition: transform .3s ease;
  display: block;
}

.soco-feature__image:hover img {
  transform: scale(1.04);
}

@media (min-width: 768px) {
  .soco-feature__image {
    min-height: 100%;
  }
}

/* === Sections — titrage principal === */
.soco-feature .soco-title {
  font-family: "Source Serif 4", serif;
  font-weight: 800;
  line-height: 1.2;
}

@media (max-width: 991.98px) {
  .soco-feature .soco-title { font-size: 1.75rem; }
  .soco-item .byline { font-size: 0.875rem; }
}
@media (min-width: 992px) {
  .soco-feature .soco-title { font-size: 2.25rem; }
  .soco-item .byline { font-size: 0.9375rem; }
}

/* === Sections — liste droite (verticale) === */
.soco-item .avatar {
  width: 28px; height: 28px; border-radius: 50%;
  object-fit: cover;
}

.soco-item .soco-thumb {
  display: block;
}

.soco-item .soco-thumb img {
  transition: transform .25s ease;
}

.soco-item .soco-thumb:hover img {
  transform: scale(1.02);
}

/* Share dropdown */
.share { position: relative; display: inline-block; }
.share-trigger {
  transition: color .2s ease;
}
.share-trigger:hover,
.share-trigger:focus {
  color: var(--main);
}
.share-menu {
  min-width: 12rem;
}
.share-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.share-menu .dropdown-item i {
  width: 16px;
  height: 16px;
}

.post-link {
  color: inherit;
  text-decoration: none;
  transition: color .2s ease;
}

.post-link:hover,
.post-link:focus {
  color: var(--main);
}

.share-trigger.btn-outline-secondary:hover,
.share-trigger.btn-outline-secondary:focus {
  background-color: var(--main);
  border-color: var(--main);
  color: #fff;
}

.paywall-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem; /* default when badge trails text */
  vertical-align: text-bottom;
}
.paywall-badge--leading { margin-left: 0; margin-right: 0.35rem; }
.paywall-badge svg,
.paywall-badge img {
  width: 1em;  /* scale with surrounding text (e.g., h1) */
  height: 1em;
  display: block;
}

.category-heading {
  margin-bottom: 1.5rem;
}

.category-title {
  font-family: "Source Serif 4", serif;
  font-weight: 800;
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.category-separator {
  height: 3px;
  background-color: var(--main);
  width: 100%;
}

.pagination .page-link {
  color: var(--grey);
  border-color: rgba(0,0,0,.1);
}

.pagination .page-link:hover,
.pagination .page-link:focus {
  color: var(--main);
  border-color: var(--main);
}

.pagination .page-item.active .page-link {
  background-color: var(--main);
  border-color: var(--main);
  color: #fff;
}
.hero-img-link {
  display: block;
}

.hero-title a {
  color: inherit;
}

.hero-title a:hover,
.hero-title a:focus {
  color: var(--main);
}
.post-header{margin-top:.25rem;margin-bottom:1rem}
.breadcrumb{margin-bottom:.25rem}
.post-title{line-height:1.15;margin-bottom:.75rem}
.post-meta{gap:1rem}
.post-cover img{width:100%;height:auto;border-radius:.5rem}
.post-content p{margin-bottom:1rem}
.post-content figure{margin:1.25rem 0}
.post-content img{max-width:100%;height:auto;border-radius:.5rem}
/* À lire aussi */
.also-title{border-bottom:2px solid var(--bs-success,#198754);padding-bottom:.25rem;margin-bottom:1rem}
.also-item .card-body{padding-top:.75rem}
/* Légère réduction des gaps desktop */
@media (min-width:992px){.row.g-4{--bs-gutter-y:1.25rem}}

/* ===== PAYWALL ===== */
.paywall-wrapper{position:relative;
background: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.14) 100%);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
/* panneau d’abonnement */
.subscribe-panel{
  display:none;
  border-radius:.5rem;
  background:#0b7a2d; /* vert Al-watwan (peut être ajusté) */
  color:#fff;
  padding:2rem 1.25rem;
  box-shadow:0 10px 30px rgba(0,0,0,.15);
}
.is-paywalled + .subscribe-panel{display:block}
.subscribe-panel h4{
  font-weight:700;
  letter-spacing:.2px;
  margin-bottom:.75rem
}
.subscribe-panel .lead{
  font-weight:700
}
.subscribe-panel .btn-subscribe{
  background:#e85d04; /* bouton accent */
  border:none
}
.subscribe-panel .btn-subscribe:hover{opacity:.9}
.subscribe-panel .login-link{
  color:#fff;
  text-decoration:underline
}
/* Accessibilité/contraste du petit "Déjà abonné ?" */
.subscribe-panel .muted{opacity:.9}
