[hidden]{display:none!important}
:root{--bg:#080b0e;--surface:#10151a;--surface-2:#161c22;--surface-3:#1d242c;--line:#29323b;--text:#f4f1ee;--muted:#b7bcc0;--accent:#ff7f70;--accent-2:#e76f63;--accent-soft:rgba(255,127,112,.16);--dark:#090c0f;--success:#77c991;--danger:#eb6969;--shadow:0 18px 48px rgba(0,0,0,.28);--radius:18px}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,Arial,Helvetica,sans-serif;line-height:1.55}a{color:inherit;text-decoration:none}img{max-width:100%;display:block}button,input,textarea,select{font:inherit}h1,h2,h3,p{margin-top:0}h1{letter-spacing:-.05em}h2,h3{letter-spacing:-.02em}.grow{flex:1;min-width:0}
.topbar{height:78px;position:sticky;top:0;z-index:50;display:flex;align-items:center;gap:34px;padding:0 max(calc((100vw - 1240px)/2),28px);background:var(--accent);color:#111518;border-bottom:1px solid rgba(0,0,0,.14)}.brand{height:100%;display:flex;align-items:center;font-weight:900;font-size:1.28rem;letter-spacing:.14em}.cube{height:18px;width:18px;border:3px solid #111518;border-radius:4px;margin-right:12px;position:relative}.cube:after{content:"";position:absolute;inset:4px;background:#111518}.main-nav{height:100%;display:flex;align-items:center;gap:5px;flex:1}.main-nav a{height:100%;display:flex;align-items:center;padding:0 15px;font-weight:700;color:rgba(15,18,21,.76);border-bottom:4px solid transparent}.main-nav a:hover,.main-nav a.active{color:#101418;border-bottom-color:#101418;background:rgba(0,0,0,.06)}.account{display:flex;gap:10px;align-items:center;white-space:nowrap}.account-button,.account-quiet{padding:10px 16px;border-radius:12px;font-weight:800}.account-button{background:#101418;color:var(--accent)}.account-quiet{border:1px solid rgba(0,0,0,.22)}
.site-main{width:min(1240px,calc(100% - 46px));margin:34px auto 70px}.footer{border-top:1px solid var(--line);color:var(--muted);padding:26px;text-align:center}.footer strong{color:var(--accent)}.flash{padding:14px 18px;margin-bottom:22px;border:1px solid rgba(119,201,145,.45);background:rgba(119,201,145,.1);border-radius:13px}.flash.error{border-color:rgba(235,105,105,.5);background:rgba(235,105,105,.12);color:#ffb0b0}
.hero,.explore-hero,.detail-hero,.private-hero{position:relative;overflow:hidden;border:1px solid var(--line);background:var(--surface);border-radius:26px;margin-bottom:28px;box-shadow:var(--shadow)}.hero{min-height:342px;padding:65px 76px;display:flex;align-items:center}.hero:after{content:"";position:absolute;right:-5px;top:-16px;width:224px;height:180px;border-radius:0 0 0 160px;background:var(--accent);opacity:.9}.hero-backdrop{position:absolute;inset:0;background-size:cover;background-position:center;opacity:.2}.hero-backdrop:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,var(--surface) 24%,rgba(16,21,26,.8) 60%,rgba(16,21,26,.45))}.hero-text{position:relative;z-index:1;max-width:760px}.eyebrow{color:var(--accent);font-size:.78rem;font-weight:900;letter-spacing:.22em;text-transform:uppercase;margin:0 0 14px}.hero h1,.explore-hero h1{font-size:clamp(3rem,6vw,4.8rem);line-height:1.04;margin:0 0 16px}.subtitle{font-size:clamp(1.08rem,2.2vw,1.35rem);color:#dad6d3;max-width:720px;margin:0}.edit-page{position:absolute;z-index:2;top:22px;right:22px;border:1px solid var(--accent);background:#201616;color:var(--accent);font-weight:800;padding:13px 19px;border-radius:12px}.edit-page:hover{background:var(--accent);color:#131619}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:28px;margin-bottom:28px}.panel-header{display:flex;gap:20px;align-items:flex-start;justify-content:space-between;margin-bottom:24px}.panel-header h1,.panel-header h2{margin:0 0 7px}.panel-header p{margin:0;color:var(--muted)}.grid{display:grid;gap:27px}.grid.two{grid-template-columns:1fr 1fr}.grid.three{grid-template-columns:repeat(3,1fr)}.formatted{color:#d7d6d5}.formatted p:last-child{margin-bottom:0}.formatted h2{margin:24px 0 10px;color:var(--text)}.formatted ul{padding-left:22px}.intro-panel{display:flex;gap:28px;align-items:center;justify-content:space-between}.intro-panel .formatted{max-width:760px}.intro-inline{margin-top:13px;max-width:720px}.empty{padding:28px;border:1px dashed #34404a;color:var(--muted);border-radius:14px;text-align:center}
.primary,.secondary,.danger{border:0;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:13px 18px;border-radius:11px;font-weight:800;transition:.15s}.primary{background:var(--accent);color:#101418}.primary:hover{background:#ff9186}.secondary{background:var(--surface-2);color:var(--text);border:1px solid var(--line)}.secondary:hover{border-color:var(--accent)}.danger{background:rgba(235,105,105,.12);color:#ff9191;border:1px solid rgba(235,105,105,.45)}.compact{padding:9px 13px;font-size:.92rem}.button-row,.actions,.actions-end{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.actions-end{justify-content:flex-end;align-self:end}.link-accent{color:var(--accent);font-weight:800;display:inline-flex;align-items:center;min-height:44px}.tag{border:1px solid var(--line);background:var(--surface-2);border-radius:999px;padding:5px 11px;font-size:.76rem;letter-spacing:.08em;text-transform:uppercase;font-weight:800;color:#e5e1dc}.tag.salmon{border-color:rgba(255,127,112,.4);background:var(--accent-soft);color:var(--accent)}.tag.green{border-color:rgba(119,201,145,.4);background:rgba(119,201,145,.12);color:var(--success)}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.field{display:flex;flex-direction:column;gap:8px}.field.full{grid-column:1/-1}.field label,.check{font-weight:700;color:#dcd8d4}.field small{color:var(--muted)}input:not([type=checkbox]):not([type=color]),textarea,select{width:100%;background:#0b0f13;border:1px solid #303943;border-radius:10px;padding:12px 13px;color:var(--text);outline:0}input:focus,textarea:focus,select:focus{border-color:var(--accent)}textarea{min-height:92px;resize:vertical}.check{display:flex;gap:9px;align-items:center;align-self:center}.check input{accent-color:var(--accent)}.editor-panel{border-color:rgba(255,127,112,.34);background:#12171c}.editor-toolbar{display:flex;gap:5px;flex-wrap:wrap;padding:8px;background:#0b0f13;border:1px solid #303943;border-radius:10px 10px 0 0}.editor-toolbar button{border:1px solid var(--line);background:var(--surface-2);color:var(--text);border-radius:7px;padding:6px 11px;cursor:pointer}.rich-editor{min-height:190px;background:#0b0f13;border:1px solid #303943;border-top:0;border-radius:0 0 10px 10px;padding:15px;color:#dedbd7;outline:0}.delete-line{margin-top:20px;padding-top:20px;border-top:1px solid var(--line)}
.event{display:flex;align-items:flex-start;gap:17px;border-top:1px solid var(--line);padding:16px 0}.event:first-of-type{border-top:0;padding-top:0}.event-date{min-width:57px;background:var(--accent-soft);color:var(--accent);font-weight:900;border-radius:10px;padding:9px;text-align:center}.event h3{margin:0 0 4px;font-size:1rem}.event p{margin:0;color:var(--muted)}.mini-actions,.row-controls{margin-left:auto;display:flex;gap:7px;align-items:center}.mini-actions a,.row-controls a{font-size:.86rem;color:var(--accent);font-weight:800}.mini-actions form,.row-controls form{display:flex;gap:3px}.mini-actions button,.row-controls button{height:29px;width:29px;border:1px solid var(--line);background:var(--surface-2);color:var(--text);border-radius:7px;cursor:pointer}
.lore-timeline{position:relative;padding:22px 0 45px;margin:10px auto;max-width:1050px}.lore-timeline:before{content:"";position:absolute;top:0;bottom:0;left:50%;width:4px;border-radius:10px;transform:translateX(-50%);background:var(--accent)}.lore-node{position:relative;width:50%;padding:16px 54px 18px 0}.lore-node.right{margin-left:50%;padding:16px 0 18px 54px}.lore-dot{position:absolute;right:-9px;top:70px;width:20px;height:20px;background:#fff;border:4px solid var(--accent);border-radius:50%;z-index:2}.lore-node.right .lore-dot{left:-10px;right:auto}.lore-card{display:block;background:var(--surface);border:1px solid var(--line);border-radius:17px;overflow:hidden;transition:transform .16s,border .16s}.lore-card:hover{transform:translateY(-3px);border-color:var(--accent)}.lore-card img{width:100%;height:220px;object-fit:cover}.lore-card-text{padding:18px}.lore-card time{color:var(--accent);font-weight:900;letter-spacing:.14em;text-transform:uppercase}.lore-card h2{font-size:1.35rem;margin:7px 0}.lore-card p{color:var(--muted);margin:0}.lore-admin{display:flex;gap:8px;align-items:center;margin-top:10px;justify-content:flex-end}.lore-node.right .lore-admin{justify-content:flex-start}.lore-admin a{color:var(--accent);font-weight:800}.lore-admin form{display:flex;gap:4px}.lore-admin button{background:var(--surface-2);border:1px solid var(--line);color:var(--text);border-radius:7px;cursor:pointer}
.detail-hero{min-height:360px;display:grid;grid-template-columns:minmax(270px,430px) 1fr;align-items:stretch}.detail-hero img{height:100%;min-height:360px;width:100%;object-fit:cover}.detail-hero>div{padding:53px 54px;display:flex;flex-direction:column;justify-content:center}.detail-hero h1{font-size:clamp(2.5rem,4.8vw,4rem);line-height:1.06;margin:0 0 16px}.story-page{padding:44px min(6vw,68px)}.story-text{font-size:1.06rem;max-width:850px}.content-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:30px}.content-gallery img{width:100%;height:295px;object-fit:cover;border-radius:13px;border:1px solid var(--line)}.detail-navigation{display:flex;justify-content:space-between;gap:12px;margin:34px 0}.detail-navigation div{display:flex;gap:10px}.detail-columns{display:grid;grid-template-columns:1fr 300px;gap:25px}.detail-aside{height:max-content}.info-row{display:flex;flex-direction:column;gap:5px;border-top:1px solid var(--line);padding:15px 0}.info-row small{color:var(--muted)}.full-button{width:100%;margin-top:17px}
.explore-hero{min-height:285px;padding:50px 62px;display:flex;flex-direction:column;justify-content:center}.explore-hero>*:not(.hero-backdrop){position:relative;z-index:1}.hierarchy-label{font-size:.78rem;font-weight:900;color:var(--accent);letter-spacing:.2em;text-transform:uppercase;margin-bottom:11px}.explore-hero p{color:#d5d1ce;max-width:760px;font-size:1.16rem}.breadcrumb{display:flex;align-items:center;gap:11px;flex-wrap:wrap;margin:0 0 24px;padding:14px 18px;background:var(--surface);border:1px solid var(--line);border-radius:12px;color:var(--muted)}.breadcrumb a:hover{color:var(--accent)}.breadcrumb span:last-child{color:var(--text)}.place-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.place-card{position:relative;border:1px solid var(--line);background:#0d1115;border-radius:16px;overflow:hidden}.place-card>img{width:100%;height:190px;object-fit:cover}.place-body{padding:16px}.place-tags{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:13px}.place-card h3{font-size:1.28rem;margin:0 0 8px}.place-card p{min-height:46px;color:var(--muted);margin:0 0 16px}.card-admin{display:flex;justify-content:space-between;gap:7px;padding:0 16px 16px}.card-admin>a{color:var(--accent);font-weight:800;font-size:.9rem}.card-admin form{margin-left:auto;display:flex;gap:4px}.card-admin button{height:30px;width:31px;background:var(--surface-2);color:var(--text);border:1px solid var(--line);border-radius:7px}
.shop-tabs{display:flex;gap:9px;flex-wrap:wrap;margin:28px 0}.shop-tab{display:flex;flex-direction:column;gap:3px;border:1px solid var(--line);background:#0d1115;padding:13px 22px;border-radius:12px;font-weight:800}.shop-tab small{color:var(--muted);font-size:.72rem}.shop-tab.active,.shop-tab:hover{border-color:var(--accent);background:var(--accent-soft);color:var(--accent)}.selected-shop{max-width:840px;border:1px solid var(--line);border-radius:16px;padding:23px;background:#0c1014}.selected-shop-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:18px}.selected-shop-head h2{margin:0 0 4px}.selected-shop-head p{color:var(--muted);margin:0}.shop-products{border-top:1px solid var(--line)}.shop-product{display:grid;grid-template-columns:45px 1fr auto auto auto;align-items:center;gap:15px;border-bottom:1px solid var(--line);padding:13px 0}.shop-product img{height:42px;width:42px;object-fit:cover;border-radius:8px}.shop-product .stock{color:var(--muted);font-size:.92rem}.shop-product .diamond{color:var(--accent);font-weight:900;min-width:70px;text-align:right}.sale-form{display:flex;gap:10px;align-items:end}.sale-form select{max-width:460px}.sale-form input{max-width:100px}
.private-hero{padding:42px 47px}.private-hero h1{font-size:3.2rem;margin:12px 0}.private-hero p{color:var(--muted);font-size:1.1rem}.private-label{display:inline-flex;padding:7px 12px;border-radius:999px;background:var(--accent-soft);color:var(--accent);font-weight:900;font-size:.77rem;letter-spacing:.1em;text-transform:uppercase}.resource-list{display:flex;flex-direction:column;gap:13px}.resource-card{display:flex;align-items:center;gap:18px;border:1px solid var(--line);background:#0d1115;border-radius:14px;padding:12px}.resource-card img{height:80px;width:112px;object-fit:cover;border-radius:9px}.resource-card h2{font-size:1.14rem;margin:0 0 5px}.resource-card p{margin:0 0 4px;color:var(--muted)}
.admin-layout{display:grid;grid-template-columns:260px 1fr;gap:25px}.admin-sidebar{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:22px;height:max-content;position:sticky;top:102px;display:flex;flex-direction:column;gap:5px}.admin-sidebar h2{margin:0 0 17px}.admin-sidebar a{padding:11px 12px;border-radius:9px;color:var(--muted);font-weight:700}.admin-sidebar a:hover,.admin-sidebar a.active{background:var(--accent-soft);color:var(--accent)}.metric-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:13px;margin:25px 0}.metric{padding:20px;background:var(--surface);border:1px solid var(--line);border-radius:15px}.metric small{display:block;color:var(--muted);margin-bottom:8px}.metric strong{font-size:1.75rem;color:var(--accent)}.quick-links{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.quick{padding:24px;background:var(--surface);border:1px solid var(--line);border-radius:15px}.quick strong{display:block;color:var(--accent);font-size:1.22rem;margin-bottom:7px}.quick span{color:var(--muted)}.revenue{font-size:2rem;color:var(--accent)}.table-wrap{overflow:auto}.table{width:100%;border-collapse:collapse}.table th,.table td{text-align:left;padding:12px;border-bottom:1px solid var(--line)}.table th{color:var(--muted);font-size:.83rem;text-transform:uppercase;letter-spacing:.08em}.inline-form{display:flex;gap:8px;min-width:320px}.login-box{max-width:520px;margin:75px auto;background:var(--surface);border:1px solid var(--line);padding:38px;border-radius:var(--radius)}
.board-panel{padding:25px}.board-head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:20px}.board-head h1{font-size:2.3rem;margin:0 0 9px}.mood-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:13px;background:#0b0f13;border:1px solid var(--line);border-radius:13px;margin-bottom:13px}.mood-controls label{cursor:pointer}.mood-controls .tool.active{background:var(--accent);color:#101418;border-color:var(--accent)}#stroke-color{height:43px;width:45px;border:0;padding:3px;background:var(--surface-2);border-radius:8px}.board-status{margin-left:auto;color:var(--muted)}.board-help{color:var(--muted);font-size:.93rem}.board-viewport{height:min(70vh,720px);min-height:520px;position:relative;overflow:hidden;background-color:#0a0d11;background-image:radial-gradient(#283038 1px,transparent 1px);background-size:30px 30px;border:1px solid var(--line);border-radius:13px;cursor:default}.board-viewport.panning{cursor:grabbing}.board-world{position:absolute;left:0;top:0;transform-origin:0 0;width:4200px;height:2700px}.board-canvas{position:absolute;inset:0}.board-item{position:absolute;border:1px solid transparent;user-select:none}.board-item.selected{border-color:var(--accent)}.board-item img{width:100%;height:100%;object-fit:contain;pointer-events:none}.board-note{height:100%;background:#fee3aa;color:#222;padding:16px;border-radius:4px;box-shadow:0 3px 14px rgba(0,0,0,.24);white-space:pre-wrap}.resize-handle{position:absolute;width:15px;height:15px;right:-8px;bottom:-8px;background:var(--accent);border:2px solid #080a0c;border-radius:4px;display:none}.delete-item{position:absolute;top:-13px;right:-13px;height:25px;width:25px;padding:0;background:#171a1e;color:#fff;border:1px solid var(--accent);border-radius:50%;display:none}.board-item.selected .resize-handle,.board-item.selected .delete-item{display:block}.read-only .resize-handle,.read-only .delete-item{display:none!important}.zoom-readout{min-width:64px;text-align:center;font-weight:800;color:var(--muted)}
@media(max-width:1060px){.place-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-layout,.detail-columns{grid-template-columns:1fr}.admin-sidebar{position:static;display:flex;flex-direction:row;overflow:auto}.admin-sidebar a{white-space:nowrap}.metric-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:780px){.topbar{position:static;height:auto;flex-wrap:wrap;padding:15px 17px;gap:12px}.main-nav{order:3;width:100%;height:48px;overflow-x:auto}.main-nav a{height:48px;white-space:nowrap;padding:0 12px}.site-main{width:calc(100% - 28px);margin:18px auto 48px}.hero{min-height:290px;padding:38px 23px}.hero:after{display:none}.hero h1,.explore-hero h1{font-size:2.7rem}.explore-hero,.private-hero{padding:29px 22px}.grid.two,.form-grid,.place-grid,.quick-links{grid-template-columns:1fr}.panel{padding:18px}.panel-header{flex-direction:column}.lore-timeline:before{left:13px}.lore-node,.lore-node.right{width:100%;margin-left:0;padding:14px 0 14px 46px}.lore-dot,.lore-node.right .lore-dot{left:4px;right:auto;top:60px}.lore-admin,.lore-node.right .lore-admin{justify-content:flex-start}.detail-hero{display:block}.detail-hero img{height:230px;min-height:0}.detail-hero>div{padding:28px 21px}.content-gallery{grid-template-columns:1fr}.shop-product{grid-template-columns:45px 1fr auto}.shop-product .stock{grid-column:2}.shop-product .row-controls{grid-column:1/-1}.selected-shop-head,.detail-navigation{flex-direction:column}.sale-form{flex-direction:column;align-items:stretch}.board-viewport{min-height:430px}.resource-card{flex-wrap:wrap}.metric-grid{grid-template-columns:1fr}}
.board-canvas{z-index:99999}.board-viewport.drawing .board-canvas{cursor:crosshair}
/* Ajustements v4 */
.announcements{max-width:920px;margin-left:auto;margin-right:auto}
.inline-admin-actions{display:flex;justify-content:flex-end;margin:0 0 24px}
.shop-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin:8px 0 30px}
.shop-card-wrap{border:1px solid var(--line);border-radius:16px;background:#0d1115;overflow:hidden}
.shop-card{display:block;border:1px solid transparent;transition:border-color .15s,transform .15s}
.shop-card:hover,.shop-card.active{border-color:var(--accent)}
.shop-card:hover{transform:translateY(-2px)}
.shop-card img{width:100%;height:180px;object-fit:cover}
.shop-card h3{font-size:1.2rem;margin:0;padding:15px 16px 17px}
.shop-card .tag{display:inline-flex;margin:0 16px 16px}
.shop-card-admin{padding:0 16px 13px}
.selected-shop{max-width:none;margin-top:4px}
.board-viewport{touch-action:none}
.board-world{will-change:transform}
.board-item{will-change:left,top,width,height;cursor:grab}
.board-item.selected{cursor:move}
.board-item .resize-handle{cursor:nwse-resize}
.board-status[data-state="working"]{color:var(--accent)}
.board-status[data-state="error"]{color:var(--danger)}
.board-status[data-state="ok"]{color:var(--success)}
@media(max-width:1060px){.shop-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:780px){.shop-card-grid{grid-template-columns:1fr}.shop-card img{height:190px}}

/* V6 — boutiques : page d'entrée centrée sur les magasins, sans grand bandeau de stocks. */
.shop-landing{padding-top:34px}
.shop-title-row{align-items:end;margin-bottom:28px}
.shop-title-row .eyebrow{margin:0 0 8px}
.shop-title-row h1{font-size:clamp(2.2rem,4vw,3.5rem);line-height:1;margin:0}
.shop-card h2{font-size:1.2rem;margin:0;padding:15px 16px 17px}
.selected-shop.panel{max-width:none;margin-top:22px}
.selected-shop .row-actions{display:flex;gap:9px;align-items:center}
@media(max-width:780px){.shop-title-row{align-items:flex-start}.selected-shop .row-actions{width:100%;flex-wrap:wrap}}

/* Navigation compacte et éléments de présentation */
.topbar{gap:clamp(12px,1.5vw,26px);padding-left:clamp(18px,4vw,54px);padding-right:clamp(18px,4vw,54px)}
.brand{flex:0 0 auto;font-size:clamp(1.05rem,1.55vw,1.28rem);white-space:nowrap}
.main-nav{min-width:0;flex-wrap:nowrap;overflow:hidden}
.main-nav a{white-space:nowrap;padding-left:clamp(8px,1.05vw,15px);padding-right:clamp(8px,1.05vw,15px);font-size:clamp(.89rem,1.04vw,1rem)}
.account{flex:0 0 auto}.account-button,.account-quiet{padding-left:clamp(10px,1.1vw,16px);padding-right:clamp(10px,1.1vw,16px)}
.announcements-wide{max-width:none}
.showcase-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.showcase-card{border:1px solid var(--line);background:#0d1115;border-radius:18px;overflow:hidden;transition:transform .16s,border-color .16s}
.showcase-card:hover,.showcase-card.active{border-color:var(--accent);transform:translateY(-2px)}
.showcase-card>a{display:block}.showcase-card img{height:210px;width:100%;object-fit:cover;background:#0a0d11}
.showcase-body{padding:17px 18px 20px}.showcase-body h3{font-size:1.28rem;line-height:1.18;margin:0 0 8px}.showcase-body p{color:var(--muted);margin:0;min-height:52px}
.inventory-panel{margin-top:0}.shop-products{margin-top:8px}.sale-form{margin-top:22px}
.hero-coordinate{display:inline-flex;flex-direction:column;gap:3px;margin:23px 0 0;padding:12px 15px;border:1px solid var(--line);border-radius:11px;width:max-content;background:#0c1014}
.hero-coordinate span{font-size:.78rem;text-transform:uppercase;letter-spacing:.1em;color:var(--muted);font-weight:800}.hero-coordinate strong{font-size:1.08rem}
.moodboard-entry{display:flex;align-items:center;justify-content:space-between;gap:20px}.moodboard-entry h2{margin:0}
.search-field{max-width:540px}.resource-title{display:flex;align-items:center;gap:12px;margin-bottom:6px}.resource-title h2{margin:0}.coordinate-list{display:flex;gap:12px;flex-wrap:wrap;margin-top:10px}.coordinate-list span{display:flex;flex-direction:column;background:var(--surface-2);border:1px solid var(--line);border-radius:9px;padding:7px 10px;min-width:135px;font-weight:700}.coordinate-list small{font-size:.7rem;text-transform:uppercase;letter-spacing:.08em;color:var(--muted)}
.trade-table td:first-child{font-weight:700}.trade-table tr.unavailable{opacity:.55}.trade-check{display:inline-flex;justify-content:center;align-items:center;height:25px;width:25px;border:1px solid var(--line);border-radius:6px;color:var(--muted)}.trade-check.checked{background:var(--accent);color:#101418;border-color:var(--accent);font-weight:900}
.mood-controls button:disabled{opacity:.35;cursor:not-allowed}.board-item.note-item{padding-top:0}.note-drag{position:absolute;top:-26px;left:0;height:24px;padding:0 9px;border:1px solid var(--accent);background:#201616;color:var(--accent);border-radius:7px 7px 0 0;cursor:grab;display:none}.board-item.selected .note-drag{display:block}.board-note[contenteditable="true"]{cursor:text;outline:none}.board-note[contenteditable="true"]:focus{box-shadow:0 0 0 2px var(--accent),0 3px 14px rgba(0,0,0,.24)}
@media(max-width:1160px){.topbar{flex-wrap:wrap;height:auto;padding-top:10px;padding-bottom:10px}.main-nav{order:3;width:100%;height:52px;overflow-x:auto}.main-nav a{height:52px}.account{margin-left:auto}}
@media(max-width:1060px){.showcase-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:780px){.showcase-grid{grid-template-columns:1fr}.showcase-card img{height:195px}.moodboard-entry{flex-direction:column;align-items:flex-start}.coordinate-list{flex-direction:column}}

/* Publications de l'accueil */
.news-feed{max-width:920px;margin:0 auto;display:flex;flex-direction:column;gap:24px}
.feed-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:2px}
.feed-header h2{margin:0;font-size:2rem}
.post-card{overflow:hidden;background:var(--surface);border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow)}
.post-cover{display:block;width:100%;height:min(460px,52vw);min-height:250px;object-fit:cover;background:#0a0d11}
.post-body{padding:30px clamp(22px,5vw,46px)}
.post-date{display:block;color:var(--accent);font-size:.82rem;font-weight:900;letter-spacing:.1em;text-transform:uppercase;margin-bottom:12px}
.post-body h2{font-size:clamp(1.65rem,3.3vw,2.25rem);line-height:1.1;margin:0 0 18px}
.post-text{font-size:1.04rem;color:var(--text)}
.post-text p:last-child{margin-bottom:0}
.post-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:24px}
.post-gallery img{height:250px;width:100%;object-fit:cover;border-radius:12px;border:1px solid var(--line)}
.post-admin{display:flex;gap:10px;align-items:center;margin-top:25px;padding-top:16px;border-top:1px solid var(--line)}
.post-admin>a{color:var(--accent);font-weight:800}.post-admin form{display:flex;gap:4px}.post-admin button{height:30px;width:31px;background:var(--surface-2);color:var(--text);border:1px solid var(--line);border-radius:7px}
.post-card.cover-small{display:grid;grid-template-columns:minmax(210px,34%) 1fr;align-items:stretch}
.post-card.cover-small .post-cover{height:100%;min-height:250px}
.gallery-manage{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}
.gallery-manage label{display:flex;flex-direction:column;gap:5px;border:1px solid var(--line);padding:6px;border-radius:10px;background:var(--surface-2)}
.gallery-manage img{height:82px;width:116px;object-fit:cover;border-radius:6px}.gallery-manage span{font-size:.84rem;color:var(--muted)}
.inline-check{margin-top:10px}
.leaf-admin-actions{display:flex;justify-content:flex-end;margin:0 0 22px}
/* Les notes s'éditent dans leur corps et se déplacent depuis leur barre supérieure. */
.board-item.note-item{overflow:visible}
.note-drag{display:flex!important;align-items:center;justify-content:center;position:absolute;top:0;left:0;right:0;width:100%;height:32px;padding:0;border:0;border-bottom:1px solid rgba(0,0,0,.2);border-radius:4px 4px 0 0;background:#f2cc78;color:#332816;font-weight:900;cursor:grab;z-index:4}
.note-drag:active{cursor:grabbing}
.board-note{padding:46px 16px 16px}
.board-item.selected .note-drag{background:#ffcf70}
@media(max-width:780px){.feed-header{align-items:center;flex-direction:row}.post-card.cover-small{display:block}.post-cover,.post-card.cover-small .post-cover{height:220px;min-height:0}.post-body{padding:22px 18px}.post-gallery{grid-template-columns:1fr}.post-gallery img{height:220px}}

/* Suppression directe des images de lieux */
.media-remove-preview{display:flex;align-items:center;gap:12px;margin-top:12px;padding:9px;border:1px solid var(--line);border-radius:11px;background:var(--surface-2)}
.media-remove-preview img{width:82px;height:62px;object-fit:cover;border-radius:7px}
.gallery-display-item{position:relative;margin:0}
.gallery-display-item img{display:block}
.gallery-display-item form{position:absolute;right:10px;bottom:10px;margin:0}
.gallery-display-item .danger{padding:9px 12px;font-size:.86rem;background:rgba(13,17,21,.93);border:1px solid var(--accent);color:var(--accent)}
.gallery-display-item .danger:hover{background:var(--accent);color:#121518}
.editor-secondary-action{display:flex;justify-content:flex-end;margin-top:18px;padding-top:18px;border-top:1px solid var(--line)}

/* v13 — actions de galerie visibles, sans superposition sur l’image */
.gallery-display-item{position:static;display:flex;flex-direction:column;gap:10px;margin:0}
.gallery-display-item img{display:block}
.gallery-display-item .gallery-remove-form{position:static;display:block;margin:0}
.gallery-display-item .gallery-remove-form .danger{width:100%;padding:11px 14px;font-size:.9rem;background:#201616;border:1px solid var(--accent);color:var(--accent)}
.gallery-display-item .gallery-remove-form .danger:hover{background:var(--accent);color:#121518}


/* v14 — visuels Minecraft 16:9, fermes et espace vendeur */
.hero-admin-actions{position:absolute;z-index:2;top:22px;right:22px;display:flex;gap:10px;align-items:center}
.hero-admin-actions .edit-page{position:static}
.hero-admin-actions .primary{padding:13px 19px;border-radius:12px}
.showcase-card img{height:auto;aspect-ratio:16 / 9;object-fit:cover}
.detail-hero{min-height:0;align-items:center}
.detail-hero.with-image{grid-template-columns:minmax(330px,48%) 1fr}
.detail-hero img{height:auto;min-height:0;aspect-ratio:16 / 9;object-fit:cover;margin:22px;width:calc(100% - 44px);border-radius:15px}
.detail-hero>div{padding:44px 48px}
.farm-card{align-items:stretch;padding:15px;gap:22px}
.farm-card>img{width:clamp(250px,35vw,430px);height:auto;aspect-ratio:16 / 9;object-fit:cover;border-radius:12px}
.farm-card .grow{padding:10px 0}
.form-hint{color:var(--muted);font-size:.93rem;margin:0;padding:0 4px}
.villager-count{display:inline-flex;min-width:36px;justify-content:center;background:var(--accent-soft);color:var(--accent);font-weight:900;padding:5px 11px;border-radius:999px}
.muted-row{opacity:.56}

.seller-hero{display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.seller-hero h1{margin-bottom:0}
.seller-return{margin-top:15px}
.seller-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 24px;padding:7px;background:var(--surface);border:1px solid var(--line);border-radius:14px}
.seller-tabs a{font-weight:800;padding:12px 18px;border-radius:9px;color:var(--muted)}
.seller-tabs a:hover,.seller-tabs a.active{background:var(--accent);color:#11161a}
.seller-store h2{margin:0}
.seller-lines{display:flex;flex-direction:column;border-top:1px solid var(--line)}
.seller-product-line,.restock-line,.sold-line{display:grid;grid-template-columns:52px minmax(180px,1fr) auto;gap:16px;align-items:center;border-bottom:1px solid var(--line);padding:13px 0}
.restock-line{grid-template-columns:52px minmax(180px,1fr) 95px auto}
.seller-product-line img,.restock-line img,.sold-line img{width:48px;height:48px;object-fit:cover;border-radius:9px;border:1px solid var(--line)}
.seller-product-name{display:flex;flex-direction:column;gap:3px;font-weight:800}
.seller-product-name small{font-weight:500;color:var(--muted)}
.seller-product-line input,.restock-line input{width:88px;text-align:center}
.seller-submit{position:sticky;bottom:14px;display:flex;align-items:center;justify-content:space-between;gap:20px;border-color:var(--accent);background:rgba(17,23,28,.96);backdrop-filter:blur(8px)}
.seller-submit div{display:flex;flex-direction:column;gap:4px}.seller-submit small{color:var(--muted);font-weight:700}.seller-submit strong{font-size:2rem;color:var(--accent)}
.seller-heading h2{margin:0}
.seller-metrics{margin-bottom:22px}
.sold-line{grid-template-columns:52px minmax(180px,1fr) auto}
.sold-line span{font-weight:900;color:var(--accent)}
@media(max-width:780px){
    .hero-admin-actions{position:relative;top:auto;right:auto;margin-top:20px;flex-wrap:wrap}
    .detail-hero img{margin:0;width:100%;border-radius:0}
    .detail-hero>div{padding:28px 21px}
    .farm-card>img{width:100%}
    .seller-product-line{grid-template-columns:48px 1fr 74px;gap:10px}
    .restock-line{grid-template-columns:48px 1fr;gap:10px}
    .restock-line input,.restock-line button{grid-column:2}
    .seller-submit{position:static;flex-direction:column;align-items:stretch}
}

/* Villageois : ressources regroupées et vendeurs dépliables */
.villager-table-head,.villager-group summary{display:grid;grid-template-columns:minmax(190px,2fr) 105px 125px 135px 105px 35px;gap:14px;align-items:center;padding:14px 17px}.villager-table-head{color:var(--muted);font-size:.78rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;padding-top:0}.villager-groups{display:flex;flex-direction:column;gap:10px}.villager-group{border:1px solid var(--line);border-radius:14px;overflow:hidden;background:var(--surface-2, #0c1115)}.villager-group summary{cursor:pointer;list-style:none}.villager-group summary::-webkit-details-marker{display:none}.villager-group[open] summary{border-bottom:1px solid var(--line);background:var(--accent-soft)}.villager-group summary strong{font-size:1.05rem}.best-diamond{font-weight:800;color:var(--accent)}.villager-expand{font-size:1.1rem;color:var(--muted);transition:transform .18s}.villager-group[open] .villager-expand{transform:rotate(180deg)}.villager-group-body{padding:16px;display:flex;flex-direction:column;gap:14px}.villager-group-toolbar{display:flex;justify-content:flex-end;gap:9px;flex-wrap:wrap}.villager-group-toolbar form{margin:0}.villager-offers{display:flex;flex-direction:column;gap:8px}.villager-offer{display:grid;grid-template-columns:minmax(130px,1fr) auto auto;gap:12px;align-items:center;border:1px solid var(--line);padding:10px 12px;border-radius:10px}.villager-price-form{display:flex;align-items:center;gap:7px}.villager-price-form input,.villager-add-form input{width:100px}.villager-add-form{display:flex;align-items:center;gap:9px;padding-top:4px}.villager-add-form label{font-weight:700;margin-right:auto}.compact-empty{padding:13px}.danger.compact{padding:8px 11px}
@media (max-width:850px){.villager-table-head{display:none}.villager-group summary{grid-template-columns:1fr auto auto;padding:14px}.villager-group summary span:nth-child(2),.villager-group summary span:nth-child(3){display:none}.villager-offer{grid-template-columns:1fr}.villager-add-form{flex-wrap:wrap}.villager-add-form label{width:100%}}


/* v18 — Gestion des utilisateurs sans doublons, dans le thème noir/corail. */
.users-hero{display:flex;align-items:center;justify-content:space-between;gap:26px;padding:34px 38px;position:relative;overflow:hidden}
.users-hero:before{content:"";position:absolute;left:0;top:0;bottom:0;width:5px;background:var(--accent)}
.users-hero h1{font-size:clamp(2.3rem,4vw,3.5rem);margin:0 0 8px}
.users-hero .subtitle{margin:0}
.users-create .panel-header{margin-bottom:18px}.users-create .panel-header p{max-width:700px}
.user-create-form{display:flex;align-items:end;gap:14px;max-width:700px}.user-create-form .field{flex:1}.user-create-form .primary{height:50px}
.user-rows{display:flex;flex-direction:column;gap:10px}
.user-row{padding:15px 17px;border:1px solid var(--line);border-radius:13px;display:flex;align-items:center;justify-content:space-between;gap:20px;background:rgba(9,12,15,.42)}
.user-identity{display:flex;align-items:center;gap:11px;flex-wrap:wrap}.user-identity strong{font-size:1.08rem}
.user-role,.user-state{font-size:.76rem;font-weight:800;text-transform:uppercase;letter-spacing:.07em;border-radius:999px;padding:5px 10px;border:1px solid var(--line)}
.user-role{color:var(--accent);border-color:rgba(255,127,112,.42);background:var(--accent-soft)}
.user-role.super{color:var(--accent);border-color:rgba(255,127,112,.42);background:var(--accent-soft)}
.user-state.pending{color:#ffd696;border-color:rgba(241,177,69,.42);background:rgba(241,177,69,.12)}
.user-state.ready{color:#95e9c9;border-color:rgba(84,214,173,.38);background:rgba(84,214,173,.1)}
.auth-grid{max-width:1040px;margin:70px auto;display:grid;grid-template-columns:1fr 1fr;gap:24px}
.auth-grid .login-box{margin:0;max-width:none;padding:34px}
.login-box .eyebrow{margin-bottom:8px}.login-box h2{font-size:1.7rem;margin-bottom:9px}
.muted-text{color:var(--muted);margin-bottom:18px}.setup-submit{width:100%;border-color:rgba(255,127,112,.44)}
.villager-search-panel{padding-block:18px;margin-bottom:18px}
.villager-search-panel .search-field{max-width:570px;margin:0}
.search-empty{margin-top:14px}
@media(max-width:840px){
 .auth-grid{grid-template-columns:1fr;margin:25px auto}
 .users-hero{padding:24px;align-items:flex-start}
 .user-create-form,.user-row{flex-direction:column;align-items:stretch}
 .user-row .button-row{justify-content:stretch}.user-row form,.user-row button{width:100%}
}

/* v19 — Bibliothèque de références privée, inspirée d'un mur d'images */
.reference-hero{display:flex;align-items:center;justify-content:space-between;gap:28px;padding:35px 38px}
.reference-hero h1{font-size:clamp(2.4rem,4.5vw,3.7rem);line-height:1.08;margin:0 0 10px}
.reference-hero .subtitle{margin:0}
.reference-upload{position:relative;flex-shrink:0}.reference-upload summary{list-style:none;cursor:pointer}.reference-upload summary::-webkit-details-marker{display:none}
.reference-upload-form{position:absolute;top:calc(100% + 12px);right:0;z-index:15;width:min(390px,82vw);display:flex;flex-direction:column;gap:15px;padding:18px;border:1px solid rgba(255,127,112,.5);border-radius:15px;background:var(--surface);box-shadow:var(--shadow)}
.reference-upload-form .primary{width:100%}
.reference-focus{display:grid;grid-template-columns:minmax(360px,1fr) 310px;gap:24px;padding:24px}
.reference-large img{width:100%;max-height:680px;object-fit:contain;background:#080b0e;border-radius:15px;border:1px solid var(--line)}
.reference-tags{display:flex;gap:8px;flex-wrap:wrap;margin:15px 0}.tag-removal{margin:0}.tag-removal button{cursor:pointer;color:var(--accent);background:var(--accent-soft);border:1px solid rgba(255,127,112,.38);border-radius:999px;padding:7px 12px;font-weight:800}.tag-removal button:hover{background:var(--accent);color:#101418}.reference-pending{display:inline-flex;border:1px solid rgba(235,105,105,.4);background:rgba(235,105,105,.1);color:#ffaea7;padding:7px 12px;border-radius:999px;font-weight:800}
.reference-tag-form{padding-top:15px;border-top:1px solid var(--line);display:flex;flex-direction:column;gap:9px}.reference-tag-form label{font-weight:800}.reference-tag-form>div{display:flex;gap:9px}.reference-tag-form input{flex:1}
.reference-related{border-left:1px solid var(--line);padding-left:24px}.reference-related h2{margin:0 0 16px}.related-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.related-grid img{height:110px;width:100%;object-fit:cover;border-radius:10px;border:1px solid var(--line);transition:border-color .14s}.related-grid a:hover img{border-color:var(--accent)}
.reference-tools{display:flex;justify-content:space-between;gap:18px;align-items:center;margin-bottom:24px}.reference-tabs{display:flex;gap:8px;flex-wrap:wrap}.reference-tabs a{padding:11px 15px;border-radius:11px;background:var(--surface-2);border:1px solid var(--line);font-weight:800;color:var(--muted)}.reference-tabs a.active,.reference-tabs a:hover{color:#111518;background:var(--accent);border-color:var(--accent)}.reference-tabs span{display:inline-flex;margin-left:7px;border-radius:999px;padding:2px 7px;background:rgba(0,0,0,.18);font-size:.86rem}
.reference-search{display:flex;gap:8px;align-items:center;min-width:min(430px,100%)}.reference-search input{flex:1}
.reference-grid{columns:5 195px;column-gap:14px}.reference-card{display:block;break-inside:avoid;margin:0 0 14px;background:var(--surface-2);border:1px solid var(--line);border-radius:15px;overflow:hidden;transition:transform .16s,border-color .16s}.reference-card:hover{transform:translateY(-2px);border-color:var(--accent)}.reference-card img{display:block;width:100%;height:auto;max-height:390px;object-fit:cover}.reference-card-tags{display:flex;flex-wrap:wrap;gap:6px;padding:10px}.reference-card-tags b{font-size:.77rem;color:var(--accent);background:var(--accent-soft);padding:4px 7px;border-radius:999px}.reference-card-tags em{font-style:normal;font-size:.78rem;font-weight:800;color:#ffc6c0}.reference-card.awaiting{border-color:rgba(255,127,112,.38)}
@media(max-width:950px){.reference-focus{grid-template-columns:1fr}.reference-related{border-left:0;border-top:1px solid var(--line);padding:20px 0 0}.reference-tools{flex-direction:column;align-items:stretch}.reference-search{min-width:0}.reference-grid{columns:3 160px}}
@media(max-width:680px){.reference-hero{flex-direction:column;align-items:flex-start;padding:24px}.reference-upload-form{left:0;right:auto}.reference-grid{columns:2 130px}.reference-tag-form>div{flex-direction:column}}

/* v22 — Identité claire : ciel brumeux, mer cyan et axe marchand doré */
:root{
  --bg:#eef2f1;
  --surface:#fbfcfb;
  --surface-2:#f3f7f6;
  --surface-3:#e6eeed;
  --line:#d3dfdf;
  --text:#15262d;
  --muted:#5d747b;
  --accent:#118da7;
  --accent-2:#efc92f;
  --accent-soft:rgba(17,141,167,.10);
  --dark:#10232a;
  --success:#1a9270;
  --danger:#c45151;
  --shadow:0 18px 46px rgba(19,42,49,.075);
  --radius:20px;
}
html{background:var(--bg)}
body{
  background:
    radial-gradient(circle at 86% 8%, rgba(17,141,167,.075), transparent 25%),
    radial-gradient(circle at 10% 28%, rgba(239,201,47,.05), transparent 22%),
    linear-gradient(180deg,#f3f6f5 0%,#edf1f0 100%);
  color:var(--text);
}
body:before{content:none}
.topbar{
  height:82px;
  background:rgba(251,252,251,.97);
  color:var(--text);
  border-bottom:1px solid var(--line);
  box-shadow:0 6px 22px rgba(22,43,48,.05);
}
.topbar:before{
  content:"";position:absolute;inset:0 0 auto;height:4px;
  background:linear-gradient(90deg,#118da7 0 23%,#efc92f 23% 26%,#118da7 26% 63%,#efc92f 63% 66%,#118da7 66% 100%);
}
.topbar:after{content:none}
.brand{color:var(--text)}
.cube{
  width:30px;height:30px;border:1px solid rgba(21,38,45,.14);border-radius:7px;
  margin-right:12px;background:url('../img/drapeau-triginta.png') center/cover no-repeat;
  box-shadow:0 2px 7px rgba(17,36,42,.08);
}
.cube:after{display:none}
.main-nav a{color:#4d6268;border-bottom-color:transparent}
.main-nav a:hover,.main-nav a.active{color:var(--accent);background:transparent;border-bottom-color:var(--accent)}
.account-button{background:var(--accent);color:#fff;box-shadow:0 8px 18px rgba(17,141,167,.16)}
.account-button:hover{background:#0e7c93}
.account-quiet{border:1px solid var(--line);color:var(--text);background:#fff}
.account-quiet:hover{border-color:var(--accent);color:var(--accent)}
.site-main{margin-top:38px}
.footer{color:var(--muted);border-color:var(--line);background:rgba(251,252,251,.5)}
.footer strong{color:var(--accent)}
.hero,.explore-hero,.detail-hero,.private-hero{
  background:var(--surface);border-color:var(--line);box-shadow:var(--shadow);
}
.hero:before,.explore-hero:before,.private-hero:before{content:none}
.hero{
  background:
    linear-gradient(104deg, rgba(251,252,251,.98) 0%, rgba(251,252,251,.98) 58%, rgba(238,246,247,.95) 100%);
}
.hero:after{
  content:"";position:absolute;right:36px;top:34px;width:108px;height:108px;
  background:url('../img/drapeau-triginta.png') center/cover no-repeat;
  border-radius:16px;opacity:.95;border:1px solid rgba(17,141,167,.15);
  box-shadow:0 12px 26px rgba(19,42,49,.08);
}
.hero-backdrop{opacity:.11}
.hero-backdrop:after{background:linear-gradient(90deg,rgba(251,252,251,.98) 24%,rgba(251,252,251,.91) 63%,rgba(251,252,251,.50))}
.eyebrow,.hierarchy-label{color:var(--accent)}
.subtitle,.explore-hero p{color:var(--muted)}
.edit-page{
  background:#fff;border-color:rgba(17,141,167,.34);color:var(--accent);
  box-shadow:0 8px 20px rgba(16,38,45,.05);
}
.edit-page:hover{background:var(--accent);border-color:var(--accent);color:#fff}
.panel,.post-card,.login-box,.admin-sidebar,.metric,.quick{
  background:var(--surface);border-color:var(--line);box-shadow:var(--shadow);
}
.formatted,.post-text{color:#23373e}
.empty{background:var(--surface-2);border-color:#c8d8d9;color:var(--muted)}
.primary{background:var(--accent);color:#fff;box-shadow:0 8px 17px rgba(17,141,167,.14)}
.primary:hover{background:#0d7b92}
.secondary{background:#fff;color:var(--text);border-color:var(--line)}
.secondary:hover{border-color:var(--accent);color:var(--accent)}
.link-accent,.event-date,.lore-card time,.lore-admin a,.row-controls a,.mini-actions a,.card-admin>a,.post-date,.post-admin>a,.revenue,.metric strong{color:var(--accent)}
.tag{background:var(--surface-2);border-color:var(--line);color:#476067}
.tag.salmon{background:var(--accent-soft);border-color:rgba(17,141,167,.22);color:var(--accent)}
.tag.green{background:rgba(26,146,112,.10);border-color:rgba(26,146,112,.26);color:var(--success)}
input:not([type=checkbox]):not([type=color]),textarea,select{
  background:#fff;border-color:#ccd9da;color:var(--text);
}
input:focus,textarea:focus,select:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(17,141,167,.10)}
.check,.field label{color:var(--text)}.check input{accent-color:var(--accent)}
.editor-panel{background:#fff;border-color:rgba(17,141,167,.26)}
.editor-toolbar,.rich-editor{background:#fff;border-color:#ccd9da;color:var(--text)}
.editor-toolbar button{background:var(--surface-2);border-color:var(--line);color:var(--text)}
.editor-toolbar button:hover{border-color:var(--accent);color:var(--accent)}
.breadcrumb{background:#fff;border-color:var(--line)}
.breadcrumb a:hover{color:var(--accent)}
.place-card,.shop-card-wrap,.showcase-card,.resource-card,.villager-group,.reference-card{
  background:#fff;border-color:var(--line);box-shadow:0 8px 23px rgba(22,43,48,.045);
}
.place-card:hover,.shop-card:hover,.showcase-card:hover,.reference-card:hover{border-color:rgba(17,141,167,.45)}
.showcase-card img,.shop-card img{background:#e6efef}
.hero-coordinate,.selected-shop,.shop-tab{background:#fff;border-color:var(--line)}
.shop-tab.active,.shop-tab:hover{background:var(--accent-soft);border-color:rgba(17,141,167,.36);color:var(--accent)}
.shop-product,.info-row{border-color:var(--line)}
.shop-product .diamond{color:var(--accent)}
.lore-timeline:before{background:linear-gradient(180deg,var(--accent),var(--accent-2))}
.lore-dot{background:#fff;border-color:var(--accent)}
.lore-card{background:#fff;border-color:var(--line);box-shadow:var(--shadow)}
.lore-card:hover{border-color:rgba(17,141,167,.42)}
.detail-hero>div{background:#fff}
.content-gallery img{border-color:var(--line);background:#e5eded}
.post-cover{background:#e6eeed}.post-gallery img{border-color:var(--line)}
.gallery-manage label,.media-remove-preview{background:var(--surface-2);border-color:var(--line)}
.gallery-display-item .gallery-remove-form .danger{background:#fff;border-color:#d99292;color:#ad4040}
.gallery-display-item .gallery-remove-form .danger:hover{background:#c45151;border-color:#c45151;color:#fff}
.note-drag{background:#f1db70;color:#423500;border-color:rgba(58,46,0,.12)}
.board-item.selected .note-drag{background:#ecc82f}
.board-note{background:#fff3b7;color:#2c2a20}
.mood-controls{background:#fff;border-color:var(--line)}
.mood-controls .tool.active{background:var(--accent);color:#fff;border-color:var(--accent)}
.board-viewport{background-color:#f7faf9;background-image:radial-gradient(#d2dddd 1px,transparent 1px);border-color:var(--line)}
.board-item.selected{border-color:var(--accent)}
.resize-handle{background:var(--accent);border-color:#fff}
.delete-item{background:#fff;color:#c45151;border-color:#d99292}
.trade-check.checked{background:var(--accent);border-color:var(--accent);color:#fff}
.villager-group[open] summary{background:var(--accent-soft);border-color:var(--line)}
.best-diamond{color:var(--accent)}
.user-role{background:var(--accent-soft);border-color:rgba(17,141,167,.24);color:var(--accent)}
.user-state.pending{color:#9a7411;border-color:rgba(239,201,47,.45);background:rgba(239,201,47,.15)}
.user-state.ready{color:var(--success);border-color:rgba(26,146,112,.25);background:rgba(26,146,112,.08)}
.reference-upload-form{background:#fff;border-color:rgba(17,141,167,.3)}
.reference-large img{background:#f1f5f5;border-color:var(--line)}
.reference-related{border-color:var(--line)}
.reference-tabs a{background:#fff;border-color:var(--line);color:var(--muted)}
.reference-tabs a.active,.reference-tabs a:hover{background:var(--accent);border-color:var(--accent);color:#fff}
.reference-card-tags b,.tag-removal button{background:var(--accent-soft);border-color:rgba(17,141,167,.22);color:var(--accent)}
.tag-removal button:hover{background:var(--accent);color:#fff}
.reference-pending{background:rgba(239,201,47,.15);border-color:rgba(239,201,47,.38);color:#80600d}
.seller-submit{background:rgba(251,252,251,.96);border-color:rgba(17,141,167,.45)}
.seller-submit strong{color:var(--accent)}
@media(max-width:780px){.hero:after{display:none}}


/* v23 — Import en masse des références, placeholder clair et médias des publications */
.reference-upload-form{width:min(510px,92vw)}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.reference-dropzone{min-height:184px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:25px 20px;border:2px dashed #b7ced1;border-radius:15px;background:#f5f9f8;text-align:center;cursor:pointer;transition:border-color .16s,background .16s,box-shadow .16s}
.reference-dropzone strong{font-size:1.07rem;color:var(--text)}
.reference-dropzone span{color:var(--muted)}
.reference-dropzone:hover,.reference-dropzone:focus,.reference-dropzone.is-dragging{outline:none;border-color:var(--accent);background:rgba(17,141,167,.07);box-shadow:0 0 0 4px rgba(17,141,167,.08)}
.reference-file-count{margin:0;font-weight:800;color:var(--accent)}
.reference-import-note{font-size:.9rem;margin:0}
.post-embeds{display:flex;flex-direction:column;gap:16px;margin-top:25px}
.post-embed{display:block;width:100%;border:0;border-radius:14px;background:#e8efef;overflow:hidden}
.post-embed-youtube{aspect-ratio:16/9;height:auto;min-height:260px}
.post-embed-soundcloud{height:166px}
@media(max-width:680px){.post-embed-youtube{min-height:190px}.reference-dropzone{min-height:154px}}

.reference-upload-progress{display:flex;flex-direction:column;gap:7px;color:var(--muted);font-size:.91rem}
.reference-upload-progress progress{width:100%;height:8px;border:0;border-radius:999px;overflow:hidden;background:var(--surface-3)}
.reference-upload-progress progress::-webkit-progress-bar{background:var(--surface-3);border-radius:999px}
.reference-upload-progress progress::-webkit-progress-value{background:var(--accent);border-radius:999px}
.reference-upload-progress progress::-moz-progress-bar{background:var(--accent);border-radius:999px}
.reference-dropzone.is-uploading{pointer-events:none;opacity:.68}


/* v25 — Encyclopédie du lore et liens internes façon wiki */
.editor-link-button{font-weight:800;color:var(--accent)!important;border-color:rgba(17,141,167,.28)!important}
.editor-link-panel{margin-top:10px;padding:13px 14px;border:1px solid rgba(17,141,167,.25);border-radius:12px;background:#f3f8f8}
.editor-link-panel[hidden]{display:none}
.editor-selection-label{display:flex;gap:7px;align-items:center;flex-wrap:wrap;margin-bottom:10px;color:var(--muted);font-size:.92rem}
.editor-selection-label strong{display:inline-flex;padding:4px 10px;background:rgba(17,141,167,.1);border-radius:999px;color:var(--accent);max-width:100%;overflow:hidden;text-overflow:ellipsis}
.editor-link-line{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.editor-link-line input{flex:1;min-width:240px;background:#fff!important}
.editor-link-panel small{display:block;margin-top:8px;color:var(--muted)}
.formatted a,.story-text a,.post-text a{color:var(--accent);font-weight:800;text-decoration:underline;text-decoration-color:rgba(17,141,167,.36);text-underline-offset:3px}
.formatted a:hover,.story-text a:hover,.post-text a:hover{background:rgba(17,141,167,.09);text-decoration-color:var(--accent)}
.lore-directory{margin-top:42px}
.lore-group{margin-top:26px}.lore-group h3{font-size:1.35rem;margin:0 0 15px}
.lore-elements-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px}
.lore-element-card{border:1px solid var(--line);border-radius:17px;background:#fff;overflow:hidden;transition:border-color .15s,transform .15s}
.lore-element-card:hover{border-color:rgba(17,141,167,.45);transform:translateY(-2px)}
.lore-element-card>a{display:block}.lore-element-card img{width:100%;height:170px;object-fit:cover}
.lore-element-card>a>div{padding:15px 15px 18px}.lore-element-card h4{font-size:1.18rem;margin:10px 0 6px}.lore-element-card p{margin:0;color:var(--muted);min-height:46px}
.lore-element-card .card-admin{padding:0 15px 14px}
@media(max-width:940px){.lore-elements-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){.lore-elements-grid{grid-template-columns:1fr}.editor-link-line{flex-direction:column;align-items:stretch}}

/* v26 — encyclopédie séparée, tags libres et liens wiki visibles */
.lore-page-actions{display:flex;justify-content:flex-end;gap:12px;align-items:center;margin:0 0 28px}.lore-encyclopedia-link{border-color:rgba(17,141,167,.38);color:var(--accent)}.encyclopedia-hero{display:flex;align-items:end;justify-content:space-between;gap:24px;padding:42px 46px}.encyclopedia-hero h1{font-size:clamp(2.8rem,5vw,4.3rem);line-height:1;margin:0 0 14px}.encyclopedia-tools{display:flex;flex-direction:column;gap:20px}.encyclopedia-search{max-width:560px}.encyclopedia-filters{display:flex;gap:8px;flex-wrap:wrap}.encyclopedia-filters button{border:1px solid var(--line);background:#fff;color:var(--muted);padding:9px 14px;border-radius:999px;font-weight:800;cursor:pointer}.encyclopedia-filters button:hover,.encyclopedia-filters button.active{border-color:var(--accent);background:rgba(17,141,167,.1);color:var(--accent)}.encyclopedia-grid{margin-bottom:26px}.encyclopedia-grid .lore-element-card h2{font-size:1.28rem;margin:11px 0 7px}.lore-tag-row{display:flex;gap:6px;flex-wrap:wrap}.encyclopedia-tag{font-size:.7rem;color:var(--accent);background:rgba(17,141,167,.08);border-color:rgba(17,141,167,.2)}.detail-tag-row{margin-top:18px}.encyclopedia-no-results{margin-bottom:28px}.editor-link-panel{display:block!important;margin-top:13px;padding:14px;border:1px solid rgba(17,141,167,.2);border-radius:14px;background:#f5f9f9}.editor-link-header{display:flex;flex-direction:column;gap:2px;margin-bottom:12px}.editor-link-header strong{font-size:1rem}.editor-link-header small{color:var(--muted)}.editor-link-editor{padding:12px;margin-bottom:12px;background:#fff;border:1px solid var(--line);border-radius:12px}.editor-link-editor[hidden]{display:none}.editor-linked-pills{display:flex;gap:8px;flex-wrap:wrap}.editor-links-empty{color:var(--muted);margin:0;font-size:.92rem}.editor-linked-pill{display:flex;align-items:center;gap:8px;padding:7px 7px 7px 12px;border:1px solid rgba(17,141,167,.25);border-radius:999px;background:rgba(17,141,167,.09)}.editor-linked-pill span{cursor:pointer;display:flex;gap:7px;align-items:center}.editor-linked-pill b{color:var(--accent)}.editor-linked-pill small{max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted)}.editor-linked-pill button{height:25px;width:25px;border-radius:50%;border:0;cursor:pointer;background:#fff;color:var(--accent);font-size:1.2rem;line-height:1}.wiki-link{color:var(--accent);font-weight:800;text-decoration:underline;text-decoration-thickness:2px;text-decoration-color:rgba(17,141,167,.32);text-underline-offset:3px}.wiki-link:hover{background:rgba(17,141,167,.09)}.rich-editor .wiki-link{padding:1px 3px;border-radius:4px;background:rgba(17,141,167,.08)}@media(max-width:780px){.lore-page-actions,.encyclopedia-hero{flex-direction:column;align-items:stretch}.encyclopedia-hero{padding:26px 20px}}

/* v27 — références publiques et suppression visible des fiches de lore */
.reference-view-tag{font-size:.82rem;color:var(--accent);background:rgba(17,141,167,.10);padding:7px 12px;border-radius:999px;font-weight:800}
.lore-element-card .card-admin{display:flex;align-items:center;justify-content:space-between;gap:10px}
.lore-element-card .card-admin form{margin:0}
.lore-element-card .card-admin .danger{padding:8px 11px;font-size:.84rem}


/* v29 — Navigation téléphone en tiroir latéral */
.mobile-menu-button,.mobile-menu,.mobile-menu-overlay{display:none}
@media(max-width:780px){
  body.mobile-menu-is-open{overflow:hidden}
  .topbar{position:sticky;top:0;height:70px;min-height:70px;flex-wrap:nowrap;padding:0 15px;gap:13px;z-index:90}
  .topbar .brand{height:70px;font-size:1.08rem;letter-spacing:.13em}
  .topbar .brand .cube{height:17px;width:17px;margin-right:10px}
  .topbar .main-nav,.topbar .account{display:none}
  .mobile-menu-button{height:45px;width:45px;flex:0 0 45px;display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;border:1px solid rgba(17,141,167,.25);border-radius:12px;background:#fff;color:var(--accent);cursor:pointer}
  .mobile-menu-button span{display:block;width:22px;height:2.5px;border-radius:3px;background:currentColor}
  .mobile-menu-overlay{position:fixed;inset:0;z-index:98;display:block;background:rgba(17,31,35,.46);opacity:0;pointer-events:none;transition:opacity .2s ease}
  .mobile-menu-overlay[hidden]{display:none}
  .mobile-menu-overlay.is-open{opacity:1;pointer-events:auto}
  .mobile-menu{position:fixed;left:0;top:0;bottom:0;z-index:99;display:flex;flex-direction:column;width:min(84vw,330px);padding:0;background:#fff;box-shadow:14px 0 42px rgba(20,39,43,.18);transform:translateX(-103%);transition:transform .22s ease;overflow-y:auto}
  .mobile-menu.is-open{transform:translateX(0)}
  .mobile-menu-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:74px;padding:12px 15px;border-bottom:1px solid var(--line)}
  .mobile-menu-brand{display:flex;align-items:center;color:var(--text);font-weight:900;font-size:1.04rem;letter-spacing:.13em}
  .mobile-menu-brand .cube{height:17px;width:17px;margin-right:10px;border-color:var(--accent)}
  .mobile-menu-brand .cube:after{background:var(--accent)}
  .mobile-menu-close{height:43px;width:43px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--text);font-size:2rem;line-height:1;cursor:pointer}
  .mobile-nav{display:flex;flex-direction:column;padding:14px 12px 9px;gap:4px}
  .mobile-nav a{display:flex;align-items:center;min-height:49px;padding:0 15px;border-radius:12px;font-size:1rem;font-weight:800;color:#41545a;border:1px solid transparent}
  .mobile-nav a:hover,.mobile-nav a.active{background:rgba(17,141,167,.1);border-color:rgba(17,141,167,.18);color:var(--accent)}
  .mobile-account{display:flex;flex-direction:column;gap:5px;margin:auto 12px 0;padding:14px 0 20px;border-top:1px solid var(--line)}
  .mobile-account a{min-height:48px;display:flex;align-items:center;padding:0 15px;border-radius:12px;color:#41545a;font-weight:800}
  .mobile-account a:hover{background:var(--surface-2);color:var(--accent)}
  .mobile-account .mobile-login{justify-content:center;background:var(--accent);color:#fff;margin-top:4px}
}

/* v30 — administration des références : actions sans rechargement et suggestions de tags */
.tag-removal button{display:inline-flex;align-items:center;gap:8px}
.tag-removal button strong{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;border-radius:50%;font-size:1rem;line-height:1;background:rgba(17,141,167,.14)}
.tag-removal button:hover strong{background:rgba(255,255,255,.26)}
.reference-suggestions{margin-top:15px;padding:15px;border:1px solid rgba(17,141,167,.18);border-radius:14px;background:#f5f9f9}
.reference-suggestions[hidden]{display:none}
.reference-suggestions-heading{display:flex;flex-direction:column;gap:3px;margin-bottom:11px}
.reference-suggestions-heading strong{font-size:.97rem;color:var(--text)}
.reference-suggestions-heading span{font-size:.86rem;color:var(--muted)}
.reference-suggestion-list{display:flex;gap:8px;flex-wrap:wrap}
.reference-suggestion{display:inline-flex;gap:8px;align-items:center;border:1px solid rgba(17,141,167,.23);border-radius:999px;padding:8px 11px;background:#fff;color:var(--accent);font-weight:800;cursor:pointer}
.reference-suggestion small{font-weight:700;color:var(--muted);font-size:.75rem}
.reference-suggestion:hover:not(:disabled){background:rgba(17,141,167,.1);border-color:var(--accent)}
.reference-suggestion:disabled{opacity:.5;cursor:wait}
.reference-action-feedback{margin:13px 0 0;padding:9px 12px;border-radius:10px;background:rgba(17,141,167,.1);color:var(--accent);font-weight:800;font-size:.92rem}
.reference-action-feedback.error{background:rgba(210,56,56,.08);color:#b23535}
.reference-delete-form{display:flex;justify-content:flex-start;padding-top:17px;margin-top:17px;border-top:1px solid var(--line)}
.reference-delete-form .danger{cursor:pointer}
.reference-delete-success{grid-column:1/-1;padding:42px 26px;text-align:center}
.reference-delete-success strong{display:block;font-size:1.35rem;margin-bottom:8px}
.reference-delete-success p{margin:0;color:var(--muted)}
@media(max-width:680px){
  .reference-suggestions{padding:13px}
  .reference-suggestion{padding:8px 10px;font-size:.9rem}
  .reference-delete-form .danger{width:100%}
}


/* Mise au propre v31 : formulaires de navigation et pagination. */
.logout-form { display: inline-flex; margin: 0; }
.logout-form button { font: inherit; cursor: pointer; }
.mobile-logout-form { display: block; width: 100%; }
.mobile-logout-form button { min-height: 48px; width: 100%; display: flex; align-items: center; padding: 0 15px; border: 0; border-radius: 12px; background: transparent; color: #41545a; text-align: left; font-weight: 800; }
.mobile-logout-form button:hover { background: var(--surface-2); color: var(--accent); }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .5rem; margin-top: 1.5rem; }
.pagination a { min-width: 2.5rem; padding: .6rem .8rem; border: 1px solid var(--line, rgba(255,255,255,.16)); border-radius: .65rem; text-align: center; text-decoration: none; }
.pagination a.active { font-weight: 700; pointer-events: none; }
.pagination-summary { margin: .75rem 0 0; text-align: center; opacity: .72; }


/* V33 — images optimisées, collage et Phototon. */
.highres-link{display:block;position:relative;overflow:hidden}
.highres-link>img{display:block;width:100%}
.highres-link:after{content:"Ouvrir l’original";position:absolute;right:10px;bottom:10px;padding:7px 10px;border-radius:9px;background:rgba(9,25,30,.78);color:#fff;font-size:.78rem;font-weight:800;opacity:0;transform:translateY(4px);transition:.18s ease}
.highres-link:hover:after,.highres-link:focus-visible:after{opacity:1;transform:none}
.detail-hero>.highres-link{min-height:360px}
.detail-hero>.highres-link img{height:100%;min-height:360px;object-fit:cover}
.selected-shop-visual{margin:0 0 24px;border-radius:16px;border:1px solid var(--line);max-height:520px}
.selected-shop-visual img{width:100%;max-height:520px;object-fit:cover}
.image-picker-native{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}
.image-picker{margin-top:8px;padding:13px;border:1px dashed rgba(17,141,167,.45);border-radius:13px;background:rgba(17,141,167,.035);outline:none;transition:.18s ease}
.image-picker:focus,.image-picker.is-dragging{border-color:var(--accent);box-shadow:0 0 0 3px rgba(17,141,167,.12);background:rgba(17,141,167,.08)}
.image-picker-actions{display:flex;flex-wrap:wrap;gap:8px}
.image-picker-help{margin:9px 0 0;color:var(--muted);font-size:.88rem}
.image-picker-preview{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;color:var(--muted);font-size:.84rem}
.image-picker-file{display:flex;align-items:center;gap:7px;max-width:220px;padding:5px 8px 5px 5px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
.image-picker-file img{width:36px;height:36px;object-fit:cover;border-radius:7px}
.image-picker-file b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.78rem}
.reference-upload-buttons{display:flex;flex-wrap:wrap;gap:9px}
.photo-challenge-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:20px}
.phototon-month-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.phototon-month-card{min-height:110px;padding:18px;border:1px solid var(--line);border-radius:16px;background:linear-gradient(145deg,var(--surface),var(--surface-2));box-shadow:0 7px 22px rgba(22,48,55,.07);display:flex;align-items:center;justify-content:center;text-align:center;font-size:1.08rem;font-weight:900;transition:.18s ease}
.phototon-month-card:hover,.phototon-month-card:focus-visible{border-color:var(--accent);transform:translateY(-2px);background:rgba(17,141,167,.07)}
.phototon-board-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}
.photo-theme-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:11px;max-width:1050px;margin:0 auto}
.photo-theme-square{position:relative;aspect-ratio:1/1;border:1px solid var(--line);border-radius:14px;overflow:hidden;background:linear-gradient(145deg,var(--surface),var(--surface-2));box-shadow:0 5px 16px rgba(22,48,55,.06)}
.photo-theme-open{width:100%;height:100%;padding:12px;border:0;background:transparent;color:inherit;text-align:center;display:flex;align-items:center;justify-content:center;cursor:pointer}
.photo-theme-open:hover,.photo-theme-open:focus-visible{background:rgba(17,141,167,.07);outline:none}
.photo-theme-open h3{font-size:clamp(.86rem,1.15vw,1.04rem);line-height:1.2;margin:0;overflow-wrap:anywhere}
.photo-dialog{width:min(980px,calc(100vw - 28px));max-height:calc(100vh - 28px);padding:0;border:0;border-radius:20px;background:var(--surface);color:inherit;box-shadow:0 25px 80px rgba(5,23,29,.3)}
.photo-dialog::backdrop{background:rgba(6,24,30,.68);backdrop-filter:blur(4px)}
.photo-dialog-inner{padding:24px}
.photo-dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:20px}
.photo-dialog-head h2{margin:3px 0 0}
.photo-dialog-close{width:42px;height:42px;border-radius:50%;border:1px solid var(--line);background:var(--surface-2);font-size:1.5rem;cursor:pointer}
.photo-comparison{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.photo-contributor{padding:15px;border:1px solid var(--line);border-radius:16px;background:var(--surface-2)}
.photo-contributor h3{margin:0 0 12px}
.photo-contributor-image{aspect-ratio:4/3;border-radius:13px;overflow:hidden;background:var(--surface-3);display:flex;align-items:center;justify-content:center;color:var(--muted);text-align:center}
.photo-contributor-image img{width:100%;height:100%;object-fit:contain;background:#0b1113}
.photo-contributor-meta{margin:8px 0;color:var(--muted);font-size:.82rem}
.photo-own-actions{margin-top:13px;padding-top:13px;border-top:1px solid var(--line)}
.photo-board-editor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.photo-board-editor-grid label{display:flex;align-items:center;gap:9px}
.photo-board-editor-grid span{min-width:27px;font-weight:900;color:var(--accent)}
@media(max-width:900px){.phototon-month-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.photo-theme-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:680px){.detail-hero>.highres-link{min-height:0}.detail-hero>.highres-link img{height:230px;min-height:0}.photo-challenge-hero{align-items:flex-start;flex-direction:column}.phototon-month-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.phototon-month-card{min-height:86px;padding:12px}.phototon-board-actions{justify-content:flex-start}.photo-theme-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.photo-theme-open{padding:8px}.photo-comparison,.photo-board-editor-grid{grid-template-columns:1fr}.photo-dialog-inner{padding:17px}}
@media(max-width:420px){.photo-theme-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* V35 — rôles Phototon et téléchargement des originaux */
.user-create-form-wide{max-width:940px}.user-create-form-wide .field{min-width:220px}
.user-row-phototon{align-items:flex-start}.user-management{display:flex;flex-direction:column;align-items:flex-end;gap:10px;min-width:min(100%,430px)}
.user-phototon-role{font-size:.76rem;font-weight:800;text-transform:uppercase;letter-spacing:.05em;border-radius:999px;padding:5px 10px;border:1px solid var(--line)}
.user-phototon-role.participant{color:var(--success);border-color:rgba(26,146,112,.3);background:rgba(26,146,112,.09)}
.user-phototon-role.spectator{color:#6f62bb;border-color:rgba(111,98,187,.3);background:rgba(111,98,187,.09)}
.user-phototon-role.none{color:var(--muted);background:var(--surface-2)}
.phototon-role-form{display:flex;align-items:end;justify-content:flex-end;gap:9px;flex-wrap:wrap}.phototon-role-form label{display:flex;align-items:center;gap:8px}.phototon-role-form label span,.fixed-phototon-role{color:var(--muted);font-size:.84rem;font-weight:700}.phototon-role-form select{min-width:145px}
.phototon-selected-head{align-items:flex-start}
.phototon-download-panel{margin:0 0 22px;padding:0;border:1px solid var(--line);border-radius:14px;background:var(--surface-2)}
.phototon-download-panel>summary{padding:14px 17px;cursor:pointer;font-weight:900;color:var(--accent)}
.phototon-download-form{padding:0 17px 17px}.phototon-download-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:11px}.phototon-download-toolbar span{color:var(--muted);font-size:.88rem}
.phototon-download-people{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:9px;margin-bottom:14px}.phototon-download-people label{display:grid;grid-template-columns:auto 1fr;gap:1px 8px;align-items:center;padding:10px 11px;border:1px solid var(--line);border-radius:11px;background:var(--surface);cursor:pointer}.phototon-download-people input{grid-row:1/3}.phototon-download-people span{font-weight:800}.phototon-download-people small{color:var(--muted)}
.photo-dialog{width:min(1400px,calc(100vw - 28px))}.photo-comparison{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}.photo-contributor h3{display:flex;align-items:center;justify-content:space-between;gap:8px}.photo-contributor h3 small{font-size:.68rem;color:var(--muted);font-weight:700}
@media(max-width:680px){.user-management{align-items:stretch;min-width:0}.phototon-role-form,.phototon-role-form label{align-items:stretch;flex-direction:column}.phototon-role-form select,.phototon-role-form button{width:100%}.phototon-download-people{grid-template-columns:1fr}}


/* V37 — Phototon : cartes compactes et navigation en bas */
.photo-theme-open{position:relative;padding:12px;display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:10px;overflow:hidden}
.photo-theme-label{position:static;z-index:auto;padding:0 4px;background:transparent;color:inherit;text-align:center;display:flex;align-items:center;justify-content:center;min-height:42px}
.photo-theme-label h3{color:inherit;text-shadow:none}
.photo-theme-previews{position:static;inset:auto;width:100%;height:44%;min-height:62px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;background:transparent;margin-top:auto}
.photo-theme-preview{position:relative;min-width:0;overflow:hidden;border:1px solid var(--line);border-radius:9px;background:var(--surface-3)}
.photo-theme-preview img{width:100%;height:100%;object-fit:cover;display:block}
.photo-theme-preview small{position:absolute;left:4px;right:4px;bottom:4px;padding:2px 5px;border-radius:7px;background:rgba(5,16,20,.74);color:#fff;font-size:.58rem;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}
.photo-theme-square.has-no-preview .photo-theme-open{align-items:center;justify-content:center}
.photo-theme-square.has-no-preview .photo-theme-label{min-height:0}
.photo-dialog-head{display:grid;grid-template-columns:minmax(0,1fr) 42px;align-items:start;gap:12px}
.photo-dialog-title{text-align:left;min-width:0}.photo-dialog-title h2{overflow-wrap:anywhere}
.photo-dialog-navigation{position:sticky;bottom:-24px;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:20px;padding:18px 0 0;border-top:1px solid var(--line);background:var(--surface);box-shadow:0 -14px 18px -22px rgba(5,23,29,.5)}
.photo-dialog-nav-button{min-width:170px;display:inline-flex;align-items:center;justify-content:center}
.photo-dialog-nav-button:disabled{opacity:.35;cursor:not-allowed;transform:none;box-shadow:none}
.photo-own-actions .field small{display:block;margin-top:6px;color:var(--muted);font-size:.8rem}
.phototon-upload-form .image-picker{padding:10px}
.phototon-upload-form .image-picker-preview{margin-top:8px}
@media(max-width:680px){.photo-dialog-head{grid-template-columns:minmax(0,1fr) 36px}.photo-dialog-close{position:static;width:36px;height:36px}.photo-dialog-title{padding-top:0}.photo-theme-preview small{display:none}.photo-theme-open{padding:8px;gap:7px}.photo-theme-label{min-height:34px}.photo-theme-previews{min-height:50px;gap:5px}.photo-dialog-navigation{bottom:-17px;gap:8px}.photo-dialog-nav-button{min-width:0;flex:1;padding-left:8px;padding-right:8px;font-size:.82rem}}

/* V38 — Phototon : affichage intégral des photographies, sans recadrage */
.photo-contributor-image{
    aspect-ratio:auto;
    min-height:180px;
    height:auto;
    overflow:visible;
    padding:10px;
}
.photo-contributor-image .highres-link{
    width:100%;
    height:auto;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:visible;
}
.photo-contributor-image .highres-link>img,
.photo-contributor-image img{
    display:block;
    width:auto;
    height:auto;
    max-width:100%;
    max-height:min(72vh,1000px);
    object-fit:contain;
    object-position:center;
    image-orientation:from-image;
    border-radius:10px;
}
@media(max-width:680px){
    .photo-contributor-image{min-height:120px;padding:6px}
    .photo-contributor-image .highres-link>img,
    .photo-contributor-image img{max-height:70vh}
}

/* V39 — Phototon à nombre de thèmes variable et mode sombre local */
.theme-toggle{gap:7px;white-space:nowrap}.theme-toggle [data-theme-icon]{font-size:1.08rem;line-height:1}.mobile-theme-toggle{min-height:48px;display:flex;align-items:center;gap:9px;padding:0 15px;border:0;border-radius:12px;background:transparent;color:#41545a;font-weight:800;text-align:left;cursor:pointer}.mobile-theme-toggle:hover{background:var(--surface-2);color:var(--accent)}
.photo-board-editor-grid{grid-template-columns:repeat(5,minmax(0,1fr));margin-top:12px}.photo-board-editor-grid label{min-width:0;align-items:flex-start;flex-direction:column;gap:5px}.photo-board-editor-grid label span{min-width:0}.photo-board-editor-grid input{min-width:0}.photo-own-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:12px}.photo-own-actions>.phototon-upload-form{min-width:0}.photo-own-actions>.delete-line{margin:0;padding:0;border:0;align-self:end}.photo-own-actions>.delete-line .danger{min-height:46px}
@media(max-width:1080px){.theme-toggle [data-theme-label]{display:none}.theme-toggle{padding-left:12px;padding-right:12px}.photo-board-editor-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:680px){.mobile-theme-toggle [data-theme-label]{display:inline}.photo-board-editor-grid{grid-template-columns:1fr 1fr}.photo-own-actions{grid-template-columns:1fr}.photo-own-actions>.delete-line .danger{width:100%}}

html[data-theme="dark"]{
  color-scheme:dark;
  --bg:#0a0e11;
  --surface:#11171b;
  --surface-2:#172025;
  --surface-3:#202b31;
  --line:#2c3a40;
  --text:#eef3f4;
  --muted:#a6b6bb;
  --accent:#24a7c3;
  --accent-2:#d8bd45;
  --accent-soft:rgba(36,167,195,.14);
  --dark:#080c0e;
  --success:#59c49a;
  --danger:#e37575;
  --shadow:0 18px 48px rgba(0,0,0,.28);
}
html[data-theme="dark"] body{background:radial-gradient(circle at 86% 8%,rgba(36,167,195,.08),transparent 25%),radial-gradient(circle at 10% 28%,rgba(216,189,69,.045),transparent 22%),linear-gradient(180deg,#0f1518 0%,#090d10 100%);color:var(--text)}
html[data-theme="dark"] .topbar{background:rgba(15,21,25,.97);color:var(--text);border-color:var(--line);box-shadow:0 6px 24px rgba(0,0,0,.22)}
html[data-theme="dark"] .brand{color:var(--text)}
html[data-theme="dark"] .main-nav a{color:#a9b8bc}
html[data-theme="dark"] .main-nav a:hover,html[data-theme="dark"] .main-nav a.active{color:#58c1d7;border-bottom-color:#58c1d7}
html[data-theme="dark"] .account-button{background:var(--accent);color:#071115}
html[data-theme="dark"] .account-quiet{background:var(--surface-2);color:var(--text);border-color:var(--line)}
html[data-theme="dark"] .account-quiet:hover{border-color:var(--accent);color:#72d0e3}
html[data-theme="dark"] .footer{background:rgba(13,19,22,.72);border-color:var(--line)}
html[data-theme="dark"] :is(.hero,.explore-hero,.detail-hero,.private-hero,.panel,.post-card,.login-box,.admin-sidebar,.metric,.quick,.place-card,.shop-card-wrap,.showcase-card,.resource-card,.villager-group,.reference-card,.lore-card,.lore-element-card,.photo-theme-square,.phototon-month-card,.photo-dialog,.photo-contributor,.phototon-download-panel,.phototon-download-people label,.user-row,.seller-submit){background:var(--surface);border-color:var(--line);box-shadow:var(--shadow)}
html[data-theme="dark"] .hero{background:linear-gradient(104deg,rgba(17,23,27,.99) 0%,rgba(17,23,27,.98) 58%,rgba(15,34,39,.95) 100%)}
html[data-theme="dark"] .hero-backdrop:after{background:linear-gradient(90deg,rgba(17,23,27,.98) 24%,rgba(17,23,27,.91) 63%,rgba(17,23,27,.5))}
html[data-theme="dark"] :is(.detail-hero>div,.editor-panel,.editor-toolbar,.rich-editor,.breadcrumb,.hero-coordinate,.selected-shop,.shop-tab,.reference-upload-form,.reference-tabs a,.mood-controls,.encyclopedia-filters button,.editor-link-editor,.editor-linked-pill button,.gallery-display-item .gallery-remove-form .danger,.delete-item){background:var(--surface);border-color:var(--line);color:var(--text)}
html[data-theme="dark"] :is(input:not([type=checkbox]):not([type=color]),textarea,select){background:#0c1215;border-color:#34434a;color:var(--text)}
html[data-theme="dark"] input[readonly]{background:#151d21;color:var(--muted)}
html[data-theme="dark"] :is(.formatted,.post-text,.story-text){color:#d8e1e3}
html[data-theme="dark"] :is(.subtitle,.explore-hero p){color:var(--muted)}
html[data-theme="dark"] .secondary{background:var(--surface-2);color:var(--text);border-color:var(--line)}
html[data-theme="dark"] .secondary:hover{border-color:var(--accent);color:#72d0e3}
html[data-theme="dark"] .edit-page{background:var(--surface-2);color:#72d0e3;border-color:rgba(36,167,195,.45)}
html[data-theme="dark"] :is(.place-card,.shop-card-wrap,.showcase-card,.resource-card,.villager-group,.reference-card,.lore-card,.lore-element-card){box-shadow:0 8px 24px rgba(0,0,0,.16)}
html[data-theme="dark"] :is(.reference-dropzone,.reference-upload-form,.editor-link-panel){background:#121b1f;border-color:#35505a}
html[data-theme="dark"] .reference-large img{background:#080c0e}
html[data-theme="dark"] .reference-tabs a.active,html[data-theme="dark"] .reference-tabs a:hover{background:var(--accent);color:#071115}
html[data-theme="dark"] .photo-dialog::backdrop{background:rgba(0,0,0,.76)}
html[data-theme="dark"] .photo-dialog-navigation{background:var(--surface)}
html[data-theme="dark"] .photo-theme-preview{background:var(--surface-3);border-color:var(--line)}
html[data-theme="dark"] .photo-contributor-image{background:#090e11}
html[data-theme="dark"] .mobile-menu{background:var(--surface);box-shadow:14px 0 42px rgba(0,0,0,.38)}
html[data-theme="dark"] .mobile-menu-close,html[data-theme="dark"] .mobile-menu-button{background:var(--surface-2);color:var(--text);border-color:var(--line)}
html[data-theme="dark"] .mobile-nav a,html[data-theme="dark"] .mobile-account a,html[data-theme="dark"] .mobile-theme-toggle{color:#c4d0d3}
html[data-theme="dark"] .mobile-nav a:hover,html[data-theme="dark"] .mobile-nav a.active,html[data-theme="dark"] .mobile-account a:hover,html[data-theme="dark"] .mobile-theme-toggle:hover{background:var(--surface-2);color:#72d0e3}
html[data-theme="dark"] .mobile-menu-overlay{background:rgba(0,0,0,.65)}
html[data-theme="dark"] .flash{background:rgba(89,196,154,.12)}
html[data-theme="dark"] .flash.error{background:rgba(227,117,117,.12);color:#ffb4b4}
html[data-theme="dark"] .empty{background:var(--surface-2);border-color:#3a4a50}
html[data-theme="dark"] .reference-suggestion{background:var(--surface-2);border-color:rgba(36,167,195,.3)}
html[data-theme="dark"] .editor-link-line input{background:#0c1215!important}
html[data-theme="dark"] .encyclopedia-filters button:hover,html[data-theme="dark"] .encyclopedia-filters button.active{background:var(--accent-soft);color:#72d0e3}

/* v40 — interrupteur local et navigation adaptative aux petites résolutions */
.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.theme-switch{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;padding:5px;border:0;background:transparent;border-radius:999px;cursor:pointer}
.theme-switch:focus-visible,.mobile-theme-toggle:focus-visible{outline:3px solid rgba(17,141,167,.28);outline-offset:3px}
.theme-switch-track{position:relative;display:inline-flex;align-items:center;width:52px;height:29px;padding:3px;border:1px solid #b9c7ca;border-radius:999px;background:#dce5e7;box-shadow:inset 0 1px 3px rgba(20,44,50,.14);transition:background .2s ease,border-color .2s ease}
.theme-switch-thumb{display:block;width:21px;height:21px;border-radius:50%;background:#fff;box-shadow:0 2px 6px rgba(15,35,40,.28);transform:translateX(0);transition:transform .22s ease,background .2s ease}
.theme-switch[aria-checked="true"] .theme-switch-track,.mobile-theme-toggle[aria-checked="true"] .theme-switch-track{background:var(--accent);border-color:var(--accent)}
.theme-switch[aria-checked="true"] .theme-switch-thumb,.mobile-theme-toggle[aria-checked="true"] .theme-switch-thumb{transform:translateX(23px)}
.theme-switch:hover .theme-switch-track{border-color:var(--accent)}
.mobile-theme-toggle{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;min-height:49px;padding:8px 15px;border:0;border-radius:12px;background:transparent;color:#41545a;font:inherit;font-weight:800;text-align:left;cursor:pointer}
.mobile-theme-toggle:hover{background:var(--surface-2);color:var(--accent)}
.mobile-theme-toggle .theme-switch-track{flex:0 0 52px}

/* Sur les écrans compacts, le tiroir remplace la rangée d'onglets pour éviter toute coupure. */
.topbar.nav-compact{height:76px;min-height:76px;flex-wrap:nowrap;gap:16px;padding-left:clamp(14px,2.2vw,32px);padding-right:clamp(14px,2.2vw,32px)}
.topbar.nav-compact .brand{height:76px}
.topbar.nav-compact .main-nav{display:none}
.topbar.nav-compact .mobile-menu-button{height:44px;width:44px;flex:0 0 44px;display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;border:1px solid rgba(17,141,167,.25);border-radius:12px;background:#fff;color:var(--accent);cursor:pointer}
.topbar.nav-compact .mobile-menu-button span{display:block;width:22px;height:2.5px;border-radius:3px;background:currentColor}
.topbar.nav-compact .account{margin-left:auto;min-width:0;gap:8px}
.topbar.nav-compact .account-button,.topbar.nav-compact .account-quiet{padding-left:12px;padding-right:12px}
.topbar.nav-compact + .mobile-menu-overlay{position:fixed;inset:0;z-index:98;display:block;background:rgba(17,31,35,.46);opacity:0;pointer-events:none;transition:opacity .2s ease}
.topbar.nav-compact + .mobile-menu-overlay[hidden]{display:none}
.topbar.nav-compact + .mobile-menu-overlay.is-open{opacity:1;pointer-events:auto}
.topbar.nav-compact ~ .mobile-menu{position:fixed;left:0;top:0;bottom:0;z-index:99;display:flex;flex-direction:column;width:min(86vw,350px);padding:0;background:#fff;box-shadow:14px 0 42px rgba(20,39,43,.18);transform:translateX(-103%);transition:transform .22s ease;overflow-y:auto}
.topbar.nav-compact ~ .mobile-menu.is-open{transform:translateX(0)}
.topbar.nav-compact ~ .mobile-menu .mobile-menu-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:74px;padding:12px 15px;border-bottom:1px solid var(--line)}
.topbar.nav-compact ~ .mobile-menu .mobile-menu-brand{display:flex;align-items:center;color:var(--text);font-weight:900;font-size:1.04rem;letter-spacing:.13em}
.topbar.nav-compact ~ .mobile-menu .mobile-menu-brand .cube{height:20px;width:20px;margin-right:10px}
.topbar.nav-compact ~ .mobile-menu .mobile-menu-close{height:43px;width:43px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--text);font-size:2rem;line-height:1;cursor:pointer}
.topbar.nav-compact ~ .mobile-menu .mobile-nav{display:flex;flex-direction:column;padding:14px 12px 9px;gap:4px}
.topbar.nav-compact ~ .mobile-menu .mobile-nav a{display:flex;align-items:center;min-height:49px;padding:0 15px;border-radius:12px;font-size:1rem;font-weight:800;color:#41545a;border:1px solid transparent}
.topbar.nav-compact ~ .mobile-menu .mobile-nav a:hover,.topbar.nav-compact ~ .mobile-menu .mobile-nav a.active{background:rgba(17,141,167,.1);border-color:rgba(17,141,167,.18);color:var(--accent)}
.topbar.nav-compact ~ .mobile-menu .mobile-account{display:flex;flex-direction:column;gap:5px;margin:auto 12px 0;padding:14px 0 20px;border-top:1px solid var(--line)}
.topbar.nav-compact ~ .mobile-menu .mobile-account a{min-height:48px;display:flex;align-items:center;padding:0 15px;border-radius:12px;color:#41545a;font-weight:800}
.topbar.nav-compact ~ .mobile-menu .mobile-account a:hover{background:var(--surface-2);color:var(--accent)}
.topbar.nav-compact ~ .mobile-menu .mobile-account .mobile-login{justify-content:center;background:var(--accent);color:#fff;margin-top:4px}
body.mobile-menu-is-open{overflow:hidden}

/* Repli immédiat sans attendre JavaScript sur les écrans réellement compacts. */
@media(max-width:1180px){
  .topbar:not(.nav-compact){height:76px;min-height:76px;flex-wrap:nowrap;gap:16px;padding-left:clamp(14px,2.2vw,32px);padding-right:clamp(14px,2.2vw,32px)}
  .topbar:not(.nav-compact) .main-nav{display:none}
  .topbar:not(.nav-compact) .mobile-menu-button{height:44px;width:44px;flex:0 0 44px;display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;border:1px solid rgba(17,141,167,.25);border-radius:12px;background:#fff;color:var(--accent)}
  .topbar:not(.nav-compact) .mobile-menu-button span{display:block;width:22px;height:2.5px;border-radius:3px;background:currentColor}
}
@media(max-width:900px){
  .topbar.nav-compact .account{display:none}
  .topbar.nav-compact .brand{margin-right:auto}
}
@media(max-width:520px){
  .topbar.nav-compact{height:70px;min-height:70px;padding-left:12px;padding-right:12px;gap:11px}
  .topbar.nav-compact .brand{height:70px;font-size:1.02rem;letter-spacing:.11em}
  .topbar.nav-compact .brand .cube{height:18px;width:18px;margin-right:9px}
}

html[data-theme="dark"] .theme-switch-track{background:#34434a;border-color:#526269}
html[data-theme="dark"] .theme-switch-thumb{background:#f5f7f7}
html[data-theme="dark"] .topbar.nav-compact .mobile-menu-button{background:var(--surface-2);color:#72d0e3;border-color:var(--line)}
html[data-theme="dark"] .topbar.nav-compact ~ .mobile-menu{background:var(--surface);box-shadow:14px 0 42px rgba(0,0,0,.38)}
html[data-theme="dark"] .topbar.nav-compact ~ .mobile-menu .mobile-menu-close{background:var(--surface-2);color:var(--text);border-color:var(--line)}
html[data-theme="dark"] .topbar.nav-compact ~ .mobile-menu .mobile-nav a,html[data-theme="dark"] .topbar.nav-compact ~ .mobile-menu .mobile-account a,html[data-theme="dark"] .mobile-theme-toggle{color:#c4d0d3}
html[data-theme="dark"] .topbar.nav-compact ~ .mobile-menu .mobile-nav a:hover,html[data-theme="dark"] .topbar.nav-compact ~ .mobile-menu .mobile-nav a.active,html[data-theme="dark"] .topbar.nav-compact ~ .mobile-menu .mobile-account a:hover,html[data-theme="dark"] .mobile-theme-toggle:hover{background:var(--surface-2);color:#72d0e3}


/* V41 — navigation par catégories, thème public et fin des superpositions */
.main-nav{min-width:0;overflow:visible}
.account{flex:0 0 auto}
.nav-group{position:relative;height:100%;display:flex;align-items:stretch}
.nav-group>summary{height:100%;display:flex;align-items:center;gap:7px;padding:0 15px;list-style:none;cursor:pointer;font-weight:700;color:#4d6268;border-bottom:4px solid transparent;user-select:none}
.nav-group>summary::-webkit-details-marker{display:none}
.nav-group>summary:hover,.nav-group.active>summary,.nav-group[open]>summary{color:var(--accent);border-bottom-color:var(--accent)}
.nav-group-chevron{font-size:1rem;line-height:1;transition:transform .18s ease}
.nav-group[open] .nav-group-chevron{transform:rotate(180deg)}
.nav-group-menu{position:absolute;z-index:80;top:calc(100% - 4px);left:0;min-width:220px;padding:8px;border:1px solid var(--line);border-radius:0 0 15px 15px;background:var(--surface);box-shadow:0 18px 38px rgba(20,43,49,.16)}
.nav-group-menu a{height:auto;min-height:44px;padding:10px 12px;border:0!important;border-radius:10px;color:var(--text);white-space:nowrap}
.nav-group-menu a:hover,.nav-group-menu a.active{background:var(--accent-soft);color:var(--accent)}
.mobile-nav-section-title{margin:9px 10px 2px;padding:9px 6px 5px;border-top:1px solid var(--line);color:var(--muted);font-size:.74rem;font-weight:900;letter-spacing:.13em;text-transform:uppercase}
.page-admin-toolbar{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;margin:0 0 12px}
.page-admin-toolbar .edit-page{position:static;display:inline-flex;align-items:center;justify-content:center}
.page-admin-toolbar .primary{min-height:47px}
.hero-admin-actions{display:none}

/* Phototon : états alignés, téléchargements directs et actions sous la grille */
.photo-theme-square.has-no-preview .photo-theme-open{align-items:stretch;justify-content:center}
.photo-theme-square.has-no-preview .photo-theme-label{min-height:42px}
.photo-theme-empty{grid-column:1/-1;display:flex;align-items:center;justify-content:center;min-height:100%;padding:8px;border:1px dashed var(--line);border-radius:9px;color:var(--muted);font-size:.72rem;font-weight:800;text-align:center}
.phototon-download-panel-bottom{margin:24px 0 0}
.phototon-download-empty{padding:0 17px 17px}
.phototon-direct-downloads{display:none!important}

html[data-theme="dark"] .nav-group>summary{color:#a9b8bc}
html[data-theme="dark"] .nav-group>summary:hover,html[data-theme="dark"] .nav-group.active>summary,html[data-theme="dark"] .nav-group[open]>summary{color:#58c1d7;border-bottom-color:#58c1d7}
html[data-theme="dark"] .nav-group-menu{background:var(--surface);border-color:var(--line);box-shadow:0 18px 38px rgba(0,0,0,.35)}
html[data-theme="dark"] .nav-group-menu a{color:var(--text)}
html[data-theme="dark"] .nav-group-menu a:hover,html[data-theme="dark"] .nav-group-menu a.active{background:var(--surface-2);color:#72d0e3}

@media(max-width:1180px){
  .nav-group-menu{display:none}
}
@media(max-width:780px){
  .page-admin-toolbar{justify-content:stretch;margin-bottom:10px}
  .page-admin-toolbar a{width:100%}
}

/* V42 — mise en page mobile des cartes Fermes et actions Encyclopédie */
@media(max-width:680px){
  .farm-card{
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:14px;
    padding:14px;
  }
  .farm-card>img{
    width:100%;
    max-width:none;
    margin:0;
  }
  .farm-card .grow{
    width:100%;
    min-width:0;
    padding:0;
  }
  .farm-card .resource-title{
    display:flex;
    align-items:flex-start;
    justify-content:flex-start;
    flex-wrap:wrap;
    gap:8px 10px;
    margin-bottom:9px;
  }
  .farm-card .resource-title h2{
    flex:1 1 210px;
    min-width:0;
    margin:0;
    font-size:clamp(1.22rem,6vw,1.48rem);
    line-height:1.25;
    overflow-wrap:break-word;
    word-break:normal;
  }
  .farm-card .resource-title .tag{
    flex:0 0 auto;
    max-width:100%;
  }
  .farm-card .coordinate-list{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:9px;
    width:100%;
    margin-top:12px;
  }
  .farm-card .coordinate-list span{
    min-width:0;
    width:100%;
    overflow-wrap:anywhere;
  }
  .farm-card>.row-controls{
    width:100%;
    margin:0;
    padding-top:12px;
    border-top:1px solid var(--line);
    justify-content:flex-end;
  }

  .encyclopedia-grid .lore-element-card .card-admin{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    align-items:stretch;
    gap:9px;
    padding:0 15px 15px;
  }
  .encyclopedia-grid .lore-element-card .card-admin>a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:0;
    min-height:42px;
    padding:9px 12px;
    border:1px solid rgba(17,141,167,.28);
    border-radius:10px;
    background:rgba(17,141,167,.08);
    white-space:nowrap;
  }
  .encyclopedia-grid .lore-element-card .card-admin form{
    display:flex;
    width:100%;
    min-width:0;
  }
  .encyclopedia-grid .lore-element-card .card-admin .danger{
    width:100%;
    min-width:0;
    min-height:42px;
    height:auto;
    padding:9px 12px;
    line-height:1.2;
    white-space:nowrap;
  }
}

@media(max-width:390px){
  .farm-card .coordinate-list{grid-template-columns:1fr}
}

html[data-theme="dark"] .encyclopedia-grid .lore-element-card .card-admin>a{
  background:var(--surface-2);
  border-color:var(--line);
  color:#72d0e3;
}

/* V43 — tirage aléatoire de blocs de construction */
.block-draw-hero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:32px;
  padding:38px 42px;
  overflow:hidden;
  position:relative;
}
.block-draw-hero>div:first-child{max-width:800px}
.block-draw-hero h1{font-size:clamp(2.35rem,5vw,4.2rem);line-height:1.02;margin:0 0 15px}
.block-draw-hero p:last-child{margin:0;color:var(--muted);font-size:1.05rem}
.block-draw-total{
  flex:0 0 178px;
  min-height:150px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  border:1px solid var(--line);
  border-radius:22px;
  background:var(--surface-2);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.02);
}
.block-draw-total strong{font-size:3rem;line-height:1;color:var(--accent)}
.block-draw-total span{max-width:110px;margin-top:8px;color:var(--muted);font-weight:800;line-height:1.25}
.block-draw-controls{padding:30px}
.block-draw-form{display:flex;align-items:end;gap:18px;padding-bottom:24px;border-bottom:1px solid var(--line)}
.block-count-field{width:min(360px,100%)}
.block-count-field input{font-size:1.2rem;font-weight:900}
.block-draw-actions{display:flex;gap:10px;flex-wrap:wrap;padding-bottom:1px}
.block-draw-message{padding:22px 0 0;color:var(--muted);font-weight:700}
.block-draw-results{display:grid;grid-template-columns:repeat(auto-fit,minmax(205px,1fr));gap:17px;margin-top:22px}
.block-draw-results:not(.has-results){display:none}
.block-pick-card{
  min-width:0;
  display:flex;
  align-items:center;
  gap:16px;
  padding:16px;
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--surface-2);
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease;
}
.block-pick-card:hover{transform:translateY(-2px);border-color:var(--accent);box-shadow:0 10px 25px rgba(0,0,0,.12)}
.block-pick-visual{
  flex:0 0 86px;
  width:86px;
  height:86px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:13px;
  background:repeating-conic-gradient(rgba(127,140,145,.12) 0 25%,transparent 0 50%) 50%/18px 18px;
}
.block-pick-visual img{
  width:100%;
  height:100%;
  object-fit:contain;
  image-rendering:pixelated;
  image-rendering:crisp-edges;
}
.block-pick-visual.is-fallback img{padding:8px;image-rendering:auto}
.block-pick-content{min-width:0;display:grid;grid-template-columns:auto minmax(0,1fr);gap:5px 9px;align-items:center}
.block-pick-number{display:inline-flex;align-items:center;justify-content:center;min-width:30px;height:25px;padding:0 7px;border-radius:999px;background:var(--accent-soft);color:var(--accent);font-size:.74rem;font-weight:900}
.block-pick-category{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:.73rem;font-weight:900;letter-spacing:.06em;text-transform:uppercase}
.block-pick-content h2{grid-column:1/-1;margin:2px 0 0;font-size:1.08rem;line-height:1.2;overflow-wrap:anywhere}
html[data-theme="dark"] :is(.block-draw-total,.block-pick-card){background:var(--surface-2);border-color:var(--line)}

@media(max-width:760px){
  .block-draw-hero{align-items:flex-start;padding:28px 24px}
  .block-draw-total{flex-basis:125px;min-height:116px;border-radius:17px}
  .block-draw-total strong{font-size:2.25rem}
  .block-draw-form{align-items:stretch;flex-direction:column}
  .block-count-field{width:100%}
  .block-draw-actions{width:100%}
  .block-draw-actions button{flex:1 1 150px}
}
@media(max-width:520px){
  .block-draw-hero{display:block;padding:25px 20px}
  .block-draw-hero h1{font-size:2.45rem}
  .block-draw-total{width:100%;min-height:84px;margin-top:22px;flex-direction:row;gap:12px}
  .block-draw-total span{max-width:none;margin:0;text-align:left}
  .block-draw-controls{padding:20px 16px}
  .block-draw-results{grid-template-columns:1fr;gap:12px}
  .block-pick-card{padding:13px}
  .block-pick-visual{flex-basis:74px;width:74px;height:74px}
}

/* V44 — Bibliothèque de palettes et roulette de blocs */
.palette-hero{
  display:flex;align-items:center;justify-content:space-between;gap:28px;padding:34px;
}
.palette-hero>div:first-child{max-width:760px}
.palette-hero h1{font-size:clamp(2.5rem,5vw,4.5rem);line-height:1;margin:0 0 14px}
.palette-hero p:last-child{margin:0;color:var(--muted);font-size:1.05rem}
.palette-top-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.palette-top-actions :is(a,button){white-space:nowrap}
.palette-library{margin-top:28px}
.palette-library-head,.palette-section-head{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:18px}
.palette-library-head h2,.palette-section-head h2{margin:0}
.palette-library-head>span{color:var(--muted);font-weight:800}
.palette-card-list{display:grid;gap:16px}
.palette-card{padding:22px 24px;overflow:hidden}
.palette-card-head{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:18px}
.palette-card-head h3{font-size:1.35rem;margin:0 0 4px}
.palette-card-head p{margin:0;color:var(--muted);font-size:.9rem}
.palette-card-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.palette-card-actions form{margin:0}
.icon-button{
  width:42px;height:42px;display:inline-grid;place-items:center;border:1px solid var(--line);border-radius:12px;
  background:var(--surface-2);color:var(--text);font:inherit;font-weight:900;text-decoration:none;cursor:pointer;transition:.18s ease;
}
.icon-button:hover{border-color:var(--accent);color:var(--accent);transform:translateY(-1px)}
.icon-button.danger:hover{border-color:#d95b65;color:#d95b65}
.icon-button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.copy-button.is-copied{background:var(--accent);border-color:var(--accent);color:#fff}
.palette-block-strip{display:flex;gap:12px;overflow-x:auto;padding:2px 2px 8px;scrollbar-width:thin}
.palette-mini-block{flex:0 0 112px;min-width:0}
.palette-mini-block img{display:block;width:84px;height:84px;image-rendering:pixelated;object-fit:cover;border-radius:13px;border:1px solid var(--line);background:var(--surface-2)}
.palette-mini-block span{display:block;margin-top:7px;font-size:.82rem;font-weight:750;line-height:1.2;overflow-wrap:anywhere}
.palette-empty{text-align:center;padding:46px 24px}
.palette-empty p{color:var(--muted)}

.palette-dialog,.palette-import-dialog{
  width:min(1160px,calc(100vw - 28px));max-height:calc(100dvh - 28px);padding:0;border:1px solid var(--line);border-radius:24px;
  background:var(--surface);color:var(--text);box-shadow:0 24px 80px rgba(0,0,0,.34);overflow:hidden;
}
.palette-import-dialog{width:min(650px,calc(100vw - 28px))}
.palette-dialog::backdrop,.palette-import-dialog::backdrop{background:rgba(3,12,16,.72);backdrop-filter:blur(5px)}
.palette-editor,.palette-import-form{display:flex;flex-direction:column;max-height:calc(100dvh - 30px);padding:0;margin:0}
.palette-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:24px 28px 18px;border-bottom:1px solid var(--line)}
.palette-dialog-head h2{margin:0}
.dialog-close{width:42px;height:42px;border:1px solid var(--line);border-radius:50%;background:transparent;color:var(--text);font-size:1.6rem;line-height:1;cursor:pointer}
.palette-editor>.field,.palette-import-form>.field,.palette-import-form>p{margin:18px 28px 0}
.palette-import-form>p{color:var(--muted)}
.palette-import-form code{color:var(--accent)}
.palette-editor-tools{display:grid;grid-template-columns:minmax(240px,.65fr) 1.35fr;gap:18px;padding:18px 28px 0}
.palette-editor-categories{display:flex;align-content:flex-start;gap:7px;flex-wrap:wrap}
.palette-editor-categories label{cursor:pointer}
.palette-editor-categories input{position:absolute;opacity:0;pointer-events:none}
.palette-editor-categories span{display:block;padding:9px 12px;border:1px solid var(--line);border-radius:999px;color:var(--muted);font-size:.83rem;font-weight:800;transition:.15s ease}
.palette-editor-categories input:checked+span{background:color-mix(in srgb,var(--accent) 16%,transparent);border-color:color-mix(in srgb,var(--accent) 65%,var(--line));color:var(--accent)}
.palette-selected-summary{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:16px 28px 10px}
.text-button{border:0;background:transparent;color:var(--accent);font:inherit;font-weight:850;cursor:pointer;padding:4px}
.palette-block-picker{display:grid;grid-template-columns:repeat(auto-fill,minmax(125px,1fr));gap:10px;margin:0 28px;min-height:190px;padding:4px 2px 22px;overflow:auto}
.palette-picker-block{position:relative;display:flex;flex-direction:column;align-items:center;gap:8px;min-height:132px;padding:12px 8px;border:1px solid var(--line);border-radius:15px;background:var(--surface-2);color:var(--text);font:inherit;cursor:pointer;transition:.15s ease}
.palette-picker-block:hover{border-color:var(--accent);transform:translateY(-1px)}
.palette-picker-block.is-selected{border-color:var(--accent);box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--accent) 35%,transparent);background:color-mix(in srgb,var(--accent) 10%,var(--surface-2))}
.palette-picker-block.is-selected::after{content:'✓';position:absolute;top:7px;right:8px;width:23px;height:23px;display:grid;place-items:center;border-radius:50%;background:var(--accent);color:#fff;font-weight:900}
.palette-picker-block img{width:72px;height:72px;object-fit:cover;image-rendering:pixelated;border-radius:10px}
.palette-picker-block span{font-size:.78rem;line-height:1.15;font-weight:780;text-align:center;overflow-wrap:anywhere}
.palette-picker-empty{grid-column:1/-1;align-self:center;text-align:center;color:var(--muted)}
.palette-dialog-footer{display:flex;justify-content:flex-end;gap:10px;padding:16px 28px 22px;border-top:1px solid var(--line);background:var(--surface)}
html.has-dialog{overflow:hidden}

.palette-roulette{padding:28px}
.roulette-layout{display:grid;grid-template-columns:minmax(250px,320px) minmax(0,1fr);gap:25px;align-items:start}
.roulette-options{position:sticky;top:92px;padding:20px;border:1px solid var(--line);border-radius:19px;background:var(--surface-2)}
.palette-category-fieldset{border:0;padding:0;margin:20px 0 0}
.palette-category-fieldset legend{font-weight:900;margin-bottom:8px}
.category-shortcuts{display:flex;gap:12px;margin-bottom:12px}
.palette-category-list{display:grid;gap:7px;max-height:390px;overflow:auto;padding-right:4px}
.palette-category-option{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;padding:9px 10px;border:1px solid var(--line);border-radius:11px;cursor:pointer;background:var(--surface)}
.palette-category-option input{accent-color:var(--accent)}
.palette-category-option span{font-weight:750;font-size:.88rem}
.palette-category-option small{color:var(--muted)}
.roulette-launch{width:100%;margin-top:18px}
.roulette-stage{min-width:0}
.roulette-machine{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:14px;min-height:390px;padding:24px;border:2px solid color-mix(in srgb,var(--accent) 45%,var(--line));border-radius:24px;background:radial-gradient(circle at top, color-mix(in srgb,var(--accent) 14%,transparent), transparent 48%),var(--surface-2);overflow:hidden}
.roulette-machine.casino-active{box-shadow:0 0 0 5px color-mix(in srgb,var(--accent) 8%,transparent),0 20px 55px rgba(0,0,0,.18)}
.roulette-placeholder{grid-column:1/-1;align-self:center;justify-self:center;display:flex;flex-direction:column;align-items:center;text-align:center;gap:9px;color:var(--muted)}
.roulette-placeholder>span{font-size:3.5rem;color:var(--accent);animation:roulette-glow 1.7s ease-in-out infinite}
.roulette-placeholder strong{font-size:1.25rem;color:var(--text)}
.roulette-placeholder.is-error strong{color:#d95b65}
.roulette-reel{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:210px;padding:16px;border:1px solid var(--line);border-radius:18px;background:var(--surface);text-align:center;overflow:hidden}
.roulette-reel img{width:112px;height:112px;object-fit:cover;image-rendering:pixelated;border-radius:15px;filter:drop-shadow(0 8px 12px rgba(0,0,0,.2))}
.roulette-reel small{color:var(--accent);font-weight:850;text-transform:uppercase;letter-spacing:.06em;font-size:.68rem}
.roulette-reel strong{line-height:1.2}
.roulette-machine.is-spinning .roulette-reel{animation:roulette-shuffle .18s linear infinite}
.roulette-reel.is-final{animation:roulette-win .45s cubic-bezier(.2,.9,.3,1.25) both}
.roulette-result-actions{display:flex;justify-content:center;gap:10px;margin-top:18px}
@keyframes roulette-shuffle{0%{transform:translateY(-9px);opacity:.55}50%{transform:translateY(8px);opacity:1}100%{transform:translateY(-9px);opacity:.55}}
@keyframes roulette-win{0%{transform:scale(.82);opacity:.2}70%{transform:scale(1.06)}100%{transform:scale(1);opacity:1}}
@keyframes roulette-glow{50%{transform:rotate(12deg) scale(1.12);text-shadow:0 0 24px var(--accent)}}

html[data-theme="dark"] :is(.palette-dialog,.palette-import-dialog,.palette-dialog-footer){background:var(--surface)}

@media (max-width:900px){
  .palette-hero{align-items:flex-start;flex-direction:column;padding:26px 22px}
  .palette-top-actions{width:100%;justify-content:flex-start}
  .roulette-layout{grid-template-columns:1fr}
  .roulette-options{position:static}
  .palette-editor-tools{grid-template-columns:1fr}
  .palette-block-picker{grid-template-columns:repeat(auto-fill,minmax(110px,1fr))}
}
@media (max-width:620px){
  .palette-hero h1{font-size:2.6rem}
  .palette-top-actions{display:grid;grid-template-columns:1fr 1fr}
  .palette-top-actions :is(a,button){width:100%;text-align:center}
  .palette-top-actions [data-palette-import-open]{grid-column:1/-1}
  .palette-library-head,.palette-section-head{align-items:flex-start;flex-direction:column}
  .palette-card{padding:18px 16px}
  .palette-card-head{align-items:flex-start}
  .palette-card-actions{gap:5px}
  .icon-button{width:38px;height:38px;border-radius:10px}
  .palette-mini-block{flex-basis:90px}
  .palette-mini-block img{width:70px;height:70px}
  .palette-dialog-head{padding:18px 18px 14px}
  .palette-editor>.field,.palette-import-form>.field,.palette-import-form>p{margin-left:18px;margin-right:18px}
  .palette-editor-tools{padding-left:18px;padding-right:18px}
  .palette-selected-summary{padding-left:18px;padding-right:18px}
  .palette-block-picker{margin-left:18px;margin-right:18px;grid-template-columns:repeat(2,minmax(0,1fr))}
  .palette-dialog-footer{padding:14px 18px 18px}
  .palette-dialog-footer button{flex:1}
  .palette-roulette{padding:20px 15px}
  .roulette-machine{grid-template-columns:repeat(2,minmax(0,1fr));padding:12px;gap:9px;min-height:300px}
  .roulette-reel{min-height:165px;padding:10px 5px}
  .roulette-reel img{width:82px;height:82px}
  .roulette-result-actions{display:grid;grid-template-columns:1fr}
}

/* V45 — Catalogue de blocs éditable et actions Palette en grille 2 × 2 */
.palette-top-actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(150px,1fr));
  width:min(390px,100%);
  gap:10px;
}
.palette-top-actions :is(a,button){width:100%;min-height:52px;text-align:center;white-space:normal}

.block-list-hero{display:flex;align-items:center;justify-content:space-between;gap:28px;padding:34px}
.block-list-hero>div:first-child{max-width:750px}
.block-list-hero h1{font-size:clamp(2.45rem,5vw,4.2rem);line-height:1;margin:0 0 14px}
.block-list-hero p:last-child{margin:0;color:var(--muted);font-size:1.04rem}
.block-list-hero-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.block-editor-panel,.block-delete-panel{margin-top:24px;padding:26px}
.block-editor-heading{margin-bottom:22px}
.block-editor-form{display:grid;grid-template-columns:minmax(180px,240px) minmax(0,1fr);gap:26px;align-items:start}
.block-editor-preview{display:flex;flex-direction:column;gap:12px;align-items:center;padding:20px;border:1px solid var(--line);border-radius:18px;background:var(--surface-2);text-align:center;color:var(--muted);font-size:.85rem}
.block-editor-preview img{display:block;width:min(180px,100%);aspect-ratio:1;object-fit:cover;image-rendering:pixelated;border-radius:18px;border:1px solid var(--line);background:var(--surface)}
.block-editor-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.block-editor-fields .field{margin:0}
.block-editor-fields .field small{display:block;margin-top:7px;color:var(--muted);line-height:1.4}
.block-editor-fields code{color:var(--accent)}
.block-texture-url-field{grid-column:1/-1}
.block-editor-actions{grid-column:2;display:flex;justify-content:flex-end}
.block-delete-summary{display:flex;align-items:center;gap:18px;margin-bottom:20px}
.block-delete-summary img{width:96px;height:96px;object-fit:cover;image-rendering:pixelated;border:1px solid var(--line);border-radius:16px;background:var(--surface-2)}
.block-delete-summary h2{margin:3px 0 6px}
.block-delete-summary p{margin:0;color:var(--muted)}
.warning-box{padding:18px 20px;margin:18px 0;border:1px solid rgba(226,170,66,.55);border-radius:16px;background:rgba(226,170,66,.10)}
.warning-box p{margin:7px 0;color:var(--muted)}
.warning-box ul{margin:10px 0 0;padding-left:20px;columns:2}
.block-delete-form{display:grid;gap:12px}
.block-delete-choice{display:grid;grid-template-columns:auto 1fr;align-items:start;gap:12px;padding:15px 16px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2);cursor:pointer}
.block-delete-choice input{margin-top:4px;accent-color:var(--accent)}
.block-delete-choice span{display:grid;gap:4px}
.block-delete-choice small{color:var(--muted);line-height:1.4}
.block-delete-choice.danger-choice{border-color:rgba(235,105,105,.45)}
.block-replacement-field{max-width:650px;margin:0 0 4px 34px}
.block-delete-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:10px}
.block-list-section{margin-top:30px}
.block-list-heading{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:16px}
.block-list-heading h2{margin:0}
.block-list-heading>span{color:var(--muted);font-weight:800}
.block-list-filters{display:grid;grid-template-columns:minmax(220px,1fr) minmax(220px,.7fr) auto auto;align-items:end;gap:14px;padding:18px;margin-bottom:18px}
.block-list-filters .field{margin:0}
.block-admin-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:14px}
.block-admin-card{display:grid;grid-template-columns:82px minmax(0,1fr);gap:15px;padding:16px;min-width:0}
.block-admin-card>img{width:82px;height:82px;object-fit:cover;image-rendering:pixelated;border-radius:14px;border:1px solid var(--line);background:var(--surface-2)}
.block-admin-card-copy{min-width:0}
.block-admin-card-copy small{display:block;color:var(--accent);font-weight:850;font-size:.69rem;letter-spacing:.05em;text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.block-admin-card-copy h3{margin:5px 0 8px;font-size:1.05rem;line-height:1.18;overflow-wrap:anywhere}
.block-admin-card-copy code{display:block;color:var(--muted);font-size:.74rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.block-admin-card-actions{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:8px}
.block-admin-card-actions :is(a,button){min-height:42px;padding:9px 12px;text-align:center}
.danger-link{display:inline-flex;align-items:center;justify-content:center;border:1px solid rgba(235,105,105,.45);border-radius:11px;background:rgba(235,105,105,.10);color:#d95b65;text-decoration:none;font-weight:800;transition:.15s}
.danger-link:hover{background:rgba(235,105,105,.18);border-color:#d95b65}

@media(max-width:900px){
  .palette-top-actions{width:100%;max-width:520px}
  .block-list-hero{align-items:flex-start;flex-direction:column;padding:26px 22px}
  .block-list-hero-actions{width:100%;justify-content:flex-start}
  .block-editor-form{grid-template-columns:1fr}
  .block-editor-preview{justify-self:start;width:min(260px,100%)}
  .block-editor-actions{grid-column:1}
  .block-list-filters{grid-template-columns:1fr 1fr}
  .block-list-filters :is(button,a){width:100%}
}
@media(max-width:620px){
  .palette-top-actions{grid-template-columns:1fr 1fr}
  .palette-top-actions [data-palette-import-open]{grid-column:auto}
  .block-list-hero h1{font-size:2.55rem}
  .block-list-hero-actions{display:grid;grid-template-columns:1fr 1fr}
  .block-list-hero-actions .primary{grid-column:1/-1}
  .block-editor-panel,.block-delete-panel{padding:20px 16px}
  .block-editor-heading{align-items:flex-start;gap:12px}
  .block-editor-fields{grid-template-columns:1fr}
  .block-texture-url-field{grid-column:auto}
  .warning-box ul{columns:1}
  .block-replacement-field{margin-left:0}
  .block-delete-actions{display:grid;grid-template-columns:1fr 1fr}
  .block-list-heading{align-items:flex-start;flex-direction:column}
  .block-list-filters{grid-template-columns:1fr}
  .block-admin-grid{grid-template-columns:1fr}
}


/* V46 — Roulette détaillée, Palette publique et gestion sûre des catégories */
.palette-action-placeholder{display:block;min-height:52px}
.roulette-category-group{border:1px solid var(--line);border-radius:13px;background:var(--surface);overflow:hidden}
.roulette-category-group>summary{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:9px;padding:10px 11px;cursor:pointer;list-style:none}
.roulette-category-group>summary::-webkit-details-marker{display:none}
.roulette-category-master{display:flex;align-items:center;gap:9px;min-width:0;cursor:pointer}
.roulette-category-master input,.roulette-block-option input{accent-color:var(--accent)}
.roulette-category-master span{font-weight:800;font-size:.88rem;overflow-wrap:anywhere}
.roulette-category-group>summary small{color:var(--muted);white-space:nowrap}
.roulette-category-chevron{font-size:1.15rem;transition:transform .16s ease}
.roulette-category-group[open] .roulette-category-chevron{transform:rotate(180deg)}
.roulette-category-blocks{padding:0 10px 12px;border-top:1px solid var(--line)}
.roulette-category-actions{display:flex;gap:12px;justify-content:flex-end;padding:9px 0 7px}
.roulette-block-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;max-height:260px;overflow:auto;padding-right:3px}
.roulette-block-option{display:grid;grid-template-columns:auto 40px minmax(0,1fr);align-items:center;gap:7px;padding:7px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);cursor:pointer;min-width:0}
.roulette-block-option:has(input:checked){border-color:color-mix(in srgb,var(--accent) 65%,var(--line));background:color-mix(in srgb,var(--accent) 9%,var(--surface-2))}
.roulette-block-option img{width:40px;height:40px;object-fit:cover;image-rendering:pixelated;border-radius:7px;background:var(--surface)}
.roulette-block-option span{font-size:.75rem;line-height:1.15;font-weight:750;overflow-wrap:anywhere;min-width:0}
.block-category-manager{margin-top:24px;padding:26px}
.block-category-create-form{display:grid;grid-template-columns:minmax(240px,1fr) auto;align-items:end;gap:14px;margin-bottom:20px}
.block-category-create-form .field{margin:0}
.block-category-management-list{display:grid;gap:9px}
.block-category-management-row{display:grid;grid-template-columns:minmax(180px,1fr) minmax(300px,auto);align-items:center;gap:16px;padding:13px 15px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2)}
.block-category-management-row>div{display:flex;align-items:baseline;gap:10px;min-width:0}
.block-category-management-row>div strong{overflow-wrap:anywhere}
.block-category-management-row>div small{color:var(--muted);white-space:nowrap}
.block-category-management-row form{display:grid;grid-template-columns:minmax(190px,1fr) auto;gap:9px;align-items:center}
.block-category-management-row form>.danger-link{min-height:44px;padding:9px 13px;cursor:pointer;font:inherit}
.block-category-management-row form>input[type=hidden]+.danger-link{grid-column:2}
.block-admin-card:not(:has(.block-admin-card-actions)){align-items:center}
@media(max-width:900px){
  .roulette-block-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .block-category-management-row{grid-template-columns:1fr}
}
@media(max-width:620px){
  .palette-action-placeholder{display:none}
  .roulette-block-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .roulette-category-group>summary{grid-template-columns:minmax(0,1fr) auto auto}
  .block-category-manager{padding:20px 16px}
  .block-category-create-form{grid-template-columns:1fr}
  .block-category-management-row form{grid-template-columns:1fr}
  .block-category-management-row form>.danger-link,.block-category-management-row form>input[type=hidden]+.danger-link{grid-column:1;width:100%}
}


/* V47 — Roulette lisible et commandes cohérentes */
.roulette-block-grid{
  grid-template-columns:1fr;
  max-height:none;
  overflow:visible;
  padding-right:0;
}
.roulette-block-option{
  grid-template-columns:auto 44px minmax(0,1fr);
  min-height:58px;
  gap:10px;
  padding:7px 9px;
}
.roulette-block-option img{width:44px;height:44px}
.roulette-block-option span{
  font-size:.82rem;
  line-height:1.25;
  overflow-wrap:normal;
  word-break:normal;
  hyphens:auto;
}
.roulette-category-actions{justify-content:space-between}
.roulette-result-actions{min-height:54px;align-items:stretch}
.roulette-result-actions>button{min-width:180px}
.roulette-stage-launch{min-width:min(320px,100%)!important}
.block-category-callout{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin:18px 0 24px;
  padding:16px 18px;
  border:1px solid color-mix(in srgb,var(--accent) 38%,var(--line));
  border-radius:16px;
  background:color-mix(in srgb,var(--accent) 7%,var(--surface));
}
.block-category-callout>div{display:grid;gap:3px;min-width:0}
.block-category-callout span{color:var(--muted)}
.block-category-callout a{flex:0 0 auto}
.block-editor-fields small a{color:var(--accent);font-weight:800}
@media(max-width:900px){
  .roulette-block-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:620px){
  .roulette-block-grid{grid-template-columns:1fr}
  .roulette-result-actions{grid-template-columns:1fr}
  .roulette-result-actions>button{width:100%;min-width:0}
  .block-category-callout{align-items:stretch;flex-direction:column}
  .block-category-callout a{width:100%;text-align:center}
}


/* V49 — Dictionnaire public de la langue inventée. */
.lore-resource-links{display:flex;gap:10px;flex-wrap:wrap}
.dictionary-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:28px;padding:42px 46px}
.dictionary-hero h1{font-size:clamp(2.8rem,5vw,4.4rem);line-height:1;margin:0 0 14px}
.dictionary-tools{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-top:22px}
.dictionary-search{width:min(100%,560px);margin:0}
.dictionary-letter-nav{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}
.dictionary-letter-nav a{display:grid;place-items:center;min-width:38px;height:38px;padding:0 10px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);color:var(--text);font-weight:900;text-decoration:none}
.dictionary-letter-nav a:hover{border-color:var(--accent);color:var(--accent)}
.dictionary-list{display:grid;gap:28px;margin:28px 0}
.dictionary-letter-section{scroll-margin-top:120px}
.dictionary-letter-section>h2{font-size:clamp(2.4rem,5vw,4.6rem);line-height:1;margin:0 0 12px;color:var(--accent);font-weight:950}
.dictionary-word-list{padding:4px 26px}
.dictionary-row{display:grid;grid-template-columns:minmax(160px,1fr) 48px minmax(160px,1fr) auto;align-items:center;gap:18px;min-height:72px;padding:14px 0;border-bottom:1px solid var(--line)}
.dictionary-row:last-child{border-bottom:0}
.dictionary-french{font-size:1.08rem;font-weight:750}
.dictionary-arrow{font-size:1.45rem;text-align:center;color:var(--accent);font-weight:900}
.dictionary-invented{font-size:1.16rem;color:var(--accent)}
.dictionary-row-actions{display:flex;align-items:center;gap:8px;justify-self:end}
.dictionary-row-actions form{margin:0}
.dictionary-empty{margin:28px 0;text-align:center}
.dictionary-editor{scroll-margin-top:110px}
.dictionary-form{display:grid;grid-template-columns:minmax(0,1fr) 50px minmax(0,1fr) auto;align-items:end;gap:16px}
.dictionary-form .field{margin:0}
.dictionary-form-arrow{align-self:end;display:grid;place-items:center;height:52px;font-size:1.6rem;color:var(--accent);font-weight:900}
.dictionary-form>.primary{height:52px;white-space:nowrap}
html[data-theme="dark"] .dictionary-letter-nav a{background:var(--surface-2)}
@media(max-width:780px){
  .dictionary-hero,.dictionary-tools{align-items:stretch;flex-direction:column}
  .dictionary-hero{padding:28px 22px}
  .dictionary-letter-nav{justify-content:flex-start}
  .dictionary-word-list{padding:2px 18px}
  .dictionary-row{grid-template-columns:minmax(0,1fr) 28px minmax(0,1fr);gap:8px;padding:16px 0}
  .dictionary-row-actions{grid-column:1/-1;justify-self:stretch;display:grid;grid-template-columns:1fr 1fr;margin-top:5px}
  .dictionary-row-actions a,.dictionary-row-actions button{width:100%;text-align:center}
  .dictionary-form{grid-template-columns:1fr}
  .dictionary-form-arrow{height:auto;transform:rotate(90deg)}
  .dictionary-form>.primary{width:100%}
}
@media(max-width:420px){
  .dictionary-row{grid-template-columns:minmax(0,1fr) 22px minmax(0,1fr);font-size:.94rem}
  .dictionary-french,.dictionary-invented{overflow-wrap:anywhere}
}

/* V50 — choix de l'ordre alphabétique du dictionnaire */
.dictionary-tools-main{display:flex;align-items:flex-end;gap:18px;flex:1;min-width:0}
.dictionary-sort{display:grid;gap:8px;min-width:300px}
.dictionary-sort>span{font-weight:800;color:var(--text)}
.dictionary-sort-options{display:grid;grid-template-columns:1fr 1fr;padding:4px;border:1px solid var(--line);border-radius:13px;background:var(--surface-2)}
.dictionary-sort-options a{display:grid;place-items:center;min-height:42px;padding:8px 12px;border-radius:9px;color:var(--muted);font-weight:850;text-align:center;text-decoration:none}
.dictionary-sort-options a:hover{color:var(--accent)}
.dictionary-sort-options a.active{background:var(--accent);color:#fff;box-shadow:0 8px 20px rgba(17,141,167,.2)}
html[data-theme="dark"] .dictionary-sort-options{background:var(--surface-2)}
@media(max-width:980px){
  .dictionary-tools-main{width:100%;align-items:stretch;flex-direction:column}
  .dictionary-search,.dictionary-sort{width:100%;max-width:none;min-width:0}
}
@media(max-width:520px){
  .dictionary-sort-options{grid-template-columns:1fr}
}

/* V54 — édition de l’image des fermes */
.farm-image-editor{display:flex;flex-direction:column;gap:10px}
.farm-current-image{display:flex;align-items:center;gap:14px;padding:12px;border:1px solid var(--line);border-radius:14px;background:var(--surface, #fff)}
.farm-current-image img{width:96px;height:72px;object-fit:cover;border-radius:10px;border:1px solid var(--line);flex:0 0 auto}
.farm-current-image>div{display:flex;flex-direction:column;gap:8px;min-width:0}
.farm-remove-image{display:flex;align-items:center;gap:8px;cursor:pointer;font-weight:700}
.farm-remove-image input{width:auto;margin:0}
.farm-image-editor small{color:var(--muted)}
@media(max-width:600px){.farm-current-image{align-items:flex-start}.farm-current-image img{width:82px;height:62px}}


/* V56 — géométrie plus sobre : mêmes couleurs, moins de cartes très arrondies. */
:root{--radius:9px;--shadow:0 5px 16px rgba(19,42,49,.055)}
html[data-theme="dark"]{--shadow:0 5px 18px rgba(0,0,0,.18)}
:is(.hero,.explore-hero,.detail-hero,.private-hero){border-radius:10px;box-shadow:var(--shadow)}
.panel{border-radius:8px;box-shadow:none}
:is(.post-card,.resource-card,.lore-card,.lore-element-card,.place-card,.shop-card-wrap,.showcase-card,.metric,.quick,.reference-card,.phototon-month-card,.photo-theme-square,.user-row,.villager-group,.block-pick-card,.palette-card){border-radius:7px;box-shadow:none}
:is(.primary,.secondary,.danger,.account-button,.account-quiet,.edit-page){border-radius:6px}
input:not([type=checkbox]):not([type=color]),textarea,select{border-radius:5px}
:is(.editor-toolbar,.rich-editor,.empty,.breadcrumb,.hero-coordinate,.selected-shop,.shop-tab,.reference-upload-form,.editor-link-panel,.dictionary-sort-options){border-radius:6px}
.nav-group-menu{border-radius:0 0 7px 7px}.nav-group-menu a{border-radius:4px}
.mobile-menu :is(a,button),.mobile-menu-close,.mobile-menu-button{border-radius:6px!important}
/* Les badges conservent volontairement leur forme capsule. */

/* Fermes : jusqu'à deux images, défilement local sans toucher aux originaux. */
.farm-card{align-items:stretch}
.farm-gallery{position:relative;flex:0 0 250px;width:250px;min-height:170px;overflow:hidden;background:var(--surface-3);border-right:1px solid var(--line)}
.farm-gallery-slide{display:none;width:100%;height:100%;min-height:170px;align-items:center;justify-content:center;background:var(--surface-3)}
.farm-gallery-slide.is-active{display:flex}
.farm-gallery-slide img{width:100%;height:100%;min-height:170px;object-fit:cover;border-radius:0}
.farm-gallery-arrow{position:absolute;z-index:3;top:50%;transform:translateY(-50%);width:34px;height:42px;border:1px solid rgba(255,255,255,.38);border-radius:5px;background:rgba(8,18,22,.7);color:#fff;font-size:1.65rem;line-height:1;cursor:pointer;backdrop-filter:blur(4px)}
.farm-gallery-arrow:hover{background:var(--accent);color:#fff;border-color:var(--accent)}
.farm-gallery-arrow.previous{left:8px}.farm-gallery-arrow.next{right:8px}
.farm-gallery-count{position:absolute;right:8px;bottom:8px;z-index:3;padding:3px 7px;border-radius:4px;background:rgba(8,18,22,.72);color:#fff;font-size:.76rem;font-weight:800}
.farm-current-image{display:flex;align-items:center;gap:12px;padding:10px;border:1px solid var(--line);border-radius:6px;background:var(--surface-2)}
.farm-current-image img{width:84px;height:64px;object-fit:cover;border-radius:4px;border:1px solid var(--line)}
.farm-remove-image{display:flex;gap:8px;align-items:center;font-size:.9rem}
.discord-test-form{margin-top:14px}
@media(max-width:680px){
  .farm-gallery{width:100%;flex-basis:auto;min-height:210px;border-right:0;border-bottom:1px solid var(--line)}
  .farm-gallery-slide,.farm-gallery-slide img{min-height:210px;max-height:300px}
  .farm-card{overflow:hidden}
}


/* V58 — mise en page plus éditoriale/pro, palette V56 strictement conservée */
.site-main{width:min(1280px,calc(100% - 44px));margin-top:30px}

/* En-têtes de pages : moins de grosses cartes, plus de hiérarchie. */
:is(.private-hero,.encyclopedia-hero,.dictionary-hero,.reference-hero,.palette-hero,.photo-challenge-hero,.users-hero,.block-list-hero){
  background:transparent!important;
  border:0!important;
  border-bottom:1px solid var(--line)!important;
  border-radius:0!important;
  box-shadow:none!important;
  min-height:0;
  margin:0 0 26px;
  padding:6px 0 24px!important;
  overflow:visible;
}
:is(.private-hero,.encyclopedia-hero,.dictionary-hero,.reference-hero,.palette-hero,.photo-challenge-hero,.users-hero,.block-list-hero) h1{
  font-size:clamp(2.35rem,4.2vw,3.65rem)!important;
  line-height:1.02!important;
  margin:5px 0 9px!important;
}
:is(.private-hero,.encyclopedia-hero,.dictionary-hero,.reference-hero,.palette-hero,.photo-challenge-hero,.users-hero,.block-list-hero) .subtitle{
  max-width:760px;
  margin-bottom:0;
}
.private-hero{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:24px}
.private-hero .private-label{justify-self:start}

/* Hero éditorial de l'accueil : compact s'il n'a pas d'image, visuel conservé sinon. */
.hero:not(.with-image){
  min-height:0;
  padding:12px 0 30px;
  margin-bottom:30px;
  background:transparent!important;
  border:0!important;
  border-bottom:1px solid var(--line)!important;
  border-radius:0!important;
  box-shadow:none!important;
  overflow:visible;
}
.hero:not(.with-image):after{display:none}
.hero:not(.with-image) .hero-text{max-width:880px}
.hero:not(.with-image) h1{font-size:clamp(2.7rem,5vw,4.2rem)}
.hero.with-image{min-height:280px;padding:44px 52px;margin-bottom:30px}
.hero.with-image h1{font-size:clamp(2.7rem,5vw,4.25rem)}
.hero.with-image:after{width:82px;height:82px;right:26px;top:26px;border-radius:9px}

/* Outils de recherche/filtrage : barres fonctionnelles plutôt que grosses cartes. */
:is(.encyclopedia-tools,.dictionary-tools){
  background:transparent!important;
  border:0!important;
  border-bottom:1px solid var(--line)!important;
  border-radius:0!important;
  box-shadow:none!important;
  padding:0 0 22px!important;
  margin-bottom:26px!important;
}
.private-hero + .panel:has(.search-field){
  background:transparent;
  border:0;
  border-bottom:1px solid var(--line);
  border-radius:0;
  box-shadow:none;
  padding:0 0 20px;
  margin-bottom:22px;
}
.private-hero + .panel:has(.search-field) .search-field{max-width:620px}

/* Fermes : présentation en lignes plus claire, pas une carte dans une carte. */
.resource-list.panel{
  background:transparent;
  border:0;
  border-radius:0;
  box-shadow:none;
  padding:0;
}
.resource-list .resource-card{
  background:transparent;
  border:0;
  border-bottom:1px solid var(--line);
  border-radius:0!important;
  box-shadow:none!important;
  padding:18px 0;
  gap:24px;
}
.resource-list .resource-card:first-child{padding-top:0}
.resource-list .resource-card:last-child{border-bottom:0}
.resource-list .farm-gallery{border:1px solid var(--line);border-radius:7px;overflow:hidden;flex-basis:270px;width:270px}
.resource-list .resource-card h2{font-size:1.22rem;margin-bottom:8px}

/* Accueil : fil d'actualité plus éditorial, moins réseau de grosses cartes. */
.news-feed{max-width:1080px;margin:0 auto}
.feed-header{padding:0 0 14px;border-bottom:1px solid var(--line);margin-bottom:0}
.feed-header h2{font-size:1.55rem;letter-spacing:-.02em}
.news-feed .post-card{
  background:transparent;
  border:0;
  border-bottom:1px solid var(--line);
  border-radius:0!important;
  box-shadow:none!important;
  padding:28px 0;
  margin:0;
}
.news-feed .post-card:has(>.post-cover){display:grid;grid-template-columns:minmax(250px,34%) minmax(0,1fr);gap:30px;align-items:start}
.news-feed .post-cover{width:100%;height:250px;border-radius:7px;object-fit:cover;border:1px solid var(--line)}
.news-feed .post-body{padding:0}
.news-feed .post-body>h2{font-size:1.65rem;margin:5px 0 12px}
.news-feed .post-date{font-size:.78rem}
.news-feed .post-gallery{margin-top:18px}

/* Encyclopédie : cartes resserrées, administration intégrée au pied. */
.encyclopedia-grid{gap:18px}
.encyclopedia-grid .lore-element-card{border-radius:7px!important;box-shadow:none!important}
.encyclopedia-grid .lore-element-card>a>div{padding:15px 16px 13px}
.encyclopedia-grid .lore-element-card img{height:190px}
.encyclopedia-grid .card-admin{border-top:1px solid var(--line);padding:10px 14px;margin:0}

/* Dictionnaire : sections typographiques, sans panneau autour de chaque lettre. */
.dictionary-list{gap:36px}
.dictionary-letter-section{display:grid;grid-template-columns:74px minmax(0,1fr);gap:22px;align-items:start}
.dictionary-letter-section>h2{font-size:3.5rem;margin:8px 0 0;text-align:center}
.dictionary-word-list.panel{
  background:transparent;
  border:0;
  border-left:1px solid var(--line);
  border-radius:0;
  box-shadow:none;
  padding:0 0 0 24px;
  margin:0;
}
.dictionary-row{min-height:62px;padding:11px 0}

/* Références : bibliothèque moins enfermée. */
.reference-library.panel{
  background:transparent;
  border:0;
  border-radius:0;
  box-shadow:none;
  padding:0;
}
.reference-tools{padding:0 0 18px;border-bottom:1px solid var(--line);margin-bottom:20px}
.reference-card{border-radius:6px!important;box-shadow:none!important}

/* Palette/Phototon : panneaux principaux plus calmes et contrôles plus lisibles. */
.palette-library-head,.phototon-selected-head{padding-bottom:14px;border-bottom:1px solid var(--line)}
.palette-card.panel{padding:17px 18px;margin-bottom:12px}
.photo-theme-square{border-radius:6px!important}
.phototon-month-card{border-radius:6px!important}

/* Panneaux de formulaire : eux restent identifiés, mais sans effet "grosse bulle". */
.editor-panel{border-left:3px solid var(--accent);border-radius:6px!important;box-shadow:none!important}
.panel-header h2{font-size:1.35rem}

/* Responsive : conserver l'ordre et la lisibilité sans recréer de grosses cartes. */
@media(max-width:800px){
  .site-main{width:calc(100% - 26px);margin-top:20px}
  :is(.private-hero,.encyclopedia-hero,.dictionary-hero,.reference-hero,.palette-hero,.photo-challenge-hero,.users-hero,.block-list-hero){padding:2px 0 18px!important;margin-bottom:20px}
  .private-hero{grid-template-columns:1fr;align-items:start;gap:14px}
  .private-hero .primary{justify-self:start}
  .hero:not(.with-image){padding:4px 0 22px}
  .hero.with-image{padding:30px 22px;min-height:230px}
  .news-feed .post-card:has(>.post-cover){display:block}
  .news-feed .post-cover{height:210px;margin-bottom:18px}
  .resource-list .resource-card{display:block;padding:18px 0}
  .resource-list .farm-gallery{width:100%;margin-bottom:16px}
  .dictionary-letter-section{grid-template-columns:42px minmax(0,1fr);gap:12px}
  .dictionary-letter-section>h2{font-size:2.4rem;text-align:left}
  .dictionary-word-list.panel{padding-left:14px}
}


/* V59 — alignements de la page Fermes */
.farms-hero{
  display:flex!important;
  align-items:flex-end!important;
  justify-content:space-between!important;
  gap:28px!important;
}
.farms-hero-copy{min-width:0}
.farms-hero-copy .private-label{margin-bottom:10px}
.farms-hero-copy h1{margin:0!important}
.farms-hero-action{flex:0 0 auto;margin-bottom:2px}
.resource-list .farm-card{align-items:center}
.resource-list .farm-card .grow{padding:2px 0;min-width:0}
.farm-actions{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid var(--line);
}
.farm-actions>a{color:var(--accent);font-weight:800;font-size:.9rem}
.farm-actions form{display:flex;gap:5px;margin:0}
.farm-actions button{
  width:31px;
  height:31px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--line);
  border-radius:5px;
  background:var(--surface-2);
  color:var(--text);
  cursor:pointer;
}
.farm-actions button:hover{border-color:var(--accent);color:var(--accent)}
@media(max-width:800px){
  .farms-hero{align-items:flex-start!important;flex-direction:column!important;gap:14px!important}
  .farms-hero-action{width:auto;align-self:flex-start}
  .farm-actions{width:100%;justify-content:flex-start}
}


/* V60 — lisibilité Lore, cartes d'actualités et Portails du Nether */
/* Les actualités gardent une vraie limite visuelle sur les quatre côtés, y compris sans image. */
.news-feed{gap:18px}
.news-feed .post-card{
  display:block;
  background:var(--surface);
  border:1px solid var(--line)!important;
  border-radius:7px!important;
  overflow:hidden;
  padding:0;
  margin:0 0 18px;
  box-shadow:none!important;
}
.news-feed .post-card:has(>.post-cover){
  display:grid;
  grid-template-columns:minmax(250px,34%) minmax(0,1fr);
  gap:0;
  align-items:stretch;
}
.news-feed .post-cover{
  width:100%;
  height:100%;
  min-height:250px;
  border:0;
  border-right:1px solid var(--line);
  border-radius:0;
  object-fit:cover;
}
.news-feed .post-body{padding:24px 26px;min-width:0}
.news-feed .post-embeds{max-width:100%;overflow:hidden}
.news-feed .post-soundcloud-player{max-width:100%}

/* Chronologie : une seule colonne large. Les titres n'ont plus à tenir dans une demi-page. */
.lore-timeline{position:relative;max-width:1040px;margin:12px auto 34px;padding:6px 0 12px 58px}
.lore-timeline:before{left:18px;transform:none;width:2px;border-radius:0}
.lore-node,.lore-node.right{position:relative;width:100%;margin-left:0;padding:0 0 22px}
.lore-dot,.lore-node.right .lore-dot{left:-47px;right:auto;top:31px;width:14px;height:14px;border-width:3px}
.lore-card{display:grid;grid-template-columns:240px minmax(0,1fr);min-height:168px;border-radius:7px!important;transform:none!important}
.lore-card:hover{transform:none!important}
.lore-card img{width:100%;height:100%;min-height:168px;max-height:220px;object-fit:cover}
.lore-card-text{padding:22px 24px;min-width:0;display:flex;flex-direction:column;justify-content:center}
.lore-card h2{font-size:clamp(1.35rem,2.2vw,1.85rem);line-height:1.14;margin:7px 0 9px;max-width:none;overflow-wrap:normal;word-break:normal;hyphens:none}
.lore-card p{line-height:1.55;max-width:720px}
.lore-admin,.lore-node.right .lore-admin{justify-content:flex-end;margin:8px 0 0}

/* Titres et textes de lore : ne jamais forcer un mot à se casser dans une colonne inutilement étroite. */
:is(.detail-hero,.story-page,.lore-card-text,.lore-element-card,.encyclopedia-hero)>*{min-width:0}
:is(.detail-hero h1,.story-page h1,.lore-card h2,.lore-element-card h2,.encyclopedia-hero h1){overflow-wrap:normal;word-break:normal;hyphens:none}
.detail-hero>div{min-width:0}

/* Page Portails du Nether */
.nether-portals-hero{display:flex!important;align-items:flex-end!important;justify-content:space-between!important;gap:24px!important}
.nether-portal-tools{padding:0 0 20px;margin:0 0 4px;border-bottom:1px solid var(--line)}
.nether-portal-tools .search-field{max-width:620px}
.nether-portal-list{display:flex;flex-direction:column}
.nether-portal-row{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:19px 0;border-bottom:1px solid var(--line)}
.nether-portal-row:last-of-type{border-bottom:0}
.nether-portal-main{display:flex;align-items:center;justify-content:space-between;gap:30px;min-width:0;flex:1}
.nether-portal-main h2{margin:0;font-size:1.15rem;min-width:0}
.nether-portal-coordinates{display:flex;align-items:center;gap:12px;min-width:280px;justify-content:flex-end}
.nether-portal-coordinates span{font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:800}
.nether-portal-coordinates strong{font-size:.98rem;font-variant-numeric:tabular-nums}
.nether-portal-actions{display:flex;align-items:center;gap:10px;flex:0 0 auto}
.nether-portal-actions>a{color:var(--accent);font-weight:800;font-size:.9rem}
.nether-portal-actions form{margin:0}

@media(max-width:800px){
  .news-feed .post-card:has(>.post-cover){display:block}
  .news-feed .post-cover{height:210px;min-height:0;border-right:0;border-bottom:1px solid var(--line);margin:0}
  .news-feed .post-body{padding:20px}
  .lore-timeline{padding-left:38px}
  .lore-timeline:before{left:8px}
  .lore-dot,.lore-node.right .lore-dot{left:-36px;top:24px}
  .lore-card{display:block;min-height:0}
  .lore-card img{height:210px;min-height:0;max-height:none}
  .lore-card-text{padding:18px}
  .lore-admin,.lore-node.right .lore-admin{justify-content:flex-start}
  .nether-portals-hero{align-items:flex-start!important;flex-direction:column!important;gap:14px!important}
  .nether-portal-row{align-items:flex-start;flex-direction:column;gap:11px}
  .nether-portal-main{width:100%;align-items:flex-start;flex-direction:column;gap:8px}
  .nether-portal-coordinates{min-width:0;justify-content:flex-start;flex-wrap:wrap}
  .nether-portal-actions{width:100%;justify-content:flex-start}
}

/* Les pages de détail sans image ne doivent pas conserver la colonne réservée à une image absente. */
.detail-hero:not(.with-image){display:block;min-height:0}
.detail-hero:not(.with-image)>div{padding:38px 42px;max-width:980px}
@media(max-width:800px){.detail-hero:not(.with-image)>div{padding:24px 20px}}
