html, body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    width: 100%;
    overflow-x: hidden;
}

/* Palette principale :
   Vert nature : #43A047 (primary), #388E3C (dark), #66BB6A (light), #E8F5E9 (background)
   Gris doux : #f5f5f5, #e0e0e0
   Texte : #222, #fff
*/

body {
    background: linear-gradient(135deg, #E8F5E9 0%, #A5D6A7 100%);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    background-attachment: fixed;
}

.calculator-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
}

.calculator-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(67, 160, 71, 0.10);
    overflow: hidden;
    border: none;
}

.progress-bar {
    height: 10px;
    background: #e0e0e0;
    border-radius: 10px;
    margin: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #43A047, #66BB6A);
    border-radius: 10px;
    width: 60%;
    transition: width 0.3s ease;
}

.header {
    padding: 20px;
    text-align: center;
    background: linear-gradient(135deg, #43A047 0%, #66BB6A 100%);
    color: #fff;
}

.header h1 {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0;
}

.form-section {
    padding: 0 20px 20px;
}

.question-label {
    font-size: 1.2rem;
    font-weight: bold;
    color: #388E3C;
    margin-bottom: 16px;
    text-align: center;
}

.search-container {
    position: relative;
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    background: #f5f5f5;
    transition: all 0.3s;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #43A047;
    box-shadow: 0 0 0 2px #A5D6A7;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-item {
    padding: 13px 18px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s, color 0.2s;
}

.search-item:hover,
.search-item.active {
    background: #43A047;
    color: #fff;
}

.search-item:last-child {
    border-bottom: none;
}

.station-name {
    font-weight: bold;
    font-size: 1.05rem;
}

.station-details {
    font-size: 0.92rem;
    opacity: 0.8;
    margin-top: 2px;
}

.no-results {
    padding: 18px;
    text-align: center;
    color: #888;
    font-style: italic;
}

.selected-station {
    background: linear-gradient(135deg, #43A047, #66BB6A);
    color: #fff;
    padding: 8px 14px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.95rem;
    display: inline-block;
    margin: 10px 0;
    word-break: break-word;
    max-width: 100%;
}

.input-group {
    display: flex;
    margin-bottom: 18px;
}

.input-group .form-control {
    border-radius: 12px 0 0 12px;
    border-right: none;
    flex: 1;
}

.input-group-text {
    background: #43A047;
    color: #fff;
    border: 2px solid #43A047;
    border-left: none;
    border-radius: 0 12px 12px 0;
    padding: 14px 18px;
    font-weight: bold;
    white-space: nowrap;
}

.btn-check {
    background: linear-gradient(135deg, #43A047, #66BB6A);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 16px 36px;
    font-size: 1.1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    margin: 18px 0;
    box-shadow: 0 4px 12px rgba(67, 160, 71, 0.15);
    min-height: 52px;
}

.btn-check:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(67, 160, 71, 0.18);
}

.result-section {
    padding: 18px;
    text-align: center;
}

.result-title {
    font-size: 1.2rem;
    color: #388E3C;
    font-weight: bold;
    margin-bottom: 10px;
}

.result-cards {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}

.result-card {
    background: #E8F5E9;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(67, 160, 71, 0.07);
    padding: 18px 24px;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.result-icon {
    font-size: 2.2rem;
    color: #43A047;
    margin-bottom: 6px;
}

.result-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: #222;
}

.result-label {
    font-size: 0.95rem;
    color: #388E3C;
    margin-top: 2px;
}

.alert {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    border-radius: 10px;
    padding: 14px 18px;
    margin: 18px 0;
    font-size: 1rem;
    text-align: left;
}

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

.hidden {
    display: none !important;
}

/* Section des résultats */
.result-section {
    max-width: 500px;
    margin: 20px auto;
    padding: 0 20px;
}

.result-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(67, 160, 71, 0.10);
    padding: 30px;
    border: 2px solid #66BB6A;
    animation: fadeInUp 0.5s ease-out;
}

.result-card h3 {
    color: #43A047;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    text-align: center;
    border-bottom: 2px solid #E8F5E9;
    padding-bottom: 15px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #E8F5E9;
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.result-value {
    font-weight: 700;
    color: #43A047;
    font-size: 1.1rem;
    background: #E8F5E9;
    padding: 8px 15px;
    border-radius: 15px;
    border: 1px solid #A5D6A7;
}

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

@media (max-width: 600px) {
    .result-section {
        padding: 0 15px;
    }
    
    .result-card {
        padding: 20px;
    }
    
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .result-value {
        align-self: stretch;
        text-align: center;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .calculator-container {
        max-width: 100%;
        padding: 10px;
        margin-top: 20px;
        margin-bottom: 20px;
    }
    .calculator-card {
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(67, 160, 71, 0.10);
    }
    .form-section {
        padding: 0 8px 14px;
    }
    .result-cards {
        gap: 10px;
    }
}
@media (max-width: 480px) {
    .calculator-container {
        padding: 4px;
        margin-top: 32px;
        margin-bottom: 20px;
    }
    .header h1 {
        font-size: 1.1rem;
    }
    .form-section {
        padding: 0 2px 10px;
    }
    .btn-check {
        font-size: 1rem;
        min-height: 40px;
    }
    .result-card {
        padding: 10px 8px;
        min-width: 90px;
    }
}

/* Styles pour la section résumé */
.summary-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.summary-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #495057;
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 10px;
}

.summary-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.summary-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.9rem;
}

.summary-value {
    font-weight: bold;
    color: #007bff;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .summary-content {
        grid-template-columns: 1fr;
    }
    
    .summary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Indicateur de chargement */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

#loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-container {
    text-align: center;
    color: white;
    max-width: 400px;
    padding: 20px;
}

.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}

.spinner-ring:nth-child(1) {
    animation-delay: 0s;
}

.spinner-ring:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 10px;
    left: 10px;
    animation-delay: 0.2s;
    border-top-color: #ffd700;
}

.spinner-ring:nth-child(3) {
    width: 40px;
    height: 40px;
    top: 20px;
    left: 20px;
    animation-delay: 0.4s;
    border-top-color: #00ff88;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text h3 {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.loading-text p {
    margin: 0 0 20px 0;
    font-size: 16px;
    opacity: 0.9;
}

.loading-progress {
    margin-top: 20px;
}

.loading-progress .progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    overflow: hidden;
}

.loading-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #ffd700);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
    animation: progress-pulse 2s ease-in-out infinite;
}

@keyframes progress-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.btn-details-station {
    background: linear-gradient(135deg, #43A047 0%, #66BB6A 100%);
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(67, 160, 71, 0.13);
    width: auto;
    min-width: 220px;
    max-width: 100%;
    margin: 0 auto;
}
.btn-details-station:hover {
    background: linear-gradient(135deg, #388E3C 0%, #43A047 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(67, 160, 71, 0.18);
}

.recharge-summary {
    background: #f4fdf8;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.summary-card {
    background: #ffffff;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    border: 1px solid #ddd;
    margin-bottom: 1rem;
}

.summary-card h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.summary-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.summary-card li {
    margin-bottom: 0.5rem;
}

.summary-card span {
    color: #0077cc;
}

.results-grid {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    text-align: center;
}

.result-box {
    background: #ffffff;
    padding: 1rem;
    flex: 1;
    border: 2px solid #c8facc;
    border-radius: 12px;
    font-weight: bold;
}

.big-number {
    font-size: 2rem;
    color: #222;
    margin: 0.5rem 0;
}

.label {
    font-size: 0.95rem;
    color: #555;
}

