/**
 * Main stylesheet
 *
 * @package ChaletMontagne
 */

/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
1.0 - CSS Variables
2.0 - Buttons & Forms
3.0 - Header & Navigation
4.0 - Content
5.0 - Widgets
6.0 - Footer
7.0 - Utilities
--------------------------------------------------------------*/

/* Mobile menu overlay — hidden by default, shown via responsive.css */
.mobile-menu-overlay {
    display: none;
}

/*--------------------------------------------------------------
1.0 - CSS Variables
--------------------------------------------------------------*/
:root {
    --color-primary: #2C5F7C;
    --color-secondary: #D4A574;
    --color-accent: #3D5C3E;
    --color-text: #2c3e50;
    --color-text-light: #6c757d;
    --color-bg: #ffffff;
    --color-bg-light: #f8f9fa;
    --color-bg-lighter: #e9ecef;
    --color-border: #dee2e6;
    --color-shadow: rgba(0, 0, 0, 0.08);

    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --container-width: 1200px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;

    --border-radius: 8px;
    --border-radius-sm: 4px;
    --border-radius-lg: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
}

/*--------------------------------------------------------------
2.0 - Buttons & Forms
--------------------------------------------------------------*/
.button,
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--color-divider);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: var(--font-body);
    transition: var(--transition);
    background: var(--color-bg);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(44, 95, 124, 0.1);
    background: #fff;
}

/*--------------------------------------------------------------
3.0 - Header & Navigation
--------------------------------------------------------------*/
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--color-bg);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.main-navigation {
    max-width: 1200px;
    margin: 1rem auto 0;
    padding: 0 var(--spacing-md);
}

.main-navigation ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.main-navigation li {
    margin: 0;
}

.main-navigation a {
    padding: 10px 15px;
    transition: var(--transition);
}

.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
    color: var(--color-primary);
}

/* Dropdown/Sub-menu styles */
.main-navigation ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 99999;
    background: #fff;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    flex-direction: column;
    padding: 0.5rem 0;
    border-radius: 4px;
}

.main-navigation li {
    position: relative;
}

.main-navigation li:hover > ul,
.main-navigation li:focus-within > ul {
    display: flex;
}

.main-navigation ul ul li {
    width: 100%;
}

.main-navigation ul ul a {
    padding: 10px 20px;
    display: block;
    width: 100%;
}

.main-navigation ul ul a:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--color-primary);
}

/* Third level dropdown */
.main-navigation ul ul ul {
    left: 100%;
    top: 0;
}

/* Dropdown arrow indicator */
.main-navigation .menu-item-has-children > a::after {
    content: ' ▼';
    font-size: 0.7em;
    margin-left: 5px;
}

.main-navigation ul ul .menu-item-has-children > a::after {
    content: ' ▶';
}

/* Focus state for touch devices */
.main-navigation li.focus > ul {
    display: flex;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
}

/*--------------------------------------------------------------
4.0 - Content
--------------------------------------------------------------*/
.site-content {
    background: var(--color-bg);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    margin: var(--spacing-lg) 0;
    box-shadow: var(--shadow-sm);
    width: 100%;
}

blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background-color: var(--color-bg);
    border-radius: 8px;
    font-style: normal;
    border: 2px solid;
}

.page-header {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 3px solid var(--color-primary);
    position: relative;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--color-secondary);
}

.page-title {
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
    color: var(--color-primary);
}

.entry-header {
    margin-bottom: var(--spacing-md);
}

.entry-meta {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-sm);
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.entry-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.entry-content {
    margin-bottom: var(--spacing-lg);
    line-height: 1.8;
}

.entry-content img {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.entry-content img:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.entry-footer {
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-divider);
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Pagination */
.navigation.pagination {
    margin-top: var(--spacing-lg);
    text-align: center;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    margin: 0 4px;
    border: 2px solid var(--color-divider);
    border-radius: var(--border-radius);
    color: var(--color-text);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 600;
}

.page-numbers:hover {
    border-color: var(--color-primary);
    background-color: rgba(44, 95, 124, 0.05);
    color: var(--color-primary);
    transform: translateY(-2px);
}

.page-numbers.current {
    background: linear-gradient(135deg, var(--color-primary) 0%, #1a4a5f 100%);
    color: #fff;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

/* Breadcrumbs */
.breadcrumbs {
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm);
    background-color: var(--color-bg-light);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
}

/*--------------------------------------------------------------
5.0 - Widgets
--------------------------------------------------------------*/
.widget {
    margin-bottom: var(--spacing-lg);
}

.widget-title {
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--color-primary);
    font-size: 1.25rem;
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--color-divider);
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget select {
    width: 100%;
    padding: 10px;
}

/*--------------------------------------------------------------
6.0 - Footer
--------------------------------------------------------------*/
.site-footer {
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 50%, var(--color-accent) 100%);
}

