
/* Page d'accueil : memes variables, memes panneaux que /admin et /dev */
.home main { max-width:1180px; margin:0 auto; padding:8px 28px 72px; }
.home-top { position:sticky; top:0; z-index:5; background:var(--bg); border-bottom:1px solid var(--edge); }
.home-top-in { padding:12px 28px; display:flex; align-items:center; gap:20px; }
.home-top .brand { flex:1 1 0; min-width:0; }
.home-right { flex:1 1 0; display:flex; align-items:center; justify-content:flex-end; gap:10px; min-width:max-content; }
.home-top .brand { padding:0; color:inherit; text-decoration:none; }
.home-top .brand small { white-space:nowrap; }
#tabs { display:flex; justify-content:center; gap:4px; flex:0 1 auto; overflow-x:auto; }
#tabs a { padding:8px 14px; border-radius:var(--r-md); color:var(--muted); text-decoration:none; font-weight:550; white-space:nowrap; border:1px solid transparent; transition:background-color .15s,color .15s; }
#tabs a:hover { background:var(--inset); color:var(--ink); }
#tabs a[aria-current="page"] { background:var(--glass-hi); border-color:var(--edge); color:var(--ink); font-weight:650; }
.btn { display:inline-block; padding:9px 18px; border-radius:var(--r-md); background:var(--grad); color:var(--on-grad); font-weight:650; text-decoration:none; white-space:nowrap; border:1px solid transparent; transition:background-color .15s; }
.btn:hover { background:var(--grad-hover); }
.btn.ghost { background:var(--inset); color:var(--ink); border-color:var(--edge-hi); font-weight:550; }
.btn.ghost:hover { background:var(--glass-hi); }

.hero { padding:48px 0 28px; }
.hero h1 { font:700 46px/1.1 var(--display); letter-spacing:-.02em; margin:0 0 12px; }
.hero .lead { font-size:19px; margin:0 0 8px; }
.hero .muted { margin:0 0 20px; font-size:15px; }
.hero .badges, .hero .actions { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 20px; }
.hero .actions { gap:10px; margin:0; }

.cols { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:20px; align-items:start; }
.cols > aside { position:sticky; top:84px; }
.features { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:12px; }
.feature { padding:16px; border:1px solid var(--edge); border-radius:var(--r-md); background:var(--inset); }
.feature h3 { font:650 15px/1.3 var(--display); margin:0 0 4px; }
.feature p { margin:0; color:var(--muted); }
.steps { list-style:none; margin:0; padding:0; counter-reset:step; }
.steps li { counter-increment:step; display:grid; grid-template-columns:32px minmax(0,1fr); gap:14px; padding:14px 0; border-top:1px solid var(--edge); }
.steps li:first-child { border-top:0; padding-top:4px; }
.steps li::before { content:counter(step); width:28px; height:28px; border-radius:50%; border:1px solid var(--edge-hi); display:grid; place-items:center; font-weight:650; font-size:13px; background:var(--inset); }
.steps b { display:block; margin-bottom:2px; }
.steps span { color:var(--muted); }
.kv { margin:0; display:grid; gap:12px; }
.kv > div { display:flex; justify-content:space-between; align-items:baseline; gap:12px; padding-bottom:12px; border-bottom:1px solid var(--edge); }
.kv > div:last-child { border-bottom:0; padding-bottom:0; }
.kv dt { color:var(--muted); }
.kv dd { margin:0; font-weight:650; text-align:right; }
.side-actions { display:grid; gap:8px; margin-top:16px; }
.side-actions .btn { text-align:center; }

