/* =========================================================
   madeinangers-base.css
   Socle commun à TOUTES les pages de l'espace participant :
   charte (variables), typographie, gabarit (menu latéral, barre mobile,
   bandeau, pied de page). Chargé aussi par les pages qui utilisent
   encore css/style.css : les noms de classes ne recoupent pas Bootstrap.
   ========================================================= */
/* ---------- 1. Charte : à ajuster ici uniquement ---------- */
:root{
  --brand:        #E4253F;   /* rouge bandeau */
  --brand-dark:   #B91C33;
  --brand-soft:   #FDECEF;
  --ink:          #1B1C1F;
  --ink-2:        #4A4D55;
  --muted:        #80848C;
  --bg:           #F4F3F1;
  --surface:      #FFFFFF;
  --surface-2:    #FAF9F7;
  --line:         #E5E2DE;
  --ok:           #1F8A5B;
  --ok-soft:      #E6F4ED;
  --wait:         #A86400;
  --wait-soft:    #FDF1DE;
  --ko:           #6B6F76;
  --ko-soft:      #EEEDEB;
  --radius:       12px;
  --radius-sm:    8px;
  --sidebar-w:    272px;
  --font:         "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --shadow:       0 10px 40px rgba(20,20,22,.16);
}

/* ---------- 2. Base ---------- */
*{box-sizing:border-box}
html,body{margin:0}
body{
  font-family:var(--font);font-size:15px;line-height:1.55;
  color:var(--ink);background:var(--bg);
  -webkit-font-smoothing:antialiased;
}
a{color:var(--brand-dark)}
svg{flex-shrink:0}
[hidden]{display:none !important}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.muted{color:var(--muted)}
.small{font-size:13px}

/* ---------- 3. Structure ---------- */
.app{display:flex;min-height:100vh;background:linear-gradient(to right,var(--surface) calc(var(--sidebar-w) - 1px),var(--line) calc(var(--sidebar-w) - 1px),var(--line) var(--sidebar-w),transparent var(--sidebar-w))}
@media (max-width:960px){.app{background:none}}

.sidebar{
  width:var(--sidebar-w);background:var(--surface);
  border-right:1px solid var(--line);
  display:flex;flex-direction:column;
  position:sticky;top:0;height:100vh;overflow-y:auto;z-index:30;
}
.sidebar__brand{display:flex;align-items:center;gap:10px;padding:22px 22px 18px;border-bottom:1px solid var(--line)}
.brand-mark{font-family:var(--font-display);font-weight:700;font-size:21px;line-height:.95;text-transform:uppercase;letter-spacing:.01em}
.brand-mark span{color:var(--brand)}
.brand-tag{margin-left:auto;font-size:11px;font-weight:600;color:var(--brand-dark);background:var(--brand-soft);padding:3px 8px;border-radius:999px;white-space:nowrap}

.user{display:flex;align-items:center;gap:12px;padding:16px 22px;border-bottom:1px solid var(--line)}
.avatar{
  width:38px;height:38px;border-radius:50%;
  background:var(--ink);color:#fff;display:grid;place-items:center;
  font-weight:600;font-size:14px;flex-shrink:0;
}
.avatar--soft{background:var(--bg);color:var(--ink)}
.avatar--sm{width:30px;height:30px;font-size:12px}
.user__name{font-weight:600;font-size:14px;line-height:1.2}
.user__logout{font-size:12.5px;color:var(--muted);text-decoration:none}
.user__logout:hover{color:var(--brand)}

.menu{padding:12px 12px 20px;flex:1}
.menu__group{margin-top:14px}
.menu__label{font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);padding:0 10px 6px}
.menu a{
  display:flex;align-items:center;gap:11px;
  padding:8px 10px;border-radius:var(--radius-sm);
  color:var(--ink-2);text-decoration:none;font-weight:500;
}
.menu a:hover{background:var(--bg);color:var(--ink)}
.menu a.is-active{background:var(--brand-soft);color:var(--brand-dark);font-weight:600}
.menu a .icon{color:var(--muted)}
.menu a.is-active .icon{color:var(--brand)}
.menu .sub a{padding-left:39px;font-size:14px;font-weight:400}
.menu .sub a.is-active{font-weight:600}
.menu .count{
  margin-left:auto;font-size:11px;font-weight:600;
  min-width:20px;height:20px;padding:0 6px;border-radius:999px;
  background:var(--brand);color:#fff;display:grid;place-items:center;
}

.sidebar__foot{padding:16px 22px;border-top:1px solid var(--line)}
.lang{display:inline-flex;border:1px solid var(--line);border-radius:999px;padding:3px}
.lang a{font:600 12px var(--font);color:var(--muted);text-decoration:none;padding:5px 12px;border-radius:999px}
.lang a[aria-current="true"]{background:var(--ink);color:#fff}

.main{flex:1;min-width:0;display:flex;flex-direction:column}
.topbar{
  display:none;align-items:center;gap:12px;
  padding:12px 16px;background:var(--surface);border-bottom:1px solid var(--line);
  position:sticky;top:0;z-index:20;
}
.burger{
  border:1px solid var(--line);background:var(--surface);
  width:40px;height:40px;border-radius:var(--radius-sm);
  display:grid;place-items:center;cursor:pointer;color:var(--ink);
}
.content{width:100%;max-width:1120px;margin:0 auto;padding:28px 36px 56px}
.banner{display:block;width:100%;height:auto;border-radius:var(--radius);background:var(--brand)}

.footer{
  margin-top:auto;padding:18px 36px;font-size:12.5px;color:var(--muted);
  display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;
  border-top:1px solid var(--line);background:var(--surface);
}


/* Icônes du gabarit (le reste des icônes est stylé dans madeinangers.css) */
.sidebar .icon,.topbar .icon{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.menu .sub a .icon{display:none}
.menu .flag{width:18px;height:auto;border-radius:2px}
.lang img{display:none}
.sidebar__pub{padding:12px 22px;overflow:hidden}
.sidebar__pub ul{list-style:none;margin:0;padding:0;display:flex;width:300%}
.sidebar__pub img{display:block;max-width:100%;height:auto}
.maintenance-flag{background:#C62828 !important;color:#fff}
.brand-mark{overflow-wrap:anywhere}

/* Gabarit : version mobile */
@media (max-width:960px){
  .sidebar{position:fixed;left:0;top:0;transform:translateX(-100%);transition:transform .25s ease,visibility .25s;visibility:hidden}
  .sidebar.is-open{transform:none;visibility:visible;box-shadow:var(--shadow)}
  .scrim{position:fixed;inset:0;background:rgba(20,20,22,.4);opacity:0;pointer-events:none;transition:opacity .25s;z-index:25}
  .scrim.is-open{opacity:1;pointer-events:auto}
  .topbar{display:flex}
  .content{padding:20px 16px 40px}
  .footer{padding:16px}
}
@media (max-width:700px){
  .banner{border-radius:var(--radius-sm)}
}
@media print{
  .sidebar,.topbar,.footer,.banner,.scrim,.noprint,.no-print{display:none !important}
  body{background:#fff}
  .content{padding:0;max-width:none}
}
