/* ================================================================
   HGR – Public Styles
   Palette : #87976d (primary), #d5cdb6 (secondary), #FAF9F6 (bg)
   Fonts   : Cormorant Garamond (serif) + Montserrat (sans)
================================================================ */

/* ── Root & global ─────────────────────────── */
.hgr-wrap {
    font-family: 'Montserrat', sans-serif;
    color: #333;
    background: transparent;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}
.hgr-wrap *, .hgr-wrap *::before, .hgr-wrap *::after { box-sizing: border-box; }
.hgr-hidden { display: none !important; }

/* ── Language switcher ─────────────────────── */
.hgr-lang-switcher {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-bottom: 20px;
}
.hgr-lang-btn {
    padding: 5px 14px;
    border: 1px solid #d5cdb6;
    background: #fff;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    transition: all .2s;
    color: #666;
}
.hgr-lang-btn.active,
.hgr-lang-btn:hover {
    background: #87976d;
    color: #fff;
    border-color: #87976d;
}

/* Language blocks – hidden by default */
.hgr-lang-block { display: none; }

/* Spans / inline elements : shown via parent language class */
.hgr-lang-fr .hgr-lang-block.hgr-lang-fr,
.hgr-lang-it .hgr-lang-block.hgr-lang-it,
.hgr-lang-en .hgr-lang-block.hgr-lang-en { display: inline; }

/* Block-level elements (div, ul) : override inline → block
   Works both with and without the JS-added .is-block class */
.hgr-lang-fr div.hgr-lang-block.hgr-lang-fr,
.hgr-lang-fr ul.hgr-lang-block.hgr-lang-fr { display: block; }
.hgr-lang-it div.hgr-lang-block.hgr-lang-it,
.hgr-lang-it ul.hgr-lang-block.hgr-lang-it { display: block; }
.hgr-lang-en div.hgr-lang-block.hgr-lang-en,
.hgr-lang-en ul.hgr-lang-block.hgr-lang-en { display: block; }
/* Legacy .is-block fallback (kept for back-compat) */
.hgr-lang-fr .hgr-lang-block.hgr-lang-fr.is-block,
.hgr-lang-it .hgr-lang-block.hgr-lang-it.is-block,
.hgr-lang-en .hgr-lang-block.hgr-lang-en.is-block { display: block; }

/* hgr-text spans (data-fr/it/en) are handled by JS */

/* ── Summary header ────────────────────────── */
.hgr-summary-header {
    background: #fff;
    border: 1px solid #d5cdb6;
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.hgr-progress-label { display: flex; align-items: center; gap: 6px; font-size: 14px; color: #555; margin-bottom: 10px; }
.hgr-progress-amounts { display: flex; justify-content: space-between; margin-top: 8px; font-size: 13px; color: #888; }

/* ── Progress bars ─────────────────────────── */
.hgr-progress-bar-bg {
    height: 8px;
    background: #e8e4dc;
    border-radius: 4px;
    overflow: hidden;
}
.hgr-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #87976d, #a8bc8a);
    border-radius: 4px;
    transition: width .5s ease;
}

/* ── Gift cards grid ───────────────────────── */
.hgr-gifts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 10px;
}

/* ── Gift card ─────────────────────────────── */
.hgr-gift-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    transition: transform .3s ease, box-shadow .3s ease;
}
.hgr-gift-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,.12);
}
.hgr-gift-funded { opacity: .85; }
/* Le lien de carte ne souligne rien (override du thème WP qui met underline sur a *) */
.hgr-card-link,
.hgr-card-link:hover,
.hgr-card-link:visited,
.hgr-card-link:focus { display: block; text-decoration: none !important; color: inherit; height: 100%; }
.hgr-card-link * { text-decoration: none !important; }

.hgr-card-image {
    position: relative;
    height: 185px;
    overflow: hidden;
    background: #e8e4dc;
}
.hgr-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform .4s ease;
}
.hgr-gift-card:hover .hgr-card-image img { transform: scale(1.04); }

.hgr-card-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    background: linear-gradient(135deg,#f0ece3,#d5cdb6);
}

.hgr-card-day-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255,255,255,.92);
    color: #87976d;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}
.hgr-card-price-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #87976d;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}
.hgr-card-funded-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(135,151,109,.9);
    color: #fff;
    text-align: center;
    padding: 6px;
    font-size: 13px;
    font-weight: 600;
}

