
/* === Marquises Agrégats — charte TAHAUKU (#94301c) ===
   Thème couleur brique ; polices Aleo (titres), Cooper Hewitt (labels),
   Montserrat (corps). */

@font-face { font-family:"Aleo"; src:url("fonts/aleo-v16-latin-regular.ttf"); font-weight:400; font-display:swap; }
@font-face { font-family:"Aleo"; src:url("fonts/aleo-v16-latin-700.ttf"); font-weight:700; font-display:swap; }
@font-face { font-family:"Aleo"; src:url("fonts/aleo-v16-latin-italic.ttf"); font-style:italic; font-display:swap; }
@font-face { font-family:"Cooper Hewitt"; src:url("fonts/CooperHewitt-Book.otf"); font-weight:400; font-display:swap; }
@font-face { font-family:"Cooper Hewitt"; src:url("fonts/CooperHewitt-Bold.otf"); font-weight:700; font-display:swap; }
@font-face { font-family:"Montserrat"; src:url("fonts/Montserrat-Regular.ttf"); font-weight:400; font-display:swap; }
@font-face { font-family:"Montserrat"; src:url("fonts/Montserrat-Bold.ttf"); font-weight:700; font-display:swap; }

* { box-sizing: border-box; }
:root { --brique:#94301c; --orange:#f58a3c; --orangefonce:#c05a26; --texte:#424043; }
body { font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
       font-size: 15px; line-height: 1.65; color: var(--texte); margin: 0; padding: 0; background: #f9f9f7; }
.wrapper { max-width: 920px; margin: 0 auto; padding: 22px 16px 80px 16px; }
.wrapper.wide { max-width: none; padding: 18px 22px 46px; }

/* === Drawer accordéon === */
aside.tk-drawer { position: fixed; top: 0; left: 0; width: 220px; height: 100vh;
    background: #94301c; color: #fff; display: flex; flex-direction: column;
    box-shadow: 2px 0 6px rgba(0,0,0,0.12); z-index: 50;
    transform: translateX(0); transition: transform 0.22s ease; }
aside.tk-drawer .tk-nav { flex: 1 1 auto; overflow-y: auto; padding: 14px 0 10px; }
.tk-brand { padding: 4px 18px 16px; border-bottom: 1px solid rgba(255,255,255,0.12); margin-bottom: 10px;
    display: flex; align-items: center; gap: 10px; }
.tk-brand img { width: 40px; height: 40px; object-fit: contain; background:#fff; border-radius:6px; padding:3px; flex:0 0 auto; }
.tk-brand-txt { display:flex; flex-direction:column; }
.tk-brand-title { display: block; font-family:"Aleo",serif; font-size: 16px; font-weight: 700; letter-spacing: 0.4px; color: #fff; line-height:1.1; }
.tk-brand-sub { display: block; font-size: 11px; margin-top: 2px; color: #f0c9a8; font-weight: 500; }
.tk-home { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none;
    padding: 11px 16px; font-size: 14.5px; font-weight: 600; border-left: 3px solid transparent; }
.tk-home:hover { background: rgba(255,255,255,0.08); border-left-color: #f58a3c; }
.tk-home.active { background: rgba(245,138,60,0.18); border-left-color: #f58a3c; font-weight: 700; }
.tk-group > summary { list-style: none; cursor: pointer; display: flex; align-items: center;
    justify-content: space-between; padding: 12px 16px; font-family:"Cooper Hewitt",sans-serif; font-size: 12px; text-transform: uppercase;
    letter-spacing: 0.6px; font-weight: 700; color: #f0c9a8; border-left: 3px solid transparent; user-select: none; }
.tk-group > summary::-webkit-details-marker { display: none; }
.tk-group > summary:hover { background: rgba(255,255,255,0.08); color: #fff; }
.tk-group > summary::after { content: ''; width: 7px; height: 7px; flex: 0 0 auto; margin-left: 8px;
    border-right: 1.5px solid #f0c9a8; border-bottom: 1.5px solid #f0c9a8;
    transform: rotate(45deg) translateY(-2px); transition: transform 0.2s ease, border-color 0.2s ease; }
.tk-group[open] > summary { color: #fff; }
.tk-group[open] > summary::after { transform: rotate(225deg) translateY(-2px); border-color: #f58a3c; }
.tk-group ul { list-style: none; margin: 0; padding: 0 0 6px; }
.tk-group li { margin: 0; }
.tk-group a { display: block; color: #f5e7dc; text-decoration: none; padding: 9px 16px 9px 26px;
    font-size: 14px; font-weight: 500; border-left: 3px solid transparent; }
.tk-group a:hover { background: rgba(255,255,255,0.08); border-left-color: #f58a3c; color: #fff; }
.tk-group a.active { background: rgba(245,138,60,0.18); border-left-color: #f58a3c; color: #fff; font-weight: 700; }
.tk-drawer-footer { flex: 0 0 auto; padding: 12px; border-top: 1px solid rgba(255,255,255,0.12); }
.tk-zip { display: flex; align-items: center; justify-content: center; gap: 8px; background: #f58a3c;
    color: #7a2413; text-decoration: none; text-align: center; padding: 11px 12px; border-radius: 6px;
    font-size: 13.5px; font-weight: 700; line-height: 1.25; }
.tk-zip:hover { background: #f79c58; }
.tk-drawer-toggle { position: fixed; top: 12px; left: 12px; z-index: 60; background: #94301c;
    color: #fff; border: 0; border-radius: 4px; padding: 6px 12px; font-size: 18px; cursor: pointer;
    display: none; box-shadow: 0 2px 4px rgba(0,0,0,0.18); }
.tk-drawer-toggle:hover { background: #ac3c26; }
.tk-drawer-backdrop { position: fixed; inset: 0; z-index: 45; background: rgba(0,0,0,0.45); display: none; }
@media (min-width: 1100px) { body { margin-left: 220px; } }
@media (max-width: 1099px) {
    aside.tk-drawer { transform: translateX(-100%); box-shadow: none; }
    .tk-nav-cb:checked ~ aside.tk-drawer { transform: translateX(0); box-shadow: 2px 0 12px rgba(0,0,0,0.35); }
    .tk-nav-cb:checked ~ .tk-drawer-backdrop { display: block; }
    .tk-drawer-toggle { display: flex; align-items: center; justify-content: center; }
    .wrapper { padding-top: 54px; }
}

/* === Titres / contenu === */
h1 { font-family:"Aleo",serif; font-size: 27px; color: #94301c; margin-top: 0; }
h1 .num { color: #c05a26; }
h1.sec { border-bottom: 2px solid #94301c; padding-bottom: 6px; }
h2 { font-family:"Aleo",serif; font-size: 22px; color: #94301c; margin-top: 38px; padding: 6px 0; border-bottom: 2px solid #94301c; }
h3 { font-family:"Aleo",serif; font-size: 17px; color: #4a4a48; margin-top: 26px; }
h4 { font-size: 15px; color: #94301c; margin-top: 14px; }
p { margin: 0 0 10px; }
ul, ol { margin: 4px 0 12px; padding-left: 24px; }
li { margin-bottom: 5px; }
strong { color: #94301c; }
.lead { font-size: 17px; color: #94301c; font-style: normal; line-height: 1.6; margin-bottom: 16px; }
.lead b, .lead strong { color:#94301c; }
.small { font-size: 12.5px; color: #8a7b70; }
table { border-collapse: collapse; width: 100%; margin: 8px 0 16px; font-size: 14.5px; background: white; }
.tablewrap { overflow-x: auto; margin: 8px 0 16px; }
.tablewrap table { margin: 0; }
th { background: #94301c; color: #fbeee1; font-family:"Cooper Hewitt",sans-serif; font-weight: 700; padding: 7px 10px; text-align: left;
    border: .5px solid #7a2413; font-size: 12.5px; letter-spacing:.3px; }
td { padding: 6px 10px; border: .5px solid #e6d9c4; vertical-align: top; }
tbody tr:nth-child(even) td, table tr:nth-child(even) td { background: #fbf6ef; }
td.num, th.num, td.r, th.r { text-align: right; white-space: nowrap; }
td b, td strong { color:#94301c; }
.tot td { background: #f3d9cf !important; font-weight: bold; color: #94301c; }
.callout { border-left: 4px solid #f58a3c; background: #f2ece2; padding: 12px 16px; margin: 14px 0; font-size: 14px; border-radius:0 6px 6px 0; }
.callout h4 { font-family:"Cooper Hewitt",sans-serif; font-weight:700; color:#94301c; font-size:11px; letter-spacing:1px; text-transform:uppercase; margin:0 0 5px; }
.callout p { margin:0; font-size:13.5px; color:#5a5248; }
.warn { border-left: 4px solid #b02a1c; background: #fbf1ef; padding: 10px 14px; margin: 12px 0; font-size: 14px; }
.warn strong { color: #b02a1c; }
.meta { color: #888; font-size: 13px; margin-bottom: 24px; }

/* === cartes accueil === */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.kpi { background: #94301c; color: white; border-radius: 8px; padding: 14px 16px; }
.kpi .v { font-family:"Aleo",serif; font-size: 22px; font-weight: 700; color: #ffd9b3; line-height:1.1; }
.kpi .l { font-size: 12.5px; margin-top: 4px; line-height:1.4; }
.card { background: white; border: 1px solid #e6d9c4; border-radius: 8px; padding: 16px 18px; margin: 12px 0;
        box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.conf { border-left: 4px solid #c05a26; background: #f2ece2; color: #7a3417; padding: 10px 14px;
        font-size: 13px; border-radius: 4px; margin: 14px 0; }
footer { margin-top: 44px; font-size: 12px; color: #8a7f70; border-top: 1px solid #e6d9c4; padding-top: 10px; line-height:1.6; }
.quicklinks { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 14px 0; }
.quicklinks a { display: block; background: white; border: 1px solid #e6d9c4; border-radius: 8px;
        padding: 13px 15px; text-decoration: none; color: #94301c; font-weight: 700; font-size: 14.5px; }
.quicklinks a small { display: block; color: #667; font-weight: 400; font-size: 12px; margin-top: 3px; }
.quicklinks a:hover { border-color: #f58a3c; background: #f2ece2; }

/* === fact tiles (repris du deck) === */
.factrow { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:14px; margin:14px 0; }
.fact { background:#fff; border:1px solid #e6d9c4; border-radius:9px; padding:14px 16px; }
.fact .n { font-family:"Aleo",serif; font-weight:700; font-size:24px; color:#94301c; line-height:1.05; }
.fact .l { font-size:12px; color:#6b6258; margin-top:6px; line-height:1.4; }

/* === hero accueil === */
.hero { background:#94301c; color:#fff; border-radius:12px; padding:34px 30px 30px; margin:0 0 6px;
    position:relative; overflow:hidden; }
.hero .kicker { font-family:"Cooper Hewitt",sans-serif; font-weight:700; letter-spacing:3px; text-transform:uppercase;
    font-size:11.5px; color:#f58a3c; }
.hero h1 { font-family:"Aleo",serif; font-weight:700; font-size:42px; color:#fff; margin:10px 0 0; line-height:1.02; letter-spacing:.5px; }
.hero .rule { height:4px; width:120px; background:#f58a3c; margin:16px 0 0; }
.hero .sub { font-family:"Aleo",serif; font-size:20px; color:#ffd9b3; margin-top:16px; line-height:1.3; }
.hero .part { font-size:13.5px; color:#f3d9cf; margin-top:10px; letter-spacing:.4px; }
.hero .logo { position:absolute; right:26px; top:26px; width:118px; height:82px; background:#fff; border-radius:8px;
    display:flex; align-items:center; justify-content:center; box-shadow:0 2px 8px rgba(0,0,0,.22); }
.hero .logo img { max-width:100px; max-height:66px; }
@media (max-width:640px){ .hero .logo { display:none; } .hero h1 { font-size:32px; } }

/* === documents + visionneuse === */
.titlerow { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.titlerow h1, .titlerow h2 { flex: 1; margin-top: 0; }
.btn { display: inline-block; background: #94301c; color: white; font-weight: 700; text-decoration: none;
       padding: 9px 16px; border-radius: 6px; font-size: 14px; border: none; cursor: pointer; }
.btn:hover { background: #ac3c26; }
.btn.jaune { background: #c05a26; }
.btn.jaune:hover { background: #a94c1f; }
.btn.ghost { background: white; color: #94301c; border: 1.5px solid #94301c; }
a.doc { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-decoration: none;
        color: #94301c; font-weight: 600; padding: 13px 15px; border: 1px solid #e6d9c4;
        border-radius: 6px; margin: 8px 0; background: white; cursor: pointer; }
a.doc:hover { border-color: #f58a3c; background: #f2ece2; }
a.doc .m { color: #667; font-size: 12.5px; font-weight: 400; text-align: right; }
.altlinks { font-size: 12.5px; color: #667; margin: -4px 0 10px 4px; }
.altlinks a { color: #94301c; }

/* === accueil : aperçus de documents === */
.covergrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 14px 0 6px; }
a.coverdoc { display: flex; flex-direction: column; align-items: center; text-align: center;
    text-decoration: none; color: #94301c; background: white; border: 1px solid #e6d9c4;
    border-radius: 8px; padding: 14px 12px 12px; box-shadow: 0 1px 3px rgba(0,0,0,.05);
    transition: border-color .15s, box-shadow .15s, transform .15s; cursor: pointer; }
a.coverdoc:hover { border-color: #f58a3c; box-shadow: 0 4px 14px rgba(148,48,28,.16); transform: translateY(-2px); }
a.coverdoc img { width: 100%; max-width: 150px; height: auto; border: 1px solid #cfc4b8; border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,.18); background: #fff; }
a.coverdoc .t { font-size: 13.5px; font-weight: 800; margin-top: 10px; line-height: 1.22; }
a.coverdoc .m { font-size: 11px; color: #8a7f70; font-weight: 500; margin-top: 3px; }
@media (max-width: 820px) { .covergrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .covergrid { grid-template-columns: 1fr; }
    a.coverdoc { flex-direction: row; align-items: center; gap: 14px; text-align: left; }
    a.coverdoc img { width: 84px; max-width: 84px; flex: 0 0 auto; }
    a.coverdoc .t { margin-top: 0; } }

/* === deux colonnes apports (repris du deck) === */
.cols2 { display:grid; grid-template-columns:1fr 1fr; gap:18px; margin:14px 0; }
@media (max-width:720px){ .cols2 { grid-template-columns:1fr; } }
.cols2 .c { border:1px solid #e6d9c4; border-radius:10px; overflow:hidden; background:#fff; }
.cols2 .c .head { padding:11px 16px; font-family:"Aleo",serif; font-weight:700; font-size:16px; color:#fff; }
.cols2 .c.taha .head { background:#94301c; }
.cols2 .c.ta .head { background:#c05a26; }
.cols2 .c ul { list-style:none; padding:12px 16px; margin:0; }
.cols2 .c li { font-size:13px; line-height:1.5; color:#544c42; padding:8px 0 8px 18px;
    position:relative; border-bottom:1px dotted #e6d9c4; }
.cols2 .c li:last-child { border-bottom:0; }
.cols2 .c li:before { content:"▸"; position:absolute; left:0; color:#f58a3c; }
.cols2 .c li b, .cols2 .c li strong { color:#94301c; }

/* === schéma capitalistique (montage) === */
.captable { max-width:640px; margin:18px auto; }
.caprow { display:flex; align-items:stretch; gap:14px; margin:10px 0; }
.capnode { flex:1 1 0; border-radius:10px; padding:14px 16px; text-align:center; background:#fff; border:1.5px solid #94301c; }
.capnode.partner { border-color:#c05a26; }
.capnode .t { font-family:"Aleo",serif; font-weight:700; font-size:15px; color:#94301c; }
.capnode.partner .t { color:#c05a26; }
.capnode .s { font-size:11.5px; color:#6b6258; margin-top:4px; line-height:1.4; }
.cappct { align-self:center; font-family:"Aleo",serif; font-weight:700; font-size:22px; color:#94301c;
    background:#f2ece2; border:1px solid #e6d9c4; border-radius:8px; padding:6px 12px; }
.captarget { background:#94301c; color:#fff; border-radius:10px; padding:16px 18px; text-align:center; max-width:420px; margin:8px auto; }
.captarget .t { font-family:"Aleo",serif; font-weight:700; font-size:18px; }
.captarget .s { font-size:12px; color:#f3d9cf; margin-top:5px; }
.capdown { text-align:center; color:#94301c; font-size:24px; line-height:1; margin:4px 0; }
.capaux { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin:16px 0 0; }
@media (max-width:640px){ .capaux { grid-template-columns:1fr; } .caprow { flex-direction:column; } }
.capaux .a { background:#f2ece2; border:1px solid #e6d9c4; border-radius:8px; padding:12px 14px; }
.capaux .a .t { font-family:"Cooper Hewitt",sans-serif; font-weight:700; font-size:13px; color:#94301c; }
.capaux .a .s { font-size:11.5px; color:#5a5248; margin-top:3px; }

/* === barres financement === */
.bar-row { display:flex; align-items:center; margin:10px 0; gap:10px; }
.bar-row .lab { width:250px; flex:0 0 auto; font-size:13px; color:#544c42; }
.bar-row .track { flex:1 1 0; height:22px; background:#f2ece2; border-radius:4px; position:relative; overflow:hidden; }
.bar-row .fill { height:100%; border-radius:4px; }
.bar-row .val { width:90px; flex:0 0 auto; text-align:right; font-family:"Cooper Hewitt",sans-serif; font-weight:700; font-size:12.5px; color:#94301c; }
@media (max-width:640px){ .bar-row { flex-wrap:wrap; } .bar-row .lab { width:100%; } .bar-row .val { width:auto; } }
.fingroup-title { font-family:"Cooper Hewitt",sans-serif; font-weight:700; letter-spacing:1px; text-transform:uppercase;
    font-size:11.5px; margin:24px 0 8px; }
.fingroup-title.o { color:#94301c; } .fingroup-title.b { color:#c05a26; }

/* === liste étapes (calendrier) === */
.steps { counter-reset:st; margin:14px 0; }
.step { position:relative; padding:10px 0 10px 46px; border-bottom:1px dotted #e6d9c4; }
.step:before { counter-increment:st; content:counter(st); position:absolute; left:0; top:10px;
    width:30px; height:30px; border-radius:50%; background:#94301c; color:#fff;
    font-family:"Aleo",serif; font-weight:700; font-size:15px; text-align:center; line-height:30px; }
.step .t { font-family:"Cooper Hewitt",sans-serif; font-weight:700; font-size:14px; color:#94301c; }
.step .d { font-size:13px; color:#5a5248; line-height:1.5; margin-top:3px; }

/* pill "base de discussion" */
.pill { display:inline-block; background:#fff3e0; border:1px solid #f0b060; color:#b45309;
    font-family:"Cooper Hewitt",sans-serif; font-weight:700; font-size:10.5px; letter-spacing:.6px;
    text-transform:uppercase; padding:4px 12px; border-radius:14px; }

/* === visionneuse PDF maison === */
#viewer { position: fixed; inset: 0; z-index: 80; background: rgba(20,15,10,.72); display: none; }
#viewer.open { display: flex; align-items: center; justify-content: center; }
#viewer .box { width: 95vw; height: 95vh; background: #efe9e2; border-radius: 10px; overflow: hidden;
    display: flex; flex-direction: column; box-shadow: 0 12px 48px rgba(0,0,0,.55); }
#viewer .bar { background: #94301c; color: white; display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; flex: 0 0 auto; }
#viewer .bar .name { flex: 1; font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#viewer .bar .pg { font-size: 13px; opacity: .9; white-space: nowrap; }
#viewer .bar a.dl, #viewer .bar a.nw, #viewer .bar button { background: rgba(255,255,255,.15); color: white;
    border: none; border-radius: 5px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer;
    text-decoration: none; font-family: inherit; }
#viewer .bar a.dl { background: #f58a3c; color: #4a1c0e; }
#viewer .bar a.nw:hover, #viewer .bar button:hover { background: rgba(255,255,255,.3); }
#viewer .bar button.close { font-size: 20px; padding: 2px 10px; }
#viewer .body { flex: 1; display: flex; min-height: 0; }
#viewer .thumbs { width: 168px; flex: 0 0 auto; overflow-y: auto; background: #e4dbd0; padding: 10px; }
#viewer .thumbs img { width: 100%; display: block; margin-bottom: 8px; border: 2px solid transparent;
    border-radius: 3px; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.2); background: white; }
#viewer .thumbs img.cur { border-color: #f58a3c; }
#viewer .stage { flex: 1; overflow: auto; display: flex; justify-content: center; align-items: flex-start;
    padding: 18px; background: #d9cfc3; }
#viewer .stage img { max-width: 100%; height: auto; box-shadow: 0 3px 14px rgba(0,0,0,.3); background: white; }
#viewer .nav { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 2; }
#viewer .nav button { background: rgba(148,48,28,.95); color: white; border: none; border-radius: 20px;
    padding: 8px 18px; font-size: 14px; font-weight: 700; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
#viewer .nav button:disabled { opacity: .35; cursor: default; }
@media (max-width: 640px) { #viewer .thumbs { display: none; } #viewer .box { width: 100vw; height: 100vh; border-radius: 0; } }

/* === sommaire de page === */
.pagenav { display: none; position: fixed; top: 84px; right: 18px; width: 216px;
    max-height: calc(100vh - 130px); overflow-y: auto; background: white;
    border: 1px solid #e6d9c4; border-radius: 8px; padding: 12px 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05); z-index: 30; }
.pagenav .t { font-family:"Cooper Hewitt",sans-serif; font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
    color: #94301c; font-weight: 700; margin-bottom: 7px; }
.pagenav a { display: block; color: #4a4a48; text-decoration: none; font-size: 12.5px;
    padding: 4px 0 4px 8px; border-left: 2px solid #eee2d7; line-height: 1.35; }
.pagenav a:hover { color: #94301c; border-left-color: #f58a3c; }
@media (min-width: 1560px) { .pagenav { display: block; } }

@media (max-width: 640px) { body { font-size: 14.5px; } h1 { font-size: 22px; } h2 { font-size: 19px; } }
