:root {
    --primary-color: #1B1C31;
    --accent-color: #33D4A7;
    --accent-hover: #29b890;
    --text-color: #555;
    --heading-color: #1B1C31;
    --bg-light: #F8F9FC;
    --white: #ffffff;
    --border-color: #E6E7ED;
    --border-radius: 10px;
    --shadow-md: 0px 10px 30px rgba(0, 0, 0, 0.07);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--white);
    color: var(--text-color);
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    color: var(--heading-color);
    font-weight: 600;
}

h1 { font-size: 3.5rem; line-height: 1.2; }
h2 { font-size: 2.5rem; line-height: 1.3; }
h3 { font-size: 1.5rem; line-height: 1.4; }

p {
    margin-bottom: 1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header --- */
header {
    background: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-title-link { text-decoration: none; color: var(--heading-color); }
.logo-container { display: flex; align-items: center; gap: 12px; }
.logo { width: 40px; height: 40px; background: var(--primary-color); border-radius: 8px; position: relative; flex-shrink: 0; }
.logo::before { content: ''; position: absolute; width: 13px; height: 20px; background: var(--white); top: 50%; left: 7px; transform: translateY(-50%); opacity: 0.8; }
.logo::after { content: ''; position: absolute; width: 13px; height: 12px; background: var(--accent-color); top: 50%; right: 7px; transform: translateY(-50%); }
.logo-container h1 { margin: 0; font-size: 1.5em; font-weight: 600; }

.main-nav { display: block; }
.nav-links { margin: 0; padding: 0; list-style: none; display: flex; gap: 40px; }
.nav-links a {
    color: var(--heading-color); text-decoration: none; font-weight: 500; font-size: 1em; transition: color 0.3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent-color); }

.nav-cta-button {
    background-color: var(--accent-color); color: var(--white); padding: 12px 28px; text-decoration: none;
    font-weight: 500; border-radius: 50px; transition: all 0.3s;
}
.nav-cta-button:hover { background-color: var(--accent-hover); transform: translateY(-2px); }

.hamburger-menu { display: none; background: none; border: none; font-size: 1.5rem; color: var(--primary-color); cursor: pointer; z-index: 1100; }
.mobile-nav { display: none; }

/* --- Hero Slider --- */
.hero-slider {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
}
.slider-container {
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.5s ease-in-out;
}
.slide {
    min-width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    position: absolute;
    top: 0;
    left: 0;
}
.slide.active {
    opacity: 1;
    z-index: 1;
}
.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}
.slide-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    text-align: left;
}
.slide-content h2 {
    color: var(--white);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.slide-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
}
.slide-cta {
    background-color: var(--accent-color); color: var(--white); padding: 15px 35px; text-decoration: none;
    font-weight: 600; border-radius: 50px; transition: all 0.3s;
    display: inline-block;
}
.slide-cta:hover { background-color: var(--accent-hover); transform: translateY(-2px); }

.slider-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    z-index: 2;
    padding: 0 20px;
}
.slider-nav button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: background 0.3s;
}
.slider-nav button:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* --- Loan Calculator Section --- */
.loan-calculator-section {
    padding: 80px 0;
    background-color: var(--white);
}

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

.hero-text h1 {
    margin-bottom: 1.5rem;
}

.hero-text p {
    font-size: 1.1rem;
    max-width: 500px;
    margin-bottom: 2.5rem;
}

.hero-stats {
    display: flex;
    gap: 40px;
}
.hero-stats span {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--heading-color);
    display: block;
}
.hero-stats p {
    margin: 0;
    color: var(--text-color);
}

.hero-form-container {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.hero-form-container h3 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--heading-color);
}

.form-group input, .form-group select {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1em;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s;
}
.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(51, 212, 167, 0.2);
}

.range-container {
    display: flex;
    align-items: center;
    gap: 15px;
}
.range-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: #E6E7ED;
    outline: none;
    border-radius: 5px;
}
.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    background: var(--accent-color);
    cursor: pointer;
    border-radius: 50%;
    border: 3px solid var(--white);
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}
.range-value-box {
    background: var(--bg-light);
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 600;
    color: var(--heading-color);
    white-space: nowrap;
}

.submit-btn {
    display: block; width: 100%; padding: 16px; background-color: var(--accent-color); color: white; border: none;
    border-radius: 50px; font-size: 1.1em; font-weight: 600; cursor: pointer;
    transition: all 0.3s ease;
}
.submit-btn:hover { background-color: var(--accent-hover); transform: translateY(-2px); }


/* --- Logo Slider Section --- */
.logo-slider-section {
    padding: 40px 0;
    background-color: var(--bg-light);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.logo-slider {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.logo-track {
    display: flex;
    width: calc(200px * 10); /* 200px per logo * 10 logos */
    animation: scroll 30s linear infinite;
}

.logo-track img {
    height: 40px;
    width: auto;
    margin: 0 40px;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s;
}
.logo-track img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-200px * 5)); } /* scroll 5 logos width */
}

