:root {
  --ejnf-blue: #004fa3;
  --ejnf-navy: #1a334e;
  --ejnf-ink: #30331a;
  --ejnf-green: #8fa300;
  /* Vert foncé pour le texte et les fonds sous texte blanc : contraste 6:1 (WCAG AA). */
  --ejnf-green-text: #5c6900;
  --ejnf-red: #a30c00;
  --ejnf-paper: #f7f4ee;
  --ejnf-white: #fff;
  --ejnf-border: #dce2e7;
}

.ejnf-space {
  color: var(--ejnf-navy);
  font-family: inherit;
  max-width: 1040px;
  margin: 0 auto;
  padding-bottom: clamp(40px, 6vw, 72px);
}

.ejnf-hero,
.ejnf-login {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 4vw, 46px);
  border-radius: 20px;
  color: var(--ejnf-white);
  background: linear-gradient(125deg, var(--ejnf-navy), var(--ejnf-blue));
  box-shadow: 0 18px 45px rgba(26, 51, 78, .18);
}

.ejnf-hero::after,
.ejnf-login::after {
  content: "日本語";
  position: absolute;
  right: -14px;
  bottom: -40px;
  color: rgba(255, 255, 255, .08);
  font-size: clamp(78px, 14vw, 160px);
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}

.ejnf-space h1,
.ejnf-space h2,
.ejnf-space h3,
.ejnf-space h4 {
  color: inherit;
  line-height: 1.2;
  margin-top: 0;
}

.ejnf-space h1 { font-size: clamp(32px, 4.5vw, 48px); margin-bottom: 12px; }
.ejnf-space h2 { font-size: clamp(26px, 4vw, 38px); margin-bottom: 0; }
.ejnf-space h3 { font-size: 22px; margin-bottom: 0; }
.ejnf-space h4 { font-size: 15px; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .05em; }

