/* =========================================================
   APPRIM — Page d'accueil (Fabrique d'Intelligence Visuelle)
   Reprend la charte apprim.fr : bleu nuit #1f1d86, bleu électrique #2851d6,
   gris clair #f7f6f6, Helvetica Neue. Aucun vert.
   ========================================================= */

:root {
    --navy: #1f1d86;
    --electric: #2851d6;
    --electric-light: #4f7bff;
    --ink: #1f1d86;
    --text: #2b2a5e;
    --muted: #5b5b7a;
    --light: #f7f6f6;
    --line: #e4e4ef;
    --white: #ffffff;
    --radius: 14px;
    --shadow: 0 6px 20px rgba(31, 29, 134, 0.10);
    --shadow-hover: 0 14px 34px rgba(31, 29, 134, 0.18);
    --header-h: 80px;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 10px); }
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--electric); }

.container { width: 90%; max-width: 1180px; margin: 0 auto; }

.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--white); color: var(--navy); padding: 8px 14px; z-index: 3000;
}
.skip-link:focus { left: 10px; top: 10px; }

:focus-visible { outline: 3px solid var(--electric-light); outline-offset: 2px; }

/* ---------------------------------------------------------
   HEADER
   --------------------------------------------------------- */
.main-header {
    height: var(--header-h);
    background: var(--navy);
    color: var(--white);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.25);
}

.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
}

/* Logo + menu déroulant */
.logo-wrapper { position: relative; display: flex; align-items: center; }

.logo-link {
    display: flex;
    align-items: center;
    gap: 14px;
    background: none;
    border: 0;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    padding: 5px 10px 5px 5px;
    border-radius: 8px;
    transition: background 0.3s;
}
.logo-link:hover, .logo-wrapper.open .logo-link { background: rgba(255, 255, 255, 0.1); }

.header-logo { height: 50px; width: auto; }

.header-text-group { display: flex; flex-direction: column; }

.header-title {
    font-size: 1.05rem;
    font-weight: bold;
    letter-spacing: 0.12rem;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 6px;
}
.header-title .chevron { font-size: 0.6rem; opacity: 0.8; transition: transform 0.3s; }
.logo-wrapper.open .chevron { transform: rotate(180deg); }

/* APplication PResentation IMmersive : lettres du nom mises en valeur */
.header-subtitle {
    font-size: 0.68rem;
    line-height: 1.2;
    letter-spacing: 0.02rem;
    color: rgba(255, 255, 255, 0.78);
    white-space: nowrap;
}
.header-subtitle b { color: var(--white); font-weight: bold; }

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(var(--header-h) - 8px);
    left: 0;
    width: 290px;
    max-width: 92vw;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    border: 1px solid var(--electric);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    flex-direction: column;
    z-index: 2000;
}
.dropdown-menu.active { display: flex; animation: fadeInDown 0.25s ease-out; }

.dropdown-menu a {
    padding: 11px 20px;
    text-decoration: none;
    color: var(--navy);
    font-weight: 500;
    font-size: 0.92rem;
    border-bottom: 1px solid #f0f0f5;
    transition: background 0.2s, color 0.2s;
}
.dropdown-menu a:hover { background: var(--light); color: var(--electric); }
.dropdown-menu .dd-label {
    padding: 10px 20px 4px;
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    color: var(--muted);
    background: var(--light);
}
.dropdown-menu .dd-app { padding-left: 32px; font-size: 0.88rem; }
.dropdown-menu .dd-app::after { content: " ↗"; font-size: 0.75rem; opacity: 0.6; }

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Navigation principale (desktop) */
.main-nav { display: flex; align-items: center; gap: 4px; }

.nav-link {
    position: relative;
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    background: none;
    border: 0;
    font-family: inherit;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--white); background: rgba(255, 255, 255, 0.08); }
.nav-link[aria-current="page"]::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px;
    height: 2px; background: var(--electric-light); border-radius: 2px;
}

