/* Theoria Cosmi : couleurs du site, par rôle.
   Thème par défaut « Classique » (charte menthe). Chaque thème redéfinit les mêmes
   variables sous html[data-theme="…"]. Les variantes -rgb servent aux transparences :
   rgba(var(--tc-accent-rgb), .4).
   Rôles : bg (fond), pale, accent, accent2 (accent secondaire / profondeur),
   mid (sauge moyen), deep (sauge foncé), soft (encre douce), ink (encre).
   Le fond (bg) reste blanc dans tous les thèmes, pour la lisibilité : seuls les halos,
   les pastilles et les accents prennent la couleur du thème.
   --tc-on-accent : couleur du texte posé sur un aplat d'accent (boutons).
   Thèmes : classique (défaut), aqua et eco, permanents ; dorfic (automne) ; ginkgo (journées des femmes) ; rosa en réserve.
   tropical (été), technozen (printemps),
   alba (hiver) ; dark (permanent, fond sombre). Le calendrier des saisons est dans theme.js. */
:root{
  --tc-bg:#FFFFFF;      --tc-bg-rgb:255,255,255;
  --tc-pale:#C2DDD9;    --tc-pale-rgb:194,221,217;
  --tc-accent:#99E3D4;  --tc-accent-rgb:153,227,212;
  --tc-accent2:#83D0C6; --tc-accent2-rgb:131,208,198;
  --tc-mid:#A9C6B4;     --tc-mid-rgb:169,198,180;
  --tc-deep:#8CAB99;    --tc-deep-rgb:140,171,153;
  --tc-soft:#5A6D64;    --tc-soft-rgb:90,109,100;
  --tc-ink:#3C4B42;     --tc-ink-rgb:60,75,66;
  --tc-on-accent:#3C4B42;  color-scheme:light;
}

/* DORFic */
html[data-theme="dorfic"]{
  --tc-bg:#FFFFFF;      --tc-bg-rgb:255,255,255;
  --tc-pale:#CFD0CB;    --tc-pale-rgb:207,208,203;
  --tc-accent:#FA8A00;  --tc-accent-rgb:250,138,0;
  --tc-accent2:#F47403; --tc-accent2-rgb:244,116,3;
  --tc-mid:#CFD0CB;     --tc-mid-rgb:207,208,203;
  --tc-deep:#9B9C96;    --tc-deep-rgb:155,156,150;
  --tc-soft:#585954;    --tc-soft-rgb:88,89,84;
  --tc-ink:#2A2A27;     --tc-ink-rgb:42,42,39;
  --tc-on-accent:#2A2A27;  color-scheme:light;
}

/* Eco */
html[data-theme="eco"]{
  --tc-bg:#FFFFFF;      --tc-bg-rgb:255,255,255;
  --tc-pale:#BDEA92;    --tc-pale-rgb:189,234,146;
  --tc-accent:#6DC719;  --tc-accent-rgb:109,199,25;
  --tc-accent2:#5BB806; --tc-accent2-rgb:91,184,6;
  --tc-mid:#C5D6AE;     --tc-mid-rgb:197,214,174;
  --tc-deep:#7E9A55;    --tc-deep-rgb:126,154,85;
  --tc-soft:#485633;    --tc-soft-rgb:72,86,51;
  --tc-ink:#253014;     --tc-ink-rgb:37,48,20;
  --tc-on-accent:#253014;  color-scheme:light;
}

/* Aqua (anciennement Aero) */
html[data-theme="aqua"]{
  --tc-bg:#FFFFFF;      --tc-bg-rgb:255,255,255;
  --tc-pale:#C2DDFF;    --tc-pale-rgb:194,221,255;
  --tc-accent:#338FFF;  --tc-accent-rgb:51,143,255;
  --tc-accent2:#0266CE; --tc-accent2-rgb:2,102,206;
  --tc-mid:#338FFF;     --tc-mid-rgb:51,143,255;
  --tc-deep:#6F98C2;    --tc-deep-rgb:111,152,194;
  --tc-soft:#38536F;    --tc-soft-rgb:56,83,111;
  --tc-ink:#0F2A47;     --tc-ink-rgb:15,42,71;
  --tc-on-accent:#0F2A47;  color-scheme:light;
}

