/* ==========================================================================
   Socle mobile commun (lot A du chantier responsive, 18/11/2026).
   1. Utilitaires de base (tactile, polices des champs, pas de défilement latéral)
   2. En-tête, menu plein écran, panneau « Parcs » plein écran
   3. Pied de page compact
   Imprimé en dernier dans le <head> par inc/mobile-barre.php. Rien ne change au-dessus de 900 px.
   Retour arrière : retirer la ligne « require_once mobile-barre.php » de inc/header-c.php.
   ========================================================================== */

/* ---------- 0. par défaut (ordinateur) : éléments réservés au mobile cachés ---------- */
.hc-li--mob{display:none}
.hc-me__bd{display:contents}
.hc-me__u{display:none}
.pmm-top{display:none}
.fv-suivez{display:none}
.fc-li-mob{display:none}

/* ---------- 1. socle tactile ---------- */
@media (max-width:900px){
  html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-padding-top:var(--ca-hh,76px)}
  body{-webkit-tap-highlight-color:rgba(236,149,33,.2)}
  a,button,[role="button"],summary,label,select,input[type="checkbox"],input[type="radio"]{touch-action:manipulation}
  html.ca-lock,html.ca-lock body{overflow:hidden;overscroll-behavior:none}
}
@media (max-width:767px){
  html{scroll-padding-bottom:84px}
  /* images et médias ne dépassent jamais la largeur de l'écran */
  img,video,iframe,embed,object{max-width:100%}
  /* un champ de saisie de moins de 16 px fait zoomer la page sur iPhone */
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="image"]):not([type="hidden"]),select,textarea{font-size:16px!important}
  /* texte long (adresses, mots collés) : jamais de débordement horizontal */
  #main-content{overflow-wrap:break-word}
  /* cibles tactiles : au moins 44 px pour les boutons d'icône les plus courants */
  .ca-arr,.hc-burger,.hc-dark{min-width:44px;min-height:44px}
}

