/* ===== GLOBAL CSS - LE BISTROT DU TREIGE V5.1 ===== */

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

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #3d2010;
    background-color: #fdf8f4;
    line-height: 1.7;
    overflow-x: hidden;
}

/* ===== ANTI-OVERFLOW ===== */
img, video, iframe, embed, object, svg, canvas {
    max-width: 100%;
    height: auto;
}

img {
    display: block;
}

table {
    max-width: 100%;
}

/* ===== RESPONSIVE TABLE WRAPPERS ===== */
.table-responsive,
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
}

/* ===== TYPOGRAPHIE GLOBALE ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.25;
    color: #3d2010;
    font-weight: 700;
}

p {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

a {
    color: #713f12;
    transition: color 0.2s;
}

a:hover {
    color: #92400e;
}

a:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
    border-radius: 3px;
}

/* ===== LAYOUT GLOBAL ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* ===== SECTION LABELS ===== */
.section-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #fbbf24;
    margin-bottom: 8px;
}

.section-label.light {
    color: #fbbf24;
}

.section-title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    color: #3d2010;
    margin-bottom: 12px;
    font-weight: 800;
}

.section-title.dark {
    color: #3d2010;
}

.section-title.light-title {
    color: #fff;
}

.section-subtitle {
    font-size: 1rem;
    color: #7c5838;
    max-width: 560px;
    margin-bottom: 0;
}

.section-subtitle.light-sub {
    color: #f5e6d3;
}

/* ===== 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;
}

/* ===== BOUTONS GLOBAUX ===== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #713f12;
    color: #fff;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: 2px solid #713f12;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    font-family: inherit;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #92400e;
    border-color: #92400e;
    color: #fff;
    outline: none;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: transparent;
    color: #713f12;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: 2px solid #713f12;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    font-family: inherit;
}

.btn-secondary:hover,
.btn-secondary:focus {
    background-color: #713f12;
    color: #fff;
    outline: none;
}

/* ===== ARTICLE CARDS GLOBALES ===== */
.article-card {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #f0e0d0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(113, 63, 18, 0.12);
}

/* ===== FOCUS VISIBLE GLOBAL ===== */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

/* ===== RESPONSIVE (auto-repair) ===== */
@media (max-width: 1024px) {
    .container {
        padding: 0 18px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 12px 22px;
        font-size: 0.9rem;
    }

    .section-title {
        font-size: clamp(1.4rem, 2.5vw, 2rem);
    }

    .section-subtitle {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .container {
        padding: 0 16px;
    }

    .section-label {
        font-size: 0.68rem;
        letter-spacing: 0.12em;
    }

    .section-title {
        font-size: clamp(1.3rem, 4vw, 1.8rem);
        margin-bottom: 10px;
    }

    .section-subtitle {
        font-size: 0.9rem;
        max-width: 100%;
    }

    .btn-primary,
    .btn-secondary {
        padding: 12px 20px;
        font-size: 0.88rem;
        gap: 6px;
        width: 100%;
        justify-content: center;
    }

    .article-card:hover {
        transform: none;
        box-shadow: none;
    }

    .table-responsive,
    .table-wrapper {
        border-radius: 6px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 12px;
    }

    .section-label {
        font-size: 0.65rem;
        letter-spacing: 0.1em;
        margin-bottom: 6px;
    }

    .section-title {
        font-size: clamp(1.15rem, 5vw, 1.5rem);
        margin-bottom: 8px;
    }

    .section-subtitle {
        font-size: 0.85rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 11px 16px;
        font-size: 0.85rem;
        border-radius: 7px;
        gap: 5px;
        width: 100%;
        justify-content: center;
    }

    .article-card {
        border-radius: 10px;
    }

    .table-responsive,
    .table-wrapper {
        border-radius: 4px;
    }
}