/*
Theme Name: OCOPO Membres
Theme URI: https://wpocopo.com/
Author: OCOPO
Description: Thème blocs natif pour la plateforme pédagogique OCOPO.
Version: 1.0.2
Requires at least: 6.7
Requires PHP: 8.1
Text Domain: ocopo-members
*/

/* Override these --ocopo-* tokens in Global Styles / Additional CSS. */
.wp-site-blocks > .wp-block-template-part,.wp-site-blocks > .wp-block-ocopo-member-home {margin-block:0;}
.wp-site-blocks {min-height:100vh;}
.ocopo-shell,[class*="wp-block-ocopo-"] {
 --ocopo-ink:var(--wp--preset--color--ocopo-ink,oklch(19% .006 250));
 --ocopo-paper:var(--wp--preset--color--ocopo-paper,oklch(97% .006 85));
 --ocopo-muted:oklch(48% .008 250);--ocopo-line:oklch(80% .008 85);
 --ocopo-font:var(--wp--preset--font-family--ocopo-sans,system-ui,sans-serif);
 font-family:var(--ocopo-font);box-sizing:border-box;
}
.ocopo-shell {display:grid;grid-template-columns:280px minmax(0,1fr);background:var(--ocopo-paper);color:var(--ocopo-ink);min-height:calc(100vh - 72px);margin-block:0!important;gap:0;}
.ocopo-shell > .ocopo-course-navigation {align-self:start;position:sticky;top:0;max-height:100vh;overflow:auto;min-height:calc(100vh - 72px);margin:0;}
.admin-bar .ocopo-shell > .ocopo-course-navigation {top:32px;max-height:calc(100vh - 32px);min-height:calc(100vh - 32px);}
.ocopo-main {font-size:1.0625rem;padding:64px 40px 88px;min-width:0;box-sizing:border-box;width:100%;margin:0!important;}
.ocopo-main h1 {font-family:inherit;font-size:2.5rem;line-height:1.15;font-weight:650;letter-spacing:-.025em;text-wrap:balance;margin-bottom:40px;}
.ocopo-main h2 {font-family:inherit;font-size:1.6rem;line-height:1.3;}
.ocopo-main .wp-block-post-content {line-height:1.7;overflow-wrap:anywhere;}
.ocopo-main img,.ocopo-main video,.ocopo-main iframe {max-width:100%;}
.ocopo-main pre {overflow:auto;}
.ocopo-course-navigation {background:var(--ocopo-ink);color:var(--ocopo-paper);padding:28px 20px;font-size:.875rem;}
.ocopo-course-navigation a {color:inherit;text-decoration:none;}
.ocopo-course-title {font-size:1.125rem;font-weight:650;line-height:1.4;}
.ocopo-eyebrow {font-size:.7rem;letter-spacing:.12em;font-weight:650;}
.ocopo-mobile-menu > summary {cursor:pointer;min-height:44px;padding-block:10px;}
.ocopo-module {border-top:1px solid oklch(40% .008 250);margin-top:20px;}
.ocopo-module summary {cursor:pointer;min-height:44px;box-sizing:border-box;padding:14px 0;font-weight:600;}
.ocopo-timeline {list-style:none;border-inline-start:1px solid oklch(55% .008 250);padding:0 0 0 12px;margin:0 0 20px 4px;}
.ocopo-timeline li {position:relative;margin-block:2px;padding:4px 8px 10px;}
.ocopo-timeline a {display:flex;align-items:center;min-height:44px;line-height:1.45;}
.ocopo-timeline .is-current {background:oklch(32% .008 250);outline:1px solid oklch(56% .008 250);}
.ocopo-lesson-state {display:block;font-size:.7rem;color:oklch(83% .006 85);}
.ocopo-controls {display:flex;align-items:center;justify-content:space-between;gap:24px;flex-wrap:wrap;}
.ocopo-controls form {margin:0;margin-inline-start:auto;}
.ocopo-button {display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:12px 22px;background:var(--ocopo-ink);color:var(--ocopo-paper);border:1px solid var(--ocopo-ink);border-radius:3px;font:600 1rem/1.4 var(--ocopo-font);text-decoration:none;cursor:pointer;box-sizing:border-box;transition:opacity 160ms ease-out;}
.ocopo-button:hover {opacity:.85;}
.ocopo-button:disabled {opacity:.65;cursor:wait;}
.ocopo-controls > a,.ocopo-chapter li a {display:inline-flex;align-items:center;min-height:44px;}
.ocopo-lesson-controls {border-top:1px solid var(--ocopo-line);padding-top:24px;margin-top:56px;}
.ocopo-position,.ocopo-progress-copy {font-size:.875rem;color:var(--ocopo-muted);}
.ocopo-error {font-size:.95rem;font-weight:600;}
.ocopo-error:empty {display:none;}
.ocopo-resume-course progress {width:100%;height:5px;accent-color:var(--ocopo-ink);display:block;}
.ocopo-chapter {border-top:1px solid var(--ocopo-line);padding-block:28px;}
.ocopo-chapter h2 {margin-top:0;}
.ocopo-chapter h2 a {text-decoration:none;color:inherit;}
.ocopo-chapter li span {display:block;font-size:.8rem;color:var(--ocopo-muted);}
.ocopo-chapter li {padding-block:4px;}
.ocopo-shell :focus-visible,[class*="wp-block-ocopo-"] :focus-visible {outline:2px solid currentColor;outline-offset:4px;}
@media(max-width:800px) {
 .ocopo-shell {display:block;}
 .ocopo-shell > .ocopo-course-navigation,.admin-bar .ocopo-shell > .ocopo-course-navigation {position:relative;top:auto;min-height:0;max-height:none;padding:12px 20px;}
 .ocopo-mobile-menu > summary {display:list-item;cursor:pointer;min-height:44px;padding-block:12px;box-sizing:border-box;font-weight:600;}
 .ocopo-main {padding:32px 20px 56px;}
 .ocopo-main h1 {font-size:2rem;}
}
@media(prefers-reduced-motion:reduce) {.ocopo-button {transition:none;}}

