/* =========================================================
   Compagnie d'Arc de Folschviller — feuille de style
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root{
  /* Couleurs — reprises du logo du club */
  --ink:        #1b1b1a;
  --paper:      #f7f6f2;
  --paper-dim:  #efede6;
  --blue:       #1c5fa8;
  --blue-dark:  #123f73;
  --red:        #c1352a;
  --red-dark:   #922719;
  --gold:       #f2a71b;
  --gray:       #62615c;
  --line:       #ddd9cf;
  --white:      #ffffff;

  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container: 1120px;
  --radius: 3px;
}

/* ---------- Reset ---------- */
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img{ max-width: 100%; display: block; }
a{ color: var(--blue-dark); text-decoration: none; }
a:hover{ text-decoration: underline; }
ul{ margin:0; padding:0; list-style:none; }
h1,h2,h3,h4{
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: .01em;
}
p{ margin: 0 0 1em; }
button{ font-family: inherit; }

:focus-visible{
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.container{
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.section{
  padding: 64px 0;
}
.section--tight{ padding: 40px 0; }
.section--dim{ background: var(--paper-dim); }
.section--dark{
  background: var(--blue-dark);
  color: var(--white);
}
.section--dark h2, .section--dark h3{ color: var(--white); }
.section--dark a{ color: var(--gold); }

.section__head{
  max-width: 640px;
  margin-bottom: 36px;
}
.section__head h2{ font-size: clamp(1.7rem, 3vw, 2.3rem); }
.section__head p{ color: var(--gray); margin-bottom: 0; }
.section--dark .section__head p{ color: #cfe0f2; }

/* Motif "cible" décoratif : anneaux concentriques réutilisés
   comme séparateur/illustration plutôt que des filets génériques */
.rings-divider{
  display:flex;
  align-items:center;
  gap: 10px;
  margin: 0 0 28px;
}
.rings-divider__marks{
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  position: relative;
  flex: none;
}
.rings-divider__marks::before{
  content:"";
  position:absolute; inset: 8px;
  border-radius:50%;
  border: 2px solid var(--red);
}
.rings-divider__marks::after{
  content:"";
  position:absolute; inset: 15px;
  border-radius:50%;
  background: var(--gold);
}
.rings-divider__label{
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: .8rem;
  letter-spacing: .12em;
  color: var(--gray);
}

/* ---------- Header / Nav ---------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-header__bar{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 16px;
}
.brand{
  display:flex;
  align-items:center;
  gap: 12px;
}
.brand img{ height: 52px; width:auto; }
.brand__text{
  font-family: var(--font-display);
  line-height: 1.1;
}
.brand__text strong{
  display:block;
  font-size: 1.05rem;
  color: var(--ink);
}
.brand__text span{
  display:block;
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--red);
}

.nav-toggle{
  display:none;
  background: none;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  width: 44px; height: 40px;
  position: relative;
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after{
  content:"";
  position:absolute;
  left: 9px; right: 9px;
  height: 2px;
  background: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span{ top: 50%; transform: translateY(-50%); }
.nav-toggle span::before{ top: -8px; }
.nav-toggle span::after{ top: 8px; }
.nav-toggle[aria-expanded="true"] span{ background: transparent; }
.nav-toggle[aria-expanded="true"] span::before{ transform: rotate(45deg); top:0; }
.nav-toggle[aria-expanded="true"] span::after{ transform: rotate(-45deg); top:0; }

.main-nav ul{
  display:flex;
  gap: 4px;
}
.main-nav a{
  display:block;
  padding: 10px 14px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: .95rem;
  letter-spacing: .02em;
  border-radius: var(--radius);
}
.main-nav a:hover{ background: var(--paper-dim); text-decoration:none; }
.main-nav a[aria-current="page"]{
  color: var(--white);
  background: var(--blue);
}

@media (max-width: 780px){
  .nav-toggle{ display:block; }
  .main-nav{
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  .main-nav.is-open{ max-height: 400px; }
  .main-nav ul{ flex-direction: column; padding: 8px 20px 18px; gap: 2px; }
  .main-nav a{ padding: 12px 10px; }
}

/* ---------- Boutons ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: var(--font-display);
  font-size: .95rem;
  letter-spacing: .02em;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, color .15s ease;
}
.btn:hover{ text-decoration:none; }
.btn:active{ transform: translateY(1px); }
.btn--primary{
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.btn--primary:hover{ background: var(--red-dark); border-color: var(--red-dark); }
.btn--ghost{
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--ghost:hover{ background: var(--ink); color: var(--white); }
.btn--on-dark{
  background: var(--gold);
  color: var(--blue-dark);
  border-color: var(--gold);
}
.btn--on-dark:hover{ background: #ffbe3d; border-color: #ffbe3d; }
.btn--ghost-light{
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn--ghost-light:hover{ background: var(--white); color: var(--blue-dark); }

/* ---------- Hero ---------- */
.hero{
  position: relative;
  overflow: hidden;
  background: var(--blue-dark);
  color: var(--white);
}
.hero__logo{
  position:absolute;
  right: 20px; top: 50%;
  transform: translateY(-50%);
  width: 640px;
  max-width: 46vw;
  opacity: .4;
  pointer-events:none;
  user-select:none;
  z-index: 0;
}
@media (max-width: 780px){
  .hero__logo{
    right: auto;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    max-width: none;
    opacity: .25;
  }
}
.hero__inner{
  position: relative;
  z-index: 1;
  padding: 84px 0 74px;
  max-width: 620px;
}
.hero__kicker{
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .8rem;
  color: var(--gold);
  margin-bottom: 14px;
}
.hero h1{
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  margin-bottom: .4em;
}
.hero p{
  font-size: 1.1rem;
  color: #d9e4f2;
  max-width: 46ch;
}
.hero__actions{
  display:flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

/* Bandeau interne (pages secondaires) */
.page-banner{
  background: var(--blue-dark);
  color: var(--white);
  padding: 46px 0;
}
.page-banner h1{ margin-bottom: .25em; font-size: clamp(1.9rem, 4vw, 2.6rem); }
.page-banner p{ color: #d9e4f2; margin:0; max-width: 60ch; }

/* ---------- Grilles / cartes ---------- */
.grid{
  display:grid;
  gap: 24px;
}
.grid--3{ grid-template-columns: repeat(3, 1fr); }
.grid--2{ grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px){
  .grid--3{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px){
  .grid--3, .grid--2{ grid-template-columns: 1fr; }
}

.stat{
  padding: 26px 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
}
.stat strong{
  display:block;
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--blue-dark);
  line-height:1;
  margin-bottom: 6px;
}
.stat span{ color: var(--gray); font-size: .95rem; }

.stat--table{
  padding: 0;
  overflow: hidden;
  display:flex;
  flex-direction:column;
}
.stat--table table.schedule{
  min-width: 0;
  width: 100%;
}
.stat--table .table-inner{
  overflow-x:auto;
}

.card{
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  padding: 24px;
  display:flex;
  flex-direction:column;
}
a.card{
  color: inherit;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
a.card:hover{
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
  transform: translateY(-2px);
}
.card__cover{
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  margin: 4px 0 12px;
  border: 1px solid var(--line);
}
.card__cover img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card--result{ border-top-color: var(--red); }
.card__meta{
  font-family: var(--font-display);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--red);
  margin-bottom: 8px;
}
.card--result .card__meta{ color: var(--red); }
.card:not(.card--result) .card__meta{ color: var(--blue); }
.card h3{ font-size: 1.15rem; margin-bottom: 8px; }
.card p{ color: var(--gray); margin-bottom: 14px; flex: 1; }
.card__link{ font-family: var(--font-display); font-size: .9rem; }

.card__gallery{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin: 4px 0 14px;
}
.card__gallery img{
  width:64px; height:64px;
  object-fit:cover;
  border:1px solid var(--line);
  border-radius:2px;
}
.card__results{
  margin-bottom:14px;
}
.card__results table.schedule{
  min-width: 0;
  font-size:.85rem;
}
.card__results th, .card__results td{
  padding:8px 10px;
}

.detail-text{
  font-size:1.05rem;
  max-width: 70ch;
  white-space: pre-line; /* respecte les retours à la ligne et les lignes vides saisis dans l'admin */
}
.detail-gallery{
  columns: 340px;
  column-gap: 20px;
  margin: 0 0 28px;
}
.detail-gallery a{
  display:block;
  break-inside: avoid;
  margin-bottom: 20px;
  border:1px solid var(--line);
}
.detail-gallery img{
  width:100%;
  height:auto;
  display:block;
}

.gallery-grid{
  columns: 260px;
  column-gap: 16px;
}
.gallery-tile{
  position:relative;
  display:block;
  break-inside: avoid;
  margin-bottom: 16px;
  border:1px solid var(--line);
  overflow:hidden;
  color: inherit;
  text-decoration:none;
}
.gallery-tile img{
  width:100%;
  height:auto;
  display:block;
  transition: transform .2s ease;
}
.gallery-tile:hover img{ transform: scale(1.05); }
.gallery-tile:hover{ text-decoration:none; }
.gallery-tile__caption{
  position:absolute;
  left:0; right:0; bottom:0;
  background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,0));
  color:#fff;
  font-size:.82rem;
  padding:24px 10px 8px;
}

/* Tableau des résultats sur petit écran : même tableau à colonnes, simplement compacté
   pour tenir dans la largeur de l'écran. Les colonnes Catégorie / Résultat / Classement ne coupent
   jamais leurs mots ; seule la colonne Archer passe à la ligne si le nom est long. */
@media (max-width: 640px){
  table.schedule.results-stack{
    min-width: 0;
    table-layout: auto;
    font-size: .8rem;
  }
  table.schedule.results-stack th,
  table.schedule.results-stack td{
    padding: 8px 4px;
  }
  table.schedule.results-stack th:first-child,
  table.schedule.results-stack td:first-child{
    padding-left: 8px;
    overflow-wrap: anywhere;
  }
  table.schedule.results-stack th:not(:first-child),
  table.schedule.results-stack td:not(:first-child){
    white-space: nowrap;
  }
  table.schedule.results-stack th{
    font-size: .7rem;
    letter-spacing: 0;
  }
}

.people-card{
  background: var(--white);
  border: 1px solid var(--line);
  padding: 22px;
  text-align:center;
}
.people-card__avatar{
  width: 68px; height: 68px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--paper-dim);
  border: 2px solid var(--blue);
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--blue-dark);
}
.people-card h3{ font-size: 1.05rem; margin-bottom: 2px; }
.people-card span{ color: var(--red); font-size: .85rem; font-family: var(--font-display); }
.people-card p{ margin-top: 10px; color: var(--gray); font-size: .92rem; }

/* ---------- Tableaux horaires ---------- */
.table-wrap{
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--white);
}
.table-wrap--narrow{
  max-width: 380px;
}
.table-wrap--narrow table.schedule{ min-width: 0; }
table.schedule{
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
  table-layout: fixed;
}
table.schedule th, table.schedule td{
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
table.schedule thead th{
  background: var(--blue-dark);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: .02em;
}
table.schedule tbody tr:last-child td{ border-bottom: none; }
table.schedule tbody tr:nth-child(even){ background: var(--paper-dim); }
.tag{
  display:inline-block;
  padding: 3px 9px;
  font-size: .78rem;
  font-family: var(--font-display);
  border-radius: 999px;
  background: var(--gold);
  color: var(--blue-dark);
}

/* ---------- Infos pratiques / contact ---------- */
.infoblock{
  background: var(--white);
  border: 1px solid var(--line);
  padding: 26px;
}
.infoblock h3{ font-size: 1.1rem; }
.infoblock dl{ margin:0; }
.infoblock dt{
  font-family: var(--font-display);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--red);
  margin-top: 14px;
}
.infoblock dt:first-child{ margin-top:0; }
.infoblock dd{ margin: 2px 0 0; }

