/* =========================================================
   EVENTS PAGE
   ========================================================= */

.vignes-events-grid {
    width: min(1200px, 100%);
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(3, minmax(280px, 360px));
    justify-content: center;
    gap: 30px;
    box-sizing: border-box;
}

/* Event card */

.vignes-event-card {
    display: block;
    width: 100%;
    max-width: 360px;
    min-height: 380px;
    overflow: hidden;
    box-sizing: border-box;
    padding: 10px;
    background: #fffdf8;
    border: 1px solid #c9b79c;
    border-radius: 2px;
    box-shadow: 0 6px 16px rgba(70, 40, 20, 0.18);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.vignes-event-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(70, 40, 20, 0.25);
}

/* Event image */

.vignes-event-image {
    width: 100%;
    height: 190px;
    overflow: hidden;
    box-sizing: border-box;
    background: linear-gradient(135deg, #722f37, #d19a62);
    border: 1px solid rgba(114, 47, 55, 0.18);
}

.vignes-event-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) sepia(0.06);
}

/* Event content */

.vignes-event-content {
    display: block;
    padding: 20px 16px 14px !important;
    box-sizing: border-box;
}

.vignes-event-title {
    margin: 0 0 18px !important;
    color: #722f37 !important;
    font-family: Georgia, serif;
    font-size: 28px !important;
    line-height: 1.2;
    text-align: center;
}

.vignes-event-date {
    display: block !important;
    width: max-content !important;
    margin: 0 auto 18px !important;
    padding: 8px 14px;
    color: #ffffff !important;
    background: #722f37;
    border-radius: 20px;
    font-size: 14px !important;
    font-weight: bold;
    text-align: center;
}

.vignes-event-region {
    margin-bottom: 16px;
    color: #765d4d;
    font-size: 16px !important;
}

.vignes-event-organiser {
    margin-bottom: 8px;
    color: #765d4d;
    font-size: 14px !important;
    font-style: italic;
}

.vignes-event-description {
    margin-top: 20px;
    color: #403832;
    font-size: 16px !important;
    line-height: 1.6;
}

.vignes-event-button {
    display: block;
    width: max-content;
    margin: 24px auto 0;
    padding: 12px 22px;
    color: #ffffff !important;
    background: #c0392b;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none !important;
}

.vignes-event-button:hover {
    background: #922b21;
}

/* =========================================================
   MODIFIER AND SUPPRIMER BUTTONS
   ========================================================= */

/* Modifier link */

.vignes-edit-button,
.vignes-modify-button,
a[href*="edit"],
a[href*="modifier"] {
    display: inline-block !important;
    box-sizing: border-box !important;
    margin: 2px 4px !important;
    padding: 6px 14px !important;
    min-height: 28px !important;

    color: #722f37 !important;
    background: #ffffff !important;
    border: 1px solid #722f37 !important;
    border-radius: 4px !important;

    font-family: inherit !important;
    font-size: 12px !important;
    font-weight: bold !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    cursor: pointer !important;
}

/* Supprimer button, input or link */

.vignes-delete-button,
.vignes-remove-button,
button.delete,
button.supprimer,
button[name="delete"],
button[name="supprimer"],
button[value="delete"],
button[value="supprimer"],
input.delete,
input.supprimer,
input[name="delete"],
input[name="supprimer"],
input[value="Supprimer"],
input[value="SUPPRIMER"],
a[href*="delete"],
a[href*="supprimer"] {
    display: inline-block !important;
    box-sizing: border-box !important;
    margin: 2px 4px !important;
    padding: 6px 14px !important;
    min-height: 28px !important;

    color: #722f37 !important;
    background: #ffffff !important;
    border: 1px solid #722f37 !important;
    border-radius: 4px !important;

    font-family: inherit !important;
    font-size: 12px !important;
    font-weight: bold !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    appearance: none !important;
}

/* Same hover effect */