/* ---------- 2a. en-tête (tablette et téléphone) ---------- */
@media (max-width:900px){
  /* le badge de rang n'a pas sa place dans l'en-tête mobile : simple icône « personne » (le badge reste dans Mon espace) */
  html body .hc-me__bd{display:none}
  html body .hc-me__u{display:inline-flex;align-items:center;justify-content:center;color:inherit}
  html body .hc-me.hc-me--bureau .hc-me__u{color:#fff}
  html body .hc-r1__in{padding:8px 14px 10px}
}
/* téléphone : une seule rangée (logo + menu), la recherche s'ouvre depuis la barre du bas */
@media (max-width:767px){
  html body .hc-r1__in,html body .is-scrolled .hc-r1__in{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"l a" "s s";height:auto;min-height:56px;padding:6px 12px;gap:0 8px}
  html body .hc-logo img,html body .is-scrolled .hc-logo img{height:42px!important}
  html body .hc-logo--txt{font-size:24px}
  html body .hc-sb{display:none;grid-area:s;width:100%;height:46px;margin:6px 0 4px}
  html body .ca-hdr--c.is-search .hc-sb{display:flex}
  html body .hc-me,html body .hc-dark{display:none}
  html body .hc-burger{display:flex;width:46px;height:46px}
  html body .ca-hdr.ca-hdr--c{box-shadow:0 1px 0 #E1E7F2,0 6px 16px rgba(11,43,102,.06)!important}
  /* suggestions de la recherche : pleine largeur sous le champ */
  html body .hc-sb .ca-recherche__suggestions{position:fixed!important;left:8px!important;right:8px!important;top:calc(var(--ca-hh,110px) + 6px)!important;max-height:calc(100dvh - var(--ca-hh,110px) - var(--ca-bh,0px) - 16px)}
}

/* ---------- 2b. menu plein écran (tablette et téléphone) ---------- */
@media (max-width:900px){
  .hc-li--mob{display:block}
  html body .ca-hdr.ca-hdr--c .hc-r2w{display:block;grid-template-rows:none;position:fixed;left:0;right:0;top:var(--ca-hh,72px);bottom:var(--ca-bh,0px);height:auto;max-height:none;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
    background:#fff;border-top:1px solid #EAEEF6;visibility:hidden;opacity:0;pointer-events:none;transition:opacity .16s ease,visibility 0s linear .16s;z-index:2}
  html body .ca-hdr.ca-hdr--c.is-open .hc-r2w{visibility:visible;opacity:1;pointer-events:auto;transition:opacity .16s ease}
  html body .ca-hdr.ca-hdr--c .hc-r2o{overflow:visible;min-height:0}
  html body .hc-r2{padding:10px 14px 28px}
  html body .ca-hdr.ca-hdr--c .hc-li>a,html body .ca-hdr.ca-hdr--c .hc-li>button{height:56px;padding:0 6px;font-size:18px!important;border-radius:14px}
  html body .ca-hdr.ca-hdr--c .hc-li>a:active,html body .ca-hdr.ca-hdr--c .hc-li>button:active{background:#EEF3FB!important}
  html body .ca-hdr.ca-hdr--c .hc-li{border-bottom:1px solid #EEF2F9}
  html body .ca-hdr.ca-hdr--c .hc-li:last-child{border-bottom:0}
  /* entrée « compte » en tête du menu */
  html body .ca-hdr.ca-hdr--c .hc-li--compte{border-bottom:0;margin:0 0 6px}
  html body .ca-hdr.ca-hdr--c .hc-li--compte>a{height:auto;min-height:68px;padding:12px 14px;gap:14px;border-radius:18px;background:#EEF3FB!important;color:#0B2B66!important}
  .hc-mob__t{display:flex;flex-direction:column;gap:2px;min-width:0;text-align:left}
  .hc-mob__t b{font:700 18px/1.15 'Barlow',sans-serif;color:#0B2B66}
  .hc-mob__t small{font:500 14.5px/1.3 'Barlow',sans-serif;color:#52617F;white-space:normal}
  html body .ca-hdr.ca-hdr--c .hc-li--compte>a>.hc-ic:last-child{margin-left:auto;transform:rotate(-90deg)}
  html body .ca-hdr.ca-hdr--c .hc-dark2{color:#52617F!important;font-weight:600!important}
  /* sous-menus (Actualités, Explorer, À propos) en accordéon */
  html body .hc-pn,html body .hc-pn--large{padding:0 0 10px 6px}
  html body .hc-it{min-height:60px;padding:8px 8px;border-radius:14px}
  html body .hc-stats,html body .hc-live-card{margin:6px 0 4px}
  html body .hc-live{margin:12px 0 0}
}

/* ---------- 2c. plus d'écran « Parcs » sur téléphone et tablette : l'entrée « Parcs » mène directement à la liste ---------- */
@media (max-width:900px){
  html body .ca-hdr .ca-menu-parcs-li>.ca-pm{display:none!important}
  html body .ca-hdr .ca-menu-parcs-li>.ca-hdr__nav-btn .hc-ic--chev{display:none}
}
@media (max-width:900px){
  body.ca-dark .ca-hdr.ca-hdr--c .hc-r2w{background:#151B28;border-top-color:#26314A}
  body.ca-dark .ca-hdr.ca-hdr--c .hc-li{border-bottom-color:#26314A}
  body.ca-dark .ca-hdr.ca-hdr--c .hc-li--compte>a{background:#1B2333!important}
  body.ca-dark .hc-mob__t b{color:#EEF3FF}
  body.ca-dark .hc-mob__t small{color:#A9B7D4}
}

/* ---------- 3. pied de page compact et sobre ---------- */
@media (max-width:767px){
  /* fond uni : plus de rayons décoratifs, la lecture passe avant l'effet */
  html body .ca-ftr.ca-ftr--c{margin-top:28px!important;border-radius:18px 18px 0 0;background:var(--ds-primaire-fonce,#0B3C91)!important;background-image:none!important}
  html body .ca-ftr.ca-ftr--c::before{height:3px}
  html body .ca-ftr.ca-ftr--c .fv-in{padding:18px var(--ds-gutter,16px) 0}
  html body .ca-ftr.ca-ftr--c .fv-top{display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:12px;padding-bottom:12px}
  html body .ca-ftr.ca-ftr--c .fv-brand,html body .ca-ftr.ca-ftr--c .fv-droite{display:none}
  html body .ca-ftr.ca-ftr--c .fv-suivez{display:flex;align-items:center;gap:10px;width:100%}
  html body .ca-ftr.ca-ftr--c .fv-suivez__t{margin-right:auto;font:400 22px/1 'Anton',Impact,sans-serif;letter-spacing:.03em;text-transform:uppercase;color:#fff}
  html body .ca-ftr.ca-ftr--c .fv-suivez__i{display:grid;place-items:center;width:46px;height:46px;border-radius:14px;border:1.5px solid rgba(255,255,255,.34);color:#fff;background:rgba(255,255,255,.08);text-decoration:none}
  html body .ca-ftr.ca-ftr--c .fv-suivez__i:active{background:rgba(255,255,255,.2)}
  html body .ca-ftr.ca-ftr--c .fc-li-mob{display:list-item}
  html body .ca-ftr.ca-ftr--c .fv-bas__liens{display:none}
  /* colonnes de liens : accordéons sobres */
  html body .ca-ftr.ca-ftr--c .fv-cols{display:flex;flex-direction:column;align-items:stretch;gap:0;padding:0 0 12px;border-top:1px solid rgba(255,255,255,.14)}
  html body .ca-ftr.ca-ftr--c .fc-col{border-bottom:1px solid rgba(255,255,255,.12)}
  html body .ca-ftr.ca-ftr--c .fc-col h3{position:relative;display:flex;align-items:center;justify-content:space-between;margin:0;min-height:48px;padding:0 2px;cursor:pointer;font-size:15px;-webkit-user-select:none;user-select:none}
  html body .ca-ftr.ca-ftr--c .fc-col h3::after{content:"";width:8px;height:8px;margin:-4px 4px 0 0;border:solid #ec9521;border-width:0 2.5px 2.5px 0;transform:rotate(45deg);transition:transform .2s}
  html body .ca-ftr.ca-ftr--c .fc-col.is-open h3::after{transform:rotate(-135deg);margin-top:4px}
  html body .ca-ftr.ca-ftr--c .fc-col .fc-liens{display:none;padding:0 0 8px 2px}
  html body .ca-ftr.ca-ftr--c .fc-col.is-open .fc-liens{display:flex}
  html body .ca-ftr.ca-ftr--c .fc-liens a{display:block;padding:9px 0;font-size:16.5px!important}
  /* newsletter : une ligne de titre, un champ, le consentement en petit */
  html body .ca-ftr.ca-ftr--c .fv-cols .fv-nl{padding:14px 0 0;border:0}
  html body .ca-ftr.ca-ftr--c .nlf--pied .nlf__titre{margin:0 0 8px;font-size:16px}
  html body .ca-ftr.ca-ftr--c .nlf--pied .nlf__ligne{flex-direction:row;gap:8px}
  html body .ca-ftr.ca-ftr--c .nlf--pied .nlf__in{flex:1 1 0;min-width:0;min-height:46px}
  html body .ca-ftr.ca-ftr--c .nlf--pied .nlf__btn{width:auto;min-height:46px;padding:0 16px}
  html body .ca-ftr.ca-ftr--c .nlf--pied .nlf__case{margin-top:8px;font-size:12.5px;line-height:1.35;opacity:.9}
  html body .ca-ftr.ca-ftr--c .nlf--pied .nlf__case input{flex-basis:20px;width:20px;height:20px}
  /* bas : copyright, mentions, et un petit bouton rond pour remonter */
  html body .ca-ftr.ca-ftr--c .fv-bas{display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;gap:0 12px;padding:10px 0 14px;border-top:1px solid rgba(255,255,255,.12);font-size:13.5px}
  html body .ca-ftr.ca-ftr--c .fv-bas>span:first-child{font-size:12.5px}
  html body .ca-ftr.ca-ftr--c .fv-bas>span:first-child{grid-column:2;grid-row:1;font-size:12.5px}
  html body .ca-ftr.ca-ftr--c .fv-haut{grid-column:1;grid-row:1;justify-self:start;width:44px;height:44px;min-height:44px;padding:0;border-radius:50%;font-size:0;gap:0;display:grid;place-items:center}
  html body .ca-ftr.ca-ftr--c .fv-haut svg{width:18px;height:18px}
}

/* formulaires newsletter : en colonne (≤ 560 px) le champ gardait une hauteur nulle (flex:1 dans une colonne) */
@media (max-width:560px){.nlf__ligne{flex-direction:column}.nlf__in{flex:0 0 auto;width:100%}}

/* bouton flottant « Une question ? » : pastille ronde sur téléphone, cachée quand le clavier est ouvert */
@media (max-width:767px){
  body .ca-ast__bouton{font-size:0;line-height:0;padding:0;width:48px;height:48px;border-radius:50%;display:grid;place-items:center}
  body .ca-ast__bouton span{width:28px;height:28px;line-height:28px;margin:0;font-size:17px}
  body.ca-kb .ca-ast{display:none}
}

/* ==========================================================================
   Lot D (18/11/2026) : accueil, gouttière commune, rangées qui défilent, barre masquable
   ========================================================================== */
:root{--ds-gutter:16px}

/* ---------- 4. accueil : bloc d'introduction (boutons alignés, compteurs en trois colonnes) ---------- */
@media (max-width:767px){
  html body .ca-h3__in{padding-left:calc(var(--ds-gutter,16px) + 6px);padding-right:calc(var(--ds-gutter,16px) + 6px)}
  html body .ca-h3__sur{font-size:13px;letter-spacing:.08em}
  html body .ca-h3__actions{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;width:100%;margin-top:22px}
  html body .ca-h3__btn{display:flex;align-items:center;justify-content:center;gap:12px;box-sizing:border-box;width:100%;min-height:50px;height:50px;padding:0 18px;font-size:16px;line-height:1;border-radius:14px;margin:0;white-space:nowrap}
  html body .ca-h3__btn--or{justify-content:space-between;padding-right:8px}
  html body .ca-h3__btn--or .ca-arr{width:34px;height:34px;flex:none}
  html body .ca-h3__chiffres{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;width:100%;margin:20px 0 0;padding:0;list-style:none}
  html body .ca-h3__stat{display:flex;flex-direction:column;align-items:center!important;justify-content:center;gap:2px;min-width:0;margin:0;padding:10px 4px 9px;text-align:center;font-size:12.5px;line-height:1.15;white-space:normal;border-radius:14px}
  html body .ca-h3__stat b{display:block;margin:0;font-size:30px;line-height:1}
}
@media (max-width:359px){
  html body .ca-h3__stat{font-size:11.5px}
  html body .ca-h3__stat b{font-size:26px}
}

/* ---------- 5. pages courantes : gouttière de 16 px sur toutes les pages à cartes ---------- */
@media (max-width:767px){
  /* variable commune : --ds-gutter (16 px). Les pages à cartes (légales, recherche, blog, accueil) la prennent ici ; les autres pages la reprennent dans leur feuille. */
  html body .lg-wrap,html body .ca-rp,html body .ca-m-page{padding-left:var(--ds-gutter,16px)!important;padding-right:var(--ds-gutter,16px)!important}
  html body .ca-rp__hero{padding-left:20px!important;padding-right:20px!important}
  html body .ca-rp__corps,html body .ca-rp__corps>*{padding-left:0!important;padding-right:0!important}
  /* l'en-tête de page (.ca-ph) a une largeur fixée (100vw - 48 px) : sur les pages à cartes de 16 px, il prend la même gouttière */
  html body .lg-wrap .ca-ph,html body .ca-m-page .ca-ph,html body .ca-rp .ca-ph{width:auto!important;max-width:none!important;margin-left:0!important;margin-right:0!important}
}

/* ---------- 6. barre du bas masquée sur les écrans « plein écran » (ex. Mon Trip) ---------- */
html body.ca-plein-ecran .ca-bar{display:none!important}
html body.ca-plein-ecran.ca-has-barre{padding-bottom:0!important}
html body.ca-plein-ecran .ca-ast{bottom:16px}

/* ---------- 7. rangées de puces/onglets qui défilent : flèche + dégradé (assets/mobile-defil.js) ---------- */
.ca-defil__fl{position:absolute;z-index:3;display:none;align-items:center;margin:0;padding:0;border:0;background:none;cursor:pointer;-webkit-appearance:none;appearance:none;color:#124A9E;touch-action:manipulation}
.ca-defil__fl.is-on{display:flex}
.ca-defil__fl--d{justify-content:flex-end;background:linear-gradient(90deg,transparent,var(--ca-defil-bg,#F4F7FC) 62%)}
.ca-defil__fl--g{justify-content:flex-start;background:linear-gradient(270deg,transparent,var(--ca-defil-bg,#F4F7FC) 62%)}
.ca-defil__fl i{display:grid;place-items:center;width:30px;height:30px;margin:0 2px;border-radius:50%;background:#fff;box-shadow:0 1px 6px rgba(11,43,102,.28);font-style:normal}
.ca-defil__fl svg{width:16px;height:16px;display:block}
.ca-defil__fl--g svg{transform:scaleX(-1)}
.ca-defil__fl{width:46px}
.ca-defil__fl:focus-visible i{outline:2px solid #ec9521;outline-offset:2px}
body.ca-dark .ca-defil__fl i{background:#26314A;color:#fff}
@media (min-width:901px){.ca-defil__fl{display:none!important}}

/* ---------- 8. contrôle des pages (inventaire du) ---------- */
@media (max-width:767px){
	/* pages « Ce qui ouvre en 20xx » : liste et années collées au bord */
	.ca-auto__tete{margin-left:16px;margin-right:16px}
	.ca-auto .ca-annee,.ca-auto>.ca-vide,.ca-auto__nav--annees{box-sizing:border-box;padding-left:16px;padding-right:16px}
	.ca-auto>.ca-vide{margin:18px 0}
	.ca-auto__nav--annees{margin:18px 0}
	.ca-annee__projet{border-radius:16px;overflow:hidden}
	.ca-annee__titre{margin-top:22px}
	/* initiales des jours du calendrier d'ouverture d'un parc : 9 px illisibles */
	.pa-d small{font-size:11px}
	/* bandeau du jeu « Quelle news ? » : le texte touchait le bas du cadre bleu */
	html body #main-content > .ca-ph--bande.ca-ph--jeu[style]{padding-bottom:28px!important}
	.ca-auto .ca-auto__tete{margin-left:16px!important;margin-right:16px!important}
	/* bandeau de cookies (Complianz) : moins haut sur téléphone, Accepter et Refuser côte à côte, de même taille */
	html body .cmplz-cookiebanner .cmplz-buttons{display:grid!important;grid-template-columns:1fr 1fr;gap:8px!important}
	html body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn{margin:0!important;min-height:44px}
	html body .cmplz-cookiebanner .cmplz-buttons .cmplz-view-preferences{grid-column:1/-1}
	html body .cmplz-cookiebanner{max-height:70vh;overflow-y:auto}
	/* zones tactiles : on agrandit la zone qui répond au toucher sans changer l'aspect */
	.ca-etiquette-parc::after{content:"";position:absolute;left:0;right:0;top:-7px;bottom:-7px}
	.ca-fiab__b,.hc-live{position:relative}
	.ca-fiab__b::after,.hc-live::after{content:"";position:absolute;left:-8px;right:-8px;top:-8px;bottom:-8px}
}

/* en-tête « Tous les parcs » : le texte touchait le bas du cadre bleu (refonte.css : padding-bottom:0 sur les div à style inline) */
html body #main-content > .ca-ph--bande.pa-hero[style]{padding-bottom:46px!important}
@media (max-width:767px){html body #main-content > .ca-ph--bande.pa-hero[style]{padding-bottom:22px!important}}

@media (max-width:900px){html body .ca-ftr.ca-ftr--c .fc-col h3{color:#fff}html body .ca-ftr.ca-ftr--c .fv-haut svg{display:block;margin:0;flex:none}html body .ca-ftr.ca-ftr--c .fv-haut{line-height:0;text-align:center}}
@media (max-width:900px){
html body .ca-pv__filtres{flex-wrap:wrap}
html body .ca-pv__filtres .ca-pv__maj{flex:1 1 100%;width:100%;order:9;justify-content:center;box-sizing:border-box}
html body .ca-itis__grille,html body .itis__grille{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
html body .ca-itis__grille>*,html body .itis__grille>*{min-width:0;font-size:14px}
}

@media (max-width:900px){
html body .ca-videos__contenu{display:flex;flex-direction:column}
html body .ca-videos__tete{display:contents}
html body .ca-videos__titre{order:-2}
html body .ca-videos__sous{order:-1}
html body .ca-videos__voir{order:5;align-self:center;margin:16px auto 0}
html body .ca-h3__chiffres{position:relative}
html body .ca-h3__stat{position:static}
html body .ca-fun{left:0;right:0;width:auto;max-width:none;box-sizing:border-box;bottom:calc(100% + 10px);font-size:15px}
}

@media (max-width:900px){html body .ca-h3__chiffres{position:relative}html body .ca-h3__chiffres .ca-h3__stat{position:static!important}html body .ca-h3__chiffres .ca-fun{position:absolute!important;left:0!important;right:0!important;width:auto!important;max-width:none!important;min-width:0;white-space:normal;word-break:normal;overflow-wrap:break-word;text-align:left}}

@media (max-width:900px){html body .ca-ftr.ca-ftr--c .fv-contact{grid-column:1 / -1;grid-row:2;justify-self:stretch;justify-content:center;margin-top:10px}}

/* « Suivez-nous » : chaque réseau avec son nombre d'abonnés */
@media (max-width:767px){
  html body .ca-ftr.ca-ftr--c .fv-suivez{gap:8px}
  html body .ca-ftr.ca-ftr--c .fv-suivez__i{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:auto;min-width:46px;padding:0 10px}
  html body .ca-ftr.ca-ftr--c .fv-suivez__i .fv-n{padding:0;background:transparent;font:700 13px/1 'Barlow',sans-serif}
  html body .ca-ftr.ca-ftr--c .fv-suivez__t{font-size:19px}
}
