/* ==========================================================================
   Portfolio de Mathys Demon — feuille de style unique

   Sommaire
     1. Polices
     2. Variables
     3. Base
     4. Lien d'évitement
     5. En-tête et navigation
     6. Pied de page
     7. Bandeau de page
     8. Sections de texte
     9. Sections à image de fond fixe
    10. Page de contenu (politique, 404)
    11. Accueil
    12. À propos
    13. La DSI
    14. Pages de téléchargement (Mises en situations, Documents d'examen)

   Points de rupture (repris du thème d'origine, à conserver tels quels) :
     - 1200 px / 992 px : largeurs intermédiaires des pages de contenu
     - 1024 px / 1023.98 px : mise en page bureau / tablette des sections
     - 922 px / 921.99 px / 921 px : passage au menu mobile et réduction de la taille de base (91,2 %)
     - 768 px / 767.98 px / 767 px : mise en page tablette / mobile des sections
     - 544 px  : petits écrans
     Les paires séparées de 1 px (921 / 921.99, 767 / 767.98) sont voulues : elles
     reproduisent deux états intermédiaires distincts du thème d'origine.
   ========================================================================== */


/* 1. Polices
   ========================================================================== */

/* Seules ces graisses sont déclarées : le navigateur en déduit les autres
   (gras et italique synthétiques), exactement comme sur le site d'origine. */
@font-face {
  font-family: "Barlow Semi Condensed";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/barlow-semi-condensed-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/playfair-display-800.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/poppins-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/poppins-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* 2. Variables
   ========================================================================== */

:root {
  --color-red: #e5201f;          /* lien actif, survol du menu */
  --color-pink: #e82e8a;         /* survol des liens */
  --color-text: #000;
  --color-bg: #f6f8fa;           /* fond de page */
  --color-white: #fff;
  --color-orange: #eb621a;
  --color-border: #ddd;
  --color-border-light: #eaeaea;
  --font-body: Poppins, sans-serif;
  --font-heading: "Playfair Display", serif;
  --font-alt: "Barlow Semi Condensed", sans-serif;
}


/* 3. Base
   ========================================================================== */

html {
  box-sizing: border-box;
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  position: relative;
  margin: 0;
  overflow-x: hidden;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  /* em (et non un nombre) : la valeur calculée en px est héritée telle quelle */
  line-height: 1.65em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
p, ul, ol, li, figure {
  margin: 0;
  padding: 0;
}

h1, h2, h3 {
  color: var(--color-text);
  font-family: var(--font-heading);
  font-weight: 800;
}

h4, h5, h6 {
  color: var(--color-text);
  font-family: var(--font-alt);
  font-weight: 500;
}

h1 { font-size: 5.1875rem; line-height: 1.4em; }
h2 { font-size: 3.125rem; line-height: 1.3em; }
h3 { font-size: 2.1875rem; line-height: 1.3em; }
h4 { font-size: 1.375rem; line-height: 1.2em; }
h5 { font-size: 1.25rem; line-height: 1.2em; }
h6 { font-size: 1.0625rem; line-height: 1.25em; }

a {
  color: var(--color-text);
  text-decoration: none;
  transition: all 0.2s linear;
}

a:hover,
a:focus {
  color: var(--color-pink);
}

img {
  max-width: 100%;
  height: auto;
  border: 0;
  vertical-align: middle;
}

strong {
  font-weight: 700;
}

@media (max-width: 921px) {
  html { font-size: 91.2%; }
  h1 { font-size: 60px; }
  h2 { font-size: 43px; }
  h3 { font-size: 30px; }
}

@media (max-width: 544px) {
  h1 { font-size: 45px; }
  h2 { font-size: 35px; }
  h3 { font-size: 20px; }
}


/* 4. Lien d'évitement
   ========================================================================== */

.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  overflow-wrap: normal;
  word-break: normal;
}

/* Au focus clavier, le lien apparaît en haut à gauche de la page */
.skip-link:focus {
  top: 5px;
  left: 5px;
  z-index: 100000;
  display: block;
  width: auto;
  height: auto;
  padding: 15px 23px 14px;
  clip: auto;
  clip-path: none;
  border-radius: 2px;
  background-color: #ddd;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  color: #444;
  font-size: 1em;
  line-height: normal;
  outline: thin dotted;
}


/* 5. En-tête et navigation
   ========================================================================== */

.site-header {
  position: relative;
  z-index: 99;
}

.site-header__inner {
  display: grid;
  grid-template-columns: auto auto;
  align-content: center;
  align-items: center;
  column-gap: 20px;
  min-height: 30px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  overflow-wrap: anywhere;
}

/* Logo */
.site-logo {
  display: inline-flex;
  align-items: center;
  align-self: center;
  padding: 1em 0;
  line-height: 1;
  color: var(--color-text);
}

.site-logo__img {
  width: 70px;
  max-width: 70px;
  margin-right: 1em;
}

/* Bouton « Menu » (petits écrans) */
.menu-toggle {
  display: none;
}

/* Menu principal */
.main-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
}

