/* ===============================================================
   ORIGINES DU BOSTON TERRIER — CROCS-MINILUS
   Page modernisée à partir de l'ancienne page origine.php
   =============================================================== */

.cm-page-origin-boston{
  min-height:100vh;
  color:#372417;
  background-color:#fff0df;
  background-image:
    linear-gradient(180deg, rgba(255,246,236,.58), rgba(255,230,212,.68)),
    radial-gradient(circle at 50% 35%, rgba(255,250,244,.56), rgba(255,244,235,.28) 34%, rgba(255,230,212,.08) 62%),
    url('/assets/images/origine-boston/origine-boston-bg.webp');
  background-size:cover, cover, cover;
  background-position:center top, center top, center top;
  background-repeat:no-repeat;
  background-attachment:fixed, fixed, fixed;
}

.cm-ob-page{
  width:min(1220px, calc(100% - 34px));
  margin:0 auto;
  padding:34px 0 72px;
}

.cm-ob-hero,
.cm-ob-panel,
.cm-ob-footer-nav{
  position:relative;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.72);
  border-radius:34px;
  background:rgba(255,250,244,.91);
  box-shadow:0 22px 58px rgba(116,65,38,.15);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}

.cm-ob-hero::after,
.cm-ob-panel::after{
  content:"";
  position:absolute;
  inset:13px;
  border:1px solid rgba(152,92,56,.15);
  border-radius:26px;
  pointer-events:none;
}

.cm-ob-hero > *,
.cm-ob-panel > *,
.cm-ob-footer-nav > *{
  position:relative;
  z-index:1;
}

.cm-ob-hero{
  display:grid;
  grid-template-columns:minmax(0, 1.1fr) minmax(320px, .9fr);
  gap:28px;
  align-items:center;
  min-height:430px;
  padding:38px;
  background:
    radial-gradient(circle at 76% 16%, rgba(255,207,196,.62), transparent 30%),
    linear-gradient(135deg, rgba(255,252,248,.96), rgba(255,239,226,.86));
}

.cm-ob-kicker{
  display:inline-flex;
  width:max-content;
  max-width:100%;
  padding:8px 13px;
  border-radius:999px;
  color:#7d3b32;
  background:linear-gradient(135deg, rgba(255,190,205,.95), rgba(255,221,151,.95));
  font-size:12px;
  font-weight:950;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.cm-ob-hero h1,
.cm-ob-section-head h2,
.cm-ob-haggerty-text h2{
  color:#5d2d1d;
  text-shadow:0 2px 0 rgba(255,255,255,.65);
}

.cm-ob-hero h1{
  margin:18px 0 16px;
  font-size:clamp(40px, 6.3vw, 76px);
  line-height:.94;
}

.cm-ob-hero p,
.cm-ob-panel p{
  color:#654735;
  line-height:1.74;
}

.cm-ob-hero p{
  max-width:760px;
  margin:0;
  font-size:18px;
}

.cm-ob-actions,
.cm-ob-footer-nav{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:center;
}

.cm-ob-actions{ margin-top:26px; }
.cm-ob-footer-nav{
  justify-content:center;
  margin-top:24px;
  padding:24px;
}

.cm-ob-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:0 18px;
  border:1px solid rgba(143,91,62,.15);
  border-radius:999px;
  color:#67452e;
  background:rgba(255,255,255,.72);
  font-weight:950;
  text-decoration:none;
  transition:transform .18s ease, box-shadow .18s ease;
}
.cm-ob-btn:hover{
  transform:translateY(-2px);
  box-shadow:0 12px 24px rgba(116,65,38,.13);
}
.cm-ob-btn--primary{
  color:#fff;
  background:linear-gradient(135deg, #df748b, #c89145);
  box-shadow:0 14px 26px rgba(154,83,64,.24);
}

.cm-ob-hero__photo{
  margin:0;
  padding:14px;
  border-radius:30px;
  background:linear-gradient(180deg, rgba(255,255,255,.76), rgba(255,235,222,.64));
  border:1px solid rgba(143,91,62,.14);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.76), 0 18px 38px rgba(116,65,38,.1);
}
.cm-ob-hero__photo .cm-ob-img{
  width:100%;
  min-height:320px;
  aspect-ratio:4/3;
  object-fit:contain;
  border-radius:22px;
  background:#fbf2e8;
}
.cm-ob-hero__photo figcaption{
  padding:12px 8px 0;
  color:#6b4b38;
  font-weight:850;
  text-align:center;
}

