/*
Theme Name: Chalet Montagne
Theme URI: https://www.chalet-montagne.com
Description: Thème WordPress moderne et élégant pour propriétaires de studios, appartements et chalets à la montagne. Compatible avec le plugin Chalet-Montagne.com Tools V2.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.7
Requires PHP: 8.1
Author: Chalet Montagne
Author URI: https://www.chalet-montagne.com
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: chaletmontagne
Domain Path: /languages
Tags: vacation-rental, mountain, responsive, translation-ready, custom-menu, featured-images

Chalet Montagne WordPress Theme
Copyright (C) 2025, Chalet Montagne
*/

/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
1.0 - Reset & Normalize
2.0 - Typography
3.0 - Layout
4.0 - Header
5.0 - Navigation
6.0 - Content
7.0 - Footer
8.0 - Responsive
--------------------------------------------------------------*/

/*--------------------------------------------------------------
1.0 - Reset & Normalize
--------------------------------------------------------------*/
* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text, #333);
    background: #f8f9fa;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/*--------------------------------------------------------------
2.0 - Typography
--------------------------------------------------------------*/
h1, h2, h3, h4, h5, h6 {
    font-family: 'Georgia', serif;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--color-dark, #1B2838);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

a {
    color: #2C5F7C;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #1a3a4a;
}

/*--------------------------------------------------------------
3.0 - Layout
--------------------------------------------------------------*/
.site-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-content {
    min-height: 60vh;
    padding: 20px 0 40px;
}

/*--------------------------------------------------------------
4.0 - Header
--------------------------------------------------------------*/
.site-header {
    background: #fff;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.site-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    min-height: 80px;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-title {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.site-title a {
    color: #2C5F7C;
    transition: color 0.3s ease;
}

.site-title a:hover {
    color: #1a3a4a;
}

.site-description {
    margin: 0;
    font-size: 0.85rem;
    color: #7f8c8d;
    font-weight: 400;
}

/*--------------------------------------------------------------
5.0 - Navigation
--------------------------------------------------------------*/
.main-navigation {
    margin: 0;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 5px;
    align-items: center;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 28px 20px;
    color: var(--color-charcoal, #2F3640);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 3px;
    background: #2C5F7C;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.main-navigation a:hover {
    color: #2C5F7C;
    background: rgba(44, 95, 124, 0.05);
}

.main-navigation a:hover::after,
.main-navigation .current-menu-item > a::after,
.main-navigation .current_page_item > a::after {
    transform: scaleX(1);
}

.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
    color: #2C5F7C;
}

/*--------------------------------------------------------------
6.0 - Content
--------------------------------------------------------------*/
.content-area {
    margin-bottom: 40px;
}

.entry-header {
    margin-bottom: 30px;
}

.entry-title {
    margin-bottom: 10px;
    padding-left: 1rem;
}

.entry-content {
    line-height: 1.8;
}

.entry-content img {
    max-width: 100%;
    height: auto;
}

/*--------------------------------------------------------------
6.5 - Featured Image / Post Thumbnail
--------------------------------------------------------------*/
.featured-image-container {
    margin: 0 0 2.5rem 0;
    position: relative;
}

/* Frame with elegant border effect */
.featured-image-frame {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--color-card-border, #e0e0e0) 0%, var(--color-divider, #f0f0f0) 100%);
    padding: 4px;
    box-shadow:
        0 4px 6px -1px var(--shadow-color, rgba(0, 0, 0, 0.1)),
        0 10px 25px -5px var(--shadow-color, rgba(0, 0, 0, 0.08)),
        0 0 0 1px var(--color-card-border, rgba(0, 0, 0, 0.05));
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s ease;
}

.featured-image-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary, #2C5F7C) 0%, var(--color-accent, #D4A574) 50%, var(--color-secondary, #89B4C4) 100%);
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.featured-image-frame:hover::before {
    opacity: 1;
}

.featured-image-frame:hover {
    transform: translateY(-4px);
    box-shadow:
        0 12px 24px -8px var(--shadow-color, rgba(0, 0, 0, 0.15)),
        0 20px 40px -12px var(--shadow-color, rgba(0, 0, 0, 0.12)),
        0 0 0 1px var(--color-primary, rgba(44, 95, 124, 0.1));
}

/* The image itself */
.featured-image {
    display: block;
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.featured-image-frame:hover .featured-image {
    transform: scale(1.02);
}

/* Subtle overlay for depth */
.featured-image-overlay {
    position: absolute;
    inset: 4px;
    border-radius: 8px;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        transparent 0%,
        transparent 60%,
        rgba(0, 0, 0, 0.03) 100%
    );
    transition: opacity 0.3s ease;
}

.featured-image-frame:hover .featured-image-overlay {
    opacity: 0;
}

/* Caption styling */
.featured-image-caption {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-style: italic;
    color: var(--color-text-light, #6b7280);
    text-align: center;
    background: var(--color-card-bg, #f9fafb);
    border-radius: 6px;
    border-left: 3px solid var(--color-primary, #2C5F7C);
}

/* Archive/listing view - smaller images with hover effect */
.featured-image-archive {
    margin-bottom: 1.5rem;
}

.featured-image-link {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow:
        0 2px 4px var(--shadow-color, rgba(0, 0, 0, 0.06)),
        0 4px 12px var(--shadow-color, rgba(0, 0, 0, 0.08));
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-image-link:hover {
    transform: translateY(-3px);
    box-shadow:
        0 8px 16px var(--shadow-color, rgba(0, 0, 0, 0.1)),
        0 12px 28px var(--shadow-color, rgba(0, 0, 0, 0.12));
}

.featured-image-archive .featured-image {
    max-height: 300px;
    transition: transform 0.4s ease;
}

.featured-image-link:hover .featured-image {
    transform: scale(1.05);
}

.featured-image-hover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(var(--color-primary-rgb, 44, 95, 124), 0) 0%,
        rgba(var(--color-primary-rgb, 44, 95, 124), 0.15) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.featured-image-link:hover .featured-image-hover-overlay {
    opacity: 1;
}

/* Dark theme adjustments */
.theme-dark .featured-image-frame {
    background: linear-gradient(135deg, var(--color-card-border, #2a2a2a) 0%, var(--color-charcoal, #1a1a1a) 100%);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.3),
        0 10px 25px -5px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.theme-dark .featured-image-frame:hover {
    box-shadow:
        0 12px 24px -8px rgba(0, 0, 0, 0.4),
        0 20px 40px -12px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 30px -10px var(--color-primary, rgba(212, 175, 55, 0.2));
}

.theme-dark .featured-image-caption {
    background: var(--color-card-bg, #1a1a1a);
    border-left-color: var(--color-primary, #D4AF37);
}

.theme-dark .featured-image-link {
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.25);
}

.theme-dark .featured-image-link:hover {
    box-shadow:
        0 8px 16px rgba(0, 0, 0, 0.3),
        0 12px 28px rgba(0, 0, 0, 0.35);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .featured-image-frame {
        border-radius: 8px;
        padding: 3px;
    }

    .featured-image {
        max-height: 350px;
        border-radius: 6px;
    }

    .featured-image-archive .featured-image {
        max-height: 220px;
    }

    .featured-image-caption {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }
}

/* Animation on page load */
@keyframes featuredImageReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.featured-image-single {
    animation: featuredImageReveal 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s both;
}

/*--------------------------------------------------------------
7.0 - Footer
--------------------------------------------------------------*/
.site-footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.site-info {
    text-align: center;
    font-size: 0.9rem;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.site-info a {
    color: #ecf0f1;
}

/*--------------------------------------------------------------
8.0 - Responsive
--------------------------------------------------------------*/
@media screen and (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }

    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }

    .site-branding {
        flex-direction: column;
        text-align: center;
    }
}