.hgr-card-body { padding: 16px 18px 20px; }
.hgr-card-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 17px;
    font-weight: 600;
    color: #2c3e2d;
    margin: 0 0 6px;
    line-height: 1.3;
}
.hgr-card-desc { font-size: 13px; color: #777; margin: 0 0 12px; line-height: 1.4; }
.hgr-card-progress { margin-bottom: 12px; }
.hgr-card-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}
.hgr-card-cta {
    font-size: 13px;
    color: #87976d;
    font-weight: 500;
    text-align: right;
}

/* ── Gift detail page ──────────────────────── */
.hgr-gift-page { padding-bottom: 60px; }

.hgr-gift-hero {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 30px;
    background: #1a1a1a;          /* fond sombre derrière l'image */
    max-height: 520px;
}
.hgr-gift-hero img {
    width: 100%;
    height: auto;                  /* hauteur naturelle de l'image */
    max-height: 520px;
    object-fit: contain;           /* image vue en entier, sans recadrage */
    display: block;
}
.hgr-gift-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,.15) 0%, rgba(0,0,0,.4) 100%);
    display: flex;
    align-items: flex-end;
    padding: 20px 24px;
}
.hgr-day-badge {
    background: rgba(255,255,255,.9);
    color: #87976d;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    letter-spacing: .5px;
}

.hgr-gift-content { max-width: 700px; margin: 0 auto; }

.hgr-gift-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 2.2rem;
    font-weight: 500;
    color: #2c3e2d;
    margin: 0 0 10px;
    line-height: 1.2;
}
.hgr-gift-subtitle { font-size: 16px; color: #666; margin: 0 0 24px; }

/* ── Progress section (detail) ─────────────── */
.hgr-progress-section {
    background: #FAF9F6;
    border: 1px solid #d5cdb6;
    border-radius: 10px;
    padding: 18px 22px;
    margin-bottom: 28px;
}
.hgr-progress-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
    color: #555;
    flex-wrap: wrap;
    gap: 8px;
}
.hgr-pct-badge {
    background: #87976d;
    color: #fff;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}
.hgr-pct-badge.hgr-funded { background: #4cae4c; }
.hgr-remaining { font-size: 13px; color: #888; margin: 8px 0 0; }

/* ── Details list ──────────────────────────── */
.hgr-details-list {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
}
.hgr-details-list li {
    padding: 7px 0 7px 22px;
    position: relative;
    font-size: 14px;
    color: #555;
    border-bottom: 1px solid #f0ece3;
}
.hgr-details-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #87976d;
    font-weight: 700;
}

/* ── Divider ───────────────────────────────── */
.hgr-divider {
    position: relative;
    height: 1px;
    background: #d5cdb6;
    margin: 30px 0;
}
.hgr-divider::before, .hgr-divider::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #87976d;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}
.hgr-divider::before { left: calc(50% - 30px); }
.hgr-divider::after  { left: calc(50% + 22px); }

/* ── Contribution form ─────────────────────── */
.hgr-form-section {
    background: #fff;
    border: 1px solid #d5cdb6;
    border-radius: 14px;
    padding: 28px 32px;
    margin-bottom: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,.05);
}
.hgr-form-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 500;
    color: #2c3e2d;
    margin: 0 0 20px;
}

