/* ============================================================
   Collège Gloris — Site indépendant
   Réutilise les couleurs et composants du portail principal
   (assets/css/portal.css) pour une identité visuelle cohérente.
   ============================================================ */

:root {
  --gloris-green: #1f6e43;
  --gloris-green-dark: #123d26;
  --gloris-green-light: #e8f3ec;
  --gloris-gold: #c99a3f;
  --gloris-ink: #16241c;
  --gloris-grey: #5c6b63;
  --cg-gradient-start: #16543b;
  --cg-gradient-end: #123d26;
  --font-heading: "Poppins", sans-serif;
  --font-body: "Open Sans", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--font-body);
  color: var(--gloris-ink);
  background: #fff;
}

h1, h2, h3, h4, .navbar-brand, .btn {
  font-family: var(--font-heading);
}

a { color: var(--gloris-green); }
a:hover { color: var(--gloris-green-dark); }

.section-pad { padding: 90px 0; }
@media (max-width: 767px) { .section-pad { padding: 60px 0; } }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gloris-gold);
  margin-bottom: 10px;
}

.section-title {
  font-size: 34px;
  font-weight: 700;
  color: var(--gloris-green-dark);
  margin-bottom: 18px;
}

.section-lead {
  color: var(--gloris-grey);
  max-width: 680px;
  margin-bottom: 0;
}

/* ---------- Bandeau de retour au portail ---------- */
.group-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1031;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gloris-green-dark);
  color: rgba(255,255,255,0.85);
  font-size: 13px;
}

.group-bar a {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.group-bar a:hover { color: var(--gloris-gold); }

/* ---------- Navbar ---------- */
.navbar-gloris {
  background: #fff;
  box-shadow: 0 2px 16px rgba(18, 61, 38, 0.08);
  padding: 10px 0;
}

.navbar-gloris.fixed-top { top: 34px; }

.navbar-gloris .navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: var(--gloris-green-dark);
  line-height: 1.15;
}

.navbar-gloris .navbar-brand img {
  height: 48px;
  width: 48px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--gloris-green-light);
}

.navbar-gloris .navbar-brand small {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 12px;
  color: var(--gloris-grey);
}

.navbar-gloris .nav-link {
  font-weight: 600;
  color: var(--gloris-ink);
  padding: 10px 16px !important;
}

.navbar-gloris .nav-link:hover,
.navbar-gloris .nav-link.active {
  color: var(--gloris-green);
}

.navbar-gloris .dropdown-menu {
  border: none;
  box-shadow: 0 10px 30px rgba(18, 61, 38, 0.12);
  border-radius: 10px;
  padding: 8px;
}

.navbar-gloris .dropdown-item {
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gloris-ink);
}

.navbar-gloris .dropdown-item:hover,
.navbar-gloris .dropdown-item:focus {
  background: var(--gloris-green-light);
  color: var(--gloris-green-dark);
}

.btn-gloris {
  background: var(--gloris-green);
  border: 1px solid var(--gloris-green);
  color: #fff;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 6px;
  transition: 0.25s;
  display: inline-block;
}

.btn-gloris:hover {
  background: var(--gloris-green-dark);
  border-color: var(--gloris-green-dark);
  color: #fff;
}

.btn-gloris-outline {
  background: transparent;
  border: 1.5px solid #fff;
  color: #fff;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 6px;
  transition: 0.25s;
  display: inline-block;
}

.btn-gloris-outline:hover {
  background: #fff;
  color: var(--gloris-green-dark);
}

.btn-outline-gloris {
  border: 1.5px solid var(--gloris-green);
  color: var(--gloris-green);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 18px;
  border-radius: 6px;
  transition: 0.25s;
  display: inline-block;
}

.btn-outline-gloris:hover {
  background: var(--gloris-green);
  color: #fff;
}

/* ---------- Hero (dégradé Collège) ---------- */
#hero {
  position: relative;
  padding: 160px 0 120px;
  background: linear-gradient(135deg, var(--cg-gradient-start) 0%, var(--cg-gradient-end) 100%);
  overflow: hidden;
  color: #fff;
}

