/* Fichier: static/css/main.css */

:root {
    --primary-red: #D8574B; 
    --accent-orange: #F7941D;
    --text-light: #FFFFFF;
    --bg-neutral: #F4F4F7;
    --font-family: Arial, sans-serif;
}

body {
    margin: 0;
    font-family: var(--font-family);
    background-color: var(--bg-neutral);
    color: #333;
}

header {
    background-color: #D8574B; 
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-light);
}

header img.logo {
    height: 50px;
}

nav a {
    color: var(--text-light);
    text-decoration: none;
    margin-left: 20px;
    font-weight: bold;
}

nav a:hover {
    text-decoration: underline;
}

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

.main-content {
     background-color: white;
     padding: 20px;
     border-radius: 8px;
     box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

button {
    background-color: var(--accent-orange);
    color: var(--text-light);
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    opacity: 0.9;
}

/* Styles pour le menu déroulant */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown .dropbtn {
    cursor: pointer;
}

.dropdown-content {
    display: none; /* Caché par défaut */
    position: absolute;
    background-color: #f9f9f9;
    min-width: 180px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 5px;
    overflow: hidden;
    right: 0;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    margin-left: 0;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

/* Classe pour afficher le menu avec JavaScript */
.show {
    display: block;
}
/* ===== STYLES POUR LES MESSAGES D'ALERTE ===== */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    color: white;
}

.alert.success {
    background-color: #4CAF50; /* Vert */
}

.alert.error {
    background-color: #f44336; /* Rouge */
}

.alert.info {
    background-color: #2196F3; /* Bleu */
}

.alert.warning {
    background-color: #ff9800; /* Orange */
}
/* ===== STYLES CORRIGÉS pour la page d'accueil ===== */

/* Appliquer le fond jaune pâle uniquement au body de la page d'accueil */
body.home-page-body {
    background-color: #fefbec; /* Fond jaune pâle comme l'image */
}

/* Conteneur principal pour la section héros */
.hero-split-container {
    background-color: #fefbec; /* Fond jaune pâle */
    padding: 40px 0; /* Réduire le padding vertical */
}

/* La div qui contient les deux colonnes */
.hero-split {
    display: flex;
    align-items: center;
    max-width: 1200px; /* Limite la largeur */
    margin: 0 auto; /* Centre le conteneur */
    padding: 0 5%; /* Marge latérale */
    min-height: 60vh; /* Hauteur réduite */
}

.hero-text {
    flex: 1.2; /* Donne un peu plus d'espace au texte */
    padding-right: 50px;
    color: #333; /* Texte sombre */
}

.hero-text h1 {
    font-size: 48px; /* Taille légèrement réduite */
    line-height: 1.2;
    margin-bottom: 25px;
}

.hero-text p {
    font-size: 18px;
    color: #555;
    margin-bottom: 35px;
    line-height: 1.6;
}

/* Bouton spécifique pour la page d'accueil */
.home-cta.cta-button {
    background-color: #d9534f; /* Rouge comme l'image */
    border-color: #d9534f;
    color: white; /* Assurer que le texte est blanc */
    padding: 14px 28px;
    font-size: 17px;
    text-decoration: none; /* Retirer le soulignement */
    border-radius: 8px; /* Coins arrondis */
    display: inline-block; /* Nécessaire pour appliquer padding/margin */
}
.home-cta.cta-button:hover {
    opacity: 0.9;
    text-decoration: none; /* Retirer le soulignement au survol */
}


.hero-image {
    flex: 0.8; /* Donne un peu moins d'espace à l'image */
    text-align: center;
}

.hero-image img {
    max-width: 100%; /* S'assure que l'image ne dépasse pas */
    width: 400px; /* Taille fixe pour le cercle */
    height: 400px; /* Taille fixe pour le cercle */
    object-fit: cover; /* S'assure que l'image remplit le cercle */
    border-radius: 50%; /* Image ronde */
}

/* Wrapper pour le contenu SOUS le héros */
.content-wrapper.home-content {
    margin-top: 0; /* Retire l'espace du wrapper général */
    padding-top: 40px; /* Ajoute de l'espace après le héros */
    background-color: var(--bg-neutral); /* Fond neutre pour le reste */
}

/* Ajustements pour les sections sous le héros */
.home-content .section {
    padding: 50px 20px;
}
.home-content .section h2 {
    font-size: 30px;
    margin-bottom: 25px;
}
.home-content .marketplace-cta {
    margin-top: 30px;
    padding: 25px;
}

/* Assurer que le main-content par défaut reste invisible sur la homepage */
.home-page-body main > .container > .main-content {
    background-color: transparent;
    padding: 0;
    box-shadow: none;
}

/* S'assurer que les autres pages gardent leur style */
main:not(:has(.hero-split-container)) > .container > .main-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 20px; 
}

/* Cacher le container par défaut sur la homepage */
body.home-page-body main > .container {
    padding: 0;
    max-width: none; /* Permet au héros de prendre toute la largeur */
    margin: 0;
}
/* ===== AMÉLIORATIONS PAGE D'ACCUEIL (main.css) ===== */

/* Section Vision */
.about-section {
    background-color: white; /* Fond blanc pour contraster */
    padding: 60px 20px; /* Conserve le padding */
}
.about-section p {
    max-width: 800px; /* Permet un texte un peu plus large */
    color: #444; /* Texte un peu plus foncé */
}

/* Section Équipe */
.team-section {
    padding: 60px 20px;
    background-color: var(--bg-neutral); /* Fond gris clair */
}

