@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville&display=swap');

/* ============================================================
   WP Hébergements — Frontend Cards v1.9
   ============================================================ */

:root {
    --wpheb-blue:    #2563eb;
    --wpheb-amber:   #f59e0b;
    --wpheb-text:    #1e293b;
    --wpheb-muted:   #64748b;
    --wpheb-border:  #e2e8f0;
    --wpheb-bg:      #f8fafc;
    --wpheb-radius:  12px;
    --wpheb-shadow:  0 2px 16px rgba(0,0,0,.07);
}

/* ════════════════════════════════════════════════════
   BASE CARD
════════════════════════════════════════════════════ */
.wpheb-card {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--wpheb-text);
    width: 90%;
    margin: 1.5rem auto;
}

/* ════════════════════════════════════════════════════
   STYLE CHIFFRE-TOP
════════════════════════════════════════════════════ */
.wpheb-card .wpheb-cc-rank {
    font-family: 'Libre Baskerville', Georgia, serif !important;
    font-weight: 400 !important;
    font-size: 4.375rem !important;
    line-height: 1.2 !important;
    letter-spacing: normal !important;
    color: rgba(30, 41, 59, 0.15) !important;
    margin: 0 0 10px !important;
    display: block !important;
    padding: 0 !important;
    text-indent: 0 !important;
    background: none !important;
}

/* ════════════════════════════════════════════════════
   CARD COMPLÈTE — PARTIE 1 : 2 colonnes (30/10/60)
════════════════════════════════════════════════════ */
.wpheb-cc-part1 {
    display: grid;
    grid-template-columns: 35% 60%;
    column-gap: 5%;
    padding: 0;
    align-items: end;
}

/* Pas d'image : la colonne texte prend toute la largeur */
.wpheb-cc-part1:not(:has(.wpheb-cc-thumb)) {
    grid-template-columns: 1fr;
}
.wpheb-cc-intro-full {
    grid-column: 1 / -1;
}

/* Colonne gauche — image d'aperçu */
.wpheb-cc-thumb {
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
}
.wpheb-cc-thumb img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}

/* Colonne droite — texte */
.wpheb-cc-intro { min-width: 0; padding-bottom: 50px; }

.wpheb-card .wpheb-cc-titre {
    font-weight: 400 !important;
    width: 75%;
    margin: 0 0 15px !important;
    padding: 0 !important;
}
.wpheb-card .wpheb-cc-sep {
    border: none !important;
    border-top: 1px solid currentColor !important;
    opacity: .5;
    margin: 0 0 30px !important;
    width: 100%;
    height: 0;
    display: block;
}
.wpheb-cc-sous-titre {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.188rem;
    line-height: 1.2;
    letter-spacing: normal;
    margin: 0 0 10px;
}
.wpheb-cc-loc {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.813rem;
    line-height: 1.2;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    color: #1E293B;
    margin: 0 0 10px;
}
.wpheb-cc-desc {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1.063rem;
    line-height: 1.6;
    letter-spacing: normal;
    margin: 0 0 30px;
}
.wpheb-cc-desc p { margin: .3em 0; }

.wpheb-cc-tarif-inline {
    margin: 10px 0 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.wpheb-cc-loc {
    display: flex;
    align-items: center;
    gap: 8px;
}
.wpheb-cc-loc::before,
.wpheb-cc-tarif-inline::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 2px;
    background: #1E293B;
    flex-shrink: 0;
}

/* ════════════════════════════════════════════════════
   CARD COMPLÈTE — PARTIE 2 : galerie + tarif + avantages + boutons
════════════════════════════════════════════════════ */
.wpheb-cc-part2 {
    margin-top: 80px;
}

/* Grille 2 colonnes : 45% / 10% gutter / 45% */
.wpheb-cc-p2-grid {
    display: grid;
    grid-template-columns: 45% 50%;
    column-gap: 5%;
    align-items: start;
}

/* Colonne gauche */
.wpheb-cc-p2-left {
    margin-top: 50px;
}

/* Colonne droite : galerie 4 carrés uniquement */
.wpheb-cc-p2-right {}
.wpheb-cc-p2-right .wpheb-galerie-grille {
    border-radius: 0;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background: transparent; /* fond = couleur du fond de page */
}
/* Masquer slot 1 (pleine largeur haut) et slot 6 (pleine largeur bas) */
.wpheb-cc-p2-right .wpheb-grille-item-1,
.wpheb-cc-p2-right .wpheb-grille-item-6 {
    display: none;
}
/* Slots 2-5 : carrés 1:1 */
.wpheb-cc-p2-right .wpheb-grille-item-2,
.wpheb-cc-p2-right .wpheb-grille-item-3,
.wpheb-cc-p2-right .wpheb-grille-item-4,
.wpheb-cc-p2-right .wpheb-grille-item-5 {
    grid-column: auto;
    aspect-ratio: 1 / 1;
}

