/**
 * Plugin Overrides - Custom styles for Chalet-Montagne.com Tools V2 shortcodes
 *
 * @package ChaletMontagne
 */

/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
1.0 - Planning (FullCalendar)
2.0 - Tarifs
3.0 - Galerie
4.0 - Formulaire de contact
5.0 - Tabs (for location pages)
--------------------------------------------------------------*/

/*--------------------------------------------------------------
1.0 - Planning (FullCalendar)
--------------------------------------------------------------*/
.cm2-planning-container {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* FullCalendar customization */
.fc {
    font-family: var(--font-body);
}

.fc-toolbar-title {
    font-family: var(--font-heading);
    color: var(--color-primary);
}

.fc-button-primary {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
}

.fc-button-primary:hover {
    background-color: var(--color-accent) !important;
    border-color: var(--color-accent) !important;
}

.fc-button-primary:not(:disabled):active,
.fc-button-primary:not(:disabled).fc-button-active {
    background-color: var(--color-accent) !important;
    border-color: var(--color-accent) !important;
}

.fc-event {
    border-radius: 4px;
}

.fc-day-today {
    background-color: rgba(44, 95, 124, 0.1) !important;
}

/*--------------------------------------------------------------
2.0 - Tarifs
--------------------------------------------------------------*/
.cm2-tarifs-container {
    margin: 2rem 0;
}

.cm2-tarifs-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.cm2-tarifs-table thead {
    background-color: var(--color-primary);
    color: #fff;
}

.cm2-tarifs-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.cm2-tarifs-table td {
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.cm2-tarifs-table tbody tr:hover {
    background-color: #f9f9f9;
}

.cm2-tarifs-table tbody tr:last-child td {
    border-bottom: none;
}

.cm2-tarifs-price {
    font-weight: 600;
    color: var(--color-primary);
}

/*--------------------------------------------------------------
3.0 - Galerie
--------------------------------------------------------------*/
.cm2-location-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.cm2-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cm2-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.cm2-gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

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

.cm2-gallery-item a {
    display: block;
}

/*--------------------------------------------------------------
4.0 - Formulaire de contact
--------------------------------------------------------------*/
.cm2-contact-form {
    max-width: 600px;
    margin: 2rem 0;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.cm2-contact-form .form-group {
    margin-bottom: 1.5rem;
}

.cm2-contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-text);
}

.cm2-contact-form input[type="text"],
.cm2-contact-form input[type="email"],
.cm2-contact-form input[type="tel"],
.cm2-contact-form input[type="date"],
.cm2-contact-form textarea,
.cm2-contact-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.cm2-contact-form input:focus,
.cm2-contact-form textarea:focus,
.cm2-contact-form select:focus {
    border-color: var(--color-primary);
    outline: none;
}

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

.cm2-contact-form button[type="submit"] {
    width: 100%;
    padding: 12px 24px;
    background-color: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cm2-contact-form button[type="submit"]:hover {
    background-color: var(--color-accent);
}

.cm2-contact-form .gdpr-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.cm2-contact-form .gdpr-consent input[type="checkbox"] {
    width: auto;
    margin-top: 4px;
}

.cm2-contact-form .success-message {
    padding: 1rem;
    background-color: #d4edda;
    color: #155724;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.cm2-contact-form .error-message {
    padding: 1rem;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* Owner info section */
.cm2-owner-info {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}

.cm2-owner-info h3 {
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.cm2-owner-info p {
    margin-bottom: 0.5rem;
}

/*--------------------------------------------------------------
5.0 - Tabs (for location pages generated by plugin)
--------------------------------------------------------------*/
.cm2-location-tabs {
    display: flex;
    gap: 0;
    margin: 2rem 0 0;
    border-bottom: 2px solid #e0e0e0;
}

.cm2-tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--color-text);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cm2-tab-btn:hover {
    color: var(--color-primary);
    background-color: rgba(44, 95, 124, 0.05);
}

.cm2-tab-btn.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.cm2-tab-content {
    display: none;
    padding: 2rem 0;
    animation: fadeIn 0.3s ease;
}

.cm2-tab-content.active {
    display: block;
}

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

/* Location description */
.cm2-location-description {
    line-height: 1.8;
}

.cm2-location-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.cm2-detail-item {
    padding: 0.5rem 0;
}

.cm2-detail-item strong {
    color: var(--color-primary);
}

.cm2-location-equipements {
    margin: 2rem 0;
}

.cm2-location-equipements h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.cm2-location-equipements ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
    list-style: none;
    padding: 0;
}

.cm2-location-equipements li::before {
    content: "✓ ";
    color: var(--color-accent);
    font-weight: bold;
    margin-right: 0.5rem;
}

/* Location header */
.cm2-location-header {
    margin: -2rem -2rem 2rem;
    height: 400px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.cm2-location-main-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Location cards in listing */
.cm2-locations-listing {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.cm2-location-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cm2-location-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.cm2-location-photo {
    height: 200px;
    overflow: hidden;
}

.cm2-location-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cm2-location-card:hover .cm2-location-photo img {
    transform: scale(1.1);
}

.cm2-location-info {
    padding: 1.5rem;
}

.cm2-location-info h3 {
    margin: 0 0 1rem;
    color: var(--color-primary);
}

.cm2-location-info h3 a {
    color: inherit;
    text-decoration: none;
}

.cm2-location-info h3 a:hover {
    color: var(--color-accent);
}

.cm2-location-excerpt {
    margin-bottom: 1rem;
    color: var(--color-text-light);
}

.cm2-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--color-primary);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.cm2-btn:hover {
    background-color: var(--color-accent);
    color: #fff;
}
