/* Responsive : toutes les adaptations tablette et mobile du portfolio. */

/* Styles adaptés déplacés depuis style.css (ancienne feuille commune). */

@media (min-width: 768px) and (max-width: 1279px) {
  .blast-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .blast-card .video-thumb img { height: 190px; }
  .blast-card .video-content h2 { font-size: 22px; }
}

@media (max-width: 767px) {
  .blast-videos { padding-bottom: 36px; }
  .blast-videos .container { width: calc(100% - 40px); }
  .blast-grid { grid-template-columns: 1fr; gap: 20px; }
  .blast-card .video-thumb img { height: 180px; }
  .blast-card .video-content h2 { font-size: 16px; }
  .video-section-title { font-size: 20px; }
}

@media (max-width: 767px) {
      .portfolio-contact-page {
        padding: 45px 0 70px;
      }

      .portfolio-contact-content h1 {
        font-size: 22px;
      }

      .portfolio-contact-intro {
        font-size: 13px;
      }

      .portfolio-contact-card {
        padding: 22px;
      }
    }

#burger {
  display: none;
}

@media (max-width: 767px) {

/* ---------------------------------------------------------------
   HERO
--------------------------------------------------------------- */
.hero {
  padding-top: 28px;
  padding-bottom: 48px;
}

.hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.hero-photo {
  order: 1;
  position: relative;
  width: 220px;
  height: 260px;
  margin: 0 auto;
}

.hero-photo img:first-child {
  position: absolute;
  width: 150px;
  height: auto;
  left: -56px;
  top: -12px;
  z-index: 1;
  opacity: .85;
  border-radius: 0;
  box-shadow: none;
}

.hero-photo img:last-child {
  position: relative;
  width: 220px;
  height: 260px;
  object-fit: cover;
  border-radius: 18px;
  z-index: 2;
  box-shadow: 0 18px 40px rgba(13, 34, 77, .12);
}

.hero-content {
  order: 2;
  width: 100%;
  text-align: center;
  font-size: 14px;
}

.hero-content h1 {
  font-size: 26px;
  line-height: 1.05;
  margin: 0 0 4px;
  text-align: center;
}

.hero-content p:not(.subtitle):not(.lead) {
  font-size: 14px;
  line-height: 1.65;
}


.hero-content .subtitle {
  margin: 4px 0 8px;
  font-size: 14px;
  line-height: 1.3;
  text-align: center;
}

.hero-content hr {
  width: 44px;
  margin: 6px auto 10px;
}



.hero-visual {
  display: none;
}



#burger {
  width: 44px;
  height: 44px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;

  background: none;
  border: 0;
}

#burger span {
  width: 24px;
  height: 3px;
  background: var(--ink);
  border-radius: 3px;
}

.site-header #mobile-menu {
  display: none;
}

.site-header #mobile-menu.open {
  display: flex;
  position: absolute;
  top: calc(100% + 14px);
  left: 24px;
  right: 24px;
  max-height: 70vh;
  overflow-y: auto;
  overflow-y: auto;

  flex-direction: column;
  gap: 0;
  padding: 0;

background:
  linear-gradient(
    rgba(255,252,247,.92),
    rgba(255,252,247,.25)
  ),
  url("../img/photos/aquarelle-points-nav-burger.png") no-repeat center,
  #FFFCF7;

  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(13,34,77,.14);
  z-index: 100;
}

.site-header #mobile-menu a {
  position: relative;
  padding: 22px 32px;
  color: var(--ink);
  font-family: "Libre Baskerville", serif;
  font-size: 18px;
  line-height: 1.2;
  border-bottom: 1px solid var(--border);
}

.site-header #mobile-menu a.active {
  background: var(--paper-dark);
  padding-left: 64px;
}

.site-header #mobile-menu a.active::before {
  content: "";
  position: absolute;
  left: 32px;
  top: 28px;
  bottom: 28px;
  width: 3px;
  background: var(--accent);
}


.site-header #mobile-menu a:last-child {
  border-bottom: none;
}

#burger.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

#burger.open span:nth-child(2) {
  opacity: 0;
}

#burger.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

#burger span {
  transition: transform .2s ease, opacity .2s ease;
}

/* ---------------------------------------------------------------
   CARDS MOBILE
--------------------------------------------------------------- */

.cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 24px;
}

.card {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
}

.card img {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  object-fit: cover;
}

.card div {
  flex: 1;
  min-width: 0;
}

