/* ===== Reset minimal ===== */
*,
*::before,
*::after {
    box-sizing: border-box
}

/* Rubik local (variable) */
@font-face {
    font-family: 'Rubik';
    src:
        url('../fonts/Rubik/Rubik-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    /* variable axis wght */
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Rubik';
    src:
        url('../fonts/Rubik/Rubik-Italic-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

/* (optionnel) pile de secours globale */

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

body {
    font-family: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text);
    line-height: 1.5;
    background: #fff;
    font-size: 1em;
    font-weight: 100;
}

.hero-bg,
.hero-text {
    will-change: transform;
}


main {
    flex: 1;
    margin: 1em;
}

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

a {
    text-decoration: none;
    color: rgba(134, 24, 24, .94);
}

a.btn {
    text-decoration: none;
}

p {
    margin: 0 0 1em;
    text-align: justify;
}

li {
    margin: 0 0 .5em;
    list-style-position: outside;
}

button,
input,
textarea {
    font: inherit
}

/* ===== Thème / variables ===== */
:root {
    --container: 100em;
    /* 1600px : header/nav */
    --content: 70em;
    /* ≈1120px : corps de page */
    --gutter: 1em;
    /* 24px */
    --text: #7E7E7E;
    --title: #424242;
    --muted: #6a6a6a;
    --line: #eee;
    --brand: #d62828;
    --hero-img: url("/assets/img/colocs.jpg");
}

body {
    font-family: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text);
    line-height: 1.5;
    background: #fff;
}

/* ===== Helpers ===== */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1em 4em 1em;
    /* overflow-x: hidden; */
}

.mt-16 {
    margin-top: 1em
}

.mt-24 {
    margin-top: 1.5em
}

.mt-40 {
    margin-top: 2.5em
}

.mt-56 {
    margin-top: 3.5em
}

.gap-16 {
    gap: 1em
}

.gap-24 {
    gap: 1.5em
}

.gap-40 {
    gap: 2.5em
}

/* ===== Header (nav fixe + ombre élégante) ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fff;
    box-shadow: 0 0.25em 0.75em rgba(0, 0, 0, .08);
    transition: box-shadow .3s ease;
}

.hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--gutter)
}

.brand img {
    height: 4em;
    width: auto;
}

/* logo un peu réduit */

.nav {
    display: flex;
    gap: 1.125em;
    font-size: .8125em;
    letter-spacing: .04em;
    text-transform: uppercase;
    font-size: 1.1em;
}

.nav a {
    padding: .5em .375em;
    border-radius: .5em;
    color: #111;
    text-decoration: none;
}

.nav a:hover {
    background: #f7f7f7
}

.nav .bailleur {
    font-weight: 500
}

/* ===== Hero (parallax) ===== */
.hero {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #fff;
    text-align: center;
    isolation: isolate;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero.is-visible {
    opacity: 1;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: center/cover no-repeat var(--hero-img);
    background-attachment: fixed;
    /* parallax natif */
    z-index: -2;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .08);
    /* voile pour éclaircir */
    z-index: -1;
}

.hero-text {
    padding: 0 1.5em;
    text-shadow: 0 .125em .5em rgba(0, 0, 0, .35);
    margin-top: -2em;
}

.hero-text h1 {
    margin: 0 0 .08em;
    font-weight: 300;
    font-size: clamp(1.75em, 4.6vw, 3.5em);
    line-height: 1.05;
    color: #fff;
    font-family: Rubik;
    text-transform: uppercase;
    font-weight: 100;
}

.hero-text h1 strong {
    font-weight: 700
}

.text-center {
    text-align: center
}

/* ===== Typo titres ===== */
h1 {
    font-size: clamp(1.75em, 3.6vw, 4em);
    font-weight: 300;
    line-height: 1.15;
    margin: 0.6em 0 0.4em;
    text-align: center;
    white-space: pre-wrap;
    color: var(--title);
    font-family: Rubik;
}

h2.section-title {
    font-size: clamp(1.875em, 3.4vw, 2.75em);
    text-align: center;
    margin: 1.5em 0 1em;
    color: var(--title);
    text-transform: uppercase;
}

h2 {
    font-size: 1.4em;
    font-weight: 600;
    margin: 0 0 0.5em;
    color: var(--title);
    font-family: Rubik;
    font-weight: 300;
    font-style: normal;
    font-size: 40px;
    letter-spacing: .05em;
    line-height: 1.4em;
    text-transform: uppercase;
}

