/* ============================================================
   TERRA NOVA — Menu accordéon, annonces, services
   S'appuie sur la coquille partagée (shell.css)
   ============================================================ */

/* ---------- Bloc titre ---------- */
.head { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.head h1 { font-size: clamp(2rem, 3.5vw, 3.1rem); font-weight: 500; line-height: 1.02; letter-spacing: -.02em; }
.head--tight { margin: 0; }

/* ---------- Bento du menu ---------- */
.menu-bento { flex: none; grid-template-columns: 1.15fr .8fr .95fr; grid-template-rows: minmax(200px, auto); }
.menu-bento > .hero-stats { grid-column: 1 / 3; }
.ann-bento { flex: none; grid-template-columns: 1fr 1fr; grid-template-rows: minmax(200px, auto); }
.article-bento { flex: 1; grid-template-columns: .85fr 1.15fr; grid-template-rows: minmax(0, 1fr); }
.chart-headline { font-size: 1.2rem; font-weight: 550; line-height: 1.1; }
.article-body { margin-top: 14px; font-size: 1rem; line-height: 1.75; }

@media (max-width: 1050px) {
  .menu-bento { grid-template-columns: 1fr 1fr; }
  .menu-bento > .hero-stats { grid-column: 1 / -1; }
  .ann-bento, .article-bento { grid-template-columns: 1fr; grid-template-rows: auto; }
  .ann-bento > *, .article-bento > * { grid-column: auto; grid-row: auto; }
}
@media (max-width: 760px) {
  .menu-bento { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Accordéon ---------- */
.acc {
  --s: 46px;
  display: flex;
  height: min(520px, 62vh);
  min-height: 380px;
  overflow: hidden;
  border-radius: var(--r);
}
.panel {
  position: relative;
  flex: 0 0 var(--s);
  width: var(--s);
  min-width: 0;
  margin-left: -1px;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: var(--r);
  background: var(--ink);
  outline: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
  animation: float-in .7s var(--ease) both;
  animation-delay: calc(var(--i) * 80ms);
  transition: flex-basis .8s var(--ease), background .5s, box-shadow .35s;
}
.panel:first-child { margin-left: 0; }
.panel.on { flex: 1 1 0; box-shadow: 0 20px 44px -24px rgba(0, 0, 0, .55); }
.panel:not(.on):hover { background: #423b37; }
.panel:focus-visible { box-shadow: inset 0 0 0 3px var(--acc); }
.panel__image { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; object-position: center; transition: transform .8s var(--ease), filter .5s; }
.panel::after { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, rgba(20, 18, 17, .08) 8%, rgba(20, 18, 17, .18) 42%, rgba(20, 18, 17, .8) 100%); content: ''; pointer-events: none; }
.panel.on .panel__image { transform: scale(1.03); }

.num {
  position: absolute;
  z-index: 1;
  top: 14px;
  left: 0;
  display: grid;
  width: calc(var(--s) - 2px);
  place-items: center;
  color: #fff;
  font-size: 2.9rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-shadow: 0 2px 12px rgba(0, 0, 0, .4);
  transition: color .4s;
}
.panel.on .num { color: var(--acc); }

.ico { position: absolute; z-index: 1; top: 34%; left: 8px; width: 28px; height: 28px; color: #fff; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .55)); transition: left .8s var(--ease), width .8s var(--ease), height .8s var(--ease), transform .8s var(--ease); }
.ico svg { display: block; width: 100%; height: 100%; }
.panel.on .ico { top: 22%; left: 50%; width: 86px; height: 86px; transform: translateX(-50%); }
.panel:not(.on) .ico { display: none; }

.txt { position: absolute; z-index: 1; top: 57%; left: 8px; width: min(660px, calc(100% - 90px)); color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .58); transition: left .8s var(--ease), transform .8s var(--ease); }
.panel:not(.on) .txt { top: 50%; bottom: auto; left: 50%; width: 300px; transform: translate(-50%, -50%) rotate(-90deg); transform-origin: center; text-align: center; }
.panel:not(.on) .txt em, .panel:not(.on) .open { display: none; }
.panel:not(.on) .txt strong { margin: 0; font-size: .76rem; white-space: nowrap; }
.panel.on .txt { top: 56%; left: 50%; width: min(660px, calc(100% - 90px)); transform: translateX(-50%); text-align: center; }
.txt strong { display: block; margin-bottom: 10px; font-size: 1.05rem; font-weight: 800; line-height: 1.1; text-transform: uppercase; }
.txt em { display: block; font-size: .8rem; font-style: normal; font-weight: 400; line-height: 1.5; }
.open {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 7px 7px 7px 18px;
  border-radius: 999px;
  background: var(--acc);
  color: var(--ink);
  font-size: .8rem;
  font-weight: 700;
  text-shadow: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .5s var(--ease) .2s, transform .6s var(--ease) .2s;
}
.open i { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; background: var(--ink); color: var(--bg); font-style: normal; transition: transform .4s var(--ease); }
.panel.on .open { opacity: 1; transform: none; }
.panel.on:hover .open i { transform: translateX(4px); }

/* ---------- Bandeau d'alerte (orange, pastille rouge vif) ---------- */
.alert-banner {
  display: grid;
  flex: none;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "identity actions" "message actions";
  align-items: center;
  gap: 5px 20px;
  padding: 14px 16px;
  border: 1px solid #c9821d;
  border-left: 5px solid var(--acc-deep);
  border-radius: 14px;
  background: var(--acc);
  box-shadow: 0 12px 34px -16px rgba(162, 96, 12, .5);
  color: var(--ink);
  animation: float-in .5s var(--ease) both;
}
.alert-banner__identity { grid-area: identity; display: flex; align-items: center; gap: 8px; color: rgba(33, 29, 28, .78); font-size: .62rem; font-weight: 750; letter-spacing: .09em; }
.alert-banner__dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--alert); animation: alert-blink 1s steps(1, end) infinite; }
.alert-banner__message { grid-area: message; min-width: 0; }
.alert-banner__message strong { display: block; overflow: hidden; color: var(--ink); font-size: .85rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.alert-banner__message p { margin: 3px 0 0; overflow: hidden; color: rgba(33, 29, 28, .78); font-size: .72rem; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.alert-banner__actions { grid-area: actions; display: flex; align-items: center; gap: 7px; }
.alert-banner__toggle, .alert-banner__regen, .alert-banner__close { display: inline-flex; min-height: 36px; align-items: center; justify-content: center; gap: 7px; border: 1px solid rgba(33, 29, 28, .26); border-radius: 999px; background: rgba(33, 29, 28, .08); color: var(--ink); font: inherit; text-decoration: none; cursor: pointer; transition: border-color .2s, background .2s, color .2s, transform .2s var(--ease); }
.alert-banner__toggle { padding: 0 13px; font-size: .7rem; font-weight: 650; white-space: nowrap; }
.alert-banner__regen { width: 36px; padding: 0; color: var(--ink); font-size: 1.05rem; }
.alert-banner__close { width: 36px; padding: 0; font-size: 1.1rem; }
.alert-banner__toggle:hover, .alert-banner__regen:hover, .alert-banner__close:hover { border-color: var(--ink); background: var(--ink); color: var(--acc); transform: translateY(-1px); }
.alert-banner__toggle[aria-expanded="true"] { border-color: var(--ink); background: var(--ink); color: var(--acc); }
.alert-banner--compact { grid-template-columns: 1fr; grid-template-areas: "identity" "message"; }
.alert-banner__regen:hover { animation: spin .9s var(--ease); }

@keyframes alert-blink {
  0%, 49% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 45, 32, .55); }
  50%, 100% { opacity: .25; box-shadow: 0 0 0 7px rgba(255, 45, 32, 0); }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Recommandations IA ---------- */
.alert-advice { flex: none; padding: 18px; border-radius: 16px; background: var(--surface); color: var(--ink); animation: float-in .35s var(--ease) both; }
.alert-advice[hidden] { display: none; }
.alert-advice__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.alert-advice__head h2 { font-size: 1rem; font-weight: 700; }
.alert-advice__head p { margin-top: 3px; color: var(--muted); font-size: .72rem; }
.alert-advice__badge { display: grid; width: 38px; height: 38px; flex: none; place-items: center; border-radius: 11px; background: var(--acc); color: var(--ink); font-size: .72rem; font-weight: 800; animation: badge-pulse 1.8s ease-in-out infinite; }
.alert-advice .advice-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; list-style: none; }
.alert-advice .advice-list li { display: flex; min-width: 0; align-items: flex-start; gap: 10px; padding: 12px; border-radius: 11px; background: var(--shell); color: #403a37; font-size: .76rem; line-height: 1.45; transition: transform .25s var(--ease), background .2s; }
.alert-advice .advice-list li:hover { transform: translateX(3px); background: var(--acc); }
.alert-advice .advice-list__icon { display: grid; width: 26px; height: 26px; flex: none; place-items: center; border-radius: 8px; background: var(--acc); color: var(--ink); font-size: .64rem; font-weight: 800; }
.alert-advice__foot { margin-top: 12px; color: var(--muted); font-size: .65rem; text-align: right; }
@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(223, 152, 48, .55); }
  50% { box-shadow: 0 0 0 8px rgba(223, 152, 48, 0); }
}

