/* global.css — single global stylesheet loaded by BaseLayout.
   Includes the Materialize CSS subset (reset, typography, grid, buttons,
   forms) followed by Le Bon Geste site-specific rules. */

/* === Self-hosted Montserrat variable font (latin + latin-ext) === */

/* latin-ext */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url(/assets/fonts/montserrat-latin-ext.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* latin */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url(/assets/fonts/montserrat-latin.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* === Design tokens === */
:root {
    --color-primary: #00bfa5;
    --color-primary-dark: #00816f;
    --color-primary-light: #bfefe8;
    --color-primary-hover: #2bbbad;
    --color-on-primary: #fff;
    --color-text: #4c4c4e;
    --color-text-muted: #818181;
    --color-secondary: #00589c;
    --color-on-secondary: #fff;
    --color-border: #e6e6e6;
    --color-input-border: #9e9e9e;
    --color-surface: #fff;
    --color-background: #f5f5f5;
}

/* ═══════════════════════════════════════════════════
   Part 1 — Reset & Materialize subset
   Sources: normalize.css v3, Materialize v1.
   ═══════════════════════════════════════════════════ */

/* === Reset === */
body {
    margin: 0;
}
*,
*::before,
*::after {
    box-sizing: border-box;
}
[hidden] {
    display: none;
}
a {
    background-color: transparent;
    text-decoration: none;
}
b,
strong {
    font-weight: 700;
}
button,
input,
textarea {
    color: inherit;
    font: inherit;
    margin: 0;
}
button {
    overflow: visible;
    text-transform: none;
    appearance: button;
    cursor: pointer;
}
button::-moz-focus-inner,
input::-moz-focus-inner {
    border: 0;
    padding: 0;
}
input {
    line-height: normal;
}

/* === List reset === */
ul {
    padding-left: 0;
    list-style-type: none;
}
ul li {
    list-style-type: none;
}

/* === Links === */
a {
    color: #039be5;
    -webkit-tap-highlight-color: transparent;
}

/* === Typography === */
html {
    line-height: 1.5;
    scrollbar-gutter: stable;
}

/* === Grid === */
.wrap {
    width: 100%;
    margin: 0;
}
@media only screen and (min-width: 961px) {
    .wrap {
        width: 960px;
        margin: 0 auto;
    }
}
.wrap .row {
    margin-left: 0;
    margin-right: 0;
}

.row {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0;
}
.row::after {
    content: "";
    display: table;
    clear: both;
}
.row .col {
    float: left;
    box-sizing: border-box;
    padding: 0 0.75rem;
    min-height: 1px;
}
.row .col.s12 {
    width: 100%;
}
@media only screen and (min-width: 961px) {
    .row .col.m6 {
        width: 50%;
    }
}

/* === Buttons === */
.btn,
.btn-flat {
    border: none;
    border-radius: 2px;
    display: inline-block;
    height: 36px;
    line-height: 36px;
    padding: 0 2rem;
    text-transform: uppercase;
    vertical-align: middle;
    outline: 0;
    -webkit-tap-highlight-color: transparent;
}
.btn {
    text-decoration: none;
    color: var(--color-on-primary);
    background-color: var(--color-primary);
    text-align: center;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow:
        0 2px 2px 0 rgba(0, 0, 0, 0.14),
        0 1px 5px 0 rgba(0, 0, 0, 0.12),
        0 3px 1px -2px rgba(0, 0, 0, 0.2);
    transition: 0.2s ease-out;
}
.btn:hover {
    background-color: var(--color-primary-hover);
    box-shadow:
        0 3px 3px 0 rgba(0, 0, 0, 0.14),
        0 1px 7px 0 rgba(0, 0, 0, 0.12),
        0 3px 1px -1px rgba(0, 0, 0, 0.2);
}
.btn:focus {
    background-color: var(--color-primary-dark);
}

.btn-flat {
    box-shadow: none;
    color: #343434;
    cursor: pointer;
    transition: background-color 0.2s;
}
.btn-flat,
.btn-flat:active,
.btn-flat:focus {
    background-color: transparent;
}
.btn-flat:focus,
.btn-flat:hover {
    background-color: rgba(0, 0, 0, 0.1);
    box-shadow: none;
}
.btn-flat:active {
    background-color: rgba(0, 0, 0, 0.2);
}

/* === Forms === */
button:focus {
    outline: none;
    background-color: var(--color-primary-hover);
}
label {
    font-size: 0.8rem;
    color: var(--color-input-border);
}
input[type="email"],
input[type="search"],
input[type="text"],
textarea {
    background-color: transparent;
    border: none;
    border-bottom: 1px solid var(--color-input-border);
    border-radius: 0;
    outline: none;
    height: 3rem;
    width: 100%;
    font-size: 1rem;
    margin: 0 0 20px;
    padding: 0;
    box-shadow: none;
    box-sizing: content-box;
    transition: all 0.3s;
}

input[type="email"]:focus:not([readonly]),
input[type="search"]:focus:not([readonly]),
input[type="text"]:focus:not([readonly]),
textarea:focus:not([readonly]) {
    border-bottom: 1px solid var(--color-primary-hover);
    box-shadow: 0 1px 0 0 var(--color-primary-hover);
}
input[type="email"]:focus:not([readonly]) + label,
input[type="search"]:focus:not([readonly]) + label,
input[type="text"]:focus:not([readonly]) + label,
textarea:focus:not([readonly]) + label {
    color: var(--color-primary-hover);
}

.input-field {
    position: relative;
    margin-top: 1rem;
}
.input-field.col label {
    left: 0.75rem;
}
.input-field label {
    color: var(--color-input-border);
    position: absolute;
    top: 0.8rem;
    left: 0;
    font-size: 1rem;
    cursor: text;
    transition: 0.2s ease-out;
}

textarea {
    overflow-y: hidden;
    padding: 0.8rem 0 1.6rem;
    resize: none;
    min-height: 3rem;
}

/* ═══════════════════════════════════════════════════
   Part 2 — Le Bon Geste site rules
   ═══════════════════════════════════════════════════ */

/* ── Base ────────────────────────────────────────── */

body {
    min-height: 90vh;
    font-size: 12px;
    font-family: Montserrat, sans-serif;
    font-weight: 400;
    color: var(--color-text);
}

p {
    margin: 0;
}

/* ── Layout — <main> element ─────────────────────── */

main {
    background: var(--color-background);
    padding-bottom: 3em;
    position: relative;
}
main > .wrap {
    padding: 0 10px;
    color: var(--color-text-muted);
}
@media (min-width: 960px) {
    main > .wrap {
        padding: 0;
    }
}
main .page {
    padding: 20px;
}
@media (min-width: 960px) {
    main .page {
        padding: 60px;
    }
}
main .page p {
    margin-bottom: 30px;
}
main .page p:last-of-type {
    margin-bottom: 0;
}

h1,
h2,
h3,
h4 {
    font-weight: 500;
}
h1 {
    font-size: 24px;
    margin: 2em 0 1em;
}
h2 {
    font-size: 20px;
    margin: 1.5em 0 0.75em;
    line-height: 1.5em;
}
h3 {
    font-size: 18px;
    margin: 1em 0 0.5em;
}
h4 {
    font-size: 16px;
    margin: 0.75em 0 0.25em;
}

/* ── Card — shared base ──────────────────────────── */

.card {
    position: relative;
    background-color: var(--color-surface);
    border-radius: 2px;
    box-shadow:
        0 2px 2px 0 rgba(0, 0, 0, 0.14),
        0 1px 5px 0 rgba(0, 0, 0, 0.12),
        0 3px 1px -2px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.25s;
    margin: 0.5rem 0;
}
@media (max-width: 960px) {
    .card {
        width: 100%;
    }
}
.card p {
    line-height: 26px;
    margin-bottom: 10px;
}
.card p:last-of-type {
    margin-bottom: 0;
}

/* ── Floating-label fallback — replaces Materialize JS ── */

/* Each input/textarea has placeholder=" " so :placeholder-shown matches when
   empty. We use :has() because Materialize puts <label> before <input>. */
.input-field:has(input:focus) > label,
.input-field:has(input:not(:placeholder-shown)) > label,
.input-field:has(textarea:focus) > label,
.input-field:has(textarea:not(:placeholder-shown)) > label {
    font-size: 0.8rem;
    transform: translateY(-140%);
}

/* Required-field indicator — red * after the label. */
.input-field:has(input[required], textarea[required]) > label::after {
    content: " *";
    color: #e53935;
}