h3 {
    line-height: 1.35;
    font-size: clamp(20px, 3.2vw, 30px);
    margin: 0 0 0.5em;
    padding-bottom: .5em;
    color: var(--title);
    letter-spacing: 0em;
    font-family: Rubik;
    font-weight: 100 !important;
    font-style: normal;
    font-size: 26px;
    letter-spacing: .02em;
    line-height: 1.2em;
    text-transform: none;
}

p.breadcrumb {
    padding-bottom: 1em;
}

/* ===== Intro ===== */
.intro {
    margin: 3em 0 .5em;
    text-align: center;
    color: var(--muted)
}

/* ===== Grilles ===== */
.grid {
    display: grid
}

.grid-2 {
    grid-template-columns: 1fr 1fr
}

.grid-3 {
    grid-template-columns: 1fr 1fr 1fr
}

.align-start {
    align-items: start
}

.align-center {
    align-items: center
}

.ratio {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: .25em;
    overflow: hidden
}

.ratio img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.grid img {
    border-radius: .25em
}

/* ===== Lists ===== */
.list {
    margin: .5em 0 0 1.125em;
    padding: 0
}

.list li {
    margin: .375em 0
}

/* ===== Contenu principal (centré) ===== */
.page-content {
    max-width: var(--content);
    margin: 0 auto;
    padding: 0 var(--gutter);
    position: relative;
    z-index: 1;
    background: #fff;
}


/* ===== Contact ===== */
.contact {
    display: grid;
    place-items: center;
    margin-bottom: 2em;
}

.contact h2 {
    font-size: 2.125em;
    margin: .375em 0;
}

/* Grille du formulaire */
.form {
    width: 100%;
    max-width: 40em;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1em;
}

.form .span-2 {
    grid-column: span 2
}

.form .form-actions {
    display: flex;
    justify-content: center
}

.form label {
    display: block
}

.form label>span {
    display: block;
    font-size: .75em;
    color: var(--muted);
    margin-bottom: .375em
}

.form input,
.form textarea {
    width: 100%;
    padding: .6875em .75em;
    box-sizing: border-box;
    border: .0625em solid #cfcfcf;
    border-radius: .5em;
    outline: 0;
    background: #fff;
}

.form textarea {
    min-height: 8em
}

.form input:focus,
.form textarea:focus {
    border-color: #bdbdbd
}

.btn {
    color: #222;
    font-size: 1rem;
    line-height: normal;
    display: inline-block;
    padding: .6em 1em;
    border: .0625em solid #222;
    background: #fff;
    border-radius: .5em;
    cursor: pointer;
}

.btn:hover {
    opacity: .9
}

/* ===== Remontée en haut ===== */
.back-top {
    position: fixed;
    right: 1.4em;
    bottom: 10em;
    margin: 0;
    font-size: 0.8125em;
    background: rgba(255, 255, 255, 0.96);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    z-index: 20;
    border-radius: 50%;
}

.back-top a {
    display: inline-block;
    padding: 8px 12px;
    font-size: 1.2em;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    background: transparent;
    color: var(--muted);
    text-decoration: none;
}

/* .back-top a:hover {
    color: #d62828;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
} */

.back-top.is-visible {
    opacity: .69;
    pointer-events: auto;
}

/* ===== Footer ===== */
.site-footer {
    background: #f5f5f5;
    padding: 10px 0;
    text-align: center;
    border-top: 1px solid #ddd;
}

.foot-nav a {
    margin: 0 10px;
    text-decoration: none;
    font-size: 1.2em;
    color: inherit;
}

.foot {
    padding: 1.125em 0
}

.foot-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .875em;
    font-size: .75em;
    color: var(--muted)
}

.site-footer .foot {
    display: grid;
    place-items: center
}

.site-footer .foot-nav {
    justify-content: center
}

.form-actions {
    position: relative;
}