.main-nav__list {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-self: center;
  margin: 0;
  padding: 0;
  list-style: none;
  text-transform: uppercase;
}

.main-nav__item {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 30px;
}

.main-nav__link {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 1em;
  color: var(--color-text);
  font-size: 0.875rem;
  transition: all 0.2s linear;
}

/* Survol : rose sur le lien lui-même (règle générale des liens) ;
   sur les pages à en-tête superposé, toute l'entrée passe en rouge. */
.main-nav__link[aria-current="page"],
.main-nav__item--current-parent > .main-nav__link,
.site-header--overlay .main-nav__item:hover > .main-nav__link,
.site-header--overlay .main-nav__item:focus-within > .main-nav__link {
  color: var(--color-red);
}

/* Flèche des entrées qui ont un sous-menu */
.main-nav__arrow {
  margin-right: -10px;
  padding-right: 10px;
}

.main-nav__arrow svg {
  position: relative;
  width: 0.6em;
  height: 0.6em;
  margin-left: 10px;
  fill: currentColor;
}

.main-nav__sub-toggle {
  display: none;
}

/* Sous-menus (bureau) : apparition au survol ou au focus clavier */
.main-nav__submenu {
  position: absolute;
  top: 100%;
  left: -999em;
  z-index: 99999;
  width: 240px;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--color-red);
  background-color: var(--color-white);
  box-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.1);
  line-height: 1.45;
  text-transform: uppercase;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-0.5em);
  transition: visibility 0.2s ease, transform 0.2s ease;
}

/* zone tampon de 7 px qui garde le sous-menu ouvert entre le lien et la liste */
.main-nav__submenu::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 7px;
  transform: translateY(-100%);
}

