/*
Theme Name: Parenthèse Ligérienne — Complet
Theme URI: https://parentheseligerienne.fr
Author: Parenthèse Ligérienne
Description: Thème WordPress complet pour les trois appartements Parenthèse Ligérienne : pages éditables, galeries, formulaire de demande et calendriers iCal indicatifs.
Version: 1.0.0
Requires at least: 6.2
Requires PHP: 8.0
Text Domain: parenthese-ligerienne
*/

:root {
    --pl-ink: #273638;
    --pl-green: #365b50;
    --pl-green-dark: #28483f;
    --pl-sage: #dce7dd;
    --pl-sage-soft: #edf3ec;
    --pl-sand: #f5efe5;
    --pl-cream: #fffdf8;
    --pl-gold: #86623c;
    --pl-line: #ddd8ce;
    --pl-white: #fff;
    --pl-shadow: 0 18px 55px rgba(39, 54, 56, .10);
    --pl-radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--pl-cream);
    color: var(--pl-ink);
    font: 17px/1.7 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--pl-green); text-underline-offset: 3px; }
a:hover { color: var(--pl-green-dark); }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
.screen-reader-text, .skip-link:not(:focus), .pl-hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 10px; left: 10px; z-index: 999; background: white; padding: 10px 15px; }
.site-shell { width: min(1160px, calc(100% - 42px)); margin-inline: auto; }
.narrow-shell { width: min(820px, calc(100% - 42px)); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 253, 248, .96);
    border-bottom: 1px solid rgba(39, 54, 56, .09);
    backdrop-filter: blur(12px);
}
.admin-bar .site-header { top: 32px; }
.header-inner { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.site-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--pl-ink); text-decoration: none; flex: 0 0 auto; }
.site-brand img { width: 52px; height: 52px; }
.site-brand strong { display: block; font: 600 24px/1.1 Georgia, serif; }
.site-brand small { display: block; margin-top: 4px; color: var(--pl-gold); font-size: 9px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; }
.custom-logo-link img { max-height: 62px; width: auto; }
.primary-nav ul { display: flex; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.primary-nav a { color: var(--pl-ink); font-size: 14px; font-weight: 650; text-decoration: none; }
.primary-nav li:last-child a { display: inline-block; padding: 10px 16px; border-radius: 999px; background: var(--pl-green); color: white; }
.primary-nav a:hover { color: var(--pl-gold); }
.primary-nav li:last-child a:hover { background: var(--pl-green-dark); color: white; }
.menu-toggle { display: none; width: 46px; height: 42px; padding: 9px; border: 0; border-radius: 8px; background: transparent; }
.menu-toggle > span:not(.screen-reader-text) { display: block; height: 2px; margin: 5px 0; background: var(--pl-ink); }

h1, h2, h3, h4 { color: var(--pl-ink); font-family: Georgia, "Times New Roman", serif; font-weight: 400; line-height: 1.18; }
h1 { font-size: clamp(40px, 6vw, 72px); }
h2 { font-size: clamp(31px, 4vw, 48px); }
h3 { font-size: clamp(23px, 2.5vw, 31px); }
.pl-eyebrow { margin-bottom: 12px; color: var(--pl-gold); font-size: 12px; font-weight: 800; letter-spacing: 2.6px; text-transform: uppercase; }
.pl-lead { max-width: 760px; font-size: clamp(19px, 2vw, 23px); line-height: 1.55; }
.pl-price { display: inline-block; margin: 4px 0 18px; color: var(--pl-green); }

.wp-block-button__link, .button {
    display: inline-block;
    border: 1px solid var(--pl-green);
    border-radius: 999px;
    background: var(--pl-green);
    color: white;
    padding: 12px 22px;
    font-size: 15px;
    font-weight: 750;
    text-decoration: none;
    transition: transform .15s ease, background .15s ease;
}
.wp-block-button__link:hover, .button:hover { background: var(--pl-green-dark); color: white; transform: translateY(-1px); }
.is-style-outline > .wp-block-button__link { background: transparent; color: var(--pl-green); }
.is-style-outline > .wp-block-button__link:hover { background: var(--pl-green); color: white; }

.pl-hero { min-height: 620px; }
.pl-hero .wp-block-cover__background { background: linear-gradient(90deg, rgba(26, 40, 40, .78), rgba(26, 40, 40, .2)); opacity: 1; }
.pl-hero .wp-block-cover__inner-container { width: min(1120px, calc(100% - 42px)); margin-inline: auto; }
.pl-hero .wp-block-cover__inner-container > * { max-width: 760px; }
.pl-hero h1, .pl-hero p { color: white; text-shadow: 0 2px 20px rgba(0,0,0,.22); }
.pl-hero .pl-eyebrow { color: #f0cf9c; }
.pl-hero .wp-block-button__link { border-color: white; background: white; color: var(--pl-green-dark); text-shadow: none; }
.pl-hero-fallback { padding: 110px max(24px, calc((100vw - 1120px) / 2)); background: linear-gradient(125deg, var(--pl-sage), var(--pl-sand)); }

.pl-section { padding: 76px max(0px, calc((100vw - 1120px) / 2)); }
.front-content > .pl-section > *, .page-content > .pl-section > * { width: min(1120px, calc(100% - 42px)); margin-left: auto; margin-right: auto; }
.page-content > .pl-section { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.pl-section-tint { background: var(--pl-sand); }
/* Keep nightly price and additional charges visually grouped. */
.pl-section .pl-price { display: block; margin-bottom: 0 !important; }
.pl-section .pl-price + .pl-price-note { margin-top: 2px !important; }
.pl-columns { gap: 28px; }
.pl-columns > .wp-block-column { padding: 24px; border: 1px solid var(--pl-line); border-radius: var(--pl-radius); background: var(--pl-white); box-shadow: 0 8px 30px rgba(39, 54, 56, .05); }
.pl-columns .wp-block-image { margin: -24px -24px 22px; overflow: hidden; border-radius: var(--pl-radius) var(--pl-radius) 0 0; }
.pl-columns .wp-block-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.pl-columns h3 { margin-top: 12px; margin-bottom: 9px; }
.pl-notice { padding: 22px 24px; border-left: 4px solid var(--pl-gold); border-radius: 0 12px 12px 0; background: var(--pl-sand); }
@media (min-width: 769px) {
body.page-id-90002 .page-header { padding-bottom: 30px; }
body.page-id-90002 .pl-section { padding-top: 48px; padding-bottom: 48px; }

body:is(.page-id-90003, .page-id-90004, .page-id-90005) .page-header { margin-bottom: 14px; }
body:is(.page-id-90003, .page-id-90004, .page-id-90005) .pl-section { padding-top: 24px; padding-bottom: 24px; }
body:is(.page-id-90003, .page-id-90004, .page-id-90005) .page-header + .pl-section > * {
    display: block;
    width: min(760px, calc(100% - 42px));
    margin-left: auto;
    margin-right: auto;
}
body:is(.page-id-90003, .page-id-90004, .page-id-90005) .page-header + .pl-section .pl-eyebrow { margin-top: 0; margin-bottom: 8px; }
body:is(.page-id-90003, .page-id-90004, .page-id-90005) .page-header + .pl-section .pl-price { margin-top: 0; margin-bottom: 0; }
body:is(.page-id-90003, .page-id-90004, .page-id-90005) .page-header + .pl-section .pl-price-note { margin-top: 2px; margin-bottom: 18px; }
body:is(.page-id-90003, .page-id-90004, .page-id-90005) .page-header + .pl-section .pl-lead { margin-top: 0; margin-bottom: 0; }
body:is(.page-id-90003, .page-id-90004, .page-id-90005) .gallery { margin-top: 16px; margin-bottom: 28px; }
}
.pl-photo-placeholder { min-height: 230px; display: grid; place-items: center; margin: -24px -24px 22px; border-radius: var(--pl-radius) var(--pl-radius) 0 0; background: linear-gradient(135deg, #b9c8ba, #e5d5bd); color: white; text-transform: uppercase; letter-spacing: 2px; font-size: 12px; }
.pl-photo-placeholder-large { min-height: 430px; margin: 30px 0; border-radius: var(--pl-radius); }

.page-shell { padding-top: 64px; padding-bottom: 90px; }
.page-header { max-width: 920px; margin-bottom: 42px; }
.page-header h1 { margin: 0; }
.page-content > p, .page-content > h2, .page-content > h3, .page-content > ul, .page-content > .wp-block-buttons, .page-content > .wp-block-shortcode { max-width: 880px; }
.page-content .gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 30px 0 55px; }
.page-content .gallery-item { width: auto !important; margin: 0 !important; }
.page-content .gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 0 !important; border-radius: 12px; }
.page-content .gallery-caption { font-size: 12px; }
.pl-photo-viewer { width: min(1100px, 95vw); max-width: 95vw; max-height: 94dvh; padding: 18px; border: 0; border-radius: 14px; background: #fffdf8; color: #273638; }
.pl-photo-viewer::backdrop { background: rgba(15, 25, 28, .88); }
.pl-photo-viewer figure { margin: 12px 0; text-align: center; }
.pl-photo-viewer img { display: block; width: 100%; height: min(67dvh, 750px); object-fit: contain; }
.pl-photo-viewer figcaption { padding: 12px 0 0; font-size: 15px; }
.pl-photo-viewer button { cursor: pointer; padding: 9px 16px; border: 1px solid #273638; border-radius: 22px; background: transparent; color: inherit; }
.pl-photo-close { display: block; margin-left: auto; }
.pl-photo-controls { display: flex; justify-content: space-between; gap: 12px; }
.pl-photo-viewer button:focus-visible { outline: 3px solid #b88955; outline-offset: 3px; }
.wp-block-list li { margin-bottom: 8px; }

.pl-form { max-width: 900px; margin-top: 32px; padding: clamp(22px, 4vw, 44px); border: 1px solid var(--pl-line); border-radius: var(--pl-radius); background: white; box-shadow: var(--pl-shadow); }
.pl-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.pl-form label { display: block; color: var(--pl-ink); font-size: 14px; font-weight: 700; }
.pl-form input:not([type="checkbox"]), .pl-form select, .pl-form textarea { width: 100%; margin-top: 7px; padding: 12px 13px; border: 1px solid #bdbeb9; border-radius: 8px; background: var(--pl-cream); color: var(--pl-ink); }
.pl-form input:focus, .pl-form select:focus, .pl-form textarea:focus { outline: 3px solid rgba(54, 91, 80, .18); border-color: var(--pl-green); }
.pl-form fieldset { margin: 24px 0; padding: 18px; border: 1px solid var(--pl-line); border-radius: 10px; }
.pl-form legend { padding: 0 8px; font-weight: 800; }
.pl-form .pl-check { display: block; margin: 8px 0; font-weight: 500; }
.pl-form .pl-check input { margin-right: 8px; }
.pl-consent { margin: 22px 0 !important; }
.pl-form-note { font-size: 14px; color: #526164; }
.pl-form-success, .pl-form-error { max-width: 900px; margin: 20px 0; padding: 18px 20px; border-radius: 10px; }
.pl-form-success { border: 1px solid #7da28d; background: #e7f4ea; }
.pl-form-error { border: 1px solid #bd7777; background: #f9e9e9; }

.pl-calendars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 26px; }
.pl-calendar { padding: 18px; border: 1px solid var(--pl-line); border-radius: 12px; background: white; }
.pl-calendar h3 { margin: 0 0 14px; font-size: 22px; text-transform: capitalize; }
.pl-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.pl-calendar-grid > span { display: grid; place-items: center; min-height: 32px; border-radius: 5px; font-size: 13px; }
.pl-calendar-dayname { color: var(--pl-green); font-weight: 800; }
.pl-calendar-date.is-busy { background: #d5b9ae; color: #6a352d; text-decoration: line-through; }
.pl-calendar-date.is-past { color: #586466; background-color: #f1f1ed; }
.pl-calendar-date.is-past.is-busy { color: #6a352d; background-color: #d5b9ae; }
.pl-calendar-legend { font-size: 13px; }
.pl-calendar-legend span { display: inline-block; width: 14px; height: 14px; margin-right: 5px; border-radius: 3px; background: #d5b9ae; vertical-align: -2px; }
.pl-calendar-empty { padding: 20px; border-radius: 10px; background: var(--pl-sage-soft); }

.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.post-card { overflow: hidden; padding: 24px; border: 1px solid var(--pl-line); border-radius: var(--pl-radius); background: white; }
.post-card > a:first-child { display: block; margin: -24px -24px 22px; }
.post-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post-card h2 { margin-top: 5px; font-size: 30px; }
.post-card h2 a { color: var(--pl-ink); text-decoration: none; }
.single-image img { width: 100%; border-radius: var(--pl-radius); }

.site-footer { padding: 58px 0 22px; background: var(--pl-ink); color: rgba(255,255,255,.84); font-size: 14px; }
.site-footer a { color: white; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 45px; }
.footer-title { color: white; font: 400 26px Georgia, serif; }
.footer-grid strong { color: white; }
.footer-bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.14); font-size: 12px; }

@media (max-width: 900px) {
    .admin-bar .site-header { top: 46px; }
    .menu-toggle { display: block; }
    .primary-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; padding: 12px 21px 22px; border-bottom: 1px solid var(--pl-line); background: var(--pl-cream); box-shadow: var(--pl-shadow); }
    .primary-nav.is-open { display: block; }
    .primary-nav ul { display: block; }
    .primary-nav li { margin: 6px 0; }
    .primary-nav a { display: block; padding: 9px 0; }
    .primary-nav li:last-child a { display: inline-block; padding: 10px 16px; }
    .pl-calendars { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    body { font-size: 16px; }
    .site-shell { width: min(100% - 28px, 1160px); }
    .header-inner { min-height: 72px; }
    .site-brand img { width: 44px; height: 44px; }
    .site-brand strong { font-size: 19px; }
    .site-brand small { font-size: 7.5px; }
    .pl-hero { min-height: 520px !important; }
    .pl-hero .wp-block-cover__inner-container { width: calc(100% - 28px); }
    .pl-section { padding-top: 50px; padding-bottom: 50px; }
    .front-content > .pl-section > *, .page-content > .pl-section > * { width: calc(100% - 28px); }
    .wp-block-columns.pl-columns { display: block; }
    .pl-columns > .wp-block-column { margin-bottom: 22px; }
    .page-shell { padding-top: 42px; }
    .page-content .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pl-form-grid, .post-grid, .footer-grid { grid-template-columns: 1fr; }
    .footer-grid { gap: 22px; }

    body:is(.page-id-90003, .page-id-90004, .page-id-90005) .page-header { margin-bottom: 10px; }
    body:is(.page-id-90003, .page-id-90004, .page-id-90005) .pl-section { padding-top: 20px; padding-bottom: 20px; }
    body:is(.page-id-90003, .page-id-90004, .page-id-90005) .page-header + .pl-section > * {
        display: block;
        width: calc(100% - 28px);
        margin-left: auto;
        margin-right: auto;
    }
    body:is(.page-id-90003, .page-id-90004, .page-id-90005) .page-header + .pl-section .pl-eyebrow { margin-top: 0; margin-bottom: 8px; }
    body:is(.page-id-90003, .page-id-90004, .page-id-90005) .page-header + .pl-section .pl-price { margin-top: 0; margin-bottom: 0; }
    body:is(.page-id-90003, .page-id-90004, .page-id-90005) .page-header + .pl-section .pl-price-note { margin-top: 2px; margin-bottom: 18px; }
    body:is(.page-id-90003, .page-id-90004, .page-id-90005) .page-header + .pl-section .pl-lead { margin-top: 0; margin-bottom: 0; }
    body:is(.page-id-90003, .page-id-90004, .page-id-90005) .gallery { margin-top: 14px; margin-bottom: 24px; }
}

