/* ==========================================================================
   EcoVivo, espace client : feuille de style
   Alignee sur la charte du site ecovivo.fr : fond vert profond, bandeau
   pilule avec logo, panneaux clairs flottants.
   Polices : Lora (titres), Raleway (corps), Quicksand (legendes).
   ========================================================================== */

:root {
    --sauge:   #6F8B6B;
    --foret:   #2E4635;
    --bronze:  #D5B58F;
    --ocre:    #C89A4A;
    --brun:    #9B6A3A;
    --creme:   #F6F5F2;
    --texte:   #1E1E1C;

    --panneau: rgba(255, 255, 255, 0.94);
    --ligne:   rgba(30, 30, 28, 0.12);

    --ombre:       0 18px 45px rgba(18, 24, 20, 0.18);
    --ombre-douce: 0 12px 30px rgba(18, 24, 20, 0.12);

    --police-titre:   'Lora', Georgia, serif;
    --police-corps:   'Raleway', 'Segoe UI', sans-serif;
    --police-legende: 'Quicksand', 'Segoe UI', sans-serif;

    --largeur: 920px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--police-corps);
    color: var(--creme);
    line-height: 1.6;
    /* Meme fond que le site principal : degrades doux sur vert profond. */
    background:
        radial-gradient(ellipse 1100px 650px at 25% -5%, rgba(111, 171, 120, 0.26), transparent 58%),
        radial-gradient(ellipse 700px 500px at 88% 18%, rgba(213, 181, 143, 0.18), transparent 52%),
        radial-gradient(ellipse 800px 550px at 12% 90%, rgba(159, 181, 159, 0.12), transparent 58%),
        #1f2e26;
    background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.conteneur { width: min(var(--largeur), calc(100% - 48px)); margin: 0 auto; }

/* --- Bandeau superieur (pilule logo + actions) --- */
.topbar { position: sticky; top: 18px; z-index: 100; margin-top: 18px; }

.topbar-inner {
    width: min(var(--largeur), calc(100% - 48px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(213, 181, 143, 0.45);
    border: 1px solid rgba(20, 24, 22, 0.18);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(10px);
}

.topbar-brand { display: flex; align-items: center; gap: 10px; }
.topbar-brand img { width: 45px; height: 45px; border-radius: 50%; }
.brand-texte { display: flex; flex-direction: column; line-height: 1.15; }
.brand-nom {
    font-family: var(--police-titre);
    font-weight: 600;
    font-size: 20px;
    letter-spacing: 0.6px;
    color: var(--texte);
}
.brand-tag {
    font-family: var(--police-legende);
    font-size: 13px;
    color: rgba(17, 20, 19, 0.72);
}

.topbar-actions { display: flex; align-items: center; gap: 14px; }
.topbar-nom {
    font-family: var(--police-legende);
    font-size: 14px;
    color: rgba(17, 20, 19, 0.82);
}
.topbar-cta {
    padding: 9px 16px;
    border-radius: 999px;
    background: rgba(17, 20, 19, 0.82);
    color: var(--creme);
    font-family: var(--police-legende);
    font-weight: 600;
    font-size: 14px;
    border: 1px solid rgba(20, 24, 22, 0.14);
}
.topbar-cta:hover { background: rgba(17, 20, 19, 0.92); }

/* --- Contenu et panneaux --- */
.contenu { padding: 40px 0 70px; }

.carte {
    background: var(--panneau);
    color: var(--texte);
    border: 1px solid rgba(20, 24, 22, 0.10);
    border-radius: 28px;
    padding: 34px 38px;
    box-shadow: var(--ombre);
}
.carte-etroite { max-width: 460px; margin: 0 auto; }

h1 {
    font-family: var(--police-titre);
    font-weight: 600;
    font-size: 2rem;
    color: var(--foret);
    margin: 0 0 14px;
}

.chapeau { font-size: 1.1rem; color: var(--brun); margin: 0 0 20px; }

.note {
    color: var(--foret);
    border-left: 3px solid var(--sauge);
    padding-left: 14px;
    margin: 0 0 22px;
    opacity: 0.85;
}

.etat { font-family: var(--police-legende); font-size: 0.95rem; color: var(--foret); }

.badge {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 999px;
    font-family: var(--police-legende);
    font-size: 0.85rem;
    color: #fff;
}
.badge-ok      { background: var(--sauge); }
.badge-attente { background: var(--ocre); }

.lien {
    color: var(--brun);
    font-weight: 600;
    border-bottom: 1px solid var(--ocre);
}
.lien:hover { color: var(--ocre); }

/* --- Boutons (pilule sombre, comme le site) --- */
.bouton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border-radius: 999px;
    background: rgba(17, 20, 19, 0.86);
    color: var(--creme);
    font-family: var(--police-legende);
    font-weight: 700;
    font-size: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: var(--ombre-douce);
    cursor: pointer;
    transition: background 0.15s ease;
}
.bouton:hover { background: rgba(17, 20, 19, 0.94); }

/* --- Formulaire --- */
.formulaire {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 22px 0;
}
.formulaire label {
    font-family: var(--police-legende);
    font-size: 0.9rem;
    color: var(--sauge);
}
.formulaire input[type="email"] {
    font-family: var(--police-corps);
    font-size: 1rem;
    padding: 12px 14px;
    border: 1px solid var(--ligne);
    border-radius: 12px;
    background: #fff;
    color: var(--texte);
}
.formulaire input[type="email"]:focus {
    outline: none;
    border-color: var(--sauge);
    box-shadow: 0 0 0 3px rgba(111, 139, 107, 0.18);
}
.formulaire .bouton { margin-top: 6px; }

.note-legende {
    font-family: var(--police-legende);
    font-size: 0.85rem;
    color: var(--sauge);
    margin: 0;
}

/* --- Liste des projets --- */
.liste-projets { list-style: none; margin: 22px 0 0; padding: 0; }
.projet {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid var(--ligne);
}
.projet:last-child { border-bottom: none; }
.projet-nom { font-weight: 600; color: var(--texte); }
.projet-adresse { color: var(--sauge); font-size: 0.9rem; }
.projet .badge { margin-left: auto; }

/* --- Elements du back-office et de la consultation --- */
h2 {
    font-family: var(--police-titre);
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--foret);
    margin: 0 0 12px;
}

