/* css/components.css */

/* --- BOUTONS --- */
.btn-primary, .btn-secondary, .btn-contact {
    display: inline-block;
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 700;
    transition: all var(--transition-speed);
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--white);
    box-shadow: 0 0 20px rgba(0, 180, 216, 0.4); 
}

.btn-primary:hover { 
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(0, 180, 216, 0.7); 
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--white);
    color: var(--white);
    margin-left: 15px;
}

.btn-secondary:hover { 
    background-color: var(--white); 
    color: var(--dark-color); 
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.btn-contact {
    padding: 10px 30px;
    border: 2px solid var(--primary-color); 
    color: var(--primary-color) !important;
    background: transparent;
    box-shadow: 0 0 10px rgba(0, 180, 216, 0.1);
}

.nav-links .btn-contact:hover { 
    background: var(--primary-color);
    color: var(--dark-color) !important;
    box-shadow: 0 0 20px rgba(0, 180, 216, 0.6);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

/* --- TITRES DE SECTION --- */
.section-title {
    font-size: 2.8rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 15px;
    letter-spacing: -1px;
    background: var(--text-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--white); 
}

.section-subtitle {
    font-size: 1.3rem;
    margin-bottom: 60px;
    color: #cbd5e1;
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
}

/* --- CARTE SERVICES --- */
.card {
    flex: 1;
    min-width: 320px;
    max-width: 520px;
    background: var(--white); 
    color: var(--text-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
}

.card::after {
    content: '';
    height: 6px;
    width: 100%;
    background: var(--primary-gradient);
    position: absolute;
    top: 0; left: 0;
}

.card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 0 40px rgba(0, 180, 216, 0.3);
}

.card-header {
    padding: 40px 30px 20px;
    background: #fff;
    text-align: center;
    position: relative;
}

.card-number {
    font-size: 4rem;
    font-weight: 900;
    color: #f1f5f9;
    line-height: 1;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 0;
}

.card-header h3 { 
    color: var(--dark-color); 
    font-size: 1.6rem;
    font-weight: 800;
    position: relative;
    z-index: 1;
    margin-top: 10px;
}

.card-body { 
    padding: 10px 40px 50px 40px; 
    flex-grow: 1;
}

.card-intro {
    font-size: 1.05rem;
    color: var(--primary-dark);
    margin-bottom: 30px;
    font-weight: 500;
    text-align: center;
}

.card-body ul { padding-left: 0; }

.card-body li {
    list-style-type: none;
    margin-bottom: 18px; 
    color: #475569;
    font-size: 1rem;
    display: flex;
    align-items: flex-start; 
    line-height: 1.6;
}

.card-body li::before {
    content: "✓";
    color: var(--white);
    background: var(--primary-color);
    font-weight: bold;
    margin-right: 15px;
    margin-top: 4px; 
    flex-shrink: 0; 
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    box-shadow: 0 2px 5px rgba(0, 180, 216, 0.3);
}

/* --- CONTACT BOX --- */
.contact-box {
    margin-top: 40px;
    background: #fff;
    color: var(--text-color);
    padding: 70px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: inline-block;
    width: 100%;
    max-width: 900px;
    border: none;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.contact-box:hover {
    transform: scale(1.01);
    box-shadow: 0 0 50px rgba(0, 180, 216, 0.3);
}

.contact-box p { color: #475569; }

/* --- SIMULATOR & FORMS --- */
.simulator-container {
    margin-top: 80px;
    background: #fff;
    color: var(--text-color);
    padding: 60px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    border: none;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.simulator-container:hover {
    transform: scale(1.01);
    box-shadow: 0 0 50px rgba(0, 180, 216, 0.3);
}

.simulator-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.tab-btn {
    background: #f1f5f9;
    color: #64748b;
    border: none;
    padding: 15px 35px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    transition: all var(--transition-speed);
}

.tab-btn:hover {
    background: #e2e8f0;
    color: var(--dark-color);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 10px 20px rgba(0, 180, 216, 0.3);
}

.tab-content { display: none; animation: fadeIn 0.4s ease; }
.tab-content.active { display: block; }
.tab-intro { text-align: center; color: #64748b; margin-bottom: 40px; font-size: 1.1rem; }

.simulator-form {
    display: flex;
    justify-content: center;
    gap: 30px;
    align-items: flex-start; /* Changé de flex-end à flex-start pour aligner avec les messages d'erreur */
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.input-group {
    display: flex;
    flex-direction: column;
    min-width: 250px;
}

.input-group label {
    font-size: 0.95rem;
    color: #334155;
    margin-bottom: 10px;
    font-weight: 700;
}

.input-group input {
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1.1rem;
    transition: all var(--transition-speed);
    background: #f8fafc;
    color: var(--dark-color);
    font-weight: 600;
}

.input-group input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 180, 216, 0.1);
    background: #fff;
}

/* NOUVEAU: Message d'erreur discret */
.error-text {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 8px;
    font-weight: 500;
    min-height: 20px; /* Réserve l'espace pour éviter les sauts */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.error-text.visible { opacity: 1; }

.simulation-result {
    /* MODIF: Toujours visible mais avec gestion d'opacité */
    display: flex; 
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    animation: fadeIn 0.5s ease;
}

.result-box {
    flex: 1;
    min-width: 300px;
    background: #f8fafc;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    transition: opacity 0.3s ease;
}

/* NOUVEAU: État d'attente (quand le montant est 0) */
.result-box.waiting {
    opacity: 0.6;
    background: #f1f5f9;
}

.result-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px;
    background: var(--primary-gradient);
}

.highlight-box {
    background: #f0f9ff;
    border-color: #bae6fd;
}

.result-box h4 {
    margin-bottom: 20px;
    color: var(--dark-color);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.result-price {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.result-details { font-size: 1rem; color: #64748b; display: block; } /* Toujours block pour éviter les sauts */

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