.cm-ob-panel{
  margin-top:24px;
  padding:32px;
  background:linear-gradient(135deg, rgba(255,252,247,.95), rgba(255,241,231,.88));
}

.cm-ob-section-head{
  max-width:920px;
  margin:0 auto 28px;
  text-align:center;
}
.cm-ob-section-head .cm-ob-kicker{ margin:0 auto; }
.cm-ob-section-head h2,
.cm-ob-haggerty-text h2{
  margin:14px 0 0;
  font-size:clamp(30px, 4vw, 48px);
  line-height:1.04;
}
.cm-ob-section-head p{
  max-width:820px;
  margin:14px auto 0;
}

.cm-ob-origin-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:18px;
}
.cm-ob-story-card,
.cm-ob-facts article,
.cm-ob-pedigree-note,
.cm-ob-person-card,
.cm-ob-photo-card,
.cm-ob-timeline-copy,
.cm-ob-haggerty-photo{
  border:1px solid rgba(143,91,62,.13);
  background:rgba(255,255,255,.70);
  box-shadow:0 14px 30px rgba(116,65,38,.09);
}
.cm-ob-story-card{
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:18px;
  border-radius:28px;
}
.cm-ob-story-card figure{
  margin:0;
  border-radius:22px;
  overflow:hidden;
  background:#fbf2e8;
}
.cm-ob-story-card .cm-ob-img{
  width:100%;
  aspect-ratio:4/3;
  object-fit:contain;
  background:#fbf2e8;
}
.cm-ob-story-card h3{
  margin:4px 0 0;
  color:#552d1e;
  font-size:23px;
  line-height:1.12;
}
.cm-ob-story-card p{ margin:0; }