.main-nav__item:hover > .main-nav__submenu,
.main-nav__item:focus-within > .main-nav__submenu {
  left: 0;
  right: auto;
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.main-nav__submenu .main-nav__item {
  line-height: inherit;
}

.main-nav__submenu .main-nav__link {
  display: block;
  padding: 0.9em 1em;
  overflow-wrap: break-word;
}

.site-header--overlay .main-nav__submenu .main-nav__item:hover > .main-nav__link {
  color: var(--color-red);
}

/* petite flèche devant les entrées de sous-menu (visible sur mobile seulement) */
.main-nav__sub-arrow {
  display: none;
}

/* Soulignement animé des entrées principales au survol (grand écran) */
@media (min-width: 922px) {
  .main-nav__list > .main-nav__item > .main-nav__link::before {
    content: "";
    position: absolute;
    right: 50%;
    bottom: 0;
    width: 100%;
    height: 1px;
    background-color: transparent;
    transform: scale(0, 0) translate(-50%, 0);
    transition: transform 0.3s ease-in-out, color 0s ease-in-out;
  }

  .main-nav__list > .main-nav__item:hover > .main-nav__link::before {
    width: calc(100% - 1.2em);
    background-color: currentColor;
    transform: scale(1, 1) translate(50%, 0);
  }
}

/* En-tête superposé au bandeau (toutes les pages sauf la politique et la 404) ;
   sinon, barre blanche */
@media (min-width: 922px) {
  .site-header:not(.site-header--overlay) {
    background-color: var(--color-white);
  }

  .site-header--overlay {
    position: absolute;
    left: 0;
    right: 0;
  }
}

/* Petits écrans : menu déroulant sous la barre.
   Deux niveaux, comme le thème d'origine : jusqu'à 921.99 px (valeurs de base du menu mobile),
   puis jusqu'à 921 px (réglages fins). Entre les deux, seul le premier niveau s'applique. */
@media (max-width: 921.99px) {
  .site-header__inner {
    max-width: none;
    padding: 0;
    grid-template-areas:
      "logo toggle"
      "nav  nav";
  }

  /* fond blanc de la seule barre (1re ligne de la grille), comme sur le site d'origine */
  .site-header__inner::before {
    content: "";
    grid-area: 1 / 1 / 2 / -1;
    align-self: stretch;
    background-color: var(--color-white);
  }

  .site-logo {
    grid-area: logo;
    width: 100%;
  }

  .menu-toggle {
    grid-area: toggle;
    justify-self: end;
    display: flex;
    align-items: center;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0.5em;
    border: medium none var(--color-border);
    border-radius: 2px;
    background-color: transparent;
    box-shadow: none;
    color: var(--color-text);
    font: inherit;
    font-size: 1.5em;
    font-weight: 400;
    line-height: 1.85714285714286;
    letter-spacing: 2px;
    text-align: center;
    text-transform: uppercase;
    vertical-align: middle;
    cursor: pointer;
  }

  .menu-toggle:focus {
    border: thin dotted;
    border-color: inherit;
    outline: thin dotted;
  }

  .menu-toggle__icon {
    display: inline-flex;
    align-self: center;
  }

  .menu-toggle__icon svg {
    width: 20px;
    height: 20px;
    fill: var(--color-text);
  }

  .menu-toggle__close,
  .menu-toggle[aria-expanded="true"] .menu-toggle__open {
    display: none;
  }

  .menu-toggle[aria-expanded="true"] .menu-toggle__close {
    display: block;
  }

  .menu-toggle__label {
    display: flex;
    align-items: center;
    align-self: center;
    margin-left: 0.6rem; /* 0.4em de la taille du bouton (1.5rem) */
    font-size: 1rem;
    font-weight: 600;
  }

  .main-nav {
    grid-area: nav;
    display: none;
    background-color: var(--color-white);
    line-height: 3;
  }

  .main-nav.is-open {
    display: block;
  }

  .main-nav__list {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    background-color: #f9f9f9;
    text-align: left;
    text-transform: none;
  }

  .main-nav__item {
    width: 100%;
    line-height: inherit;
  }

  .main-nav__link,
  .main-nav__submenu .main-nav__link {
    display: inline-block;
    width: 100%;
    height: 100%;
    padding: 0 20px;
    border-bottom: 1px solid var(--color-border-light);
    font-size: inherit;
  }

  .main-nav__submenu .main-nav__link {
    padding-left: 30px;
  }

  .main-nav__arrow {
    display: none;
  }

  .main-nav__sub-toggle {
    position: absolute;
    top: 0;
    right: 20px;
    display: inline-block;
    margin: 0;
    padding: 0 0.907em;
    border: 0 dotted var(--color-border);
    border-radius: 2px;
    background-color: initial;
    color: var(--color-text);
    font: inherit;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
  }

  .main-nav__sub-toggle:hover,
  .main-nav__sub-toggle:focus {
    border-color: inherit;
  }

  .site-header--overlay .main-nav__sub-toggle:hover,
  .site-header--overlay .main-nav__sub-toggle:focus {
    color: var(--color-red);
  }

  .main-nav__sub-toggle:focus {
    outline: thin dotted;
  }

  .main-nav__sub-toggle svg {
    position: relative;
    width: 0.95em;
    height: 0.85em;
    margin-left: 10px;
    fill: currentColor;
    pointer-events: none;
  }

  .main-nav__submenu {
    position: static;
    display: none;
    width: auto;
    border-top: 0;
    background-color: #f9f9f9;
    box-shadow: none;
    line-height: 3;
    text-transform: none;
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: none;
  }

  .main-nav__item.is-open > .main-nav__submenu {
    display: block;
  }

  .main-nav__sub-arrow {
    display: inline;
    margin-right: 5px;
  }

  .main-nav__sub-arrow svg {
    position: relative;
    top: 0.2em;
    width: 0.65em;
    height: 0.85em;
    margin: 0;
    fill: currentColor;
    transform: translate(0, -2px) rotate(270deg);
  }
}

@media (max-width: 921px) {
  .site-header--overlay {
    position: absolute;
    left: 0;
    right: 0;
  }

  .site-header__inner {
    padding: 0 20px;
  }

  /* la barre blanche couvre aussi les marges intérieures */
  .site-header__inner::before {
    margin: 0 -20px;
  }

  .site-header--overlay .site-header__inner::before {
    background-color: transparent;
  }

  .main-nav {
    margin: 0 -20px;
  }

  .main-nav__list,
  .main-nav__submenu,
  .main-nav__link {
    background-color: var(--color-bg);
  }

  .site-header--overlay .main-nav__submenu .main-nav__link {
    background-color: transparent;
  }

  .main-nav__link,
  .main-nav__submenu .main-nav__link {
    padding: 15px 25px;
  }

  .main-nav__sub-toggle {
    top: 15px;
    right: calc(-0.907em + 25px);
  }

  .main-nav__list > .main-nav__item:hover > .main-nav__link,
  .main-nav__sub-toggle:hover,
  .main-nav__sub-toggle:focus {
    color: var(--color-red);
  }
}


/* Entrée active : sa flèche de sous-menu est rouge, comme le lien */
.site-header--overlay .main-nav__link[aria-current="page"] + .main-nav__sub-toggle,
.site-header--overlay .main-nav__item--current-parent > .main-nav__sub-toggle {
  color: var(--color-red);
}


/* 6. Pied de page
   ========================================================================== */

.site-footer {
  background-color: var(--color-white);
}

.site-footer__main {
  display: grid;
  align-content: center;
  width: 100%;
  padding: 140px 30px 130px;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: flex-start;
  column-gap: 50px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  overflow-wrap: anywhere;
}

.site-footer__block {
  text-align: center;
}

/* le bloc « Navigation » occupe la 3e colonne, la 2e reste vide */
.site-footer__block--nav {
  grid-column: 3;
}

.site-footer__title {
  margin-bottom: 1em;
  color: var(--color-text);
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 400;
  line-height: 1.5;
}

.site-footer__links,
.site-footer__links ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__links ul {
  margin-top: 0.25em;
}

.site-footer__links ul li {
  padding-left: 20px;
}

.site-footer__links a:hover {
  color: var(--color-pink);
}

.site-footer__bottom {
  display: grid;
  align-content: center;
  width: 100%;
  min-height: 30px;
  padding: 40px;
  border-top: 1px solid var(--color-bg);
}

.site-footer__bottom-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  column-gap: 50px;
  width: 100%;
  max-width: 1200px;
  min-height: 30px;
  margin: 0 auto;
  overflow-wrap: anywhere;
}

