/* ============================================================
   FORSEM — Editorial Design System
   Nonprofit cultural association, bilingual FR/EN
   Target: OVH shared hosting (no build tools, pure CSS)
   ============================================================ */

/* === DESIGN TOKENS === */
:root {
  --navy:        #007fb8;
  --navy-dark:   #005f8a;
  --terra:       #c75b39;
  --terra-light: #d96e4e;
  --bg:          #f8f6f1;
  --bg-alt:      #f0ebe3;
  --white:       #ffffff;
  --text:        #2c2c2c;
  --muted:       #6b6b6b;
  --border:      #ddd8d0;
  --shadow:      0 2px 8px rgba(0,0,0,0.08);
  --radius:      3px;
  --container:   1100px;
  --sidebar-w:   300px;
  --font-serif:  Georgia, 'Times New Roman', Times, serif;
  --font-sans:   -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --s1: 0.5rem; --s2: 1rem; --s3: 1.5rem;
  --s4: 2rem;   --s5: 3rem; --s6: 4rem;
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans); font-size: 1rem; line-height: 1.7;
  color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased;
}
a { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--terra); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* === LAYOUT === */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--s3); }
.layout-home {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: var(--s5);
  align-items: start;
}
.layout-full  { max-width: 800px; }
.layout-wide  { max-width: 100%; }

/* === SKIP LINK === */
.skip-link {
  position: absolute; top: -100px; left: var(--s2);
  background: var(--navy); color: var(--white);
  padding: var(--s1) var(--s2); z-index: 1000;
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none; font-size: 0.875rem;
}
.skip-link:focus { top: 0; }

/* === HEADER === */
#site-header { background: var(--navy); color: var(--white); padding: .2rem 0; }
#site-header .container {
  display: flex; align-items: center;
  justify-content: space-between; gap: var(--s3);
}
.site-brand { display: flex; flex-direction: row; align-items: center; gap: .8rem; text-decoration: none; }
.logo-frame {
  width: auto; height: 52px;
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.site-brand img { width: auto; height: 100%; max-width: none; object-fit: contain; object-position: center; }
.brand-text { text-align: left; }
.brand-text h1 {
  font-family: var(--font-serif); font-size: 1.4rem; font-weight: 700;
  color: var(--white); line-height: 1.2;
}
.brand-text .tagline {
  font-size: 1rem; color: #0b3f74;
  font-style: normal; font-weight: 700; margin-top: 2px;
}
.lang-switcher { display: flex; gap: 4px; }
.lang-switcher a {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em;
  color: rgba(255,255,255,0.65); text-decoration: none;
  padding: 2px 6px;
  border: 1px solid rgba(255,255,255,0.3); border-radius: 2px;
  transition: all 0.15s;
}
.lang-switcher a:hover, .lang-switcher a.active {
  background: var(--terra); color: var(--white); border-color: var(--terra);
}

/* === NAV === */
#site-nav {
  background: var(--white); border-bottom: 3px solid var(--terra);
  position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow);
  overflow-y: hidden;
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 0;
}
.nav-list {
  display: flex; gap: 0; flex-wrap: nowrap; align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.nav-list::-webkit-scrollbar { height: 0; }
.nav-list a {
  display: block; padding: 0.9rem var(--s2);
  font-size: 0.82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text); text-decoration: none; white-space: nowrap;
  border-bottom: 3px solid transparent; margin-bottom: -3px;
  transition: color 0.15s, border-color 0.15s;
}
.nav-list a:hover, .nav-list a.active { color: var(--terra); border-bottom-color: var(--terra); }
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: var(--s2); color: var(--text);
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; transition: all 0.2s; }
.join-btn {
  font-size: 0.78rem !important; font-weight: 700 !important;
  color: var(--white) !important; background: var(--terra);
  padding: 5px 14px !important; border-radius: var(--radius);
  border-bottom: none !important; margin-left: var(--s1) !important;
  white-space: nowrap;
}
.join-btn:hover { background: var(--terra-light); color: var(--white) !important; }

/* === MAIN === */
#main-content { min-height: 60vh; padding: var(--s5) 0; }

