/*
Theme Name: La Guitare dans la Poche
Theme URI: https://atelier-polyvalent.fr/
Author: Dominique Dudon / Atelier Polyvalent
Description: Thème WordPress administrable sans code pour La Guitare dans la Poche, avec une seule colonne de widgets cohérente pour le blog.
Version: 2.0.0
Requires at least: 6.2
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: la-guitare-dans-la-poche
Tags: blog, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, block-styles, wide-blocks
*/

:root {
    --apx-primary: #211A17;
    --apx-accent: #C65028;
    --apx-accent-2: #F5A23B;
    --apx-link: #A93F1E;
    --apx-bg: #F7E8CF;
    --apx-surface: #FFFDF8;
    --apx-sidebar: #FFF9EF;
    --apx-text: #2B211C;
    --apx-muted: #75665D;
    --apx-container: 1180px;
    --apx-sidebar-width: 320px;
    --apx-radius: 18px;
    --apx-shadow: 0 10px 30px rgba(18,28,45,.08);
    --apx-body-font: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    --apx-heading-font: Georgia,"Times New Roman",serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--apx-bg);
    color: var(--apx-text);
    font-family: var(--apx-body-font);
    font-size: 17px;
    line-height: 1.7;
}
img { max-width: 100%; height: auto; }
a { color: var(--apx-link); text-underline-offset: .16em; }
a:hover { text-decoration-thickness: 2px; }
h1,h2,h3,h4,h5,h6 {
    color: var(--apx-primary);
    font-family: var(--apx-heading-font);
    line-height: 1.16;
}
button,input,select,textarea { font: inherit; }
.screen-reader-text {
    position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0
}
.screen-reader-text:focus,.apx-skip-link:focus {
    position:fixed!important;left:16px;top:16px;width:auto;height:auto;padding:12px 16px;margin:0;clip:auto;background:#fff;color:#111;z-index:100000
}

.apx-site-header {
    background: var(--apx-primary);
    border-bottom: 3px solid var(--apx-accent);
    color: #fff;
}
.apx-header-inner {
    width: min(var(--apx-container), calc(100% - 32px));
    min-height: 92px;
    margin: 0 auto;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:28px;
}
.apx-brand { display:flex;align-items:center;gap:14px;min-width:0; }
.apx-brand .custom-logo,.apx-default-logo img {
    display:block;
    max-width:240px;
    max-height:68px;
    width:auto;
    height:auto;
}
.apx-default-logo { display:inline-flex;flex:0 0 auto; }
.apx-brand-copy { display:flex;flex-direction:column;min-width:0; }
.apx-site-title {
    color:#fff;
    font-size:1.3rem;
    font-weight:850;
    line-height:1.1;
    text-decoration:none;
}
.apx-site-description {
    margin-top:4px;
    color:rgba(255,255,255,.72);
    font-size:.76rem;
    letter-spacing:.08em;
    text-transform:uppercase;
}
.apx-primary-navigation ul {
    display:flex;
    align-items:center;
    gap:6px;
    list-style:none;
    margin:0;
    padding:0;
}
.apx-primary-navigation li { position:relative; }
.apx-primary-navigation a {
    display:block;
    padding:9px 11px;
    border-radius:9px;
    color:#fff;
    font-weight:700;
    text-decoration:none;
}
.apx-primary-navigation a:hover,
.apx-primary-navigation .current-menu-item > a {
    background:rgba(255,255,255,.12);
}
.apx-primary-navigation .sub-menu {
    display:none;
    position:absolute;
    top:100%;
    left:0;
    z-index:1000;
    min-width:220px;
    padding:8px 0;
    flex-direction:column;
    align-items:stretch;
    background:var(--apx-primary);
    border:1px solid rgba(255,255,255,.16);
    border-radius:10px;
    box-shadow:0 16px 36px rgba(0,0,0,.22);
}
.apx-primary-navigation li:hover > .sub-menu,
.apx-primary-navigation li:focus-within > .sub-menu { display:flex; }
.apx-primary-navigation .sub-menu a { border-radius:0;white-space:nowrap; }
.apx-menu-toggle {
    display:none;
    padding:9px 12px;
    border:1px solid rgba(255,255,255,.35);
    border-radius:9px;
    background:transparent;
    color:#fff;
    font-weight:800;
    cursor:pointer;
}