.spinner {
    position: absolute;
    top: .6em;
    margin-left: -.5em;
    left: 50%;
    width: 1.4em;
    height: 1.4em;
    border: 3px solid #ccc;
    border-top: 3px solid #d62828;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    background: white;
    opacity: .8;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ===== Responsive ===== */
@media (max-width:768px) {

    .container {
        padding: 1em;
    }
}

/* ===== Espacement section (utilise ta classe existante) ===== */
.mt-40 {
    margin-top: clamp(16px, 5vw, 40px);
}

.mb-40 {
    margin-bottom: clamp(16px, 5vw, 40px);
}


/* ===== Typo globale dans le contenu ===== */
.sqs-html-content p {
    font-size: clamp(15px, 2.2vw, 18px);
    line-height: 1.6;
}

/* Titres (tu utilises Rubik local) */
h1 {
    line-height: 1.25;
    font-size: clamp(28px, 5.2vw, 56px);
}

h2 {
    font-weight: 300;
    line-height: 1.3;
    font-size: clamp(25px, 3.5vw, 46px);
}

/* ===== Fil d’Ariane (1er paragraphe) ===== */
/* .sqs-html-content>p:first-child {
    margin: 6px 0 16px;
    font-size: 14px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
} */

/* .sqs-html-content>p:first-child a {
    text-decoration: none;
    border-bottom: 1px dotted currentColor;
}

.sqs-html-content>p:first-child a:hover {
    border-bottom-style: solid;
} */

/* ===== Blockquote lisible sur mobile ===== */
.sqs-block-content blockquote {
    margin: 12px 0 24px;
    padding: 12px 16px;
    border-left: 4px solid #e9e9e9;
    background: #fafafa;
}


.back-top {
    bottom: 7em;
    right: 1em;
}

.grid-2,
.grid-3 {
    grid-template-columns: 1fr
}

.form {
    grid-template-columns: 1fr
}

.form .span-2 {
    grid-column: auto
}

.nav {
    /* display: none; */
    font-size: 1em;
}

/* Cache l’overlay tant que [hidden] est présent */
[hidden] {
    display: none !important;
}

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    z-index: 999;
    /* sous la nav si elle est en panneau */
}

/* Quand le menu est ouvert */
.site-header.menu-open .menu-overlay {
    opacity: 1;
    pointer-events: auto;
}

/* Nav mobile en panneau (exemple) */
.nav {
    position: fixed;
    top: 0;
    right: 0;
    background: #fff;
    transform: translateY(-120%);
    transition: transform .2s ease;
    z-index: 1000;
    /* au-dessus de l’overlay */
    padding: 1rem;
}

/* Ouvert */
.site-header.menu-open .nav {
    transform: translateY(0);
}

/* Sur desktop, désactive le panneau si besoin */
@media (min-width: 992px) {
    .nav {
        position: static;
        transform: none;
        z-index: auto;
        background: transparent;
    }

    .menu-overlay {
        display: none !important;
    }
}


/* Icône hamburger */
.menu-toggle {
    display: none;
    /* caché par défaut */
    font-size: 1.8em;
    cursor: pointer;
    background: none;
    border: none;
    color: #424242;
    z-index: 1002;
}

/* Icône hamburger fiable (3 barres en CSS, pas de caractère unicode) */
.menu-toggle {
    display: none;
    /* visible seulement en mobile */
    position: relative;
    width: 34px;
    height: 24px;
    margin-left: auto;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    z-index: 11;
    /* au-dessus du fond du menu */
}

/* Hamburger équilibré (3 barres, espacements égaux) */
.menu-toggle {
    display: none;
    /* visible seulement en mobile */
    position: relative;
    width: 34px;
    height: 26px;
    /* ← hauteur choisie pour une répartition parfaite */
    margin-left: auto;
    background: none;
    border: 0;
    padding: 0;
    color: #424242;
    /* currentColor utilisé pour les barres */
    cursor: pointer;
    z-index: 11;
    margin: -.8em .5em 0 0;
}

.menu-toggle span {
    /* libellé accessible, visuellement masqué */
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    border: 0;
    padding: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    overflow: hidden;
    white-space: nowrap;
}

.menu-toggle::before,
.menu-toggle::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    /* épaisseur des barres */
    background: currentColor;
    border-radius: 1px;
}

/* barres : top + middle via box-shadow, puis bottom */
.menu-toggle::before {
    top: 5px;
    /* marge haute = 5px */
    /* offset middle = épaisseur(2) + gap(5) = 7px → 5 + 7 = 12 */
    box-shadow: 0 7px 0 0 currentColor;
}

.menu-toggle::after {
    bottom: 5px;
    /* marge basse = 5px */
}

