@import url("assets/fonts/inter/inter.css");

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #fafafa;
    color: #333;
    line-height: 1.6;
}

/* Header styles */
.header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e1e5e9;
    z-index: 100;
    padding: 12px 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    flex-shrink: 0;
}

.nav {
    flex: 1;
    max-width: 600px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 48px 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 24px;
    font-size: 16px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.search-button:hover {
    background-color: #f8f9fa;
}

.user-actions {
    display: flex;
    gap: 12px;
}

.filter-btn {
    padding: 10px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.filter-btn:hover {
    background-color: #2980b9;
}

/* Main container and grid */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.grid-container {
    width: 100%;
}

.grid {
    column-count: 4;
    column-gap: 20px;
    width: 100%;
}

.grid-item {
    break-inside: avoid;
    margin-bottom: 20px;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.grid-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 3/4;
}

.card-content {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.4;
}

.card-date {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 8px;
}

.card-description {
    font-size: 15px;
    color: #555;
    margin-bottom: 12px;
    flex: 1;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: #ecf0f1;
    color: #2c3e50;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* Footer styles */
.footer {
    background: #2c3e50;
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

/* Responsive design */
@media (max-width: 1200px) {
    .grid {
        column-count: 3;
    }
}

@media (max-width: 992px) {
    .header-container {
        flex-wrap: wrap;
    }

    .nav {
        order: 3;
        max-width: 100%;
        margin-top: 12px;
    }

    .logo {
        order: 1;
    }

    .user-actions {
        order: 2;
        margin-left: auto;
    }

    .grid {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 15px;
    }

    .main-container {
        padding: 15px;
    }

    .grid {
        column-count: 2;
    }

    .logo {
        font-size: 20px;
    }

    .search-input {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .grid {
        column-count: 1;
    }

    .header-container {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .logo {
        text-align: center;
    }

    .nav {
        margin-top: 0;
    }

    .user-actions {
        margin-left: 0;
        justify-content: center;
    }

    .search-input {
        padding: 14px 48px 14px 16px;
    }
}

/* Touch targets optimization (44px minimum) */
.search-input,
.search-button,
.filter-btn {
    min-height: 44px;
    min-width: 44px;
}

.filter-btn {
    padding: 14px 20px;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {

    .grid-item,
    .search-input,
    .filter-btn {
        transition: none;
    }
}

/* Focus styles for keyboard navigation */
.search-input:focus,
.search-button:focus,
.filter-btn:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }

    .search-input {
        border: 2px solid #000;
    }
}

/* Legal notice and legal pages */
.legal-notice {
    background: #fff4e5;
    border: 1px solid #f3c98b;
    color: #5a3e1b;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 20px;
}

.legal-notice strong {
    font-weight: 600;
}

.legal-page {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.legal-page h1 {
    font-size: 24px;
    margin-bottom: 12px;
    color: #2c3e50;
}

.legal-page h2 {
    font-size: 18px;
    margin: 20px 0 8px;
    color: #2c3e50;
}

.legal-page p,
.legal-page li {
    color: #4a5568;
    font-size: 15px;
}

.legal-page ul {
    padding-left: 18px;
    margin: 8px 0 0;
}

.legal-header-links a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
}

.legal-header-links a:hover {
    text-decoration: underline;
}

/* ===========================================
   SYSTÈME D'ONGLETS
   =========================================== */

.tabs-container {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    padding: 8px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    background: transparent;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #7f8c8d;
    cursor: pointer;
    transition: all 0.25s ease;
}

.tab-btn:hover {
    background: #f8f9fa;
    color: #2c3e50;
}

.tab-btn.active {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.tab-btn i {
    font-size: 18px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================================
   ONGLET PODCASTS
   =========================================== */

.podcasts-header {
    text-align: center;
    margin-bottom: 24px;
    padding: 24px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 16px;
    color: #fff;
}

.podcasts-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.podcasts-description {
    color: #bdc3c7;
    font-size: 15px;
    margin-bottom: 16px;
}

.podcasts-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #ecf0f1;
}

.stat-item i {
    color: #f39c12;
}

.podcasts-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.podcast-filter-select {
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 14px;
    background: #fff;
    color: #2c3e50;
    cursor: pointer;
    min-width: 180px;
    transition: border-color 0.2s;
}

.podcast-filter-select:focus {
    outline: none;
    border-color: #3498db;
}

.podcasts-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.loading-podcasts {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.loading-podcasts i {
    font-size: 32px;
    color: #3498db;
    margin-bottom: 16px;
}

/* ===========================================
   CARTE PODCAST / VIDÉO
   =========================================== */

.podcast-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s, transform 0.2s;
}

.podcast-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.podcast-card-header {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-bottom: 1px solid #e1e5e9;
}

.podcast-thumbnail {
    width: 160px;
    height: 90px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.podcast-meta {
    flex: 1;
    min-width: 0;
}

.podcast-channel {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #e74c3c;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.podcast-title {
    font-size: 17px;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.podcast-title a {
    color: inherit;
    text-decoration: none;
}

.podcast-title a:hover {
    color: #3498db;
}

.podcast-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: #7f8c8d;
}

.podcast-info span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ===========================================
   LISTE DES CLAIMS
   =========================================== */

.claims-section {
    padding: 20px;
}

.claims-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e1e5e9;
}

.claims-title {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.claims-count {
    background: #f39c12;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

.claims-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.claim-item {
    padding: 16px;
    background: #fafafa;
    border-radius: 12px;
    border-left: 4px solid #e74c3c;
}

.claim-item.confidence-haute {
    border-left-color: #e74c3c;
}

.claim-item.confidence-moyenne {
    border-left-color: #f39c12;
}

.claim-item.confidence-faible {
    border-left-color: #27ae60;
}

.claim-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.claim-badge.haute {
    background: #fdecea;
    color: #c0392b;
}

.claim-badge.moyenne {
    background: #fef5e7;
    color: #d68910;
}

.claim-badge.faible {
    background: #e8f6f3;
    color: #1e8449;
}

.validation-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-left: 8px;
    margin-bottom: 10px;
}

.validation-confirme {
    background: #e8f6f3;
    color: #1e8449;
}

.validation-conteste {
    background: #fdecea;
    color: #c0392b;
}

.validation-incertain {
    background: #fef5e7;
    color: #d68910;
}

.claim-text {
    font-size: 15px;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.5;
    font-style: italic;
}

.claim-text::before {
    content: '"';
}

.claim-text::after {
    content: '"';
}

.claim-issue {
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
    line-height: 1.6;
    padding-left: 12px;
    border-left: 2px solid #e1e5e9;
}

.claim-context {
    font-size: 13px;
    color: #7f8c8d;
    background: #fff;
    padding: 10px 12px;
    border-radius: 8px;
    line-height: 1.5;
}

.claim-context strong {
    color: #2c3e50;
}

/* ===========================================
   RÉSUMÉ DE L'ANALYSE
   =========================================== */

.analysis-summary {
    padding: 16px 20px;
    background: #eef7ff;
    border-top: 1px solid #d4e6f7;
}

.summary-title {
    font-size: 13px;
    font-weight: 600;
    color: #2980b9;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.summary-text {
    font-size: 14px;
    color: #34495e;
    line-height: 1.6;
}

/* ===========================================
   NO DATA STATE
   =========================================== */

.no-data {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.no-data i {
    font-size: 48px;
    color: #bdc3c7;
    margin-bottom: 16px;
}

.no-data h3 {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 8px;
}

/* ===========================================
   RESPONSIVE PODCASTS
   =========================================== */

@media (max-width: 768px) {
    .tabs-container {
        flex-direction: column;
    }

    .tab-btn {
        justify-content: flex-start;
        padding: 12px 16px;
    }

    .podcast-card-header {
        flex-direction: column;
    }

    .podcast-thumbnail {
        width: 100%;
        height: 180px;
    }

    .podcasts-stats {
        flex-direction: column;
        gap: 12px;
    }

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

    .podcast-filter-select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .podcasts-header {
        padding: 16px;
    }

    .podcasts-header h2 {
        font-size: 20px;
    }

    .claim-item {
        padding: 12px;
    }
}

/* ===========================================
   VERIFICATION AI STYLES
   =========================================== */

.claim-actions {
    margin-top: 12px;
}

.verify-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.verify-btn:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}

.verify-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.verify-btn.verified {
    background-color: #27ae60;
    cursor: default;
}

.verification-result {
    margin-top: 15px;
    animation: fadeIn 0.4s ease;
}

.ai-verification-box {
    background-color: #f0f7ff;
    border: 1px solid #d0e3ff;
    border-radius: 8px;
    padding: 15px;
    position: relative;
    overflow: hidden;
}

.ai-verification-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #3498db;
}

.ai-verification-box h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #0c4b96;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-verification-box .content {
    font-size: 14px;
    line-height: 1.6;
    color: #2c3e50;
    text-align: justify;
}

.ai-verification-box .content a {
    color: #3498db;
    text-decoration: underline;
    font-weight: 500;
}

.ai-verification-box .content a:hover {
    color: #2980b9;
}

.ai-verification-box .content strong {
    font-weight: 700;
    color: #2c3e50;
}

.ai-verification-box .content li {
    margin-left: 20px;
}