.vignes-edit-button:hover,
.vignes-modify-button:hover,
.vignes-delete-button:hover,
.vignes-remove-button:hover,
a[href*="edit"]:hover,
a[href*="modifier"]:hover,
button.delete:hover,
button.supprimer:hover,
button[name="delete"]:hover,
button[name="supprimer"]:hover,
button[value="delete"]:hover,
button[value="supprimer"]:hover,
input.delete:hover,
input.supprimer:hover,
input[name="delete"]:hover,
input[name="supprimer"]:hover,
input[value="Supprimer"]:hover,
input[value="SUPPRIMER"]:hover,
a[href*="delete"]:hover,
a[href*="supprimer"]:hover {
    color: #ffffff !important;
    background: #722f37 !important;
    border-color: #722f37 !important;
}

/* Empty events message */

.vignes-events-empty {
    max-width: 700px;
    margin: 40px auto;
    padding: 25px;
    background: #fff5e6;
    border-left: 5px solid #722f37;
}

/* Google Maps button */

.vignes-event-location {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.vignes-google-maps-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;
    margin-left: 4px;

    background: #2b6cb0;
    border-radius: 50%;

    color: #ffffff !important;
    font-size: 18px;
    line-height: 1;
    text-decoration: none !important;
}

.vignes-google-maps-button:hover,
.vignes-google-maps-button:focus {
    background: #1e4e80;
    transform: scale(1.05);
}

/* Create/modify event form */

.vignes-events-form {
    max-width: 700px;
}

.vignes-events-crud h2 {
    color: #722f37;
    font-family: Georgia, serif;
    margin-bottom: 20px;
}

.vignes-events-message {
    max-width: 700px;
    margin: 0 0 20px;
    padding: 14px 18px;
    background: #fff5e6;
    border-left: 5px solid #722f37;
    color: #4a2e1a;
    border-radius: 2px;
}

.vignes-events-form {
    background: #fffdf8;
    border: 1px solid #c9b79c;
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(70, 40, 20, 0.08);
    padding: 28px 24px;
}

.vignes-events-form p {
    margin: 0 0 20px;
}

.vignes-events-form label {
    display: block;
    font-weight: 600;
    color: #765d4d;
    font-size: 14px;
    margin-bottom: 6px;
}

.vignes-events-form input:not([type="hidden"]),
.vignes-events-form select,
.vignes-events-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 16px;
    color: #403832;
    background: #ffffff;
    border: 1px solid #c9b79c;
    border-radius: 4px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.vignes-events-form input:not([type="hidden"]):focus,
.vignes-events-form select:focus,
.vignes-events-form textarea:focus {
    outline: none;
    border-color: #722f37;
    box-shadow: 0 0 0 3px rgba(114, 47, 55, 0.12);
}

.vignes-events-form input[disabled] {
    background: #f1eee8;
    color: #765d4d;
    border-style: dashed;
}

.vignes-events-form input[type="file"] {
    padding: 8px;
    background: #fffdf8;
    cursor: pointer;
}

.vignes-events-form textarea {
    min-height: 180px;
    resize: vertical;
}

.vignes-events-form small {
    display: block;
    margin-top: 6px;
    color: #999;
    font-size: 12px;
}

.vignes-events-form button[type="submit"] {
    display: inline-block;
    background: #722f37;
    color: #ffffff !important;
    border: none;
    padding: 12px 28px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.vignes-events-form button[type="submit"]:hover {
    background: #4d2026;
}

.vignes-events-cancel {
    display: inline-block;
    margin-left: 12px;
    padding: 12px 28px;
    background: #ffffff;
    color: #722f37 !important;
    border: 1px solid #722f37;
    border-radius: 5px;
    font-weight: bold;
    font-size: 15px;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    vertical-align: middle;
}

.vignes-events-cancel:hover {
    background: #722f37;
    color: #ffffff !important;
}

/* Tablet */

@media (max-width: 950px) {
    .vignes-events-grid {
        grid-template-columns: repeat(2, minmax(280px, 360px));
    }
}

/* Mobile */

@media (max-width: 650px) {
    .vignes-events-grid {
        grid-template-columns: 1fr;
        padding: 0 12px;
    }

    .vignes-event-card {
        max-width: 360px;
        margin: 0 auto;
    }
}