/* =================================================================
   Groupe scout — feuille de style unique
   Palette : lichen, toile, bois. Accent par unité (jaune / vert).
   Le rouge foulard est réservé à l'encart « prochaine sortie ».
   ================================================================= */

:root {
  --encre:        #1b2620;
  --encre-doux:   #55635a;
  --fond:         #eff1ea;
  --carte:        #ffffff;
  --trait:        #d2d8c9;
  --trait-fin:    #e4e8dd;

  --accent:       #2f6b45;
  --accent-pale:  #e3efe6;
  --signal:       #b8402c;
  --signal-pale:  #fbeae6;

  --r:            4px;
  --large:        1080px;

  --t-xs:  .8125rem;
  --t-s:   .9375rem;
  --t-m:   1.0625rem;
  --t-l:   1.375rem;
  --t-xl:  1.875rem;
  --t-xxl: 2.75rem;
}

body[data-unite="meute"]  { --accent: #b9740c; --accent-pale: #fbefda; }
body[data-unite="troupe"] { --accent: #2f6b45; --accent-pale: #e3efe6; }

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

html { scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--fond);
  color: var(--encre);
  font: 400 var(--t-m)/1.6 Archivo, system-ui, -apple-system, sans-serif;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4 {
  font-family: Bitter, Georgia, serif;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}

h1 { font-size: var(--t-xxl); }
h2 { font-size: var(--t-xl); }
h3 { font-size: var(--t-l); }

p { margin: 0 0 1em; max-width: 68ch; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

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

.evitement {
  position: absolute; left: -9999px;
  background: var(--encre); color: #fff; padding: .6rem 1rem; z-index: 10;
}
.evitement:focus { left: .5rem; top: .5rem; }

.conteneur { max-width: var(--large); margin: 0 auto; padding: 0 1.25rem; }

/* ---------------------------------------------------------------- */
/* Bandeau                                                           */
/* ---------------------------------------------------------------- */

.bandeau {
  background: var(--carte);
  border-bottom: 1px solid var(--trait);
}

.bandeau-corps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding-top: .9rem;
  padding-bottom: .9rem;
}

.marque { text-decoration: none; color: inherit; margin-right: auto; display: block; }
.marque-nom {
  display: block;
  font-family: Bitter, Georgia, serif;
  font-weight: 700;
  font-size: 1.2rem;
}
.marque-sous {
  display: block;
  font-size: var(--t-xs);
  color: var(--encre-doux);
}

.nav { display: flex; align-items: center; gap: 1.4rem; font-size: var(--t-s); }
.nav a { color: var(--encre); text-decoration: none; padding: .25rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--trait); }
.nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.nav-compte { color: var(--encre-doux) !important; }

.menu-bascule, .menu-bouton { display: none; }

/* ---------------------------------------------------------------- */
/* Blocs génériques                                                  */
/* ---------------------------------------------------------------- */

.section { padding: 2.75rem 0; }
.section + .section { border-top: 1px solid var(--trait-fin); }

.carte {
  background: var(--carte);
  border: 1px solid var(--trait);
  border-radius: var(--r);
  padding: 1.5rem;
}

.grille { display: grid; gap: 1.25rem; }
@media (min-width: 700px) {
  .grille-2 { grid-template-columns: 1fr 1fr; }
  .grille-3-2 { grid-template-columns: 3fr 2fr; align-items: start; }
}

.alerte {
  margin: 1.25rem 0 0;
  padding: .75rem 1rem;
  border-left: 4px solid var(--accent);
  background: var(--accent-pale);
  font-size: var(--t-s);
  max-width: none;
}
.alerte-erreur { border-left-color: var(--signal); background: var(--signal-pale); }

/* ---------------------------------------------------------------- */
/* Accueil : choix des deux unités                                   */
/* ---------------------------------------------------------------- */

.accueil-titre { max-width: 20ch; margin-top: 2.5rem; }
.accueil-chapo { font-size: var(--t-l); color: var(--encre-doux); max-width: 46ch; }

.portes { display: grid; gap: 1.25rem; margin: 2.5rem 0 1rem; }
@media (min-width: 700px) { .portes { grid-template-columns: 1fr 1fr; } }

.porte {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--carte);
  border: 1px solid var(--trait);
  border-top: 5px solid var(--u, var(--accent));
  border-radius: var(--r);
  padding: 1.75rem;
}
.porte:hover { border-color: var(--u, var(--accent)); }
.porte h2 { margin-bottom: .25rem; color: var(--u, var(--accent)); }
.porte-age { font-size: var(--t-xs); color: var(--encre-doux); display: block; margin-bottom: .9rem; }
.porte-suite { font-size: var(--t-s); font-weight: 600; color: var(--u, var(--accent)); }
.porte[data-u="meute"]  { --u: #b9740c; }
.porte[data-u="troupe"] { --u: #2f6b45; }

/* ---------------------------------------------------------------- */
/* Encart « prochaine sortie » — l'élément fort du site              */
/* ---------------------------------------------------------------- */

.sortie {
  background: var(--carte);
  border: 1px solid var(--trait);
  border-top: 6px solid var(--signal);
  border-radius: var(--r);
  padding: 1.75rem;
  margin: 2rem 0 0;
}

.sortie-entete {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: .75rem 1rem; margin-bottom: .4rem;
}
.sortie-etiquette {
  font-size: var(--t-xs); font-weight: 600;
  color: var(--signal);
}
.sortie-delai {
  font-size: var(--t-xs);
  background: var(--signal-pale);
  color: var(--signal);
  padding: .15rem .6rem;
  border-radius: 999px;
}
.sortie h2 { font-size: var(--t-xl); margin: 0 0 .15rem; }
.sortie-quand { font-size: var(--t-l); color: var(--encre-doux); margin-bottom: 1.25rem; }

.fiche { margin: 0 0 1.5rem; display: grid; gap: .1rem .9rem; }
@media (min-width: 560px) { .fiche { grid-template-columns: max-content 1fr; } }
.fiche dt { font-size: var(--t-s); color: var(--encre-doux); }
.fiche dd { margin: 0 0 .5rem; font-weight: 500; }

.programme {
  border-top: 1px solid var(--trait-fin);
  padding-top: 1.25rem;
  white-space: pre-line;
}
.programme h3 { font-size: var(--t-m); }

.sortie-vide { color: var(--encre-doux); font-style: italic; }

/* ---------------------------------------------------------------- */
/* Planning de l'année                                               */
/* ---------------------------------------------------------------- */

.planning { list-style: none; margin: 0; padding: 0; }

.planning li {
  display: grid;
  gap: .1rem 1.25rem;
  padding: .95rem 0;
  border-bottom: 1px solid var(--trait-fin);
}
@media (min-width: 620px) {
  .planning li { grid-template-columns: 13rem 1fr; }
}
.planning li:first-child { border-top: 1px solid var(--trait-fin); }
.planning-passe { opacity: .45; }

.planning-date {
  font-family: Bitter, Georgia, serif;
  font-weight: 500;
  font-size: var(--t-s);
  color: var(--accent);
  padding-top: .15rem;
}
.planning-titre { font-weight: 600; }
.planning-detail { font-size: var(--t-s); color: var(--encre-doux); margin: .15rem 0 0; }

/* ---------------------------------------------------------------- */
/* Liens utiles                                                      */
/* ---------------------------------------------------------------- */

.liens { list-style: none; margin: 0; padding: 0; }
.liens li { padding: .7rem 0; border-bottom: 1px solid var(--trait-fin); }
.liens li:first-child { border-top: 1px solid var(--trait-fin); }
.liens a { font-weight: 600; }
.liens span { display: block; font-size: var(--t-s); color: var(--encre-doux); }

/* ---------------------------------------------------------------- */
/* Formulaires                                                       */
/* ---------------------------------------------------------------- */

.champ { margin-bottom: 1.1rem; }
.champ label { display: block; font-size: var(--t-s); font-weight: 600; margin-bottom: .3rem; }
.champ .aide { font-weight: 400; color: var(--encre-doux); }

input[type=text], input[type=email], input[type=password], input[type=url],
input[type=date], input[type=datetime-local], select, textarea {
  width: 100%;
  font: inherit;
  font-size: var(--t-s);
  padding: .55rem .7rem;
  border: 1px solid var(--trait);
  border-radius: var(--r);
  background: var(--carte);
  color: inherit;
}
textarea { min-height: 8rem; resize: vertical; line-height: 1.55; }

.champs-ligne { display: grid; gap: 0 1rem; }
@media (min-width: 560px) { .champs-ligne { grid-template-columns: 1fr 1fr; } }

.bouton {
  display: inline-block;
  font: inherit;
  font-size: var(--t-s);
  font-weight: 600;
  padding: .6rem 1.2rem;
  border: 1px solid var(--accent);
  border-radius: var(--r);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
}
.bouton:hover { filter: brightness(.92); }
.bouton-sobre { background: transparent; color: var(--accent); }
.bouton-lien {
  background: none; border: none; padding: 0;
  color: var(--signal); font-size: var(--t-xs); cursor: pointer;
  text-decoration: underline;
}

.formulaire-etroit { max-width: 26rem; margin: 3rem auto; }

/* ---------------------------------------------------------------- */
/* Tableaux de gestion                                               */
/* ---------------------------------------------------------------- */

.tableau-enveloppe { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--t-s); }
th, td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid var(--trait-fin); vertical-align: top; }
th { font-weight: 600; color: var(--encre-doux); font-size: var(--t-xs); }

