/* ============================================================
   Mathématiques Sans Frontières – Suisse Romande
   Feuille de style principale
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --blue:       #1a4f8a;
  --blue-light: #2e6eb5;
  --blue-bg:    #eaf1fb;
  --red:        #c0392b;
  --text:       #222;
  --muted:      #555;
  --border:     #ccd6e8;
  --white:      #fff;
  --max-width:  860px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  background: #f7f9fc;
}

/* ======================  HEADER / NAV  ====================== */
header {
  background: var(--blue);
  color: var(--white);
  padding: 28px 20px 18px;
  text-align: center;
}

header h1 {
  font-size: 1.65rem;
  font-weight: bold;
  letter-spacing: 0.02em;
}

header p.tagline {
  margin-top: 8px;
  font-size: 0.95rem;
  font-style: italic;
  opacity: 0.88;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

nav {
  background: var(--blue-light);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
}

nav a {
  color: var(--white);
  text-decoration: none;
  padding: 11px 18px;
  font-family: Arial, sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: background 0.2s;
}

nav a:hover,
nav a.active {
  background: rgba(0,0,0,0.20);
}

/* ======================  MAIN CONTENT  ====================== */
main {
  max-width: var(--max-width);
  margin: 36px auto 60px;
  padding: 0 20px;
}

/* Page title */
h2.page-title {
  font-size: 1.5rem;
  color: var(--blue);
  border-bottom: 3px solid var(--blue);
  padding-bottom: 8px;
  margin-bottom: 28px;
}

/* Section blocks */
section {
  margin-bottom: 36px;
}

section h3 {
  font-size: 1.1rem;
  color: var(--blue);
  margin-bottom: 12px;
}

section p,
section li {
  margin-bottom: 8px;
}

section ul,
section ol {
  padding-left: 22px;
}

section ul { list-style: none; padding-left: 0; }
section ul li::before { content: "– "; color: var(--blue); font-weight: bold; }

/* Highlight box (ex: NOUVEAUTÉS) */
.highlight-box {
  background: var(--blue-bg);
  border-left: 4px solid var(--blue);
  padding: 18px 22px;
  border-radius: 4px;
  margin-bottom: 28px;
}

.highlight-box h3 {
  margin-bottom: 10px;
  color: var(--blue);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.highlight-box ul {
  padding-left: 0;
  list-style: none;
}

.highlight-box ul li {
  margin-bottom: 6px;
  padding-left: 20px;
  position: relative;
}

.highlight-box ul li::before {
  content: "■";
  position: absolute;
  left: 0;
  color: var(--blue);
  font-size: 0.7rem;
  top: 5px;
}

/* Links */
a {
  color: var(--blue-light);
  text-decoration: underline;
}
a:hover { color: var(--blue); }

/* PDF links list */
.links-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.links-list li {
  margin-bottom: 8px;
  padding-left: 0;
}

.links-list li::before { content: "" !important; }

.links-list a {
  display: inline-block;
  font-family: Arial, sans-serif;
  font-size: 0.9rem;
  padding: 5px 0;
}

.links-list a::before {
  content: "📄 ";
}

/* Notice box (warning / info) */
.notice {
  background: #fff8e1;
  border-left: 4px solid #f0a500;
  padding: 14px 18px;
  border-radius: 4px;
  font-family: Arial, sans-serif;
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 24px;
}

/* ======================  FORM  ====================== */

/* By default the form section is HIDDEN.
   To activate it (once a year), change  display:none  to  display:block
   on the element with id="form-section".
   Alternately you can remove/add the class "form-hidden". */

#form-section.form-hidden {
  display: none;
}

.form-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 28px 32px;
  margin-top: 24px;
}

.form-group-title {
  background: var(--blue);
  color: var(--white);
  padding: 8px 14px;
  font-family: Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 3px;
  margin: 20px 0 14px;
}

.form-group-title:first-child { margin-top: 0; }

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.form-row label {
  font-family: Arial, sans-serif;
  font-size: 0.88rem;
  min-width: 260px;
  color: var(--text);
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row select {
  flex: 1;
  min-width: 200px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.9rem;
  font-family: Arial, sans-serif;
  color: var(--text);
  background: #fafcff;
}

.form-row input:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--blue-light);
  box-shadow: 0 0 0 2px rgba(46,110,181,0.15);
}

.form-row .radio-group {
  display: flex;
  gap: 18px;
  align-items: center;
}

.form-row .radio-group label {
  min-width: unset;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.form-submit {
  margin-top: 24px;
  text-align: right;
}

.btn-submit {
  background: var(--blue);
  color: var(--white);
  border: none;
  padding: 11px 36px;
  font-family: Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: background 0.2s;
}

.btn-submit:hover {
  background: var(--blue-light);
}

/* Closed notice when form is disabled */
.form-closed-notice {
  background: #f0f4fa;
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 20px 24px;
  color: var(--muted);
  font-family: Arial, sans-serif;
  font-size: 0.92rem;
  text-align: center;
}

/* ======================  SPONSORS  ====================== */
.canton-list {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.canton-list li {
  background: var(--blue-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 20px;
  font-family: Arial, sans-serif;
  font-weight: 600;
  color: var(--blue);
}

.canton-list li::before { content: "" !important; }

/* ======================  FOOTER  ====================== */
footer {
  background: var(--blue);
  color: rgba(255,255,255,0.75);
  text-align: center;
  padding: 18px 20px;
  font-family: Arial, sans-serif;
  font-size: 0.82rem;
}

footer a {
  color: rgba(255,255,255,0.9);
}

/* ======================  RESPONSIVE  ====================== */
@media (max-width: 600px) {
  header h1 { font-size: 1.25rem; }
  nav a { padding: 9px 12px; font-size: 0.78rem; }
  .form-block { padding: 18px 16px; }
  .form-row label { min-width: 100%; }
}
