/*
  Theme Name:      Thème V10 Cigalia mire
  Theme URI:       https://cigalia.fr
  Description:     Thème enfant avec accueil plein écran et carte interactive
  Author:          Erwan
  Template:        vw-parallax
  Version:         8.0.0
*/

/* ==========================================================================
   1. RESET & BASE GLOBAL
   ========================================================================== */
html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    min-height: 100%;
    font-family: 'Comic Sans MS', 'Chalkboard SE', 'Fredoka', sans-serif;
    background-color: #141b0d;
    box-sizing: border-box;
    overflow-x: hidden;
}

*, *:before, *:after {
    box-sizing: inherit;
}


/* ==========================================================================
   2. RIDEAU DE TRANSITION DE PAGE & OVERLAY
   ========================================================================== */
.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #141b0d;
    z-index: 999999;
    pointer-events: none;
    opacity: 0;
    transform: scale(1, 1);
}

.page-transition-overlay.animate_content {
    pointer-events: auto;
    animation: animateTransition 0.8s ease forwards;
}

@keyframes animateTransition {
    0% {
        opacity: 0;
        transform: scale(1, 1);
    }
    30% {
        opacity: 1;
        transform: scale(1, 0.005);
    }
    50% {
        opacity: 1;
        transform: scale(0.3, 0.005);
    }
    100% {
        opacity: 1;
        transform: scale(1, 1);
    }
}

.page__style_overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    pointer-events: none;
    opacity: 0;
}

.page__style_overlay::before,
.page__style_overlay::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 50vh;
    background-color: #141b0d;
    transition: transform 0.8s cubic-bezier(0.75, 0, 0.25, 1);
}

.page__style_overlay::before {
    top: 0;
    transform: translateY(-100%);
}

.page__style_overlay::after {
    bottom: 0;
    transform: translateY(100%);
}

.page__style_line {
    position: fixed;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
    z-index: 1000000;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-50%) scaleX(0);
    transition: transform 0.4s ease, opacity 0.3s ease;
}

.page__style_overlay.animate_out,
.page__style_overlay.animate_in {
    opacity: 1;
    pointer-events: auto;
}

.page__style_overlay.animate_out::before,
.page__style_overlay.animate_out::after,
.page__style_overlay.animate_in::before,
.page__style_overlay.animate_in::after {
    transform: translateY(0);
}

.page__style_overlay.animate_out .page__style_line,
.page__style_overlay.animate_in .page__style_line {
    opacity: 1;
    transform: translateY(-50%) scaleX(1);
}

.page__style_overlay.animate_out .page__style_line {
    transition-delay: 0.6s;
}

.page__style_overlay.is-opening .page__style_line {
    opacity: 0;
    transform: translateY(-50%) scaleX(0);
    transition: transform 0.3s ease, opacity 0.2s ease;
}

.page__style_overlay.is-opening::before {
    transform: translateY(-100%);
}

.page__style_overlay.is-opening::after {
    transform: translateY(100%);
}


/* ==========================================================================
   3. NAVIGATION ET HEADER GLOBAL
   ========================================================================== */
header, header.menu, #header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 15px 30px !important;
    background-color: #1a1a1a !important;
    position: relative !important;
    z-index: 1000 !important;
}

/* Ajustement si la barre d'administration WP est affichée */
body.admin-bar header, 
body.admin-bar #header {
    margin-top: 32px !important;
}

#intro, section#intro, .intro {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 80vh !important;
    padding-top: 50px !important;
    position: relative !important;
    z-index: 2 !important;
}

.menu-list ul, .nav-menu ul, .main-navigation ul {
    display: flex !important;
    flex-direction: row !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 25px !important;
}

.menu-list a, .nav-menu a, .main-navigation a {
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
}

.menu-list a:hover, .nav-menu a:hover, .main-navigation a:hover {
    color: #f0a500 !important;
}

.menu-toggle {
    display: none;
}

.btn_nav {
    background: #002A32;
    border-radius: 30px;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    margin: 5px;
    padding: 12px 24px;
    transition: background 0.2s;
    text-decoration: none !important;
}

.btn_nav:hover {
    background: #004d5c;
    text-decoration: none !important;
}

.back-home-btn {
    position: absolute;
    top: 25px;
    left: 25px;
    color: #ffffff !important;
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 18px;
    border-radius: 20px;
    text-decoration: none !important;
    font-weight: bold;
    z-index: 100;
    transition: background 0.3s ease;
}

.back-home-btn:hover {
    background: #f0a500;
    color: #000 !important;
}


/* ==========================================================================
   4. GALERIE & PANCARTES (ACCUEIL & MENU DYNAMIQUE)
   ========================================================================== */
.gallery-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 520px; /* Suppression du !important pour autoriser la surcharge mobile */
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 60px;
    box-sizing: border-box;
    background-size: cover !important;
    background-position: center top !important;
    background-repeat: no-repeat !important;
}

