/* ===========================
   GLOBAL.CSS - IRM Saintonge Blog
   Styles globaux - PAS de styles header/footer/nav (ils sont inline)
   =========================== */

/* ---- RESET ET BASE ---- */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #2d4a5e;
    background-color: #ffffff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: #0ea5e9;
    transition: color 0.2s;
}

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

p {
    margin: 0 0 1em;
    line-height: 1.7;
}

p:last-child {
    margin-bottom: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.25;
    margin: 0 0 0.75em;
    font-weight: 700;
    color: #1e3a5f;
}

ul, ol {
    padding-left: 1.4em;
    margin: 0 0 1em;
}

/* ---- TABLEAUX RESPONSIVE ---- */
.table-responsive,
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    max-width: 100%;
}

/* ---- UTILITAIRES GLOBAUX ---- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---- FOCUS GLOBAUX ---- */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

/* ---- COULEURS SECTORIELLES ---- */
:root {
    --color-navy: #1e3a5f;
    --color-sky: #0ea5e9;
    --color-sky-dark: #0284c7;
    --color-bg-light: #eef4fb;
    --color-bg-pale: #f0f6fc;
    --color-text-main: #2d4a5e;
    --color-text-muted: #5a7a96;
    --color-text-light: #a8c4d8;
    --color-border: #c2d9ec;
    --color-white: #ffffff;
}

/* ---- BOUTONS GLOBAUX ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    padding: 12px 24px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s, transform 0.15s;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1;
}

.btn-blue {
    background-color: #0ea5e9;
    color: #ffffff;
}

.btn-blue:hover,
.btn-blue:focus {
    background-color: #0284c7;
    outline: none;
}

.btn-navy {
    background-color: #1e3a5f;
    color: #ffffff;
}

.btn-navy:hover,
.btn-navy:focus {
    background-color: #162d4a;
    outline: none;
}

.btn-outline {
    background-color: transparent;
    color: #1e3a5f;
    border: 2px solid #1e3a5f;
}

.btn-outline:hover,
.btn-outline:focus {
    background-color: #1e3a5f;
    color: #ffffff;
    outline: none;
}

/* ---- FORMULAIRES GLOBAUX ---- */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="search"],
textarea,
select {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    border-radius: 8px;
    border: 1.5px solid #c2d9ec;
    padding: 11px 16px;
    color: #1e3a5f;
    background-color: #ffffff;
    transition: border-color 0.2s;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    border-color: #0ea5e9;
    outline: none;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

label {
    font-size: 14px;
    font-weight: 600;
    color: #1e3a5f;
    display: block;
    margin-bottom: 6px;
}

/* ---- SECTIONS GENERIQUES ---- */
.page-section {
    padding: 72px 24px;
}

.page-section-light {
    background-color: #f0f6fc;
}

.page-section-dark {
    background-color: #1e3a5f;
}

.page-section-dark h1,
.page-section-dark h2,
.page-section-dark h3,
.page-section-dark h4,
.page-section-dark h5,
.page-section-dark h6 {
    color: #ffffff;
}

.page-section-dark p {
    color: #a8c4d8;
}

/* ---- BADGES ET TAGS ---- */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.badge-primary {
    background-color: rgba(14, 165, 233, 0.15);
    color: #0284c7;
}

.badge-success {
    background-color: rgba(34, 197, 94, 0.12);
    color: #15803d;
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.15);
    color: #b45309;
}

.badge-danger {
    background-color: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

/* ---- ARTICLES CONTENU ---- */
.article-content {
    max-width: 780px;
    margin: 0 auto;
    font-size: 17px;
    line-height: 1.8;
    color: #2d4a5e;
}

.article-content h2 {
    font-size: 26px;
    margin-top: 2.5em;
    margin-bottom: 0.75em;
    color: #1e3a5f;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2edf5;
}

.article-content h3 {
    font-size: 20px;
    margin-top: 2em;
    margin-bottom: 0.5em;
    color: #1e3a5f;
}

.article-content h4 {
    font-size: 17px;
    font-weight: 700;
    margin-top: 1.75em;
    margin-bottom: 0.5em;
    color: #1e3a5f;
}

.article-content p {
    margin-bottom: 1.4em;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.4em;
    padding-left: 1.6em;
}

.article-content li {
    margin-bottom: 0.5em;
}

.article-content strong {
    color: #1e3a5f;
    font-weight: 700;
}

.article-content blockquote {
    border-left: 4px solid #0ea5e9;
    background-color: #f0f6fc;
    margin: 1.5em 0;
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #4a6478;
}

.article-content code {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    background-color: #eef4fb;
    color: #1e3a5f;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.88em;
}

.article-content pre {
    background-color: #1e3a5f;
    color: #eef4fb;
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 1.4em;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.4em;
    font-size: 15px;
}

.article-content th {
    background-color: #1e3a5f;
    color: #ffffff;
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.article-content td {
    padding: 12px 16px;
    border-bottom: 1px solid #e2edf5;
    color: #2d4a5e;
}

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

.article-content tr:hover td {
    background-color: #f7fafe;
}

/* ---- ANTI-OVERFLOW GLOBAL ---- */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

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

    .article-content {
        font-size: 16px;
    }

    .article-content h2 {
        font-size: 22px;
    }

    .article-content h3 {
        font-size: 18px;
    }

    .container {
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 26px; }
    h2 { font-size: 22px; }
    h3 { font-size: 18px; }

    .article-content {
        font-size: 15px;
    }
}