/*!
 * Theme Name:   Deol Tourisme V7 — Le Manuscrit Déroulant
 * Theme URI:    https://deols-tourisme.fr
 * Description:  Thème enfant OceanWP pour deols-tourisme.fr — Design system "Le Manuscrit Déroulant" (Immersion Narrative, Dark Heritage, Glassmorphism)
 * Author:       Agent Zero
 * Author URI:   https://deols-tourisme.fr
 * Template:     oceanwp
 * Version:      7.0.0
 * License:      GNU General Public License v2 or later
 * License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain:  deoltourisme-v7
 */

/* ============================================================
   DESIGN SYSTEM V7 — LE MANUSCRIT DÉROULANT
   ============================================================ */

/* ----------------------------------------------------------
   1. VARIABLES CSS
   ---------------------------------------------------------- */
:root {
  /* Palette Dark Heritage */
  --v7-bg-primary: #0A0A0A;
  --v7-bg-secondary: #111111;
  --v7-bg-tertiary: #1A1A1A;
  --v7-bg-card: rgba(255, 255, 255, 0.03);
  --v7-bg-glass: rgba(10, 10, 10, 0.85);

  /* Or & Doré */
  --v7-gold: #D4AF37;
  --v7-gold-light: #E8C547;
  --v7-gold-dark: #B8960C;
  --v7-gold-muted: rgba(212, 175, 55, 0.15);

  /* Sépia & Chaleur */
  --v7-sepia: #8A7563;
  --v7-sepia-light: #A68B6A;
  --v7-sepia-dark: #6B5B4F;

  /* Texte */
  --v7-text-primary: #F3F1E9;
  --v7-text-secondary: rgba(243, 241, 233, 0.7);
  --v7-text-muted: rgba(243, 241, 233, 0.5);
  --v7-text-dark: #0A0A0A;

  /* Bordures */
  --v7-border: rgba(243, 241, 233, 0.08);
  --v7-border-gold: rgba(212, 175, 55, 0.3);

  /* Typographie */
  --v7-font-display: 'Cinzel Decorative', 'Cinzel', Georgia, serif;
  --v7-font-heading: 'Cinzel', Georgia, serif;
  --v7-font-body: 'Lora', Georgia, serif;
  --v7-font-ui: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Espacements */
  --v7-space-xs: 0.5rem;
  --v7-space-sm: 1rem;
  --v7-space-md: 2rem;
  --v7-space-lg: 4rem;
  --v7-space-xl: 6rem;
  --v7-space-2xl: 8rem;

  /* Transitions */
  --v7-transition-fast: 0.2s ease;
  --v7-transition-base: 0.4s ease;
  --v7-transition-slow: 0.6s ease;

  /* Z-index */
  --v7-z-base: 1;
  --v7-z-nav: 100;
  --v7-z-modal: 200;
  --v7-z-progress: 1000;
}

/* ----------------------------------------------------------
   2. RESET & BASE
   ---------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--v7-font-body);
  background-color: var(--v7-bg-primary);
  color: var(--v7-text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Grain texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Scroll progress bar */
.v7-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--v7-gold), var(--v7-gold-light));
  z-index: var(--v7-z-progress);
  width: 0%;
  transition: width 0.1s linear;
}

/* ----------------------------------------------------------
   3. TYPOGRAPHIE
   ---------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--v7-font-heading);
  font-weight: 400;
  line-height: 1.2;
  color: var(--v7-text-primary);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
}

p {
  font-family: var(--v7-font-body);
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--v7-text-secondary);
  margin-bottom: var(--v7-space-sm);
}

a {
  color: var(--v7-gold);
  text-decoration: none;
  transition: color var(--v7-transition-fast);
}

a:hover {
  color: var(--v7-gold-light);
}

/* ----------------------------------------------------------
   4. GLASSMORPHISM
   ---------------------------------------------------------- */
.v7-glass {
  background: var(--v7-bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--v7-border);
}

.v7-glass-strong {
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border: 1px solid var(--v7-border-gold);
}

/* ----------------------------------------------------------
   5. ANIMATIONS
   ---------------------------------------------------------- */