/* le copyright occupe la colonne centrale */
.site-footer__copyright {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
  text-align: right;
}

.site-footer__copyright p {
  width: 100%;
}

.site-footer__copyright span {
  font-size: 11pt;
}

@media (max-width: 921px) {
  .site-footer {
    padding: 0 25px;
  }

  .site-footer__main {
    padding: 50px 0 100px;
  }

  .site-footer__block {
    margin-bottom: 10px;
    text-align: left;
  }

  .site-footer__bottom {
    padding: 30px;
  }

  .site-footer__copyright {
    margin-bottom: 10px;
    text-align: center;
  }
}

@media (max-width: 544px) {
  .site-footer__main {
    padding: 75px 0 50px;
  }

  .site-footer__grid,
  .site-footer__bottom-grid {
    grid-template-columns: 1fr;
  }

  .site-footer__block {
    text-align: center;
  }

  /* espace laissé par la colonne vide d'origine */
  .site-footer__block:first-child {
    margin-bottom: 20px;
  }

  .site-footer__block--nav,
  .site-footer__copyright {
    grid-column: auto;
  }

  .site-footer__copyright {
    margin: 10px 0 20px;
  }
}


/* 7. Bandeau de page
   ========================================================================== */

/* Fond : couleur de page (::before) et forme bleue décorative à 30 % (::after) */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 60vh;
  padding: 0;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero::before {
  z-index: -1;
  background: var(--color-bg);
}

.hero::after {
  z-index: 1;
  background: url("../img/forme-bandeau.png") 100% 0 / auto no-repeat;
  opacity: 0.3;
}

@media (min-width: 1024px) {
  .hero--greta { min-height: 60.1vh; }
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
}

.hero__text {
  position: relative;
  z-index: 0;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 24px;
  width: 50%;
  max-width: 100%;
  padding: 100px 0 0;
}

.hero__rule {
  position: relative;
  z-index: 0;
  display: flex;
  justify-content: flex-start;
  width: 100%;
  padding: 5px;
}

.hero__rule::before {
  content: "";
  display: block;
  flex-shrink: 0;
  width: 50px;
  height: 2px;
  margin-right: auto;
  background-color: var(--color-text);
}

.hero__title {
  position: relative;
  z-index: 0;
  word-break: break-word;
  overflow-wrap: break-word;
}

.hero__media {
  position: relative;
  z-index: 0;
  display: block;
  width: 55%;
  max-width: 100%;
  padding: 150px 0;
}

.hero__figure {
  position: relative;
  z-index: 0;
  display: table;
  clear: both;
  max-width: 1200px;
  margin: -50px auto;
  text-align: center;
}

.hero__figure img {
  width: 385px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  vertical-align: bottom;
}

@media (min-width: 768px) and (max-width: 1023.98px) {
  .hero {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 24px;
    min-height: 11vh;
    padding: 0 25px;
  }

  .hero::after {
    background-size: 450px auto;
  }

  .hero__text {
    padding: 0;
  }

  .hero__media {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    width: 100%;
  }

  .hero__figure {
    margin: 0;
  }
}

@media (max-width: 767.98px) {
  .hero {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 24px;
    min-height: 0;
    padding: 0 20px 40px;
  }

  .hero::after {
    background-size: 360px auto;
  }

  .hero__inner {
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
  }

  .hero__text {
    width: 100%;
    padding: 25px 0 0;
  }

  .hero__media {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    width: 100%;
    padding: 120px 0 0;
  }

  .hero__figure {
    margin: 0;
  }
}

/* Variante « photo ronde » (CHV, La DSI, Mises en situations, Documents d'examen) */
.hero--round .hero__media {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  width: 50%;
  padding: 150px 0 0;
}

.hero--round .hero__figure {
  margin: 0 0 -75px;
}

.hero--round .hero__figure img {
  width: 570px;
  height: 570px;
  object-fit: cover;
  border-radius: 500px;
  -webkit-mask: url("../img/masque-cercle.svg") 50% 50% / cover no-repeat;
  mask: url("../img/masque-cercle.svg") 50% 50% / cover no-repeat;
}

@media (min-width: 768px) and (max-width: 1023.98px) {
  .hero--round .hero__media {
    width: 50%;
    padding: 150px 0 0;
  }

  .hero--round .hero__figure {
    margin: 0 0 -50px;
  }

  .hero--round .hero__figure img {
    width: 360px;
    height: 360px;
  }
}

@media (max-width: 767.98px) {
  .hero--round .hero__media {
    width: 100%;
    padding: 150px 0 0;
  }

  .hero--round .hero__figure {
    margin: 0;
  }

  .hero--round .hero__figure img {
    width: 360px;
    height: 360px;
  }
}

