/* =====================================================================
   ADAPTATIF : compositions de pages pour tablette et mobile
   Tablette : 768-1024 px (portrait et paysage peuvent differer).
   Mobile : < 768 px. Le desktop (> 1024 px) n'est jamais touche.
   Les selecteurs sont prefixes par « body » pour passer devant les
   anciennes regles de redimensionnement, quel que soit leur ordre.
   ===================================================================== */

/* ===================== TABLETTE (768-1024) ===================== */
@media (min-width:768px) and (max-width:1024px){
  body .wrap{padding-left:32px;padding-right:32px}
  body section{padding:56px 0}
  /* compositions sur deux colonnes conservees (texte + image, formulaire + infos) */
  body .two{grid-template-columns:1fr 1fr;gap:32px;align-items:center}
  body .two.top{align-items:start}
  body .shero .wrap{grid-template-columns:1.1fr .9fr;gap:32px;align-items:center}
  body .shero h1{font-size:34px}
  body .skel.sk-img{height:260px}
  /* grilles : 3 colonnes en paysage, 2 en portrait */
  body .grid3,body .services,body .objs,body .lnks,body .cardgrid.cg3,body .legals{grid-template-columns:repeat(3,1fr);gap:16px}
  body .grid4,body .metiers{grid-template-columns:repeat(4,1fr);gap:14px}
  body .handi{flex-direction:row;align-items:center;padding:24px 26px}
  body .handi .btn{width:auto;margin-left:auto}
  body .head h2,body .s-head h2{font-size:28px}
  body .rtcols{columns:2}
  body .infoline .k{width:160px}
  body .ct{grid-template-columns:.9fr 1.1fr;gap:28px}
  /* pied de page : marque sur toute la largeur, puis 3 colonnes de liens */
  body footer .ftop,body footer.en-foot .ftop{grid-template-columns:repeat(3,1fr);gap:28px 32px}
  body footer .ftop>.fbrand{grid-column:1/-1}
  body footer .ftop a{display:flex;align-items:center;min-height:44px;padding:0}
  /* puces, pagination, liens « voir tout » : cibles tactiles */
  body .fchip,body .chip,body .achip,body .pg{min-height:44px;min-width:44px}
  body .head.head-row .more{display:inline-flex;align-items:center;min-height:44px}
}
@media (min-width:768px) and (max-width:1024px) and (orientation:portrait){
  body .grid3,body .services,body .objs,body .lnks,body .cardgrid.cg3,body .legals{grid-template-columns:repeat(2,1fr)}
  body .grid4,body .metiers{grid-template-columns:repeat(2,1fr)}
  body .shero .wrap{grid-template-columns:1fr}
  body .shero .skel.sk-img{height:240px}
  /* actualites : rangee qu'on fait defiler au doigt, 2 cartes visibles */
  body .news{display:grid;grid-auto-flow:column;grid-template-columns:none;grid-auto-columns:calc((100% - 16px)/2.15);gap:16px;
    overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:8px;scrollbar-width:none}
  body .news::-webkit-scrollbar{display:none}
  body .news>*{scroll-snap-align:start}
}

