/* ------------------------------------------------------------------ */
/* Pages de présentation (assistant IA, jeu Chronos)                    */
/* Préfixe .pres- ; palette et rayons repris de l'accueil et du système  */
/* Apple (admin-apple.css). Aucune dépendance à un autre gabarit.        */
/* ------------------------------------------------------------------ */

.pres {
    --pres-bleu: #0271E8;
    --pres-violet: #5856d6;
    --pres-violet-clair: #8b5cf6;
    --pres-ambre: #f59e0b;
    --pres-vert: #10b981;
    --pres-encre: #1a1a1a;
    --pres-gris: #6b7280;
    --pres-gris-clair: #e5e7eb;
    --pres-fond: #f5f5f7;
    --pres-degrade: linear-gradient(135deg, #0271E8 0%, #5856d6 100%);
    --pres-max: 1120px;
    color: var(--pres-encre);
    font-family: var(--font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    line-height: 1.6;
    overflow-x: hidden;
}

.pres section,
.pres .pres-hero {
    padding: 4.5rem 1.5rem;
}

.pres-contenu {
    max-width: var(--pres-max);
    margin: 0 auto;
}

.pres h1, .pres h2, .pres h3 {
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--pres-encre);
}

.pres h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    margin: 0 0 0.75rem;
}

.pres h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.pres-intro {
    font-size: 1.15rem;
    color: var(--pres-gris);
    max-width: 640px;
    margin: 0 0 2.5rem;
}

.pres-centre {
    text-align: center;
}

.pres-centre .pres-intro {
    margin-left: auto;
    margin-right: auto;
}

/* ---------------------------------- Boutons */
.pres-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.95rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
}

.pres-btn:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

.pres-btn-primaire {
    background: var(--pres-degrade);
    color: #fff;
    box-shadow: 0 4px 14px rgba(2, 113, 232, 0.3);
}

.pres-btn-primaire:hover {
    color: #fff;
    box-shadow: 0 8px 24px rgba(2, 113, 232, 0.35);
}

.pres-btn-secondaire {
    background: #fff;
    color: var(--pres-bleu);
    border: 2px solid var(--pres-gris-clair);
}

.pres-btn-secondaire:hover {
    color: var(--pres-bleu);
    border-color: var(--pres-bleu);
}

.pres-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 2rem 0 1.5rem;
}

/* ---------------------------------- En-tête */
.pres-hero {
    background: radial-gradient(ellipse at top left, rgba(2, 113, 232, 0.08), transparent 55%),
                radial-gradient(ellipse at bottom right, rgba(88, 86, 214, 0.10), transparent 55%),
                #fff;
}

.pres-hero .pres-contenu {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 3rem;
    align-items: center;
}

.pres-surtitre {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(2, 113, 232, 0.08);
    color: var(--pres-bleu);
    border-radius: 9999px;
    padding: 0.4rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0 0 1.25rem;
}

.pres h1 {
    font-size: clamp(2.2rem, 4.2vw, 3.6rem);
    font-weight: 800;
    margin: 0 0 1.25rem;
}

.pres h1 .pres-accent {
    background: var(--pres-degrade);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--pres-bleu);
}

.pres-lead {
    font-size: 1.2rem;
    color: #4b5563;
    margin: 0;
}

.pres-preuves {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    color: var(--pres-gris);
    font-size: 0.95rem;
}

.pres-preuves li {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.pres-preuves i {
    color: var(--pres-vert);
}

.pres-video {
    margin: 0;
}

.pres-video-cadre {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
    background: #fff;
    line-height: 0;
}

.pres-video video {
    display: block;
    width: 100%;
    height: auto;
    background: #fff;
}

/* Le bouton couvre l'aperçu : n'importe quel clic lance la démonstration complète.
   Le voile et le rond disent qu'il y a quelque chose à ouvrir, la boucle seule ne le
   dirait pas. */
.pres-video-lecture {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 1.5rem;
    border: 0;
    /* Dégradé plutôt qu'un voile uniforme : il s'assombrit là où se pose le libellé,
       et laisse l'aperçu intact en haut. */
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.35) 100%);
    cursor: pointer;
    line-height: 1.4;
    transition: background 0.25s ease;
}

