/* ===== STYLES PAGE PROJET 2026-2032 ===== */

/* ===== HERO BANNER ===== */
/* Le hero utilise les styles de page-header.css (.hero-banner, .hero-content, .hero-logo, .slogan) */

/* Titre spécifique à la page projet */
.hero-content h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 700;
    color: white;
    margin: 0.5rem 0 0.25rem;
    text-shadow: 0 2px 15px rgba(0,0,0,0.3);
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--bleu-vizille) 0%, var(--bleu-clair) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1.25rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(26, 58, 92, 0.2);
}

.stat-card:nth-child(1) { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.stat-card:nth-child(2) { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.stat-card:nth-child(3) { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.stat-card:nth-child(4) { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.stat-card:nth-child(5) { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); }
.stat-card:nth-child(6) { background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%); color: #333; }
.stat-card:nth-child(7) { background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); color: #333; }
.stat-card:nth-child(8) { background: linear-gradient(135deg, #d299c2 0%, #fef9d7 100%); color: #333; }

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    color: inherit;
    line-height: 1.1;
}

.stat-label {
    font-size: 0.9rem;
    margin-top: 0.25rem;
    font-weight: 600;
    color: inherit;
    opacity: 0.9;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ===== CHARTS SECTION ===== */
.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.chart-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--gris-doux);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.chart-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.chart-card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--bleu-vizille);
    margin-bottom: 1rem;
    text-align: center;
}

.chart-container {
    position: relative;
    height: 280px;
}

/* ===== FILTERS SECTION ===== */
.filters-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--gris-doux);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--bleu-vizille);
}

.filter-group select,
.filter-group input {
    padding: 0.75rem 1rem;
    border: 1px solid var(--gris-doux);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    background: white;
    transition: all 0.2s ease;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--or);
    box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.15);
}

.filter-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-primary {
    background: var(--bleu-vizille);
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:hover {
    background: var(--bleu-clair);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--gris-doux);
    color: var(--gris-texte);
}

.btn-secondary:hover {
    background: #d8d6d1;
}

.results-count {
    font-size: 0.95rem;
    color: var(--gris-texte);
    padding: 0.75rem 0;
    font-weight: 500;
}

.results-count strong {
    color: var(--bleu-vizille);
}

/* ===== THEME FILTERS ===== */
.theme-filters {
    margin-bottom: 1rem;
}

.theme-filters-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--bleu-vizille);
    margin-bottom: 0.75rem;
}

.theme-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.5rem;
}

.theme-filter-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 0.5rem;
    background: var(--blanc-casse);
    border: 1px solid var(--gris-doux);
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    min-height: 44px;
}

.theme-filter-btn:hover {
    background: white;
    border-color: var(--or);
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}

.theme-filter-btn.active {
    background: var(--or);
    color: white;
    border-color: var(--or);
    box-shadow: 0 3px 10px rgba(201, 162, 39, 0.25);
}

.theme-filter-btn .icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.theme-filter-btn .label {
    font-size: 0.75rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Bouton retour aux thèmes */
.btn-back-themes {
    display: none;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1.8rem;
    background: var(--bleu-vizille);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(26, 58, 92, 0.25);
}

.btn-back-themes:hover {
    background: var(--bleu-clair);
    transform: translateY(-2px);
}

.btn-back-themes.visible {
    display: inline-flex;
}

.filters-divider {
    height: 1px;
    background: var(--gris-doux);
    margin: 1.5rem 0;
}

/* ===== VIEW TOGGLE ===== */
.view-toggle {
    display: flex;
    gap: 0.5rem;
    background: var(--gris-doux);
    padding: 0.25rem;
    border-radius: var(--radius-sm);
}

.view-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.view-btn.active {
    background: white;
    box-shadow: var(--shadow-sm);
}

/* ===== THEMES VIEW ===== */
.themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.theme-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    cursor: pointer;
}

