/* ==========================================================================
   MOBICHEF website
   1. Fonts   2. Base   3. Header   4. Banner   5. Home page   6. Contact form
   7. Text pages (errors), legal notice   8. Footer   9. Responsive   10. Animations
   ========================================================================== */

/* ---------- 1. Fonts ----------
   Three weights only: 300 (text), 600 (labels, buttons) and 800 (titles). Never ask for another weight in this file,
   except in the legal notice block, shared with the other websites: it asks for 400, 600 and 700, which the browser
   answers with the 300, 600 and 800 faces (no synthetic bold). */

@font-face {
    font-family: 'Fira Sans';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url("../fonts/fira-sans-300.woff2") format("woff2");
}

@font-face {
    font-family: 'Fira Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/fira-sans-600.woff2") format("woff2");
}

@font-face {
    font-family: 'Fira Sans';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url("../fonts/fira-sans-800.woff2") format("woff2");
}

/* ---------- 2. Base ---------- */

:root {
    --purple: #7d0d6d;          /* brand colour: titles, buttons, icons */
    --purple-dark: #5c0a52;     /* hover, emphasis inside texts */
    --purple-tint: #f5e8f4;     /* light background of tags and separators */
    --text: #3d1038;
    --text-plain: #212529;
    --muted: #6b6b6b;           /* secondary text, placeholders (5.3:1 on white) */
    --border-field: #8d8d8d;    /* border of the form fields (3.4:1 on white) */
    --bg-light: #f8f9fa;
    --bg-page: #f4f4f8;
    --ok: #1f6f1f;
    --error: #b3001b;
    --legal-accent: var(--purple);   /* titles and links of the legal notice */
}

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

body,
h1,
h2,
h3,
p,
ul,
ol {
    margin: 0;
}

ul,
ol {
    padding: 0;
    list-style: none;
}

::selection {
    background: var(--purple);
    color: #fff;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Fira Sans', Arial, sans-serif;
    font-weight: 300;
    line-height: 1.5;
    color: var(--text-plain);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: #000;
    text-decoration: none;
}

strong {
    font-weight: 800;
}

/* Keyboard focus */
:focus-visible {
    outline: 3px solid var(--purple);
    outline-offset: 2px;
}

/* Icons (include/icons.php) */
.icon {
    flex-shrink: 0;
}

/* ---------- 3. Header ---------- */

header {
    position: sticky;
    top: 0;
    z-index: 99;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 3em;
    background: #fff;
}

.header-side {
    flex: 1;
}

.header-side--end {
    text-align: right;
}

.logo {
    display: block;
}

.logo img {
    display: block;
}

.button {
    display: inline-block;
    padding: 7px 18px;
    border: 2px solid var(--purple);
    border-radius: 4px;
    background: var(--purple);
    color: #fff;
    font-size: 0.85em;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.04em;
    transition: background-color 0.2s, color 0.2s;
}

.button:hover {
    background: transparent;
    color: var(--purple);
}

.button .icon {
    margin-right: 2px;
    vertical-align: -2px;
}

/* ---------- 4. Banner (home page) ---------- */

.hero {
    position: relative;
    max-width: 1920px;
    height: 30em;
    margin: 0 auto;
    background: url("../images/hero.webp") center / cover no-repeat;
}

.hero-band {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    z-index: 2;
    transform: translateX(-50%);
    padding: 1rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    white-space: nowrap;
}

.hero h1 {
    color: var(--purple);
    font-size: 1.8em;
    font-weight: 800;
    line-height: 1.2;
}

/* ---------- 5. Home page ---------- */

.home {
    background: var(--bg-light);
}

/* Features */
.features {
    padding: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    max-width: 960px;
    margin: 0 auto;
}

.features-grid li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 1rem 1.25rem;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(125, 13, 109, 0.09);
    color: var(--purple);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
}

.features-grid img {
    width: 90px;
    height: 90px;
    object-fit: contain;
}

/* The solution: tray picture with its three cards, then the list of advantages */
.solutions {
    padding: 3rem 2rem 3rem 0;
}

.solutions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 3rem;
    max-width: 1300px;
    margin: 0 auto;
}

.plateau {
    position: relative;
    flex: 0 0 65%;
    max-width: 65%;
}