/* Tropical (été, juin à août) */
html[data-theme="tropical"]{
  --tc-bg:#FFFFFF;      --tc-bg-rgb:255,255,255;
  --tc-pale:#FEDDB5;    --tc-pale-rgb:254,221,181;
  --tc-accent:#9D41D0;  --tc-accent-rgb:157,65,208;
  --tc-accent2:#EE4A89; --tc-accent2-rgb:238,74,137;
  --tc-mid:#C98BE8;     --tc-mid-rgb:201,139,232;
  --tc-deep:#8E6A9E;    --tc-deep-rgb:142,106,158;
  --tc-soft:#4E3159;    --tc-soft-rgb:78,49,89;
  --tc-ink:#1E1024;     --tc-ink-rgb:30,16,36;
  --tc-on-accent:#FFFFFF;  color-scheme:light;
}

/* Technozen (printemps, mars à mai) */
html[data-theme="technozen"]{
  --tc-bg:#FFFFFF;      --tc-bg-rgb:255,255,255;
  --tc-pale:#E6F4B5; --tc-pale-rgb:230,244,181;
  --tc-accent:#A6D4B4; --tc-accent-rgb:166,212,180;
  --tc-accent2:#E58BA0; --tc-accent2-rgb:229,139,160;
  --tc-mid:#F8B0BE; --tc-mid-rgb:248,176,190;
  --tc-deep:#A3C2AE; --tc-deep-rgb:163,194,174;
  --tc-soft:#4A6152; --tc-soft-rgb:74,97,82;
  --tc-ink:#2A3B30; --tc-ink-rgb:42,59,48;
  --tc-on-accent:#2A3B30;  color-scheme:light;
}

/* Alba (hiver, décembre à février) */
html[data-theme="alba"]{
  --tc-bg:#FFFFFF;      --tc-bg-rgb:255,255,255;
  --tc-pale:#DFE7E9; --tc-pale-rgb:223,231,233;
  --tc-accent:#92B3C7; --tc-accent-rgb:146,179,199;
  --tc-accent2:#5E8399; --tc-accent2-rgb:94,131,153;
  --tc-mid:#C6D4D7; --tc-mid-rgb:198,212,215;
  --tc-deep:#7D97A6; --tc-deep-rgb:125,151,166;
  --tc-soft:#4A5E6A; --tc-soft-rgb:74,94,106;
  --tc-ink:#22313A; --tc-ink-rgb:34,49,58;
  --tc-on-accent:#22313A;  color-scheme:light;
}

/* Dark (permanent) : chrome liquide et verre noir. Seul thème à fond sombre. */
html[data-theme="dark"]{
  --tc-bg:#0A0A0A;      --tc-bg-rgb:10,10,10;
  --tc-pale:#292B30;    --tc-pale-rgb:41,43,48;
  --tc-accent:#FBFAFC;  --tc-accent-rgb:251,250,252;
  --tc-accent2:#6E7B89; --tc-accent2-rgb:110,123,137;
  --tc-mid:#455A7B;     --tc-mid-rgb:69,90,123;
  --tc-deep:#6E7B89;    --tc-deep-rgb:110,123,137;
  --tc-soft:#B9BEC6;    --tc-soft-rgb:185,190,198;
  --tc-ink:#FBFAFC;     --tc-ink-rgb:251,250,252;
  --tc-on-accent:#0A0A0A;  color-scheme:dark;
}

/* Ginkgo : journées des femmes (6 févr., 11 févr., 8 mars, 25 nov.), voir theme.js.
   Le ginkgo, arbre de la longévité et de la résilience. */
html[data-theme="ginkgo"]{
  --tc-bg:#FFFFFF;      --tc-bg-rgb:255,255,255;
  --tc-pale:#FBF3E5;      --tc-pale-rgb:251,243,229;
  --tc-accent:#F8BE1C;    --tc-accent-rgb:248,190,28;
  --tc-accent2:#915B16;   --tc-accent2-rgb:145,91,22;
  --tc-mid:#E3A93A;       --tc-mid-rgb:227,169,58;
  --tc-deep:#915B16;      --tc-deep-rgb:145,91,22;
  --tc-soft:#3E5558;      --tc-soft-rgb:62,85,88;
  --tc-ink:#1C3438;       --tc-ink-rgb:28,52,56;
  --tc-on-accent:#1C3438;  color-scheme:light;
}

