/**
 * AccesID Public Styles
 * 
 * @package AccesID
 * @since 1.0.0
 */

/* =============================================================================
   Variables CSS
   ============================================================================= */
:root {
    --accesid-primary: #6366f1;
    --accesid-primary-dark: #4f46e5;
    --accesid-secondary: #10b981;
    --accesid-danger: #ef4444;
    --accesid-warning: #f59e0b;
    --accesid-gray-50: #f9fafb;
    --accesid-gray-100: #f3f4f6;
    --accesid-gray-200: #e5e7eb;
    --accesid-gray-500: #6b7280;
    --accesid-gray-700: #374151;
    --accesid-gray-900: #111827;
    --accesid-radius: 8px;
    --accesid-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* =============================================================================
   Carte interactive
   ============================================================================= */
.accesid-map-container {
    position: relative;
    width: 100%;
}

.accesid-map {
    width: 100%;
    min-height: 400px;
    border-radius: var(--accesid-radius);
}

.accesid-map-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px;
    background: var(--accesid-gray-50);
    border-radius: var(--accesid-radius);
    margin-bottom: 15px;
}

.accesid-filter-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.accesid-map-search {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.accesid-map-search input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--accesid-gray-200);
    border-radius: var(--accesid-radius);
    font-size: 16px;
}

.accesid-locate-me {
    padding: 12px;
    background: var(--accesid-primary);
    color: white;
    border: none;
    border-radius: var(--accesid-radius);
    cursor: pointer;
}

.accesid-locate-me:hover {
    background: var(--accesid-primary-dark);
}

.accesid-map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 10px 0;
    font-size: 14px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-item .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-excellent .dot { background: #10b981; }
.legend-good .dot { background: #6366f1; }
.legend-moderate .dot { background: #f59e0b; }
.legend-limited .dot { background: #ef4444; }

/* =============================================================================
   Widget d'accessibilité
   ============================================================================= */
#accesid-accessibility-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
}

.accesid-widget-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accesid-primary);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: var(--accesid-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.accesid-widget-toggle:hover {
    transform: scale(1.1);
}

.accesid-widget-toggle .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
}

.accesid-widget-panel {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 300px;
    background: white;
    border-radius: var(--accesid-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 20px;
}

.accesid-widget-panel h3 {
    margin: 0 0 15px;
    color: var(--accesid-gray-900);
}

.accesid-widget-option {
    margin-bottom: 15px;
}

.accesid-widget-option label {
    display: block;
    margin-bottom: 5px;
    color: var(--accesid-gray-700);
}

.accesid-widget-option input[type="range"] {
    width: 100%;
}

.accesid-widget-option select {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--accesid-gray-200);
    border-radius: 4px;
}

.accesid-widget-reset {
    width: 100%;
    padding: 10px;
    background: var(--accesid-gray-100);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: var(--accesid-gray-700);
}

/* =============================================================================
   Pricing
   ============================================================================= */
.accesid-pricing {
    padding: 20px 0;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .pricing-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================================================
   Assistant IA
   ============================================================================= */
.accesid-assistant .message {
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: var(--accesid-radius);
    max-width: 80%;
}

.accesid-assistant .message.user {
    background: var(--accesid-primary);
    color: white;
    margin-left: auto;
}

.accesid-assistant .message.assistant {
    background: var(--accesid-gray-100);
    color: var(--accesid-gray-900);
}

/* =============================================================================
   Place Card
   ============================================================================= */
.accesid-place-card {
    background: white;
    border-radius: var(--accesid-radius);
    overflow: hidden;
    box-shadow: var(--accesid-shadow);
}

.accesid-place-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.accesid-place-card h3 {
    margin: 15px;
}

/* =============================================================================
   Reviews
   ============================================================================= */
.accesid-reviews .review {
    padding: 15px 0;
    border-bottom: 1px solid var(--accesid-gray-200);
}

.accesid-reviews .review:last-child {
    border-bottom: none;
}

/* =============================================================================
   Leaderboard
   ============================================================================= */
.accesid-leaderboard table {
    width: 100%;
    border-collapse: collapse;
}

.accesid-leaderboard th,
.accesid-leaderboard td {
    padding: 12px;
    text-align: left;
}

.accesid-leaderboard tr:nth-child(even) {
    background: var(--accesid-gray-50);
}

/* =============================================================================
   Utilitaires
   ============================================================================= */
.accesid-error {
    padding: 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--accesid-radius);
    color: #991b1b;
}

.accesid-success {
    padding: 20px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--accesid-radius);
    color: #166534;
}

/* =============================================================================
   Badge Display ([accesid_badge] shortcode — Meritag v4.24.30+ integration)
   ============================================================================= */
.accesid-badge-display {
    display: flex;
    gap: 24px;
    align-items: center;
    padding: 24px;
    border-radius: var(--accesid-radius, 8px);
    background: #fff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 20px auto;
}
.accesid-badge-small  { max-width: 320px; padding: 16px; gap: 16px; }
.accesid-badge-large  { max-width: 800px; padding: 32px; gap: 32px; }

.accesid-badge-visual {
    flex: 0 0 auto;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--accesid-radius, 8px);
    overflow: hidden;
}
.accesid-badge-small  .accesid-badge-visual { width: 80px;  height: 80px; }
.accesid-badge-large  .accesid-badge-visual { width: 200px; height: 200px; }
.accesid-badge-visual svg,
.accesid-badge-visual img { width: 100%; height: 100%; object-fit: contain; }

.accesid-badge-placeholder {
    color: #fff;
    font-size: 3rem;
}

.accesid-badge-info { flex: 1 1 auto; }

.accesid-badge-tier {
    margin: 0 0 8px 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.accesid-badge-score {
    font-size: 2rem;
    font-weight: 800;
    margin: 8px 0;
    color: var(--accesid-gray-900, #111827);
}

.accesid-badge-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 4px 0;
}
.accesid-status-self     { background: #ede9fe; color: #6d28d9; }
.accesid-status-pending  { background: #fef3c7; color: #b45309; }
.accesid-status-verified { background: #d1fae5; color: #065f46; }

.accesid-badge-qr {
    margin-top: 16px;
    text-align: center;
}
.accesid-badge-qr img { width: 120px; height: 120px; }
.accesid-short-url code {
    background: var(--accesid-gray-100, #f3f4f6);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.accesid-badge-verify-btn {
    display: inline-block;
    margin-top: 16px;
    padding: 10px 20px;
    background: var(--accesid-primary, #6366f1);
    color: #fff !important;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s;
}
.accesid-badge-verify-btn:hover { transform: translateY(-2px); }

.accesid-badge-empty {
    padding: 24px;
    text-align: center;
    color: var(--accesid-gray-500, #6b7280);
    background: var(--accesid-gray-50, #f9fafb);
    border-radius: var(--accesid-radius, 8px);
}

/* Mobile */
@media (max-width: 640px) {
    .accesid-badge-display { flex-direction: column; text-align: center; }
    .accesid-badge-info { text-align: center; }
}