.nav-apps { position: relative; }
.nav-apps .chevron { font-size: 0.6rem; margin-left: 4px; display: inline-block; transition: transform 0.3s; }
.nav-apps.open .chevron { transform: rotate(180deg); }

.apps-menu {
    display: none;
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%);
    width: 330px;
    background: var(--white);
    border-radius: 10px;
    border: 1px solid var(--electric);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
    padding: 8px;
    z-index: 2000;
}
.nav-apps.open .apps-menu { display: block; animation: fadeInDown 0.25s ease-out; }

.apps-menu a {
    display: block;
    padding: 9px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--navy);
}
.apps-menu a:hover { background: var(--light); }
.apps-menu strong { display: block; font-size: 0.9rem; letter-spacing: 0.04rem; }
.apps-menu strong::after { content: " ↗"; font-weight: normal; font-size: 0.75rem; color: var(--electric); }
.apps-menu span { display: block; font-size: 0.8rem; color: var(--muted); line-height: 1.35; }
.apps-menu .apps-all {
    margin-top: 4px;
    border-top: 1px solid var(--line);
    border-radius: 0 0 6px 6px;
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--electric);
    text-align: center;
}

/* Sélecteur de langue */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 8px;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: bold;
}
.lang-switch a, .lang-switch span {
    padding: 3px 9px;
    border-radius: 14px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
}
.lang-switch a:hover { color: var(--white); }
.lang-switch .is-active { background: var(--white); color: var(--navy); }

.header-actions { display: flex; align-items: center; gap: 12px; }

/* Bouton Nous contacter */
.cta-header {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--electric);
    color: var(--white);
    padding: 10px 18px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.92rem;
    white-space: nowrap;
    box-shadow: 0 0 0 0 rgba(79, 123, 255, 0.6);
    transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
}
.cta-header:hover {
    background: var(--electric-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(40, 81, 214, 0.55);
}
.cta-header .cta-icon { font-size: 1rem; line-height: 1; }

.lang-switch.mobile-only { display: none; }

/* ---------------------------------------------------------
   HERO
   --------------------------------------------------------- */
.hero {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background:
        radial-gradient(1000px 500px at 85% 20%, rgba(79, 123, 255, 0.45), transparent 60%),
        radial-gradient(700px 400px at 10% 110%, rgba(40, 81, 214, 0.55), transparent 60%),
        linear-gradient(135deg, #15135f 0%, var(--navy) 55%, #22209a 100%);
    padding: 80px 0 90px;
}
/* trame "grille 3D" discrète */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
    pointer-events: none;
}

.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 50px;
    align-items: center;
}

.eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: bold;
    letter-spacing: 0.14rem;
    text-transform: uppercase;
    color: #b9c8ff;
    margin-bottom: 16px;
}

.hero h1 {
    font-size: clamp(2.1rem, 4.6vw, 3.4rem);
    line-height: 1.1;
    font-weight: bold;
    margin-bottom: 22px;
    letter-spacing: -0.01em;
}
.hero h1 em { font-style: normal; color: #9fb6ff; }

/* Devise animée : "Visualiser pour mieux ___" */
.hero-motto {
    font-size: clamp(1.25rem, 2.4vw, 1.7rem);
    font-weight: bold;
    line-height: 1.3;
    margin: -6px 0 18px;
    color: var(--white);
}
.motto-rotator {
    display: inline-block;
    color: #9fb6ff;
    border-bottom: 3px solid var(--electric-light);
    padding-bottom: 1px;
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.motto-rotator.is-out { opacity: 0; transform: translateY(8px); }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.hero-lead {
    font-size: 1.12rem;
    color: rgba(255, 255, 255, 0.88);
    max-width: 620px;
    margin-bottom: 30px;
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 0.98rem;
    text-decoration: none;
    font-family: inherit;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background 0.3s, color 0.3s, transform 0.2s, box-shadow 0.3s;
}
.btn-primary { background: var(--white); color: var(--navy); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.55); color: var(--white); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--white); }