/* === PAGE HEADER === */
.page-header {
  margin-bottom: var(--s4); padding-bottom: var(--s3);
  border-bottom: 2px solid var(--border);
}
.page-header .eyebrow {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--terra); margin-bottom: var(--s1);
}
.page-header h1 {
  font-family: var(--font-serif); font-size: 2rem;
  line-height: 1.25; color: var(--navy); margin-bottom: var(--s1);
}
.page-header .meta {
  font-size: 0.875rem; color: var(--muted);
  display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center;
}
.page-header .meta .label { font-weight: 600; color: var(--text); }

/* === HERO === */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #33ccff 100%);
  color: var(--white);
  padding: calc(var(--s5) * 0.7) 0;
  margin-bottom: calc(var(--s5) * 0.7);
}
.hero h1 {
  font-family: var(--font-serif); font-size: 2.4rem; line-height: 1.2;
  margin-bottom: calc(var(--s2) * 0.7);
}
.hero p {
  font-size: 1.1rem; line-height: 1.6; opacity: 0.9; max-width: 600px;
  margin-bottom: calc(var(--s3) * 0.7);
}

/* === BUTTONS === */
.btn {
  display: inline-block; padding: 10px 22px;
  font-size: 0.85rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; text-decoration: none; border-radius: var(--radius);
  transition: all 0.15s; border: 2px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--terra); color: var(--white); border-color: var(--terra); }
.btn-primary:hover { background: var(--terra-light); border-color: var(--terra-light); color: var(--white); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.55); }
.btn-outline:hover { background: rgba(255,255,255,0.12); color: var(--white); }

/* === SECTION TITLE === */
.section-title {
  font-family: var(--font-serif); font-size: 1.2rem; font-weight: 700;
  color: var(--navy); padding-bottom: var(--s1);
  border-bottom: 2px solid var(--terra); margin-bottom: var(--s3);
  text-transform: uppercase; letter-spacing: 0.04em;
}

/* === EVENT CARDS === */
.event-list { display: flex; flex-direction: column; gap: var(--s3); }
.event-card {
  background: var(--white); border-left: 4px solid var(--terra);
  padding: var(--s2) var(--s3);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow); transition: transform 0.1s, box-shadow 0.1s;
}
.event-card:hover { transform: translateX(2px); box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.event-card .event-type {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--terra); margin-bottom: 3px;
}
.event-card .event-date { font-size: 0.8rem; font-weight: 700; color: var(--navy); margin-bottom: var(--s1); }
.event-card h3 { font-family: var(--font-serif); font-size: 0.975rem; font-weight: 700; line-height: 1.35; color: var(--navy); margin-bottom: var(--s1); }
.event-card h3 a { color: inherit; text-decoration: none; }
.event-card h3 a:hover { color: var(--terra); text-decoration: underline; }
.event-card .speaker { font-size: 0.85rem; color: var(--muted); font-style: italic; }
.event-card .location { font-size: 0.78rem; color: var(--muted); margin-top: 3px; }

/* === SIDEBAR === */
#sidebar { position: sticky; top: 70px; }
.sidebar-box { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: var(--s3); }
.sidebar-box-header {
  background: var(--navy); color: var(--white);
  padding: 8px var(--s2); font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.sidebar-box-content { padding: var(--s2); }

/* === NEWS GRID === */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px,1fr)); gap: var(--s3); margin-bottom: var(--s4); }
.news-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: box-shadow 0.15s;
}
.news-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.12); }
.news-card-body { padding: var(--s2); }
.news-card-body .eyebrow { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--terra); margin-bottom: var(--s1); }
.news-card-body h3 { font-family: var(--font-serif); font-size: 0.975rem; line-height: 1.35; color: var(--navy); margin-bottom: var(--s1); }
.news-card-body h3 a { color: inherit; text-decoration: none; }
.news-card-body h3 a:hover { color: var(--terra); }
.news-card-body p { font-size: 0.85rem; color: var(--muted); line-height: 1.5; }

