/*
   Composants communs : conteneur, boutons, étiquettes, badges, rubans défilants
*/

.conteneur {
    max-width: var(--largeur-max);
    margin: auto;
    padding: 0 max(18px, env(safe-area-inset-right)) 0 max(18px, env(safe-area-inset-left));
}

.icone-etoile {
    width: 1em;
    height: 1em;
    fill: var(--accent);
    stroke: var(--encre);
    stroke-width: 3;
    vector-effect: non-scaling-stroke;
}

.etiquette,
small {
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--couleur-etiquette);
}

.boutons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.bouton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    padding: 0 28px;
    border-radius: 99px;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    border: 2.5px solid var(--encre);
    transition:
        transform 0.25s,
        box-shadow 0.25s;
    box-shadow: 4px 4px 0 var(--encre);
}

.bouton.bouton-principal {
    background: var(--encre);
    color: var(--papier);
}

.bouton.bouton-secondaire {
    background: var(--papier);
}

.bouton:active {
    transform: translate(3px, 3px);
    box-shadow: 1px 1px 0 var(--encre);
}

.bouton:disabled {
    opacity: 0.5;
    pointer-events: none;
}

@keyframes pulsation {
    50% {
        transform: scale(0.94);
    }
}

.apparition {
    opacity: 0;
    transform: translateY(46px) rotate(calc(var(--rotation, 0deg) * 2));
    transition:
        opacity 0.8s,
        transform 0.9s cubic-bezier(0.2, 0.9, 0.2, 1);
}

.apparition.revele {
    opacity: 1;
    transform: rotate(var(--rotation, 0deg));
}

.badge-etoile {
    position: relative;
    display: grid;
    place-items: center;
    flex: none;
    font-style: normal;
}

.badge-etoile svg {
    grid-area: 1/1;
    width: 100%;
    height: 100%;
    fill: var(--accent);
    stroke: var(--encre);
    stroke-width: 2.5;
    vector-effect: non-scaling-stroke;
    animation: rotation 12s linear infinite;
}

.badge-etoile em {
    grid-area: 1/1;
    position: relative;
    font:
        900 15px "Arial Black",
        system-ui;
    font-style: normal;
    color: var(--sur-accent);
}

h2 {
    font-size: clamp(34px, 9vw, 62px);
    line-height: 0.92;
    letter-spacing: -0.06em;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    overflow-wrap: anywhere;
}

.titre-section {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}

.titre-section a {
    font-weight: 800;
    border-bottom: 3px solid var(--accent);
}

.entete-page {
    position: relative;
    padding: 38px max(18px, env(safe-area-inset-right)) 26px max(18px, env(safe-area-inset-left));
}

.entete-page p {
    max-width: 40ch;
    margin-top: 16px;
    font-size: 18px;
}

.entete-page .grand-titre {
    font-size: clamp(54px, 17vw, 150px);
    overflow-wrap: anywhere;
}

.entete-page .decoration {
    position: absolute;
    right: 22px;
    top: 26px;
    width: clamp(70px, 20vw, 170px);
    z-index: -1;
}

.entete-page .decoration svg {
    width: 100%;
    height: auto;
    fill: var(--accent);
    stroke: var(--encre);
    stroke-width: 3;
    vector-effect: non-scaling-stroke;
}

.etoile-relief {
    fill: var(--encre);
}

.entete-page .decoration svg {
    animation: pulsation 6s ease-in-out infinite;
}

.entete-page {
    isolation: isolate;
    overflow-x: clip;
}

main.page-interne {
    overflow-x: clip;
}

.ruban {
    position: relative;
    overflow: hidden;
    border: 2.5px solid var(--encre);
    padding: 13px 0;
}

.ruban.ruban-accent {
    background: var(--accent);
    color: var(--sur-accent);
    --couleur-contour: var(--sur-accent);
}

.ruban-piste {
    display: flex;
    width: max-content;
    will-change: transform;
}

.ruban-groupe {
    display: flex;
    flex: none;
    align-items: center;
}

.ruban b,
.domaine b {
    font-size: clamp(26px, 5.5vw, 44px);
    letter-spacing: -0.03em;
    line-height: 1.1;
    padding: 0 0.35em;
}

