/**
 * 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: var(--color-card-bg, #fff);
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-color, 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 .fc-button-primary {
    background-color: #27ae60 !important;
    border-color: #27ae60 !important;
    transition: none !important;
    overflow: hidden;
}

.fc .fc-button::before {
    content: none !important;
}

.fc .fc-button-primary:hover {
    background-color: #219a52 !important;
    border-color: #219a52 !important;
}

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

.fc .fc-button-primary:disabled {
    background-color: #27ae60 !important;
    border-color: #27ae60 !important;
    opacity: 1 !important;
    color: rgba(255, 255, 255, 0.6) !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: var(--color-card-bg, #fff);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px var(--shadow-color, rgba(0,0,0,0.1));
}

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

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

.cm2-tarifs-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--color-divider, #e0e0e0);
}

.cm2-tarifs-table tbody tr:hover {
    background-color: rgba(var(--color-primary-rgb, 0,0,0), 0.05);
}

.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: var(--color-card-bg, #fff);
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-color, 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 var(--color-input-border, #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: var(--color-btn-text, #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 var(--color-divider, #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 var(--color-divider, #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: var(--color-card-bg, #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: var(--color-card-bg, #fff);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px var(--shadow-color, 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 var(--shadow-color, 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: var(--color-btn-text, #fff);
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

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

/*--------------------------------------------------------------
6.0 - Badges (type & classement) - harmonisés avec le thème
--------------------------------------------------------------*/
/* Listing badges (page Nos Locations) */
[class*="cmv2-listing__badge"] {
    font-weight: 500 !important;
    letter-spacing: 0.03em !important;
}

[class*="cmv2-listing__badge--type"] {
    background: rgba(var(--color-primary-rgb, 90,112,128), 0.1) !important;
    color: var(--color-primary) !important;
    border: 1px solid rgba(var(--color-primary-rgb, 90,112,128), 0.25) !important;
}

[class*="cmv2-listing__badge--classement"] {
    background: rgba(var(--color-primary-rgb, 90,112,128), 0.06) !important;
    color: var(--color-accent, var(--color-secondary)) !important;
    border: 1px solid rgba(var(--color-primary-rgb, 90,112,128), 0.15) !important;
}

/* Location detail badges (page individuelle) */
[class*="cmv2-location__badge--type"] {
    background: rgba(var(--color-primary-rgb, 90,112,128), 0.15) !important;
    color: var(--color-primary) !important;
    border: 1px solid rgba(var(--color-primary-rgb, 90,112,128), 0.3) !important;
}

[class*="cmv2-location__badge--classement"] {
    background: rgba(var(--color-primary-rgb, 90,112,128), 0.08) !important;
    color: var(--color-accent, var(--color-secondary)) !important;
    border: 1px solid rgba(var(--color-primary-rgb, 90,112,128), 0.2) !important;
}
