/* ========================================
   SCRAPBOOK THEME - Our Life Abroad
   ======================================== */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;700&family=Patrick+Hand&family=Architects+Daughter&display=swap');

/* ========================================
   VARIABLES & RESET
   ======================================== */

:root {
  /* Couleurs Asie */
  --asia-primary: #A8D5BA;
  --asia-secondary: #FFB6B9;
  
  /* Couleurs Amérique du Sud */
  --southamerica-primary: #E8B17F;
  --southamerica-secondary: #F4D35E;
  
  /* Océanie */
  --oceania-primary: #79C8D6;
  --oceania-secondary: #B8A9D6;

  /* Couleurs Europe */
  --europe-primary: #E8C5A0;
  --europe-secondary: #C4A882;
  
  /* Couleurs génériques */
  --kraft-bg: #D4B896;
  --paper-white: #FBF8F3;
  --ink-dark: #2C3E50;
  --tape-shadow: rgba(0, 0, 0, 0.15);
}

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

body {
  font-family: 'Patrick Hand', cursive;
  background: var(--kraft-bg);
  background-image: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255, 255, 255, 0.05) 2px,
      rgba(255, 255, 255, 0.05) 4px
    );
  color: var(--ink-dark);
  line-height: 1.7;
  min-height: 100vh;
}

/* ========================================
   HEADER SCRAPBOOK
   ======================================== */

.scrapbook-header {
  position: relative;
  text-align: center;
  padding: 3rem 2rem 2rem;
  margin-bottom: 2rem;
}

.scrapbook-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 30px;
  background: repeating-linear-gradient(
    45deg,
    #FFD700,
    #FFD700 10px,
    #FFA500 10px,
    #FFA500 20px
  );
  opacity: 0.3;
  border-radius: 2px;
  box-shadow: 0 2px 5px var(--tape-shadow);
}

.site-title {
  font-family: 'Caveat', cursive;
  font-size: 4rem;
  font-weight: 700;
  color: var(--ink-dark);
  text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.5);
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--paper-white);
  border: 3px solid var(--ink-dark);
  border-radius: 8px;
  box-shadow: 
    5px 5px 0 rgba(0, 0, 0, 0.1),
    inset 0 0 20px rgba(0, 0, 0, 0.03);
  transform: rotate(-2deg);
  position: relative;
}

.site-tagline {
  font-family: 'Architects Daughter', cursive;
  font-size: 1.2rem;
  margin-top: 1rem;
  opacity: 0.8;
}

/* ========================================
   NAVIGATION
   ======================================== */

.scrapbook-nav {
  background: var(--paper-white);
  padding: 1rem;
  margin: 0 auto 2rem;
  max-width: 900px;
  border: 2px dashed var(--ink-dark);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  position: relative;
}

/* Punaises décoratives */
.scrapbook-nav::before,
.scrapbook-nav::after {
  content: '📌';
  position: absolute;
  top: -10px;
  font-size: 1.5rem;
  filter: hue-rotate(180deg);
}

.scrapbook-nav::before {
  left: 20px;
}

.scrapbook-nav::after {
  right: 20px;
  transform: rotate(45deg);
}

.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: 'Architects Daughter', cursive;
  font-size: 1.1rem;
  color: var(--ink-dark);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
  position: relative;
}

.nav-links a:hover {
  border-bottom-color: var(--asia-primary);
  transform: translateY(-2px);
}


.lang-switch {
  display: flex;
  gap: 0.5rem;
  margin-left: 2rem;
  padding-left: 2rem;
  border-left: 2px dashed var(--ink-dark);
}

.lang-switch a {
  padding: 0.3rem 0.8rem;
  background: var(--kraft-bg);
  border-radius: 15px;
  font-size: 0.9rem;
}

.lang-switch a.active {
  background: var(--asia-secondary);
  color: white;
}

/* ========================================
   CONTAINER & LAYOUT
   ======================================== */

.scrapbook-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
}

.main-content {
  background: var(--paper-white);
  padding: 3rem;
  border-radius: 12px;
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.15),
    inset 0 0 50px rgba(0, 0, 0, 0.02);
  position: relative;
}

