/* ==========================================================================
 *  REGARDS — listing + detail
 *  v3.3: FIX blancs récit + FIX blancs cartes + fonts locaux
 *  - Montserrat body
 *  - Titres Playfair Display
 *  - Violet royal pour récit
 *  ========================================================================== */

/* --------------------------------------------------------------------------
 *  0) FONTS (locaux — chemins confirmés par ton tree)
 *  -------------------------------------------------------------------------- */
@font-face{
    font-family:"Playfair Display";
    src:url("/assets/fonts/playfair/PlayfairDisplay-VariableFont_wght.ttf") format("truetype");
    font-weight: 400 900;
    font-style: normal;
    font-display: swap;
}
@font-face{
    font-family:"Playfair Display";
    src:url("/assets/fonts/playfair/PlayfairDisplay-Italic-VariableFont_wght.ttf") format("truetype");
    font-weight: 400 900;
    font-style: italic;
    font-display: swap;
}

/* --------------------------------------------------------------------------
 *  1) VARIABLES LIGHT
 *  -------------------------------------------------------------------------- */
:root{
    --c-pepite-orange:#ff6233;
    --c-pepite-violet:#8e44ad; /* violet royal récit */

    --c-bg:#f6f7fb;
    --c-surface:#ffffff;
    --c-text:#111827;
    --c-muted:#6b7280;
    --c-border:#e5e7eb;

    --c-radius:16px;
    --shadow-soft:0 10px 25px -5px rgba(0,0,0,.05);
    --shadow-card:0 18px 40px rgba(0,0,0,.10);

    /* Réhausse du récit, mais sans “hero trop haut” */
    --recit-min-h: 255px;     /* <-- un peu plus haut qu’avant */
    --recit-media-w: 395px;   /* largeur colonne image en desktop */
}

/* --------------------------------------------------------------------------
 *  2) VARIABLES DARK (comme ton système body[data-theme="dark"])
 *  -------------------------------------------------------------------------- */
body.regards-page-body[data-theme="dark"],
body.regards-detail-page[data-theme="dark"],
:root[data-theme="dark"] body.regards-page-body,
:root[data-theme="dark"] body.regards-detail-page{
    --c-bg:#0b1020;
    --c-surface:#111827;
    --c-text:#f3f4f6;
    --c-muted:#9ca3af;
    --c-border:rgba(255,255,255,.10);

    --shadow-soft:0 10px 25px -5px rgba(0,0,0,.35);
    --shadow-card:0 22px 55px rgba(0,0,0,.45);
}

/* --------------------------------------------------------------------------
 *  3) BODY / TYPO
 *  -------------------------------------------------------------------------- */
body.regards-page-body,
body.regards-detail-page{
    background:var(--c-bg)!important;
    color:var(--c-text);
    margin:0;
    min-height:100vh;
    font-family:"Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    transition:background-color .25s ease, color .25s ease;
}

body.regards-page-body a,
body.regards-detail-page a{
    text-decoration:none!important;
    color:inherit!important;
}

/*.section-title,
.pb-title,
.recit-title,
.detail-title,
body.regards-page-body h1,
body.regards-page-body h2,
body.regards-page-body h3,
/*body.regards-detail-page h1,
body.regards-detail-page h2,
body.regards-detail-page h3{
    font-family:"Playfair Display", Georgia, "Times New Roman", serif;
}
*/
/* --------------------------------------------------------------------------
 *  4) WRAPPER / CONTAINER
 *  -------------------------------------------------------------------------- */
.regards-page-wrapper{ padding:38px 0 80px; }
.regards-page-wrapper .container{
    max-width:1320px;
    margin:0 auto;
    padding:0 20px;
}

/* --------------------------------------------------------------------------
 *  5) CHIPS (filtres haut)
 *  -------------------------------------------------------------------------- */
.cat-filters{
    display:flex;
    justify-content:center;
    gap:10px;
    margin-bottom:16px;
    flex-wrap:wrap;
}
.chip{
    padding:9px 18px;
    border-radius:999px;
    border:1px solid var(--c-border);
    background:var(--c-surface);
    color:var(--c-text);
    font-weight:900;
    font-size:12px;
    text-transform:uppercase;
    cursor:pointer;
    box-shadow:var(--shadow-soft);
}
.chip.is-active{
    background:var(--c-pepite-orange);
    color:#fff;
    border-color:var(--c-pepite-orange);
    transform:translateY(-1px);
    box-shadow:0 10px 22px rgba(255,98,51,.22);
}