.ocopo-chapter ol {list-style:none;padding-inline-start:0;}

/* Global member site — shared with the FSE templates. */
.ocopo-site-header,.ocopo-site-footer,.ocopo-member-home,.ocopo-standard-page {--ocopo-ink:var(--wp--preset--color--ocopo-ink,oklch(19% .006 250));--ocopo-paper:var(--wp--preset--color--ocopo-paper,oklch(97% .006 85));--ocopo-muted:oklch(48% .008 250);--ocopo-line:oklch(80% .008 85);--ocopo-soft:oklch(92% .006 85);--ocopo-font:var(--wp--preset--font-family--ocopo-sans,system-ui,sans-serif);font-family:var(--ocopo-font);box-sizing:border-box;}
.ocopo-site-header {background:var(--ocopo-ink);color:var(--ocopo-paper);margin:0!important;position:relative;z-index:2;}
.ocopo-header-inner,.ocopo-footer-inner {width:min(1180px,calc(100% - 48px));margin:auto;display:flex;align-items:center;justify-content:space-between;gap:32px;min-height:72px;}
.ocopo-wordmark {color:inherit;text-decoration:none;font-weight:800;font-size:1.25rem;letter-spacing:-.04em;line-height:1;white-space:nowrap;margin:0;}
.ocopo-wordmark a {color:inherit;text-decoration:none;}
.ocopo-wordmark span {color:oklch(72% .006 85);}
.ocopo-site-header ul,.ocopo-site-footer ul {display:flex;align-items:center;gap:28px;list-style:none;padding:0;margin:0;}
.ocopo-site-header a,.ocopo-site-footer a {color:inherit;text-decoration:none;}
.ocopo-site-header nav a {display:flex;align-items:center;min-height:44px;font-size:.875rem;font-weight:600;}
.ocopo-site-header nav a:hover,.ocopo-site-footer nav a:hover {text-decoration:underline;text-underline-offset:4px;}
body:not(.logged-in) .ocopo-auth-only {display:none!important;}
.ocopo-primary-navigation .wp-block-navigation__responsive-container.is-menu-open {background:var(--ocopo-ink)!important;color:var(--ocopo-paper)!important;padding:24px;}
.ocopo-site-header .wp-block-navigation__responsive-container-close,.ocopo-site-header .wp-block-navigation__responsive-container-open {color:inherit;min-width:44px;min-height:44px;align-items:center;justify-content:center;}
.ocopo-member-home {background:var(--ocopo-paper);color:var(--ocopo-ink);min-height:calc(100vh - 184px);padding:72px max(24px,calc((100vw - 1180px)/2));margin:0!important;}
.ocopo-kicker {font-size:.7rem!important;line-height:1.4!important;letter-spacing:.13em;font-weight:750;color:var(--ocopo-muted);margin:0 0 12px!important;}
.ocopo-login {width:min(100%,420px);margin:clamp(24px,7vh,88px) auto;}
.ocopo-login h1,.ocopo-catalogue h1 {font-family:inherit;font-size:clamp(2.25rem,5vw,4rem);line-height:1.02;font-weight:680;letter-spacing:-.045em;margin:0 0 18px;text-wrap:balance;}
.ocopo-login > p:not(.ocopo-kicker):not(.ocopo-login-help) {color:var(--ocopo-muted);line-height:1.6;margin-bottom:36px;}
.ocopo-login form p {margin:0 0 20px;}
.ocopo-login label {display:block;font-size:.875rem;font-weight:650;margin-bottom:8px;}
.ocopo-login input[type="text"],.ocopo-login input[type="password"] {width:100%;min-height:50px;padding:11px 13px;border:1px solid var(--ocopo-line);border-radius:3px;background:oklch(99% .003 85);color:var(--ocopo-ink);font:inherit;box-sizing:border-box;}
.ocopo-login input:focus-visible {outline:2px solid var(--ocopo-ink);outline-offset:2px;border-color:var(--ocopo-ink);}
.ocopo-login .ocopo-login-options {display:flex;align-items:center;justify-content:space-between;gap:20px;font-size:.825rem;margin-block:-4px 24px;}
.ocopo-login-options label {display:flex;align-items:center;gap:7px;font-weight:500;margin:0;}
.ocopo-login-options a,.ocopo-login-help a {color:inherit;text-underline-offset:3px;}
.ocopo-login .ocopo-button {width:100%;}
.ocopo-login-help {text-align:center;color:var(--ocopo-muted);font-size:.825rem;margin-top:22px;}
.ocopo-form-error {border:1px solid var(--ocopo-ink);padding:14px 16px;margin:0 0 24px;font-size:.875rem;line-height:1.5;}
.ocopo-catalogue {width:min(1180px,100%);margin:auto;}
.ocopo-catalogue-heading {display:flex;align-items:end;justify-content:space-between;gap:40px;margin-bottom:48px;}
.ocopo-catalogue-heading h1 {margin-bottom:12px;}
.ocopo-catalogue-heading p:not(.ocopo-kicker),.ocopo-member-name {color:var(--ocopo-muted);margin:0;}
.ocopo-member-name {font-size:.875rem;text-align:right;}
.ocopo-start-here {border-top:1px solid var(--ocopo-line);border-bottom:1px solid var(--ocopo-line);padding:28px 0;margin-bottom:30px;display:grid;grid-template-columns:1fr 2fr;gap:12px 48px;}
.ocopo-start-here .ocopo-kicker {grid-column:1/-1;}
.ocopo-start-here h2 {font-size:1.65rem;margin:0;letter-spacing:-.025em;}
.ocopo-start-here > p:last-child {margin:0;line-height:1.65;color:var(--ocopo-muted);}
.ocopo-product-grid {display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:24px;}
.ocopo-product {grid-column:span 5;border:1px solid var(--ocopo-line);background:oklch(98% .004 85);min-width:0;display:flex;flex-direction:column;}
.ocopo-product.is-featured {grid-column:span 7;grid-row:span 2;}
.ocopo-product-grid.is-single .ocopo-product {grid-column:1/-1;}
.ocopo-product-visual {position:relative;aspect-ratio:16/10;background:var(--ocopo-soft);overflow:hidden;border-bottom:1px solid var(--ocopo-line);}
.ocopo-product.is-featured .ocopo-product-visual {aspect-ratio:16/9;}
.ocopo-product-visual img {display:block;width:100%;height:100%;object-fit:cover;}
.ocopo-product.is-locked .ocopo-product-visual img {filter:grayscale(1);opacity:.42;}
.ocopo-product-placeholder {width:100%;height:100%;display:flex;flex-direction:column;justify-content:space-between;padding:26px;box-sizing:border-box;background:var(--ocopo-soft);}
.ocopo-product-placeholder span {font-size:.7rem;letter-spacing:.13em;font-weight:750;}
.ocopo-product-placeholder b {font-size:clamp(1.25rem,3vw,2.4rem);letter-spacing:-.04em;max-width:12ch;line-height:1;}
.ocopo-product.is-locked .ocopo-product-placeholder {filter:grayscale(1);opacity:.52;}
.ocopo-lock-mark {position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;color:var(--ocopo-ink);background:oklch(97% .004 85/.54);font-size:.75rem;font-weight:750;letter-spacing:.06em;text-transform:uppercase;text-align:center;}
.ocopo-product-content {padding:26px;display:flex;align-items:end;justify-content:space-between;gap:28px;flex:1;}
.ocopo-product-content > div {max-width:48ch;}
.ocopo-product-content h2 {font-family:inherit;font-size:clamp(1.35rem,2.4vw,2rem);line-height:1.1;letter-spacing:-.035em;margin:5px 0 11px;}
.ocopo-product-content p:not(.ocopo-product-status) {color:var(--ocopo-muted);line-height:1.55;margin:0;}
.ocopo-product-status {font-size:.7rem;text-transform:uppercase;letter-spacing:.1em;font-weight:750;color:var(--ocopo-muted);margin:0;}
.ocopo-product-content .ocopo-button {flex:0 0 auto;white-space:nowrap;}
.ocopo-button-outline {background:transparent;color:var(--ocopo-ink);}
.ocopo-button.is-disabled {opacity:.52;cursor:not-allowed;}
.ocopo-empty {border-block:1px solid var(--ocopo-line);padding:56px 0;}
.ocopo-standard-page {background:var(--ocopo-paper);color:var(--ocopo-ink);min-height:calc(100vh - 184px);padding:clamp(48px,8vw,96px) 24px;margin:0!important;}
.ocopo-standard-page h1 {font-size:clamp(2.4rem,6vw,4rem);line-height:1.04;letter-spacing:-.045em;margin-top:0;}
.ocopo-standard-page h2 {font-size:1.5rem;margin-top:52px;}
.ocopo-standard-page p,.ocopo-standard-page li {line-height:1.7;}
.ocopo-standard-page details {border-top:1px solid var(--ocopo-line);padding-block:16px;}
.ocopo-standard-page details:last-of-type {border-bottom:1px solid var(--ocopo-line);}
.ocopo-standard-page summary {cursor:pointer;font-weight:650;min-height:44px;display:flex;align-items:center;}
.ocopo-site-footer {background:var(--ocopo-paper);color:var(--ocopo-ink);border-top:1px solid var(--ocopo-line);margin:0!important;}
.ocopo-footer-inner {min-height:112px;font-size:.8rem;}
.ocopo-footer-inner > p {margin:0;color:var(--ocopo-muted);}
.ocopo-site-header :focus-visible,.ocopo-site-footer :focus-visible,.ocopo-member-home :focus-visible {outline:2px solid currentColor;outline-offset:4px;}