.ejnf-kicker {
  margin: 0 0 8px;
  color: inherit;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ejnf-hero .ejnf-kicker,
.ejnf-login .ejnf-kicker { color: #dbeaff; }

.ejnf-context { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.ejnf-context span { padding: 6px 11px; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; font-size: 14px; font-weight: 700; }

.ejnf-logout,
.ejnf-help {
  display: inline-block;
  color: inherit;
  margin-top: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ejnf-actions { display: flex; justify-content: flex-end; margin: 22px 0; }

.ejnf-button,
.ejnf-login input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 20px;
  border: 0;
  border-radius: 9px;
  color: var(--ejnf-white) !important;
  background: var(--ejnf-red);
  font: inherit;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}

.ejnf-button:hover,
.ejnf-login input[type="submit"]:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(163, 12, 0, .22); }

.ejnf-level { margin-top: 42px; }
.ejnf-section-title { display: flex; gap: 18px; align-items: end; justify-content: space-between; margin-bottom: 18px; }
.ejnf-count,
.ejnf-pill { border-radius: 999px; font-weight: 750; white-space: nowrap; }
.ejnf-count { color: var(--ejnf-navy); background: #e8edf1; padding: 7px 12px; }
.ejnf-pill { color: var(--ejnf-white); background: var(--ejnf-green-text); padding: 6px 11px; }

.ejnf-session-list { display: grid; gap: 18px; }
.ejnf-card {
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--ejnf-border);
  border-radius: 16px;
  background: var(--ejnf-white);
  box-shadow: 0 8px 24px rgba(26, 51, 78, .07);
}
.ejnf-card-top { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.ejnf-date { color: var(--ejnf-blue); font-weight: 750; margin: 0 0 5px; }
.ejnf-content { margin-top: 20px; }
.ejnf-block { margin-top: 18px; padding: 16px 18px; border-left: 4px solid var(--ejnf-blue); background: #f2f6fb; }
.ejnf-block p { margin: 0; }
.ejnf-homework { border-left-color: var(--ejnf-green); background: #f7f8ee; }
.ejnf-resource { display: inline-block; margin-top: 18px; color: var(--ejnf-blue); font-weight: 750; }

.ejnf-notice { margin: 22px 0; padding: 18px 20px; border-radius: 10px; border-left: 5px solid var(--ejnf-blue); background: #f2f6fb; }
.ejnf-notice p:last-child { margin-bottom: 0; }
.ejnf-success { border-left-color: var(--ejnf-green); background: #f7f8ee; }
.ejnf-error { border-left-color: var(--ejnf-red); background: #fff3f1; }

.ejnf-login { max-width: 620px; }
.ejnf-login form { position: relative; z-index: 1; margin-top: 28px; }
.ejnf-login label { color: var(--ejnf-white); }
.ejnf-login input[type="text"],
.ejnf-login input[type="password"] { width: 100%; min-height: 46px; border: 1px solid rgba(255,255,255,.45); border-radius: 8px; padding: 9px 12px; }

.ejnf-form { display: grid; gap: 16px; max-width: 760px; margin-top: 26px; }
.ejnf-form p { margin: 0; }
.ejnf-form label { display: block; margin-bottom: 6px; color: var(--ejnf-navy); font-weight: 750; }
.ejnf-form input[type="text"],
.ejnf-form input[type="date"],
.ejnf-form input[type="file"],
.ejnf-form select,
.ejnf-form textarea { width: 100%; border: 1px solid #aebbc6; border-radius: 8px; padding: 10px 12px; background: var(--ejnf-white); font: inherit; }
.ejnf-form small { display: block; margin-top: 5px; }

/* Visite guidée contextuelle du portail. */
/* Pas de z-index ici : il enfermerait la fiche sous le bouton d’aide et le choix de langue. */
.ejnf-tour { margin: 0; }
/* « Revoir le guide » est rangé avec « Aide du portail » et le choix de langue, en bas à droite (même place sur chaque page). */
.ejnf-tour-help { position: fixed; right: 22px; bottom: 146px; z-index: 9996; display: flex; align-items: center; gap: 8px; padding: 11px 17px; border: 1px solid var(--ejnf-border); border-radius: 999px; color: var(--ejnf-blue); background: #fff; box-shadow: 0 7px 24px rgba(14, 42, 74, .18); font: inherit; font-weight: 700; cursor: pointer; }
.ejnf-tour-help:hover { background: #f2f6fb; }
.ejnf-tour-help:focus-visible { outline: 3px solid var(--ejnf-blue); outline-offset: 2px; }
.ejnf-tour-help-icon { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; background: var(--ejnf-blue); font-size: 14px; line-height: 1; }
@media (max-width: 600px) { .ejnf-tour-help { right: 12px; bottom: 128px; padding: 9px; } .ejnf-tour-help-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
.ejnf-tour-shade[hidden], .ejnf-tour-card[hidden], .ejnf-tour-spotlight[hidden] { display: none; }
.ejnf-tour-shade { position: fixed; inset: 0; z-index: 999990; background: transparent; }
.ejnf-tour-spotlight { position: fixed; z-index: 999991; border: 3px solid #fff; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(12, 25, 40, .58), 0 0 0 7px rgba(0, 79, 163, .28); pointer-events: none; transition: all .2s ease; }
.ejnf-tour-card { position: fixed; z-index: 999992; right: clamp(16px, 4vw, 56px); bottom: clamp(16px, 4vw, 48px); width: min(520px, calc(100vw - 32px)); box-sizing: border-box; padding: 28px; border: 1px solid var(--ejnf-border); border-radius: 18px; color: var(--ejnf-navy); background: #fff; box-shadow: 0 18px 60px rgba(0, 0, 0, .24); text-align: left; }
.ejnf-tour-card h2 { margin: 10px 38px 12px 0; color: var(--ejnf-navy); font-size: clamp(23px, 3vw, 30px); }
.ejnf-tour-card .ejnf-tour-copy { margin: 0; font-size: 17px; line-height: 1.55; }
.ejnf-tour-progress { margin: 0; color: #53677b; font-size: 13px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; }
.ejnf-tour-close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border: 1px solid var(--ejnf-border); border-radius: 50%; color: var(--ejnf-navy); background: #fff; font-size: 25px; line-height: 1; cursor: pointer; }
.ejnf-tour-controls { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 24px; }
.ejnf-tour-controls button { min-height: 42px; padding: 8px 14px; border: 1px solid var(--ejnf-border); border-radius: 999px; color: var(--ejnf-navy); background: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.ejnf-tour-controls .ejnf-tour-next { border-color: var(--ejnf-blue); color: #fff; background: var(--ejnf-blue); }
.ejnf-tour-nav { display: flex; gap: 8px; }
.ejnf-tour-list { max-height: 40vh; overflow-y: auto; margin: 10px 0 0; padding-left: 20px; font-size: 15px; line-height: 1.45; }
.ejnf-tour-list li + li { margin-top: 6px; }
.ejnf-tour-card.is-top { top: clamp(16px, 4vw, 48px); bottom: auto; }
.ejnf-tour-card.is-left { left: clamp(16px, 4vw, 56px); right: auto; }
.ejnf-tour-footer { margin: 14px 0 0; text-align: center; }
.ejnf-tour-footer .ejnf-tour-never { padding: 4px; border: 0; color: #46596c; background: none; font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }
.ejnf-tour-footer .ejnf-tour-never:hover { color: var(--ejnf-navy); }
html.ejnf-tour-open { overflow: hidden; }
@media (max-width: 600px) { .ejnf-tour-card { right: 12px; bottom: 12px; width: calc(100vw - 24px); padding: 22px; } .ejnf-tour-card .ejnf-tour-copy { font-size: 16px; } }

@media (max-width: 600px) {
  .ejnf-section-title,
  .ejnf-card-top { align-items: start; flex-direction: column; }
  .ejnf-actions { justify-content: stretch; }
  .ejnf-button { width: 100%; }
}


/* ---- 0.3.0 : navigation, séances, fichiers, interface enseignant ---- */
.ejnf-nav,
.ejnf-levels { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; }
.ejnf-nav a,
.ejnf-levels a {
  padding: 9px 16px;
  border: 1px solid var(--ejnf-border);
  border-radius: 999px;
  color: var(--ejnf-navy);
  background: var(--ejnf-white);
  font-weight: 750;
  text-decoration: none;
}
.ejnf-nav a[aria-current],
.ejnf-levels a[aria-current] { color: var(--ejnf-white); border-color: var(--ejnf-blue); background: var(--ejnf-blue); }
.ejnf-levels a small { font-weight: 500; opacity: .8; }
.ejnf-association-tabs { margin-bottom: 30px; }
.ejnf-view-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:34px 0 14px; }
.ejnf-view-heading .ejnf-subtitle { margin:0 !important; }
.ejnf-view-heading .ejnf-button { flex:0 0 auto; }

.ejnf-subtitle { margin: 34px 0 14px !important; font-size: 22px !important; }
.ejnf-meta { display: flex; gap: 10px; margin: 12px 0 0; color: var(--ejnf-navy); font-size: 14px; }
.ejnf-meta span { padding: 3px 10px; border-radius: 999px; background: #e8edf1; }
.ejnf-card h3 a { color: inherit; text-decoration: none; }
.ejnf-card h3 a:hover { text-decoration: underline; }
.ejnf-more,
.ejnf-back { display: inline-block; margin-top: 14px; color: var(--ejnf-blue); font-weight: 750; }
.ejnf-back { margin-top: 0; }
.ejnf-upcoming { margin-bottom: 8px; border-left: 5px solid var(--ejnf-green); }
.ejnf-upcoming ul { margin: 10px 0 0; padding-left: 20px; }
.ejnf-overdue { margin-bottom: 8px; border-left: 5px solid #c2410c; background: #fff8f1; }
.ejnf-overdue h3 { color: #9a3412; }
.ejnf-overdue ul { margin: 10px 0 0; padding-left: 20px; }
.ejnf-overdue li strong { color: #b42318; }
.ejnf-past-homework { display:block; margin:12px 0 24px; padding:14px 18px; border:1px solid var(--ejnf-border); border-radius:14px; background:#f8fafc; }
.ejnf-past-homework summary { cursor:pointer; color:var(--ejnf-blue); font-weight:750; }
.ejnf-past-homework ul { margin:12px 0 0; padding-left:20px; }

.ejnf-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; }
.ejnf-pager a { color: var(--ejnf-blue); font-weight: 750; }

.ejnf-files { margin: 12px 0 0; padding: 0; list-style: none; }
.ejnf-files li { margin-bottom: 12px; }
.ejnf-files .ejnf-resource { margin-top: 0; }
.ejnf-files audio { display: block; width: 100%; max-width: 480px; margin-top: 8px; }

.ejnf-card-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 22px; }
.ejnf-card-row h3 { font-size: 18px; }
.ejnf-row-actions { display: flex; align-items: center; gap: 18px; }
.ejnf-row-actions form { margin: 0; }
.ejnf-link-danger { border: 0; background: none; color: var(--ejnf-red); font: inherit; font-weight: 750; text-decoration: underline; cursor: pointer; }

.ejnf-form input[type="email"],
.ejnf-form input[type="url"] { width: 100%; border: 1px solid #aebbc6; border-radius: 8px; padding: 10px 12px; background: var(--ejnf-white); font: inherit; }
.ejnf-join .ejnf-form { margin-left: auto; margin-right: auto; }

@media (max-width: 600px) {
  .ejnf-card-row { align-items: start; flex-direction: column; }
}

/* ---- 0.3.2 : dossier Drive de la classe ---- */
.ejnf-drive { margin-bottom: 18px; }
.ejnf-drive .ejnf-card-top { align-items: center; }
.ejnf-drive-frame { display: block; width: 100%; height: 420px; margin-top: 18px; border: 1px solid var(--ejnf-border); border-radius: 10px; background: var(--ejnf-white); }
.ejnf-drive-mobile-note { display: none; margin: 16px 0 0; }
@media (max-width: 600px) { .ejnf-drive-frame { height: 360px; } }

.ejnf-publication-visual { display: block; width: 100%; max-height: 420px; margin-bottom: 20px; border-radius: 12px; object-fit: cover; }
.ejnf-publication-files:empty { display: none; }
.ejnf-file-removal { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--ejnf-border); border-radius: 8px; }
.ejnf-file-removal label { font-weight: 500; }
.ejnf-time-error { color: var(--ejnf-red); font-weight: 700; }

/* ---- 0.3.43 : newsletter bilingue ---- */
.ejnf-newsletter { margin-top: 24px; overflow: hidden; border: 1px solid var(--ejnf-border); border-radius: 20px; background: #fff; box-shadow: 0 16px 42px rgba(26,51,78,.12); }
.ejnf-newsletter-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: clamp(24px,5vw,48px); color: #fff; background: linear-gradient(125deg,var(--ejnf-navy),var(--ejnf-blue)); }
.ejnf-newsletter-head h2 { max-width: 720px; font-size: clamp(30px,5vw,50px); color: #fff; }
.ejnf-newsletter-head p:last-child { margin-bottom: 0; opacity: .9; }
.ejnf-lang-switch { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; padding: 5px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; background: rgba(255,255,255,.12); }
.ejnf-lang-switch > span { margin: 0 4px; }
.ejnf-lang-switch button { min-height: 36px; padding: 6px 10px; border: 0; border-radius: 999px; color: #fff; background: transparent; font: inherit; font-weight: 700; cursor: pointer; }
.ejnf-lang-switch button[aria-pressed="true"] { color: var(--ejnf-navy); background: #fff; }
.ejnf-newsletter-cover { display: block; width: 100%; max-height: 520px; object-fit: cover; }
.ejnf-newsletter-body { padding: clamp(22px,5vw,52px); }
.ejnf-newsletter-section { padding: 28px 0; border-bottom: 1px solid var(--ejnf-border); }
.ejnf-newsletter-section:first-child { padding-top: 0; }
.ejnf-newsletter-section:last-child { border-bottom: 0; }
.ejnf-newsletter-section h3 { margin-bottom: 16px; color: var(--ejnf-blue); font-size: clamp(23px,3vw,32px); }
.ejnf-newsletter-section.is-section-volunteers > h3 { color: var(--ejnf-green-text); }
.ejnf-newsletter-section.is-section-events > h3 { color: var(--ejnf-red); }
.ejnf-newsletter-section.is-section-conclusion { margin: 28px -24px -24px; padding: clamp(24px,4vw,40px); color: #fff; border: 0; background: linear-gradient(125deg,var(--ejnf-navy),var(--ejnf-blue)); }
.ejnf-newsletter-section.is-section-conclusion > h3 { color: #fff; }
.ejnf-newsletter-section.is-section-conclusion .ejnf-newsletter-content-block { color: var(--ejnf-navy); }
.ejnf-newsletter-section p:last-child { margin-bottom: 0; }
.ejnf-newsletter-layout { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.ejnf-newsletter-content-block { overflow: hidden; border: 1px solid var(--ejnf-border); border-radius: 14px; background: #fff; }
.ejnf-newsletter-content-block > img { display: block; width: 100%; height: 210px; object-fit: cover; }
.ejnf-newsletter-block-copy { padding: 20px; }
.ejnf-newsletter-content-block.is-wide,.ejnf-newsletter-content-block.is-highlight,.ejnf-newsletter-content-block.is-image-left,.ejnf-newsletter-content-block.is-image-right { grid-column: 1 / -1; }
.ejnf-newsletter-content-block.is-highlight { color: #fff; border: 0; background: linear-gradient(125deg,var(--ejnf-navy),var(--ejnf-blue)); }
.ejnf-newsletter-content-block.is-highlight h4 { color: #fff; }
.ejnf-newsletter-content-block.is-image-left,.ejnf-newsletter-content-block.is-image-right { display: grid; grid-template-columns: minmax(220px,.8fr) 1.2fr; align-items: stretch; }
.ejnf-newsletter-content-block.is-image-left > img,.ejnf-newsletter-content-block.is-image-right > img { width: 100%; height: 100%; min-height: 240px; }
.ejnf-newsletter-content-block.is-image-right > img { order: 2; }
.ejnf-newsletter-content-block h4 { margin-bottom: 9px; color: var(--ejnf-navy); font-size: 20px; text-transform: none; letter-spacing: 0; }
.ejnf-newsletter-event-grid,.ejnf-newsletter-archive-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.ejnf-newsletter-event { display: grid; gap: 6px; padding: 16px; border-radius: 12px; background: #f2f6fb; }
.ejnf-newsletter-event span { font-size: 14px; }
.ejnf-newsletter-archive-grid .ejnf-card { display: grid; gap: 6px; padding: 18px; color: var(--ejnf-navy); text-decoration: none; }
.ejnf-newsletter-archive-grid .ejnf-card:hover { border-color: var(--ejnf-blue); }
.ejnf-newsletter-bilingual { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.ejnf-newsletter-editor-section { padding: 16px; border: 1px solid var(--ejnf-border); border-radius: 12px; }
.ejnf-newsletter-editor-section legend { padding: 0 8px; color: var(--ejnf-navy); font-weight: 750; }
.ejnf-newsletter-edit-block { padding: 14px; border: 1px solid var(--ejnf-border); border-radius: 10px; background: #f8fafc; }
.ejnf-newsletter-edit-block + .ejnf-newsletter-edit-block { margin-top: 12px; }
.ejnf-newsletter-block-actions { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.ejnf-newsletter-block-actions strong { margin-right: auto; }
.ejnf-layout-picker { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; margin: 8px 0 14px; padding: 0; border: 0; }
.ejnf-layout-picker legend { grid-column: 1 / -1; margin-bottom: 6px; font-weight: 750; }
.ejnf-layout-picker label { position: relative; margin: 0; cursor: pointer; }
.ejnf-layout-picker input { position: absolute; opacity: 0; pointer-events: none; }
.ejnf-layout-choice { display: grid; height: 100%; gap: 7px; padding: 11px; border: 2px solid var(--ejnf-border); border-radius: 9px; background: #fff; }
.ejnf-layout-choice b { color: var(--ejnf-blue); font-size: 25px; line-height: 1; }
.ejnf-layout-choice span { display: grid; gap: 4px; }
.ejnf-layout-choice strong { font-size: 14px; line-height: 1.2; }
.ejnf-layout-choice small { font-size: 11px; line-height: 1.3; opacity: .8; }
.ejnf-layout-picker input:checked + .ejnf-layout-choice { border-color: var(--ejnf-blue); box-shadow: 0 0 0 2px rgba(0,79,163,.12); }
.ejnf-layout-picker input:focus-visible + .ejnf-layout-choice { outline: 3px solid rgba(0,79,163,.3); }
.ejnf-newsletter-current-image { display: flex; align-items: center; gap: 12px; margin: 8px 0 14px; }
.ejnf-newsletter-current-image img { width: 90px; height: 64px; border-radius: 7px; object-fit: cover; }
.ejnf-preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 8px; }
.ejnf-preview-heading button { min-height: 32px; padding: 4px 9px; border: 1px solid var(--ejnf-border); background: #fff; cursor: pointer; }
.ejnf-preview-heading button[aria-pressed="true"] { color: #fff; border-color: var(--ejnf-blue); background: var(--ejnf-blue); }
.ejnf-block-live-preview { max-width: 100%; }
.ejnf-preview-text { white-space: pre-line; }
.ejnf-global-preview-wrap { margin: 30px 0; padding-top: 8px; border-top: 2px solid var(--ejnf-border); }
.ejnf-global-preview-wrap > .ejnf-preview-heading > div { display: grid; gap: 3px; }
.ejnf-global-preview-wrap > .ejnf-preview-heading small { color: #536579; font-weight: 400; }
.ejnf-newsletter-global-preview { margin-top: 12px; transform-origin: top center; }
.ejnf-newsletter-global-preview .ejnf-newsletter-head { padding: 28px 32px; }
.ejnf-newsletter-global-preview .ejnf-newsletter-head h2 { margin: 8px 0; font-size: clamp(28px,4vw,42px); }
.ejnf-newsletter-global-preview .ejnf-eyebrow { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.ejnf-newsletter-global-preview .ejnf-newsletter-body { padding: 28px 32px; }
.ejnf-newsletter-preview-footer { display: flex; justify-content: space-between; gap: 15px; padding: 20px 32px; color: #fff; background: var(--ejnf-navy); font-size: 14px; }
.ejnf-global-preview-empty { margin: 0; padding: 25px; text-align: center; color: #68798b; background: #f4f7fa; border-radius: 10px; }
.ejnf-newsletter-block-actions button:not(.ejnf-link-danger),.ejnf-add-newsletter-block { min-height: 34px; padding: 5px 10px; border: 1px solid var(--ejnf-border); border-radius: 7px; color: var(--ejnf-navy); background: #fff; font: inherit; cursor: pointer; }
.ejnf-add-newsletter-block { margin-top: 12px; color: var(--ejnf-blue); font-weight: 750; }
.ejnf-newsletter-cover-preview { display: block; width: min(100%,360px); max-height: 220px; margin-bottom: 10px; border-radius: 10px; object-fit: cover; }
.ejnf-newsletter-manage-actions { justify-content: flex-start; gap: 18px; }
.ejnf-newsletter-manage-actions a { color: var(--ejnf-blue); font-weight: 750; }
.ejnf-newsletter-mail-copy { width: 100%; box-sizing: border-box; margin-top: 12px; padding: 12px; border: 1px solid var(--ejnf-border); border-radius: 8px; background: #fff; font: inherit; }
.ejnf-newsletter-templates { margin-top: 28px; }
.ejnf-newsletter-template-card { display: grid; gap: 14px; padding: 18px; }
.ejnf-newsletter-template-card > div { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.ejnf-newsletter-template-card .ejnf-button { min-height: 38px; padding: 8px 12px; }
.ejnf-newsletter-template-card a:not(.ejnf-button) { color: var(--ejnf-blue); font-weight: 700; }
.ejnf-translation-head { margin: 22px 0; padding: 22px; border-left: 6px solid var(--ejnf-blue); border-radius: 10px; background: #f2f6fb; }
.ejnf-translation-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; padding: 18px 0; }
.ejnf-translation-row + .ejnf-translation-row { border-top: 1px solid var(--ejnf-border); }
.ejnf-translation-row > div:first-child { padding: 16px; border-radius: 9px; background: #f4f6f8; }
.ejnf-whatsapp-link { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 11px 18px; border-radius: 9px; color: #fff !important; background: #168a45; font-weight: 750; text-decoration: none; }
.ejnf-whatsapp-link::before { content: "●"; margin-right: 8px; color: #d9ffe8; font-size: 12px; }

@media (max-width: 640px) {
  .ejnf-newsletter-head { align-items: stretch; flex-direction: column; padding: 22px 18px; }
  .ejnf-lang-switch { align-self: flex-start; }
  .ejnf-newsletter-body { padding: 20px 17px; }
  .ejnf-newsletter-section { padding: 22px 0; }
  .ejnf-newsletter-section.is-section-conclusion { margin: 22px -17px -20px; padding: 24px 17px; }
  .ejnf-newsletter-event-grid,.ejnf-newsletter-archive-grid,.ejnf-newsletter-bilingual { grid-template-columns: 1fr; }
  .ejnf-newsletter-layout { grid-template-columns: 1fr; }
  .ejnf-layout-picker { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ejnf-newsletter-content-block.is-image-left,.ejnf-newsletter-content-block.is-image-right { display: block; }
  .ejnf-newsletter-content-block.is-image-right > img { order: initial; }
  .ejnf-newsletter-global-preview .ejnf-newsletter-head,.ejnf-newsletter-global-preview .ejnf-newsletter-body { padding: 22px 17px; }
  .ejnf-newsletter-preview-footer { align-items: flex-start; flex-direction: column; padding: 18px 17px; }
  .ejnf-translation-row { grid-template-columns: 1fr; }
}

/* ---- 0.3.4 : formulaire enseignant simplifié ---- */
.ejnf-more { margin: 1em 0; padding: .6em 1em; border: 1px solid rgba(0,0,0,.15); border-radius: 6px; }
.ejnf-more summary { cursor: pointer; font-weight: 600; }
.ejnf-hint { font-size: .95em; opacity: .85; margin: .5em 0 1em; }

/* ---- 0.3.12 : grandes tuiles « Mes cours et ressources » / « Vie de l’association » ---- */
.ejnf-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 22px 0 28px; }
.ejnf-tile {
  display: grid; grid-template-columns: auto 1fr; grid-template-areas: "icon body" "icon go";
  gap: 4px 16px; align-items: center; padding: 17px 20px; text-decoration: none; color: var(--ejnf-navy);
  background: var(--ejnf-white); border: 2px solid var(--ejnf-border); border-radius: 16px;
  box-shadow: 0 8px 24px rgba(26, 51, 78, .07); transition: border-color .15s, transform .15s;
}
.ejnf-tile:hover { border-color: var(--ejnf-blue); transform: translateY(-2px); }
.ejnf-tile.is-active { background: var(--ejnf-blue); border-color: var(--ejnf-blue); color: var(--ejnf-white); }
.ejnf-tile-icon {
  grid-area: icon; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%;
  font-size: 34px; font-weight: 700; color: var(--ejnf-blue); background: #e8edf1;
}
.ejnf-tile.is-active .ejnf-tile-icon { color: var(--ejnf-white); background: rgba(255, 255, 255, .18); }
.ejnf-tile-body { grid-area: body; display: grid; gap: 3px; }
.ejnf-tile-body strong { font-size: 1.25em; line-height: 1.2; }
.ejnf-tile-body em { font-size: .9em; font-style: normal; opacity: .85; }
.ejnf-tile-go { grid-area: go; font-weight: 700; font-size: .95em; }
@media (max-width: 640px) { .ejnf-tiles { grid-template-columns: 1fr; } }

.ejnf-personal-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 22px 0; padding: 16px 18px; border-radius: 12px; background: #f2f6fb; }
.ejnf-personal-actions > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 18px; }
.ejnf-personal-actions a { color: var(--ejnf-blue); font-weight: 750; text-decoration: none; }
.ejnf-engagement { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 22px 0; padding: 18px 20px; border: 1px solid #dfe6bd; border-radius: 14px; background: #fafbea; }
.ejnf-engagement div { display: grid; gap: 3px; }
.ejnf-engagement a { color: var(--ejnf-blue); font-weight: 750; white-space: nowrap; }
@media (max-width: 640px) { .ejnf-personal-actions, .ejnf-engagement { align-items: stretch; flex-direction: column; } .ejnf-personal-actions > div { justify-content: flex-start; } .ejnf-engagement a { white-space: normal; } }

/* Le bandeau du portail contient déjà son titre : masquer le titre WordPress/Divi en double. */
.ejnf-portal-page .entry-title,
.ejnf-portal-page .main_title,
.ejnf-portal-page .et_pb_post_title { display: none !important; }

/* Cahier de texte collaboratif. */
.ejnf-homework-board { margin: 30px 0; padding: 22px; border-radius: 16px; background: #f4f7fb; }
.ejnf-homework-board .ejnf-section-title { margin-bottom: 14px; }
.ejnf-homework-note { border-left: 5px solid var(--ejnf-blue); }
.ejnf-homework-note + .ejnf-homework-note { margin-top: 12px; }
.ejnf-homework-note .ejnf-row-actions { justify-content: flex-end; margin-top: 12px; }
.ejnf-contribution-kind { display: inline-block; padding: 5px 10px; border-radius: 999px; background: #e8edf1; font-size: 13px; font-weight: 750; }
.ejnf-validation { margin: 14px 0 6px; padding: 10px 12px; border-radius: 8px; font-weight: 700; }
.ejnf-validation.is-pending { color: #704f00; background: #fff5cf; }
.ejnf-validation.is-valid { color: #335500; background: #eef6dc; }
@media (max-width: 600px) { .ejnf-homework-board { padding: 16px; } }

/* ---- 0.3.39 : confort sur téléphone ---- */
@media (max-width: 640px) {
  .ejnf-space { width: 100%; }
  .ejnf-hero,
  .ejnf-login { padding: 22px 18px; border-radius: 14px; box-shadow: 0 10px 26px rgba(26, 51, 78, .14); }
  .ejnf-hero::after,
  .ejnf-login::after { right: -8px; bottom: -20px; font-size: 76px; }
  .ejnf-space h1 { font-size: 32px; line-height: 1.08; }
  .ejnf-space h2 { font-size: 26px; }
  .ejnf-space h3 { font-size: 19px; }
  .ejnf-context { gap: 6px; margin-top: 12px; }
  .ejnf-context span { padding: 5px 9px; font-size: 12px; }
  .ejnf-logout { margin-top: 10px; }

  .ejnf-tiles { gap: 10px; margin: 14px 0 18px; }
  .ejnf-tile { grid-template-columns: 48px 1fr; gap: 3px 12px; padding: 14px; border-radius: 12px; }
  .ejnf-tile-icon { width: 48px; height: 48px; font-size: 27px; }
  .ejnf-tile-body strong { font-size: 17px; }
  .ejnf-tile-body > span { font-size: 14px; line-height: 1.35; }
  .ejnf-tile-body em,
  .ejnf-tile-go { font-size: 12px; }

  .ejnf-levels,
  .ejnf-nav { flex-wrap: nowrap; overflow-x: auto; margin-top: 16px; padding: 0 0 7px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
  .ejnf-association-tabs { margin-bottom: 20px; }
  .ejnf-view-heading { align-items:stretch; flex-direction:column; margin:25px 0 14px; }
  .ejnf-levels a,
  .ejnf-nav a { flex: 0 0 auto; min-height: 42px; padding: 9px 14px; }

  .ejnf-personal-actions { margin: 16px 0; padding: 14px; }
  .ejnf-personal-actions > div { display: grid; width: 100%; gap: 8px; }
  .ejnf-personal-actions a { display: block; min-height: 42px; padding: 10px 12px; border-radius: 8px; background: #fff; }
  .ejnf-engagement { margin: 16px 0; padding: 15px; }

  .ejnf-level { margin-top: 24px; }
  .ejnf-section-title { gap: 8px; margin-bottom: 13px; }
  .ejnf-card { padding: 17px; border-radius: 12px; }
  .ejnf-session-list { gap: 12px; }
  .ejnf-card-top { gap: 9px; }
  .ejnf-meta { flex-wrap: wrap; gap: 6px; }
  .ejnf-subtitle { margin-top: 25px !important; }

  .ejnf-homework-board { margin: 22px 0; padding: 13px; border-radius: 12px; }
  .ejnf-homework-note .ejnf-row-actions { align-items: stretch; flex-direction: column; gap: 8px; }
  .ejnf-homework-note .ejnf-row-actions form,
  .ejnf-homework-note .ejnf-row-actions button { width: 100%; }
  .ejnf-validation { font-size: 14px; line-height: 1.4; }
  .ejnf-more { width: 100%; box-sizing: border-box; }

  .ejnf-form { gap: 13px; margin-top: 18px; }
  .ejnf-form input,
  .ejnf-form select,
  .ejnf-form textarea { max-width: 100%; font-size: 16px; box-sizing: border-box; }
  .ejnf-form input[type="file"] { padding: 8px; }
  .ejnf-button { min-height: 46px; }
  .ejnf-drive-frame { display: none; }
  .ejnf-drive-mobile-note { display: block; }
}
.ejnf-global-language { position: fixed; z-index: 9999; right: 18px; bottom: 18px; display: flex; align-items: center; gap: 7px; padding: 9px 13px; border: 1px solid var(--ejnf-border); border-radius: 999px; color: var(--ejnf-navy); background: #fff; box-shadow: 0 8px 28px rgba(26,51,78,.18); font-weight: 750; }
.ejnf-global-language a { color: var(--ejnf-blue); text-decoration: none; }
.ejnf-global-language a[aria-current="true"] { color: #fff; padding: 3px 7px; border-radius: 999px; background: var(--ejnf-blue); }

.ejnf-link-danger { white-space: nowrap; }
@media (max-width: 640px) {
  .ejnf-global-language { right: 10px; bottom: 10px; padding: 5px 9px; gap: 5px; font-size: 13px; opacity: .92; }
  body { padding-bottom: 56px; }
}
.ejnf-login input[type="text"],.ejnf-login input[type="password"]{box-sizing:border-box;max-width:100%}
.ejnf-commission-tools {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    margin: 0 0 28px;
}

.ejnf-commission-tool {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
}

.ejnf-commission-tool .ejnf-button {
    align-self: flex-start;
}

.ejnf-idea-form {
    width: 100%;
    max-width: none;
    margin-top: 14px;
}
.ejnf-idea-form select,
.ejnf-idea-form textarea { width:100%; box-sizing:border-box; }
.ejnf-idea-form textarea { min-height:160px; resize:vertical; }

.ejnf-message-wall { margin: 26px 0; }
.ejnf-testimonials { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:16px; margin:16px 0; }
.ejnf-testimonials blockquote { margin:0; }
.ejnf-testimonials blockquote p { font-size:1.04em; }
.ejnf-testimonials blockquote footer { margin-top:12px; color:#52657a; font-weight:600; }
.ejnf-message-form { margin-top:16px; }

/* Deux usages distincts sous une même entraide de classe. */
.ejnf-help-spaces { display:grid; gap:24px; margin-top:22px; }
.ejnf-help-space { min-width:0; padding:20px; border:1px solid #d6e0ea; border-radius:16px; background:#fff; }
.ejnf-help-space h4 { margin:0 0 8px; color:#183653; font-size:1.35rem; }
.ejnf-help-space > .ejnf-hint { min-height:3.2em; }
.ejnf-help-space .ejnf-card { margin-top:14px; }
.ejnf-help-space .ejnf-more { margin-top:16px; }
@media (min-width:1050px) {
  .ejnf-help-spaces { grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-items:start; }
}
@media (max-width:640px) {
  .ejnf-help-spaces { gap:16px; margin-top:16px; }
  .ejnf-help-space { padding:14px; border-radius:12px; }
  .ejnf-help-space > .ejnf-hint { min-height:0; }
}



/* 0.3.85 — accessibilité, messages et gestion administrative */
.ejnf-space a:focus-visible,
.ejnf-space button:focus-visible,
.ejnf-space input:focus-visible,
.ejnf-space select:focus-visible,
.ejnf-space textarea:focus-visible,
.ejnf-space summary:focus-visible,
.ejnf-notice.ejnf-success, .ejnf-notice.is-ok { border-left: 5px solid var(--ejnf-green-text); background: #f7f8ee; }
.ejnf-notice.ejnf-error, .ejnf-notice.is-error { border-left: 5px solid var(--ejnf-red); background: #fff3f1; }
.ejnf-hp { position: absolute; left: -9999px; }
.ejnf-commission-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 20px 0; }
.ejnf-other-commissions { margin-top: 32px; }
.ejnf-other-commissions > summary { cursor: pointer; color: #4a5560; }
.ejnf-choice-list { display: grid; gap: 10px; margin: 18px 0; }
.ejnf-choice { display: block; }
.ejnf-button.ejnf-button-secondary { color: var(--ejnf-navy) !important; background: var(--ejnf-white); border: 2px solid var(--ejnf-navy); }
.ejnf-registrations .ejnf-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ejnf-registration-form select { width: 100%; max-width: 520px; }
.ejnf-new { display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 999px; font-size: .75em; font-weight: 750; vertical-align: middle; color: var(--ejnf-white); background: var(--ejnf-red); }
.ejnf-notify-now { margin: 18px 0; padding: 12px 14px; border: 1px solid var(--ejnf-border); border-left: 4px solid var(--ejnf-red); border-radius: 8px; background: #fff8f6; }
.ejnf-notify-now small { display: block; margin-top: 4px; opacity: .85; }
