/*
Theme Name: Voyage Mexico Gutenberg
Theme URI: https://voyage-mexico.com
Author: Voyage Mexico
Author URI: https://voyage-mexico.com
Description: Thème WordPress 100% compatible Gutenberg pour agence d'excursions. Optimisé pour publication automatique et traduction multilingue. Support complet éditeur de blocs, styles Gutenberg natifs, patterns réutilisables.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: voyage-mexico
Tags: blog, travel, tours, tourism, block-editor, block-styles, block-patterns, wide-blocks, full-site-editing, custom-menu, custom-logo, editor-style, featured-images, theme-options, translation-ready
*/

:root {
  --primary: #009688;
  --secondary: #FFC107;
  --bg: #ffffff;
  --text: #171717;
  --muted: #4a4a4a;
  --surface: #f7f7f7;
  --overlay: rgba(0, 150, 136, 0.08);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", "Montserrat", "Arial", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  letter-spacing: 0.2px;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease, opacity 0.3s ease;
}

a:hover {
  color: var(--secondary);
  opacity: 0.9;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

/* ============================================
   GUTENBERG CORE STYLES
   ============================================ */

/* Alignements Gutenberg */
.alignleft {
  float: left;
  margin-right: 2rem;
  margin-bottom: 1rem;
}

.alignright {
  float: right;
  margin-left: 2rem;
  margin-bottom: 1rem;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.alignwide {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.alignfull {
  max-width: 100%;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Support des légendes */
.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.wp-block-image figcaption {
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* ============================================
   GUTENBERG BLOCKS STYLING
   ============================================ */

/* Paragraphe */
.wp-block-paragraph {
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.wp-block-paragraph.has-drop-cap:first-letter {
  float: left;
  font-size: 3.5em;
  line-height: 0.85;
  margin: 0.1em 0.1em 0 0;
  color: var(--primary);
  font-weight: bold;
}

/* Titres */
.wp-block-heading,
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text);
}

h1, .wp-block-heading h1 { font-size: 2.5rem; }
h2, .wp-block-heading h2 { font-size: 2rem; color: var(--primary); }
h3, .wp-block-heading h3 { font-size: 1.5rem; }
h4, .wp-block-heading h4 { font-size: 1.25rem; }
h5, .wp-block-heading h5 { font-size: 1.1rem; }
h6, .wp-block-heading h6 { font-size: 1rem; }

/* Listes */
.wp-block-list,
ul, ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.wp-block-list li,
ul li, ol li {
  margin-bottom: 0.5rem;
}

/* Citation */
.wp-block-quote {
  border-left: 4px solid var(--primary);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--muted);
}

.wp-block-quote cite {
  display: block;
  margin-top: 1rem;
  font-size: 0.9rem;
  font-style: normal;
  color: var(--text);
}

.wp-block-pullquote {
  border-top: 4px solid var(--primary);
  border-bottom: 4px solid var(--primary);
  padding: 2rem;
  text-align: center;
  font-size: 1.25rem;
  margin: 2rem 0;
}

/* Image */
.wp-block-image {
  margin-bottom: 2rem;
}

.wp-block-image img {
  border-radius: 16px;
  box-shadow: var(--shadow);
}

/* Galerie */
.wp-block-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.wp-block-gallery img {
  border-radius: 12px;
  width: 100%;
  height: 250px;
  object-fit: cover;
}

/* Colonnes */
.wp-block-columns {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.wp-block-column {
  flex: 1;
  min-width: 250px;
}

/* Groupe */
.wp-block-group {
  margin-bottom: 2rem;
}

.wp-block-group.has-background {
  padding: 2rem;
  border-radius: 16px;
}

/* Boutons */
.wp-block-button {
  margin-bottom: 1rem;
}

.wp-block-button__link {
  background: var(--primary);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  display: inline-block;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.wp-block-button__link:hover {
  background: #007d70;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  color: #ffffff;
  opacity: 1;
}

.wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: var(--primary);
  color: #ffffff;
}

/* Boutons multiples */
.wp-block-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

/* Séparateur */
.wp-block-separator {
  border: none;
  border-top: 2px solid var(--primary);
  margin: 3rem auto;
  max-width: 100px;
}

.wp-block-separator.is-style-wide {
  max-width: 100%;
}

.wp-block-separator.is-style-dots::before {
  content: '···';
  color: var(--primary);
  font-size: 2rem;
  letter-spacing: 2rem;
}

/* Espaceur */
.wp-block-spacer {
  clear: both;
}

/* Code */
.wp-block-code {
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  overflow-x: auto;
}

.wp-block-code code {
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: #333;
}

/* Préformaté */
.wp-block-preformatted {
  background: #f5f5f5;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 2rem;
}

/* Tableau */
.wp-block-table {
  margin-bottom: 2rem;
  overflow-x: auto;
}

.wp-block-table table {
  width: 100%;
  border-collapse: collapse;
}

.wp-block-table th {
  background: var(--primary);
  color: white;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
}

.wp-block-table td {
  padding: 1rem;
  border-bottom: 1px solid #ddd;
}

.wp-block-table tr:hover {
  background: var(--surface);
}

/* Couverture */
.wp-block-cover {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  border-radius: 16px;
  overflow: hidden;
}

.wp-block-cover__inner-container {
  color: white;
  text-align: center;
  z-index: 1;
  padding: 2rem;
}

/* Média & Texte */
.wp-block-media-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2rem;
}

.wp-block-media-text__media img {
  border-radius: 16px;
}

/* Liste derniers articles */
.wp-block-latest-posts {
  list-style: none;
  padding: 0;
}

.wp-block-latest-posts li {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #ddd;
}

.wp-block-latest-posts__post-title {
  font-weight: 600;
  color: var(--primary);
}

.wp-block-latest-posts__post-date {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Fichier */
.wp-block-file {
  margin-bottom: 2rem;
}

.wp-block-file__button {
  background: var(--primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  display: inline-block;
  margin-top: 0.5rem;
  transition: all 0.3s ease;
}

.wp-block-file__button:hover {
  background: #007d70;
  transform: translateY(-2px);
}

/* Vidéo */
.wp-block-video {
  margin-bottom: 2rem;
}

.wp-block-video video {
  border-radius: 16px;
  max-width: 100%;
}

/* Embed (YouTube, etc) */
.wp-block-embed {
  margin-bottom: 2rem;
}

.wp-block-embed__wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 16px;
}

.wp-block-embed__wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 16px;
}

/* ============================================
   BLOG STYLES
   ============================================ */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.blog-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.12);
}

.blog-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 0;
}

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

.blog-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.blog-title {
  font-size: 1.4rem;
  margin: 0.5rem 0;
  color: var(--text);
}

.blog-excerpt {
  color: var(--muted);
  line-height: 1.6;
}

/* Single Post */
.single-post-header {
  margin-bottom: 2rem;
}

.post-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.8;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.pagination a,
.pagination span {
  padding: 0.5rem 1rem;
  background: var(--surface);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.pagination a:hover {
  background: var(--primary);
  color: white;
}

.pagination .current {
  background: var(--primary);
  color: white;
}

/* Reveal Animation */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

@media (max-width: 900px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  .wp-block-columns {
    flex-direction: column;
  }
  
  .wp-block-media-text {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  
  .wp-block-buttons {
    flex-direction: column;
  }
  
  .wp-block-button__link {
    width: 100%;
    text-align: center;
  }
}