.cm-ob-panel--facts{
  display:grid;
  grid-template-columns:repeat(6, minmax(0, 1fr));
  gap:12px;
  background:rgba(255,250,244,.76);
}
.cm-ob-panel--facts::after{ display:none; }
.cm-ob-panel--facts article{
  min-height:112px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:7px;
  padding:18px 12px;
  border-radius:22px;
  text-align:center;
}
.cm-ob-panel--facts strong{
  color:#8a4736;
  font-size:12px;
  font-weight:950;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.cm-ob-panel--facts span{
  color:#432719;
  font-size:17px;
  font-weight:950;
}

.cm-ob-timeline-layout{
  display:grid;
  grid-template-columns:minmax(0, 1.05fr) minmax(300px, .95fr);
  gap:22px;
  align-items:stretch;
}
.cm-ob-timeline-copy{
  padding:24px;
  border-radius:28px;
}
.cm-ob-timeline-copy p:first-child{ margin-top:0; }
.cm-ob-timeline-copy p:last-child{ margin-bottom:0; }
.cm-ob-history-photos,
.cm-ob-people-row{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:16px;
}

.cm-ob-panel--haggerty{
  display:grid;
  grid-template-columns:minmax(0, 1.1fr) minmax(320px, .9fr);
  gap:24px;
  align-items:center;
  background:
    radial-gradient(circle at 82% 18%, rgba(86,48,34,.14), transparent 24%),
    linear-gradient(135deg, rgba(255,252,247,.96), rgba(255,238,226,.88));
}
.cm-ob-haggerty-text p{ margin:16px 0 0; }
.cm-ob-pro-note{
  padding:16px 18px;
  border-left:5px solid #c89145;
  border-radius:16px;
  background:rgba(255,255,255,.64);
  font-weight:850;
}
.cm-ob-haggerty-photo{
  margin:0;
  padding:16px;
  border-radius:30px;
}
.cm-ob-haggerty-photo .cm-ob-img{
  width:100%;
  aspect-ratio:4/3;
  object-fit:contain;
  border-radius:22px;
  background:#fbf2e8;
}
.cm-ob-haggerty-photo figcaption{
  padding:12px 8px 0;
  color:#5f422f;
  font-weight:950;
  text-align:center;
}

.cm-ob-pedigree-note{
  display:flex;
  gap:12px;
  align-items:flex-start;
  max-width:920px;
  margin:0 auto 20px;
  padding:16px 18px;
  border-radius:22px;
  color:#5f422f;
}
.cm-ob-pedigree-note strong{
  flex:0 0 auto;
  color:#733b2b;
}
.cm-ob-pedigree-scroll{
  overflow:auto;
  padding:18px;
  border-radius:30px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,205,165,.30), transparent 24%),
    rgba(255,255,255,.46);
  border:1px solid rgba(143,91,62,.12);
}
.cm-ob-pedigree-tree,
.cm-ob-pedigree-branches{
  margin:0;
  padding:0;
  list-style:none;
}
.cm-ob-pedigree-tree{
  min-width:980px;
}
.cm-ob-pedigree-node{
  position:relative;
  display:grid;
  grid-template-columns:minmax(210px, 260px) minmax(0, 1fr);
  gap:26px;
  align-items:center;
  margin:0;
}
.cm-ob-pedigree-tree > .cm-ob-pedigree-node{
  grid-template-columns:minmax(230px, 280px) minmax(0, 1fr);
}
.cm-ob-pedigree-node:not(.has-parents){
  display:block;
}
.cm-ob-pedigree-branches{
  position:relative;
  display:grid;
  gap:14px;
  padding-left:24px;
}
.cm-ob-pedigree-branches::before{
  content:"";
  position:absolute;
  left:0;
  top:18px;
  bottom:18px;
  width:3px;
  border-radius:999px;
  background:linear-gradient(180deg, rgba(196,139,78,.22), rgba(123,61,43,.36), rgba(196,139,78,.22));
}
.cm-ob-pedigree-branches > .cm-ob-pedigree-node::before{
  content:"";
  position:absolute;
  left:-24px;
  top:50%;
  width:24px;
  height:3px;
  border-radius:999px;
  background:rgba(123,61,43,.28);
}
.cm-ob-person-card{
  min-width:0;
  padding:14px;
  border-radius:22px;
  text-align:center;
}
.cm-ob-person-card__media{
  margin:0 0 10px;
  border-radius:16px;
  overflow:hidden;
  background:#fbf2e8;
  border:1px solid rgba(143,91,62,.12);
}
.cm-ob-person-card__media .cm-ob-img{
  display:block;
  width:100%;
  aspect-ratio:4/3;
  object-fit:contain;
  background:#fbf2e8;
}
.cm-ob-person-card__role,
.cm-ob-person-card__prefix{
  display:inline-flex;
  justify-content:center;
  margin:0 3px 8px;
  padding:5px 9px;
  border-radius:999px;
  color:#7d3b32;
  background:rgba(255,226,203,.88);
  font-size:11px;
  font-weight:950;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.cm-ob-person-card__prefix{
  color:#fff;
  background:#b74d4d;
}
.cm-ob-person-card strong{
  display:block;
  color:#442619;
  font-size:18px;
  line-height:1.15;
}
.cm-ob-person-card__details{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:6px;
  margin:10px 0 0;
  padding:0;
  list-style:none;
}
.cm-ob-person-card__details li{
  padding:4px 7px;
  border-radius:999px;
  color:#71513d;
  background:rgba(255,244,235,.88);
  font-size:12px;
  font-weight:800;
}
.cm-ob-people-row{
  max-width:640px;
  margin:22px auto 0;
}

.cm-ob-gallery-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:16px;
}
.cm-ob-photo-card{
  margin:0;
  border-radius:26px;
  overflow:hidden;
  background:rgba(255,255,255,.74);
}
.cm-ob-photo-card .cm-ob-img{
  display:block;
  width:100%;
  aspect-ratio:4/3;
  object-fit:contain;
  background:#fbf2e8;
}
.cm-ob-photo-card figcaption{
  display:grid;
  gap:4px;
  min-height:92px;
  padding:12px 14px 14px;
  text-align:center;
}
.cm-ob-photo-card figcaption strong{
  color:#4e2a1c;
  font-size:17px;
  line-height:1.15;
}
.cm-ob-photo-card figcaption small{
  color:#74533f;
  font-weight:820;
  line-height:1.32;
}
.cm-ob-photo-card figcaption em{
  color:#98705a;
  font-size:11px;
  font-style:normal;
  word-break:break-word;
}
.cm-ob-img--missing{
  display:grid;
  place-items:center;
  gap:6px;
  min-height:160px;
  background:#fbf2e8;
  color:#7a5341;
  text-align:center;
}
.cm-ob-img--missing span{ font-size:34px; }
.cm-ob-img--missing small{ font-weight:850; }

