/* app.css - Styles du site Chalet Leigier Nax */

/* Variables CSS */
:root {
    /* Couleurs - Palette montagne */
    --color-primary: #1c3948; /* Bleu ardoise montagne */
    --color-secondary: #6B4A2E; /* Brun bois */
    --color-accent: #8B6F47; /* Or vieilli */
    --color-light: #F4F2EE; /* Neige */
    --color-dark: #2E2E2E; /* Anthracite */
    
    --color-success: #27AE60;
    --color-danger: #E74C3C;
    --color-warning: #F39C12;
    --color-info: #3498DB;
    
    /* Typographie */
    --font-display: 'Playfair Display', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Espacements */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
    
    /* Ombres */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.2);
    
    /* Bordures */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

@supports (-moz-osx-font-smoothing: grayscale) {
  html { -moz-osx-font-smoothing: grayscale; }
}

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

body {
    margin: 0;
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-dark);
    background: var(--color-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 var(--space-md);
    color: var(--color-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

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

a:hover {
    color: var(--color-accent);
}

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

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Header & Navigation */
.site-header {
    background: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.navbar {
    padding: var(--space-md) 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
}

.logo img {
    width: 40px;
    height: 40px;
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: var(--space-sm);
    background: none;
    border: none;
    cursor: pointer;
}

.navbar-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-primary);
    transition: var(--transition-fast);
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: var(--space-2xl);
}

.navbar-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--space-xl);
}