.team-grid {
    display: grid;
    /* Crée 2 colonnes sur les écrans larges, 1 colonne sur les petits */
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); 
    gap: 30px;
    max-width: 1000px; /* Limite la largeur max */
    margin: 40px auto 0 auto; /* Espace au-dessus et centre */
}

.team-member-card {
    background-color: white;
    border-radius: 15px;
    padding: 25px;
    display: flex; /* Image à gauche, texte à droite */
    gap: 25px;
    align-items: flex-start; /* Aligne en haut */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.07);
    text-align: left; /* Aligne le texte à gauche */
}

.member-photo {
    flex-shrink: 0; /* Empêche l'image de rétrécir */
}
.member-photo img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-blue); /* Bordure bleue */
}

.member-info h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
}
.member-info p {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin: 0;
}
/* ===== AMÉLIORATIONS APERÇU MARKETPLACE & CTA (main.css) ===== */
/* ===== GRILLE APERÇU MARKETPLACE (REFAITE) ===== */
.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Cartes un peu plus larges */
    gap: 25px; 
    max-width: 900px; /* Ajuste si besoin */
    margin: 0 auto; 
}

/* Styles généraux pour les cartes dans l'aperçu */
.preview-grid .product-card { /* Assure-toi que la classe est bien 'product-card' dans home.html */
    background-color: #2a2a3e; /* Fond sombre de la carte */
    border-radius: 12px; /* Coins plus arrondis */
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    border: 1px solid #3a3a4e; /* Bordure subtile */
    min-width: 0; 
}

.preview-grid .product-card .product-info { /* Ajustements pour la section nom/prix */
    padding: 12px 15px; /* Padding réduit */
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #161625; /* Fond très sombre pour cette partie */
}

.preview-grid .product-card .product-info h4 { /* Style pour le nom/titre */
    color: #e0e0e0; /* Texte clair */
    font-size: 15px;
    font-weight: bold;
    margin: 0;
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    margin-right: 10px;
}

.preview-grid .product-card .product-info p { /* Style pour le prix */
    color: #ffffff; /* Blanc */
    font-size: 16px;
    font-weight: bold;
    margin: 0;
    white-space: nowrap;
}

/* Section Image avec bouton coeur (si tu l'as gardé) */
.preview-grid .product-card .item-card-image { /* Assure-toi que la classe est correcte dans home.html */
    position: relative;
    height: 180px; 
}
.preview-grid .product-card .item-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* Styles pour .favorite-btn si tu l'utilises toujours */
.preview-grid .favorite-btn { 
    position: absolute; top: 10px; right: 10px; background-color: rgba(0,0,0,0.4); 
    color: white; border: none; border-radius: 50%; width: 30px; height: 30px; 
    display: flex; justify-content: center; align-items: center; cursor: pointer; font-size: 14px; 
}
.preview-grid .favorite-btn i.fa-heart { font-family: 'Font Awesome 6 Free'; font-weight: 400; } 


/* Footer de la carte (notation et bouton) */
.preview-grid .product-card .item-card-footer { /* Assure-toi que la classe est correcte */
    padding: 10px 15px 15px 15px;
    border-top: 1px solid #3a3a4e; /* Bordure plus visible */
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto; 
    background-color: #161625; /* Fond très sombre */
}
.preview-grid .item-rating {
    font-size: 12px;
    color: #ffca28; 
}
.preview-grid .rating-count { color: #a0a0a0; }

.preview-grid .btn-view { /* Style du bouton "Voir" */
    background-color: var(--accent-orange);
    color: white;
    padding: 6px 14px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s ease;
}
.preview-grid .btn-view:hover { opacity: 0.9; }


/* Styles pour le CTA orange (inchangés mais inclus pour référence) */
.orange-cta {
    margin-top: 40px;
    padding: 35px 30px; 
    background-color: #fffaf0; 
    border: 2px solid var(--accent-orange); 
    border-radius: 10px;
    text-align: center; 
}
.orange-cta p {
    margin-bottom: 20px; 
    font-size: 20px; 
    font-weight: 500; 
    color: #333; 
}
.orange-cta .cta-register {
    background-color: var(--accent-orange); 
    border-color: var(--accent-orange);
    color: white;
    padding: 12px 25px; 
    font-size: 16px;
    border-radius: 8px; 
    text-decoration: none;
    transition: background-color 0.2s ease;
}
.orange-cta .cta-register:hover {
    background-color: #e68a00; 
    border-color: #e68a00;
}

/* Media query pour mobile (inchangée) */
@media (max-width: 700px) { 
    .preview-grid {
        grid-template-columns: 1fr; 
        max-width: 350px; 
    }
}
/* Styles spécifiques pour les champs générés par form.as_p dans les pages d'auth */
.auth-form-box .form-fields-p p { 
    margin-bottom: 15px;
    text-align: left;
}
 .auth-form-box .form-fields-p label {
    display: block; 
    margin-bottom: 5px;
    color: #555;
    font-weight: bold;
    font-size: 14px;
 }
 .auth-form-box .form-fields-p input { /* Cible tous les inputs dans les <p> */
     width: 100%;
     padding: 12px;
     border: 1px solid #ccc;
     border-radius: 5px;
     box-sizing: border-box;
     font-size: 15px;
 }
 .auth-form-box .form-fields-p input:focus {
     border-color: var(--primary-blue);
     outline: none;
     box-shadow: 0 0 5px rgba(13, 61, 111, 0.3);
 }
 /* Cache les bullet points potentiels ajoutés par as_p */
 .auth-form-box .form-fields-p ul.errorlist {
    list-style-type: none;
    padding: 0;
    margin: 5px 0 0 0;
    color: #dc3545;
    font-size: 12px;
    font-weight: bold;
 }