/*
Theme Name: AKLIO
Theme URI: https://aklio.fr
Author: AKLIO
Author URI: https://aklio.fr
Description: Custom WordPress theme for the AKLIO blog.
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: aklio
*/

/* =========================================================
   AKLIO BLOG
   Blog-specific styles only.
   The general AKLIO identity remains in /style-v2.css.
   ========================================================= */

/* Keep the footer at the bottom on short pages */

body.home,
body.blog {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.home .aklio-blog-main,
body.blog .aklio-blog-main {
  flex: 1;
}

/* General blog layout */

.aklio-blog-main {
  background: var(--almond);
  color: var(--navy);
}

.aklio-blog-container {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

/* =========================================================
   HERO
   ========================================================= */

.aklio-blog-hero {
  padding: 82px 0 76px;
  text-align: left;
  background: var(--almond);
}

.aklio-blog-label {
  margin: 0 0 22px;
  font-size: 3.0rem;
  font-family: 'New Farm', Georgia, serif;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cornflower);
}

.aklio-blog-hero h1 {
  font-family: 'New Farm', Georgia, serif;
  font-size: 2.0rem;
  font-weight: 700;
  line-height: 1;
  color: var(--navy);
}

.aklio-blog-hero h1 {
  max-width: 930px;
  margin: 0 auto 24px;
  font-size: clamp(2.7rem, 5.6vw, 5.2rem);
  line-height: 1.04;
  text-wrap: balance;
}

.aklio-blog-intro {
  max-width: 760px;
  margin: 0 auto;
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.75;
  color: var(--navy);
}

/* =========================================================
   ARTICLES SECTION
   ========================================================= */

.aklio-blog-section {
  padding: 68px 0 88px;
}

.aklio-section-header {
  max-width: 760px;
  margin: 0 auto 42px;
  text-align: left;
}

.aklio-section-label {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy);
}

.aklio-section-header h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.12;
}

/* =========================================================
   ARTICLE GRID
   ========================================================= */

.aklio-post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px;
  align-items: stretch;
}

/* Keep a single article balanced and centred */

.aklio-post-grid:has(.aklio-post-card:only-child) {
  grid-template-columns: minmax(0, 542px);
  max-width: 542px;
  margin: 0 auto;
  grid-template-columns: 1fr;
  justify-content: center;
}

/* =========================================================
   ARTICLE CARD
   ========================================================= */

.aklio-post-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--sky-blue);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow:
    0 8px 0 var(--navy),
    0 18px 42px rgba(0, 0, 102, 0.08);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.aklio-post-card:hover {
  transform: translateY(-5px);
  box-shadow:
    0 11px 0 var(--navy),
    0 24px 50px rgba(0, 0, 102, 0.13);
}

/* Article image */

.aklio-post-thumbnail {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--pale-blue);
  text-decoration: none;
}

.aklio-post-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.aklio-post-card:hover .aklio-post-thumbnail img {
  transform: scale(1.035);
}

/* Placeholder until featured image added */

.aklio-post-placeholder {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  text-align: left;
  background:
    radial-gradient(
      circle at 15% 20%,
      rgba(255, 255, 255, 0.8),
      transparent 35%
    ),
    linear-gradient(135deg, var(--pale-blue), var(--almond));
  color: var(--navy);
}

.aklio-post-placeholder strong {
  font-size: clamp(2.1rem, 5vw, 4.2rem);
  letter-spacing: 0.14em;
}

.aklio-post-placeholder small {
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}

/* Card content */

.aklio-post-card-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 34px;
}

.aklio-post-meta {
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
}

.aklio-post-card h3 {
  margin: 0 0 16px;
  font-size: clamp(1.65rem, 2.6vw, 2.3rem);
  line-height: 1.18;
}

.aklio-post-card h3 a {
  color: var(--navy);
  text-decoration: none;
}

.aklio-post-card h3 a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

.aklio-post-excerpt {
  margin-bottom: 28px;
  line-height: 1.75;
  color: var(--navy);
}

.aklio-post-excerpt p {
  margin: 0;
}

.aklio-post-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 10px;
  margin-top: auto;
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
  font-weight: 750;
  color: var(--orange);
  text-decoration: none;
}

.aklio-post-link span {
  transition: transform 0.2s ease;
}

.aklio-post-link:hover span {
  transform: translateX(5px);
}