.image-scroll {
    opacity: 0;
    transform: translateY(1em);
    transition: transform 1.5s ease-out, opacity 3s ease-out;
}

.image-scroll.visible {
    opacity: 1;
    transform: translateY(0);
    will-change: transform, opacity;
}

.text-scroll {
    opacity: 0;
    transform: translateY(1em);
    transition: transform 0.8s ease-out, opacity 0.8s ease-out;
}

.text-scroll.visible {
    opacity: 1;
    transform: translateY(0);
    will-change: transform, opacity;
}

/* --- Mise en page & typo --- */
.page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-title {
    font-size: clamp(24.77px, 3.54vw, 46px);
    text-align: center;
    margin: 0 .5em 1em 0;
    text-transform: uppercase;
    font-weight: 100;
}

/* --- On cache les blocks d'espacement Squarespace --- */
.spacer-block {
    display: none !important;
}

/* --- Grille 2 colonnes fluide pour les rangées avec des .sqs-col-6 --- */
.row.sqs-row {
    display: flex;
    gap: 40px 40px;
}

.row.sqs-row .sqs-col-6 {
    flex: 1 1 48%;
    min-width: 300px;
}



.image-caption {
    color: #6b7280;
    font-size: 14px;
    margin-top: 6px;
}

.horizontalrule-block hr {
    border: 0;
    border-top: 1px solid #e5e7eb;
    margin: 20px 0 24px;
}

/* --- Tuiles images carrées, responsive --- */
.image-block-outer-wrapper {
    width: 100%;
}

.sqs-block-image-figure.intrinsic {
    width: 100%;
    margin: 0;
}

.sqs-image-shape-container-element.has-aspect-ratio {
    border: 1px solid #eee;
}

.sqs-block-image-link {
    display: block;
    text-decoration: none;
}

.sqs-block-image-figure {
    margin-left: auto;
    margin-right: auto;
    display: block;
}

.img-center {
    display: flex;
    justify-content: center;
}

.img-center img {
    height: auto;
    display: block;
    padding: 3em;
}

/* --- Boutons "tertiary" façon contour noir --- */
.sqs-block-button-element--tertiary {
    appearance: none;
    background: transparent;
    border: 1.5px solid #111;
    color: #111;
    padding: 10px 14px;
    font-size: 12px;
    letter-spacing: .06em;
    text-transform: uppercase;
    display: inline-block;
    transition: transform .06s ease, background-color .2s, color .2s;
}

.sqs-block-button-element--tertiary:hover {
    background: #111;
    color: #fff;
    transform: translateY(-1px);
}

/* --- Petites finitions --- */
.image-block-wrapper img {
    display: block;
    max-width: 100%;
    height: auto;
    /* pour garder les proportions */
    object-fit: cover;
    padding: 2em;
    margin: 0 auto;
    /* centrage horizontal */
}


.sqs-block-button {
    margin-top: 10px;
}

.Main-content {
    margin-bottom: 80px;
    -webkit-font-smoothing: subpixel-antialiased;
}

.sqs-html-content>*:last-child {
    margin-bottom: 0;
}

.sqs-html-content *:not(h1):not(h2):not(h3) {
    word-wrap: break-word;
}

blockquote,
.sqs-block-markdown blockquote {
    margin-left: 0;
    margin-right: 0;
    border-left: 1px solid #ddd;
    padding-left: 1.618em;
}

blockquote,
.sqs-block-markdown blockquote {
    border-color: #ddd;
}

/* blockquote {
    display: block;
    margin-block-start: 1em;
    margin-block-end: 1em;
    margin-inline-start: 40px;
    margin-inline-end: 40px;
    unicode-bidi: isolate;
} */

.sqs-block-content {
    max-width: 40em;
    /* largeur cible */
    width: 100%;
    /* fluide sur mobile */
    margin-inline: auto;
}

.hero {
    min-height: 70em;
    /* Très grand écran par défaut */
}

/* Sur desktop : autorise le wrap propre si l’espace est juste */
.row.sqs-row {
    display: flex;
    flex-wrap: wrap;
    gap: 32px 40px;
}

.row.sqs-row .sqs-col-6 {
    flex: 1 1 48%;
    min-width: 360px;
}

.row.sqs-row .sqs-col-10 {
    flex: 1 1 100%;
}

/* Images : sécurité (déjà ok, mais on s’assure que ça reste fluide) */
.image-block-wrapper img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

