/**
 * RL ARTTECH — Content Protection CSS
 * Complète js/content-protection.js
 *
 * - Désactive la sélection de texte sur les zones de contenu protégées
 * - Réactive explicitement la sélection sur formulaires, nav, boutons
 * - Empêche le drag visuel des images
 * - N'affecte pas l'accessibilité ni l'UX des éléments interactifs
 */

/* ============================================================
   1. DÉSACTIVATION GLOBALE DE LA SÉLECTION
      — appliquée quand le body porte la classe .cp-protected
============================================================ */
body.cp-protected {
  -webkit-user-select: none;
  -moz-user-select:    none;
  -ms-user-select:     none;
  user-select:         none;
}

/* ============================================================
   2. RÉACTIVATION sur tous les éléments interactifs
      — formulaires, navigation, boutons, liens, zones éditables
============================================================ */
body.cp-protected input,
body.cp-protected textarea,
body.cp-protected select,
body.cp-protected button,
body.cp-protected label,
body.cp-protected a,
body.cp-protected nav,
body.cp-protected .nav-menu,
body.cp-protected .header,
body.cp-protected .footer,
body.cp-protected .btn,
body.cp-protected .modal,
body.cp-protected .rdv-form,
body.cp-protected form,
body.cp-protected [contenteditable="true"],
body.cp-protected [role="textbox"],
body.cp-protected [tabindex] {
  -webkit-user-select: text;
  -moz-user-select:    text;
  -ms-user-select:     text;
  user-select:         text;
}

/* Boutons et liens restent cliquables (pas de sélection de texte, mais cliquables) */
body.cp-protected button,
body.cp-protected .btn,
body.cp-protected a {
  -webkit-user-select: none;
  -moz-user-select:    none;
  user-select:         none;
  cursor: pointer;
}

/* ============================================================
   3. BLOCAGE DU DRAG VISUEL DES IMAGES
============================================================ */
body.cp-protected img {
  -webkit-user-drag: none;
  -khtml-user-drag:  none;
  -moz-user-drag:    none;
  -o-user-drag:      none;
  user-drag:         none;
  pointer-events:    none; /* L'overlay JS gère les événements */
}

/* L'overlay transparent au-dessus des images reçoit les clics */
.cp-img-wrap {
  position: relative;
  display: inline-block;
  line-height: 0;
  width: 100%;
}

.cp-img-wrap img {
  display: block;
  width: 100%;
}

.cp-img-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: transparent;
  cursor: default;
  -webkit-user-select: none;
  user-select: none;
}

/* ============================================================
   4. MOBILE — long-press prevention (iOS / Android)
============================================================ */
body.cp-protected img,
body.cp-protected .insta-photo-item,
body.cp-protected .projet-card,
body.cp-protected .service-card,
body.cp-protected .gallery-item {
  -webkit-touch-callout: none;
}