/* ===================== MOBILE (< 768) ===================== */
@media (max-width:767px){
  body .wrap{padding-left:20px;padding-right:20px}
  body section{padding:44px 0}
  body .head h2,body .s-head h2{font-size:24px;line-height:1.2}
  body .head,body .s-head{margin-bottom:22px}
  body .two{grid-template-columns:1fr;gap:20px}
  body .skel.sk-img{height:200px}
  body .shero .wrap{grid-template-columns:1fr;gap:22px}
  body .shero h1,body .ehero h1{font-size:30px;line-height:1.12}
  body .grid3,body .services,body .objs,body .lnks,body .cardgrid,body .legals,body .metiers,body .schools{grid-template-columns:1fr}
  /* chiffres cles : 2 par ligne plutot qu'une colonne interminable */
  body .grid4,body .grid3:has(.kcard),body .stats,body .pcts,body .statrow{grid-template-columns:1fr 1fr;gap:12px}
  body .grid4:has(.card-sk){grid-template-columns:1fr}
  /* cartes de formation : format liste compact (vignette a gauche) */
  body .grid3:has(.sk-thumb){gap:10px}
  body .card-sk:has(.sk-thumb){display:grid;grid-template-columns:96px 1fr;grid-template-rows:auto auto auto;column-gap:14px;align-items:center;padding:12px}
  body .card-sk:has(.sk-thumb) .sk-thumb{grid-row:1/4;height:84px;margin:0}
  body .card-sk:has(.sk-thumb) .skel{margin-bottom:6px}
  body .rtcols,body .lettre{columns:1}
  body .infoline>div{flex-direction:column;gap:4px;padding:14px 0}
  body .infoline .v{font-size:16px}
  body .infoline .k{width:auto;font-size:13px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
  body .resband{padding:20px}
  body .ctaband{flex-direction:column;align-items:stretch;padding:24px 20px}
  body .ctaband a,body .ctaband .btn{justify-content:center}
  body .handi{flex-direction:column;align-items:stretch;gap:14px;padding:22px 20px}
  body .handi .btn{width:100%;justify-content:center;margin-left:0}
  body .news{grid-template-columns:1fr;gap:14px}
  body .ct,body .frm .r2{grid-template-columns:1fr}
  /* cibles tactiles */
  body .fchip,body .chip,body .achip,body .pg{min-height:44px;min-width:44px}
  body .filters{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin-left:-20px;margin-right:-20px;padding:0 20px 4px}
  body .filters::-webkit-scrollbar{display:none}
  body .filters>*{flex:0 0 auto}
  body .head.head-row .more,body .lien{display:inline-flex;align-items:center;min-height:44px}
  body .mcard a,body .rubcol a{display:flex;align-items:center;min-height:44px}
  body .btn{min-height:50px}
  body .cta,body .hact-cta{flex-direction:column;align-items:stretch}
  body .cta .btn,body .hact-cta .btn{justify-content:center}
}
@media (max-width:360px){body .wrap{padding-left:16px;padding-right:16px}}

/* ===================== ACCUEIL ===================== */
@media (min-width:768px) and (max-width:1024px){
  /* acces profils : grille tactile 3 x 3 */
  body #profils .profiles{grid-template-columns:repeat(3,1fr);gap:14px}
  body #profils .pc{min-height:0;padding:20px}
  body #profils .pc .brands{display:none}
  body .strip .wrap{grid-template-columns:repeat(4,1fr)}
  body .stats .wrap{grid-template-columns:repeat(5,1fr);gap:16px}
  body #groupe .brands{grid-template-columns:repeat(4,1fr)}
  body .orient{flex-direction:row;align-items:center}
  body .orient .btn{margin-left:auto}
}
@media (min-width:768px) and (max-width:1024px) and (orientation:portrait){
  body #groupe .brands{grid-template-columns:repeat(3,1fr)}
  body .strip .wrap{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:767px){
  /* acces profils : liste verticale, une ligne par profil, a la taille du pouce */
  body #profils .profiles{grid-template-columns:1fr;gap:10px}
  body #profils .pc{display:grid;grid-template-columns:44px 1fr 18px;grid-template-areas:"ic t ch" "ic p ch";column-gap:14px;row-gap:2px;
    align-items:center;min-height:76px;padding:14px 16px}
  body #profils .pc .ic{grid-area:ic;margin:0;width:44px;height:44px}
  body #profils .pc h3{grid-area:t;margin:0;font-size:17px}
  body #profils .pc p{grid-area:p;font-size:16px!important;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  body #profils .pc .brands{display:none}
  body #profils .pc .go{grid-area:ch;margin:0;padding:0;font-size:0;justify-content:flex-end}
  body #profils .pc .go svg{width:18px;height:18px}
  body .orient{flex-direction:column;align-items:stretch;padding:18px}
  body .orient .btn{margin-left:0;justify-content:center}
  body .strip .wrap{grid-template-columns:1fr 1fr}
  body .strip .f{padding:20px 16px;border-right:1px solid var(--line);border-bottom:1px solid var(--line)}
  body .strip .f:nth-child(2n){border-right:0}
  body .stats .wrap{grid-template-columns:1fr 1fr;gap:22px;padding:32px 20px}
  body .stats .s:last-child{grid-column:1/-1}
  /* entites du groupe : cartes qu'on fait defiler au doigt */
  body #groupe .brands{display:grid;grid-auto-flow:column;grid-template-columns:none;grid-auto-columns:78%;gap:12px;overflow-x:auto;
    scroll-snap-type:x mandatory;margin:0 -20px;padding:0 20px 8px;scrollbar-width:none}
  body #groupe .brands::-webkit-scrollbar{display:none}
  body #groupe .bc{scroll-snap-align:start;min-height:120px}
  body #groupe .head.row{align-items:flex-start}
}

