/* Reysource — espace client (ne modifie pas le thème public) */
.rcs-project-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr));gap:1.5rem; margin:2rem 0; }
.rcs-project-card { overflow:hidden; border:1px solid #E9DFC5; border-radius:18px; background:#FFF4D6; box-shadow:0 5px 20px rgba(32,36,71,.045); color:#202447; }
.rcs-project-media { aspect-ratio:16 / 9; overflow:hidden; background:#202447; }
.rcs-project-image { width:100%;height:100%;display:block;object-fit:cover; }
.rcs-project-placeholder {width:100%;height:100%;display:flex;align-items:center;justify-content:center;background:#202447;color:#FFFCF4;font:700 clamp(2rem,5vw,4rem)/1 sans-serif;}
.rcs-project-body { padding:1.35rem 1.5rem 1.5rem; }
.rcs-project-body h3 {margin:0 0 .55rem; font-size:clamp(1.15rem,2vw,1.45rem);line-height:1.25;color:#202447;}
.rcs-project-summary { margin:0 0 1rem; color:#535B78; font-size:1rem;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.rcs-project-meta { color:#535B78;font-size:.82rem;margin:0 0 1.2rem; }
.rcs-project-link { display:inline-flex;gap:.5em; align-items:center;border-radius:100px;background:#202447;color:#fff!important;text-decoration:none!important;padding:.75rem 1.1rem;font-weight:600; }
.rcs-project-link:hover,.rcs-project-link:focus-visible {background:#121626;color:#fff!important;}
.rcs-project-link:focus-visible{outline:3px solid #795018;outline-offset:3px;}
@media (max-width: 600px) {.rcs-project-grid{grid-template-columns:1fr;gap:1rem;}.rcs-project-body{padding:1.1rem;}}

.rcs-account .rs-form{margin:1.3rem 0 2rem;}
.rcs-account .rs-form input{display:block;box-sizing:border-box;max-width:540px;width:100%;padding:.8rem;border:1px solid #c4b99e;border-radius:10px;background:#fffcf4;color:#202447;}
.rcs-account .rs-form label{display:block;margin-bottom:.35rem;}
.rcs-account .rs-form button{background:#202447;color:white;border:0;border-radius:40px;padding:.8rem 1.35rem;cursor:pointer;}
.rcs-account-notice{padding:.8rem 1rem;border-left:4px solid #795018;background:#fff4d6;}
.rcs-date{display:block;color:#535b78;font-size:.88rem;margin:.35rem 0 .9rem;}

/* Composants du portail déplacés du thème : indépendants du thème actif. */
/* Navigation espace client. */
.rcs-header-links{display:flex;flex-wrap:wrap;gap:1.1rem;align-items:center;font-size:.85rem;}
.rcs-header-links a{color:#202447;text-decoration:none;white-space:nowrap;}
.rcs-header-links a:hover,.rcs-header-links a:focus{text-decoration:underline;text-underline-offset:.25em;}
@media(max-width:780px){.rcs-header-links{gap:.6rem;font-size:.75rem;}}

/* Espace client — cartes projets et livrables (thème Reysource). */
body .rcs-project-grid, body .rcs-deliverable-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:1.5rem;margin:2rem 0;}
body .rcs-project-card,body .rcs-card{background:#FFF4D6;border:1px solid #E9DFC5;border-radius:18px;overflow:hidden;box-shadow:0 8px 25px rgba(32,36,71,.06);transform:scale(1);transition:transform .22s ease,box-shadow .22s ease;}
@media(hover:hover) and (prefers-reduced-motion:no-preference){body .rcs-project-card:hover,body .rcs-card:hover{transform:scale(1.025);box-shadow:0 16px 34px rgba(32,36,71,.13);}}
body .rcs-project-card:focus-within,body .rcs-card:focus-within{outline:2px solid #795018;outline-offset:3px;}
body .rcs-card-media{aspect-ratio:16/9;overflow:hidden;background:#202447;}
body .rcs-card-image{display:block;width:100%;height:100%;object-fit:cover;}
body .rcs-card-placeholder{display:grid;place-items:center;width:100%;height:100%;color:#FFFCF4;font-size:3rem;font-weight:700;}
body .rcs-card-body{padding:1.3rem 1.5rem 1.5rem;}
body .rcs-project-body h3,body .rcs-card-body h3{font-size:clamp(1.2rem,2vw,1.55rem)!important;line-height:1.3!important;letter-spacing:-.01em!important;max-width:none;color:#202447;margin:.35rem 0 .7rem;}
body .rcs-card-status{color:#795018;font-size:.82rem;font-weight:700;}
body .rcs-card-description{color:#535B78;font-size:.95rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:.4rem 0 1.2rem;}
body .rcs-card-link{display:inline-block;border-radius:100px;background:#202447;color:#fff!important;padding:.7rem 1.1rem;text-decoration:none!important;font-size:.9rem;font-weight:600;}
body .rcs-card-link:hover{background:#121626;}
body .rcs-card-link:focus-visible{outline:3px solid #795018;outline-offset:3px;}
body .rcs-gold-meta{color:#795018;font-size:.9rem;font-weight:600;line-height:1.5;margin:.5rem 0 1rem;}
body .rcs-decision-entry{font-weight:400;color:#202447;}
@media(prefers-reduced-motion:reduce){body .rcs-project-card,body .rcs-card{transition:none;transform:none!important;}}

/* Espace client : hiérarchie compacte, sans toucher aux titres publics. */
body.rcs-portal-page .wp-block-post-title {font-size:clamp(1.75rem,3vw,2.5rem)!important;line-height:1.2!important;letter-spacing:-.025em!important;max-width:none!important;margin-bottom:1rem!important;}
body.rcs-deliverables-view .wp-block-post-title {display:none!important;}
body .rcs-portal .rcs-section-title {font-size:clamp(1.5rem,2.5vw,2rem)!important;line-height:1.25!important;letter-spacing:-.015em!important;max-width:none!important;margin:0 0 .65rem;}
body .rcs-portal .rcs-project-context {color:#535B78;font-size:.95rem;margin:0 0 1rem;}
body .rcs-clickable-card {display:block;color:#202447;text-decoration:none!important;cursor:pointer;}
body .rcs-clickable-card:hover,body .rcs-clickable-card:focus-visible {color:#202447;text-decoration:none!important;}
body .rcs-clickable-card:focus-visible {outline:3px solid #795018;outline-offset:4px;}
body .rcs-clickable-card .rcs-project-link,body .rcs-clickable-card .rcs-card-link {pointer-events:none;}




/* v0.8 : pièces jointes de livrable */
.rcs-delivery-image img{width:100%;max-height:75vh;object-fit:contain;border-radius:12px}.rcs-delivery-download{display:flex;align-items:center;gap:12px}.rcs-delivery-file-icon{font-size:1.5rem;flex:none;color:#202447}

/* RC8: responsive Google Drive Gutenberg blocks, scoped to client portal. */
body .rcs-portal .rcs-drive-block,
body.rcs-portal-page .rcs-drive-block {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
body .rcs-portal figure.rcs-drive-image,
body.rcs-portal-page figure.rcs-drive-image {
  margin-inline: 0;
  overflow: hidden;
}
body .rcs-portal .rcs-drive-image img,
body.rcs-portal-page .rcs-drive-image img {
  display: block;
  box-sizing: border-box;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 75vh;
  object-fit: contain;
  object-position: left center;
  border-radius: 12px;
}
body .rcs-portal .rcs-drive-image figcaption,
body.rcs-portal-page .rcs-drive-image figcaption {
  max-width: 100%;
  overflow-wrap: anywhere;
}


/* RC9 : constrain Drive images to the actual deliverable content box,
   regardless of theme image defaults, intrinsic file dimensions or flex/grid sizing. */
body .rcs-deliverable-detail {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
}
body .rcs-deliverable-detail .rcs-drive-block,
body .rcs-deliverable-detail figure.rcs-drive-image {
  box-sizing: border-box !important;
  display: block;
  inline-size: 100% !important;
  max-inline-size: 100% !important;
  min-inline-size: 0 !important;
  margin-inline: 0 !important;
}
body .rcs-deliverable-detail figure.rcs-drive-image > img {
  display: block !important;
  box-sizing: border-box !important;
  inline-size: 100% !important;
  max-inline-size: 100% !important;
  min-inline-size: 0 !important;
  block-size: auto !important;
  max-block-size: 75vh;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
}
body .rcs-deliverable-detail figure.rcs-drive-image > figcaption {
  box-sizing: border-box;
  max-inline-size: 100%;
  overflow-wrap: anywhere;
}