/* Carte comparative IA / IV */
.hero-compare {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    padding: 26px;
    backdrop-filter: blur(6px);
}
.compare-row {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 16px;
    align-items: center;
    padding: 16px 0;
}
.compare-row + .compare-row { border-top: 1px dashed rgba(255, 255, 255, 0.22); }
.compare-badge {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
    font-weight: bold;
    font-size: 1.35rem;
    letter-spacing: 0.05rem;
}
/* Le "A" de IA est un "V" retourné : IV le remet à l'endroit */
.v-glyph { display: inline-block; line-height: 1; }
.v-glyph.is-flipped { transform: rotate(180deg); }
.v-glyph.v-turn { animation: vTurn 1s cubic-bezier(.6,.0,.3,1.4) 0.8s both; }
@keyframes vTurn { from { transform: rotate(180deg); } to { transform: rotate(0deg); } }
.hero-compare:hover .v-glyph.v-turn { animation: vTurn 0.9s cubic-bezier(.6,.0,.3,1.4) both; }
.compare-row.ia .compare-badge { background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.6); }
.compare-row.iv .compare-badge { background: var(--white); color: var(--navy); box-shadow: 0 0 0 4px rgba(159, 182, 255, 0.35); }
.compare-row small {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}
.compare-row p { margin: 2px 0 0; font-size: 0.98rem; line-height: 1.4; }
.compare-row.ia p { color: rgba(255, 255, 255, 0.7); }
.compare-row.iv p { color: var(--white); font-weight: bold; }
.compare-foot {
    margin-top: 10px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.65);
}

/* ---------------------------------------------------------
   SECTIONS
   --------------------------------------------------------- */
.section { padding: 80px 0; }
.section.light { background: var(--light); }

.section-head { max-width: 760px; margin: 0 auto 44px; text-align: center; }
.section-kicker {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: bold;
    letter-spacing: 0.14rem;
    text-transform: uppercase;
    color: var(--electric);
    margin-bottom: 10px;
}
.section-head h2 {
    color: var(--navy);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    line-height: 1.2;
    margin-bottom: 14px;
}
.section-head p { color: var(--muted); font-size: 1.05rem; }

/* ---------------------------------------------------------
   TUILES APPLICATIONS (5)
   --------------------------------------------------------- */
.apps-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px;
}

.app-card {
    flex: 0 1 calc((100% - 56px) / 3);
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.app-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }

.app-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    /* fond de secours si l'image n'est pas encore en place */
    background: linear-gradient(135deg, var(--navy), var(--electric));
}
.app-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.app-card:hover .app-media img { transform: scale(1.01); }

.app-num {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.95);
    color: var(--navy);
    font-weight: bold;
    font-size: 0.9rem;
}
.app-tag {
    position: absolute;
    bottom: 12px;
    right: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    padding: 4px 11px;
    border-radius: 20px;
    background: var(--navy);
    color: var(--white);
    font-size: 0.72rem;
    font-weight: bold;
    letter-spacing: 0.05rem;
}

.app-body { display: flex; flex-direction: column; flex: 1; padding: 22px 22px 24px; }
.app-verb {
    font-size: 0.74rem;
    letter-spacing: 0.08rem;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}
.app-verb b { color: var(--electric); }
.app-body h3 {
    color: var(--navy);
    font-size: 1.2rem;
    letter-spacing: 0.06rem;
    line-height: 1.25;
}
.app-catch {
    color: var(--electric);
    font-weight: bold;
    font-size: 0.98rem;
    line-height: 1.35;
    margin: 6px 0 10px;
}
.app-desc { color: var(--muted); font-size: 0.93rem; margin-bottom: 20px; flex: 1; }

.btn-discover {
    align-self: flex-start;
    background: var(--navy);
    color: var(--white);
    padding: 11px 22px;
    font-size: 0.85rem;
    letter-spacing: 0.1rem;
}
.btn-discover:hover { background: var(--electric); transform: translateY(-2px); }
.btn-discover .arrow { transition: transform 0.25s; }
.btn-discover:hover .arrow { transform: translate(2px, -2px); }