/* Preset amounts */
.hgr-amount-section { margin-bottom: 22px; }
.hgr-label { display: block; font-size: 13px; font-weight: 500; color: #555; margin-bottom: 10px; letter-spacing: .3px; }
.hgr-preset-amounts { display: flex; flex-wrap: wrap; gap: 10px; }
.hgr-preset-btn {
    padding: 10px 20px;
    border: 1.5px solid #d5cdb6;
    background: #FAF9F6;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: all .2s;
    color: #555;
}
.hgr-preset-btn:hover,
.hgr-preset-btn.selected {
    background: #87976d;
    color: #fff;
    border-color: #87976d;
}
.hgr-preset-free { font-size: 13px; font-style: italic; }

/* Custom amount input */
.hgr-custom-amount {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}
.hgr-amount-input {
    width: 120px;
    padding: 10px 14px;
    border: 1.5px solid #d5cdb6;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    outline: none;
    transition: border-color .2s;
}
.hgr-amount-input:focus { border-color: #87976d; }
.hgr-currency { font-size: 15px; color: #555; font-weight: 500; }

/* Form fields */
.hgr-form-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}
@media (max-width: 560px) { .hgr-form-fields { grid-template-columns: 1fr; } }
.hgr-field-full { grid-column: 1 / -1; }

.hgr-input, .hgr-textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #d5cdb6;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    outline: none;
    transition: border-color .2s;
    background: #fff;
}
.hgr-input:focus, .hgr-textarea:focus { border-color: #87976d; }
.hgr-textarea { resize: vertical; }

/* Error */
.hgr-form-error {
    background: #fdf2f2;
    border: 1px solid #f5c6cb;
    color: #721c24;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 16px;
}

/* Submit button */
.hgr-submit-btn {
    width: 100%;
    padding: 14px;
    background: #87976d;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.hgr-submit-btn:hover { background: #6d7e59; }
.hgr-submit-btn:disabled { background: #aaa; cursor: not-allowed; }

/* Spinner */
.hgr-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: hgr-spin .7s linear infinite;
    display: inline-block;
}
@keyframes hgr-spin { to { transform: rotate(360deg); } }

/* Success message */
.hgr-form-success {
    text-align: center;
    padding: 30px;
    background: #f0f7ee;
    border: 1px solid #c3e6cb;
    border-radius: 12px;
    margin-bottom: 20px;
}
.hgr-success-icon {
    width: 56px;
    height: 56px;
    background: #87976d;
    color: #fff;
    font-size: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}
.hgr-form-success h3 { color: #2c3e2d; margin: 0 0 8px; font-size: 1.3rem; }
.hgr-form-success p  { color: #555; font-size: 14px; margin: 0; }

/* ── Contributors list ─────────────────────── */
.hgr-contributors {
    background: #FAF9F6;
    border: 1px solid #d5cdb6;
    border-radius: 12px;
    padding: 20px 24px;
}
.hgr-contributors-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.3rem;
    font-weight: 500;
    color: #2c3e2d;
    margin: 0 0 16px;
}
.hgr-contributors-list { display: flex; flex-direction: column; gap: 10px; }
.hgr-contributor-item {
    display: flex;
    align-items: center;
    gap: 12px;
}
.hgr-contributor-avatar {
    width: 36px;
    height: 36px;
    background: #87976d;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.hgr-contributor-name  { font-size: 14px; font-weight: 500; color: #333; }
.hgr-contributor-amount{ font-size: 13px; color: #87976d; font-weight: 600; margin-left: 8px; }

/* ── Responsive ────────────────────────────── */
@media (max-width: 600px) {
    .hgr-gift-title { font-size: 1.6rem; }
    .hgr-gift-hero  { max-height: 300px; }
    .hgr-form-section { padding: 20px 18px; }
    .hgr-gifts-grid { grid-template-columns: 1fr; }
}

/* ── Navigation links on gift pages ─────────────────── */
.hgr-nav-links {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding: 10px 0;
}
.hgr-nav-links-bottom {
    margin-top: 32px;
    margin-bottom: 0;
    padding-top: 20px;
    border-top: 1px solid #e8e4dc;
    justify-content: center;
}
.hgr-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: 1px solid #c9c0aa;
    border-radius: 50px;
    background: rgba(255,255,255,0.8);
    color: #5a6b47;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-decoration: none;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}
.hgr-nav-link:hover {
    background: #87976d;
    color: #fff;
    border-color: #87976d;
    transform: translateY(-1px);
    text-decoration: none;
}
.hgr-nav-home {
    color: #4a5568;
    border-color: #bbb;
}
.hgr-nav-voyage {
    color: #5a6b47;
    border-color: #87976d;
    font-weight: 600;
}

/* ── [hgr_lang_buttons] shortcode ───────────────────── */
.hgr-lang-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}
.hgr-lang-btn-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border: 2px solid #c9c0aa;
    border-radius: 50px;
    background: #fff;
    color: #4a5568;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.hgr-lang-btn-link:hover {
    background: #87976d;
    color: #fff;
    border-color: #87976d;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(135,151,109,0.3);
    text-decoration: none;
}
.hgr-lang-btn-link--fr { border-color: #87976d; color: #5a6b47; }
.hgr-lang-btn-link--it { border-color: #a88c6e; color: #7a5c3a; }
.hgr-lang-btn-link--en { border-color: #7a8fa8; color: #3a5270; }
.hgr-lbl-icon { font-size: 18px; line-height: 1; }
.hgr-lbl-flag { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; opacity: 0.7; }
.hgr-lbl-text { font-size: 14px; }

/* Style card (optionnel) */
.hgr-lang-buttons--card .hgr-lang-btn-link {
    flex-direction: column;
    gap: 6px;
    padding: 18px 32px;
    border-radius: 14px;
    text-align: center;
}
.hgr-lang-buttons--card .hgr-lbl-icon { font-size: 28px; }

/* ── Hide WP page title on shortcode pages ───────────── */
.hgr-hide-page-title .entry-title,
.hgr-hide-page-title .page-title,
.hgr-hide-page-title .post-title,
.hgr-hide-page-title h1.title,
.hgr-hide-page-title .wp-block-post-title,
.hgr-hide-page-title .page-header h1,
.hgr-hide-page-title .elementor-page-title h1,
.hgr-hide-page-title .elementor-widget-theme-page-title h1,
.hgr-hide-page-title .elementor-widget-theme-page-title,
.hgr-hide-page-title .site-content .page-header,
.hgr-hide-page-title .entry-header { display: none !important; }

/* ── Summary intro text ──────────────────────────────── */
.hgr-summary-intro {
    color: #5a5040;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 17px;
    line-height: 1.8;
}
.hgr-summary-intro p { margin-bottom: 12px; }
.hgr-summary-intro p:last-child { margin-bottom: 0; }
.hgr-summary-intro a { color: #87976d; text-decoration: underline; }
.hgr-summary-intro strong { font-weight: 600; }
.hgr-summary-intro em { font-style: italic; }

/* ── Prev / Next navigation on gift pages ────────────── */
.hgr-nav-prevnext {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding: 10px 0;
}
.hgr-nav-prevnext-bottom {
    margin-top: 32px;
    margin-bottom: 0;
    padding-top: 20px;
    border-top: 1px solid #e8e4dc;
}
.hgr-nav-center {
    flex: 1;
    text-align: center;
}
.hgr-nav-prev,
.hgr-nav-next {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border: 1px solid #c9c0aa;
    border-radius: 50px;
    background: rgba(255,255,255,0.85);
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #5a6b47;
    text-decoration: none;
    transition: all 0.2s ease;
    max-width: 200px;
}
.hgr-nav-prev:hover,
.hgr-nav-next:hover {
    background: #87976d;
    color: #fff;
    border-color: #87976d;
    transform: translateY(-1px);
    text-decoration: none;
}
.hgr-nav-prev .hgr-nav-day,
.hgr-nav-next .hgr-nav-day {
    font-size: 11px;
    opacity: 0.7;
    display: block;
    letter-spacing: 0.05em;
}
.hgr-nav-prev .hgr-nav-label,
.hgr-nav-next .hgr-nav-label {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hgr-nav-spacer { flex: 1; }

/* Summary nav bar (top of summary page) */
.hgr-summary-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

/* ── Summary intro : layout image + texte côte à côte ── */
.hgr-summary-intro-wrap {
    margin-bottom: 36px;
}

/* Quand image ET texte : flex row sur grand écran uniquement */
.hgr-summary-intro-wrap--split {
    display: block; /* mobile par défaut = colonne */
}

@media (min-width: 768px) {
    .hgr-summary-intro-wrap--split {
        display: flex;
        gap: 40px;
        align-items: center;
    }
    .hgr-summary-intro-wrap--split .hgr-summary-intro-img {
        flex: 0 0 42%;
        max-width: 42%;
    }
    .hgr-summary-intro-wrap--split .hgr-summary-intro {
        flex: 1;
    }
}

/* Image seule (sans texte) */
.hgr-summary-intro-img img {
    width: 100%;
    height: auto;
    border-radius: 14px;
    object-fit: cover;
    display: block;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}

/* Texte seul (sans image) : centré */
.hgr-summary-intro-wrap:not(.hgr-summary-intro-wrap--split) .hgr-summary-intro {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

/* (mobile handled by min-width approach above) */
/* Sur mobile : image pleine largeur + espace sous l'image */
.hgr-summary-intro-wrap--split .hgr-summary-intro-img {
    margin-bottom: 24px;
}
@media (min-width: 768px) {
    .hgr-summary-intro-wrap--split .hgr-summary-intro-img {
        margin-bottom: 0;
    }
}
