/*
Theme Name: Kayut
Theme URI: https://kayut.fr
Author: Kayut Team
Author URI: https://kayut.fr
Description: Un thème WordPress élégant pour les hébergements de montagne, basé sur la maquette Kayut.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kayut
Tags: montagne, hébergement, gîte, chalet, responsive
*/

/* Importation de la police Stylus BT */
@import url('https://fonts.cdnfonts.com/css/stylus-bt');

/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

/* Styles de base */
body {
    font-family: 'Arial', serif;
    background-color: #f8f5f0;
    color: #333;
    height: 100vh;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.main {
    padding: 0 20px;
    margin: 0 auto;
    flex: 1 1 auto;
    overflow-y: auto;
    margin-top: 60px;
    margin-bottom: 40px;
    height: calc(100vh - 60px - 40px);
    padding-bottom: 20px;
    width: 100%;
    padding-bottom: 40px;
}

/* Slider */
.slider-container {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.slider {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.slide {
    min-width: 100%;
    height: 100%;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Styles WordPress spécifiques */
.alignleft {
    float: left;
    margin-right: 15px;
    margin-bottom: 15px;
}

.alignright {
    float: right;
    margin-left: 15px;
    margin-bottom: 15px;
}

.aligncenter {
    display: block;
    margin: 0 auto 15px;
}

.wp-caption {
    max-width: 100%;
    padding: 5px;
    background: #f5f5f5;
    text-align: center;
}

.wp-caption-text {
    font-size: 12px;
    margin: 5px 0;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* Styles pour les widgets */
.widget {
    margin-bottom: 30px;
}

.widget-title {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

/* Formulaires */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="range"],
input[type="date"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="datetime"],
input[type="datetime-local"],
input[type="color"],
textarea,
select {
    padding: 8px;
    border: 1px solid #ddd;
    width: 100%;
    margin-bottom: 15px;
}

button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
    background-color: #6BA9C7;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-family: 'Arial', serif;
    transition: background-color 0.3s ease;
}

button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover {
    background-color: #5a98b6;
}

.slider {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.slide {
    min-width: 100%;
    height: 100%;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kayut-selected-images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.kayut-image-preview {
    position: relative;
    width: 100px;
    height: 100px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.kayut-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kayut-remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
}

.kayut-remove-image:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Media Queries pour la responsivité */
/* Tablettes */
@media (max-width: 992px) {
    .main {
        padding: 0 15px;
        padding-bottom: 20px;
    }
    
    .slider-container {
        height: 300px;
    }
}

/* Mobiles */
@media (max-width: 768px) {
    .main {
        padding: 0 10px;
        padding-bottom: 20px;
    }
    
    .slider-container {
        height: 200px;
    }
    
    /* Ajustements pour les formulaires sur mobile */
    input[type="text"],
    input[type="email"],
    input[type="url"],
    input[type="password"],
    input[type="search"],
    input[type="number"],
    input[type="tel"],
    input[type="range"],
    input[type="date"],
    input[type="month"],
    input[type="week"],
    input[type="time"],
    input[type="datetime"],
    input[type="datetime-local"],
    input[type="color"],
    textarea,
    select {
        padding: 10px;
        font-size: 16px; /* Évite le zoom automatique sur iOS */
    }
    
    /* Ajustements pour les images */
    .alignleft,
    .alignright {
        float: none;
        margin: 0 0 15px 0;
        display: block;
    }
}

/* Petits mobiles */
@media (max-width: 480px) {
    .slider-container {
        height: 150px;
    }
}