/*
Theme Name: HelloVazaha
Theme URI: https://hellovazaha.com/
Author: Nathanaël Berthe
Author URI: https://hellovazaha.com/
Description: Thème custom Carnet-Magazine pour HelloVazaha.com, blog de voyage à Madagascar. Mélange entre rêve magazine éditorial (photos plein écran, typographie serif italique) et carnet de voyage manuscrit (signatures, polaroids, tampons ocre).
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hellovazaha
Tags: blog, travel, editorial, one-column, custom-logo, custom-menu, featured-images, threaded-comments
*/

*,*::before,*::after { margin:0; padding:0; box-sizing:border-box; }

:root {
  --primary: #dd174a;
  --primary-dark: #b3133c;
  --ocre: #c8983a;
  --ocre-dark: #a37b2c;
  --ink: #1a1a1a;
  --ink-soft: #4a4035;
  --paper: #faf5ec;
  --paper-warm: #f2e8d2;
  --paper-aged: #ede1c8;
  --cream: #f5efe4;
  --white: #ffffff;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --script: 'Caveat', cursive;
  --sans: 'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; }
em { font-style: italic; }

/* HEADER : two modes */
.header {
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 2rem 3rem;
}
.header--over-hero {
  position: absolute; top: 0; left: 0; right: 0;
  color: white;
}
.header--default {
  position: sticky; top: 0;
  background: rgba(250,245,236,0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(26,26,26,0.08);
  padding: 1.25rem 3rem;
  color: var(--ink);
}
.header-nav { display: flex; gap: 2.5rem; align-items: center; }
.header-nav a {
  text-decoration: none;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--sans);
  transition: opacity 0.2s, color 0.2s;
}
.header--over-hero .header-nav a { color: white; opacity: 0.9; }
.header--over-hero .header-nav a:hover { opacity: 1; }
.header--default .header-nav a { color: var(--ink); }
.header--default .header-nav a:hover { color: var(--primary); }
.logo-wrap { text-align: center; line-height: 1; }
.logo {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  text-decoration: none;
  display: block;
}
.header--over-hero .logo { color: white; }
.header--default .logo { color: var(--ink); }
.logo-sub {
  font-family: var(--script);
  font-size: 1rem;
  margin-top: 2px;
  display: inline-block;
  transform: rotate(-2deg);
}
.header--over-hero .logo-sub { color: rgba(255,255,255,0.85); }
.header--default .logo-sub { color: var(--ocre-dark); }
.header-right { display: flex; justify-content: flex-end; }
.header-cta {
  padding: 0.6rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--sans);
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  transition: background 0.2s, color 0.2s;
}
.header--over-hero .header-cta { border: 1px solid rgba(255,255,255,0.7); color: white; }
.header--over-hero .header-cta:hover { background: white; color: var(--ink); }
.header--default .header-cta { background: var(--primary); color: white; }
.header--default .header-cta:hover { background: var(--primary-dark); }

/* HERO */
.hero {
  height: 100vh; min-height: 680px;
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  text-align: center; color: white; position: relative;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(rgba(20,15,10,0.25), rgba(20,15,10,0.5));
  pointer-events: none;
}
.hero-content { max-width: 920px; padding: 0 2rem; position: relative; z-index: 1; }
.hero-kicker {
  font-family: var(--script);
  font-size: 1.625rem;
  color: rgba(255,222,150,0.95);
  margin-bottom: 1rem;
  transform: rotate(-1.5deg);
  display: inline-block;
}
.hero h1 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.75rem, 5.5vw, 5rem);
  line-height: 1.05;
  margin-bottom: 1.5rem;
  text-wrap: balance;
}
.hero-sub {
  font-size: 1.0625rem;
  font-weight: 300;
  letter-spacing: 0.03em;
  opacity: 0.92;
  max-width: 540px;
  margin: 0 auto;
}
.hero-signature {
  position: absolute; bottom: 3rem; right: 3.5rem;
  font-family: var(--script);
  font-size: 1.5rem;
  color: rgba(255,255,255,0.9);
  transform: rotate(-3deg);
  text-align: right;
  z-index: 1;
}
.hero-signature::before { content: ''; }
.hero-signature small {
  display: block;
  font-family: var(--sans);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 0.4rem;
  opacity: 0.8;
}
.hero-scroll {
  position: absolute; bottom: 2.5rem; left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 0.6875rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.75;
  z-index: 1;
}
.hero-scroll::after { content: '↓'; display: block; margin-top: 0.5rem; font-size: 1rem; }