.works h2 {
  font-size: 24px;
  line-height: 1.1;
  margin-bottom: 20px;
}

/* Titres des cartes */

.card h3 {
  font-size: 18px;
  line-height: 1.2;
  margin: 0 0 8px;
}

/* Texte des cartes */

.card p {
  font-size: 12px;
  line-height: 1.45;
  margin: 0 0 10px;
}

/* Liens */

.card a {
  font-size: 13px;
}

/* ---------------------------------------------------------------
   PAGE PRESSE MOBILE
--------------------------------------------------------------- */

.press-hero {
  padding: 32px 0 28px;
}

.press-hero .container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.press-intro {
  text-align: left;
}

.press-intro h1 {
  font-size: 34px;
  line-height: 1.08;
}

.press-intro hr {
  width: 44px;
  margin: 14px 0 18px;
}

.press-intro p {
  font-size: 15px;
  line-height: 1.6;
}

.press-aside {
  display: none;
}

/* Articles */

.articles {
  padding: 0 0 48px;
}

.articles .container {
  width: calc(100% - 40px);
}

.article-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;

  padding: 18px;
  min-height: 0;
}

.article-thumb {
  width: 100%;
  height: 160px;
}


/* Masquer les illustrations des articles sur mobile */

.presse-page .article-thumb {
  display: none;
}


.article-content h2 {
  font-size: 16px;
  line-height: 1.25;
}

.article-content p:not(.article-tag) {
  font-size: 12px;
  line-height: 1.55;
}

.article-link {
  align-self: flex-end;
  font-size: 11px;
}

/* ---------------------------------------------------------------
   PAGE AUDIOVISUEL MOBILE
--------------------------------------------------------------- */

.video-hero {
  padding: 32px 0 28px;
}

.video-hero .container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.video-intro h1 {
  font-size: 34px;
  line-height: 1.08;
}

.video-intro hr {
  width: 44px;
  margin: 14px 0 18px;
}

.video-intro p {
  font-size: 13px;
  line-height: 1.6;
}

.video-aside {
  display: none;
}

/* Cartes vidéo */

.videos {
  padding: 0 0 48px;
}

.videos .container {
  width: calc(100% - 40px);
  display: flex;
  flex-direction: column;
  gap: 20px;

  padding-top: 0;
  border-top: none;
}

.video-card {
  width: 100%;
}

.video-thumb img {
  height: 180px;
}

.video-content {
  padding: 18px;
}

.video-content h2 {
  font-size: 16px;
  line-height: 1.25;
}

.video-content p:not(.video-meta) {
  font-size: 12px;
  line-height: 1.55;
}

/* Fenêtre vidéo mobile */

.video-modal {
  padding: 16px;
}

.video-modal-window {
  width: 100%;
  max-height: calc(100vh - 32px);
  border-radius: 12px;
}

.video-modal-player {
  border-radius: 12px 12px 0 0;
}

.video-modal-close {
  top: 8px;
  right: 8px;

  width: 38px;
  height: 38px;

  font-size: 26px;
}

.video-modal-play {
  width: 54px;
  height: 54px;
  font-size: 21px;
}

.video-modal-text {
  padding: 18px;
}

.video-modal-text h2 {
  margin-right: 38px;
  font-size: 20px;
}

.video-modal-text p {
  font-size: 13px;
}
.video-program-title {
  font-size: 20px;
}

.video-subject {
  font-size: 14px;
}

  /* Durée + saisonnalité */

  .derog-recurrence-chart {
    height: 1340px;
  }





}


/* TABLETTE / PETIT DESKTOP */
@media (min-width: 768px) and (max-width: 1279px) {

  .container {
    width: calc(100% - 96px);
  }

  .hero {
    padding: 48px 0 56px;
  }

  .hero .container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 48px;
    align-items: center;
  }

  .hero-photo {
    height: 330px;
  }

  .hero-photo img:first-child {
    width: 280px;
    top: -28px;
    left: -48px;
  }

  .hero-photo img:last-child {
    width: 260px;
    height: 320px;
    left: 0;
  }

  .hero-content h1 {
    margin-top: 0;
    font-size: 34px;
  }

  .subtitle {
    font-size: 19px;
  }

  .hero-content p:not(.subtitle):not(.lead) {
    font-size: 15px;
    line-height: 1.6;
  }

  .hero-visual {
    display: none;
  }

  .works {
    padding-bottom: 56px;
  }

  .cards {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-inline: 48px;
  }

  .card {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 24px;
    width: 100%;
  }

  .card img {
    width: 160px;
    height: 130px;
  }

  .card h3 {
    font-size: 22px;
  }


