:root {
    /* Palette vert émeraude + accents */
    --primaire: #059669;        /* émeraude */
    --primaire-fonce: #047857;
    --primaire-clair: #34D399;
    --rose: #14B8A6;            /* turquoise */
    --orange: #F59E0B;          /* or / ambre (accent chaud) */
    --vert: #22C55E;
    --cyan: #0D9488;           /* teal (remplace l'ancien cyan bleuté) */
    --violet: #0F766E;          /* teal profond (titres) */
    --rouge: #EF4444;
    --jaune: #F59E0B;
    --degrade: linear-gradient(135deg, #059669, #10B981, #14B8A6);
    --degrade-entete: linear-gradient(90deg, #047857, #059669, #10B981, #F59E0B);
    /* Alias rétro-compatibles */
    --bleu: var(--primaire);
    --bleu-clair: var(--primaire-fonce);
    --gris: #f3f6f4;
    --texte: #1f2937;
    --bordure: #e5e7eb;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--texte);
    background: var(--gris);
    line-height: 1.5;
}
.conteneur { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }

/* En-tête dégradé émeraude */
.entete { background: var(--degrade-entete); color: #fff; box-shadow: 0 2px 12px rgba(5,150,105,.28); }
.entete-flex {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; padding: 0.8rem 1rem;
}
.logo { font-size: 1.5rem; font-weight: 800; color: #fff; text-decoration: none; letter-spacing: .5px; }
.nav-principale a {
    color: #fff; text-decoration: none; margin-left: 1rem;
    font-size: 0.95rem; font-weight: 500; opacity: .95;
}
.nav-principale a:hover { opacity: 1; text-decoration: underline; }

/* Contenu */
.contenu { padding: 1.5rem 1rem; min-height: 70vh; }
h1 {
    margin-bottom: 1rem; font-weight: 800;
    background: var(--degrade); -webkit-background-clip: text;
    background-clip: text; -webkit-text-fill-color: transparent; color: var(--primaire);
}
h2 { margin: 1rem 0 0.5rem; color: var(--violet); font-weight: 700; }
a { color: var(--primaire); }

/* Messages */
.messages { list-style: none; margin-bottom: 1rem; }
.message {
    padding: 0.7rem 1rem; border-radius: 8px; margin-bottom: 0.5rem;
    border-left: 4px solid transparent;
}
.message-success { background: #dcfce7; border-left-color: var(--vert); color: #14532d; }
.message-error { background: #fee2e2; border-left-color: var(--rouge); color: #7f1d1d; }
.message-info { background: #d1fae5; border-left-color: var(--primaire); color: #064e3b; }

/* Cartes / grille */
.grille {
    display: grid; gap: 1.1rem;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.carte {
    background: #fff; border: 1px solid var(--bordure);
    border-top: 4px solid var(--primaire);
    border-radius: 12px; overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}
.carte:hover { box-shadow: 0 10px 24px rgba(5,150,105,.20); transform: translateY(-4px); }
.carte img { width: 100%; height: 160px; object-fit: cover; }
.carte-corps { padding: 0.9rem; }
.carte-corps h3 { margin-bottom: 0.3rem; font-size: 1.05rem; }
.carte-corps a { color: var(--primaire); text-decoration: none; font-weight: 600; }
/* Accents multicolores (famille verte + or) */
.grille .carte:nth-child(6n+1) { border-top-color: var(--primaire); }
.grille .carte:nth-child(6n+2) { border-top-color: var(--rose); }
.grille .carte:nth-child(6n+3) { border-top-color: var(--orange); }
.grille .carte:nth-child(6n+4) { border-top-color: var(--vert); }
.grille .carte:nth-child(6n+5) { border-top-color: var(--cyan); }
.grille .carte:nth-child(6n+6) { border-top-color: var(--violet); }
.prix { font-weight: bold; color: var(--primaire); }

/* Formulaires */
form p { margin-bottom: 0.8rem; }
label { display: block; font-weight: 600; margin-bottom: 0.2rem; }
input, textarea, select {
    width: 100%; padding: 0.55rem; border: 1px solid var(--bordure);
    border-radius: 8px; font-size: 0.95rem;
}
input:focus, textarea:focus, select:focus {
    outline: none; border-color: var(--primaire);
    box-shadow: 0 0 0 3px rgba(5,150,105,.15);
}
.btn, button {
    display: inline-block; background: var(--degrade); color: #fff;
    border: none; padding: 0.6rem 1.3rem; border-radius: 10px;
    cursor: pointer; text-decoration: none; font-size: 0.95rem; font-weight: 600;
    box-shadow: 0 3px 10px rgba(5,150,105,.25); transition: filter .15s, transform .1s;
}
.btn:hover, button:hover { filter: brightness(1.08); transform: translateY(-1px); color: #fff; }
.btn:active, button:active { transform: translateY(0); }

/* Barre de recherche / filtres */
.filtres {
    display: flex; gap: 0.6rem; flex-wrap: wrap;
    margin-bottom: 1.2rem; align-items: end;
    background: #fff; padding: 1rem; border-radius: 12px;
    border: 1px solid var(--bordure);
}
.filtres input, .filtres select { width: auto; }

/* Puce de catégorie colorée */
.chip {
    display: inline-block; padding: 3px 12px; border-radius: 20px;
    font-size: .8rem; font-weight: 600; color: #fff; background: var(--primaire);
}

/* Chat */
.chat-fenetre {
    border: 1px solid var(--bordure); border-radius: 12px;
    background: #fff; height: 60vh; display: flex; flex-direction: column;
}
.chat-messages { flex: 1; overflow-y: auto; padding: 1rem; }
.chat-msg { margin-bottom: 0.7rem; }
.chat-msg .meta { font-size: 0.75rem; color: #888; }
.chat-msg.moi { text-align: right; }
.chat-msg.moi .bulle { background: var(--degrade); color: #fff; }
.bulle {
    display: inline-block; padding: 0.5rem 0.8rem;
    border-radius: 14px; background: var(--gris); max-width: 70%;
}
.chat-saisie { display: flex; padding: 0.6rem; border-top: 1px solid var(--bordure); }
.chat-saisie input { flex: 1; margin-right: 0.5rem; }
