/* Styles de l'accueil et du questionnaire de devis (extraits de index.php le 9 sept. 2026, partagés avec devis.php).
   Chargé avec ?v=filemtime (cache d'un mois sur les CSS). */
/* Hero Section optimisée */
.hero-section {
    background: linear-gradient(135deg, #0E382E 0%, #1a5643 100%);
    color: white;
    padding: 60px 0 40px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: -50%;
    width: 200%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,213.3C672,192,768,128,864,128C960,128,1056,192,1152,213.3C1248,235,1344,213,1392,202.7L1440,192L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat;
    opacity: 0.3;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: 30px;
}

.savings-badge {
    display: inline-block;
    background: #FFC107;
    color: #0E382E;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: bold;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Trust indicators */
.trust-bar {
    background: white;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.trust-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 20px;
    border-right: 1px solid #e0e0e0;
}

.trust-item:last-child {
    border-right: none;
}

.trust-item i {
    color: #0E382E;
    font-size: 1.5rem;
}

.trust-number {
    font-size: 1.25rem;
    font-weight: bold;
    color: #0E382E;
}

.trust-text {
    font-size: 0.9rem;
    color: #666;
}

/* Form amélioré */
.quote-form-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    margin-top: 30px;
    position: relative;
    z-index: 10;
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-steps {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.step-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #999;
    font-size: 0.9rem;
}

.step-indicator.active {
    color: #0E382E;
    font-weight: bold;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
}

.step-indicator.active .step-number {
    background: #0E382E;
    color: white;
    border-color: #0E382E;
}

.energy-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 30px 0;
}

.energy-card {
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.energy-card:hover {
    border-color: #0E382E;
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(14, 56, 46, 0.2);
}

.energy-card.selected {
    background: #0E382E !important;
    color: white !important;
    border-color: #0E382E !important;
}

.energy-card img {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
}

.energy-card.selected img {
    filter: none !important;
    opacity: 0.9 !important;
}

.energy-card.selected div {
    color: white !important;
}

.cta-button {
    background: #0E382E;
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
}

.cta-button:hover {
    background: #1a5643;
    transform: scale(1.05);
}

/* Benefits section */
.benefits-section {
    padding: 60px 0;
    background: #f8f9fa;
}

.benefit-card {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 10px;
    height: 100%;
    transition: transform 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.benefit-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #0E382E, #1a5643);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.benefit-icon i {
    font-size: 2rem;
    color: white;
}

.benefit-title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: #0E382E;
}

/* Urgency banner */
.urgency-banner {
    background: linear-gradient(90deg, #FF6B6B, #FF8787);
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.urgency-banner .close-banner {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.5rem;
}

.urgency-banner a {
    color: inherit;
    text-decoration: underline;
    font-weight: bold;
}

.urgency-banner a:hover {
    opacity: 0.8;
}

/* Testimonials améliorés */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.testimonial-card-v2 {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    position: relative;
}

.testimonial-card-v2::before {
    content: '"';
    font-size: 3rem;
    color: #0E382E;
    opacity: 0.2;
    position: absolute;
    top: 10px;
    left: 20px;
}

.savings-amount {
    display: inline-block;
    background: #4CAF50;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    margin-bottom: 10px;
}

/* Enhanced questionnaire styles for v2 */
.visual-radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.visual-radio-item {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.visual-radio-item input {
    position: absolute;
    opacity: 0;
}

.visual-radio-content {
    padding: 20px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
    background: white;
}

.visual-radio-item:hover .visual-radio-content {
    border-color: #0E382E;
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(14, 56, 46, 0.1);
}

.visual-radio-item.selected .visual-radio-content {
    background: #0E382E;
    color: white;
    border-color: #0E382E;
    box-shadow: 0 5px 20px rgba(14, 56, 46, 0.3);
}

.visual-radio-content i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.step-counter {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 20px;
    color: #495057;
    font-weight: 500;
}

.step-title {
    font-size: 0.9rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-weight: 600;
}

.question-text {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #212529;
    font-weight: 500;
}

.slider-container {
    margin: 30px 0;
}

.slider-value {
    text-align: center;
    font-size: 2rem;
    font-weight: bold;
    color: #0E382E;
    margin-top: 15px;
}

.form-range {
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(to right, #0E382E 0%, #0E382E var(--value), #e9ecef var(--value), #e9ecef 100%);
}

.form-range::-webkit-slider-thumb {
    width: 25px;
    height: 25px;
    background: #0E382E;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(14, 56, 46, 0.3);
}

.searchable-select {
    position: relative;
}

.searchable-select input {
    font-size: 1.1rem;
    padding: 12px;
}

.searchable-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 8px 8px;
    z-index: 1000;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.searchable-option {
    padding: 12px 15px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f8f9fa;
}

.searchable-option:hover {
    background: #0E382E;
    color: white;
}

.grouped-fields {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin: 20px 0;
}

.inline-radio {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    justify-content: center;
}

.radio-inline {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 20px;
    border: 2px solid #dee2e6;
    border-radius: 25px;
    transition: all 0.3s;
    background: white;
}

.radio-inline:hover {
    border-color: #0E382E;
    background: #f8f9fa;
}

.radio-inline input:checked + {
    background: #0E382E;
    color: white;
    border-color: #0E382E;
}

.help-text {
    font-size: 0.9rem;
    margin-top: 5px;
    color: #6c757d;
}

.required-checkbox .form-check-label::after {
    content: ' *';
    color: #dc3545;
}

#questionContainer {
    min-height: 300px;
    animation: fadeIn 0.3s ease-in;
}

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

/* Input field styles and placeholders */
input::placeholder,
textarea::placeholder {
    color: #adb5bd !important;
    opacity: 0.8;
}

input:focus::placeholder,
textarea:focus::placeholder {
    color: #ced4da !important;
    opacity: 0.6;
}

/* Error field styling */
.error-field,
input.error-field,
textarea.error-field,
select.error-field {
    border: 1px solid #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.error-field:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.35);
}

/* Error message styling */
.field-error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* Success field styling */
.success-field {
    border: 1px solid #28a745 !important;
}

/* Required field indicator */
.form-label.required::after {
    content: ' *';
    color: #dc3545;
    font-weight: bold;
}

/* Disabled button state */
#nextBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Visual feedback for valid inputs */
input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
    border-color: #28a745;
}

/* Mode concentration : une fois le questionnaire démarré, seules la barre de navigation et le formulaire restent */
body.quote-focus .home-extra,
body.quote-focus .urgency-banner { display: none !important; }
body.quote-focus .quote-form-container { margin-top: 30px; }

/* Keep energy-card selected state */
.energy-card.selected {
    background: #0E382E !important;
    color: white !important;
    border-color: #0E382E !important;
}

.energy-card.selected img {
    filter: none !important;
    opacity: 0.9 !important;
}

/* Démarrage dans le hero : choix de l'énergie en un clic */
.hero-start {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    padding: 26px 24px 20px;
    backdrop-filter: blur(2px);
    position: relative;
    z-index: 1;
}
.hero-start-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 16px; text-align: center; }
.hero-energy-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hero-energy-card {
    background: #fff;
    color: #0E382E;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 16px 8px 12px;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.hero-energy-card img { width: 48px; height: 48px; }
.hero-energy-card:hover, .hero-energy-card:focus-visible { transform: translateY(-3px); border-color: #74F2A9; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25); outline: none; }
.hero-start-note { margin-top: 14px; font-size: 0.85rem; text-align: center; opacity: 0.9; }

@keyframes heroPulse {
    0% { box-shadow: 0 0 0 0 rgba(116, 242, 169, 0.9); }
    100% { box-shadow: 0 0 0 18px rgba(116, 242, 169, 0); }
}
.hero-start.pulse { animation: heroPulse 0.9s ease-out 2; }

/* Passerelle vers le comparateur */
.self-compare { padding: 0 0 10px; }
.self-compare-box {
    background: #0E382E;
    color: #fff;
    border-radius: 14px;
    padding: 22px 26px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 24px;
}
.self-compare-text { display: flex; flex-direction: column; gap: 4px; max-width: 520px; }
.self-compare-text strong { font-size: 1.1rem; }
.self-compare-text span { font-size: 0.92rem; opacity: 0.9; }
.self-compare-fields { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.self-compare-fields .form-select { width: auto; }
.self-compare-fields .input-group { width: auto; }
.self-compare-fields .input-group input { width: 120px; }
.self-compare-fields .btn { white-space: nowrap; }

/* Mobile optimization */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.75rem;
    }
    /* Hero compact : le choix de l'énergie doit tenir dans le premier écran */
    .hero-section { padding: 22px 0 22px; }
    .hero-section .savings-badge { display: none; }
    .hero-title { font-size: 1.45rem; margin-bottom: 10px; }
    .hero-subtitle { font-size: 0.95rem; margin-bottom: 12px; }
    .hero-section .col-lg-6 > .d-flex { display: none !important; }
    .hero-start { padding: 16px 14px 12px; margin-top: 4px; }
    .hero-start-title { font-size: 1rem; margin-bottom: 10px; }
    .hero-energy-card { padding: 10px 4px 8px; font-size: 0.85rem; gap: 4px; }
    .hero-energy-card img { width: 36px; height: 36px; }
    .self-compare-fields { width: 100%; }
    .self-compare-fields .form-select, .self-compare-fields .input-group, .self-compare-fields .btn { width: 100%; }
    .self-compare-fields .input-group input { width: auto; }

    .trust-bar {
        overflow-x: auto;
    }

    .trust-item {
        min-width: 150px;
    }

    .form-steps {
        justify-content: space-between;
        gap: 10px;
    }

    .step-indicator span {
        display: none;
    }

    .urgency-banner {
        font-size: 0.9rem;
    }

    .visual-radio-group {
        grid-template-columns: 1fr;
    }

    .question-text {
        font-size: 1.25rem;
    }

    .grouped-fields {
        padding: 15px;
    }
}

/* Floating CTA for mobile */
.floating-cta {
    display: none;
}

@media (max-width: 768px) {
    .floating-cta {
        display: block;
        position: fixed;
        bottom: 20px;
        left: 20px;
        right: 20px;
        z-index: 99;
        background: #0E382E;
        color: white;
        padding: 15px;
        border-radius: 50px;
        text-align: center;
        font-weight: bold;
        box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    }
}

.floating-cta-main { display: block; font-weight: 700; }
.floating-cta-sub { display: block; font-size: 0.78rem; font-weight: 500; opacity: 0.85; margin-top: 2px; }
@media (max-width: 768px) { .floating-cta { padding: 10px 15px; } }
@keyframes slideUp {
    from {
        transform: translateY(100px);
    }
    to {
        transform: translateY(0);
    }
}


/* ---- Fournisseur actuel : tuiles avec logo (questions-v2.json, clé logos) ---- */
.provider-logo-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 10px; }
.provider-logo-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: #fff; border: 2px solid #e2e8f0; border-radius: 10px; padding: 10px 6px; cursor: pointer; font-size: 0.78rem; color: #2d3748; font-weight: 600; transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease; min-height: 84px; }
.provider-logo-tile img { height: 30px; max-width: 90%; object-fit: contain; }
.provider-logo-tile:hover { border-color: #74F2A9; transform: translateY(-2px); }
.provider-logo-tile.selected { border-color: #0E382E; box-shadow: 0 0 0 3px rgba(116, 242, 169, 0.45); background: #f0fdf6; }
.provider-logo-hint { font-size: 0.85rem; color: #6b7280; margin-bottom: 8px; }
@media (max-width: 576px) { .provider-logo-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; } .provider-logo-tile { padding: 8px 4px; font-size: 0.72rem; min-height: 74px; } .provider-logo-tile img { height: 24px; } }

/* ---- Landing /devis ---- */
.landing-devis .navbar-nav, .landing-devis .navbar-toggler { display: none !important; }
.devis-hero { background: linear-gradient(135deg, #0E382E 0%, #1a5643 100%); color: #fff; padding: 44px 0 28px; }
.devis-hero h1 { font-size: 2rem; font-weight: 800; margin-bottom: 10px; }
.devis-hero .lead { font-size: 1.1rem; opacity: 0.95; margin-bottom: 18px; }
.devis-trust { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 0.9rem; opacity: 0.95; }
.devis-trust span { display: inline-flex; align-items: center; gap: 6px; }
.devis-trust i { color: #74F2A9; }
.how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.how-step { background: #fff; border: 1px solid #dfe7e3; border-radius: 14px; padding: 20px; }
.how-step .num { display: inline-flex; width: 34px; height: 34px; border-radius: 50%; background: #0E382E; color: #74F2A9; align-items: center; justify-content: center; font-weight: 800; margin-bottom: 10px; }
.how-step h3 { font-size: 1.05rem; font-weight: 700; color: #0E382E; margin-bottom: 6px; }
.how-step p { margin: 0; color: #4b5563; font-size: 0.95rem; }
.devis-logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 26px; align-items: center; }
.devis-logos img { height: 34px; width: auto; max-width: 120px; object-fit: contain; }
.rgpd-box { background: #f8fafc; border: 1px solid #dfe7e3; border-radius: 14px; padding: 22px 24px; font-size: 0.92rem; color: #374151; }
.rgpd-box h2 { font-size: 1.1rem; color: #0E382E; font-weight: 700; margin-bottom: 10px; }
.rgpd-box ul { margin: 0; padding-left: 18px; }
.rgpd-box li { margin-bottom: 6px; }
@media (max-width: 768px) { .how-steps { grid-template-columns: 1fr; } .devis-hero h1 { font-size: 1.5rem; } }