/* Rosa : en réserve (remplacé par Ginkgo pour les journées des femmes) */
html[data-theme="rosa"]{
  --tc-bg:#FFFFFF;      --tc-bg-rgb:255,255,255;
  --tc-pale:#FDE5F8;      --tc-pale-rgb:253,229,248;
  --tc-accent:#FF5DB8;    --tc-accent-rgb:255,93,184;
  --tc-accent2:#2B7FD9;   --tc-accent2-rgb:43,127,217;
  --tc-mid:#4199F0;       --tc-mid-rgb:65,153,240;
  --tc-deep:#B07A93;      --tc-deep-rgb:176,122,147;
  --tc-soft:#6A3F53;      --tc-soft-rgb:106,63,83;
  --tc-ink:#3E1A2B;       --tc-ink-rgb:62,26,43;
  --tc-on-accent:#3E1A2B;  color-scheme:light;
}

/* Curseurs en verre des thèmes (le point .cur de chaque page prend le dessin du thème).
   Classique et Rosa gardent le point d'origine (en rose pour Rosa, y compris au survol). Dessins : assets/cursors/. */
html[data-theme="aqua"] .cur,
html[data-theme="eco"] .cur,
html[data-theme="dorfic"] .cur,
html[data-theme="alba"] .cur,
html[data-theme="technozen"] .cur,
html[data-theme="dark"] .cur,
html[data-theme="ginkgo"] .cur,
html[data-theme="tropical"] .cur{
  width:26px;height:26px;border-radius:0;background-color:transparent;
  background-position:center;background-size:contain;background-repeat:no-repeat;
  transition:width .2s,height .2s;
}
html[data-theme="aqua"] .cur.h,
html[data-theme="eco"] .cur.h,
html[data-theme="dorfic"] .cur.h,
html[data-theme="alba"] .cur.h,
html[data-theme="technozen"] .cur.h,
html[data-theme="dark"] .cur.h,
html[data-theme="ginkgo"] .cur.h,
html[data-theme="tropical"] .cur.h{ width:34px;height:34px;background-color:transparent; }
html[data-theme="aqua"] .cur{ background-image:url(cursors/goutte.svg); }
html[data-theme="eco"] .cur{ background-image:url(cursors/feuille.svg); }
html[data-theme="dorfic"] .cur{ background-image:url(cursors/orange-sanguine.svg); }
html[data-theme="alba"] .cur{ background-image:url(cursors/flocon.svg); }
html[data-theme="technozen"] .cur{ background-image:url(cursors/lotus.svg); }
html[data-theme="tropical"] .cur{ background-image:url(cursors/dauphin.svg); }
html[data-theme="dark"] .cur{ background-image:url(cursors/etoile.svg); }
html[data-theme="ginkgo"] .cur{ background-image:url(cursors/ginkgo.svg); }
html[data-theme="rosa"] .cur.h{ background:var(--tc-accent); }

/* Bandeau des journées (accueil), rempli par theme.js : tcOccasion() */
.tc-occasion{position:relative;z-index:2;margin:1.6rem auto 0;max-width:min(92vw,560px);padding:.85rem 1.3rem;
  border-radius:18px;background:rgba(var(--tc-bg-rgb),.72);border:1px solid rgba(var(--tc-accent-rgb),.45);
  box-shadow:0 8px 28px rgba(var(--tc-accent-rgb),.18);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
  font-size:.74rem;line-height:1.55;color:var(--tc-soft);text-align:center;}
.tc-occasion strong{display:block;font-weight:500;font-size:.62rem;letter-spacing:.2em;text-transform:uppercase;color:var(--tc-accent2);margin-bottom:.3rem;}
.tc-occasion[hidden]{display:none;}

/* Menus déroulants du menu principal : ils restent ouverts le temps d'aller cliquer.
   - overflow visible et pont invisible (::before des pages, ::after ici) entre l'intitulé et le menu ;
   - fermeture retardée de 0,3 s : on peut descendre en diagonale sans que le menu disparaisse. */
html .nav-dd{display:block;overflow:visible;visibility:hidden;opacity:0;pointer-events:none;
  transition:opacity .15s ease, visibility 0s linear .3s;}
html .nav-item:hover .nav-dd{visibility:visible;opacity:1;pointer-events:auto;transition-delay:0s;}
html .nav-dd::after{content:'';position:absolute;left:0;right:0;bottom:100%;height:16px;}  /* pont pour les pages sans ::before */

