/* Calculateur de Volume - Aridem */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.calculator-container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Header */
.calculator-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 28px;
    margin-bottom: 5px;
}

.logo p {
    font-size: 14px;
    opacity: 0.9;
}

.calculator-header nav a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    padding: 8px 16px;
    border: 2px solid white;
    border-radius: 8px;
    transition: all 0.3s;
}

.calculator-header nav a:hover {
    background: white;
    color: #667eea;
}

/* Title */
.calculator-title {
    padding: 30px;
    text-align: center;
    background: #f8f9fa;
    border-bottom: 3px solid #e9ecef;
}

.calculator-title h2 {
    font-size: 32px;
    color: #2d3748;
    margin-bottom: 10px;
}

.calculator-title p {
    font-size: 16px;
    color: #718096;
}

/* Category Tabs */
.category-tabs {
    display: flex;
    overflow-x: auto;
    background: #ffffff;
    border-bottom: 2px solid #e9ecef;
    padding: 10px 20px;
    gap: 10px;
}

.category-tabs::-webkit-scrollbar {
    height: 5px;
}

.category-tabs::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 5px;
}

.tab-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    font-size: 14px;
    color: #4a5568;
}

.tab-btn:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.tab-icon {
    font-size: 24px;
}

/* Search Box */
.search-box {
    padding: 20px 30px;
    background: #f8f9fa;
}

#searchInput {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s;
}

#searchInput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Items Container */
.items-container {
    padding: 20px 30px;
    max-height: 500px;
    overflow-y: auto;
}

.items-container::-webkit-scrollbar {
    width: 8px;
}

.items-container::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.item-row:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.item-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.item-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 10px;
}

.item-name {
    font-size: 16px;
    font-weight: 500;
    color: #2d3748;
}

.item-volume {
    font-size: 14px;
    color: #718096;
    margin-left: 10px;
}

.item-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.control-btn {
    width: 36px;
    height: 36px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: #667eea;
    color: white;
    transform: scale(1.1);
}

.control-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.item-count {
    font-size: 18px;
    font-weight: bold;
    color: #2d3748;
    min-width: 30px;
    text-align: center;
}

/* Footer */
.calculator-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: #f8f9fa;
    border-top: 3px solid #e9ecef;
    position: sticky;
    bottom: 0;
}

.volume-display {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.volume-info {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.volume-number {
    font-size: 48px;
    font-weight: bold;
    color: #2d3748;
}

.volume-unit {
    font-size: 24px;
    color: #718096;
}

.save-btn {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
    border: none;
    padding: 18px 35px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(245, 101, 101, 0.4);
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 101, 101, 0.5);
}

.save-btn:active {
    transform: translateY(0);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #a0aec0;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state p {
    font-size: 18px;
}

/* Responsive */
@media (max-width: 768px) {
    .calculator-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .category-tabs {
        padding: 10px;
    }

    .tab-btn {
        padding: 10px 15px;
        font-size: 12px;
    }

    .tab-icon {
        font-size: 20px;
    }

    .calculator-footer {
        flex-direction: column;
        gap: 20px;
    }

    .volume-number {
        font-size: 36px;
    }

    .save-btn {
        width: 100%;
    }

    .item-row {
        padding: 12px 15px;
    }

    .item-name {
        font-size: 14px;
    }
}

/* Success Message */
.success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #48bb78;
    color: white;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(72, 187, 120, 0.4);
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
