/* =========================================================================
   insolites.net — Refonte 2026
   Theme: cabinet de curiosités, vintage chaleureux
   (terracotta + crème + vert sauge), Playfair Display + Inter
   Mobile-first. Layout 2-col mobile / 3-col desktop.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,700;0,800;1,400;1,600&family=Inter:wght@400;500;600;700&display=swap');

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

:root {
    --terra: #b8593a;
    --terra-dark: #8e3f25;
    --terra-soft: #d4836a;
    --cream: #f5ecd9;
    --cream-dark: #e8dcc1;
    --paper: #fbf6e9;
    --sage: #5b7a5b;
    --sage-dark: #3f5a3f;
    --ink: #2a201a;
    --ink-soft: #594a3e;
    --ink-mid: #8a7a6c;
    --gold: #c89940;
    --rule: #d8c8a8;
    --rule-soft: #e6d9bf;
    --shadow: 4px 4px 0 rgba(184, 89, 58, .12);
    --shadow-lg: 6px 6px 0 rgba(184, 89, 58, .18);
    --top-h: 64px;
    --cta-h: 64px;
}

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    padding: var(--top-h) 0 calc(var(--cta-h) + env(safe-area-inset-bottom)) 0;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--cream);
    background-image:
        repeating-linear-gradient(45deg, rgba(184,89,58,.025) 0 1px, transparent 1px 60px),
        repeating-linear-gradient(-45deg, rgba(91,122,91,.02) 0 1px, transparent 1px 80px);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; border: 0; }

a { color: var(--terra); text-decoration: none; }
a:hover { color: var(--terra-dark); text-decoration: underline; text-underline-offset: 4px; }
a:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; border-radius: 2px; }

p { margin: 0 0 1em; }

h1, h2, h3, h4, h5 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.15;
    margin: 0 0 .55em;
    letter-spacing: -.005em;
}
h1 { font-size: clamp(2rem, 6vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4.5vw, 2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; font-weight: 700; }
h5 { font-size: .95rem; font-weight: 600; }

.text-muted { color: var(--ink-soft) !important; }

/* ---- Wrap ---- */
.ins-wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 14px;
}
@media (min-width: 768px) {
    .ins-wrap { padding: 24px 28px; }
}

/* ---- Top bar ---- */
.ins-top {
    position: fixed; top: 0; left: 0; right: 0; height: var(--top-h);
    background: var(--paper);
    border-bottom: 2px solid var(--terra);
    z-index: 50;
    display: flex; align-items: center;
    padding: 0 16px;
    box-shadow: 0 4px 12px rgba(184, 89, 58, .08);
}
.ins-top__menu {
    background: transparent;
    border: 2px solid var(--ink);
    color: var(--ink);
    width: 44px; height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; padding: 0;
    font-size: 1.05rem;
    transition: all .15s ease;
}
.ins-top__menu:hover {
    background: var(--terra);
    color: var(--paper);
    border-color: var(--terra);
}
.ins-top__brand {
    flex: 1; text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--ink);
    text-decoration: none;
    font-style: italic;
    letter-spacing: -.01em;
}
.ins-top__brand:hover { color: var(--terra); text-decoration: none; }
.ins-top__brand span {
    display: inline-block;
    color: var(--terra);
    margin-right: 4px;
}
.ins-top__heart {
    background: transparent;
    border: 0;
    color: var(--terra);
    width: 44px; height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
}

