/* CDS Platform 4.2.4 — expérience publique réellement mobile-first. */
.cds-mobile-bottom-nav,
.cds-mobile-quick-overlay,
.cds-mobile-quick-sheet{display:none}

@media (max-width:700px){
  :root{--cds-mobile-bar-height:68px}
  html,body{max-width:100%!important;overflow-x:hidden!important}
  body{padding-bottom:calc(var(--cds-mobile-bar-height) + env(safe-area-inset-bottom))!important}

  /* Les affiches d’événement restent entièrement visibles sans élargir la page. */
  body.single-cdsd_event .cdspel-content,
  body.single-cdsd_event .cdspel-page-layout,
  body.single-cdsd_event .cdspel-prose{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }
  body.single-cdsd_event .cdspel-prose{padding:14px!important;overflow:hidden!important}
  body.single-cdsd_event .cdspel-prose>img.cdspel-featured{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    height:50svh!important;
    max-height:480px!important;
    margin:0 auto 16px!important;
    padding:6px!important;
    border:1px solid rgba(255,116,23,.34);
    border-radius:12px;
    background:#070708;
    object-fit:contain!important;
    object-position:center!important;
  }
  body.single-cdsd_event .cdspel-prose figure,
  body.single-cdsd_event .cdspel-prose .wp-caption{width:100%!important;max-width:100%!important;margin-inline:0!important}
  body.single-cdsd_event .cdspel-prose figure img,
  body.single-cdsd_event .cdspel-prose .wp-caption img,
  body.single-cdsd_event .cdspel-prose p img{
    display:block!important;
    width:auto!important;
    max-width:100%!important;
    height:auto!important;
    max-height:50svh!important;
    margin-inline:auto!important;
    object-fit:contain!important;
  }

  /* En-tête compact : statut et radio sur une seule ligne. */
  .cdspel-utility-inner{
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr)!important;
    align-items:center!important;
    gap:8px!important;
    min-height:42px!important;
    padding-block:4px!important;
  }
  .cdspel-utility-left{gap:0!important;font-size:10px!important}
  .cdspel-utility-left>span:first-child{display:none!important}
  .cdspel-status{display:inline-flex!important;align-items:center;gap:5px;white-space:nowrap}
  .cdspel-top-radio{
    order:initial!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:34px!important;
    gap:7px!important;
    padding:3px 7px!important;
    border:1px solid rgba(255,116,23,.42)!important;
    border-radius:8px!important;
  }
  .cdspel-radio-toggle{flex:0 0 27px!important;width:27px!important;height:27px!important}
  .cdspel-radio-meta{min-width:0!important;flex:1!important}
  .cdspel-radio-meta strong{display:block!important;overflow:hidden;text-overflow:ellipsis;font-size:9px!important;white-space:nowrap!important}
  .cdspel-radio-meta span,.cdspel-radio-wave,.cdspel-radio-volume,.cdspel-radio-reconnect{display:none!important}

  .cdspel-navwrap{min-height:66px!important;padding-block:4px!important}
  .cdspel-brand{gap:9px!important}
  .cdspel-brand-logo{width:50px!important;height:50px!important;border-width:2px!important;box-shadow:0 0 0 2px #161616!important}
  .cdspel-brand strong{font-size:18px!important;line-height:1!important;white-space:nowrap}
  .cdspel-brand small{margin-top:4px;font-size:7px!important;letter-spacing:.08em!important;white-space:nowrap}
  .cdspel-navwrap>.cdspel-toggle{min-width:76px!important;min-height:40px!important;padding:7px 9px!important}
  .cdspel-navwrap>#cdspel-nav{
    left:calc(50% - 50vw)!important;
    right:auto!important;
    width:100vw!important;
    max-width:100vw!important;
    max-height:calc(100dvh - 178px)!important;
    padding:12px 14px 16px!important;
    border-right:0!important;
    border-left:0!important;
    border-radius:0 0 16px 16px!important;
  }
  #cdspel-nav .cdspel-menu{
    width:100%!important;
    max-width:none!important;
    grid-template-columns:minmax(0,1fr)!important;
    justify-content:stretch!important;
    justify-items:stretch!important;
    align-items:stretch!important;
    gap:8px!important;
  }
  #cdspel-nav .cdspel-menu>li{
    display:block!important;
    width:100%!important;
    max-width:none!important;
    justify-self:stretch!important;
  }
  #cdspel-nav .cdspel-menu>li>a,
  #cdspel-nav .cdspel-boutique-main-row,
  #cdspel-nav .cdspel-submenu-trigger{
    width:100%!important;
    max-width:none!important;
    min-height:52px!important;
    border-radius:11px!important;
  }
  #cdspel-nav .cdspel-menu>li>a{
    justify-content:flex-start!important;
    padding:13px 15px!important;
    font-size:14px!important;
  }
  #cdspel-nav .cdspel-submenu-trigger{
    padding:12px 15px!important;
    font-size:14px!important;
  }
  #cdspel-nav .cdspel-services-icon{width:27px!important;height:27px!important;flex-basis:27px!important}
  #cdspel-nav .cdspel-services-menu>.sub-menu{width:100%!important;max-width:none!important}

  .cdspel-ticker>div{min-height:31px!important;gap:10px!important;font-size:10px!important}
  .cdspel-ticker b{padding:5px 10px!important}
  .cdspel-ticker span{overflow:hidden;text-overflow:ellipsis}

  /* Accueil : l’essentiel tient dans le premier écran. */
  .cdspel-homegrid{padding-top:8px!important}
  .cdspel-homegrid .cdspel-hero{min-height:455px!important}
  .cdspel-homegrid .pelican-hero{background-position:center top!important}
  .cdspel-homegrid .cdspel-hero-copy{max-width:none!important;padding:205px 18px 17px!important}
  .cdspel-homegrid .cdspel-hero .brush{font-size:39px!important;line-height:.86!important}
  .cdspel-homegrid .cdspel-chapter{font-size:9px!important}
  .cdspel-homegrid .cdspel-hero-copy p{
    display:-webkit-box;
    margin:12px 0!important;
    overflow:hidden;
    font-size:12px!important;
    line-height:1.38!important;
    letter-spacing:.015em!important;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:3;
  }
  .cdspel-homegrid .hero-actions{display:grid!important;grid-template-columns:1fr 1fr;gap:8px;width:100%}
  .cdspel-homegrid .hero-actions .cdspel-btn,
  .cdspel-homegrid .hero-actions .outline-btn{
    min-height:42px;
    align-items:center;
    justify-content:center;
    padding:7px 8px!important;
    font-size:9px!important;
    line-height:1.2;
    text-align:center;
  }
  .cdspel-sectiontitle{align-items:center!important;padding:14px 0 9px!important}
  .cdspel-sectiontitle h2{font-size:18px!important}
  .cdspel-sectiontitle>a{padding:7px 8px!important;font-size:9px!important}

  /* Les anciens boutons ne recouvrent plus le contenu. */
  .cdsmia-agenda-toggle,
  .cdsmia-shop-toggle,
  .cdsmia-floating-menu-toggle,
  .cdspel-side-dock{display:none!important}

  /* Navigation principale fixe et adaptée au pouce. */
  .cds-mobile-bottom-nav{
    position:fixed;
    z-index:9997;
    right:0;
    bottom:0;
    left:0;
    width:100vw!important;
    max-width:100vw!important;
    margin:0!important;
    overflow:hidden!important;
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    align-items:end;
    min-height:calc(var(--cds-mobile-bar-height) + env(safe-area-inset-bottom));
    padding:7px 5px calc(5px + env(safe-area-inset-bottom));
    border-top:1px solid rgba(255,116,23,.65);
    background:rgba(7,7,8,.975);
    box-shadow:0 -12px 38px rgba(0,0,0,.55);
    backdrop-filter:blur(12px);
  }
  .cds-mobile-bottom-nav>a,
  .cds-mobile-bottom-nav>button{
    display:flex;
    min-width:0;
    min-height:52px;
    margin:0;
    padding:5px 2px;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:3px;
    border:0;
    border-radius:10px;
    background:transparent;
    color:#d8d4cf;
    font:inherit;
    text-decoration:none;
    cursor:pointer;
    -webkit-tap-highlight-color:transparent;
  }
  .cds-mobile-bottom-nav .dashicons{width:22px;height:22px;font-size:22px;line-height:22px}
  .cds-mobile-bottom-nav b{overflow:hidden;max-width:100%;font-size:9px;line-height:1.1;text-overflow:ellipsis;white-space:nowrap}
  .cds-mobile-bottom-nav>a.is-active,
  .cds-mobile-bottom-nav>button.is-active{color:#ff8b31;background:rgba(255,116,23,.09)}
  .cds-mobile-bottom-nav>.cds-mobile-access-button{
    min-width:58px;
    min-height:58px;
    margin:0 auto 4px;
    border:2px solid #0a0a0b;
    border-radius:50%;
    background:linear-gradient(145deg,#ffad43,#ff7417);
    color:#130a04;
    box-shadow:0 8px 24px rgba(255,116,23,.35);
    transform:translateY(-10px);
  }
  .cds-mobile-bottom-nav>.cds-mobile-access-button[aria-expanded="true"]{background:#fff;color:#111}

  /* Panneau inférieur des accès rapides. */
  .cds-mobile-quick-overlay{
    position:fixed;
    z-index:10020;
    inset:0;
    display:block;
    background:rgba(0,0,0,.68);
    opacity:0;
    visibility:hidden;
    backdrop-filter:blur(4px);
    transition:opacity .2s ease,visibility .2s ease;
  }
  .cds-mobile-quick-overlay[hidden]{display:none!important}
  .cds-mobile-quick-overlay.is-open{opacity:1;visibility:visible}
  .cds-mobile-quick-sheet{
    position:fixed;
    z-index:10021;
    right:0;
    bottom:0;
    left:0;
    display:block;
    max-height:82dvh;
    padding:8px 14px calc(18px + env(safe-area-inset-bottom));
    overflow:auto;
    border:1px solid rgba(255,116,23,.55);
    border-bottom:0;
    border-radius:22px 22px 0 0;
    background:linear-gradient(160deg,#181310,#09090a 48%);
    color:#fff;
    box-shadow:0 -24px 70px rgba(0,0,0,.72);
    transform:translateY(105%);
    visibility:hidden;
    transition:transform .28s cubic-bezier(.22,.61,.36,1),visibility .28s;
  }
  .cds-mobile-quick-sheet.is-open{transform:translateY(0);visibility:visible}
  .cds-mobile-quick-handle{width:44px;height:4px;margin:1px auto 12px;border-radius:99px;background:#777}
  .cds-mobile-quick-sheet header{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
  .cds-mobile-quick-sheet header small{color:#ff8b31;font-size:9px;font-weight:900;letter-spacing:.16em}
  .cds-mobile-quick-sheet h2{margin:2px 0 0;color:#fff;font-size:24px;line-height:1.1}
  .cds-mobile-quick-close{width:42px;height:42px;border:1px solid #414141;border-radius:50%;background:#202022;color:#fff;font:300 29px/1 Arial;cursor:pointer}
  .cds-mobile-quick-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .cds-mobile-quick-grid>button{
    display:grid;
    grid-template-columns:40px minmax(0,1fr);
    grid-template-rows:auto auto;
    min-height:82px;
    padding:12px;
    border:1px solid rgba(255,255,255,.11);
    border-radius:14px;
    background:linear-gradient(135deg,rgba(255,116,23,.15),rgba(255,255,255,.035));
    color:#fff;
    text-align:left;
    cursor:pointer;
  }
  .cds-mobile-quick-grid .dashicons{grid-row:1/3;align-self:center;width:34px;height:34px;color:#ff8b31;font-size:30px;line-height:34px}
  .cds-mobile-quick-grid strong{align-self:end;overflow:hidden;font-size:13px;text-overflow:ellipsis;white-space:nowrap}
  .cds-mobile-quick-grid small{align-self:start;margin-top:3px;color:#aaa;font-size:9px}
  body.cds-mobile-quick-open{overflow:hidden!important}

  .cdsmia-agenda-panel,.cdsmia-shop-panel{height:100dvh!important}
}

@media (max-width:360px){
  .cdspel-brand-logo{width:46px!important;height:46px!important}
  .cdspel-brand strong{font-size:16px!important}
  .cdspel-brand small{display:none!important}
  .cds-mobile-bottom-nav b{font-size:8px}
  .cds-mobile-quick-grid{gap:7px}
  .cds-mobile-quick-grid>button{padding:10px}
}

@media (max-width:700px) and (orientation:landscape){
  .cds-mobile-quick-sheet{max-height:92dvh}
  .cds-mobile-quick-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .cds-mobile-quick-grid>button{grid-template-columns:32px minmax(0,1fr);min-height:70px;padding:9px}
  .cds-mobile-quick-grid .dashicons{width:28px;height:28px;font-size:25px;line-height:28px}
}

@media (prefers-reduced-motion:reduce){
  .cds-mobile-quick-overlay,.cds-mobile-quick-sheet{transition:none!important}
}
