/* Parcours en 8 écrans (js/parcours-ecrans.js) — nouveau-projet.html.
   Charte CVGator : vert #00A78E (fonds pleins #007A68 pour le contraste du texte blanc),
   texte #293651, titres Comfortaa. Aucune transition « all ».
   Mise en page : la carte principale occupe l'essentiel de l'espace (conteneur large,
   marges extérieures réduites) ; quand elle contient une zone de saisie, elle remplit
   la hauteur disponible et c'est cette zone qui s'agrandit. Le fond gris reste un simple
   arrière-plan de séparation. */

:root {
  --parcours-largeur: 1480px;   /* largeur maximale du contenu des écrans */
  --parcours-marge: 20px;       /* marge extérieure horizontale (16 px sur mobile) */
  /* Trame de progression */
  --trame-vert: #00A78E;        /* vert principal CVGator : traits franchis, contour */
  --trame-courant: #26B49F;     /* vert CVGator éclairci de 15 % : texte #293651 à 4,66:1 (AA) */
  --trame-creme: #F5F2E9;       /* étapes terminées */
  --trame-nuit: #293651;
  --trame-gris-trait: #C9CED8;  /* liaisons et contour des étapes à venir */
  --trame-gris-texte: #646F87;  /* texte des étapes à venir : 5,04:1 sur blanc (AA) */
}

/* ── Titre principal de la page (remplace l'ancien bloc « … en 5 étapes ») ── */
h1.top-bar-title { margin: 0; }

