/* =========================
   PAGES INSTITUTIONNELLES
   - mentions légales
   - politique de confidentialité
   - contact
========================= */

/* =========================
   COMMUN - SECTIONS
========================= */

.legal-page,
.contact {
    padding: clamp(100px, 10vw, 150px) clamp(24px, 6vw, 80px);
    background: var(--color-background-soft);
}

.legal-page {
    padding-top: clamp(110px, 10vw, 160px);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.legal-page__inner,
.contact__inner {
    width: min(1180px, 100%);
    margin: 0 auto;
}

/* =========================
   COMMUN - HEADING
========================= */

.legal-page__heading,
.contact__heading {
    max-width: 760px;
    margin: 0 auto clamp(56px, 5vw, 78px);
    text-align: center;
}

.contact__heading {
    max-width: 720px;
    margin-bottom: clamp(60px, 6vw, 90px);
}

.legal-page__eyebrow,
.contact__eyebrow {
    display: block;
    margin-bottom: 14px;
    font-size: var(--font-size-section-eyebrow);
    font-weight: var(--font-weight-eyebrow);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-eyebrow);
}

.legal-page h1,
.contact h1 {
    margin: 0;
    font-size: var(--font-size-section-title);
    font-weight: var(--font-weight-title);
    letter-spacing: 0.02em;
    color: var(--color-title);
}

.contact h1 {
    margin-bottom: 20px;
}

.contact__heading p {
    margin: 0;
    font-size: var(--font-size-section-text);
    font-weight: var(--font-weight-text);
    line-height: 1.7;
    color: var(--color-text);
}

/* =========================
   LEGAL PAGE - BODY
========================= */

.legal-page__body {
    display: grid;
    gap: clamp(28px, 3vw, 42px);
}

.legal-page__section {
    padding: clamp(30px, 3vw, 44px);
    background: var(--color-white);
    border: 1px solid rgba(78, 80, 86, 0.14);
    box-shadow:
            0 20px 50px rgba(0, 0, 0, 0.07),
            0 6px 18px rgba(0, 0, 0, 0.04);
}

.legal-page__section h2 {
    margin: 0 0 18px;
    font-size: var(--font-size-card-title-sm);
    font-weight: var(--font-weight-title);
    line-height: 1.2;
    color: var(--color-title);
}

.legal-page__section p,
.legal-page__section li {
    font-size: var(--font-size-section-text);
    font-weight: var(--font-weight-text);
    color: var(--color-text);
}

.legal-page__section p {
    margin: 0 0 16px;
    line-height: 1.8;
}

.legal-page__section p:last-child {
    margin-bottom: 0;
}

.legal-page__section ul {
    margin: 0 0 16px;
    padding-left: 1.2em;
}

.legal-page__section li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.legal-page__section strong {
    font-weight: var(--font-weight-title);
    color: var(--color-title);
}

.legal-page__section a {
    color: var(--color-title);
    text-decoration: underline;
}

.legal-page__section a:hover {
    opacity: 0.7;
}

/* =========================
   CONTACT - GRID
========================= */

.contact__grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: clamp(40px, 5vw, 80px);
    align-items: start;
}

/* =========================
   CONTACT - FORM
========================= */

.contact__form {
    position: relative;
    padding: clamp(32px, 3.4vw, 48px);
    background: var(--color-white);
    border: 1px solid rgba(78, 80, 86, 0.12);
    box-shadow:
            0 24px 60px rgba(0, 0, 0, 0.10),
            0 8px 22px rgba(0, 0, 0, 0.05);
}

.contact__form::before {
    content: "";
    position: absolute;
    top: clamp(26px, 2.6vw, 36px);
    left: 50%;
    width: 42px;
    height: 2px;
    background: rgba(78, 80, 86, 0.35);
    transform: translateX(-50%);
}

.contact__form form {
    padding-top: clamp(34px, 3vw, 46px);
}

.contact__field {
    position: relative;
    margin-bottom: 22px;
}

.contact__field label {
    display: block;
    margin-bottom: 9px;
    font-size: var(--font-size-cta);
    font-weight: var(--font-weight-cta);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-title);
}