/* Seuil distinct du précédent (767 px et non 767.98 px), comme sur le site d'origine */
@media (max-width: 767px) {
  .hero__inner {
    flex-direction: column-reverse;
  }
}


/* 8. Sections de texte
   ========================================================================== */

/* Espacements verticaux sur grand écran : modificateurs --pt-* et --pb-* */
.section {
  position: relative;
  padding: 0;
}

.section__inner {
  position: relative;
  z-index: 0;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
}

.section__inner > * {
  position: relative;
  z-index: 0;
  word-break: break-word;
  overflow-wrap: break-word;
}

.section__text {
  margin-bottom: 20px;
}

@media (min-width: 1024px) {
  .section--pt-50 { padding-top: 50px; }
  .section--pt-100 { padding-top: 100px; }
  .section--pt-150 { padding-top: 150px; }
  .section--pb-50 { padding-bottom: 50px; }
  .section--pb-100 { padding-bottom: 100px; }
}

@media (min-width: 768px) and (max-width: 1023.98px) {
  .section {
    padding: 0 25px 100px;
  }

  .section__inner {
    gap: 0;
    max-width: 1024px;
  }
}

@media (max-width: 767.98px) {
  .section {
    padding: 65px 20px 50px;
  }

  .section__inner {
    gap: 0;
    max-width: 767px;
  }
}


/* 9. Sections à image de fond fixe
   ========================================================================== */

/* Image fixe au défilement, voilée par un dégradé noir (::before).
   Sur tablette, le thème d'origine affiche une photo par défaut (fond-etudiant.jpg) ;
   sur mobile, la section n'a pas de hauteur et disparaît. */
.parallax {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  min-height: 75vh;
  padding: 100px 0 0;
  background-repeat: no-repeat;
  background-position: 50% 50%;
  background-size: cover;
  background-attachment: fixed;
}

.parallax::before {
  content: "";
  position: absolute;
  inset: 0;
  display: block;
  background: linear-gradient(45deg, rgb(0, 0, 0) 0%, rgba(155, 81, 224, 0) 100%);
  pointer-events: none;
}

.parallax--accueil { background-image: url("../img/parallaxe-accueil.png"); }
.parallax--a-propos { background-image: url("../img/parallaxe-a-propos.jpg"); }
.parallax--greta { background-image: url("../img/parallaxe-greta.jpg"); }
.parallax--chv { background-image: url("../img/parallaxe-chv.jpg"); }

@media (min-width: 768px) and (max-width: 1023.98px) {
  .parallax {
    flex-wrap: nowrap;
    min-height: 85vh;
    padding: 80px 25px 0;
    background-image: url("../img/fond-etudiant.jpg");
  }
}

@media (max-width: 767.98px) {
  .parallax {
    flex-wrap: nowrap;
    min-height: 0;
    padding: 0 20px;
    background-image: url("../img/fond-etudiant.jpg");
    background-attachment: scroll;
  }
}

/* Accueil : hauteur fixe et voile clair en diagonale */
.parallax--accueil {
  display: block;
  height: 65vh;
  min-height: 0;
  padding: 0;
}

.parallax--accueil::before {
  background: linear-gradient(135deg, rgb(246, 248, 250) 0%, rgba(0, 0, 0, 0) 69%);
}

/* Accueil et À propos : la section n'existe pas sous 1024 px */
@media (max-width: 1023.98px) {
  .parallax--accueil,
  .parallax--a-propos {
    display: none;
  }
}


/* 10. Page de contenu (politique de confidentialité, page 404)
   ========================================================================== */