.pres-video-lecture:hover,
.pres-video-lecture:focus-visible {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 40%, rgba(0, 0, 0, 0.45) 100%);
}

.pres-video-lecture:focus-visible {
    outline: 3px solid var(--pres-bleu);
    outline-offset: -3px;
}

.pres-video-libelle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.7rem 1.4rem;
    border-radius: 9999px;
    background: rgba(26, 26, 26, 0.82);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    backdrop-filter: blur(6px);
    white-space: nowrap;
}

.pres-video-libelle small {
    font-weight: 500;
    opacity: 0.75;
}

.pres-video-icone {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    color: var(--pres-bleu);
    font-size: 1.45rem;
    padding-left: 5px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3);
    transition: transform 0.25s ease;
}

.pres-video-lecture:hover .pres-video-icone,
.pres-video-lecture:focus-visible .pres-video-icone {
    transform: translate(-50%, -50%) scale(1.08);
}

.pres-video-complete {
    display: block;
    width: 100%;
    height: auto;
    background: #000;
}

.pres-video figcaption {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--pres-gris);
    text-align: center;
}

/* ---------------------------------- Étapes */
.pres-etapes-section {
    background: var(--pres-fond);
}

.pres-etapes {
    list-style: none;
    counter-reset: etape;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.pres-etapes li {
    counter-increment: etape;
    background: #fff;
    border-radius: 18px;
    padding: 2rem 1.75rem 1.75rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    position: relative;
}

.pres-etapes li::before {
    content: counter(etape);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--pres-degrade);
    color: #fff;
    font-weight: 800;
    font-size: 1.15rem;
    margin-bottom: 1rem;
}

.pres-etapes p {
    margin: 0;
    color: var(--pres-gris);
}

.pres-etapes q {
    display: block;
    margin-top: 0.9rem;
    padding: 0.7rem 0.9rem;
    background: rgba(2, 113, 232, 0.06);
    border-left: 3px solid var(--pres-bleu);
    border-radius: 8px;
    font-style: italic;
    color: var(--pres-encre);
    quotes: "« " " »";
}

