/* ===== STYLES PAGE FAQ / CONSTRUISONS ENSEMBLE ===== */

/* Conteneur principal */
.content {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* ===== COMPTEURS HERO ===== */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--or);
    font-family: var(--font-heading);
}

.hero-stat-label {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-top: 0.25rem;
}

/* ===== BARRE DE FILTRES ===== */
.filters-bar {
    background: white;
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex: 1;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.85rem;
    border: 2px solid var(--gris-doux);
    background: white;
    color: var(--gris-texte);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.filter-btn:hover {
    border-color: var(--bleu-clair);
    color: var(--bleu-vizille);
    background: #f0f4f8;
}

.filter-btn.active {
    background: var(--bleu-vizille);
    color: white;
    border-color: var(--bleu-vizille);
}

.filter-count {
    font-size: 0.75rem;
    opacity: 0.7;
}

.search-bar {
    position: relative;
    min-width: 200px;
}

.search-bar input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.2rem;
    border: 2px solid var(--gris-doux);
    border-radius: 20px;
    font-size: 0.9rem;
    transition: border-color var(--transition-fast);
    font-family: inherit;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--bleu-clair);
}

.search-bar::before {
    content: '🔍';
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
}

/* ===== GROUPES PAR CATÉGORIE ===== */
.category-group {
    margin-bottom: 2rem;
}

.category-group-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, var(--bleu-vizille) 0%, var(--bleu-clair) 100%);
    color: white;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
}

.category-group-header .cat-icon {
    font-size: 1.3rem;
}

.category-group-header .cat-count {
    margin-left: auto;
    font-size: 0.85rem;
    font-family: var(--font-primary);
    opacity: 0.85;
}

