/* ===================================================================
   FINALO HUB — Design system
   Charte : bleu #015B97 · orange #F39F01
   Typo   : Fraunces (titres, éditorial) + Inter (texte/UI)
   =================================================================== */
:root {
  --blue:        #015B97;
  --blue-900:    #013453;
  --blue-800:    #01426b;
  --blue-700:    #024e82;
  --blue-100:    #cfe3f1;
  --blue-50:     #eaf2f9;
  --orange:      #f39f01;
  --orange-600:  #d98c00;
  --orange-50:   #fdf3df;

  --ink:         #10222f;
  --body:        #384a56;
  --muted:       #6b7d8a;
  --line:        #e5eaef;
  --bg:          #f4f7fa;
  --card:        #ffffff;

  --ok:          #16855a;
  --warn:        #b7791f;
  --danger:      #c23b28;

  --radius:      16px;
  --radius-sm:   10px;
  --shadow:      0 10px 30px rgba(1, 66, 107, .07);
  --shadow-lg:   0 24px 60px rgba(1, 66, 107, .14);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--sans); color: var(--body);
  background: var(--bg); line-height: 1.65; font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-800); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); line-height: 1.12; font-weight: 600; letter-spacing: -.01em; margin: 0 0 .5em; }
p { margin: 0 0 1rem; }

.container { width: min(1160px, 92%); margin-inline: auto; }
.narrow { max-width: 720px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .82rem 1.5rem; border-radius: 999px; font-family: var(--sans);
  font-weight: 600; font-size: .98rem; border: 1.5px solid transparent;
  cursor: pointer; transition: .18s ease; line-height: 1;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--orange); color: #3a2600; box-shadow: 0 8px 20px rgba(243,159,1,.28); }
.btn-primary:hover { background: var(--orange-600); color: #3a2600; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-800); color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-outline { border-color: var(--line); color: var(--blue); background: #fff; }
.btn-outline:hover { border-color: var(--blue); }
.btn-sm { padding: .5rem 1rem; font-size: .85rem; }

/* Puce triangle orange (motif de marque) */
.tri { display:inline-block; width:0; height:0; border-left:6px solid transparent;
  border-right:6px solid transparent; border-bottom:11px solid var(--orange); vertical-align: middle; }

.eyebrow {
  display:inline-flex; align-items:center; gap:.55rem;
  text-transform: uppercase; letter-spacing: .16em; font-size: .76rem;
  font-weight: 700; color: var(--orange); font-family: var(--sans);
}
.eyebrow.on-blue { color: var(--orange); }

/* ---------- En-tête public ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60; background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding: .6rem 0; gap: 1rem; }
.logo-img { height: 38px; width: auto; }
.site-header .logo-img { height: 56px; }
@media (max-width: 600px){ .site-header .logo-img { height: 44px; } }
.nav { display: flex; align-items: center; gap: .3rem; }
.nav a.link { color: var(--ink); padding: .5rem .85rem; border-radius: 8px; font-weight: 500; font-size: .96rem; }
.nav a.link:hover { color: var(--blue); background: var(--blue-50); }
.menu-toggle { display:none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1200px 600px at 80% -10%, #0a6fb4 0%, var(--blue) 45%, var(--blue-900) 100%);
}
.hero::after {
  content:""; position:absolute; right:-120px; top:-60px; width:520px; height:520px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><polygon points='50,8 92,92 8,92' fill='none' stroke='%23F39F01' stroke-width='2' opacity='.5'/></svg>") no-repeat center/contain;
  opacity: .25; pointer-events:none;
}
.hero .container { position: relative; z-index: 2; padding: 5.5rem 0 6rem; }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 5vw, 3.8rem); max-width: 15ch; margin-bottom: 1.1rem; }
.hero .lead { font-size: 1.22rem; color: #d9e8f4; max-width: 56ch; }
.hero .actions { margin-top: 2rem; display: flex; gap: .8rem; flex-wrap: wrap; }

.hero-strip { border-top: 1px solid rgba(255,255,255,.14); margin-top: 3rem; padding-top: 1.6rem;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 1.5rem; }
.hero-strip .item { color:#cfe3f1; font-size:.95rem; }
.hero-strip .item strong { display:block; font-family: var(--serif); font-size:1.5rem; color:#fff; }

/* ---------- Sections ---------- */
section.block { padding: 5rem 0; }
section.block.tight { padding: 3.5rem 0; }
.section-head { max-width: 640px; margin-bottom: 3rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin-top:.4rem; }
.section-head p { color: var(--muted); font-size: 1.1rem; }

.grid { display: grid; gap: 1.5rem; }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.cols-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* Cartes services */
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.9rem; box-shadow: var(--shadow); transition: .2s; position: relative;
}
.feature:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: var(--blue-100); }
.feature .ficon {
  width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center;
  background: var(--blue-50); color: var(--blue); margin-bottom: 1.1rem;
}
.feature .ficon svg { width: 26px; height: 26px; }
.feature h3 { font-size: 1.25rem; margin-bottom: .5rem; }
.feature p { color: var(--muted); margin: 0; font-size: .98rem; }

