/* ==========================================================================
   partials.css — styles des fragments partages (views/partials/)
   --------------------------------------------------------------------------
   Charge sur TOUTES les pages publiques par layouts/public.php, apres
   styles.css / grilles.css / components.css / footer.css.

   Ces fragments apparaissent sur plusieurs pages (blog, services, books,
   about, contact, articles). Leurs styles etaient dans blog.css, charge
   uniquement sur /blog : d'ou le fil d'ariane, la CTA et la newsletter
   non styles ailleurs.

   Les classes de styles.css (.article-card, .card-*, .cta-button,
   .articles-grid, .section-title...) ne sont PAS redefinies ici.
   ========================================================================== */

:root {
  --primary-color: #2C5370;
  --t1-border: #e3e7ec;
  --t1-muted: #6b7682;
}

/* ------------------------------------------------------------------ */
/* Utilitaires                                                          */
/* ------------------------------------------------------------------ */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] { display: none !important; }

/* Pot de miel anti-spam (newsletter + contact) : jamais visible */
.hp-field {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 48px 24px;
  text-align: center;
  color: #555;
  background: #fff;
  border: 2px dashed var(--t1-border);
}

/* ------------------------------------------------------------------ */
/* Messages flash (layout public)                                       */
/* ------------------------------------------------------------------ */
.flash { padding: 14px 0; }

.flash__inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 14px 20px;
  font-weight: 600;
  border-left: 4px solid;
}

.flash--success .flash__inner { color: #1e5b36; background: #e8f5ec; border-color: #2e8b57; }
.flash--info .flash__inner    { color: var(--primary-color); background: #eef3f7; border-color: var(--primary-color); }
.flash--warning .flash__inner { color: #7a5200; background: #fff6e0; border-color: #d99a00; }
.flash--error .flash__inner   { color: #8a1f1f; background: #fdecec; border-color: #c0392b; }

/* ------------------------------------------------------------------ */
/* Fil d'ariane                                                         */
/* Bande discrete entre le header et le hero de chaque page.           */
/* ------------------------------------------------------------------ */
.breadcrumb {
  background: #fff;
  border-bottom: 1px solid var(--t1-border);
  font-size: 0.85rem;
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  max-width: 1300px;
  margin: 0 auto;
  padding: 12px 40px;
  list-style: none;
}

.breadcrumb__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--t1-muted);
}

.breadcrumb__item a {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
}

.breadcrumb__item a:hover { text-decoration: underline; }

.breadcrumb__item [aria-current="page"] {
  color: #555;
  /* Titres d'articles longs : une seule ligne sur mobile */
  max-width: 60ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumb__sep {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  color: #9aa3ad;
}

/* ------------------------------------------------------------------ */
/* Carte d'article : ajouts du partial article-card.php                 */
/* (listing, articles lies des services, auteur, 404)                  */
/* ------------------------------------------------------------------ */
.card-image-wrapper {
  position: relative;
  margin: 0;               /* <figure> a 40px de marge navigateur */
}

.card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  background: var(--primary-color);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-bottom: 10px;
}

.card-meta .card-date { margin-bottom: 0; }

.card-category {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #555;
}

.card-reading {
  font-size: 0.85rem;
  color: var(--t1-muted);
}

.card-author {
  margin: 14px 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #555;
}

/* ------------------------------------------------------------------ */
/* Articles lies (services, articles)                                   */
/* ------------------------------------------------------------------ */
.related-articles {
  padding: 80px 0;
  background: linear-gradient(to bottom, #fafbfc 0%, #ffffff 100%);
}

.related-articles .section-title {
  margin-bottom: 40px;
  text-align: center;
}

/* ------------------------------------------------------------------ */
/* Pagination (blog, categories, auteur)                                */
/* ------------------------------------------------------------------ */
.pagination-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
  background: #fff;
  border: 2px solid var(--t1-border);
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

a.page-link:hover { border-color: var(--primary-color); }

.page-link.active {
  color: #fff;
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.page-link:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 3px;
}

.page-ellipsis {
  padding: 0 4px;
  color: var(--t1-muted);
}

.pagination-summary {
  margin: 14px 0 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--t1-muted);
}

/* ------------------------------------------------------------------ */
/* CTA consulting ("Start the conversation", "See the services"...)     */
/* ------------------------------------------------------------------ */
.cta-consulting {
  padding: 70px 0;
  background: #f3f6f9;
  border-top: 1px solid var(--t1-border);
}

.cta-consulting__inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 40px;
  text-align: center;
}

.cta-consulting__kicker {
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary-color);
}

.cta-consulting__title {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  line-height: 1.2;
  color: #111;
}

.cta-consulting__text {
  max-width: 600px;
  margin: 0 auto 28px;
  font-size: 1.05rem;
  line-height: 1.6;
  color: #555;
}

/* L'icone vient du sprite (<use>) : ".cta-icon path" de styles.css ne
   l'atteint pas, on la colore via currentColor. */
.cta-button .cta-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
}

/* ------------------------------------------------------------------ */
/* Newsletter                                                           */
/* ------------------------------------------------------------------ */
.newsletter {
  padding: 70px 0;
  background: var(--primary-color);
  color: #fff;
}

.newsletter__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 40px;
}

.newsletter__title {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 800;
  color: #fff;
}

.newsletter__text {
  margin: 0;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

.newsletter__form {
  display: flex;
  flex-wrap: wrap;
}

.newsletter__input {
  flex: 1;
  min-width: 0;
  padding: 16px;
  font: inherit;
  font-size: 1rem;
  color: #222;
  background: #fff;
  border: 2px solid #fff;
  border-radius: 0;
}

.newsletter__input:focus {
  outline: 3px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.newsletter__button {
  padding: 16px 28px;
  font: inherit;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary-color);
  background: #fff;
  border: 2px solid #fff;
  border-radius: 0;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.newsletter__button:hover {
  background: transparent;
  color: #fff;
}

.newsletter__legal,
.newsletter__feedback {
  flex-basis: 100%;
  margin: 12px 0 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
}

.newsletter__legal a { color: #fff; }

.newsletter__feedback:empty { display: none; }

/* ==========================================================================
   RESPONSIVE (memes seuils que styles.css)
   ========================================================================== */
@media (max-width: 992px) {
  .newsletter__inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 600px) {
  .breadcrumb__list { padding: 10px 20px; }
  .breadcrumb__item [aria-current="page"] { max-width: 22ch; }

  .related-articles { padding: 60px 0; }

  .cta-consulting,
  .newsletter { padding: 50px 0; }

  .cta-consulting__inner,
  .newsletter__inner { padding: 0 20px; }

  .page-link { min-width: 40px; height: 40px; }

  .newsletter__form { flex-direction: column; }
  .newsletter__input { flex: none; width: 100%; }
  .newsletter__button { width: 100%; margin-top: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .page-link,
  .newsletter__button { transition: none; }
}