/* ---------------------------------------------------------
   SAVOIR-FAIRE
   --------------------------------------------------------- */
.pillars {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.pillar {
    background: var(--white);
    border-radius: var(--radius);
    padding: 26px 22px;
    border: 1px solid var(--line);
    border-top: 4px solid var(--electric);
}
.pillar-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: #eef2ff;
    color: var(--electric);
    display: grid;
    place-items: center;
    margin-bottom: 16px;
}
.pillar-icon svg { width: 24px; height: 24px; }
.pillar h3 { color: var(--navy); font-size: 1.08rem; margin-bottom: 8px; }
.pillar p { color: var(--muted); font-size: 0.93rem; margin: 0; }

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 44px;
    padding: 30px;
    border-radius: var(--radius);
    background: var(--navy);
    color: var(--white);
    text-align: center;
}
.stat strong { display: block; font-size: 2.2rem; line-height: 1.1; color: #9fb6ff; }
.stat span { font-size: 0.92rem; color: rgba(255, 255, 255, 0.85); }

/* ---------------------------------------------------------
   AIDE / FAQ
   --------------------------------------------------------- */
.faq-list { max-width: 860px; margin: 0 auto; }
.faq-list details {
    background: var(--white);
    margin-bottom: 12px;
    padding: 16px 20px;
    border-radius: 10px;
    border: 1px solid var(--line);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: bold;
    color: var(--navy);
    cursor: pointer;
}
.faq-list summary::before { content: '▶'; font-size: 0.7rem; color: var(--electric); transition: transform 0.3s; }
.faq-list details[open] summary::before { transform: rotate(90deg); }
.faq-list p { margin: 10px 0 0; color: var(--muted); }

/* ---------------------------------------------------------
   CONTACT (Tally)
   --------------------------------------------------------- */
.contact-box {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 44px 30px;
    box-shadow: var(--shadow);
}
.contact-box h2 { color: var(--navy); font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 12px; }
.contact-box p { color: var(--muted); max-width: 620px; margin: 0 auto 26px; }

.cta-tally-modal {
    width: 560px;
    max-width: 100%;
    background: var(--navy);
    color: var(--white);
    border: none;
    padding: 16px 10px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    font-family: inherit;
    transition: background 0.3s, transform 0.2s;
}
.cta-tally-modal:hover { background: var(--electric); transform: translateY(-2px); }
.contact-note { margin-top: 14px; font-size: 0.85rem; color: var(--muted); }

/* ---------------------------------------------------------
   FOOTER
   --------------------------------------------------------- */
.footer { background: var(--navy); color: rgba(255, 255, 255, 0.8); padding: 50px 0 26px; font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-brand img { height: 46px; width: auto; }
.footer-brand strong { color: var(--white); letter-spacing: 0.1rem; font-size: 1.05rem; }
.footer-brand p { margin: 4px 0 0; font-size: 0.85rem; }
.footer-brand em { color: #b9c8ff; }
.footer h4 {
    color: var(--white);
    font-size: 0.78rem;
    letter-spacing: 0.12rem;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.footer ul { list-style: none; }
.footer li { margin-bottom: 6px; }
.footer a { color: rgba(255, 255, 255, 0.8); text-decoration: none; }
.footer a:hover { color: var(--white); text-decoration: underline; }
.footer-bottom {
    margin-top: 36px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.82rem;
}

/* Retour en haut */
#backToTop {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1100;
    width: 45px;
    height: 45px;
    background: var(--electric);
    color: var(--white);
    text-decoration: none;
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}
#backToTop:hover { background: var(--navy); transform: translateY(-3px); }

/* ---------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------- */
@media (max-width: 1100px) {
    .nav-link { padding: 8px 9px; font-size: 0.9rem; }
    .pillars { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 980px) {
    .hero-grid { grid-template-columns: 1fr; gap: 36px; }
    .hero-compare { max-width: 560px; }
    .app-card { flex-basis: calc((100% - 28px) / 2); }
}

/* Mobile / tablette portrait : la nav passe dans le menu du logo */
@media (max-width: 860px) {
    :root { --header-h: 70px; }
    .main-nav { display: none; }
    .lang-switch.mobile-only { display: flex; margin-left: 0; }
    .header-logo { height: 40px; }
    .header-title { font-size: 0.95rem; }
    .header-subtitle { font-size: 0.6rem; }
    .cta-header .cta-label { display: none; }
    .cta-header { padding: 10px 12px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
    .container { width: 92%; }
    .section { padding: 56px 0; }
    .hero { padding: 54px 0 60px; }
    .hero-ctas .btn { flex: 1 1 100%; }
    .app-card { flex-basis: 100%; }
    .pillars { grid-template-columns: 1fr; }
    .stats { grid-template-columns: 1fr; gap: 18px; }
    .header-subtitle { font-size: 0.56rem; white-space: normal; max-width: 120px; }
    .logo-link { gap: 10px; }
    .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
    .header-actions { gap: 6px; }
    .lang-switch a, .lang-switch span { padding: 3px 6px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}

/* Visuel de secours tant que l'image de la tuile n'est pas fournie */
.app-media[data-name]::before {
    content: attr(data-name);
    position: absolute; inset: 0;
    display: grid; place-items: center;
    color: rgba(255, 255, 255, 0.92);
    font-weight: bold; font-size: 1.5rem; letter-spacing: 0.12rem;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 28px 28px;
}
.app-media img { position: relative; z-index: 1; }
.app-media img.is-missing { display: none; }
.app-num, .app-tag { z-index: 2; }

/* ---------------------------------------------------------
   PAGE MENTIONS LÉGALES
   --------------------------------------------------------- */
.legal { max-width: 860px; }
.legal .breadcrumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 18px; }
.legal .breadcrumb a { color: var(--electric); text-decoration: none; }
.legal h1 { color: var(--navy); font-size: clamp(1.7rem, 3vw, 2.2rem); margin-bottom: 26px; }
.legal h2 { color: var(--navy); font-size: 1.2rem; margin: 30px 0 10px; padding-top: 6px; border-top: 1px solid var(--line); }
.legal p { margin-bottom: 12px; color: var(--text); }
.legal code { background: #eef2ff; color: var(--navy); padding: 1px 6px; border-radius: 4px; font-size: 0.9em; }

/* ---------------------------------------------------------
   TUILES APPLICATIONS — fond sombre, assorti au liseré des images (#2b2b2b)
   --------------------------------------------------------- */
.app-card {
    --card-bg: #2b2b2b;
    background: var(--card-bg);
    border-color: var(--card-bg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.app-card:hover { box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28); }
.app-media { background: var(--card-bg); }
.app-media[data-name]::before { background-color: var(--card-bg); }
.app-verb { color: rgba(255, 255, 255, 0.55); }
.app-verb b { color: #9fb6ff; }
.app-body h3 { color: var(--white); }
.app-catch { color: #9fb6ff; }
.app-desc { color: rgba(255, 255, 255, 0.72); }
.btn-discover { background: var(--electric); color: var(--white); }
.btn-discover:hover { background: var(--electric-light); box-shadow: 0 6px 18px rgba(40, 81, 214, 0.45); }
.app-card :focus-visible { outline-color: #9fb6ff; }
/* Numéro de l'application : sorti de l'image (qui a son propre en-tête) et placé dans le texte */
.apps-grid { counter-reset: app; }
.app-card { counter-increment: app; }
.app-media .app-num { display: none; }
.app-body { position: relative; }
.app-body::before {
    content: counter(app);
    position: absolute; top: 18px; right: 18px;
    width: 30px; height: 30px; border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.85); font-weight: bold; font-size: 0.85rem;
}
.app-verb, .app-body h3 { padding-right: 40px; }
