/* ===============================
   VARIABLES (PALETTE + UI)
================================ */
:root{
  /* Base */
  --bg-main: #f6f8fb;
  --bg-card: rgba(255,255,255,0.92);
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-light: rgba(15, 23, 42, 0.10);

  /* Brand */
  --brand-navy: #0d2b52;
  --brand-navy-2: #163b6c;
  --brand-gold: #d6b600;
  --brand-teal: #12b5a6;

  /* Accent */
  --accent: var(--brand-gold);
  --accent-hover: var(--brand-navy-2);

  /* UI */
  --radius-md: 14px;
  --radius-lg: 18px;
  --shadow-sm: 0 6px 16px rgba(2, 6, 23, 0.08);
  --shadow-md: 0 14px 40px rgba(2, 6, 23, 0.12);
  --shadow-inset: inset 0 1px 0 rgba(255,255,255,0.65);
  --ring: 0 0 0 3px rgba(18, 181, 166, 0.25);
}

/* ===============================
   RESET "SAFE" (responsive)
================================ */
*,
*::before,
*::after{
  box-sizing: border-box;
}

img{
  max-width: 100%;
  height: auto;
  display: block; /* évite les gaps baseline */
}

/* ===============================
   BASE
================================ */
body{
  margin: 0;
  color: var(--text-main);
  line-height: 1.65;
  letter-spacing: 0.1px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Helvetica Neue", sans-serif;
  background:
    radial-gradient(1200px 700px at 15% 10%, #fff, transparent 55%),
    radial-gradient(900px 600px at 85% 0%, rgba(214,182,0,0.10), transparent 55%),
    linear-gradient(180deg, #f7f9fc 0%, #f3f6fb 100%);
}

/* Focus accessible */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible{
  outline: none;
  box-shadow: var(--ring);
  border-radius: 8px;
}

/* ===============================
   HEADER – h1 + p sur une ligne, bloc centré
================================ */
header{
  position: relative;
  overflow: hidden;
  padding: 3.2rem 1.5rem 2.4rem;
  color: #fff;

  background:
    radial-gradient(900px 420px at 15% 10%, rgba(255,255,255,0.10), transparent 60%),
    radial-gradient(700px 380px at 85% 20%, rgba(255,255,255,0.10), transparent 55%),
    linear-gradient(135deg, var(--brand-navy), var(--brand-navy-2));
  box-shadow: 0 10px 28px rgba(0,0,0,0.10);

  /*display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap; /* mobile
  text-align: center;*/

  display: flex;
  flex-direction: column;   /* ✅ h1 au-dessus du p */
  align-items: center;      /* ✅ centrage horizontal */
}

/* Liseré + ligne d'accent */
header::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.08), transparent 40%);
  pointer-events:none;
}
header::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:0;
  transform:translateX(-50%);
  width:min(560px, 88%);
  height:3px;
  background: linear-gradient(90deg, transparent, rgba(214,182,0,0.95), transparent);
  opacity: 0.95;
}

/* Titre manuscrit */
header h1{
  position: relative;
  margin: 0;

  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  letter-spacing: 0.2px;
  transform: rotate(-1deg);
  text-shadow: 0 10px 30px rgba(0,0,0,0.25);

  display: inline-block;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid rgba(214,182,0,0.75);

  flex: 0 0 auto;
}

/* Surlignage discret */
header h1::after{
  content:"";
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  bottom:-10px;
  width:110%;
  height:10px;
  background: rgba(214,182,0,0.35);
  border-radius:999px;
  filter: blur(0.2px);
  z-index:-1;
}

.header-title-link{
  color: inherit;          /* garde le blanc du header */
  text-decoration: none;   /* enlève le soulignement */
}

.header-title-link:hover,
.header-title-link:focus,
.header-title-link:active,
.header-title-link:visited{
  color: inherit;
  text-decoration: none;
}

/* Sous-titre capsule */
header p{
  margin: 0;
  margin-top: 2rem;

  font-size: 1.05rem;
  color: rgba(255,255,255,0.92);
  font-weight: 500;
  letter-spacing: 0.2px;

  display: inline-block;   /* ✅ largeur = taille du contenu */
  width: fit-content;      /* optionnel mais nickel */
  max-width: 100%;         /* évite les débordements */

  /*display: inline-flex;
  align-items: center;*/
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  /*flex: 0 0 auto;
  white-space: nowrap;*/
}