@keyframes v7-fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes v7-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes v7-scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes v7-shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.v7-animate {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.v7-animate.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.v7-delay-1 { transition-delay: 0.1s; }
.v7-delay-2 { transition-delay: 0.2s; }
.v7-delay-3 { transition-delay: 0.3s; }
.v7-delay-4 { transition-delay: 0.4s; }
.v7-delay-5 { transition-delay: 0.5s; }

/* ----------------------------------------------------------
   6. BOUTONS
   ---------------------------------------------------------- */
.v7-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-family: var(--v7-font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid var(--v7-gold);
  background: transparent;
  color: var(--v7-gold);
  cursor: pointer;
  transition: all var(--v7-transition-base);
  position: relative;
  overflow: hidden;
}

.v7-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--v7-gold-muted), transparent);
  transition: left 0.6s ease;
}

.v7-btn:hover::before {
  left: 100%;
}

.v7-btn:hover {
  background: var(--v7-gold);
  color: var(--v7-text-dark);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
}

.v7-btn-primary {
  background: var(--v7-gold);
  color: var(--v7-text-dark);
}

.v7-btn-primary:hover {
  background: var(--v7-gold-light);
  box-shadow: 0 0 40px rgba(212, 175, 55, 0.4);
}

/* ----------------------------------------------------------
   7. CARTES
   ---------------------------------------------------------- */
.v7-card {
  background: var(--v7-bg-card);
  border: 1px solid var(--v7-border);
  border-radius: 4px;
  overflow: hidden;
  transition: all var(--v7-transition-base);
}

.v7-card:hover {
  border-color: var(--v7-border-gold);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transform: translateY(-4px);
}

.v7-card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.v7-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--v7-transition-slow);
}

.v7-card:hover .v7-card-image img {
  transform: scale(1.08);
}

.v7-card-content {
  padding: var(--v7-space-md);
}

.v7-card-title {
  font-family: var(--v7-font-heading);
  font-size: 1.1rem;
  color: var(--v7-text-primary);
  margin-bottom: 0.5rem;
  transition: color var(--v7-transition-fast);
}

.v7-card:hover .v7-card-title {
  color: var(--v7-gold);
}

.v7-card-excerpt {
  font-size: 0.9rem;
  color: var(--v7-text-muted);
  line-height: 1.6;
}

/* ----------------------------------------------------------
   8. SECTIONS
   ---------------------------------------------------------- */
.v7-section {
  padding: var(--v7-space-xl) var(--v7-space-md);
  position: relative;
}

.v7-section-header {
  text-align: center;
  margin-bottom: var(--v7-space-lg);
}

.v7-section-label {
  font-family: var(--v7-font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--v7-gold);
  margin-bottom: var(--v7-space-xs);
}

.v7-section-title {
  font-family: var(--v7-font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: var(--v7-text-primary);
  margin-bottom: var(--v7-space-sm);
}

.v7-section-subtitle {
  font-family: var(--v7-font-body);
  font-size: 1.1rem;
  color: var(--v7-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ----------------------------------------------------------
   9. GRILLE
   ---------------------------------------------------------- */
.v7-grid {
  display: grid;
  gap: var(--v7-space-md);
}

.v7-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.v7-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.v7-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.v7-grid-6 {
  grid-template-columns: repeat(3, 1fr);
}

@media (min-width: 768px) {
  .v7-grid-6 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .v7-grid-2 { grid-template-columns: repeat(2, 1fr); }
  .v7-grid-3 { grid-template-columns: repeat(3, 1fr); }
  .v7-grid-4 { grid-template-columns: repeat(4, 1fr); }
  .v7-grid-6 { grid-template-columns: repeat(3, 1fr); }
}

/* ----------------------------------------------------------
   10. UTILITAIRES
   ---------------------------------------------------------- */
.v7-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--v7-space-md);
}

.v7-text-center { text-align: center; }
.v7-text-left { text-align: left; }
.v7-text-right { text-align: right; }

.v7-gold-text {
  color: var(--v7-gold);
}

.v7-sepia-text {
  color: var(--v7-sepia);
}

.v7-gradient-text {
  background: linear-gradient(135deg, var(--v7-gold), var(--v7-gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ----------------------------------------------------------
   11. ACCESSIBILITÉ
   ---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
  
  .v7-animate {
    opacity: 1;
    transform: none;
  }
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--v7-gold);
  outline-offset: 2px;
}

/* ----------------------------------------------------------
   12. RESPONSIVE
   ---------------------------------------------------------- */
@media (max-width: 1024px) {
  .v7-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .v7-grid-2,
  .v7-grid-3,
  .v7-grid-4,
  .v7-grid-6 {
    grid-template-columns: 1fr;
  }
  
  .v7-section {
    padding: var(--v7-space-lg) var(--v7-space-sm);
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
  
  .v7-section {
    padding: var(--v7-space-md) var(--v7-space-xs);
  }

/* ============================================================
   12. ARTICLE HEADER (single.php, page.php)
   ============================================================ */

.v7-article-header {
  position: relative;
  height: 70vh;
  min-height: 500px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.v7-article-header__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.v7-article-header__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.v7-article-header__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.95) 0%, rgba(10, 10, 10, 0.4) 50%, rgba(10, 10, 10, 0.2) 100%);
  z-index: 1;
}

.v7-article-header__content {
  position: relative;
  z-index: 2;
  max-width: var(--v7-container);
  width: 100%;
  margin: 0 auto;
  padding: var(--v7-space-xl) var(--v7-space-md);
}

.v7-article-header__meta {
  display: inline-block;
  font-family: var(--v7-font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--v7-gold);
  margin-bottom: var(--v7-space-sm);
}

.v7-article-header__title {
  font-family: var(--v7-font-heading);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--v7-text-primary);
  line-height: 1.1;
  margin-bottom: var(--v7-space-md);
}

/* ============================================================
   13. ARTICLE CONTENT
   ============================================================ */

.v7-article-content {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--v7-space-2xl) var(--v7-space-md);
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--v7-text-secondary);
}