@media(min-width:801px) {
 .ocopo-learning-header {position:sticky;top:0;z-index:20;}
 .admin-bar .ocopo-learning-header {top:32px;}
 .ocopo-learning-header + .ocopo-shell > .ocopo-course-navigation {top:72px;max-height:calc(100vh - 72px);min-height:calc(100vh - 72px);}
 .admin-bar .ocopo-learning-header + .ocopo-shell > .ocopo-course-navigation {top:104px;max-height:calc(100vh - 104px);min-height:calc(100vh - 104px);}
}

@media(max-width:900px) {
 .ocopo-product,.ocopo-product.is-featured {grid-column:1/-1;grid-row:auto;}
 .ocopo-product-content {align-items:flex-start;}
}
@media(max-width:700px) {
 .ocopo-header-inner,.ocopo-footer-inner {width:min(100% - 32px,1180px);}
 .ocopo-header-inner {align-items:center;flex-direction:row;gap:16px;padding-block:12px;}
 .ocopo-site-header nav {width:auto;overflow:visible;}
 .ocopo-site-header ul {gap:0 18px;flex-wrap:wrap;}
 .ocopo-site-header nav a {min-height:38px;}
 .ocopo-member-home {padding:48px 16px;}
 .ocopo-login {margin-block:12px;}
 .ocopo-catalogue-heading {display:block;margin-bottom:32px;}
 .ocopo-member-name {text-align:left;margin-top:16px;}
 .ocopo-start-here {display:block;padding-block:22px;}
 .ocopo-start-here h2 {margin-bottom:10px;}
 .ocopo-product-grid {gap:16px;}
 .ocopo-product-content {display:block;padding:22px;}
 .ocopo-product-content .ocopo-button {margin-top:22px;width:100%;white-space:normal;text-align:center;}
 .ocopo-product-placeholder {padding:20px;}
 .ocopo-footer-inner {align-items:flex-start;flex-direction:column;padding-block:28px;gap:18px;}
 .ocopo-site-footer ul {gap:12px;align-items:flex-start;flex-direction:column;}
}