/* ════════════════════════════════════════════════════
   GALERIE PRINCIPALE — grille 1/2/2/1
════════════════════════════════════════════════════ */
.wpheb-galerie-grille {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    background: #000;
    /* Pas de border-radius en haut : repris par la card */
}

/* Slot 1 → pleine largeur, ratio 3:2 */
.wpheb-grille-item-1 { grid-column: 1 / -1; aspect-ratio: 3 / 2; }
/* Slots 2–3 → côte à côte, carré */
.wpheb-grille-item-2,
.wpheb-grille-item-3 { aspect-ratio: 1 / 1; }
/* Slots 4–5 → côte à côte, carré */
.wpheb-grille-item-4,
.wpheb-grille-item-5 { aspect-ratio: 1 / 1; }
/* Slot 6 → pleine largeur, ratio 3:2 */
.wpheb-grille-item-6 { grid-column: 1 / -1; aspect-ratio: 3 / 2; }

.wpheb-grille-item {
    display: block; overflow: hidden;
    /* Masquer si pas d'image pour ce slot */
}
.wpheb-grille-item img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform .35s ease;
}
.wpheb-grille-item:hover img { transform: scale(1.04); }

/* Card medium : n'affiche que les 3 premiers slots */
.wpheb-card-medium .wpheb-grille-item-4,
.wpheb-card-medium .wpheb-grille-item-5,
.wpheb-card-medium .wpheb-grille-item-6 { display: none; }

/* ════════════════════════════════════════════════════
   GALERIE DUO — 2 images 1:1 côte à côte
════════════════════════════════════════════════════ */
.wpheb-galerie-duo-front {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    background: #000;
}
.wpheb-duo-item { display: block; overflow: hidden; aspect-ratio: 1 / 1; }
.wpheb-duo-item img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform .35s ease;
}
.wpheb-duo-item:hover img { transform: scale(1.04); }

/* ════════════════════════════════════════════════════
   BODY & EN-TÊTE
════════════════════════════════════════════════════ */
.wpheb-card-body { padding: 1.25rem 1.5rem 1.5rem; }

.wpheb-card-header { margin-bottom: .9rem; }

.wpheb-badge-highlight {
    display: inline-block;
    background: var(--wpheb-amber); color: #fff;
    font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    padding: .2em .65em; border-radius: 50px;
    margin: 0 .3rem .4rem 0;
}

.wpheb-card-titre {
    font-size: 1.3rem; font-weight: 800; line-height: 1.2;
    color: var(--wpheb-text); margin: .2rem 0 .25rem;
}
.wpheb-card-sous-titre {
    font-size: .95rem; color: var(--wpheb-muted); margin: 0 0 .4rem;
}
.wpheb-card-loc {
    display: flex; align-items: center; gap: .3rem;
    font-size: .85rem; color: var(--wpheb-muted); margin: 0;
}
.wpheb-loc-icon { flex-shrink: 0; }

/* ════════════════════════════════════════════════════
   DESCRIPTION
════════════════════════════════════════════════════ */
.wpheb-card-desc {
    font-size: .95rem; line-height: 1.7; color: var(--wpheb-text);
    margin: .9rem 0;
}
.wpheb-card-desc p { margin: .4em 0; }

/* ════════════════════════════════════════════════════
   TARIF (card complète)
════════════════════════════════════════════════════ */
.wpheb-card-tarif {
    display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
    margin: .9rem 0;
}
.wpheb-tarif-gamme {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.813rem;
    line-height: 1.2;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    color: #1E293B;
}
.wpheb-tarif-sep {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.813rem;
    line-height: 1.2;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    color: #1E293B;
}
.wpheb-tarif-prix {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.813rem;
    line-height: 1.2;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    color: #1E293B;
}

/* ════════════════════════════════════════════════════
   AVANTAGES & PRESTATIONS (card complète)
════════════════════════════════════════════════════ */
.wpheb-card-avantages {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 1rem; margin: .9rem 0;
}
.wpheb-avantages-titre {
    font-size: .78rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .04em; color: var(--wpheb-muted); margin: 0 0 .45rem;
}
.wpheb-avantages-col ul {
    margin: 0; padding-left: 1.1rem; list-style: disc;
}
.wpheb-avantages-col li {
    font-size: .875rem; margin-bottom: .25rem; color: var(--wpheb-text);
}