.v7-article-content h2,
.v7-article-content h3,
.v7-article-content h4 {
  font-family: var(--v7-font-heading);
  color: var(--v7-text-primary);
  margin-top: var(--v7-space-xl);
  margin-bottom: var(--v7-space-md);
}

.v7-article-content h2 {
  font-size: 1.8rem;
}

.v7-article-content h3 {
  font-size: 1.4rem;
}

.v7-article-content p {
  margin-bottom: var(--v7-space-md);
}

.v7-article-content a {
  color: var(--v7-gold);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.3s ease;
}

.v7-article-content a:hover {
  color: var(--v7-gold-light);
}

.v7-article-content img {
  border-radius: var(--v7-radius);
  margin: var(--v7-space-lg) 0;
}

.v7-article-content blockquote {
  border-left: 3px solid var(--v7-gold);
  padding-left: var(--v7-space-md);
  margin: var(--v7-space-lg) 0;
  font-style: italic;
  color: var(--v7-text-primary);
}

.v7-article-content ul,
.v7-article-content ol {
  margin-bottom: var(--v7-space-md);
  padding-left: var(--v7-space-lg);
}

.v7-article-content li {
  margin-bottom: var(--v7-space-xs);
}

/* ============================================================
   14. ARCHIVE HEADER
   ============================================================ */

.v7-archive-header {
  padding: var(--v7-space-2xl) var(--v7-space-md) var(--v7-space-xl);
  text-align: center;
  border-bottom: 1px solid var(--v7-border);
}

.v7-archive-header__title {
  font-family: var(--v7-font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--v7-text-primary);
  margin-bottom: var(--v7-space-sm);
}

.v7-archive-header__desc {
  font-size: 1.1rem;
  color: var(--v7-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================================
   15. ARCHIVE GRID
   ============================================================ */

.v7-archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--v7-space-lg);
}

/* ============================================================
   16. PAGINATION
   ============================================================ */

.v7-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 var(--v7-space-sm);
  border-radius: var(--v7-radius);
  font-family: var(--v7-font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--v7-text-secondary);
  background: var(--v7-bg-secondary);
  border: 1px solid var(--v7-border);
  text-decoration: none;
  transition: all 0.3s ease;
}

.v7-pagination .page-numbers:hover,
.v7-pagination .page-numbers.current {
  background: var(--v7-gold);
  color: var(--v7-bg-primary);
  border-color: var(--v7-gold);
}

.v7-pagination .page-numbers.dots {
  background: transparent;
  border: none;
}

/* ============================================================
   17. PAGE LINKS
   ============================================================ */

.v7-page-links {
  display: flex;
  gap: var(--v7-space-sm);
  margin-top: var(--v7-space-xl);
  padding-top: var(--v7-space-lg);
  border-top: 1px solid var(--v7-border);
}

.v7-page-links a,
.v7-page-links > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--v7-space-sm);
  border-radius: var(--v7-radius);
  font-family: var(--v7-font-ui);
  font-weight: 600;
  color: var(--v7-text-secondary);
  background: var(--v7-bg-secondary);
  border: 1px solid var(--v7-border);
  text-decoration: none;
  transition: all 0.3s ease;
}

.v7-page-links a:hover,
.v7-page-links > span {
  background: var(--v7-gold);
  color: var(--v7-bg-primary);
  border-color: var(--v7-gold);
}
}