/* Masking tape décoratif en haut */
.main-content::before {
  content: '';
  position: absolute;
  top: -15px;
  left: 10%;
  width: 150px;
  height: 30px;
  background: repeating-linear-gradient(
    -45deg,
    var(--asia-primary),
    var(--asia-primary) 10px,
    var(--asia-secondary) 10px,
    var(--asia-secondary) 20px
  );
  opacity: 0.7;
  border-radius: 2px;
  box-shadow: 0 3px 8px var(--tape-shadow);
  transform: rotate(-3deg);
}

/* ========================================
   SIDEBAR
   ======================================== */

.sidebar {
  position: sticky;
  top: 2rem;
}

.sidebar-widget {
  background: var(--paper-white);
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 2px solid var(--ink-dark);
  border-radius: 8px;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.1);
  transform: rotate(1deg);
  position: relative;
}

.sidebar-widget:nth-child(even) {
  transform: rotate(-1deg);
}

.sidebar-widget h3 {
  font-family: 'Caveat', cursive;
  font-size: 2rem;
  margin-bottom: 1rem;
  text-decoration: underline;
  text-decoration-style: wavy;
  text-decoration-color: var(--asia-secondary);
}

/* Punaise en haut à droite */
.sidebar-widget::after {
  content: '📌';
  position: absolute;
  top: -10px;
  right: 10px;
  font-size: 1.3rem;
  transform: rotate(25deg);
}

/* ========================================
   ARTICLES & POSTS
   ======================================== */

.post-header,
.destination-header {
  margin-bottom: 3rem;
  text-align: center;
}

.post-header h1,
.destination-header h1 {
  font-family: 'Caveat', cursive;
  font-size: 3rem;
  margin-bottom: 1rem;
  line-height: 1.2;
  position: relative;
  display: inline-block;
}

/* Soulignement décoratif */
.post-header h1::after,
.destination-header h1::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 8px;
  background: repeating-linear-gradient(
    90deg,
    var(--asia-primary) 0,
    var(--asia-primary) 10px,
    transparent 10px,
    transparent 20px
  );
  opacity: 0.5;
}

.post-meta,
.destination-meta {
  font-family: 'Architects Daughter', cursive;
  color: #666;
  font-size: 1rem;
  margin: 1rem 0;
}

.post-meta span,
.destination-meta span {
  margin: 0 0.5rem;
}

/* Badges décoratifs */
.budget-badge,
.highlight-badge {
  display: inline-block;
  background: var(--southamerica-primary);
  color: white;
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  font-family: 'Patrick Hand', cursive;
  font-size: 0.95rem;
  margin: 0.5rem;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
  transform: rotate(-2deg);
}

.highlight-badge {
  background: var(--asia-secondary);
  transform: rotate(2deg);
}

/* ========================================
   IMAGES POLAROID
   ======================================== */

.post-content img,
.destination-content img,
.photo-gallery img {
  max-width: 100%;
  height: auto;
  padding: 15px 15px 50px 15px;
  background: white;
  box-shadow: 
    0 4px 10px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(0, 0, 0, 0.05);
  margin: 2rem auto;
  display: block;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

/* Variations d'angles pour Polaroids */
.post-content img:nth-child(odd),
.photo-gallery img:nth-child(odd) {
  transform: rotate(-2deg);
}

.post-content img:nth-child(even),
.photo-gallery img:nth-child(even) {
  transform: rotate(2deg);
}

.post-content img:hover,
.photo-gallery img:hover {
  transform: rotate(0deg) scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

/* ========================================
   GALERIE PHOTO
   ======================================== */

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.3);
  border: 2px dashed var(--ink-dark);
  border-radius: 12px;
}

.photo-gallery img {
  margin: 0;
  width: 100%;
  height: 300px;
  object-fit: cover;
}

/* ========================================
   TYPOGRAPHIE CONTENU
   ======================================== */

.post-content h2,
.destination-content h2 {
  font-family: 'Caveat', cursive;
  font-size: 2.5rem;
  margin: 3rem 0 1.5rem;
  color: var(--ink-dark);
  position: relative;
  padding-left: 2rem;
}

.post-content h2,
.destination-content h2 {
  font-family: 'Caveat', cursive;
  font-size: 2.5rem;
  margin: 3rem 0 1.5rem;
  color: var(--ink-dark);
  position: relative;
  padding-left: 0; /* Enlève aussi le padding */
}

.post-content h3,
.destination-content h3 {
  font-family: 'Architects Daughter', cursive;
  font-size: 1.8rem;
  margin: 2rem 0 1rem;
  text-decoration: underline;
  text-decoration-style: wavy;
  text-decoration-color: var(--asia-primary);
}

