/* Site mainanbahsi.com — feuille de style unique, sans script ni police externe.
   Direction artistique du propriétaire (25/10/2026) : logo MB en dégradé pastel, fond blanc et lumineux,
   vagues de fils colorés et pistes de circuit (décors dessinés par site/decors.py). */

:root {
  /* Couleurs du logo, de gauche à droite. */
  --violet: #b48ac8;
  --rose: #d58fb3;
  --orange: #f5b17a;
  --jaune: #cfc890;
  --vert: #96c4b4;
  --bleu: #7db8d8;
  --degrade: linear-gradient(115deg, var(--violet), var(--rose) 26%, var(--orange) 48%, var(--jaune) 64%, var(--vert) 80%, var(--bleu));
  --fond: #ffffff;
  --surface: #ffffff;
  --surface-douce: #f7f5fc;
  --texte: #1d1830;
  --texte-doux: #5a5470;
  --bordure: #ebe7f3;
  --lien: #6a49c9;
  --ombre: 0 12px 34px rgba(60, 40, 110, 0.08);
  --rayon: 18px;
  /* Lueurs des coins de la bannière : violet en haut à gauche, orange en haut à droite. */
  --lueurs: radial-gradient(circle at 0 0, rgba(170, 110, 230, 0.16), transparent 42%),
            radial-gradient(circle at 100% 0, rgba(245, 170, 80, 0.14), transparent 40%);
}

@media (prefers-color-scheme: dark) {
  :root {
    --fond: #07060b;
    --surface: #111018;
    --surface-douce: #17141f;
    --texte: #f3f0fb;
    --texte-doux: #b7b0c9;
    --bordure: #272334;
    --lien: #c9b6ff;
    --ombre: 0 12px 34px rgba(0, 0, 0, 0.45);
    --lueurs: radial-gradient(circle at 0 0, rgba(150, 90, 220, 0.3), transparent 42%),
              radial-gradient(circle at 100% 0, rgba(245, 160, 60, 0.22), transparent 40%);
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

a { color: var(--lien); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.6em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.2em; }

.cadre { width: min(1080px, 100% - 32px); margin-inline: auto; }

.aller-au-contenu {
  position: absolute; left: -9999px; top: 8px;
  background: var(--surface); color: var(--texte); padding: 8px 14px; border-radius: 10px;
}
.aller-au-contenu:focus { left: 16px; z-index: 10; }

/* En-tête */
.entete {
  border-bottom: 1px solid var(--bordure);
  background: var(--fond);
  background: color-mix(in srgb, var(--fond) 88%, transparent);
  position: sticky; top: 0; z-index: 5;
  backdrop-filter: blur(8px);
}
.entete-cadre {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 24px; padding: 10px 0;
}
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--texte); }
.logo-marque { display: block; height: 38px; width: auto; flex: none; }
.logo-nom {
  font-weight: 600; font-size: 1.2rem; letter-spacing: 0.01em;
  background: var(--degrade); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.menu a {
  display: inline-block; padding: 6px 12px; border-radius: 999px;
  color: var(--texte-doux); text-decoration: none; font-weight: 600; font-size: 0.95rem;
}
.menu a:hover { background: var(--surface-douce); color: var(--texte); }
.menu a[aria-current="page"] { background: var(--surface-douce); color: var(--texte); }

/* Bannière de l'accueil : celle du propriétaire en mode clair ; en mode sombre, son logo noir
   sur les mêmes décors (lueurs, circuits, vagues). */
.banniere { position: relative; overflow: hidden; }
.banniere-titre { margin: 0; line-height: 0; }
.banniere-image { display: block; width: 100%; height: auto; }
@media (max-width: 760px) {
  .banniere-image { aspect-ratio: 4 / 3; object-fit: cover; }
}
@media (prefers-color-scheme: dark) {
  .banniere {
    padding: clamp(32px, 6vw, 64px) 16px clamp(96px, 15vw, 190px);
    background:
      url("/images/circuits-violet.svg") left top / clamp(150px, 22vw, 300px) no-repeat,
      url("/images/circuits-orange.svg") right top / clamp(150px, 22vw, 300px) no-repeat,
      url("/images/circuits-bleu.svg") right bottom / clamp(150px, 22vw, 300px) no-repeat,
      url("/images/vagues.svg") center bottom / 100% clamp(120px, 19vw, 240px) no-repeat,
      radial-gradient(circle at 0 0, rgba(150, 90, 220, 0.5), transparent 38%),
      radial-gradient(circle at 100% 0, rgba(245, 160, 60, 0.4), transparent 36%),
      radial-gradient(circle at 100% 100%, rgba(60, 150, 240, 0.42), transparent 38%),
      radial-gradient(circle at 0 100%, rgba(170, 90, 220, 0.3), transparent 32%),
      #000;
  }
  .banniere-image { width: min(460px, 86%); margin-inline: auto; aspect-ratio: auto; object-fit: contain; }
}

/* Blocs */
.bloc { padding: clamp(48px, 8vw, 88px) 0; }
.bloc-doux { background: var(--surface-douce); }
/* Premier bloc des pages intérieures : les lueurs des coins de la bannière. */
main > .bloc:first-child { background: var(--lueurs), var(--fond); }
.sur-titre {
  display: inline-block; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--texte-doux); margin-bottom: 1em;
}
.degrade-texte {
  background: var(--degrade); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.accroche { font-size: clamp(1.1rem, 2.4vw, 1.35rem); color: var(--texte-doux); max-width: 46rem; }
.intro { font-size: 1.1rem; color: var(--texte-doux); max-width: 48rem; }

.accueil { text-align: center; padding-top: clamp(28px, 5vw, 48px); }
.accueil .accroche { margin-inline: auto; }
.accueil .boutons { justify-content: center; }

/* Le filet du logo : un trait fin avec un point en dégradé au milieu. */
.filet {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: min(320px, 70%); margin: 0 auto 1.4em;
}
.filet::before, .filet::after { content: ""; flex: 1; height: 1px; background: var(--texte-doux); opacity: 0.45; }
.filet span { width: 8px; height: 8px; border-radius: 50%; background: var(--degrade); }

.boutons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6em; }
.bouton {
  display: inline-block; padding: 12px 22px; border-radius: 999px; font-weight: 700; text-decoration: none;
  border: 2px solid transparent;
}
.bouton-principal { background: var(--degrade); color: #1d1830; }
.bouton-principal:hover { filter: saturate(1.25); }
.bouton-secondaire { border-color: var(--bordure); color: var(--texte); background: var(--surface); }
.bouton-secondaire:hover { border-color: var(--violet); }

/* Cartes */
.grille { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin-top: 28px; }
.carte {
  background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon);
  padding: 24px; box-shadow: var(--ombre);
}
.carte h2, .carte h3 { margin-top: 14px; }
.carte h2 { font-size: 1.5rem; }
.carte p { color: var(--texte-doux); margin-bottom: 0.6em; }
.carte-niche { font-weight: 700; color: var(--texte); font-size: 0.95rem; }

