/*
  Design system Opap's — source : _bmad-output/planning-artifacts/shop-en-ligne/1_design-system.txt.
  Les composants ne lisent que ces variables : changer de thème = changer "Theme" dans wwwroot/appsettings.json.
*/

/* ---------- Polices auto-hébergées (OFL, voir fonts/OFL-*.txt) ---------- */
@font-face {
    font-family: "Nunito";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/nunito-latin-400-normal.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;
}
@font-face {
    font-family: "Nunito";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/nunito-latin-ext-400-normal.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;
}
@font-face {
    font-family: "Kalam";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/kalam-latin-400-normal.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;
}
@font-face {
    font-family: "Kalam";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/kalam-latin-ext-400-normal.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;
}
@font-face {
    font-family: "Bebas Neue";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/bebas-neue-latin-400-normal.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;
}
@font-face {
    font-family: "Bebas Neue";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/bebas-neue-latin-ext-400-normal.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;
}

/* ---------- Jetons communs aux thèmes ---------- */
:root {
    /* Typographie */
    --font-main: "Nunito", system-ui, sans-serif;
    --font-personal: "Kalam", cursive;
    --font-title: "Bebas Neue", Impact, sans-serif;
    --text-base: 1rem;
    --text-small: 0.8rem;          /* base × 0.8 */
    --text-h3: 1.5625rem;          /* base × 1.25² */
    --text-h2: 1.953125rem;        /* base × 1.25³ */
    --text-h1: 2.44140625rem;      /* base × 1.25⁴ */

    /* Inclinaison : 10° (parallélogramme à 80°), boîtes et titres */
    --skew: skewX(-10deg);

    /* Espacements (grille de 8 pt) */
    --space-xs: 0.25rem;
    --space-s: 0.5rem;
    --space-m: 1rem;
    --space-l: 2rem;
    --space-xl: 4rem;

    /* Ombre : noir 10 % (flou repris de l'ombre du logo signature : stdDeviation 10) */
    --shadow-color: rgb(0 0 0 / 10%);
    --shadow: 0 0 20px var(--shadow-color);

    /* Mouvement */
    --duration-hover: 0.2s;
    --duration-click: 0.15s;
    --easing: ease-out;

    /* Boîtes */
    --box-height: 2.75em;
}

/* ---------- Thèmes ---------- */
[data-theme="themeGold"] {
    --main-1: #f8ae06;
    --main-2: #cf8134;
    --second-1: #460d23;
    --second-2: #24191e;
    --grey-1: #e5e5e5;
    --grey-2: #c4c4c4;
    --text-color: #24191e;
    --white: #ffffff;
    --black: #000000;
}

[data-theme="themeGreen"] {
    --main-1: #0b6353;
    --main-2: #08453a;
    --second-1: #460d23;
    --second-2: #f4b8d1;
    --grey-1: #e5e5e5;
    --grey-2: #c4c4c4;
    --text-color: #24191e;
    --white: #ffffff;
    --black: #000000;
}

[data-theme] {
    --state-in-stock: #0b6353;     /* commun aux thèmes */
    --main-gradient: linear-gradient(to right, var(--main-1), var(--main-2));
    --second-gradient: linear-gradient(to right, var(--second-1), var(--second-2));
    --grey-gradient: linear-gradient(to right, var(--grey-1), var(--grey-2));
}

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

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    font-size: var(--text-base);
    line-height: 1.4;
    color: #24191e;
    background: #ffffff;
}

.shop {
    min-height: 100vh;
    color: var(--text-color);
    background: var(--white);
}

h1, h2, h3 {
    font-family: var(--font-title);
    font-weight: 400;
    line-height: 1.1;
    transform: var(--skew);
    margin: 0;
}
h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }

img {
    display: block;
    max-width: 100%;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

a {
    color: inherit;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Mouvement réduit : aucune animation si l'utilisateur les a coupées dans son système. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition: none !important;
        animation: none !important;
    }
}

/* ---------- Chargement et erreur (gabarit Blazor) ---------- */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}
.loading-progress circle {
    fill: none;
    stroke: #e5e5e5;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}
.loading-progress circle:last-child {
    stroke: #f8ae06;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}
.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}
.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "");
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Drapeau de langue : incliné à −10°, hauteur donnée par son conteneur. */
.language-flag {
    display: block;
    height: 100%;
    width: auto;
    transform: var(--skew);
}
