/* Clarvia – Formation offerte : lecteur vidéo (repris du widget Elementor) + porte d'accès (reprise du snippet) */
  /* ===== BLOC NORMAL ===== */
  .cfv {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(110, 90, 148, 0.15);
    box-sizing: border-box;
  }
  .cfv *, .cfv *::before, .cfv *::after { box-sizing: border-box; }

  .cfv .cfv-descs { display: none !important; }

  .cfv-stage { position: relative; }

  .cfv .cfv-frame {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    line-height: 0;
  }

  /* Ratio 16/9 par la méthode « padding-bottom » :
     fonctionne sur TOUS les navigateurs, même anciens ou avec zoom Windows. */
  .cfv .cfv-ratio {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    height: 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 0 56.25% 0 !important;
    margin: 0 !important;
    aspect-ratio: auto !important;
    overflow: hidden !important;
  }

  /* Verrouillé avec !important : certains thèmes / Elementor appliquent
     leurs propres règles aux iframes (hauteur auto, ratio, lazy-load…) */
  .cfv .cfv-ratio iframe,
  .cfv .cfv-ratio .cfv-player {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    transform: none !important;
    zoom: 1 !important;
    display: block !important;
  }

  /* ===== MASQUAGE DES BOUTONS YOUTUBE ===== */

  /* Couverture : miniature avant lecture et à la fin, voile sombre en pause */
  .cfv .cfv-cover {
    position: absolute !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #000 center / cover no-repeat;
    box-shadow: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .cfv .cfv-cover[hidden] { display: none !important; }
  .cfv .cfv-cover.is-paused {
    background-image: none !important;
    background-color: rgba(0, 0, 0, 0.45);
  }
  .cfv .cfv-cover:focus-visible { outline: 3px solid #b9a8dc; outline-offset: -3px; }

  .cfv .cfv-cover-play {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #6E5A94;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, background 0.2s ease;
  }
  .cfv .cfv-cover:hover .cfv-cover-play { transform: scale(1.08); background: #5c4a7d; }
  .cfv .cfv-cover-play svg {
    width: 30px;
    height: 30px;
    fill: #fff;
    margin-left: 4px;
  }

  /* Zones invisibles pendant la lecture (bloquent seulement les clics) */
  .cfv .cfv-shield {
    position: absolute;
    z-index: 2;
    background: transparent;
  }
  /* en haut : titre de la vidéo + « Partager » */
  .cfv .cfv-shield-top {
    top: 0;
    left: 0;
    right: 0;
    height: 18%;
  }
  /* en bas à droite : sous-titres, réglages, logo YouTube */
  .cfv .cfv-shield-br {
    right: 0;
    bottom: 0;
    width: 190px;
    height: 46px;
  }

  /* ===== DESCRIPTION BILINGUE ===== */
  .cfv .cfv-desc {
    margin-top: 18px;
    padding: 18px 20px;
    border-radius: 14px;
    background: #F1ECF8;
    text-align: center;
    transition: opacity 0.25s ease;
  }
  .cfv .cfv-desc.is-empty { display: none; }
  .cfv .cfv-desc.is-fading { opacity: 0; }

  .cfv .cfv-desc p { margin: 0; padding: 0; }

  .cfv .cfv-desc-fr {
    font-size: 17px;
    font-weight: 400;
    line-height: 1.5;
    color: #3d2f5a;
    text-align: center;
  }
  .cfv .cfv-desc-ar {
    margin-top: 6px !important;
    font-size: 19px;
    font-weight: 400;
    line-height: 1.8;
    color: #6E5A94;
    text-align: center;
    direction: rtl;
    unicode-bidi: isolate;
  }
  .cfv .cfv-desc-fr:empty,
  .cfv .cfv-desc-ar:empty { display: none; }

  /* lien d'inscription discret, style YouTube (affiché seulement pour les vidéos qui en ont un) */
  .cfv .cfv-desc-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    padding: 6px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent !important;
    color: #6E5A94 !important;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.4;
    text-decoration: none !important;
    box-shadow: none;
    transition: color 0.2s ease, background 0.2s ease;
  }
  .cfv .cfv-desc-link[hidden] { display: none !important; }
  .cfv .cfv-desc-link-text {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
  }
  .cfv .cfv-desc-link:hover { color: #3d2f5a !important; background: rgba(110, 90, 148, 0.08) !important; }
  .cfv .cfv-desc-link:focus-visible { outline: 2px solid #b9a8dc; outline-offset: 2px; }
  .cfv .cfv-desc-link strong,
  .cfv .cfv-desc-link b { font-weight: 700 !important; }

  /* ===== BARRE DE NAVIGATION ===== */
  .cfv-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
  }

  .cfv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border: none;
    border-radius: 50px;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    background: #6E5A94;
    box-shadow: 0 4px 14px rgba(110, 90, 148, 0.3);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
  }
  .cfv-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
  }
  .cfv-btn:hover { background: #5c4a7d; transform: translateY(-2px); }
  .cfv-btn:active { transform: translateY(0); }
  .cfv-btn:focus-visible { outline: 3px solid #b9a8dc; outline-offset: 3px; }
  .cfv-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
  }

  /* ===== COMPTEUR DE PARTIE ===== */
  .cfv-mid {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .cfv-count {
    display: inline-flex;
    align-items: center;
    padding: 11px 16px;
    border-radius: 50px;
    background: #F1ECF8;
    color: #6E5A94;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
  }
  /* espace garanti entre « Partie » et « 1/3 » (Elementor supprime parfois l'espace) */
  .cfv-count-label { margin-right: 5px; }

  /* ===== MODE PLEIN ÉCRAN (natif et iOS) ===== */
  .cfv-stage.is-fs {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    z-index: 2147483647;
    background: #000;
    display: flex;
    flex-direction: column;
  }
  .cfv-stage:fullscreen { width: 100%; height: 100%; }
  .cfv-stage:-webkit-full-screen { width: 100%; height: 100%; }

  .cfv .cfv-stage.is-fs .cfv-frame {
    flex: 1 1 auto;
    min-height: 0;
    border-radius: 0;
    background: #000;
    padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px);
  }
  .cfv .cfv-stage.is-fs .cfv-ratio {
    height: 100% !important;
    padding-bottom: 0 !important;
  }

  /* la description est masquée en plein écran pour laisser toute la place à la vidéo */
  .cfv .cfv-stage.is-fs .cfv-desc { display: none; }

  .cfv-stage.is-fs .cfv-bar {
    flex: 0 0 auto;
    margin: 0;
    padding: 10px max(16px, env(safe-area-inset-right, 0px)) max(10px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    background: #000;
  }
  .cfv-stage.is-fs .cfv-btn {
    padding: 10px 20px;
    font-size: 14px;
    box-shadow: none;
  }
  .cfv-stage.is-fs .cfv-btn:hover { transform: none; }
  .cfv-stage.is-fs .cfv-count {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    padding: 9px 14px;
    font-size: 13px;
  }

  @media (orientation: landscape) and (max-height: 500px) {
    .cfv-stage.is-fs .cfv-bar {
      padding-top: 6px;
      padding-bottom: max(6px, env(safe-area-inset-bottom, 0px));
    }
    .cfv-stage.is-fs .cfv-btn { padding: 8px 16px; font-size: 13px; }
    .cfv-stage.is-fs .cfv-btn svg { width: 15px; height: 15px; }
    .cfv-stage.is-fs .cfv-count { padding: 7px 12px; font-size: 12px; }
  }

  html.cfv-lock, html.cfv-lock body { overflow: hidden !important; }
  html.cfv-lock-css body {
    position: fixed !important;
    left: 0;
    right: 0;
    width: 100% !important;
  }

  /* ===== RESPONSIVE MOBILE (mode normal) ===== */
  @media (max-width: 640px) {
    .cfv { padding: 12px; margin: 0 10px; border-radius: 18px; }
    .cfv .cfv-frame { border-radius: 14px; }
    .cfv .cfv-desc { margin-top: 12px; padding: 12px 14px; border-radius: 12px; }
    .cfv .cfv-desc-fr { font-size: 15px; }
    .cfv .cfv-desc-ar { font-size: 17px; }
    .cfv .cfv-desc-link { font-size: 14px; text-align: center; }
    .cfv-bar { gap: 8px; margin-top: 14px; }
    .cfv-stage:not(.is-fs) .cfv-btn {
      flex: 1;
      padding: 12px 8px;
      font-size: 14px;
      gap: 5px;
    }
    .cfv-stage:not(.is-fs) .cfv-btn svg { width: 16px; height: 16px; }
    .cfv-stage:not(.is-fs) .cfv-fs-label { display: none; }
    .cfv-stage:not(.is-fs) .cfv-mid { flex: 1; gap: 6px; }
    .cfv-stage:not(.is-fs) .cfv-count { padding: 12px 10px; font-size: 13px; }
    .cfv-stage:not(.is-fs) .cfv-count-label { display: none; }

    .cfv .cfv-cover-play { width: 58px; height: 58px; }
    .cfv .cfv-cover-play svg { width: 24px; height: 24px; }
    .cfv .cfv-shield-br { width: 140px; height: 40px; }
  }

  @media (prefers-reduced-motion: reduce) {
    .cfv-btn, .cfv .cfv-desc, .cfv .cfv-cover-play { transition: none; }
  }

        .clarvia-fo-gate {
            min-height: 70vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 40px 20px;
            background: linear-gradient(180deg, #f8f5ff 0%, #f0ebf8 100%);
        }
        .clarvia-fo-gate-card {
            background: white;
            max-width: 420px;
            width: 100%;
            padding: 40px 32px;
            border-radius: 20px;
            box-shadow: 0 12px 40px rgba(110, 90, 148, 0.15);
            text-align: center;
        }
        .clarvia-fo-gate-logo {
            width: 56px;
            height: 56px;
            margin: 0 auto 20px;
            background: #6E5A94;
            color: white;
            font-size: 24px;
            font-weight: 700;
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .clarvia-fo-gate-card h2 {
            margin: 0 0 12px;
            font-size: 22px;
            color: #2d2a3a;
        }
        .clarvia-fo-gate-card p {
            margin: 0 0 24px;
            color: #5c5670;
            font-size: 15px;
            line-height: 1.5;
        }
        .clarvia-fo-gate-form label {
            display: block;
            text-align: left;
            font-size: 14px;
            font-weight: 600;
            margin-bottom: 6px;
            color: #3d3850;
        }
        .clarvia-fo-gate-form input[type="email"] {
            width: 100%;
            padding: 14px 16px;
            border: 1.5px solid #d8d0e8;
            border-radius: 12px;
            font-size: 16px;
            margin-bottom: 16px;
            box-sizing: border-box;
            transition: border-color 0.2s;
        }
        .clarvia-fo-gate-form input[type="email"]:focus {
            outline: none;
            border-color: #6E5A94;
        }
        .clarvia-fo-gate-form button {
            width: 100%;
            padding: 15px;
            background: #6E5A94;
            color: white;
            border: none;
            border-radius: 50px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.2s;
        }
        .clarvia-fo-gate-form button:hover {
            background: #5c4a7d;
        }
        .clarvia-fo-gate-form button:disabled {
            opacity: 0.65;
            cursor: not-allowed;
        }
        .clarvia-fo-gate-message {
            margin-top: 14px;
            font-size: 14px;
            min-height: 20px;
        }
        .clarvia-fo-gate-message.is-error {
            color: #c0392b;
        }
        .clarvia-fo-gate-message.is-success {
            color: #27ae60;
        }
        .clarvia-fo-gate-help {
            margin-top: 28px !important;
            font-size: 14px !important;
        }
        .clarvia-fo-gate-help a {
            color: #6E5A94;
            font-weight: 600;
            text-decoration: none;
        }
        .clarvia-fo-gate-help a:hover {
            text-decoration: underline;
        }
