/**
 * Calculator Page Styles
 * Specific styles for the chloration calculator
 */

/* Cacher les scrollbars sur toute la page */
body {
    /* Cacher les scrollbars */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE et Edge */
    overflow: hidden; /* Empêcher le scroll */
}

/* Cacher les scrollbars Chrome, Safari, Opera */
body::-webkit-scrollbar {
    display: none;
}

.calculator-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    max-height: 100vh;
    padding: 20px;
    background: transparent;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.calculator {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 123, 255, 0.2);
    padding: 20px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    max-width: 450px;
    width: 100%;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    max-height: 90vh;
}

.calculator::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 123, 255, 0.1) 0%, transparent 70%);
    z-index: -1;
    animation: rotate 15s linear infinite;
}

.calculator h1 {
    background: linear-gradient(135deg, #007BFF, #0056b3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 12px;
    border-radius: 10px;
    margin-top: 0;
    font-size: 1.8em;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
    position: relative;
}

.input-section {
    margin-bottom: 30px;
}

.input-group {
    margin: 30px 0;
    text-align: left;
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
    font-size: 1.1em;
}

.label-icon {
    margin-right: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 1.0em;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05);
    position: relative;
    padding-right: 70px; /* Espace pour l'unité */
}

.input-group input:focus {
    border-color: #007BFF;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2), inset 0 2px 5px rgba(0, 0, 0, 0.05);
    outline: none;
}

.unit {
    position: absolute;
    right: 15px;
    color: #666;
    font-weight: 600;
    font-size: 1.1em;
}

.result {
    margin-top: 30px;
    font-size: 1.6em;
    font-weight: 700;
    color: #dc3545;
    padding: 20px;
    border-radius: 15px;
    background: rgba(220, 53, 69, 0.1);
    border: 2px dashed rgba(220, 53, 69, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
}

.result.valid {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
    border: 2px dashed rgba(40, 167, 69, 0.3);
}

.result-content {
    text-align: center;
}

.result-value {
    font-size: 2.2em;
    font-weight: 700;
    margin-bottom: 10px;
}

.result-label {
    font-size: 1.2em;
    font-weight: 500;
    color: #666;
}

.result-placeholder {
    color: #666;
    font-size: 1.2em;
    font-weight: 500;
}

/* Responsive design */
@media (max-width: 768px) {
    .calculator {
        padding: 35px 25px;
        margin: 15px;
        border-radius: 15px;
    }
    
    .calculator h1 {
        font-size: 1.9em;
    }
    
    .result {
        font-size: 1.5em;
        padding: 20px;
    }
    
    .input-group input {
        padding: 14px;
        font-size: 1.1em;
    }
    
    .unit {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .calculator {
        padding: 30px 20px;
    }
    
    .calculator h1 {
        font-size: 1.6em;
    }
    
    .result {
        font-size: 1.3em;
    }
    
    .input-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .input-group input {
        padding-right: 16px;
        margin-bottom: 5px;
    }
    
    .unit {
        position: relative;
        right: auto;
        text-align: right;
        padding: 5px 0;
    }
}