/* ============================================
   GRAPHISCANN - RESET & BASE STYLES
   
   Version : 1.0.0
   Date : 29 Décembre 2025
   
   Reset CSS moderne + styles de base du site.
   Chargé APRÈS variables.css et typography-dynamic.php
   ============================================ */

/* ========================================
   1. BOX SIZING & RESET
   ======================================== */

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

/* ========================================
   2. DOCUMENT & BODY
   ======================================== */

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, sans-serif;
    font-size: var(--gs-text-base, 0.9375rem);
    line-height: var(--gs-lh-normal, 1.6);
    color: var(--gs-text);
    background-color: var(--gs-bg-white);
    min-height: 100vh;
}

/* ========================================
   3. TYPOGRAPHIE DE BASE
   ======================================== */

/* Les tailles sont gérées par typography-dynamic.php */
/* Ici on définit uniquement les marges et comportements */

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5em;
    font-weight: var(--gs-fw-heading, 600);
    line-height: var(--gs-lh-heading, 1.25);
    color: var(--gs-text-dark);
}

p {
    margin-top: 0;
    margin-bottom: 1em;
}

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

/* ========================================
   4. LIENS
   ======================================== */

a {
    color: var(--gs-primary);
    text-decoration: none;
    transition: var(--gs-transition);
}

a:hover {
    color: var(--gs-primary-dark);
}

a:focus {
    outline: 2px solid var(--gs-primary);
    outline-offset: 2px;
}

/* ========================================
   5. LISTES
   ======================================== */

ul, ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Listes avec puces (contexte contenu) */
.gs-content ul,
.gs-section ul,
article ul {
    list-style: disc;
    padding-left: 1.5em;
    margin-bottom: 1em;
}

.gs-content ol,
.gs-section ol,
article ol {
    list-style: decimal;
    padding-left: 1.5em;
    margin-bottom: 1em;
}

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

/* ========================================
   6. IMAGES & MÉDIA
   ======================================== */

img {
    max-width: 100%;
    height: auto;
    display: block;
    border: 0;
}

svg {
    overflow: hidden;
    vertical-align: middle;
}

figure {
    margin: 0;
}

/* ========================================
   7. FORMULAIRES - BASE
   ======================================== */

button,
input,
optgroup,
select,
textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: 1.15;
    margin: 0;
}

button,
select {
    text-transform: none;
}

button,
[type="button"],
[type="reset"],
[type="submit"] {
    -webkit-appearance: button;
    cursor: pointer;
}

button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
    border-style: none;
    padding: 0;
}

textarea {
    overflow: auto;
    resize: vertical;
}

/* Placeholder styling */
::placeholder {
    color: var(--gs-text-muted);
    opacity: 1;
}

/* ========================================
   8. TABLEAUX
   ======================================== */

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

th, td {
    text-align: left;
    padding: var(--gs-spacing-sm) var(--gs-spacing-md);
}

/* ========================================
   9. DIVERS
   ======================================== */

hr {
    border: 0;
    border-top: 1px solid var(--gs-border);
    margin: var(--gs-spacing-lg) 0;
}

/* Selection */
::selection {
    background-color: var(--gs-primary);
    color: var(--gs-text-inverse);
}

/* Focus visible pour accessibilité */
:focus-visible {
    outline: 2px solid var(--gs-primary);
    outline-offset: 2px;
}

/* Hidden mais accessible */
.sr-only,
.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;
}

/* ========================================
   10. SCROLLBAR PERSONNALISÉE (optionnel)
   ======================================== */

/* Webkit browsers */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gs-bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--gs-border-dark);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gs-text-muted);
}
