/* Container principal */
.thiasos-thanks-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Widget Formulaire */
.thanks-form-widget {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(255, 154, 158, 0.3);
}

.widget-header h2 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
}

.widget-header p {
    margin: 0 0 30px 0;
    color: #34495e;
    text-align: center;
    font-size: 16px;
}

/* Sélection des destinataires */
.recipient-selection h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.recipient-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.recipient-btn {
    background: rgba(255, 255, 255, 0.4);
    border: 3px solid transparent;
    border-radius: 15px;
    padding: 20px 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.recipient-btn:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.recipient-btn.selected {
    background: rgba(255, 255, 255, 0.9);
    border-color: #e74c3c;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.3);
}

.recipient-btn .icon {
    font-size: 32px;
    line-height: 1;
}

.recipient-btn .label {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

/* Google Places Autocomplete */
.pac-container {
    z-index: 99999 !important;
    border-radius: 12px !important;
    margin-top: 5px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
    border: 1px solid #e0e0e0 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.pac-item {
    padding: 10px 15px !important;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
}

.pac-item:hover {
    background-color: #f8f9fa !important;
}

.pac-item-selected {
    background-color: #e74c3c !important;
    color: white !important;
}

.pac-matched {
    font-weight: 600;
}

.establishment-confirmed {
    display: inline-block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Établissement input focus */
#thanks-establishment:focus {
    outline: none;
    border-color: #e74c3c !important;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1) !important;
}

/* Section message */
.message-section {
    margin-bottom: 20px;
}

.message-section label {
    display: block;
    margin-bottom: 10px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 16px;
}

.message-section textarea {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.message-section textarea:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.3);
}

.char-counter {
    text-align: right;
    margin-top: 5px;
}

.char-counter small {
    color: #7f8c8d;
    font-size: 12px;
}

/* Options du formulaire */
.form-options {
    margin-bottom: 25px;
}

.anonymous-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #2c3e50;
    font-weight: 500;
}

.anonymous-option input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #bdc3c7;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.anonymous-option input[type="checkbox"]:checked + .checkmark {
    background: #e74c3c;
    border-color: #e74c3c;
}

.anonymous-option input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 12px;
}

/* Actions du formulaire */
.form-actions {
    text-align: center;
}

.btn-send-thanks {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.btn-send-thanks:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.5);
}

.btn-send-thanks:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    box-shadow: none;
}

/* Messages de réponse */
.response-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-weight: 500;
}

.response-message.success {
    background: rgba(46, 204, 113, 0.15);
    color: #27ae60;
    border: 2px solid #27ae60;
}

.response-message.error {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border: 2px solid #e74c3c;
}

/* Mur des remerciements */
.thanks-wall-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.wall-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #ecf0f1;
}

.wall-header h2 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 700;
}

.wall-header p {
    margin: 0 0 20px 0;
    color: #7f8c8d;
    font-size: 16px;
}

/* Filtres */
.wall-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.filter-btn {
    background: transparent;
    border: 2px solid #e74c3c;
    color: #e74c3c;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: #e74c3c;
    color: white;
}

/* Messages de remerciement */
.thanks-messages {
    margin: 30px 0;
}

.thanks-message-item {
    background: #f8f9fa;
    border-left: 5px solid #e74c3c;
    border-radius: 0 15px 15px 0;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.thanks-message-item:hover {
    background: #f1f2f6;
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.message-category {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e74c3c;
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
}

.message-content .message-text {
    font-size: 16px;
    line-height: 1.6;
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-style: italic;
}

.message-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #7f8c8d;
    margin-bottom: 15px;
}

.message-author {
    font-weight: 600;
}

/* Réactions */
.message-reactions {
    display: flex;
    gap: 10px;
}

.reaction-btn {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.reaction-btn:hover {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

.reaction-btn.active {
    background: #e74c3c;
    color: white;
}

/* Bouton charger plus */
.btn-load-more {
    display: block;
    margin: 30px auto;
    background: transparent;
    border: 2px solid #e74c3c;
    color: #e74c3c;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-load-more:hover {
    background: #e74c3c;
    color: white;
}

/* Statistiques */
.thanks-statistics {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #ecf0f1;
}

.thanks-statistics h3 {
    text-align: center;
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: rgba(231, 76, 60, 0.05);
    border-radius: 15px;
    border: 2px solid rgba(231, 76, 60, 0.1);
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #7f8c8d;
    font-weight: 500;
}

/* Loading spinner */
.loading-spinner {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #e74c3c;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .thiasos-thanks-container {
        padding: 15px;
    }
    
    .thanks-form-widget,
    .thanks-wall-section {
        padding: 20px;
    }
    
    .recipient-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 10px;
    }
    
    .recipient-btn {
        padding: 15px 10px;
    }
    
    .recipient-btn .icon {
        font-size: 24px;
    }
    
    .recipient-btn .label {
        font-size: 12px;
    }
    
    .wall-filters {
        flex-direction: column;
        align-items: center;
    }
    
    .message-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .message-reactions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}