/* ---------------------------------------------------------------
   PAGE PRESSE TABLETTE
--------------------------------------------------------------- */

.press-hero {
  padding: 48px 0 36px;
}

.press-hero .container {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: center;
}

.press-intro h1 {
  font-size: 42px;
}

.press-intro p:not(.lead) {
  font-size: 13px;
  line-height: 1.6;
}

.press-aside img {
  width: 260px;
}

.article-card {
  grid-template-columns: 180px 1fr;
  gap: 24px;
}

.article-thumb {
  width: 180px;
  height: 120px;
}

.article-link {
  grid-column: 2;
  justify-self: start;
  margin-top: 4px;
}

.article-content h2 {
  font-size: 21px;
}

/* ---------------------------------------------------------------
   PAGE AUDIOVISUEL TABLETTE
--------------------------------------------------------------- */

.video-hero {
  padding: 48px 0 36px;
}

.video-hero .container {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: center;
}

.video-intro h1 {
  font-size: 42px;
}

.video-intro p {
  font-size: 15px;
  line-height: 1.6;
}

.video-aside img {
  width: 260px;
}

/* Grille vidéos */

.videos .container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.video-thumb img {
  height: 190px;
}

.video-content h2 {
  font-size: 22px;
}

.video-content p {
  font-size: 14px;
}

.derog-recurrence-chart {
  height: 1480px;
}




}

/* ===============================================================
   DATA DÉROGATIONS — MOBILE
================================================================ */

@media (max-width: 767px) {


  /* HERO */

  .derog-hero {
    padding: 34px 0 24px;
  }


  .derog-hero > .container {
    display: flex;
    flex-direction: column;
    gap: 22px;

    width: calc(100% - 40px);
  }


  .derog-kicker {
    margin-bottom: 10px;

    font-size: 11px;
  }


  .derog-intro h1 {
    margin-bottom: 18px;

    font-size: 20px;
    line-height: 1.18;
  }


  .derog-intro h1 span {
    display: inline;
  }


  .derog-lead {
    font-size: 12px;
    line-height: 1.65;
  }


  /* Méthode avant chiffres clés */

  .derog-method {
    order: 2;
  }


  .derog-intro {
    display: contents;
  }


  .derog-kicker,
  .derog-intro h1,
  .derog-lead {
    order: 1;
  }


  .derog-stats {
    order: 3;
  }


  /* MÉTHODE */

  .derog-method summary {
    padding: 18px 48px 16px 18px;

    font-size: 13px;
  }


  .derog-method summary::after {
    right: 18px;
  }


  .derog-method-content {
    gap: 15px;

    padding: 0 18px 20px;
  }


  .derog-method-item {
    grid-template-columns: 26px 1fr;
    gap: 10px;
  }


  .derog-method-item p {
    font-size: 11px;
    line-height: 1.55;
  }


  /* CHIFFRES */

  .derog-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;

    margin-top: 0;
  }


  .derog-stat {
    min-height: 84px;

    padding: 12px;
  }


  .derog-stat-icon {
    font-size: 22px;
  }


  .derog-stat strong {
    font-size: 14px;
  }


  .derog-stat span:not(.derog-stat-icon) {
    font-size: 9px;
  }


  /* ANALYSES */

  .derog-analysis {
    padding-bottom: 48px;
  }


  .derog-analysis > .container {
    width: calc(100% - 40px);
  }


  .derog-accordion summary {
    gap: 12px;

    min-height: 54px;

    padding:
      11px
      46px
      11px
      14px;
  }


  .derog-accordion summary::after {
    right: 14px;

    font-size: 21px;
  }


  .derog-number {
    width: 26px;
    height: 26px;

    font-size: 12px;
  }


  .derog-summary-title {
    font-size: 16px;
    line-height: 1.3;
  }


  /* Contenu */

  .derog-accordion-content {
    display: flex;
    flex-direction: column;
    gap: 20px;

    padding: 5px 14px 22px;
  }


  .derog-figure {
    width: 100%;
  }


  .derog-figure img {
    min-height: 210px;
  }


  .derog-figure figcaption {
    font-size: 9px;
  }


  .derog-text h2,
  .derog-double-item h2 {
    font-size: 17px;
  }


  .derog-text p,
  .derog-double-item p {
    font-size: 12px;
    line-height: 1.6;
  }


  /* Gros chiffre */

  .derog-big-number strong {
    font-size: 32px;
  }


  .derog-big-number span {
    font-size: 11px;
  }


  /* Double graphique */

  .derog-double-content {
    display: flex;
    flex-direction: column;
    gap: 28px;

    padding: 6px 14px 22px;
  }


  .derog-double-item .derog-figure img {
    min-height: 230px;
  }


  /* Final */

  .derog-final-content {
    padding: 6px 14px 22px;
  }


  .derog-figure-wide img {
    min-height: 230px;
  }


  .derog-method-note {
    font-size: 10px;
  }
}