#hero.has-photo {
  background-size: cover;
  background-position: center;
}

#hero.has-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(22,84,59,0.88) 0%, rgba(18,61,38,0.88) 100%);
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 15% 25%, rgba(255,255,255,0.08) 0, transparent 45%),
                     radial-gradient(circle at 85% 75%, rgba(201,154,63,0.18) 0, transparent 45%);
  pointer-events: none;
}

#hero .container { position: relative; z-index: 1; }

#hero .hero-eyebrow {
  color: var(--gloris-gold);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 13px;
}

#hero h1 {
  font-size: 46px;
  font-weight: 700;
  margin: 14px 0 18px;
}

#hero .hero-tagline {
  font-size: 19px;
  font-weight: 400;
  color: rgba(255,255,255,0.9);
  max-width: 640px;
  margin-bottom: 30px;
}

/* Hero compact pour les pages secondaires */
.hero-page {
  padding: 130px 0 60px;
}
.hero-page h1 { font-size: 34px; margin: 10px 0 0; }

@media (max-width: 767px) {
  #hero { padding: 130px 0 80px; }
  #hero h1 { font-size: 30px; }
  #hero .hero-tagline { font-size: 16px; }
  .hero-page { padding: 110px 0 50px; }
}

/* ---------- Bandeau de stats ---------- */
.stat-strip {
  background: #fff;
  border-top: 1px solid #ecefec;
  border-bottom: 1px solid #ecefec;
}

.stat-item {
  text-align: center;
  padding: 26px 10px;
}

.stat-item i {
  font-size: 30px;
  color: var(--gloris-green);
  margin-bottom: 10px;
  display: inline-block;
}

.stat-item h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--gloris-ink);
  margin: 0;
}

/* ---------- Cards génériques ---------- */
.info-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #ecefec;
  box-shadow: 0 10px 30px rgba(18, 61, 38, 0.06);
  overflow: hidden;
  height: 100%;
  transition: transform 0.25s, box-shadow 0.25s;
}

.info-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(18, 61, 38, 0.14);
}

.info-card .card-banner {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  color: #fff;
  background: linear-gradient(135deg, var(--cg-gradient-start), var(--cg-gradient-end));
}

.info-card .card-body-cg { padding: 26px 24px; }

.info-card .card-tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gloris-gold);
}

.info-card h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--gloris-green-dark);
  margin: 6px 0 10px;
}

.info-card p {
  color: var(--gloris-grey);
  font-size: 15px;
  margin-bottom: 16px;
}

/* ---------- About / founder ---------- */
.founder-section { background: var(--gloris-green-light); }

.founder-portrait {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--gloris-green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  font-weight: 700;
  font-family: var(--font-heading);
  margin-bottom: 20px;
  border: 4px solid #fff;
  box-shadow: 0 8px 20px rgba(18, 61, 38, 0.15);
  overflow: hidden;
}

.founder-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.founder-quote {
  font-size: 18px;
  font-style: italic;
  color: var(--gloris-ink);
  border-left: 3px solid var(--gloris-gold);
  padding-left: 20px;
  margin-bottom: 22px;
}

.founder-signature {
  font-weight: 700;
  color: var(--gloris-green-dark);
}

/* ---------- Value props ---------- */
.value-box {
  display: flex;
  gap: 16px;
  padding: 22px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(18, 61, 38, 0.06);
  height: 100%;
}