.entry .card-head { margin-bottom:4px; }
.entry .when { color:var(--muted); font-size:13px; }
.entry .title { margin:0 0 12px; color:var(--muted); }
.changes { list-style:none; margin:0; padding:0; }
.changes li { display:flex; gap:12px; align-items:baseline; padding:8px 0; border-top:1px solid var(--edge); }
.changes li:first-child { border-top:0; }
.changes .badge { flex:none; min-width:78px; justify-content:center; }
.empty { text-align:center; padding:40px 20px; color:var(--muted); }
.empty .btn { margin-top:14px; }
.mod-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:14px; }
.mod-tile { padding:18px; border:1px solid var(--edge); border-radius:var(--r-lg); background:var(--glass); display:flex; flex-direction:column; gap:8px; }
.mod-tile h3 { font:650 16px/1.3 var(--display); margin:0; display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.mod-tile p { margin:0; color:var(--muted); flex:1; overflow-wrap:anywhere; }
.mod-tile .meta { font-size:13px; color:var(--muted); }
.home-foot { max-width:1180px; margin:0 auto; padding:20px 28px 40px; display:flex; flex-wrap:wrap; gap:8px 24px; justify-content:flex-start; color:var(--muted); font-size:13px; border-top:1px solid var(--edge); }
.home-foot a { color:var(--muted); }
.home .msg { margin-top:12px; }
#account { display:flex; align-items:center; gap:10px; }
.who-chip { display:inline-flex; align-items:center; gap:8px; font-weight:600; white-space:nowrap; }
.who-chip img { width:28px; height:28px; border-radius:50%; background:var(--inset); }
#account .btn, #account button { padding:7px 14px; font-size:13px; }


/* ---- pleine largeur, mise en page bento et arrivee harmonieuse ---- */
.home { --ease:cubic-bezier(.16,1,.3,1); }
.home main { max-width:none; padding:8px clamp(20px,4vw,72px) 72px; }
.home-foot { max-width:none; padding-left:clamp(20px,4vw,72px); padding-right:clamp(20px,4vw,72px); }
.hero.compact { padding:34px 0 8px; }
.sec-head { margin:38px 0 18px; }
.sec-head h2 { font:700 clamp(24px,2.2vw,32px)/1.2 var(--display); letter-spacing:-.01em; margin:0 0 6px; }
.sec-head p { margin:0; max-width:80ch; }
.bento { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:clamp(14px,1.6vw,24px); }
.pair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:clamp(16px,2vw,28px); align-items:start; }
.card.tile { margin:0; padding:clamp(22px,2.4vw,32px); }
.card.tile h3 { font:700 clamp(20px,1.7vw,24px)/1.2 var(--display); letter-spacing:-.01em; margin:0 0 4px; }
.card.tile .sub { margin:0 0 18px; color:var(--muted); }
.points { list-style:none; margin:0; padding:0; }
.points li { display:grid; gap:2px; padding:12px 0; border-top:1px solid var(--edge); }
.points li:first-child { border-top:0; padding-top:0; }
.points b { font-weight:650; }
.points span { color:var(--muted); }
.timeline { list-style:none; margin:0; padding:0; counter-reset:step; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:clamp(16px,2.4vw,40px); }
.timeline li { counter-increment:step; position:relative; padding-top:58px; }
.timeline li::before { content:counter(step); position:absolute; top:0; left:0; width:42px; height:42px; border-radius:50%; border:1px solid var(--edge-hi); background:var(--glass-hi); display:grid; place-items:center; font:700 16px var(--font); }
.timeline li::after { content:""; position:absolute; top:20px; left:56px; right:-12px; height:2px; background:linear-gradient(90deg, var(--edge-hi), transparent); }
.timeline li:last-child::after { display:none; }
.timeline b { display:block; margin-bottom:4px; font:650 17px var(--display); }
.timeline span { color:var(--muted); }
.cta { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:18px 32px; padding:clamp(22px,2.4vw,34px); }
.cta h2 { margin:0 0 4px; font:700 clamp(20px,1.8vw,26px)/1.2 var(--display); display:block; }
.cta p { margin:0; }
.cta .actions { display:flex; flex-wrap:wrap; gap:10px; }

/* reflet de phares : une bande de lumiere traverse les cartes (sans rien deborder) */
.home .card:not(:has(table)) { position:relative; overflow:hidden; }
.home .card:not(:has(table))::after { content:""; position:absolute; inset:0; pointer-events:none; background:linear-gradient(105deg, transparent 38%, rgba(255,255,255,.09) 50%, transparent 62%); transform:translateX(-130%); opacity:0; }

