/* ========================================================================= */
/* FAMILYSAVE — GABARITS 3D RÉALISTES, COUVERCLE INTERACTIF & ARMOIRE PHOTOS */
/* Fichier : boxes-3d-cabinet.css (chargé après style.css)                   */
/* ========================================================================= */

/* --- 1. VRAIE ARMOIRE À PHOTOS (MODE CABINET) --- */
.fs-cabinet-frame {
 background: linear-gradient(180deg, #1b1410 0%, #120d0a 100%);
 border: 10px solid #2b1e16;
 border-radius: 1.35rem;
 box-shadow:
  inset 0 0 65px rgba(0, 0, 0, 0.85),
  0 25px 60px rgba(0, 0, 0, 0.75);
 padding: 1.25rem 1.25rem 0.5rem;
 position: relative;
 overflow: hidden;
}

.fs-cabinet-frame::before {
 content: '';
 position: absolute;
 inset: 0;
 background: repeating-linear-gradient(
  90deg,
  rgba(255, 255, 255, 0.012) 0px,
  rgba(255, 255, 255, 0.012) 2px,
  transparent 2px,
  transparent 18px
 );
 pointer-events: none;
}

.fs-cabinet-shelf {
 position: relative;
 padding: 1.5rem 1rem 0.45rem;
 margin-bottom: 1.35rem;
 display: flex;
 flex-wrap: wrap;
 align-items: flex-end;
 justify-content: space-around;
 gap: 1.4rem 1.8rem;
 background: radial-gradient(ellipse at 50% 0%, rgba(251, 191, 36, 0.08) 0%, transparent 65%);
 border-radius: 0.75rem 0.75rem 0 0;
}

/* Bandeau LED chaud sous chaque tablette supérieure */
.fs-cabinet-shelf::before {
 content: '';
 position: absolute;
 top: 0;
 left: 8%;
 right: 8%;
 height: 3px;
 border-radius: 999px;
 background: linear-gradient(90deg, transparent, rgba(253, 224, 71, 0.55), transparent);
 box-shadow: 0 2px 16px rgba(251, 191, 36, 0.35);
 pointer-events: none;
}

/* Planche d'étagère en bois massif */
.fs-cabinet-plank {
 width: 100%;
 height: 18px;
 margin-top: -4px;
 margin-bottom: 1.25rem;
 border-radius: 4px;
 background: linear-gradient(180deg, #8b6240 0%, #634227 38%, #3c2515 100%);
 border-top: 1px solid rgba(254, 243, 199, 0.28);
 box-shadow:
  0 10px 22px rgba(0, 0, 0, 0.85),
  inset 0 -3px 6px rgba(0, 0, 0, 0.55);
 position: relative;
 z-index: 5;
}

.fs-cabinet-plank-label {
 position: absolute;
 right: 14px;
 top: 50%;
 transform: translateY(-50%);
 font-size: 9px;
 font-family: monospace;
 font-weight: 800;
 letter-spacing: 0.12em;
 text-transform: uppercase;
 color: rgba(254, 243, 199, 0.75);
 background: rgba(20, 12, 6, 0.65);
 padding: 1px 8px;
 border-radius: 4px;
 border: 1px solid rgba(251, 191, 36, 0.25);
}

/* --- 2. MODE VITRINE 3D (GRAND FORMAT) --- */
#vault-grid.vault-mode-showcase {
 display: grid;
 grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
 gap: 1.75rem;
 justify-items: center;
}
#vault-grid.vault-mode-showcase .fs-box-item {
 max-width: 280px;
 padding: 14px 12px;
 background: rgba(255, 255, 255, 0.03);
 border: 1px solid rgba(255, 255, 255, 0.08);
}
#vault-grid.vault-mode-showcase .fs-box-stage {
 transform: scale(1.22);
 margin: 14px 0 18px;
}

/* --- 3. MODE MUR POLAROID & PLANCHE CONTACT --- */
#vault-grid.vault-mode-polaroid {
 display: grid;
 grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
 gap: 1.35rem;
 padding: 0.75rem;
}
.fs-polaroid-wall-card {
 background: #faf8f2;
 padding: 9px 9px 22px;
 border-radius: 4px;
 box-shadow: 0 14px 28px rgba(0, 0, 0, 0.65);
 transition: transform 0.22s ease, box-shadow 0.22s ease;
 cursor: pointer;
 position: relative;
}
.fs-polaroid-wall-card:nth-child(odd) { transform: rotate(-1.8deg); }
.fs-polaroid-wall-card:nth-child(even) { transform: rotate(1.6deg); }
.fs-polaroid-wall-card:hover {
 transform: rotate(0deg) scale(1.06) translateY(-4px);
 z-index: 25;
 box-shadow: 0 22px 42px rgba(0, 0, 0, 0.8);
}

#vault-grid.vault-mode-contact {
 display: grid;
 grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
 gap: 0.45rem;
 background: #070709;
 padding: 0.75rem;
 border-radius: 1rem;
 border: 1px solid rgba(255, 255, 255, 0.08);
}
.fs-contact-cell {
 aspect-ratio: 1 / 1;
 background: #111;
 border: 1px solid rgba(255, 255, 255, 0.1);
 border-radius: 6px;
 overflow: hidden;
 position: relative;
 cursor: pointer;
 transition: border-color 0.15s ease, transform 0.15s ease;
}
.fs-contact-cell:hover {
 border-color: #f59e0b;
 transform: scale(1.04);
 z-index: 15;
}

/* --- 4. GABARITS 3D PROPORTIONNELS FIDÈLES AUX MODÈLES --- */
.fs-box-item.fs-gabarit-item {
 max-width: 215px;
 min-width: 155px;
 padding: 8px 6px 10px;
}

.fs-box-item.fs-gabarit-item .fs-box-stage {
 width: 185px;
 height: 156px;
 perspective: 860px;
}

