/* OrniPrepa – Épreuves. Couleurs et tailles réglables par variables (widgets Elementor). */
.oe-catalogue, .oe-liste {
  --oe-accent: #1d9e75;
  --oe-texte: inherit;
  --oe-doux: #5b6470;
  --oe-bord: #dfe3e8;
  --oe-fond-carte: #fff;
  font-size: 15px;
  line-height: 1.45;
}
.oe-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* filtres */
.oe-filtres { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.oe-champ { margin: 0; flex: 1 1 160px; max-width: 100%; }
.oe-champ-q { flex: 2 1 260px; }
.oe-filtres input[type="search"], .oe-filtres select {
  width: 100%; min-height: 40px; padding: 6px 10px; border: 1px solid var(--oe-bord); border-radius: 6px;
  background: #fff; color: #1f2328; font: inherit; font-size: 14px; box-sizing: border-box;
}
.oe-filtres input:focus, .oe-filtres select:focus { outline: 2px solid var(--oe-accent); outline-offset: 1px; border-color: var(--oe-accent); }
.oe-js .oe-sans-js { display: none; }
.oe-lien { background: none; border: 0; padding: 6px 4px; color: var(--oe-doux); text-decoration: underline; cursor: pointer; font: inherit; font-size: 14px; }
.oe-total { margin: 0 0 12px; color: var(--oe-doux); font-size: 14px; }

/* grille de cartes : boîtes galerie (vignette floutée + texte sur fond noir flouté) */
.oe-grille {
  --oe-carte-min: 240px;
  --oe-arrondi: 12px;
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(var(--oe-carte-min), 100%), 1fr));
}
.oe-chargement .oe-grille { opacity: .45; pointer-events: none; transition: opacity .15s; }
.oe-carte {
  --oe-survol-defaut: #7dd3fc;
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; min-height: 340px;
  background: linear-gradient(160deg, #1e293b 0%, #0b1220 100%);
  border: 1px solid rgba(255, 255, 255, .10); border-radius: var(--oe-arrondi);
  color: #fff; cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.oe-carte-image {
  position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; max-width: none;
  object-fit: cover; object-position: top center; transform: scale(1.04);
  transition: transform .35s ease; background: #e5e7eb;
}
.oe-carte::before {  /* assombrit le bas pour la lisibilité du texte */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(5, 8, 15, .05) 0%, rgba(5, 8, 15, .25) 45%, rgba(5, 8, 15, .7) 100%);
}
.oe-carte:hover, .oe-carte:focus-within {
  border-color: var(--oe-survol, var(--oe-survol-defaut));
  box-shadow: 0 0 0 1px var(--oe-survol, var(--oe-survol-defaut)),
              0 14px 34px -12px color-mix(in srgb, var(--oe-survol, var(--oe-survol-defaut)) 60%, transparent);
  transform: translateY(-2px);
}
.oe-carte:hover .oe-carte-image { transform: scale(1.09); }
.oe-carte-corps {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 14px 16px;
  background: rgba(9, 12, 20, .62);
  -webkit-backdrop-filter: blur(12px) saturate(1.2); backdrop-filter: blur(12px) saturate(1.2);
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.oe-carte-haut { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.oe-badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: #e0f2fe; background: rgba(125, 211, 252, .16); border: 1px solid rgba(125, 211, 252, .35);
}
.oe-annee { color: rgba(255, 255, 255, .78); font-size: 12px; white-space: nowrap; }
.oe-carte-titre { margin: 6px 0 0 !important; font-size: 17px !important; line-height: 1.3 !important; color: #fff !important; }
.oe-carte-ouvrir {
  margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
/* toute la boîte ouvre l'aperçu (assets/epreuves.js) ; au clavier : ce bouton */
.oe-carte-ouvrir:focus { outline: none; }
.oe-carte-ouvrir:focus-visible { outline: 2px solid var(--oe-survol, var(--oe-survol-defaut)); outline-offset: 3px; border-radius: 4px; }
.oe-carte-sous { margin: 0 !important; color: rgba(255, 255, 255, .88); font-size: 14px; }
.oe-carte-infos { margin: 0 !important; color: rgba(255, 255, 255, .72); font-size: 13px; }
.oe-carte-actions { position: relative; z-index: 4; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; }
.oe-carte-oeil {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: #fff; background: rgba(9, 12, 20, .6);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .14);
  opacity: 0; transform: translateY(-4px); transition: opacity .2s ease, transform .2s ease; pointer-events: none;
}
.oe-carte:hover .oe-carte-oeil, .oe-carte:focus-within .oe-carte-oeil { opacity: 1; transform: none; }
@media (hover: none) { .oe-carte-oeil { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .oe-carte, .oe-carte-image, .oe-carte-oeil { transition: none; }
  .oe-carte:hover, .oe-carte:focus-within, .oe-carte:hover .oe-carte-image { transform: none; }
}

/* boutons */
.oe-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px;
  padding: 6px 14px; border-radius: 6px; border: 1px solid var(--oe-accent, #1d9e75); cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; text-decoration: none !important;
}
.oe-btn-secondaire { background: transparent; color: var(--oe-accent, #1d9e75); }
.oe-btn-secondaire:hover { background: color-mix(in srgb, var(--oe-accent, #1d9e75) 10%, transparent); }
.oe-btn-achat { background: var(--oe-accent, #1d9e75); color: #fff !important; flex: 1 1 auto; }
.oe-btn-achat:hover { filter: brightness(.92); }
.oe-btn:focus-visible { outline: 2px solid var(--oe-accent, #1d9e75); outline-offset: 2px; }

/* pagination */
.oe-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 18px 0 4px; }
.oe-page {
  min-width: 36px; height: 36px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--oe-bord); border-radius: 6px; color: inherit; text-decoration: none !important; font-size: 14px;
}
a.oe-page:hover { border-color: var(--oe-accent); color: var(--oe-accent); }
.oe-actuelle { background: var(--oe-accent); border-color: var(--oe-accent); color: #fff; font-weight: 600; }
.oe-ellipse { border: 0; }
.oe-vide { padding: 16px; border: 1px dashed var(--oe-bord); border-radius: 8px; color: var(--oe-doux); }
.oe-voir-tout { margin: 14px 0 0; text-align: center; }

/* fenêtre d'aperçu */
html.oe-modale-ouverte { overflow: hidden; }
.oe-modale {
  position: fixed; inset: 0; z-index: 999999; display: flex; align-items: center; justify-content: center;
  padding: 12px; background: rgba(15, 20, 25, .72);
}
.oe-modale-panneau {
  position: relative; display: flex; flex-direction: column; width: min(980px, 100%); height: 100%;
  background: #e9ecef; border-radius: 10px; overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.oe-modale-cadre { flex: 1; width: 100%; border: 0; background: #e9ecef; }
.oe-modale-croix {
  position: absolute; top: 6px; right: 8px; z-index: 2; width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .06); color: #1f2328; font-size: 24px; line-height: 1; cursor: pointer;
}
.oe-modale-croix:hover { background: rgba(0, 0, 0, .12); }
/* les thèmes stylent tous les <button> (fond, bordure, marges) : on garde nos boutons neutres */
.oe-modale .oe-modale-croix {
  padding: 0 !important; min-height: 0 !important; border: 0 !important; border-radius: 50% !important;
  background: rgba(0, 0, 0, .06) !important; color: #1f2328 !important; box-shadow: none !important;
  display: inline-flex !important; align-items: center; justify-content: center;
}
.oe-modale .oe-modale-croix:hover, .oe-modale .oe-modale-croix:focus { background: rgba(0, 0, 0, .14) !important; color: #1f2328 !important; }
.oe-carte .oe-carte-ouvrir, .oe-carte .oe-carte-ouvrir:hover, .oe-carte .oe-carte-ouvrir:focus {
  padding: 0 !important; min-height: 0 !important; border: 0 !important; border-radius: 0 !important;
  background: none !important; color: inherit !important; box-shadow: none !important;
  font: inherit !important; letter-spacing: inherit !important; text-transform: none !important; line-height: inherit !important;
}
.oe-modale-barre {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: #fff; border-top: 1px solid #dfe3e8; color: #1f2328;
}
.oe-modale-texte { margin: 0 !important; font-size: 14px; }
.oe-modale-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 560px) {
  .oe-modale { padding: 0; }
  .oe-modale-panneau { border-radius: 0; }
  .oe-modale-actions, .oe-modale-actions .oe-btn { flex: 1 1 auto; }
}
@media print { .oe-modale { display: none !important; } }

/* « Sujets séquences » : classes et matières (style des catégories de la Librairie) */
.oe-sequences { --oe-accent: #006aac; font-family: "DM Sans", sans-serif; }
.oe-seq-titre {
  margin: 28px 0 16px !important; font-family: Inter, sans-serif !important; font-size: 25px !important;
  font-weight: 700 !important; line-height: 1.3 !important; color: #0f172a !important;
}
.oe-sequences > .oe-seq-titre:first-child, .oe-fil + .oe-seq-titre { margin-top: 8px !important; }
.oe-seq-grille { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.oe-seq-carte {
  /* couleurs du site : bleu #006AAC, orange #F59426, cartes arrondies comme celles de l'accueil */
  display: flex; flex-direction: column; gap: 6px; min-height: 150px; padding: 20px 22px; box-sizing: border-box;
  background: #006aac; color: #fff !important; text-decoration: none !important;
  border: 3px solid #e8e1e1; border-radius: 15px; box-shadow: 0 0 10px rgba(0, 0, 0, .25);
  transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.oe-seq-carte:hover { background: #f59426; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); transform: translateY(-2px); }
.oe-seq-carte:focus-visible { outline: 3px solid #f59426; outline-offset: 2px; }
.oe-seq-nom { font-family: Verdana, sans-serif; font-size: 20px; font-weight: 700; line-height: 1.3; color: #fff; }
.oe-seq-compte { font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, .92); }
.oe-seq-fleche {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; margin-top: auto;
  border-radius: 50%; background: #f59426; color: #fff; transition: background-color .2s ease, color .2s ease;
}
.oe-seq-carte:hover .oe-seq-fleche { background: #fff; color: #f59426; }
.oe-fil { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 15px; color: #3e3e3e; }
.oe-fil a { color: #006aac !important; text-decoration: none !important; font-weight: 500; }
.oe-fil a:hover { text-decoration: underline !important; }
.oe-fil-sep { color: #858585; }
.oe-fil [aria-current] { font-weight: 600; }
/* intertitres « Séquence 1 », « Séquence 2 »… dans la grille d'épreuves */
.oe-intertitre {
  grid-column: 1 / -1; margin: 14px 0 0 !important; padding: 0 0 6px !important;
  font-family: Inter, sans-serif !important; font-size: 21px !important; font-weight: 700 !important;
  line-height: 1.3 !important; color: #006aac !important; border-bottom: 2px solid #006aac;
}
.oe-grille > .oe-intertitre:first-child { margin-top: 0 !important; }
/* texte de présentation sous le titre (référencement) : chapeau visible, suite dépliable */
.oe-seo { max-width: 980px; margin: 4px 0 26px; font-family: "DM Sans", sans-serif; font-size: 16px; line-height: 1.7; color: #3e3e3e; }
.oe-seo p { margin: 0 0 12px !important; }
.oe-seo .oe-seo-chapo { margin-bottom: 6px !important; font-size: 17px; color: #1f2937; }
.oe-seo h3 {
  margin: 18px 0 8px !important; padding: 0 !important; font-family: Inter, sans-serif !important; font-size: 19px !important;
  font-weight: 700 !important; line-height: 1.35 !important; color: #0f172a !important; text-transform: none !important;
}
.oe-seo ul { margin: 0 0 12px !important; padding: 0 0 0 1.2em !important; list-style: disc !important; }
.oe-seo li { margin: 0 0 4px !important; }
.oe-seo strong { color: #0f172a; }
.oe-seo a { color: #006aac !important; text-decoration: underline !important; text-underline-offset: 2px; }
.oe-seo a:hover { color: #f59426 !important; }
.oe-seo-plus > summary {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; list-style: none;
  font-weight: 600; color: #006aac; user-select: none;
}
.oe-seo-plus > summary::-webkit-details-marker { display: none; }
.oe-seo-plus > summary::after {
  content: ""; width: 7px; height: 7px; margin-top: -4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform .2s ease, margin .2s ease;
}
.oe-seo-plus[open] > summary::after { margin-top: 4px; transform: rotate(-135deg); }
.oe-seo-plus > summary:hover { color: #f59426; }
.oe-seo-plus > summary:focus-visible { outline: 2px solid #006aac; outline-offset: 2px; border-radius: 4px; }
.oe-seo-plus .oe-seo-fermer, .oe-seo-plus[open] .oe-seo-ouvrir { display: none; }
.oe-seo-plus[open] .oe-seo-fermer { display: inline; }
.oe-seo-suite { padding: 2px 0 4px; }
@media (prefers-reduced-motion: reduce) {
  .oe-seq-carte, .oe-seq-carte:hover { transition: none; transform: none; }
  .oe-seo-plus > summary::after { transition: none; }
}
