/* Ogrelo · en-tête public partagé (server/entete.js). Mobile d'abord : logo, pastille « Ouvrir l'app », burger → menu en tuiles.
   Palette calme (vert de l'ogre pour l'action, tons doux pour les tuiles, aucun rouge). Jamais dans l'appli de l'élève. */
.og-haut{
  --og-bg:#FBF7EE;--og-card:#FFFFFF;--og-ink:#22261F;--og-soft:#59614F;--og-line:#E7E1D3;
  --og-ogre:#58A847;--og-ogre-d:#3E7F31;--og-ogre-dd:#2F6326;--og-voile:rgba(34,38,31,.32);--og-ombre:0 18px 40px rgba(34,38,31,.14);
  --og-vert:#3E9F5A;--og-sarcelle:#2A9C93;--og-bleu:#3F86D8;--og-violet:#8466D6;--og-orange:#E5873A;--og-jaune:#D49A22;--og-rose:#D46F9C;
  --og-h:64px;
  position:sticky;top:0;z-index:60;
  background:color-mix(in srgb,var(--og-bg) 90%,transparent);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);
  border-bottom:1px solid color-mix(in srgb,var(--og-line) 75%,transparent);
  font-family:"Manrope",system-ui,-apple-system,"Segoe UI",sans-serif;
}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]) .og-haut{
  --og-bg:#141813;--og-card:#1D221C;--og-ink:#ECEFE8;--og-soft:#B1BAAA;--og-line:#323A30;--og-ogre:#5FB34D;--og-ogre-d:#3E7F31;--og-ogre-dd:#2C5E23;
  --og-voile:rgba(0,0,0,.5);--og-ombre:0 18px 40px rgba(0,0,0,.45)}}
:root[data-theme="dark"] .og-haut{
  --og-bg:#141813;--og-card:#1D221C;--og-ink:#ECEFE8;--og-soft:#B1BAAA;--og-line:#323A30;--og-ogre:#5FB34D;--og-ogre-d:#3E7F31;--og-ogre-dd:#2C5E23;
  --og-voile:rgba(0,0,0,.5);--og-ombre:0 18px 40px rgba(0,0,0,.45)}
.og-haut *{box-sizing:border-box}
.og-barre{display:flex;align-items:center;gap:10px;max-width:1080px;margin:0 auto;padding:0 16px;min-height:var(--og-h)}
.og-marque{display:inline-flex;align-items:center;gap:9px;min-width:0;flex:0 1 auto;text-decoration:none;color:var(--og-ink)!important;font:800 1.35rem/1 "Baloo 2",system-ui,sans-serif;border-radius:12px}
.og-marque svg{width:38px;height:38px;flex:none;border-radius:12px}
.og-marque span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.og-cta{margin-left:auto;flex:none;display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 16px;border-radius:999px;
  background:var(--og-ogre-d);color:#fff!important;text-decoration:none;white-space:nowrap;font:800 .98rem/1 "Baloo 2",system-ui,sans-serif;letter-spacing:.01em;
  box-shadow:0 3px 0 var(--og-ogre-dd);transition:transform .12s ease,box-shadow .12s ease,background .15s ease}
.og-cta:hover{background:var(--og-ogre)}
.og-cta:active{transform:translateY(3px);box-shadow:0 0 0 var(--og-ogre-dd)}
.og-burger{flex:none;display:none;align-items:center;justify-content:center;width:44px;height:44px;padding:0;margin:0;cursor:pointer;
  border:2px solid var(--og-line);border-radius:14px;background:var(--og-card);color:var(--og-ink);box-shadow:0 3px 0 var(--og-line);
  transition:transform .12s ease,box-shadow .12s ease;-webkit-tap-highlight-color:transparent}
.og-burger:active{transform:translateY(3px);box-shadow:0 0 0 var(--og-line)}
.og-burger svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;overflow:visible}
.og-burger path{transform-origin:12px 12px;transition:transform .28s cubic-bezier(.2,.8,.2,1),opacity .18s ease}
.og-haut[data-ouvert] .og-b1{transform:translateY(5px) rotate(45deg)}
.og-haut[data-ouvert] .og-b2{opacity:0;transform:scaleX(.2)}
.og-haut[data-ouvert] .og-b3{transform:translateY(-5px) rotate(-45deg)}
.og-ico{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}
.og-liens{list-style:none;margin:0;padding:0}
.og-lien,.og-connexion{text-decoration:none;color:var(--og-ink)!important;-webkit-tap-highlight-color:transparent}
.og-haut a:focus-visible,.og-burger:focus-visible{outline:3px solid var(--og-ogre);outline-offset:2px}
.og-c-vert{--og-c:var(--og-vert)}.og-c-sarcelle{--og-c:var(--og-sarcelle)}.og-c-bleu{--og-c:var(--og-bleu)}.og-c-violet{--og-c:var(--og-violet)}
.og-c-orange{--og-c:var(--og-orange)}.og-c-jaune{--og-c:var(--og-jaune)}.og-c-rose{--og-c:var(--og-rose)}
.og-voile{display:none}

