/*
 * Le menu de Kourou, outil unique des services communication (Julien, 26/11/2026) :
 *   Magazine (Sujets, Conférence de rédaction, Mise en page) · Projets · Proxima · Réseaux sociaux, sur une seule ligne
 *   (« je ne veux pas de menu sur 2 lignes, tu trouves un moyen joli graphique des sous-menus magazine sur la même ligne ») ;
 *   et la cloche des notifications (views/commun/cloche.php). Chargée après comete.css et kourou.css.
 */

/* 1. Magazine au même rang que Proxima, Réseaux sociaux et Projets (Julien, 26/11 : « Magazine doit être au même niveau […] sujets,
      conf et mise en page deviennent sous-menu ») : le mot « Magazine » a le style des autres entrées (souligné quand on y est) ;
      son sous-menu le suit sur la même ligne, en plus petit, dans une glissière sombre ; la rubrique ouverte y est une pastille violette. */
.entete-k nav { flex-wrap: nowrap; gap: 24px; }
.menu-magazine { display: inline-flex; align-items: center; gap: 10px; }
.entete-k nav .menu-tete.actif { color: #FFFFFF; }
/* Pas de trait sous le sous-menu (Julien, 26/11 : « pas de trait sous le sous-menu »), mais un filet juste sous « Magazine » quand on
   est dans l'une de ses rubriques (« il devrait y avoir un filet juste sous Magazine ») ; avec JavaScript, la barre qui glisse le pose */
.entete-k nav .menu-sous a::after { display: none !important; }
.entete-k nav .menu-tete.actif::after { content: ""; position: absolute; left: 0; right: 0; top: calc(100% + 9px); height: 3px; background: var(--violet-clair); }
.barre-menu-active .entete-k nav .menu-tete.actif::after { display: none; }
.entete-k nav .menu-magazine a, .entete-k nav .menu-magazine a:hover { text-decoration: none; }
.menu-sous { position: relative; display: inline-flex; align-items: center; gap: 2px; height: 34px; box-sizing: border-box; padding: 3px; border-radius: 17px; background: rgba(255, 255, 255, .06); }
/* La petite pointe qui rattache la glissière à « Magazine » */
.menu-sous::before { content: ""; position: absolute; left: -5px; top: 50%; width: 8px; height: 8px; margin-top: -4px; background: inherit; transform: rotate(45deg); border-radius: 1px; }
.entete-k nav .menu-sous a { position: relative; height: 28px; padding: 0 11px; border-radius: 14px; display: inline-flex; align-items: center; font-size: 13.5px; font-weight: 600; color: #9FA3CC; }
.entete-k nav .menu-sous a:hover { color: #FFFFFF; background: rgba(255, 255, 255, .07); }
.entete-k nav .menu-sous a[aria-current="page"] { color: #FFFFFF; background: #5B3FF0; }
.entete-k nav .menu-sous a[aria-current="page"]::after { display: none; }
.menu-magazine.ouvert .menu-sous { background: rgba(156, 140, 255, .12); }
/* « Conférence de rédaction » se raccourcit en « Conférence » quand la ligne serre */
@media (max-width: 1380px) { .menu-long { display: none; } }
@media (max-width: 1180px) {
  .entete-k nav { gap: 18px; }
  .entete-k nav .menu-sous a { padding: 0 8px; }
}
/* Sur téléphone, le menu passe sous la marque (comete.css) et défile de côté plutôt que de se plier */
@media (max-width: 900px) {
  .entete-k nav { overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .entete-k nav::-webkit-scrollbar { display: none; }
}

/* 2. La cloche */
.cloche-k { position: relative; display: flex; }
.cloche-bouton { position: relative; width: 38px; height: 38px; border-radius: 19px; color: #B4B8DD; display: grid; place-items: center; text-decoration: none; }
.cloche-bouton:hover, .cloche-bouton[aria-expanded="true"] { background: rgba(255, 255, 255, .08); color: #FFFFFF; }
.cloche-pastille { position: absolute; top: 1px; right: -2px; min-width: 18px; height: 18px; box-sizing: border-box; padding: 0 5px; border: 2px solid var(--nuit); border-radius: 9px; background: #F2B544; color: #1A1300; font: 600 10px/14px var(--mono); text-align: center; }
.cloche-pastille[hidden] { display: none; }
.cloche-bouton.sonne svg { animation: cloche-sonne .9s ease-in-out; transform-origin: 50% 10%; }
@keyframes cloche-sonne { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(9deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }
@media (prefers-reduced-motion: reduce) { .cloche-bouton.sonne svg { animation: none; } }

.cloche-panneau { position: absolute; z-index: 60; top: calc(100% + 14px); right: -8px; width: min(400px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 120px)); box-sizing: border-box; display: flex; flex-direction: column; border-radius: 18px; background: #FFFFFF; color: #12132B; box-shadow: 0 24px 60px rgba(17, 19, 46, .28), 0 2px 8px rgba(17, 19, 46, .12); white-space: normal; font-family: "Open Sans", system-ui, sans-serif; overflow: hidden; }
.cloche-panneau[hidden] { display: none; }
.cloche-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; }
.cloche-tete strong { font: 700 18px Archivo, system-ui, sans-serif; }
.cloche-lien { padding: 0; border: 0; background: none; font: 600 13px "Open Sans", system-ui, sans-serif; color: #3715D4; cursor: pointer; }
.cloche-lien:hover { text-decoration: underline; text-underline-offset: 3px; }
.cloche-onglets { display: flex; gap: 22px; padding: 0 20px; border-bottom: 1px solid #E3E6F3; }
.cloche-onglets button { position: relative; padding: 8px 0 11px; border: 0; background: none; font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #6E7196; cursor: pointer; }
.cloche-onglets button[aria-selected="true"] { color: #3715D4; }
.cloche-onglets button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: #3715D4; }
.cloche-panneau [role="tabpanel"] { overflow-y: auto; }
.cloche-liste, .cloche-reglages { margin: 0; padding: 0; list-style: none; }
.cloche-liste li + li, .cloche-reglages li + li { border-top: 1px solid #ECEEF6; }
.cloche-liste a { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 13px 20px 13px 34px; color: #12132B; text-decoration: none; }
.cloche-liste a:hover { background: #F7F7FC; }
.cloche-liste .non-lue a::before { content: ""; position: absolute; left: 15px; top: 19px; width: 8px; height: 8px; border-radius: 50%; background: #3715D4; }
.cloche-titre { font: 600 14px/1.35 "Open Sans", system-ui, sans-serif; }
.cloche-liste .lue .cloche-titre { font-weight: 400; color: #3A3F5C; }
.cloche-texte { font-size: 13px; line-height: 1.45; color: #555A7A; }
.cloche-quand { font: 500 10.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #8D92B5; }
.cloche-vide { padding: 22px 20px; font-size: 14px; line-height: 1.5; color: #555A7A; }
.cloche-aide { margin: 0; padding: 14px 20px 6px; font-size: 13px; line-height: 1.5; color: #555A7A; }
.cloche-reglages li { display: flex; align-items: center; gap: 14px; padding: 12px 20px; }
.cloche-reglages label { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.cloche-reglages input[role="switch"] { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 38px; height: 22px; margin: 0; border-radius: 11px; background: #C9CDE3; cursor: pointer; transition: background .2s; }
.cloche-reglages input[role="switch"]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .2s; }
.cloche-reglages input[role="switch"]:checked { background: #3715D4; }
.cloche-reglages input[role="switch"]:checked::after { transform: translateX(16px); }
.cloche-reglages input[role="switch"]:focus-visible { outline: 2px solid #3715D4; outline-offset: 2px; }

/* 3. Remonter en haut de page (views/commun/fusee-haut.php, Mise en page) : sobre (Julien, 26/11 : « plus sobre et sérieux »),
      un rond sombre et une fusée au trait fin ; « une petite animation sympa tout de même » : au survol elle se soulève, une
      traînée fine apparaît ; au clic elle décolle hors du rond et revient se poser */
.fusee-haut { position: fixed; z-index: 40; right: 28px; bottom: 28px; width: 48px; height: 48px; border-radius: 50%; overflow: hidden; background: #12132B; color: #ECEEFF; box-shadow: 0 6px 18px rgba(17, 19, 46, .22); display: grid; place-items: center; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s, transform .2s, background .15s; }
.fusee-haut.visible { opacity: 1; transform: none; pointer-events: auto; }
.fusee-haut:hover { background: #24108F; color: #FFFFFF; }
.fusee-haut:focus-visible { outline: 3px solid #9C8CFF; outline-offset: 3px; }
.fusee-haut svg { position: relative; z-index: 1; transition: transform .25s cubic-bezier(.3, .7, .4, 1); }
.fusee-haut::after { content: ""; position: absolute; left: 50%; top: 33px; width: 2px; height: 0; margin-left: -1px; border-radius: 1px; background: linear-gradient(#C4BAFF, rgba(196, 186, 255, 0)); transition: height .25s; }
.fusee-haut:hover svg { transform: translateY(-3px); }
.fusee-haut:hover::after { height: 9px; }
.fusee-haut.decolle svg { animation: fusee-envol .8s cubic-bezier(.55, 0, .35, 1); }
.fusee-haut.decolle::after { animation: fusee-trainee .8s ease-out; }
@keyframes fusee-envol { 0% { transform: translateY(-3px); } 18% { transform: translateY(1px); } 50% { transform: translateY(-44px); opacity: 1; } 51% { transform: translateY(30px); opacity: 0; } 60% { opacity: 1; } 100% { transform: translateY(0); } }
@keyframes fusee-trainee { 0% { height: 9px; opacity: 1; } 45% { height: 26px; opacity: 1; transform: translateY(-10px); } 60%, 100% { height: 0; opacity: 0; transform: translateY(-30px); } }
@media (prefers-reduced-motion: reduce) { .fusee-haut, .fusee-haut svg, .fusee-haut::after { transition: none; } .fusee-haut.decolle svg, .fusee-haut.decolle::after { animation: none; } }
@media print { .fusee-haut { display: none; } }

/* 4. « Ajouter un sujet » sous le bandeau de la page Sujets (views/commun/page-sujet.php, $enLigne ; 26/11) */
.sujet-en-ligne { display: block; }
.sujet-en-ligne .corps-sujet { max-width: none; padding: 0; }
.sujet-en-ligne .col-cote { top: 24px; }
.sujet-en-ligne .sujet-actions { display: flex; justify-content: flex-end; margin-top: 20px; }

/* 5. Appel à contributions et Contributeurs sous le bandeau de Sujets (26/11) : leur titre devient un titre de section */
.vue-sujets-titre { margin: 0; font: 800 32px/1.1 Archivo, system-ui, sans-serif; letter-spacing: -.01em; }

/* Le repère « Travaux en cours », à côté de la cloche (views/commun/travaux.php, travaux.js ; 26/11/2026) */
.travaux-k { position: relative; }
.travaux-k[hidden] { display: none; }
.travaux-bouton { position: relative; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 19px; background: none; color: #B4B8DD; display: grid; place-items: center; cursor: pointer; }
.travaux-bouton:hover, .travaux-bouton[aria-expanded="true"] { background: rgba(255, 255, 255, .08); color: #FFFFFF; }
.travaux-bouton.tourne svg { animation: travaux-tourne 1.2s linear infinite; }
@keyframes travaux-tourne { to { transform: rotate(360deg); } }
.travaux-compte { position: absolute; top: 1px; right: -2px; min-width: 18px; height: 18px; box-sizing: border-box; padding: 0 5px; border: 2px solid var(--nuit); border-radius: 9px; background: #7B61FF; color: #FFFFFF; font: 600 10px/14px var(--mono); text-align: center; }
.travaux-compte[hidden] { display: none; }
.travaux-panneau { position: absolute; top: calc(100% + 10px); right: 0; z-index: 60; width: 340px; max-width: calc(100vw - 32px); box-sizing: border-box; padding: 16px 18px; border-radius: 16px; background: #FFFFFF; color: #12132B; box-shadow: 0 18px 50px rgba(18, 19, 43, .22); }
.travaux-panneau[hidden] { display: none; }
.travaux-titre { display: block; font: 700 15px Archivo, system-ui, sans-serif; }
.travaux-aide { margin: 4px 0 12px; font-size: 12.5px; color: #6E7196; }
.travaux-liste { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.travaux-liste li { display: flex; flex-direction: column; gap: 4px; }
.travaux-nom { font: 600 13.5px Archivo, system-ui, sans-serif; }
.travaux-msg { font-size: 12.5px; color: #555A7A; }
.travaux-barre { height: 5px; border-radius: 99px; background: #EEF0F8; overflow: hidden; }
.travaux-barre > span { display: block; height: 100%; border-radius: inherit; background: #3715D4; transition: width .4s ease; }
.travaux-liste li[data-etat="finie"] .travaux-barre > span { background: #1F8A4C; width: 100% !important; }
.travaux-liste li[data-etat="echec"] .travaux-msg { color: #B42318; }
@media (prefers-reduced-motion: reduce) { .travaux-bouton.tourne svg { animation: none; } }