/* === DOCUMENT LIST === */
.doc-list { display: flex; flex-direction: column; gap: var(--s1); }
.doc-item {
  display: flex; align-items: flex-start; gap: var(--s2);
  padding: var(--s2); background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius);
  text-decoration: none; transition: background 0.1s;
}
.doc-item:hover { background: var(--bg-alt); }
.doc-icon {
  width: 36px; height: 36px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; font-weight: 700; text-transform: uppercase;
  flex-shrink: 0; color: var(--white);
}
.doc-icon.pdf   { background: var(--terra); }
.doc-icon.video { background: #c0392b; }
.doc-icon.link  { background: var(--navy); }
.doc-meta h4 { font-size: 0.9rem; font-weight: 600; line-height: 1.3; color: var(--navy); margin-bottom: 2px; }
.doc-meta h4 a { color: inherit; text-decoration: none; }
.doc-meta h4 a:hover { color: var(--terra); text-decoration: underline; }
.doc-meta p { font-size: 0.8rem; color: var(--muted); }

/* === SECTION GROUPS (Archives) === */
.section-group { margin-bottom: var(--s5); }
.section-group-title {
  font-family: var(--font-serif); font-size: 1.1rem; font-weight: 700;
  color: var(--navy); margin-bottom: var(--s2);
  padding-left: var(--s2); border-left: 4px solid var(--terra);
}

/* === BODY CONTENT (rich text) === */
.body-content { font-size: 1rem; line-height: 1.8; color: var(--text); }
.body-content h2 {
  font-family: var(--font-serif); font-size: 1.45rem; color: var(--navy);
  margin: var(--s4) 0 var(--s2); padding-bottom: var(--s1); border-bottom: 1px solid var(--border);
}
.body-content h3 { font-family: var(--font-serif); font-size: 1.2rem; color: var(--navy); margin: var(--s3) 0 var(--s1); }
.body-content p  { margin-bottom: var(--s2); }
.body-content ul { list-style: disc; margin: var(--s2) 0; padding-left: var(--s3); }
.body-content ol { list-style: decimal; margin: var(--s2) 0; padding-left: var(--s3); }
.body-content li { margin-bottom: var(--s1); }
.body-content blockquote {
  margin: var(--s3) 0; padding: var(--s2) var(--s3);
  background: var(--bg-alt); border-left: 4px solid var(--terra);
  font-style: italic; font-size: 1.05rem;
}
.body-content a { color: var(--terra); }

/* === VIDEO EMBED === */
.video-responsive {
  position: relative; padding-top: 56.25%; background: #000;
  border-radius: var(--radius); overflow: hidden; margin-bottom: var(--s2);
}
.video-responsive iframe { position: absolute; top:0; left:0; width:100%; height:100%; border:none; }

/* === CTA BAND === */
.cta-band { background: var(--navy); color: var(--white); padding: var(--s4) 0; margin-top: var(--s5); }
.cta-band .container { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.cta-band h2 { font-family: var(--font-serif); font-size: 1.45rem; margin-bottom: var(--s1); }
.cta-band p  { font-size: 0.9rem; opacity: 0.8; max-width: 500px; }
.cta-actions { display: flex; gap: var(--s2); flex-wrap: wrap; }

/* === NEWSLETTER FORM === */
.newsletter-form { display: flex; gap: var(--s1); margin-top: var(--s2); flex-wrap: wrap; }
.newsletter-form input[type="email"] {
  flex: 1; min-width: 180px; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 0.85rem; background: var(--white);
}
.newsletter-form input[type="email"]:focus { outline: 2px solid var(--navy); outline-offset: 1px; }
.newsletter-form button {
  padding: 8px 14px; background: var(--terra); color: var(--white);
  border: none; border-radius: var(--radius);
  font-size: 0.85rem; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.newsletter-form button:hover { background: var(--terra-light); }

/* === FOOTER === */
#site-footer { background: var(--navy-dark); color: rgba(255,255,255,0.8); padding: var(--s5) 0 var(--s3); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--s5); margin-bottom: var(--s4); }
.footer-about .footer-logo { font-family: var(--font-serif); font-size: 1.2rem; color: var(--white); margin-bottom: var(--s2); font-weight: 700; }
.footer-about p { font-size: 0.875rem; line-height: 1.6; opacity: 0.75; }
.footer-nav h4, .footer-contact h4 { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--white); margin-bottom: var(--s2); }
.footer-nav ul li { margin-bottom: var(--s1); }
.footer-nav ul li a { font-size: 0.875rem; color: rgba(255,255,255,0.7); text-decoration: none; }
.footer-nav ul li a:hover { color: var(--terra-light); }
.footer-contact p { font-size: 0.875rem; opacity: 0.75; line-height: 1.7; }
.footer-contact a { color: rgba(255,255,255,0.85); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); padding-top: var(--s3);
  font-size: 0.78rem; color: rgba(255,255,255,0.45);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--s2);
}

