/* Horizon Bleu — section « Que vous débutiez ou que vous louiez déjà » (2.6.0) */
.hbo { --navy: #14325C; --ink: #0E2647; --gold: #C9A24A; --terra: #B5583A; --paper: #FBF6EC; margin: 8px auto 0; }

/* ---------- Contenu commun (sur papier) ---------- */
.hbo-paper { background: var(--paper); color: var(--navy); }
.hb-home .hb-section--owner-path .hbo-paper h3, .hbo-paper h3 { color: var(--navy) !important; margin: 0 0 12px !important; font-size: clamp(1.5rem, 2.4vw, 1.9rem) !important; line-height: 1.15 !important; }
.hb-home .hb-section--owner-path .hbo-paper p, .hbo-paper p { color: #4A5872 !important; }
.hbo-paper .hbo-list { list-style: none !important; padding: 0 !important; margin: 18px 0 22px !important; display: grid; gap: 10px; }
.hb-home .hb-section--owner-path .hbo-paper .hbo-list li, .hbo-paper .hbo-list li { position: relative; display: flex; gap: 12px; align-items: flex-start; color: var(--navy) !important; font-weight: 500; line-height: 1.4; margin: 0 !important; }
.hbo-paper .hbo-list li::marker { content: none; }
.hbo-check { flex: 0 0 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(201,162,74,.18); color: #9A7424; margin-top: 1px; }
.hbo-check svg { width: 14px; height: 14px; }
.hbo-panel-ico { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 16px; margin-bottom: 18px; color: #fff; background: linear-gradient(145deg, #2A8FD6, var(--navy)); box-shadow: 0 10px 22px -12px rgba(20,50,92,.8); }
.hbo-panel-ico svg { width: 24px; height: 24px; }
.hbo-paper .wp-block-buttons { margin-top: 6px !important; }
.hbo-paper .wp-block-button__link { border-radius: 14px !important; }

/* ================= SÉLECTEUR ================= */
.hbo--switch { max-width: 640px; }
.hbo-tabs {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 6px; border-radius: 999px;
  background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); margin-bottom: 18px;
}
.hbo-thumb {
  position: absolute; top: 6px; bottom: 6px; left: 6px; width: calc(50% - 6px); border-radius: 999px;
  background: linear-gradient(180deg, #fff, var(--paper)); box-shadow: 0 8px 22px -8px rgba(0,0,0,.45);
  transform: translateX(calc(var(--i, 0) * 100%));
  transition: transform .55s cubic-bezier(.22,1.3,.36,1);
}
.hbo-tab {
  position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; border: 0; background: none; cursor: pointer; border-radius: 999px;
  font-family: inherit; font-weight: 600; font-size: .98rem; line-height: 1.1; color: rgba(255,255,255,.8); transition: color .35s ease; padding: 0 10px;
}
.hbo-tab[aria-selected="true"] { color: var(--navy); }
.hbo-tab-ico svg { width: 19px; height: 19px; display: block; }
.hbo-tab:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.hbo-stage { position: relative; transition: height .5s cubic-bezier(.22,1,.36,1); }
.hbo-panel {
  position: absolute; inset: 0 0 auto 0; border-radius: 26px; padding: 28px 24px 26px;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.55);
}
.hbo-panel.is-in { position: relative; animation: hboIn .55s cubic-bezier(.22,1,.36,1) both; }
.hbo-panel.is-in.from-left { animation-name: hboInL; }
.hbo-panel.is-out { animation: hboOut .45s cubic-bezier(.5,0,.75,0) both; pointer-events: none; }
.hbo-panel.is-out.from-right { animation-name: hboOutR; }
.hbo-panel:nth-child(2) .hbo-panel-ico { background: linear-gradient(145deg, #E08A5F, var(--terra)); }
@keyframes hboIn  { from { opacity: 0; transform: translateX(40px) scale(.97); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes hboInL { from { opacity: 0; transform: translateX(-40px) scale(.97); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes hboOut  { to { opacity: 0; transform: translateX(-40px) scale(.97); filter: blur(4px); } }
@keyframes hboOutR { to { opacity: 0; transform: translateX(40px) scale(.97); filter: blur(4px); } }

/* ================= CARNET ================= */
.hbo-book { position: relative; perspective: 2200px; }
.hbo-cover-in { position: relative; height: 100%; box-sizing: border-box; }
.hbo-page-in { position: relative; min-height: 100%; box-sizing: border-box; }
.hbo-page-in { padding: 44px 46px 40px; }
.hbo-folio { display: block; font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: #A88A4A; margin-bottom: 16px; font-weight: 600; }
.hbo-leaf.hbo-paper, .hbo-back {
  background:
    linear-gradient(transparent 0 0),
    repeating-linear-gradient(180deg, transparent 0 31px, rgba(20,50,92,.035) 31px 32px),
    var(--paper);
}

/* Couverture */
.hbo-front, .hbo-cover-sheet {
  color: #F6E9C8;
  background:
    radial-gradient(120% 80% at 20% 0%, rgba(255,255,255,.14), transparent 55%),
    linear-gradient(155deg, #1F5E98, #14325C 55%, #0C2240);
}
.hbo-cover-in { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; padding: 48px 40px; }
.hbo-cover-in::before { content: ""; position: absolute; inset: 16px; border: 1px solid rgba(201,162,74,.6); border-radius: 6px 14px 14px 6px; box-shadow: inset 0 0 0 4px rgba(201,162,74,.12); pointer-events: none; }
.hbo-emblem { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: var(--gold); box-shadow: inset 0 0 0 1.5px rgba(201,162,74,.7); }
.hbo-emblem svg { width: 34px; height: 34px; }
.hbo-kicker { font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: rgba(246,233,200,.75); font-weight: 600; }
.hbo-cover-title { font-family: "HB Fraunces", Georgia, serif; font-weight: 600; font-size: clamp(2rem, 3.4vw, 2.8rem); line-height: 1.05; color: #F3DFA6; text-shadow: 0 1px 0 rgba(0,0,0,.25); }
.hbo-cover-sub { max-width: 26ch; color: rgba(246,233,200,.82); font-size: .98rem; line-height: 1.5; }
.hbo-open { margin-top: 10px; display: inline-flex; gap: 8px; align-items: center; padding: 12px 20px; border-radius: 999px; background: var(--gold); color: var(--ink); font-weight: 700; font-size: .95rem; box-shadow: 0 10px 24px -10px rgba(0,0,0,.6); }
.hbo-open span { transition: transform .35s ease; }
.hbo-ribbon { position: absolute; right: 54px; bottom: -22px; width: 22px; height: 64px; background: linear-gradient(90deg, #A44A2E, var(--terra) 50%, #A44A2E); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%); box-shadow: 0 4px 8px rgba(0,0,0,.3); }

/* --- Ordinateur : double page --- */
.hbo--spread { max-width: 1060px; }
.hbo--spread .hbo-book {
  width: 100%; height: var(--h, 480px);
  transform: translateX(-25%); transition: transform 1s cubic-bezier(.65,0,.25,1);
}
.hbo--spread.is-open .hbo-book { transform: none; }
.hbo--spread .hbo-right {
  position: absolute; left: 50%; top: 0; width: 50%; height: 100%; border-radius: 4px 18px 18px 4px; overflow: hidden;
  box-shadow: inset 24px 0 30px -24px rgba(20,50,92,.35), 0 40px 70px -35px rgba(0,0,0,.7);
}
.hbo--spread .hbo-cover {
  position: absolute; left: 50%; top: 0; width: 50%; height: 100%; cursor: pointer;
  transform-style: preserve-3d; transform-origin: 0 50%;
  transition: transform 1.15s cubic-bezier(.65,0,.25,1);
}
.hbo--spread.is-peek:not(.is-open) .hbo-cover { transform: rotateY(-16deg); transition-duration: .55s; }
.hbo--spread:not(.is-open) .hbo-cover:hover { transform: rotateY(-9deg); }
.hbo--spread:not(.is-open) .hbo-cover:hover .hbo-open span { transform: translateX(4px); }
.hbo--spread.is-open .hbo-cover { transform: rotateY(-180deg); cursor: default; }
.hbo--spread .hbo-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.hbo--spread .hbo-front { border-radius: 4px 18px 18px 4px; box-shadow: 0 40px 70px -30px rgba(0,0,0,.8), inset 6px 0 10px -4px rgba(0,0,0,.35); }
.hbo--spread .hbo-front .hbo-ribbon { bottom: -22px; }
.hbo--spread .hbo-face.hbo-front { overflow: visible; }
.hbo--spread .hbo-back {
  transform: rotateY(180deg); border-radius: 18px 4px 4px 18px;
  box-shadow: inset -24px 0 30px -24px rgba(20,50,92,.35), 0 40px 70px -35px rgba(0,0,0,.7);
}
/* ombre qui passe pendant le tour de page */
.hbo--spread .hbo-front::after, .hbo--spread .hbo-back::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.25), transparent 60%);
  transition: opacity 1.15s ease;
}
.hbo--spread.is-open .hbo-back::after { animation: hboShade 1.15s ease both; }
@keyframes hboShade { 0% { opacity: .9; } 100% { opacity: 0; } }
/* contenu des pages : apparition en douceur */
.hbo--spread .hbo-page-in > * { transition: opacity .6s ease .5s, transform .6s ease .5s; }
.hbo--spread:not(.is-open) .hbo-right .hbo-page-in > * { opacity: 0; transform: translateY(10px); }
.hbo--spread .hbo-right .hbo-panel-ico { background: linear-gradient(145deg, #E08A5F, var(--terra)); }
.hbo--spread .hbo-nav { display: flex; justify-content: center; margin-top: 22px; min-height: 40px; }
.hbo-close { border: 0; background: none; color: rgba(255,255,255,.75); font-family: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; opacity: 0; pointer-events: none; transition: opacity .4s ease .8s; }
.hbo--spread.is-open .hbo-close { opacity: 1; pointer-events: auto; }

/* --- Mobile : feuilles qui se tournent --- */
.hbo--stack { max-width: 460px; }
.hbo--stack .hbo-book { height: var(--h, 460px); }
.hbo--stack .hbo-sheet {
  position: absolute; inset: 0; z-index: var(--z); border-radius: 6px 22px 22px 6px; overflow: hidden;
  transform-origin: 0 50%; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.75), inset 14px 0 18px -14px rgba(20,50,92,.4);
  transition: transform .9s cubic-bezier(.65,0,.25,1), box-shadow .9s ease;
}
.hbo--stack .hbo-sheet.hbo-cover-sheet { overflow: visible; box-shadow: 0 30px 60px -30px rgba(0,0,0,.8), inset 6px 0 10px -4px rgba(0,0,0,.35); cursor: pointer; }
.hbo--stack .hbo-sheet.is-turned { transform: rotateY(-180deg); }
.hbo--stack .hbo-sheet::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, transparent 40%, rgba(0,0,0,.28)); opacity: 0; transition: opacity .45s ease; }
.hbo--stack .hbo-sheet.is-turned::after { opacity: 1; }
.hbo--stack.is-peek .hbo-cover-sheet:not(.is-turned) { transform: rotateY(-14deg); transition-duration: .5s; }
/* tranche des pages en dessous */
.hbo--stack .hbo-book::before { content: ""; position: absolute; inset: 6px -5px -5px 6px; border-radius: 6px 22px 22px 6px; background: #E9DFCB; box-shadow: 0 2px 0 #DCCFB4, 0 4px 0 #E9DFCB; }
.hbo--stack .hbo-page-in { padding: 30px 24px 28px; }
.hbo--stack .hbo-sheet:nth-child(3) .hbo-panel-ico { background: linear-gradient(145deg, #E08A5F, var(--terra)); }
.hbo--stack .hbo-cover-in { padding: 40px 28px; }
.hbo--stack .hbo-nav { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 26px; }
.hbo--stack .hbo-nav button { width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 1.15rem; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.hbo--stack .hbo-nav button:disabled { opacity: .35; }
.hbo-dots { display: flex; gap: 8px; }
.hbo-dots i { width: 8px; height: 8px; border-radius: 99px; background: rgba(255,255,255,.3); transition: width .4s ease, background .4s ease; }
.hbo-dots i.on { width: 24px; background: var(--gold); }

@media (prefers-reduced-motion: reduce) {
  .hbo *, .hbo .hbo-book { transition-duration: .01s !important; animation-duration: .01s !important; }
}
