:root {
    /* Couleurs liturgiques chrétiennes */
    --bleu: #8a3340;          /* rouge bordeaux adouci (Pentecôte, sang du Christ) */
    --bleu-fonce: #5f222c;    /* bordeaux profond */
    --bleu-clair: #f8ecee;    /* rose très pâle */
    --or: #c9a227;            /* or (gloire, Pâques, Noël) */
    --or-clair: #fbf5dc;
    --texte: #2c2326;
    --gris: #756a6d;
    --bord: #e6d6d9;
    --fond: #faf7f0;          /* ivoire / blanc */
    --blanc: #fff;
    --rouge: #b42318;         /* rouge vif réservé aux erreurs et champs obligatoires */
    --vert: #2f6b3f;          /* vert (temps ordinaire) */
    --rayon: 12px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    color: var(--texte);
    background: var(--fond);
    line-height: 1.55;
}

.wrap { max-width: 880px; margin: 0 auto; padding: 0 1.1rem; }

/* En-tête */
.site-header {
    background: linear-gradient(135deg, var(--bleu-fonce), var(--bleu) 70%, #a5525d);
    color: var(--blanc);
    padding: 2.2rem 0 2rem;
    border-bottom: 5px solid var(--or);
}
.site-header h1 { margin: .2rem 0 .8rem; font-size: clamp(1.5rem, 4vw, 2.1rem); line-height: 1.2; }
.site-header h1 span { font-weight: 400; opacity: .9; }
.eyebrow { margin: 0; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; color: #f1d98a; }
.lead { margin: 0 0 .8rem; font-size: 1.02rem; }
.note {
    margin: 0; padding: .7rem .9rem; font-size: .92rem;
    background: rgba(255,255,255,.1); border-left: 4px solid var(--or); border-radius: 6px;
}

main.wrap { padding-top: 1.5rem; padding-bottom: 2rem; }

/* Progression */
.progress {
    position: sticky; top: 0; z-index: 10;
    background: var(--fond); padding: .6rem 0 .4rem; margin-bottom: 1rem;
}
.progress-bar { height: 6px; background: var(--bord); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: var(--or); transition: width .3s ease; }
.steps {
    list-style: none; margin: .6rem 0 0; padding: 0;
    display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: thin;
}
.steps li { flex: 0 0 auto; }
.steps button {
    border: 1px solid var(--bord); background: var(--blanc); color: var(--bleu);
    padding: .3rem .7rem; border-radius: 999px; font-size: .82rem; cursor: pointer; white-space: nowrap;
}
.steps button.active { background: var(--bleu); color: var(--blanc); border-color: var(--bleu); }
.steps button.done:not(.active) { background: var(--bleu-clair); }
.step-label { margin: .4rem 0 0; font-size: .82rem; color: var(--gris); }

/* Étapes */
.step { display: none; background: var(--blanc); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 1.4rem 1.3rem 1.6rem; }
.step.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.step h2 { margin: 0 0 1rem; color: var(--bleu); font-size: 1.3rem; }
.axe-tag {
    display: inline-block; margin: 0 0 .4rem; padding: .15rem .6rem; border-radius: 999px;
    background: var(--or-clair); color: #8a6212; font-weight: 700; font-size: .78rem; letter-spacing: .06em;
}
.hint { color: var(--gris); font-size: .88rem; margin: .2rem 0 1rem; }
.req { color: var(--rouge); }

/* Champs */
.field { margin-bottom: 1.1rem; border: 0; padding: 0; min-width: 0; }
.field label, .field legend { display: block; font-weight: 600; margin-bottom: .35rem; padding: 0; }
input[type=text], input[type=email], input[type=tel], input[type=password], textarea {
    width: 100%; padding: .65rem .75rem; font: inherit; color: inherit;
    border: 1px solid var(--bord); border-radius: 8px; background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 5.2rem; }
input:focus, textarea:focus { outline: none; border-color: var(--bleu); box-shadow: 0 0 0 3px rgba(138,51,64,.18); }
input.invalid { border-color: var(--rouge); box-shadow: 0 0 0 3px rgba(155,28,46,.14); }
.field-error { color: var(--rouge); font-size: .82rem; margin: .25rem 0 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }

.choices { display: flex; flex-wrap: wrap; gap: .5rem .9rem; align-items: center; }
.choice { display: inline-flex; align-items: center; gap: .4rem; font-weight: 400 !important; margin: 0 !important; cursor: pointer; }
.choice input { width: 1.05rem; height: 1.05rem; accent-color: var(--bleu); }
#structure_autre { max-width: 260px; }
#structure_autre:disabled { background: #f1f3f7; }

/* Sous-thématiques (accordéon) */
.sous-them { border: 1px solid var(--bord); border-radius: 10px; margin-bottom: .8rem; overflow: hidden; }
.sous-them summary {
    display: flex; align-items: center; gap: .7rem; cursor: pointer; list-style: none;
    padding: .75rem .9rem; background: var(--bleu-clair); font-weight: 600; color: var(--bleu-fonce);
}
.sous-them summary::-webkit-details-marker { display: none; }
.sous-them summary::after { content: "▾"; margin-left: auto; transition: transform .2s; }
.sous-them[open] summary::after { transform: rotate(180deg); }
.st-num { background: var(--bleu); color: #fff; border-radius: 6px; padding: .05rem .5rem; font-size: .85rem; }
.st-count { font-size: .76rem; font-weight: 400; color: var(--gris); }
.st-count.has { color: var(--vert); font-weight: 600; }
.st-body { padding: 1rem .9rem .3rem; }

.q label { font-weight: 500; }
.q-type {
    display: block; margin-bottom: .15rem; font-size: .72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em;
}
.q-disposition .q-type { color: var(--bleu); }
.q-appreciation .q-type { color: #a35a00; }
.q-proposition .q-type { color: var(--vert); }
.q-ouverture .q-type { color: #8a6212; }

.ouverture { margin-top: 1.2rem; padding: 1rem .9rem .2rem; background: var(--or-clair); border: 1px dashed var(--or); border-radius: 10px; }

/* Boutons */
.btn {
    display: inline-block; border: 0; border-radius: 8px; padding: .7rem 1.3rem;
    font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--bleu); color: #fff; }
.btn-primary:hover { background: var(--bleu-fonce); }
.btn-ghost { background: #fff; color: var(--bleu); border: 1px solid var(--bord); }
.btn-ghost:hover { background: var(--bleu-clair); }
.btn-lg { padding: .9rem 1.8rem; font-size: 1.05rem; background: var(--or); color: #2a1f03; }
.btn-lg:hover { background: #ad8a1b; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.nav-buttons { display: flex; justify-content: space-between; margin-top: 1rem; }

.summary { background: var(--bleu-clair); border-radius: 8px; padding: .7rem .9rem; font-size: .92rem; }

/* Alertes */
.alert { border-radius: 10px; padding: .9rem 1.1rem; margin-bottom: 1rem; }
.alert-error { background: #fdecea; border: 1px solid #f3b6b0; color: #7a1b12; }
.alert ul { margin: .4rem 0 0 1.1rem; padding: 0; }

.card { background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 1.5rem; }
.thanks { text-align: center; }

/* Anti-spam */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.site-footer { border-top: 3px solid var(--or); margin-top: 1rem; text-align: center; color: var(--gris); font-size: .85rem; padding: 1.5rem 0 2.5rem; }

@media (max-width: 640px) {
    .grid-2 { grid-template-columns: 1fr; }
    .step { padding: 1.1rem .9rem 1.3rem; }
}

/* ===== Administration ===== */
.admin-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.admin-bar form { display: flex; gap: .5rem; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th, table.data td { padding: .6rem .8rem; border-bottom: 1px solid var(--bord); text-align: left; vertical-align: top; }
table.data th { background: var(--bleu-clair); color: var(--bleu-fonce); white-space: nowrap; }
table.data tr:hover td { background: #fafbfe; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.kpi { background: #fff; border: 1px solid var(--bord); border-radius: 10px; padding: .8rem 1rem; }
.kpi b { display: block; font-size: 1.6rem; color: var(--bleu); }
.rep { margin-bottom: 1rem; padding: .7rem .9rem; background: #fff; border: 1px solid var(--bord); border-radius: 8px; }
.rep .qlib { font-weight: 600; margin: 0 0 .3rem; }
.rep .rtxt { margin: 0; white-space: pre-wrap; }
.login-box { max-width: 380px; margin: 3rem auto; }

/* Logo : zone bien visible, centrée, sur médaillon blanc cerclé d'or */
.site-header { text-align: center; position: relative; overflow: hidden; }
.site-header::before {            /* croix décorative en filigrane */
    content: "\271D"; position: absolute; right: 4%; top: -.6rem;
    font-size: 11rem; line-height: 1; color: rgba(201,162,39,.13); pointer-events: none;
}
.site-header .wrap { position: relative; }
.brand {
    display: flex; align-items: center; justify-content: center;
    width: 190px; height: 190px; margin: 0 auto 1.1rem;
    background: #fff; border: 4px solid var(--or); border-radius: 50%;
    box-shadow: 0 0 0 6px rgba(255,255,255,.18), 0 8px 24px rgba(0,0,0,.35);
}
.brand img { display: block; width: 140px; height: auto; max-width: 100%; }
.site-header .note { text-align: left; }
.site-header .lead { text-align: left; }
.login-box .brand { display: none; }
@media (max-width: 640px) {
    .brand { width: 150px; height: 150px; }
    .brand img { width: 108px; }
    .site-header::before { font-size: 7rem; }
}

/* Mention de conception */
.site-footer p { margin: 0 0 .3rem; }
.credit { font-size: .85rem; }
.credit a { color: var(--bleu); font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--or); }
.credit a:hover { color: var(--or); }
