/* ============================================
   SECTIONS - Contenu spécifique RESPONSIVE
   ============================================ */

/* === SIMULATOR - OPTIMISÉ RESPONSIVE === */
.simulator-card {
    background: var(--white);
    border-radius: 20px;
    padding: clamp(16px, 3vw, 20px);
    margin: 0 auto clamp(1.5rem, 3vh, 2rem);
    max-width: 100%;
    width: 100%;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--neutral-200);
}

.simulator-inner {
    background: var(--gradient-bg);
    border-radius: 16px;
    padding: clamp(16px, 3vw, 20px);
    position: relative;
    overflow: hidden;
}

.simulator-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--neutral-200);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    animation: shimmer 3s infinite;
    background-size: 200% 100%;
}

.simulator-form {
    display: flex;
    gap: clamp(12px, 2vw, 16px);
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.amount-input {
    display: flex;
    align-items: center;
    border: 2px solid var(--neutral-300);
    border-radius: 12px;
    overflow: hidden;
    flex: 1;
    min-width: 180px;
    max-width: 100%;
    transition: var(--transition);
}

.amount-input:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.amount-input input {
    border: none;
    padding: clamp(12px, 2vw, 14px);
    font-size: clamp(14px, 2vw, 16px);
    font-weight: 600;
    text-align: center;
    background: transparent;
    outline: none;
    width: 100%;
    min-width: 0;
}

.currency {
    padding: clamp(12px, 2vw, 14px) clamp(14px, 2vw, 16px);
    font-size: clamp(16px, 2.5vw, 18px);
    font-weight: 700;
    color: var(--primary-color);
    background: var(--neutral-100);
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.currency:hover {
    background: var(--neutral-200);
    transform: scale(1.05);
}

.simulate-btn {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    padding: clamp(14px, 2.5vw, 18px) clamp(20px, 3vw, 28px);
    border-radius: 12px;
    font-weight: 600;
    font-size: clamp(14px, 2vw, 16px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    white-space: nowrap;
    width: 100%;
    margin-top: 16px;
}

.simulate-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.simulate-btn.loading {
    opacity: 0.8;
    cursor: wait;
}

/* Options du simulateur (Type de projet + Durée) */
.simulator-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 16px 0;
}

.option-field {
    position: relative;
}

.option-field select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--neutral-300);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--neutral-700);
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23475569' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.option-field select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
    outline: none;
}

.option-field select:hover {
    border-color: var(--primary-light);
}

.amount-slider {
    width: 100%;
}

.amount-slider input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 10px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.amount-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: clamp(20px, 3vw, 24px);
    height: clamp(20px, 3vw, 24px);
    border-radius: 50%;
    background: var(--gradient-primary);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    border: 3px solid var(--white);
}

.amount-slider input[type="range"]::-moz-range-thumb {
    width: clamp(20px, 3vw, 24px);
    height: clamp(20px, 3vw, 24px);
    border-radius: 50%;
    background: var(--gradient-primary);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    border: 3px solid var(--white);
}

/* Résultats simulation */
.simulation-results { 
    text-align: center; 
    padding: clamp(16px, 3vw, 20px);
}

.results-title {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 600;
    margin-bottom: clamp(20px, 3vh, 24px);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: clamp(16px, 2vw, 20px);
    margin-bottom: clamp(24px, 4vh, 32px);
}

.result-item {
    background: var(--neutral-100);
    padding: clamp(14px, 2.5vw, 16px);
    border-radius: 12px;
    border: 2px solid var(--neutral-200);
    transition: var(--transition);
}

.result-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.result-label {
    font-size: clamp(12px, 1.8vw, 14px);
    color: var(--neutral-600);
    margin-bottom: 8px;
    font-weight: 500;
}

.result-value {
    font-size: clamp(18px, 3vw, 20px);
    font-weight: 700;
}

.result-value.highlight {
    color: var(--primary-color);
    font-size: clamp(20px, 3.5vw, 24px);
}

.results-actions {
    display: flex;
    gap: clamp(12px, 2vw, 16px);
    justify-content: center;
    flex-wrap: wrap;
}

.results-actions button {
    flex: 1;
    min-width: 140px;
    max-width: 200px;
}

/* CTA Card pour slides */
.cta-card {
    background: var(--white);
    border-radius: 20px;
    padding: clamp(24px, 4vw, 32px);
    text-align: center;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--neutral-200);
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
}

.cta-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(12px, 2vh, 16px);
}

.cta-title {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.cta-description {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: var(--neutral-600);
    margin: 0;
}

.cta-card .cta-button {
    width: 100%;
    max-width: 300px;
}

/* === OFFERS - GRID 3X2 DESKTOP, CARTES CARRÉES === */
.offers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Desktop: 3 colonnes */
    gap: clamp(24px, 3vw, 40px);
    max-width: 1200px; /* Augmenté pour 3 colonnes */
    margin: 0 auto;
}

