/* wp-content/themes/astra-child/tzolkin-page.css */

/* Supprimer les éléments indésirables */
body.page-id-3936 .masthead,
body.page-id-3936 .header-bar,
body.page-id-3936 #wpadminbar {
    display: none;
}

/* Style de base avec image de fond */
body.page-id-3936,
html {
    background: url('https://leparede.org/wp-content/uploads/2025/05/Xbalanque.jpg') no-repeat center center fixed;
    background-size: auto 100%;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    width: 100vw;
    overflow-y: auto;
    position: relative;
    z-index: 0;
}

@media (orientation: landscape) {
    body.page-id-3936,
    html {
        background-size: 100% auto;
    }
}



/* Nettoyage des conteneurs */
body.page-id-3936 #page,
body.page-id-3936 #content,
body.page-id-3936 .site-content,
body.page-id-3936 .ast-container,
body.page-id-3936 #primary,
body.page-id-3936 .site-main,
body.page-id-3936 .entry-content {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    width: 100%;
    border: none;
    box-shadow: none;
    z-index: 1;
    background: transparent;
}

/* Ajustement #primary */
body.page-id-3936 #primary.content-area {
    margin-top: 0;
    padding-top: 0;
    min-height: 100vh;
    background: transparent;
}

/* Masquer les titres standards */
body.page-id-3936 .entry-title,
body.page-id-3936 .page-header,
body.page-id-3936 .entry-header,
body.page-id-3936 h1,
body.page-id-3936 .ast-title,
body.page-id-3936 .site-title {
    display: none;
    margin: 0;
    padding: 0;
    height: 0;
    visibility: hidden;
}

/* Conteneur des widgets et blocs Groupe */
body.page-id-3936 .entry-content .wp-block-group,
body.page-id-3936 .entry-content .wp-block-group:has(.widget_tzolkin-widget-interactive, .wp-block-astra-child-tzolkin-maya, .wp-block-table),
body.page-id-3936 .entry-content > div {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    z-index: 2;
    min-height: 100vh;
    box-sizing: border-box;
    background: transparent;
}

/* Préserver les styles Gutenberg pour le bloc Groupe */
body.page-id-3936 .entry-content .wp-block-group,
body.page-id-3936 .entry-content .wp-block-group.has-background,
body.page-id-3936 .entry-content .wp-block-group__inner-container {
    position: relative;
    z-index: 2;
    min-height: auto;
    width: 100%;
    padding: 20px;
    background: transparent;
}

/* Widgets */
body.page-id-3936 .entry-content .tzolkin-widget-container,
body.page-id-3936 .entry-content .widget_tzolkin-widget-interactive {
    width: 100%;
    max-width: 400px;
    min-height: 400px;
    margin: 20px auto;
    padding: 0;
    background: #ded2b3;
    position: relative;
    z-index: 3;
    border-radius: 16px;
    border: 2px solid #222;
    box-shadow: 0 2px 12px rgba(0,0,0,0.09);
    display: block;
    aspect-ratio: 1 / 1;
    overflow: visible;
}

/* Cadre carré */
body.page-id-3936 .tzolkin-square {
    width: 76%;
    max-width: 304px;
    height: 260px; /* 65% de 400px */
    margin: 48px auto 48px auto;
    position: relative;
    z-index: 3;
    border-radius: 16px;
    border: 2px solid #222;
    overflow: hidden;
}
/* Navigation */
body.page-id-3936 .tzolkin-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 4;
    background: #ded2b3;
}

body.page-id-3936 .tzolkin-nav-form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 0;
}

body.page-id-3936 .tzolkin-nav-prev,
body.page-id-3936 .tzolkin-nav-next {
    width: 40px;
    min-width: 40px;
    height: 100%;
    padding: 0;
    background: transparent;
    border: none;
    color: #000;
    font-size: 1.5em;
    cursor: pointer;
}

body.page-id-3936 .tzolkin-gregorian {
    font-size: 1em;
    color: #000;
}