.map-frame{
  border: 1px solid var(--line);
  overflow:hidden;
  height: 100%;
  min-height: 320px;
}
.map-frame iframe{ width:100%; height:100%; min-height:320px; border:0; display:block; }

.leaflet-map{
  height: 420px;
  border: 1px solid var(--line);
  background: var(--paper-dim);
}
.custom-pin{
  background: transparent;
  border: none;
}
.map-legend{
  display:flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 16px;
}
.map-legend li{
  display:flex;
  align-items:center;
  gap: 8px;
  font-size: .92rem;
  color: var(--gray);
}
.map-legend__dot{
  width: 14px; height: 14px;
  border-radius: 50%;
  flex: none;
  border: 2px solid var(--white);
  box-shadow: 0 0 0 1px var(--line);
}
.map-legend__dot--red{ background: var(--red); }
.map-legend__dot--green{ background: #2e8b3d; }

/* ---------- Formulaire ---------- */
.form-grid{
  display:grid;
  gap: 18px;
}
.field{ display:flex; flex-direction:column; gap:6px; }
.field label{
  font-family: var(--font-display);
  font-size: .85rem;
  letter-spacing: .02em;
}
.field input, .field select, .field textarea{
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 11px 13px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--radius);
}
.field input:focus, .field select:focus, .field textarea:focus{
  border-color: var(--blue);
}
.field--row2{ display:grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px){ .field--row2{ grid-template-columns: 1fr; } }