u {
    text-decoration: none;
    font-size: clamp(20px, 4vw, 32px);
}

.ruban b.contour,
.domaine b {
    color: transparent;
    -webkit-text-stroke: 1.8px var(--couleur-contour, var(--encre));
}

.bande-rubans {
    margin: 70px 0 0;
    width: 100%;
    padding: 16px 0;
    overflow-x: clip;
    overflow-y: visible;
}

.bande-rubans .ruban {
    margin: 0 -3%;
    width: 106%;
    transform: rotate(-1.6deg);
}

.etoile-relief {
    fill: var(--encre);
}

.rubans {
    position: relative;
    overflow-x: clip;
    height: 150px;
    width: 100vw;
    margin: -50px 0 56px calc(50% - 50vw);
}

.rubans .ruban {
    position: absolute;
    left: -6%;
    width: 112%;
}

.ruban.ruban-accent.ruban-haut {
    top: 4px;
    transform: rotate(-3deg);
    z-index: 1;
}

.ruban.ruban-sombre {
    z-index: 6;
    top: 58px;
    background: var(--encre);
    color: var(--papier);
    transform: rotate(2.4deg);
    --couleur-contour: var(--papier);
}

.ruban.ruban-sombre b:not(.contour) {
    color: var(--accent);
}

form {
    display: grid;
    gap: 18px;
}

label {
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--couleur-etiquette);
}

input,
select,
textarea {
    width: 100%;
    font: inherit;
    font-size: 16px;
    color: var(--encre);
    background: var(--fond-carte);
    border: 2.5px solid var(--encre);
    border-radius: 22px;
    padding: 14px 18px;
    min-height: 54px;
    transition:
        box-shadow 0.25s,
        transform 0.25s;
    appearance: none;
    -webkit-appearance: none;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232F5BFF' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 20px;
    padding-right: 46px;
}

textarea {
    min-height: 170px;
    resize: vertical;
    border-radius: 26px;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 5px 5px 0 var(--accent);
    transform: translate(-2px, -2px);
}

.texte-lecteur-ecran {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

@media (hover: hover) {
    .bouton:hover {
        transform: translate(-2px, -2px);
        box-shadow: 7px 7px 0 var(--encre);
    }
}

@media (min-width: 820px) {
    .entete-page .grand-titre {
        font-size: clamp(72px, 8.5vw, 108px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .apparition {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 359px) {
    .entete-page .grand-titre {
        font-size: clamp(30px, 15.5vw, 150px);
    }

    h2 {
        font-size: clamp(26px, 10.5vw, 62px);
    }

    .bouton {
        padding: 0 20px;
        min-height: 50px;
        font-size: 15px;
    }
}

@media (max-width: 279px) {
    .conteneur,
    .entete-page {
        padding-left: 12px;
        padding-right: 12px;
    }
}

@media (min-width: 600px) and (max-width: 819px) {
    .entete-page .grand-titre {
        font-size: clamp(72px, 12vw, 120px);
    }
}

@media (orientation: landscape) and (max-height: 560px) {
    .entete-page {
        padding-top: 18px;
        padding-bottom: 14px;
    }
}

@media (orientation: landscape) and (max-height: 560px) and (max-width: 819px) and (min-width: 480px) {
    .entete-page .grand-titre {
        font-size: clamp(40px, min(10vw, 22vh), 90px);
    }

    .boutons .bouton {
        min-height: 46px;
        padding: 0 20px;
        font-size: 14px;
    }

    .rubans {
        margin-top: -30px;
    }
}

@media (min-width: 1500px) {
    .entete-page .grand-titre {
        font-size: min(8.5vw, calc(108px * var(--echelle)));
    }

    h2 {
        font-size: min(9vw, calc(62px * var(--echelle)));
    }

    .entete-page p {
        font-size: calc(18px * var(--echelle));
        max-width: 44ch;
    }

    .bouton {
        min-height: calc(54px * var(--echelle));
        font-size: calc(16px * var(--echelle));
        padding: 0 calc(28px * var(--echelle));
    }

    .ruban b {
        font-size: min(5.5vw, calc(44px * var(--echelle)));
    }

    .etiquette {
        font-size: calc(12px * var(--echelle));
    }
}