/* =========================================================
   PAGINATION
   ========================================================= */

.aklio-pagination {
  margin-top: 62px;
}

.aklio-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.aklio-pagination .page-numbers {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 9px 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--navy);
  text-decoration: none;
}

.aklio-pagination .page-numbers:hover,
.aklio-pagination .page-numbers.current {
  background: var(--navy);
  color: var(--almond);
}

/* =========================================================
   EMPTY BLOG
   ========================================================= */

.aklio-blog-empty {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px;
  text-align: center;
  background: var(--almond);
  border-radius: 24px;
  box-shadow: 0 14px 40px rgba(0, 0, 102, 0.08);
}

.aklio-blog-empty h3 {
  margin: 0 0 14px;
}

.aklio-blog-empty p {
  margin: 0;
  line-height: 1.7;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {
  .aklio-post-grid {
    grid-template-columns: 1fr;
    max-width: 720px;
    margin: 0 auto;
  }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 680px) {
  .aklio-blog-container {
    width: min(100% - 32px, 1120px);
  }

  .aklio-blog-hero {
    padding: 58px 0 52px;
  }

  .aklio-blog-section {
    padding: 52px 0 68px;
  }

  .aklio-section-header {
    margin-bottom: 30px;
  }

  .aklio-post-grid {
    gap: 28px;
  }

  .aklio-post-card {
    border-radius: 19px;
  }

  .aklio-post-card-content {
    padding: 26px;
  }

  .aklio-blog-empty {
    padding: 34px 24px;
  }
}

/* =========================================================
   SINGLE ARTICLE — hiérarchie titre
   ========================================================= */

.aklio-single-header .aklio-post-category {
  margin: 0 0 12px;
  font-family: 'New Farm', Georgia, serif;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.04;
  color: var(--navy);
  text-wrap: balance;
}

.aklio-single-header h1 {
  margin: 0 0 22px;
  font-family: 'New Farm', Georgia, serif;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  color: var(--cornflower);
}
 
/* =========================================================
   SINGLE ARTICLE — contenu éditorial Gutenberg
   ========================================================= */

.aklio-single-content {
  margin-top: 32px;
  color: var(--navy);
  font-size: 1.1rem;
  line-height: 1.75;
  text-align: left;
}

/* Paragraphes */

.aklio-single-content p {
  margin: 0 0 1.5em;
  color: var(--navy);
}

/* Titres éditoriaux */

body.single .aklio-single-content h2,
body.single .aklio-single-content h3,
body.single .aklio-single-content h4,
body.single .aklio-single-content h5,
body.single .aklio-single-content h6 {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  font-family: 'New Farm', Georgia, serif;
  font-weight: 700;
  color: var(--navy);
  text-align: left;
}

/* H2 — grande section */

body.single .aklio-single-content h2 {
  margin-top: 1.4em;
  margin-bottom: 0.55em;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  line-height: 1.08;
}

/* H3 — sous-section */

body.single .aklio-single-content h3 {
  margin-top: 1.25em;
  margin-bottom: 0.5em;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.15;
}

/* H4 — niveau intermédiaire */

body.single .aklio-single-content h4 {
  margin-top: 1.1em;
  margin-bottom: 0.45em;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  line-height: 1.2;
}

/* H5 */

body.single .aklio-single-content h5 {
  margin-top: 1.1em;
  margin-bottom: 0.45em;
  font-size: 1.15rem;
  line-height: 1.3;
}

/* H6 */

body.single .aklio-single-content h6 {
  margin-top: 1.1em;
  margin-bottom: 0.45em;
  font-size: 1rem;
  line-height: 1.3;
}

/* Listes */

.aklio-single-content ul,
.aklio-single-content ol {
  margin: 0 0 1.5em;
  padding-left: 1.6em;
  color: var(--navy);
}

.aklio-single-content li {
  margin-bottom: 0.45em;
}

/* Liens */

.aklio-single-content a {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Citations Gutenberg */

.aklio-single-content blockquote {
  margin: 2em 0;
  padding: 1.2em 1.5em;
  border-left: 5px solid var(--cornflower);
  background: var(--sky-blue);
  color: var(--navy);
}

/* Images */

.aklio-single-content img {
  max-width: 100%;
  height: auto;
  border-radius: 18px;
}

/* Légendes */

.aklio-single-content figcaption {
  margin-top: 0.6em;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--navy);
}