
/* --- FORMULAIRE CARTE --- */
.simulateur-entry {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  max-width: 400px;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.simulateur-entry form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.simulateur-entry input,
.simulateur-entry select {
  padding: 12px 14px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: white;
}
.simulateur-entry button {
  background: linear-gradient(to right, #f59e0b, #f97316);
  color: white;
  font-weight: bold;
  border: none;
  padding: 14px;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.simulateur-entry button:hover {
  background: linear-gradient(to right, #f97316, #ea580c);
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* --- POPUP UX --- */
.simulateur-popup-overlay {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.simulateur-popup {
  background: white;
  width: 90%;
  max-width: 900px;
  border-radius: 12px;
  display: flex;
  flex-direction: row;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  padding: 30px;
  gap: 30px;
  position: relative;
}
.simulateur-col { flex: 1; }
.simulateur-col h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: #014a7f;
}
.simulateur-col p {
  margin: 6px 0;
  font-size: 1rem;
}
.resultat-box {
  background: #014a7f;
  color: white;
  padding: 14px;
  font-size: 1.1rem;
  font-weight: bold;
  text-align: center;
  border-radius: 6px;
  margin-top: 20px;
}
#btn-pdf {
  display: inline-block;
  margin-top: 20px;
  background: linear-gradient(to right, #f59e0b, #f97316);
  color: white;
  font-weight: bold;
  padding: 12px 18px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}
#btn-pdf:hover {
  background: linear-gradient(to right, #f97316, #ea580c);
}
.simulateur-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  color: #666;
  cursor: pointer;
}

/* --- IMPORT FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@200;300;400;500;600;700;800&display=swap');

/* --- CONTAINER PRINCIPAL --- */
.simulateur-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fafbfc;
}

/* --- HEADER --- */
.simulateur-header {
    text-align: center;
    margin-bottom: 30px;
}

.simulateur-subtitle {
    color: #8b9ba8;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
    font-weight: 300;
}

.simulateur-title {
    color: #2d3748;
    font-size: 2rem;
    font-weight: 300;
    margin: 0;
}

/* --- DISCLAIMER --- */
.simulateur-disclaimer {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 20px;
    padding: 15px;
    margin-bottom: 30px;
    font-size: 0.875rem;
    color: #856404;
    font-weight: 300;
}

.simulateur-disclaimer strong {
    font-weight: 500;
}

/* --- FORMULAIRE --- */
.simulateur-form {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 400;
    font-size: 0.9rem;
}

.form-group input[type="number"],
.form-group input[type="email"],
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    font-size: 1rem;
    font-family: 'Manrope', sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input[type="number"]:focus,
.form-group input[type="email"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #d9217f;
    box-shadow: 0 0 0 3px rgba(217, 33, 127, 0.1);
}

.form-group input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox-group label {
    margin-bottom: 0;
    cursor: pointer;
    font-weight: 300;
}

/* --- BOUTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 20px;
    font-family: 'Manrope', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    justify-content: center;
}

.btn-small {
    padding: 10px 20px;
    font-size: 0.85rem;
}

.btn-primary {
    background: #d9217f;
    color: white;
}

.btn-primary:hover {
    background: #c01a6b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(217, 33, 127, 0.3);
}

.btn-secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* --- RÉSULTAT --- */
.simulateur-result {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    animation: slideIn 0.5s ease-out;
}

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

.result-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f7fafc;
}

.result-header h3 {
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 300;
    margin: 0 0 15px 0;
}

.result-total {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.result-total .amount {
    font-size: 2.5rem;
    font-weight: 600;
    color: #d9217f;
}

.result-total .period {
    font-size: 1rem;
    color: #718096;
    font-weight: 300;
}

/* --- DÉTAIL DU CALCUL --- */
.result-details-box {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
}

.result-details-box h4 {
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0 0 15px 0;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.9rem;
    color: #4a5568;
}

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

.detail-amount {
    font-weight: 500;
    color: #2d3748;
}

/* --- INFOBOX TARIFAIRE --- */
.result-info-box {
    background: #e8f4fd;
    border: 1px solid #bee3f8;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
}

.result-info-box h4 {
    color: #2c5282;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0 0 15px 0;
}

.info-item {
    padding: 6px 0;
    font-size: 0.9rem;
    color: #2d3748;
    font-weight: 300;
}

.info-item span {
    display: block;
}

/* --- ACTIONS --- */
.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- MESSAGES --- */
.simulateur-message {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.simulateur-message-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.simulateur-message-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.message-content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 400;
}

.message-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- SPINNER --- */
.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .simulateur-container {
        padding: 15px;
    }
    
    .simulateur-form,
    .simulateur-result {
        padding: 20px;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .result-total .amount {
        font-size: 2rem;
    }
}
