/* Patrimoine AI Writer - Styles Frontend */

/* ── FAQ ─────────────────────────────────────────────────────── */
.paiw-faq,
.paiw-faq-section {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 25px;
    margin: 30px 0;
    border-radius: 8px;
}
.paiw-faq h2,
.paiw-faq-section h2 {
    color: #3b82f6;
    margin: 0 0 20px 0;
    font-size: 1.4em;
}
.paiw-faq dt,
.paiw-faq-section dt {
    color: #333;
    font-size: 1.1em;
    font-weight: bold;
    margin: 0 0 10px 0;
    padding-top: 15px;
    border-top: 1px solid rgba(0,0,0,0.1);
}
.paiw-faq dt:first-child,
.paiw-faq-section dt:first-child {
    padding-top: 0;
    border-top: none;
}
.paiw-faq dd,
.paiw-faq-section dd {
    color: #555;
    margin: 0 0 15px 0;
    line-height: 1.6;
}
.paiw-faq dd:last-child,
.paiw-faq-section dd:last-child {
    margin-bottom: 0;
}

/* ── À retenir ───────────────────────────────────────────────── */
.paiw-key-takeaway {
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
    padding: 25px;
    margin: 30px 0;
    border-radius: 8px;
}
.paiw-key-takeaway h3 {
    color: #22c55e;
    margin: 0 0 15px 0;
    font-size: 1.4em;
}
.paiw-key-takeaway ul {
    margin: 0;
    padding-left: 20px;
}
.paiw-key-takeaway li {
    color: #333;
    margin-bottom: 10px;
    line-height: 1.6;
}

/* ── Chiffres clés ───────────────────────────────────────────── */
.paiw-key-figures {
    background: #fff7ed;
    border-left: 4px solid #f97316;
    padding: 25px;
    margin: 30px 0;
    border-radius: 8px;
}
.paiw-key-figures h3 {
    color: #f97316;
    margin: 0 0 15px 0;
    font-size: 1.4em;
}
.paiw-key-figures ul {
    margin: 0;
    padding-left: 20px;
}
.paiw-key-figures li {
    color: #333;
    margin-bottom: 10px;
    line-height: 1.6;
}
.paiw-key-figures strong {
    color: #c2410c;
}

/* ── Tableau de données ──────────────────────────────────────── */
.paiw-table-wrapper {
    overflow-x: auto;
    margin: 30px 0;
}
.paiw-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95em;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.paiw-data-table caption {
    font-weight: 600;
    color: #374151;
    padding: 10px 0;
    text-align: left;
    font-size: 1em;
}
.paiw-data-table thead tr {
    background: #1e3a5f;
    color: #fff;
}
.paiw-data-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9em;
    letter-spacing: 0.03em;
}
.paiw-data-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.15s;
}
.paiw-data-table tbody tr:nth-child(even) {
    background: #f8fafc;
}
.paiw-data-table tbody tr:hover {
    background: #eff6ff;
}
.paiw-data-table tbody td {
    padding: 11px 16px;
    color: #374151;
    line-height: 1.5;
}
.paiw-data-table tbody td strong {
    color: #1e3a5f;
}

/* ── Mentions légales ────────────────────────────────────────── */
.paiw-disclaimer {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 14px 18px;
    margin: 30px 0 0;
    font-size: 0.82em;
    color: #6b7280;
    line-height: 1.6;
    font-style: italic;
}

/* ── Réactions Twitter ───────────────────────────────────────── */
.paiw-reactions {
    background: #f0f8ff;
    border-left: 4px solid #1da1f2;
    padding: 20px 25px;
    margin: 30px 0;
    border-radius: 8px;
}
.paiw-reactions h2 {
    color: #1da1f2;
    margin: 0 0 16px 0;
    font-size: 1.3em;
}

/* ── IA FRANCE — Blocs spéciaux ─────────────────────────────── */

