/* ==========================================
   ARTICLES.CSS — Ma'Tour Guide Madagascar
   Style blog + images portrait TikTok-like
========================================== */

body {
    background: #fbf7ef;
    color: #2a2438;
}

.article-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 110px 24px 80px;
}

/* ---------- BREADCRUMB ---------- */
.article-breadcrumb {
    font-size: 14px;
    color: #a95732;
    margin-bottom: 20px;
}
.article-breadcrumb a {
    color: inherit;
    text-decoration: none;
}
.article-breadcrumb a:hover {
    text-decoration: underline;
}

/* ---------- TITRES ---------- */
.article-page h1 {
    font-family: var(--display, Georgia, serif);
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.08;
    margin: 0 0 22px;
    color: #2a2438;
}

.article-intro {
    font-size: 20px;
    line-height: 1.7;
    color: #665c55;
    max-width: 760px;
    margin-bottom: 36px;
}

.article-meta {
    font-size: 13px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #a95732;
    margin-bottom: 34px;
}

.article-page h2 {
    font-family: var(--display, Georgia, serif);
    font-size: 34px;
    margin: 42px 0 16px;
    color: #2a2438;
}

.article-page h3 {
    font-family: var(--display, Georgia, serif);
    font-size: 22px;
    margin: 32px 0 12px;
    color: #2a2438;
}

/* ---------- TEXTE ---------- */
.article-page p,
.article-page li {
    font-size: 17px;
    line-height: 1.85;
    color: #4e4843;
}

.article-page ul,
.article-page ol {
    padding-left: 24px;
    margin-bottom: 24px;
}

.article-page ul li,
.article-page ol li {
    margin-bottom: 8px;
}

/* ---------- TABLEAUX ---------- */
.article-page table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0;
    font-size: 15px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(42, 36, 56, 0.06);
}

.article-page thead {
    background: #f2e7d5;
}

.article-page th {
    text-align: left;
    padding: 14px 16px;
    font-family: var(--display, Georgia, serif);
    font-size: 15px;
    font-weight: 600;
    color: #2a2438;
}

.article-page td {
    padding: 14px 16px;
    border-top: 1px solid #efe6d6;
    color: #4e4843;
    vertical-align: top;
}

.article-page td strong {
    color: #2a2438;
}

/* ==========================================
   IMAGES PORTRAIT STYLE TIKTOK (9:16)
========================================== */

.article-page figure {
    margin: 44px auto;
    max-width: 420px;
    text-align: center;
}

.article-page figure img {
    width: 100%;
    aspect-ratio: 9 / 16;
    max-height: 720px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(42, 36, 56, 0.15);
    display: block;
    margin: 0 auto;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.article-page figure img:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 18px 44px rgba(42, 36, 56, 0.22);
}

.article-page figcaption {
    font-size: 13px;
    color: #766e68;
    margin-top: 12px;
    font-style: italic;
    line-height: 1.6;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}

/* Exception : hero en format paysage (pour OG / social) */
.article-page figure.hero-figure {
    max-width: 100%;
    margin: 0 0 40px;
}

.article-page figure.hero-figure img {
    aspect-ratio: 16 / 9;
    max-height: 500px;
    border-radius: 16px;
}

/* ---------- TABLE DES MATIÈRES ---------- */
.article-toc {
    background: #f2e7d5;
    border-radius: 16px;
    padding: 26px 30px;
    margin: 36px 0;
}

.article-toc h2 {
    font-family: var(--display, Georgia, serif);
    font-size: 20px;
    margin: 0 0 14px;
    color: #2a2438;
}

.article-toc ol {
    padding-left: 22px;
    margin: 0;
}

.article-toc li {
    font-size: 15px;
    line-height: 1.9;
    color: #4e4843;
}

.article-toc a {
    color: #a95732;
    text-decoration: none;
    font-weight: 500;
}

.article-toc a:hover {
    text-decoration: underline;
}

/* ---------- CALLOUT & CTA ---------- */
.article-callout {
    background: #f2e7d5;
    border-left: 4px solid #c85d2e;
    padding: 22px 24px;
    border-radius: 0 14px 14px 0;
    margin: 30px 0;
    font-size: 16px;
    line-height: 1.7;
    color: #4e4843;
}

.article-callout strong {
    color: #a34b29;
}

.article-cta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 42px;
}

.article-back {
    display: inline-block;
    margin-top: 32px;
    color: #a95732;
    font-weight: 600;
    text-decoration: none;
}