/* Bouton reset */
body.page-id-3936 .tzolkin-widget-reset {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: #111;
    border-radius: 7px;
    border: none;
    z-index: 4;
    cursor: pointer;
}

/* Tableau */
body.page-id-3936 .wp-block-table {
    width: 100%;
    max-width: 600px;
    margin: 40px auto 20px auto;
    background: transparent;
    border-collapse: collapse;
    z-index: 2;
}

body.page-id-3936 .wp-block-table td {
    padding: 10px;
    vertical-align: top;
    border: 1px solid #ccc;
    background: transparent;
    text-align: left;
    min-height: 150px;
}

/* Shortcodes */
body.page-id-3936 .tzolkin-glyphe,
body.page-id-3936 .tzolkin-chiffre {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin: 0;
    padding: 0;
    min-height: 150px;
}

body.page-id-3936 .tzolkin-glyphe h3,
body.page-id-3936 .tzolkin-chiffre h3 {
    font-size: 1.2em;
    margin: 0.5em 0 0.25em 0;
    color: #333;
}

body.page-id-3936 .tzolkin-glyphe p,
body.page-id-3936 .tzolkin-chiffre p {
    font-size: 0.9em;
    margin: 0;
    color: #555;
}

body.page-id-3936 .tzolkin-glyphe-svg,
body.page-id-3936 .tzolkin-chiffre-svg {
    width: 50px;
    height: auto;
    margin-bottom: 0.5em;
    display: block;
}

/* Styles existants pour hover (inchangés) */
body.page-id-3936 .tzolkin-nav-prev:hover,
body.page-id-3936 .tzolkin-nav-next:hover {
    background: #ccc;
    color: #000;
    cursor: pointer;
}

body.page-id-3936 .tzolkin-gregorian:hover {
    color: #222;
    cursor: pointer;
}

body.page-id-3936 .tzolkin-square img:hover {
    transform: scale(1.1);
    cursor: pointer;
}

/* Classes pour simuler hover sur mobile */
body.page-id-3936 .tzolkin-nav-prev.active,
body.page-id-3936 .tzolkin-nav-next.active {
    background: #ccc;
    color: #000;
}

body.page-id-3936 .tzolkin-gregorian.active {
    color: #222;
}

body.page-id-3936 .tzolkin-square img.active {
    transform: scale(1.1);
}
/* Mobile */
@media (max-width: 768px) {
    body.page-id-3936 .wp-block-group,
    body.page-id-3936 .wp-block-group:has(.widget_tzolkin-widget-interactive, .wp-block-astra-child-tzolkin-maya, .wp-block-table),
    body.page-id-3936 .entry-content > div {
        width: 95%;
        max-width: 400px;
        padding: 10px;
        background: transparent;
    }

    body.page-id-3936 .tzolkin-widget-container,
    body.page-id-3936 .widget_tzolkin-widget-interactive {
        max-width: 300px;
        min-height: 300px;
        margin: 10px auto;
    }

    body.page-id-3936 .tzolkin-square {
        width: 80%;
        max-width: 240px;
        height: 192px; /* 60% de 300px */
        margin: 40px auto 40px auto;
    }

    body.page-id-3936 .tzolkin-nav-prev,
    body.page-id-3936 .tzolkin-nav-next {
        width: 32px;
        min-width: 32px;
        font-size: 1.2em;
    }

    body.page-id-3936 .tzolkin-gregorian {
        font-size: 0.9em;
    }

    body.page-id-3936 .wp-block-table {
        width: 100%;
        max-width: 100%;
        margin: 20px auto;
    }

    body.page-id-3936 .wp-block-table td {
        min-height: 120px;
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    body.page-id-3936 .tzolkin-glyphe,
    body.page-id-3936 .tzolkin-chiffre {
        min-height: 120px;
    }

    body.page-id-3936 .tzolkin-glyphe-svg,
    body.page-id-3936 .tzolkin-chiffre-svg {
        width: 40px;
    }
}