/* premiere arrivee (apres l'intro) */
html.stage .home-top { animation:dropIn .9s var(--ease) .3s both; }
html.stage #page > div > *:not(.bento) { animation:riseIn .95s var(--ease) both; }
html.stage #page > div > :nth-child(1):not(.bento) { animation-delay:520ms; }
html.stage #page > div > :nth-child(2):not(.bento) { animation-delay:670ms; }
html.stage #page > div > :nth-child(3):not(.bento) { animation-delay:820ms; }
html.stage #page > div > :nth-child(4):not(.bento) { animation-delay:970ms; }
html.stage #page > div > :nth-child(5):not(.bento) { animation-delay:1120ms; }
html.stage #page > div > :nth-child(6):not(.bento) { animation-delay:1270ms; }
html.stage #page > div > :nth-child(7):not(.bento) { animation-delay:1420ms; }
html.stage .bento .card { animation:cardIn 1.1s var(--ease) both; }
html.stage .bento .card:nth-child(1) { animation-delay:.9s; }
html.stage .bento .card:nth-child(2) { animation-delay:1.05s; }
html.stage .bento .card:nth-child(3) { animation-delay:1.2s; }
html.stage .bento li { animation:itemIn .7s var(--ease) both; }
html.stage .bento .card:nth-child(1) li:nth-child(1) { animation-delay:1380ms; }
html.stage .bento .card:nth-child(1) li:nth-child(2) { animation-delay:1460ms; }
html.stage .bento .card:nth-child(1) li:nth-child(3) { animation-delay:1540ms; }
html.stage .bento .card:nth-child(2) li:nth-child(1) { animation-delay:1530ms; }
html.stage .bento .card:nth-child(2) li:nth-child(2) { animation-delay:1610ms; }
html.stage .bento .card:nth-child(2) li:nth-child(3) { animation-delay:1690ms; }
html.stage .bento .card:nth-child(3) li:nth-child(1) { animation-delay:1680ms; }
html.stage .bento .card:nth-child(3) li:nth-child(2) { animation-delay:1760ms; }
html.stage .bento .card:nth-child(3) li:nth-child(3) { animation-delay:1840ms; }
html.stage .timeline li { animation:itemIn .8s var(--ease) both; }
html.stage .timeline li:nth-child(1) { animation-delay:1.5s; }
html.stage .timeline li:nth-child(2) { animation-delay:1.62s; }
html.stage .timeline li:nth-child(3) { animation-delay:1.74s; }
html.stage .timeline li:nth-child(4) { animation-delay:1.86s; }
html.stage .home .card:not(:has(table))::after { animation:sweep 1.6s ease-in-out both; animation-delay:2300ms; }
html.stage .bento .card:nth-child(1)::after { animation-delay:1870ms; }
html.stage .bento .card:nth-child(2)::after { animation-delay:2040ms; }
html.stage .bento .card:nth-child(3)::after { animation-delay:2210ms; }
html.stage .home-foot { animation:fadeIn 1s ease-out 1.6s both; }

/* changement d'onglet : meme geste, plus court */
html.live #page > div > *:not(.bento) { animation:riseIn .7s var(--ease) both; }
html.live #page > div > :nth-child(1):not(.bento) { animation-delay:0ms; }
html.live #page > div > :nth-child(2):not(.bento) { animation-delay:70ms; }
html.live #page > div > :nth-child(3):not(.bento) { animation-delay:140ms; }
html.live #page > div > :nth-child(4):not(.bento) { animation-delay:210ms; }
html.live #page > div > :nth-child(5):not(.bento) { animation-delay:280ms; }
html.live #page > div > :nth-child(6):not(.bento) { animation-delay:350ms; }
html.live #page > div > :nth-child(7):not(.bento) { animation-delay:420ms; }
html.live .bento .card { animation:cardIn .9s var(--ease) both; }
html.live .bento .card:nth-child(1) { animation-delay:.05s; }
html.live .bento .card:nth-child(2) { animation-delay:.18s; }
html.live .bento .card:nth-child(3) { animation-delay:.31s; }
html.live .home .card:not(:has(table))::after { animation:sweep 1.4s ease-in-out .8s both; }

@keyframes dropIn { from { opacity:0; transform:translate3d(0,-14px,0); } to { opacity:1; transform:none; } }
@keyframes riseIn { from { opacity:0; transform:translate3d(0,28px,0); } to { opacity:1; transform:none; } }
@keyframes cardIn { from { opacity:0; transform:translate3d(0,46px,0) scale(.975); } to { opacity:1; transform:none; } }
@keyframes itemIn { from { opacity:0; transform:translate3d(0,12px,0); } to { opacity:1; transform:none; } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes sweep { 0% { opacity:1; transform:translateX(-130%); } 100% { opacity:1; transform:translateX(130%); } }

@media (prefers-reduced-motion: reduce) {
  html.stage *, html.live *, html.stage *::after, html.live *::after { animation:none !important; }
}

/* ---- page About, tableaux de versions, pied de page compact ---- */
.stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:clamp(14px,1.6vw,24px); margin:0 0 20px; }
.card.stat { margin:0; display:grid; gap:4px; padding:22px 24px; align-content:start; }
.stat .label { color:var(--muted); font-size:13px; }
.stat .value { font:700 clamp(26px,2.4vw,34px)/1.1 var(--display); letter-spacing:-.01em; }
.stat .sub { color:var(--muted); font-size:13px; }
.pair.even { align-items:stretch; }
.links { display:grid; }
.links a { display:grid; gap:2px; padding:14px 0; border-top:1px solid var(--edge); color:inherit; text-decoration:none; }
.links a:first-child { border-top:0; padding-top:0; }
.links b { font-weight:650; }
.links span { color:var(--muted); }
.links a:hover b { text-decoration:underline; text-underline-offset:3px; }
.vtable { table-layout:fixed; }
.vtable th:nth-child(1) { width:22%; }
.vtable th:nth-child(2) { width:20%; }
.vtable th:nth-child(4) { width:24%; }
.home { display:flex; flex-direction:column; }
.home main { flex:1 0 auto; padding-bottom:40px; }
.home-foot { flex:none; width:100%; margin:0; padding-top:14px; padding-bottom:18px; max-height:64px; overflow:hidden; }

