/* =========================================================
   JNS Mockup Portfolio - mockup.css v1.3
   Frames : macbook, macbook-light, browser, iphone, iphone-light
========================================================= */

.jns-mockup-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 0;
    margin: 0;
}

.jns-mockup-stage {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    width: 100%;
}

.jns-mockup-device {
    flex: 1 1 auto;
    min-width: 0;
}

.jns-mockup-device {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}

/* =====================
   Couleur custom via attribut data-color
   ex: <div class="jns-mockup-wrap" data-color="#FF0000">
===================== */
.jns-mockup-wrap[data-color] .jns-mac-body,
.jns-mockup-wrap[data-color] .jns-mac-body-light {
    background: attr(data-color color, #434347);
}

/* Approche JS : classe jns-custom-color + var CSS --jns-color */
.jns-color-custom .jns-mac-body,
.jns-color-custom .jns-mac-body-light {
    background: var(--jns-color, #434347);
}
.jns-color-custom .jns-mac-keyboard,
.jns-color-custom .jns-mac-keyboard-light {
    background: var(--jns-color, #434347);
}
.jns-color-custom .jns-iphone-body,
.jns-color-custom .jns-iphone-body-light {
    border-color: var(--jns-color, #434347);
}
.jns-color-custom .jns-iphone-notch,
.jns-color-custom .jns-iphone-notch-light {
    background: var(--jns-color, #434347);
}
.jns-color-custom .jns-browser-bar {
    background: var(--jns-color, #f1f3f4);
}
.jns-color-custom .jns-browser-url {
    border-color: color-mix(in srgb, var(--jns-color, #dadce0) 70%, #000 30%);
}

/* =====================
   MACBOOK - base commune
   Ecran bord a bord dans un cadre arrondi,
   fine barre clavier en bas
===================== */

/* Sombre #434347 */
.jns-mac-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.jns-mac-body {
    width: 400px;
    background: #434347;
    border-radius: 12px 12px 0 0;
    padding: 8px 8px 0;
    box-sizing: border-box;
}

.jns-mac-body-light {
    width: 400px;
    background: #EEEEEE;
    border-radius: 12px 12px 0 0;
    padding: 8px 8px 0;
    box-sizing: border-box;
}

.jns-mac-camera-row {
    display: flex;
    justify-content: center;
    padding-bottom: 4px;
}

.jns-mac-camera {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2a2a2c;
}

.jns-mac-camera-light {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d0d0d0;
}

.jns-mac-screen {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 4px 4px 0 0;
    background: #000;
}

.jns-mac-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
}

/* Barre clavier fine */
.jns-mac-keyboard {
    width: 455px;
    height: 18px;
    background: #434347;
    border-radius: 1px 1px 8px 8px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.jns-mac-keyboard::after {
    content: '';
    width: 80px;
    height: 8px;
    background: #35353a;
    border-radius: 0 0 4px 4px;
}

.jns-mac-keyboard-light {
    width: 455px;
    height: 18px;
    background: #EEEEEE;
    border-radius: 1px 1px 8px 8px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.jns-mac-keyboard-light::after {
    content: '';
    width: 80px;
    height: 8px;
    background: #d8d8d8;
    border-radius: 0 0 4px 4px;
}

/* =====================
   BROWSER Chrome
===================== */
.jns-browser-wrap {
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    border: none;
    box-sizing: border-box;
}

.jns-browser-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f1f3f4;
    border-bottom: 1px solid #dadce0;
    height: 36px;
    box-sizing: border-box;
}

.jns-browser-dots {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

.jns-browser-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: block;
}

.jns-browser-dots span:nth-child(1) { background: #ff5f57; }
.jns-browser-dots span:nth-child(2) { background: #ffbd2e; }
.jns-browser-dots span:nth-child(3) { background: #28c840; }

.jns-browser-url {
    flex: 1;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 20px;
    padding: 2px 12px;
    font-size: 11px;
    line-height: 14px;
    color: #5f6368;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: sans-serif;
}

.jns-browser-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: default;
}

.jns-browser-menu:hover {
    background: #e8eaed;
}

.jns-browser-menu svg {
    display: block;
}

.jns-browser-screen {
    width: 100%;
    display: block;
    background: #fff;
    line-height: 0;
}

.jns-browser-screen img {
    width: 100%;
    height: auto;
    display: block;
}

/* Browser mobile : ratio portrait */
.jns-browser-wrap-mobile {
    width: 100%;
}

.jns-browser-screen-mobile {
    /* ratio libre - hauteur dictee par l'image */
}

/* Browser sombre */
.jns-browser-wrap-dark .jns-browser-bar {
    background: #2d2d2d;
    border-bottom-color: #444;
}

.jns-browser-wrap-dark .jns-browser-url {
    background: #3c3c3c;
    border-color: #555;
    color: #ccc;
}

.jns-browser-wrap-dark .jns-browser-menu svg circle {
    fill: #aaa;
}

.jns-browser-wrap-dark .jns-browser-screen {
    background: #1a1a1a;
}

/* Browser light : barre claire */
.jns-browser-wrap-light .jns-browser-bar {
    background: #f8f9fa;
    border-bottom-color: #e8eaed;
}

.jns-browser-wrap-light .jns-browser-url {
    background: #fff;
    border-color: #e8eaed;
}

/* =====================
   IPHONE - base commune
   Ecran bord a bord, cadre arrondi,
   encoche et barre home en overlay
===================== */

/* Sombre #434347 */
.jns-iphone-body {
    position: relative;
    width: 110px;
    border-radius: 20px;
    border: 6px solid #434347;
    overflow: hidden;
    background: #000;
    box-sizing: border-box;
}

/* Clair #EEEEEE */
.jns-iphone-body-light {
    position: relative;
    width: 110px;
    border-radius: 20px;
    border: 6px solid #EEEEEE;
    overflow: hidden;
    background: #000;
    box-sizing: border-box;
}

.jns-iphone-screen {
    width: 100%;
    aspect-ratio: 9 / 19.5;
    overflow: hidden;
    display: block;
}

.jns-iphone-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
}

/* Encoche sombre */
.jns-iphone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 45px;
    height: 8px;
    background: #434347;
    border-radius: 0 0 8px 8px;
    z-index: 3;
}

/* Encoche claire */
.jns-iphone-notch-light {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 45px;
    height: 8px;
    background: #EEEEEE;
    border-radius: 0 0 8px 8px;
    z-index: 3;
}

/* Barre home sombre */
.jns-iphone-home {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    background: rgb(0 0 0 / 40%);
    border-radius: 2px;
    z-index: 3;
}

/* Barre home claire */
.jns-iphone-home-light {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    background: rgba(100,100,100,0.4);
    border-radius: 2px;
    z-index: 3;
}

/* =====================
   Placeholder (erreur screenshot)
===================== */
.jns-mac-screen img[src*="default.png"],
.jns-browser-screen img[src*="default.png"],
.jns-iphone-screen img[src*="default.png"] {
    object-fit: none;
    object-position: center;
    opacity: 0.3;
}

/* =====================
   Meta (titre, desc, lien)
===================== */
.jns-mockup-meta {
    text-align: center;
}

.jns-mockup-titre {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 .4rem;
}

.jns-mockup-desc {
    font-size: .9rem;
    color: #666;
    margin: 0 0 .75rem;
}

.jns-mockup-btn {
    display: inline-block;
    padding: .45rem 1.1rem;
    border: 1px solid currentColor;
    border-radius: 4px;
    font-size: .85rem;
    text-decoration: none;
    transition: opacity .2s ease;
}

.jns-mockup-btn:hover { opacity: .7; }

/* =====================
   Responsive
===================== */
@media (max-width: 520px) {
    .jns-mac-body, .jns-mac-body-light { width: 260px; }
    .jns-mac-keyboard, .jns-mac-keyboard-light { width: 290px; }
    .jns-browser-wrap { width: 260px; }
    .jns-iphone-body, .jns-iphone-body-light { width: 80px; border-radius: 18px; border-width: 4px; }
    .jns-mockup-stage { gap: 1.5rem; }
}