/* --------------------------------------------------------------------------
 *  6) LAYOUT (gouttière + main)
 *  -------------------------------------------------------------------------- */
.regards-layout{
    display:grid;
    grid-template-columns: 210px 1fr;
    gap:24px;
    align-items:start;
}

/* Sidebar */
.regards-sidebar{
    position:sticky;
    top:128px;
    align-self:start;
}
.sidebar-label{
    font-size:11px;
    letter-spacing:.08em;
    text-transform:uppercase;
    color:var(--c-muted);
    font-weight:900;
    margin:0 0 10px 6px;
}
.sidebar-hint{
    margin-top:12px;
    font-size:12px;
    color:var(--c-muted);
    line-height:1.45;
    padding:0 6px;
}

/* Toggle (desktop vertical) */
.regards-toggle{
    border:1px solid var(--c-border);
    background:var(--c-surface);
    border-radius:18px;
    box-shadow:var(--shadow-soft);
    padding:8px;
    display:flex;
    flex-direction:column;
    gap:8px;
}
.seg-btn{
    border:1px solid transparent;
    cursor:pointer;
    padding:11px 12px;
    border-radius:14px;
    background:transparent;
    color:var(--c-text);
    font-weight:950;
    font-size:12px;
    text-transform:uppercase;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}
.seg-count{
    font-size:11px;
    font-weight:950;
    padding:4px 9px;
    border-radius:999px;
    background:var(--c-bg);
    border:1px solid var(--c-border);
    color:var(--c-muted);
}
.seg-btn.is-active{
    background:var(--c-pepite-orange);
    color:#fff;
    box-shadow:0 10px 22px rgba(255,98,51,.18);
}
.seg-btn.is-active .seg-count{
    background:rgba(255,255,255,.18);
    border-color:rgba(255,255,255,.22);
    color:#fff;
}
.seg-btn.is-peek{ border-color: rgba(255,98,51,.35); }

/* IMPORTANT: le toggle “mobile” ne doit JAMAIS apparaître en desktop */
body.regards-page-body .regards-toggle-mobile{ display:none !important; }

/* Sections */
.regards-sections{ display:grid; gap:38px; }
.regards-section.is-hidden{ display:none!important; }