.admin-tete {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* Champs de saisie etendus (texte, date, select, zone de texte) */
.formulaire input[type="text"],
.formulaire input[type="date"],
.formulaire input[type="file"],
.formulaire select,
.formulaire textarea {
    font-family: var(--police-corps);
    font-size: 1rem;
    padding: 11px 14px;
    border: 1px solid var(--ligne);
    border-radius: 12px;
    background: #fff;
    color: var(--texte);
    width: 100%;
}
.formulaire textarea { resize: vertical; }
.formulaire input:focus,
.formulaire select:focus,
.formulaire textarea:focus {
    outline: none;
    border-color: var(--sauge);
    box-shadow: 0 0 0 3px rgba(111, 139, 107, 0.18);
}
.case {
    flex-direction: row !important;
    align-items: center;
    gap: 8px;
    display: flex;
    color: var(--texte);
    font-family: var(--police-corps);
}
.case input { width: auto; }

/* Bouton discret en forme de lien (retrait, etc.) */
.lien-bouton {
    background: none;
    border: none;
    color: var(--brun);
    font-family: var(--police-legende);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

/* Lien dans le bandeau */
.topbar-lien {
    font-family: var(--police-legende);
    font-size: 14px;
    color: rgba(17, 20, 19, 0.82);
    border-bottom: 1px solid var(--bronze);
}

/* Tableaux */
.tableau { width: 100%; border-collapse: collapse; margin-top: 6px; }
.tableau th {
    text-align: left;
    font-family: var(--police-legende);
    font-size: 0.85rem;
    color: var(--sauge);
    border-bottom: 2px solid var(--ligne);
    padding: 8px 10px;
}
.tableau td {
    padding: 10px;
    border-bottom: 1px solid var(--ligne);
    vertical-align: top;
}

/* Pastilles de statut */
.statut {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 999px;
    font-family: var(--police-legende);
    font-size: 0.82rem;
    color: #fff;
    white-space: nowrap;
}
.statut-ouverte        { background: var(--brun); }
.statut-en_cours       { background: var(--ocre); }
.statut-levee_declaree { background: #6C8EA8; }
.statut-levee_validee  { background: var(--sauge); }
.statut-rejetee        { background: #B4553F; }

/* Actions d arbitrage */
.actions-statut { display: flex; flex-wrap: wrap; gap: 10px; }

/* Contributions */
.contribution {
    border-left: 3px solid var(--bronze);
    padding: 8px 0 8px 14px;
    margin-bottom: 14px;
}
.contribution-tete {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
    color: var(--foret);
}
.contribution-date {
    margin-left: auto;
    font-family: var(--police-legende);
    font-size: 0.78rem;
    color: var(--sauge);
}

/* Galerie de photos */
.galerie { display: flex; flex-wrap: wrap; gap: 10px; }
.galerie img {
    width: 140px;
    height: 105px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--ligne);
}

/* Historique */
.historique { list-style: none; margin: 0; padding: 0; }
.historique li {
    padding: 8px 0;
    border-bottom: 1px solid var(--ligne);
    color: var(--texte);
    font-size: 0.92rem;
}
.historique li:last-child { border-bottom: none; }
.historique-date {
    font-family: var(--police-legende);
    font-size: 0.78rem;
    color: var(--sauge);
    margin-right: 8px;
}
.historique-qui { color: var(--sauge); }
.historique-com {
    margin-top: 3px;
    color: var(--foret);
    font-style: italic;
}

/* --- Pied --- */
.pied {
    padding: 26px 0 34px;
    font-family: var(--police-legende);
    font-size: 0.85rem;
    color: rgba(246, 245, 242, 0.6);
    text-align: center;
}