/* Menu principal : il reste en haut de la page (il ne suit plus le défilement,
   pour ne pas passer par-dessus le texte). Le menu mobile suit le même principe. */
html #nav{position:absolute;}
html .mobile-menu{position:absolute;}

/* Bouton « remonter en haut », ajouté par theme.js sur les pages qui défilent */
.tc-haut{position:fixed;right:22px;bottom:22px;z-index:700;width:44px;height:44px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;padding:0;cursor:pointer;
  background:rgba(var(--tc-bg-rgb),.78);border:1px solid rgba(var(--tc-accent-rgb),.55);
  box-shadow:0 6px 22px rgba(var(--tc-accent-rgb),.25);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);
  color:var(--tc-ink);opacity:0;visibility:hidden;transform:translateY(10px);
  transition:opacity .25s ease,transform .25s ease,visibility 0s linear .25s,background .2s;}
.tc-haut.visible{opacity:1;visibility:visible;transform:none;transition-delay:0s;}
.tc-haut:hover{background:rgba(var(--tc-accent-rgb),.25);}
.tc-haut svg{width:16px;height:16px;}
@media (max-width:768px){ .tc-haut{right:14px;bottom:14px;width:40px;height:40px;} }

/* Pied de page : sur les pages qui défilent, il reste à la fin du contenu au lieu
   de flotter en bas de l'écran par-dessus le texte (classe posée par theme.js).
   Les pages plein écran sans défilement (accueil, profil…) gardent leur pied fixe. */
html.tc-defile footer{position:relative!important;top:auto!important;bottom:auto!important;left:auto!important;right:auto!important;
  transform:none!important;margin-top:3rem;}

/* Message avant déconnexion automatique (inactivite.js) */
.tc-inactif{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:10000;display:flex;align-items:center;gap:1rem;
  max-width:min(92vw,520px);padding:.9rem 1.1rem .9rem 1.3rem;border-radius:18px;background:rgba(var(--tc-bg-rgb),.92);
  border:1px solid rgba(var(--tc-accent-rgb),.5);box-shadow:0 10px 30px rgba(var(--tc-accent-rgb),.22);
  backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);font-family:'Exo 2',sans-serif;animation:tcInactif .4s ease both;}
.tc-inactif p{margin:0;font-size:.8rem;font-weight:400;line-height:1.5;color:var(--tc-ink);}
.tc-inactif button{flex-shrink:0;padding:.55rem 1.1rem;border:none;border-radius:50px;background:var(--tc-accent);color:var(--tc-on-accent);
  font-family:'Exo 2',sans-serif;font-size:.68rem;letter-spacing:.14em;text-transform:uppercase;cursor:pointer;}
@keyframes tcInactif{from{opacity:0;transform:translate(-50%,8px);}to{opacity:1;transform:translate(-50%,0);}}

/* ── Taille du texte choisie par l'étudiant (voir theme.js, tcSetTexte) ──
   Les tailles du site sont en rem : agrandir la police de base agrandit tout le texte. */
html[data-texte="grande"]{font-size:112.5%;}
html[data-texte="tres-grande"]{font-size:125%;}

/* ── Infobulles maison (voir theme.js) ── */
.tc-tip{position:fixed;z-index:100000;pointer-events:none;max-width:260px;padding:6px 11px;border-radius:9px;
  background:color-mix(in srgb,var(--tc-accent) 24%,var(--tc-bg));   /* fond pâle de la couleur du thème */
  border:1px solid rgba(var(--tc-accent2-rgb),.85);box-shadow:0 6px 18px rgba(var(--tc-deep-rgb),.16);
  font:500 11.5px/1.35 'Exo 2',sans-serif;letter-spacing:.02em;color:var(--tc-ink);
  opacity:0;transform:translateY(-3px);transition:opacity .12s ease,transform .12s ease;}
.tc-tip.visible{opacity:1;transform:translateY(0);}
html[data-theme="dark"] .tc-tip{background:rgba(46,52,62,.96);border-color:rgba(var(--tc-accent2-rgb),.8);color:#E6EAEF;}   /* sombre : gris bleuté */
html[data-theme="dark"] .tc-tip{background:rgba(47,51,58,.96);border-color:rgba(var(--tc-accent2-rgb),.9);color:var(--tc-ink);}   /* sombre : gris bleuté */