.page-content {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-content__main {
  width: 100%;
  margin: 4em 0;
}

.page-content__article {
  padding: 5.34em 6.67em;
  background-color: var(--color-white);
}

.page-content__header {
  margin-bottom: 1.5em;
  overflow-wrap: break-word;
  text-align: left;
}

.page-content__title {
  margin-bottom: 0.2em;
  font-size: 1.625rem;
  font-weight: normal;
  line-height: 1.2;
}

.prose {
  overflow-wrap: break-word;
}

.prose > * {
  max-width: 1200px;
  margin-right: auto;
  margin-left: auto;
}

.prose p {
  margin-bottom: 1.6em;
}

.prose h2 {
  margin-bottom: 20px;
}

.prose ul {
  margin-bottom: 1.5em;
  list-style: disc;
}

.prose > :last-child {
  margin-bottom: 0;
}

@media (min-width: 922px) {
  .page-content {
    display: flex;
  }
}

@media (max-width: 1200px) {
  .page-content__article {
    padding: 3.34em 2.4em;
  }
}

@media (max-width: 921px) {
  .page-content {
    max-width: 100%;
  }

  .page-content__article {
    padding: 1.5em 2.14em;
  }
}

@media (max-width: 768px) {
  .page-content__header {
    margin-bottom: 1em;
  }
}

@media (max-width: 544px) {
  .page-content {
    padding: 0 0.54em;
  }

  .page-content__article {
    padding: 1.5em 1em;
  }
}

/* Page 404 */
.page-content__article--404 {
  text-align: center;
}

.error-header {
  margin-bottom: 1.5em;
}

.error-title {
  margin-bottom: 0;
  font-weight: 400;
}

@media (max-width: 992px) {
  .page-content--404 .page-content__main {
    margin: 0 0 4em;
    padding: 4em 0;
  }
}

@media (max-width: 921.99px) {
  .page-content--404 .page-content__main {
    margin: 0;
  }
}

@media (max-width: 921px) {
  .page-content--404 .page-content__main {
    padding: 1.5em 0;
  }

  /* contrairement à la politique, la 404 garde les marges intérieures de la tablette */
  .page-content__article--404 {
    padding: 3.34em 2.4em;
  }
}

@media (max-width: 768px) {
  .page-content__article--404 {
    padding: 1.5em 2.14em;
  }
}

@media (max-width: 544px) {
  .page-content__article--404 {
    padding: 1.5em 1em;
  }
}


/* 11. Accueil
   ========================================================================== */

/* Bandeau d'accueil : variante pleine hauteur de .hero, avec texte à gauche
   (salutation, nom, sous-titre, coordonnées) et portrait détouré à droite */
.hero--home {
  min-height: 100vh;
}

/* fond à 30 % d'opacité comme l'original (l'arrondi du mélange change la teinte d'un niveau) */
.hero--home::before {
  opacity: 0.3;
}

.hero--home .hero__inner {
  justify-content: center;
  gap: 0;
  max-width: 1461px;
  padding: 10px 0;
}

.hero--home .hero__text {
  gap: 0;
  width: 45%;
  padding: 0;
}

.hero__greeting {
  margin-bottom: 10px;
}

.hero--home .hero__rule {
  padding: 0;
}

.hero--home .hero__title {
  margin: 60px 0 10px;
}

.hero__subtitle {
  margin-bottom: 90px;
}

.hero--home .hero__figure img {
  aspect-ratio: 0.7219846022241232;
  object-fit: cover;
  -webkit-mask: url("../img/masque-arrondi.svg") 50% 50% / cover no-repeat;
  mask: url("../img/masque-arrondi.svg") 50% 50% / cover no-repeat;
}

@media (min-width: 768px) and (max-width: 1023.98px) {
  .hero--home {
    display: block;
    min-height: 80vh;
  }

  .hero--home .hero__inner {
    max-width: 1024px;
    padding: 0;
  }

  .hero--home .hero__text {
    width: 100%;
  }
}

@media (max-width: 767.98px) {
  .hero--home {
    display: block;
    min-height: 80vh;
    padding: 0 20px 60px;
  }

  .hero--home .hero__inner {
    align-items: center;
    max-width: 767px;
    padding: 0;
  }

  .hero--home .hero__text {
    width: 100%;
    padding: 25px 0 0;
  }

  .hero--home .hero__title {
    margin-top: 30px;
  }

  .hero__subtitle {
    margin-bottom: 40px;
  }
}

/* Coordonnées (e-mail, téléphone) avec icône rouge */
.contact-list {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 18px;
  list-style: none;
  font-weight: 100;
  line-height: 1em;
}

.contact-list__item {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  gap: 15px;
}

.contact-list__icon {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 24px;
  color: var(--color-red);
}

.contact-list__icon svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
}

.contact-list__text {
  font-size: 20px;
  line-height: 1;
}

@media (max-width: 1023.98px) {
  .contact-list {
    font-size: 20px;
  }
}

@media (max-width: 767.98px) {
  .contact-list {
    gap: 15px;
  }
}

/* Mots colorés dans les titres */
.highlight {
  background-color: transparent;
  text-decoration: none;
}

.highlight--orange { color: var(--color-orange); }
.highlight--red { color: var(--color-red); }

/* Sections de l'accueil : contenu aligné en bas, centré sur mobile */
.section--home .section__inner {
  justify-content: flex-end;
}

.section__inner--gap-24 {
  gap: 24px;
}

@media (min-width: 768px) and (max-width: 1023.98px) {
  .section--home .section__inner {
    gap: 20px;
  }

  .section--home .section__inner--gap-24 {
    gap: 24px;
  }

  .section--tight-top { padding: 0 25px 50px; }
  .section--tight-bottom { padding: 50px 25px 0; }
}

@media (max-width: 767.98px) {
  .section--home .section__inner {
    align-items: center;
    gap: 20px;
  }

  .section--home .section__inner--gap-24 {
    gap: 24px;
  }

  .section--tight-top { padding: 0 20px 65px; }
  .section--tight-bottom { padding: 75px 20px 0; }
}

/* Ligne « texte + flèche » menant vers une autre page */
.link-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 24px;
}

.link-row__text {
  flex: 1 1 0;
  min-width: 0;
  margin-bottom: 20px;
  overflow-wrap: break-word;
  word-break: break-word;
}