/* BIENVENUE */
.bienvenue { background: var(--paper); padding: 7rem 2rem 8rem; position: relative; overflow: hidden; }
.bienvenue-inner {
  display: grid; grid-template-columns: auto 1fr;
  gap: 5rem; max-width: 1100px; margin: 0 auto; align-items: center;
}
.polaroid {
  background: white; padding: 1.25rem 1.25rem 3rem;
  box-shadow: 0 28px 60px rgba(0,0,0,0.18), 0 6px 16px rgba(0,0,0,0.08);
  transform: rotate(-3deg); position: relative; width: 360px; flex-shrink: 0;
  transition: transform 0.5s ease;
}
.polaroid:hover { transform: rotate(0deg); }
.polaroid img { width: 100%; height: 360px; object-fit: cover; }
.polaroid-caption {
  font-family: var(--script); font-size: 1.375rem;
  text-align: center; color: var(--ink); margin-top: 1rem;
  transform: rotate(-1deg);
}
.polaroid::before {
  content: ''; position: absolute; top: -14px; left: 50%;
  transform: translateX(-50%) rotate(-4deg);
  width: 90px; height: 24px; background: rgba(200,152,58,0.55);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.bienvenue-text { padding-right: 1rem; }
.bienvenue-kicker {
  font-family: var(--script); font-size: 1.625rem; color: var(--ocre-dark);
  margin-bottom: 0.5rem; transform: rotate(-1.5deg); display: inline-block;
}
.bienvenue h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2rem, 3.5vw, 3rem); line-height: 1.1;
  margin-bottom: 1.5rem; color: var(--ink); text-wrap: balance;
}
.bienvenue h2 em { font-style: italic; color: var(--primary); }
.bienvenue p {
  font-family: var(--serif); font-size: 1.25rem; line-height: 1.6;
  color: var(--ink-soft); margin-bottom: 1.25rem;
}
.bienvenue-signature {
  font-family: var(--script); font-size: 1.75rem;
  color: var(--ocre-dark); display: inline-block;
  transform: rotate(-1deg); margin-top: 1rem;
}
.bienvenue-signature::before { content: ''; }
.bienvenue-location {
  font-family: var(--sans); font-size: 0.75rem; color: var(--ink-soft);
  margin-top: 0.25rem; letter-spacing: 0.05em; text-transform: uppercase;
  display: block;
}

/* QUOTE */
.quote-section { background: var(--cream); padding: 6rem 2rem; text-align: center; }
.quote-section blockquote {
  max-width: 800px; margin: 0 auto;
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.5rem, 2.5vw, 2rem); line-height: 1.45; color: var(--ink);
}
.quote-section .ornament {
  color: var(--ocre); font-size: 1.25rem; margin: 1.5rem 0; letter-spacing: 0.8rem;
}

/* SECTION TITLE */
.section-title { text-align: center; margin-bottom: 4rem; padding: 0 2rem; }
.section-title .kicker {
  font-family: var(--script); font-size: 1.5rem; color: var(--ocre-dark);
  margin-bottom: 0.5rem; display: inline-block; transform: rotate(-1.5deg);
}
.section-title h2 {
  font-family: var(--serif); font-size: clamp(2rem, 3.5vw, 2.875rem);
  font-weight: 400; color: var(--ink); text-wrap: balance;
}
.section-title h2 em { font-style: italic; color: var(--primary); }