@media (max-width: 768px) {
    .page-content {
        padding: 1em;
    }

    .img-center img {
        max-width: 14em;
    }

    .img-center img {
        padding: 0;
    }
}


/* Mobile : afficher hamburger à droite du logo */
@media (max-width: 980px) {

    .menu-toggle {
        display: block;
        z-index: 1002;
    }

    /* Menu mobile animé (conserve ton bloc actuel) */
    .nav {
        display: flex;
        flex-direction: column;
        position: absolute;
        right: 0;
        width: 75vw;
        max-width: 300px;
        background: #fff;
        border: 1px solid #eee;
        box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
        opacity: 0;
        transform: translateY(-8px) scaleY(.98);
        transform-origin: top;
        max-height: 0;
        overflow: hidden;
        pointer-events: none;
        visibility: hidden;
        transition: opacity .22s ease, transform .22s ease, max-height .28s ease, visibility 0s linear .22s;
    }

    .nav.open {
        opacity: 1;
        transform: translateY(0) scaleY(1);
        max-height: 22em;
        pointer-events: auto;
        visibility: visible;
        transition: opacity .22s, transform .22s, max-height .32s, visibility 0s;
    }

    .nav a {
        padding: .75em 1em;
        border-bottom: 1px solid #f3f3f3;
        opacity: 0;
        transform: translateX(-6px);
        transition: opacity .18s ease, transform .18s ease;
        text-decoration: none;
    }

    .nav.open a {
        opacity: 1;
        transform: none;
    }

    .nav.open a:nth-child(1) {
        transition-delay: .05s;
    }

    .nav.open a:nth-child(2) {
        transition-delay: .09s;
    }

    .nav.open a:nth-child(3) {
        transition-delay: .13s;
    }

    .nav.open a:nth-child(4) {
        transition-delay: .17s;
    }

    .nav.open a:nth-child(5) {
        transition-delay: .21s;
    }

    .nav.open a:nth-child(6) {
        transition-delay: .25s;
    }





    .hero::before {
        background-position: center 20%;
        background-size: cover;
        background-attachment: scroll;
    }

    /* Texte plus compact */
    .hero-text h1 {
        font-size: clamp(1.15rem, 5.8vw, 1.6rem);
        line-height: 1.25;
        margin: 0;
        text-shadow:
            0 0 4px rgba(0, 0, 0, 0.7),
            0 0 8px rgba(0, 0, 0, 0.6),
            0 0 12px rgba(0, 0, 0, 0.5);
        /* multi-couches pour contraster sur clair ou sombre */
        color: #fff;
        font-family: Rubik;
    }

    .hero-text {
        display: grid;
        place-items: center;
    }

    .row.sqs-row {
        display: flex;
        flex-direction: column;
        gap: 24px;
    }

    .row.sqs-row .sqs-col-6,
    .row.sqs-row .sqs-col-10 {
        flex: 1 1 100%;
        min-width: 0;
    }

    /* Les figures d'image SQS ont un max-width inline (520px, 498px, etc.) → on l'override */
    .sqs-block-image-figure[style] {
        max-width: 100% !important;
    }

    /* Boutons & titres : respiration sur mobile */
    .sqs-block-button-container {
        margin-top: 8px;
    }

    .sqs-html-content h1,
    .sqs-html-content h3 {
        text-align: left;
        /* centre-toi si tu préfères */
        margin: 0.5em 0 0.25em;
    }
}

@media (max-width: 1919px) {

    /* Écran < 1920px */
    .hero {
        min-height: 37em;
    }

    /* Écran 15" ou équivalent */
}

@media (max-width: 1439px) {

    /* < 1440px */
    .hero {
        min-height: 40em;
    }

    /* iPad Air paysage */
}

@media (max-width: 1179px) and (orientation: landscape) {

    /* < 1180px paysage */
    .hero {
        min-height: 40em;
    }
}

@media (max-width: 819px) and (orientation: portrait) {

    /* iPad Air portrait */
    .hero {
        min-height: 30em;
    }
}

@media (max-width: 844px) and (orientation: landscape) {

    /* iPhone 12 Pro paysage */
    .hero {
        min-height: 28em;
    }
}

@media (max-width: 389px) {

    /* iPhone 12 Pro portrait */
    .hero {
        min-height: 18em;
    }
}