@media (max-width:1100px){
  .cm-ob-origin-grid,
  .cm-ob-gallery-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
  .cm-ob-panel--facts{
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }
}

@media (max-width:900px){
  .cm-ob-hero,
  .cm-ob-timeline-layout,
  .cm-ob-panel--haggerty{
    grid-template-columns:1fr;
  }
  .cm-ob-hero__photo .cm-ob-img{
    min-height:250px;
  }
}

@media (max-width:720px){
  .cm-ob-page{
    width:min(100% - 22px, 1220px);
    padding-top:20px;
  }
  .cm-ob-hero,
  .cm-ob-panel{
    border-radius:26px;
    padding:22px;
  }
  .cm-ob-hero::after,
  .cm-ob-panel::after{
    inset:9px;
    border-radius:20px;
  }
  .cm-ob-hero h1{
    font-size:clamp(34px, 12vw, 54px);
  }
  .cm-ob-hero p,
  .cm-ob-panel p{
    font-size:15.5px;
  }
  .cm-ob-origin-grid,
  .cm-ob-gallery-grid,
  .cm-ob-history-photos,
  .cm-ob-people-row{
    grid-template-columns:1fr;
  }
  .cm-ob-panel--facts{
    grid-template-columns:1fr;
  }
  .cm-ob-panel--facts article{
    min-height:86px;
  }
  .cm-ob-pedigree-note{
    display:grid;
  }
  .cm-ob-pedigree-scroll{
    padding:12px;
  }
  .cm-ob-pedigree-tree{
    min-width:0;
  }
  .cm-ob-pedigree-node,
  .cm-ob-pedigree-tree > .cm-ob-pedigree-node{
    display:block;
  }
  .cm-ob-pedigree-branches{
    margin-top:12px;
    padding-left:18px;
  }
  .cm-ob-pedigree-branches > .cm-ob-pedigree-node::before{
    left:-18px;
    width:18px;
  }
  .cm-ob-person-card{
    margin-bottom:12px;
  }
}


/* ===== PATCH V5 : Sergeant Stubby + arbre généalogique compact ===== */

.cm-ob-panel--stubby{
  display:grid;
  grid-template-columns:minmax(260px, .72fr) minmax(0, 1.28fr);
  gap:24px;
  align-items:center;
  background:
    radial-gradient(circle at 18% 12%, rgba(255,210,167,.34), transparent 28%),
    linear-gradient(135deg, rgba(255,252,247,.96), rgba(255,237,224,.88));
}

