/* ============================================================
   modules.css : identite visuelle par module AdaptUP.
   A charger APRES labup.css ou adaptup.css.
   Aucune regle globale : tout vit sous body.mod-xxx, donc une
   page sans classe garde exactement son apparence actuelle.
   Pour changer la couleur d'un module : une ligne, ici.
   ============================================================ */

/* --- Rebranchement des noms existants sur l'accent du module.
   --green*       : noms utilises par labup.css
   --color-green* : noms utilises par adaptup.css, sliceup, fitup
   Un module dont l'accent est le vert ne bouge donc pas.        */
body[class*="mod-"] {
  --green:            var(--accent);
  --green-dark:       var(--accent-dk);
  --green-lt:         var(--accent-lt);
  --green-soft:       var(--accent-md);
  --color-green:      var(--accent);
  --color-green-lt:   var(--accent-lt);
  --color-green-soft: var(--accent-md);
}

/* --- L'entete et le pied de page portent la marque LabUP, pas le
   module : on y refige le vert d'origine.                       */
body[class*="mod-"] .site-header,
body[class*="mod-"] .site-footer {
  --green:      #00CE75;
  --green-dark: #00b566;
  --green-lt:   #E8FBF3;
  --green-soft: #A2F6D1;
}

/* --- Palette par module.
   --accent    couleur du module
   --accent-md teinte moyenne : fin du degrade du bandeau
   --accent-lt teinte tres claire : fonds, survols
   --accent-dk version foncee : texte blanc sur aplat            */
body.mod-bibliup     { --accent:#00CE75; --accent-md:#A2F6D1; --accent-lt:#E8FBF3; --accent-dk:#00A85E; }
body.mod-filaments   { --accent:#00CE75; --accent-md:#A2F6D1; --accent-lt:#E8FBF3; --accent-dk:#00A85E; }
body.mod-sliceup     { --accent:#41EFFF; --accent-md:#8DF5FF; --accent-lt:#EAFDFF; --accent-dk:#0090AB; }
body.mod-tutoriels   { --accent:#41EFFF; --accent-md:#8DF5FF; --accent-lt:#EAFDFF; --accent-dk:#0090AB; }
body.mod-pictup      { --accent:#A575FF; --accent-md:#C6AEFF; --accent-lt:#F3EEFF; --accent-dk:#7B4DF5; }
body.mod-zenup       { --accent:#A575FF; --accent-md:#C6AEFF; --accent-lt:#F3EEFF; --accent-dk:#7B4DF5; }
body.mod-pildiup     { --accent:#FFB330; --accent-md:#FFD79C; --accent-lt:#FFEED0; --accent-dk:#B36B00; }
body.mod-maintenance { --accent:#FFB330; --accent-md:#FFD79C; --accent-lt:#FFEED0; --accent-dk:#B36B00; }
/* fitup : en attente de son illustration et de sa couleur */

/* ============================================================
   Bandeau d'identite, geometrie validee sur pictUP.
   Les images sont nommees static/img/<module>-icone.svg
   et static/img/<module>-illustration.svg
   ============================================================ */
.ub {
  position: relative;
  width: 100%;
  height: 242px;
  margin: 1.25rem 0 1.75rem;
  border-radius: var(--radius-card, 24px);
  box-shadow: var(--shadow-card, 0 4px 24px rgba(0,0,0,.06));
  background: linear-gradient(120deg, #F9F7F5 0%, #F9F7F5 60%, var(--accent-md) 100%);
  display: flex;
  align-items: flex-start;
  padding: 34px 2.4rem 0;
  overflow: hidden;
}
.ub-marque { display:flex; align-items:flex-start; gap:14px; position:relative; z-index:2; max-width:58%; }
.ub-marque > img { width:50px; height:50px; display:block; margin-top:-8px; }
.ub-texte { display:flex; flex-direction:column; gap:14px; }
.ub-nom {
  font-family:'Sora',sans-serif; font-size:2.1rem; font-weight:700;
  color: var(--ink, #191716); letter-spacing:-.02em; line-height:1;
}
.ub-nom .up {
  color: var(--accent); font-size:.58em; font-weight:700;
  vertical-align:super; line-height:0; letter-spacing:.03em;
}
.ub-sous {
  margin:0; font-size:1.5rem; font-weight:400;
  line-height:1.35; color:#6b6866;
}
.ub-filigrane {
  position:absolute; left:-12px; bottom:-34px; height:161px;
  width:auto; opacity:.28; pointer-events:none; z-index:1;
}
.ub-lena {
  position:absolute; right:-21px; bottom:-4px; height:245px;
  width:auto; pointer-events:none;
}
@media (max-width: 760px) {
  .ub { height:160px; padding:0 1.2rem; align-items:center; }
  .ub-marque { max-width:70%; }
  .ub-marque > img { width:34px; height:34px; margin-top:0; }
  .ub-nom { font-size:1.5rem; }
  .ub-sous { font-size:.9rem; }
  .ub-filigrane { display:none; }
  .ub-lena { height:120px; right:-18px; bottom:10px; }
}

/* Hote du bandeau sur les pages autonomes (sliceup, pictup) dont les
   paves ont leur propre largeur au lieu du conteneur de base.html */
.ub-hote { max-width: 1200px; width: 95%; margin: 1.25rem auto 1.75rem; }
.ub-hote .ub { margin: 0; }
