/* Adapte les grilles, sections et composants aux largeurs d'ecran intermediaires et mobiles. */
@media (max-width: 1024px) {
  .df-card-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  .df-card {
    grid-column: span 6;
  }

  .df-card--featured {
    grid-column: 1 / -1;
  }

  .df-card--featured .df-card__link {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.86fr);
  }

  .df-gallery,
  .df-gallery--skills,
  .df-gallery--news {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .df-hero--contact .df-hero__content {
    grid-template-columns: 1fr;
  }

  .df-article-hero,
  .df-article-layout,
  .df-mentions__hero,
  .df-mentions__layout {
    grid-template-columns: 1fr;
  }

  .df-article-hero {
    min-height: auto;
  }

  .df-article-hero__visual {
    width: min(520px, 100%);
  }

  .df-article-page .df-article__featured-image,
  .df-article-hero__placeholder {
    aspect-ratio: 16 / 11;
  }

  .df-article-sidebar {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    align-items: center;
    padding: 0;
  }

  .df-mentions__aside {
    position: static;
  }

  .df-mentions__aside-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .df-mentions__aside-list div {
    padding-top: 0;
    padding-left: 1rem;
    border-top: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.09);
  }

  .df-mentions__aside-list div:first-child {
    padding-left: 0;
    border-left: 0;
  }

  .df-article-sidebar__label,
  .df-article-sidebar__value,
  .df-mentions__aside-label {
    margin: 0;
  }

  .df-article-sidebar__label {
    width: 100%;
  }
}