/* ---------- ordinateur : menu horizontal ---------- */
@media (min-width:1061px){
  .og-nav{display:flex;align-items:center;gap:2px;margin-left:auto}
  .og-liens{display:flex;align-items:center;gap:2px}
  .og-lien,.og-connexion{display:inline-flex;align-items:center;gap:6px;padding:8px 11px;border-radius:12px;color:var(--og-soft)!important;font-weight:700;font-size:.93rem;white-space:nowrap;transition:background .15s ease,color .15s ease}
  .og-lien:hover,.og-connexion:hover{background:var(--og-card);color:var(--og-ink)!important}
  .og-lien[aria-current="page"]{color:var(--og-ogre-d)!important;background:color-mix(in srgb,var(--og-ogre) 14%,transparent)}
  .og-pic{display:none}
  .og-connexion .og-ico{width:18px;height:18px}
  .og-cta{margin-left:8px}
}
@media (min-width:1061px) and (prefers-color-scheme: dark){:root:not([data-theme="light"]) .og-lien[aria-current="page"]{color:#8FD07E!important}}

/* ---------- mobile et tablette : burger + menu en tuiles ---------- */
@media (max-width:1060px){
  /* sans JavaScript : le menu reste visible, en ligne défilante sous la barre */
  .og-barre{flex-wrap:wrap}
  .og-haut:not(.og-js) .og-nav{order:3;width:100%;display:flex;gap:8px;overflow-x:auto;padding:0 0 10px}
  .og-haut:not(.og-js) .og-liens{display:flex;gap:8px}
  .og-haut:not(.og-js) .og-lien,.og-haut:not(.og-js) .og-connexion{display:inline-flex;white-space:nowrap;padding:8px 12px;border-radius:999px;border:2px solid var(--og-line);background:var(--og-card);font-weight:700;font-size:.92rem}
  .og-haut:not(.og-js) .og-pic,.og-haut:not(.og-js) .og-connexion .og-ico{display:none}

  .og-js .og-barre{flex-wrap:nowrap}
  .og-js .og-burger{display:inline-flex}
  .og-js .og-nav{position:fixed;left:0;right:0;top:var(--og-h);z-index:2;max-height:calc(100vh - var(--og-h));max-height:calc(100dvh - var(--og-h));overflow-y:auto;overscroll-behavior:contain;
    padding:18px 16px 22px;background:var(--og-bg);border-radius:0 0 26px 26px;box-shadow:var(--og-ombre);border-bottom:1px solid var(--og-line);
    opacity:0;visibility:hidden;transform:translateY(-14px);transition:transform .32s cubic-bezier(.2,.8,.2,1),opacity .22s ease,visibility 0s linear .32s}
  .og-js[data-ouvert] .og-nav{opacity:1;visibility:visible;transform:none;transition:transform .32s cubic-bezier(.2,.8,.2,1),opacity .22s ease,visibility 0s}
  .og-js .og-voile{display:block;position:fixed;left:0;right:0;top:var(--og-h);height:100vh;z-index:1;background:var(--og-voile);opacity:0;visibility:hidden;transition:opacity .25s ease,visibility 0s linear .25s}
  .og-js[data-ouvert] .og-voile{opacity:1;visibility:visible;transition:opacity .25s ease,visibility 0s}
  .og-js .og-liens{display:grid;grid-template-columns:1fr 1fr;gap:12px;max-width:640px;margin:0 auto}
  .og-js .og-lien{display:flex;flex-direction:column;align-items:flex-start;gap:10px;min-height:96px;padding:14px;border-radius:20px;
    background:color-mix(in srgb,var(--og-c) 9%,var(--og-card));border:2px solid color-mix(in srgb,var(--og-c) 22%,var(--og-line));
    box-shadow:0 4px 0 color-mix(in srgb,var(--og-c) 28%,var(--og-line));font:800 1.05rem/1.15 "Baloo 2",system-ui,sans-serif;
    transition:transform .12s ease,box-shadow .12s ease}
  .og-js .og-lien:active{transform:translateY(4px);box-shadow:0 0 0 transparent}
  .og-js .og-lien[aria-current="page"]{border-color:var(--og-c);box-shadow:0 4px 0 var(--og-c)}
  .og-js .og-pic{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:13px;background:var(--og-c);color:#fff}
  .og-js .og-connexion{display:flex;align-items:center;justify-content:center;gap:8px;max-width:640px;min-height:50px;margin:16px auto 0;border-radius:16px;
    background:var(--og-ogre-d);border:2px solid var(--og-ogre-dd);box-shadow:0 4px 0 var(--og-ogre-dd);color:#fff!important;font:800 1.02rem/1 "Baloo 2",system-ui,sans-serif}
  .og-js .og-connexion .og-ico{color:#fff}
  .og-js .og-connexion:active{transform:translateY(4px);box-shadow:none}
  .og-js .og-liens li:last-child:nth-child(odd){grid-column:1/-1}
  .og-js .og-liens li:last-child:nth-child(odd) .og-lien{flex-direction:row;align-items:center;min-height:72px}
  /* les tuiles arrivent l'une après l'autre */
  .og-js .og-liens li,.og-js .og-connexion{opacity:0;transform:translateY(8px);transition:opacity .25s ease,transform .3s cubic-bezier(.2,.8,.2,1)}
  .og-js[data-ouvert] .og-liens li,.og-js[data-ouvert] .og-connexion{opacity:1;transform:none}
  .og-js[data-ouvert] .og-liens li:nth-child(2){transition-delay:.03s}.og-js[data-ouvert] .og-liens li:nth-child(3){transition-delay:.06s}
  .og-js[data-ouvert] .og-liens li:nth-child(4){transition-delay:.09s}.og-js[data-ouvert] .og-liens li:nth-child(5){transition-delay:.12s}
  .og-js[data-ouvert] .og-liens li:nth-child(6){transition-delay:.15s}.og-js[data-ouvert] .og-liens li:nth-child(7){transition-delay:.18s}
  .og-js[data-ouvert] .og-connexion{transition-delay:.2s}
}
@media (max-width:359px){.og-marque span{display:none}}
@media (min-width:400px) and (max-width:1060px){.og-cta{padding:0 18px}}
html.og-bloque,html.og-bloque body{overflow:hidden!important}
@media (prefers-reduced-motion: reduce){
  .og-haut *,.og-haut *::before,.og-haut *::after{transition:none!important;animation:none!important}
  .og-js .og-nav{transform:none}
}