.offer-card {
    padding: clamp(24px, 3vw, 40px);
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1; /* Carré parfait */
    min-height: 0; /* Important pour aspect-ratio */
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

/* Effet de fond au hover */
.offer-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
    z-index: 0;
}

.offer-card:hover::after {
    opacity: 0.05;
}

/* Assurer que le contenu reste au-dessus */
.offer-card > * {
    position: relative;
    z-index: 1;
}

.offer-icon {
    width: clamp(70px, 10vw, 90px);
    height: clamp(70px, 10vw, 90px);
    background: var(--gradient-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto clamp(20px, 3vh, 30px);
    font-size: clamp(28px, 4vw, 36px);
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
    border: 3px solid var(--white);
    transition: var(--transition);
}

.offer-card:hover .offer-icon {
    background: var(--gradient-primary);
    color: var(--white);
    transform: scale(1.15) rotate(5deg);
    box-shadow: var(--shadow-xl);
}

.offer-card h3 {
    font-size: clamp(16px, 2vw, 18px);
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    transition: var(--transition);
}

.offer-card:hover h3 {
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Indicateur de cliquabilité */
.offer-card:active {
    transform: scale(0.98);
}

/* === HOW IT WORKS - CORRECTION POUR INDEX.HTML === */
.steps-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colonnes alignées sur desktop */
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.step-card {
    padding: 40px 28px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1; /* Format carré */
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 24px;
    box-shadow: var(--shadow-lg);
    border: 4px solid var(--white);
}

.step-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
}

.step-card p {
    color: var(--neutral-600);
    line-height: 1.6;
    max-width: 280px;
}

/* === EXPLANATION === */
.explanation-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    margin-bottom: 60px;
}

.explanation-text {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.explanation-point h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    position: relative;
    padding-left: 24px;
}

.explanation-point h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: var(--gradient-primary);
    border-radius: 50%;
}

.explanation-point p {
    color: var(--neutral-600);
    line-height: 1.6;
    padding-left: 24px;
}

.circle-illustration {
    width: 450px;
    height: 450px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 160px;
    color: var(--white);
    box-shadow: var(--shadow-xl);
    animation: pulse 6s ease-in-out infinite;
    border: 6px solid var(--white);
    position: relative;
}

.cta-section {
    text-align: center;
    margin-top: 60px;
}

.cta-section .cta-button {
    display: inline-flex; /* Au lieu de flex */
    margin: 0 auto;
}

/* === TESTIMONIALS === */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto 60px;
    transition: opacity 0.3s ease;
}

.testimonial-card {
    padding: 32px;
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 60px;
    color: var(--primary-color);
    font-weight: 700;
}

/* 👇 CORRECTION AVATAR - CERCLE PARFAIT */
.testimonial-avatar {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
}

.testimonial-avatar img {
    width: 90px;
    height: 90px;
    min-width: 90px;
    min-height: 90px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    border: 4px solid var(--neutral-200);
    box-shadow: var(--shadow-md);
    display: block;
    transition: transform 0.3s ease;
}

.testimonial-card:hover .testimonial-avatar img {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.15);
}

.testimonial-content {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.testimonial-info {
    flex: 1;
    min-width: 0;
}

.testimonial-info h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}

.testimonial-info span {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 500;
    display: block;
    margin-bottom: 16px;
}

.testimonial-info p {
    font-size: 15px;
    color: var(--neutral-600);
    line-height: 1.6;
    font-style: italic;
}

/* === VISION === */
.vision-text {
    text-align: center;
    margin-bottom: 80px;
}

.vision-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.4;
    max-width: 900px;
    margin: 0 auto;
}

.vision-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.vision-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.vision-image img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    transition: var(--transition);
}

.vision-image:hover img {
    transform: scale(1.05);
}

.vision-points {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.vision-point h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    position: relative;
    padding-left: 28px;
}

.vision-point h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: var(--gradient-secondary);
    border-radius: 50%;
}

.vision-point p {
    color: var(--neutral-600);
    line-height: 1.6;
    padding-left: 28px;
}

/* === ADVICE === */
.advice-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Desktop: 4 colonnes horizontales (1x4) */
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.advice-card {
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    height: 100%; /* Hauteur uniforme */
    width: 100%; /* Largeur uniforme */
}

.advice-card:hover {
    transform: translateY(-8px);
}

.advice-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: var(--transition);
    border-radius: 12px 12px 0 0;
}

.advice-card:hover img {
    transform: scale(1.05);
}

/* HARMONISATION avec les pages articles "Articles connexes" */
.advice-card h3 {
    padding: 20px;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    flex-grow: 1;
    transition: var(--transition);
    color: var(--neutral-900);
    margin: 0;
}

.advice-card:hover h3 {
    color: var(--primary-color);
}

