/* ==========================================================================
   Politique qualité — petit écran par langue (partiel partials/quality-policy.php)
   Chargée par la page « À propos ». (Les vignettes de la barre de navigation sont dans main.css.)
   ========================================================================== */

/* Politique qualité : un petit écran par langue, posé sur une tuile bleue quadrillée.
   L'écran est un lien vers l'aperçu en grand (visionneuse) ; le PDF s'ouvre ou se télécharge dessous. */
.policy {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    gap: 1.25rem;
    justify-items: center;
    width: min(100%, 30rem);
    padding: clamp(1.15rem, 0.9rem + 1.5vw, 2rem);
    border-radius: var(--tile-radius);
    background: var(--brand);
    color: var(--white);
    box-shadow: 0 40px 70px -36px rgba(11, 42, 69, 0.7);
}

.policy::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(22rem circle at 80% 0%, rgba(255, 255, 255, 0.18), transparent 65%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 3rem),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 3rem);
}

.policy__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
}

.policy__label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.policy__label span {
    padding: 0.15rem 0.5rem;
    border-radius: var(--pill);
    background: var(--yellow);
    color: var(--ink);
    letter-spacing: 0.04em;
}

/* Onglets de langue : une capsule translucide, la langue choisie en blanc */
.policy__tabs {
    display: flex;
    gap: 0.25rem;
    padding: 0.25rem;
    border-radius: var(--pill);
    background: rgba(255, 255, 255, 0.14);
}

.policy__tabs[hidden] {
    display: none;
}

.policy__tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2.5rem;
    padding: 0 0.85rem 0 0.35rem;
    border-radius: var(--pill);
    color: var(--white);
    font-size: 0.8125rem;
    font-weight: 700;
    white-space: nowrap;
    transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.policy__code {
    display: inline-grid;
    place-items: center;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.policy__tab:hover:not([aria-selected="true"]) {
    background: rgba(255, 255, 255, 0.14);
}

.policy__tab[aria-selected="true"] {
    background: var(--white);
    color: var(--ink);
}

.policy__tab[aria-selected="true"] .policy__code {
    background: var(--yellow);
    color: var(--ink);
}

.policy__tab:focus-visible {
    outline-color: var(--yellow);
}

/* Le petit écran */
.policy__panel {
    display: grid;
    gap: 1.1rem;
    justify-items: center;
    width: 100%;
    margin: 0;
}

.policy__panel[hidden] {
    display: none;
}

.policy__device {
    position: relative;
    display: block;
    width: min(100%, 20rem);
    padding: 0.5rem 0.5rem 0.6rem;
    border-radius: 1.6rem;
    background: var(--ink);
    color: var(--white);
    text-decoration: none;
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.16), 0 30px 50px -24px rgba(6, 24, 42, 0.85);
    transform: rotate(-2deg);
    transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease);
}

.policy__device:hover,
.policy__device:focus-visible {
    transform: rotate(0deg) translateY(-4px);
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.2), 0 40px 60px -26px rgba(6, 24, 42, 0.9);
}

.policy__device:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: 4px;
}

/* Barre de fenêtre : trois voyants et le nom du fichier */
.policy__bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.15rem 0.35rem 0.5rem;
}

.policy__dots {
    display: flex;
    flex: none;
    gap: 0.3rem;
}

.policy__dots i {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
}

.policy__dots i:first-child {
    background: var(--yellow);
}

.policy__file {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    padding: 0.2rem 0.65rem;
    border-radius: var(--pill);
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.6875rem;
    font-weight: 600;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.82);
}

.policy__screen {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 900 / 1270;
    border-radius: 1.05rem;
    background: var(--white);
}

.policy__screen img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.8s var(--ease);
}

.policy__device:hover .policy__screen img {
    transform: scale(1.03);
}

/* « Agrandir » : apparaît au survol ; toujours visible sur écran tactile */
.policy__zoom {
    position: absolute;
    left: 50%;
    bottom: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.9rem 0.35rem 0.35rem;
    border-radius: var(--pill);
    background: var(--ink);
    color: var(--white);
    font-size: 0.8125rem;
    font-weight: 800;
    white-space: nowrap;
    opacity: 0;
    transform: translate(-50%, 0.5rem);
    transition: opacity 0.35s var(--ease), transform 0.45s var(--ease);
}

.policy__zoom .icon {
    width: 1.75rem;
    height: 1.75rem;
    padding: 0.4rem;
    border-radius: 50%;
    background: var(--yellow);
    color: var(--ink);
    stroke-width: 2.2;
}

.policy__device:hover .policy__zoom,
.policy__device:focus-visible .policy__zoom {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (hover: none) {
    .policy__zoom {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Sous l'écran : le titre dans la langue du document, puis les actions */
.policy__foot {
    display: grid;
    gap: 0.85rem;
    justify-items: center;
    width: 100%;
    text-align: center;
}

.policy__title {
    font-size: 1.375rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.policy__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.6rem 1.1rem;
}

.policy__download {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 2.75rem;
    color: var(--white);
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
    text-decoration: none;
}

.policy__download > .icon {
    flex: none;
    width: 2.4rem;
    height: 2.4rem;
    padding: 0.6rem;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1.5px currentColor;
    stroke-width: 2;
    transition: background-color 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.policy__download small {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.82);
}

.policy__download:hover > .icon,
.policy__download:focus-visible > .icon {
    background: var(--yellow);
    color: var(--ink);
    box-shadow: none;
}

.policy__download:focus-visible,
.policy .btn:focus-visible {
    outline-color: var(--yellow);
}

/* Sans JavaScript, les trois versions se suivent : un filet les sépare */
.policy__panel + .policy__panel {
    padding-top: 1.25rem;
    border-top: 1.5px solid rgba(255, 255, 255, 0.25);
}

.js .policy__panel + .policy__panel {
    padding-top: 0;
    border-top: 0;
}