/* ===== QUESTIONS HEADER ===== */
.questions-header {
    background: linear-gradient(135deg, var(--bleu-vizille) 0%, var(--bleu-clair) 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin: 1.5rem 0 1rem;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.questions-header h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.questions-header p {
    margin: 0.25rem 0 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

/* ===== LISTE FAQ - ACCORDÉON ===== */
.faq-list {
    margin-top: 1rem;
}

.faq-item {
    background: white;
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow var(--transition-fast);
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
}

.faq-question {
    width: 100%;
    padding: 1rem 1.25rem;
    background: white;
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--bleu-vizille);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background var(--transition-fast);
    font-family: inherit;
}

.faq-question:hover {
    background: var(--blanc-casse);
}

.faq-question.active {
    background: var(--bleu-vizille);
    color: white;
}

.faq-question .question-content {
    flex: 1;
}

.faq-question .question-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.3rem;
    font-size: 0.8rem;
    font-weight: 400;
}

.faq-question .question-text {
    font-weight: 600;
}

.faq-icon {
    font-size: 1.5rem;
    transition: transform var(--transition-normal);
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.faq-question.active .faq-icon {
    transform: rotate(45deg);
}

/* Accordéon - animation */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}

.faq-answer.open {
    max-height: 2000px;
    opacity: 1;
    transition: max-height 0.5s ease, opacity 0.3s ease;
}

.faq-answer-content {
    padding: 1.25rem;
    background: var(--blanc-casse);
    border-top: 1px solid var(--gris-doux);
    line-height: 1.6;
}

/* ===== BADGES ===== */
.badge-origin {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-origin.site { background: #e3f2fd; color: #1565c0; }
.badge-origin.facebook { background: #e8eaf6; color: #1877f2; }
.badge-origin.whatsapp { background: #e8f5e9; color: #25d366; }
.badge-origin.permanence { background: #fff3e0; color: #e65100; }
.badge-origin.email { background: #fce4ec; color: #c62828; }
.badge-origin.porte-a-porte { background: #f3e5f5; color: #6a1b9a; }
.badge-origin.reunion { background: #e0f2f1; color: #00695c; }
.badge-origin.marche { background: #fff8e1; color: #f57f17; }
.badge-origin.terrain { background: #efebe9; color: #4e342e; }
.badge-origin.autre { background: #f5f5f5; color: #616161; }

.badge-author {
    font-size: 0.8rem;
    color: #666;
    font-weight: 400;
}

.badge-date {
    font-size: 0.75rem;
    color: #999;
    font-weight: 400;
}

.faq-category {
    display: inline-block;
    background: var(--or);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* ===== SECTION PAROLES DE VIZILLOIS ===== */
.paroles-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
}

.paroles-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.paroles-header h2 {
    font-family: var(--font-heading);
    color: var(--bleu-vizille);
    font-size: 1.4rem;
}

.paroles-header p {
    color: #888;
    font-size: 0.9rem;
}

.paroles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.parole-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e8f4fc 100%);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--bleu-clair);
    position: relative;
}

.parole-card::before {
    content: '❝';
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    font-size: 2rem;
    color: rgba(26, 58, 92, 0.1);
}

.parole-text {
    font-style: italic;
    color: #333;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.parole-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #888;
}

/* ===== FORMULAIRE ===== */
.ask-question-box {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
    border-left: 5px solid var(--or);
}

.ask-question-box h2 {
    font-family: var(--font-heading);
    color: var(--bleu-vizille);
    margin-bottom: 0.5rem;
}

.ask-question-box > p {
    color: #666;
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--bleu-vizille);
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gris-doux);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    transition: border-color var(--transition-fast);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--bleu-clair);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-weight: 500;
}

.btn-submit {
    background: var(--bleu-vizille);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    width: 100%;
    font-family: inherit;
}

.btn-submit:hover {
    background: var(--bleu-clair);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===== SECTION CONTACT ===== */
.contact-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--gris-doux);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.contact-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.contact-card h3 {
    font-family: var(--font-heading);
    color: var(--bleu-vizille);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.contact-card p {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.contact-card a {
    color: var(--bleu-clair);
    text-decoration: none;
}

.contact-card a:hover {
    color: var(--or);
}

/* ===== BOUTONS D'ENGAGEMENT ===== */
.special-requests {
    background: linear-gradient(135deg, var(--bleu-vizille) 0%, var(--bleu-clair) 100%);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-top: 1.5rem;
    text-align: center;
    color: white;
}

.special-requests h3 {
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.request-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.btn-request {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1.5rem;
    background: rgba(255,255,255,0.15);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: all var(--transition-fast);
    border: 2px solid rgba(255,255,255,0.3);
}

.btn-request:hover {
    background: white;
    color: var(--bleu-vizille);
    transform: translateY(-2px);
}

.btn-request.highlight {
    background: var(--or);
    border-color: var(--or);
}

.btn-request.highlight:hover {
    background: var(--or-clair);
    border-color: var(--or-clair);
    color: var(--bleu-vizille);
}

/* État vide */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #888;
}

.empty-state .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Chargement */
.loading {
    text-align: center;
    padding: 3rem;
    color: #888;
}

/* ===== MODE SOMBRE ===== */
[data-theme="dark"] .filters-bar,
[data-theme="dark"] .faq-item,
[data-theme="dark"] .contact-card,
[data-theme="dark"] .ask-question-box {
    background: var(--bg-card, #161b22);
    border-color: var(--border-color, #30363d);
}

[data-theme="dark"] .faq-question {
    background: var(--bg-card, #161b22);
    color: var(--text-primary, #f0f6fc);
}

[data-theme="dark"] .faq-question:hover {
    background: var(--gris-doux);
}

[data-theme="dark"] .faq-question.active {
    background: var(--bleu-vizille);
    color: white;
}

[data-theme="dark"] .faq-answer-content {
    background: var(--bg-body, #0d1117);
    border-color: var(--border-color, #30363d);
    color: var(--text-primary, #f0f6fc);
}

[data-theme="dark"] .filter-btn {
    background: var(--bg-card, #161b22);
    border-color: var(--border-color, #30363d);
    color: var(--text-secondary, #8b949e);
}

[data-theme="dark"] .filter-btn:hover {
    border-color: var(--bleu-clair);
    color: var(--text-primary, #f0f6fc);
}

[data-theme="dark"] .filter-btn.active {
    background: var(--bleu-vizille);
    color: white;
    border-color: var(--bleu-vizille);
}

[data-theme="dark"] .parole-card {
    background: linear-gradient(135deg, #161b22 0%, #1a2332 100%);
    border-color: var(--border-color, #30363d);
}

[data-theme="dark"] .parole-text {
    color: var(--text-primary, #f0f6fc);
}

[data-theme="dark"] .search-bar input {
    background: var(--bg-card, #161b22);
    border-color: var(--border-color, #30363d);
    color: var(--text-primary, #f0f6fc);
}

[data-theme="dark"] .ask-question-box h2,
[data-theme="dark"] .contact-card h3 {
    color: var(--or-clair, #f0d86a);
}

[data-theme="dark"] .form-group label {
    color: var(--text-primary, #f0f6fc);
}

[data-theme="dark"] .badge-author,
[data-theme="dark"] .parole-meta {
    color: var(--text-secondary, #8b949e);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .content {
        padding: 1rem;
    }

    .hero-stats {
        gap: 1rem;
    }

    .hero-stat-value {
        font-size: 1.5rem;
    }

    .faq-question {
        font-size: 0.95rem;
        padding: 0.85rem 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .request-buttons {
        flex-direction: column;
    }

    .filters-container {
        flex-direction: column;
    }

    .search-bar {
        width: 100%;
    }

    .paroles-grid {
        grid-template-columns: 1fr;
    }

    .ask-question-box {
        padding: 1.25rem;
    }
}
