/* ==========================================================================
   HostInSmart — marque « Le direct » : socle commun à toute la plateforme
   --------------------------------------------------------------------------
   Chargé par les trois gabarits (frontend, main, auth) APRÈS DaisyUI et Tailwind.
   1. Polices auto-hébergées (aucun appel à un service tiers)
   2. Jetons de la marque
   3. Thème DaisyUI « light » aux couleurs de la marque
   4. Logotype et point
   5. Espace connecté (barre latérale, en-tête) et pages de connexion
   Ne concerne PAS les sites publics des propriétaires (app/Views/themes).
   ========================================================================== */

/* ------------------------------------------------------------ 1. Polices */
@font-face {
    font-family: 'Bricolage Grotesque';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('../fonts/brand/bricolage-grotesque-latin-ext-opsz-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: 'Bricolage Grotesque';
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url('../fonts/brand/bricolage-grotesque-latin-opsz-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: 'DM Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/brand/dm-mono-latin-400-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'DM Mono';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/brand/dm-mono-latin-500-normal.woff2') format('woff2');
}

/* ------------------------------------------------------------ 2. Jetons */
:root {
    --his-ink: #0E1F18;        /* Encre : texte, boutons, barres */
    --his-ink-2: #1A3329;      /* Encre claire : survols sur fond encre */
    --his-go: #16DB7C;         /* Vert direct : la marque, ce qui est confirmé */
    --his-go-ink: #0B8F50;     /* Vert lisible en texte sur fond clair */
    --his-paper: #FAF7F0;      /* Papier : fond */
    --his-sand: #EFE9DC;       /* Sable : surfaces secondaires */
    --his-line: #E4DCCB;       /* Filets */
    --his-detour: #FF6B4A;     /* Corail : le détour (frais, intermédiaire) */
    --his-r: 10px;             /* rayon unique ; seul le point est rond */
    --his-font: 'Bricolage Grotesque', 'Satoshi-Variable', 'Satoshi', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --his-mono: 'DM Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

/* ------------------------------------------------------------ 3. Thème DaisyUI (valeurs en OKLCH) */
:root, [data-theme=light] {
    color-scheme: light;
    --p: 22.17% 0.0269 165.78;    /* primaire = encre */
    --pc: 97.65% 0.0098 87.47;    /* papier */
    --s: 78.36% 0.1943 153.96;    /* secondaire = vert direct */
    --sc: 22.17% 0.0269 165.78;
    --a: 78.36% 0.1943 153.96;    /* accent = vert direct */
    --ac: 22.17% 0.0269 165.78;
    --n: 22.17% 0.0269 165.78;    /* neutre = encre */
    --nc: 97.65% 0.0098 87.47;
    --b1: 100% 0 0;               /* cartes : blanc */
    --b2: 97.65% 0.0098 87.47;    /* fond de page : papier */
    --b3: 89.62% 0.0244 85.79;    /* filets : sable foncé */
    --bc: 22.17% 0.0269 165.78;   /* texte : encre */
    --in: 47.06% 0.0893 246.23;   /* information : bleu posé */
    --inc: 100% 0 0;
    --su: 57.17% 0.1406 154.29;   /* succès : vert lisible */
    --suc: 100% 0 0;
    --wa: 79.86% 0.1594 80.23;
    --wac: 22.17% 0.0269 165.78;
    --er: 57.91% 0.1989 32.48;    /* erreur : corail profond */
    --erc: 100% 0 0;
    --rounded-box: 10px;
    --rounded-btn: 10px;
    --rounded-badge: 6px;
    --tab-radius: 10px;
}

body {
    font-family: var(--his-font);
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
}
.font-mono, code, kbd, pre { font-family: var(--his-mono); }

/* Boutons : francs. Le primaire passe au vert au survol, comme sur le site. */
.btn { font-weight: 700; letter-spacing: -.005em; }
.btn-primary:hover, .btn-neutral:hover {
    background-color: var(--his-go);
    border-color: var(--his-go);
    color: var(--his-ink);
}
.btn-primary.btn-outline:hover { background-color: var(--his-ink); border-color: var(--his-ink); color: var(--his-paper); }
.btn-success { background-color: var(--his-go); border-color: var(--his-go); color: var(--his-ink); }
.btn-success:hover { background-color: #12C46E; border-color: #12C46E; color: var(--his-ink); }
.badge { font-weight: 600; }
.link-primary { text-decoration-color: var(--his-go); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* Messages : une teinte douce et du texte encre plutôt qu'un aplat vif */
.alert-info    { --alert-bg: var(--his-sand); color: var(--his-ink); border-color: transparent; }
.alert-success { --alert-bg: #D8F8E7; color: var(--his-ink); border-color: transparent; }
.alert-warning { --alert-bg: #FCEFC8; color: var(--his-ink); border-color: transparent; }
.alert-error   { --alert-bg: #FFE3DB; color: #7A1E0C; border-color: transparent; }

/* Champs : le focus prend la couleur de la marque */
.input:focus, .select:focus, .textarea:focus,
.input:focus-within, .select:focus-within {
    outline-color: var(--his-go);
    border-color: var(--his-ink);
}

/* ------------------------------------------------------------ 4. Logotype et point */
/* Le « i » est une personne : sa tête est le point vert. Marquage : host<i>ı</i>nsmart */
.his-logo {
    display: inline-block;
    font-family: var(--his-font);
    font-weight: 800;
    font-size: 1.42rem;
    letter-spacing: -.055em;
    line-height: 1;
    white-space: nowrap;
    color: inherit;
    text-decoration: none;
}
.his-logo i { font-style: normal; position: relative; }
.his-logo i::before {
    content: '';
    position: absolute;
    left: 50%;
    top: .05em;
    width: .25em;
    height: .25em;
    margin-left: -.125em;
    border-radius: 50%;
    background: var(--his-go);
}
.his-dot { display: inline-block; flex: none; width: .62em; height: .62em; border-radius: 50%; background: var(--his-go); vertical-align: .04em; }

/* ------------------------------------------------------------ 5. Espace connecté et connexion */
/* Un seul rayon pour les surfaces (les pastilles rondes — avatars, points — restent rondes) */
.his-app .rounded-xl, .his-app .rounded-2xl, .his-app .rounded-3xl,
.his-auth .rounded-xl, .his-auth .rounded-2xl, .his-auth .rounded-3xl { border-radius: var(--his-r); }

.his-app h1, .his-app h2, .his-app h3,
.his-auth h1, .his-auth h2, .his-auth h3 { letter-spacing: -.025em; }

/* Barre latérale */
.his-side { background: var(--his-ink); color: var(--his-paper); }
.sidebar-link { position: relative; }
.sidebar-link:hover { background: rgba(250, 247, 240, .08); color: #fff; }
.sidebar-link.active { background: rgba(22, 219, 124, .14); color: var(--his-go); font-weight: 700; }
.sidebar-link.active::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    width: 7px;
    height: 7px;
    margin-top: -3.5px;
    border-radius: 50%;
    background: var(--his-go);
}

/* En-tête */
.his-top { background: var(--his-ink); color: var(--his-paper); }

/* Pages de connexion : le panneau de gauche porte la couleur de la marque */
.his-auth-panel { background: var(--his-go); color: var(--his-ink); }
.his-auth-panel .his-logo i::before { background: var(--his-ink); }
.his-auth-panel--ink { background: #132A20; color: var(--his-paper); }
.his-auth-panel--ink .his-logo i::before { background: var(--his-go); }
.his-auth-foot { border-color: rgba(14, 31, 24, .2); opacity: .7; }
.his-auth-panel--ink .his-auth-foot { border-color: rgba(250, 247, 240, .15); opacity: .5; }
.his-auth-title { font-weight: 800; font-size: clamp(2.5rem, 3.7vw, 3.4rem); letter-spacing: -.045em; line-height: .98; }
.his-auth-title u { text-decoration: none; background: linear-gradient(var(--his-ink), var(--his-ink)) 0 94% / 100% .1em no-repeat; padding-bottom: .04em; }
/* les trois choses, sur la ligne */
.his-auth-three { display: grid; margin-left: 6px; border-left: 3px solid var(--his-ink); }
.his-auth-three span { position: relative; padding: 10px 0 10px 24px; font-weight: 700; font-size: 1.1rem; letter-spacing: -.02em; }
.his-auth-three span::before {
    content: '';
    position: absolute;
    left: -8.5px;
    top: 50%;
    width: 14px;
    height: 14px;
    margin-top: -7px;
    border-radius: 50%;
    background: var(--his-ink);
    box-shadow: 0 0 0 4px var(--his-go);
}