/* ---- Left drawer ---- */
.ins-drawer {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: min(320px, 86vw);
    background: var(--paper);
    border-right: 2px solid var(--terra);
    transform: translateX(-105%);
    transition: transform .3s cubic-bezier(.5,.05,.25,1);
    z-index: 70;
    overflow-y: auto;
    padding: 28px 24px 32px;
    box-shadow: 6px 0 24px rgba(0,0,0,.18);
}
.ins-drawer.open { transform: translateX(0); }
.ins-drawer__close {
    position: absolute; top: 14px; right: 14px;
    background: transparent;
    border: 2px solid var(--ink);
    width: 38px; height: 38px;
    color: var(--ink); cursor: pointer;
    font-size: 1rem;
}
.ins-drawer h4 {
    font-family: 'Playfair Display', serif;
    color: var(--terra);
    font-size: 1.1rem;
    font-style: italic;
    margin: 18px 0 10px;
    border-bottom: 1px dashed var(--terra-soft);
    padding-bottom: 6px;
}
.ins-drawer a {
    display: block;
    color: var(--ink);
    padding: 10px 0 10px 0;
    font-size: .98rem;
    font-weight: 500;
    border-bottom: 1px solid var(--rule-soft);
    text-decoration: none;
    min-height: 44px;
}
.ins-drawer a:hover {
    color: var(--terra);
    padding-left: 8px;
    background: var(--cream-dark);
}
.ins-drawer__overlay {
    position: fixed; inset: 0;
    background: rgba(42, 32, 26, .5);
    opacity: 0; pointer-events: none;
    transition: opacity .2s ease;
    z-index: 65;
}
.ins-drawer__overlay.show { opacity: 1; pointer-events: auto; }

/* ---- Sticky bottom CTA ---- */
.ins-bottom-cta {
    position: fixed;
    bottom: env(safe-area-inset-bottom);
    left: 0; right: 0;
    height: var(--cta-h);
    background: var(--terra);
    color: var(--paper) !important;
    text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-style: italic;
    font-weight: 600;
    text-decoration: none !important;
    border-top: 2px solid var(--terra-dark);
    z-index: 50;
    display: flex; align-items: center; justify-content: center;
    gap: 10px;
    box-shadow: 0 -4px 16px rgba(184, 89, 58, .25);
}
.ins-bottom-cta:hover {
    background: var(--terra-dark);
    color: var(--paper) !important;
    text-decoration: none !important;
}

/* ---- Categories strip (top of listing) ---- */
.ins-cat-strip {
    margin: 0 -14px 18px;
    padding: 0 14px 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-bottom: 1px solid var(--rule);
    display: flex; gap: 6px;
    white-space: nowrap;
}
.ins-cat-strip::-webkit-scrollbar { display: none; }
.ins-cat-strip a {
    flex: 0 0 auto;
    padding: 8px 14px;
    background: var(--paper);
    border: 1px solid var(--rule);
    color: var(--ink);
    font-size: .88rem; font-weight: 600;
    text-decoration: none;
    transition: all .15s ease;
}
.ins-cat-strip a:hover {
    background: var(--terra);
    color: var(--paper);
    border-color: var(--terra);
    text-decoration: none;
}