.portrait {
  display: block; width: 96px; height: 96px; object-fit: cover; border-radius: 50%;
  padding: 3px; background: var(--degrade);
}
.portrait-grand { width: 128px; height: 128px; padding: 4px; }
.portrait-gilles { background: linear-gradient(135deg, var(--bleu), var(--violet)); }
.portrait-camille { background: linear-gradient(135deg, var(--orange), var(--rose)); }
.portrait-ines { background: linear-gradient(135deg, var(--vert), var(--bleu)); }
.legende { color: var(--texte-doux); font-size: 0.9rem; margin-top: 16px; }

.rubriques { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.rubriques li {
  font-size: 0.82rem; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: var(--surface-douce); color: var(--texte-doux);
}

.etapes { counter-reset: etape; list-style: none; padding: 0; display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 28px; }
.etapes li { counter-increment: etape; background: var(--surface); border: 1px solid var(--bordure);
  border-radius: var(--rayon); padding: 24px; }
.etapes li::before {
  content: counter(etape); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--degrade); color: #1d1830; font-weight: 800; margin-bottom: 12px;
}
.etapes p { color: var(--texte-doux); margin: 0; }

.encadre {
  border-radius: var(--rayon); padding: 22px 24px; background: var(--surface);
  border: 1px solid var(--bordure); border-left: 6px solid var(--violet); box-shadow: var(--ombre);
}
.encadre p:last-child { margin-bottom: 0; }

.equipe { list-style: none; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.equipe li { background: var(--surface); border: 1px solid var(--bordure); border-radius: 14px; padding: 14px 18px; }
.equipe strong { display: block; }
.equipe span { color: var(--texte-doux); font-size: 0.95rem; }

.liste-regles li { margin-bottom: 0.5em; }

.appel { text-align: center; }
.appel .boutons { justify-content: center; }
.appel .intro { margin-inline: auto; }

.texte-long { max-width: 46rem; }
.texte-long h2 { font-size: 1.35rem; margin-top: 1.8em; }
.date-maj { color: var(--texte-doux); font-size: 0.95rem; }
.a-completer { background: #fff2b3; color: #4d3b00; padding: 0 4px; border-radius: 4px; font-weight: 700; }

.courriel { font-size: clamp(1.3rem, 4vw, 2rem); font-weight: 800; word-break: break-word; }

/* Pied de page : les vagues de la bannière en haut. */
.pied {
  border-top: 1px solid var(--bordure); padding: clamp(96px, 12vw, 130px) 0 24px; margin-top: 0;
  background: url("/images/vagues.svg") center top / 100% clamp(80px, 10vw, 120px) no-repeat, var(--surface);
}
.pied-grille { display: grid; gap: 28px; grid-template-columns: 2fr repeat(3, 1fr); }
.pied ul { list-style: none; padding: 0; margin: 0; }
.pied li { margin-bottom: 6px; }
.pied a { color: var(--texte-doux); text-decoration: none; }
.pied a:hover { color: var(--texte); text-decoration: underline; }
.pied-marque { font-weight: 700; font-size: 1.1rem; margin-bottom: 0.3em; }
.pied-titre { font-weight: 700; margin-bottom: 0.6em; }
.pied-transparence { color: var(--texte-doux); font-size: 0.92rem; }
.pied-bas { border-top: 1px solid var(--bordure); margin-top: 28px; padding-top: 18px; color: var(--texte-doux); font-size: 0.9rem; }
.pied-bas p { margin: 0; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .pied-grille { grid-template-columns: 1fr 1fr; }
  .pied-grille > div:first-child { grid-column: 1 / -1; }
  .menu a { padding: 6px 10px; font-size: 0.9rem; }
  .logo-marque { height: 32px; }
}