.article-back:hover {
    text-decoration: underline;
}

/* ---------- NAV FIXE ---------- */
.article-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 18px rgba(42, 36, 56, .08);
    padding: 16px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.article-nav a {
    color: #2a2438;
    font-weight: 600;
    text-decoration: none;
    font-size: 15px;
}

.article-nav a:hover {
    color: #a95732;
}

.article-nav .article-home {
    font-family: var(--display, Georgia, serif);
    font-size: 20px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 700px) {
    .article-page {
        padding-top: 100px;
    }
    .article-page p,
    .article-page li {
        font-size: 16px;
    }
    .article-nav .article-home {
        font-size: 17px;
    }
    .article-page h2 {
        font-size: 28px;
    }
    .article-page h3 {
        font-size: 20px;
    }
    .article-page table {
        font-size: 14px;
    }
    .article-page th,
    .article-page td {
        padding: 10px 12px;
    }
}

@media (max-width: 600px) {
    .article-page figure {
        max-width: 92%;
        margin: 32px auto;
    }
    .article-page figure img {
        max-height: 600px;
        border-radius: 16px;
    }
    .article-page figure.hero-figure img {
        max-height: 320px;
    }
    .article-page h1 {
        font-size: 34px;
    }
    .article-intro {
        font-size: 17px;
    }
    .article-nav {
        padding: 12px 4%;
    }
    .article-nav a {
        font-size: 13px;
    }
}
/* ==========================================
   CONTACT MODAL (partagé avec articles)
========================================== */
.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease, visibility .35s ease;
}

.contact-modal.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.contact-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(42, 36, 56, .62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.contact-modal-content {
  position: relative;
  z-index: 1;
  width: min(100%, 620px);
  padding: 42px;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 28px;
  background: #fbf7ef;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
  transform: translateY(18px) scale(.98);
  transition: transform .4s cubic-bezier(.22, .61, .36, 1);
}

.contact-modal.open .contact-modal-content {
  transform: translateY(0) scale(1);
}

.contact-modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .06);
  color: #2a2438;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
}

.contact-modal-close:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .1);
}

.contact-modal-header {
  text-align: center;
  margin-bottom: 26px;
}

.contact-modal-header .eyebrow {
  color: #c85d2e;
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.contact-modal-header h2 {
  margin: 8px 0 10px;
  color: #2a2438;
  font-family: var(--display, Georgia, serif);
  font-weight: 500;
  font-size: 26px;
}

.contact-modal-header p {
  margin: 0;
  color: #665c55;
  line-height: 1.6;
  font-size: 15px;
}

.contact-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.contact-option-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 22px 14px;
  border: 1px solid rgba(42, 36, 56, .12);
  border-radius: 20px;
  background: #fff;
  color: #2a2438;
  text-decoration: none;
  text-align: center;
  transition: transform .3s ease, box-shadow .3s ease;
}

.contact-option-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .1);
}

.contact-option-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #fff;
}

.contact-option-icon svg {
  width: 25px;
  height: 25px;
}

.contact-option-icon.whatsapp { background: #25d366; }
.contact-option-icon.email { background: #c85d2e; }
.contact-option-icon.messenger { background: #168aff; }

.contact-option-body h3 {
  margin: 0 0 5px;
  font-size: 16px;
  color: #2a2438;
  font-family: var(--display, Georgia, serif);
  font-weight: 500;
}

.contact-option-body p {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #665c55;
}

@media (max-width: 640px) {
  .contact-modal { padding: 16px; }
  .contact-modal-content { padding: 38px 18px 22px; border-radius: 22px; }
  .contact-options { grid-template-columns: 1fr; gap: 10px; }
  .contact-option-card { flex-direction: row; text-align: left; padding: 14px 16px; }
  .contact-option-icon { flex: 0 0 42px; width: 42px; height: 42px; }
  .contact-option-body { flex: 1; }
}

/* Fix mobile : neutralise le menu tiroir de base.css (nav {transform: translateX(100%)...}) sur la barre des articles */
.article-nav { width: auto; height: auto; transform: none; flex-direction: row; flex-wrap: wrap; transition: none; }
@media (max-width: 900px) {
  .article-nav a { margin: 0; }
}
@media (max-width: 600px) {
  .article-nav { padding: 8px 12px; gap: 2px 16px; justify-content: center; }
  .article-nav a { font-size: 14px; padding: 2px 0; line-height: 1.3; }
  .article-nav .article-home { flex-basis: 100%; text-align: center; }
}