.post-content p,
.destination-content p {
  margin: 1.5rem 0;
  font-size: 1.1rem;
  line-height: 1.8;
}

.post-content strong,
.destination-content strong {
  background: var(--asia-primary);
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: normal;
}

/* ========================================
   TABLEAUX
   ======================================== */

.post-content table,
.destination-content table {
  width: 100%;
  margin: 2rem 0;
  border-collapse: separate;
  border-spacing: 0;
  background: white;
  border: 3px solid var(--ink-dark);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.1);
}

.post-content th,
.destination-content th {
  font-family: 'Caveat', cursive;
  font-size: 1.5rem;
  background: var(--asia-primary);
  color: var(--ink-dark);
  padding: 1rem;
  text-align: left;
  border-bottom: 2px solid var(--ink-dark);
}

.post-content td,
.destination-content td {
  padding: 1rem;
  border-bottom: 1px dashed #ddd;
}

.post-content tr:last-child td,
.destination-content tr:last-child td {
  border-bottom: none;
}

.post-content tr:hover,
.destination-content tr:hover {
  background: rgba(168, 213, 186, 0.1);
}

/* ========================================
   LISTES
   ======================================== */

.post-content ul,
.destination-content ul {
  list-style: none;
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.post-content ul li,
.destination-content ul li {
  position: relative;
  padding-left: 1.5rem;
  margin: 0.8rem 0;
}

.post-content ul li::before,
.destination-content ul li::before {
  content: '📍';
  position: absolute;
  left: 0;
}

/* Listes avec émojis personnalisés */
.post-content ul li:has(✅)::before { content: ''; }
.post-content ul li:has(❌)::before { content: ''; }

/* ========================================
   BLOCKQUOTES
   ======================================== */

.post-content blockquote,
.destination-content blockquote {
  background: var(--paper-white);
  border-left: 5px solid var(--asia-secondary);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  font-style: italic;
  position: relative;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.1);
  transform: rotate(-1deg);
}

.post-content blockquote::before,
.destination-content blockquote::before {
  content: '"';
  font-family: 'Caveat', cursive;
  font-size: 4rem;
  position: absolute;
  top: -10px;
  left: 10px;
  color: var(--asia-secondary);
  opacity: 0.3;
}

/* ========================================
   LIENS
   ======================================== */

.post-content a,
.destination-content a {
  color: var(--ink-dark);
  text-decoration: underline;
  text-decoration-style: wavy;
  text-decoration-color: var(--asia-primary);
  transition: all 0.3s;
}

.post-content a:hover,
.destination-content a:hover {
  background: var(--asia-primary);
  padding: 2px 6px;
  text-decoration: none;
  border-radius: 3px;
}

/* ========================================
   NOTES & ASTUCES
   ======================================== */

.note-box {
  background: #FFF9E6;
  border: 2px dashed #FFD700;
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 8px;
  position: relative;
}

.note-box::before {
  content: '💡';
  position: absolute;
  top: -15px;
  left: 20px;
  background: #FFF9E6;
  padding: 0 10px;
  font-size: 1.5rem;
}

/* ========================================
   AUTEUR BIO
   ======================================== */

.author-bio {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--paper-white);
  padding: 2rem;
  margin-top: 3rem;
  border: 2px solid var(--ink-dark);
  border-radius: 12px;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.1);
  transform: rotate(-1deg);
}

.author-bio img {
  width: 80px !important;
  height: 80px !important;
  border-radius: 50% !important;
  border: 3px solid var(--ink-dark) !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2) !important;
  transform: none !important;
  object-fit: cover;
}

.author-bio strong {
  font-family: 'Caveat', cursive;
  font-size: 1.5rem;
  background: none;
  padding: 0;
}

/* ========================================
   PAGE D'ACCUEIL
   ======================================== */

.home-intro {
  text-align: center;
  margin-bottom: 4rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.5);
  border: 2px dashed var(--ink-dark);
  border-radius: 12px;
  position: relative;
}

.home-intro h1 {
  font-family: 'Caveat', cursive;
  font-size: 3rem;
  margin-bottom: 1rem;
}

.home-intro p {
  font-size: 1.2rem;
  line-height: 1.8;
  margin: 1rem 0;
}

