/*
Theme Name: OB Guides
Theme URI: https://outdoor-booking.com
Description: Thème minimaliste pour les pages prestataires Outdoor Booking
Version: 2.3.1
Author: Créatiic
Author URI: https://creatiic.com
License: Proprietary
*/

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f8faf6;
    color: #1a2e1a;
    min-height: 100vh;
}

/* ── Header ─────────────────────────────────────────────────────── */
.obg-header {
    background: #fff;
    border-bottom: 1px solid #dde5d9;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
    transition: background .3s, border-color .3s, box-shadow .3s;
}

/* Sur la page d'accueil : header fixed superposé sur le hero */
.home .obg-header {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    background: transparent;
    border-bottom-color: transparent;
    box-shadow: none;
}
/* Couleurs texte blancs par défaut sur hero */
.home .obg-header .obg-header-name,
.home .obg-header .obg-header-tagline { color: #fff; }
.home .obg-header .obg-logo-text { color: #fff; }
.home .obg-header .obg-login-link { color: rgba(255,255,255,.7); opacity: 1; }
.home .obg-header .obg-header-logo-wrap img { filter: brightness(0) invert(1); }
.home .obg-header .obg-header-logo-placeholder { background: rgba(255,255,255,.2); }
/* Quand scrollé : redevient opaque */
.home .obg-header.obg-header--scrolled {
    background: #fff !important;
    border-bottom-color: #dde5d9 !important;
    box-shadow: 0 1px 4px rgba(0,0,0,.08) !important;
}
.home .obg-header.obg-header--scrolled .obg-header-name,
.home .obg-header.obg-header--scrolled .obg-header-tagline { color: #1a2e1a !important; }
.home .obg-header.obg-header--scrolled .obg-logo-text { color: #fff !important; }
.home .obg-header.obg-header--scrolled .obg-login-link { color: inherit !important; opacity: 1 !important; }
.home .obg-header.obg-header--scrolled .obg-header-logo-wrap img { filter: none !important; }
.obg-header-logo-wrap img {
    height: 48px;
    width: auto;
    display: block;
}
.obg-header-logo-placeholder {
    width: 48px; height: 48px;
    background: var(--ob-color-primary, #2d5a27);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.obg-logo-text {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    line-height: 1;
}
.obg-header-info { flex: 1; min-width: 0; }
.obg-header-name {
    font-size: 17px;
    font-weight: 700;
    color: #1a2e1a;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.obg-header-tagline {
    font-size: 12px;
    color: #7a8f7a;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Main ────────────────────────────────────────────────────────── */
.obg-main {
    max-width: 900px;
    margin: 0 auto;
    padding: 28px 16px 60px;
}

/* ── Footer ─────────────────────────────────────────────────────── */
.obg-footer {
    text-align: center;
    padding: 20px;
    font-size: 11px;
    color: #9ca3af;
    border-top: 1px solid #dde5d9;
    background: #fff;
}
.obg-footer a {
    color: #7a8f7a;
    text-decoration: none;
}
.obg-footer a:hover { text-decoration: underline; }

/* ── Liens admin header ──────────────────────────────────────────── */
.obg-header-admin-links {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}
.obg-admin-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    background: var(--ob-color-primary, #2d5a27);
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity .15s;
    white-space: nowrap;
}
.obg-admin-link:hover { opacity: .85; color: #fff; }
.obg-admin-link--secondary {
    background: #f3f4f6;
    color: #374151 !important;
    border: 1px solid #e5e7eb;
}
.obg-admin-link--secondary:hover { background: #e5e7eb; opacity: 1; }
.obg-logout {
    background: #f3f4f6;
    color: #374151 !important;
    border: 1px solid #e5e7eb;
}
.obg-logout:hover { background: #fee2e2; border-color: #fca5a5; color: #991b1b !important; opacity: 1; }

/* Lien connexion discret (non connecté) */
.obg-login-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: transparent;
    color: #9ca3af;
    font-size: 16px;
    text-decoration: none;
    transition: background .15s, color .15s;
    opacity: .4;
}
.obg-login-link:hover {
    background: #f3f4f6;
    opacity: .8;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .obg-header { padding: 12px 14px; gap: 10px; }
    .obg-header-name { font-size: 15px; }
    .obg-main { padding: 16px 10px 40px; }

    .obg-admin-link span { display: none; }
    .obg-admin-link { padding: 7px 10px; font-size: 17px; gap: 0; }
    .obg-admin-link--secondary { display: none; } /* masquer "Admin" sur mobile, déjà accessible via réservations */
}

/* ── Header transparent sur hero ─────────────────────────────────── */
/* Classes JS gèrent tout — transparent/opaque selon position scroll */
.obg-header--over-hero {
    background: transparent;
    border-bottom-color: transparent;
    box-shadow: none;
    transition: background .3s, border-color .3s, box-shadow .3s;
}
.obg-header--over-hero .obg-header-name,
.obg-header--over-hero .obg-header-tagline { color: #fff; }
.obg-header--over-hero .obg-header-logo-placeholder { background: rgba(255,255,255,.2); }
.obg-header--over-hero .obg-logo-text { color: #fff; }
.obg-header--over-hero .obg-login-link { color: rgba(255,255,255,.7); opacity: 1; }
.obg-header--over-hero .obg-header-logo-wrap img { filter: brightness(0) invert(1); transition: filter .3s; }
.obg-header--scrolled {
    background: #fff !important;
    border-bottom-color: #dde5d9 !important;
    box-shadow: 0 1px 4px rgba(0,0,0,.06) !important;
}
.obg-header--scrolled .obg-header-name { color: #1a2e1a !important; }
.obg-header--scrolled .obg-header-tagline { color: #7a8f7a !important; }
.obg-header--scrolled .obg-header-logo-placeholder { background: var(--ob-color-primary) !important; }
.obg-header--scrolled .obg-logo-text { color: #fff !important; }

/* ── Hero ────────────────────────────────────────────────────────── */
.obg-hero {
    position: relative;
    min-height: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    /* Remonte sous le header fixe sur la page d'accueil */
    margin-top: calc(-1 * var(--obg-header-h, 90px));
}
.obg-hero--cover { min-height: 520px; }
.obg-hero-overlay { position: absolute; inset: 0; z-index: 1; }
.obg-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: calc(var(--obg-header-h, 90px) + 60px) 24px 60px;
    max-width: 600px;
    width: 100%;
}
.obg-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.3);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 30px;
    margin-bottom: 20px;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.obg-hero-nom {
    font-size: clamp(26px, 6vw, 48px);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    margin: 0 0 14px;
    letter-spacing: -.5px;
    text-shadow: 0 2px 16px rgba(0,0,0,.25);
}
.obg-hero-tagline {
    font-size: clamp(14px, 2.5vw, 18px);
    color: rgba(255,255,255,.85);
    margin: 0 auto 32px;
    line-height: 1.6;
    max-width: 460px;
}
.obg-hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(0,0,0,.25);
    transition: transform .15s, box-shadow .15s;
}
.obg-hero-cta:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0,0,0,.3);
}
.obg-hero-scroll {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: obg-bounce 2s ease-in-out infinite;
}
@keyframes obg-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(6px); }
}

/* ── Footer ──────────────────────────────────────────────────────── */
.obg-footer {
    background: #fff;
    border-top: 1px solid #dde5d9;
    margin-top: 60px;
    font-size: 14px;
    color: #4a5a4a;
}
.obg-footer-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 48px 20px 32px;
    display: grid;
    grid-template-columns: 1.4fr repeat(auto-fit, minmax(160px, 1fr));
    gap: 40px 32px;
}
.obg-footer-logo { height: 40px; width: auto; display: block; margin-bottom: 12px; }
.obg-footer-initial {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 800; color: #fff;
    margin-bottom: 12px;
}
.obg-footer-nom { font-size: 16px; font-weight: 700; color: #1a2e1a; margin-bottom: 4px; }
.obg-footer-activite { font-size: 12px; font-weight: 600; color: var(--footer-color, #2d5a27); margin-bottom: 8px; }
.obg-footer-tagline { font-size: 13px; color: #7a8f7a; line-height: 1.6; margin: 0; }
.obg-footer-col-title {
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .08em;
    color: #9ca3af; margin-bottom: 14px;
}
.obg-footer-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.obg-footer-link {
    display: inline-flex; align-items: center; gap: 7px;
    color: #4a5a4a; text-decoration: none;
    font-size: 14px; line-height: 1.4;
    background: none; border: none; padding: 0;
    cursor: pointer; font-family: inherit; text-align: left;
    transition: color .15s;
}
.obg-footer-link:hover { color: var(--footer-color, #2d5a27); }
.obg-footer-link-icon { font-size: 15px; flex-shrink: 0; }
.obg-footer-bottom {
    max-width: 900px; margin: 0 auto;
    padding: 16px 20px;
    border-top: 1px solid #edf1ea;
    display: flex; align-items: center;
    justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
    font-size: 12px; color: #9ca3af;
}
.obg-footer-ob-link { color: #9ca3af; text-decoration: none; transition: color .15s; }
.obg-footer-ob-link strong { color: var(--footer-color, #2d5a27); font-weight: 600; }
.obg-footer-ob-link:hover { color: #6b7a6b; }

/* ── Modals légaux ───────────────────────────────────────────────── */
.obg-modal {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 9000;
    display: flex; align-items: flex-end; justify-content: center;
    backdrop-filter: blur(2px);
}
.obg-modal[hidden] { display: none; }
.obg-modal-box {
    background: #fff;
    border-radius: 16px 16px 0 0;
    width: 100%; max-width: 680px; max-height: 80vh;
    display: flex; flex-direction: column;
    box-shadow: 0 -8px 40px rgba(0,0,0,.15);
}
.obg-modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px; border-bottom: 1px solid #edf1ea; flex-shrink: 0;
}
.obg-modal-title { font-size: 15px; font-weight: 700; color: #1a2e1a; }
.obg-modal-close {
    background: #f3f4f6; border: none; border-radius: 50%;
    width: 30px; height: 30px; font-size: 14px; cursor: pointer;
    color: #6b7280; display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.obg-modal-close:hover { background: #e5e7eb; }
.obg-modal-body {
    overflow-y: auto; padding: 20px;
    font-size: 14px; line-height: 1.7; color: #374151;
    -webkit-overflow-scrolling: touch;
}
.obg-modal-body p { margin: 0 0 12px; }
.obg-modal-body h2, .obg-modal-body h3 { color: #1a2e1a; margin: 18px 0 8px; }

/* ── Responsive footer / hero / modal ───────────────────────────── */
@media (max-width: 640px) {
    .obg-hero { min-height: 380px; }
    .obg-hero--cover { min-height: 420px; }
    .obg-hero-content { padding: calc(var(--obg-header-h, 90px) + 60px) 16px 40px; }
    .obg-hero-badge { display: none; } /* Badge masqué sur mobile — trop encombrant */
    .obg-footer-inner { grid-template-columns: 1fr; gap: 28px; padding: 32px 16px 24px; }
    .obg-footer-bottom { flex-direction: column; text-align: center; gap: 6px; }
    .obg-modal-box { max-height: 85vh; }
}