/* === ALERTS === */
.alert { padding: var(--s2) var(--s3); border-radius: var(--radius); margin-bottom: var(--s3); font-size: 0.9rem; }
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* === FORMS === */
.form-group { margin-bottom: var(--s3); }
.form-group label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 6px; }
.form-group label .required { color: var(--terra); margin-left: 2px; }
.form-control {
  width: 100%; padding: 10px 12px; font-size: 0.9375rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--white); color: var(--text); font-family: var(--font-sans);
  transition: border-color 0.15s;
}
.form-control:focus { outline: 2px solid var(--navy); outline-offset: 1px; border-color: var(--navy); }
textarea.form-control { min-height: 140px; resize: vertical; }

/* === UTILITIES === */
.text-muted { color: var(--muted); }
.text-navy  { color: var(--navy);  }
.text-terra { color: var(--terra); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* === CONTACT FORM === */
.contact-form { max-width: 640px; }
.form-row { display: flex; flex-direction: column; margin-bottom: var(--s3); }
.form-row label { font-weight: 600; font-size: 0.875rem; text-transform: uppercase; letter-spacing: .04em; color: var(--navy); margin-bottom: var(--s1); }
.form-row input,
.form-row textarea { border: 1px solid #c8c0b4; border-radius: var(--radius); padding: var(--s2) var(--s2); font: inherit; font-size: 1rem; background: var(--white); color: var(--body); transition: border-color .15s; }
.form-row input:focus,
.form-row textarea:focus { outline: none; border-color: var(--terra); box-shadow: 0 0 0 3px rgba(199,91,57,.15); }
.form-row textarea { resize: vertical; min-height: 140px; }
.contact-form .btn { margin-top: var(--s1); }

/* === ADHESION ONLINE === */
.adhesion-tools,
.adhesion-upload {
  margin-top: var(--s5);
}
.adhesion-manual {
  margin-top: var(--s5);
}
.adhesion-online-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s3);
}
.adhesion-actions {
  display: flex;
  gap: var(--s2);
  flex-wrap: wrap;
  margin-top: var(--s2);
}

/* === STATEMENT / DECLARATIONS === */
.statement-body { font-size: 1.05rem; }
.statement-body p { line-height: 1.8; }
.statement-body blockquote { border-left: 4px solid var(--terra); padding-left: var(--s3); margin-left: 0; color: var(--muted); font-style: italic; }

@media print {
  .no-print,
  #site-header,
  #site-nav,
  #site-footer,
  .cta-band,
  .alert,
  .adhesion-upload {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  #main-content {
    padding: 0 !important;
  }

  .page-header {
    border-bottom: 1px solid #aaa;
    margin-bottom: 1rem;
  }

  .adhesion-online-form {
    border: 1px solid #aaa;
    box-shadow: none;
  }
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .layout-home { grid-template-columns: 1fr; }
  #sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .nav-list { display: none; flex-direction: column; width: 100%; border-top: 1px solid var(--border); padding: var(--s1) 0; }
  .nav-list.open { display: flex; }
  .nav-list a { padding: var(--s1) var(--s2); border-bottom: none; margin-bottom: 0; }
  #site-nav .nav-inner { flex-wrap: wrap; }
  .nav-toggle { display: block; }
  .hero h1 { font-size: 1.7rem; }
  .page-header h1 { font-size: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--s4); }
  .cta-band .container { flex-direction: column; align-items: flex-start; }
  .adhesion-actions .btn { width: 100%; text-align: center; }
}
@media (max-width: 480px) {
  .container { padding: 0 var(--s2); }
  .logo-frame { width: auto; height: 42px; }
  .brand-text .tagline { font-size: .9rem; }
  #main-content { padding: var(--s4) 0; }
}