.link-row__aside {
  flex: 0 1 15%;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.link-row__arrow {
  display: table;
  float: right;
  margin: 0 0 0 2em;
}

.link-row__arrow img {
  width: 116px;
  height: 46px;
  object-fit: fill;
  vertical-align: bottom;
}

/* marge du titre + marge de colonne du thème d'origine sous 544 px */
@media (max-width: 544px) {
  .link-row__text {
    margin-bottom: 40px;
  }
}

@media (max-width: 767.98px) {
  .link-row__arrow img {
    width: 48px;
    height: 24px;
  }
}


/* 12. À propos
   ========================================================================== */

/* Bandeau : photo ronde placée directement dans la rangée (sans colonne
   .hero__media), avec de grandes marges verticales sur grand écran */
.hero--a-propos .hero__figure {
  margin: 150px 0;
}

@media (min-width: 768px) and (max-width: 1023.98px) {
  .hero--a-propos .hero__figure {
    margin: 0 0 -50px;
  }
}

@media (max-width: 767.98px) {
  .hero--a-propos .hero__figure {
    margin: 0;
  }
}

/* Curriculum vitae : deux cartes-liens côte à côte */
.section__inner--cv {
  display: block;
  padding: 0 10%;
}

.cv-list {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto 20px;
}

.cv-card {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: 100%;
  padding: 20px;
}

.cv-card__title {
  text-align: center;
}

.cv-card__figure img {
  object-fit: fill;
  vertical-align: bottom;
}

@media (min-width: 768px) and (max-width: 1023.98px) {
  .section__inner--cv {
    padding: 0 25px 50px;
  }
}

@media (max-width: 767.98px) {
  .section__inner--cv {
    padding: 0 20px 65px;
  }
}

/* Compétences et expériences, côte à côte */
.profile {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 24px;
  width: 1140px;
  max-width: 100%;
  margin: 0 auto;
}

.skills {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 20px;
  width: 50%;
  max-width: 100%;
  padding-right: 100px;
}

.skills__title {
  padding-bottom: 20px;
}

.timeline {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: flex-start;
  gap: 0;
  width: 50%;
  max-width: 100%;
}

.timeline__title {
  padding-bottom: 40px;
}

@media (min-width: 768px) and (max-width: 1023.98px) {
  .section--profile {
    padding: 100px 25px 35px;
  }

  .skills {
    gap: 0;
    padding-right: 50px;
  }

  .skills__title {
    padding-bottom: 40px;
  }
}

@media (max-width: 767.98px) {
  .section--profile {
    padding: 75px 25px 0;
  }

  .profile {
    flex-direction: column;
    gap: 45px;
  }

  .skills {
    gap: 15px;
    width: 100%;
    padding-right: 0;
  }

  .skills__title {
    padding-bottom: 25px;
  }

  .timeline {
    width: 100%;
  }
}

/* Barre de progression animée (voir assets/js/main.js, section 2) */
.skill {
  position: relative;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: stretch;
  gap: 10px;
  color: var(--color-white);
}

.skill__name {
  color: var(--color-text);
}

.skill__name a {
  color: inherit;
}

.skill__bar {
  display: block;
  width: auto;
  min-width: 200px;
}

.skill__track {
  position: relative;
  width: 100%;
  height: 20px;
  overflow: hidden;
  background-color: #e6e6e6;
}

.skill__fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  min-width: 0;
  height: 100%;
  background-color: var(--color-red);
}

.skill__label {
  position: absolute;
  top: 50%;
  right: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  pointer-events: none;
  transform: translateY(-50%);
}

/* Parcours chronologique : date et lieu à gauche, poste et description à droite.
   Chaque ligne garde les espacements propres de l'original (--1 à --4). */
.timeline__item {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
  max-width: 100%;
}

.timeline__meta,
.timeline__body {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  max-width: 100%;
}

.timeline__body {
  gap: 30px;
}

.timeline__role {
  color: var(--color-red);
}

.timeline__item--1 { padding-bottom: 60px; }
.timeline__item--3 { padding: 60px 0; }

.timeline__item--3,
.timeline__item--4 {
  gap: 24px;
}

.timeline__item--3 .timeline__date,
.timeline__item--4 .timeline__date {
  margin-bottom: 10px;
}

@media (min-width: 768px) and (max-width: 1023.98px) {
  .timeline__item {
    padding: 0 0 40px;
  }

  .timeline__item--1 {
    gap: 0;
  }

  .timeline__body {
    gap: 10px;
  }

  .timeline__item--3 .timeline__date,
  .timeline__item--4 .timeline__date {
    margin-bottom: 0;
  }
}

@media (max-width: 767.98px) {
  .timeline__item {
    flex-direction: column;
    align-items: center;
    padding: 0 0 40px;
  }

  .timeline__item--3,
  .timeline__item--4 {
    padding-bottom: 65px;
  }

  .timeline__body {
    gap: 10px;
  }

  .timeline__item--3 .timeline__meta,
  .timeline__item--4 .timeline__meta,
  .timeline__item--3 .timeline__body,
  .timeline__item--4 .timeline__body {
    gap: 0;
  }
}