.section-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-end;
    gap:14px;
    margin:0 0 14px;
    padding:0 4px;
}
.section-title{
    margin:0;
    font-size:20px;
    font-weight:900;
    letter-spacing:-.02em;
}
.section-subtitle{
    margin:6px 0 0;
    color:var(--c-muted);
    font-size:13px;
    line-height:1.55;
    font-family:"Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
.section-count{
    min-width:42px;
    height:42px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:999px;
    border:1px solid var(--c-border);
    background:var(--c-surface);
    font-weight:1000;
    box-shadow:var(--shadow-soft);
}
.section-empty{
    padding:16px 18px;
    border:1px dashed var(--c-border);
    border-radius:16px;
    color:var(--c-muted);
    background:var(--c-surface);
}

/* --------------------------------------------------------------------------
 *  7) RÉCIT — FIX blanc sous image (vrai fix)
 *  - On NE fixe PAS height sur le média.
 *  - La row grid prend la hauteur du contenu.
 *  - Le média STRETCH la row, l’image remplit via absolute inset:0.
 *  -------------------------------------------------------------------------- */
.recit-feature{
    --accent: var(--c-pepite-violet);
    border-radius:20px;
    border:1px solid var(--c-border);
    background:var(--c-surface);
    overflow:hidden;
    box-shadow:var(--shadow-card);
    position:relative;
}
.recit-feature::before{
    content:"";
    position:absolute;
    inset:-2px;
    border-radius:22px;
    padding:2px;
    background:linear-gradient(120deg, rgba(142,68,173,.45), rgba(255,98,51,.38));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events:none;
    opacity:.85;
}

.recit-link{
    display:grid;
    grid-template-columns: var(--recit-media-w) 1fr;
    align-items: stretch;              /* <-- crucial : même hauteur des 2 colonnes */
    min-height: var(--recit-min-h);    /* <-- “rehausse” */
}

.recit-media{
    position:relative;
    min-height: var(--recit-min-h);    /* <-- l’image ne descendra pas trop */
    background:#eee;
    overflow:hidden;
}
.recit-media img{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
    transform:scale(1.02);
    transition:transform .6s ease;
}
.recit-feature:hover .recit-media img{ transform:scale(1.05); }

.recit-badge{
    position:absolute;
    top:12px;
    left:12px;
    padding:6px 10px;
    border-radius:999px;
    background:var(--accent); /* violet royal */
    color:#fff;
    font-size:10px;
    font-weight:1000;
    text-transform:uppercase;
    box-shadow:0 12px 25px rgba(0,0,0,.12);
    z-index:2;
}

.recit-content{
    padding:18px 20px;     /* un poil plus “haut” qu’avant */
    display:flex;
    flex-direction:column;
    justify-content:center;
    gap:9px;
}

.recit-kicker{
    display:inline-flex;
    align-items:center;
    gap:10px;
    color:var(--c-muted);
    font-weight:850;
    font-size:11px;
    text-transform:uppercase;
    font-family:"Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
.recit-cat{
    padding:5px 9px;
    border-radius:999px;
    border:1px solid var(--c-border);
    background:var(--c-bg);
}

.recit-title{
    margin:0;
    font-size: clamp(1.18rem, 1.8vw, 1.65rem); /* <-- rehaussé */
    font-weight:800;
    line-height:1.12;
    letter-spacing:-.02em;
}

.recit-excerpt{
    margin:0;
    color:var(--c-muted);
    font-size:13.7px;
    line-height:1.65;
    display:-webkit-box;
    -webkit-line-clamp:3; /* <-- plus éditorial */
    -webkit-box-orient:vertical;
    overflow:hidden;
    font-family:"Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.recit-actions{
    margin-top:2px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}
.recit-cta{
    display:inline-flex;
    align-items:center;
    gap:10px;
    font-weight:1000;
    font-family:"Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}
.recit-cta i{ color:var(--c-pepite-orange); }

/* Autres récits (ligne horizontale) */
.recit-more-wrap{ margin-top:12px; }
.recit-more-title{
    font-size:12px;
    font-weight:1000;
    color:var(--c-muted);
    text-transform:uppercase;
    letter-spacing:.06em;
    margin:0 0 10px 4px;
}
.recit-more{
    display:flex;
    gap:12px;
    overflow:auto;
    padding-bottom:6px;
    scroll-snap-type:x mandatory;
}
.recit-mini{
    min-width: 240px;
    max-width: 300px;
    background:var(--c-surface);
    border:1px solid var(--c-border);
    border-radius:16px;
    overflow:hidden;
    box-shadow:var(--shadow-soft);
    display:block;
    scroll-snap-align:start;
}
.recit-mini-img{ aspect-ratio: 16/9; background:#eee; position:relative; overflow:hidden; }
.recit-mini-img img{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}
.recit-mini-body{
    padding:11px 12px;
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:10px;
}
.recit-mini-title{
    font-weight:1000;
    font-size:13.5px;
    line-height:1.25;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
}
.mini-share{
    border:1px solid var(--c-border);
    background:var(--c-bg);
    width:36px;
    height:36px;
    border-radius:999px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    color:var(--c-muted);
    cursor:pointer;
}

/* --------------------------------------------------------------------------
 *  8) CARTES — FIX blancs
 *  - Fill image absolu (évite gaps)
 *  - w-body sans flex-grow (évite “blanc” interne)
 *  -------------------------------------------------------------------------- */
.regards-grid{
    display:grid;
    grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
    gap:18px;
}

.regards-card{
    background:var(--c-surface);
    border-radius:var(--c-radius);
    border:1px solid var(--c-border);
    overflow:hidden;
    display:flex;
    flex-direction:column;
    box-shadow:var(--shadow-soft);
    transition:transform .2s ease, box-shadow .2s ease;
}
.regards-card:hover{
    transform: translateY(-6px);
    box-shadow:var(--shadow-card);
}

.w-thumb{
    position:relative;
    aspect-ratio: 16/10;
    overflow:hidden;
    background:#eee;
}
.w-thumb img{
    position:absolute;  /* <-- fill total = plus de blanc/gap */
    inset:0;
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
    transition:transform .55s ease;
}
.regards-card:hover .w-thumb img{ transform:scale(1.07); }

.w-badge{
    position:absolute;
    top:12px;
    left:12px;
    padding:6px 10px;
    border-radius:999px;
    color:#fff;
    font-size:10px;
    font-weight:950;
    text-transform:uppercase;
    z-index:2;
}

/* Ici on force : pas de flex-grow => pas de blanc “poussé” */
.w-body{
    padding:16px 16px;
    flex: 0 0 auto !important;
    min-height: 160px;
    box-sizing: border-box;
}

.pb-cat{
    display:block;
    font-size:10.5px;
    font-weight:850;
    text-transform:uppercase;
    color:var(--c-muted);
    margin-bottom:7px;
    font-family:"Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.pb-title{
    font-size:17px;
    font-weight:800;
    margin:0 0 9px;

    /* IMPORTANT: réserver exactement 2 lignes */
    line-height:1.25;
    min-height: calc(1.25em * 2);

    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
}


.pb-desc{
    font-size:13.5px;
    color:var(--c-muted);

    /* IMPORTANT: réserver exactement 3 lignes */
    line-height:1.55;
    min-height: calc(1.55em * 3);

    display:-webkit-box;
    -webkit-line-clamp:3;
    -webkit-box-orient:vertical;
    overflow:hidden;

    font-family:"Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}


.pb-footer{
    padding:12px 16px;
    border-top:1px solid var(--c-border);
    display:flex;
    justify-content:space-between;
    align-items:center;
    background:var(--c-bg);
}

.action-btn{
    width:44px;
    height:44px;
    border-radius:999px;
    border:1px solid var(--c-border);
    background:var(--c-surface);
    color:var(--c-muted);
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:17px;
    transition:transform .18s ease, background .18s ease;
}
.action-btn:hover{
    background:var(--c-pepite-orange);
    color:#fff;
    border-color:var(--c-pepite-orange);
    transform: translateY(-2px);
}
.action-btn.is-copied{
    background:#10b981!important;
    color:#fff!important;
    border-color:#10b981!important;
}

/* --------------------------------------------------------------------------
 *  9) Reveal
 *  -------------------------------------------------------------------------- */
.reveal{
    opacity:0;
    transform: translateY(10px);
    transition: opacity .4s ease, transform .4s ease;
}
.reveal.is-visible{
    opacity:1;
    transform: translateY(0);
}

/* --------------------------------------------------------------------------
 *  10) RESPONSIVE
 *  -------------------------------------------------------------------------- */
@media (max-width: 980px){
    :root{
        --recit-min-h: 245px;
        --recit-media-w: 1fr;
    }

    .regards-layout{
        grid-template-columns: 1fr;
        gap:16px;
    }
    .regards-sidebar{ display:none; }

    body.regards-page-body .regards-toggle-mobile{
        display:block !important;
        position:sticky;
        top:92px;
        z-index:30;
        margin:-6px 0 10px;
        padding:6px 0;
        background: rgba(246,247,251,.72);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(17,24,39,.06);
    }
    body.regards-page-body[data-theme="dark"] .regards-toggle-mobile,
    :root[data-theme="dark"] body.regards-page-body .regards-toggle-mobile{
        background: rgba(11,16,32,.72);
        border-bottom: 1px solid rgba(255,255,255,.08);
    }

    .regards-toggle.is-mobile{
        flex-direction: row;
        gap:8px;
        overflow:auto;
        padding:6px;
        border-radius:999px;
    }
    .regards-toggle.is-mobile .seg-btn{
        justify-content:center;
        padding:10px 12px;
        font-size:11px;
        white-space: nowrap;
    }
    .regards-toggle.is-mobile .seg-count{ display:none; }

    .recit-link{ grid-template-columns: 1fr; }
}

@media (max-width: 640px){
    .regards-grid{ grid-template-columns: 1fr; }
}