/* ============================================
   RESPONSIVE MOBILE - SIMULATEUR & OFFERS
   ============================================ */

/* TABLETTE (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .offers-grid {
        grid-template-columns: repeat(2, 1fr); /* Tablette: 2 colonnes */
        gap: clamp(24px, 3vw, 32px);
        max-width: 400px;
    }

    .offer-card {
        padding: clamp(28px, 4vw, 36px);
    }

    .steps-container { 
        grid-template-columns: 1fr; 
    }
    
    .step-card {
        aspect-ratio: auto; /* Enlever le carré sur mobile */
        min-height: 280px;
    }

    .explanation-content {
        display: flex;
        flex-direction: column;
        gap: 60px;
        max-width: 95%;
        margin: 0 auto 60px;
    }
    
    /* L'image passe en premier */
    .explanation-image {
        order: -1;
        display: flex;
        justify-content: center;
    }
    
    /* Le texte passe en second */
    .explanation-text {
        order: 1;
    }
    
    /* Centrer l'illustration */
    .circle-illustration {
        margin: 0 auto;
    }

    .advice-grid {
        grid-template-columns: repeat(2, 1fr); /* Tablette: 2 colonnes (2x2) */
        gap: 24px;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .advice-card {
        width: 100%;
    }
    
    .advice-card h3 {
        font-size: 1rem;
        padding: 20px;
        color: var(--neutral-900);
    }
}

/* MOBILE LARGE (481px - 767px): 2x2 grid */
@media (min-width: 481px) and (max-width: 767px) {
    .advice-grid {
        grid-template-columns: repeat(2, 1fr); /* Mobile large: 2 colonnes */
        gap: 16px;
        max-width: 450px;
        margin: 0 auto;
    }
    
    .advice-card {
        width: 100%;
    }
    
    .advice-card img {
        height: 120px;
    }
    
    .advice-card h3 {
        font-size: 0.9rem;
        padding: 14px;
        color: var(--neutral-900);
    }
}


/* GLOBAL MOBILE (≤767px) - Simulateur uniquement */
@media (max-width: 767px) {

    /* EXPLANATION - Image avant texte sur mobile */
    .explanation-content {
        display: flex;
        flex-direction: column;
        gap: 40px;
        max-width: 95%;
        margin: 0 auto 40px;
    }
    
    .explanation-image {
        order: -1;
        display: flex;
        justify-content: center;
    }
    
    .explanation-text {
        order: 1;
    }
    
    .circle-illustration {
        margin: 0 auto;
        width: 250px;
        height: 250px;
    }

    .simulator-card {
        max-width: 100%;
        border-radius: 16px;
    }

    .simulator-form {
        flex-direction: column;
        width: 100%;
    }
    
    /* Options simulateur sur mobile */
    .simulator-options {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .option-field select {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .simulate-btn {
        padding: 14px 20px;
        font-size: 14px;
    }

    .amount-input {
        max-width: 100%;
        width: 100%;
    }

    .simulate-btn {
        width: 100%;
        justify-content: center;
    }

    .results-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .results-actions {
        flex-direction: column;
    }

    .results-actions button {
        width: 100%;
        max-width: 100%;
    }

    .cta-card {
        padding: 24px 16px;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

/* MOBILE (≤480px) */
@media (max-width: 480px) {
    .offers-grid {
        grid-template-columns: 1fr; /* Mobile: 1 colonne */
        gap: 16px;
        max-width: 100%;
    }

    .offer-card {
        padding: 24px 20px;
        aspect-ratio: 1 / 1;
    }

    .offer-icon {
        width: 70px;
        height: 70px;
        font-size: 28px;
        margin-bottom: 16px;
    }

    .offer-card h3 {
        font-size: 16px;
    }

    .simulator-card {
        padding: 12px;
    }

    .simulator-inner {
        padding: 16px;
    }

    .cta-section {
        margin-top: 40px;
    }
    
    .cta-section .cta-button {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .circle-illustration {
        width: 240px;
        height: 240px;
        font-size: 90px;
    }

    .results-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .result-item {
        padding: 12px;
    }

    .circle-illustration {
        width: 280px;
        height: 280px;
        font-size: 100px;
    }

    .testimonial-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
    }

    .testimonial-avatar,
    .testimonial-avatar img {
        width: 70px;
        height: 70px;
        min-width: 70px;
        min-height: 70px;
    }

    .advice-grid {
        grid-template-columns: 1fr; /* Mobile: 1 colonne verticale (1x4) */
        gap: 16px;
        max-width: 320px;
        margin: 0 auto;
        padding: 0 10px;
    }
    
    .advice-card {
        width: 100%;
        max-width: 100%;
        margin: 0;
    }
    
    .advice-card img {
        height: 160px;
    }
    
    .advice-card h3 {
        font-size: 1rem;
        padding: 16px;
        color: var(--neutral-900);
    }
}