/* GUIDES */
/* GUIDES : cards style polaroid sur fond cream */
.guides-section { padding: 5rem 0 8rem; background: var(--cream); }
.guides--pin {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem 2rem;
  padding: 0 3rem;
  max-width: 1200px;
  margin: 0 auto;
}
.guide-card {
  position: relative;
  background: var(--white);
  padding: 1rem 1rem 1.5rem;
  box-shadow: 0 8px 28px rgba(20,15,10,0.10), 0 2px 6px rgba(20,15,10,0.06);
  border-radius: 2px;
  transform: rotate(var(--pin-rot, 0deg));
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.guide-card:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 0 14px 38px rgba(20,15,10,0.16), 0 4px 12px rgba(20,15,10,0.08);
}
.guide-card-link {
  position: absolute; inset: 0; z-index: 2;
  text-indent: -9999px; overflow: hidden;
}
.guide-card-image {
  width: 100%; aspect-ratio: 4/3;
  overflow: hidden; background: var(--paper-aged);
  margin-bottom: 1.25rem;
}
.guide-card-image img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.guide-card-body { padding: 0 0.5rem; }
.guide-card-title {
  font-family: var(--serif); font-style: normal; font-weight: 500;
  font-size: 1.5rem; line-height: 1.2; color: var(--ink);
  margin: 0 0 0.625rem; text-wrap: balance;
}
.guide-card-excerpt {
  font-family: var(--sans); font-size: 0.9375rem; line-height: 1.5;
  color: var(--ink-soft); margin: 0 0 1rem;
}
.guide-card-cta {
  font-family: var(--script); font-size: 1.125rem;
  color: var(--primary); display: inline-flex; align-items: center; gap: 0.4rem;
}
.guide-card-cta em { font-style: italic; }
.guide-card-cta span { font-family: var(--sans); font-size: 1rem; transition: transform 0.2s; }
.guide-card:hover .guide-card-cta span { transform: translateX(4px); }