/* Décorations sur la home */
.home-intro::before {
  content: '🌍';
  position: absolute;
  top: -20px;
  right: 30px;
  font-size: 3rem;
  transform: rotate(15deg);
}

/* ========================================
   LISTE D'ARTICLES (HOME)
   ======================================== */

.posts-list {
  display: grid;
  gap: 2rem;
}

.post-card {
  background: white;
  padding: 2rem;
  border: 2px solid var(--ink-dark);
  border-radius: 12px;
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.1);
  position: relative;
  transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:nth-child(odd) {
  transform: rotate(-0.5deg);
}

.post-card:nth-child(even) {
  transform: rotate(0.5deg);
}

.post-card:hover {
  transform: rotate(0deg) translateY(-5px);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.15);
}

/* Masking tape en haut de chaque carte */
.post-card::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 20%;
  width: 80px;
  height: 20px;
  background: var(--asia-primary);
  opacity: 0.7;
  box-shadow: 0 2px 5px var(--tape-shadow);
  transform: rotate(-3deg);
}

.post-card:nth-child(even)::before {
  left: auto;
  right: 20%;
  background: var(--southamerica-secondary);
  transform: rotate(3deg);
}

.post-card h3 {
  font-family: 'Caveat', cursive;
  font-size: 2rem;
  margin-bottom: 1rem;
}

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

.post-card h3 a:hover {
  text-decoration: underline;
  text-decoration-style: wavy;
  text-decoration-color: var(--asia-primary);
}

.post-card .post-meta {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  font-family: 'Architects Daughter', cursive;
}

.post-card p {
  line-height: 1.7;
  margin-bottom: 1rem;
}

.post-card .read-more {
  display: inline-block;
  background: var(--asia-secondary);
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  text-decoration: none;
  font-family: 'Architects Daughter', cursive;
  font-weight: bold;
  transition: all 0.3s;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
}

.post-card .read-more:hover {
  background: var(--asia-primary);
  transform: translateY(-2px);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.3);
}

/* ========================================
   PAGE DESTINATIONS - GRILLE
   ======================================== */

.destinations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  margin: 3rem 0;
}

.destination-card {
  background: white;
  border-radius: 12px;
  overflow: visible;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
}

.destination-card:nth-child(odd) {
  transform: rotate(-1deg);
}

.destination-card:nth-child(even) {
  transform: rotate(1deg);
}

.destination-card:hover {
  transform: rotate(0deg) translateY(-8px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

/* Image avec effet Polaroid */
.destination-card .card-image {
  height: 250px;
  background-size: cover;
  background-position: center;
  border-bottom: 3px solid var(--ink-dark);
  position: relative;
}

/* Punaise décorative */
.destination-card .card-image::after {
  content: '📌';
  position: absolute;
  top: -10px;
  right: 20px;
  font-size: 2rem;
  transform: rotate(25deg);
  filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.3));
}

.destination-card .card-content {
  padding: 1.5rem;
}

.destination-card h3 {
  font-family: 'Caveat', cursive;
  font-size: 2rem;
  margin: 0 0 0.8rem 0;
  color: var(--ink-dark);
}

.destination-card p {
  font-family: 'Patrick Hand', cursive;
  color: #666;
  margin: 0;
  line-height: 1.6;
  /* Limiter à 2 lignes */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========================================
   SECTIONS DE DESTINATIONS PAR CONTINENT
   ======================================== */

.continent-section {
  margin: 4rem 0;
}

.continent-section h2 {
  font-family: 'Caveat', cursive;
  font-size: 3rem;
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
  padding-bottom: 1rem;
}

.continent-section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 4px;
  background: var(--asia-primary);
  border-radius: 2px;
}

/* Couleurs par continent */
.continent-section.asia h2::after {
  background: var(--asia-primary);
}

.continent-section.southamerica h2::after {
  background: var(--southamerica-primary);
}

.continent-section.oceania h2::after {
  background: var(--oceania-primary);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 968px) {
  .scrapbook-container {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    position: static;
  }
  
  .site-title {
    font-size: 3rem;
  }
}

@media (max-width: 640px) {
  .site-title {
    font-size: 2.5rem;
  }
  
  .nav-links {
    flex-direction: column;
    gap: 1rem;
  }
  
  .lang-switch {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    border-top: 2px dashed var(--ink-dark);
    padding-top: 1rem;
  }
}