.pwc-occasions-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.pwc-occasions-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.pwc-occasions-filters input,
.pwc-occasions-filters select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 200px;
}

.pwc-occasions-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
}

.pwc-occasion-card {
    display: flex;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.pwc-occasion-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.pwc-occasion-image {
    width: 200px;
    height: 200px;
    flex-shrink: 0;
}

.pwc-occasion-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pwc-occasion-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pwc-occasion-title {
    font-size: 1.4em;
    margin: 0;
    color: #333;
}

.pwc-occasion-price {
    font-size: 1.6em;
    font-weight: bold;
    color: #d73333;
}

.pwc-occasion-details {
    display: flex;
    gap: 20px;
    color: #666;
}

.pwc-occasion-description {
    color: #666;
    line-height: 1.5;
}

.pwc-view-details {
    align-self: flex-start;
    padding: 8px 16px;
    background: #d73333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.pwc-view-details:hover {
    background: #b22222;
}

.pwc-occasion-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.pwc-contact-seller,
.pwc-toggle-favorite {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pwc-contact-seller:hover {
    background: #f0f0f0;
}

.pwc-toggle-favorite {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    font-size: 24px;
    color: #666;
    transition: transform 0.2s;
}

.pwc-toggle-favorite:hover {
    transform: scale(1.1);
}

.pwc-toggle-favorite.active {
    color: #d73333;
}

.pwc-occasion-status {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.pwc-status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

.pwc-status-badge.pending {
    background: #ffd700;
    color: #856404;
}

.pwc-status-badge.approved {
    background: #d4edda;
    color: #155724;
}

.pwc-status-badge.rejected {
    background: #f8d7da;
    color: #721c24;
}

/* Modal */
.pwc-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

.pwc-modal-content {
    position: relative;
    background: #fff;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.pwc-modal-occasion {
    padding: 15px;
    height: 100%;
    max-height: calc(90vh - 40px);
    overflow-y: auto;
    position: relative;
}

.pwc-modal-close {
    position: absolute;
    top: 10px;
    right: 50px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    z-index: 1000;
    background: white;
    padding: 5px;
}

.pwc-messages-container {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 10px;
}

.pwc-message {
    margin-bottom: 15px;
    padding: 10px;
    border-radius: 8px;
}

.pwc-message.sent {
    background: #e3f2fd;
    margin-left: 20%;
}

.pwc-message.received {
    background: #f5f5f5;
    margin-right: 20%;
}

.pwc-message-form {
    display: flex;
    gap: 10px;
}

.pwc-message-form textarea {
    flex: 1;
    min-height: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.pwc-send-message {
    align-self: flex-end;
    padding: 8px 16px;
    background: #1976d2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.pwc-send-message:hover {
    background: #1565c0;
}

@media (max-width: 768px) {
    .pwc-occasions-filters {
        flex-direction: column;
    }
    
    .pwc-occasions-filters input,
    .pwc-occasions-filters select {
        width: 100%;
    }

    .pwc-occasion-card {
        flex-direction: column;
    }

    .pwc-occasion-image {
        width: 100%;
        height: 200px;
    }
} 

/* Styles pour les messages d'erreur */
.pwc-form-errors {
    background-color: #ffebee;
    border: 1px solid #ef5350;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
    color: #c62828;
}

.pwc-form-errors ul {
    margin: 0;
    padding-left: 20px;
    list-style-type: disc;
}

.pwc-form-errors li {
    margin-bottom: 5px;
}

.pwc-form-errors li:last-child {
    margin-bottom: 0;
}

/* Styles pour les notifications */
.pwc-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #e8f5e9;
    border: 1px solid #66bb6a;
    border-radius: 4px;
    padding: 15px 25px;
    color: #2e7d32;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Style du formulaire d'ajout d'occasions */
.pwc-occasions-form {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.pwc-occasions-form form {
    background-color: #f9f9f9;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #444;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    background-color: #f9f9f9;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #bbb;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    outline: none;
}

.form-group select {
    height: 42px;
    background-image: linear-gradient(45deg, transparent 50%, #999 50%), linear-gradient(135deg, #999 50%, transparent 50%);
    background-position: calc(100% - 20px) calc(1em + 2px), calc(100% - 15px) calc(1em + 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.help-text {
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
    font-style: italic;
}

.form-actions {
    margin-top: 30px;
    text-align: right;
}

.pwc-submit-button {
    background-color: #d73333;  /* Rouge Harley-Davidson */
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.pwc-submit-button:hover {
    background-color: #b22222;
}

/* Message d'erreur */
.pwc-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.pwc-error a {
    color: #721c24;
    text-decoration: underline;
}

span.required {
    color: #e32;
    margin-left: 3px;
}

/* Responsive */
@media screen and (min-width: 768px) {
    .pwc-occasions-form form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-gap: 20px;
    }
    
    .form-group {
        margin-bottom: 25px;
    }
    
    .form-actions {
        margin-top: 40px;
        grid-column: span 2;
    }

    .moto-field,
    .form-group:has(textarea),
    .form-group:has([type="file"]) {
        grid-column: span 2;
    }
}

/* Style pour la prévisualisation de l'image */
#image-preview {
    max-width: 300px;
    margin-top: 10px;
    display: none;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.pwc-modal-occasion h2 {
    margin: 0 0 20px;
    color: #333;
    font-size: 24px;
}

.pwc-modal-image {
    margin-bottom: 20px;
    text-align: center;
}

.pwc-modal-image img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.pwc-modal-price {
    font-size: 24px;
    font-weight: bold;
    color: #d73333;
    margin-bottom: 15px;
}

.pwc-modal-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    gap: 10px;
}

.detail-item .label {
    color: #666;
}

.detail-item .value {
    font-weight: 500;
}

.pwc-modal-description {
    line-height: 1.6;
    color: #444;
    margin-bottom: 20px;
    white-space: pre-line;
}

.pwc-modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

/* Styles pour l'onglet Favoris dans le tableau de bord */
.woocommerce-MyAccount-navigation-link--occasions-favoris a::before {
    content: '♥';
    font-size: 1.2em;
    line-height: 1;
    margin-right: 0.5em;
}

.woocommerce-MyAccount-navigation-link--occasions-favoris.is-active a {
    color: #d73333;
}

/* Adapter la grille des favoris pour le tableau de bord */
.woocommerce-account .pwc-occasions-grid {
    margin-top: 20px;
}

.woocommerce-account .pwc-no-occasions {
    padding: 20px;
    background: #f8f8f8;
    border-radius: 4px;
    text-align: center;
    margin-top: 20px;
}

/* Bouton back to top */
.pwc-back-to-top {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #d73333;
    color: white;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 1020;
    opacity: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: opacity 0.3s;
}

.pwc-back-to-top.visible {
    display: flex;
    opacity: 1;
}

.pwc-back-to-top:hover {
    background: #b22222;
}