/* Styles propres aux pages de l'app "pages".
   Les couleurs et polices viennent des variables de mysite.css (--encre, --vert, --rouge...). */

/* Texte lu par les lecteurs d'écran mais invisible à l'écran */
.visuellement-cache {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Trait de construction sous les titres */
.liste-projets h1::after,
.projet h1::after {
    content: "";
    display: block;
    width: 3rem;
    height: 3px;
    margin: 0.75rem auto 0;
    background: var(--rouge);
}

/* ---------- Mes réalisations : liste des projets ---------- */
.liste-projets {
    max-width: 64rem;
    margin: 0 auto;
}

.liste-projets h1,
.liste-projets > p {
    text-align: center;
}

.liste-projets > p {
    max-width: 40rem;
    margin-inline: auto;
}

.liste-projets ul {
    display: grid;
    gap: 2.5rem;
    margin: 2rem 0 0;
    padding: 0;
    list-style: none;
}

/* Mobile : image au-dessus, texte dessous */
.projet-carte {
    display: grid;
    max-width: 22rem;
    margin: 0 auto;
}

.projet-carte img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin-bottom: 0.75rem;
}

.projet-carte h2 {
    font-size: 1.3rem;
    margin: 0 0 0.25rem;
}

.projet-carte p {
    margin: 0 0 0.75rem;
    color: var(--gris);
}

/* ---------- Une réalisation : page détail ---------- */
.projet {
    max-width: 64rem;
    margin: 0 auto;
    padding: 2.5rem 1rem;
}

.projet h1,
.projet-infos {
    text-align: center;
}

.projet-infos {
    color: var(--gris);
}

.projet-retour {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    margin-bottom: 1rem;
    color: var(--vert);
    font-family: var(--police-titre);
    font-weight: 500;
    text-decoration: none;
}

.projet-retour:hover {
    color: var(--rouge);
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.projet-images {
    display: grid;
    gap: 1.5rem;
    margin: 2rem 0;
    padding: 0;
    list-style: none;
}

.projet-images img {
    width: 100%;
}

.projet-texte {
    max-width: 48rem;
    margin: 0 auto;
    padding: 0;
}

.projet-texte a {
    color: var(--vert);
    text-underline-offset: 0.15em;
}

.projet-texte a:hover {
    color: var(--rouge);
}

/* ---------- Écran large (à partir de 768px) ---------- */
@media (min-width: 768px) {

    /* Projets sur 2 colonnes, image et texte côte à côte */
    .liste-projets ul {
        grid-template-columns: 1fr 1fr;
        gap: 3rem 2.5rem;
    }

    /* Image d'un côté, texte de l'autre, centré verticalement grâce aux lignes 1fr */
    .projet-carte {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr auto auto auto 1fr;
        column-gap: 1.25rem;
        max-width: none;
        margin: 0;
    }

    .projet-carte img {
        grid-column: 1;
        grid-row: 1 / -1;
        align-self: center;
        margin-bottom: 0;
    }

    .projet-carte h2 { grid-column: 2; grid-row: 2; }
    .projet-carte p { grid-column: 2; grid-row: 3; }
    .projet-carte .bouton { grid-column: 2; grid-row: 4; }

    /* Une ligne sur deux : texte à gauche, image à droite (comme la maquette) */
    .projet-carte:nth-child(4n + 3) img,
    .projet-carte:nth-child(4n + 4) img {
        grid-column: 2;
    }

    .projet-carte:nth-child(4n + 3) :is(h2, p, .bouton),
    .projet-carte:nth-child(4n + 4) :is(h2, p, .bouton) {
        grid-column: 1;
    }

    .projet-images {
        grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
        gap: 2.5rem;
    }
}

/* ---------- Tarifs ---------- */
.tarifs {
    max-width: 64rem;
    margin: 0 auto;
    text-align: center;
}

.tarifs h1::after {
    content: "";
    display: block;
    width: 3rem;
    height: 3px;
    margin: 0.75rem auto 0;
    background: var(--rouge);
}

.tarifs-sous-titre {
    max-width: 40rem;
    margin: 0 auto;
    color: var(--gris);
}

.tarifs-liste {
    display: grid;
    gap: 2rem;
    margin: 2rem 0;
    padding: 0;
    list-style: none;
}

/* Mobile : les packs les uns sous les autres */
.tarif-carte {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 22rem;
    margin: 0 auto;
    padding: 1.5rem 1.25rem;
    background: var(--beton);
    border-top: 3px solid var(--vert);
}

.tarif-carte img {
    width: auto;
    max-height: 3rem;
    margin-bottom: 0.75rem;
}

.tarif-carte h2 {
    font-size: 1.3rem;
    margin: 0 0 1rem;
}

.tarif-elements {
    align-self: stretch;
    margin: 0 0 1rem;
    padding-left: 1.25rem;
    text-align: left;
}

.tarif-elements li + li {
    margin-top: 0.35rem;
}

/* Le prix reste en bas de la carte, même si les textes n'ont pas la même longueur */
.tarif-prix {
    margin: auto 0 0;
    padding-top: 0.5rem;
    font-family: var(--police-titre);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--vert);
}

