/* === RESPONSIVE MOBILE (≤ 480px) === */
@media (max-width: 480px) {
    /* Container principal */
    .app-container {
        max-width: 100%;
        padding: 10px;
        min-height: 100vh;
    }
    
    /* Header */
    .app-header {
        padding: 15px;
        border-radius: 12px;
        margin-bottom: 20px;
    }
    
    .app-title {
        font-size: 1.8rem;
        margin-bottom: 5px;
    }
    
    .page-subtitle {
        font-size: 1.1rem;
        opacity: 0.9;
    }
    
    /* Cercle de progression */
    .progress-circle {
        width: 200px;
        height: 200px;
        margin-bottom: 25px;
    }
    
    .circle-content {
        width: 150px;
        height: 150px;
    }
    
    .consumed-amount {
        font-size: 1.8rem;
    }
    
    .remaining-amount {
        font-size: 0.8rem;
    }
    
    /* Boutons rapides */
    .quick-buttons {
        flex-direction: column;
        gap: 12px;
        padding: 0 10px;
    }
    
    .water-btn {
        width: 100%;
        padding: 16px;
        font-size: 1.1rem;
        border-radius: 12px;
    }
    
    /* Navigation */
    .bottom-nav {
        padding: 8px 5px;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--white);
        border-top: 2px solid var(--medium-gray);
        z-index: 100;
    }
    
    .nav-item {
        padding: 8px 5px;
        font-size: 0.8rem;
    }
    
    .nav-icon {
        font-size: 1.2rem;
        margin-bottom: 2px;
    }
    
    /* Paramètres */
    .settings-section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px 0;
    }
    
    .setting-select {
        width: 100%;
        min-width: auto;
    }
    
    /* Historique */
    .chart-bars {
        height: 150px;
        gap: 8px;
    }
    
    .chart-bar {
        min-width: 30px;
    }
    
    .chart-value {
        font-size: 0.7rem;
    }
    
    .chart-label {
        font-size: 0.7rem;
    }
    
    .stats-container {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }
    
    .stat-item {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
    }
    
    /* Tabs */
    .tabs {
        flex-direction: column;
        gap: 5px;
    }
    
    .tab {
        padding: 12px;
    }
    
    /* Confirmation d'ajout */
    .add-confirmation {
        right: 10px !important;
        padding: 10px 16px !important;
        font-size: 0.9rem;
    }
}

/* === TABLETTE (481px - 768px) === */
@media (min-width: 481px) and (max-width: 768px) {
    .app-container {
        max-width: 450px;
        margin: 0 auto;
    }
    
    .progress-circle {
        width: 220px;
        height: 220px;
    }
    
    .circle-content {
        width: 160px;
        height: 160px;
    }
    
    .quick-buttons {
        gap: 15px;
    }
    
    .water-btn {
        min-width: 100px;
    }
}

/* === DESKTOP (≥ 769px) === */
@media (min-width: 769px) {
    .app-container {
        max-width: 400px;
        margin: 20px auto;
        border-radius: 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        min-height: calc(100vh - 40px);
        background: var(--white);
    }
    
    /* Effet de profondeur sur desktop */
    .card, .settings-section, .history-list, .chart-container {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .card:hover, .settings-section:hover, .history-list:hover, .chart-container:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    }
    
    /* Boutons avec meilleur hover sur desktop */
    .water-btn {
        transition: all 0.3s ease;
    }
    
    .water-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    }
    
    /* Navigation plus élégante sur desktop */
    .bottom-nav {
        border-radius: 0 0 20px 20px;
        padding: 12px;
    }
    
    .nav-item {
        transition: color 0.3s ease;
        border-radius: 10px;
        padding: 8px 12px;
    }
    
    .nav-item:hover {
        background: var(--light-gray);
    }
    
    .nav-item.active:hover {
        background: rgba(52, 152, 219, 0.1);
    }
}

/* === TRÈS GRANDS ÉCRANS (≥ 1200px) === */
@media (min-width: 1200px) {
    .app-container {
        max-width: 450px;
        margin: 40px auto;
    }
    
    .progress-circle {
        width: 280px;
        height: 280px;
    }
    
    .circle-content {
        width: 200px;
        height: 200px;
    }
    
    .consumed-amount {
        font-size: 2.5rem;
    }
}

/* === ORIENTATION PAYSAGE SUR MOBILE === */
@media (max-height: 500px) and (orientation: landscape) {
    .app-container {
        padding: 5px;
    }
    
    .progress-circle {
        width: 150px;
        height: 150px;
        margin-bottom: 15px;
    }
    
    .circle-content {
        width: 120px;
        height: 120px;
    }
    
    .consumed-amount {
        font-size: 1.5rem;
    }
    
    .quick-buttons {
        flex-direction: row;
        gap: 10px;
    }
    
    .water-btn {
        padding: 12px;
        font-size: 0.9rem;
    }
    
    .bottom-nav {
        position: relative;
        margin-top: 10px;
    }
}


.main-content {
    padding-bottom: 80px; /* Espace pour la navigation fixe */
}

@media (min-width: 769px) {
    .main-content {
        padding-bottom: 20px; /* Réduit l'espace sur desktop */
    }
}

/* Amélioration de la lisibilité */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    h1, h2, h3 {
        line-height: 1.3;
    }
}

/* Support tactile amélioré */
@media (hover: none) and (pointer: coarse) {
    .water-btn, .tab, .nav-item {
        min-height: 44px; /* Taille minimum pour le touch */
    }
    
    .setting-item label {
        padding: 8px 0; /* Plus facile à toucher */
    }
}