/* ======================================================================
   KINDRED — MON COMPTE
   CONNEXION ET INSCRIPTION

   Styles de la page Mon compte lorsque l'utilisateur est déconnecté.
   Desktop, tablette et mobile.
   ====================================================================== */


/* =========================================================
   1. CADRE GLOBAL
   ========================================================= */

/* Cadre crème englobant le titre "Mon compte" + les deux colonnes,
   cohérent avec le cadre de la page de confirmation de commande */
body.woocommerce-account:not(.logged-in)
.woocommerce {
  max-width: 1180px !important;
  margin: 0 auto !important;
  padding: 2.5em 1.5em !important;
  background: #FBFAF7 !important;
  /*border: 1px solid #DDD6CD !important;*/
  border-radius: 16px !important;
  box-sizing: border-box !important;
}

/* Fond de page (derrière le cadre), légèrement plus foncé pour
   que le cadre ressorte visuellement */
body.woocommerce-account:not(.logged-in)
.kindred-account-section {
  background-color: #F6F3EE !important;
}


/* =========================================================
   2. TITRE DE PAGE "MON COMPTE"
   Généré en CSS pur (pas de module Divi sur cette page WooCommerce)
   ========================================================= */

body.woocommerce-account:not(.logged-in)
.woocommerce::before {
  content: "Mon compte";
  display: block !important;
  text-align: left !important;
  margin: 0 0 40px !important;
  color: #1F1F1F !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-size: 40px !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
}


/* =========================================================
   3. TITRES ET PHRASES D'INTRODUCTION DES COLONNES
   ========================================================= */

/* Titres « Se connecter » et « S'inscrire »
   position: relative sert d'ancrage pour la barre verticale
   générée juste en dessous (::before) */
.kindred-my-account
.woocommerce
.u-column1 > h2,
.kindred-my-account
.woocommerce
.u-column2 > h2 {
  position: relative !important;
  margin: 0 0 6px !important;
  padding-left: 14px !important;
  border-left: none !important;
  color: #1F1F1F !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 26px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
}

/* Barre verticale à gauche des titres, couvrant toute la hauteur
   (titre + sous-titre), positionnée en absolu plutôt qu'en bordure
   pour ne pas dépendre de la hauteur totale de la boîte h2 */
.kindred-my-account
.woocommerce
.u-column1 > h2::before,
.kindred-my-account
.woocommerce
.u-column2 > h2::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  top: 3px !important;
  width: 4px !important;
  height: 55% !important;
  background-color: #1F1F1F !important;
}

/* Introduction sous « Se connecter » */
.kindred-my-account
.woocommerce
.u-column1 > h2::after {
  content: "Suivez vos commandes et gérez vos informations.";
}

/* Introduction sous « S'inscrire » */
.kindred-my-account
.woocommerce
.u-column2 > h2::after {
  content: "Créez votre compte pour suivre vos achats.";
}

/* Style commun des deux introductions */
.kindred-my-account
.woocommerce
.u-column1 > h2::after,
.kindred-my-account
.woocommerce
.u-column2 > h2::after {
  display: block !important;
  margin: 8px 0 32px !important;
  color: #6F675E !important;
  font-family: Arial, sans-serif !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  line-height: 1.45 !important;
  letter-spacing: 0 !important;
}


/* =========================================================
   4. CARTES DES FORMULAIRES
   Version épurée : pas de bordure, pas de fond, pas d'ombre.
   Juste l'espacement qui structure la page.
   ========================================================= */

.kindred-my-account
.woocommerce form.login,
.kindred-my-account
.woocommerce form.register {
  margin: 0 !important;
  padding: 0 !important;
  background-color: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}


/* =========================================================
   5. CHAMPS DE CONNEXION ET D'INSCRIPTION
   ========================================================= */

