/* ===================================================================
   events.css - Events index + show page styles
   Extracted from app/Views/events/index.php and events/show.php
   =================================================================== */

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

/* Hero */
.ev-hero {
    background: linear-gradient(135deg, #00635a 0%, #004d40 100%);
    color: #fff;
    padding: 56px 0 48px;
    text-align: center;
}
.ev-hero-inner { max-width: 700px; margin: 0 auto; padding: 0 20px; }
.ev-hero h1 {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 10px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.ev-hero p { font-size: 16px; opacity: 0.85; margin: 0; line-height: 1.5; }

/* Filters */
.ev-filters {
    max-width: 1200px;
    margin: -24px auto 0;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}
.ev-filter-bar {
    background: var(--bg-elevated);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.ev-filter-bar label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ev-filter-bar select {
    padding: 8px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg-elevated);
    cursor: pointer;
    color: #374151;
    font-family: inherit;
    min-width: 180px;
}
.ev-filter-bar select:focus { outline: none; border-color: #00635a; }
.ev-filter-reset {
    margin-left: auto;
    font-size: 13px;
    color: #00635a;
    text-decoration: none;
    font-weight: 600;
}
.ev-filter-reset:hover { text-decoration: underline; }

/* Grid */
.ev-container { max-width: 1200px; margin: 0 auto; padding: 32px 20px 60px; }
.ev-count {
    font-size: 15px;
    color: #6b7280;
    margin-bottom: 20px;
}
.ev-count strong { color: var(--text); }
.ev-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* Card */
.ev-card {
    background: var(--bg-elevated);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
}
.ev-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.ev-card-img {
    position: relative;
    height: 190px;
    background: linear-gradient(135deg, #e6f2f0, #d1d5db);
    overflow: hidden;
}
.ev-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.ev-card:hover .ev-card-img img { transform: scale(1.05); }
.ev-card-img .ev-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #00635a;
    opacity: 0.25;
}
.ev-date-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--bg-elevated);
    border-radius: 10px;
    padding: 6px 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    min-width: 52px;
}
.ev-date-badge .ev-day {
    font-size: 20px;
    font-weight: 800;
    color: #00635a;
    line-height: 1;
}
.ev-date-badge .ev-month {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    margin-top: 2px;
}
.ev-type-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 4px;
}
.ev-status-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}
.ev-status-complet { background: #ef4444; }
.ev-status-annule { background: #6b7280; }

.ev-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.ev-card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ev-card-resto {
    font-size: 13px;
    color: #00635a;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.ev-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 12px;
}
.ev-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}
.ev-card-meta i { font-size: 12px; color: #00635a; }
.ev-card-desc {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.ev-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}
.ev-card-price {
    font-size: 18px;
    font-weight: 800;
    color: #00635a;
}
.ev-card-price.free {
    font-size: 14px;
    font-weight: 700;
    color: #10b981;
    background: #ecfdf5;
    padding: 4px 12px;
    border-radius: 20px;
}
.ev-card-participants {
    font-size: 12px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 4px;
}
.ev-card-participants .ev-spots-low { color: #ef4444; font-weight: 600; }
.ev-btn-register {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #00635a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}
.ev-btn-register:hover { background: #004d40; }
.ev-btn-register.full {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    pointer-events: none;
}

/* Empty */
.ev-empty {
    text-align: center;
    padding: 80px 20px;
    color: #9ca3af;
}
.ev-empty i {
    font-size: 56px;
    margin-bottom: 16px;
    display: block;
    opacity: 0.3;
}
.ev-empty h3 {
    font-size: 20px;
    color: #6b7280;
    margin-bottom: 8px;
}
.ev-empty p { font-size: 14px; }

@media (max-width: 640px) {
    .ev-hero h1 { font-size: 24px; }
    .ev-grid { grid-template-columns: 1fr; }
    .ev-filter-bar { flex-direction: column; align-items: stretch; }
    .ev-filter-bar select { min-width: 100%; }
    .ev-filter-reset { margin-left: 0; text-align: center; }
}

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

/* Hero */
.evs-hero {
    position: relative;
    min-height: 340px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}
.evs-hero-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.4);
}
.evs-hero-gradient {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(0,99,90,0.85) 0%, rgba(0,77,64,0.9) 100%);
}
.evs-hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px 36px;
    width: 100%;
}
.evs-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    transition: color 0.2s;
}
.evs-back:hover { color: #fff; }
.evs-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}
.evs-hero h1 {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 10px;
    line-height: 1.2;
}
.evs-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 15px;
    color: rgba(255,255,255,0.9);
}
.evs-hero-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}
.evs-hero-meta i { font-size: 14px; }
.evs-hero-meta a { color: #fff; text-decoration: underline; font-weight: 600; }
.evs-hero-meta a:hover { opacity: 0.85; }

/* Body */
.evs-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 20px 60px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
}

/* Left column */
.evs-section {
    background: var(--bg-elevated);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
    margin-bottom: 20px;
}
.evs-section h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.evs-section h2 i { color: #00635a; font-size: 16px; }
.evs-desc {
    font-size: 15px;
    color: #4b5563;
    line-height: 1.7;
    white-space: pre-line;
}
.evs-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.evs-detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: #f3f4f6;
    border-radius: 10px;
}
.evs-detail-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #e6f2f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00635a;
    font-size: 16px;
    flex-shrink: 0;
}
.evs-detail-label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 2px;
}
.evs-detail-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

/* Restaurant card */
.evs-resto-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: #f3f4f6;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}
.evs-resto-card:hover { background: #e6f2f0; }
.evs-resto-avatar {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #00635a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    flex-shrink: 0;
}
.evs-resto-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}
.evs-resto-loc {
    font-size: 13px;
    color: #6b7280;
    margin-top: 2px;
}

/* Right column - sidebar */
.evs-action-card {
    background: var(--bg-elevated);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
    position: sticky;
    top: 90px;
}
.evs-price-display {
    text-align: center;
    margin-bottom: 20px;
}
.evs-price-tag {
    font-size: 32px;
    font-weight: 800;
    color: #00635a;
}
.evs-price-tag.free {
    font-size: 24px;
    color: #10b981;
}
.evs-price-unit {
    font-size: 14px;
    color: #6b7280;
    font-weight: 400;
}
.evs-spots-info {
    text-align: center;
    margin-bottom: 20px;
}
.evs-spots-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}
.evs-spots-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}
.evs-spots-text {
    font-size: 13px;
    color: #6b7280;
}
.evs-spots-text strong { color: var(--text); }
.evs-spots-low strong { color: #ef4444; }

.evs-btn-register {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.evs-btn-register.primary {
    background: #00635a;
    color: #fff;
}
.evs-btn-register.primary:hover { background: #004d40; }
.evs-btn-register.registered {
    background: #ecfdf5;
    color: #10b981;
    border: 2px solid #10b981;
}
.evs-btn-register.full {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}
.evs-btn-register:disabled { cursor: not-allowed; opacity: 0.6; }

.evs-register-msg {
    text-align: center;
    margin-top: 12px;
    font-size: 13px;
    padding: 10px;
    border-radius: 8px;
    display: none;
}
.evs-register-msg.success { display: block; background: #ecfdf5; color: #059669; }
.evs-register-msg.error { display: block; background: #fef2f2; color: #dc2626; }

.evs-sidebar-info {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
}

@media (max-width: 768px) {
    .evs-container {
        grid-template-columns: 1fr;
    }
    .evs-hero h1 { font-size: 24px; }
    .evs-details-grid { grid-template-columns: 1fr; }
    .evs-action-card { position: static; }
}