.theme-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.theme-header {
    padding: 1.25rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.theme-icon {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.theme-info h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.theme-info .count {
    font-size: 0.85rem;
    opacity: 0.9;
}

.theme-stats {
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--blanc-casse);
}

.theme-budget {
    font-weight: 600;
    color: var(--bleu-vizille);
}

.theme-progress {
    display: flex;
    gap: 0.5rem;
}

.progress-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.progress-dot.prioritaire { background: var(--rouge-accent, #e74c3c); }
.progress-dot.court-terme { background: var(--orange-encours); }
.progress-dot.moyen-terme { background: var(--bleu-decide); }

/* Apercu projets dans cartes themes */
.theme-preview {
    padding: 0.75rem 1.25rem;
    background: white;
    border-top: 1px solid var(--gris-doux);
}

.preview-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.preview-list li {
    font-size: 0.85rem;
    color: var(--gris-texte);
    padding: 0.3rem 0;
    border-bottom: 1px dotted #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-list li:last-child {
    border-bottom: none;
}

.preview-list li::before {
    content: '→ ';
    color: var(--or);
    font-weight: bold;
}

.preview-list li.plus-count {
    color: var(--bleu-clair);
    font-style: italic;
    font-weight: 500;
}

.preview-list li.plus-count::before {
    content: '';
}

/* ===== ACTION CARDS ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.action-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
    cursor: pointer;
    border: 2px solid transparent;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--or);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-header {
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-theme {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    color: white;
}

.card-statut {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.statut-prioritaire { background: rgba(231, 76, 60, 0.15); color: var(--rouge-accent, #e74c3c); }
.statut-court-terme { background: rgba(243, 156, 18, 0.15); color: var(--orange-encours); }
.statut-moyen-terme { background: rgba(52, 152, 219, 0.15); color: var(--bleu-decide); }
.statut-long-terme { background: rgba(155, 89, 182, 0.15); color: var(--violet-programme); }

.card-body {
    padding: 0 1.25rem 1.25rem;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--bleu-vizille);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.card-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gris-doux);
}

.card-budget {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--or);
}

.card-year {
    font-size: 0.85rem;
    color: #888;
    font-weight: 500;
}

.card-detail-hint {
    font-size: 0.8rem;
    color: var(--or);
    margin-top: 0.75rem;
    font-weight: 500;
}

/* Badge themes multiples */
.multi-theme-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.theme-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    color: white;
    font-weight: 500;
}

.theme-badge.secondary {
    opacity: 0.8;
}

/* ===== TABLE VIEW ===== */
.table-container {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: var(--bleu-vizille);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.data-table th:hover {
    background: var(--bleu-clair);
}

.data-table th::after {
    content: ' ↕';
    opacity: 0.5;
    font-size: 0.8rem;
}

.data-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--gris-doux);
}

.data-table tbody tr {
    cursor: pointer;
    transition: background 0.2s;
}

.data-table tbody tr:hover td {
    background: rgba(201, 162, 39, 0.08);
}

.table-theme {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
}

.table-statut {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 58, 92, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: var(--radius-xl);
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.85);
    transform: scale(1.1);
}

.modal-header {
    padding: 2rem;
    color: white;
    position: relative;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.modal-title-block {
    flex: 1;
}

.modal-theme {
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    margin-top: 0.5rem;
    line-height: 1.3;
}

.modal-statut {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 1rem;
}

.modal-statut.statut-prioritaire { background: rgba(231, 76, 60, 0.2); color: white; }
.modal-statut.statut-court-terme { background: rgba(243, 156, 18, 0.2); color: white; }
.modal-statut.statut-moyen-terme { background: rgba(52, 152, 219, 0.2); color: white; }
.modal-statut.statut-long-terme { background: rgba(155, 89, 182, 0.2); color: white; }

.modal-body {
    padding: 2rem;
}

/* Infos cles */
.modal-infos-cles {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.info-cle {
    flex: 1;
    min-width: 140px;
    padding: 1rem;
    background: linear-gradient(135deg, var(--blanc-casse) 0%, #f5f5f5 100%);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--or);
    text-align: center;
}

.info-cle-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 0.25rem;
}

.info-cle-value {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--bleu-vizille);
}

.info-cle-value.budget {
    color: var(--vert-realise);
}

/* Description */
.description-resume {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--bleu-vizille);
    margin-bottom: 1rem;
    padding-left: 1rem;
    border-left: 3px solid var(--or);
}

