/**
 * Base Styles - Thibierge Notaires
 * Reset et styles de base
 */

/* =============================================
   RESET
============================================= */

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

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

body {
    font-family: var(--font-magnetik);
    font-weight: 300;
    font-size: var(--text-md);
    line-height: var(--leading-normal);
    color: var(--color-text-body);
    background-color: var(--color-bg-white);
    overflow-x: hidden;
}

/* =============================================
   TYPOGRAPHY
============================================= */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-magnetik);
    font-weight: 200;
    color: var(--color-text-dark);
    line-height: var(--leading-tight);
}

h1 {
    font-size: var(--text-hero);
}

h2 {
    font-size: var(--text-3xl);
}

h3 {
    font-size: var(--text-2xl);
}

h4 {
    font-size: var(--text-xl);
}

p {
    margin-bottom: 1em;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover,
a:focus {
    color: var(--color-primary);
}

strong, b {
    font-weight: 600;
}

/* =============================================
   IMAGES
============================================= */

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

figure {
    margin: 0;
}

/* =============================================
   LISTS
============================================= */

ul, ol {
    list-style: none;
}

/* =============================================
   FORMS
============================================= */

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    background: none;
    border: none;
}

input,
textarea,
select {
    width: 100%;
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border);
    padding: var(--space-4);
    transition: border-color var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-primary);
}

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

label {
    display: block;
    font-family: var(--font-magnetik);
    font-weight: 600;
    font-size: var(--text-base);
    color: var(--color-text-dark);
    margin-bottom: var(--space-2);
}

/* =============================================
   LAYOUT
============================================= */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--gutter-mobile);
    padding-right: var(--gutter-mobile);
}

@media (min-width: 768px) {
    .container {
        padding-left: var(--gutter-tablet);
        padding-right: var(--gutter-tablet);
    }
}

@media (min-width: 1024px) {
    .container {
        padding-left: var(--gutter-desktop);
        padding-right: var(--gutter-desktop);
    }
}

/* =============================================
   UTILITY CLASSES
============================================= */

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

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

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

/* =============================================
   BUTTONS
============================================= */

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    font-family: var(--font-magnetik);
    font-weight: 300;
    font-size: var(--text-md);
    color: var(--color-text-dark);
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn__text {
    position: relative;
}

.btn__icon {
    width: 12px;
    height: 12px;
    transition: transform var(--transition-base);
}

.btn:hover .btn__icon {
    transform: translateX(4px);
}

.btn--underline {
    flex-direction: column;
    align-items: flex-start;
}

.btn--underline::after {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background-color: currentColor;
    margin-top: var(--space-3);
    transform-origin: left;
    transition: transform var(--transition-base);
}

.btn--underline:hover::after {
    transform: scaleX(1.1);
}


/* =============================================
   ANTI-FOUC pour les animations GSAP
   Quand JS est dispo (.has-js sur <html>), on cache d'office
   les éléments qui vont être animés. Ils sont rendus visibles
   par GSAP au moment de l'animation.
============================================= */

.has-js .accueil-hero__surtitre,
.has-js .accueil-hero__titre,
.has-js .accueil-hero__stat,
.has-js .accueil-cs__titre,
.has-js .accueil-cs__texte,
.has-js .accueil-cs__header .accueil-link,
.has-js .accueil-card,
.has-js .accueil-team__title,
.has-js .accueil-team__link,
.has-js .accueil-team__surtitre,
.has-js .accueil-team__item,
.has-js .accueil-services__surtitre,
.has-js .accueil-services__titre,
.has-js .accueil-services__card,
.has-js .accueil-apropos__content > *,
.has-js .accueil-apropos__image,
.has-js .accueil-shape,
.has-js .histoire-hero__title,
.has-js .histoire-hero__text,
.has-js .histoire-hero__scroll,
.has-js .histoire-stats__box,
.has-js .histoire-stats__item,
.has-js .histoire-section__image,
.has-js .histoire-section__content > *,
.has-js .histoire-shape,
.has-js .expertises-hero__title,
.has-js .expertises-hero__text,
.has-js .expertises-hero__scroll,
.has-js .expertises-section__image,
.has-js .expertises-section__content > *,
.has-js .expertises-team__title,
.has-js .expertises-team__link,
.has-js .expertises-team__carousel,
.has-js .equipe-hero__title,
.has-js .equipe-hero__text,
.has-js .equipe-hero__arrow,
.has-js .legal-hero__title,
.has-js .legal-content,
.has-js .legal-shape,
.has-js .page-404__surtitre,
.has-js .page-404__code,
.has-js .page-404__titre,
.has-js .page-404__texte,
.has-js .page-404__actions,
.has-js .page-404__shape {
    opacity: 0;
}

/* =============================================
   MOBILE — surtitres : pas de marge basse (global pour toutes les pages)
============================================= */

@media (max-width: 767px) {
    [class$="__surtitre"],
    [class*="__surtitre "] {
        margin-bottom: 0 !important;
    }

    /* Empêche les animations GSAP en translateX de créer un overflow horizontal
       (qui causait un fond bizarre couvrant l'écran sur mobile). */
    body,
    html,
    .site-main {
        overflow-x: clip;
    }
}
