/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #ffffff;
    color: #333333;
    line-height: 1.6;
}

.auth-body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* ===== SPLIT LAYOUT BASE ===== */
.split-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.left-panel {
    flex: 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.left-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(243, 112, 33, 0.8) 0%, rgba(255, 154, 61, 0.6) 100%);
    z-index: 1;
}

.left-panel>* {
    position: relative;
    z-index: 2;
}

.right-panel {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    overflow-y: auto;
}

/* ===== AUTH PAGES ===== */
.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    padding: 40px 30px;
    border: 1px solid rgba(243, 112, 33, 0.1);
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h2 {
    color: #f37021;
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.auth-header p {
    color: #666666;
    font-size: 1rem;
}

/* ===== FORM STYLES ===== */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333333;
    font-weight: 600;
    font-size: 0.9rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    color: #f37021;
    font-size: 0.95rem;
}

input,
select {
    width: 100%;
    padding: 14px 15px 14px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: white;
    color: #333333;
}

input:focus,
select:focus {
    outline: none;
    border-color: #f37021;
    box-shadow: 0 0 0 3px rgba(243, 112, 33, 0.1);
}

.select-field {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23f37021' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
}

.password-toggle {
    position: absolute;
    right: 15px;
    cursor: pointer;
    color: #888888;
    transition: color 0.3s ease;
    background: none;
    border: none;
    font-size: 1rem;
}

.password-toggle:hover {
    color: #f37021;
}

.tooltip-icon {
    color: #f37021;
    cursor: help;
    margin-left: 5px;
}

/* ===== BUTTONS ===== */
.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, #f37021 0%, #ff9a3d 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 15px rgba(243, 112, 33, 0.4);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-text,
.btn-loading {
    transition: opacity 0.3s ease;
}

/* ===== MESSAGES ===== */
.message-box {
    padding: 12px;
    border-radius: 8px;
    margin: 15px 0;
    text-align: center;
    font-size: 0.9rem;
    display: none;
}

/* ===== FOOTER LINKS ===== */
.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #eeeeee;
}

.auth-footer p {
    color: #666666;
    font-size: 0.95rem;
}

.auth-footer a {
    color: #f37021;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: #e05e15;
    text-decoration: underline;
}

.terms {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #eeeeee;
    text-align: center;
    font-size: 0.8rem;
    color: #888888;
    line-height: 1.6;
}

.terms a {
    color: #f37021;
    text-decoration: none;
    font-weight: 500;
}

.terms a:hover {
    text-decoration: underline;
}

/* ===== LOGO ===== */
.logo-container {
    padding: 20px;
}

