/* ============================================
   GLOBAL CSS - VI-LONG.FR
   Gastronomie asiatique blog
   ============================================ */

/* VARIABLES */
:root {
    --color-primary: #1a1a2e;
    --color-primary-dark: #12122a;
    --color-gold: #e6b422;
    --color-gold-light: #f5c842;
    --color-light: #f8f8ff;
    --color-white: #ffffff;
    --color-text: #2a2a3e;
    --color-text-muted: #6b6b88;
    --color-text-light: #a0a0b8;
    --color-border: #e4e4f0;
    --color-bg-soft: #f5f5fb;
    --font-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(26, 26, 46, 0.08);
    --shadow-md: 0 4px 12px rgba(26, 26, 46, 0.12);
    --shadow-lg: 0 8px 32px rgba(26, 26, 46, 0.16);
    --container-max: 1200px;
    --container-pad: 24px;
}

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

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-system);
    color: var(--color-text);
    background-color: var(--color-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* MEDIA BASELINE */
img, video, iframe, embed, object, svg, canvas {
    max-width: 100%;
    height: auto;
    display: block;
}

/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-system);
    line-height: 1.25;
    font-weight: 700;
}

p {
    line-height: 1.65;
}

a {
    color: var(--color-gold);
    transition: color 0.2s;
}

a:hover {
    color: var(--color-gold-light);
}

/* CONTAINER */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-pad);
    width: 100%;
}

/* TABLES RESPONSIVE */
.table-responsive, .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
}

table {
    width: 100%;
    border-collapse: collapse;
    max-width: 100%;
    font-size: 14px;
}

th, td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

th {
    background-color: var(--color-primary);
    color: var(--color-white);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

tr:last-child td {
    border-bottom: none;
}

tbody tr:nth-child(even) {
    background-color: #f9f9fe;
}

tbody tr:hover {
    background-color: rgba(230, 180, 34, 0.06);
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-system);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.15s;
}

.btn--primary {
    background-color: var(--color-gold);
    color: var(--color-primary);
}

.btn--primary:hover,
.btn--primary:focus {
    background-color: var(--color-gold-light);
    color: var(--color-primary);
    transform: translateY(-1px);
    outline: 2px solid var(--color-gold-light);
    outline-offset: 2px;
}

.btn--outline {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn--outline:hover,
.btn--outline:focus {
    background-color: var(--color-primary);
    color: var(--color-white);
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* FORMS */
input, textarea, select {
    font-family: var(--font-system);
    font-size: 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    background-color: var(--color-white);
    color: var(--color-text);
    transition: border-color 0.2s;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(230, 180, 34, 0.15);
}

/* SCREEN READER ONLY */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* SECTION HEADERS */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: 10px;
    background-color: rgba(230, 180, 34, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
}

.section-eyebrow--light {
    color: #e6b422;
    background-color: rgba(230, 180, 34, 0.15);
}

.section-title {
    font-size: clamp(24px, 4vw, 38px);
    color: var(--color-primary);
    margin-bottom: 12px;
}

.section-title--light {
    color: var(--color-white);
}

.section-subtitle {
    font-size: 16px;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.section-header--light .section-title {
    color: var(--color-white);
}

.section-header--light .section-subtitle {
    color: rgba(248, 248, 255, 0.7);
}

/* FOCUS VISIBLE */
*:focus-visible {
    outline: 3px solid var(--color-gold);
    outline-offset: 2px;
}

/* TEXT OVERFLOW */
.container, .container * {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

pre, code {
    overflow-x: auto;
    max-width: 100%;
    font-size: 14px;
}

/* GRID ANTI-OVERFLOW */
.grid, [class*='grid'] {
    min-width: 0;
}

/* RESPONSIVE GLOBAL */
@media (max-width: 768px) {
    :root {
        --container-pad: 16px;
    }

    body {
        overflow-x: hidden;
    }

    .grid, [class*='grid'] {
        grid-template-columns: 1fr !important;
    }

    table {
        font-size: 13px;
    }

    th, td {
        padding: 10px 12px;
    }

    .section-header {
        margin-bottom: 32px;
    }

    .section-title {
        font-size: clamp(20px, 6vw, 28px);
    }
}

@media (max-width: 480px) {
    th, td {
        padding: 8px 10px;
        font-size: 12px;
    }
}