/* ---------------------------------- Fonctions */
.pres-grille {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.pres-carte {
    background: #fff;
    border: 1px solid var(--pres-gris-clair);
    border-radius: 18px;
    padding: 1.75rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.pres-carte:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.pres-carte p {
    margin: 0;
    color: var(--pres-gris);
}

.pres-icone {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
    margin-bottom: 1rem;
    background: var(--pres-degrade);
}

.pres-icone--ambre { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.pres-icone--vert { background: linear-gradient(135deg, #10b981, #0ea5e9); }
.pres-icone--violet { background: linear-gradient(135deg, #8b5cf6, #5856d6); }

/* ---------------------------------- Confiance (texte + image) */
.pres-duo {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: center;
}

.pres-duo--inverse .pres-duo-media {
    order: -1;
}

.pres-duo-media img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 18px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.14);
    border: 1px solid var(--pres-gris-clair);
}

.pres-points {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
    display: grid;
    gap: 1rem;
}

.pres-points li {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 0.9rem;
    align-items: start;
}

.pres-points i {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(2, 113, 232, 0.08);
    color: var(--pres-bleu);
}

.pres-points strong {
    display: block;
    color: var(--pres-encre);
}

.pres-points span {
    color: var(--pres-gris);
}

/* ---------------------------------- Publics */
.pres-publics-section {
    background: var(--pres-fond);
}

.pres-public {
    background: #fff;
    border-radius: 18px;
    padding: 1.75rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.pres-public ul {
    margin: 0.75rem 0 0;
    padding-left: 1.1rem;
    color: var(--pres-gris);
}

.pres-public li + li {
    margin-top: 0.35rem;
}

/* ---------------------------------- FAQ */
.pres-faq {
    max-width: 800px;
    margin: 0 auto;
}

.pres-faq details {
    border-bottom: 1px solid var(--pres-gris-clair);
    padding: 0.25rem 0;
}

.pres-faq summary {
    cursor: pointer;
    list-style: none;
    padding: 1rem 2.5rem 1rem 0;
    position: relative;
}

.pres-faq summary::-webkit-details-marker {
    display: none;
}

.pres-faq summary::after {
    content: "+";
    position: absolute;
    right: 0.25rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--pres-bleu);
    transition: transform 0.2s ease;
}

.pres-faq details[open] summary::after {
    content: "−";
}

.pres-faq summary h3 {
    display: inline;
    font-size: 1.1rem;
    margin: 0;
}

.pres-faq details p {
    margin: 0 0 1.25rem;
    color: var(--pres-gris);
}

/* ---------------------------------- Appel final */
.pres-final {
    background: var(--pres-degrade);
    color: #fff;
}

.pres-final h2,
.pres-final p {
    color: #fff;
}

.pres-final .pres-intro {
    color: rgba(255, 255, 255, 0.85);
}

.pres-final .pres-btn-primaire {
    background: #fff;
    color: var(--pres-bleu);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.pres-final .pres-btn-secondaire {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.6);
}

.pres-final .pres-btn-secondaire:hover {
    color: #fff;
    border-color: #fff;
}

.pres-final .pres-actions {
    justify-content: center;
    margin-bottom: 0;
}

/* ---------------------------------- Écrans étroits */
@media (max-width: 900px) {
    .pres-hero .pres-contenu,
    .pres-duo {
        grid-template-columns: minmax(0, 1fr);
        gap: 2rem;
    }

    .pres-duo--inverse .pres-duo-media {
        order: 0;
    }

    .pres-etapes,
    .pres-grille {
        grid-template-columns: minmax(0, 1fr);
    }

    .pres section,
    .pres .pres-hero {
        padding: 3rem 1.25rem;
    }
}

@media (min-width: 901px) and (max-width: 1100px) {
    .pres-grille {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .pres-btn,
    .pres-carte,
    .pres-video-lecture,
    .pres-video-icone {
        transition: none;
    }
}

/* ------------------------------------------------------------------ */
/* Page de jeu d'un thème : fil d'Ariane et liste des dates            */
/* ------------------------------------------------------------------ */
.pres-fil {
    font-size: 0.95rem;
    color: var(--pres-gris);
    margin: 0 0 1rem;
}

.pres-fil a {
    color: var(--pres-bleu);
    text-decoration: none;
}

.pres-fil a:hover {
    text-decoration: underline;
}

.pres-fil span[aria-hidden] {
    margin: 0 0.4rem;
    color: var(--pres-gris-clair);
}

/* La liste qui porte le référencement de la page : lisible d'un coup d'œil,
   et assez dense pour qu'un thème de cent événements reste parcourable. */
.pres-dates {
    list-style: none;
    counter-reset: date;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.75rem;
}

.pres-date {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.pres-date:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.09);
    transform: translateY(-1px);
}

/* Le lien porte la grille : toute la ligne est cliquable. */
.pres-date-lien {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 1.25rem;
    align-items: baseline;
    padding: 1.1rem 1.35rem;
    text-decoration: none;
    color: inherit;
}

.pres-date-lien:hover {
    text-decoration: none;
    color: inherit;
}

.pres-date-annee {
    font-weight: 700;
    color: var(--pres-bleu);
    font-variant-numeric: tabular-nums;
}

.pres-date-corps h3 {
    font-size: 1.05rem;
    margin: 0 0 0.25rem;
    /* La couleur vient du dégradé des thèmes, posé en style sur le span interne. */
    font-weight: 700;
}

.pres-date-corps p {
    margin: 0;
    color: var(--pres-gris);
    font-size: 0.97rem;
}

.pres-apres-liste {
    margin: 2rem 0 0;
}

.pres-apres-liste a {
    color: var(--pres-bleu);
    font-weight: 600;
}

@media (max-width: 700px) {
    .pres-date-lien {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.35rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pres-date {
        transition: none;
    }
}

/* Lien vers le périmètre sur la frise : une intention secondaire, sous les preuves,
   qui ne doit pas rivaliser avec les deux boutons d'action. */
.pres-meta {
    margin: 1.25rem 0 0;
}

.pres-frise-lien {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--pres-gris);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid var(--pres-gris-clair);
    padding-bottom: 2px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.pres-frise-lien i {
    color: var(--pres-bleu);
}

.pres-frise-lien:hover {
    color: var(--pres-bleu);
    border-color: var(--pres-bleu);
    text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
    .pres-frise-lien {
        transition: none;
    }
}