/* --- Loan Types Section --- */
.loan-types-section {
    padding: 100px 0;
    background-color: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}
.section-tag {
    display: inline-block;
    background-color: rgba(51, 212, 167, 0.1);
    color: var(--accent-color);
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    margin-bottom: 1rem;
}

.loan-types-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.loan-card {
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    transition: all 0.3s;
}
.loan-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-color);
}
.loan-card .card-icon {
    font-size: 2.5rem;
    height: 70px;
    width: 70px;
    line-height: 70px;
    border-radius: 50%;
    background: var(--accent-color);
    color: var(--white);
    margin: 0 auto 20px auto;
}
.loan-card h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}
.card-link {
    color: var(--heading-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}
.card-link:hover {
    color: var(--accent-color);
}
.card-link i {
    margin-left: 5px;
    transition: transform 0.3s;
}
.card-link:hover i {
    transform: translateX(5px);
}

/* --- Process Section --- */
.process-section {
    padding: 100px 0;
    background-color: var(--bg-light);
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: center;
}

.process-step {
    padding: 40px;
    background: var(--white);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}
.process-step:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
}

.step-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}
.step-number {
    position: absolute;
    top: -10px;
    right: -20px;
    background: var(--accent-color);
    color: var(--white);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--white);
}

.process-step h3 {
    margin-bottom: 1rem;
}

/* --- Footer --- */
footer { padding-top: 50px; background-color: var(--primary-color); color: rgba(255,255,255,0.7); }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; padding-bottom: 50px; }
.footer-section h4 { font-size: 1.2em; margin-bottom: 20px; color: var(--white); font-weight: 600; }
.footer-section p { line-height: 1.8; }
.footer-section ul { list-style: none; padding: 0; margin: 0; }
.footer-section ul li { margin-bottom: 12px; }
.footer-section a { color: rgba(255,255,255,0.7); text-decoration: none; transition: all 0.3s; }
.footer-section a:hover { color: var(--white); padding-left: 5px; }
.footer-bottom { text-align: center; padding: 25px; border-top: 1px solid rgba(255, 255, 255, 0.1); font-size: 0.9em; }

/* --- Sub-page Header --- */
.page-header {
    background-color: var(--bg-light);
    padding: 60px 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}
.page-header h1 {
    font-size: 3rem;
    color: var(--heading-color);
}

/* --- Legal & Contact Page Content --- */
.legal-content {
    padding: 80px 0;
}
.legal-container {
    max-width: 800px;
    margin: 0 auto;
}
.legal-container h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}
.legal-container h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}
.legal-container p, .legal-container li {
    line-height: 1.8;
    margin-bottom: 1rem;
}
.legal-container ul {
    padding-left: 20px;
}
.contact-section {
    padding: 0;
}


/* --- Responsive --- */
@media (max-width: 992px) {
    h1 { font-size: 2.8rem; }
    .main-nav, .nav-cta-button { display: none; }
    .hamburger-menu { display: block; }
    .mobile-nav {
        display: none; flex-direction: column; background-color: var(--white);
        position: absolute; top: 100%; left: 0; width: 100%;
        box-shadow: 0 10px 10px -10px rgba(0,0,0,0.1);
    }
    .mobile-nav.active { display: flex; }
    .mobile-link { color: var(--heading-color); text-decoration: none; padding: 15px 20px; font-weight: 500; text-align: center; border-bottom: 1px solid var(--border-color); }
    .mobile-link:hover { background-color: var(--bg-light); }
    
    .hero-grid { grid-template-columns: 1fr; gap: 40px; }
    .hero-text { text-align: center; }
    .hero-text p { margin-left: auto; margin-right: auto; }
    .hero-stats { justify-content: center; }

    .loan-types-grid { grid-template-columns: repeat(2, 1fr); }
    .process-grid { grid-template-columns: 1fr; }
    
    .slide-content h2 { font-size: 2.5rem; }
    .page-header h1 { font-size: 2.5rem; }
}

@media (max-width: 768px) {
    .loan-types-grid { grid-template-columns: 1fr; }
    .hero-slider { height: 500px; }
}

@media (max-width: 480px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    .logo-container h1 { display: none; }
    .slide-content h2 { font-size: 2rem; }
    .slide-content p { font-size: 1rem; }
    .hero-slider { height: 400px; }
    .page-header h1 { font-size: 2rem; }
}



.form-status {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.95rem;
  text-align: center;
  display: none; /* caché par défaut */
}

.form-status.success {
  background-color: #e6f9ed;
  border: 1px solid #2ecc71;
  color: #2e7d32;
  display: block;
}

.form-status.error {
  background-color: #fdecea;
  border: 1px solid #e74c3c;
  color: #c62828;
  display: block;
}

.form-status.loading {
  background-color: #fffbe6;
  border: 1px solid #f39c12;
  color: #8a6d3b;
  display: block;
}



