/*
 * Moule industriel — dossier administratif bleu, version 1.
 * Référence graphique : le dossier « L’œuvre en bref ».
 */

:where(details.guichet-bo, details.presentation-admin-ensemble, .pg-officiel, .ce-sujet-officiel, .note-source-officielle) {
  position: relative;
  box-sizing: border-box;
  overflow: visible !important;
  margin-top: 2.7rem !important;
  margin-bottom: 2.15rem !important;
  border: 2px solid #7892ae !important;
  border-top: 7px solid #174d88 !important;
  background: #fff !important;
  box-shadow: 5px 6px 0 rgba(23, 77, 136, .10) !important;
}

:where(details.guichet-bo, details.presentation-admin-ensemble, .pg-officiel, .ce-sujet-officiel, .note-source-officielle)::before {
  content: "DOSSIER ADMINISTRATIF";
  position: absolute;
  left: 18px;
  top: -25px;
  z-index: 3;
  min-width: 112px;
  padding: 5px 9px 6px;
  border: 2px solid #7892ae;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #dfe8ef;
  color: #174d88;
  font: 900 .46rem/1 Lato, Inter, system-ui, sans-serif;
  letter-spacing: .11em;
  text-align: center;
  white-space: nowrap;
}

details.guichet-bo::after {
  content: "PIÈCE OFFICIELLE";
}

details.presentation-admin-ensemble::after {
  content: "PRÉSENTATION INSTITUTIONNELLE";
}

.pg-officiel::after {
  content: "PROGRAMME NATIONAL";
}

.ce-sujet-officiel::after {
  content: "SUJET OFFICIEL";
}

.note-source-officielle::after {
  content: "SOURCE OFFICIELLE";
}

:where(details.guichet-bo, details.presentation-admin-ensemble, .pg-officiel, .ce-sujet-officiel, .note-source-officielle)::after {
  position: absolute;
  left: 158px;
  top: -25px;
  z-index: 3;
  padding: 4px 12px 5px;
  border: 2px solid #7892ae;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #edf3f8;
  color: #174d88;
  font: 900 .72rem/1 Lato, Inter, system-ui, sans-serif;
  letter-spacing: .075em;
  white-space: nowrap;
}

:where(details.guichet-bo, details.presentation-admin-ensemble) > summary {
  box-sizing: border-box;
  min-height: 68px;
  padding: .9rem 1.1rem !important;
  background: linear-gradient(90deg, #dfe8ef, #eef4f8) !important;
  color: #173f6b !important;
  font-size: 1.04rem !important;
  font-weight: 850 !important;
  line-height: 1.28 !important;
}

:where(details.guichet-bo, details.presentation-admin-ensemble)[open] > summary {
  border-bottom: 3px solid #174d88 !important;
  background: linear-gradient(90deg, #cbdbea, #edf3f8) !important;
}

:where(.pg-officiel, .ce-sujet-officiel, .note-source-officielle) {
  display: block;
  padding: 1.25rem 1.35rem 1.45rem !important;
  border-left-width: 10px !important;
  background: repeating-linear-gradient(0deg, #fff 0 31px, #e5ecf3 31px 32px) !important;
}

/* La page de référence garde ses treize chemises internes et son grand tiroir. */
details.presentation-admin-ensemble > .presentation-admin-maitre-corps-restaure {
  width: 100% !important;
  max-width: 100% !important;
  margin-right: 0 !important;
}

@media (max-width: 760px) {
  :where(details.guichet-bo, details.presentation-admin-ensemble, .pg-officiel, .ce-sujet-officiel, .note-source-officielle)::after {
    max-width: calc(100% - 180px);
    font-size: .66rem;
    white-space: normal;
  }
}

/*
 * Loi intérieure du dossier : aucun code couleur concurrent.
 * Le corps est noir ; seuls les titres et les traits sont bleus.
 */
:where(details.guichet-bo, details.presentation-admin-ensemble, .pg-officiel, .ce-sujet-officiel, .note-source-officielle)
  :where(p, li, dd, dt, blockquote, table, tr, td, th, strong, em, cite, span, a) {
  color: #151515 !important;
}

:where(details.guichet-bo, details.presentation-admin-ensemble, .pg-officiel, .ce-sujet-officiel, .note-source-officielle)
  :where(h1, h2, h3, h4, h5, h6, summary, .admin-titre) {
  color: #174d88 !important;
}

:where(details.guichet-bo, details.presentation-admin-ensemble)
  :where(.guichet-bo__corps, .guichet-bo__case, .guichet-bo__case--professeur, .presentation-admin-card, .admin-corps, [data-contenu-officiel="true"]) {
  border-color: #174d88 !important;
  background-color: #fff !important;
  color: #151515 !important;
}

:where(details.guichet-bo, details.presentation-admin-ensemble)
  :where(.guichet-bo__case, .presentation-admin-card, .admin-corps) {
  background-image: none !important;
}
