/* --- VARIABLES --- */
:root {
    --primary-orange: #ff6600;
    --primary-hover: #e65c00;
    --text-dark: #333;
    --text-grey: #666;
    --bg-light: #f9f9f9;
    --input-bg-dark: #2c2c2c; /* COULEUR FONCÉE EXACTE DES CHAMPS */
    --input-text: #ffffff;    /* Texte blanc dans les champs */
    --input-border-color: #444; /* Bordure pour les inputs sombres */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* --- HEADER & LOGO --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: white;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Style spécifique pour ton image logo */
.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 40px; /* Ajuste la taille de l'image du logo ici */
    width: auto;
    display: block;
}

.nav-buttons .btn-login {
    margin-right: 15px;
    font-weight: 600;
    color: #555;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
}
.nav-buttons .btn-login:hover {
    color: var(--primary-orange);
    border-color: var(--primary-orange);
}


.nav-buttons .btn-register {
    background-color: var(--primary-orange);
    color: white;
    padding: 9px 20px;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.3s;
}
.nav-buttons .btn-register:hover {
    background-color: var(--primary-hover);
}

/* --- STYLE DU TEXTE GRAS ORANGE (Pour "WeBuy" dans le paragraphe) --- */
.highlight-webuy {
    color: var(--primary-orange);
    font-weight: 800; /* Très gras */
}

/* --- PAGE D'ACCUEIL (HERO & CONTENU) --- */
main { flex: 1; }

.hero {
    text-align: center;
    padding: 60px 20px 40px 20px;
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    color: #444;
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 800;
}
.hero h1 span { color: var(--primary-orange); }

.hero p {
    color: var(--text-grey);
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    background-color: var(--primary-orange);
    color: white;
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
    transition: background-color 0.3s;
}
.cta-button:hover { background-color: var(--primary-hover); }
/* --- Styles additionnels pour l'info-bulle et les messages --- */
.tooltip-icon {
    color: var(--primary-orange);
    cursor: help;
    font-size: 0.8rem;
    margin-left: 5px;
}

.message-box {
    margin: 15px 0;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    display: none;
    line-height: 1.4;
}

.error-message {
    background-color: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
    display: block !important;
}

.success-message {
    background-color: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
    display: block !important;
}

/* Sections Avantages et Comment ça marche */
.section-title {
    text-align: center;
    font-size: 1.6rem;
    color: #333;
    font-weight: 700;
    margin: 50px 0 30px 0;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto 60px auto;
    padding: 0 20px;
}