/* Identifiant, adresse e-mail et mot de passe — apparence commune */
body.woocommerce-account
.kindred-my-account
#customer_login input[type="text"],
body.woocommerce-account
.kindred-my-account
#customer_login input[type="email"],
body.woocommerce-account
.kindred-my-account
#customer_login input[type="password"] {
  width: 100% !important;
  height: 48px !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 11px 14px !important;
  background-color: #FFFFFF !important;
  background-image: none !important;
  border: 1px solid #EAE4DA !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  color: #1F1F1F !important;
  font-size: 18px !important;
  line-height: 1.4 !important;
  box-sizing: border-box !important;
}

/* État actif (focus) des champs */
body.woocommerce-account
.kindred-my-account
#customer_login input[type="text"]:focus,
body.woocommerce-account
.kindred-my-account
#customer_login input[type="email"]:focus,
body.woocommerce-account
.kindred-my-account
#customer_login input[type="password"]:focus {
  background-color: #FFFFFF !important;
  border-color: #1F1F1F !important;
  outline: none !important;
  box-shadow: none !important;
}

/* Neutraliser la couleur de fond automatique du navigateur
   (autofill Chrome/Safari qui colore les champs en jaune/bleu) */
body.woocommerce-account
.kindred-my-account
#customer_login input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #FFFFFF inset !important;
  -webkit-text-fill-color: #1F1F1F !important;
}



/* =========================================================
   6. LIBELLÉS ET ESPACEMENT DES LIGNES
   ========================================================= */

/* Espacement entre chaque ligne du formulaire (label + champ) */
.kindred-my-account
.woocommerce form .form-row {
  margin: 0 0 22px !important;
  padding: 0 !important;
}

/* Libellés des champs ("Identifiant ou e-mail", "Mot de passe", etc.) */
.kindred-my-account
.woocommerce form label {
  display: block !important;
  margin-bottom: 8px !important;
  color: red !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
}


/* =========================================================
   7. FORMULAIRE DE CONNEXION
   ========================================================= */

/* Placer le bouton "Se connecter" avant "Se souvenir de moi"
   (inversion de l'ordre naturel du HTML via flex column-reverse) */
.kindred-my-account
.woocommerce form.login
> p.form-row:not(.form-row-wide) {
  display: flex !important;
  flex-direction: column-reverse !important;
  align-items: stretch !important;
  gap: 12px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Neutraliser le clearfix natif de WooCommerce sur cette ligne */
.kindred-my-account
.woocommerce form.login
> p.form-row:not(.form-row-wide)::before,
.kindred-my-account
.woocommerce form.login
> p.form-row:not(.form-row-wide)::after {
  display: none !important;
  content: none !important;
}

/* Bouton "Se connecter" en pleine largeur */
.kindred-my-account
.woocommerce form.login
.woocommerce-form-login__submit {
  width: 100% !important;
  margin: 0 !important;
  float: none !important;
}

/* "Se souvenir de moi" aligné à gauche, sous le bouton */
.kindred-my-account
.woocommerce form.login
.woocommerce-form-login__rememberme {
  align-self: flex-start !important;
  margin: 0 !important;
}


/* =========================================================
   8. BOUTONS "SE CONNECTER" ET "S'INSCRIRE"
   Règle générique : s'applique aux deux boutons en même temps,
   et à tous les boutons de l'espace "Mon compte" en général.
   ========================================================= */

.kindred-my-account
.woocommerce button.button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 48px !important;
  min-height: 48px !important;
  padding: 0 24px !important;
  background-color: #1F1F1F !important;
  border: 1px solid #1F1F1F !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  color: #FCF5EC !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  cursor: pointer !important;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease !important;
}

/* Survol des boutons */
.kindred-my-account
.woocommerce button.button:hover {
  background-color: #333333 !important;
  border-color: #333333 !important;
  color: #FCF5EC !important;
  transform: translateY(-1px) !important;
}

/* Neutraliser les pseudo-éléments automatiques ajoutés par Divi
   (icônes/flèches injectées sur les boutons, non désirées ici) */