.nav-link {
    font-weight: 500;
    color: var(--color-dark);
    padding: var(--space-sm) 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.navbar-end {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.language-selector {
    display: flex;
    gap: var(--space-sm);
}

.lang-link {
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.lang-link:hover,
.lang-link.active {
    background: var(--color-primary);
    color: white;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    padding: var(--space-2xl);
    max-width: 800px;
}

.hero h1 {
    color: white;
    margin-bottom: var(--space-lg);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: var(--space-xl);
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    font-weight: 500;
    text-align: center;
    transition: var(--transition-normal);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.btn-primary:hover {
  background: #ffffffc2;
  color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--color-primary);
    border-color: white;
}

.btn-secondary:hover {
    background: transparent;
    color: white;
    transform: translateY(-2px);
}

.btn-large {
    padding: var(--space-md) var(--space-xl);
    font-size: 1.125rem;
}

/* Sections */
.section {
    padding: var(--space-3xl) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-2xl);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--color-accent);
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Cards */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition-normal);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

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

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

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

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

.card-title {
    margin-bottom: var(--space-sm);
}

/* Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-md);
}

.gallery-item {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius-md);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-normal);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Calendrier amélioré */
.calendar-container {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-xl);
    margin: var(--space-xl) 0;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.calendar-nav {
    display: flex;
    gap: var(--space-md);
}

.calendar-nav button {
    padding: var(--space-sm) var(--space-md);
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.calendar-nav button:hover:not(:disabled) {
    background: var(--color-secondary);
    transform: translateY(-1px);
}

.calendar-nav button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Bouton de réinitialisation */
.btn-reset {
    padding: var(--space-sm) var(--space-md);
    background: var(--color-danger);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.875rem;
}

.btn-reset:hover {
    background: #C0392B;
    transform: translateY(-1px);
}

.calendar-months {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
}

.calendar-month {
    min-width: 280px;
}

.calendar-month-title {
    text-align: center;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--color-primary);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background: #e0e0e0;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.calendar-weekday {
    padding: var(--space-sm);
    background: var(--color-primary);
    color: white;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
}

.calendar-day {
    aspect-ratio: 1;
    padding: var(--space-xs);
    background: white;
    border: none;
    cursor: default;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

.calendar-day-number {
    font-weight: 500;
}

.calendar-day-price {
    font-size: 0.625rem;
    color: var(--color-accent);
    margin-top: 2px;
}

.calendar-day.other-month {
    color: #ccc;
    background: #fafafa;
}

/* Nouvelles couleurs pour les états */
.calendar-day.available {
    cursor: pointer;
    background: #e8f4fd;
    border: 1px solid #b3d9f2;
}

.calendar-day.available:hover {
    background: #b3d9f2;
    transform: scale(1.05);
}

.calendar-day.booked {
    background: #ffebee;
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

.calendar-day.arrival-selected {
    background: #2E7D32;
    color: white;
    font-weight: bold;
    box-shadow: 0 0 0 2px #4CAF50;
}

.calendar-day.departure-selected {
    background: #1565C0;
    color: white;
    font-weight: bold;
    box-shadow: 0 0 0 2px #2196F3;
}

.calendar-day.in-range {
    background: #E8F5E9;
    border: 1px solid #A5D6A7;
}

.calendar-day.available-departure {
    cursor: pointer;
    background: #c3e6fc;
    border: 2px solid #2196F3;
}

.calendar-day.available-departure:hover {
    background: #90CAF9;
    transform: scale(1.05);
}

.calendar-day.today {
    font-weight: bold;
    box-shadow: inset 0 0 0 2px var(--color-accent);
}

/* Price Panel amélioré */
.price-panel {
  background: linear-gradient(135deg, #1c394882 0%, #1c3948cc 100%);
  color: white;
  padding: var(--space-2xl);
  border-radius: var(--radius-lg);
  margin: var(--space-xl) 0;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.price-panel-error {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.price-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.price-item {
    text-align: center;
    padding: var(--space-md);
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
}

.price-label {
    font-size: 0.875rem;
    opacity: 0.95;
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-value {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: var(--font-display);
}

.price-total {
    text-align: center;
    padding-top: var(--space-xl);
    border-top: 2px solid rgba(255,255,255,0.3);
}

.price-total .price-value {
    font-size: 3rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Forms */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: var(--space-xs);
    color: var(--color-dark);
}

.form-control {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(28, 57, 72, 0.1);
}

.form-control.error {
    border-color: var(--color-danger);
}

.form-error {
    color: var(--color-danger);
    font-size: 0.875rem;
    margin-top: var(--space-xs);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.site-footer {
    background: var(--color-primary);
    color: white;
    margin-top: var(--space-3xl);
}

.site-footer a {
  color: var(--color-accent);
}

.footer-main {
    padding: var(--space-2xl) 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-2xl);
}

.footer-section h3 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: var(--space-md);
}

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

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

.footer-address {
    font-style: normal;
    opacity: 0.95;
    line-height: 1.8;
    color: rgba(255,255,255,0.95);
}

.footer-bottom {
    background: rgba(0,0,0,0.2);
    padding: var(--space-lg) 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer-bottom a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-bottom a:hover {
    color: white;
    text-decoration: underline;
}

.footer-language-selector {
    display: flex;
    gap: var(--space-sm);
}

.footer-language-selector .lang-link {
    color: white;
    border-color: rgba(255,255,255,0.3);
}

.footer-language-selector .lang-link:hover,
.footer-language-selector .lang-link.active {
    background: rgba(255,255,255,0.2);
    color: white;
}

.owners-image {
    max-width: 200px;
    height: auto;
    filter: invert(1);
    opacity: 0.9;
}

.developer-credit {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: rgba(255,255,255,0.8);
    font-size: 0.875rem;
}

.developer-credit img {
    height: 24px;
    width: auto;
    opacity: 0.9;
}

.developer-credit a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
}

.developer-credit a:hover {
    color: white;
    text-decoration: underline;
}

/* Notification Toast */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: var(--space-md) var(--space-lg);
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    transform: translateX(400px);
    transition: var(--transition-normal);
    z-index: 2000;
    max-width: 350px;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left: 4px solid var(--color-success);
}

.notification.error {
    border-left: 4px solid var(--color-danger);
}

.notification.info {
    border-left: 4px solid var(--color-info);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-toggle {
        display: flex;
    }
    
    .navbar-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: var(--shadow-lg);
        padding: var(--space-lg);
    }
    
    .navbar-menu.active {
        display: block;
    }
    
    .navbar-nav {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .navbar-end {
        margin-top: var(--space-lg);
        padding-top: var(--space-lg);
        border-top: 1px solid #eee;
    }
    
    .hero {
        min-height: 50vh;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .calendar-months {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .navbar,
    .btn,
    .notification,
    .loading-overlay {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
    }
    
    h1 { font-size: 18pt; }
    h2 { font-size: 16pt; }
    h3 { font-size: 14pt; }
    
    a {
        color: inherit;
        text-decoration: none;
    }
}

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.animate-fade-in {
    animation: fadeIn var(--transition-normal) ease;
}

.animate-slide-up {
    animation: slideUp var(--transition-normal) ease;
}

.animate-slide-down {
    animation: slideDown var(--transition-normal) ease;
}