/*
 * rencontre-ephemere.com — Refonte mobile "Polaroid instant"
 *
 * Paradigme UNIQUE à ce site (anti-fingerprint cross-domain).
 * Préfixe `rce-plr-` exclusif. Palette blanc photo + sépia + brun cuir.
 *
 * Inspiration : photo polaroid instantanée — bordure blanche épaisse en bas
 * avec légende manuscrite. Mobile-first overlay qui neutralise les
 * anti-patterns BS3 (.navbar-toggler legacy, dropdowns cassés).
 *
 * Refonte 2026-05-02 — pas de mutualisation _common/.
 */

:root {
    --rce-plr-photo:    #fafaf6;
    --rce-plr-photo-2:  #efeae0;
    --rce-plr-sepia:    #b8896f;
    --rce-plr-sepia-d:  #7a4f3a;
    --rce-plr-corner:   #c19872;
    --rce-plr-ink:      #2a1a14;
    --rce-plr-stamp:    #c43d3d;
}

/* ============================================================
   MOBILE OVERLAY — neutralise les anti-patterns BS3/BS4
   ============================================================ */
@media (max-width: 767.98px) {
    body[data-site="rencontre-ephemere"] {
        font-size: clamp(15px, 4vw, 17px);
        background: var(--rce-plr-photo-2);
        color: var(--rce-plr-ink);
        font-family: "Georgia", "Times New Roman", serif;
    }
    body[data-site="rencontre-ephemere"] * { box-sizing: border-box; }

    /* Hide BS collapse navbar on mobile — replaced by bottom-nav */
    body[data-site="rencontre-ephemere"] #navbarSupportedContent,
    body[data-site="rencontre-ephemere"] .navbar-toggler { display: none !important; }

    /* Tighten top navbar */
    body[data-site="rencontre-ephemere"] .navbar {
        background: var(--rce-plr-photo) !important;
        border-bottom: 3px solid var(--rce-plr-sepia);
        padding: 8px 14px;
        min-height: 60px;
    }
    body[data-site="rencontre-ephemere"] .navbar-brand,
    body[data-site="rencontre-ephemere"] h1.navbar-brand {
        color: var(--rce-plr-ink) !important;
        font-family: "Caveat", "Bradley Hand", cursive;
        font-weight: 700;
        font-size: 22px;
        letter-spacing: .02em;
    }

    /* Touch targets ≥ 44px */
    body[data-site="rencontre-ephemere"] a,
    body[data-site="rencontre-ephemere"] .btn,
    body[data-site="rencontre-ephemere"] button { min-height: 44px; }

    body[data-site="rencontre-ephemere"] .btn,
    body[data-site="rencontre-ephemere"] .btn-default {
        background: var(--rce-plr-photo);
        border: 1.5px solid var(--rce-plr-sepia-d);
        color: var(--rce-plr-ink);
        border-radius: 0;
        padding: 10px 16px;
        font-family: "Caveat", cursive;
        font-size: 16px;
        box-shadow: 2px 2px 0 var(--rce-plr-sepia-d);
    }
    body[data-site="rencontre-ephemere"] .btn:active {
        box-shadow: 1px 1px 0 var(--rce-plr-sepia-d);
        transform: translate(1px, 1px);
    }

    /* Photo cards = polaroid framed */
    body[data-site="rencontre-ephemere"] .panel,
    body[data-site="rencontre-ephemere"] .card,
    body[data-site="rencontre-ephemere"] .thumbnail {
        background: var(--rce-plr-photo);
        padding: 8px 8px 26px;
        border: 0;
        box-shadow: 2px 4px 12px rgba(122, 79, 58, .35);
        margin-bottom: 18px;
        transform: rotate(-.4deg);
    }
    body[data-site="rencontre-ephemere"] .card:nth-child(even) {
        transform: rotate(.5deg);
    }
    body[data-site="rencontre-ephemere"] img { max-width: 100%; height: auto; display: block; }
    body[data-site="rencontre-ephemere"] table { display: block; overflow-x: auto; }
}

/* ============================================================
   BOTTOM-NAV "Polaroid instant" — fixed bottom on mobile
   ============================================================ */
.rce-plr-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 950;
    height: calc(76px + env(safe-area-inset-bottom, 0));
    padding-bottom: env(safe-area-inset-bottom, 0);
    background: var(--rce-plr-photo);
    border-top: 1px solid var(--rce-plr-photo-2);
    box-shadow: 0 -3px 12px rgba(122, 79, 58, .25);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 6px 6px 4px;
    gap: 4px;
}

.rce-plr-shot {
    flex: 1;
    max-width: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 3px 7px;
    background: var(--rce-plr-photo);
    color: var(--rce-plr-ink);
    text-decoration: none;
    font-family: "Caveat", "Bradley Hand", cursive;
    font-size: 12px;
    letter-spacing: .02em;
    font-weight: 700;
    border: 1px solid var(--rce-plr-photo-2);
    box-shadow: 1px 2px 4px rgba(122, 79, 58, .25);
    -webkit-tap-highlight-color: transparent;
    transition: transform .15s ease, box-shadow .15s ease;
    /* The little corner triangle stuck on top */
    position: relative;
}

.rce-plr-shot::before {
    content: "";
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 4px;
    background: var(--rce-plr-corner);
    opacity: .65;
}

.rce-plr-shot svg {
    width: 22px;
    height: 22px;
    stroke: var(--rce-plr-sepia-d);
    fill: none;
    stroke-width: 1.5;
    /* Sepia-toned image inside the polaroid */
    background: var(--rce-plr-photo-2);
    padding: 2px;
}

.rce-plr-shot:active {
    transform: rotate(-1.5deg) scale(.97);
}

.rce-plr-shot[aria-current="page"] {
    box-shadow: 2px 3px 8px rgba(196, 61, 61, .4);
    border-color: var(--rce-plr-stamp);
}
.rce-plr-shot[aria-current="page"] svg { stroke: var(--rce-plr-stamp); }
.rce-plr-shot[aria-current="page"] { color: var(--rce-plr-stamp); }

body.rce-plr-padded { padding-bottom: 96px; }

@media (min-width: 768px) {
    .rce-plr-bar { display: none; }
    body.rce-plr-padded { padding-bottom: 0; }
}
