
:root{
  --primary:#2563eb;
  --primary-2:#38bdf8;
  --secondary:#0f172a;
  --muted:#64748b;
  --soft:#eef6ff;
  --line:rgba(15,23,42,.08);
}

*{box-sizing:border-box;}

body{
  background:linear-gradient(180deg,#f8fbff 0%,#f5f7fb 48%,#ffffff 100%);
  color:#0f172a;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

a{transition:.2s ease;}

.btn-primary{
  background:linear-gradient(135deg,var(--primary),var(--primary-2));
  border:0;
  box-shadow:0 12px 28px rgba(37,99,235,.22);
}

.btn-primary:hover{transform:translateY(-1px); filter:brightness(.98);}
.text-primary{color:var(--primary)!important;}
.card{border-radius:22px;}
.fw-black{font-weight:900;}

/* HEADER */
.science-navbar{
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(18px);
  border-bottom:1px solid var(--line);
}

.logo-brand{
  display:inline-flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color:#0f172a;
  font-weight:900;
  letter-spacing:.5px;
}

.logo-mark{
  width:46px;
  height:46px;
  border-radius:16px;
  display:inline-grid;
  place-items:center;
  color:white;
  background:radial-gradient(circle at 25% 25%,#7dd3fc 0,#2563eb 45%,#0f172a 100%);
  box-shadow:0 14px 28px rgba(37,99,235,.25);
  overflow:hidden;
}
.logo-mark img{width:100%;height:100%;object-fit:cover;display:block;}

.logo-text span{display:block; line-height:1.05;}
.logo-text small{display:block; font-size:11px; font-weight:700; color:var(--muted); letter-spacing:.6px;}

.navbar .nav-link{
  font-weight:700;
  color:#334155;
  border-radius:999px;
  padding:.55rem .85rem!important;
}
.navbar .nav-link:hover,
.navbar .nav-link.active{
  color:var(--primary)!important;
  background:#eff6ff;
}

.language-select{
  border-radius:999px;
  border:1px solid var(--line);
  font-weight:800;
  min-width:92px;
  background:#fff;
}
.language-form-2masga{margin:0;}

.user-avatar,
.user-global-avatar{
  width:38px;
  height:38px;
  border-radius:50%;
  object-fit:cover;
  border:2px solid #dbeafe;
  background:#e0f2fe;
  box-shadow:0 6px 16px rgba(37,99,235,.18);
}

.avatar-fallback{
  width:38px;
  height:38px;
  border-radius:50%;
  display:inline-grid;
  place-items:center;
  background:#dbeafe;
  color:#1d4ed8;
  font-weight:900;
}

.profile-avatar-link-2masga{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  text-decoration:none;
}
.profile-avatar-link-2masga:hover .user-avatar{
  border-color:#2563eb;
  box-shadow:0 8px 20px rgba(37,99,235,.28);
  transform:translateY(-1px);
}
.profile-dropdown-toggle-2masga{
  border:0;
  background:transparent;
  color:#334155;
  font-weight:800;
  border-radius:999px;
  padding:.45rem .7rem;
}
.profile-dropdown-toggle-2masga:hover{
  background:#eff6ff;
  color:#2563eb;
}


.profile-dropdown-toggle-2masga i{
  font-size:18px;
  line-height:1;
}
.science-navbar .btn-outline-danger{
  border-color:#fecaca;
  color:#dc2626;
  background:#fff;
}
.science-navbar .btn-outline-danger:hover{
  background:#fef2f2;
  border-color:#fca5a5;
  color:#b91c1c;
}

main.container{min-height:60vh;}

.alert{border-radius:18px; border:0;}

/* REGISTER */
.register-science-wrap{padding:18px 0 30px;}
.register-hero{
  position:relative;
  overflow:hidden;
  border-radius:30px;
  padding:42px;
  background:
    radial-gradient(circle at 20% 10%,rgba(56,189,248,.35),transparent 30%),
    radial-gradient(circle at 90% 30%,rgba(37,99,235,.30),transparent 35%),
    linear-gradient(135deg,#0f172a,#1e3a8a 60%,#0369a1);
  color:white;
  box-shadow:0 24px 70px rgba(15,23,42,.26);
}
.register-hero::after{
  content:"";
  position:absolute;
  inset:auto -70px -120px auto;
  width:280px;
  height:280px;
  border-radius:50%;
  background:rgba(255,255,255,.08);
}
.hero-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:9px 14px;
  border-radius:999px;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.18);
  font-weight:800;
  font-size:13px;
}
.lead-soft{color:rgba(255,255,255,.84); font-size:1.05rem;}
.science-points{display:grid; gap:14px;}
.science-point{
  display:flex;
  gap:14px;
  padding:16px;
  border-radius:20px;
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.14);
}
.science-point span{
  width:42px;height:42px;flex:0 0 42px;
  border-radius:14px;
  display:grid;place-items:center;
  background:rgba(255,255,255,.15);
  color:#bae6fd;
  font-size:20px;
}
.science-point h6{font-weight:850; margin:0 0 4px;}
.science-point p{margin:0; color:rgba(255,255,255,.78); font-size:14px;}
.verification-note{
  position:relative;
  z-index:1;
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:14px 16px;
  background:rgba(14,165,233,.16);
  border:1px solid rgba(186,230,253,.25);
  border-radius:18px;
  color:#e0f2fe;
  font-weight:700;
}
.register-card{border:1px solid var(--line)!important;}
.register-icon,.verify-icon{
  width:64px;height:64px;border-radius:22px;
  display:grid;place-items:center;
  background:linear-gradient(135deg,#dbeafe,#e0f2fe);
  color:var(--primary);
  font-size:28px;
}
.input-group-modern .input-group-text{
  background:#f8fafc;
  border-color:#e2e8f0;
  color:#2563eb;
}
.input-group-modern .form-control{
  border-color:#e2e8f0;
  padding:.78rem .9rem;
}
.input-group-modern .form-control:focus{
  box-shadow:0 0 0 .25rem rgba(37,99,235,.12);
  border-color:#93c5fd;
}
.verify-card{border:1px solid var(--line)!important;}

/* FOOTER */
.science-footer{
  margin-top:70px;
  background:
    radial-gradient(circle at 15% 20%,rgba(56,189,248,.20),transparent 28%),
    radial-gradient(circle at 90% 10%,rgba(37,99,235,.18),transparent 32%),
    linear-gradient(135deg,#020617,#0f172a 55%,#172554);
  color:white;
  border-top:1px solid rgba(255,255,255,.08);
}
.footer-title{
  font-weight:850;
  margin-bottom:16px;
  display:flex;
  gap:8px;
  align-items:center;
}
.footer-title i{color:#7dd3fc;}
.footer-link{
  display:flex;
  gap:9px;
  align-items:center;
  color:rgba(255,255,255,.78);
  text-decoration:none;
  margin-bottom:10px;
  font-size:14px;
}
.footer-link:hover{color:#7dd3fc; transform:translateX(2px);}
.footer-mini-card{
  padding:13px 15px;
  border-radius:18px;
  background:rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.10);
  color:rgba(255,255,255,.78);
  font-size:14px;
}
.ctlco-product-card{
  display:block;
  padding:14px 15px;
  border-radius:18px;
  background:linear-gradient(135deg,rgba(37,99,235,.22),rgba(56,189,248,.13));
  border:1px solid rgba(125,211,252,.25);
  color:#fff;
  text-decoration:none;
}
.ctlco-product-card:hover{color:#fff;transform:translateY(-2px);border-color:rgba(125,211,252,.55);}
.ctlco-product-card small{display:block;color:rgba(255,255,255,.72);font-weight:700;}
.footer-bottom{
  border-top:1px solid rgba(255,255,255,.10);
  color:rgba(255,255,255,.70);
}


/* BADGE MESSAGES 2MASGA */
.nav-message-link{
  position:relative;
}
.nav-message-badge{
  position:absolute;
  top:2px;
  right:2px;
  min-width:18px;
  height:18px;
  padding:0 5px;
  border-radius:999px;
  background:#dc2626;
  color:#fff;
  font-size:11px;
  line-height:18px;
  text-align:center;
  font-weight:900;
  display:none;
  box-shadow:0 6px 14px rgba(220,38,38,.35);
}
.nav-message-badge.is-visible{
  display:inline-block;
}


/* BADGE NOTIFICATIONS 2MASGA */
.nav-notification-link{
  position:relative;
}
.nav-notification-badge{
  position:absolute;
  top:2px;
  right:2px;
  min-width:18px;
  height:18px;
  padding:0 5px;
  border-radius:999px;
  background:#f97316;
  color:#fff;
  font-size:11px;
  line-height:18px;
  text-align:center;
  font-weight:900;
  display:none;
  box-shadow:0 6px 14px rgba(249,115,22,.35);
}
.nav-notification-badge.is-visible{
  display:inline-block;
}

@media(max-width:991px){
  .navbar-nav{padding-top:14px;}
  .register-hero{padding:30px;}
}

@media(max-width:575px){
  .logo-text small{display:none;}
  .register-hero{padding:24px; border-radius:24px;}
  main.container{padding-top:24px!important;}
}


/* ============================================================
   2MASGA - MENU MOBILE STYLE LINKEDIN / FACEBOOK
   Barre supérieure fixe avec icônes + petit texte sur téléphone.
   Le menu desktop reste inchangé.
   ============================================================ */
.mobile-top-nav-2masga{display:none}
.mobile-nav-avatar-2masga{
  width:25px;
  height:25px;
  border-radius:50%;
  object-fit:cover;
  border:2px solid #dbeafe;
  background:#e0f2fe;
}
.mobile-profile-dropdown-2masga{
  width:16.66%;
  min-width:0;
  position:relative;
}
.mobile-profile-dropdown-2masga > button{
  width:100%!important;
}
.mobile-profile-menu-2masga{
  min-width:230px;
  margin-top:8px!important;
  border:1px solid rgba(15,23,42,.08)!important;
}
.mobile-profile-menu-2masga .dropdown-item{
  font-size:13px;
  padding:9px 10px;
}
.mobile-language-label-2masga{
  display:flex;
  align-items:center;
  color:#475569;
  font-size:12px;
  font-weight:900;
  margin-bottom:6px;
}
.mobile-language-select-2masga{
  border-radius:12px;
  border-color:#dbeafe;
  font-weight:800;
  font-size:13px;
  background:#f8fbff;
}
.mobile-bottom-nav-badge-2masga{
  position:absolute;
  top:2px;
  right:12px;
  min-width:17px;
  height:17px;
  padding:0 5px;
  border-radius:999px;
  background:#dc2626;
  color:#fff;
  font-size:10px;
  line-height:17px;
  text-align:center;
  font-weight:950;
  display:none;
  box-shadow:0 6px 14px rgba(220,38,38,.35);
}
.mobile-bottom-nav-badge-2masga.is-visible{display:inline-block}
.mobile-bottom-nav-badge-2masga.notification{background:#f97316;box-shadow:0 6px 14px rgba(249,115,22,.35)}

@media(max-width:768px){
  body{padding-top:0!important;padding-bottom:0!important}
  main.container{padding-top:14px!important;padding-bottom:24px!important}

  .science-navbar{
    min-height:56px;
    position:sticky!important;
    top:0!important;
    z-index:99999!important;
  }

  .science-navbar .navbar-toggler{
    display:none!important;
  }

  .science-navbar #nav{
    display:none!important;
  }

  .science-navbar .logo-mark{
    width:38px;
    height:38px;
    border-radius:13px;
  }

  .science-navbar .logo-text span{font-size:15px}
  .science-navbar .logo-text small{display:none!important}

  .mobile-top-nav-2masga{
    position:sticky;
    top:56px;
    z-index:99998;
    display:flex;
    align-items:center;
    justify-content:space-around;
    gap:2px;
    padding:5px 6px 6px;
    margin:0;
    background:rgba(255,255,255,.98);
    border-top:1px solid rgba(15,23,42,.06);
    border-bottom:1px solid rgba(15,23,42,.10);
    box-shadow:0 10px 22px rgba(15,23,42,.06);
    backdrop-filter:blur(16px);
  }

  .mobile-top-nav-2masga a,
  .mobile-top-nav-2masga button{
    position:relative;
    width:16.66%;
    min-width:0;
    height:48px;
    border:0;
    background:transparent;
    color:#64748b;
    text-decoration:none;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:2px;
    border-radius:14px;
    transition:.18s ease;
    font-weight:900;
  }

  .mobile-top-nav-2masga i{
    font-size:20px;
    line-height:1;
  }

  .mobile-top-nav-label-2masga{
    display:block;
    font-size:9.5px;
    line-height:1;
    max-width:100%;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .mobile-top-nav-2masga a.active,
  .mobile-top-nav-2masga button.active{
    color:#2563eb;
    background:#eff6ff;
  }

  .mobile-top-nav-2masga a.active .mobile-top-nav-label-2masga,
  .mobile-top-nav-2masga button.active .mobile-top-nav-label-2masga{
    color:#1d4ed8;
    background:#dbeafe;
    padding:2px 6px;
    border-radius:999px;
  }

  .mobile-top-nav-2masga a:active,
  .mobile-top-nav-2masga button:active{
    transform:scale(.94);
  }

  .science-footer{
    margin-bottom:0;
  }
}

@media(max-width:390px){
  .mobile-top-nav-label-2masga{font-size:8.7px}
  .mobile-top-nav-2masga i{font-size:19px}
  .mobile-nav-avatar-2masga{width:23px;height:23px}
}

@media(min-width:769px){
  .mobile-top-nav-2masga{display:none!important}
}



/* ============================================================
   PATCH FINAL 2MASGA APP - Profil mobile propre, sans débordement
   ============================================================ */
@media(max-width:768px){
  .mobile-profile-dropdown-2masga{
    position:static!important;
  }

  .mobile-profile-menu-2masga{
    position:fixed!important;
    top:112px!important;
    left:12px!important;
    right:12px!important;
    width:auto!important;
    min-width:0!important;
    max-width:calc(100vw - 24px)!important;
    max-height:calc(100vh - 135px)!important;
    overflow-y:auto!important;
    transform:none!important;
    margin:0!important;
    padding:12px!important;
    border-radius:22px!important;
    z-index:100000!important;
  }

  .mobile-profile-menu-2masga .dropdown-item,
  .mobile-profile-menu-2masga button.dropdown-item{
    display:flex!important;
    align-items:center!important;
    gap:10px!important;
    width:100%!important;
    max-width:100%!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
    line-height:1.25!important;
    padding:12px 10px!important;
    font-size:14px!important;
    border-radius:14px!important;
  }

  .mobile-profile-menu-2masga .dropdown-item i,
  .mobile-profile-menu-2masga button.dropdown-item i{
    flex:0 0 22px!important;
    text-align:center!important;
    font-size:20px!important;
  }

  .mobile-language-form-2masga{
    width:100%!important;
    max-width:100%!important;
    overflow:hidden!important;
  }

  .mobile-language-label-2masga{
    width:100%!important;
    max-width:100%!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    line-height:1.25!important;
    font-size:13px!important;
  }

  .mobile-language-select-2masga{
    width:100%!important;
    max-width:100%!important;
    min-height:44px!important;
    border-radius:16px!important;
  }
}


/* ============================================================
   2MASGA - AMÉLIORATION DESKTOP MENU + FOOTER
   Objectif : menu moins épais, libellés plus petits, logo propre,
   EXETAT discret, footer plus compact et professionnel.
   ============================================================ */
@media (min-width: 992px){
  .science-navbar{
    min-height:58px!important;
    padding-top:4px!important;
    padding-bottom:4px!important;
    box-shadow:0 8px 22px rgba(15,23,42,.045)!important;
  }

  .science-navbar .container{
    min-height:52px!important;
    align-items:center!important;
  }

  .science-navbar .logo-brand{
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:2px!important;
    min-width:76px!important;
    line-height:1!important;
  }

  .science-navbar .logo-mark{
    width:34px!important;
    height:34px!important;
    border-radius:12px!important;
    box-shadow:0 8px 18px rgba(37,99,235,.18)!important;
  }

  .science-navbar .logo-text span{
    font-size:11px!important;
    line-height:1!important;
    letter-spacing:.45px!important;
    text-align:center!important;
    margin-top:2px!important;
  }

  .science-navbar .navbar-nav.mx-lg-auto{
    gap:4px!important;
    align-items:center!important;
  }

  .science-navbar .nav-link{
    min-height:39px!important;
    padding:5px 8px!important;
    border-radius:14px!important;
    font-size:10.8px!important;
    line-height:1.05!important;
    font-weight:850!important;
    letter-spacing:.05px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:4px!important;
    white-space:nowrap!important;
  }

  .science-navbar .nav-link i{
    font-size:15px!important;
    margin-right:2px!important;
    line-height:1!important;
  }

  .science-navbar .nav-link[href*="exetat"],
  .science-navbar .nav-link.nav-exetat-compact-2masga{
    max-width:82px!important;
    min-width:64px!important;
    padding-left:7px!important;
    padding-right:7px!important;
  }

  .science-navbar .nav-message-badge,
  .science-navbar .nav-notification-badge{
    top:-2px!important;
    right:-3px!important;
    min-width:16px!important;
    height:16px!important;
    line-height:16px!important;
    font-size:9.5px!important;
  }

  .science-navbar .user-avatar,
  .science-navbar .user-global-avatar{
    width:32px!important;
    height:32px!important;
  }

  .science-navbar .profile-dropdown-toggle-2masga{
    padding:.25rem .45rem!important;
  }

  .science-navbar .btn-outline-danger{
    padding:5px 10px!important;
    font-size:11px!important;
  }

  .science-navbar .language-select{
    min-width:74px!important;
    height:32px!important;
    padding-top:3px!important;
    padding-bottom:3px!important;
    font-size:11px!important;
  }
}

.science-footer{
  margin-top:46px!important;
  background:
    radial-gradient(circle at 12% 0%,rgba(56,189,248,.18),transparent 27%),
    linear-gradient(135deg,#020617,#0f172a 58%,#111827)!important;
}
.science-footer.pt-5{padding-top:34px!important;}
.science-footer .row.g-4{--bs-gutter-y:1.1rem!important;}
.science-footer .logo-brand{gap:8px!important;}
.science-footer .logo-mark{width:40px!important;height:40px!important;border-radius:14px!important;}
.science-footer .logo-text span{font-size:16px!important;letter-spacing:.4px!important;}
.science-footer .logo-text small{font-size:10px!important;line-height:1.25!important;}
.science-footer p.small{font-size:12.5px!important;line-height:1.55!important;}
.footer-title{font-size:13px!important;margin-bottom:10px!important;text-transform:uppercase;letter-spacing:.35px;}
.footer-link{font-size:12.5px!important;margin-bottom:7px!important;line-height:1.25!important;}
.footer-link i{width:16px;text-align:center;flex:0 0 16px;}
.footer-mini-card{padding:10px 12px!important;border-radius:14px!important;font-size:12.5px!important;line-height:1.4!important;}
.ctlco-product-card{padding:11px 12px!important;border-radius:15px!important;}
.ctlco-product-card strong{font-size:13px!important;}
.ctlco-product-card small{font-size:11.5px!important;}
.footer-bottom{padding-top:12px!important;padding-bottom:12px!important;font-size:11.5px!important;}

@media(max-width:575px){
  .science-footer.pt-5{padding-top:28px!important;}
  .science-footer{margin-top:36px!important;}
}

/* ============================================================
   2MASGA FOOTER SOCIAL PREVIEW - Réseau scientifique
   ============================================================ */
.science-social-footer-2masga{
  position:relative;
  overflow:hidden;
}
.footer-social-preview-2masga{
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(280px,.95fr);
  gap:22px;
  align-items:stretch;
  padding:20px;
  border-radius:28px;
  background:
    radial-gradient(circle at 10% 10%,rgba(56,189,248,.18),transparent 32%),
    linear-gradient(135deg,rgba(255,255,255,.09),rgba(255,255,255,.04));
  border:1px solid rgba(255,255,255,.12);
  box-shadow:0 22px 50px rgba(2,6,23,.26);
}
.footer-social-brand-2masga{
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.footer-social-feed-2masga{
  display:flex;
  align-items:center;
  justify-content:center;
}
.footer-post-card-2masga{
  width:100%;
  border-radius:24px;
  padding:18px;
  background:rgba(255,255,255,.95);
  color:#0f172a;
  box-shadow:0 18px 42px rgba(2,6,23,.24);
}
.footer-post-head-2masga{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:12px;
}
.footer-post-head-2masga strong{
  display:block;
  font-size:14px;
  font-weight:950;
}
.footer-post-head-2masga small{
  display:block;
  color:#64748b;
  font-size:11.5px;
  font-weight:800;
}
.footer-post-avatar-2masga{
  width:46px;
  height:46px;
  border-radius:16px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,#2563eb,#38bdf8);
  color:#fff;
  font-size:22px;
  flex:0 0 auto;
}
.footer-post-card-2masga p{
  color:#334155;
  font-size:13px;
  line-height:1.45;
}
.footer-post-actions-2masga{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.footer-post-actions-2masga span{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:7px 10px;
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:11.5px;
  font-weight:900;
}
.footer-exetat-soft-2masga{
  opacity:.72;
}
@media(max-width:768px){
  .footer-social-preview-2masga{
    grid-template-columns:1fr;
    padding:16px;
    border-radius:22px;
  }
  .footer-post-card-2masga{
    border-radius:20px;
  }
}

