


/* COLORS */

/*
  Les couleurs sont renseignées dans PW.
  Les variables sont générées dans head.php.
*/

/* pour faire varier les couleurs, mettre le data-theme correspondant */
[data-theme="1"] { --theme_color: var(--color-1); --theme_lightcolor: var(--lightcolor-1); }
[data-theme="2"] { --theme_color: var(--color-2); --theme_lightcolor: var(--lightcolor-2); }
[data-theme="3"] { --theme_color: var(--color-3); --theme_lightcolor: var(--lightcolor-3); }
[data-theme="4"] { --theme_color: var(--color-4); --theme_lightcolor: var(--lightcolor-4); }
[data-theme="5"] { --theme_color: var(--color-5); --theme_lightcolor: var(--lightcolor-5); }
[data-theme="6"] { --theme_color: var(--color-6); --theme_lightcolor: var(--lightcolor-6); }

/* pour faire varier les couleurs, mettre le data-season correspondant */
body:not(.winter) {
  --season_color_1: var(--color-1); --season_lightcolor_1: var(--lightcolor-1);
  --season_color_2: var(--color-2); --season_lightcolor_2: var(--lightcolor-2);
  --season_color_3: var(--color-3); --season_lightcolor_3: var(--lightcolor-3);
}
body.winter {
  --season_color_1: var(--color-4); --season_lightcolor_1: var(--lightcolor-4);
  --season_color_2: var(--color-5); --season_lightcolor_2: var(--lightcolor-5);
  --season_color_3: var(--color-6); --season_lightcolor_3: var(--lightcolor-6);
}
[data-season="1"] { --season_color: var(--season_color_1); }
[data-season="2"] { --season_color: var(--season_color_2); }
[data-season="3"] { --season_color: var(--season_color_3); }
.explodedTitleColor1 { --season_color: var(--season_color_1); }
.explodedTitleColor2 { --season_color: var(--season_color_2); }
.explodedTitleColor3 { --season_color: var(--season_color_3); }

/* RÉGLAGES FONTS */

h1 {
  font: var(--maru-mega-1);
}
.rando_card .rando_text,
.sortie_card .rando_text,
.sortie_card .sortie_dayname,
.sortie_card .sortie_stock,
.sortie_related_rando,
.sortie_card label, 
.sortie_card span {
  font: var(--maru-mono-2);
}

.rounded_button {
  font: var(--maru-mono-3);
}

h2,
.rando_card .rando_title,
.sortie_card .sortie_link,
.rando_link, .sortie_link input,
.rando_level {
  font: var(--maru-mono-4);
}
.rando_card .rando_code,
.sortie_card .sortie_date {
  font: var(--maru-mono-6);
}
.rando_card .rando_details {
  font: var(--neue_montreal_squeezed-2);
}


/* RÉGLAGES TYPOS/COULEURS/BORDERS */

body { color: var(--grey); }
strong { font-weight: 900; }
h1 { text-transform: uppercase; }
h1 a { text-decoration: none; }
h1 span { color: var(--season_color); }
.rando_level {font-style: italic; line-height: 0 !important;}

/* rounded_button */
.rounded_button {
  text-transform: lowercase;
  text-decoration: none;
  background-color: unset;
  color: var(--grey);
  border: 1px solid;
  border-radius: 15px;
  padding: 2px 8px 3px 8px;
  display: block;
  cursor: pointer;
}
.rounded_button:hover { background-color: var(--lightgrey); }

/* rounded_div */
.rounded_div {
  color: var(--theme_color);
  border: 1px solid var(--theme_color);
  border-radius: var(--border-radius);
}

/* filled_button */
.filled_button {
  background-color: var(--theme_color);
  border: 1px solid var(--theme_color);
  color: white;
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  display: block;
  text-align: center;
}

input.filled_button {
  width:100%;
  margin:0;
  border:none;
}

.filled_button:hover {
  background-color: white;
  border: 1px solid var(--theme_color);
  color: var(--theme_color);
}

input.filled_button:hover {
  cursor:pointer;
}

/* unfilled_button */
.unfilled_button {
  color: var(--theme_color);
  padding: 1rem var(--padding-x);
  border-radius: var(--border-radius);
  border: 1px solid var(--theme_color);
  display: block;
  text-align: center;
}
.unfilled_button:hover {
  background-color: white;
  background-color: var(--theme_color);
  color: white;
}