.apx-shell {
    width:min(var(--apx-container),calc(100% - 32px));
    margin:40px auto 68px;
}
.apx-layout {
    display:grid;
    grid-template-columns:minmax(0,1fr) var(--apx-sidebar-width);
    gap:34px;
    align-items:start;
}
.apx-layout-full .apx-content {
    width:min(100%,900px);
    margin-inline:auto;
}
.apx-page-shell.apx-layout-full .apx-content { width:min(100%,1100px); }
.apx-content { min-width:0; }

.apx-article-surface,
.apx-page,
.apx-blog-header,
.apx-empty-state {
    padding:clamp(24px,4vw,44px);
    border:1px solid rgba(23,38,59,.10);
    border-radius:var(--apx-radius);
    background:var(--apx-surface);
    box-shadow:var(--apx-shadow);
}
.apx-entry-header h1,.apx-blog-header h1 { margin-top:0;margin-bottom:.65rem; }
.apx-entry-meta {
    display:flex;
    flex-wrap:wrap;
    gap:7px;
    margin:.45rem 0 1.5rem;
    color:var(--apx-muted);
    font-size:.88rem;
}
.apx-entry-meta a { color:inherit; }
.apx-featured-image { margin:0 0 28px; }
.apx-featured-image img {
    display:block;
    width:100%;
    border-radius:calc(var(--apx-radius) - 4px);
}
.apx-entry-content > *:first-child { margin-top:0; }
.apx-entry-content > *:last-child { margin-bottom:0; }
.apx-entry-content iframe,.apx-entry-content video { max-width:100%; }
.apx-entry-footer {
    margin-top:32px;
    padding-top:18px;
    border-top:1px solid rgba(23,38,59,.12);
    font-size:.92rem;
}
.apx-blog-header { margin-bottom:28px; }
.apx-kicker {
    margin:0 0 .4rem;
    color:var(--apx-accent-2);
    font-size:.8rem;
    font-weight:850;
    letter-spacing:.1em;
    text-transform:uppercase;
}

.apx-post-grid {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:24px;
}
.apx-blog-columns-1 .apx-post-grid { grid-template-columns:1fr; }
.apx-post-card {
    min-width:0;
    overflow:hidden;
    display:flex;
    flex-direction:column;
    border:1px solid rgba(23,38,59,.10);
    border-radius:var(--apx-radius);
    background:#fff;
    box-shadow:var(--apx-shadow);
}
.apx-post-card-image {
    display:block;
    aspect-ratio:16/9;
    overflow:hidden;
    background:rgba(23,38,59,.06);
}
.apx-post-card-image img {
    width:100%;
    height:100%;
    object-fit:cover;
    transition:transform .2s ease;
}
.apx-post-card:hover .apx-post-card-image img { transform:scale(1.02); }
.apx-post-card-body {
    display:flex;
    flex:1;
    flex-direction:column;
    padding:24px;
}
.apx-post-card h2 { margin:0;font-size:clamp(1.3rem,2vw,1.7rem); }
.apx-post-card h2 a { color:var(--apx-primary);text-decoration:none; }
.apx-card-excerpt p { margin-top:.5rem; }
.apx-read-more { margin-top:auto;font-weight:800;text-decoration:none; }

.apx-sidebar {
    display:flex;
    flex-direction:column;
    gap:22px;
    min-width:0;
}
.apx-widget {
    overflow:hidden;
    padding:22px;
    border:1px solid rgba(23,38,59,.10);
    border-radius:var(--apx-radius);
    background:var(--apx-sidebar);
    box-shadow:var(--apx-shadow);
}
.apx-widget-title,
.apx-widget .wp-block-heading { margin-top:0;font-size:1.22rem; }
.apx-widget ul { padding-left:1.15rem; }
.apx-widget img,.apx-widget iframe { max-width:100%; }
.apx-widget input:not([type="checkbox"]),.apx-widget select,.apx-widget textarea { width:100%; }

.wp-block-button__link,
button[type="submit"],
input[type="submit"] {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:46px;
    padding:11px 18px;
    border:2px solid var(--apx-accent);
    border-radius:10px;
    background:var(--apx-accent);
    color:var(--apx-primary);
    font-weight:850;
    text-decoration:none;
    cursor:pointer;
}
.wp-block-button__link:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
    border-color:var(--apx-primary);
    background:var(--apx-primary);
    color:#fff;
}
input[type="text"],input[type="email"],input[type="url"],input[type="password"],input[type="search"],select,textarea {
    max-width:100%;
    min-height:44px;
    padding:10px 12px;
    border:1px solid rgba(23,38,59,.22);
    border-radius:9px;
    background:#fff;
    color:var(--apx-text);
}
textarea { min-height:150px;resize:vertical; }