/* ===================== HERO CARROUSEL ===================== */
/* tablette : fleches dans la barre du bas, plus sur le texte */
@media (min-width:768px) and (max-width:1024px){
  body .hcar-view{height:440px}
  body .hcar-nav{top:auto;bottom:16px;transform:none;width:48px;height:48px}
  body .hcar-prev{left:auto;right:132px}
  body .hcar-next{right:76px}
  body .hcar-ctl{display:none!important} /* pas de defilement automatique au doigt : pas de bouton Pause */
  body .hcar-dot{height:44px}
  body .hs-body{padding-bottom:60px}
  body .hslide h2{font-size:32px}
  body .hs-media{padding-left:52%}
}
/* mobile : le meme hero qu'en desktop et en tablette (image pleine largeur, voile, texte blanc),
   une diapositive par actualite qu'on fait defiler au doigt, pagination visible */
@media (max-width:767px){
  body .hcar{position:relative}
  body .hcar-view{height:auto;display:flex;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain}
  body .hcar-view::-webkit-scrollbar{display:none}
  body .hslide{position:relative;inset:auto;flex:0 0 100%;min-height:480px;opacity:1;visibility:visible;scroll-snap-align:start;scroll-snap-stop:always;transition:none}
  body .hslide .hs-body{position:relative;inset:auto;min-height:480px;display:flex;align-items:flex-start;padding:36px 0 96px}
  body .hslide .hs-media svg{display:none}
  body .hslide h2{font-size:27px!important;line-height:1.14}
  body .hs-inner p{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
  body .hs-cta{flex-direction:column;align-items:stretch;gap:10px}
  body .hs-cta .btn{justify-content:center}
  body .hcar-nav,body .hcar-ctl{display:none!important}
  /* pagination posee sur le bas du hero, comme en desktop */
  body .hcar-bar{position:absolute;left:0;right:0;bottom:16px;z-index:5}
  body .hcar-bar .wrap{justify-content:flex-start}
  body .hcar-count{display:inline!important}
}

/* ===================== HERO SANS ACTUALITES (.hact) ===================== */
@media (min-width:768px) and (max-width:1024px){
  body .hact-quick{grid-template-columns:repeat(2,1fr)}
  body .hact-q{min-height:76px}
}
@media (max-width:767px){
  body .hact-body{padding-top:36px;padding-bottom:24px}
  body .hact h1{font-size:28px}
  body .hact-quick{grid-template-columns:1fr;gap:10px;margin-top:28px}
  body .hact-q{min-height:64px}
}

/* ===================== PAGES D'ORIENTATION ===================== */
@media (min-width:768px) and (max-width:1024px){
  body .orient-main{padding:40px 0 64px}
  body .insts,body .insts.insts-center{display:flex;flex-wrap:wrap;justify-content:center;gap:18px}
  body .insts>.inst{flex:0 1 calc((100% - 36px)/3)}
  body .insts.cols-2>.inst{flex-basis:calc((100% - 18px)/2)}
  body .inst .go{min-height:52px}
}
@media (min-width:768px) and (max-width:1024px) and (orientation:portrait){
  body .insts>.inst{flex-basis:calc((100% - 18px)/2)}
}
@media (max-width:767px){
  body .orient-main{padding:24px 0 40px}
  body .orient-head{margin-bottom:20px}
  body .orient-head h1{font-size:28px}
  body .insts,body .insts.cols-2,body .insts.insts-center{display:grid;grid-template-columns:1fr;gap:14px}
  body .insts>.inst{flex:none}
  body .inst-top{padding:18px 18px 14px}
  body .inst-facts{padding:4px 18px}
  body .inst-facts>div{display:grid;grid-template-columns:110px 1fr;gap:10px;padding:10px 0}
  body .inst-facts dt{margin:2px 0 0}
  body .inst .go{margin:0 18px 18px;min-height:52px;padding:0 16px;border:1px solid var(--ink);border-top:1px solid var(--ink);border-radius:10px;
    background:var(--ink);color:#fff;justify-content:center;gap:10px}
}
