/* ============================================================
   VTIC DESIGN SYSTEM — BASE
   Reset, typographie, liens, boutons, utilitaires
   ============================================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: var(--header-height, 80px);
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--vtic-body);
    background-color: var(--vtic-white);
    padding-top: var(--header-height, 80px);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

a {
    color: var(--vtic-blue);
    text-decoration: none;
    transition: color var(--dur-base) var(--ease-standard);
}

a:hover {
    color: var(--vtic-blue-dark);
}

ul,
ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
}

/* ---------- Typographie ---------- */
h1, h2, h3, h4, h5, h6 {
    color: var(--vtic-ink);
    font-weight: var(--font-weight-bold);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.25rem, 4vw, 3.25rem); text-wrap: balance; }
h2, h3 { text-wrap: balance; }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    color: var(--vtic-body);
    line-height: 1.6;
}

p + p {
    margin-top: 1rem;
}

strong {
    color: var(--vtic-ink);
    font-weight: var(--font-weight-semibold);
}

/* ---------- Texte accentué ---------- */
.gradient-text {
    color: var(--vtic-blue);
    font-weight: inherit;
}

/* ---------- Boutons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-md);
    font-weight: var(--font-weight-semibold);
    font-size: 1rem;
    line-height: 1.2;
    text-align: center;
    transition: all var(--dur-base) var(--ease-standard);
    border: 1.5px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background: var(--vtic-blue);
    color: var(--vtic-white);
    box-shadow: var(--shadow-blue);
}

.btn-primary:hover {
    background: var(--vtic-blue-dark);
    color: var(--vtic-white);
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -10px rgba(0, 119, 187, .55);
}

.btn-primary:active {
    transform: translateY(0) scale(0.97);
    transition-duration: 0.1s;
}

.btn:disabled,
.btn-primary:disabled,
.btn-outline:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
}

.btn-outline {
    background: transparent;
    color: var(--vtic-blue);
    border-color: var(--vtic-blue);
}

.btn-outline:hover {
    background: var(--vtic-blue-50);
    color: var(--vtic-blue-dark);
    border-color: var(--vtic-blue-dark);
    transform: translateY(-2px);
}

.btn-accent {
    background: var(--vtic-orange-dark);
    color: var(--vtic-white);
    box-shadow: var(--shadow-orange);
}

.btn-accent:hover {
    background: var(--vtic-orange-deep);
    color: var(--vtic-white);
    transform: translateY(-2px);
}

.btn-white {
    background: var(--vtic-white);
    color: var(--vtic-ink);
}

.btn-white:hover {
    background: var(--vtic-gray-100);
    color: var(--vtic-ink);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.0625rem;
}

.btn-sm {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ---------- Focus visible global ---------- */
:focus-visible {
    outline: 2px solid var(--vtic-blue);
    outline-offset: 3px;
    border-radius: 4px;
}

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

.section {
    padding: var(--space-9) 0;
}

.section-tight-top {
    padding-top: 0;
}

.bg-alt {
    background-color: var(--vtic-gray-50);
}

.text-center {
    text-align: center;
}

.mt-5 { margin-top: 3rem; }
.p-5 { padding: 3rem; }
.h-full { height: 100%; }

.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;
}

/* ---------- Liens d'évitement ---------- */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-4);
    z-index: 3000;
    padding: 0.75rem 1.25rem;
    background: var(--vtic-ink);
    color: var(--vtic-white);
    border-radius: var(--radius-sm);
    font-weight: var(--font-weight-semibold);
    transition: top var(--dur-base) var(--ease-standard);
}

.skip-link:focus {
    top: var(--space-4);
    color: var(--vtic-white);
}

/* ---------- Alertes ---------- */
.alert {
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    font-size: 0.95rem;
    line-height: 1.5;
}

.alert-success {
    background: var(--vtic-success-50);
    border-color: var(--vtic-success);
    color: var(--vtic-success);
}

.alert-error {
    background: var(--vtic-error-50);
    border-color: var(--vtic-error);
    color: var(--vtic-error);
}

.alert strong {
    display: block;
    margin-bottom: 0.25rem;
    color: inherit;
}

/* ---------- Loader ---------- */
.loader {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    border-top-color: var(--vtic-white);
    animation: spin 1s ease-in-out infinite;
    display: none;
    margin-left: 10px;
}

[data-async-form].is-submitting .loader {
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---------- Barre de progression ---------- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(to right, var(--vtic-blue), var(--vtic-orange));
    z-index: var(--z-progress);
    transition: width 0.1s linear;
}

/* ---------- Retour en haut ---------- */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: var(--vtic-blue);
    color: var(--vtic-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: var(--z-backtop);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--dur-base) var(--ease-standard);
    box-shadow: var(--shadow-blue);
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--vtic-blue-dark);
    transform: translateY(-3px);
}

/* ---------- Champs ---------- */
.form-honeypot {
    display: none !important;
}
