/* ============================================================
   FAC Insights — « Comprendre aujourd'hui, anticiper demain »
   Refonte premium de la page Actualités & Perspectives.
   S'appuie sur la charte FAC (navy/vert, Bookman) définie dans styles.css.
   ============================================================ */
:root {
  --ins-grad: linear-gradient(135deg, #001c38 0%, #00284f 55%, #013a2a 130%);
  --ins-line: rgba(255, 255, 255, .10);
  --ins-glow: radial-gradient(60% 80% at 78% 20%, rgba(0, 128, 64, .28), transparent 60%),
              radial-gradient(50% 70% at 12% 90%, rgba(31, 92, 168, .30), transparent 60%);
}

/* ---------- Hero immersif ---------- */
.ins-hero {
  position: relative; overflow: hidden; color: #fff;
  background: var(--ins-grad);
  padding: clamp(5rem, 12vh, 9rem) 0 clamp(3rem, 7vh, 5rem);
  min-height: min(88vh, 780px); display: flex; align-items: center;
}
.ins-hero::before { content: ""; position: absolute; inset: 0; background: var(--ins-glow); pointer-events: none; }
.ins-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; pointer-events: none; }
.ins-hero-bg .grid-line { stroke: var(--ins-line); stroke-width: 1; }
.ins-hero-bg .spark { fill: none; stroke-width: 2; stroke-linecap: round; opacity: .9; }
.ins-hero-bg .spark.g { stroke: #2fd07f; }
.ins-hero-bg .spark.b { stroke: #6fa8ff; }
.ins-hero-bg .spark { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: insDraw 3.2s var(--fac-ease, ease) forwards; }
.ins-hero-bg .spark.b { animation-delay: .5s; }
.ins-hero-bg .dot { fill: #2fd07f; opacity: 0; animation: insDot 4s ease-in-out infinite; }
@keyframes insDraw { to { stroke-dashoffset: 0; } }
@keyframes insDot { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }

.ins-hero .container { position: relative; z-index: 2; display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.ins-hero-eyebrow { display: inline-flex; align-items: center; gap: .6rem; font-size: .74rem; letter-spacing: .22em; text-transform: uppercase; color: #9fd8bb; font-weight: 700; }
.ins-hero-eyebrow::before { content: ""; width: 26px; height: 2px; background: linear-gradient(90deg, #2fd07f, transparent); }
.ins-hero h1 { font-family: var(--serif); font-size: clamp(2.3rem, 5.2vw, 4rem); line-height: 1.04; margin: 1.1rem 0 1.1rem; letter-spacing: -.01em; }
.ins-hero h1 .accent { background: linear-gradient(100deg, #37e08a, #7cf0b6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ins-hero-lead { font-size: clamp(1.02rem, 1.5vw, 1.2rem); color: rgba(255, 255, 255, .82); max-width: 46ch; line-height: 1.6; }
.ins-hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.9rem; }
.ins-hero-actions .btn-light { background: #fff; color: var(--navy); }
.ins-hero-actions .btn-ghost-l { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .4); }
.ins-hero-actions .btn-ghost-l:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }

/* Carte « à la une » flottante dans le hero */
.ins-hero-feature { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); border-radius: var(--radius-lg); padding: 1.5rem 1.6rem; backdrop-filter: blur(6px); box-shadow: 0 30px 70px rgba(0, 10, 30, .4); transition: transform .4s var(--fac-ease, ease); }
.ins-hero-feature:hover { transform: translateY(-4px); }
.ins-hero-feature .fk { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: #9fd8bb; font-weight: 700; }
.ins-hero-feature h3 { font-family: var(--serif); font-size: 1.32rem; line-height: 1.22; margin: .6rem 0 .5rem; color: #fff; }
.ins-hero-feature p { color: rgba(255, 255, 255, .74); font-size: .92rem; line-height: 1.55; margin: 0 0 1rem; }
.ins-hero-feature .fm { display: flex; align-items: center; gap: .5rem; font-size: .78rem; color: rgba(255, 255, 255, .6); }
.ins-hero-feature .fmore { color: #37e08a; font-weight: 700; font-size: .88rem; cursor: pointer; }

.ins-scroll { position: absolute; left: 50%; bottom: 1.4rem; transform: translateX(-50%); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: .4rem; color: rgba(255, 255, 255, .55); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; }
.ins-scroll .mouse { width: 22px; height: 34px; border: 1.5px solid rgba(255, 255, 255, .4); border-radius: 12px; position: relative; }
.ins-scroll .mouse::after { content: ""; position: absolute; top: 6px; left: 50%; width: 3px; height: 7px; background: #fff; border-radius: 2px; transform: translateX(-50%); animation: insWheel 1.6s ease-in-out infinite; }
@keyframes insWheel { 0%, 100% { opacity: 0; transform: translate(-50%, 0); } 40% { opacity: 1; } 80% { opacity: 0; transform: translate(-50%, 10px); } }

/* ---------- Barre de filtres thématiques ---------- */
.ins-filterbar { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.ins-filterbar .container { display: flex; align-items: center; gap: 1rem; padding: .7rem 0; }
.ins-search { position: relative; flex: none; }
.ins-search input { border: 1px solid var(--line); border-radius: 999px; padding: .5rem .9rem .5rem 2.1rem; font-family: var(--sans); font-size: .88rem; width: 200px; transition: width .3s var(--fac-ease, ease), border-color .2s; }
.ins-search input:focus { outline: none; border-color: var(--green); width: 240px; }
.ins-search svg { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.ins-chips { display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none; padding: .1rem; }
.ins-chips::-webkit-scrollbar { display: none; }
.ins-chip { flex: none; border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 999px; padding: .42rem .95rem; font-family: var(--sans); font-size: .84rem; cursor: pointer; white-space: nowrap; transition: all .22s var(--fac-ease, ease); }
.ins-chip:hover { border-color: var(--navy); color: var(--navy); }
.ins-chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ---------- Section wrapper ---------- */
.ins-sec { padding: clamp(3.5rem, 8vh, 6rem) 0; }
.ins-sec.soft { background: var(--bg-soft); }
.ins-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap; }
.ins-head .eyebrow { color: var(--green-600); font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; }
.ins-head h2 { font-family: var(--serif); font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.1; margin: .35rem 0 0; color: var(--navy); }
.ins-head .lead { color: var(--muted); max-width: 52ch; margin: .5rem 0 0; }

/* ---------- Grille éditoriale (formats variés) ---------- */
.ins-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(1.1rem, 2vw, 1.7rem); }
.ins-card { grid-column: span 4; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); transition: transform .35s var(--fac-ease, ease), box-shadow .35s var(--fac-ease, ease), border-color .35s; cursor: pointer; }
.ins-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: #cfd9e6; }
.ins-card:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.ins-thumb { aspect-ratio: 16 / 10; background: var(--bg-navy-soft) center/cover no-repeat; position: relative; overflow: hidden; }
.ins-thumb.ph { background: linear-gradient(90deg, rgba(0,51,102,.045) 1px, transparent 1px) 0 0 / 32px 32px, linear-gradient(rgba(0,51,102,.045) 1px, transparent 1px) 0 0 / 32px 32px, linear-gradient(135deg, #eef3f9 0%, #d9e6f4 100%); }
.ins-thumb.ph::before { content: ""; position: absolute; right: -6%; bottom: -14%; width: 56%; height: 128%; background: url("/assets/horse-blue-full.png") no-repeat center / contain; opacity: .08; pointer-events: none; }
.ins-thumb.ph::after { content: ""; position: absolute; left: 1.1rem; bottom: 1rem; width: 34px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--green), transparent); }
.ins-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--fac-ease, ease); }
.ins-card:hover .ins-thumb img { transform: scale(1.05); }
.ins-cat { position: absolute; top: .8rem; left: .8rem; background: rgba(255, 255, 255, .95); color: var(--navy); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; padding: .28rem .6rem; border-radius: 999px; }
.ins-body { padding: 1.15rem 1.25rem 1.35rem; display: flex; flex-direction: column; flex: 1; }
.ins-body h3 { font-family: var(--serif); font-size: 1.18rem; line-height: 1.25; margin: 0 0 .5rem; color: var(--navy); }
.ins-body p { color: var(--muted); font-size: .92rem; line-height: 1.55; margin: 0 0 1rem; flex: 1; }
.ins-meta { display: flex; align-items: center; gap: .5rem; font-size: .78rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: .8rem; }
.ins-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); opacity: .5; }
.ins-meta .rt { margin-left: auto; }

/* Format « feature » : 8 colonnes, image large à gauche */
.ins-card.feature { grid-column: span 8; flex-direction: row; }
.ins-card.feature .ins-thumb { aspect-ratio: auto; width: 48%; flex: none; }
.ins-card.feature .ins-body { padding: 1.8rem 2rem; justify-content: center; }
.ins-card.feature .ins-body h3 { font-size: clamp(1.4rem, 2.4vw, 2rem); }
.ins-card.feature .ins-body p { font-size: 1rem; }
/* Format horizontal : 6 colonnes, vignette compacte */
.ins-card.wide { grid-column: span 6; flex-direction: row; align-items: stretch; }
.ins-card.wide .ins-thumb { aspect-ratio: auto; width: 38%; flex: none; }
/* Brève : 4 colonnes, sans image */
.ins-card.brief { grid-column: span 4; }
.ins-card.brief .ins-body { padding: 1.3rem 1.35rem; }
.ins-card.brief .ins-body h3 { font-size: 1.05rem; }

.ins-grid .reveal { transition: opacity .6s var(--fac-ease, ease), transform .6s var(--fac-ease, ease); }

/* ---------- Secteurs ---------- */
.ins-sectors { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .9rem; }
.ins-sector { position: relative; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem 1.2rem; background: #fff; overflow: hidden; transition: transform .3s var(--fac-ease, ease), box-shadow .3s, border-color .3s; }
.ins-sector::after { content: ""; position: absolute; right: -30px; bottom: -30px; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle, rgba(0, 128, 64, .12), transparent 70%); transition: transform .4s var(--fac-ease, ease); }
.ins-sector:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #cfd9e6; }
.ins-sector:hover::after { transform: scale(1.6); }
.ins-sector .ic { font-size: 1.5rem; }
.ins-sector h4 { font-family: var(--serif); font-size: 1.02rem; color: var(--navy); margin: .5rem 0 .1rem; }
.ins-sector span { font-size: .8rem; color: var(--muted); }

/* ---------- Experts ---------- */
.ins-experts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.3rem; }
.ins-expert { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.6rem; box-shadow: var(--shadow-sm); transition: transform .3s var(--fac-ease, ease), box-shadow .3s; }
.ins-expert:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.ins-expert .av { width: 66px; height: 66px; border-radius: 50%; background: var(--bg-navy-soft) center/cover; display: grid; place-items: center; font-family: var(--serif); font-size: 1.3rem; color: var(--navy); font-weight: 700; overflow: hidden; }
.ins-expert h4 { font-family: var(--serif); color: var(--navy); margin: .9rem 0 .1rem; font-size: 1.12rem; }
.ins-expert .role { color: var(--green-600); font-size: .84rem; font-weight: 600; }
.ins-expert blockquote { margin: .9rem 0 0; color: var(--ink); font-size: .95rem; line-height: 1.55; border-left: 2px solid var(--green); padding-left: .9rem; }

/* ---------- Newsletter ---------- */
.ins-news { background: var(--ins-grad); color: #fff; border-radius: var(--radius-lg); padding: clamp(2.2rem, 5vw, 3.4rem); position: relative; overflow: hidden; }
.ins-news::before { content: ""; position: absolute; inset: 0; background: var(--ins-glow); pointer-events: none; }
.ins-news > * { position: relative; z-index: 1; }
.ins-news h2 { font-family: var(--serif); font-size: clamp(1.6rem, 3.2vw, 2.3rem); margin: .3rem 0 .6rem; }
.ins-news p { color: rgba(255, 255, 255, .8); max-width: 48ch; }
.ins-news-form { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; align-items: center; }
.ins-news-form input[type=email] { flex: 1; min-width: 220px; border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .1); color: #fff; border-radius: 999px; padding: .8rem 1.1rem; font-family: var(--sans); }
.ins-news-form input[type=email]::placeholder { color: rgba(255, 255, 255, .6); }
.ins-news-form input[type=email]:focus { outline: none; border-color: #37e08a; }
.ins-news-topics { display: flex; flex-wrap: wrap; gap: .5rem .9rem; margin-top: 1rem; }
.ins-news-topics label { display: inline-flex; align-items: center; gap: .4rem; font-size: .84rem; color: rgba(255, 255, 255, .82); cursor: pointer; }
.ins-news-consent { display: flex; align-items: flex-start; gap: .5rem; font-size: .78rem; color: rgba(255, 255, 255, .68); margin-top: 1rem; }
.ins-news-consent a { color: #9fd8bb; }
.ins-news-ok { display: none; margin-top: 1rem; background: rgba(55, 224, 138, .16); border: 1px solid rgba(55, 224, 138, .4); border-radius: 10px; padding: .7rem 1rem; color: #d6ffe9; }
.ins-news-err { color: #ffb4ac; font-size: .82rem; margin-top: .5rem; display: none; }

/* ---------- CTA final ---------- */
.ins-cta { text-align: center; padding: clamp(3.5rem, 8vh, 6rem) 0; }
.ins-cta h2 { font-family: var(--serif); font-size: clamp(1.9rem, 4vw, 2.8rem); color: var(--navy); margin: 0 0 .7rem; }
.ins-cta p { color: var(--muted); max-width: 46ch; margin: 0 auto 1.6rem; }
.ins-cta .row { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }

/* ---------- États ---------- */
.ins-empty { text-align: center; color: var(--muted); padding: 3rem 1rem; grid-column: 1 / -1; }
.ins-skel { grid-column: span 4; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.ins-skel .b { height: 170px; background: linear-gradient(100deg, #eef2f7 30%, #f7fafc 50%, #eef2f7 70%); background-size: 200% 100%; animation: insShimmer 1.3s infinite; }
.ins-skel .l { height: 14px; margin: 1rem 1.2rem; border-radius: 6px; background: linear-gradient(100deg, #eef2f7 30%, #f7fafc 50%, #eef2f7 70%); background-size: 200% 100%; animation: insShimmer 1.3s infinite; }
.ins-skel .l.s { width: 55%; }
@keyframes insShimmer { to { background-position: -200% 0; } }

/* ---------- Fenêtre de lecture (article) ---------- */
.actu-modal { position: fixed; inset: 0; z-index: 9999; display: none; align-items: flex-start; justify-content: center; padding: 24px; overflow: auto; background: rgba(8, 18, 38, .62); }
.actu-modal-card { background: #fff; max-width: 760px; width: 100%; margin: auto; border-radius: var(--radius-lg); padding: 2.4rem 2.6rem; box-shadow: 0 30px 80px rgba(0, 0, 0, .4); position: relative; }
.actu-progress { position: sticky; top: 0; height: 3px; background: linear-gradient(90deg, var(--green), var(--navy)); border-radius: 3px; width: 0; margin: -2.4rem -2.6rem 1.4rem; }
.actu-modal-x { position: absolute; top: 12px; right: 16px; border: 0; background: none; font-size: 30px; line-height: 1; cursor: pointer; color: var(--muted); }
.actu-modal-card h2 { font-family: var(--serif); color: var(--navy); line-height: 1.15; margin: .5rem 0 .3rem; }
.actu-modal-meta { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--muted); margin-bottom: 1.3rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .ins-hero .container { grid-template-columns: 1fr; }
  .ins-hero-feature { display: none; }
  .ins-card.feature, .ins-card.wide { grid-column: span 12; flex-direction: column; }
  .ins-card.feature .ins-thumb, .ins-card.wide .ins-thumb { width: 100%; aspect-ratio: 16 / 9; }
  .ins-card { grid-column: span 6; }
}
@media (max-width: 620px) {
  .ins-card, .ins-card.brief { grid-column: span 12; }
  .ins-filterbar .container { flex-direction: column; align-items: stretch; gap: .6rem; }
  .ins-search input, .ins-search input:focus { width: 100%; }
  .actu-modal-card { padding: 1.8rem 1.4rem; }
  .actu-progress { margin: -1.8rem -1.4rem 1.2rem; }
}

/* ---------- Accessibilité : mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  .ins-hero-bg .spark { animation: none; stroke-dashoffset: 0; }
  .ins-hero-bg .dot, .ins-scroll .mouse::after, .ins-skel .b, .ins-skel .l { animation: none; }
  .ins-card, .ins-sector, .ins-expert, .ins-hero-feature, .ins-thumb img { transition: none; }
  .ins-card:hover, .ins-sector:hover, .ins-expert:hover, .ins-hero-feature:hover { transform: none; }
}
