/* Custom styles for L'écriture sous toutes les coutures */

:root {
    --pico-font-family: 'Fira Sans', sans-serif;
}

body {
    display: grid;
    min-height: 100dvh; /* 100dvh s'adapte à la hauteur mobile sans barre d'adresse gênante */
    grid-template-rows: auto 1fr auto; /* header | contenu flexible (1fr) | footer */
}

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

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

/* Visually hidden - for screen readers only */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip link */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: #000;
    color: #fff;
    padding: 0.5rem;
    z-index: 100;
}

.skip-link:focus {
    left: 0;
}

img.icon {
    width: 16px;
    height: 16px;
}

/* Focus styles for keyboard accessibility */
:focus-visible {
    outline: 2px solid var(--pico-primary);
    outline-offset: 2px;
}

/* Navigation */
header {
    border-bottom: 1px solid var(--pico-muted-border-color);
}

header nav,
.primary-nav {
    display: flex;
    justify-content: center;
}

.nav-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0;
}

.nav-list li {
    position: relative;
    padding: 0 0.75rem;
}

.nav-list li:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 1em;
    background: var(--pico-muted-border-color);
}

@media (max-width: 600px) {
    .nav-list li {
        padding: 0.25rem 0.75rem;
    }
}

/* main */
main {
    max-width: 900px;
    margin: 0 auto;

    h1 {
        font-weight: normal;
        font-size:  1.5rem;
    }

    h2 {
        font-weight: normal;
        font-size: 2rem;
    }

    .highlight { color: #4b0082; }
    .highlight-red { color: #ff0000; }

    .italic { font-style: italic; }

    .bold { font-weight: bold; }

    .no-list-style li {
        list-style: none;
    }
}

/* Footer */
footer {
    background-color: var(--pico-secondary-background);
}

footer a.secondary,
footer p {
    color: var(--pico-secondary-inverse);
}

footer nav {
    justify-content: center;
}

footer ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

footer ul,
footer li,
footer p {
    margin: 0;
    padding: 0;
}

footer p {
    text-align: center;
}

/* Caroussel */
.carousel {
    max-width: 100%;
}

.carousel__slides {
    margin-bottom: 1rem;
}

.carousel__slide {
    margin: 0;
}

.carousel__slide img {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: contain;
    display: block;
    border-radius: 0.5rem;
}

.carousel__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.carousel__button {
    width: auto;
}

.carousel__indicators {
    display: flex;
    gap: 0.5rem;
}

.carousel__indicator {
    width: 0.85rem;
    height: 0.85rem;
    padding: 0;
    border-radius: 999px;
    border: 2px solid currentColor;
    background: transparent;
}

.carousel__indicator[aria-current="true"] {
    background: currentColor;
}

/* Compact contact form: smaller field padding (Pico variables) */
#contact-form {
    --pico-form-element-spacing-vertical: 0.4rem;
    --pico-form-element-spacing-horizontal: 0.75rem;
    max-width: 700px;
}

/* Pico already draws a focus ring (box-shadow) on form fields: avoid a double border */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: none;
}
