html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background: #f5f1e8;
  color: #29241d;
}

.navbar{background:#fffaf0!important}.navbar-brand{letter-spacing:.02em}.btn-primary{--bs-btn-bg:#19794b;--bs-btn-border-color:#19794b;--bs-btn-hover-bg:#12623c;--bs-btn-hover-border-color:#12623c}
.hero-panel{min-height:430px;display:grid;align-items:center;padding:4rem;position:relative;overflow:hidden;border-radius:24px;background:linear-gradient(125deg,#1c3326,#28573b 62%,#b8792e);color:#fff;box-shadow:0 24px 70px #3b2b1740}.hero-panel:after{content:"";position:absolute;right:-80px;top:-140px;width:480px;height:480px;border:1px solid #ffffff35;border-radius:50%;box-shadow:0 0 0 60px #ffffff0a,0 0 0 120px #ffffff0a}.hero-panel>div{position:relative;z-index:1;max-width:760px}.hero-panel h1{font-size:clamp(2.5rem,5vw,4.7rem);line-height:1.02;margin:.5rem 0 1rem}.hero-panel p{font-size:1.2rem;max-width:680px;color:#ecf4ed;margin-bottom:2rem}.eyebrow{text-transform:uppercase;letter-spacing:.14em;font-size:.75rem;font-weight:800;color:#bb7e2f}.hero-panel .eyebrow{color:#ffdaa8}.feature-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem;margin:1.5rem 0 3rem}.feature-grid article{display:flex;flex-direction:column;gap:.45rem;background:#fffaf0;border:1px solid #dfd5c3;border-radius:14px;padding:1.4rem}.feature-grid b{font-size:1.05rem}.feature-grid span{color:#6e6457}
.page-heading{display:flex;align-items:end;justify-content:space-between;gap:2rem;margin:1.2rem 0 2rem}.page-heading h1{font-size:2.6rem;margin:.2rem 0}.page-heading p{margin:0;color:#6f665a}.spell-workspace{display:grid;grid-template-columns:290px minmax(0,1fr);gap:1rem;align-items:start}.spell-sidebar,.spell-editor{background:#fffaf0;border:1px solid #dcd0bd;border-radius:14px;padding:1rem}.spell-sidebar{position:sticky;top:1rem;max-height:calc(100vh - 120px);overflow:auto}.spell-list{display:flex;flex-direction:column;gap:7px}.spell-list-item{border:1px solid #ddd1bd;background:#fff;border-radius:8px;padding:10px;text-align:left;display:flex;flex-direction:column;gap:3px}.spell-list-item:hover,.spell-list-item.active{border-color:#19794b;background:#eef8f1}.spell-list-item span{font-size:.78rem;color:#746957}.empty-state{color:#857a69;font-style:italic;padding:.7rem}.spell-editor{padding:1.5rem}.editor-title,.range-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem}.editor-title{border-bottom:1px solid #e3d8c6;padding-bottom:1rem;margin-bottom:1.2rem}.editor-title h2{margin:.2rem 0 0}.spell-fields{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem}.spell-fields label{font-weight:700;font-size:.86rem}.spell-fields input,.spell-fields select,.spell-fields textarea{margin-top:.35rem;font-weight:400}.spell-fields .wide{grid-column:1/-1}.spell-options{display:flex;gap:2rem;margin:1.2rem 0}.range-editors{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.range-panel{border:1px solid #ded1bc;border-radius:10px;padding:1rem;overflow:auto;background:#fff}.range-heading h3{font-size:1.1rem;margin:0}.range-heading p{margin:0;color:#817563;font-size:.8rem}.range-heading>span{font-size:.8rem;color:#756a59}.preset-row{display:flex;gap:5px;flex-wrap:wrap;margin:10px 0}.offset-grid{display:grid;grid-template-columns:repeat(15,22px);gap:2px;width:max-content;margin:auto;padding:8px;background:#eee5d6;border-radius:6px}.offset-cell{width:22px;height:22px;border:1px solid #d4c6af;background:#fff;border-radius:2px;padding:0}.offset-cell:hover{border-color:#19794b}.offset-cell.active{background:#42ad70;border-color:#19794b}.offset-cell.origin{box-shadow:inset 0 0 0 2px #2f245f}.offset-cell.origin:not(.active){background:#ded8f4}
@media(max-width:1000px){.feature-grid,.range-editors{grid-template-columns:1fr}.spell-workspace{grid-template-columns:1fr}.spell-sidebar{position:static;max-height:none}.spell-fields{grid-template-columns:1fr 1fr}}
@media(max-width:650px){.hero-panel{padding:2rem}.feature-grid,.spell-fields{grid-template-columns:1fr}.page-heading{align-items:start;flex-direction:column}.spell-options{flex-direction:column;gap:.5rem}}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Direction visuelle : flat design sobre. */
:root{--surface:#fff;--canvas:#f4f6f8;--text:#182230;--muted:#667085;--border:#e4e7ec;--accent:#2563eb;--accent-dark:#1d4ed8}
body{background:var(--canvas);color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif}
.navbar{background:#fff!important;border-color:var(--border)!important;box-shadow:none!important}.navbar-brand{color:#101828!important}.nav-link{color:#475467!important}.nav-link:hover{color:var(--accent)!important}
.btn{border-radius:7px;font-weight:600;box-shadow:none!important}.btn-primary{--bs-btn-bg:var(--accent);--bs-btn-border-color:var(--accent);--bs-btn-hover-bg:var(--accent-dark);--bs-btn-hover-border-color:var(--accent-dark)}
.form-control,.form-select{border-color:#d0d5dd;border-radius:7px}.form-control:focus,.form-select:focus{border-color:#84adff;box-shadow:0 0 0 3px #2563eb1a}
.hero-panel{min-height:390px;background:#fff;color:var(--text);border:1px solid var(--border);border-radius:12px;box-shadow:none}.hero-panel:after{display:none}.hero-panel p{color:var(--muted)}.hero-panel .eyebrow,.eyebrow{color:var(--accent)}
.feature-grid article,.spell-sidebar,.spell-editor,.range-panel{background:#fff;border-color:var(--border);border-radius:10px;box-shadow:none}.feature-grid span,.page-heading p{color:var(--muted)}
.spell-list-item{border-color:var(--border);border-radius:7px}.spell-list-item:hover,.spell-list-item.active{border-color:#84adff;background:#eff6ff}.offset-grid{background:#eef1f5}.offset-cell.active{background:#3b82f6;border-color:#2563eb}
.footer{border-top:1px solid var(--border);background:#fff}.auth-shell{min-height:65vh;display:grid;place-items:center}.auth-card{width:min(100%,430px);padding:2rem;background:#fff;border:1px solid var(--border);border-radius:12px}.auth-card h1{font-size:2rem}
.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:1rem;margin-bottom:1rem}.stats-grid article{display:flex;flex-direction:column;background:#fff;border:1px solid var(--border);border-radius:10px;padding:1.2rem}.stats-grid strong{font-size:2rem}.stats-grid span{color:var(--muted)}
.admin-grid{display:grid;grid-template-columns:minmax(280px,.75fr) minmax(420px,1.25fr);gap:1rem}.admin-panel{background:#fff;border:1px solid var(--border);border-radius:10px;padding:1.25rem;margin-bottom:1rem}.section-title{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1rem}.section-title h2{font-size:1.25rem;margin:.15rem 0 0}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-grid label{font-size:.84rem;font-weight:700}.form-grid label .form-control{margin-top:.35rem;font-weight:400}.form-grid .wide{grid-column:1/-1}.check-field{display:flex;align-items:center;gap:.5rem;padding-top:1.8rem}
.preset-admin-list{display:flex;flex-direction:column;gap:.5rem}.preset-admin-list>button{display:flex;align-items:center;justify-content:space-between;gap:1rem;border:1px solid var(--border);background:#fff;border-radius:7px;padding:.7rem;text-align:left}.preset-admin-list>button:hover{border-color:#84adff;background:#f8fbff}.preset-admin-list span{display:flex;flex-direction:column}.preset-admin-list small{color:var(--muted)}.preset-admin-list em{font-size:.75rem;color:var(--muted);font-style:normal}.role-check{white-space:nowrap;font-size:.85rem}.status-dot{display:inline-block;width:8px;height:8px;margin-right:7px;border-radius:50%;background:#12b76a}.status-dot.locked{background:#f04438}
@media(max-width:900px){.stats-grid{grid-template-columns:1fr 1fr}.admin-grid{grid-template-columns:1fr}}@media(max-width:550px){.stats-grid,.form-grid{grid-template-columns:1fr}.form-grid .wide{grid-column:auto}}