@media (max-width: 900px) {
  .guides--pin { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .guides--pin { grid-template-columns: 1fr; padding: 0 1.5rem; }
  .guide-card { transform: none; }
}

/* CARNETS */
.carnets-section { background: var(--paper); padding: 7rem 0 8rem; }
.carnets { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.carnet {
  display: grid; grid-template-columns: 1fr 1.2fr;
  gap: 4rem; margin-bottom: 5rem; align-items: center;
}
.carnet:last-child { margin-bottom: 0; }
.carnet:nth-child(even) { grid-template-columns: 1.2fr 1fr; }
.carnet:nth-child(even) .carnet-image { order: 2; }
.carnet-image { position: relative; }
.carnet-image[data-stamp]:not([data-stamp=""])::before {
  content: attr(data-stamp); position: absolute;
  top: -1rem; left: -1rem; z-index: 2;
  font-family: var(--script); font-size: 1.375rem;
  color: var(--ocre-dark); transform: rotate(-4deg);
  background: var(--paper); padding: 0.4rem 1rem;
  border: 1.5px solid var(--ocre); border-radius: 2px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.carnet:nth-child(even) .carnet-image[data-stamp]:not([data-stamp=""])::before {
  left: auto; right: -1rem; transform: rotate(3deg);
}
.carnet-image img {
  width: 100%; height: 420px; object-fit: cover;
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}
.carnet-date {
  font-family: var(--script); font-size: 1.5rem; color: var(--ocre-dark);
  margin-bottom: 0.5rem; transform: rotate(-1deg); display: inline-block;
}
.carnet-title {
  font-family: var(--serif); font-size: clamp(1.75rem, 2.75vw, 2.375rem);
  font-weight: 400; line-height: 1.15; margin-bottom: 1.25rem; color: var(--ink);
}
.carnet-title a { color: inherit; text-decoration: none; }
.carnet-title a:hover { color: var(--primary); }
.carnet-title em { font-style: italic; }
.carnet-excerpt {
  font-size: 1rem; line-height: 1.7; color: var(--ink-soft); font-weight: 400;
}
.carnet-link {
  display: inline-block; margin-top: 1.75rem; color: var(--primary);
  font-family: var(--sans); font-size: 0.8125rem; letter-spacing: 0.15em;
  text-transform: uppercase; text-decoration: none; font-weight: 500;
  border-bottom: 1px solid currentColor; padding-bottom: 4px;
  transition: color 0.2s;
}
.carnet-link:hover { color: var(--primary-dark); }

/* NEWSLETTER */
.newsletter {
  position: relative; background-size: cover; background-position: center;
  padding: 9rem 2rem; text-align: center; color: white;
}
.newsletter::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(rgba(20,15,10,0.6), rgba(20,15,10,0.6));
  pointer-events: none;
}
.newsletter > * { position: relative; z-index: 1; }
.newsletter-kicker {
  font-family: var(--script); font-size: 1.625rem;
  color: rgba(255,222,150,0.95); margin-bottom: 0.5rem;
  display: inline-block; transform: rotate(-1.5deg);
}
.newsletter h2 {
  font-family: var(--serif); font-size: clamp(2rem, 3.5vw, 3rem);
  font-style: italic; font-weight: 400; margin-bottom: 1.25rem;
  max-width: 720px; margin-left: auto; margin-right: auto;
  text-wrap: balance; color: white;
}
.newsletter p {
  font-size: 1.0625rem; max-width: 560px; margin: 0 auto 2.5rem;
  font-weight: 300; opacity: 0.95;
}
.btn {
  display: inline-block; background: var(--primary); color: white;
  padding: 1.125rem 2.75rem; text-decoration: none;
  font-family: var(--sans); font-size: 0.8125rem;
  letter-spacing: 0.15em; text-transform: uppercase; font-weight: 500;
  transition: background 0.2s, transform 0.2s; border: none; cursor: pointer;
}
.btn:hover { background: var(--primary-dark); transform: translateY(-1px); }
.newsletter-promise {
  font-family: var(--script); font-size: 1.25rem;
  color: rgba(255,222,150,0.9); margin-top: 1.75rem;
  transform: rotate(-1deg); display: inline-block;
}

/* FOOTER */
.footer {
  background: var(--ink); color: #ccc;
  padding: 5rem 2rem 2.5rem; text-align: center;
}
.footer-logo {
  font-family: var(--serif); font-weight: 500; font-size: 1.375rem;
  letter-spacing: 0.3em; text-transform: uppercase; color: white;
  margin-bottom: 0.5rem; display: block; text-decoration: none;
}
.footer-signature {
  font-family: var(--script); font-size: 1.5rem; color: #e8c87a;
  margin-bottom: 2.5rem; display: inline-block; transform: rotate(-1deg);
}
.footer-signature::before { content: ''; }
.footer-nav {
  display: flex; gap: 2.5rem; justify-content: center;
  margin-bottom: 2.5rem; flex-wrap: wrap;
}
.footer-nav a {
  color: #ccc; text-decoration: none; font-size: 0.8125rem; letter-spacing: 0.05em;
}
.footer-nav a:hover { color: white; }
.footer-copy { font-size: 0.75rem; color: #888; letter-spacing: 0.03em; }

/* SINGLE + PAGE */
.entry-hero {
  position: relative; height: 60vh; min-height: 480px;
  background-size: cover; background-position: center;
  background-color: var(--paper-aged);
  display: flex; align-items: flex-end;
  color: white; margin-bottom: 4rem;
}
.entry-hero::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20,15,10,0.8) 0%, rgba(20,15,10,0.2) 70%);
}
.entry-hero-inner {
  position: relative; z-index: 1;
  max-width: 900px; margin: 0 auto;
  padding: 0 2rem 4rem; width: 100%; text-align: center;
}
.entry-meta {
  font-family: var(--script); font-size: 1.375rem;
  color: rgba(255,222,150,0.95); margin-bottom: 0.5rem;
  transform: rotate(-1deg); display: inline-block;
}
.entry-hero h1 {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(2.25rem, 4.5vw, 3.75rem);
  line-height: 1.1; color: white; text-wrap: balance;
}
.entry-content-wrap { max-width: 720px; margin: 0 auto 6rem; padding: 0 2rem; }
.entry-content {
  font-family: var(--serif); font-size: 1.1875rem;
  line-height: 1.75; color: var(--ink);
}
.entry-content p { margin-bottom: 1.5rem; }
.entry-content h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.625rem, 2.5vw, 2.125rem);
  line-height: 1.2; margin: 3rem 0 1rem; color: var(--ink);
}
.entry-content h3 {
  font-family: var(--serif); font-weight: 500;
  font-size: 1.5rem; line-height: 1.25;
  margin: 2.25rem 0 1rem; color: var(--ink);
}
.entry-content a:not(.btn):not(.wp-block-button__link) {
  color: var(--primary); text-decoration: underline;
  text-underline-offset: 4px; text-decoration-thickness: 1px;
}
.entry-content a:not(.btn):not(.wp-block-button__link):hover { color: var(--primary-dark); }
.entry-content img, .entry-content figure { margin: 2rem 0; box-shadow: 0 8px 24px rgba(0,0,0,0.06); }
.entry-content blockquote {
  border-left: 3px solid var(--primary);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2rem 0; font-style: italic; color: var(--ink-soft);
}
.entry-content ul, .entry-content ol { margin: 0 0 1.5rem 1.5rem; }
.entry-content li { margin-bottom: 0.5rem; }
.entry-content code {
  background: var(--paper-aged); padding: 0.15rem 0.4rem;
  border-radius: 3px; font-size: 0.95em;
}
.entry-sign {
  margin-top: 4rem; text-align: left;
  font-family: var(--script); font-size: 1.625rem;
  color: var(--ocre-dark); transform: rotate(-1deg);
  display: inline-block;
}
.entry-sign::before { content: ''; }