/* Le cadre / la pancarte */
.picture-frame {
    position: relative;
    display: block;
    text-decoration: none !important;
    background: linear-gradient(145deg, #db58a2, #db58a2);
    border: 3px solid #c8963e;
    border-radius: 6px;
    padding: 10px 14px;
    text-align: center;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.8), inset 0 0 10px rgba(0, 0, 0, 0.6);
    transform-origin: top center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Suppression du contour au clic et au focus sur les liens pancartes */
.picture-frame,
.picture-frame:focus,
.picture-frame:active,
.picture-frame:focus-visible {
    outline: none !important;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.8), inset 0 0 10px rgba(0, 0, 0, 0.6) !important;
}

/* Conserver uniquement le style au survol et focus pour l'accessibilité */
.picture-frame:hover,
.picture-frame:focus {
    border-color: #ffffff !important;
}

/* Le clou de fixation */
.picture-frame::before {
    content: '';
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: #8c7355;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.8), inset 0 1px 2px rgba(255, 255, 255, 0.5);
    z-index: 5;
}

/* La corde suspendue */
.picture-frame::after {
    content: '';
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 18px;
    border-top: 2px dashed #f0a500;
    border-left: 2px solid transparent;
    border-right: 2px solid transparent;
    z-index: 4;
}

/* Animation au survol */
.picture-frame:hover {
    transform: rotate(2deg) translateY(2px);
    border-color: #ffffff;
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.9), 0 0 15px rgba(240, 165, 0, 0.4);
}

.picture-frame:nth-child(even):hover {
    transform: rotate(-2deg) translateY(2px);
}

.frame-inner {
    display: flex;
    justify-content: center;
    align-items: center;
}

.frame-title {
    color: #fceabb !important;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.9);
    transition: color 0.3s ease;
}

.picture-frame:hover .frame-title {
    color: #ffffff !important;
}

/* --- Layout responsive du menu .gallery-wall / nav.gallery-wall --- */
@media (min-width: 769px) {
    .gallery-wall,
    nav.gallery-wall {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 15px !important;
        width: 100% !important;
        max-width: 1050px !important;
        margin: 0 auto !important;
    }

    .gallery-wall li,
    nav.gallery-wall li {
        list-style: none !important;
        margin: 0 !important;
        flex: 1 1 auto !important;
    }

    .gallery-wall li a.picture-frame,
    nav.gallery-wall li a.picture-frame {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        white-space: nowrap !important;
        text-decoration: none !important;
    }
}

@media (max-width: 768px) {
    .gallery-wrapper {
        padding-top: 150px !important; /* Ajuste la position haute sur mobile */
    }

    .gallery-wall,
    nav.gallery-wall {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 12px !important;
        width: 100% !important;
        max-width: 280px !important;
        margin: 0 auto !important;
    }

    .gallery-wall li,
    nav.gallery-wall li {
        width: 100% !important;
        list-style: none !important;
		margin-top: 20px;
    }

    .gallery-wall li a.picture-frame,
    nav.gallery-wall li a.picture-frame {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
    }
}


/* ==========================================================================
   5. TEMPLATE SCÉNARISÉ & DECOR (PRESENTATION, CARTE, ETC.)
   ========================================================================== */
body.page-scenarisee {
    overflow-y: auto !important;
    height: auto !important;
}

.scenedbackground {
    position: relative;
    width: 100%;
    min-height: 100vh !important;
    height: auto !important;
    background-size: cover !important;
    background-position: center top !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    overflow-x: hidden;
    z-index: 1;
}

.presentation-stage {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 85vh;
    padding: 60px 20px;
    position: relative;
    z-index: 10;
}

.presentation-card {
    background: rgba(20, 27, 13, 0.85);
    border: 2px solid #f0a500;
    border-radius: 16px;
    padding: 40px;
    max-width: 620px;
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.7);
}

.scened-title {
    color: #f0a500 !important;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 25px;
}

.anim-item, .text-line {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

/* Alignements spécifiques */
.presentation-card.align-slightly-right {
    margin-left: auto !important;
    margin-right: 15% !important;
    transform: translateX(60px) !important;
}

.presentation-card.align-slightly-left {
    margin-left: 15% !important;
    margin-right: auto !important;
    transform: translateX(-60px) !important;
}

.presentation-card.align-center,
.presentation-card.align-default {
    margin-left: auto !important;
    margin-right: auto !important;
    transform: none !important;
}


/* ==========================================================================
   6. PAGE CONTACT (PAGE ID 236)
   ========================================================================== */
body.page-id-236 .presentation-card,
body.page-id-236 .content-card,
body.page-id-236 .contact-container {
    max-width: 880px !important;
    width: 90% !important;
}

body.page-id-236 .contact-layout-wrapper {
    display: flex !important;
    flex-direction: row !important;
    gap: 30px !important;
    align-items: flex-start !important;
}

body.page-id-236 .contact-form-col {
    flex: 1.4 !important;
    width: 100% !important;
}

body.page-id-236 .contact-side-col {
    flex: 0.8 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    padding-left: 20px !important;
    border-left: 1px solid rgba(212, 175, 55, 0.3) !important;
}

body.page-id-236 .contact-info-block {
    color: #ffffff;
    font-size: 1.05rem;
    line-height: 1.8;
    text-align: left;
}

body.page-id-236 .contact-info-block p {
    margin: 8px 0 !important;
}

body.page-id-236 .contact-photo-block {
    text-align: center;
}

body.page-id-236 .contact-photo-block img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
    margin-top: 15px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
    body.page-id-236 .contact-layout-wrapper {
        flex-direction: column !important;
    }
    body.page-id-236 .contact-side-col {
        border-left: none !important;
        border-top: 1px solid rgba(212, 175, 55, 0.3) !important;
        padding-left: 0 !important;
        padding-top: 20px !important;
        width: 100% !important;
    }
	body.page-id-236 .presentation-card {
	    padding-left: 20px !important;
	padding-right: -160px !important;
    margin-left: -20px !important;
    margin-right: -140px !important;
   width: 105% !important;
    /* max-width: 130% !important; */
	}	
}

