/* =========================================================
   TCS 2.1 — finitions : couvertures, pictogrammes, fiches d’offre,
   en-tête au défilement, formulaire de contact.
   ========================================================= */

/* ---------- Couvertures automatiques ---------- */
.couverture { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: .4rem; width: 100%; height: 100%; padding: 1.1rem 1.2rem; overflow: hidden; isolation: isolate; color: #fff; text-align: left;
  background-image: var(--facettes), linear-gradient(140deg, #0c1b2e, var(--nuit-2, #1b3654)); background-size: 240px 208px, cover; }
.couverture::before { content: ""; position: absolute; z-index: -1; right: -18%; top: -30%; width: 75%; aspect-ratio: 1; background: var(--or); background-size: 200% 100%; clip-path: polygon(50% 0, 100% 87%, 0 87%); opacity: .9; transform: rotate(12deg); }
.couverture::after { content: ""; position: absolute; z-index: -1; right: 12%; top: 18%; width: 30%; aspect-ratio: 1; background: rgba(16,35,58,.55); clip-path: polygon(50% 0, 100% 87%, 0 87%); transform: rotate(12deg); }
.couverture--nickel::before { background: var(--nickel); background-size: 200% 100%; }
.couverture--cuivre::before { background: var(--cuivre); background-size: 200% 100%; }
.couverture--diamant::before { background: var(--diamant); background-size: 200% 100%; }
.couverture__picto { position: absolute; top: 1rem; left: 1.1rem; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 12px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: #f7e7a6; backdrop-filter: blur(2px); }
.couverture--nickel .couverture__picto { color: #e9eef2; }
.couverture--cuivre .couverture__picto { color: #f0b48a; }
.couverture--diamant .couverture__picto { color: #d6f0fa; }
.couverture__annee { font-family: var(--titre); font-weight: 700; font-size: .8rem; letter-spacing: .2em; color: #e9cd78; }
.couverture__titre { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; max-width: 85%; font-family: var(--titre); font-weight: 600; font-size: 1.12rem; line-height: 1.22; text-shadow: 0 2px 14px rgba(0,0,0,.4); }
.carte__image--auto { background: var(--nuit); padding: 0; }
.carte:hover .couverture::before { background-position: 100% 50%; transition: background-position .8s; }
.ca-item__image--auto .couverture { padding: .7rem; justify-content: flex-end; }
.ca-item__image--auto .couverture__picto { top: .55rem; left: .6rem; width: 2rem; height: 2rem; border-radius: 9px; }
.ca-item__image--auto .couverture__picto svg { width: 20px; height: 20px; }
.ca-item__image--auto .couverture__annee { font-size: .7rem; }

/* ---------- Pictogrammes des offres ---------- */
.picto { display: block; flex-shrink: 0; }
.of-pepite__picto { display: grid; place-items: center; width: 3.1rem; height: 3.1rem; margin-bottom: 1rem; border-radius: 14px; background: var(--or); background-size: 200% 100%; color: #2a1e05; box-shadow: 0 .5rem 1rem -.5rem rgba(140,100,20,.7), inset 0 1px 0 rgba(255,255,255,.6); transition: background-position .6s, transform .3s; }
.of-filon--nickel .of-pepite__picto { background: var(--nickel); background-size: 200% 100%; color: #1d2a36; box-shadow: 0 .5rem 1rem -.5rem rgba(60,75,90,.6), inset 0 1px 0 rgba(255,255,255,.8); }
.of-filon--cuivre .of-pepite__picto { background: var(--cuivre); background-size: 200% 100%; color: #fff; box-shadow: 0 .5rem 1rem -.5rem rgba(125,61,27,.7), inset 0 1px 0 rgba(255,255,255,.4); }
.of-filon--diamant .of-pepite__picto { background: var(--diamant); background-size: 200% 100%; color: #15405a; box-shadow: 0 .5rem 1rem -.5rem rgba(60,110,140,.55), inset 0 0 0 1px #9cc2d4; }
.of-pepite:hover .of-pepite__picto { background-position: 100% 50%; transform: rotate(-6deg) scale(1.06); }

.ac-offre__picto { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 10px; background: #fff; color: var(--nuit); box-shadow: inset 0 0 0 1px var(--ligne); flex-shrink: 0; transition: .25s; }
.ac-offre:hover .ac-offre__picto { background: var(--or); background-size: 200% 100%; color: #2a1e05; box-shadow: none; }
.ac-offre__titre { flex: 1; }

.meme-filon__picto { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 9px; background: var(--sable); color: var(--nuit); flex-shrink: 0; }
.meme-filon__liste a:hover .meme-filon__picto { background: var(--or); background-size: 200% 100%; color: #2a1e05; }

.bandeau__picto { display: grid; place-items: center; width: 4.2rem; height: 4.2rem; margin-bottom: 1rem; border-radius: 18px; background: var(--or); background-size: 200% 100%; color: #2a1e05; box-shadow: 0 1rem 2rem -1rem rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.6); animation: eclat-texte 6s ease-in-out infinite; }
.bandeau__picto--nickel { background: var(--nickel); background-size: 200% 100%; color: #1d2a36; }
.bandeau__picto--cuivre { background: var(--cuivre); background-size: 200% 100%; color: #fff; }
.bandeau__picto--diamant { background: var(--diamant); background-size: 200% 100%; color: #15405a; }

/* ---------- Fiche d’offre structurée ---------- */
.fi { display: grid; gap: 1.25rem; }
.fi-bloc { position: relative; padding: 1.6rem 1.7rem; border-radius: 20px; background: #fff; border: 1px solid var(--ligne); }
.fi-bloc > p:last-child { margin-bottom: 0; }
.fi-etiquette { display: flex; align-items: center; gap: .7rem; margin: 0 0 .9rem; font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gris); }
.fi-num { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--nuit); color: #f7e7a6; font-family: var(--titre); font-size: .85rem; letter-spacing: 0; }
.fi-bloc--objectif { background-image: var(--facettes), linear-gradient(135deg, var(--nuit), var(--nuit-2, #1b3654)); background-size: 240px 208px, cover; border: 0; color: #d6dee8; }
.fi-bloc--objectif .fi-etiquette { color: #e9cd78; }
.fi-bloc--objectif .fi-num { background: var(--or); background-size: 200% 100%; color: #2a1e05; }
.fi-objectif { margin: 0 0 .8rem; font-family: var(--titre); font-size: clamp(1.25rem, 1.05rem + .8vw, 1.6rem); line-height: 1.35; color: #fff; }
.fi-etapes { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; counter-reset: none; }
.fi-etapes li { position: relative; display: flex; align-items: flex-start; gap: 1rem; padding: .85rem 1rem; border-radius: 12px; background: var(--sable); line-height: 1.45; }
.fi-etapes li span { flex-shrink: 0; font-family: var(--titre); font-weight: 700; color: var(--orange-fonce); min-width: 1.6rem; }
.fi-etapes li:not(:last-child)::after { content: ""; position: absolute; left: 1.75rem; bottom: -.55rem; width: 2px; height: .55rem; background: #d8b24a; }
.fi-duo { display: grid; gap: 1.25rem; }
@media (min-width: 48em) { .fi-duo { grid-template-columns: 1.1fr 1fr; } }
.fi-livrables { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.fi-livrables li { position: relative; padding-left: 1.9rem; line-height: 1.45; }
.fi-livrables li::before { content: ""; position: absolute; left: 0; top: .1rem; width: 1.2rem; height: 1.2rem; background: var(--or); background-size: 200% 100%; clip-path: polygon(25% 0, 75% 0, 100% 35%, 50% 100%, 0 35%); }
.fi-bloc--qui { background: var(--sable); border-color: transparent; display: flex; flex-direction: column; }
.fi-bloc--qui p { flex: 1; }
.fi-bloc--qui .bouton { align-self: flex-start; margin-top: .5rem; }

/* ---------- En-tête qui s’affine + barre de progression ---------- */
.entete { transition: box-shadow .3s, border-color .3s; }
.entete__grille { transition: min-height .3s; }
.marque__logo, .marque__symbole { transition: height .3s, width .3s; }
.entete--reduit { box-shadow: 0 .6rem 1.6rem -1rem rgba(16,35,58,.35); border-bottom-color: transparent; }
.entete--reduit .entete__grille { min-height: 3.9rem; }
.entete--reduit .marque__logo { height: 44px !important; }
.entete--reduit .marque__symbole { width: 36px; height: 36px; }
.entete--reduit .marque__texte small { opacity: 0; height: 0; overflow: hidden; }
.marque__texte small { transition: opacity .25s; }
.progression { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; pointer-events: none; }
.progression span { display: block; height: 100%; background: var(--or); background-size: 200% 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

/* ---------- Formulaire de contact ---------- */
.co-formulaire { margin-top: 2.5rem; }
.fo { padding: clamp(1.5rem, 1rem + 2vw, 2.6rem); border-radius: 24px; background: #fff; border: 1px solid var(--ligne); box-shadow: 0 1.6rem 3rem -2.2rem rgb(16 35 58 / .55); position: relative; overflow: hidden; }
.fo::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--or); background-size: 200% 100%; }
.fo__tete h2 { margin: .2rem 0 .4rem; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.fo__tete p:last-child { margin: 0 0 1.5rem; color: var(--gris); font-size: .95rem; }
.fo__grille { display: grid; gap: 1rem 1.25rem; }
@media (min-width: 40em) { .fo__grille { grid-template-columns: 1fr 1fr; } .fo__champ--large { grid-column: 1 / -1; } }
.fo__champ { margin: 0; display: flex; flex-direction: column; gap: .35rem; }
.fo__champ label { font-size: .85rem; font-weight: 600; color: var(--nuit); }
.fo__champ input, .fo__champ select, .fo__champ textarea { width: 100%; padding: .8rem .95rem; border-radius: 12px; border: 1.5px solid var(--ligne); background: var(--sable); font: inherit; font-size: 1rem; color: var(--encre); transition: border-color .2s, background .2s, box-shadow .2s; }
.fo__champ textarea { resize: vertical; min-height: 8rem; }
.fo__champ input:focus, .fo__champ select:focus, .fo__champ textarea:focus { outline: none; background: #fff; border-color: #d8b24a; box-shadow: 0 0 0 4px rgba(216,178,74,.22); }
.fo__envoyer { margin-top: 1.4rem; cursor: pointer; font: inherit; font-weight: 600; font-size: 1rem; }
.fo__piege { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fo__alerte { margin: 0 0 1.25rem; padding: .9rem 1.1rem; border-radius: 12px; background: #fdecea; color: #8a1f12; font-weight: 600; }
.fo__alerte--ok { background: #e7f4ee; color: #1f5c41; }

@media (prefers-reduced-motion: reduce) {
  .bandeau__picto { animation: none; }
  .entete, .entete__grille, .marque__logo { transition: none; }
}

/* Pictogrammes dans la colonne « Nos offres » */
.aside__bloc li a:has(.aside__picto) { display: flex; gap: .55rem; align-items: flex-start; }
.aside__picto { margin-top: .2rem; color: #b08a2c; opacity: .85; }
.aside__bloc li.est-courant .aside__picto, .aside__bloc li a:hover .aside__picto { color: var(--orange); opacity: 1; }

/* Sur mobile, les triangles décoratifs du bandeau passent derrière et s’effacent pour ne pas gêner le titre */
@media (max-width: 40em) {
  .bandeau > .conteneur { position: relative; z-index: 1; }
  .bandeau::after { opacity: .35; width: 7rem; height: 6rem; }
  .bandeau::before { display: none; }
}