@media (max-width: 600px){
  header{
    padding: 2.6rem 1.2rem 2.1rem;
    gap: 0.9rem;
  }
  header p{
    white-space: normal; /* évite overflow */
    text-align: center;
  }
}

/* ===============================
   NAVIGATION (hamburger) — remplace l'ancien bloc nav{}
================================ */

.site-nav{
  position: sticky;
  top: 0;
  z-index: 1000;

  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);

  /* important pour le dropdown en absolute */
  position: sticky;
}

.site-nav{ position: sticky; }
.site-nav{ position: sticky; } /* ok */

/* Desktop: liens en ligne */
.nav-links{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.2rem;
}

.site-nav a{
  color: var(--brand-navy);
  text-decoration: none;
  font-weight: 600;
  position: relative;
  padding: 0.55rem 0.25rem;
}

.site-nav a::after{
  content:"";
  position:absolute;
  left:0;
  bottom:-4px;
  width:0;
  height:2.5px;
  border-radius:999px;
  background: linear-gradient(90deg, #fff, var(--accent));
  transition: width 0.25s ease;
}
.site-nav a:hover::after{ width:100%; }
.site-nav a.active{ color: var(--accent); }

/* Bouton caché sur desktop */
.nav-toggle{ display:none; }

/* Icône hamburger */
.nav-toggle__icon{
  width: 22px;
  height: 14px;
  display: inline-block;
  position: relative;
}
.nav-toggle__icon{
  background: var(--brand-navy);
  border-radius: 999px;
  height: 2px;
  margin-top: 6px;
}
.nav-toggle__icon::before,
.nav-toggle__icon::after{
  content:"";
  position:absolute;
  left:0; right:0;
  height:2px;
  background: var(--brand-navy);
  border-radius:999px;
  transition: transform .2s ease, top .2s ease;
}
.nav-toggle__icon::before{ top:2px; }
.nav-toggle__icon::after{ top:10px; }

/* Mobile: hamburger + dropdown */
@media (max-width: 700px){
  .site-nav{
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;

    /* 🔑 rend le parent "référence" pour l'absolute */
    position: sticky;
  }

  .nav-toggle{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(13,43,82,0.22);
    background: rgba(255,255,255,0.85);
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(2,6,23,0.12);
  }

  .nav-links{
    position: absolute;
    left: 10px;
    right: 10px;
    top: calc(100% + 8px);

    display: none;
    flex-direction: column;

    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(15,23,42,0.10);
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(2,6,23,0.16);
    overflow: hidden;

    z-index: 5000;
  }

  .nav-links a{
    padding: 0.95rem 1rem;
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(15,23,42,0.08);
  }
  .nav-links a:last-child{ border-bottom: 0; }

  .site-nav.is-open .nav-links{ display: flex; }

  /* burger -> X */
  .site-nav.is-open .nav-toggle__icon{ background: transparent; }
  .site-nav.is-open .nav-toggle__icon::before{ top:6px; transform: rotate(45deg); }
  .site-nav.is-open .nav-toggle__icon::after{ top:6px; transform: rotate(-45deg); }
}


/* Responsive nav (sans changer le style) */
@media (max-width: 520px){
  nav{ padding: 0.85rem 0.6rem; }
  nav a{ margin: 0 0.55rem; }
}
@media (max-width: 420px){
  nav a{ margin: 0 0.40rem; }
}

/* ===============================
   CONTAINER
================================ */
.container{
  max-width: 1050px;
  margin: auto;
  padding: 2.5rem 1.5rem;
}

/* Petite respiration mobile */
@media (max-width: 600px){
  .container{
    padding: 2rem 1.1rem;
  }
}

/* Présentation */
.presentation-content{
  display:flex;
  gap: 2rem;
  align-items:flex-start;
}
.presentation-content img{
  width: 180px;
  max-width: 100%;
  border-radius: 8px;
  flex-shrink: 0;
}
.presentation-text p{
  hyphens: auto;
  margin-bottom: 1rem;
  margin-top :0;
}

/* Responsive présentation */
@media (max-width: 800px){
  .presentation-content{
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* ===============================
   CARDS / PROJECTS
================================ */
.cards{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.8rem;
}

.card{
  background: rgba(255,255,255,0.88);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm), var(--shadow-inset);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card.project{
  /*padding: 0;
  overflow: hidden;*/
  display: flex;
  flex-direction: column;
}
.card.project:hover{
  transform: translateY(-6px);
  box-shadow: var(--shadow-md), var(--shadow-inset);
}

.card.simple{
  margin-top: 2rem;
  padding: 1.8rem;
  text-align: center;
}
.card.simple:hover{
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

#toutDowload{
  margin-bottom: 2rem;
  color : darkgreen;
}
/* Sur très petits écrans : éviter que 260px force des scrolls */
@media (max-width: 340px){
  .cards{
    grid-template-columns: 1fr;
  }
}

/* ===============================
   VIGNETTES (thumb) + badge
================================ */
.project-thumb{
  height: 130px;
  position: relative;
  overflow: hidden;
  background: #e5e7eb;
}

/* Domaines */
/*.project-thumb.pedago{ background: linear-gradient(135deg, #0d2b52, #1f4e8c); }
.project-thumb.bio{    background: linear-gradient(135deg, #2f7d32, #66bb6a); }
.project-thumb.prog{   background: linear-gradient(135deg, #4a148c, #7e57c2); }
.project-thumb.pedago.bio{ background: linear-gradient(135deg, #0d2b52, #2f7d32); }*/

/* Reflets */
.project-thumb::before{
  content:"";
  position:absolute;
  inset:0;
  /*background:
    radial-gradient(500px 200px at 20% 10%, rgba(255,255,255,0.18), transparent 60%),
    radial-gradient(380px 220px at 85% 0%, rgba(0,0,0,0.16), transparent 70%);*/
  pointer-events:none;
}

/* Meta badge */
.project-meta{
  position:absolute;
  bottom: 10px;
  left: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;

  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 8px 18px rgba(2,6,23,0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #111;
}

/* badges text color par domaine */
.project-thumb.pedago .project-meta{ background: rgba(13,43,82,0.9); color:#fff; border-color: rgba(13,43,82,0.35); }
.project-thumb.bio .project-meta{    background: rgba(47,125,50,0.9); color:#fff; border-color: rgba(47,125,50,0.35); }
.project-thumb.prog .project-meta{   background: rgba(74,20,140,0.9); color:#fff; border-color: rgba(74,20,140,0.35); }

/* Contenu */
.project-content{ 
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.6rem 1.8rem; 
}
.project-content h3{ margin: 0 0 0.5rem; }
.project-content p{ margin: 0; }

/* Lien projet */
.project-link{
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: auto; /*1rem;*/
  color: var(--brand-navy);
  font-weight: 600;
  text-decoration: none;
  position: relative;
}
.project-link::after{
  content:"→";
  transition: transform 0.2s ease;
}
.project-link:hover{ color: var(--accent-hover); }
.project-link:hover::after{ transform: translateX(3px); }

/* Responsive thumb */
@media (max-width: 768px){
  .project-thumb{ height: 90px; }
}

/* Date en haut à droite */
.project-date{
  position: absolute;
  top: 10px;
  /*bottom : 10px;*/
  right: 10px;

  font-size: 0.6rem;
  font-weight: 600;
 

  padding: 0.35rem 0.6rem;
  border-radius: 999px;

  background: rgba(15, 23, 42, 0.65); /* navy sombre */
  color: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  /*box-shadow: 0 10px 24px rgba(2,6,23,0.18);*/
}

/* Image de fond + overlay */
.project-thumb{
  background:
    /*linear-gradient(180deg, rgba(2,6,23,0.10), rgba(2,6,23,0.55)),*/
    var(--thumb, none);
  background-size: cover;
  background-position: center;
}




/* ===============================
   BREADCRUMB
================================ */
.breadcrumb{
  font-size: 0.85rem;
  margin-bottom: 1.8rem;
  color: #6b7280;
}
.breadcrumb a{
  color: var(--brand-navy);
  text-decoration: none;
  font-weight: 500;
}

/* ===============================
   FILTERS
================================ */
.filter{ margin-bottom: 2.5rem; }

.filter button{
  margin-right: 0.6rem;
  margin-bottom: 0.5rem;
  padding: 0.45rem 1.2rem;
  border: 1px solid rgba(13,43,82,0.22);
  background: #fff;
  color: var(--brand-navy);
  cursor: pointer;
  border-radius: 999px;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
  box-shadow: 0 6px 14px rgba(2,6,23,0.06);
}
.filter button:hover{ background: #eaf0f8; }
.filter button.active{
  background: linear-gradient(135deg, var(--brand-navy), var(--brand-navy-2));
  color: #fff;
  border-color: transparent;
}

/* ===============================
   CONTACT FORM + messages
================================ */
.contact-form{
  max-width: 600px;
  margin: 50px auto;
  padding: 35px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}
.contact-form h2{ text-align:center; margin-bottom: 30px; }
.contact-form label{ display:block; margin-bottom: 6px; font-weight: 600; }

.contact-form input,
.contact-form textarea{
  width: 100%;
  padding: 12px;
  margin-bottom: 20px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
}

.contact-form input:focus,
.contact-form textarea:focus{
  outline: none;
  border-color: var(--brand-navy);
  box-shadow: 0 0 0 2px rgba(13, 43, 82, 0.15);
}

.contact-form textarea{ min-height: 130px; resize: vertical; }

.contact-form button{
  width: 100%;
  background: var(--brand-navy);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.contact-form button:hover{ background: var(--brand-navy-2); }

.success-message{
  background: #ecfdf3;
  color: #166534;
  padding: 14px;
  border-radius: 6px;
  margin-bottom: 25px;
  text-align: center;
  border: 1px solid #bbf7d0;
}
.contact-info{
  text-align: center;
  margin-top: 30px;
  color: #6b7280;
  font-size: 0.9rem;
}

/* ===============================
   FOOTER
================================ */
footer{
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: #6b7280;
  font-size: 0.85rem;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}
footer a{
  color: var(--brand-navy);
  font-weight: 600;
  text-decoration: none;
}
footer a:hover{
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===============================
   SECTIONS (CV / Legal)
================================ */
.legal-section, .cv-section{
  background: var(--bg-card);
  padding: 2.5rem 2.8rem;
  margin-bottom: 3rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm), var(--shadow-inset);
}

.legal-section h2{
  margin-bottom: 1.6rem;
  font-size: 1.35rem;
  color: var(--text-main);
}
.legal-section p{
  max-width: 750px;
  line-height: 1.75;
  color: var(--text-main);
}
.legal-section a{
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}
.legal-section a:hover{ text-decoration: underline; }

/* Articles CGU */
.legal-article{ margin-top: 2.2rem; }
.legal-article h3{ font-size: 1.05rem; margin-bottom: 0.6rem; color: #1f2933; }
.legal-article p{ margin-bottom: 0.8rem; color: var(--text-main); }
.legal-article ul{ margin-top: 0.8rem; padding-left: 1.6rem; max-width: 720px; }
.legal-article li{ margin-bottom: 0.6rem; line-height: 1.6; }

/* Licence */
.cc-license{ margin: 1.2rem 0 0.8rem; }
.cc-license img{ height: 42px; width: auto; opacity: 0.9; }

@media (max-width: 700px){
  .legal-section, .cv-section{ padding: 2rem 1.6rem; }
}

/* CV specifics */
.cv-section .ul_cv li{ margin-bottom: 2rem; }
.cv-section article{ margin-bottom: 4rem; }
.cv-section h4{ margin-bottom: 0;}
.cv-section .ul_sansEspace{margin-top:0; margin-bottom: 2rem;}

/* ===============================
   IMAGE ILLUSTRATION
================================ */
.image-illustration{
  width: 100%;
  margin: 2rem 0 2.5rem;
  padding: 0;
  display: flex;
  justify-content: center;
}
.image-illustration img{
  width: min(860px, 100%);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: 0 18px 50px rgba(2,6,23,0.16);
}


.illustration-frame{
  display: flex;
  justify-content: center;
}

.illustration-frame iframe{
  width: min(560px, 100%);
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
}

.illustration-text{
  text-align: center;
  margin:0;
}

/* ===============================
   DIVERS
================================ */
.important{ color: darkred; }

/* logiciels */
.software-item{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}
.software{
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-right: 4rem;
  white-space: nowrap;
}
.software img{
  width: 60px;
  height: 60px;
  object-fit: contain;
}
.software span{
  font-size: 1rem;
  font-weight: 600;
}

/* ✅ Responsive logiciels (évite overflow sur mobile) */
@media (max-width: 600px){
  .software{
    margin-right: 0;
    white-space: normal;
  }
}

/* Liens dans le contenu : même style que les liens "projet" */
main a:not(.project-link):not(nav a){
  color: var(--brand-navy);
  font-weight: 600;
  text-decoration: none;
}
main a:not(.project-link):not(nav a):hover{
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}


.back-to-top{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2000;

  width: 44px;
  height: 44px;
  border-radius: 999px;

  border: 1px solid rgba(13,43,82,0.22);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  color: var(--brand-navy);
  font-size: 18px;
  font-weight: 800;

  display: grid;
  place-items: center;

  cursor: pointer;
  box-shadow: 0 10px 24px rgba(2,6,23,0.18);

  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, background .2s ease;
}

.back-to-top.is-visible{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover{
  background: rgba(255,255,255,0.95);
}




/* Optionnel : sur mobile, un peu plus petit */
@media (max-width: 520px){
  .back-to-top{
    right: 14px;
    bottom: 14px;
    width: 40px;
    height: 40px;
  }
}


/* ===============================
   CV SECTION SPLIT (média gauche / contenu droite)
================================ */
.media-split{
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 5rem;
  align-items: center;
}

.media-split-left img,
.media-split-left video{
  width: 100%;
  height: auto;
  display: flex;
  align-items: center;
  /*border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);*/
}

.media-split-left iframe {
  /*width: 100%;*/
  height: 100%;
  aspect-ratio: 16 / 9;   /* conserve le ratio */
  border: 0;
}

.media-split-right h3{
  margin-top: 0;
}

.media-split-right {
  align-self: start;
  /*border: 1px solid red;*/
}


/* Petits “chips” (optionnel) */
.chips{
  /*display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;*/
  margin: 0.6rem 0 1.2rem;
}

.chip{
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  margin-bottom : 0.5rem;
  border-radius: 0 999px 999px 0;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(13,43,82,0.06);
  border: 1px solid rgba(13,43,82,0.14);
  color: var(--brand-navy);
}

/* Responsive : empilement */
@media (max-width: 900px){
  .media-split{
    grid-template-columns: 1fr;
  }
  .media-split-left{
    max-width: 520px;
    margin-inline: auto;
  }
}

.dateRealisation{
  margin-bottom : 2rem;
}


/* Bouton zoom (supprime style bouton par défaut) */
.agrandirImage{
  margin-top: 0;   /* petit espace sous l’image */
  font-size: 0.85rem;
  color: #666;
  text-align: center;
}

.media-zoom{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.media-zoom img{
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-md, 14px);
}

/* Modale */
.media-modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.media-modal.is-open{
  display: block;
}

.media-modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(2,6,23,0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.media-modal__dialog{
  position: relative;
  z-index: 1;
  width: min(1100px, 92vw);
  max-height: 88vh;
  margin: 6vh auto 0;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(15,23,42,0.12);
  border-radius: 18px;
  box-shadow: 0 22px 70px rgba(2,6,23,0.35);
  overflow: hidden;
}

.media-modal__content{
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-modal__content img,
.media-modal__content video,
.media-modal__content iframe{
  max-width: 100%;
  max-height: calc(88vh - 28px);
  width: auto;
  height: auto;
  display: block;
  object-fit: contain; /* 🔑 anti-déformation */
  /*width: 100%;
  height: auto;
  max-height: calc(88vh - 28px);
  display: block;*/
}

/* iframe: garde un ratio vidéo correct */
.media-modal__content iframe{
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
}

.media-modal__close{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.15);
  background: rgba(255,255,255,0.9);
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}


.file-table {
  margin-left: 2rem;
  border-collapse: collapse;
  width: auto;
  font-size: 0.85rem;
}

.file-table td {
  white-space: nowrap;
  padding-left: 0.5rem;
}

/* Bordure uniquement sur la 1re colonne */
.file-table .label {
  border-left: 1px solid #333;
}

/* Deuxième colonne */
.file-table .value {
  text-align : right;
}

/* =========================================================
   ✅ PATCH RESPONSIVE (à coller tout en bas du CSS)
   Objectif : vraie mise en page mobile (pas juste shrink)
   -> ne touche pas aux fonctionnalités, seulement au layout
========================================================= */

/* -------------------------------
   1) Base mobile : typographie & espaces
-------------------------------- */
@media (max-width: 768px){
  body{
    line-height: 1.7;
  }

  .container{
    padding: 1.6rem 1rem;
  }

  /* Sections (CV / Legal) plus lisibles sur mobile */
  .legal-section, .cv-section{
    padding: 1.6rem 1.2rem;
    margin-bottom: 2rem;
    border-radius: 16px;
  }
}

/* -------------------------------
   2) Header : plus “hero mobile”
-------------------------------- */
@media (max-width: 600px){
  header{
    padding: 2.2rem 1rem 1.8rem;
  }

  header h1{
    font-size: clamp(2.1rem, 7vw, 2.8rem);
    text-align: center;
  }

  header p{
    margin-top: 1.2rem;
    font-size: 0.98rem;
    padding: 0.5rem 0.85rem;
  }

  header::after{
    width: min(420px, 86%);
  }
}

/* -------------------------------
   3) Navigation : “mobile nav” (scroll horizontal)
   -> garde le même style, mais évite l’étouffement
-------------------------------- */
@media (max-width: 700px){
  nav{
    text-align: left;
    padding: 0.75rem 0.75rem;
  }

  nav{
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;        /* Firefox */
  }
  nav::-webkit-scrollbar{ display: none; } /* Chrome */

  /* Met les liens sur une seule ligne scrollable */
  nav a{
    display: inline-block;
    margin: 0 0.75rem 0 0;
    white-space: nowrap;
    padding: 0.55rem 0.35rem; /* meilleure zone tactile */
  }
}

/* -------------------------------
   4) Présentation (photo + texte) : layout mobile plus “card”
-------------------------------- */
@media (max-width: 800px){
  .presentation-content{
    gap: 1.2rem;
  }

  .presentation-content img{
    width: 140px;
    border-radius: 12px;
  }

  .presentation-text{
    text-align: left;
  }
}

/* -------------------------------
   5) Cards : passage en “1 colonne” + respiration
   -> pas juste auto-fit qui rétrécit
-------------------------------- */
@media (max-width: 680px){
  .cards{
    grid-template-columns: 1fr;   /* ✅ vrai layout mobile */
    gap: 1.1rem;
  }

  .card.simple{
    margin-top: 1.3rem;
    padding: 1.4rem 1.2rem;
  }

  .project-content{
    padding: 1.3rem 1.2rem;
  }

  .project-thumb{
    height: 110px;
  }
}

@media (max-width: 420px){
  .project-thumb{
    height: 95px;
  }

  .project-meta{
    font-size: 0.72rem;
    padding: 0.32rem 0.62rem;
  }

  .project-date{
    font-size: 0.58rem;
    padding: 0.30rem 0.55rem;
  }
}

/* -------------------------------
   6) Filters : boutons plus “mobile friendly”
-------------------------------- */
@media (max-width: 600px){
  .filter{
    margin-bottom: 1.8rem;
  }

  .filter button{
    padding: 0.55rem 1rem;
    margin-right: 0.45rem;
    box-shadow: 0 4px 10px rgba(2,6,23,0.06);
  }
}

/* -------------------------------
   7) Media split (CV) : vrai empilement + ordre cohérent
-------------------------------- */
@media (max-width: 900px){
  .media-split{
    gap: 1.6rem;
  }

  .media-split-left{
    order: 0;
  }

  .media-split-right{
    order: 1;
  }

  /* Un peu d’air en dessous du média */
  .media-split-left img,
  .media-split-left video,
  .media-split-left iframe{
    border-radius: 14px;
  }
}

/* -------------------------------
   8) Contact form : full width + marges
-------------------------------- */
@media (max-width: 600px){
  .contact-form{
    margin: 28px auto;
    padding: 22px 16px;
    border-radius: 14px;
  }
}

/* -------------------------------
   9) “Logiciels” : éviter les gros blancs et aligner proprement
-------------------------------- */
@media (max-width: 700px){
  .software-item{
    gap: 1.2rem;
  }

  .software{
    width: 100%;
    justify-content: flex-start;
    margin-right: 0;
    gap: 0.7rem;
  }

  .software img{
    width: 48px;
    height: 48px;
  }
}

/* -------------------------------
   10) File table : devient lisible sur mobile (stack)
   -> même contenu, juste affichage en 2 lignes par “row”
-------------------------------- */
@media (max-width: 520px){
  .file-table{
    width: 100%;
    margin-left: 0;
    font-size: 0.9rem;
  }

  .file-table tr{
    display: grid;
    grid-template-columns: 1fr;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(15,23,42,0.08);
  }

  .file-table td{
    white-space: normal;
    padding-left: 0;
  }

  .file-table .label{
    border-left: 0;
    font-weight: 650;
    color: var(--text-main);
  }

  .file-table .value{
    text-align: left;
    color: var(--text-muted);
    margin-top: 0.15rem;
  }
}

/* -------------------------------
   11) Modale média : marge + hauteur confort mobile
-------------------------------- */
@media (max-width: 600px){
  .media-modal__dialog{
    width: min(980px, 94vw);
    max-height: 86vh;
    margin: 7vh auto 0;
    border-radius: 16px;
  }

  .media-modal__content{
    padding: 10px;
  }

  .media-modal__close{
    top: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
    font-size: 24px;
  }
}

/* -------------------------------
   12) Bouton back-to-top : déjà OK, micro-ajustement tactile
-------------------------------- */
@media (max-width: 520px){
  .back-to-top{
    width: 42px;
    height: 42px;
    font-size: 17px;
  }
}

/* =========================================================
   ✅ RESPONSIVE PORTRAIT (vrai layout mobile)
   À coller tout en bas
========================================================= */

/* Déclenchement portrait (le plus direct) */
@media (orientation: portrait) and (max-width: 900px),
       (max-aspect-ratio: 3/4) and (max-width: 1000px){

  /* Container : respiration + lecture */
  .container{
    padding: 1.4rem 1rem;
  }

  /* Nav : ligne scrollable (sinon ça écrase tout en portrait) */
  nav{
    text-align: left;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.75rem 0.75rem;
  }
  nav::-webkit-scrollbar{ display:none; }
  nav a{
    display: inline-block;
    white-space: nowrap;
    margin: 0 0.75rem 0 0;
    padding: 0.6rem 0.35rem; /* zone tactile */
  }

  /* Cards : 1 colonne = vrai layout portrait */
  .cards{
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }

  /* Présentation : empilement net + centrage image */
  .presentation-content{
    flex-direction: column;
    align-items: center;
    text-align: left;
    gap: 1.1rem;
  }
  .presentation-content img{
    width: 150px;
    border-radius: 12px;
  }

  /* Media split CV : empilement */
  .media-split{
    grid-template-columns: 1fr;
    gap: 1.6rem;
  }
  .media-split-left{
    max-width: 560px;
    margin-inline: auto;
  }

  /* Thumb : éviter une bannière trop petite en portrait */
  .project-thumb{
    height: 110px;
  }

  /* Sections longues : padding adapté */
  .legal-section, .cv-section{
    padding: 1.6rem 1.2rem;
    margin-bottom: 2rem;
  }

  /* Table fichiers : lisible en portrait */
  .file-table{
    width: 100%;
    margin-left: 0;
  }
}

/* Portrait très étroit (petits mobiles) */
@media (orientation: portrait) and (max-width: 520px){

  header{
    padding: 2.2rem 1rem 1.8rem;
  }
  header h1{
    font-size: clamp(2.1rem, 8vw, 2.8rem);
    text-align: center;
  }
  header p{
    margin-top: 1.2rem;
    text-align: center;
    white-space: normal;
  }

  .project-thumb{
    height: 95px;
  }

  /* file-table => stack */
  .file-table tr{
    display: grid;
    grid-template-columns: 1fr;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(15,23,42,0.08);
  }
  .file-table td{
    white-space: normal;
    padding-left: 0;
  }
  .file-table .label{
    border-left: 0;
    font-weight: 650;
  }
  .file-table .value{
    text-align: left;
    margin-top: 0.15rem;
    color: var(--text-muted);
  }
}

/* =========================================================
   ✅ MOBILE: texte + vignettes plus lisibles
========================================================= */
@media (max-width: 680px){
  body{ font-size: 17px; } /* base plus lisible */

  .project-content h3{
    font-size: 1.15rem;
    line-height: 1.3;
  }

  .project-content p{
    font-size: 1.02rem;
    line-height: 1.65;
  }

  .project-link{
    font-size: 1.02rem;
  }

  /* ✅ Vignettes plus grandes */
  .project-thumb{
    height: 160px;              /* au lieu de 90/110 */
    background-position: center;
  }

  .project-meta{
    font-size: 0.85rem;
    padding: 0.42rem 0.8rem;
  }

  .project-date{
    font-size: 0.75rem;
    padding: 0.38rem 0.65rem;
  }

  /* Cards en 1 colonne (vrai layout mobile) */
  .cards{
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .project-content{
    padding: 1.35rem 1.2rem;
  }
}

/* =========================================================
   ✅ NAV HAMBURGER (propre, sans doublons)
   - Desktop: liens centrés
   - Mobile: bouton burger à gauche + dropdown
========================================================= */

/* Barre nav (desktop + mobile) */
.site-nav{
  position: sticky;
  top: 0;
  z-index: 3000;

  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);

  padding: 0.75rem 1rem;
}

/* Liens (style commun) */
.site-nav a{
  color: var(--brand-navy);
  text-decoration: none;
  font-weight: 600;
  position: relative;
  padding: 0.55rem 0.25rem;
}

/* underline hover conservé */
.site-nav a::after{
  content:"";
  position:absolute;
  left:0;
  bottom:-4px;
  width:0;
  height:2.5px;
  border-radius:999px;
  background: linear-gradient(90deg, #fff, var(--accent));
  transition: width 0.25s ease;
}
.site-nav a:hover::after{ width:100%; }
.site-nav a.active{ color: var(--accent); }

/* Desktop: liens centrés */
.nav-links{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.2rem;
}

/* Bouton hamburger caché sur desktop */
.nav-toggle{ display: none; }

/* Icône hamburger */
.nav-toggle__icon{
  width: 22px;
  height: 14px;
  display: inline-block;
  position: relative;
  background: var(--brand-navy);
  border-radius: 999px;
  height: 2px;
  margin-top: 6px;
}
.nav-toggle__icon::before,
.nav-toggle__icon::after{
  content:"";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--brand-navy);
  border-radius: 999px;
  transition: transform .2s ease, top .2s ease;
}
.nav-toggle__icon::before{ top: 2px; }
.nav-toggle__icon::after{ top: 10px; }

/* =========================================================
   MOBILE (<= 700px) : burger à gauche + dropdown + icône centrée
========================================================= */
@media (max-width: 700px){

  /* Barre nav : sticky + bouton à gauche */
  .site-nav{
    position: sticky;
    top: 0;
    z-index: 3000;
    overflow: visible;

    display: flex;
    align-items: center;
    justify-content: flex-start;   /* ✅ bouton à gauche */
    gap: 0.75rem;

    padding-left: 0.75rem;
    padding-right: 0.75rem;

    position: relative;            /* 🔑 contenant pour .nav-links en absolute */
  }

  /* Optionnel : ton .nav-home est vide → on le cache en mobile */
  .site-nav .nav-home{ display: none; }

  /* Bouton burger (zone cliquable) */
  .nav-toggle{
    display: grid !important;
    place-items: center;

    width: 44px;
    height: 44px;
    border-radius: 12px;

    border: 1px solid rgba(13,43,82,0.22);
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    cursor: pointer;
    box-shadow: 0 10px 24px rgba(2,6,23,0.12);

    z-index: 4000;

    margin-right: auto; /* ✅ garde le bouton bien à gauche */
  }

  /* ✅ Icône burger : 3 barres centrées (indépendant des anciens styles) */
  .nav-toggle__icon{
    position: relative;
    width: 22px;
    height: 16px;               /* zone de dessin */
    margin: 0 !important;
    background: none !important;
    border-radius: 0 !important;

    /* barre du milieu */
    box-shadow: 0 7px 0 0 var(--brand-navy);
  }

  .nav-toggle__icon::before,
  .nav-toggle__icon::after{
    content:"";
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--brand-navy);
    border-radius: 999px;
    transition: transform .2s ease, top .2s ease, bottom .2s ease;
  }

  /* barre du haut / bas */
  .nav-toggle__icon::before{ top: 2px; }
  .nav-toggle__icon::after{ bottom: 2px; }

  /* Dropdown */
  .nav-links{
    position: absolute;
    left: 10px;
    right: 10px;
    top: calc(100% + 8px);

    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;

    background: #ffffff; /* ✅ opaque */
    border: 1px solid rgba(15,23,42,0.10);
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(2,6,23,0.16);
    overflow: hidden;

    z-index: 9999;
    margin: 0;
  }

  .nav-links a{
    padding: 0.95rem 1rem;
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(15,23,42,0.08);
  }
  .nav-links a:last-child{ border-bottom: 0; }

  /* Ouverture */
  .site-nav.is-open .nav-links{
    display: flex !important;
  }

  /* Burger -> X */
  .site-nav.is-open .nav-toggle__icon{
    box-shadow: none; /* cache la barre du milieu */
  }
  .site-nav.is-open .nav-toggle__icon::before{
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
  }
  .site-nav.is-open .nav-toggle__icon::after{
    bottom: auto;
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
  }

/* ✅ Sticky fiable */
.site-nav{
  position: sticky;
  top: 0;
  z-index: 5000;
}

/* 🔑 Un parent avec overflow peut casser sticky */
html, body{ overflow-x: hidden; }

@media (max-width: 700px){
  .site-nav{ position: sticky; top: 0; }
}

}