/* ════════════════════════════════════════════════════
   BOUTONS
════════════════════════════════════════════════════ */
.wpheb-card-btns {
    display: flex; gap: .6rem; flex-wrap: wrap;
    margin: 1.1rem 0 .5rem;
}
.wpheb-btn {
    display: inline-block; padding: .6em 1.25em;
    border-radius: 8px; font-size: .875rem; font-weight: 600;
    text-decoration: none; white-space: nowrap;
    transition: opacity .15s, transform .1s;
}
.wpheb-btn:hover { opacity: .87; transform: translateY(-1px); }
.wpheb-btn-resa  { background: var(--wpheb-blue); color: #fff; }
.wpheb-btn-promo {
    background: #fff; color: var(--wpheb-blue);
    border: 1.5px solid var(--wpheb-blue);
}

/* ════════════════════════════════════════════════════
   ARTICLES ASSOCIÉS
════════════════════════════════════════════════════ */
.wpheb-articles-section {
    margin-top: 1.4rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--wpheb-border);
}
.wpheb-articles-label {
    font-size: .75rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; color: var(--wpheb-muted); margin: 0 0 .75rem;
}
.wpheb-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: .75rem;
}
.wpheb-article-card {
    display: block; text-decoration: none; color: var(--wpheb-text);
    border: 1px solid var(--wpheb-border); border-radius: 8px;
    overflow: hidden; transition: box-shadow .2s, transform .15s;
}
.wpheb-article-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); transform: translateY(-2px); }