.description-complete {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--gris-texte);
    white-space: pre-line;
}

.modal-section {
    margin-bottom: 2rem;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--bleu-vizille);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--or);
}

.modal-section p {
    color: var(--gris-texte);
    line-height: 1.7;
}

/* Vignette fiche objectif */
#section-image {
    text-align: center;
    margin-bottom: 1.5rem;
}

.fiche-thumbnail {
    position: relative;
    display: inline-block;
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 200px;
}

.fiche-thumbnail:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
}

.fiche-thumbnail img {
    display: block;
    width: 100%;
    height: auto;
}

.thumbnail-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 1rem 0.5rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.thumbnail-icon {
    font-size: 1.2rem;
}

.thumbnail-text {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Chiffres cles */
.chiffres-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.chiffre-item {
    text-align: center;
    padding: 1rem;
    background: var(--blanc-casse);
    border-radius: var(--radius-md);
}

.chiffre-value {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--or);
    margin-bottom: 0.25rem;
}

.chiffre-label {
    font-size: 0.85rem;
    color: #666;
}

/* Timeline */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.timeline-item {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--blanc-casse);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--or);
    box-shadow: var(--shadow-sm);
}

.timeline-date {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bleu-vizille);
}

.timeline-event {
    font-size: 0.9rem;
    color: var(--gris-texte);
}

/* Sources */
.sources-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.source-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #666;
    padding: 0.5rem 0.75rem;
    background: var(--blanc-casse);
    border-radius: var(--radius-sm);
}

.source-link {
    color: var(--bleu-vizille);
    text-decoration: none;
    transition: color 0.2s;
}

.source-link:hover {
    color: var(--or);
    text-decoration: underline;
}

.source-links {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.source-links .source-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--bleu-vizille);
    padding: 0.4rem 0.6rem;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
    border-radius: var(--radius-sm);
    border: 1px solid #d0e3f0;
    transition: all 0.2s ease;
}

.source-links .source-link:hover {
    background: linear-gradient(135deg, #e0f0ff 0%, #d8ecfb 100%);
    border-color: var(--bleu-vizille);
    transform: translateX(3px);
    text-decoration: none;
}

.source-links .external-icon {
    margin-left: auto;
    opacity: 0.5;
    font-size: 0.8rem;
}

.source-links .source-link:hover .external-icon {
    opacity: 1;
}

.source-icon {
    font-size: 1rem;
}

.modal-footer {
    padding: 1rem 2rem 2rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid var(--gris-doux);
}

.modal-footer .btn {
    flex: 1;
}

/* ===== FOOTER ===== */
.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--or-clair);
}

.footer p, .footer li {
    font-size: 0.9rem;
    opacity: 0.85;
    line-height: 1.7;
}

.footer ul {
    list-style: none;
}

.footer-bottom {
    max-width: 1400px;
    margin: 2rem auto 0;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.15);
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ===== LOADING / EMPTY STATE ===== */
.loading {
    text-align: center;
    padding: 3rem;
    font-size: 1.1rem;
    color: var(--bleu-vizille);
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--gris-doux);
    border-top-color: var(--or);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

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

.empty-state h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--bleu-vizille);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #666;
}