/* ---- Card grid (masonry-like, 2 cols mobile, 3 desktop) ---- */
.ins-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (min-width: 720px) {
    .ins-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; }
}
@media (min-width: 1024px) {
    .ins-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---- Card (vintage frame) ---- */
.ins-card {
    background: var(--paper);
    border: 1px solid var(--rule);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform .15s ease, box-shadow .2s ease;
    display: flex; flex-direction: column;
    position: relative;
}
.ins-card:hover {
    transform: translateY(-3px) rotate(-.4deg);
    box-shadow: var(--shadow-lg);
}
.ins-card:nth-child(3n+2):hover { transform: translateY(-3px) rotate(.4deg); }
.ins-card__media {
    aspect-ratio: 4 / 5;
    background: var(--cream-dark);
    overflow: hidden;
    border-bottom: 1px solid var(--rule);
}
.ins-card__media img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .5s ease;
}
.ins-card:hover .ins-card__media img { transform: scale(1.05); }
.ins-card__body {
    padding: 12px 14px 10px;
    flex: 1;
    display: flex; flex-direction: column;
}
.ins-card__title {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--ink);
    margin: 0 0 4px;
    word-wrap: break-word;
}
.ins-card__meta {
    font-size: .78rem;
    color: var(--ink-soft);
    margin: 0 0 8px;
    font-style: italic;
}
.ins-card__loc {
    font-size: .78rem;
    color: var(--terra);
    margin: 0 0 8px;
    font-weight: 600;
}
.ins-card__desc {
    color: var(--ink-soft);
    font-size: .85rem; line-height: 1.45;
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.ins-card__cta {
    display: block;
    margin: 0 14px 14px;
    padding: 10px 14px;
    background: var(--sage);
    color: var(--paper) !important;
    text-align: center;
    font-weight: 600;
    font-size: .82rem;
    text-decoration: none !important;
    transition: background .15s ease;
    min-height: 38px;
    letter-spacing: .02em;
}
.ins-card__cta:hover { background: var(--sage-dark); color: var(--paper) !important; }

/* sponsored variant */
.ins-card--sponsored {
    border: 1px dashed var(--terra);
    background: var(--cream);
}
.ins-card--sponsored .ins-card__title { color: var(--terra-dark); }

/* ---- Detail page ---- */
.ins-detail {
    background: var(--paper);
    border: 1px solid var(--rule);
    box-shadow: var(--shadow-lg);
    margin: 0 0 22px;
}
.ins-detail__breadcrumb {
    padding: 14px 18px;
    color: var(--ink-mid);
    font-size: .82rem;
    border-bottom: 1px solid var(--rule-soft);
}
.ins-detail__breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.ins-detail__breadcrumb a:hover { color: var(--terra); text-decoration: underline; }

.ins-detail__main {
    display: grid; grid-template-columns: 1fr; gap: 0;
}
@media (min-width: 768px) {
    .ins-detail__main { grid-template-columns: 1fr 1fr; }
}

.ins-detail__media {
    background: var(--cream-dark);
    overflow: hidden;
    aspect-ratio: 4 / 5;
}
.ins-detail__media img { width: 100%; height: 100%; object-fit: cover; }

.ins-detail__panel {
    padding: 22px 20px;
    border-top: 1px solid var(--rule-soft);
}
@media (min-width: 768px) {
    .ins-detail__panel { border-top: 0; border-left: 1px solid var(--rule-soft); }
}

.ins-detail__eyebrow {
    color: var(--terra);
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1rem;
    margin: 0 0 6px;
}
.ins-detail__title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    margin: 0 0 12px;
}
.ins-detail__meta {
    color: var(--ink-soft);
    font-size: .95rem;
    margin: 0 0 14px;
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--rule);
}
.ins-detail__meta strong { color: var(--terra); }

.ins-detail__desc {
    background: var(--cream);
    border-left: 3px solid var(--terra);
    padding: 16px 18px;
    color: var(--ink);
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-style: italic;
    line-height: 1.65;
    margin: 18px 0;
    word-wrap: break-word; overflow-wrap: break-word;
}
.ins-detail__desc em { font-style: italic; }

.ins-detail__date {
    color: var(--ink-mid);
    font-size: .85rem;
    margin: 8px 0 14px;
}

.ins-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 18px; }
.ins-tags a.hashtag {
    display: inline-block;
    background: var(--cream-dark);
    color: var(--terra-dark);
    padding: 5px 10px;
    border: 1px solid var(--terra-soft);
    font-size: .78rem;
    font-weight: 600;
    text-decoration: none;
}
.ins-tags a.hashtag:hover { background: var(--terra); color: var(--paper); }

.ins-gallery {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 6px; margin: 14px 0;
}
.ins-gallery a img {
    width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
    border: 1px solid var(--rule);
}

/* ---- Buttons ---- */
.btn-success, a.btn-success {
    background: var(--sage);
    color: var(--paper) !important;
    border: 0;
    padding: 12px 20px;
    font-weight: 600;
    font-size: .95rem;
    text-decoration: none !important;
    cursor: pointer;
    min-height: 44px;
    display: inline-block;
    transition: background .15s ease;
    border-radius: 0;
}
.btn-success:hover { background: var(--sage-dark); color: var(--paper) !important; }
.btn-block { display: block; width: 100%; }

