/* =====================================================================
   ED SEJPG v2 — Feuille de style du portail et de l'espace candidat
   Charte : noir (bandeau), or (menu), vert (titres), orange (actions)
   ===================================================================== */
:root {
  --ed-black: #0b0b0b;
  --ed-ink: #1d1d1b;
  --ed-gold: #ffd700;
  --ed-gold-soft: #fff6c2;
  --ed-gold-dark: #d9b600;
  --ed-green: #6fbf58;          /* vert de la charte (accents, filets) */
  --ed-green-dark: #3a7f2a;     /* vert lisible pour les titres */
  --ed-green-soft: #eef7ea;
  --ed-orange: #fc9100;
  --ed-orange-dark: #d97c00;
  --ed-brown: #9c7a54;
  --ed-cream: #f7f6f0;
  --ed-line: #e6e4dc;
  --ed-muted: #5f5f5a;
  --ed-radius: 6px;
  --ed-shadow: 0 10px 30px rgba(20, 20, 10, .07);
  --bs-body-font-family: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --bs-body-color: var(--ed-ink);
  --bs-link-color: #0a6bc4;
  --bs-link-color-rgb: 10, 107, 196;
  --bs-link-hover-color: #111;
}

body { background: #fff; font-size: 1rem; line-height: 1.65; }
h1, h2, h3, h4, h5, .font-slab { font-family: "Roboto Slab", Georgia, serif; color: var(--ed-green-dark); font-weight: 600; }
a { text-underline-offset: 3px; }
::selection { background: var(--ed-gold); color: #000; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 2000; background: var(--ed-gold); color: #000; padding: .5rem 1rem; }
.skip-link:focus { left: 1rem; }
:focus-visible { outline: 3px solid var(--ed-orange); outline-offset: 2px; }

/* ---------- Bandeau supérieur (noir) ---------- */
.topbar { background: var(--ed-black); color: #cfcfc8; font-size: .82rem; }
.topbar a { color: #e9e9e2; text-decoration: none; }
.topbar a:hover { color: var(--ed-gold); }
.topbar .sep { opacity: .35; margin: 0 .6rem; }
.lang-switch { display: inline-flex; border: 1px solid #444; border-radius: 3px; overflow: hidden; }
.lang-switch a, .lang-switch span { padding: .1rem .5rem; font-weight: 600; letter-spacing: .04em; }
.lang-switch .active { background: var(--ed-gold); color: #000; }

/* ---------- En-tête (blanc) ---------- */
.masthead { background: #fff; border-bottom: 1px solid var(--ed-line); }
.brand { display: flex; align-items: center; gap: 1rem; text-decoration: none; color: inherit; }
.brand img.logo-ed { height: 86px; width: auto; }
.brand .brand-title { font-family: "Roboto Slab", serif; color: var(--ed-green-dark); font-weight: 700; font-size: 1.12rem; line-height: 1.25; max-width: 30rem; }
.brand .brand-title small { display: block; font-family: "Roboto", sans-serif; font-weight: 500; color: var(--ed-muted); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; margin-top: .3rem; }
.logo-ufhb { height: 64px; width: auto; }

.btn-ed { background: var(--ed-orange); border-color: var(--ed-orange); color: #000; font-weight: 600; }
.btn-ed:hover, .btn-ed:focus { background: var(--ed-orange-dark); border-color: var(--ed-orange-dark); color: #000; }
.btn-ed-outline { border: 2px solid var(--ed-orange); color: var(--ed-ink); font-weight: 600; background: transparent; }
.btn-ed-outline:hover { background: var(--ed-orange); color: #000; }
.btn-green { background: var(--ed-green-dark); border-color: var(--ed-green-dark); color: #fff; font-weight: 600; }
.btn-green:hover { background: #2f6a22; border-color: #2f6a22; color: #fff; }
.btn-black { background: #000; color: var(--ed-gold); font-weight: 600; border: 0; }
.btn-black:hover { background: #222; color: var(--ed-gold); }

/* ---------- Menu principal (or) ---------- */
.mainnav { background: var(--ed-gold); position: sticky; top: 0; z-index: 1030; box-shadow: 0 2px 0 rgba(0,0,0,.08); }
.mainnav .navbar { padding: 0; }
.mainnav .nav-link { color: #000 !important; font-weight: 600; font-size: .86rem; text-transform: uppercase; letter-spacing: .03em; padding: 1rem .85rem !important; }
.mainnav .nav-link:hover, .mainnav .nav-link:focus, .mainnav .nav-item.active > .nav-link { background: rgba(0,0,0,.09); }
.mainnav .nav-item.active > .nav-link { box-shadow: inset 0 -4px 0 #000; }
.mainnav .dropdown-menu { border: 0; border-top: 4px solid #000; border-radius: 0 0 var(--ed-radius) var(--ed-radius); box-shadow: var(--ed-shadow); padding: .4rem 0; min-width: 17rem; }
.mainnav .dropdown-item { font-size: .9rem; padding: .5rem 1.1rem; white-space: normal; }
.mainnav .dropdown-item:hover, .mainnav .dropdown-item.active { background: var(--ed-gold-soft); color: #000; }
.mainnav .dropdown-item.cta { color: var(--ed-orange-dark); font-weight: 700; }
.mainnav .navbar-toggler { border: 0; padding: .7rem 0; color: #000; font-weight: 700; text-transform: uppercase; font-size: .9rem; }
.mainnav .navbar-toggler:focus { box-shadow: none; }
@media (min-width: 992px) {
  .mainnav .dropdown:hover > .dropdown-menu { display: block; margin-top: 0; }
}
@media (max-width: 991.98px) {
  .mainnav .navbar-collapse { max-height: 75vh; overflow-y: auto; padding-bottom: .75rem; }
  .mainnav .nav-link { padding: .65rem .25rem !important; }
  .mainnav .dropdown-menu { box-shadow: none; border-top-width: 2px; background: #fffbe0; }
}

/* ---------- Bandeau d'annonce ---------- */
.announce { background: var(--ed-green-dark); color: #fff; font-size: .92rem; }
.announce a { color: var(--ed-gold); font-weight: 600; }
.announce .badge { background: var(--ed-gold); color: #000; }

/* ---------- Héros ---------- */
.hero { position: relative; background: #000; }
.hero .carousel-item { height: clamp(360px, 58vh, 560px); }
.hero .carousel-item img { object-fit: cover; width: 100%; height: 100%; opacity: .55; }
.hero .hero-caption { position: absolute; inset: 0; display: flex; align-items: center; z-index: 2; pointer-events: none; }
.hero .hero-caption .container { pointer-events: auto; }
.hero h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 700; text-shadow: 0 2px 18px rgba(0,0,0,.4); max-width: 46rem; }
.hero .kicker { display: inline-block; background: var(--ed-gold); color: #000; font-weight: 700; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; padding: .3rem .7rem; margin-bottom: 1rem; }
.hero p.lead { color: #f1f1ea; max-width: 40rem; }
.hero .carousel-indicators [data-bs-target] { background-color: var(--ed-gold); width: 28px; height: 4px; }

/* Carte campagne qui chevauche le héros */
.campaign-card { background: #fff; border-top: 6px solid var(--ed-orange); box-shadow: var(--ed-shadow); border-radius: 0 0 var(--ed-radius) var(--ed-radius); margin-top: -70px; position: relative; z-index: 5; }
.campaign-card .state { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.campaign-card .countdown { display: flex; gap: .6rem; }
.campaign-card .countdown div { background: var(--ed-black); color: var(--ed-gold); border-radius: 4px; min-width: 62px; text-align: center; padding: .35rem .3rem; }
.campaign-card .countdown strong { display: block; font-size: 1.45rem; line-height: 1.1; font-family: "Roboto Slab", serif; }
.campaign-card .countdown span { font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: #ddd; }

/* ---------- Sections ---------- */
.section { padding: 4rem 0; }
.section-cream { background: var(--ed-cream); }
.section-title { position: relative; padding-bottom: .8rem; margin-bottom: 2rem; font-size: clamp(1.45rem, 2.4vw, 1.95rem); }
.section-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 64px; height: 4px; background: var(--ed-gold); box-shadow: 64px 0 0 var(--ed-green); }
.text-center .section-title::after, .section-title.text-center::after { left: calc(50% - 64px); }
.eyebrow { color: var(--ed-brown); font-weight: 700; text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; }

/* Cartes génériques */
.card-ed { border: 1px solid var(--ed-line); border-radius: var(--ed-radius); background: #fff; transition: transform .2s, box-shadow .2s; }
.row > [class*="col"] > .card-ed:only-child { height: 100%; }
.card-ed:hover { transform: translateY(-3px); box-shadow: var(--ed-shadow); }
.card-ed .card-img-top { aspect-ratio: 16/8; object-fit: cover; background: var(--ed-cream); }
.card-ed .card-title { font-size: 1.08rem; color: var(--ed-ink); }
.card-ed .card-title a { color: inherit; text-decoration: none; }
.card-ed .card-title a:hover { color: var(--ed-green-dark); }
.card-ed .meta { font-size: .8rem; color: var(--ed-muted); }
.tag { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .2rem .55rem; border-radius: 2px; background: var(--ed-gold); color: #000; }
.tag-communique { background: var(--ed-orange); }
.tag-evenement { background: var(--ed-green); }
.tag-soutenance { background: #000; color: var(--ed-gold); }

/* Accès rapides */
.quick { display: flex; gap: 1rem; align-items: flex-start; padding: 1.3rem; border-radius: var(--ed-radius); background: #fff; border: 1px solid var(--ed-line); text-decoration: none; color: inherit; height: 100%; transition: border-color .2s, box-shadow .2s; }
.quick:hover { border-color: var(--ed-gold-dark); box-shadow: var(--ed-shadow); color: inherit; }
.quick .ico { flex: 0 0 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem; background: var(--ed-gold-soft); color: #000; }
.quick h3 { font-size: 1rem; margin: 0 0 .2rem; color: var(--ed-ink); }
.quick p { margin: 0; font-size: .86rem; color: var(--ed-muted); }

/* Domaines */
.domain { border-top: 5px solid var(--ed-green); }
.domain:nth-child(3n+2) .domain, .domain.alt { border-top-color: var(--ed-brown); }
.domain .ico { font-size: 1.8rem; color: var(--ed-green-dark); }
.domain ul { padding-left: 1.1rem; margin-bottom: 0; font-size: .9rem; }
.domain ul li::marker { color: var(--ed-orange); }

/* Chiffres clés */
.figures { background: var(--ed-gold); }
.figures .num { font-family: "Roboto Slab", serif; font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 700; color: #000; line-height: 1; }
.figures .lbl { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; color: #3a3200; }

/* Parcours / étapes */
.timeline { counter-reset: tl; list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.timeline li { counter-increment: tl; position: relative; background: #fff; border: 1px solid var(--ed-line); border-radius: var(--ed-radius); padding: 2.6rem 1.1rem 1.1rem; }
.timeline li::before { content: counter(tl); position: absolute; top: -18px; left: 1.1rem; width: 40px; height: 40px; border-radius: 50%; background: #000; color: var(--ed-gold); display: grid; place-items: center; font-weight: 700; font-family: "Roboto Slab", serif; }
.timeline h3 { font-size: 1rem; color: var(--ed-ink); margin-bottom: .25rem; }
.timeline p { font-size: .86rem; color: var(--ed-muted); margin: 0; }

/* Mot du directeur (accueil) */
.director { background: #000; color: #e8e8e0; border-radius: var(--ed-radius); overflow: hidden; }
.director .avatar { width: 96px; height: 96px; border-radius: 50%; background: var(--ed-gold); color: #000; display: grid; place-items: center; font-family: "Roboto Slab", serif; font-size: 2rem; font-weight: 700; }
.director h2 { color: var(--ed-gold); }
.director blockquote { font-size: 1.05rem; font-style: italic; border-left: 4px solid var(--ed-green); padding-left: 1rem; }

/* ---------- Pages intérieures ---------- */
.page-head { background: linear-gradient(90deg, rgba(0,0,0,.92), rgba(0,0,0,.72)), url("../img/slides/slide-2.jpg") center/cover; color: #fff; padding: 2.6rem 0 2.2rem; border-bottom: 5px solid var(--ed-gold); }
.page-head h1 { color: #fff; margin: 0; font-size: clamp(1.6rem, 3vw, 2.3rem); }
.page-head .lead { color: #ddd; font-size: 1.02rem; margin: .5rem 0 0; max-width: 50rem; }
.breadcrumb { --bs-breadcrumb-divider-color: #aaa; --bs-breadcrumb-item-active-color: var(--ed-gold); margin-bottom: .6rem; font-size: .82rem; }
.breadcrumb a { color: #ddd; text-decoration: none; }
.breadcrumb a:hover { color: var(--ed-gold); }

.prose { font-size: 1.02rem; max-width: 52rem; }
.prose h2 { font-size: 1.5rem; margin-top: 2rem; }
.prose h3 { font-size: 1.22rem; margin-top: 1.8rem; }
.prose ul li::marker, .prose ol li::marker { color: var(--ed-green-dark); font-weight: 700; }
.prose ol > li { margin-bottom: .55rem; }
.prose blockquote { border-left: 4px solid var(--ed-gold); background: var(--ed-cream); padding: .8rem 1.1rem; }
.prose table { width: 100%; margin: 1rem 0; border-collapse: collapse; font-size: .94rem; }
.prose table th { background: var(--ed-gold); }
.prose table td, .prose table th { border: 1px solid var(--ed-line); padding: .55rem .7rem; vertical-align: top; }
.prose img { max-width: 100%; height: auto; }
.ql-align-center { text-align: center; } .ql-align-right { text-align: right; } .ql-align-justify { text-align: justify; }
.ql-indent-1 { padding-left: 3em; } .ql-indent-2 { padding-left: 6em; }

.side-nav { position: sticky; top: 76px; }
.side-nav .list-group-item { border-left: 3px solid transparent; font-size: .92rem; }
.side-nav .list-group-item.active { background: var(--ed-gold-soft); color: #000; border-color: var(--ed-line); border-left-color: #000; font-weight: 600; }
.side-box { border: 1px solid var(--ed-line); border-top: 4px solid var(--ed-orange); border-radius: var(--ed-radius); padding: 1.2rem; background: #fff; }

.doc-item { display: flex; gap: 1rem; align-items: center; padding: .9rem 1rem; border: 1px solid var(--ed-line); border-radius: var(--ed-radius); background: #fff; }
.doc-item .ico { font-size: 1.7rem; color: #c0392b; }
.doc-item + .doc-item { margin-top: .6rem; }
.doc-item a.title { font-weight: 600; color: var(--ed-ink); text-decoration: none; }
.doc-item a.title:hover { color: var(--ed-green-dark); text-decoration: underline; }

/* ---------- Pied de page ---------- */
.site-footer { background: #121211; color: #bdbdb5; font-size: .9rem; border-top: 6px solid var(--ed-gold); }
.site-footer h2 { color: var(--ed-gold); font-family: "Roboto", sans-serif; font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; margin-bottom: 1rem; }
.site-footer a { color: #e5e5dc; text-decoration: none; }
.site-footer a:hover { color: var(--ed-gold); text-decoration: underline; }
.site-footer .staff dt { color: var(--ed-green); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.site-footer .staff dd { color: #fff; margin-bottom: .6rem; }
.site-footer .bottom { border-top: 1px solid #2a2a28; font-size: .8rem; }
.site-footer .logo-ufhb-foot { background: #fff; padding: .5rem; border-radius: 4px; height: 76px; }
.site-footer .form-control { background: #1f1f1d; border-color: #3a3a37; color: #fff; }
.site-footer .form-control::placeholder { color: #8a8a83; }
.socials a { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ed-green-dark); color: #fff; margin-right: .3rem; }
.socials a:hover { background: var(--ed-gold); color: #000; text-decoration: none; }

/* =====================================================================
   Espace candidat
   ===================================================================== */
.cand-wrap { background: var(--ed-cream); min-height: 60vh; padding: 2.5rem 0 4rem; }
.cand-card { background: #fff; border: 1px solid var(--ed-line); border-radius: var(--ed-radius); box-shadow: var(--ed-shadow); }
.cand-card .card-head { border-bottom: 1px solid var(--ed-line); padding: 1.1rem 1.4rem; display: flex; align-items: center; gap: .8rem; }
.cand-card .card-head h1, .cand-card .card-head h2 { margin: 0; font-size: 1.25rem; }
.cand-card .card-body { padding: 1.4rem; }
.auth-aside { background: #000 url("../img/slides/slide-1.jpg") center/cover; color: #fff; position: relative; border-radius: var(--ed-radius) 0 0 var(--ed-radius); overflow: hidden; }
.auth-aside::before { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(0,0,0,.85), rgba(0,0,0,.55)); }
.auth-aside > * { position: relative; }
.auth-aside h2 { color: var(--ed-gold); }
.auth-aside li { margin-bottom: .45rem; }

/* Stepper */
.stepper { list-style: none; margin: 0; padding: 0; }
.stepper li a { display: flex; align-items: center; gap: .7rem; padding: .62rem .8rem; border-radius: var(--ed-radius); color: var(--ed-ink); text-decoration: none; font-size: .92rem; border: 1px solid transparent; }
.stepper li a:hover { background: var(--ed-cream); }
.stepper .num { flex: 0 0 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #e9e8e1; font-weight: 700; font-size: .85rem; }
.stepper li.done .num { background: var(--ed-green); color: #fff; }
.stepper li.active a { background: var(--ed-gold-soft); border-color: var(--ed-gold-dark); font-weight: 600; }
.stepper li.active .num { background: #000; color: var(--ed-gold); }
.stepper .opt { font-size: .7rem; color: var(--ed-muted); display: block; font-weight: 400; }
.progress-ed { height: 8px; background: #e9e8e1; }
.progress-ed .progress-bar { background: linear-gradient(90deg, var(--ed-green), var(--ed-green-dark)); }
.form-label { font-weight: 500; font-size: .92rem; }
.form-label .req { color: #c0392b; }
.form-control:focus, .form-select:focus { border-color: var(--ed-gold-dark); box-shadow: 0 0 0 .2rem rgba(255, 215, 0, .35); }
.file-current { font-size: .82rem; }
.sig-pad { border: 2px dashed #bbb; border-radius: var(--ed-radius); background: #fff; width: 100%; height: 200px; touch-action: none; cursor: crosshair; }
.pwd-criteria { list-style: none; padding: 0; margin: .4rem 0 0; font-size: .8rem; color: var(--ed-muted); columns: 2; }
.pwd-criteria li::before { content: "○ "; }
.pwd-criteria li.ok { color: var(--ed-green-dark); }
.pwd-criteria li.ok::before { content: "● "; }
.status-panel { border-left: 5px solid var(--ed-gold); background: #fff; }
.history li { position: relative; padding-left: 1.4rem; margin-bottom: .9rem; }
.history li::before { content: ""; position: absolute; left: 0; top: .45rem; width: 10px; height: 10px; border-radius: 50%; background: var(--ed-green); }

/* Badges de statut (couleurs supplémentaires) */
.bg-teal { background-color: #0f8a80 !important; color: #fff; }
.bg-orange { background-color: var(--ed-orange) !important; color: #000; }
.badge-status { font-weight: 600; letter-spacing: .02em; padding: .45em .7em; }

/* Éditeur Quill */
.ql-toolbar.ql-snow { border-radius: var(--ed-radius) var(--ed-radius) 0 0; background: var(--ed-cream); }
.ql-container.ql-snow { border-radius: 0 0 var(--ed-radius) var(--ed-radius); min-height: 260px; font-size: 1rem; font-family: inherit; }

@media print {
  .topbar, .mainnav, .site-footer, .announce, .no-print { display: none !important; }
}

/* Les liens « étirés » restent limités à leur carte (corrige les clics détournés vers /fr/domaines) */
.card-ed, .director, .campaign-card, .side-box { position: relative; }
.announce { position: relative; z-index: 2; }