@media (max-width: 768px) {
  :root {
    --container: min(100vw - 1rem, 640px);
  }

  .df-nav--glass {
    padding: 0.5rem 0;
  }

  .df-nav__inner {
    gap: 0.65rem;
    min-height: 42px;
  }

  .df-brand__text {
    display: none;
  }

  .df-brand {
    min-height: 42px;
  }

  .df-brand__mark {
    width: 42px;
    height: 42px;
  }

  .df-nav__toggle {
    min-height: 40px;
    padding: 0.48rem 0.76rem;
    font-size: 0.76rem;
  }

  .df-nav__menu {
    left: 0;
    grid-template-columns: 1fr;
    width: 100%;
    padding: 0.55rem;
  }

  .df-nav__link {
    min-height: 42px;
    padding: 0.72rem 0.82rem;
    font-size: 0.76rem;
  }

  .df-nav__submenu {
    position: fixed;
    inset-inline: 0.5rem;
    top: 4.2rem;
    min-width: 0;
  }

  .df-hero {
    min-height: auto;
    padding-block: 3rem;
  }

  .df-hero--home {
    height: clamp(620px, 86svh, 760px);
    min-height: clamp(620px, 86svh, 760px);
    margin-bottom: 0;
  }

  .df-hero--home .df-hero__content {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 1.5rem;
  }

  .df-page-title--home {
    max-width: 10ch;
    font-size: 4.7rem;
    line-height: 1;
  }

  .df-home-hero__signature {
    justify-self: start;
    width: clamp(132px, 34vw, 180px);
  }

  .df-home-hero__tags a {
    min-height: 34px;
    padding: 0.42rem 0.62rem;
    font-size: 0.68rem;
  }

  .df-hero__logo-frame {
    height: 25%;
    min-height: 96px;
    max-height: 150px;
  }

  .df-hero:not(.df-hero--home)::before {
    right: -9rem;
    bottom: auto;
    top: 5rem;
    width: min(520px, 92vw);
    opacity: 0.065;
  }

  .df-hero__card,
  .df-panel {
    border-radius: var(--radius-md);
  }

  .df-home__header {
    display: grid;
    align-items: start;
  }

  .df-gallery,
  .df-gallery--skills,
  .df-gallery--news,
  .df-form--contact {
    grid-template-columns: 1fr;
  }

  .df-home__header,
  .df-card-grid {
    grid-template-columns: 1fr;
  }

  .df-card,
  .df-card--featured {
    grid-column: auto;
    min-height: auto;
  }

  .df-card__link {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .df-card--competences .df-card__link,
  .df-card--formation .df-card__link,
  .df-card--experience .df-card__link {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .df-card--featured {
    grid-column: auto;
  }

  .df-card--featured .df-card__link {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .df-card__media {
    width: 100%;
    height: auto;
    aspect-ratio: 1.35;
    min-height: 0;
  }

  .df-card__body::before {
    margin-bottom: 1.1rem;
  }

  .df-banner img {
    height: 170px;
  }

  .df-footer-nav {
    justify-content: flex-start;
  }

  .df-footer__inner {
    display: grid;
    justify-items: start;
    grid-template-columns: 1fr;
  }

  .df-footer__brand {
    justify-self: start;
  }

  .df-article-page {
    padding-top: 2rem;
  }

  .df-article-hero {
    gap: 1.2rem;
  }

  .df-article-hero__title {
    font-size: 3.4rem;
    line-height: 1.12;
    overflow-wrap: anywhere;
    text-wrap: balance;
  }

  .df-article-hero__meta time,
  .df-article-hero__meta span {
    min-height: 30px;
    font-size: 0.68rem;
  }

  .df-article-content {
    padding: 1rem;
    border-radius: var(--radius-md);
  }

  .df-mentions {
    padding-top: 1rem;
  }

  .df-mentions__hero {
    gap: 1rem;
    padding-bottom: 1rem;
  }

  .df-mentions__hero {
    min-height: 270px;
    border-radius: var(--radius-md);
    background:
      linear-gradient(180deg, rgba(4, 0, 3, 0.28) 0%, rgba(4, 0, 3, 0.9) 74%),
      var(--mentions-bg) center / cover no-repeat,
      rgba(255, 255, 255, 0.05);
  }

  .df-mentions__title {
    font-size: 2.8rem;
    line-height: 1.12;
  }

  .df-mentions__card {
    padding: 0.9rem;
    border-radius: var(--radius-md);
  }

  .df-mentions__aside-list {
    grid-template-columns: 1fr;
  }

  .df-mentions__aside-list div {
    padding-top: 0.85rem;
    padding-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    border-left: 0;
  }

  .df-mentions__aside-list div:first-child {
    padding-top: 0;
    border-top: 0;
  }

  .df-legal-section {
    border-radius: var(--radius-sm);
  }

  .df-article-page .df-article {
    line-height: 1.78;
  }

  .df-news-teaser {
    grid-template-columns: 1fr;
  }

  .df-formation-article,
  .df-split-article {
    grid-template-columns: 1fr;
  }

  .df-news-teaser .df-teaser__media img {
    width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: 16 / 9;
  }

  .df-formation-article__media,
  .df-split-article__media {
    min-height: 0;
  }

  .df-formation-article__image,
  .df-split-article__image {
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 480px) {
  :root {
    --container: min(100vw - 0.75rem, 420px);
  }

  .df-nav__inner {
    gap: 0.42rem;
  }

  .df-brand__mark {
    width: 38px;
    height: 38px;
  }

  .df-nav__menu {
    padding: 0.45rem;
  }

  .df-nav__link {
    min-height: 40px;
    padding: 0.66rem 0.72rem;
    font-size: 0.72rem;
  }

  .df-page-title {
    font-size: 2.7rem;
    line-height: 1.12;
  }

  .df-page-title--home {
    font-size: 3.5rem;
  }

  .df-entry::before {
    right: -10rem;
    width: 520px;
    opacity: 0.055;
  }

  .df-hero__subtitle {
    width: 100%;
    max-width: 100%;
    border-radius: var(--radius-sm);
  }

  .df-panel,
  .df-article-content {
    padding-inline: 0.9rem;
  }

  .df-article-hero__title {
    font-size: 2.65rem;
  }
}