/* ---------- Annéeses ---------- */
.news { display: flex; flex-direction: column; gap: 18px; }
.news__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.news__head h2 { font-size: 1.28rem; font-weight: 550; line-height: 1.1; }
.news__all { font-size: .8rem; font-weight: 650; color: var(--acc-deep); }
.news__all:hover { text-decoration: underline; text-underline-offset: 3px; }
.news__list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; list-style: none; }
.news__item { opacity: 0; transform: translateY(16px); animation: float-in .65s var(--ease) both; animation-delay: calc(var(--i, 0) * 80ms); }
.news__item a { display: block; height: 100%; padding: 20px; border-radius: var(--r); background: var(--surface); transition: transform .25s var(--ease), background .25s, box-shadow .35s; }
.news__item a:hover { transform: translateY(-3px); background: var(--acc); box-shadow: 0 14px 30px -20px rgba(33, 29, 28, .5); }
.news__item time { display: block; margin-bottom: 8px; color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
.news__item a:hover time { color: rgba(33, 29, 28, .7); }
.news__item h3 { margin: 0 0 8px; font-size: 1.05rem; font-weight: 700; }
.news__item p { font-size: .85rem; line-height: 1.5; opacity: .8; }

/* ---------- Détail service ---------- */
.service-page { display: grid; flex: none; gap: 14px; }
.service-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr); gap: 14px; }
.service-visual { position: relative; min-width: 0; min-height: 420px; overflow: hidden; border-radius: var(--r); background: var(--ink); }
.service-visual::after { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 18, 17, .08), rgba(20, 18, 17, .06) 40%, rgba(20, 18, 17, .74)); content: ''; pointer-events: none; }
.service-visual img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; object-position: center; }
.service-visual__index, .service-visual__label { position: absolute; z-index: 1; color: #fff; }
.service-visual__index { top: 22px; left: 24px; font-size: 2.4rem; font-weight: 250; line-height: 1; }
.service-visual__index i { color: var(--acc); font-size: .85rem; font-style: normal; font-weight: 600; }
.service-visual__label { bottom: 24px; left: 24px; display: flex; align-items: center; gap: 8px; font-size: .65rem; font-weight: 700; letter-spacing: .1em; }
.service-visual__label i { width: 7px; height: 7px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 0 4px rgba(223, 152, 48, .18); }
.service-detail { display: flex; min-width: 0; flex-direction: column; justify-content: center; padding: clamp(26px, 4vw, 52px); overflow: hidden; border-radius: var(--r); background: var(--ink); color: var(--bg); }
.service-detail__eyebrow { color: var(--acc); font-size: .65rem; font-weight: 750; letter-spacing: .1em; }
.service-detail__eyebrow i { padding: 0 4px; font-style: normal; }
.service-detail h1 { margin: 18px 0 14px; color: #fff; font-size: clamp(2.1rem, 3.6vw, 3.4rem); font-weight: 300; line-height: 1; text-transform: uppercase; overflow-wrap: anywhere; }
.service-detail__lead { margin: 0; color: rgba(203, 203, 203, .76); font-size: .92rem; line-height: 1.65; }
.btn-cta { display: inline-flex; min-height: 46px; align-self: flex-start; align-items: center; justify-content: center; gap: 18px; margin-top: 26px; padding: 0 20px; border: 1px solid var(--acc); border-radius: 999px; background: var(--acc); color: var(--ink); font-size: .8rem; font-weight: 700; transition: background .2s, color .2s, transform .2s var(--ease); }
.btn-cta:hover { transform: translateY(-2px); background: transparent; color: var(--acc); }
.service-info { display: grid; grid-template-columns: minmax(210px, .7fr) minmax(0, 1.3fr); gap: 28px; padding: 26px 30px; border-radius: var(--r); background: var(--surface); }
.service-info__head { display: flex; align-items: flex-start; gap: 14px; }
.service-info__head h2 { margin-top: 7px; font-size: 1.25rem; font-weight: 550; }
.service-info__number { color: var(--acc-deep); font-size: 1.8rem; font-weight: 300; }
.service-detail__body { max-width: 72ch; color: #504a47; font-size: .9rem; line-height: 1.75; }

/* ---------- Adaptatif ---------- */
@media (max-width: 1000px) {
  .news__list { grid-template-columns: 1fr 1fr; }
  .service-hero { grid-template-columns: 1fr; }
  .service-visual { min-height: clamp(220px, 52vw, 340px); }
  .service-info { grid-template-columns: 1fr; gap: 15px; padding: 20px; }
}
@media (max-width: 760px) {
  .acc { height: auto; min-height: 0; flex-direction: column; gap: 8px; }
  .panel { flex: none; width: 100%; height: 78px; margin: -1px 0 0; transition: height .8s var(--ease), background .5s; }
  .panel.on { flex: none; width: 100%; height: 380px; }
  .panel__image { object-position: center 45%; }
  .num { left: 14px; width: auto; font-size: 1.8rem; writing-mode: horizontal-tb; transform: none; }
  .ico, .panel.on .ico { top: 16px; right: 16px; left: auto; width: 44px; height: 44px; transform: none; }
  .panel.on .ico { display: block; }
  .txt, .panel.on .txt { top: 68px; left: 14px; width: auto; text-align: left; transform: none; }
  .panel:not(.on) .txt { top: 50%; right: 54px; bottom: auto; left: 70px; width: auto; transform: translateY(-50%); text-align: left; }
  .panel:not(.on) .txt strong { font-size: .9rem; white-space: normal; }
  .news__list { grid-template-columns: 1fr; }
  .alert-banner { gap: 7px 10px; padding: 12px; }
  .alert-banner__actions { gap: 4px; }
  .alert-banner__toggle { padding: 0 10px; font-size: .64rem; }
  .alert-banner__regen, .alert-banner__close { width: 32px; min-height: 32px; }
  .alert-advice { padding: 14px; }
  .alert-advice .advice-list { grid-template-columns: 1fr; }
  .service-detail h1 { margin: 13px 0 10px; font-size: clamp(1.8rem, 8vw, 2.6rem); }
  .service-detail { min-height: 300px; padding: 24px; }
  .service-detail__lead { font-size: .86rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .panel, .news__item { opacity: 1; transform: none; }
}