.value-box .value-icon {
  flex: 0 0 48px;
  height: 48px;
  width: 48px;
  border-radius: 50%;
  background: var(--gloris-green-light);
  color: var(--gloris-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

/* ---------- Gloris Assist (chatbox) ---------- */
.gloris-chat-widget { position: fixed; right: 20px; bottom: 78px; z-index: 1050; }

.gloris-chat-toggle {
  width: 56px; height: 56px; border-radius: 50%; border: none;
  background: var(--gloris-green); color: #fff; font-size: 24px;
  box-shadow: 0 10px 24px rgba(18, 61, 38, 0.28); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.25s;
}
.gloris-chat-toggle:hover, .gloris-chat-toggle.active { transform: scale(1.06); background: var(--gloris-green-dark); }

.gloris-chat-panel {
  position: fixed; right: 20px; bottom: 144px; width: 340px; max-width: calc(100vw - 40px);
  height: 460px; max-height: calc(100vh - 180px);
  background: #fff; border-radius: 16px; box-shadow: 0 20px 50px rgba(0,0,0,0.22);
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(16px);
  transition: all 0.25s; z-index: 1050;
}
.gloris-chat-panel.active { opacity: 1; visibility: visible; transform: translateY(0); }

.gloris-chat-header {
  background: var(--gloris-green-dark); color: #fff; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; font-weight: 700;
  font-family: var(--font-heading);
}
.gloris-chat-header button { background: none; border: none; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }

.gloris-chat-messages { flex: 1; overflow-y: auto; padding: 14px; background: var(--gloris-green-light); }
.gloris-chat-msg { max-width: 85%; margin-bottom: 10px; padding: 9px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; }
.gloris-chat-msg-bot { background: #fff; border: 1px solid rgba(0,0,0,0.08); color: #333; border-bottom-left-radius: 4px; }
.gloris-chat-msg-user { background: var(--gloris-green); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.gloris-chat-link { display: inline-block; margin-top: 6px; font-weight: 700; color: var(--gloris-green-dark); }
.gloris-chat-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.gloris-chat-quick button { background: #fff; border: 1.5px solid var(--gloris-green); color: var(--gloris-green); border-radius: 20px; padding: 5px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.gloris-chat-quick button:hover { background: var(--gloris-green); color: #fff; }

.gloris-chat-form { display: flex; border-top: 1px solid rgba(0,0,0,0.08); padding: 8px; gap: 8px; background: #fff; }
.gloris-chat-form input { flex: 1; border: 1px solid #ddd; border-radius: 20px; padding: 8px 14px; font-size: 13.5px; outline: none; }
.gloris-chat-form input:focus { border-color: var(--gloris-green); }
.gloris-chat-form button { width: 38px; height: 38px; border-radius: 50%; border: none; background: var(--gloris-green); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }

@media (max-width: 420px) {
  .gloris-chat-panel { right: 10px; left: 10px; width: auto; bottom: 138px; }
  .gloris-chat-widget { right: 10px; }
}

.value-box h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--gloris-ink);
}

.value-box p {
  font-size: 14px;
  color: var(--gloris-grey);
  margin: 0;
}

/* ---------- Admissions : étapes & FAQ ---------- */
.step-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #ecefec;
  padding: 24px;
  height: 100%;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gloris-green);
  color: #fff;
  font-weight: 700;
  font-family: var(--font-heading);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.fee-table {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #ecefec;
}

.fee-table th {
  background: var(--gloris-green-light);
  color: var(--gloris-green-dark);
  font-weight: 700;
}

.placeholder-note {
  display: inline-block;
  background: #fdf6e8;
  color: #8a6416;
  border: 1px dashed var(--gloris-gold);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 12.5px;
  font-style: italic;
}

.accordion-cg .accordion-button {
  font-weight: 700;
  color: var(--gloris-green-dark);
  font-family: var(--font-heading);
}

.accordion-cg .accordion-button:not(.collapsed) {
  background: var(--gloris-green-light);
  color: var(--gloris-green-dark);
  box-shadow: none;
}

.accordion-cg .accordion-button:focus { box-shadow: none; border-color: var(--gloris-green); }

/* ---------- Règlement intérieur ---------- */
.reglement-toc {
  background: var(--gloris-green-light);
  border-radius: 12px;
  padding: 22px 24px;
  position: sticky;
  top: 100px;
}

.reglement-toc h5 {
  color: var(--gloris-green-dark);
  font-weight: 700;
  margin-bottom: 12px;
}

.reglement-toc ul { list-style: none; padding: 0; margin: 0; }
.reglement-toc li { margin-bottom: 8px; }
.reglement-toc a {
  color: var(--gloris-ink);
  font-size: 14px;
  font-weight: 600;
}
.reglement-toc a:hover { color: var(--gloris-green); }

.reglement-article {
  margin-bottom: 40px;
  scroll-margin-top: 100px;
}

.reglement-article h2 {
  color: var(--gloris-green-dark);
  font-size: 22px;
  font-weight: 700;
  border-bottom: 2px solid var(--gloris-green-light);
  padding-bottom: 10px;
  margin-bottom: 16px;
}

.reglement-article h3 {
  color: var(--gloris-ink);
  font-size: 16px;
  font-weight: 700;
  margin: 18px 0 8px;
}

.reglement-article p, .reglement-article li {
  color: var(--gloris-grey);
  font-size: 15px;
  line-height: 1.75;
}

/* ---------- Actualités ---------- */
.news-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #ecefec;
  overflow: hidden;
  height: 100%;
  transition: transform 0.25s, box-shadow 0.25s;
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(18, 61, 38, 0.14);
}

.news-card .news-banner {
  height: 160px;
  background: linear-gradient(135deg, var(--cg-gradient-start), var(--cg-gradient-end));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 34px;
}

.news-card .news-date {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gloris-gold);
}

.news-card .news-body { padding: 22px 22px 24px; }

.news-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--gloris-green-dark);
  margin: 8px 0 10px;
}

