/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */

/* Tablettes */
@media (max-width: 1024px) {
    .container {
        padding: 15px;
    }
    
    .dashboard {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    body {
        padding: var(--spacing-sm);
    }
    
    /* Sélecteur de commune */
    .selector-header h1 {
        font-size: 2rem;
    }
    
    .commune-selector {
        padding: var(--spacing-md);
    }
    
    .commune-dropdown {
        font-size: 1rem;
        padding: 12px 15px;
    }
    
    /* Carte interactive */
    .map-container {
        height: 350px;
    }
    
    .show-map-button {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    /* En-tête */
    .dashboard-header h1 {
        font-size: 2rem;
    }
    
    .dashboard-header p {
        font-size: 1rem;
    }
    
    /* Dashboard */
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    /* Cartes */
    .card-value {
        font-size: 2.2rem;
    }
    
    .card {
        padding: 20px;
    }
    
    /* Catégories */
    .category-header {
        font-size: 1.2rem;
    }
    
    /* Section Maire */
    .maire-section {
        flex-direction: column;
        text-align: center;
        padding: var(--spacing-md);
    }
    
    .maire-icon {
        font-size: 3rem;
    }
    
    .maire-name {
        font-size: 1.6rem;
    }
    
    .maire-content h2 {
        justify-content: center;
    }
    
    /* Sources */
    .sources-section {
        padding: var(--spacing-md);
    }
    
    .sources-grid {
        grid-template-columns: 1fr;
    }
    
    .quality-text {
        padding: 15px;
    }
    
    .quality-text h3 {
        font-size: 1rem;
    }
}

/* Très petits écrans */
@media (max-width: 480px) {
    .selector-header h1 {
        font-size: 1.5rem;
    }
    
    .selector-header p {
        font-size: 0.9rem;
    }
    
    .dashboard-header h1 {
        font-size: 1.5rem;
    }
    
    /* Carte interactive */
    .map-container {
        height: 300px;
    }
    
    .map-toggle-label {
        font-size: 0.9rem;
    }
    
    .card-value {
        font-size: 1.8rem;
    }
    
    .card-icon {
        font-size: 2rem;
    }
    
    .maire-icon {
        font-size: 2.5rem;
    }
    
    .maire-name {
        font-size: 1.4rem;
    }
}

/* Mode paysage mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .dashboard {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Impression */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .commune-selector {
        display: none;
    }
    
    .show-map-button-container {
        display: none;
    }
    
    .map-container {
        display: none;
    }
    
    .card {
        break-inside: avoid;
    }
    
    .chart-container {
        break-inside: avoid;
    }
    
    footer a {
        color: var(--color-primary);
        text-decoration: underline;
    }
}