/* Cartes membres (page publique Notre équipe) */
.member { display: flex; gap: 1.3rem; align-items: flex-start; }
.member-photo {
  flex: none; width: 96px; height: 96px; border-radius: 50%; overflow: hidden;
  background: var(--blue-50); display: grid; place-items: center;
  border: 3px solid var(--blue-100);
}
.member-photo img { width: 100%; height: 100%; object-fit: cover; }
.member-initials { font-family: var(--serif); font-size: 2rem; font-weight: 600; color: var(--blue); }
.member-role { color: var(--orange-600); font-weight: 600; font-size: .95rem; margin: 0; }
@media (max-width: 520px){ .member { flex-direction: column; align-items: center; text-align: center; } }

/* Bloc "approche" numéroté */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 4.2rem; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: -.2rem; font-family: var(--serif); font-size: 1.7rem;
  color: var(--orange); font-weight: 600;
}
.step h3 { font-size: 1.2rem; margin-bottom: .35rem; }
.step p { color: var(--muted); font-size: .96rem; }

/* Secteurs / tags */
.tags { display: flex; flex-wrap: wrap; gap: .6rem; }
.tag { background:#fff; border:1px solid var(--line); border-radius: 999px; padding: .5rem 1.1rem;
  font-size: .92rem; color: var(--ink); font-weight: 500; }
.tag .tri { margin-right:.4rem; }