/* Page template variant */
.page-hero { background: var(--paper); padding: 6rem 2rem 4rem; text-align: center; margin-bottom: 3rem; }
.page-hero .page-kicker {
  font-family: var(--script); font-size: 1.5rem; color: var(--ocre-dark);
  margin-bottom: 0.5rem; display: inline-block; transform: rotate(-1.5deg);
}
.page-hero h1 {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  line-height: 1.1; color: var(--ink); text-wrap: balance;
  max-width: 800px; margin: 0 auto;
}

/* Forms */
.entry-content form input[type="email"],
.entry-content form input[type="text"] {
  width: 100%; padding: 0.95rem 1.25rem; font-size: 1rem;
  border: 1px solid rgba(26,26,26,0.15); background: white;
  font-family: var(--sans); color: var(--ink);
  border-radius: 4px; margin-bottom: 1rem;
}
.entry-content form input:focus { outline: none; border-color: var(--primary); }
.entry-content form button {
  background: var(--primary); color: white; border: none;
  padding: 1rem 2rem; font-size: 0.875rem; letter-spacing: 0.05em;
  font-weight: 500; cursor: pointer; border-radius: 4px;
  font-family: var(--sans); transition: background 0.2s;
}
.entry-content form button:hover { background: var(--primary-dark); }

/* RESPONSIVE */
@media (max-width: 900px) {
  .header { grid-template-columns: 1fr auto 1fr; padding: 1.5rem; }
  .header-nav, .header-right { display: none; }
  .header--default { padding: 1rem 1.5rem; }
  .hero-signature { right: 1.5rem; bottom: 2rem; font-size: 1.25rem; }
  .bienvenue { padding: 5rem 2rem; }
  .bienvenue-inner { grid-template-columns: 1fr; gap: 3rem; text-align: center; }
  .bienvenue-text { padding-right: 0; }
  .polaroid { width: 280px; margin: 0 auto; }
  .polaroid img { height: 280px; }
  /* (anciennes regles .guide remplacees par .guide-card, gerees plus haut) */
  .carnet, .carnet:nth-child(even) { grid-template-columns: 1fr; gap: 2rem; }
  .carnet:nth-child(even) .carnet-image { order: 0; }
  .carnet:nth-child(even) .carnet-image[data-stamp]:not([data-stamp=""])::before { left: -0.5rem; right: auto; }
  .carnet-image img { height: 280px; }
  .entry-content-wrap { padding: 0 1.5rem; }
  .entry-content { font-size: 1.0625rem; }
}