.contact__field input,
.contact__field textarea {
    width: 100%;
    padding: 15px 16px;
    background:
            linear-gradient(
                    180deg,
                    rgba(255, 255, 255, 0.82) 0%,
                    rgba(250, 248, 245, 0.82) 100%
            );
    border: 1px solid rgba(78, 80, 86, 0.14);
    font-family: inherit;
    font-size: var(--font-size-section-text);
    font-weight: var(--font-weight-text);
    line-height: 1.55;
    color: var(--color-title);
    outline: none;
    box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.72),
            0 1px 2px rgba(0, 0, 0, 0.02);
    backdrop-filter: blur(4px);
    transform: translateY(0);
    transition:
            background 0.45s cubic-bezier(0.22, 1, 0.36, 1),
            border-color 0.45s cubic-bezier(0.22, 1, 0.36, 1),
            box-shadow 0.55s cubic-bezier(0.22, 1, 0.36, 1),
            transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.contact__field input:hover,
.contact__field textarea:hover {
    background:
            linear-gradient(
                    180deg,
                    rgba(255, 255, 255, 0.96) 0%,
                    rgba(255, 255, 255, 0.92) 100%
            );
    border-color: rgba(78, 80, 86, 0.42);
    box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.82),
            0 14px 34px rgba(78, 80, 86, 0.08),
            0 5px 12px rgba(78, 80, 86, 0.05);
    transform: translateY(-2px);
}

.contact__field input:focus,
.contact__field textarea:focus {
    background: var(--color-white);
    border-color: var(--color-grey-dark);
    box-shadow:
            0 0 0 4px rgba(78, 80, 86, 0.12),
            0 24px 54px rgba(78, 80, 86, 0.16),
            0 10px 24px rgba(0, 0, 0, 0.05),
            inset 0 1px 0 rgba(255, 255, 255, 0.85);
    transform: translateY(-3px);
}

.contact__field input::placeholder,
.contact__field textarea::placeholder {
    color: rgba(78, 80, 86, 0.48);
}

.contact__form .site-cta {
    margin-top: 8px;
}

/* =========================
   CONTACT - INFOS
========================= */

.contact__infos {
    padding: clamp(30px, 3vw, 42px);
    background: var(--color-white);
    border: 1px solid rgba(78, 80, 86, 0.12);
    box-shadow:
            0 20px 50px rgba(0, 0, 0, 0.07),
            0 6px 18px rgba(0, 0, 0, 0.04);
}

.contact__infos h2 {
    margin: 0 0 24px;
    font-size: var(--font-size-card-title);
    font-weight: var(--font-weight-title);
    color: var(--color-title);
}

.contact__infos p {
    margin: 0 0 22px;
    font-size: var(--font-size-section-text);
    font-weight: var(--font-weight-text);
    line-height: 1.7;
    color: var(--color-text);
}

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

.contact__infos strong {
    font-weight: var(--font-weight-title);
    color: var(--color-title);
}

/* =========================
   CONTACT - AJAX
========================= */

.contact__hp {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.contact__feedback {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.5;
}

.contact__feedback.is-success {
    color: #2d6a4f;
}

.contact__feedback.is-error {
    color: #b00020;
}

/* =========================
   PAGES INSTITUTIONNELLES RESPONSIVE
========================= */

/*
   Tablette
   - LEGAL : centre le contenu éditorial
   - CONTACT : passe le formulaire et les coordonnées en une colonne
*/
@media (max-width: 1024px) {

    .legal-page__body {
        max-width: 760px;
        margin: 0 auto;
    }

    .legal-page__section {
        padding: clamp(28px, 4vw, 40px);
    }
}

@media (max-width: 900px) {

    .contact__grid {
        grid-template-columns: 1fr;
        max-width: 720px;
        margin: 0 auto;
    }
}

/*
   Mobile
   - LEGAL / CONTACT : réduit les marges internes
   - LEGAL : conserve la lisibilité des blocs
   - CONTACT : compacte formulaire et infos
*/
@media (max-width: 640px) {

    .legal-page,
    .contact {
        padding: clamp(80px, 16vw, 110px) clamp(20px, 6vw, 28px);
    }

    .legal-page__heading,
    .contact__heading {
        margin-bottom: clamp(44px, 9vw, 64px);
    }

    .legal-page__body {
        gap: 20px;
    }

    .legal-page__section {
        padding: clamp(24px, 7vw, 32px);
    }

    .contact__form,
    .contact__infos {
        padding: clamp(26px, 7vw, 34px);
    }

    .contact__form form {
        padding-top: clamp(34px, 9vw, 44px);
    }

    .contact__field input,
    .contact__field textarea {
        padding: 14px;
    }
}