.ins-btn-terra {
    background: var(--terra);
    color: var(--paper) !important;
    border: 0;
    padding: 12px 20px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    min-height: 44px;
    display: inline-block;
    transition: background .15s ease;
}
.ins-btn-terra:hover { background: var(--terra-dark); color: var(--paper) !important; }

/* ---- Pagination ---- */
.ins-pagination {
    display: flex; flex-wrap: wrap; gap: 6px;
    justify-content: center;
    margin: 20px 0;
}
.ins-pagination a {
    min-width: 44px; min-height: 44px;
    padding: 0 14px;
    background: var(--paper);
    border: 1px solid var(--rule);
    color: var(--ink) !important;
    font-weight: 600; font-size: .92rem;
    display: inline-flex; align-items: center; justify-content: center;
    text-decoration: none !important;
}
.ins-pagination a:hover { border-color: var(--terra); color: var(--terra) !important; }
.ins-pagination a.btn-success {
    background: var(--terra);
    color: var(--paper) !important;
    border-color: var(--terra);
}

/* ---- Footer ---- */
.ins-foot {
    margin-top: 28px;
    padding: 28px 0 22px;
    border-top: 2px solid var(--terra-soft);
}
.ins-foot__grid {
    display: grid; grid-template-columns: 1fr; gap: 18px;
    margin-bottom: 22px;
}
@media (min-width: 720px) {
    .ins-foot__grid { grid-template-columns: 1fr 1fr 1fr; gap: 22px; }
}
@media (min-width: 1024px) {
    .ins-foot__grid { grid-template-columns: repeat(3, 1fr); }
}
.ins-foot__col {
    background: var(--paper);
    border: 1px solid var(--rule);
    padding: 18px 20px;
}
.ins-foot__col h2 {
    font-size: 1.15rem;
    color: var(--terra-dark);
    border-bottom: 1px solid var(--terra-soft);
    padding-bottom: 8px;
    margin-bottom: 12px;
}
.ins-foot__col ul { list-style: none; padding: 0; margin: 0; }
.ins-foot__col ul li { padding: 5px 0; border-bottom: 1px dashed var(--rule-soft); }
.ins-foot__col ul li:last-child { border-bottom: 0; }
.ins-foot__col ul li a { color: var(--ink-soft); font-size: .92rem; }
.ins-foot__col ul li a:hover { color: var(--terra); }

.ins-pub {
    background: var(--cream-dark);
    border: 1px dashed var(--sage);
    padding: 14px;
    margin: 18px 0;
    text-align: center;
}
.ins-pub h4 {
    color: var(--sage);
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1rem;
    margin: 0 0 10px;
}

.ins-credits {
    text-align: center;
    color: var(--ink-mid);
    font-size: .82rem;
    padding: 18px 0 10px;
    font-style: italic;
}
.ins-credits a { color: var(--terra); }

/* ---- Conditions / generic prose ---- */
.ins-prose {
    background: var(--paper);
    border: 1px solid var(--rule);
    padding: 28px 22px;
    line-height: 1.75;
    box-shadow: var(--shadow);
}
.ins-prose h1, .ins-prose h3 {
    color: var(--terra-dark);
    border-bottom: 1px dashed var(--terra-soft);
    padding-bottom: 8px;
    margin-bottom: 16px;
}
.ins-prose h4 {
    color: var(--ink);
    margin-top: 22px;
    font-family: 'Playfair Display', serif;
    font-style: italic;
}

/* ---- Helpers ---- */
.text-center { text-align: center; }
.bottombar { display: none; }
.float_l_image, .float_m_image { display: contents; }
.image-gallery { border-radius: 0; }
.clipzone, .clipzone2 { display: contents; }

@media (max-width: 480px) {
    h1 { font-size: 1.7rem; }
    .ins-card__title { font-size: 1rem; }
    .ins-card__media { aspect-ratio: 3 / 4; }
}
