/*
Theme Name: Chalet Montagne
Description: Thème WordPress fourni par chalet-montagne.com — moderne et élégant pour propriétaires de studios, appartements et chalets à la montagne.
Version: 1.4.9
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 8.1
Author: chalet-montagne.com
Author URI: https://www.chalet-montagne.com
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: chalet-montagne
Domain Path: /languages
Tags: translation-ready, custom-menu, featured-images, custom-colors, custom-logo, footer-widgets, theme-options

Chalet Montagne WordPress Theme, Copyright (C) 2025-2026 chalet-montagne.com
Chalet Montagne is distributed under the terms of the GNU General Public License v2 or later.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see https://www.gnu.org/licenses/.
*/

/*--------------------------------------------------------------
>>> 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;
}

/* Accessibility: links inside post/page content, comments and text widgets
   must be visually distinguishable. WordPress.org Theme Review requirement. */
.entry-content a,
.entry-summary a,
.comment-content a,
.widget_text a,
.textwidget a,
.wp-block-quote a,
.wp-caption-text a {
    text-decoration: underline;
}

.entry-content a:hover,
.entry-summary a:hover,
.comment-content a:hover,
.widget_text a:hover,
.textwidget a:hover,
.wp-block-quote a:hover,
.wp-caption-text a:hover {
    text-decoration: none;
}

/* Buttons inside content keep their button look */
.entry-content a.button,
.entry-content .wp-block-button__link {
    text-decoration: none;
}

/*--------------------------------------------------------------
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-header .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;
    padding: 0 1rem;
}

.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 - WordPress Required Classes
--------------------------------------------------------------*/
.alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 1em;
}

.alignright {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 1em;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1em;
}

.wp-caption {
    max-width: 100%;
    margin-bottom: 1.5em;
}

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

.wp-caption-text {
    font-size: 0.875rem;
    color: #666;
    text-align: center;
    padding-top: 0.5em;
}

.gallery-caption {
    font-size: 0.875rem;
    color: #666;
}

.sticky {
    display: block;
}

.bypostauthor {
    display: block;
}

/*--------------------------------------------------------------
9.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;
    }
}