.hidden {
    display: none !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .logo {
        max-width: 150px;
    }

    /* Stats compacts */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .stat-card {
        padding: 0.75rem 0.5rem;
    }

    .stat-number {
        font-size: 1.3rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    /* Graphiques cachés par défaut */
    .charts-section {
        display: none;
    }

    .charts-section.show-mobile {
        display: grid;
        grid-template-columns: 1fr;
    }

    .chart-container {
        height: 200px;
    }

    /* Bouton toggle graphiques */
    .toggle-charts-btn {
        display: block;
        width: 100%;
        padding: 0.75rem;
        margin-bottom: 1rem;
        background: var(--blanc-casse);
        border: 2px dashed var(--gris-doux);
        border-radius: var(--radius-sm);
        font-weight: 600;
        color: var(--bleu-vizille);
        cursor: pointer;
    }

    /* Filtres thème en grille 3 colonnes */
    .theme-filters-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
    }

    .theme-filter-btn {
        padding: 0.4rem 0.25rem;
        min-height: 40px;
        flex-direction: column;
        gap: 0.15rem;
    }

    .theme-filter-btn .icon {
        font-size: 1rem;
    }

    .theme-filter-btn .label {
        font-size: 0.6rem;
    }

    /* Filtres standard */
    .filters-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .filters-section {
        padding: 1rem;
    }

    /* Thèmes en 2 colonnes */
    .themes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .theme-card {
        font-size: 0.85rem;
    }

    .theme-header {
        padding: 0.75rem;
    }

    .theme-icon {
        font-size: 1.5rem;
    }

    .theme-info h3 {
        font-size: 0.85rem;
    }

    .theme-info .count {
        font-size: 0.7rem;
    }

    .theme-stats {
        padding: 0.5rem 0.75rem;
        font-size: 0.7rem;
    }

    .theme-preview {
        padding: 0.5rem 0.75rem;
    }

    .preview-list li {
        font-size: 0.75rem;
    }

    /* Cartes projets compactes */
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .action-card {
        font-size: 0.9rem;
        border: 2px solid var(--gris-doux);
    }

    .card-header {
        padding: 0.75rem 1rem;
    }

    .card-body {
        padding: 0 1rem 1rem;
    }

    .card-title {
        font-size: 1rem;
    }

    .card-description {
        font-size: 0.85rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .card-detail-hint {
        opacity: 1;
        font-weight: 600;
    }

    /* Table */
    .data-table {
        font-size: 0.8rem;
    }

    .data-table th, .data-table td {
        padding: 0.5rem;
    }

    .data-table th:nth-child(5),
    .data-table td:nth-child(5) {
        display: none;
    }

    .site-nav-grid {
        flex-direction: column;
    }

    .site-nav-btn {
        justify-content: center;
    }

    /* Modal compact */
    .modal-header {
        padding: 1.5rem;
    }

    .modal-title {
        font-size: 1.3rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .modal-infos-cles {
        gap: 0.5rem;
    }

    .info-cle {
        min-width: 100px;
        padding: 0.75rem;
    }

    .info-cle-value {
        font-size: 1rem;
    }
}

/* Bouton toggle graphiques - caché sur desktop */
.toggle-charts-btn {
    display: none;
}

@media (min-width: 769px) and (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .logo {
        max-width: 160px;
    }

    .action-card {
        border: 2px solid var(--gris-doux);
    }

    .card-detail-hint {
        opacity: 1;
    }
}

/* ===== SECTION NAVIGATION EN BAS DE PAGE ===== */
.site-nav-section {
    background: var(--gris-doux, #f5f5f5);
    padding: 1.25rem 1rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(0,0,0,0.08);
    display: flex;
    justify-content: center;
    align-items: center;
}

.site-nav-section .site-nav-container {
    text-align: center;
}

.site-nav-section .site-nav-label {
    display: none;
}

.site-nav-section .site-nav-grid {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.site-nav-section .site-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: transparent;
    color: var(--gris-texte, #666);
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    border: none;
}

.site-nav-section .site-nav-btn:hover {
    background: rgba(0,0,0,0.05);
    color: var(--bleu-vizille, #1a3a5c);
}

.site-nav-section .site-nav-btn.active {
    background: var(--bleu-vizille, #1a3a5c);
    color: white;
}

.site-nav-section .site-nav-btn .icon {
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .site-nav-section {
        padding: 1rem 0.75rem;
    }

    .site-nav-section .site-nav-btn {
        padding: 0.35rem 0.6rem;
        font-size: 0.75rem;
    }
}
