/*
 * Accueil des visiteurs de Penta Com (mobile/penta-com-accueil.php).
 * Couleurs : variables de l'appli (css/templates.css) et bleu nuit du magazine (mêmes valeurs que mobile_header.php,
 * page sans l'en-tête de l'appli). Grille de 8 pt, cartes sans ombre ni dégradé, modes jour et nuit.
 */
html:root, html:root[data-layout-template] { --blue: #9db8d9; --blue-dim: rgba(157,184,217,.14); --sur-blue: #0d0f14; }
html:root[data-theme="light"], html:root[data-theme="light"][data-layout-template] { --blue: #0f2a4a; --blue-dim: rgba(15,42,74,.10); --sur-blue: #fff; }

.pcv-corps {
    --pcv-doux: color-mix(in srgb, var(--white) 70%, transparent);
    --pcv-strava: #fc4c02;
    margin: 0; background: var(--ink); color: var(--white); overflow-x: clip;
    font-family: Inter, -apple-system, system-ui, sans-serif; -webkit-tap-highlight-color: transparent;
}

/* En-tête : bande multisport, marque au centre, bascule jour/nuit à droite */
.pcv-entete { position: sticky; top: 0; z-index: 10; background: var(--ink); border-bottom: 1px solid var(--rule); padding-top: env(safe-area-inset-top, 0px); }
.pcv-bande { display: flex; height: 4px; }
.pcv-bande span { flex: 1; }
.pcv-barre { display: flex; align-items: center; justify-content: space-between; max-width: 1040px; height: 52px; margin: 0 auto; padding: 0 8px; }
.pcv-vide, .pcv-icone { width: 44px; height: 44px; }
.pcv-icone { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; background: none; color: var(--pcv-doux); font-size: 17px; cursor: pointer; }
.pcv-icone:active { background: var(--ink3); }
.pcv-marque { font-family: 'Bebas Neue', 'Barlow Condensed', 'Arial Narrow', sans-serif; font-style: italic; font-size: 30px; line-height: 1; letter-spacing: .02em; text-transform: uppercase; color: var(--white); white-space: nowrap; }
.pcv-marque b { font-weight: 400; color: var(--blue); margin-left: .12em; }

.pcv { max-width: 1040px; margin: 0 auto; padding: 0 16px calc(32px + env(safe-area-inset-bottom, 0px)); }

/* Une : titre, chapô, entrée */
.pcv-une { padding: 32px 0 24px; }
.pcv-surtitre { margin: 0 0 4px; font-size: .8125rem; line-height: 1.4; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--blue); }
.pcv-titre { margin: 0 0 12px; font-family: 'Bebas Neue', 'Barlow Condensed', 'Arial Narrow', sans-serif; font-weight: 400; font-size: 3rem; line-height: .95; text-transform: uppercase; color: var(--white); }
.pcv-chapo { max-width: 40rem; margin: 0; font-size: 1rem; line-height: 1.5; color: var(--pcv-doux); }
.pcv-avis { margin: 16px 0 0; padding: 12px 16px; border: 1px solid var(--rule); border-radius: 12px; font-size: .9375rem; line-height: 1.45; }
.pcv-actions { display: grid; gap: 8px; max-width: 400px; margin-top: 24px; }
.pcv-bouton {
    display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 16px; border-radius: 14px;
    background: var(--blue); color: var(--sur-blue); font-size: 1rem; font-weight: 700; text-decoration: none;
    transition: transform .14s ease-out;
}
.pcv-bouton:active { transform: scale(.98); }
.pcv-second { background: transparent; color: var(--white); border: 1px solid var(--rule2, var(--rule)); }
.pcv-lien { display: flex; align-items: center; justify-content: center; min-height: 44px; color: var(--white); font-size: .9375rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.pcv-note { margin: 8px 0 0; font-size: .8125rem; line-height: 1.4; color: var(--pcv-doux); }

/* Grand visuel : photo du magazine plein écran, titre posé dessus sur un voile uni (texte toujours blanc, en jour comme en nuit) */
.pcv-une-photo { padding-top: 0; }
.pcv-une-photo .pcv-une-texte {
    --pcv-sur-photo: #fff;
    position: relative; display: flex; flex-direction: column; justify-content: flex-end;
    min-height: min(64vh, 520px); margin: 0 -16px; padding: 24px 16px; overflow: hidden; isolation: isolate;
}
.pcv-une-image { display: none; }
.pcv-une-photo .pcv-une-image {
    display: block; position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%;
    object-fit: cover; object-position: center 30%;
}
.pcv-une-photo .pcv-une-texte::before { content: ""; position: absolute; z-index: -1; inset: 0; background: rgba(8, 12, 18, .52); }
.pcv-une-photo .pcv-surtitre { color: var(--pcv-sur-photo); opacity: .85; }
.pcv-une-photo .pcv-titre { color: var(--pcv-sur-photo); }
.pcv-une-photo .pcv-chapo { color: var(--pcv-sur-photo); opacity: .9; }
.pcv-une-photo .pcv-avis { margin-top: 16px; }

/* Photo en tête de chaque carte de rubrique */
.pcv-carte-photo { display: block; max-width: none; width: calc(100% + 32px); aspect-ratio: 16 / 9; margin: -16px -16px 12px; object-fit: cover; border-radius: 20px 20px 0 0; background: var(--ink3); }
.pcv-analyz-photo { width: calc(100% + 32px); margin: -24px -16px 16px; border-radius: 0; }

/* Sections */
.pcv-section { padding: 24px 0; border-top: 1px solid var(--rule); }
.pcv-entete-liste { margin: 0 0 12px; font-size: .8125rem; line-height: 1.4; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--pcv-doux); }
.pcv-texte { margin: 0 0 12px; font-size: 1rem; line-height: 1.5; color: var(--pcv-doux); }

/* Ce que vous faites : une carte par rubrique, numéro et liste d'outils à filets */
.pcv-rubriques { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.pcv-carte { padding: 16px; border: 1px solid var(--rule); border-radius: 20px; background: var(--ink2); overflow: hidden; }
.pcv-num { margin: 0; font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif; font-size: 1rem; font-weight: 700; letter-spacing: .04em; color: var(--blue); font-variant-numeric: tabular-nums; }
.pcv-carte-titre { margin: 0 0 4px; font-size: 1.25rem; line-height: 1.3; font-weight: 600; color: var(--white); }
.pcv-carte .pcv-texte { margin-bottom: 8px; }
.pcv-outils { margin: 0; padding: 0; list-style: none; }
.pcv-outils li { padding: 8px 0; border-top: 1px solid var(--rule); font-size: .9375rem; line-height: 1.4; }

.pcv-exemple { display: grid; gap: 2px; margin-top: 12px; padding: 12px 16px; min-height: 44px; border: 1px solid var(--rule); border-radius: 14px; color: var(--white); text-decoration: none; transition: transform .14s ease-out; }
.pcv-exemple span { font-weight: 700; }
.pcv-exemple span::after { content: " \203A"; }
.pcv-exemple small { font-size: .8125rem; color: var(--pcv-doux); }
.pcv-exemple:active { transform: scale(.985); background: var(--ink3); }

/* PentAnalyz : filet de la couleur de Strava, listes simples */
.pcv-analyz { margin-top: 8px; padding: 24px 16px; border: 1px solid var(--rule); border-left: 4px solid var(--pcv-strava); border-radius: 20px; background: var(--ink2); overflow: hidden; }
.pcv-analyz .pcv-surtitre { color: var(--pcv-strava); }
.pcv-analyz-titre { margin: 0 0 8px; font-family: 'Bebas Neue', 'Barlow Condensed', 'Arial Narrow', sans-serif; font-weight: 400; font-size: 2rem; line-height: 1; text-transform: uppercase; }
.pcv-liste { margin: 0 0 24px; padding: 0; list-style: none; }
.pcv-liste:last-child { margin-bottom: 0; }
.pcv-liste li { position: relative; padding: 8px 0 8px 20px; border-top: 1px solid var(--rule); font-size: .9375rem; line-height: 1.45; }
.pcv-liste li::before { content: ""; position: absolute; left: 4px; top: 16px; width: 6px; height: 6px; border-radius: 999px; background: var(--blue); }
.pcv-promesses li::before { width: 8px; height: 4px; top: 15px; border-radius: 0; background: none; border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(-45deg); }

.pcv-fin { margin-top: 24px; }
.pcv-fin .pcv-actions { margin-top: 12px; }

.pcv-pied { display: flex; flex-wrap: wrap; gap: 0 16px; padding: 16px 0 0; border-top: 1px solid var(--rule); }
.pcv-pied a { display: inline-flex; align-items: center; min-height: 44px; color: var(--pcv-doux); font-size: .8125rem; text-decoration: none; }

a:focus-visible, button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Ordinateur et tablette : rubriques sur deux colonnes */
@media (min-width: 760px) {
    .pcv-une { padding: 48px 0 32px; }
    .pcv-titre { font-size: 4rem; }
    .pcv-actions { grid-template-columns: 1fr 1fr; max-width: 480px; }
    .pcv-actions .pcv-lien { grid-column: 1 / -1; justify-content: flex-start; }
    .pcv-rubriques { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    /* Nombre impair de rubriques : la dernière prend toute la largeur, ses outils sur deux colonnes */
    .pcv-rubriques > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .pcv-rubriques > li:last-child:nth-child(odd) .pcv-carte-photo { aspect-ratio: 21 / 9; }
    .pcv-rubriques > li:last-child:nth-child(odd) .pcv-outils { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
    .pcv-analyz { padding: 32px; }
    .pcv-analyz-photo { width: calc(100% + 64px); margin: -32px -32px 24px; aspect-ratio: 21 / 9; }
    .pcv-une-photo { padding-top: 24px; }
    .pcv-une-photo .pcv-une-texte { margin: 0; padding: 48px 32px 32px; border-radius: 20px; min-height: 480px; }
}

@media (prefers-reduced-motion: reduce) {
    .pcv-bouton, .pcv-exemple { transition: none; }
    .pcv-bouton:active, .pcv-exemple:active { transform: none; }
}
