/* ============================================================
   PAGE PUBLICITÉ (page-annonces.php) — sections de la refonte.
   Les styles de base (.afc-ads__*, .afc-calc__*) sont dans main.css.
   ============================================================ */

/* Ancres : laisser la place à l'en-tête et à la barre des offres. */
.afc-ads [id] { scroll-margin-top: 140px; }

/* ── Audience : 8 chiffres en rangées complètes (4 × 2, puis 2 × 4) ── */
.afc-ads .afc-ads__stats-grid {
  grid-template-columns: repeat(4, 1fr);
  max-width: 980px;
  margin: 0 auto;
}
@media (max-width: 768px) {
  .afc-ads .afc-ads__stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* ── Audience : thématiques acceptées ── */
.afc-ads__accepted-label {
  margin: 30px 0 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--afc-text-muted);
}
.afc-ads__chips--center { justify-content: center; margin-top: 0; }

/* ── Schéma des emplacements ── */
.afc-plan {
  display: grid;
  grid-template-columns: 1.5fr 1fr .62fr;
  gap: 22px;
  align-items: start;
}
.afc-plan__ecran { margin: 0; }
.afc-plan__ecran figcaption {
  margin-top: 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--afc-text-muted);
}
.afc-plan__cadre {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: var(--afc-surface, #fff);
  border: 1px solid var(--afc-border);
  border-radius: 14px;
  box-shadow: var(--afc-shadow-sm, 0 4px 18px rgba(60,45,30,.05));
}
.afc-plan__ecran--mobile .afc-plan__cadre { border-radius: 20px; padding: 10px 8px; }
.afc-plan__nav { height: 12px; border-radius: 4px; background: var(--afc-border); }
.afc-plan__page { display: grid; grid-template-columns: 1fr 34%; gap: 10px; }
.afc-plan__article,
.afc-plan__side { display: flex; flex-direction: column; gap: 7px; }
.afc-plan__ligne { display: block; height: 7px; border-radius: 4px; background: var(--afc-border); }
.afc-plan__ligne--titre { height: 12px; width: 75%; background: var(--afc-text-faint, #9a9085); opacity: .45; }
.afc-plan__ligne--court { width: 60%; }
.afc-plan__grille { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.afc-plan__carte { height: 52px; border-radius: 6px; border: 1px solid var(--afc-border); }

/* Zones publicitaires : couleur d'accent, numéro au centre. */
.afc-plan__zone {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--afc-accent-soft);
  border: 1.5px dashed var(--afc-accent);
}
.afc-plan__zone--bandeau   { height: 26px; }
.afc-plan__zone--bandeau-m { height: 30px; }
.afc-plan__zone--articles  { height: 22px; }
.afc-plan__zone--bas       { height: 22px; }
.afc-plan__zone--grande    { height: 44px; }
.afc-plan__zone--laterale  { height: 54px; }
.afc-plan__zone--carte     { height: 52px; }
.afc-plan__zone--accueil   { height: 24px; }
.afc-plan__zone--listing   { height: 52px; }
.afc-plan__zone--carre     { height: 64px; }

.afc-plan__pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--afc-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .15s;
}
.afc-plan__pin:hover,
.afc-plan__pin:focus-visible { transform: scale(1.15); }
.afc-plan__pin:focus-visible { outline: 3px solid var(--afc-accent); outline-offset: 2px; }

.afc-plan__legende {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px 18px;
  margin: 26px 0 0;
  padding-left: 22px;
  font-size: 14px;
}
.afc-plan__legende a { color: var(--afc-text); text-decoration: none; font-weight: 600; }
.afc-plan__legende a:hover { color: var(--afc-accent); text-decoration: underline; }
.afc-plan__legende li::marker { color: var(--afc-accent); font-weight: 800; }

/* ── Barre des offres + devise (collante) ── */
/* Collée sous l'en-tête du site, lui-même collant (65 px, 67 sur mobile). */
.afc-offres-nav {
  position: sticky;
  top: var(--afc-offres-nav-top, 66px);
  z-index: 20;
  background: var(--afc-bg, #f7f4ef);
  border-bottom: 1px solid var(--afc-border);
}
.afc-offres-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.afc-offres-nav__liens {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.afc-offres-nav__liens::-webkit-scrollbar { display: none; }
.afc-offres-nav__liens a {
  flex: 0 0 auto;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--afc-text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.afc-offres-nav__liens a:hover { background: var(--afc-accent-soft); color: var(--afc-accent); }

.afc-devise {
  flex: 0 0 auto;
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--afc-surface, #fff);
  border: 1px solid var(--afc-border);
}
.afc-devise__btn {
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--afc-text-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.afc-devise__btn.is-active { background: var(--afc-accent); color: #fff; }
.afc-devise__btn:focus-visible { outline: 3px solid var(--afc-accent); outline-offset: 2px; }

/* ── Cartes tarifs : prix au mois et à la semaine ── */
.afc-offre__num {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--afc-accent-soft);
  color: var(--afc-accent);
  font-size: 12px;
  font-weight: 800;
  line-height: 24px;
  text-align: center;
}
/* La pastille numérotée fait passer certains titres sur deux lignes :
   on réserve ces deux lignes pour que toute la rangée reste alignée. */
.afc-offre__num + .afc-ads__price-name { padding-right: 30px; min-height: 51px; }
@media (max-width: 600px) {
  .afc-offre__num + .afc-ads__price-name { min-height: 0; }
}

/* Grilles d'offres : rangées complètes (4, puis 2, puis 1 colonne). */
.afc-ads .afc-ads__pricing { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1024px) {
  .afc-ads .afc-ads__pricing { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .afc-ads .afc-ads__pricing { grid-template-columns: 1fr; }
}

/* Même hauteur pour l'accroche et le bloc prix : les listes et les
   boutons d'une rangée s'alignent, qu'il y ait un tarif semaine ou non. */
.afc-ads .afc-ads__price-tag { min-height: 2.8em; line-height: 1.4; }
.afc-offre__tarifs { min-height: 76px; margin: 0 0 14px; }
.afc-offre__tarifs p { margin: 0; }
.afc-offre__montant {
  font-family: var(--afc-font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--afc-accent);
  line-height: 1.1;
}
.afc-offre__unite { margin-top: 2px; font-size: 13px; font-weight: 600; color: var(--afc-text-muted); }
.afc-offre__semaine { margin-top: 6px; font-size: 13.5px; color: var(--afc-text-muted); }
.afc-offre__semaine .afc-prix { font-weight: 700; color: var(--afc-text); }

/* Boutons : tous encadrés (la bordure de main.css repose sur une
   variable absente en mode clair) ; la carte mise en avant reste pleine. */
.afc-ads .afc-ads__price-btn { border: 1px solid var(--afc-border-strong, var(--afc-border-2, #e0d9cd)); }
.afc-ads .afc-ads__price-btn:hover { border-color: var(--afc-accent); color: var(--afc-accent); }
.afc-ads .is-featured .afc-ads__price-btn { background: var(--afc-accent); border-color: var(--afc-accent); color: #fff; }
.afc-ads .is-featured .afc-ads__price-btn:hover { filter: brightness(.92); color: #fff; }

/* ── Affiliation : bandeau sous les cartes de contenus ── */
.afc-affiliation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding: 20px 22px;
  background: var(--afc-surface, #fff);
  border: 1px dashed var(--afc-border-2, #e0d9cd);
  border-radius: 16px;
}
.afc-affiliation .afc-ads__price-name { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.afc-affiliation__devis {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--afc-accent-soft);
  color: var(--afc-accent);
  font-size: 12px;
  font-weight: 700;
}
.afc-affiliation__texte p { margin: 6px 0 0; font-size: 14px; color: var(--afc-text-muted); }
.afc-affiliation__btn { flex: 0 0 auto; padding-left: 26px; padding-right: 26px; }
@media (max-width: 600px) {
  .afc-affiliation { flex-direction: column; align-items: stretch; }
}

/* ── Réseaux & messageries ── */
.afc-reseaux {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}
.afc-reseaux__carte {
  display: flex;
  flex-direction: column;
  padding: 24px 20px 20px;
  background: var(--afc-surface, #fff);
  border: 1px solid var(--afc-border);
  border-radius: 16px;
}
.afc-reseaux__formules { list-style: none; margin: 0 0 20px; padding: 0; flex: 1; }
.afc-reseaux__formules li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--afc-border);
  font-size: 14px;
  color: var(--afc-text-muted);
}
.afc-reseaux__formules li:last-child { border-bottom: 0; }
.afc-reseaux__formules strong { color: var(--afc-text); white-space: nowrap; }

/* ── Packs ── */
.afc-packs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  align-items: stretch;
}
.afc-packs__carte {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 22px 22px;
  background: var(--afc-surface, #fff);
  border: 1px solid var(--afc-border);
  border-radius: 18px;
  text-align: center;
}
.afc-packs__carte.is-featured {
  border: 2px solid var(--afc-accent);
  box-shadow: 0 12px 34px rgba(60, 45, 30, .10);
}
.afc-packs__carte .afc-ads__price-flag { left: 50%; transform: translateX(-50%); white-space: nowrap; }
.afc-packs__nom {
  margin: 0;
  font-family: var(--afc-font-display);
  font-size: 19px;
  font-weight: 800;
  color: var(--afc-text);
}
.afc-packs__duree { margin: 4px 0 14px; font-size: 13px; color: var(--afc-text-muted); }
.afc-packs__prix {
  margin: 0;
  font-family: var(--afc-font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--afc-accent);
  line-height: 1.1;
}
.afc-packs__valeur { margin: 4px 0 18px; font-size: 13px; color: var(--afc-text-muted); }
.afc-packs__liste {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  flex: 1;
  text-align: left;
}
.afc-packs__liste li {
  position: relative;
  padding: 8px 0 8px 26px;
  border-bottom: 1px solid var(--afc-border);
  font-size: 14px;
  color: var(--afc-text);
}
.afc-packs__liste li:last-child { border-bottom: 0; }
.afc-packs__liste li::before {
  content: "✓";
  position: absolute;
  left: 2px;
  color: var(--afc-accent);
  font-weight: 800;
}
.afc-packs__btn { justify-content: center; text-align: center; }
/* Pack mis en avant : bouton plein, couleur d'accent de la page (le bleu
   clair du bouton principal manque de contraste avec le texte blanc). */
.afc-packs__carte.is-featured .afc-packs__btn {
  background: var(--afc-accent);
  border-color: var(--afc-accent);
  color: #fff;
}
.afc-packs__carte.is-featured .afc-packs__btn:hover { filter: brightness(.92); }

/* ── Calculateur : option exclusivité ── */
.afc-calc__excl {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--afc-text);
  cursor: pointer;
}
.afc-calc__excl[hidden] { display: none; }
.afc-calc__excl input { width: 18px; height: 18px; accent-color: var(--afc-accent); }

/* ── Formats des visuels ── */
.afc-formats { max-width: 760px; margin: 44px auto 0; }
.afc-formats__titre {
  margin: 0 0 12px;
  text-align: center;
  font-family: var(--afc-font-display);
  font-size: 19px;
  font-weight: 800;
  color: var(--afc-text);
}
.afc-formats__table-wrap { overflow-x: auto; border: 1px solid var(--afc-border); border-radius: 12px; }
.afc-formats__table {
  width: 100%;
  border-collapse: collapse;
  background: var(--afc-surface, #fff);
  font-size: 14px;
}
.afc-formats__table th,
.afc-formats__table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--afc-border);
  text-align: left;
  white-space: nowrap;
}
.afc-formats__table thead th {
  background: var(--afc-bg-alt, #f3eee4);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--afc-text-muted);
}
.afc-formats__table tbody th { font-weight: 600; color: var(--afc-text); white-space: normal; }
.afc-formats__table tbody tr:last-child > * { border-bottom: 0; }
.afc-formats__note { margin: 10px 0 0; text-align: center; font-size: 13px; color: var(--afc-text-faint); }

/* ── FAQ ── */
.afc-faq { display: flex; flex-direction: column; gap: 10px; }
.afc-faq__item {
  background: var(--afc-surface, #fff);
  border: 1px solid var(--afc-border);
  border-radius: 12px;
}
.afc-faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  font-weight: 700;
  font-size: 15px;
  color: var(--afc-text);
  cursor: pointer;
  list-style: none;
}
.afc-faq__item summary::-webkit-details-marker { display: none; }
.afc-faq__item summary::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 20px;
  line-height: 1;
  color: var(--afc-accent);
  transition: transform .2s;
}
.afc-faq__item[open] summary::after { transform: rotate(45deg); }
.afc-faq__item summary:focus-visible { outline: 3px solid var(--afc-accent); outline-offset: 2px; border-radius: 12px; }
.afc-faq__item p { margin: 0; padding: 0 18px 16px; font-size: 14.5px; line-height: 1.6; color: var(--afc-text-muted); }

/* ── Tablette : schéma sur deux colonnes ── */
@media (max-width: 1024px) {
  .afc-plan { grid-template-columns: 1fr 1fr; }
  .afc-plan__ecran--bureau { grid-column: 1 / -1; }
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .afc-ads [id] { scroll-margin-top: 120px; }
  .afc-plan { grid-template-columns: 1fr; gap: 26px; }
  .afc-plan__ecran--mobile { width: 100%; max-width: 220px; margin: 0 auto; }
  .afc-plan__zone--carre { height: 90px; }
  .afc-plan__legende { grid-template-columns: 1fr; }
  /* Une seule ligne : les liens défilent, la devise reste à droite. */
  .afc-offres-nav__inner { gap: 8px; padding-top: 8px; padding-bottom: 8px; }
  .afc-offres-nav__liens { flex: 1; min-width: 0; }
  .afc-offres-nav__liens a { padding: 7px 9px; font-size: 13.5px; }
  .afc-devise__long { display: none; }
  .afc-devise__btn { padding: 6px 11px; }
  .afc-reseaux,
  .afc-packs { grid-template-columns: 1fr; }
  .afc-formats__table th,
  .afc-formats__table td { padding: 9px 10px; }
}