.navigation.pagination,.post-navigation { margin:30px 0; }
.nav-links { display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap; }
.page-numbers {
    display:inline-grid;
    place-items:center;
    min-width:42px;
    min-height:42px;
    padding:6px;
    border:1px solid rgba(23,38,59,.14);
    border-radius:9px;
    background:#fff;
    text-decoration:none;
}
.page-numbers.current { background:var(--apx-primary);color:#fff; }

.apx-comments {
    margin-top:30px;
    padding:clamp(22px,4vw,38px);
    border-radius:var(--apx-radius);
    background:#fff;
    box-shadow:var(--apx-shadow);
}
.comment-list,.comment-list .children { list-style:none;margin:0;padding:0; }
.comment-list .children { margin-left:clamp(16px,4vw,38px); }
.comment-list > li { padding:20px 0;border-bottom:1px solid rgba(23,38,59,.12); }
.comment-author { display:flex;align-items:center;gap:10px;font-weight:800; }
.comment-author .avatar { border-radius:50%; }
.comment-metadata { color:var(--apx-muted);font-size:.85rem; }
.comment-form { display:grid;gap:14px; }
.comment-form p { margin:0; }
.comment-form label { display:block;margin-bottom:5px;font-weight:700; }
.comment-form input:not([type="checkbox"]),.comment-form textarea { width:100%; }
.comment-form-cookies-consent { display:flex;align-items:flex-start;gap:8px; }
.comment-form-cookies-consent label { font-weight:400; }

.apx-site-footer {
    background:var(--apx-primary);
    color:rgba(255,255,255,.78);
}
.apx-footer-inner {
    width:min(var(--apx-container),calc(100% - 32px));
    margin:auto;
    padding:28px 0;
    display:flex;
    justify-content:space-between;
    gap:22px;
    flex-wrap:wrap;
}
.apx-site-footer a { color:#fff; }
.apx-footer-nav ul {
    display:flex;
    gap:14px;
    list-style:none;
    margin:0;
    padding:0;
    flex-wrap:wrap;
}

.apx-error-code {
    margin:0;
    color:var(--apx-accent);
    font-size:clamp(4rem,13vw,8rem);
    font-weight:950;
    line-height:1;
}

.alignwide { width:min(var(--apx-container),100%);max-width:none;margin-left:auto;margin-right:auto; }
.alignfull { width:100vw;max-width:none;margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw); }

.woocommerce .products ul,.woocommerce ul.products { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px; }
.woocommerce ul.products::before,.woocommerce ul.products::after { display:none; }
.woocommerce ul.products li.product { width:auto!important;margin:0!important; }
.apx-woocommerce-content {
    padding:clamp(22px,4vw,42px);
    border-radius:var(--apx-radius);
    background:#fff;
    box-shadow:var(--apx-shadow);
}

@media (max-width:960px) {
    .apx-header-inner { min-height:82px;flex-wrap:wrap;padding:12px 0; }
    .apx-menu-toggle { display:inline-flex;align-items:center;gap:8px;margin-left:auto; }
    .apx-primary-navigation { display:none;order:5;width:100%;padding-bottom:12px; }
    .apx-primary-navigation.is-open { display:block; }
    .apx-primary-navigation ul { align-items:stretch;flex-direction:column;width:100%; }
    .apx-primary-navigation .sub-menu {
        display:block;
        position:static;
        margin-left:16px;
        padding:0;
        border:0;
        box-shadow:none;
        background:transparent;
    }
    .apx-layout { grid-template-columns:1fr; }
    .apx-sidebar { order:2; }
    .woocommerce .products ul,.woocommerce ul.products { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width:680px) {
    .apx-header-inner,.apx-shell,.apx-footer-inner { width:min(100% - 22px,var(--apx-container)); }
    .apx-brand .custom-logo,.apx-default-logo img { max-width:170px;max-height:56px; }
    .apx-site-description { display:none; }
    .apx-post-grid { grid-template-columns:1fr; }
    .apx-article-surface,.apx-page,.apx-blog-header,.apx-empty-state,.apx-comments { padding:20px; }
    .apx-footer-inner { flex-direction:column; }
    .woocommerce .products ul,.woocommerce ul.products { grid-template-columns:1fr; }
}