.puce {
  display: inline-block;
  font-size: var(--t-xs);
  padding: .1rem .55rem;
  border-radius: 999px;
  background: var(--accent-pale);
  color: var(--accent);
  white-space: nowrap;
}
.puce-gris { background: var(--trait-fin); color: var(--encre-doux); }

.fil { font-size: var(--t-s); color: var(--encre-doux); margin: 1.5rem 0 .5rem; }
.fil a { color: var(--encre-doux); }

.onglets { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.75rem; }
.onglets a {
  font-size: var(--t-s); text-decoration: none; color: var(--encre);
  padding: .4rem .9rem; border: 1px solid var(--trait); border-radius: var(--r);
  background: var(--carte);
}
.onglets a[aria-current] { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------------------------------------------------------------- */
/* Pied de page                                                      */
/* ---------------------------------------------------------------- */

.pied {
  margin-top: 3.5rem;
  border-top: 1px solid var(--trait);
  background: var(--carte);
}
.pied-corps { padding: 1.75rem 1.25rem; font-size: var(--t-s); }
.pied-note { color: var(--encre-doux); margin: 0; }

/* ---------------------------------------------------------------- */
/* Mobile                                                            */
/* ---------------------------------------------------------------- */

@media (max-width: 720px) {
  :root { --t-xxl: 2rem; --t-xl: 1.5rem; }

  .menu-bouton {
    display: block;
    font-size: var(--t-s);
    font-weight: 600;
    padding: .35rem .8rem;
    border: 1px solid var(--trait);
    border-radius: var(--r);
    cursor: pointer;
  }
  .nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: .2rem;
    width: 100%;
    padding-top: .5rem;
  }
  .nav a { padding: .55rem 0; width: 100%; }
  .menu-bascule:checked ~ .nav { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
