/* tool-masinfo.css — Faceasit iPad tool info page — responsive */

:root {
    --hdr-bg:  #990033;
    --dark:    #172D22;
    --mid:     #2C6048;
    --blue:    #007ABC;
    --gold:    #C8A030;
    --bg:      #F7F4EE;
    --imgbg:   #EEE9DF;
    --text:    #1C1C1C;
    --muted:   #5C5C5C;
    --border:  #D4CEC5;
    --hdr:     58px;
    --nav:     48px;
    --left:    clamp(300px, 38vw, 500px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    height: 100%;
    overflow: hidden;
}
body {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Fira Sans', Arial, sans-serif;
    background: var(--dark);
    -webkit-text-size-adjust: none;
}

/* ---- HEADER ---- */
.hdr {
    padding: 5px 0;
}
.hdr-num {
    font-size: 20px;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: "Georgia", serif;
    color: rgba(255,255,255,.75);
    margin-left: 10px;
    padding-right: 10px;
    border-right: 1px dotted #FFF;
    margin-right: 10px;
}
.hdr-sep {
    width: 1px;
    height: 22px;
    background: rgba(255,255,255,.3);
    flex-shrink: 0;
}
.hdr-name {
    font-size: clamp(14px, 1.6vw, 18px);
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
    max-width: clamp(200px, 38vw, 520px);
}
.hdr-tagline {
    font-size: clamp(20px, 1.1vw, 20px);
    font-weight: 300;
    font-style: italic;
    color: rgb(255, 206, 90);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: "Story Script", sans-serif;
    right: 10px;
    position: absolute;
    letter-spacing: 1px;
}

/* ---- MAIN 2-COLUMN ---- */
.main {
    display: flex;
    width: 100%;
    flex: 1;
    min-height: 0;
    position: relative;
    overflow: hidden;
    /* left padding reserves space for the absolute image panel */
    padding-left: var(--left);
}

/* ---- LEFT: IMAGE PANEL (absolute, slides right like a drawer) ---- */
.panel-img {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: var(--left);
    background: var(--imgbg);
    overflow: hidden;
    border-right: 1px solid #C8BFB0;
    cursor: zoom-in;
    z-index: 2;
    transition: width 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}
/* Open state: drawer slides right over the text panel */
.panel-img.open {
    width: 100%;
    border-right: none;
    cursor: zoom-out;
}
#toolImg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left top;
    display: block;
    transition: opacity .22s ease;
}
/* When open: show the full image */
.panel-img.open #toolImg {
    object-fit: contain;
    object-position: center center;
}
#toolImg.fade { opacity: 0; }

/* ---- RIGHT: CONTENT PANEL ---- */
.panel-txt {
    flex: 1;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* Each block hidden by default */
.block-wrap {
    display: none;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}
.block-wrap.active { display: flex; }

/* Label bar */
.block-lbl {
    flex-shrink: 0;
    height: 40px;
    padding: 0 16px;
    background: #EDE8DF;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}
.lbl-tag {
    display: inline-block;
    color: #990033;
    font-size: clamp(1.7rem, 1vw, 12px);
    letter-spacing: .9px;
    font-family: "Story Script", sans-serif;
}
.lbl-pos {
    margin-left: auto;
    font-size: 11px;
    color: var(--muted);
    letter-spacing: .5px;
}

/* Reclamo encadré — premier bloc uniquement */
.reclamo-box {
    background: #fff8ee;
    border-left: 4px solid var(--gold);
    border-radius: 0 6px 6px 0;
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: clamp(12px, 1.25vw, 14px);
    font-weight: 400;
    font-style: italic;
    line-height: 1.6;
    color: #4A3010;
}

/* Text content */
.block-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: clamp(12px, 1.5vh, 20px) clamp(14px, 2vw, 24px);
}
.block-body p {
    font-size: clamp(13px, 1.35vw, 15px);
    font-weight: 400;
    line-height: 1.70;
    color: var(--text);
    margin-bottom: 10px;
}
.block-body p:first-of-type {font-weight: 500;}
.block-body p:last-child { margin-bottom: 0; }
.block-body a {
    color: var(--blue);
    text-decoration: underline;
    word-break: break-all;
}

/* Footnote */
.block-note {
    flex-shrink: 0;
    padding: 8px 18px;
    background: #EEEAE1;
    border-top: 1px solid var(--border);
}
.block-note p {
    font-size: clamp(10px, 1.1vw, 12px);
    font-weight: 400;
    font-style: italic;
    line-height: 1.5;
    color: var(--muted);
    margin: 0;
}

/* ---- NAVIGATION ---- */
.nav {
    width: 100%;
    height: var(--nav);
    background: #101E16;
    border-top: 1px solid #243B2C;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    flex-shrink: 0;
}
.nav-btn {
    background: #007abc;
    border: 1px solid rgba(255,255,255,.6);
    color: rgba(255,255,255,.85);
    font-family: 'Fira Sans', sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    padding: 5px 18px;
    border-radius: 6px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background .14s, border-color .14s;
}
.nav-btn:active:not(:disabled) { background: var(--mid); border-color: var(--mid); }
.nav-btn:disabled { opacity: .2; cursor: default; }
.nav-ctr {
    font-size: 12px;
    font-weight: 300;
    color: rgba(255,255,255,.5);
    letter-spacing: 1.5px;
    min-width: 60px;
    text-align: center;
}

/* ---- ERROR STATE ---- */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    background: var(--bg);
    color: var(--muted);
    gap: 14px;
}
.error-page .icon { font-size: 42px; }
.error-page .msg  { font-size: 15px; font-weight: 400; }
