/*
 * Copyright (c) 2024.  Akwaba(c) est une marque deposee.
 *
 * Base commune à toutes les pages du site (accueil compris).
 * Les règles ci-dessous scoppées sous #page ne s'appliquent qu'aux pages
 * secondaires (celles qui utilisent <div id="page"> comme conteneur) afin de
 * ne jamais affecter la mise en page spécifique de l'accueil (index.html).
 */

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

body {
    min-height: 100vh;
    background: #103750;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    line-height: 1.7;
}

/* Fond animé : logo en filigrane + voile sombre qui se lève à l'ouverture */
#bg {
    position: fixed;
    inset: 0;
    z-index: 1;
}

#bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url('/img/akw-logo-15.svg') center / cover no-repeat;
    transform: scale(1.125);
    z-index: 1;
}

#bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to top, rgba(19, 21, 25, 0.5), rgba(19, 21, 25, 0.5));
    transition: background-color 2.5s ease-in-out 0.75s;
    z-index: 2;
}

body.is-preload *,
body.is-preload *::before,
body.is-preload *::after {
    animation: none !important;
    transition: none !important;
}

body.is-preload #bg::before {
    background-color: #000;
}

/* ---- Pages secondaires (#page) : header, main, typographie, formulaires ---- */

#page {
    position: relative;
    z-index: 2;
}

#page header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

#page header a.home {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.8rem;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    transition: color 0.2s;
}

#page header a.home:hover {
    color: #fff;
}

#page header a.home svg {
    flex-shrink: 0;
}

#page header .logo-mini {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
    font-weight: 300;
    opacity: 0.8;
}

#page main {
    max-width: 720px;
    margin: 3rem auto;
    padding: 0 2rem 4rem;
}

/* Variantes de largeur : main.main-narrow (formulaires simples), main.main-wide (configurateurs) */
#page main.main-narrow {
    max-width: 560px;
}

#page main.main-wide {
    max-width: 800px;
}

#page h1 {
    font-size: 1.6rem;
    font-weight: 300;
    letter-spacing: 0.3rem;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
}

#page a {
    color: #E5AD4F;
    text-decoration: none;
}

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

#page p.intro {
    font-size: 0.9rem;
    opacity: 0.8;
}

#page main p {
    font-size: 0.9rem;
    opacity: 0.8;
}

#page main ul {
    font-size: 0.9rem;
    opacity: 0.8;
    padding-left: 1.25rem;
}

#page main li {
    margin-bottom: 0.25rem;
}

/* ---- Champs de formulaire (contact, commande) ---- */

#page label.field-label {
    font-size: 0.75rem;
    letter-spacing: 0.15rem;
    text-transform: uppercase;
    color: #E5AD4F;
    margin-bottom: 0.4rem;
    display: block;
}

#page input[type="text"],
#page input[type="email"],
#page input[type="tel"],
#page input[type="number"],
#page textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    padding: 0.65rem 0.75rem;
    border-radius: 3px;
}

#page input:focus,
#page textarea:focus {
    outline: none;
    border-color: #E5AD4F;
}

#page textarea {
    min-height: 7rem;
    resize: vertical;
}

#page form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

#page .form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

#page .form-row > div {
    flex: 1;
    min-width: 220px;
}

/* Champ piège anti-spam, invisible pour un humain */
#page .hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
}

#page button {
    align-self: flex-start;
    margin-top: 0.5rem;
    background: #E5AD4F;
    color: #103750;
    border: none;
    padding: 0.75rem 2rem;
    font-size: 0.85rem;
    letter-spacing: 0.15rem;
    text-transform: uppercase;
    border-radius: 3px;
    cursor: pointer;
    transition: opacity 0.2s;
}

#page button:hover {
    opacity: 0.85;
}

#page button:disabled {
    opacity: 0.5;
    cursor: default;
}

#page #form-message {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    padding: 0.85rem 1rem;
    border-radius: 3px;
    display: none;
}

#page #form-message.success {
    display: block;
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.4);
}

#page #form-message.error {
    display: block;
    background: rgba(189, 86, 48, 0.2);
    border: 1px solid rgba(189, 86, 48, 0.5);
}

@media (max-width: 480px) {
    #page main {
        padding: 0 1rem 3rem;
    }

    #page h1 {
        font-size: 1.2rem;
    }
}