/* 13. La DSI : cartes « missions » (icône + titre + texte) et organigramme
   ========================================================================== */

/* Rangée de trois cartes */
.missions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: flex-start;
  gap: 0;
  width: 100%;
}

/* 1re rangée : cartes de même hauteur */
.missions--stretch {
  align-items: stretch;
}

.mission {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  width: 33%;
  padding: 35px 90px 35px 20px;
  border-right: 1px solid #08408812;
}

.mission__inner {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 0;
  width: 100%;
}

.mission__icon {
  display: flex;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  margin-right: 20px;
  color: var(--color-red);
}

.mission__icon svg {
  width: 25px;
  height: 25px;
  fill: currentColor;
}

.mission__body {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
}

/* titre de carte : niveau h3 dans le plan, aspect d'un h4 */
.mission__title {
  font-family: var(--font-alt);
  font-size: 1.375rem;
  font-weight: 500;
  line-height: 1.2em;
}

/* Réglages propres à certaines cartes (irrégularités de l'original) */
@media (min-width: 1024px) {
  .mission--flush {
    padding-left: 0;
  }

  .mission--spaced .mission__inner {
    gap: 24px;
  }
}

@media (min-width: 768px) and (max-width: 1023.98px) {
  .mission {
    padding: 20px;
  }

  .mission--center-tablet {
    justify-content: center;
  }

  .mission--small-icon .mission__icon {
    margin-right: 10px;
  }
}

@media (max-width: 767.98px) {
  .missions {
    flex-direction: column;
    align-items: center;
  }

  .mission {
    justify-content: center;
    width: 100%;
    padding: 35px 0;
    border-right: 0;
    border-bottom: 1px solid #08408812;
  }

  .mission--pad-top {
    padding-top: 45px;
  }

  .missions:last-child .mission:last-child {
    border-bottom: 0;
  }

  .mission__inner {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .mission--no-icon-margin-mobile .mission__icon {
    margin-right: 0;
  }

  .mission__body {
    align-items: center;
  }

  .mission__body p {
    text-align: center;
  }
}

/* Organigramme */
.dsi-chart img {
  vertical-align: bottom;
}


/* 14. Pages de téléchargement (Mises en situations, Documents d'examen)
   ========================================================================== */

/* Contenu en flux normal : les marges verticales se fondent, comme sur l'original */
.downloads > * {
  max-width: 1140px;
  margin-right: auto;
  margin-left: auto;
  word-break: break-word;
  overflow-wrap: break-word;
}

.downloads > * + * {
  margin-top: 20px;
}

.downloads__heading {
  font-size: 36px;
  line-height: 1.3em;
}

.downloads__heading--spaced {
  margin-top: 100px;
}

/* marge intérieure (et non extérieure) : elle ne se fond pas avec la suivante */
.downloads__intro {
  padding-bottom: 20px;
}

.downloads__group {
  margin-bottom: 20px;
  font-family: var(--font-alt);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.2em;
}

.downloads__block {
  margin-top: 0;
}

.downloads__block > * {
  max-width: 1140px;
  margin-right: auto;
  margin-left: auto;
}

.downloads__block--grid {
  padding: 0 2.5% 100px;
}

.downloads__block--rows {
  padding: 0 10%;
}

@media (min-width: 1024px) {
  .downloads__block--spaced {
    margin-bottom: 100px;
  }

  .downloads__block--rows > * {
    max-width: none;
  }
}

@media (min-width: 768px) and (max-width: 1023.98px) {
  .downloads > *,
  .downloads__block > * {
    max-width: 1024px;
  }

  .downloads__block {
    padding: 0 25px 50px;
  }
}

@media (max-width: 767.98px) {
  .downloads > *,
  .downloads__block > * {
    max-width: 767px;
  }

  .downloads__block {
    padding: 0 20px 65px;
  }
}

/* Grille de cartes (Mises en situations) */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(12rem, 100%), 1fr));
  gap: 24px;
  container-type: inline-size;
}

/* Rangée de cartes (Documents d'examen) */
.download-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 24px;
}

.download-row--center {
  justify-content: center;
}

.download-row--spaced {
  padding-top: 50px;
}

/* carte seule : même largeur que dans une rangée de deux */
.download-row--half > .download {
  width: calc(50% - 12px);
}

/* Carte-lien : titre puis logo */
.download {
  position: relative;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: 100%;
  padding: 10px;
}

.download--roomy {
  padding: 20px;
}

/* variante d'origine en ligne avec retour à la ligne (le titre et le logo
   occupent chacun une ligne étirée) */
.download--wrap {
  flex-direction: row;
  flex-wrap: wrap;
  font-size: 0;
}

.download__title {
  font-family: var(--font-alt);
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.2em;
  text-align: center;
}

/* 20 px fixes : non réduits sous 921 px */
.download__title--fixed {
  font-size: 20px;
}

.download__figure img {
  vertical-align: bottom;
}

.download__figure--rounded img {
  border-radius: 9999px;
}
