/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    overflow-y: scroll;
    width: 100%;
}

body {
    font-family: var(--bodyFont);
    color: var(--textColor);
    background-color: var(--backgroundColor);
    line-height: 1.6;
}

img {
    max-width: 100%;
    image-orientation: none;
}

/* Main content */
.main-content {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
}

/* Typography */
h1, h2, h3 { font-family: var(--titleFont); font-weight: 700; }
h1 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); margin-bottom: 1.5rem; color: var(--textColor); line-height: 1.2; }
h2 { font-size: clamp(1.3rem, 3vw, 2rem); margin: 3rem 0 1.5rem; color: var(--primaryColor); line-height: 1.2; }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); margin: 2rem 0 1rem; color: var(--primaryColor); line-height: 1.2; }

p { margin-bottom: 1.2rem; }

a {
    color: var(--primaryColor);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.8;
}

.link {
    font-weight: 700;
}

.link[target="_blank"]::after {
    content: '';
    display: inline-block;
    width: 0.85em;
    height: 0.85em;
    margin-left: 0.3em;
    vertical-align: -0.05em;
    background-color: currentColor;
    mask-image: url('../icons/external.svg');
    mask-repeat: no-repeat;
    mask-size: contain;
    -webkit-mask-image: url('../icons/external.svg');
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
}

/* Responsive adjustments for content */
@media (max-width: 768px) {
    .main-content { 
        margin: 2rem auto; 
        padding: 0 1rem;
    }
}

/* Footer */
.main-footer { margin-top: 6rem; padding: 3rem 0; background: #f9fafb; text-align: center; color: #6b7280; }

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #000;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--borderRadius);
    z-index: 10000;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--borderRadius);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    font-family: var(--bodyFont);
    font-size: 0.95rem;
    line-height: 1;
}

.btn-primary {
    background-color: var(--primaryColor);
    color: var(--primaryContrastColor) !important;
}

.btn-primary:hover {
    filter: brightness(92%);
}

.btn-secondary {
    background-color: var(--secondaryColor);
    color: var(--secondaryContrastColor) !important;
}

.btn-secondary:hover {
    filter: brightness(92%);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon svg {
    width: 1.2rem;
    height: 1.2rem;
}

.btn-label {
    display: inline-block;
}

/* DOWNLOAD (now uses generic buttons) */
.btn-size {
    font-size: 0.85rem;
    opacity: 0.8;
    font-weight: 400;
    margin-left: 0.2rem;
}

/* Error messages */
.error,
.error-message {
    padding: 1.5rem;
    background: #fee2e2;
    border: 1px solid #f87171;
    color: #991b1b;
    border-radius: var(--borderRadius);
    margin: 2rem 0;
}

.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    min-height: 60vh;
}

.error-page h1 {
    font-size: clamp(6rem, 20vw, 12rem);
    line-height: 1;
    margin: 0;
    font-weight: 900;
    color: var(--primaryColor);
    opacity: 0.1;
    position: absolute;
    z-index: -1;
}

.error-page h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--textColor);
}

.error-page p {
    font-size: 1.25rem;
    color: #64748b;
    max-width: 500px;
    margin-bottom: 2.5rem;
}

/* LISTE */
.list {
    list-style: none;
    padding-left: 1rem;
    margin: 1rem 0;
}

.list li {
    padding: 0.3rem 0;
    margin-left: 1em;
}

ol.list li {
    list-style-type: decimal;
}
ul.list li {
    list-style-type: disc;
}

/* TABLEAU */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.table th,
.table td {
    padding: 0.6rem 0.9rem;
    border: 1px solid #e2e8f0;
    text-align: left;
}

.table th {
    background: #f8fafc;
    font-weight: 700;
}

.table tbody tr:nth-child(even) {
    background: #f8fafc;
}