.advantage-item {
    background: #fff;
    padding: 25px 15px;
    border: 1px dashed #ccc;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s;
}
.advantage-item:hover { border-color: var(--primary-orange); transform: translateY(-5px); }
.advantage-item img { height: 50px; margin-bottom: 15px; object-fit: contain; }
.advantage-title { font-size: 1rem; font-weight: 700; margin-bottom: 10px; }
.advantage-text { font-size: 0.85rem; color: #666; }

.how-it-works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto 60px auto;
    padding: 0 20px;
    text-align: center;
}
.step-item img { height: 60px; margin-bottom: 15px; }
.step-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.step-text { font-size: 0.9rem; color: #666; }

.ready-section { text-align: center; padding: 40px 20px; margin-bottom: 40px; }
.ready-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 15px; }
.ready-text { max-width: 600px; margin: 0 auto 30px auto; color: #777; }
.ready-cta-btn { color: #555; text-decoration: underline; font-weight: 600; }

/* --- FOOTER --- */
.footer-note {
    text-align: center;
    padding: 20px;
    border-top: 1px solid #eee;
    color: #999;
    font-size: 0.8rem;
    margin-top: auto;
}

/* =========================================
    STYLE AUTHENTIFICATION (LOGIN / REGISTER)
    ========================================= */

/* 1. Le conteneur principal pour centrer le tout */
.auth-container {
    display: flex;
    justify-content: center; /* Centre horizontalement */
    padding-top: 60px;       /* Espace depuis le haut */
    padding-bottom: 60px;
    width: 100%;
    background-color: var(--bg-light); /* Fond général gris clair */
    flex-grow: 1;
}

/* 2. La Carte Blanche Compacte */
.auth-card {
    background: white;
    width: 100%;
    max-width: 360px; /* Largeur COMPACTE */
    padding: 35px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08); /* Ombre légère */
    text-align: center;
    border: 1px solid #eee;
}

.auth-header h2 { color: #333; margin-bottom: 5px; font-size: 1.5rem; font-weight: 800; }
.auth-header p { color: #888; font-size: 0.9rem; margin-bottom: 25px; }

/* 3. Groupes de formulaire */
.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
    margin-left: 2px;
}

.input-wrapper { position: relative; }

/* 4. CHAMPS (INPUTS ET SELECT) NOIRS */
.input-wrapper input,
.input-wrapper select { /* AJOUT du style pour le SELECT */
    width: 100%;
    padding: 12px 15px 12px 40px; /* Espace à gauche pour l'icône */
    background-color: var(--input-bg-dark); 
    color: var(--input-text); /* Texte BLANC */
    border: 1px solid var(--input-border-color); /* Bordure sombre */
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s;
    -webkit-appearance: none; /* Pour masquer la flèche par défaut du select sur Webkit */
    -moz-appearance: none;    /* Pour masquer la flèche par défaut du select sur Mozilla */
    appearance: none;         /* Masquer la flèche par défaut */
}

/* Assurer que la couleur du texte est visible pour le SELECT */
.input-wrapper select option {
    color: var(--text-dark); /* Options en noir par défaut */
    background: white;
}

.input-wrapper input::placeholder {
    color: #888; /* Placeholder gris clair */
}

.input-wrapper input:focus,
.input-wrapper select:focus {
    border-color: var(--primary-orange); /* Bordure orange au clic */
}

/* Icônes dans les champs */
.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;    
    font-size: 0.9rem;
    z-index: 2; /* S'assurer qu'elle est au-dessus du champ */
    pointer-events: none; /* L'icône n'est pas cliquable */
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    cursor: pointer;
    z-index: 3; /* Au-dessus de l'input et de l'icône de début */
}

/* Bouton Orange Large */
.btn-submit {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-orange);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
    box-shadow: 0 4px 10px rgba(255, 102, 0, 0.2);
    transition: background-color 0.3s, box-shadow 0.3s;
}
.btn-submit:hover { background-color: var(--primary-hover); }
.btn-submit:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

/* Messages de statut */
.message-box {
    margin-top: 10px;
    padding: 8px;
    border-radius: 4px;
    text-align: center;
    font-size: 0.9rem;
    display: none; /* Affiché par JavaScript */
}
.error-message {
    color: red;
    border: 1px solid red;
    background-color: #ffeaea;
}
.success-message {
    color: green;
    border: 1px solid green;
    background-color: #eaffea;
}


.auth-footer { margin-top: 20px; font-size: 0.85rem; color: #666; }
.auth-footer a { color: var(--primary-orange); font-weight: bold; }
.terms { font-size: 0.7rem; color: #999; margin-top: 20px; line-height: 1.3; }
.terms a { color: var(--primary-orange); text-decoration: none; }

/* --- RESPONSIVE (MOBILE) --- */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    
    /* Grilles en 1 colonne sur mobile */
    .advantages-grid, .how-it-works-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .header { padding: 15px; }
    
    /* MODIFICATION : ESPACEMENT ET POSITIONNEMENT DES BOUTONS DU HEADER */
    header { 
        padding-left: 15px;
        padding-right: 15px; 
    }
    
    .nav-buttons {
        margin-left: auto;
    }
    
    .nav-buttons .btn-login {
        margin-right: 10px;
        padding: 7px 12px;
    }

    .nav-buttons .btn-register {
        padding: 7px 12px;
    }
    
    /* Ajustement Connexion Mobile */
    .auth-container { padding-top: 30px; align-items: flex-start; }
    .auth-card {
        max-width: 90%; /* Un peu plus large sur mobile */
        margin: 0 auto;
        padding: 25px 20px;
    }
}