/* ===============================================================
   DATA DÉROGATIONS — TABLETTE
================================================================ */

@media (min-width: 768px) and (max-width: 1279px) {


  .derog-hero > .container {
    grid-template-columns: minmax(0, 1.3fr) minmax(290px, .8fr);
    gap: 36px;
  }


  .derog-intro h1 {
    font-size: 36px;
  }


  .derog-lead {
    font-size: 14px;
  }


  .derog-stats {
    grid-template-columns: repeat(2, 1fr);
  }


  .derog-accordion-content {
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr);
    gap: 28px;
  }


  .derog-summary-title {
    font-size: 18px;
  }


  .derog-double-content {
    gap: 22px;
  }

}

/* Centrage du bloc des 4 chiffres clés
   mobile + tablette */

@media (max-width: 1279px) {

  .derog-stats {
    width: min(100%, 620px);
    margin-left: auto;
    margin-right: auto;
  }

}

/* ===============================================================
   ACCUEIL — CARTES GRAND ÉCRAN
================================================================ */

@media (min-width: 1280px) {

  .card {
    display: grid;

    grid-template-columns: 135px minmax(0, 1fr);
    grid-template-rows: 120px 1fr auto;

    column-gap: 22px;
    row-gap: 18px;

    align-items: center;

    padding: 24px;
  }


  .card > img {
    grid-column: 1;
    grid-row: 1;

    width: 135px;
    height: 120px;

    object-fit: contain;
  }


  .card > div {
    display: contents;
  }


  .card h3 {
    grid-column: 2;
    grid-row: 1;

    align-self: center;

    margin: 0;
  }


  .card p {
    grid-column: 1 / -1;
    grid-row: 2;

    align-self: start;

    margin: 0;

    font-size: 15px;
    line-height: 1.55;
  }


  .card a {
    grid-column: 1 / -1;
    grid-row: 3;

    justify-self: start;

    margin: 0;
  }

}

/* HORIZON EUROPE — PETITS ÉCRANS */

@media (max-width: 600px) {
  .horizon-page .horizon-container {
    padding-top: 26px;
    padding-bottom: 26px;
  }

  .horizon-page .horizon-dashboard {
    padding: 8px;
  }
}


/* DASHBOARD — PETITS ÉCRANS */

