/* ========================================
   PHARMACIES DE GARDE - Design UI/UX Premium
   Design moderne avec recherche et animations
   Couleurs: #1e293b et #11b300
   ======================================== */

.pg-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ========== HEADER ========== */
.pg-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(30, 41, 59, 0.2);
    position: relative;
    overflow: hidden;
}

.pg-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(17, 179, 0, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.pg-title {
    font-size: 36px;
    font-weight: 900;
    color: #ffffff;
    margin: 0 0 12px 0;
    position: relative;
    z-index: 1;
}

.pg-subtitle {
    font-size: 16px;
    color: #cbd5e1;
    margin: 0;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* ========== SEARCH BAR ========== */
.pg-search-section {
    background: #ffffff;
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(30, 41, 59, 0.08);
}

.pg-search-container {
    position: relative;
    margin-bottom: 20px;
}

.pg-search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    width: 22px;
    height: 22px;
    pointer-events: none;
    z-index: 2;
}

.pg-search-input {
    width: 100%;
    padding: 18px 60px 18px 56px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f8fafc;
    color: #1e293b;
}

.pg-search-input:focus {
    outline: none;
    border-color: #11b300;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(17, 179, 0, 0.1);
}

.pg-search-input::placeholder {
    color: #94a3b8;
}

.pg-clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #ef4444;
    border: none;
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: none;
    z-index: 2;
}

.pg-clear-btn:hover {
    background: #dc2626;
    transform: translateY(-50%) scale(1.1);
}

.pg-clear-btn svg {
    width: 20px;
    height: 20px;
    color: #ffffff;
}

/* ========== FILTERS ========== */
.pg-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.pg-filter {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px solid #e2e8f0;
    color: #475569;
    padding: 14px 24px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.pg-filter::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.pg-filter:hover::before {
    left: 100%;
}

.pg-filter:hover {
    border-color: #11b300;
    color: #11b300;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(17, 179, 0, 0.15);
}

.pg-filter.active {
    background: linear-gradient(135deg, #11b300 0%, #0ea300 100%);
    border-color: #11b300;
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(17, 179, 0, 0.3);
}

.pg-filter svg {
    width: 20px;
    height: 20px;
}

/* ========== GRID ========== */
.pg-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
    margin-bottom: 40px;
}

/* ========== CARD ========== */
.pg-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba(30, 41, 59, 0.06);
    border: 2px solid #f1f5f9;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.pg-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #11b300 0%, #0ea300 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pg-card:hover {
    border-color: #11b300;
    box-shadow: 0 12px 40px rgba(17, 179, 0, 0.15);
    transform: translateY(-6px);
}

.pg-card:hover::before {
    transform: scaleX(1);
}

/* Badge groupe */
.pg-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #11b300 0%, #0ea300 100%);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 18px;
    box-shadow: 0 4px 12px rgba(17, 179, 0, 0.25);
}

.pg-badge svg {
    width: 16px;
    height: 16px;
}

/* Nom pharmacie */
.pg-name {
    font-size: 19px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 18px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Infos */
.pg-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.pg-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    color: #475569;
    padding: 10px;
    background: #f8fafc;
    border-radius: 10px;
    transition: all 0.3s;
}

.pg-info-item:hover {
    background: #f0fdf4;
}

.pg-info-icon {
    width: 20px;
    height: 20px;
    color: #11b300;
    flex-shrink: 0;
    margin-top: 1px;
}

.pg-info-text {
    font-weight: 600;
    color: #334155;
}

/* Dates */
.pg-dates {
    padding-top: 20px;
    border-top: 2px solid #f1f5f9;
}

.pg-dates-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.pg-dates-header svg {
    width: 20px;
    height: 20px;
    color: #11b300;
}

.pg-dates-title {
    font-size: 14px;
    font-weight: 800;
    color: #11b300;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pg-dates-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pg-date {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #86efac;
    color: #166534;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s;
    cursor: default;
}

.pg-date:hover {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-color: #22c55e;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

/* Message vide */
.pg-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 100px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 20px;
}

.pg-empty-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    color: #cbd5e1;
}

.pg-empty-text {
    font-size: 20px;
    color: #64748b;
    font-weight: 700;
}

/* ========== FOOTER ========== */
.pg-footer {
    margin-top: 40px;
    text-align: center;
    padding: 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    font-size: 16px;
    color: #64748b;
    font-weight: 600;
    border: 2px solid #e2e8f0;
}

.pg-footer-count {
    color: #11b300;
    font-size: 32px;
    font-weight: 900;
    display: inline-block;
    margin: 0 8px;
}

/* ========== PAGINATION ========== */
.pg-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 35px;
    flex-wrap: wrap;
}

.pg-page {
    min-width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: #475569;
    background: #ffffff;
    border: 2px solid #e2e8f0;
}

.pg-page:hover {
    background: #11b300;
    color: #ffffff;
    border-color: #11b300;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(17, 179, 0, 0.25);
}

.pg-page.current {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #ffffff;
    border-color: #1e293b;
    box-shadow: 0 4px 16px rgba(30, 41, 59, 0.2);
}

.pg-page.disabled {
    background: #f8fafc;
    color: #cbd5e1;
    border-color: #f1f5f9;
    cursor: not-allowed;
}

/* ========== LOADER ========== */
.pg-loader {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.pg-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top-color: #11b300;
    border-radius: 50%;
    animation: pg-spin 0.8s linear infinite;
}

@keyframes pg-spin {
    to { transform: rotate(360deg); }
}

/* ========== RESPONSIVE ========== */

@media (max-width: 1200px) {
    .pg-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 22px;
    }
}

@media (max-width: 768px) {
    .pg-wrapper {
        padding: 24px 16px;
    }
    
    .pg-header {
        padding: 28px 24px;
        border-radius: 20px;
    }
    
    .pg-title {
        font-size: 28px;
    }
    
    .pg-subtitle {
        font-size: 14px;
    }
    
    .pg-search-section {
        padding: 20px;
    }
    
    .pg-search-input {
        padding: 16px 55px 16px 50px;
        font-size: 15px;
    }
    
    .pg-filters {
        gap: 8px;
    }
    
    .pg-filter {
        padding: 12px 20px;
        font-size: 14px;
    }
}

@media (max-width: 640px) {
    .pg-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    
    .pg-header {
        padding: 24px 20px;
    }
    
    .pg-title {
        font-size: 24px;
    }
    
    .pg-card {
        padding: 22px;
    }
    
    .pg-name {
        font-size: 17px;
    }
}

@media print {
    .pg-header,
    .pg-search-section,
    .pg-pagination,
    .pg-loader {
        display: none !important;
    }
    
    .pg-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .pg-card {
        page-break-inside: avoid;
    }
}