/* Bloc Prompt copiable */
.iafa-prompt {
    background: #0f172a;
    border-radius: 12px;
    margin: 28px 0;
    overflow: hidden;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
}
.iafa-prompt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #1e293b;
    border-bottom: 1px solid #334155;
}
.iafa-prompt-label {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: -apple-system, sans-serif;
}
.iafa-prompt-label::before {
    content: "✦ ";
    color: #6366f1;
}
.iafa-copy-btn {
    background: #6366f1;
    color: #fff;
    border: none;
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    font-family: -apple-system, sans-serif;
    transition: background 0.2s;
}
.iafa-copy-btn:hover { background: #4f46e5; }
.iafa-copy-btn.copied {
    background: #10b981;
}
.iafa-prompt-body {
    padding: 18px 20px;
    color: #e2e8f0;
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}
.iafa-prompt-body strong {
    color: #a5b4fc;
}
.iafa-prompt-body em {
    color: #fbbf24;
    font-style: normal;
}

/* Bloc Code avec coloration */
.iafa-code {
    background: #0f172a;
    border-radius: 12px;
    margin: 28px 0;
    overflow: hidden;
}
.iafa-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #1e293b;
    border-bottom: 1px solid #334155;
}
.iafa-code-lang {
    font-size: 12px;
    color: #64748b;
    font-family: -apple-system, sans-serif;
    font-weight: 600;
    text-transform: uppercase;
}
.iafa-code pre {
    margin: 0;
    padding: 18px 20px;
    color: #e2e8f0;
    font-size: 14px;
    line-height: 1.7;
    overflow-x: auto;
}
.iafa-code .keyword { color: #c084fc; }
.iafa-code .string  { color: #86efac; }
.iafa-code .comment { color: #475569; font-style: italic; }
.iafa-code .number  { color: #fbbf24; }

/* Comparaison Avant / Après */
.iafa-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 28px 0;
}
.iafa-compare-before,
.iafa-compare-after {
    border-radius: 10px;
    padding: 20px;
}
.iafa-compare-before {
    background: #fef2f2;
    border: 1px solid #fecaca;
}
.iafa-compare-after {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}
.iafa-compare-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}
.iafa-compare-before .iafa-compare-title {
    color: #ef4444;
}
.iafa-compare-before .iafa-compare-title::before {
    content: "✗ ";
}
.iafa-compare-after .iafa-compare-title {
    color: #22c55e;
}
.iafa-compare-after .iafa-compare-title::after {
    content: " ✓";
}
.iafa-compare-before p,
.iafa-compare-after p {
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    color: #374151;
}
@media (max-width: 600px) {
    .iafa-compare { grid-template-columns: 1fr; }
}

/* Bloc Citation Expert */
.iafa-quote {
    border-left: 4px solid #6366f1;
    background: #f5f3ff;
    padding: 20px 24px;
    margin: 28px 0;
    border-radius: 0 10px 10px 0;
}
.iafa-quote blockquote {
    margin: 0 0 10px 0;
    font-size: 1.05em;
    line-height: 1.7;
    color: #1e1b4b;
    font-style: italic;
}
.iafa-quote blockquote::before {
    content: "❝ ";
    color: #6366f1;
    font-size: 1.2em;
}
.iafa-quote-author {
    font-size: 13px;
    color: #6366f1;
    font-weight: 600;
}

/* Bloc Avertissement / Conseil / Info */
.iafa-alert {
    display: flex;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 10px;
    margin: 24px 0;
    align-items: flex-start;
}
.iafa-alert-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}
.iafa-alert-content {
    flex: 1;
    font-size: 14px;
    line-height: 1.7;
    color: inherit;
}
.iafa-alert-content strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
}
.iafa-alert.warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}
.iafa-alert.info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}
.iafa-alert.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}
.iafa-alert.danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* Verdict / Score IA */
.iafa-verdict {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    border-radius: 12px;
    padding: 24px;
    margin: 28px 0;
    text-align: center;
}
.iafa-verdict-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.8;
    margin-bottom: 8px;
}
.iafa-verdict-score {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
}
.iafa-verdict-text {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 16px;
}
.iafa-verdict-pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    text-align: left;
    margin-top: 16px;
}
.iafa-verdict-pros,
.iafa-verdict-cons {
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 14px;
    font-size: 13px;
}
.iafa-verdict-pros strong { color: #86efac; }
.iafa-verdict-cons strong { color: #fca5a5; }

/* Tableau comparatif outils IA */
.iafa-tool-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 14px;
}
.iafa-tool-table th {
    background: #6366f1;
    color: #fff;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
}
.iafa-tool-table td {
    padding: 11px 16px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}
.iafa-tool-table tr:nth-child(even) td {
    background: #f9fafb;
}
.iafa-tool-table .badge-free {
    background: #d1fae5;
    color: #065f46;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}
.iafa-tool-table .badge-paid {
    background: #fee2e2;
    color: #991b1b;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}
.iafa-tool-table .badge-freemium {
    background: #fef3c7;
    color: #92400e;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* Disclaimer */
.iafa-disclaimer {
    font-size: 12px;
    color: #9ca3af;
    border-top: 1px solid #e5e7eb;
    padding-top: 12px;
    margin-top: 32px;
    font-style: italic;
}