.tarifs-remarque {
    max-width: 48rem;
    margin: 0 auto;
    color: var(--rouge);
    font-weight: 500;
}

/* Invitation à me contacter : séparée de la remarque par un trait */
.tarifs-contact {
    max-width: 48rem;
    margin: 3rem auto 1.5rem;
    padding-top: 3rem;
    border-top: 1px solid var(--trait);
    /* Répartit les mots sur les lignes pour éviter un « ! » seul en fin de texte */
    text-wrap: balance;
}

/* Sans texte au-dessus, le bouton garde un espace avec la remarque */
.tarifs-remarque + .tarifs-contact-bouton {
    margin-top: 2rem;
}

@media (min-width: 768px) {

    /* Les 3 packs côte à côte */
    .tarifs-liste {
        grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
        gap: 1.5rem;
    }

    .tarif-carte {
        max-width: none;
        height: 100%;
    }
}

/* ---------- Ma méthode ---------- */
.methode {
    max-width: 64rem;
    margin: 0 auto;
    text-align: center;
}

/* Lettres un peu plus espacées sur tout le contenu (comme l'accueil) */
.template-methode main,
.template-methode main h1,
.template-methode main h2 {
    letter-spacing: 0.05em;
}

.methode h1::after {
    content: "";
    display: block;
    width: 3rem;
    height: 3px;
    margin: 0.75rem auto 0;
    background: var(--rouge);
}

/* Mobile : les étapes les unes sous les autres, séparées par un trait */
.methode-etapes {
    margin: 2rem 0;
    padding: 0;
    list-style: none;
}

.etape {
    max-width: 22rem;
    margin: 0 auto;
    padding: 2rem 0;
}

.etape + .etape {
    border-top: 1px solid var(--trait);
}

.etape img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    margin-bottom: 1rem;
}

.etape-numero {
    margin: 0 0 0.75rem;
    font-family: var(--police-titre);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--vert);
}

.etape h2 {
    font-size: 1.3rem;
    margin: 0 0 0.5rem;
}

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

.methode-complement {
    max-width: 48rem;
    margin: 0 auto;
    padding: 2rem 0 0;
    border-top: 1px solid var(--trait);
}

.methode-complement h2 {
    font-size: 1.3rem;
}

.methode-complement a {
    color: var(--vert);
    text-underline-offset: 0.15em;
}

.methode-complement a:hover {
    color: var(--rouge);
}

@media (min-width: 768px) {

    /* Les 3 étapes côte à côte, séparées par un trait vertical (comme la maquette) */
    .methode-etapes {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    }

    .etape {
        max-width: none;
        margin: 0;
        padding: 0 1.5rem;
    }

    .etape + .etape {
        border-top: 0;
        border-left: 1px solid var(--trait);
    }
}

/* ---------- Contact ---------- */
.contact {
    max-width: 64rem;
    margin: 0 auto;
}

.contact h1,
.contact > p {
    text-align: center;
}

.contact h1::after {
    content: "";
    display: block;
    width: 3rem;
    height: 3px;
    margin: 0.75rem auto 0;
    background: var(--rouge);
}

.contact > p {
    max-width: 40rem;
    margin-inline: auto;
}

/* Mobile : formulaire au-dessus, coordonnées dessous */
.contact-colonnes .contact-formulaire {
    margin-top: 2rem;
}

.contact-formulaire {
    display: grid;
    gap: 1rem;
    padding: 1.5rem 1.25rem;
    background: var(--beton);
    border-top: 3px solid var(--vert);
}