.news-card p { color: var(--gloris-grey); font-size: 14px; }

/* ---------- Galerie ---------- */
.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.gallery-item:hover img { transform: scale(1.06); }

.gallery-item .gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(18,61,38,0.75), transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 14px;
  opacity: 0;
  transition: opacity 0.25s;
}

.gallery-item:hover .gallery-overlay { opacity: 1; }

.gallery-item .gallery-overlay span { color: #fff; font-weight: 600; font-size: 14px; }

/* ---------- Contact ---------- */
.contact-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #ecefec;
  box-shadow: 0 10px 30px rgba(18, 61, 38, 0.06);
  padding: 26px;
  height: 100%;
}

.contact-card i {
  font-size: 24px;
  color: var(--gloris-green);
  margin-bottom: 12px;
  display: inline-block;
}

.contact-card h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--gloris-ink);
  margin-bottom: 6px;
}

.contact-card p, .contact-card a { color: var(--gloris-grey); font-size: 14px; }

.form-cg .form-control, .form-cg .form-select {
  border-radius: 8px;
  border: 1px solid #dfe5e1;
  padding: 12px 14px;
}

.form-cg .form-control:focus, .form-cg .form-select:focus {
  border-color: var(--gloris-green);
  box-shadow: 0 0 0 0.2rem rgba(31, 110, 67, 0.15);
}

.map-frame {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #ecefec;
  height: 100%;
  min-height: 320px;
}

.map-frame iframe { width: 100%; height: 100%; min-height: 320px; border: 0; }

/* ---------- Footer ---------- */
#footer {
  background: var(--gloris-green-dark);
  color: rgba(255,255,255,0.85);
  padding: 70px 0 0;
}

#footer h5 {
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 18px;
}

#footer ul { list-style: none; padding: 0; margin: 0; }
#footer ul li { margin-bottom: 10px; font-size: 14px; }

#footer a { color: rgba(255,255,255,0.75); }
#footer a:hover { color: var(--gloris-gold); }

#footer .footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

#footer .footer-logo img {
  height: 46px;
  width: 46px;
  border-radius: 50%;
  background: #fff;
  padding: 2px;
}

#footer .social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  margin-right: 8px;
  transition: 0.25s;
}

#footer .social-links a:hover { background: var(--gloris-gold); color: var(--gloris-green-dark); }

#footer .copy {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 40px;
  padding: 20px 0;
  font-size: 13px;
  text-align: center;
  color: rgba(255,255,255,0.6);
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  visibility: hidden;
  opacity: 0;
  right: 20px;
  bottom: 20px;
  z-index: 996;
  background: var(--gloris-green);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  transition: all 0.3s;
}

.back-to-top:hover { background: var(--gloris-green-dark); color: #fff; }
.back-to-top.active { visibility: visible; opacity: 1; }
