/*
 * Blog AURORE — page /blog et articles.
 *
 * Chargée uniquement sur ces vues (voir aurore_enqueue_blog_style()). Les
 * variables reprennent à l'identique les jetons de src/index.css (@theme) et
 * les valeurs compilées de Tailwind utilisées par l'application React.
 */

:root {
  /* Polices de la charte, déclarées dans assets/css/fonts.css */
  --font-display: var(--font-heading, 'Space Grotesk', ui-sans-serif, system-ui, sans-serif);
  --font-sans: var(--font-body, 'Roboto', ui-sans-serif, system-ui, sans-serif);

  --color-cream-100: #fbf6ec;
  --color-cream-200: #f5ecdd;
  --color-cream-300: #ebddc4;

  --color-ink-300: #b7afa0;
  --color-ink-500: #726a5c;
  --color-ink-700: #453f35;
  --color-ink-900: #1b1712;

  --color-ember-500: #dd7a2e;
  --color-ember-600: #bd5f1e;

  --shadow-soft: 0 2px 10px rgba(27, 23, 18, 0.05), 0 10px 30px rgba(27, 23, 18, 0.06);
  --shadow-glow: 0 12px 46px rgba(221, 122, 46, 0.35);

  --leading-relaxed: 1.625;
  --ease-out-aurore: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ------------------------------------------------------------------ */
/* Base                                                                 */
/* ------------------------------------------------------------------ */

.aurore-blog,
.aurore-blog *,
.aurore-blog *::before,
.aurore-blog *::after {
  box-sizing: border-box;
}

body.aurore-blog {
  margin: 0;
  background-color: var(--color-cream-100);
  color: var(--color-ink-900);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.aurore-blog h1,
.aurore-blog h2,
.aurore-blog h3,
.aurore-blog h4,
.aurore-blog h5,
.aurore-blog h6 {
  font-family: var(--font-display);
  color: var(--color-ink-900);
  letter-spacing: -0.025em;
}

.aurore-blog img {
  max-width: 100%;
  height: auto;
}

.aurore-blog :focus-visible {
  outline: 2px solid var(--color-ember-500);
  outline-offset: 3px;
  border-radius: 4px;
}

.aurore-blog .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* Conteneur : max-w-7xl, px-5 / sm:px-8 / lg:px-10 */
.aurore-container {
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* Conteneur étroit : max-w-3xl */
.aurore-container--narrow {
  max-width: 48rem;
}

/* Section : py-16 / sm:py-20 */
.aurore-section {
  padding-block: 4rem;
}

/* ------------------------------------------------------------------ */
/* En-tête et pied de page                                              */
/* ------------------------------------------------------------------ */

.aurore-blog-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--color-cream-300);
  background-color: rgba(251, 246, 236, 0.85); /* cream-100/85 */
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.admin-bar .aurore-blog-header {
  top: var(--wp-admin--admin-bar--height, 0);
}

.aurore-blog-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 68px;
}

.aurore-blog-header__logo {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--color-ink-900);
  text-decoration: none;
}

.aurore-blog-header__logo img {
  width: auto;
  height: 2.5rem;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform 0.3s;
}

.aurore-blog-header__logo:hover img {
  transform: scale(1.05);
}

.aurore-blog-header__nav {
  display: none;
  align-items: center;
  gap: 2rem;
}

.aurore-blog-header__nav a {
  font-size: 0.875rem;
  line-height: calc(1.25 / 0.875);
  font-weight: 500;
  color: var(--color-ink-700);
  text-decoration: none;
  transition: color 0.15s;
}

.aurore-blog-header__nav a:hover,
.aurore-blog-header__nav a[aria-current='page'] {
  color: var(--color-ink-900);
}

.aurore-blog-footer {
  background-color: var(--color-ink-900);
  color: rgba(235, 221, 196, 0.6); /* cream-300/60 */
  font-size: 0.75rem;
  line-height: calc(1 / 0.75);
}

.aurore-blog-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-block: 2rem;
}

.aurore-blog-footer p {
  margin: 0;
}

.aurore-blog-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

.aurore-blog-footer__nav a {
  color: inherit;
  text-decoration: none;
}

.aurore-blog-footer__nav a:hover {
  color: #fefcfa; /* cream-50 */
}

/* ------------------------------------------------------------------ */
/* Boutons (Button.tsx, taille sm)                                      */
/* ------------------------------------------------------------------ */

.aurore-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  height: 2.5rem;
  padding-inline: 1rem;
  border-radius: 9999px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
  transition: all 0.3s ease-out;
}

.aurore-button:active {
  transform: scale(0.98);
}

.aurore-button--primary {
  background-color: var(--color-ember-500);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.aurore-button--primary:hover {
  background-color: var(--color-ember-600);
}

.aurore-button--outline {
  border: 1px solid var(--color-ink-300);
  background-color: transparent;
  color: var(--color-ink-900);
}

.aurore-button--outline:hover {
  border-color: var(--color-ink-900);
  background-color: rgba(27, 23, 18, 0.03); /* ink-900/[0.03] */
}

/* ------------------------------------------------------------------ */
/* Titre de section (SectionTitle.tsx)                                  */
/* ------------------------------------------------------------------ */

.aurore-eyebrow {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  line-height: calc(1 / 0.75);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-ember-600);
}

.aurore-section-title {
  max-width: 42rem;
  margin-inline: auto;
  text-align: center;
}

.aurore-section-title__heading {
  margin: 0;
  font-size: 1.875rem;
  font-weight: 500;
  line-height: 1.1;
  text-wrap: balance;
}

