:root{
  --brand:#A8B8A5;         /* primary accent */
  --ink:#404040;           /* body text */
  --muted:#6f7673;         /* secondary text */
  --soft:#f6f7f8;          /* soft background */
  --card:#ffffff;
  --ring: rgba(168,184,165,.35);
  --heading:#3a4341;
  --section-padding-y: clamp(3rem, 6vw, 4.5rem);
  --section-gap-y: clamp(2rem, 5vw, 3rem);
}

html,body{height:100%}

body{background:var(--soft);color:var(--ink);}

body.bg-soft{background: var(--soft)}

h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{color:var(--heading);}
.text-dark{color:var(--heading)!important}
.text-brand{color:var(--brand)!important}
.link-secondary{color:var(--muted)!important}
.border-top, .border-bottom{border-color: #e9ecef!important}
.bg-white\/80{background: rgba(255,255,255,.8)!important}
.bg-white\/70{background: rgba(255,255,255,.7)!important}
.backdrop-blur{backdrop-filter: saturate(130%) blur(8px)}
.brand-logo{height:2.5rem;width:auto;display:block;max-width:100%;}
.brand-logo-sm{height:2rem;}

.navbar .nav-link,
.navbar-nav .nav-link{color:var(--heading);transition:color .2s ease;}
.navbar{position:relative;}

.main-nav-collapse{transition:transform .2s ease; transform-origin: top center;}

@media (max-width: 991.98px){
  .main-nav-collapse{
    position: static;
    background: rgba(255,255,255,.96);
    border-radius: 1.25rem;
    padding: 1.25rem clamp(1rem, 5vw, 1.75rem);
    box-shadow: 0 26px 60px -32px rgba(0,0,0,.35);
    border: 1px solid rgba(168,184,165,.2);
    margin-top: 0.75rem;
  }
  .mobile-nav-header{
    padding-bottom:0.5rem;
    margin-bottom:1rem !important;
    border-bottom:1px solid rgba(64,64,64,.08);
  }
  .mobile-nav-header .btn{
    color:var(--muted);
    font-weight:600;
    display:inline-flex;
    align-items:center;
    gap:0.25rem;
  }
  .mobile-nav-header .btn:hover,.mobile-nav-header .btn:focus{
    color:var(--heading);
    text-decoration:none;
  }
  .mobile-nav-header .btn .bi{
    font-size:0.85rem;
  }
  .mobile-nav-list{
    align-items:stretch !important;
  }
  .mobile-nav-list .nav-item + .nav-item{
    margin-top:0.5rem;
  }
  .mobile-nav-list .nav-link{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:0.75rem;
    font-size:1rem;
    font-weight:500;
    padding:0.75rem 1rem;
    border-radius:0.85rem;
    background:rgba(246,247,248,.95);
    border:1px solid transparent;
  }
  .mobile-nav-list .nav-link:hover{
    background:#fff;
    border-color:rgba(75,107,90,.15);
    color:var(--heading);
  }
  .mobile-nav-list .nav-link.active{
    background:var(--brand);
    color:#fff !important;
    border-color:var(--brand);
  }
  .mobile-nav-cta{
    margin-top:1.5rem !important;
    padding-top:1.5rem;
    border-top:1px solid rgba(64,64,64,.08);
  }
  .mobile-nav-auth-btn{
    width:100%;
    justify-content:center;
    display:inline-flex;
    align-items:center;
    gap:0.5rem;
    font-weight:600;
    padding:0.75rem 1rem;
    border-radius:0.85rem;
  }
  .mobile-nav-auth-btn .bi{
    font-size:1.1rem;
  }
}

.navbar .nav-link:hover,.navbar .nav-link:focus,.navbar-nav .nav-link:hover,.navbar-nav .nav-link:focus{color:var(--brand);}

.section-spacing{
  padding-top:var(--section-padding-y);
  padding-bottom:var(--section-padding-y);
}

.section-spacing + .section-spacing{
  margin-top:var(--section-gap-y);
}


.btn-brand{
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: #9ca995;
  --bs-btn-hover-border-color: #9ca995;
  --bs-btn-active-bg: #8d9985;
  --bs-btn-active-border-color: #8d9985;
  --bs-btn-color: #fff;
}
.hero-card{
  background: var(--card);
  border-radius: 1rem;
  box-shadow: 0 10px 25px -12px rgba(0,0,0,.15);
  border:1px solid #eef0f2;
}
.card-tile{
  border:1px solid #eef0f2;
  border-radius: 1rem;
  transition: transform .25s ease, box-shadow .25s ease;
}
.card-tile:hover{
  transform: translateY(-3px);
  box-shadow: 0 12px 26px -12px rgba(0,0,0,.15);
}
.card-tile .tile-icon{
  width: 2.25rem; height: 2.25rem; border-radius:.75rem;
  display:inline-flex; align-items:center; justify-content:center;
  background: rgba(168,184,165,.25); color: var(--brand); margin-bottom:.6rem;
}
.shadow-soft{ box-shadow: 0 16px 40px -22px rgba(0,0,0,.18); }
.author-avatar{
  --avatar-size:96px;
  width:var(--avatar-size);
  height:var(--avatar-size);
  border-radius:50%;
  flex:0 0 var(--avatar-size);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  position:relative;
  background-color:var(--avatar-bg,#eef1ed);
}
.author-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  border-radius:inherit;
}
.author-avatar--ring{
  background-color:#fff;
  box-shadow:0 0 0 0.25rem rgba(168,184,165,.25);
}
.author-avatar--sm{--avatar-size:56px;}
.author-avatar--md{--avatar-size:88px;}
.author-avatar--lg{--avatar-size:120px;}
.author-avatar__initial{
  font-weight:600;
  font-size:calc(var(--avatar-size) * .42);
  line-height:1;
  color:inherit;
}

/* Spacing helpers (un peu plus d'air) */
.py-6{padding-top:var(--section-padding-y)!important;padding-bottom:var(--section-padding-y)!important}
.pb-6{padding-bottom:var(--section-padding-y)!important}
.py-lg-6{padding-top:calc(var(--section-padding-y)*1.1)!important;padding-bottom:calc(var(--section-padding-y)*1.1)!important}

/* Formulaire : focus doux */
.form-control:focus{
  border-color: var(--brand);
  box-shadow: 0 0 0 .2rem var(--ring);
}

/* Nav active */
.nav-link.active{ color: var(--brand)!important; font-weight:600; }
.article-card-banner {
  height: 200px;
  background: #f8f9fa;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
}
.article-card-banner__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.article-card-banner__placeholder {
  color: var(--muted);
  font-size: 0.875rem;
}
.article-tag-badge {
  background-color: #eef2ed;
  color: var(--brand);
  border: 1px solid rgba(75, 107, 90, 0.15);
  font-weight: 500;
}
.account-section .card{
  border:1px solid #eef0f2;
  border-radius:1rem;
}
.account-section .card-body{
  padding:1.75rem;
}
.account-alerts .alert{
  margin-bottom:0.75rem;
}
.account-alerts .alert:last-child{
  margin-bottom:0;
}
.account-avatar-wrapper{
  width:120px;
  height:120px;
  border-radius:50%;
  overflow:hidden;
  background:#eef1ed;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(168,184,165,.25);
}
.account-avatar-wrapper img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.account-avatar-placeholder{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:2rem;
  color:var(--muted);
}
.account-section .form-text{
  color:var(--muted);
}
@media (max-width:576px){
  .account-avatar-wrapper{
    width:96px;
    height:96px;
  }
}
.share-bar .btn {
  pointer-events: auto;
}
.fixed-editor-actions{
  position:fixed;
  left:1rem;
  top:50%;
  transform:translateY(-50%);
  display:flex;
  flex-direction:column;
  gap:0.75rem;
  z-index:1040;
}
.fixed-editor-actions .btn{
  min-width:160px;
  box-shadow:0 10px 25px -15px rgba(0,0,0,.4);
}
.fixed-editor-actions .btn-outline-secondary{
  background-color:var(--bs-secondary,#6c757d);
  border-color:var(--bs-secondary,#6c757d);
  color:#fff;
}
.fixed-editor-actions .btn-outline-secondary:hover,
.fixed-editor-actions .btn-outline-secondary:focus-visible,
.fixed-editor-actions .btn-outline-secondary:active{
  background-color:#5c636a;
  border-color:#5c636a;
  color:#fff;
}
.fixed-editor-actions .btn-outline-primary{
  background-color:var(--bs-primary,#0d6efd);
  border-color:var(--bs-primary,#0d6efd);
  color:#fff;
}
.fixed-editor-actions .btn-outline-primary:hover,
.fixed-editor-actions .btn-outline-primary:focus-visible,
.fixed-editor-actions .btn-outline-primary:active{
  background-color:#0b5ed7;
  border-color:#0b5ed7;
  color:#fff;
}
@media (max-width:992px){
  .fixed-editor-actions{
    top:auto;
    bottom:1.5rem;
    left:50%;
    transform:translate(-50%,0);
    flex-direction:row;
  }
  .fixed-editor-actions .btn{
    min-width:auto;
  }
}

/* Home sections backgrounds */
.home-section{
  position: relative;
  border-radius: 0;
  padding-left: 0;
  padding-right: 0;
  background: var(--card);
  overflow: hidden;
  box-shadow: none;
}
.home-section > .container{
  padding-left: clamp(1.5rem, 5vw, 3rem);
  padding-right: clamp(1.5rem, 5vw, 3rem);
}
.home-section + .home-section{
  margin-top: 0;
}
.home-section--hero{
  background: linear-gradient(135deg,#f3f5f2 0%,#ffffff 65%);
}
.home-section--highlight{
  background: linear-gradient(135deg,rgba(168,184,165,.18) 0%,#ffffff 70%);
}
.home-section--concept{
  background: linear-gradient(135deg,#eef2ed 0%,#ffffff 75%);
}
.home-section--texts{
  background: linear-gradient(135deg,#eff0f4 0%,#ffffff 85%);
}
.home-section--books{
  background: linear-gradient(135deg,#f5f0ed 0%,#ffffff 85%);
}
.home-section--authors{
  background: linear-gradient(135deg,#f3f2f8 0%,#ffffff 80%);
}
.home-section--social{
  background: linear-gradient(135deg,#edf5f0 0%,#ffffff 80%);
}


.cookie-banner{
  position: fixed;
  left: 0;
  right: 0;
  bottom: clamp(1rem, 4vw, 2rem);
  padding: 0 1rem;
  z-index: 1080;
}
.cookie-banner__inner{
  margin: 0 auto;
  max-width: 960px;
  background: var(--card);
  border-radius: 1rem;
  box-shadow: 0 24px 60px -32px rgba(16,20,24,.35);
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border: 1px solid rgba(168,184,165,.35);
}
.cookie-banner__text{
  font-size: 0.95rem;
  color: var(--muted);
}
.cookie-banner__actions{
  display: flex;
  gap: 0.75rem;
  justify-content: flex-start;
}
.cookie-banner__actions .btn{
  white-space: nowrap;
}
.cookie-banner--hidden{
  display: none !important;
}
@media (min-width: 768px){
  .cookie-banner__inner{
    flex-direction: row;
    align-items: center;
  }
  .cookie-banner__actions{
    margin-left: auto;
    justify-content: flex-end;
  }
}

.home-highlight-badge{
  font-size: 1rem;
}

@media (max-width: 575.98px){
  header .navbar.container{
    padding-left: clamp(1.1rem, 6vw, 1.75rem);
    padding-right: clamp(1.1rem, 6vw, 1.75rem);
  }
  header .navbar-brand{
    margin-right: 1rem;
  }
  header .navbar-toggler{
    padding: 0.35rem 0.55rem;
    border-radius: 0.85rem;
  }
}