.cm-ob-stubby-photo .cm-ob-photo-card{
  transform:rotate(-1.2deg);
}

.cm-ob-stubby-text h2{
  margin:14px 0 0;
  color:#5a2d1d;
  font-size:clamp(30px, 4vw, 48px);
  line-height:1.04;
  text-shadow:0 2px 0 rgba(255,255,255,.58);
}

.cm-ob-stubby-text p{
  color:#614633;
  line-height:1.72;
  font-size:17px;
}

.cm-ob-stubby-points{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:10px;
  margin:18px 0 0;
  padding:0;
  list-style:none;
}

.cm-ob-stubby-points li{
  padding:12px 14px;
  border-radius:18px;
  color:#5e3c2a;
  background:rgba(255,255,255,.68);
  border:1px solid rgba(143,91,62,.12);
  font-weight:850;
  line-height:1.36;
}

.cm-ob-stubby-points li::before{
  content:"★ ";
  color:#c89145;
  font-weight:1000;
}

.cm-ob-pedigree-compact{
  display:grid;
  grid-template-columns:.78fr repeat(4, minmax(0, 1fr));
  gap:10px;
  align-items:stretch;
  padding:14px;
  border-radius:28px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,205,165,.30), transparent 24%),
    rgba(255,255,255,.50);
  border:1px solid rgba(143,91,62,.12);
}

.cm-ob-pedigree-level{
  position:relative;
  display:grid;
  gap:8px;
  align-content:start;
  min-width:0;
  padding:10px;
  border-radius:22px;
  background:rgba(255,255,255,.46);
  border:1px solid rgba(143,91,62,.08);
}

.cm-ob-pedigree-level > span{
  display:block;
  min-height:30px;
  padding:7px 8px;
  border-radius:999px;
  color:#7d3b32;
  background:rgba(255,226,203,.88);
  font-size:11px;
  font-weight:950;
  letter-spacing:.05em;
  text-align:center;
  text-transform:uppercase;
}

.cm-ob-compact-node{
  min-width:0;
  padding:9px;
  border-radius:18px;
  text-align:center;
  background:rgba(255,255,255,.82);
  border:1px solid rgba(143,91,62,.13);
  box-shadow:0 10px 20px rgba(116,65,38,.06);
}

.cm-ob-compact-node::before{
  content:"";
  display:block;
  width:3px;
  height:10px;
  margin:-10px auto 6px;
  border-radius:999px;
  background:rgba(143,91,62,.22);
}

.cm-ob-pedigree-level--title .cm-ob-compact-node::before{
  display:none;
}

.cm-ob-compact-node .cm-ob-img{
  display:block;
  width:100%;
  max-height:76px;
  aspect-ratio:4/3;
  object-fit:contain;
  margin:0 0 7px;
  border-radius:12px;
  background:#fbf2e8;
  border:1px solid rgba(143,91,62,.11);
}

.cm-ob-compact-node strong{
  display:block;
  color:#442619;
  font-size:15px;
  line-height:1.12;
}

.cm-ob-compact-node small{
  display:block;
  margin-top:5px;
  color:#73523d;
  font-size:11.5px;
  line-height:1.25;
  font-weight:760;
}

.cm-ob-compact-node--main{
  min-height:120px;
  display:grid;
  align-content:center;
  background:linear-gradient(145deg, rgba(255,246,230,.95), rgba(255,255,255,.86));
  border-color:rgba(200,145,69,.32);
}

.cm-ob-compact-node--main strong{
  font-size:20px;
  color:#5a2d1d;
}

.cm-ob-pedigree-full{
  margin-top:18px;
  padding:14px;
  border-radius:24px;
  background:rgba(255,255,255,.58);
  border:1px solid rgba(143,91,62,.12);
}

.cm-ob-pedigree-full summary{
  cursor:pointer;
  color:#5a2d1d;
  font-weight:950;
}