@media (max-width: 768px) and (orientation: landscape) {
    /* contact
iPhone horizontal */
    body.page-id-236 .presentation-card {
	padding-left: 20px !important;
	padding-right: -120px !important;
    margin-left: -20px !important;
    margin-right: -140px !important;
    width: 80% !important;
  /*  max-width: 130% !important; */
	}
	.contact-form-col, .wpcf7-form-control-wrap {
	width: 150% !important;
   /* max-width: 130% !important;*/
	margin-right: 220px !important;
	margin-left: 0px !important;
	}
}

@media (max-width: 768px) {
/* cliches
iPhone vertical */
    body.page-id-19 .presentation-card {
    margin-left: -25% !important;
    margin-right: -5% !important;
    transform: translateX(60px) !important;
    width: 105% !important;
}
}

@media (max-width: 768px) {
/* bouche a oreille
iPhone vertical */
    body.page-id-24 .presentation-card {
    margin-left: -38% !important;
    margin-right: -5% !important;
    transform: translateX(60px) !important;
    width: 100% !important;
}
}
@media (max-width: 768px) and (orientation: landscape) {
/* 
 iPhone horizontal */
    body.page-id-24 .presentation-card {
    margin-left: -28% !important;
    margin-right: -5% !important;
    transform: translateX(60px) !important;
    width: 120% !important;
}
}

@media (max-width: 768px) {
/* prestation
iPhone vertical */
    body.page-id-155 .presentation-card {
    margin-left: -38% !important;
    margin-right: -5% !important;
    transform: translateX(60px) !important;
    width: 107% !important;
}
}
/* ==========================================================================
   7. GALERIES D'IMAGES & MUR PHOTOGRAPHIQUE
   ========================================================================== */
.wp-block-gallery, 
.gallery {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
}

.wp-block-gallery .wp-block-image img,
.gallery-item img,
.cadre-bois-noir img,
.galerie-mur-cadres figure img {
    border: 2px solid #FFFFFF !important;
    outline: 2px solid #0a0a0a !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
    border-radius: 2px !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    cursor: pointer;
}

.wp-block-gallery .wp-block-image:hover img,
.gallery-item:hover img,
.cadre-bois-noir img:hover,
.galerie-mur-cadres figure img:hover {
    transform: translateY(-5px) scale(1.05) !important;
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.7) !important;
    z-index: 10 !important;
    position: relative !important;
}

/* Ajustement spécifique galerie 4 colonnes WP */
#gallery-1.gallery-columns-4 {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 15px !important;
    justify-content: flex-start !important;
}

#gallery-1.gallery-columns-4 br {
    display: none !important;
}

#gallery-1.gallery-columns-4 .gallery-item {
    width: calc(25% - 12px) !important;
    max-width: calc(25% - 12px) !important;
    margin: 0 !important;
    float: none !important;
    box-sizing: border-box !important;
}

#gallery-1.gallery-columns-4 .gallery-item img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
}


/* ==========================================================================
   8. FOOTER
   ========================================================================== */
footer, 
#colophon, 
.site-footer {
    width: 100% !important;
    max-width: 100% !important;
    clear: both !important;
    position: relative !important;
    z-index: 10 !important;
    background-color: #000 !important;
    color: #fff;
}

footer .site-info, 
#colophon .site-info, 
.footer-copyright {
    text-align: center !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 15px 0 !important;
}

/* Footer personnalisé Cigalia */
.cigalia-custom-footer {
    width: 100% !important;
    background: #dbc779 !important;
    backdrop-filter: blur(8px);
    border-top: 1px solid #dbc779;
    padding: 20px 0 !important;
    position: relative !important;
    z-index: 100 !important;
    clear: both !important;
}

.cigalia-custom-footer .footer-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    color: #e2e8f0;
    font-size: 0.95rem;
}

.cigalia-custom-footer .footer-links {
    margin-bottom: 8px;
    color: #000;
}

.cigalia-custom-footer .footer-links a {
    color: #000;
    text-decoration: none;
    margin: 0 8px;
    transition: color 0.3s ease;
}

.cigalia-custom-footer .footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}

.cigalia-custom-footer .copyright {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.8;
    color: #000;
}

p.copyright strong {
    color: #000;
}