/* Image 3:2 */
.wpheb-article-card-img {
    aspect-ratio: 3 / 2; overflow: hidden;
    background: var(--wpheb-bg);
    display: flex; align-items: center; justify-content: center;
}
.wpheb-article-card-img img { width:100%; height:100%; object-fit:cover; display:block; }
.wpheb-article-card-placeholder { font-size: 1.5rem; color: #cbd5e1; }

.wpheb-article-card-body { padding: .55rem .7rem .7rem; }
.wpheb-lire-aussi {
    display: block; font-size: .68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em;
    color: var(--wpheb-blue); margin-bottom: .2rem;
}
.wpheb-article-card-titre {
    display: block; font-size: .85rem; font-weight: 600; line-height: 1.3;
    color: var(--wpheb-text);
}


/* ════════════════════════════════════════════════════
   PART2 — AVANTAGES, PROMO, RÉSA
════════════════════════════════════════════════════ */
.wpheb-p2-avantages {
    margin-bottom: 1.5rem;
    width: 100%;
}
.wpheb-p2-avantages-titre {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.188rem;
    line-height: 1.2;
    letter-spacing: normal;
    margin: 0 0 .75rem;
    display: flex;
    align-items: center;
    gap: .35rem;
}
.wpheb-p2-heart {
    font-style: normal;
    font-weight: 400;
}
.wpheb-p2-avantages-list {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}
.wpheb-p2-avantages-list li {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1.063rem;
    line-height: 1.6;
    letter-spacing: normal;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 10px;
    padding-left: 0;
}
.wpheb-p2-avantages-list li:last-child {
    margin-bottom: 0;
}
.wpheb-p2-avantages-list li::before {
    content: '';
    display: inline-block;
    width: 8px;
    min-width: 8px;
    height: 2px;
    background: #1E293B;
    flex-shrink: 0;
}

/* Lien promo */
.wpheb-p2-promo {
    display: block;
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.063rem;
    line-height: 1.6;
    letter-spacing: normal;
    text-decoration: underline;
    color: var(--wpheb-text);
    background: none;
    border: none;
    padding: 0;
    margin-bottom: 1rem;
}
.wpheb-p2-promo:hover {
    opacity: .75;
}
/* ════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════ */
@media (max-width: 600px) {
    .wpheb-card-avantages    { grid-template-columns: 1fr; }
    .wpheb-articles-grid     { grid-template-columns: 1fr 1fr; }
    .wpheb-card-btns         { flex-direction: column; }
    .wpheb-btn               { text-align: center; }
}

/* ════════════════════════════════════════════════════
   APERÇU DANS L'ÉDITEUR GUTENBERG
════════════════════════════════════════════════════ */
.wpheb-editor-block {
    border: 2px dashed #93c5fd; border-radius: 10px;
    padding: 1rem; background: #eff6ff;
}
.wpheb-editor-preview {
    display: flex; align-items: center; gap: .85rem;
}
.wpheb-editor-icon { font-size: 2rem; }
.wpheb-editor-info strong { display: block; font-size: .95rem; color: #1e293b; }
.wpheb-editor-mode { font-size: .8rem; color: #64748b; }
.wpheb-error {
    padding: 1rem; background: #fef2f2;
    border: 1px solid #fca5a5; border-radius: 8px;
    color: #dc2626; font-size: .875rem;
}


/* ════════════════════════════════════════════════════
   BLOC TOP HÉBERGEMENTS — ÉDITEUR
════════════════════════════════════════════════════ */
.wpheb-top-editor {
    border: 2px dashed #93c5fd;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    background: #eff6ff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.wpheb-top-editor-header {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: 1rem;
}
.wpheb-top-editor-icon  { font-size: 1.5rem; line-height: 1; }
.wpheb-top-editor-label {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
}
.wpheb-top-editor-placeholder {
    font-size: 12px;
    color: #94a3b8;
    margin: 0 0 .75rem;
    font-style: italic;
}
.wpheb-top-editor-intro-preview,
.wpheb-top-editor-conclusion-preview {
    background: #fff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 8px 10px;
    margin-bottom: .75rem;
}
.wpheb-top-editor-field-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #64748b;
    margin-bottom: 4px;
}
.wpheb-top-editor-text-preview {
    font-size: 12px;
    color: #475569;
    margin: 0;
    white-space: pre-wrap;
    line-height: 1.5;
}

.wpheb-top-add-wrap { margin-bottom: .75rem; }
.wpheb-top-add-wrap select {
    width: 100%;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 7px 10px;
    background: #fff;
    font-size: 13px;
}

/* Liste triable */
.wpheb-top-list { display: flex; flex-direction: column; gap: 6px; }

.wpheb-top-list-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #bfdbfe;
    border-radius: 7px;
    padding: 8px 10px;
    cursor: grab;
    transition: box-shadow .15s, border-color .15s;
    user-select: none;
}
.wpheb-top-list-item:active { cursor: grabbing; }
.wpheb-top-list-item:hover  { box-shadow: 0 2px 8px rgba(37,99,235,.12); border-color: #93c5fd; }

.wpheb-top-drag-handle {
    color: #94a3b8;
    font-size: 1rem;
    cursor: grab;
    flex-shrink: 0;
}
.wpheb-top-rank-badge {
    background: #2563eb;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50px;
    padding: 2px 7px;
    flex-shrink: 0;
    min-width: 24px;
    text-align: center;
}
.wpheb-top-item-label {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wpheb-top-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    font-size: 18px;
    line-height: 1;
    padding: 0 2px;
    flex-shrink: 0;
    transition: color .15s;
}
.wpheb-top-remove:hover { color: #dc2626; }

/* ════════════════════════════════════════════════════
   BLOC TOP HÉBERGEMENTS — FRONTEND
════════════════════════════════════════════════════ */
.wpheb-top-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Intro & conclusion */
.wpheb-top-intro {
    font-size: .975rem;
    line-height: 1.75;
    color: #334155;
    margin: 0 0 1.75rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border-left: 3px solid #2563eb;
    border-radius: 0 6px 6px 0;
}
.wpheb-top-intro p  { margin: .4em 0; }
.wpheb-top-intro p:first-child { margin-top: 0; }
.wpheb-top-intro p:last-child  { margin-bottom: 0; }

.wpheb-top-conclusion {
    font-size: .975rem;
    line-height: 1.75;
    color: #334155;
    margin: 1.75rem 0 0;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border-left: 3px solid #64748b;
    border-radius: 0 6px 6px 0;
}
.wpheb-top-conclusion p  { margin: .4em 0; }
.wpheb-top-conclusion p:first-child { margin-top: 0; }
.wpheb-top-conclusion p:last-child  { margin-bottom: 0; }

.wpheb-top-item {
    margin-bottom: 2rem;
}

.wpheb-top-card { width: 100%; }
/* La card complète hérite déjà du style block.css — pas besoin de redéfinir */

.wpheb-top-empty {
    padding: 1.5rem;
    background: #f8fafc;
    border: 1px dashed #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    font-size: .9rem;
    text-align: center;
}

/* Responsive */
@media (max-width: 640px) {
    .wpheb-top-item  { flex-direction: column; gap: .5rem; }
    .wpheb-top-rank  { width: 34px; height: 34px; font-size: .95rem; }
}

/* ════════════════════════════════════════════════════
   BANDEAU CTA FIXE "JE RÉSERVE"
════════════════════════════════════════════════════ */
#wpheb-cta-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 9999;
    box-sizing: border-box;
    /* Caché par défaut */
    transform: translateY(100%);
    transition: transform .3s ease;
}
#wpheb-cta-banner.wpheb-cta-visible {
    transform: translateY(0);
}

#wpheb-cta-name {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    margin-right: 1.5rem;
}

#wpheb-cta-btn {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: .875rem;
    color: #000;
    background: #fff;
    padding: .4em 1.25em;
    border-radius: 4px;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity .15s;
}
#wpheb-cta-btn:hover { opacity: .85; }

@media (max-width: 600px) {
    #wpheb-cta-banner { padding: 0 1rem; }
    #wpheb-cta-name   { font-size: .875rem; }
}