/* ========================================================= */
/* GABARIT A : BOÎTE D'ARCHIVES À COUVERCLE (146 × 72 × 98)  */
/* Toile gris-sauge + coins métal rivetés + onglets kraft    */
/* ========================================================= */
.fs-gabarit-archives .fs-box-3d {
 width: 146px;
 height: 72px;
 margin-top: 26px;
}

.fs-gabarit-archives .fs-face {
 border-radius: 3px;
 padding: 0;
 background:
  repeating-linear-gradient(45deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 4px),
  linear-gradient(155deg, #7a8581 0%, #616b68 55%, #4a5350 100%);
 border: 1px solid rgba(255, 255, 255, 0.14);
 box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.35);
}

.fs-gabarit-archives .fs-face-front { width: 146px; height: 72px; transform: rotateY(0deg) translateZ(49px); }
.fs-gabarit-archives .fs-face-back  { width: 146px; height: 72px; transform: rotateY(180deg) translateZ(49px); }
.fs-gabarit-archives .fs-face-left  { width: 98px;  height: 72px; left: 24px; transform: rotateY(-90deg) translateZ(73px); }
.fs-gabarit-archives .fs-face-right { width: 98px;  height: 72px; left: 24px; transform: rotateY(90deg) translateZ(73px); }
.fs-gabarit-archives .fs-face-bottom { width: 146px; height: 98px; top: -13px; transform: rotateX(-90deg) translateZ(36px); background: #2c3331; }
.fs-gabarit-archives .fs-face-top {
 width: 146px;
 height: 98px;
 top: -13px;
 transform: rotateX(90deg) translateZ(36px);
 background: #1e2321;
 box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.85);
 overflow: visible;
}