.cm-ob-pedigree-full .cm-ob-pedigree-scroll{
  margin-top:14px;
}

@media (max-width:1100px){
  .cm-ob-panel--stubby{
    grid-template-columns:1fr;
  }

  .cm-ob-pedigree-compact{
    grid-template-columns:1fr;
  }

  .cm-ob-pedigree-level{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .cm-ob-pedigree-level > span{
    grid-column:1 / -1;
  }
}

@media (max-width:720px){
  .cm-ob-stubby-points,
  .cm-ob-pedigree-level{
    grid-template-columns:1fr;
  }

  .cm-ob-stubby-text p{
    font-size:15.5px;
  }
}


@media (max-width:760px){
  .cm-page-origin-boston{
    background-size:auto 100vh, auto 100vh, auto 100vh;
    background-position:center top, center top, center top;
    background-attachment:scroll, scroll, scroll;
  }
}


/* ===============================================================
   PATCH V8 SANS NOMS TECHNIQUES PHOTOS
   Les visiteurs n'ont pas besoin de voir les noms .jpg/.png.
   =============================================================== */
.cm-ob-photo-card figcaption em,
.cm-origin-photo figcaption em{
  display:none !important;
}


/* ===============================================================
   PATCH V9 — PEDIGREE COMPLET ZOOMABLE ET DÉPLAÇABLE
   =============================================================== */
.cm-ob-pedigree-tools{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  margin:14px 0 12px;
  padding:12px;
  border-radius:20px;
  background:rgba(255,255,255,.68);
  border:1px solid rgba(143,91,62,.13);
}

.cm-ob-pedigree-tools button{
  min-width:42px;
  min-height:38px;
  border:0;
  border-radius:999px;
  cursor:pointer;
  color:#fff;
  background:linear-gradient(135deg, #bd6a4a, #c89145);
  box-shadow:0 8px 16px rgba(116,65,38,.14);
  font-weight:950;
  font-size:18px;
}

.cm-ob-pedigree-tools button[data-cm-pedigree-reset]{
  padding:0 16px;
  font-size:14px;
}

.cm-ob-pedigree-tools output{
  min-width:64px;
  padding:8px 11px;
  border-radius:999px;
  text-align:center;
  color:#5a2d1d;
  background:rgba(255,241,228,.92);
  border:1px solid rgba(143,91,62,.13);
  font-weight:950;
}

.cm-ob-pedigree-tools span{
  color:#6d4b38;
  font-size:13px;
  font-weight:800;
}

.cm-ob-pedigree-viewport{
  position:relative;
  height:min(76vh, 760px);
  min-height:460px;
  overflow:hidden;
  padding:0;
  border-radius:30px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,205,165,.30), transparent 24%),
    linear-gradient(135deg, rgba(255,255,255,.56), rgba(255,241,228,.50));
  border:1px solid rgba(143,91,62,.14);
  cursor:grab;
  touch-action:none;
  user-select:none;
}

.cm-ob-pedigree-viewport.is-dragging{
  cursor:grabbing;
}

.cm-ob-pedigree-stage{
  position:absolute;
  left:0;
  top:0;
  width:max-content;
  min-width:1120px;
  padding:22px;
  transform-origin:0 0;
  will-change:transform;
}

.cm-ob-pedigree-stage .cm-ob-pedigree-tree{
  min-width:1120px;
}

.cm-ob-pedigree-full .cm-ob-pedigree-scroll{
  display:none;
}

@media (max-width:720px){
  .cm-ob-pedigree-viewport{
    height:68vh;
    min-height:420px;
    border-radius:22px;
  }

  .cm-ob-pedigree-tools{
    gap:8px;
  }

  .cm-ob-pedigree-tools span{
    flex-basis:100%;
    font-size:12px;
  }

  .cm-ob-pedigree-stage,
  .cm-ob-pedigree-stage .cm-ob-pedigree-tree{
    min-width:1040px;
  }
}