.form-note{
  font-size: .88rem;
  color: var(--gray);
  margin-top: 10px;
}
.form-feedback{
  display:none;
  margin-top: 16px;
  padding: 14px 16px;
  border-left: 4px solid var(--blue);
  background: var(--paper-dim);
  font-size: .95rem;
}
.form-feedback.is-visible{ display:block; }
.form-feedback.is-error{ border-left-color: var(--red); background:#fdecea; color:#7a241c; }
.hp-field{ position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }

.tag-list{
  display:flex;
  flex-direction:column;
  gap: 14px;
}
.tag-list li{
  display:flex;
  align-items:baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  color: var(--gray);
}
.tag-list .tag{ flex: none; }

/* ---------- Filtre actualités ---------- */
.filters{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.filters button{
  background: var(--white);
  border: 1px solid var(--line);
  padding: 9px 18px;
  font-family: var(--font-display);
  font-size: .88rem;
  letter-spacing: .02em;
  border-radius: 999px;
  cursor: pointer;
}
.filters button.is-active{
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

/* ---------- Placeholder banners ---------- */
.placeholder-note{
  background: #fdf3e0;
  border: 1px dashed var(--gold);
  color: #6b5313;
  font-size: .88rem;
  padding: 10px 14px;
  margin-bottom: 22px;
  border-radius: var(--radius);
}

/* ---------- Footer ---------- */
.site-footer{
  background: var(--ink);
  color: #cfcdc4;
  padding: 46px 0 26px;
}
.site-footer h4{
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 14px;
}
.footer-grid{
  display:grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}
@media (max-width: 700px){
  .footer-grid{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px){
  .footer-grid{ grid-template-columns: 1fr; }
}
.site-footer a{ color: #cfcdc4; }
.site-footer a:hover{ color: var(--gold); }
.site-footer li{ margin-bottom: 8px; }
.footer-list__spaced{ margin-top: 10px; }
.footer-bottom{
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid #34332d;
  font-size: .82rem;
  display:flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Colonnes deux blocs (accueil, etc.) ---------- */
.two-col{
  display:grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items:center;
}
.two-col--equal{ grid-template-columns: 1fr 1fr; align-items:start; }
.two-col--roomy{ gap: 64px; }
@media (max-width: 780px){
  .two-col, .two-col--equal{ grid-template-columns: 1fr; }
  .two-col--roomy{ gap: 32px; }
}

.practical-row{
  display:flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: stretch;
}
.practical-row > .table-wrap--narrow{
  flex: 1 1 340px;
}
.practical-row > .infoblock{
  flex: 2 1 320px;
}
.practical-row--joined{
  gap: 0;
}
.practical-row--joined > .infoblock{
  border-right: none;
}
.infoblock--joined{
  margin-top: 0;
  border-top: none;
}
.infoblock--joined-top{
  border-bottom: none;
}

/* ---------- Utilitaires ---------- */
.mt-0{ margin-top:0; }
.text-center{ text-align:center; }
.sr-only{
  position:absolute; width:1px; height:1px;
  padding:0; margin:-1px; overflow:hidden;
  clip: rect(0,0,0,0); white-space:nowrap; border:0;
}