/* Coins métalliques bronze rivetés */
.fs-metal-corner {
 position: absolute;
 width: 14px;
 height: 14px;
 background: linear-gradient(135deg, #c9a77c 0%, #8c6a43 60%, #5e4427 100%);
 border: 1px solid rgba(254, 243, 199, 0.4);
 box-shadow: 0 1px 3px rgba(0,0,0,0.45);
 pointer-events: none;
}
.fs-metal-corner.tl { top: -1px; left: -1px; border-radius: 3px 0 8px 0; }
.fs-metal-corner.tr { top: -1px; right: -1px; border-radius: 0 3px 0 8px; }
.fs-metal-corner.bl { bottom: -1px; left: -1px; border-radius: 0 8px 0 3px; }
.fs-metal-corner.br { bottom: -1px; right: -1px; border-radius: 8px 0 3px 0; }

/* Intercalaires kraft à onglets datés à l'intérieur de la boîte ouverte */
.fs-arch-interior {
 position: absolute;
 inset: 5px 6px;
 display: flex;
 flex-direction: column;
 justify-content: space-between;
 transform-style: preserve-3d;
 pointer-events: none;
}
.fs-arch-divider-row {
 width: 100%;
 height: 14px;
 background: linear-gradient(180deg, #e7d7bd 0%, #cbb492 100%);
 border: 1px solid #8f7758;
 border-radius: 2px;
 position: relative;
 transform: rotateX(-75deg) translateZ(10px);
 box-shadow: 0 -2px 5px rgba(0,0,0,0.45);
}
.fs-arch-divider-tab {
 position: absolute;
 top: -10px;
 left: var(--tab-left, 8px);
 background: #efe2ca;
 border: 1px solid #8f7758;
 border-bottom: none;
 border-radius: 3px 3px 0 0;
 padding: 1px 5px;
 font-family: monospace;
 font-size: 6px;
 font-weight: 900;
 color: #2b2117;
 white-space: nowrap;
}
.fs-arch-real-strip {
 position: absolute;
 top: 1px;
 right: 6px;
 width: 22px;
 height: 11px;
 border: 1px solid #fff;
 border-radius: 1px;
 overflow: hidden;
 box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.fs-arch-real-strip img {
 width: 100%;
 height: 100%;
 object-fit: cover;
}

/* COUVERCLE 3D INDÉPENDANT (FERMÉ / OUVERT CÔTÉ / OUVERT DERRIÈRE) */
.fs-arch-lid-group {
 position: absolute;
 width: 152px;
 height: 22px;
 left: -3px;
 top: -4px;
 transform-style: preserve-3d;
 transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
 cursor: pointer;
 z-index: 12;
}

/* État 1 : Fermé (posé sur la boîte) */
.fs-arch-lid-group.lid-closed {
 transform: translate3d(0px, 0px, 0px) rotateX(0deg) rotateY(0deg) rotateZ(0deg);
}
/* État 2 : Ouvert posé incliné sur le côté (comme sur les visuels de référence) */
.fs-arch-lid-group.lid-side {
 transform: translate3d(-58px, 12px, -18px) rotateZ(-26deg) rotateY(14deg) rotateX(12deg);
}
/* État 3 : Ouvert posé incliné derrière la boîte */
.fs-arch-lid-group.lid-back {
 transform: translate3d(0px, -22px, -64px) rotateX(58deg);
}

.fs-lid-face {
 position: absolute;
 background:
  repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 4px),
  linear-gradient(145deg, #86918d 0%, #68736f 60%, #525c58 100%);
 border: 1px solid rgba(255, 255, 255, 0.18);
 box-shadow: inset 0 0 8px rgba(0,0,0,0.28);
}
.fs-lid-top    { width: 152px; height: 104px; top: -41px; transform: rotateX(90deg) translateZ(11px); }
.fs-lid-front  { width: 152px; height: 22px; transform: rotateY(0deg) translateZ(52px); }
.fs-lid-back   { width: 152px; height: 22px; transform: rotateY(180deg) translateZ(52px); }
.fs-lid-left   { width: 104px; height: 22px; left: 24px; transform: rotateY(-90deg) translateZ(76px); }
.fs-lid-right  { width: 104px; height: 22px; left: 24px; transform: rotateY(90deg) translateZ(76px); }

/* Encoche demi-lune pour soulever le couvercle */
.fs-lid-notch {
 position: absolute;
 bottom: -1px;
 left: 50%;
 transform: translateX(-50%);
 width: 14px;
 height: 7px;
 background: #1e2321;
 border-radius: 10px 10px 0 0;
 border: 1px solid rgba(255,255,255,0.14);
 border-bottom: none;
}

/* ========================================================= */
/* GABARIT B : CUBE PHOTO BOIS NATUREL (92 × 92 × 92)        */
/* Cadre bois évidé + 4 vraies photos + éventail qui sort    */
/* ========================================================= */
.fs-gabarit-cube3 .fs-box-3d {
 width: 92px;
 height: 92px;
 margin-top: 16px;
}

.fs-gabarit-cube3 .fs-face {
 width: 92px;
 height: 92px;
 padding: 6px;
 border-radius: 3px;
 background: linear-gradient(145deg, #e0bd91 0%, #caa06d 55%, #b1844e 100%);
 border: 2px solid #9c6e3b;
 box-shadow: inset 0 0 8px rgba(74, 43, 15, 0.35);
}

.fs-gabarit-cube3 .fs-face-front  { transform: rotateY(0deg) translateZ(46px); }
.fs-gabarit-cube3 .fs-face-right  { transform: rotateY(90deg) translateZ(46px); }
.fs-gabarit-cube3 .fs-face-back   { transform: rotateY(180deg) translateZ(46px); }
.fs-gabarit-cube3 .fs-face-left   { transform: rotateY(-90deg) translateZ(46px); }
.fs-gabarit-cube3 .fs-face-top    { top: 0; transform: rotateX(90deg) translateZ(46px); background: #c59b68; }
.fs-gabarit-cube3 .fs-face-bottom { top: 0; transform: rotateX(-90deg) translateZ(46px); background: #8f6233; }

.fs-cube-window {
 width: 100%;
 height: 100%;
 background: #f8f7f3;
 padding: 4px 4px 11px;
 border-radius: 2px;
 box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.35);
 overflow: hidden;
 display: flex;
 flex-direction: column;
}
.fs-cube-window img {
 width: 100%;
 height: 100%;
 object-fit: cover;
 border-radius: 1px;
}

.fs-cube-top-slot {
 width: 70px;
 height: 18px;
 background: #14100d;
 border-radius: 2px;
 box-shadow: inset 0 3px 8px #000;
}
.fs-cube-pop-stack {
 position: absolute;
 top: -24px;
 left: 50%;
 transform: translateX(-50%) translateZ(16px);
 width: 64px;
 height: 42px;
 pointer-events: none;
}
.fs-cube-pop-card {
 position: absolute;
 width: 46px;
 height: 48px;
 left: 9px;
 top: -4px;
 background: #ffffff;
 padding: 3px 3px 9px;
 border-radius: 2px;
 box-shadow: 0 4px 12px rgba(0, 0, 0, 0.55);
}
.fs-cube-pop-card:nth-child(1) { transform: rotate(-14deg) translateX(-9px); }
.fs-cube-pop-card:nth-child(2) { transform: rotate(-4deg) translateX(-2px) translateY(-3px); }
.fs-cube-pop-card:nth-child(3) { transform: rotate(7deg) translateX(6px); }
.fs-cube-pop-card img { width: 100%; height: 100%; object-fit: cover; }

/* ========================================================= */
/* GABARIT C : CADRE GÉANT / SHADOW BOX (108 × 126 × 34)     */
/* Cadre blanc profond + fente supérieure + vitre pêle-mêle  */
/* ========================================================= */
.fs-gabarit-shadowbox .fs-box-3d {
 width: 108px;
 height: 126px;
 margin-top: 2px;
}

.fs-gabarit-shadowbox .fs-face {
 border-radius: 3px;
 background: linear-gradient(155deg, #ffffff 0%, #eef2f6 55%, #d6dde6 100%);
 border: 1px solid #ffffff;
 box-shadow: inset 0 0 10px rgba(15, 23, 42, 0.14);
 color: #0f172a;
}

.fs-gabarit-shadowbox .fs-face-front  { width: 108px; height: 126px; padding: 8px; transform: rotateY(0deg) translateZ(17px); }
.fs-gabarit-shadowbox .fs-face-back   { width: 108px; height: 126px; padding: 8px; transform: rotateY(180deg) translateZ(17px); }
.fs-gabarit-shadowbox .fs-face-left   { width: 34px;  height: 126px; left: 37px; padding: 4px; transform: rotateY(-90deg) translateZ(54px); }
.fs-gabarit-shadowbox .fs-face-right  { width: 34px;  height: 126px; left: 37px; padding: 4px; transform: rotateY(90deg) translateZ(54px); }
.fs-gabarit-shadowbox .fs-face-top    { width: 108px; height: 34px;  top: 46px; padding: 2px; transform: rotateX(90deg) translateZ(63px); }
.fs-gabarit-shadowbox .fs-face-bottom { width: 108px; height: 34px;  top: 46px; transform: rotateX(-90deg) translateZ(63px); background: #cbd5e1; }

.fs-sb-top-slot {
 width: 68px;
 height: 5px;
 background: #1e293b;
 border-radius: 999px;
 position: relative;
 box-shadow: inset 0 2px 4px #000;
}
.fs-sb-top-slot::after {
 content: '';
 position: absolute;
 left: 50%;
 top: 50%;
 transform: translate(-50%, -50%);
 width: 12px;
 height: 12px;
 border-radius: 999px;
 background: #0f172a;
 box-shadow: inset 0 2px 4px #000;
}

.fs-sb-cavity {
 width: 100%;
 height: 100%;
 background: linear-gradient(180deg, #e2e8f0 0%, #cbd5e1 100%);
 border: 2px solid #f8fafc;
 box-shadow: inset 0 6px 14px rgba(15, 23, 42, 0.35);
 border-radius: 2px;
 position: relative;
 overflow: hidden;
 padding: 4px;
}
.fs-sb-cavity::after {
 content: '';
 position: absolute;
 inset: 0;
 background: linear-gradient(125deg, rgba(255,255,255,0.42) 0%, rgba(255,255,255,0.05) 45%, transparent 62%);
 pointer-events: none;
 z-index: 8;
}
.fs-sb-pile-card {
 position: absolute;
 width: 42px;
 height: 46px;
 background: #ffffff;
 padding: 2px 2px 6px;
 border-radius: 1.5px;
 box-shadow: 0 3px 7px rgba(0, 0, 0, 0.38);
 overflow: hidden;
}
.fs-sb-pile-card img { width: 100%; height: 100%; object-fit: cover; }

.fs-sb-sticker-badge {
 position: absolute;
 font-size: 7px;
 line-height: 1;
 pointer-events: none;
 z-index: 10;
}

/* ========================================================= */
/* GABARIT D : L'ALLIANCE (92 × 98 × 92)                     */
/* ========================================================= */
.fs-gabarit-alliance .fs-box-3d {
 width: 92px;
 height: 98px;
 margin-top: 12px;
}
.fs-gabarit-alliance .fs-face-front  { transform: rotateY(0deg) translateZ(46px); }
.fs-gabarit-alliance .fs-face-right  { transform: rotateY(90deg) translateZ(46px); }
.fs-gabarit-alliance .fs-face-back   { transform: rotateY(180deg) translateZ(46px); }
.fs-gabarit-alliance .fs-face-left   { transform: rotateY(-90deg) translateZ(46px); }
.fs-gabarit-alliance .fs-face-top    { width: 92px; height: 92px; top: 3px; transform: rotateX(90deg) translateZ(49px); }
.fs-gabarit-alliance .fs-face-bottom { width: 92px; height: 92px; top: 3px; transform: rotateX(-90deg) translateZ(49px); }

/* Responsive mobile pour les gabarits */
@media (max-width: 767px) {
 .fs-cabinet-frame {
  border-width: 6px;
  padding: 0.75rem 0.5rem 0.25rem;
 }
 .fs-cabinet-shelf {
  gap: 1rem 0.75rem;
  padding: 1rem 0.35rem 0.25rem;
 }
 .fs-box-item.fs-gabarit-item {
  max-width: 170px;
  min-width: 142px;
 }
 .fs-box-item.fs-gabarit-item .fs-box-stage {
  width: 155px;
  height: 138px;
  transform: scale(0.88);
 }
}

/* ========================================================================= */
/* V6 — 7 NOUVEAUX MODÈLES 3D, APERÇU CRÉATION & TABLEAU SOMMAIRE 1981       */
/* ========================================================================= */

/* 1. ARCHIVES TURQUOISE & KRAFT (couvercle turquoise + corps kraft + poignée ovale) */
.fs-gabarit-archives_turquoise .fs-box-3d { width: 146px; height: 76px; margin-top: 24px; }
.fs-gabarit-archives_turquoise .fs-face {
 border-radius: 3px;
 background: linear-gradient(155deg, #d7b285 0%, #c19663 55%, #9f7545 100%);
 border: 1px solid rgba(255,255,255,0.2);
 box-shadow: inset 0 0 14px rgba(58, 34, 12, 0.3);
}
.fs-gabarit-archives_turquoise .fs-face-front  { width: 146px; height: 76px; transform: rotateY(0deg) translateZ(49px); }
.fs-gabarit-archives_turquoise .fs-face-back   { width: 146px; height: 76px; transform: rotateY(180deg) translateZ(49px); }
.fs-gabarit-archives_turquoise .fs-face-left   { width: 98px;  height: 76px; left: 24px; transform: rotateY(-90deg) translateZ(73px); }
.fs-gabarit-archives_turquoise .fs-face-right  { width: 98px;  height: 76px; left: 24px; transform: rotateY(90deg) translateZ(73px); }
.fs-gabarit-archives_turquoise .fs-face-bottom { width: 146px; height: 98px; top: -11px; transform: rotateX(-90deg) translateZ(38px); background: #7a562d; }
.fs-gabarit-archives_turquoise .fs-face-top    { width: 146px; height: 98px; top: -11px; transform: rotateX(90deg) translateZ(38px); background: #261b12; overflow: visible; }
.fs-gabarit-archives_turquoise .fs-lid-face {
 background: linear-gradient(145deg, #62c4cc 0%, #44a5ae 55%, #2f7e86 100%);
 border: 1px solid rgba(255,255,255,0.28);
}
.fs-arch-handle-cutout {
 width: 34px; height: 10px; border-radius: 999px;
 background: #1e140c;
 box-shadow: inset 0 2px 5px #000, 0 1px 0 rgba(255,255,255,0.25);
 margin-bottom: 6px;
}
.fs-arch-label-plate {
 width: 64px; padding: 3px 5px; background: #f8fafc; color: #0f172a;
 border: 1.5px solid #94a3b8; border-radius: 2px;
 font-size: 7px; font-weight: 800; text-align: center;
 box-shadow: 0 2px 4px rgba(0,0,0,0.3);
 overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 2. COFFRET BOIS NOYER / ACAJOU (par défaut — bois chaud + fermoir laiton) */
.fs-gabarit-wood_walnut .fs-box-3d { width: 112px; height: 98px; margin-top: 12px; }
.fs-gabarit-wood_walnut .fs-face {
 border-radius: 4px;
 background:
  repeating-linear-gradient(12deg, rgba(255,220,170,0.06) 0 2px, transparent 2px 7px),
  linear-gradient(150deg, #b86f3b 0%, #8c4b22 52%, #5e2f12 100%);
 border: 1px solid rgba(251, 191, 36, 0.25);
 box-shadow: inset 0 0 14px rgba(30, 12, 4, 0.55);
}
.fs-gabarit-wood_walnut .fs-face-front  { width: 112px; height: 98px; transform: rotateY(0deg) translateZ(56px); }
.fs-gabarit-wood_walnut .fs-face-back   { width: 112px; height: 98px; transform: rotateY(180deg) translateZ(56px); }
.fs-gabarit-wood_walnut .fs-face-left   { width: 112px; height: 98px; transform: rotateY(-90deg) translateZ(56px); }
.fs-gabarit-wood_walnut .fs-face-right  { width: 112px; height: 98px; transform: rotateY(90deg) translateZ(56px); }
.fs-gabarit-wood_walnut .fs-face-top    { width: 112px; height: 112px; top: -7px; transform: rotateX(90deg) translateZ(49px); background: linear-gradient(135deg, #c67d47 0%, #8e4c23 100%); }
.fs-gabarit-wood_walnut .fs-face-bottom { width: 112px; height: 112px; top: -7px; transform: rotateX(-90deg) translateZ(49px); background: #47220c; }
.fs-walnut-clasp {
 position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
 width: 20px; height: 22px; border-radius: 3px;
 background: linear-gradient(180deg, #fde68a 0%, #d97706 60%, #92400e 100%);
 border: 1px solid #fef3c7;
 box-shadow: 0 3px 6px rgba(0,0,0,0.55);
 z-index: 6;
}
.fs-walnut-lid-seam {
 position: absolute; top: 26px; left: 0; right: 0; height: 2px;
 background: rgba(20, 8, 2, 0.72);
 box-shadow: 0 1px 0 rgba(255,220,170,0.2);
}

/* 3. CUBE ACRYLIQUE TRANSPARENT (verre/plexiglas + fente + photos & post-it visibles) */
.fs-gabarit-acrylic_clear .fs-box-3d { width: 102px; height: 102px; margin-top: 10px; }
.fs-gabarit-acrylic_clear .fs-face {
 width: 102px; height: 102px; border-radius: 8px;
 background: linear-gradient(135deg, rgba(255,255,255,0.24) 0%, rgba(148,163,184,0.10) 48%, rgba(255,255,255,0.18) 100%);
 border: 2px solid rgba(226, 232, 240, 0.55);
 box-shadow: inset 0 0 18px rgba(255,255,255,0.16), 0 0 12px rgba(148,163,184,0.15);
 backdrop-filter: blur(1px);
 overflow: hidden;
}
.fs-gabarit-acrylic_clear .fs-face-front  { transform: rotateY(0deg) translateZ(51px); }
.fs-gabarit-acrylic_clear .fs-face-right  { transform: rotateY(90deg) translateZ(51px); }
.fs-gabarit-acrylic_clear .fs-face-back   { transform: rotateY(180deg) translateZ(51px); }
.fs-gabarit-acrylic_clear .fs-face-left   { transform: rotateY(-90deg) translateZ(51px); }
.fs-gabarit-acrylic_clear .fs-face-top    { top: 0; transform: rotateX(90deg) translateZ(51px); }
.fs-gabarit-acrylic_clear .fs-face-bottom { top: 0; transform: rotateX(-90deg) translateZ(51px); background: rgba(15,23,42,0.45); }
.fs-acrylic-postit {
 position: absolute; width: 32px; height: 32px;
 background: #fef08a; color: #713f12; padding: 3px;
 font-size: 6px; font-weight: 800; line-height: 1.1;
 box-shadow: 0 3px 6px rgba(0,0,0,0.35);
 transform: rotate(-7deg);
}
.fs-acrylic-ticket {
 position: absolute; bottom: 8px; right: 7px;
 background: #fdba74; color: #7c2d12; padding: 2px 5px;
 font-family: monospace; font-size: 6px; font-weight: 900;
 border: 1px dashed #9a3412; border-radius: 2px;
 transform: rotate(8deg);
}

/* 4. CUBE CRISTAL NÉON (verre transparent + arêtes lumineuses bleu glacier) */
.fs-gabarit-crystal_neon .fs-box-3d { width: 102px; height: 102px; margin-top: 10px; }
.fs-gabarit-crystal_neon .fs-face {
 width: 102px; height: 102px; border-radius: 5px;
 background: linear-gradient(140deg, rgba(56,189,248,0.16) 0%, rgba(15,23,42,0.22) 55%, rgba(125,211,252,0.18) 100%);
 border: 2px solid rgba(56, 189, 248, 0.85);
 box-shadow: inset 0 0 16px rgba(56,189,248,0.35), 0 0 14px rgba(14,165,233,0.4);
 overflow: hidden;
}
.fs-gabarit-crystal_neon .fs-face-front  { transform: rotateY(0deg) translateZ(51px); }
.fs-gabarit-crystal_neon .fs-face-right  { transform: rotateY(90deg) translateZ(51px); }
.fs-gabarit-crystal_neon .fs-face-back   { transform: rotateY(180deg) translateZ(51px); }
.fs-gabarit-crystal_neon .fs-face-left   { transform: rotateY(-90deg) translateZ(51px); }
.fs-gabarit-crystal_neon .fs-face-top    { top: 0; transform: rotateX(90deg) translateZ(51px); }
.fs-gabarit-crystal_neon .fs-face-bottom { top: 0; transform: rotateX(-90deg) translateZ(51px); background: rgba(14,165,233,0.18); }

/* 5. ARCHIVES BLEUE (coffret bleu mat avec couvercle interactif) */
.fs-gabarit-archives_blue .fs-box-3d { width: 146px; height: 74px; margin-top: 24px; }
.fs-gabarit-archives_blue .fs-face {
 border-radius: 3px;
 background: linear-gradient(155deg, #3b82f6 0%, #2563eb 55%, #1d4ed8 100%);
 border: 1px solid rgba(191, 219, 254, 0.32);
 box-shadow: inset 0 0 14px rgba(15, 23, 42, 0.35);
}
.fs-gabarit-archives_blue .fs-face-front  { width: 146px; height: 74px; transform: rotateY(0deg) translateZ(49px); }
.fs-gabarit-archives_blue .fs-face-back   { width: 146px; height: 74px; transform: rotateY(180deg) translateZ(49px); }
.fs-gabarit-archives_blue .fs-face-left   { width: 98px;  height: 74px; left: 24px; transform: rotateY(-90deg) translateZ(73px); }
.fs-gabarit-archives_blue .fs-face-right  { width: 98px;  height: 74px; left: 24px; transform: rotateY(90deg) translateZ(73px); }
.fs-gabarit-archives_blue .fs-face-bottom { width: 146px; height: 98px; top: -12px; transform: rotateX(-90deg) translateZ(37px); background: #1e3a8a; }
.fs-gabarit-archives_blue .fs-face-top    { width: 146px; height: 98px; top: -12px; transform: rotateX(90deg) translateZ(37px); background: #0f172a; overflow: visible; }
.fs-gabarit-archives_blue .fs-lid-face {
 background: linear-gradient(145deg, #60a5fa 0%, #3b82f6 60%, #2563eb 100%);
 border: 1px solid rgba(219, 234, 254, 0.38);
}

/* 6. ARCHIVES KRAFT NATUREL (carton kraft intégral avec couvercle interactif) */
.fs-gabarit-archives_kraft .fs-box-3d { width: 146px; height: 74px; margin-top: 24px; }
.fs-gabarit-archives_kraft .fs-face {
 border-radius: 3px;
 background: linear-gradient(155deg, #d8b589 0%, #be9461 55%, #9d7241 100%);
 border: 1px solid rgba(254, 243, 199, 0.25);
 box-shadow: inset 0 0 14px rgba(69, 39, 12, 0.32);
}
.fs-gabarit-archives_kraft .fs-face-front  { width: 146px; height: 74px; transform: rotateY(0deg) translateZ(49px); }
.fs-gabarit-archives_kraft .fs-face-back   { width: 146px; height: 74px; transform: rotateY(180deg) translateZ(49px); }
.fs-gabarit-archives_kraft .fs-face-left   { width: 98px;  height: 74px; left: 24px; transform: rotateY(-90deg) translateZ(73px); }
.fs-gabarit-archives_kraft .fs-face-right  { width: 98px;  height: 74px; left: 24px; transform: rotateY(90deg) translateZ(73px); }
.fs-gabarit-archives_kraft .fs-face-bottom { width: 146px; height: 98px; top: -12px; transform: rotateX(-90deg) translateZ(37px); background: #78532a; }
.fs-gabarit-archives_kraft .fs-face-top    { width: 146px; height: 98px; top: -12px; transform: rotateX(90deg) translateZ(37px); background: #291c0e; overflow: visible; }
.fs-gabarit-archives_kraft .fs-lid-face {
 background: linear-gradient(145deg, #e2c298 0%, #c89f6d 60%, #a87d4b 100%);
 border: 1px solid rgba(254, 243, 199, 0.35);
}

/* 7. SHADOW BOX BOIS NATUREL (cadre profond bois clair + fente + vitre) */
.fs-gabarit-shadowbox_wood .fs-box-3d { width: 108px; height: 126px; margin-top: 2px; }
.fs-gabarit-shadowbox_wood .fs-face {
 border-radius: 3px;
 background: linear-gradient(155deg, #dfb88c 0%, #c69663 55%, #a37240 100%);
 border: 1px solid #ebd0b0;
 box-shadow: inset 0 0 10px rgba(69, 39, 12, 0.28);
 color: #3b230c;
}
.fs-gabarit-shadowbox_wood .fs-face-front  { width: 108px; height: 126px; padding: 8px; transform: rotateY(0deg) translateZ(17px); }
.fs-gabarit-shadowbox_wood .fs-face-back   { width: 108px; height: 126px; padding: 8px; transform: rotateY(180deg) translateZ(17px); }
.fs-gabarit-shadowbox_wood .fs-face-left   { width: 34px;  height: 126px; left: 37px; padding: 4px; transform: rotateY(-90deg) translateZ(54px); }
.fs-gabarit-shadowbox_wood .fs-face-right  { width: 34px;  height: 126px; left: 37px; padding: 4px; transform: rotateY(90deg) translateZ(54px); }
.fs-gabarit-shadowbox_wood .fs-face-top    { width: 108px; height: 34px;  top: 46px; padding: 2px; transform: rotateX(90deg) translateZ(63px); }
.fs-gabarit-shadowbox_wood .fs-face-bottom { width: 108px; height: 34px;  top: 46px; transform: rotateX(-90deg) translateZ(63px); background: #8c5e31; }

/* APERÇU 3D EN DIRECT DANS LA MODALE DE CRÉATION */
#cbm-live-preview-stage {
 min-height: 175px;
 background: radial-gradient(circle at 50% 45%, rgba(245,158,11,0.14) 0%, rgba(2,6,23,0.92) 72%);
 border: 1px solid rgba(255,255,255,0.12);
 border-radius: 1.25rem;
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: center;
 padding: 12px;
 overflow: hidden;
}
#cbm-live-preview-stage .fs-box-stage {
 width: 180px;
 height: 145px;
 perspective: 820px;
 pointer-events: none;
}

/* TABLEAU SOMMAIRE FAÇON 1981 (REGISTRE DE BOÎTE) */
.fs-table-1981 {
 width: 100%;
 border-collapse: collapse;
 font-size: 12px;
 background: #0f172a;
 border: 2px solid #334155;
 border-radius: 0.75rem;
 overflow: hidden;
}
.fs-table-1981 th {
 background: #e2e8f0;
 color: #0f172a;
 font-weight: 800;
 padding: 8px 10px;
 border: 1px solid #475569;
 text-align: center;
}
.fs-table-1981 td {
 border: 1px solid #475569;
 padding: 6px 8px;
 vertical-align: middle;
 color: #0f172a;
 font-weight: 600;
}
.fs-1981-grid {
 display: grid;
 grid-template-columns: repeat(5, 20px);
 grid-template-rows: repeat(2, 18px);
 gap: 1px;
 background: #94a3b8;
 border: 1px solid #475569;
 width: fit-content;
 margin: 0 auto;
}
.fs-1981-grid-cell {
 background: #ffffff;
 display: flex;
 align-items: center;
 justify-content: center;
 font-size: 10px;
 font-weight: 900;
 color: #0f172a;
}
.fs-1981-grid-cell.is-hit {
 background: #fde68a;
 box-shadow: inset 0 0 0 1px #b45309;
}
.fs-1981-row-fete td.fs-1981-body    { background: #c7d2fe; }
.fs-1981-row-famille td.fs-1981-body { background: #fbcfe8; }
.fs-1981-row-vacances td.fs-1981-body{ background: #fef08a; }
.fs-1981-row-nature td.fs-1981-body  { background: #bbf7d0; }
.fs-1981-row-neutre td.fs-1981-body  { background: #f1f5f9; }



/* ========================================================================= */
/* V12 — VUE D'HOMME ARMOIRE CHÊNE 3D RÉALISTE, PILES 4×3, PARCHEMIN & DÉCOS */
/* ========================================================================= */
.fs-box-label-tag {
 display: inline-flex;
 align-items: center;
 gap: 4px;
 padding: 2px 7px;
 border-radius: 5px;
 background: #fef3c7;
 color: #0f172a;
 border: 1px solid #d97706;
 font-size: 9px;
 font-weight: 800;
 max-width: 100%;
 box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.fs-oak-cabinet-3d-scene {
 perspective: 1850px;
 width: 100%;
 padding: 8px 4px 24px;
}

.fs-oak-cabinet-3d-body {
 position: relative;
 transform-style: preserve-3d;
 transform: rotateX(1.2deg);
 background: linear-gradient(180deg, #b88454 0%, #8c5a2b 52%, #6b421d 100%);
 border: 14px solid #754922;
 border-top-width: 20px;
 border-bottom-width: 24px;
 border-radius: 18px;
 box-shadow:
  0 32px 75px rgba(0, 0, 0, 0.82),
  inset 0 0 65px rgba(24, 12, 4, 0.76),
  inset 0 4px 14px rgba(255, 237, 213, 0.28);
 padding: 16px 16px 10px;
 transition: all 0.35s ease;
}

/* Panneau arrière chêne texturé */
.fs-oak-cabinet-3d-body::before {
 content: '';
 position: absolute;
 inset: 0;
 background:
  repeating-linear-gradient(90deg, rgba(255,255,255,0.035) 0px, rgba(255,255,255,0.035) 3px, transparent 3px, transparent 22px),
  radial-gradient(ellipse at 50% 12%, rgba(254, 243, 199, 0.16), transparent 72%);
 pointer-events: none;
 border-radius: 6px;
}

/* Portes chêne latérales entrouvertes (Vue d'homme sans personnage ni pancarte) */
.fs-oak-door-wing {
 position: absolute;
 top: -12px;
 bottom: -12px;
 width: 18px;
 background: linear-gradient(180deg, #a87444 0%, #7c4d25 50%, #5c3616 100%);
 border: 2px solid #4a2a10;
 box-shadow: 0 12px 28px rgba(0,0,0,0.7);
 pointer-events: none;
 z-index: 25;
}
.fs-oak-door-wing.left {
 left: -24px;
 border-radius: 8px 0 0 8px;
 transform: rotateY(22deg);
}
.fs-oak-door-wing.right {
 right: -24px;
 border-radius: 0 8px 8px 0;
 transform: rotateY(-22deg);
}

.fs-oak-hinge {
 position: absolute;
 width: 10px;
 height: 34px;
 background: linear-gradient(180deg, #e2e8f0, #64748b, #cbd5e1);
 border-radius: 3px;
 box-shadow: 0 2px 5px rgba(0,0,0,0.6);
 z-index: 26;
 pointer-events: none;
}
.fs-oak-hinge.tl { top: 34px; left: -6px; }
.fs-oak-hinge.bl { bottom: 34px; left: -6px; }
.fs-oak-hinge.tr { top: 34px; right: -6px; }
.fs-oak-hinge.br { bottom: 34px; right: -6px; }

/* Étagère 3D adaptative (allonge l'armoire selon le nombre et le type de boîtes) */
.fs-oak-shelf-3d {
 position: relative;
 transform-style: preserve-3d;
 background: linear-gradient(180deg, rgba(35, 20, 9, 0.42) 0%, rgba(20, 11, 4, 0.65) 100%);
 border-radius: 12px;
 padding: 12px 10px 8px;
 margin-bottom: 4px;
 transition: min-height 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.fs-oak-shelf-3d.is-tall-shelf {
 min-height: 295px;
}
.fs-oak-shelf-3d.is-compact-shelf {
 min-height: 245px;
}
.fs-oak-shelf-3d.is-zoomed-shelf {
 transform: translateZ(34px) scale(1.015);
 box-shadow: 0 0 38px rgba(56, 189, 248, 0.35);
 z-index: 30;
}

/* Planche de chêne massif */
.fs-oak-plank-3d {
 height: 20px;
 margin: 0 -4px 16px;
 border-radius: 5px;
 background: linear-gradient(180deg, #deb384 0%, #a87444 32%, #6d4420 100%);
 border-top: 2px solid rgba(254, 243, 199, 0.48);
 box-shadow:
  0 12px 24px rgba(0, 0, 0, 0.82),
  inset 0 -3px 6px rgba(24, 12, 4, 0.6);
 position: relative;
 display: flex;
 align-items: center;
 justify-content: space-between;
 padding: 0 12px;
 z-index: 15;
}

/* 4 Colonnes par étagère (4 piles de 3 noyer / Shadow Box / 2 archives empilées) */
.fs-oak-cols-4 {
 display: grid;
 grid-template-columns: repeat(4, minmax(0, 1fr));
 gap: 12px;
 align-items: end;
}
@media (max-width: 1180px) {
 .fs-oak-cols-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
 }
}
@media (max-width: 640px) {
 .fs-oak-cols-4 {
  grid-template-columns: 1fr;
 }
}

.fs-oak-stack-slot {
 min-height: 215px;
 border-radius: 12px;
 border: 1.5px dashed rgba(254, 243, 199, 0.22);
 background: rgba(15, 10, 5, 0.26);
 padding: 8px 6px 6px;
 display: flex;
 flex-direction: column-reverse;
 align-items: center;
 justify-content: flex-start;
 gap: 6px;
 transition: border-color 0.2s ease, background-color 0.2s ease;
}
.fs-oak-stack-slot.is-drag-over {
 border-color: #38bdf8;
 background: rgba(56, 189, 248, 0.16);
}

/* Petites décos dans les emplacements vides */
.fs-empty-slot-deco {
 width: 100%;
 min-height: 165px;
 display: flex;
 flex-direction: column;
 align-items: center;
 justify-content: flex-end;
 padding-bottom: 8px;
 opacity: 0.92;
 pointer-events: none;
 user-select: none;
}
.fs-empty-deco-badge {
 display: inline-flex;
 flex-direction: column;
 align-items: center;
 gap: 4px;
 padding: 10px 14px;
 border-radius: 14px;
 background: rgba(254, 243, 199, 0.08);
 border: 1px solid rgba(254, 243, 199, 0.18);
 color: #fde68a;
 box-shadow: 0 8px 18px rgba(0,0,0,0.35);
}

/* Unité boîte 3D empilée + parchemin fermé / déroulable en cascade */
.fs-stacked-3d-unit {
 width: 100%;
 display: flex;
 flex-direction: column;
 align-items: center;
 transform-style: preserve-3d;
 cursor: grab;
 transition: transform 0.22s ease;
}
.fs-stacked-3d-unit:active {
 cursor: grabbing;
}
.fs-stacked-3d-unit .fs-box-item {
 width: 100%;
 max-width: 210px;
 padding: 2px 2px 2px;
}
/* Masquer la zone d'actions statique par défaut pour la remplacer par le parchemin fermé/déroulable */
.fs-stacked-3d-unit .fs-box-item > .text-center.space-y-1 {
 display: none !important;
}
.fs-stacked-3d-unit.is-compact-stack .fs-box-stage {
 height: 106px !important;
 transform: scale(0.74);
 transform-origin: center bottom;
 margin-top: -20px;
}

/* Rouleau de parchemin fermé sous chaque boîte 3D */
.fs-parchment-wrap {
 width: 100%;
 max-width: 210px;
 margin-top: -4px;
 z-index: 12;
}
.fs-parchment-roll-bar {
 width: 100%;
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 6px;
 padding: 5px 10px;
 border-radius: 999px;
 background: linear-gradient(180deg, #f6e7c8 0%, #e4c998 55%, #c9a468 100%);
 border: 1px solid #8c5a2b;
 box-shadow: 0 4px 10px rgba(0, 0, 0, 0.55), inset 0 1px 2px rgba(255, 255, 255, 0.7);
 color: #2b1808;
 font-size: 10px;
 font-weight: 800;
 cursor: pointer;
 transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.fs-parchment-roll-bar:hover {
 transform: translateY(-1px);
 box-shadow: 0 6px 14px rgba(0, 0, 0, 0.65);
}
.fs-parchment-sheet {
 margin-top: 3px;
 padding: 8px 9px;
 border-radius: 8px 8px 12px 12px;
 background: linear-gradient(180deg, #fbf1dc 0%, #eed7ad 100%);
 border: 1px solid #9a6838;
 border-bottom: 4px solid #b8874d;
 box-shadow: 0 10px 22px rgba(0, 0, 0, 0.65);
 color: #261507;
 font-size: 10px;
 animation: fsParchmentUnroll 0.2s ease-out;
}
@keyframes fsParchmentUnroll {
 from { opacity: 0; transform: translateY(-6px) scaleY(0.88); }
 to { opacity: 1; transform: translateY(0) scaleY(1); }
}

/* ========================================================================= */
/* V16 — BOÎTES 3D HYPER-RÉALISTES (OMBRES PORTÉES, GRAIN & REFLETS LAITON)  */
/* ========================================================================= */
.fs-box-stage {
 filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.72));
}
.fs-box-cube {
 box-shadow:
  0 18px 34px rgba(0, 0, 0, 0.75),
  inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.fs-box-face {
 backface-visibility: hidden;
 box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.28);
}
.fs-box-face.front::after {
 content: '';
 position: absolute;
 inset: 0;
 background: linear-gradient(135deg, rgba(255,255,255,0.16) 0%, transparent 48%, rgba(0,0,0,0.22) 100%);
 pointer-events: none;
}
.fs-box-lid {
 box-shadow:
  0 8px 16px rgba(0, 0, 0, 0.58),
  inset 0 1px 2px rgba(255, 255, 255, 0.42);
}
.fs-brass-clasp, .fs-metal-corner {
 background: linear-gradient(145deg, #fef08a 0%, #d97706 52%, #78350f 100%) !important;
 box-shadow: 0 3px 6px rgba(0,0,0,0.6), inset 0 1px 1px rgba(255,255,255,0.75);
}


/* ========================================================================= */
/* V25 — ANTI-DÉBORDEMENT ARMOIRE CHÊNE 3D SUR MOBILE (ANDROID & IPHONE)     */
/* ========================================================================= */
@media (max-width: 767px) {
 .fs-oak-cabinet-3d-scene {
  padding: 4px 0 16px !important;
  overflow: hidden;
 }
 .fs-oak-cabinet-3d-body {
  border-width: 6px !important;
  border-top-width: 10px !important;
  border-bottom-width: 12px !important;
  padding: 10px 8px 8px !important;
  transform: none !important;
 }
 .fs-oak-door-wing,
 .fs-oak-hinge {
  display: none !important;
 }
 .fs-oak-shelf-3d.is-tall-shelf,
 .fs-oak-shelf-3d.is-compact-shelf {
  min-height: auto !important;
  padding: 8px 6px !important;
 }
 .fs-oak-stack-slot {
  min-height: auto !important;
 }
 .fs-oak-stack-slot.is-empty-mobile-hide {
  display: none !important;
 }
}