/* ---- en-tete : choix de langue compact et menu de compte ---- */
.seg { display:inline-flex; gap:2px; padding:3px; border:1px solid var(--edge-hi); border-radius:var(--r-md); background:var(--inset); }
.seg button, #lang button { padding:5px 10px; font-size:12px; font-weight:650; background:transparent; color:var(--muted); border:0; border-radius:7px; }
.seg button:hover:not(:disabled) { background:var(--glass-hi); color:var(--ink); }
.seg button[aria-pressed="true"] { background:var(--glass-hi); color:var(--ink); box-shadow:inset 0 0 0 1px var(--edge-hi); }
#account { position:relative; }
#account .avatar-btn { width:38px; height:38px; padding:0; border-radius:50%; background:var(--inset); color:var(--ink); border:1px solid var(--edge-hi); display:grid; place-items:center; overflow:hidden; font-size:15px; }
#account .avatar-btn:hover:not(:disabled) { background:var(--glass-hi); }
#account .avatar-btn img { width:100%; height:100%; object-fit:cover; display:block; }
#account .menu { position:absolute; right:0; top:calc(100% + 10px); min-width:240px; padding:8px; background:var(--glass-hi); border:1px solid var(--edge-hi); border-radius:var(--r-md); z-index:30; animation:uiFade .18s ease-out; }
#account .menu .who { display:grid; gap:2px; padding:8px 10px 10px; margin-bottom:6px; border-bottom:1px solid var(--edge); }
#account .menu .who code { color:var(--muted); font-size:12px; }
#account .menu a, #account .menu button { display:block; width:100%; text-align:left; padding:9px 10px; border-radius:7px; background:transparent; color:var(--ink); border:0; font:inherit; font-weight:550; text-decoration:none; font-size:14px; }
#account .menu a:hover, #account .menu button:hover:not(:disabled) { background:var(--inset); }

@media (max-width: 1300px) { .home-top .brand small { display:none; } }
@media (max-width: 1100px) { .stats { grid-template-columns:repeat(2,minmax(0,1fr)); } .bento { grid-template-columns:repeat(2,minmax(0,1fr)); } .timeline { grid-template-columns:repeat(2,minmax(0,1fr)); row-gap:28px; } .timeline li:nth-child(2)::after { display:none; } .bento .card:nth-child(3) { grid-column:1 / -1; } }
@media (max-width: 1180px) {
  .home-top-in { flex-wrap:wrap; gap:10px 16px; padding:10px 20px; }
  #tabs { order:3; flex:1 0 100%; justify-content:flex-start; }
  .home-top .brand, .home-right { flex:0 1 auto; }
  .home-right { margin-left:auto; min-width:0; flex-wrap:wrap; justify-content:flex-end; }
}
@media (max-width: 900px) {
  .home-top-in { flex-wrap:wrap; gap:10px 16px; padding:10px 16px; }
  #tabs { order:3; flex:1 0 100%; justify-content:flex-start; }
  .home-top .brand, .home-right { flex:0 1 auto; }
  .home-right { margin-left:auto; flex-wrap:wrap; justify-content:flex-end; }
  .home main { padding:4px 16px 56px; }
  .hero { padding:28px 0 20px; }
  .hero h1 { font-size:36px; }
  .cols { grid-template-columns:minmax(0,1fr); }
  .bento, .pair { grid-template-columns:minmax(0,1fr); }
  .timeline { grid-template-columns:minmax(0,1fr); gap:20px; }
  .timeline li::after { display:none; }
  .home main { padding:4px 16px 56px; }
  .cols > aside { position:static; }
  .home-top .brand small { display:none; }
  .home-foot { padding:16px 16px 32px; }
  #account { order:2; }
}