.plateau img {
    display: block;
    width: 100%;
}

/* The cards sit on the tray of the picture */
.plateau-cards {
    position: absolute;
    top: 6%;
    right: 2%;
    bottom: 44%;
    left: 8%;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 2%;
}

.plateau-card {
    display: flex;
    flex: 1;
    flex-direction: column;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.93);
    box-shadow: 0 3px 14px rgba(125, 13, 109, 0.18);
}

.plateau-card-title {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0.75rem 1rem;
    background: var(--purple);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-align: center;
    text-transform: uppercase;
}

.plateau-steps {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    color: var(--purple-dark);
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

/* Arrow between two steps (the second declaration hides it from screen readers where supported) */
.plateau-steps li + li::before {
    content: '↓';
    content: '↓' / '';
    display: block;
    margin: 0.3rem 0;
    color: var(--purple);
    font-size: 0.85rem;
    line-height: 1;
}

.solutions-card {
    flex: 1;
    min-width: 260px;
    align-self: center;
    padding: 1.5rem 2rem;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 16px rgba(125, 13, 109, 0.1);
}

.solutions-card h2 {
    padding-bottom: 1.1rem;
    border-bottom: 2px solid var(--purple-tint);
    color: var(--purple);
    font-size: 1.6rem;
    font-weight: 300;
    line-height: 1.35;
}

.solutions-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin-top: 1rem;
}

.solutions-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.5;
}

.solutions-list .icon {
    margin-top: 4px;
    color: var(--purple);
}

.hi {
    color: var(--purple);
    font-weight: 600;
}

/* The order cycle */
.cycle {
    max-width: 1920px;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 0;
}

.cycle h2 {
    margin-bottom: 0.5rem;
    padding: 1.25rem 0 2rem;
    color: var(--purple);
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: -0.02em;
    text-align: center;
}

.cycle h2 strong {
    font-weight: 600;
}

.cycle-intro {
    max-width: 860px;
    margin: 0 auto 2.25rem;
    padding-left: 1.25rem;
    border-left: 4px solid var(--purple);
    color: #4a0a42;
    line-height: 1.8;
}

.cycle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    max-width: 960px;
    margin: 0 auto 2em;
}

.cycle-card {
    padding: 1.4rem 1.5rem 1.5rem;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(125, 13, 109, 0.09);
    color: var(--text);
    font-size: 0.93rem;
    line-height: 1.8;
}

.cycle-card--full {
    grid-column: 1 / -1;
}

.cycle-card strong {
    color: var(--purple-dark);
    font-weight: 600;
}

.cycle-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 0.85rem;
}

.cycle-icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--purple);
    color: #fff;
}

.cycle-card h3 {
    color: var(--purple);
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.2;
}

/* Tags: states of a file (rounded), documents (solid) and accounting software (outlined) */
.cycle-states,
.tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 0.7rem 0 0.9rem;
}