@media (max-width: 700px) {
  .dashboard .filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard .filters label {
    display: block;
  }

  .dashboard .filters select {
    display: block;
    width: 100%;
    max-width: none;
    margin-top: 5px;
    font-size: 16px;
  }

  .dashboard .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard .stat dd {
    font-size: 25px;
  }

  .dashboard .bottom {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
}

/* ============================================================
   COMPOSANTS COMMUNS — MOBILE
============================================================ */
@media (max-width: 767px) {
  .site-breadcrumb {
    font-size: 11px;
    gap: 6px;
    margin-bottom: 20px;
  }
  .back-to-top {
    right: 16px;
    bottom: 60px;
    width: 42px;
    height: 42px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ACCUEIL — PETITE TABLETTE */


/* ============================================================
   ACCUEIL — PETITE TABLETTE : 768 À 900 PX
============================================================ */

@media (min-width: 768px) and (max-width: 900px) {

  .site-header .container {
    width: calc(100% - 56px);
  }

  .brand {
    font-size: 17px;
  }

  .site-header nav {
    gap: 24px;
    font-size: 13px;
  }

  /* Présentation */

  .hero .container {
    width: calc(100% - 56px);
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 28px;
  }

  .hero-photo {
    height: 280px;
  }

  .hero-photo img:first-child {
    width: 230px;
    left: -35px;
    top: -18px;
  }

  .hero-photo img:last-child {
    width: 220px;
    height: 270px;
  }

  .hero-content h1 {
    font-size: 29px;
  }

  .hero-content .subtitle {
    font-size: 16px;
    line-height: 1.35;
  }

  .hero-content hr {
    margin: 18px 0;
  }

  /* Cartes */

  .cards {
    padding-inline: 28px;
  }

  .card {
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 20px;
    padding: 20px;
  }

  .card img {
    width: 140px;
    height: 120px;
    object-fit: contain;
  }

  .card h3 {
    font-size: 20px;
  }

  .card p {
    font-size: 14px;
    line-height: 1.5;
  }

  .card a {
    font-size: 14px;
  }

}


/* ============================================================
   ACCUEIL — CARTES VERTICALES SOUS 520 PX
============================================================ */

@media (max-width: 520px) {

  .hero .container {
    width: calc(100% - 40px);
  }

  .hero-photo img:first-child {
    left: -38px;
  }

  .cards {
    padding-inline: 20px;
  }

  .card {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 20px;
  }

  .card img {
    width: 150px;
    height: 130px;
    object-fit: contain;
    margin: 0 auto 4px;
  }

  .card div {
    width: 100%;
    flex: 0 0 auto;
  }

  .card h3 {
    font-size: 20px;
  }

  .card p {
    font-size: 12px;
    line-height: 1.55;
  }

  .card a {
    font-size: 11px;
  }

}


/* ============================================================
   ACCUEIL — TRÈS PETITS MOBILES
============================================================ */

@media (max-width: 360px) {

  .site-header .container {
    width: calc(100% - 28px);
  }

  .brand {
    font-size: 16px;
    white-space: nowrap;
  }

  #burger {
    flex: 0 0 44px;
  }

  .hero-content h1 {
    font-size: 26px;
  }

  .hero-content .subtitle {
    font-size: 15px;
  }

  .cards {
    padding-inline: 16px;
  }

  .card {
    padding: 18px;
  }

}


/* ============================================================
   DÉROGATIONS — HAUTEUR DU GRAPHIQUE ÉVOLUTION
============================================================ */

/* Tablette et mobile */

@media (max-width: 1279px) {

  .derog-page .derog-evolution-chart {
    height: 510px;
  }

}

/* Petits écrans */

@media (max-width: 480px) {

  .derog-page .derog-evolution-chart {
    height: 490px;
  }

}


/* ============================================================
   FOOTER — TABLETTE (768 à 1024 PX)
============================================================ */

@media (min-width: 768px) and (max-width: 1024px) {

  .site-footer .footer-contact p,
  .site-footer .footer-cta,
  .site-footer .footer-links {
    font-size: 13px;
  }

  .site-footer .footer-copyright {
    font-size: 12px;
  }

  .site-footer .footer-links {
    gap: 14px;
  }

}


/* ============================================================
   FOOTER — MOBILE (767 PX ET MOINS)
============================================================ */

@media (max-width: 767px) {

  
/* Liens du footer centrés */

.site-footer .footer-links {
  display: grid;
  grid-template-columns: max-content max-content;
  justify-content: center;
  justify-items: center;
  align-items: center;

  width: 100%;
  column-gap: 18px;
  row-gap: 16px;
  font-size: 12px;
}

.site-footer .footer-sep {
  display: none;
}

.site-footer .footer-copyright {
  grid-column: 1 / -1;
  width: 100%;
  text-align: center;
  font-size: 11px;
}


.site-footer .footer-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  width: 100%;
  margin: 0 auto;
  text-align: center;
}



}



/* ============================================================
   DATA LAB — OUTILS ET MÉTHODE RESPONSIVE
============================================================ */

/* TABLETTE */

@media (min-width: 768px) and (max-width: 1024px) {

  .articles .data-method {
    margin-top: 30px;
  }

  .articles .data-method[open] {
    width: min(100%, 720px);
  }

  .articles .data-method .data-method-note p {
    font-size: 13px;
    line-height: 1.7;
  }

}

/* MOBILE */

@media (max-width: 767px) {

  .articles .data-method {
    max-width: 100%;
    margin-top: 28px;
  }

  .articles .data-method[open] {
    width: 100%;
  }

  .articles .data-method .data-method-note {
    padding: 0 18px 20px;
  }

  .articles .data-method .data-method-note p {
    font-size: 12px;
    line-height: 1.65;
    margin-bottom: 14px;
  }

}





