/*
 * ============================================================
 * PRISME — Design Tokens (Fichier CSS partagé entre toutes les pages)
 * Police : Playfair Display (titres) + Libre Franklin (corps)
 * ============================================================
 */

/* --- IMPORT DES POLICES OFFICIELLES PRISME --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700&family=Libre+Franklin:wght@300;400;600;700;800&display=swap');

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

/* --- TOKENS DE COULEUR --- */
:root {
    /* Fond */
    --p-bg:            #0D0D0D;
    --p-bg-deep:       #000000;
    --p-surface:       #161616;
    --p-surface-raise: #1C1C1C;

    /* Texte */
    --p-text:          #F0EDE8;
    --p-text-dim:      #888888;
    --p-text-muted:    #444444;

    /* Bordures */
    --p-border:        rgba(255, 255, 255, 0.08);
    --p-border-raise:  rgba(255, 255, 255, 0.15);

    /* Accent */
    --p-accent:        #4a90e2;
    --p-error:         #ff4d4d;
    --p-success:       #22C55E;

    /* Inputs */
    --p-input-bg:      transparent;
    --p-input-border:  #262626;

    /* Typographie */
    --p-font-display:  'Playfair Display', Georgia, serif;
    --p-font-body:     'Libre Franklin', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Animations */
    --p-ease:          cubic-bezier(0.16, 1, 0.3, 1);
    --p-ease-fast:     cubic-bezier(0.4, 0, 0.2, 1);
    --p-transition:    all 0.3s var(--p-ease-fast);
}

/* --- TYPOGRAPHIE GLOBALE --- */
html {
    font-family: var(--p-font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    color: var(--p-text);
    background-color: var(--p-bg);
}

/* Titres → Playfair Display */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--p-font-display);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.5px;
}

/* Corps → Libre Franklin */
body, p, span, label, input, textarea, button, select, a {
    font-family: var(--p-font-body);
}

/* --- FOND COMMUN (GRILLE + VIGNETTE) --- */
.p-depth-bg {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    pointer-events: none;
    background-color: var(--p-bg-deep);
    overflow: hidden;
}

.p-depth-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(circle at 50% 40%, black 20%, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at 50% 40%, black 20%, transparent 80%);
}

.p-depth-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 60% center, transparent 0%, #000000 80%);
}

/* --- FORMULAIRE COMMUN --- */
.p-input-group {
    margin-bottom: 24px;
}

.p-input-group label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    color: var(--p-text-dim);
    font-family: var(--p-font-body);
}

.p-input-group input {
    width: 100%;
    padding: 14px 16px;
    background: transparent;
    border: 1px solid var(--p-input-border);
    border-radius: 8px;
    color: var(--p-text);
    font-size: 15px;
    font-family: var(--p-font-body);
    outline: none;
    transition: border-color 0.2s var(--p-ease-fast);
}

.p-input-group input:focus {
    border-color: rgba(255,255,255,0.5);
}

/* Autofill fix */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #0d0d0d inset !important;
    -webkit-text-fill-color: #ffffff !important;
    transition: background-color 5000s ease-in-out 0s;
}

.p-btn-primary {
    width: 100%;
    padding: 14px;
    background: #1A1A1A;
    color: #ffffff;
    border: 1px solid #2A2A2A;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    font-family: var(--p-font-body);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: var(--p-transition);
}

.p-btn-primary:hover {
    border-color: #666666;
    transform: translateY(-2px);
    background: rgba(255,255,255,0.06);
}

/* --- LOGO PRISME --- */
.p-logo {
    font-family: var(--p-font-display);
    font-size: 28px;
    font-weight: 900;
    color: white;
    letter-spacing: -1.5px;
    text-decoration: none;
}

/* --- QUOTE SIDEBAR (Login, Forgot pwd...) --- */
.p-quote-text {
    font-family: var(--p-font-display);
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.2;
    margin-bottom: 20px;
    font-style: italic;
    font-weight: 700;
    color: var(--p-text);
}

.p-quote-author {
    font-family: var(--p-font-body);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    opacity: 0.45;
}