.cycle-states li {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Arrow between two states (the second declaration hides it from screen readers where supported) */
.cycle-states li + li::before {
    content: '›';
    content: '›' / '';
    color: var(--purple);
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.cycle-states span,
.tags--outline li {
    padding: 3px 13px;
    border: 1.5px solid var(--purple);
    background: var(--purple-tint);
    color: var(--purple);
    font-size: 0.82rem;
    font-weight: 600;
}

.cycle-states span {
    border-radius: 20px;
    white-space: nowrap;
}

.tags {
    gap: 7px;
    margin: 0.65rem 0 0;
}

.tags--solid li {
    padding: 4px 11px;
    border-radius: 4px;
    background: var(--purple);
    color: #fff;
    font-size: 0.81rem;
    font-weight: 600;
}

.tags--outline {
    gap: 8px;
}

.tags--outline li {
    padding: 4px 13px;
    border-radius: 4px;
    font-size: 0.86rem;
    font-weight: 800;
}

/* Photo band */
.photos img {
    display: block;
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
}

/* ---------- 6. Contact form (last section of the home page) ---------- */

/* The header is sticky: leave room for it when the page scrolls to #contact */
.contact-section {
    padding: 2.5em 1.5rem 3.5em;
    background: var(--bg-page);
    scroll-margin-top: 7rem;
}

/* Side panel (map of France and phone number) on the left, form on the right */
.contact-layout {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.75em 1.5em;
    border-radius: 10px;
    background: var(--purple);
    color: #fff;
    text-align: center;
}

.contact-info img {
    width: 100%;
    max-width: 240px;
    height: auto;
    margin-bottom: 2rem;
}

.contact-info-label {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* The number is a link (tel:): padding for a finger, white outline on the purple panel */
.contact-phone {
    padding: 0.4rem 0.5rem;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    white-space: nowrap;
}

.contact-phone:hover {
    text-decoration: underline;
}

.contact-info :focus-visible {
    outline-color: #fff;
}

.contact-card {
    display: flex;
    flex-direction: column;
    padding: 2em 2.5em;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
}

.contact-card h2 {
    margin-bottom: 1.5em;
    color: var(--purple);
    font-size: 1.25em;
    font-weight: 300;
}

.contact-card h2 strong {
    font-weight: 600;
}

.form {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 30px;
}

.field {
    margin-bottom: 1rem;
}

.field--grow {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.field label {
    display: block;
    margin-bottom: 0.3em;
    color: var(--purple);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

/* Asterisk of the required fields (the required attribute tells it to screen readers) */
.field label.required::after {
    content: ' *';
    content: ' *' / '';
}

.field input,
.field textarea {
    display: block;
    width: 100%;
    padding: 0.65em 0.85em;
    border: 1.5px solid var(--border-field);
    border-radius: 6px;
    background: #fafafa;
    color: #333;
    font-family: inherit;
    font-size: 0.9em;
    font-weight: 300;
    transition: border-color 0.2s, background 0.2s;
}

.field input:focus,
.field textarea:focus {
    border-color: var(--purple);
    background: #fff;
}

.field input::placeholder,
.field textarea::placeholder {
    color: var(--muted);
    font-style: italic;
    opacity: 1;
}

.field textarea {
    flex: 1;
    min-height: 100px;
    resize: vertical;
}

.form-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 0.75em;
}

.form-footer > * {
    flex-shrink: 0;
}

.form-footer button {
    padding: 0.75em 1.5em;
    border: 0;
    border-radius: 6px;
    background: var(--purple);
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95em;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: background 0.2s, transform 0.1s;
}

.form-footer button .icon {
    margin-left: 0.4em;
    vertical-align: -3px;
}

.form-footer button:hover {
    background: var(--purple-dark);
    transform: translateY(-1px);
}

.form-footer button:active {
    transform: none;
}

.form-footer button:disabled {
    cursor: wait;
    opacity: 0.6;
    transform: none;
}

.form-note {
    color: var(--muted);
    font-size: 0.75em;
}

/* Answer of mail.php, under the button */
[role="status"] {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.9em;
    font-weight: 600;
}

[role="status"].valid {
    color: var(--ok);
}

[role="status"].error {
    color: var(--error);
}

/* ---------- 7. Text pages (errors); the legal notice has its own block below ---------- */

.text-page {
    min-height: 60vh;
    margin-top: 2em;
    padding: 3em;
    background: var(--bg-page);
}

.text-page h1 {
    margin-bottom: 0.5rem;
    color: var(--purple);
    font-size: 2.5rem;
    font-weight: 800;
}

.text-page p {
    margin-bottom: 1rem;
}

.text-page a {
    color: var(--purple);
    font-weight: 800;
}

.text-page a:hover {
    text-decoration: underline;
}

/* A link alone on its line is easier to hit with a finger */
.error-page a {
    display: inline-block;
    padding: 3px 0;
}

/* ---------- Legal notice ----------
   The markup of the notice (include/mentions-legales-content.php) and these rules are the same on every website of the
   group. The only value that belongs to the website is --legal-accent (titles, sub-titles and links), set in :root. */

.legal {
    box-sizing: border-box;
    max-width: 1200px;
    margin: 2em auto 0;
    padding: 3em;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    text-align: justify;
    hyphens: auto;
}

.legal h1,
.legal h2,
.legal h3 {
    margin: 0;
    font-weight: 700;
    line-height: 1.5;
}

.legal h1 {
    font-size: 2em;
    text-transform: uppercase;
}

.legal h2 {
    margin: 1em 0;
    font-size: 1.5em;
    text-align: left;
}

.legal h3 {
    margin: 1.5em 0 0.5em;
    font-size: 1.17em;
    text-align: left;
}

.legal p,
.legal ul {
    margin: 0 0 1em;
    font-size: 1em;
    font-weight: 400;
    line-height: 1.5;
}

.legal ul {
    padding: 0;
    list-style: none;
}

.legal li {
    font-size: 1em;
    font-weight: 400;
    line-height: 1.5;
    list-style: none;
}

.legal b,
.legal strong {
    font-weight: 700;
}

.legal a {
    color: var(--legal-accent);
    font-weight: 600;
}

.mention {
    text-align: center;
}

.mention-title {
    color: var(--legal-accent);
}

.mention-soustitle {
    font-weight: 700;
    font-style: italic;
}

h3.mention-soustitle {
    color: var(--legal-accent);
}

.sous-mention {
    padding-left: 10px;
}

@media (max-width: 600px) {
    .legal {
        padding: 1.5em;
    }
}

/* ---------- 8. Footer ---------- */

footer {
    padding: 1rem 10em;
    text-align: center;
}

footer a {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    color: var(--purple);
    font-size: 0.85em;
    font-weight: 600;
}

footer a:hover {
    text-decoration: underline;
}

/* ---------- 9. Responsive ---------- */

@media (max-width: 1200px) {
    footer {
        padding-right: 5em;
        padding-left: 5em;
    }
}

@media (min-width: 951px) and (max-width: 1024px) {
    .solutions-row {
        gap: 2rem;
    }

    .plateau {
        flex-basis: 60%;
        max-width: 60%;
    }
}

/* Tablets and phones: the tray picture is replaced by the three cards stacked */
@media (max-width: 950px) {
    .contact-layout {
        grid-template-columns: minmax(0, 1fr);
        max-width: 800px;
    }

    .contact-info img {
        max-width: 180px;
        margin-bottom: 1rem;
    }

    .solutions {
        padding: 2rem 1.5rem;
    }

    .solutions-row {
        gap: 1.5rem;
    }

    .plateau {
        flex-basis: 100%;
        max-width: 100%;
    }

    .plateau img {
        display: none;
    }

    .plateau-cards {
        position: static;
        flex-direction: column;
        gap: 0.75rem;
    }

    .solutions-card {
        flex-basis: 100%;
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .hero {
        height: auto;
        min-height: 16em;
        background-image: url("../images/hero-mobile.webp");
    }

    .hero-band {
        right: 1rem;
        left: 1rem;
        transform: none;
        text-align: center;
        white-space: normal;
    }

    .hero h1 {
        font-size: 1.2em;
    }

    .features {
        padding: 2rem 1.5rem;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cycle-grid {
        grid-template-columns: 1fr;
    }

    .cycle-card {
        padding: 1rem 1.25rem;
    }

    .cycle-intro {
        padding-left: 0.75rem;
    }

    .cycle-states span,
    .tags--outline li,
    .tags--solid li {
        font-size: 0.85rem;
    }

    .cycle-states span {
        white-space: normal;
    }

    .contact-card {
        padding: 1.5em 1.25em;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    /* 16 px: below that, iOS zooms the page when a field gets the focus */
    .field input,
    .field textarea {
        font-size: 1rem;
    }

    .text-page {
        padding: 1.5em;
    }

    footer {
        padding-right: 1.5rem;
        padding-left: 1.5rem;
    }
}

/* Header on phones: logo on its own line, the two buttons under it */
@media (max-width: 658px) {
    header {
        justify-content: center;
        gap: 0.75rem 1rem;
        padding-right: 1em;
        padding-left: 1em;
    }

    .logo {
        flex: 0 0 100%;
        order: -1;
    }

    .logo img {
        margin: 0 auto;
    }

    .header-side {
        flex: 0 1 auto;
    }

    .header-side:empty {
        display: none;
    }

    .button {
        padding: 0.35rem 0.75rem;
        font-size: 0.78rem;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 13em;
    }

    .hero h1 {
        font-size: 1em;
    }

    .features {
        padding: 1.5rem 1rem;
    }

    .features-grid li {
        padding: 1rem 0.75rem;
    }

    .features-grid img {
        width: 70px;
        height: 70px;
    }
}

/* ---------- 10. Animations ---------- */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