/* rando card */
.rando_card {}
.rando_card .rando_code {
  font-weight: bold;
  font-style: italic;
  text-transform: lowercase;
} 
.rando_card .rando_code:first-letter {
  text-transform: uppercase;
}
.rando_card .rando_title { font-weight: 900; }
.rando_card .rando_text p:not(:last-child) { margin-bottom:1rem; }

/* sortie card */
.sortie_cards_container {}
.sortie_card {
  color: var(--theme_color);
}
.sortie_card .sortie_date { font-weight: 900; font-style: italic; }
.sortie_card .sortie_stock { width: fit-content; }
.sortie_card .sortie_stock { color: var(--theme_color); }
.sortie_card .sortie_stock:hover { background: unset; cursor: inherit; }
.sortie_card .sortie_link {}
.sortie_card .sortie_link a,
.rando_link a {
  text-decoration: none;
}
.sortie_card:not(:last-child):not(.form_card) {
  padding-bottom: 1rem; margin-bottom: 1rem;
  border-bottom: 1px solid var(--grey);
}
.sortie_card .unfilled_button.soldout:hover {
  background-color: white;
  color: var(--theme_color);
}


/* HEADER */

header {
  padding: 1rem var(--padding-x);
  position: relative;
}
header #headerInfosButton {
  position: absolute; top: 28px; right: var(--padding-x);
}
header h1 {
  width: fit-content;
  max-width: calc(100% - 100px); /* évitement du bouton "infos" */
  margin-bottom: 1rem;
}

/* FOOTER */

footer {
  padding: 1rem var(--padding-x);
  position: relative;
}
footer #footerInfosButton {
  position: absolute; right: var(--padding-x);
}

/* LAYOUT */

.row {
  padding: 1rem var(--padding-x);
  display: flex;
  gap: var(--padding-x);
  align-items: start;
}
.row > * {
  flex: 1;
}
@media screen and (max-width: 800px) {
  .row {
    flex-direction: column;
    align-items: normal;
  }
}

/* TOOLS CONTAINER */
#tools_container {
  padding: 0px var(--padding-x);
  display: flex;
  justify-content: space-between;
}

/* rando card */
.rando_card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
}

/* sortie details */

.sortie_details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* sortie card */
.sortie_card {
  display: flex; justify-content: space-between;
  gap: 1rem;
  align-items: center;/*end;*/
  margin: 1rem;
}
@media screen and (max-width: 800px) {
  .sortie_card {
    flex-direction: column;
    align-items: stretch;
  }
}
.sortie_card label, .sortie_card fieldset {
  flex:1;
}

.sortie_card fieldset{
  border: 1px solid var(--grey);
  border-radius: var(--border-radius);
}
.sortie_card fieldset legend {
  color: var(--grey);
  font:var(--maru-mono-2);
  line-height:0;
  margin-left:1rem;
  padding-top:1rem;
  margin-bottom:-1rem;
  background-color:transparent;
  z-index:999;
  border-top: solid 1px var(--grey);
}

.sortie_card fieldset input,
.sortie_card fieldset textarea {
  margin:0;
  background:none;
  width:100%;
  padding:0.5rem;
  padding-top:1.75rem;
  padding-left:1rem;
  font:var(--maru-mono-2);
  border:none;
  outline:none;
}

.sortie_card fieldset input:-webkit-autofill,
.sortie_card fieldset textarea:-webkit-autofill {
    -webkit-background-clip: text;
}

.sortie_card fieldset:has(input:focus),
.sortie_card fieldset:has(input:focus) *,
.sortie_card fieldset:has(textarea:focus),
.sortie_card fieldset:has(textarea:focus) * {
  border-color: var(--theme_color);
}
.sortie_card fieldset:has(input:focus) legend,
.sortie_card fieldset:has(textarea:focus) legend {
  color: var(--theme_color);
}

.sortie_card button {
  font: var(--maru-mono-2);
  color: var(--theme_color);
  background-color: white;
  height:2rem;
  width:2rem;
  line-height:0rem;
  font-size:1rem;
  border-radius:100%;
  border: 1px solid var(--theme_color);
  display: block;
  text-align: center;
}
.sortie_card button:hover {
  background-color: var(--theme_color);
  cursor:pointer;
  color: white;
}

/* sortie_calcul */

@media screen and (max-width: 800px) {
  .sortie_calcul {
    flex-direction: row;
  }
}
