/*
Theme Name: GLCD
Theme URI: https://github.com/LeMonsieurXav80/glcd
Author: Xavier Fonseca
Author URI: https://github.com/LeMonsieurXav80
Description: Theme personnalise GLCD base sur le theme Dix. Supporte le mode sombre/clair, top bar dynamique, et homepage configurable.
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: glcd
Tags: custom-colors, custom-menu, custom-logo, featured-images, full-width-template, rtl-language-support, sticky-post, threaded-comments, translation-ready
*/

/* ==========================================================================
   CSS Variables - Theme Colors & Settings
   ========================================================================== */

:root {
    /* Brand Colors — GLCD Immobilier
       --brand-green : #134f5c (vert sombre)
       --brand-gold  : #bf9000 (or)                    */
    --brand-green: #134f5c;
    --brand-green-dark: #0d3a44;
    --brand-green-light: #1d6d80;
    --brand-gold: #bf9000;
    --brand-gold-dark: #8e6c00;
    --brand-gold-light: #e0a900;

    /* Primary Colors (mapped to brand-green) */
    --color-primary: var(--brand-green);
    --color-primary-dark: var(--brand-green-dark);
    --color-primary-light: var(--brand-green-light);

    /* Secondary Colors */
    --color-secondary: #64748b;
    --color-secondary-dark: #475569;
    --color-secondary-light: #94a3b8;

    /* Accent Colors (mapped to brand-gold) */
    --color-accent: var(--brand-gold);
    --color-accent-dark: var(--brand-gold-dark);
    --color-accent-light: var(--brand-gold-light);

    /* Success/Error/Warning */
    --color-success: #22c55e;
    --color-error: #ef4444;
    --color-warning: #f59e0b;

    /* Typography */
    --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-family-heading: var(--font-family-base);
    --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;

    /* Font Sizes */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;

    /* Font Weights */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;

    /* Line Heights */
    --line-height-tight: 1.25;
    --line-height-snug: 1.375;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;

    /* Letter Spacing */
    --letter-spacing-tight: -0.025em;
    --letter-spacing-wide: 0.025em;
    --letter-spacing-wider: 0.05em;

    /* Spacing (numeric scale: 1 unit = 0.25rem / 4px) */
    --spacing-1: 0.25rem;
    --spacing-2: 0.5rem;
    --spacing-3: 0.75rem;
    --spacing-4: 1rem;
    --spacing-5: 1.25rem;
    --spacing-6: 1.5rem;
    --spacing-8: 2rem;
    --spacing-10: 2.5rem;
    --spacing-12: 3rem;
    --spacing-16: 4rem;
    --spacing-20: 5rem;

    /* Spacing (named aliases) */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;

    /* Z-index layers */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;

    /* Layout */
    --container-max-width: 1280px;
    --container-max: var(--container-max-width);
    --content-width: 800px;
    --header-height: 110px;
    --header-height-mobile: 70px;
    --top-bar-height: 36px;
}

/* ==========================================================================
   Light Theme (Default)
   ========================================================================== */
[data-theme="light"],
:root {
    --color-bg: #ffffff;
    --color-bg-alt: #f8fafc;
    --color-bg-elevated: #ffffff;
    --color-text: #1e293b;
    --color-text-muted: #64748b;
    --color-text-light: #94a3b8;
    --color-border: #e2e8f0;
    --color-border-light: #f1f5f9;

    /* Header specific */
    --header-bg: rgba(255, 255, 255, 0.95);
    --header-text: #1e293b;
    --header-border: #e2e8f0;

    /* Additional backgrounds */
    --color-bg-dark: #1e293b;
    --color-bg-muted: #f1f5f9;
    --color-secondary-hover: #374151;
    --color-primary-rgb: 19, 79, 92;
    --color-accent-rgb: 191, 144, 0;

    /* Top bar specific */
    --top-bar-bg: var(--brand-green);
    --top-bar-text: #ffffff;
    --top-bar-accent: var(--brand-gold);

    /* Footer link hover */
    --footer-link-hover-bg-color: rgba(var(--color-primary-rgb), 0.1);
    --footer-link-hover-text-color: var(--color-primary);
}

/* ==========================================================================
   Dark Theme
   ========================================================================== */
[data-theme="dark"] {
    --color-bg: #0f172a;
    --color-bg-alt: #1e293b;
    --color-bg-elevated: #1e293b;
    --color-text: #f1f5f9;
    --color-text-muted: #94a3b8;
    --color-text-light: #64748b;
    --color-border: #334155;
    --color-border-light: #1e293b;

    /* Header specific */
    --header-bg: rgba(15, 23, 42, 0.95);
    --header-text: #f1f5f9;
    --header-border: #334155;

    /* Additional backgrounds */
    --color-bg-dark: #020617;
    --color-bg-muted: #1e293b;
    --color-secondary-hover: #94a3b8;
    --color-primary-rgb: 29, 109, 128;
    --color-accent-rgb: 224, 169, 0;

    /* Top bar specific */
    --top-bar-bg: var(--brand-green-dark);
    --top-bar-text: #f1f5f9;
    --top-bar-accent: var(--brand-gold-light);

    /* Footer link hover */
    --footer-link-hover-bg-color: rgba(var(--color-primary-rgb), 0.1);
    --footer-link-hover-text-color: var(--color-primary);
}
