/* Mésocentre de calcul de Franche-Comté : feuille de style (sans dépendance externe) */
:root {
  --navy: #052a3d;
  --navy-2: #0a3c55;
  --red: #c8102e;
  --green: #afcb51;
  --ink: #1d2b36;
  --muted: #5a6b78;
  --line: #dde5ea;
  --bg: #f4f7f9;
  --card: #fff;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(5, 42, 61, .06), 0 6px 20px rgba(5, 42, 61, .07);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.65 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--navy-2); text-underline-offset: 2px; }
a:hover { color: var(--red); }
.container { width: min(1120px, 100% - 2rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--red); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 0; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

/* En-tête */
.site-header { background: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 0 var(--line); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; }
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--navy); }
.brand:hover { color: var(--navy); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.2rem; letter-spacing: -.01em; }
.brand-text span { color: var(--muted); font-size: 1rem; }
.uni img { display: block; height: 48px; width: auto; }
.mainnav { background: var(--navy); }
.mainnav ul { list-style: none; margin: 0; padding: 0; }
#menu { display: flex; flex-wrap: wrap; }
#menu > li { position: relative; }
#menu a { display: block; padding: .8rem 1rem; color: #fff; text-decoration: none; font-weight: 500; font-size: .95rem; }
#menu > li > a:hover, #menu > li:focus-within > a, #menu a[aria-current="page"] { background: var(--navy-2); }
#menu > li > a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--green); }
.sub { display: none; position: absolute; left: 0; top: 100%; min-width: 15rem; background: #fff; border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow); padding: .4rem 0; z-index: 10; }
.has-sub:hover > .sub, .has-sub:focus-within > .sub { display: block; }
#menu .sub a { color: var(--ink); font-weight: 400; padding: .55rem 1.1rem; }
#menu .sub a:hover, #menu .sub a[aria-current="page"] { background: var(--bg); color: var(--red); }
.nav-toggle { display: none; background: none; border: 0; color: #fff; font: inherit; font-weight: 600; padding: .8rem 0; cursor: pointer; }
.nav-toggle::before { content: ""; display: inline-block; width: 1.1em; height: .8em; margin-right: .6em; vertical-align: -.05em;
  background: linear-gradient(#fff 0 0) 0 0 / 100% 2px no-repeat, linear-gradient(#fff 0 0) 0 50% / 100% 2px no-repeat, linear-gradient(#fff 0 0) 0 100% / 100% 2px no-repeat; }

/* Accueil */
.hero { background: linear-gradient(135deg, var(--navy) 0%, #0b4a68 100%); color: #fff; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 3rem; align-items: center; padding: 3.5rem 0; }
.eyebrow { margin: 0 0 .6rem; text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; color: var(--green); font-weight: 700; }
.hero h1 { margin: 0 0 1rem; font-size: clamp(2rem, 4.5vw, 3.1rem); line-height: 1.1; letter-spacing: -.02em; }
.hero h1 span { display: block; color: var(--green); }
.lead { font-size: 1.15rem; color: #d3e3ec; max-width: 34rem; margin: 0 0 1.6rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 0; }
.btn { display: inline-block; background: var(--red); color: #fff; padding: .75rem 1.4rem; border-radius: 999px; font-weight: 600; text-decoration: none; border: 2px solid var(--red); transition: transform .15s, background .15s; }
.btn:hover { background: #a60d26; border-color: #a60d26; color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, .55); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }
.hero-photos { position: relative; aspect-ratio: 700 / 246; border-radius: var(--radius); overflow: hidden; box-shadow: 0 18px 40px rgba(0, 0, 0, .35); background: #000; }
.hero-photos img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-photos.run img { position: absolute; inset: 0; opacity: 0; transition: opacity .9s ease; }
.hero-photos.run img.on { opacity: 1; }

.clusters { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; margin-top: -2rem; position: relative; }
.cluster { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem 1.5rem; border-top: 4px solid var(--red); }
.cluster h2 { margin: 0 0 .6rem; font-size: 1.05rem; color: var(--navy); }
.cluster dl { display: flex; gap: 2rem; margin: 0; }
.cluster dd { margin: 0; font-size: 1.7rem; font-weight: 700; color: var(--navy); line-height: 1.1; }
.cluster dt { order: 2; color: var(--muted); font-size: .85rem; }
.cluster dl div { display: flex; flex-direction: column; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 2.5rem; }
.card { display: block; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.4rem 1.5rem; text-decoration: none; color: var(--ink); border: 1px solid transparent; transition: transform .15s, border-color .15s; }
.card:hover { transform: translateY(-3px); border-color: var(--green); color: var(--ink); }
.card h2 { margin: 0 0 .4rem; font-size: 1.15rem; color: var(--navy); }
.card h2::after { content: " →"; color: var(--red); }
.card p { margin: 0; color: var(--muted); }
.partners-band { text-align: center; padding: 3rem 0 3.5rem; }
.partners-band h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin: 0 0 1.2rem; }
.partners { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1.2rem 2.5rem; }
.partners img { display: block; height: 58px; width: auto; max-width: 160px; object-fit: contain; filter: grayscale(.3); }

/* Pages */
.page { padding: 1.5rem 0 3.5rem; width: min(60rem, 100% - 2rem); }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: var(--muted); }
.prose { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.2rem, 4vw, 3rem); }
.prose > :first-child { margin-top: 0; }
.prose h1 { font-size: clamp(1.6rem, 3.2vw, 2.1rem); line-height: 1.2; color: var(--navy); letter-spacing: -.01em; margin: 2.2rem 0 1rem; padding-bottom: .5rem; border-bottom: 3px solid var(--green); }
.prose h2 { font-size: 1.35rem; color: var(--navy); margin: 2rem 0 .8rem; }
.prose h3 { font-size: 1.1rem; color: var(--navy-2); margin: 1.5rem 0 .6rem; }
.prose p, .prose li { max-width: 70ch; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin: .3rem 0; }
.prose li::marker { color: var(--red); }
.prose .center { text-align: center; max-width: none; }
.prose img { border-radius: 6px; }
.prose img.logo-inline, .prose p > a > img { vertical-align: middle; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 1.2rem 0; font-size: .95rem; }
.prose th { background: var(--navy); color: #fff; text-align: left; font-weight: 600; }
.prose th, .prose td { padding: .6rem .9rem; border: 1px solid var(--line); vertical-align: top; }
.prose tr:nth-child(even) td { background: #f8fafb; }
.prose .note { background: #f6f9ec; border-left: 4px solid var(--green); padding: .8rem 1.2rem; border-radius: 0 8px 8px 0; }
.prose .btn { color: #fff; margin: .5rem 0; }
.prose .btn:hover { color: #fff; }
.map { margin: 1.5rem 0; }
.map iframe { width: 100%; height: 400px; border: 1px solid var(--line); border-radius: var(--radius); }

/* Formulaire d'inscription (le PDF généré n'est pas concerné par ce style) */
.prose table.inscription { display: table; width: 100%; margin: 1rem 0; font-size: .95rem; }
.prose table.inscription th { text-align: center; }
.prose table.inscription th.table_info { background: #f1f5f8; color: var(--ink); font-weight: 500; text-align: left; }
.prose table.inscription td { border: 0; border-bottom: 1px solid var(--line); padding: .4rem .6rem; background: none !important; }
.prose table.inscription td.label { font-weight: 600; white-space: nowrap; width: 1%; color: var(--navy); }
.prose input[type=text], .prose input:not([type]) { width: 100%; padding: .5rem .7rem; border: 1px solid #b8c6d0; border-radius: 8px; font: inherit; background: #fff; }
.prose input[type=text]:focus { border-color: var(--navy-2); outline: 2px solid var(--green); outline-offset: 0; }
.prose input[type=radio], .prose input[type=checkbox] { margin-right: .4rem; accent-color: var(--red); }
.prose input[type=submit] { background: var(--red); color: #fff; border: 0; border-radius: 999px; padding: .8rem 2rem; font: inherit; font-weight: 600; cursor: pointer; margin: 1rem 0; }
.prose input[type=submit]:hover { background: #a60d26; }

/* Pied de page */
.site-footer { background: var(--navy); color: #cfe0ea; padding: 2.5rem 0; margin-top: 1rem; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 2rem; }
.site-footer h2 { color: #fff; font-size: 1rem; margin: 0 0 .7rem; }
.site-footer address { font-style: normal; line-height: 1.8; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: .3rem 0; }
.site-footer a { color: #cfe0ea; }
.site-footer a:hover { color: var(--green); }
.funders { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.funders img { display: block; height: 64px; width: auto; background: #fff; padding: 6px; border-radius: 6px; }

/* Mobile */
@media (max-width: 860px) {
  .hero-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero-grid { padding: 2rem 0 3rem; gap: 2rem; }
  .clusters { grid-template-columns: 1fr; margin-top: -1.5rem; }
  .cards { grid-template-columns: 1fr 1fr; }
  .uni img { height: 38px; }
  .brand-text strong { font-size: 1.05rem; }
  .nav-toggle { display: block; }
  #menu { display: none; flex-direction: column; padding-bottom: .6rem; }
  #menu.open { display: flex; }
  #menu a { padding: .65rem 0; }
  .sub { display: block; position: static; background: transparent; box-shadow: none; padding: 0 0 0 1rem; }
  #menu .sub a { color: #b8d0de; padding: .4rem 0; }
  #menu .sub a:hover, #menu .sub a[aria-current="page"] { background: none; color: #fff; }
  #menu > li > a[aria-current="page"] { box-shadow: none; background: none; color: var(--green); }
  .prose table.inscription, .prose table.inscription tbody, .prose table.inscription thead, .prose table.inscription tfoot, .prose table.inscription tr, .prose table.inscription td, .prose table.inscription th { display: block; width: 100%; }
  .prose table.inscription td.label { width: 100%; white-space: normal; border: 0; padding-bottom: 0; }
}
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } .cluster dl { gap: 1.2rem; } }
@media print { .site-header, .site-footer, .crumbs, .nav-toggle { display: none; } body { background: #fff; } .prose { box-shadow: none; padding: 0; } }