.aurore-section-title__description {
  margin-top: 1rem;
  font-size: 1rem;
  line-height: var(--leading-relaxed);
  color: var(--color-ink-500);
  text-wrap: balance;
}

.aurore-section-title__description > :first-child {
  margin-top: 0;
}

.aurore-section-title__description > :last-child {
  margin-bottom: 0;
}

/* ------------------------------------------------------------------ */
/* Grille des articles                                                  */
/* ------------------------------------------------------------------ */

.aurore-blog-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.aurore-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(235, 221, 196, 0.7); /* cream-300/70 */
  border-radius: 1.5rem; /* rounded-3xl */
  background-color: #fff;
  transition: box-shadow 0.3s var(--ease-out-aurore), transform 0.3s var(--ease-out-aurore);
}

.aurore-card:hover {
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.aurore-card__media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--color-cream-200);
}

.aurore-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out-aurore);
}

.aurore-card:hover .aurore-card__media img {
  transform: scale(1.03);
}

.aurore-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.5rem;
}

.aurore-card__body .aurore-eyebrow {
  margin-bottom: 0;
}

.aurore-card__title {
  margin: 0.75rem 0 0;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: calc(1.75 / 1.25);
}

.aurore-card__title a {
  color: inherit;
  text-decoration: none;
}

.aurore-card__title a:hover {
  color: var(--color-ember-600);
}

.aurore-card__excerpt {
  flex: 1;
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  line-height: var(--leading-relaxed);
  color: var(--color-ink-500);
}

.aurore-card__body .aurore-button {
  margin-top: 1.25rem;
}

.aurore-blog-empty {
  margin-top: 3rem;
  text-align: center;
  color: var(--color-ink-500);
}

/* ------------------------------------------------------------------ */
/* Pagination                                                           */
/* ------------------------------------------------------------------ */

.aurore-pagination {
  margin-top: 3rem;
}

.aurore-pagination ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aurore-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding-inline: 0.875rem;
  border: 1px solid var(--color-ink-300);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-ink-900);
  text-decoration: none;
  transition: all 0.3s ease-out;
}

.aurore-pagination a.page-numbers:hover {
  border-color: var(--color-ink-900);
}

.aurore-pagination .page-numbers.current {
  border-color: var(--color-ink-900);
  background-color: var(--color-ink-900);
  color: #fefcfa; /* cream-50 */
}

.aurore-pagination .page-numbers.dots {
  border-color: transparent;
}

/* ------------------------------------------------------------------ */
/* Article                                                              */
/* ------------------------------------------------------------------ */

.aurore-back-link {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-ink-500);
  text-decoration: none;
}

.aurore-back-link:hover {
  color: var(--color-ink-900);
}

.aurore-article__header {
  margin-top: 2rem;
}

.aurore-article__media {
  margin: 2.5rem 0 0;
  overflow: hidden;
  border-radius: 2rem;
  background-color: var(--color-cream-200);
}

.aurore-article__media img {
  display: block;
  width: 100%;
}

.aurore-entry {
  margin-top: 2.5rem;
  font-size: 1rem;
  line-height: var(--leading-relaxed);
  color: var(--color-ink-700);
}

.aurore-entry > :first-child {
  margin-top: 0;
}

.aurore-entry p,
.aurore-entry ul,
.aurore-entry ol,
.aurore-entry blockquote,
.aurore-entry figure {
  margin: 0 0 1.25em;
}

.aurore-entry h2 {
  margin: 2em 0 0.75em;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: calc(2 / 1.5);
}

.aurore-entry h3 {
  margin: 1.75em 0 0.5em;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: calc(1.75 / 1.25);
}

.aurore-entry a {
  color: var(--color-ember-600);
  text-underline-offset: 3px;
}

.aurore-entry a.aurore-button {
  text-decoration: none;
}

.aurore-entry .aurore-entry__cta {
  margin-top: 2.5rem;
}

.aurore-entry figure img {
  display: block;
  height: auto;
}

.aurore-entry a.aurore-button--primary {
  color: #fff;
}

.aurore-entry ul,
.aurore-entry ol {
  padding-left: 1.25em;
}

.aurore-entry blockquote {
  padding-left: 1.25rem;
  border-left: 3px solid var(--color-ember-500);
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: calc(1.75 / 1.25);
  color: var(--color-ink-900);
}

.aurore-entry img {
  border-radius: 1.5rem;
}

.aurore-entry figcaption {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-ink-500);
}

.aurore-article__back {
  margin-top: 3rem;
}

/* ------------------------------------------------------------------ */
/* Responsive — breakpoints Tailwind : sm 40rem, md 48rem, lg 64rem     */
/* ------------------------------------------------------------------ */

@media (min-width: 40rem) {
  .aurore-container {
    padding-inline: 2rem;
  }

  .aurore-section {
    padding-block: 5rem;
  }

  .aurore-section-title__heading {
    font-size: 2.25rem;
  }

  .aurore-section-title__description {
    font-size: 1.125rem;
  }

  .aurore-blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .aurore-card__body {
    padding: 1.75rem;
  }

  .aurore-entry {
    font-size: 1.125rem;
  }

  .aurore-blog-footer__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 48rem) {
  .aurore-blog-header__nav {
    display: flex;
  }
}

@media (min-width: 64rem) {
  .aurore-container {
    padding-inline: 2.5rem;
  }

  .aurore-section-title__heading {
    font-size: 2.75rem;
  }

  .aurore-blog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .aurore-blog *,
  .aurore-blog *::before,
  .aurore-blog *::after {
    transition-duration: 0.001ms !important;
  }
}