body.woocommerce-account
.kindred-my-account
.woocommerce button.button::before,
body.woocommerce-account
.kindred-my-account
.woocommerce button.button::after,
body.woocommerce-account
.kindred-my-account
.woocommerce button.button:hover::before,
body.woocommerce-account
.kindred-my-account
.woocommerce button.button:hover::after {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  content: none !important;
  opacity: 0 !important;
}

/* Empêcher Divi de réserver un espace pour une icône de fond */
body.woocommerce-account
.kindred-my-account
.woocommerce button.button,
body.woocommerce-account
.kindred-my-account
.woocommerce button.button:hover,
body.woocommerce-account
.kindred-my-account
.woocommerce button.button:focus {
  background-image: none !important;
}


/* =========================================================
   9. CASE « SE SOUVENIR DE MOI »
   ========================================================= */

/* Ligne complète : case à cocher + texte */
body.woocommerce-account
.kindred-my-account
label.woocommerce-form__label-for-checkbox {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 !important;
  color: #6F675E !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  cursor: pointer !important;
}

/* Case à cocher personnalisée (état par défaut, non cochée) */
body.woocommerce-account
.kindred-my-account
input.woocommerce-form__input-checkbox {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  margin: 0 !important;
  background-color: #FFFFFF !important;
  border: 1px solid #9A9289 !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

/* Case cochée : fond noir + coche SVG intégrée en data-URI */
body.woocommerce-account
.kindred-my-account
input.woocommerce-form__input-checkbox:checked {
  background-color: #1F1F1F !important;
  border-color: #1F1F1F !important;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23FCF5EC' stroke-width='2' d='M3.5 8.2 6.5 11 12.5 4.8'/%3E%3C/svg%3E") !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: 13px 13px !important;
}

/* Focus clavier (accessibilité, navigation au Tab) */
body.woocommerce-account
.kindred-my-account
input.woocommerce-form__input-checkbox:focus {
  outline: 1px solid #1F1F1F !important;
  outline-offset: 2px !important;
}


/* =========================================================
   10. LIEN « MOT DE PASSE PERDU ? »
   ========================================================= */

/* Position du lien : pleine largeur, sur sa propre ligne */
.kindred-my-account
.woocommerce form.login
p.woocommerce-LostPassword,
.kindred-my-account
.woocommerce form.login
p.lost_password {
  display: block !important;
  position: static !important;
  float: none !important;
  clear: both !important;
  width: 100% !important;
  margin: 14px 0 0 !important;
  padding: 0 !important;
}

/* Ancienne variante du conteneur, selon la version de WooCommerce */
.kindred-my-account
.woocommerce-LostPassword {
  margin: 12px 0 0 !important;
  padding: 0 !important;
}

/* Style du lien lui-même */
.kindred-my-account
.woocommerce form.login
p.woocommerce-LostPassword a,
.kindred-my-account
.woocommerce form.login
p.lost_password a {
  color: #6F675E !important;
  text-decoration: underline !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 3px !important;
  transition: color 0.2s ease !important;
}

/* Survol du lien */
.kindred-my-account
.woocommerce form.login
p.woocommerce-LostPassword a:hover,
.kindred-my-account
.woocommerce form.login
p.lost_password a:hover {
  color: #1F1F1F !important;
}


/* =========================================================
   11. FORMULAIRE D'INSCRIPTION
   ========================================================= */

/* Permettre le réordonnancement des éléments via flex + order */
.kindred-my-account
.woocommerce form.register {
  display: flex !important;
  flex-direction: column !important;
}

/* Ligne contenant le bouton « S'inscrire » : placée en 1ère position */
.kindred-my-account
.woocommerce form.register
p.form-row:last-of-type {
  order: 1 !important;
  margin-bottom: 0 !important;
}

/* Mention de confidentialité : placée juste après le bouton (2e position) */
.kindred-my-account
.woocommerce form.register
.woocommerce-privacy-policy-text {
  order: 2 !important;
  margin: 14px 0 0 !important;
  padding-bottom: 0 !important;
}


/* =========================================================
   12. TEXTE DE CONFIDENTIALITÉ
   ========================================================= */

.kindred-my-account
.woocommerce-privacy-policy-text {
  padding-bottom: 12px !important;
  color: #6F675E !important;
  font-size: 15px !important;
  line-height: 1.3 !important;
}

/* Lien vers la politique de confidentialité, dans le texte */
.kindred-my-account
.woocommerce-privacy-policy-text a {
  color: #1F1F1F !important;
  font-size: inherit !important;
  font-weight: 400 !important;
  text-decoration: underline !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 3px !important;
  transition: color 0.2s ease !important;
}

/* Survol du lien */
.kindred-my-account
.woocommerce-privacy-policy-text a:hover {
  color: #6F675E !important;
}

/* État "chargement" du bouton, une fois désactivé par le JS */
.kindred-my-account
.woocommerce button.button:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

/* =========================================================
   MOT DE PASSE PERDU
   Le champ hérite par défaut de "form-row-first" (WooCommerce),
   pensé pour un formulaire à deux colonnes — ici il n'y a
   qu'un seul champ, donc on le repasse en pleine largeur.
   ========================================================= */

body.woocommerce-lost-password
.woocommerce-ResetPassword
.form-row {
  width: 100% !important;
  float: none !important;
}

body.woocommerce-lost-password
.woocommerce-ResetPassword
input.woocommerce-Input {
  width: 100% !important;
  height: 48px !important;
  padding: 11px 14px !important;
  background-color: #FFFFFF !important;
  border: 1px solid #EAE4DA !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  color: #1F1F1F !important;
  font-size: 16px !important;
  line-height: 1.4 !important;
  box-sizing: border-box !important;
}

body.woocommerce-lost-password
.woocommerce-ResetPassword
input.woocommerce-Input:focus {
  border-color: #1F1F1F !important;
  outline: none !important;
}

/* Bouton "Réinitialisation du mot de passe" */
body.woocommerce-lost-password
.woocommerce-ResetPassword
button.woocommerce-Button {
  width: 100% !important;
  height: 48px !important;
  margin-top: 8px !important;
  background-color: #1F1F1F !important;
  border: 1px solid #1F1F1F !important;
  border-radius: 8px !important;
  color: #FCF5EC !important;
  font-size: 16px !important;
  font-weight: 400 !important;
}

body.woocommerce-lost-password
.woocommerce-ResetPassword
button.woocommerce-Button:hover {
  background-color: #333333 !important;
  border-color: #333333 !important;
}

/* =========================================================
   13. VERSION DESKTOP — À partir de 981 px
   ========================================================= */

@media (min-width: 981px) {

  /* Centrer verticalement la page dans l'écran lorsque
     le client est déconnecté (évite un formulaire collé en haut
     sur les grands écrans) */
  body.woocommerce-account:not(.logged-in)
  .kindred-account-section {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    min-height: calc(100vh - 290px) !important;
    box-sizing: border-box !important;
  }

  /* Colonnes Connexion et Inscription en grille 2 colonnes égales
     (valeur remplacée plus bas par la version asymétrique) */
  .kindred-my-account
  .woocommerce
  .u-columns {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 56px !important;
    align-items: start !important;
  }

  /* Neutraliser les largeurs/flottants imposés par défaut par WooCommerce */
  .kindred-my-account
  .woocommerce
  .u-column1,
  .kindred-my-account
  .woocommerce
  .u-column2 {
    display: flex !important;
    flex-direction: column !important;
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
  }

  /* Supprimer le clearfix natif de WooCommerce sur le conteneur */
  .kindred-my-account
  .woocommerce
  .u-columns::before,
  .kindred-my-account
  .woocommerce
  .u-columns::after {
    display: none !important;
    content: none !important;
  }

  /* Connexion à gauche */
  .kindred-my-account
  .woocommerce
  .u-column1 {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  /* Inscription à droite */
  .kindred-my-account
  .woocommerce
  .u-column2 {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  /* Colonnes asymétriques : "Se connecter" mis en avant par la largeur
     plutôt que par la couleur (cohérent avec le design épuré).
     Cette règle vient après la grille 1fr/1fr ci-dessus et la remplace
     (même propriété grid-template-columns, valeur différente). */
  .kindred-my-account
  .woocommerce
  .u-columns {
    display: grid !important;
    grid-template-columns: 1.3fr 1fr !important;
    gap: 72px !important;
    align-items: start !important;
  }

}


/* =========================================================
   14. VERSION TABLETTE — De 768 px à 980 px
   ========================================================= */

@media (min-width: 768px) and (max-width: 980px) {

/* Séparation visuelle entre "Se connecter" et "S'inscrire" empilés */
body.woocommerce-account
.kindred-my-account
.woocommerce
.u-column2 {
  margin-top: 40px !important;
  padding-top: 32px !important;
  border-top: 1px solid #DDD6CD !important;
}	
	
  /* Espacement avant le bloc "S'inscrire" une fois les colonnes
     empilées verticalement (pas de grille à cette taille d'écran) */
  body.woocommerce-account
  .kindred-my-account
  .woocommerce
  .u-column2 {
    margin-top: 28px !important;
  }

}


/* =========================================================
   15. VERSION MOBILE — Jusqu'à 767 px
   ========================================================= */

@media (max-width: 767px) {

	
/* Cadre plus compact sur mobile */
body.woocommerce-account:not(.logged-in)
.woocommerce {
  padding: 2em 1em !important;
  border-radius: 0 !important;
  border: 0 !important;
}
	
/* Remplacer height: 55% par height: 100% dans la section 3 (base, pas dans une media query) */
.kindred-my-account
.woocommerce
.u-column1 > h2::before,
.kindred-my-account
.woocommerce
.u-column2 > h2::before {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  width: 4px !important;
  height: 85% !important;
  background-color: #1F1F1F !important;
}

/* Titre "Mon compte"  */
body.woocommerce-account:not(.logged-in)
.woocommerce::before {
  font-size: 28px !important;
  margin-bottom: 32px !important;
}
	
  /* Titres réduits, adaptés à la largeur mobile */
  .kindred-my-account
  .woocommerce
  .u-column1 > h2,
  .kindred-my-account
  .woocommerce
  .u-column2 > h2 {
    margin-bottom: 8px !important;
    font-size: 22px !important;
  }



	/* Réduire l'espace sous le sous-titre, avant les champs — mobile uniquement */
.kindred-my-account
.woocommerce
.u-column1 > h2::after,
.kindred-my-account
.woocommerce
.u-column2 > h2::after {
  margin: 8px 0 24px !important;
}

  /* Colonnes centrées, largeur contrainte avec marge de chaque côté */
  .kindred-my-account
  .woocommerce
  .u-column1,
  .kindred-my-account
  .woocommerce
  .u-column2 {
    width: calc(100% - 32px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
	
/* Champs moins espacés entre eux */
.kindred-my-account
.woocommerce form .form-row {
  margin-bottom: 16px !important;
}

  /* Espacement entre les deux blocs empilés */
  .kindred-my-account
  .woocommerce
  .u-column2 {
     margin-top: 32px !important;
     padding-top: 24px !important;
     border-top: 1px solid #DDD6CD !important;
  }
	
/* Bouton plus grand sur mobile (texte + hauteur), meilleure cible tactile */
.kindred-my-account
.woocommerce button.button {
  height: 50px !important;
  min-height: 50px !important;
  font-size: 18px !important;
}

}