/* --- ALIGNEMENT CONTENEUR GLOBALE --- */
.container {
    width: 100%;
    max-width: 1150px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 10;
}

/* --- UTILITAIRES & EFFETS iOS --- */
.glass-ios {
    background-color: var(--glass-bg);
    backdrop-filter: blur(32px) saturate(180%);
    -webkit-backdrop-filter: blur(32px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-ios);
}

.reveal { opacity: 0; transform: translateY(30px); transition: all 1s cubic-bezier(0.25, 1, 0.5, 1); }
.reveal.active { opacity: 1; transform: translate(0, 0); }
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }

.hidden { display: none !important; }
.text-danger { color: #ef4444; font-weight: 700; font-size: 0.8125rem; }
.text-primary { color: var(--cpw-primary); }

.grecaptcha-badge { visibility: hidden !important; opacity: 0 !important; display: none !important; }

/* --- HERO DEVIS --- */
.devis-hero { position: relative; padding-top: 10rem; padding-bottom: 5rem; overflow: hidden; text-align: center; }
@media (min-width: 1024px) { .devis-hero { padding-top: 13rem; padding-bottom: 6rem; } }
.devis-hero-glow { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 600px; height: 600px; background: radial-gradient(circle, rgba(0, 123, 255, 0.08) 0%, rgba(0, 123, 255, 0) 70%); filter: blur(80px); z-index: 0; pointer-events: none; }

.hero-badge { display: inline-flex; align-items: center; gap: 0.625rem; padding: 0.5rem 1.25rem; border-radius: 9999px; margin-bottom: 2rem; background-color: var(--glass-bg); border: 1px solid var(--glass-border); }
.badge-dot-wrapper { position: relative; display: flex; width: 0.5rem; height: 0.5rem; }
.badge-dot { width: 100%; height: 100%; border-radius: 50%; background-color: var(--cpw-primary); }
.badge-text { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: var(--cpw-text); letter-spacing: 0.1em; }

.hero-title { font-size: 2.25rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 1.5rem; color: var(--cpw-text); }
.text-gradient { background: linear-gradient(135deg, var(--cpw-primary), #60a5fa); -webkit-background-clip: text; color: transparent; display: inline-block; }
@media (min-width: 768px) { .hero-title { font-size: 3rem; } }
@media (min-width: 1024px) { .hero-title { font-size: 4rem; } }
.hero-subtitle { font-size: 1.125rem; color: var(--cpw-text); opacity: 0.8; line-height: 1.7; max-width: 48rem; margin: 0 auto 3rem auto; font-weight: 500; }

/* --- PROCESS CARDS --- */
.process-cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; max-width: 900px; margin: 3rem auto 0; }
.process-card { padding: 1.5rem; border-radius: 1.5rem; display: flex; align-items: center; gap: 1.25rem; transition: transform 0.4s ease; }
.process-card:hover { transform: translateY(-5px); background-color: var(--glass-highlight); }
.process-card-icon { width: 3rem; height: 3rem; border-radius: 50%; background-color: rgba(0, 123, 255, 0.1); color: var(--cpw-primary); font-weight: 800; font-size: 1.125rem; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(0, 123, 255, 0.2); }
.process-card-text { text-align: left; }
.process-card-text h4 { font-weight: 800; font-size: 1rem; color: var(--cpw-text); margin-bottom: 0.25rem; }
.process-card-text p { font-size: 0.8125rem; color: var(--cpw-text); opacity: 0.7; margin: 0; }

/* --- FORM BOX & PROGRESS --- */
.devis-form-section { padding-bottom: 8rem; }
.form-box { padding: 2.5rem; border-radius: 2.5rem; position: relative; }
.anti-spam-hp { position: absolute; z-index: -1; opacity: 0; pointer-events: none; height: 0; }

/* Correction stricte de la barre de progression pour éviter tout débordement */
.progress-bar-wrapper { position: relative; display: flex; justify-content: space-between; align-items: center; margin-bottom: 4rem; padding: 0 1rem; }
.progress-bar-track { position: absolute; top: 1.25rem; left: 2.25rem; right: 2.25rem; height: 2px; background-color: var(--border-light); z-index: 0; }
.progress-bar-fill { position: absolute; top: 1.25rem; left: 2.25rem; height: 2px; background: var(--cpw-primary); z-index: 1; transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1); max-width: calc(100% - 4.5rem); }
.progress-step { position: relative; z-index: 10; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.step-circle { width: 2.5rem; height: 2.5rem; border-radius: 50%; color: var(--cpw-text); font-weight: 800; display: flex; align-items: center; justify-content: center; transition: all 0.5s ease; border: 1px solid var(--glass-border); background: var(--glass-bg); }
.step-label { font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--cpw-text); opacity: 0.5; transition: opacity 0.5s ease; }
.progress-step.is-active .step-circle, .progress-step.is-completed .step-circle { background-color: var(--cpw-primary); color: white; border-color: var(--cpw-primary); box-shadow: 0 0 15px rgba(0, 123, 255, 0.3); }
.progress-step.is-active .step-label { opacity: 1; color: var(--cpw-primary); }

/* --- ÉLÉMENTS MASQUÉS (RADIO/CHECK) --- */
.hidden-input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.step-title { font-size: 1.75rem; font-weight: 800; text-align: center; margin-bottom: 3.5rem; color: var(--cpw-text); letter-spacing: -0.02em; }
.form-step { display: none; animation: fadeIn 0.5s ease forwards; }
.form-step.step-active { display: block; }

/* --- CARDS ETAPE 1 (Restauration des couleurs d'origine) --- */
.service-cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.service-card-label { cursor: pointer; display: block; }
.service-card-inner { padding: 2rem 1.5rem; border-radius: 2rem; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.service-card-inner:hover { transform: translateY(-4px); background-color: var(--glass-highlight); }
.hidden-input:checked + .service-card-inner { border-color: var(--cpw-primary); background: rgba(0, 123, 255, 0.05); box-shadow: inset 0 0 0 1px var(--cpw-primary); }

.service-card-icon { width: 3.5rem; height: 3.5rem; border-radius: 1rem; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 1.25rem; transition: transform 0.3s ease; }
.service-card-inner:hover .service-card-icon { transform: scale(1.1); }
/* RESTAURATION COULEURS ICÔNES */
.icon-blue { background-color: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.icon-purple { background-color: rgba(168, 85, 247, 0.1); color: #a855f7; }
.icon-orange { background-color: rgba(249, 115, 22, 0.1); color: #f97316; }
.icon-green { background-color: rgba(34, 197, 94, 0.1); color: #22c55e; }

.service-card-inner h4 { font-weight: 800; font-size: 1.125rem; color: var(--cpw-text); margin-bottom: 0.25rem; }
.service-card-inner p { font-size: 0.8125rem; color: var(--cpw-text); opacity: 0.7; margin: 0; }
.check-indicator { position: absolute; top: 1.25rem; right: 1.25rem; color: var(--cpw-primary); font-size: 1.5rem; opacity: 0; transform: scale(0.5); transition: all 0.3s ease; }
.hidden-input:checked + .service-card-inner .check-indicator { opacity: 1; transform: scale(1); }
.error-msg-box { text-align: center; margin-bottom: 1.5rem; min-height: 1.5rem; }

/* --- OPTIONS DYNAMIQUES ETAPE 2 --- */
.dynamic-options-wrapper { min-height: 150px; margin-bottom: 3rem; }
.options-label { display: block; font-size: 0.875rem; font-weight: 800; text-transform: uppercase; color: var(--cpw-muted); text-align: center; margin-bottom: 1.5rem; letter-spacing: 0.05em; }
.options-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.option-pill-label { cursor: pointer; }
.option-pill { display: inline-block; padding: 0.875rem 1.75rem; border-radius: 9999px; font-size: 0.9375rem; font-weight: 700; color: var(--cpw-text); transition: all 0.3s ease; user-select: none; }
.option-pill:hover { transform: translateY(-2px); background-color: var(--glass-highlight); }
.hidden-input:checked + .option-pill { background-color: var(--cpw-primary); color: white; border-color: var(--cpw-primary); box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3); }

.info-alert { padding: 1.5rem; border-radius: 1.5rem; display: flex; align-items: center; gap: 1rem; max-width: 32rem; margin: 0 auto; }
.info-blue { background-color: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.2); color: #1e3a8a; }
[data-theme="dark"] .info-blue { color: #bfdbfe; }
.info-alert p { font-size: 0.875rem; font-weight: 500; margin: 0; line-height: 1.5; }

/* Affichage Prix : Correction texte qui déborde */
.price-display-box { padding: 2.5rem 1.5rem; border-radius: 2rem; text-align: center; margin-bottom: 3rem; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.price-label { display: block; font-size: 0.8125rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--cpw-muted); margin-bottom: 0.5rem; }
.price-amount { 
    font-size: clamp(1.5rem, 5vw, 2.5rem); /* Taille dynamique pour ne pas déborder */
    font-weight: 900; 
    color: var(--cpw-primary); 
    letter-spacing: -0.02em; 
    line-height: 1.2;
    word-break: break-word; /* Sécurité anti-débordement */
}

/* --- FORMULAIRE FINAL ETAPE 3 --- */
.form-layout { display: flex; flex-direction: column; gap: 1.75rem; }
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 1.75rem; }
@media (min-width: 768px) { .form-row { grid-template-columns: repeat(2, 1fr); } }
.form-label { font-size: 0.875rem; font-weight: 800; color: var(--cpw-text); padding-left: 0.5rem; }
.input-wrapper { position: relative; display: flex; align-items: center; width: 100%; }
.input-icon { position: absolute; left: 1.25rem; color: var(--cpw-muted); pointer-events: none; transition: color 0.3s ease; }
.input-wrapper.align-top .input-icon { top: 1.25rem; }
.input-wrapper:focus-within .input-icon { color: var(--cpw-primary); }

.glass-input { width: 100%; background-color: var(--hover-bg); border: 1px solid var(--glass-border); border-radius: 1rem; padding: 1rem 1rem 1rem 3.5rem; font-family: inherit; font-size: 0.9375rem; font-weight: 500; color: var(--cpw-text); transition: all 0.3s ease; }
.glass-input:focus { outline: none; border-color: var(--cpw-primary); background-color: var(--glass-bg); box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15); }
.glass-input::placeholder { color: var(--cpw-text); opacity: 0.4; }
.textarea-resize { resize: none; }

/* Zone Upload améliorée */
.file-drop-zone { border: 2px dashed rgba(0,0,0,0.2); border-radius: 1.5rem; padding: 2.5rem 1rem; text-align: center; cursor: pointer; transition: all 0.3s ease; background-color: rgba(0,0,0,0.01); }
[data-theme="dark"] .file-drop-zone { border-color: rgba(255,255,255,0.2); }
.file-drop-zone:hover, .file-drop-zone.drag-over { border-color: var(--cpw-primary); background-color: rgba(0, 123, 255, 0.05); }
.drop-icon { width: 3.5rem; height: 3.5rem; border-radius: 50%; background-color: rgba(0, 123, 255, 0.1); color: var(--cpw-primary); font-size: 1.5rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem auto; transition: transform 0.3s ease; }
.file-drop-zone:hover .drop-icon { transform: scale(1.1); }
.drop-text { font-size: 1rem; font-weight: 800; color: var(--cpw-text); margin-bottom: 0.25rem; }
.drop-subtext { font-size: 0.75rem; color: var(--cpw-muted); margin: 0; }

.file-list-container { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.75rem; }
.file-item { display: flex; align-items: center; justify-content: space-between; background-color: rgba(0,0,0,0.05); padding: 0.75rem 1rem; border-radius: 1rem; font-size: 0.8125rem; }
[data-theme="dark"] .file-item { background-color: rgba(255,255,255,0.05); }
.file-item-info { display: flex; align-items: center; gap: 0.75rem; overflow: hidden; }
.file-item-name { font-weight: bold; color: var(--cpw-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.file-remove-btn { width: 2rem; height: 2rem; border-radius: 50%; border: none; background: transparent; color: #ef4444; cursor: pointer; transition: background-color 0.3s ease; }
.file-remove-btn:hover { background-color: rgba(239, 68, 68, 0.1); }

/* --- NAVIGATION & BOUTONS --- */
.step-footer { display: flex; align-items: center; gap: 1rem; margin-top: 2.5rem; flex-wrap: wrap; }
.step-footer.right { justify-content: flex-end; }
.step-footer.space-between { justify-content: space-between; }
.mt-large { margin-top: 3rem; }

.btn-primary { background: linear-gradient(135deg, var(--cpw-primary), #2563eb); color: white; border: none; padding: 0.875rem 2.5rem; border-radius: 9999px; font-weight: 700; font-size: 1rem; cursor: pointer; transition: all 0.3s ease; display: inline-flex; align-items: center; justify-content: center; gap: 0.75rem; max-width: 100%; box-shadow: 0 10px 15px -3px rgba(0, 123, 255, 0.3); }
.btn-primary:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 15px 25px -5px rgba(0, 123, 255, 0.4); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; filter: grayscale(1); pointer-events: none; }
.btn-outline { background: transparent; border: 1px solid var(--glass-border); color: var(--cpw-text); padding: 0.875rem 2.5rem; border-radius: 9999px; font-weight: 700; font-size: 0.9375rem; cursor: pointer; transition: all 0.3s ease; }
.btn-outline:hover { background-color: var(--hover-bg); transform: translateY(-2px); }

/* Legal text reCAPTCHA */
.form-legal { font-size: 0.7rem; text-align: center; color: var(--cpw-muted); margin-top: 2rem; line-height: 1.6; }
.form-legal a { color: var(--cpw-primary); font-weight: 700; text-decoration: none; transition: opacity 0.3s ease; }
.form-legal a:hover { opacity: 0.8; text-decoration: underline; }

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

/* --- TOASTS --- */
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 6000; display: flex; flex-direction: column; gap: 1rem; pointer-events: none; }
.toast-item { display: flex; align-items: center; gap: 1rem; padding: 1.25rem; border-radius: 1.25rem; color: white; min-width: 300px; max-width: 24rem; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.3); backdrop-filter: blur(12px); opacity: 0; transform: translateY(20px); transition: all 0.5s ease; border: 1px solid rgba(255,255,255,0.2); pointer-events: auto; }
.toast-item.show { opacity: 1; transform: translateY(0); }
.toast-success { background: linear-gradient(135deg, rgba(22, 163, 74, 0.9), rgba(21, 128, 61, 0.95)); }
.toast-error { background: linear-gradient(135deg, rgba(220, 38, 38, 0.9), rgba(185, 28, 28, 0.95)); }