.footer-widgets {
    margin-bottom: var(--spacing-lg);
    padding-top: var(--spacing-lg);
}

.footer-widget-area {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-widget-area.footer-cols-1 {
    grid-template-columns: 1fr;
    max-width: 500px;
}

.footer-widget-area.footer-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 968px) {
    .footer-widget-area {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .footer-widget-area {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
}

.footer-widget {
    min-height: 100%;
    font-family: var(--font-body);
    font-size: 1rem;
}

.footer-widget .widget-title,
.footer-widget h1,
.footer-widget h2,
.footer-widget h3,
.footer-widget h4,
.footer-widget h5,
.footer-widget h6,
.footer-widget .wp-block-heading {
    color: #fff !important;
    border-bottom: 2px solid rgba(212, 165, 116, 0.3);
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-heading) !important;
    font-weight: 600 !important;
    font-size: 1.2rem !important;
}

.footer-widget p,
.footer-widget ul,
.footer-widget li,
.footer-widget .wp-block-paragraph,
.footer-widget .wp-block-list {
    color: #ecf0f1;
    line-height: 1.8;
    font-family: var(--font-body) !important;
    font-size: 1rem;
}

.footer-widget a {
    color: #ecf0f1;
    transition: var(--transition);
    display: inline-block;
    text-decoration: none;
}

.footer-widget a:hover {
    color: var(--color-secondary);
    transform: translateX(5px);
}

.footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-widget ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-widget ul li:last-child {
    border-bottom: none;
}

.footer-widget strong {
    color: var(--color-secondary);
    display: block;
    margin-bottom: 0.25rem;
}

/* Custom Widgets */
.contact-widget .contact-item,
.station-widget .station-item {
    padding: 0.5rem 0;
    color: #ecf0f1;
}

.contact-widget .contact-icon,
.station-widget .station-icon {
    margin-right: 0.5rem;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    padding: 0.5rem 0;
    color: #ecf0f1;
}

.social-links-widget {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.social-links-widget a {
    color: #ecf0f1;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.social-links-widget a:hover {
    color: var(--color-secondary);
    transform: translateX(5px);
}

.social-links-widget .social-icon {
    font-size: 1.2em;
}

.site-info {
    backdrop-filter: blur(10px);
    text-align: center;
    padding-top: var(--spacing-lg);
    margin-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #ecf0f1;
}

.site-info .footer-text {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.site-info .footer-siret {
    font-size: 0.85rem;
    opacity: 0.8;
}

.site-info .theme-credit {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 0.25rem;
}

.site-info .theme-credit a {
    color: var(--color-secondary, #D4A574);
    text-decoration: none;
    transition: var(--transition);
}

.site-info .theme-credit a:hover {
    color: #fff;
    opacity: 1;
}

/* Social links */
.social-links {
    display: flex;
    gap: 15px;
    margin-top: var(--spacing-md);
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    color: var(--color-text);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}

.social-icon {
    font-size: 2rem;
    line-height: 1;
    transition: var(--transition);
}

.social-icon-svg {
    width: 32px;
    height: 32px;
    transition: var(--transition);
}

.social-link:hover .social-icon {
    transform: scale(1.2);
}

.social-link:hover .social-icon-svg {
    transform: scale(1.2) rotate(5deg);
}

/* Specific social network colors on hover */
.social-link-facebook:hover .social-icon {
    color: #1877f2;
}

.social-link-instagram:hover .social-icon {
    color: #e1306c;
}

.social-link-twitter:hover .social-icon {
    color: #1da1f2;
}

.social-link-youtube:hover .social-icon {
    color: #ff0000;
}

.social-link-chaletmontagne:hover .social-icon-svg {
    filter: none;
}

.social-link-airbnb:hover .social-icon {
    color: #ff5a5f;
}

.social-link-booking:hover .social-icon {
    color: #003580;
}

/*--------------------------------------------------------------
7.0 - Utilities
--------------------------------------------------------------*/
/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--color-accent);
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border-width: 0;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    color: #21759b;
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