/* Bande bleue (valeurs / méthodo) */
.band-blue { background: linear-gradient(135deg, var(--blue-900), var(--blue)); color:#fff; }
.band-blue h2, .band-blue h3 { color:#fff; }
.band-blue .value { border-left: 2px solid var(--orange); padding-left: 1.1rem; }
.band-blue .value strong { display:block; font-family: var(--serif); font-size:1.15rem; margin-bottom:.2rem; }
.band-blue .value p { color:#c9dcec; font-size:.95rem; margin:0; }

/* CTA */
.cta-box {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 3rem; text-align: center; position: relative; overflow: hidden;
}
.cta-box::before { content:""; position:absolute; inset:0 0 auto 0; height:5px; background: var(--orange); }

/* Formulaire */
.form-row { margin-bottom: 1.05rem; display: flex; flex-direction: column; }
.form-row label { font-weight: 600; margin-bottom: .4rem; color: var(--ink); font-size: .93rem; }
.form-row input, .form-row textarea, .form-row select {
  padding: .8rem .95rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; font-size: .98rem; background: #fff; color: var(--ink); width: 100%;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-50);
}
.help { color: var(--muted); font-size: .85rem; margin-top:.3rem; }

.messages { list-style: none; padding: 0; margin: 0 0 1.2rem; }
.messages li { padding: .85rem 1.1rem; border-radius: var(--radius-sm); margin-bottom: .6rem; font-size:.95rem; }
.messages .success { background:#e7f5ee; color:#0f6b43; border:1px solid #bfe3d0; }
.messages .error, .messages .danger { background:#fdece9; color:#9a2c1c; border:1px solid #f3c8bf; }
.messages .warning { background:#fdf3df; color:#8a5a0a; border:1px solid #f2dca6; }
.messages .info { background: var(--blue-50); color: var(--blue-800); border:1px solid var(--blue-100); }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--blue-900); color: #b9cfe0; padding: 3.5rem 0 2rem; margin-top: 4rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--orange); }
.site-footer .logo-img { height: 42px; margin-bottom: 1rem; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1rem; }
.site-footer p, .site-footer li { font-size: .95rem; }
.site-footer .fine { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.5rem; padding-top: 1.4rem; font-size: .85rem; color: #7f9bb2; display:flex; justify-content:space-between; flex-wrap:wrap; gap:.5rem; }

/* ===================================================================
   ESPACE DE TRAVAIL (collaboratif)
   =================================================================== */
.app { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar { background: var(--blue-900); color: #b9cfe0; padding: 1.5rem 1rem; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar .logo-img { height: 34px; margin: .3rem .6rem 1.6rem; }
.sidebar .group-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .12em; color: #6f8aa3; margin: 1.1rem .8rem .4rem; }
.sidebar nav a { display: flex; align-items: center; gap: .7rem; color: #c3d6e6; padding: .62rem .8rem; border-radius: 10px; margin-bottom: .12rem; font-weight: 500; font-size: .95rem; }
.sidebar nav a svg { width: 18px; height: 18px; opacity: .85; }
.sidebar nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar nav a.active { background: var(--blue); color: #fff; }
.sidebar nav a.active svg { opacity: 1; }
.sidebar .spacer { flex: 1; }
.side-user { border-top: 1px solid rgba(255,255,255,.12); padding-top: 1rem; margin-top: 1rem; display:flex; align-items:center; gap:.65rem; }
.side-user .avatar { flex: none; }
.side-user .meta { font-size: .82rem; line-height:1.3; }
.side-user .meta strong { color:#fff; display:block; }
.side-user .meta a { color:#9fb8cc; }

.app-main { padding: 2rem 2.4rem 3rem; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap:1rem; margin-bottom: 1.8rem; flex-wrap: wrap; }
.topbar h1 { font-size: 1.7rem; margin: 0; }
.topbar .sub { color: var(--muted); font-size: .95rem; }
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: .5rem; }
.breadcrumb a { color: var(--muted); }

.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--blue); color:#fff;
  display: grid; place-items: center; font-weight: 700; font-size: .8rem; font-family: var(--sans); flex:none; text-transform: uppercase; }
.avatar.sm { width: 26px; height: 26px; font-size: .68rem; }
.avatar.lg { width: 46px; height: 46px; font-size: 1rem; }
.avatar-stack { display:flex; }
.avatar-stack .avatar { margin-left: -8px; border: 2px solid #fff; }
.avatar-stack .avatar:first-child { margin-left: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1.1rem; margin-bottom: 1.8rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.35rem; box-shadow: var(--shadow); }
.stat .label { color: var(--muted); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.stat .value { font-family: var(--serif); font-size: 1.85rem; color: var(--blue-900); margin-top: .35rem; line-height:1; }
.stat .value small { font-family: var(--sans); font-size: .8rem; color: var(--muted); font-weight:600; }
.stat .value.ok { color: var(--ok); } .stat .value.warn { color: var(--warn); } .stat .value.danger { color: var(--danger); }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1.6rem; overflow: hidden; }
.panel > header { display:flex; justify-content:space-between; align-items:center; gap:.5rem; padding: 1rem 1.35rem; border-bottom: 1px solid var(--line); }
.panel > header h2 { font-family: var(--sans); font-size: 1.02rem; font-weight: 700; margin: 0; color: var(--ink); }
.panel .body { padding: 1.35rem; }
.panel .body.flush { padding: 0; }

table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: left; padding: .8rem 1.35rem; border-bottom: 1px solid var(--line); font-size: .93rem; }
table.list th { color: var(--muted); font-weight: 600; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; background: #fbfcfe; }
table.list tbody tr:hover { background: #fafcfe; }
table.list tr:last-child td { border-bottom: none; }
table.list a { font-weight: 600; }

.badge { display: inline-block; padding: .2rem .65rem; border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .01em; }
.badge.en_cours { background: var(--blue-50); color: var(--blue); }
.badge.termine, .badge.accepte, .badge.fait { background:#e7f5ee; color: var(--ok); }
.badge.en_pause, .badge.envoye, .badge.proposition { background:#fdf3df; color: var(--warn); }
.badge.prospection, .badge.brouillon, .badge.a_faire { background:#eef1f4; color: var(--muted); }
.badge.annule, .badge.refuse { background:#fdece9; color: var(--danger); }
.badge.haute { background:#fdece9; color: var(--danger); }
.badge.normale { background: var(--blue-50); color: var(--blue); }
.badge.basse { background:#eef1f4; color: var(--muted); }
.badge.retard { background:#fdece9; color: var(--danger); }

.progress { height: 7px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), #0a6fb4); }

.filetype { flex:none; width:38px; height:38px; border-radius:9px; background: var(--blue-50); color: var(--blue); display:grid; place-items:center; font-size:.62rem; font-weight:800; letter-spacing:.02em; }

/* Mini graphique d'évolution (barres CSS) */
.chart { display:flex; align-items:flex-end; gap:1rem; height:180px; padding-top:.5rem; }
.chart .col { flex:1; display:flex; flex-direction:column; align-items:center; gap:.4rem; height:100%; }
.chart .bars { flex:1; display:flex; align-items:flex-end; gap:4px; width:100%; justify-content:center; }
.chart .bar { width:16px; border-radius:5px 5px 0 0; min-height:2px; }
.chart .bar.in { background: linear-gradient(180deg, #1aa6a0, #16855a); }
.chart .bar.out { background: linear-gradient(180deg, #f0a94a, var(--danger)); }
.chart .mlabel { font-size:.78rem; color: var(--muted); }
.chart-legend { display:flex; gap:1.2rem; font-size:.82rem; color:var(--muted); margin-top:.6rem; }
.chart-legend span { display:inline-flex; align-items:center; gap:.4rem; }
.dot-in, .dot-out { width:10px; height:10px; border-radius:3px; display:inline-block; }
.dot-in { background:#16855a; } .dot-out { background: var(--danger); }

.catbar { margin-bottom:.9rem; }
.catbar .top { display:flex; justify-content:space-between; font-size:.9rem; margin-bottom:.3rem; }
.catbar .track { height:8px; background: var(--line); border-radius:999px; overflow:hidden; }
.catbar .fill { height:100%; background: linear-gradient(90deg, var(--blue), #0a6fb4); }

.empty { color: var(--muted); padding: 2rem; text-align: center; }
.empty .tri { margin-bottom:.6rem; }

/* Kanban tâches */
.kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.kcol { background: #f7f9fc; border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem; }
.kcol h3 { font-family: var(--sans); font-size: .82rem; text-transform: uppercase; letter-spacing:.05em; color: var(--muted); display:flex; justify-content:space-between; margin-bottom:.8rem; }
.kcard { background:#fff; border:1px solid var(--line); border-radius: var(--radius-sm); padding: .8rem .9rem; margin-bottom:.7rem; box-shadow: 0 2px 6px rgba(1,66,107,.05); }
.kcard .t { font-weight: 600; color: var(--ink); font-size:.92rem; margin-bottom:.5rem; }
.kcard .foot { display:flex; justify-content:space-between; align-items:center; }
.kcard form { display:inline; }
.linkbtn { background:none; border:none; color: var(--blue); cursor:pointer; font-size:.8rem; font-weight:600; padding:0; }
.linkbtn:hover { text-decoration: underline; }

/* Fil d'activité / commentaires */
.feed { list-style:none; margin:0; padding:0; }
.feed li { display:flex; gap:.8rem; padding:1rem 0; border-bottom:1px solid var(--line); }
.feed li:last-child { border-bottom:none; }
.feed .c-body { flex:1; }
.feed .c-head { font-size:.9rem; margin-bottom:.15rem; }
.feed .c-head strong { color: var(--ink); }
.feed .c-head time { color: var(--muted); font-size:.82rem; margin-left:.4rem; }
.feed .c-text { font-size:.95rem; color: var(--body); }

.info-list { list-style:none; margin:0; padding:0; }
.info-list li { display:flex; justify-content:space-between; gap:1rem; padding:.6rem 0; border-bottom:1px solid var(--line); font-size:.93rem; }
.info-list li:last-child { border-bottom:none; }
.info-list .k { color: var(--muted); }
.info-list .v { color: var(--ink); font-weight:600; text-align:right; }

.two-col { display:grid; grid-template-columns: 2fr 1fr; gap:1.6rem; align-items:start; }

.chip-row { display:flex; gap:.5rem; flex-wrap:wrap; align-items:center; }

/* Responsive */
@media (max-width: 900px){
  .two-col { grid-template-columns: 1fr; }
  .kanban { grid-template-columns: 1fr; }
}
@media (max-width: 860px){
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: column; }
  .sidebar .spacer { display:none; }
  .nav .link { display:none; }
  .site-footer .cols { grid-template-columns: 1fr; }
}