.contact-champ {
    display: grid;
    gap: 0.35rem;
    margin: 0;
}

.contact-champ label {
    font-family: var(--police-titre);
    font-weight: 500;
}

.contact-champ input,
.contact-champ textarea,
.contact-champ select {
    width: 100%;
    min-height: 44px;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--gris);
    border-radius: 0;
    background: var(--blanc);
    color: var(--encre);
    font: inherit;
}

.contact-champ textarea {
    min-height: 9rem;
    resize: vertical;
}

.contact-champ input:focus-visible,
.contact-champ textarea:focus-visible,
.contact-champ select:focus-visible {
    outline: 3px solid var(--vert);
    outline-offset: 1px;
}

/* Case à cocher : case à gauche, texte à côté */
.contact-consentement {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin: 0;
}

.contact-consentement input {
    flex: none;
    width: 1.25rem;
    height: 1.25rem;
    margin: 0.15rem 0 0;
    accent-color: var(--vert);
}

.contact-consentement input:focus-visible {
    outline: 3px solid var(--vert);
    outline-offset: 2px;
}

.contact-aide {
    font-size: 0.9rem;
    color: var(--gris);
}

.contact-erreur {
    margin: 0;
    color: var(--rouge);
    font-weight: 500;
}

.contact-formulaire .bouton {
    border: 0;
    cursor: pointer;
}

.contact-mention {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--gris);
}

/* Sections imbriquées : sans la marge des sections principales */
.contact-infos {
    display: grid;
    gap: 1.75rem;
    align-content: start;
    margin-top: 2.5rem;
    padding: 0;
}

/* Pictogramme à gauche, titre et contenu à droite */
.contact-info {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto 1fr;
    column-gap: 1rem;
    padding: 0;
}

.contact-info > :not(svg) {
    grid-column: 2;
}

.contact-info svg {
    grid-row: 1 / -1;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0.6rem;
    background: var(--vert);
    fill: var(--blanc);
}

.contact-info h2 {
    font-size: 1.1rem;
    margin: 0 0 0.25rem;
}

.contact-info a {
    justify-self: start;
    color: var(--vert);
    text-underline-offset: 0.15em;
    overflow-wrap: anywhere;
}

.contact-info a:hover {
    color: var(--rouge);
}

.contact-horaires {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 0.5rem;
    margin: 0;
}

.contact-horaires dt {
    min-width: 6rem;
    font-weight: 600;
}

.contact-horaires dd {
    margin: 0;
}

/* Page de remerciement après l'envoi */
.contact-merci {
    text-align: center;
}

.contact-merci .bouton {
    margin-top: 1.5rem;
}

@media (min-width: 768px) {

    /* Formulaire à gauche, coordonnées à droite (comme la maquette) */
    .contact-colonnes {
        display: grid;
        grid-template-columns: 3fr 2fr;
        column-gap: 3rem;
        align-items: start;
    }

    .contact-colonnes > h1,
    .contact-colonnes > p {
        grid-column: 1 / -1;
    }

    .contact-colonnes .contact-infos {
        margin-top: 2rem;
    }

    .contact-formulaire {
        padding: 2rem;
    }
}

/* ---------- Mentions légales ---------- */
/* Titres centrés et texte en colonne étroite pour rester lisible (comme la maquette) */
.mentions {
    max-width: 48rem;
    margin: 0 auto;
}

.mentions h1 {
    text-align: center;
}

/* Lettres un peu plus espacées sur tout le contenu (comme la page Méthode) */
.template-mentions main,
.template-mentions main h1,
.template-mentions main h2 {
    letter-spacing: 0.05em;
}

.mentions h1::after {
    content: "";
    display: block;
    width: 3rem;
    height: 3px;
    margin: 0.75rem auto 0;
    background: var(--rouge);
}

.mentions-rubrique {
    margin-top: 2.5rem;
    padding: 0;
    text-align: center;
}

.mentions-rubrique h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

/* Puces collées au texte pour que les listes restent centrées */
.mentions-rubrique ul {
    padding-left: 0;
    list-style-position: inside;
}

.mentions-rubrique a {
    color: var(--vert);
    overflow-wrap: anywhere;
    text-underline-offset: 0.15em;
}

.mentions-rubrique a:hover {
    color: var(--rouge);
}

.mentions-maj {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--trait);
    font-size: 0.9rem;
    text-align: center;
}
