/* ============================================================
   ACCG — NAVBAR + HERO
   À ajouter dans custom.css en remplacement des surcharges
   navbar existantes, ou dans un fichier dédié.
   ============================================================ */

/* ---- Navbar du thème parent masquée partout : la barre ACCG est fournie par le thème enfant ---- */
body .ova_header,
body header.ova_header { display: none !important; }

/* Décalage du contenu sous la barre fixe (pages internes sans bandeau .accg-page-hero) */
body:not(.home) .ova-page-section:first-of-type {
    padding-top: 6.5rem;
}
body:not(.home) .accg-page-hero + div .ova-page-section:first-of-type {
    padding-top: 0;
}
/* Gabarit blog grille : pas de .ova-page-section (index.php) */
body:not(.home) .ovaem_blog_grid_page {
    padding-top: 6.5rem;
}
body:not(.home) .accg-page-hero + div .ovaem_blog_grid_page {
    padding-top: 0;
}
@media (max-width: 782px) {
    body.admin-bar:not(.home) .ova-page-section:first-of-type,
    body.admin-bar:not(.home) .ovaem_blog_grid_page {
        padding-top: 7.5rem;
    }
    body.admin-bar:not(.home) .accg-page-hero + div .ova-page-section:first-of-type,
    body.admin-bar:not(.home) .accg-page-hero + div .ovaem_blog_grid_page {
        padding-top: 0;
    }
}

/* ============================================================
   NAVBAR ACCG
   ============================================================ */

.accg-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    transition: background 0.5s ease, box-shadow 0.5s ease;
}

.accg-header.scrolled {
    background: rgba(245, 240, 232, 0.96);
    backdrop-filter: blur(8px);
    box-shadow: 0 1px 20px rgba(0,0,0,0.08);
}

.logged-in.admin-bar .accg-header { top: 32px; }

.accg-header-inner {
    max-width: min(var(--gryon-site-max-width, 1320px), 100%);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px;
}

/* Logo */
.accg-logo {
    display: flex;
    flex-direction: column;
    text-decoration: none !important;
    line-height: 1;
}

.accg-logo-main {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #fff;
    transition: color 0.5s ease;
}

.accg-header.scrolled .accg-logo-main {
    color: var(--gryon-text);
}

.accg-logo-sub {
    font-family: Inter, system-ui, sans-serif;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    margin-top: 3px;
    transition: color 0.5s ease;
}

.accg-header.scrolled .accg-logo-sub {
    color: var(--gryon-muted);
}

/* Nav desktop */
.accg-nav { display: flex; align-items: center; }

.accg-nav .accg-nav-list {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.accg-nav .accg-nav-list li { margin: 0; padding: 0; }

.accg-nav .accg-nav-list li a {
    font-family: Inter, system-ui, sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none !important;
    color: #fff;
    transition: color 0.3s ease;
    position: relative;
}

.accg-header.scrolled .accg-nav .accg-nav-list li a {
    color: var(--gryon-text);
}

.accg-nav .accg-nav-list li a::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gryon-red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.accg-nav .accg-nav-list li a:hover::after,
.accg-nav .accg-nav-list li.current-menu-item a::after,
.accg-nav .accg-nav-list li.current_page_item a::after {
    transform: scaleX(1);
}

.accg-nav .accg-nav-list li a:hover,
.accg-header.scrolled .accg-nav .accg-nav-list li a:hover {
    color: var(--gryon-red) !important;
}

/* Burger */
.accg-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.accg-burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    transition: background 0.5s ease, transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

.accg-header.scrolled .accg-burger span { background: var(--gryon-text); }

.accg-burger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.accg-burger.open span:nth-child(2) { opacity: 0; }
.accg-burger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Menu mobile */
.accg-mobile-menu {
    display: none;
}

/* Fond crème seulement après scroll (ou pages « lock » avec .scrolled au chargement) */
.accg-header.scrolled .accg-mobile-menu {
    background: rgba(245, 240, 232, 0.97);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--gryon-cream);
}

/* En haut de page : panneau transparent sur le hero */
.accg-header:not(.scrolled) .accg-mobile-menu {
    background: transparent;
    backdrop-filter: none;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.accg-mobile-menu.open { display: block; }

.accg-mobile-menu .accg-mobile-nav-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 16px 0;
    text-align: right;
}

.accg-mobile-menu .accg-mobile-nav-list li { width: 100%; text-align: right; }

.accg-mobile-menu .accg-mobile-nav-list li a {
    display: block;
    padding: 14px 24px;
    text-align: right;
    font-family: Inter, system-ui, sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none !important;
    color: var(--gryon-text);
    transition: color 0.2s ease;
}

.accg-header:not(.scrolled) .accg-mobile-menu .accg-mobile-nav-list li a {
    color: rgba(255, 255, 255, 0.92);
    -webkit-text-fill-color: rgba(255, 255, 255, 0.92);
}