/* ── En-tête d'écran : titre sobre + une phrase, aligné sur la carte ── */
.step-content.ecran { min-height: 0; }
.ecran-tete { width: 100%; max-width: var(--parcours-largeur); margin: 0 auto; padding: 10px var(--parcours-marge) 0; box-sizing: border-box; }
.ecran-titre { margin: 0; font-family: var(--font-display, 'Comfortaa', 'Montserrat', sans-serif); font-size: 17px; font-weight: 700; line-height: 1.3; color: var(--md-on-surface, #293651); text-wrap: balance; outline: none; }
.ecran-texte { margin: 2px 0 0; max-width: 80ch; font-size: 13px; line-height: 1.45; color: var(--md-on-surface-variant, #5F6B7A); text-wrap: pretty; }

/* ── Écrans 1 et 2 : la carte occupe la largeur et la hauteur disponibles ── */
.ecran-zone { width: 100%; max-width: var(--parcours-largeur); margin: 0 auto; box-sizing: border-box; flex-direction: column; justify-content: flex-start; padding: 8px var(--parcours-marge) 12px; gap: 0; }
.ecran-zone > .card { flex: 1 0 auto; min-height: 0; display: flex; flex-direction: column; padding: 18px 20px; }
.ecran-zone > .card:hover { transform: none !important; }
/* Écran 1 en mode « lien » : rien à agrandir, la carte garde la hauteur de son contenu */
#e1 .ecran-zone > .card:has(#offre-zone-texte[style*="none"]) { flex: 0 0 auto; }
.ecran .card-title { margin-bottom: 6px; }
.ecran .card-subtitle { margin-bottom: 8px; }

/* Choix d'import (texte / lien, texte / fichier) : compacts, icône à gauche */
.ecran .import-choice { margin-bottom: 10px !important; gap: 8px; }
.ecran .import-opt { min-height: 52px; padding: 8px 34px 8px 12px; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; row-gap: 0; align-items: center; justify-items: start; text-align: left; }
.ecran .import-opt .imp-ico { grid-row: 1 / span 2; font-size: 20px !important; margin: 0; }
.ecran .import-opt .imp-title { font-size: 13px; }
.ecran .import-opt .imp-desc { font-size: 11.5px; }
.ecran .import-opt .imp-check { top: 50% !important; right: 10px !important; transform: translateY(-50%); }
.ecran .import-opt:hover, .ecran .import-opt:active { transform: none; }

/* Écran 1 : lien de l'offre et bouton « Extraire » à la taille des champs */
#e1 #offre-url-input { height: 42px !important; }
#e1 #offre-zone-lien .btn-filled, #e1 #offre-zone-lien .btn-tonal { height: 42px !important; min-height: 40px; padding-top: 0 !important; padding-bottom: 0 !important; }
/* Zone de l'annonce : elle prend toute la hauteur restante de la carte */
#e1 #offre-zone-texte:not([style*="none"]) { display: flex !important; flex-direction: column; flex: 1 1 auto; min-height: 0; }
#e1 #offre-text-area { flex: 1 1 auto; height: auto; min-height: 160px; resize: vertical; }

/* Nom de l'entreprise (au-dessus de l'offre) : signalé quand il manque */
.offre-entreprise.is-manquant { border-color: #F5B947 !important; background: #FFF8EB; }
.offre-entreprise.is-manquant #offre-company-hint { color: #6B4200 !important; }
.offre-entreprise.is-manquant #offre-company-input { border-color: #E0A53A; }
html.dark .offre-entreprise.is-manquant { background: #3A2E14; }
html.dark .offre-entreprise.is-manquant #offre-company-hint { color: #F5D08A !important; }

/* Écran 2 : zone de dépôt ou texte du CV : toute la hauteur restante de la carte */
#e2 #cv-upload-zone { flex: 1 1 auto !important; height: auto; min-height: 140px; }
#e2 #cv-text-area { flex: 1 1 auto !important; height: auto; min-height: 180px; resize: vertical; }

/* Résultat de l'import du CV (nom du fichier, nombre de mots, erreur) */
.cv-file-status { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; font-size: 13px; line-height: 1.45; border: 1px solid var(--md-outline-variant, #DDE2E8); color: var(--md-on-surface, #293651); }
.cv-file-status[hidden] { display: none; }
.cv-file-status > span:nth-child(2) { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.cv-file-status .material-icons-round { font-size: 20px; }
.cv-file-status.is-ok { background: #E6F7F5; border-color: #9ED9CF; }
.cv-file-status.is-ok .material-icons-round { color: #007A68; }
.cv-file-status.is-erreur { background: #FDECEA; border-color: #F3B4AC; }
.cv-file-status.is-erreur .material-icons-round { color: #B3261E; }
.cv-file-remplacer { min-height: 40px; padding: 0 12px; border: 1px solid #9ED9CF; border-radius: 8px; background: #fff; color: #00695A; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background-color .15s ease; }
.cv-file-remplacer:hover { background: #F0FBF9; }
.cv-file-remplacer:focus-visible { outline: 2px solid #007A68; outline-offset: 2px; }

/* ── Écrans 3 et 4 : contenu directement sous le titre, pleine largeur ── */
.ecran .s2-scroll { padding: 8px var(--parcours-marge) 14px; gap: 12px; align-items: center; }
#e3 .ecran3-params { width: 100%; max-width: var(--parcours-largeur); }
/* Largeur utile réduite (tablette avec menu, mobile) : les trois paramètres s'empilent
   sur toute la largeur, dans le même ordre — le bloc « Niveau d'adaptation » ne se
   chevauche plus (défaut existant constaté le 01/12 à 820 px). */
#e3 .s2-scroll { container-type: inline-size; }
@container (max-width: 900px) {
  #e3 .ecran3-params { grid-template-columns: minmax(0, 1fr); }
  #e3 .ecran3-params > * { grid-column: auto; }
}
#e4 .tpl-gallery { width: 100%; max-width: var(--parcours-largeur); box-sizing: border-box; }

/* ── Écrans 5 à 8 : mêmes marges extérieures réduites ─────────────── */
#s2 > .content-area, #s3 > .content-area, #s4 > .content-area, #s5 > .content-area { padding: 10px var(--parcours-marge) 14px; gap: 16px; }
#s5 .s5-result-card { max-width: 1200px; }

/* ── Boutons du bas des écrans 1 à 4 : plus compacts, zone tactile ≥ 40 px ── */
.ecran > .footer-bar, #s2 > .footer-bar, #s3 > .footer-bar, #s4 > .footer-bar, #s5 > .footer-bar { padding: 10px var(--parcours-marge); }
.ecran > .footer-bar .btn-filled { min-height: 40px; padding: 8px 18px !important; font-size: 13.5px !important; }
.ecran > .footer-bar .btn-text { min-height: 40px; }

/* ── Barre du haut : titre + état d'enregistrement, puis la trame ──── */
/* La règle d'origine impose height: 66px !important ; la barre passe sur deux lignes. */
.top-app-bar.top-app-bar--trame { height: auto !important; min-height: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "menu titre etat" "trame trame trame"; column-gap: 16px; row-gap: 6px; align-items: center; padding: 8px var(--parcours-marge) 10px; }
.top-app-bar--trame > .mobile-menu-btn { grid-area: menu; }
.top-app-bar--trame > .tab-titre { grid-area: titre; min-width: 0; }
.top-app-bar--trame .breadcrumb { font-size: 11.5px; }
.top-app-bar--trame #pageTitle { font-size: 17px !important; }
.top-app-bar--trame > .trame { grid-area: trame; }
.trame-etat { grid-area: etat; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 2px 12px; margin: 0; font-size: 12.5px; line-height: 1.4; text-align: right; color: var(--md-on-surface-variant, #5F6B7A); }
.trame-etat .cvp-milestone { flex-basis: auto; }

/* Largeur moyenne (tablette, petit ordinateur) : le titre garde toute la ligne ; l'état
   d'enregistrement passe sous la trame et n'apparaît que s'il apporte une information. */
@media (max-width: 1180px) {
  .top-app-bar.top-app-bar--trame { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "menu titre" "trame trame" "etat etat"; row-gap: 4px; }
  .trame-etat { justify-content: flex-start; text-align: left; font-size: 12px; }
  .trame-etat[data-save="info"] .cvp-save { display: none; }
  .trame-etat:empty, .trame-etat[data-save="info"]:not(:has(.cvp-milestone)) { display: none; }
}

/* ── Trame de progression (inspirée du bandeau de l'atelier IA et emploi) ── */
.trame { container-type: inline-size; min-width: 0; }
.trame-liste { display: flex; align-items: center; margin: 0; padding: 4px 2px; list-style: none; min-width: 0; }
.trame-etape { display: flex; align-items: center; flex: 0 0 auto; min-width: 0; }
.trame-etape + .trame-etape { flex: 1 1 auto; }
/* Trait de liaison : fin, centré verticalement, jamais sous une pastille */
.trame-etape + .trame-etape::before { content: ""; flex: 1 1 16px; min-width: 10px; height: 2px; margin: 0 8px; border-radius: 2px; background: var(--trame-gris-trait); }
.trame-etape:not([data-etat="avenir"])::before { background: var(--trame-vert); }
.trame-pastille { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 4px; border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--trame-nuit); font: inherit; font-size: 13px; font-weight: 400; line-height: 1; white-space: nowrap; cursor: pointer; transition-property: background-color, border-color, color, box-shadow; transition-duration: .15s; transition-timing-function: ease-out; }
/* Zone de clic portée à 40 px de haut sans agrandir la pastille */
.trame-pastille::after { content: ""; position: absolute; inset: -4px 0; }
.trame-pastille:focus-visible { outline: 2px solid #007A68; outline-offset: 3px; }
.trame-num { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 24px; height: 24px; border-radius: 50%; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* État 1 — terminé : fond crème, texte bleu nuit, coche */
.trame-etape[data-etat="fait"] .trame-pastille,
.trame-etape[data-etat="passe"] .trame-pastille { background: var(--trame-creme); }
.trame-etape[data-etat="fait"] .trame-num { background: #fff; color: #007A68; font-size: 13px; }
.trame-etape[data-etat="passe"] .trame-num { background: #fff; color: var(--trame-gris-texte); }
.trame-etape[data-etat="fait"] .trame-pastille:hover,
.trame-etape[data-etat="passe"] .trame-pastille:hover { background: #ECE7DA; }
/* État 2 — en cours : fond vert CVGator, texte bleu nuit en gras, mis en évidence */
.trame-etape[data-etat="courant"] .trame-pastille { background: var(--trame-courant); border-color: var(--trame-vert); font-weight: 700; box-shadow: 0 2px 8px rgba(0,167,142,.25); cursor: default; }
.trame-etape[data-etat="courant"] .trame-num { background: #fff; color: var(--trame-nuit); }
/* Déjà ouvert mais pas encore complet : comme « à venir », mais cliquable */
.trame-etape[data-etat="atteint"] .trame-pastille { background: #fff; border-color: var(--trame-gris-trait); }
.trame-etape[data-etat="atteint"] .trame-num { border: 1px solid var(--trame-gris-trait); }
.trame-etape[data-etat="atteint"] .trame-pastille:hover { border-color: var(--trame-vert); }
/* État 3 — à venir : fond blanc, bordure fine grise, texte gris lisible, non cliquable */
.trame-etape[data-etat="avenir"] .trame-pastille { background: #fff; border-color: var(--trame-gris-trait); color: var(--trame-gris-texte); cursor: default; }
.trame-etape[data-etat="avenir"] .trame-num { color: var(--trame-gris-texte); }

/* Largeur réduite (tablette, ordinateur étroit) : seul le libellé de l'étape en cours
   reste écrit ; les autres pastilles gardent leur numéro (nom complet lu par aria-label). */
@container (max-width: 940px) {
  .trame-etape:not([data-etat="courant"]) .trame-lib { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .trame-etape:not([data-etat="courant"]) .trame-pastille { padding: 0 3px; }
  .trame-etape + .trame-etape::before { margin: 0 5px; min-width: 6px; }
}
/* Mobile : pastilles numérotées seules, l'étape en cours est écrite en clair dessous */
@container (max-width: 470px) {
  .trame-etape[data-etat="courant"] .trame-lib { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .trame-etape[data-etat="courant"] .trame-pastille { padding: 0 3px; }
  .trame-etape + .trame-etape::before { margin: 0 3px; min-width: 4px; }
  #trame-annonce { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; display: block; margin: 4px 0 0; font-size: 12.5px; font-weight: 700; color: var(--trame-nuit); }
}

/* ── Galerie de modèles (même présentation que /templates.html) ────── */
.tpl-gallery--grille .tpl-gallery-titre { margin: 0; font-size: 15px; font-weight: 700; color: var(--md-on-surface, #293651); display: flex; align-items: center; gap: 8px; }
.tpl-gallery-nb { display: inline-flex; align-items: center; min-width: 26px; height: 22px; padding: 0 8px; border-radius: 999px; background: #E6F7F5; color: var(--cvg-green-text, #007A68); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tpl-gallery--grille .tpl-track.tpl-grille { display: grid; grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; overflow: visible; scroll-snap-type: none; padding: 4px; margin: 0; list-style: none; }
.tpl-gallery--grille .tpl-card { scroll-snap-align: none; display: flex; flex-direction: column; background: #fff; border: 1px solid #E5ECEB; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 18px rgba(0,167,142,.06); transition: box-shadow .25s ease, border-color .25s ease, transform .25s ease; }
@media (hover: hover) { .tpl-gallery--grille .tpl-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(0,167,142,.15); border-color: #b7e6df; } }
.tpl-gallery--grille .tpl-card.is-active { border-color: #00A78E; box-shadow: 0 0 0 3px rgba(0,167,142,.35), 0 10px 26px rgba(0,152,128,.18); }
/* La carte entière est un bouton : clic → aperçu agrandi + panneau latéral */
.tpl-carte { display: flex; flex-direction: column; flex: 1; width: 100%; padding: 0; margin: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: zoom-in; }
.tpl-carte:focus-visible { outline: 3px solid #007A68; outline-offset: -3px; border-radius: 16px; }
.tpl-thumb { position: relative; display: block; overflow: hidden; background: #F1F5F9; aspect-ratio: 1241 / 1756; }
.tpl-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .45s ease; }
@media (hover: hover) { .tpl-gallery--grille .tpl-card:hover .tpl-thumb img { transform: scale(1.04); } }
.tpl-thumb-overlay { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 14px; background: linear-gradient(to top, rgba(41,54,81,.55), rgba(41,54,81,0) 45%); opacity: 0; transition: opacity .25s ease; pointer-events: none; }
.tpl-thumb-overlay .peek { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.95); color: #293651; font-size: 13px; font-weight: 700; box-shadow: 0 4px 14px rgba(0,0,0,.15); }
.tpl-thumb-overlay .material-icons-round { font-size: 18px; }
@media (hover: hover) { .tpl-gallery--grille .tpl-card:hover .tpl-thumb-overlay { opacity: 1; } }
.tpl-badge-candidature { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.95); border: 1px solid #b7e6df; color: #00695A; font-size: 11.5px; font-weight: 700; box-shadow: 0 2px 8px rgba(0,167,142,.12); }
.tpl-badge-candidature .material-icons-round { font-size: 14px; }
.tpl-gallery--grille .tpl-card-check { position: absolute; top: 10px; right: 10px; z-index: 1; width: 32px; height: 32px; border-radius: 50%; background: #007A68; color: #fff; display: none; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.tpl-gallery--grille .tpl-card.is-active .tpl-card-check { display: flex; }
.tpl-body { display: flex; flex-direction: column; gap: 4px; flex: 1; padding: 12px 14px 14px; }
.tpl-name { font-family: var(--font-display, 'Comfortaa', 'Montserrat', sans-serif); font-size: 15px; font-weight: 700; color: #293651; }
.tpl-tag { min-height: 34px; font-size: 12.5px; line-height: 1.45; color: #5F6B7A; text-wrap: pretty; }
.tpl-infos { display: flex; flex-wrap: wrap; gap: 6px; }
.tpl-info { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: #F1F5F9; color: #5F6B7A; font-size: 11.5px; font-weight: 600; }
.tpl-info .material-icons-round { font-size: 14px; }
.tpl-etat { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 13px; font-weight: 700; color: #00695A; }
.tpl-etat .material-icons-round { font-size: 17px; }
.tpl-card.is-active .tpl-etat { color: #007A68; }

/* ── Aperçu agrandi (reprend /templates.html : fond assombri et flouté,
      CV au centre-gauche en A4, panneau à droite) ───────────────────── */
.tpl-apercu { position: fixed; inset: 0; z-index: 5000; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(20,29,46,.86); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tpl-apercu[hidden] { display: none; }
.tpl-apercu-dialog { position: relative; display: flex; align-items: stretch; gap: 30px; max-width: 96vw; }
.tpl-apercu-scene { position: relative; height: 88vh; aspect-ratio: 1241 / 1756; max-width: 62vw; overflow: hidden; border-radius: 12px; background: #fff; box-shadow: 0 24px 60px rgba(0,0,0,.4); cursor: zoom-in; }
.tpl-apercu-scene img { display: block; width: 100%; height: 100%; object-fit: contain; transition: transform .25s ease; transform-origin: top center; }
.tpl-apercu-scene.zoom { overflow: auto; cursor: zoom-out; }
.tpl-apercu-scene.zoom img { height: auto; object-fit: fill; transform: scale(1.7); }
.tpl-apercu-cote { display: flex; flex-direction: column; width: 280px; flex: none; padding: 8px 4px; color: #fff; }
.tpl-apercu-nom { font-family: var(--font-display, 'Comfortaa', sans-serif); font-size: 22px; font-weight: 700; line-height: 1.25; }
.tpl-apercu-compte { margin-top: 10px; font-size: 13px; letter-spacing: .04em; color: rgba(255,255,255,.62); font-variant-numeric: tabular-nums; }
.tpl-apercu-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tpl-apercu-badges .tpl-info { background: rgba(255,255,255,.14); color: #fff; }
.tpl-apercu-desc { margin-top: 16px; font-size: 13.5px; line-height: 1.6; color: rgba(255,255,255,.82); text-wrap: pretty; }
.tpl-apercu-pied { margin-top: auto; padding-top: 24px; }
.tpl-apercu-pied .btn-filled { width: 100%; justify-content: center; min-height: 44px; }
.tpl-apercu-fermer, .tpl-apercu-nav { position: absolute; z-index: 2; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; transition: background-color .2s ease; }
.tpl-apercu-fermer { top: -14px; right: -14px; width: 44px; height: 44px; }
.tpl-apercu-nav { top: 50%; transform: translateY(-50%); width: 46px; height: 46px; }
.tpl-apercu-nav.prev { left: -64px; }
.tpl-apercu-nav.next { right: -64px; }
.tpl-apercu-fermer:hover, .tpl-apercu-nav:hover { background: rgba(255,255,255,.28); }
.tpl-apercu-fermer:focus-visible, .tpl-apercu-nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* Écran peu large : les flèches passent sur l'image pour ne pas sortir de l'écran */
@media (max-width: 1180px) {
  .tpl-apercu-nav.prev { left: 8px; }
  .tpl-apercu-nav.next { right: 8px; }
  .tpl-apercu-nav { background: rgba(20,29,46,.6); }
}
@media (max-width: 900px) {
  .tpl-apercu { padding: 12px; align-items: flex-start; overflow-y: auto; }
  .tpl-apercu-dialog { flex-direction: column; align-items: center; gap: 14px; max-width: 94vw; margin-top: 28px; }
  .tpl-apercu-scene { height: auto; width: 100%; max-width: 94vw; max-height: 62vh; overflow: auto; aspect-ratio: auto; }
  .tpl-apercu-scene img { height: auto; }
  .tpl-apercu-cote { width: 100%; padding: 0; text-align: center; }
  .tpl-apercu-badges { justify-content: center; }
  .tpl-apercu-pied { padding-top: 14px; }
  .tpl-apercu-nav { top: 30vh; }
  /* Fermeture toujours visible : posée sur l'image, dans l'écran */
  .tpl-apercu-fermer { top: 8px; right: 8px; background: rgba(20,29,46,.72); }
}

/* ── Tablette et mobile ────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --parcours-marge: 12px; }
  .top-app-bar.top-app-bar--trame { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "menu titre" "trame trame" "etat etat"; padding: 6px 12px 8px; row-gap: 4px; }
  .top-app-bar--trame #pageTitle { font-size: 15px !important; }
  .trame-etat { justify-content: flex-start; text-align: left; font-size: 12px; }
  .trame-etat[data-save="info"] .cvp-save { display: none; }
  .ecran-tete { padding: 8px var(--parcours-marge) 0; }
  .ecran-titre { font-size: 16px; }
  .ecran-texte { font-size: 12.5px; }
  .ecran-zone { padding: 8px var(--parcours-marge) 12px; }
  .ecran-zone > .card { padding: 14px; }
  .ecran .s2-scroll { padding: 8px 12px 12px; }
  .ecran > .footer-bar { padding: 8px 12px; }
  #e1 #offre-text-area { min-height: 200px; }
  #e2 #cv-upload-zone { min-height: 130px; }
  #e2 #cv-text-area { min-height: 220px; }
  .ecran .import-opt { padding: 8px 30px 8px 10px; column-gap: 8px; }
  .ecran .import-opt .imp-desc { display: none; }
  #e1 #offre-zone-lien > div:first-of-type { margin-bottom: 8px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .tpl-gallery--grille .tpl-card, .tpl-thumb img, .tpl-thumb-overlay, .tpl-apercu-scene img { transition: none; }
}

/* ── Thème sombre ──────────────────────────────────────────────────── */
html.dark .ecran-titre { color: #E3E6EA; }
html.dark .ecran-texte { color: #B7C0CC; }
html.dark .tpl-gallery--grille .tpl-card { background: #1E1F20; border-color: #3C4043; }
html.dark .tpl-name { color: #E3E6EA; }
html.dark .tpl-tag { color: #B7C0CC; }
html.dark .tpl-info { background: #2D2E2F; color: #B7C0CC; }
html.dark .tpl-etat { color: #7DD3C4; }
html.dark .cv-file-status.is-ok { background: #0F3A34; border-color: #1E5F56; color: #E3E6EA; }
/* Trame en thème sombre : mêmes trois états, contrastes conservés */
html.dark .trame-etape + .trame-etape::before { background: #3C4043; }
html.dark .trame-etape:not([data-etat="avenir"])::before { background: #7DD3C4; }
html.dark .trame-etape[data-etat="fait"] .trame-pastille,
html.dark .trame-etape[data-etat="passe"] .trame-pastille { background: #2D2E2F; color: #E3E6EA; }
html.dark .trame-etape[data-etat="fait"] .trame-num, html.dark .trame-etape[data-etat="passe"] .trame-num { background: #1E1F20; color: #7DD3C4; }
html.dark .trame-etape[data-etat="atteint"] .trame-pastille,
html.dark .trame-etape[data-etat="avenir"] .trame-pastille { background: #1E1F20; border-color: #3C4043; color: #B7C0CC; }
html.dark .trame-etape[data-etat="avenir"] .trame-num { color: #B7C0CC; }
html.dark .trame-etat, html.dark #trame-annonce { color: #E3E6EA; }
