/* Mise en page mobile commune aux trois expertises à partir de la maquette numérique. */
.rs36-mobile-header { display:none; }
.rs4-digital .rs4-photo-frame picture { display:block; width:100%; }
@media (max-width:700px) {
  :root { --rs36-forest:#003f32; --rs36-orange:#ff751b; --rs36-ink:#0a3d31; }
  html {
    --rs36-footer-height:clamp(64px,9dvh,76px);
    --rs36-safe-bottom:env(safe-area-inset-bottom,0px);
    scrollbar-width:none;
    scroll-padding-bottom:calc(var(--rs36-footer-height) + var(--rs36-safe-bottom) + 10px);
  }
  html::-webkit-scrollbar{width:0}
  body.rs8-service-layout {background:#fff!important;min-height:100dvh;overflow-x:hidden}
  /* Conserve l’ancien aperçu visiteur pour Solutions numériques. */
  body.rs34-digital-layout.admin-bar #wpadminbar {display:none!important}
  html:has(body.rs34-digital-layout.admin-bar){margin-top:0!important}
  body.rs34-digital-layout.admin-bar {margin-top:0!important}
  body.rs8-service-layout #contenu.rs4-service-page {
    --rs36-gutter:clamp(14px,4vw,20px);
    --rs36-title-offset:clamp(2px,calc(3dvh - 12px),7px);
    position:relative;
    box-sizing:border-box;
    width:calc(100% - 22px)!important;
    max-width:660px!important;
    min-height:calc(100dvh - 10px)!important;
    margin:5px auto!important;
    padding:0 var(--rs36-gutter) calc(var(--rs36-footer-height) + var(--rs36-safe-bottom) + 12px)!important;
    display:flex!important;
    flex-direction:column;
    justify-content:flex-start!important;
    gap:0;
    border:1px solid #e6ece8;
    border-radius:30px;
    background:#fff;
    box-shadow:0 7px 34px rgba(11,57,43,.045);
  }
  body.rs8-service-layout #contenu.rs4-advice {
    --rs36-title-offset:2px;
  }
  body.rs8-service-layout .rs36-mobile-header {
    display:flex;align-items:center;justify-content:space-between;
    min-height:clamp(52px,8dvh,68px);
    flex:0 0 auto;
    width:calc(100% + 2 * var(--rs36-gutter));
    margin-left:calc(-1 * var(--rs36-gutter));
    padding:8px var(--rs36-gutter) 7px;
    border-bottom:1px solid #e9eee9;
    position:relative;z-index:30;
  }
  body.rs8-service-layout .rs36-brand {display:block;width:clamp(144px,43%,226px);max-width:56vw;}
  body.rs8-service-layout .rs36-brand img{width:100%;height:auto;display:block;filter:none}
  body.rs8-service-layout .rs36-nav-menu {position:relative;z-index:31;}
  body.rs8-service-layout .rs36-nav-menu>summary{list-style:none;cursor:pointer;width:42px;height:43px;color:#004334;display:flex;align-items:center;justify-content:center;}
  body.rs8-service-layout .rs36-nav-menu>summary::-webkit-details-marker{display:none}
  body.rs8-service-layout .rs36-nav-menu>summary:focus-visible{outline:2px solid #f47a24;outline-offset:2px}
  body.rs8-service-layout .rs36-nav-menu nav {position:absolute;right:0;top:46px;min-width:min(280px,calc(100vw - 54px));display:grid;gap:0;background:white;box-shadow:0 14px 36px #003f322f;border:1px solid #dde9e0;border-radius:14px;overflow:hidden;padding:8px}
  body.rs8-service-layout .rs36-nav-menu nav a {font-size:13px;line-height:1.35;color:#063f31;padding:12px 10px;border-radius:7px;font-weight:600;}
  body.rs8-service-layout .rs36-nav-menu nav a:hover,body.rs8-service-layout .rs36-nav-menu nav a:focus-visible{background:#eef8ef}
  body.rs8-service-layout .rs4-service-page .rs4-service-hero {
    display:grid!important;
    grid-template-columns:48% 52%;
    position:relative;align-items:center;
    gap:0!important;
    min-height:0!important;
    padding:0!important;
    flex:none;
    width:100%;
    margin-top:clamp(26px,3.9dvh,36px)!important;
  }
  body.rs8-service-layout .rs4-service-page .rs4-service-copy {position:relative;z-index:2;min-width:0;align-self:center}
  body.rs8-service-layout .rs4-service-page .rs4-service-copy .rs2-eyebrow {
    position:relative;display:block;
    width:max-content;max-width:calc(100vw - 65px);
    margin:0 0 calc(clamp(14px,2dvh,21px) + var(--rs36-title-offset)) 0;
    color:#f5741d;font-size:clamp(9px,2.3vw,12px);
    font-weight:800;line-height:1.1;letter-spacing:.12em;
    white-space:nowrap;
  }
  body.rs8-service-layout .rs4-service-page .rs4-service-copy .rs2-eyebrow:after{
    content:'';position:absolute;bottom:-6px;left:0;width:46px;height:2px;background:#f77b23;border-radius:3px;
  }
  body.rs8-service-layout .rs4-service-page .rs4-service-copy h1 {
    font-size:clamp(24px,6.7vw,36px)!important;
    line-height:1.065!important;font-weight:800;
    margin:0 0 clamp(12px,2.6dvh,22px)!important;
    max-width:none!important;
    letter-spacing:-.055em;
    overflow-wrap:normal;
    text-wrap:wrap;
    color:#073b2e;
  }
  body.rs8-service-layout .rs4-service-page .rs4-service-copy h1 span {color:#ff711b;}
  body.rs8-service-layout .rs4-service-page .rs4-service-copy p {
    font-size:clamp(10.1px,2.6vw,13px)!important;
    font-weight:450;line-height:1.33!important;
    letter-spacing:-.01em;
    color:#516862;
    margin:0!important;
    max-width:none;
  }
  body.rs8-service-layout .rs4-service-page .rs4-service-copy p:after {content:'';display:block;width:48px;height:2px;margin-top:clamp(10px,1.8dvh,16px);background:#fb781e;border-radius:5px}
  body.rs8-service-layout .rs4-service-page .rs4-photo-frame {
    align-self:center;
    display:block;z-index:1;
    width:calc(100% + 12px);
    margin:calc(clamp(11px,2dvh,18px) + var(--rs36-title-offset)) -10px 0 -4px!important;
    padding:0!important;
  }
  body.rs8-service-layout .rs4-service-page .rs4-photo-frame::before {display:none!important}
  body.rs8-service-layout .rs4-service-page .rs4-photo-frame picture {display:block;width:100%;}
  body.rs8-service-layout .rs4-service-page .rs4-photo-frame img {
    display:block;width:100%;height:auto;
    aspect-ratio:539/509;
    object-fit:contain;max-height:none!important;
    border-radius:0!important;
  }
  /* Les deux autres expertises gardent leur photographie et reprennent le cadre de la maquette. */
  body.rs8-service-layout .rs4-service-page:not(.rs4-digital) .rs4-photo-frame {
    position:relative;
    width:calc(100% + var(--rs36-gutter) - 8px);
    margin-inline:0!important;
    isolation:isolate;
  }
  body.rs8-service-layout .rs4-service-page:not(.rs4-digital) .rs4-photo-frame::before {
    content:'';
    display:block!important;
    position:absolute;
    inset:-8px 1px 3px 0;
    z-index:-1;
    background:#e8f3e4;
    border-radius:57% 16% 24% 42% / 41% 20% 34% 56%;
    transform:rotate(-5deg);
  }
  body.rs8-service-layout .rs4-service-page:not(.rs4-digital) .rs4-photo-frame img {
    object-fit:cover;
    border-radius:53% 7% 34% 41% / 43% 9% 28% 54%!important;
    border-bottom:2px solid var(--rs36-forest);
  }
  body.rs8-service-layout .rs4-service-page:not(.rs4-digital) .rs4-service-copy h1,
  body.rs8-service-layout .rs4-service-page .rs8-card-label {
    overflow-wrap:anywhere;
  }
  body.rs8-service-layout .rs4-service-page .rs8-services {
    margin:clamp(19px,calc(10dvh - 33px),43px) 0 0!important;flex:none;position:relative;z-index:2;min-height:0;
  }
  body.rs8-service-layout .rs4-advice .rs8-services {
    margin-top:clamp(11px,calc(10dvh - 47px),29px)!important;
  }
  body.rs8-service-layout .rs4-service-page .rs8-services-heading{
    position:relative;
    display:flex;flex-direction:column;align-items:flex-start;
    gap:clamp(3px,.6dvh,6px)!important;
    margin:0 0 clamp(16px,2.5dvh,22px)!important;
    font-weight:800;font-size:clamp(17px,4.4vw,22px)!important;
    line-height:1.13;color:#063d30;
  }
  body.rs8-service-layout .rs4-service-page .rs8-services-heading span:last-child{
    font-size:clamp(11.3px,3vw,15px)!important;
    line-height:1.2;color:#61796d;font-weight:450;
  }
  body.rs8-service-layout .rs4-service-page .rs8-services-heading::after{
    content:'';position:absolute;right:16%;bottom:5px;background:#fb791f;width:clamp(36px,10vw,64px);height:3px;border-radius:4px;
  }
  body.rs8-service-layout .rs4-service-page .rs8-services-grid {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(14px,2.7dvh,25px) clamp(9px,1.4dvh,15px)!important;align-items:stretch;}
  body.rs8-service-layout .rs4-service-page .rs8-service-card,
  body.rs8-service-layout .rs4-service-page .rs8-service-card:not([open]){
    position:relative;min-width:0;
    border:1px solid #e6ebe7!important;
    background:#fff!important;
    box-shadow:0 3px 9px rgba(0,56,43,.08);
    border-radius:clamp(17px,5vw,25px)!important;
    overflow:hidden;
  }
  body.rs8-service-layout .rs4-service-page .rs8-service-card:nth-child(2),
  body.rs8-service-layout .rs4-service-page .rs8-service-card:nth-child(3) {background:#eff8ea!important;border-color:#ddeeda!important;}
  body.rs8-service-layout .rs4-service-page .rs8-service-card summary {
    display:grid;grid-template-columns:clamp(29px,7vw,40px) minmax(0,1fr) clamp(18px,5vw,25px);
    align-items:center;gap:clamp(6px,1.6vw,12px);
    padding:clamp(9px,1.7dvh,14px) clamp(7px,1.8vw,11px);
    min-height:clamp(88px,14dvh,115px);
    cursor:pointer;
    box-sizing:border-box;
  }
  body.rs8-service-layout .rs4-service-page .rs8-card-icon {
    display:flex;width:clamp(29px,7vw,40px);min-width:0;height:clamp(29px,7vw,40px);
    background:#fff;color:#00804a;box-shadow:0 2px 9px #003f3212;border-radius:50%;
  }
  body.rs8-service-layout .rs4-service-page .rs8-card-icon svg {width:clamp(17px,4.6vw,25px);height:clamp(17px,4.6vw,25px)}
  body.rs8-service-layout .rs4-service-page .rs8-card-label {gap:clamp(2px,.5dvh,5px)}
  body.rs8-service-layout .rs4-service-page .rs8-card-label strong {
    font-size:clamp(11.6px,3.1vw,16px)!important;line-height:1.14;font-weight:780;letter-spacing:-.02em;color:#053e30;
  }
  body.rs8-service-layout .rs4-service-page .rs8-card-label small {
    font-size:clamp(9.8px,2.65vw,13.3px)!important;line-height:1.22;color:#61756e;font-weight:450;
  }
  body.rs8-service-layout .rs4-service-page .rs8-card-arrow {
    min-width:0;width:clamp(18px,5vw,25px);height:clamp(18px,5vw,25px);
    font-size:0;line-height:1;
    color:#005b41;background:#d9f0d4;box-shadow:none;border-radius:50%;transform:none;
  }
  body.rs8-service-layout .rs4-service-page .rs8-card-arrow::before {
    content:'';
    width:42%;height:42%;
    border:solid currentColor;border-width:0 2px 2px 0;
    transform:translateY(-1px) rotate(45deg);
  }
  body.rs8-service-layout .rs4-service-page .rs8-service-card[open] .rs8-card-arrow {
    background:#ff842c;color:#23372f;
  }
  body.rs8-service-layout .rs4-service-page .rs8-service-card[open] .rs8-card-arrow::before {
    transform:translateY(1px) rotate(225deg);
  }
  body.rs8-service-layout .rs4-service-page .rs8-service-card:is(:hover,:focus-within) {transform:translateY(-2px);box-shadow:0 8px 24px #003f3221}
  body.rs8-service-layout .rs4-service-page .rs8-service-card[open] .rs8-card-extra {padding:0 12px 13px}
  /* Navigation vissée à la maquette : maison + CTA orange sur feuilles discrètes. */
  body.rs8-service-layout .rs11-interior-footer {
    position:fixed;bottom:0;left:0;right:0;z-index:999;
    height:calc(var(--rs36-footer-height) + var(--rs36-safe-bottom));
    padding:6px 0 calc(6px + var(--rs36-safe-bottom))!important;
    margin:0!important;border:0!important;
    background:#fff!important;box-shadow:none!important;
    isolation:isolate;
  }
  body.rs8-service-layout .rs11-interior-footer::before {
    content:'';position:absolute;z-index:-1;pointer-events:none;
    inset:-30px 0 0;
    background-image:url('images/v36-leaves.svg');
    background-size:100% 100%;background-position:center bottom;background-repeat:no-repeat;
    opacity:.74;
  }
  body.rs8-service-layout .rs11-interior-footer-bar {
    width:calc(100% - 2 * clamp(18px,5.6vw,32px))!important;
    max-width:640px;min-height:0;height:100%;padding:0!important;margin:0 auto;
    display:flex;align-items:center;justify-content:space-between;gap:15px;
  }
  body.rs8-service-layout .rs11-home-link {
    display:flex;flex:0 0 auto;width:clamp(44px,11vw,49px);min-width:0;height:clamp(44px,6.7dvh,52px);
    background:#f0faf0;color:#05513c!important;
    border:1px solid #baddb8;border-radius:15px;
    box-shadow:0 3px 6px #0d5f2612;
  }
  body.rs8-service-layout .rs11-home-link svg {width:26px;height:26px}
  body.rs8-service-layout .rs11-contact-link {
    display:flex;justify-content:center;align-items:center;flex:0 0 clamp(185px,49vw,250px);
    height:clamp(44px,6.7dvh,52px);min-height:0;padding:8px 10px;
    border-radius:clamp(18px,5vw,25px);
    background:#ff741b!important;color:#fff!important;
    font-size:clamp(14px,3.9vw,19px)!important;font-weight:800;
    box-shadow:0 4px 15px #d9641226;
    gap:14px;
  }
  body.rs8-service-layout .rs11-contact-link span {font-size:21px}
  body.rs8-service-layout .rs11-contact-link:hover{background:#ef6510!important}
}
/* Very short visible viewports keep content accessible rather than clipping it. */
@media (max-width:700px) and (max-height:660px){
  html {--rs36-footer-height:60px;}
  body.rs8-service-layout .rs36-mobile-header{min-height:47px;padding-block:5px}
  body.rs8-service-layout .rs4-service-page .rs4-service-copy h1{font-size:clamp(22px,6.3vw,30px)!important;margin-bottom:9px!important}
  body.rs8-service-layout .rs4-service-page .rs4-service-copy .rs2-eyebrow{margin-bottom:calc(11px + var(--rs36-title-offset));font-size:9px}
  body.rs8-service-layout .rs4-service-page .rs4-service-copy p{font-size:clamp(9.2px,2.5vw,12px)!important}
  body.rs8-service-layout .rs4-service-page .rs8-services-heading{font-size:clamp(15px,4vw,20px)!important;margin-bottom:13px!important}
  body.rs8-service-layout .rs4-service-page .rs8-service-card summary {min-height:clamp(80px,13.6dvh,90px);padding-block:7px}
}
@media (max-width:355px){
  body.rs8-service-layout #contenu.rs4-service-page{--rs36-gutter:13px}
  body.rs8-service-layout .rs4-service-page .rs4-service-hero{grid-template-columns:50% 50%}
  body.rs8-service-layout .rs4-digital .rs4-photo-frame{margin-left:-8px!important;margin-right:-10px!important}
  body.rs8-service-layout .rs4-service-page .rs8-service-card summary {grid-template-columns:25px minmax(0,1fr) 18px;gap:5px;padding-inline:6px}
  body.rs8-service-layout .rs4-service-page:not(.rs4-digital) .rs8-service-card summary {
    position:relative;
    grid-template-columns:25px minmax(0,1fr);
    padding-bottom:24px;
  }
  body.rs8-service-layout .rs4-service-page:not(.rs4-digital) .rs8-card-arrow {
    position:absolute;
    right:6px;
    bottom:5px;
  }
  body.rs8-service-layout .rs4-service-page .rs8-card-icon{width:25px;height:25px}
  body.rs8-service-layout .rs4-service-page .rs8-card-icon svg{width:18px;height:18px}
  body.rs8-service-layout .rs4-service-page .rs8-card-label strong{font-size:11px!important}
  body.rs8-service-layout .rs4-service-page .rs8-card-label small{font-size:9px!important}
  body.rs8-service-layout .rs4-service-page .rs8-services-heading::after{bottom:-7px;right:8%;width:32px}
}
@media (max-width:700px) and (prefers-reduced-motion:reduce){
  body.rs8-service-layout .rs4-service-page .rs8-service-card,
  body.rs8-service-layout .rs4-service-page .rs8-card-arrow{transition:none!important}
}

/* Écrans courts : garder l’introduction et les quatre cartes repliées dans la zone visible. */
@media (max-width:700px) and (max-height:600px) {
  body.rs8-service-layout #contenu.rs4-service-page {
    margin-bottom:1px!important;
    padding-bottom:calc(var(--rs36-footer-height) + var(--rs36-safe-bottom))!important;
  }
  body.rs8-service-layout .rs36-mobile-header {min-height:43px;padding-block:0}
  body.rs8-service-layout .rs4-service-page .rs4-service-hero {
    grid-template-columns:53% 47%;
    margin-top:clamp(11px,calc(8dvh - 26px),22px)!important;
  }
  body.rs8-service-layout .rs4-service-page .rs4-service-copy .rs2-eyebrow {
    margin-bottom:calc(9px + var(--rs36-title-offset));
  }
  body.rs8-service-layout .rs4-service-page .rs4-service-copy h1 {
    font-size:clamp(19px,calc(4dvh - .2px),24px)!important;
    margin-bottom:6px!important;
  }
  body.rs8-service-layout .rs4-service-page .rs4-service-copy p {
    font-size:clamp(9.5px,2.55vw,12px)!important;
  }
  body.rs8-service-layout .rs4-service-page .rs4-service-copy p::after {margin-top:6px}
  body.rs8-service-layout .rs4-service-page .rs8-services-heading {
    gap:3px!important;
    margin-bottom:8px!important;
  }
  body.rs8-service-layout .rs4-service-page .rs8-service-card summary {
    min-height:clamp(56px,calc(19dvh - 35px),79px);
    padding-block:4px;
  }
  body.rs8-service-layout .rs4-service-page:not(.rs4-digital) .rs8-service-card summary {
    padding-bottom:18px;
  }
  body.rs8-service-layout .rs4-service-page:not(.rs4-digital) .rs8-card-arrow {bottom:3px}
}

@media (max-width:700px) and (max-height:510px) {
  body.rs8-service-layout #contenu.rs4-service-page {
    --rs36-title-offset:2px;
    margin-bottom:0!important;
    padding-bottom:calc(var(--rs36-footer-height) + var(--rs36-safe-bottom) - 1px)!important;
  }
}