.accg-mobile-menu .accg-mobile-nav-list li a:hover { color: var(--gryon-red); }

.accg-header:not(.scrolled) .accg-mobile-menu .accg-mobile-nav-list li a:hover {
    color: var(--gryon-red) !important;
    -webkit-text-fill-color: var(--gryon-red) !important;
}

/* ============================================================
   HERO ACCG
   ============================================================ */

.accg-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.accg-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.accg-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(30, 20, 12, 0.60);
}

.accg-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 24px;
    max-width: 1000px;
    margin: 0 auto;
}

/* Ligne dorée animée */
.accg-hero-line {
    width: 80px;
    height: 1px;
    background: var(--gryon-gold);
    margin: 0 auto 32px;
    animation: accg-line-grow 1s ease forwards;
}

@keyframes accg-line-grow {
    from { width: 0; }
    to   { width: 80px; }
}

/* Sur-titre */
.accg-hero-surtitle {
    font-family: Inter, system-ui, sans-serif;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(245,240,232,0.7);
    margin: 0 0 16px 0;
    opacity: 0;
    animation: accg-fade-in 0.8s ease 0.2s forwards;
}

/* Titre principal */
.accg-hero-title {
    font-family: 'Playfair Display', serif !important;
    font-size: clamp(64px, 10vw, 120px) !important;
    font-weight: 500 !important;
    color: #fff !important;
    line-height: 1 !important;
    margin: 0 0 24px 0 !important;
    opacity: 0;
    animation: accg-fade-in-up 0.8s ease 0.4s forwards;
}

/* Description */
.accg-hero-desc {
    font-family: Inter, system-ui, sans-serif;
    font-size: clamp(16px, 2vw, 20px);
    color: rgba(245,240,232,0.8);
    max-width: min(700px, 100%);
    margin: 0 auto 40px;
    line-height: 1.6;
    opacity: 0;
    animation: accg-fade-in 0.8s ease 0.8s forwards;
}

/* Bouton */
.accg-hero-btn {
    display: inline-block;
    font-family: Inter, system-ui, sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none !important;
    color: #fff !important;
    border: 1px solid rgba(245,240,232,0.4);
    padding: 14px 32px;
    transition: background 0.3s ease, border-color 0.3s ease;
    opacity: 0;
    animation: accg-fade-in 0.8s ease 1s forwards;
}

.accg-hero-btn:hover {
    background: rgba(245,240,232,0.12);
    border-color: rgba(245,240,232,0.7);
    color: #fff !important;
}

/* Indicateur de scroll */
.accg-hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    opacity: 0;
    animation: accg-fade-in 0.8s ease 1.2s forwards;
}

.accg-hero-scroll-line {
    width: 1px;
    height: 48px;
    background: rgba(245,240,232,0.3);
    margin: 0 auto;
    animation: accg-pulse 2s ease-in-out infinite;
}

/* ---- Animations ---- */
@keyframes accg-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes accg-fade-in-up {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes accg-pulse {
    0%, 100% { opacity: 0.3; }
    50%       { opacity: 0.8; }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .accg-nav { display: none; }
    .accg-burger { display: flex; }

    .accg-header-inner { padding: 16px 20px; }

    .accg-hero-title { font-size: clamp(48px, 14vw, 80px) !important; }
}

@media (max-width: 480px) {
    .accg-hero-surtitle { letter-spacing: 0.15em; font-size: 11px; }
    .accg-hero-btn { padding: 12px 24px; }
}

/* ============================================================
   BANDEAU TITRE — pages internes (même image / overlay que l’accueil, sans 100vh)
   ============================================================ */

.accg-page-hero {
    position: relative;
    width: 100%;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 6.5rem 24px 2.75rem;
    background-color: #2a2218;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.accg-page-hero > .accg-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    pointer-events: none;
}

.accg-page-hero .accg-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.accg-page-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 960px;
    margin: 0 auto;
}

.accg-page-hero .accg-hero-line {
    margin-bottom: 1.25rem;
}

.accg-page-hero-title {
    font-family: 'Playfair Display', serif !important;
    font-size: clamp(36px, 6vw, 72px) !important;
    font-weight: 500 !important;
    color: #fff !important;
    line-height: 1.05 !important;
    margin: 0 !important;
    opacity: 1;
    animation: accg-fade-in-up 0.7s ease 0.15s both;
}

@media (max-width: 782px) {
    .logged-in.admin-bar .accg-page-hero {
        padding-top: 7.5rem;
    }
}

@media (max-width: 768px) {
    .accg-page-hero {
        min-height: 220px;
        padding-left: 20px;
        padding-right: 20px;
    }
    .accg-page-hero-title {
        font-size: clamp(28px, 8vw, 52px) !important;
    }
}