.logo {
    display: inline-block;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablettes */
@media (max-width: 768px) {
    .split-layout {
        flex-direction: column;
    }

    .left-panel {
        min-height: 40vh;
        padding: 20px;
    }

    .right-panel {
        min-height: 60vh;
        padding: 20px;
    }

    .auth-card {
        padding: 30px 25px;
        max-width: 400px;
        margin: 0 auto;
    }

    .auth-header h2 {
        font-size: 1.8rem;
    }
}

/* Mobiles */
@media (max-width: 480px) {
    .left-panel {
        min-height: 30vh;
        padding: 15px;
    }

    .right-panel {
        min-height: 70vh;
        padding: 15px;
    }

    .auth-card {
        padding: 25px 20px;
        border-radius: 15px;
    }

    .auth-header h2 {
        font-size: 1.6rem;
    }

    .btn-submit {
        padding: 14px;
        font-size: 1rem;
    }

    input,
    select {
        padding: 12px 15px 12px 40px;
        font-size: 0.95rem;
    }
}

/* Mode paysage mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .split-layout {
        flex-direction: row;
    }

    .left-panel {
        min-height: 100vh;
    }

    .right-panel {
        min-height: 100vh;
        padding: 20px;
    }
}

/* Mode sombre */
@media (prefers-color-scheme: dark) {
    .right-panel {
        background: #1a1a1a;
    }

    .auth-card {
        background: #2c3e50;
        color: #ecf0f1;
        border-color: rgba(255, 152, 0, 0.3);
    }

    .auth-header h2 {
        color: #ff9800;
    }

    .auth-header p {
        color: #bdc3c7;
    }

    .form-group label {
        color: #e0e0e0;
    }

    input,
    select {
        background: #34495e;
        color: #ecf0f1;
        border-color: #4a6572;
    }

    input::placeholder {
        color: #95a5a6;
    }

    .auth-footer p {
        color: #bdc3c7;
    }

    .terms {
        color: #95a5a6;
    }
}

/* ===== UTILITIES ===== */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

.flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.justify-center {
    justify-content: center;
}

.align-center {
    align-items: center;
}

.w-100 {
    width: 100%;
}

.h-100 {
    height: 100%;
}


/* ===== LANDING PAGE STYLES (INDEX.HTML) ===== */

/* Header */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-container {
    padding: 0;
    /* Reset padding for header logo */
}

/* Nav Buttons */
.nav-buttons .btn-login,
.nav-buttons .btn-register {
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s;
    margin-left: 10px;
}

.nav-buttons .btn-login {
    color: #f37021;
    border: 2px solid #f37021;
}

.nav-buttons .btn-login:hover {
    background-color: #f37021;
    color: white;
}

.nav-buttons .btn-register {
    background-color: #f37021;
    color: white;
    border: 2px solid #f37021;
}

.nav-buttons .btn-register:hover {
    background-color: #d65b12;
    border-color: #d65b12;
}

/* Main Content */
main {
    width: 100%;
    overflow-x: hidden;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/Photos/Home.png');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 100px 20px;
    min-height: 80vh;
    /* Fairly tall hero */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Fallback if image missing, use gradient matching theme */
.hero {
    background-color: #2c3e50;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero h1 span {
    color: #f37021;
    /* WebBuy Orange */
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin-bottom: 30px;
}

.highlight-webuy {
    color: #f37021;
    font-weight: bold;
}

.cta-button {
    background-color: #f37021;
    color: white;
    padding: 15px 40px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(243, 112, 33, 0.4);
    background-color: #e05e15;
}

/* Section Common */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin: 60px 0 40px;
    color: #333;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: #f37021;
    margin: 10px auto 0;
    border-radius: 2px;
}

/* Advantages Grid */
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 0 10%;
    margin-bottom: 60px;
}

.advantage-item {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    transition: transform 0.3s;
}

.advantage-item:hover {
    transform: translateY(-10px);
}

.advantage-item img {
    height: 80px;
    margin-bottom: 20px;
}

.advantage-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #333;
}

.advantage-text {
    color: #666;
    font-size: 0.95rem;
}

/* How It Works Grid */
.how-it-works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    padding: 0 10%;
    margin-bottom: 80px;
    background-color: #f9f9f9;
    padding-bottom: 60px;
    padding-top: 20px;
}

.step-item {
    text-align: center;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.step-item img {
    height: 100px;
    /* Slightly larger for steps */
    margin-bottom: 20px;
}

.step-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #333;
}

/* Ready Section */
.ready-section {
    background: linear-gradient(135deg, #f37021 0%, #ff9800 100%);
    color: white;
    text-align: center;
    padding: 60px 20px;
}

.ready-title {
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.ready-text {
    max-width: 700px;
    margin: 0 auto 30px;
    font-size: 1.1rem;
}

.ready-cta-btn {
    background-color: white;
    color: #f37021;
    padding: 15px 35px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s;
    display: inline-block;
}

.ready-cta-btn:hover {
    background-color: #f0f0f0;
    transform: scale(1.05);
}

/* Footer (Landing Page specific) */
.footer-note {
    text-align: center;
    background-color: #333;
    color: #aaa;
    padding: 20px;
    font-size: 0.9rem;
}

.footer-note p {
    margin: 5px 0;
}

/* Responsive adjustments for Landing */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .nav-buttons .btn-login,
    .nav-buttons .btn-register {
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .advantages-grid,
    .how-it-works-grid {
        padding: 0 5%;
    }
}