/* Espace proprietaire et page de verification (1.12.0).
   Charge seulement sur ces pages. Prefixe body .aa-espace : Divi impose ses
   propres styles de champs (police a chasse fixe vue lors de l'essai). */

body .aa-espace,
body .aa-espace input,
body .aa-espace textarea,
body .aa-espace button { font-family: inherit; }

body .aa-espace-boite { max-width: 420px; margin: 40px auto; padding: 28px 24px; background: #fff; border: 1px solid #e3e3e3; border-radius: 12px; }
body .aa-espace-verif .aa-espace-boite { max-width: 640px; }
body .aa-espace-boite h1 { font-size: 26px; line-height: 1.25; margin: 0 0 16px; padding: 0; }
body .aa-espace-boite h2 { font-size: 19px; margin: 24px 0 8px; padding: 0; }

body .aa-espace .aa-champ { margin: 0 0 16px; padding: 0; }
body .aa-espace .aa-champ label { display: block; font-weight: 600; margin: 0 0 6px; }
body .aa-espace input[type="text"],
body .aa-espace input[type="email"],
body .aa-espace input[type="url"],
body .aa-espace input[type="tel"],
body .aa-espace input[type="password"],
body .aa-espace textarea {
    display: block; width: 100%; max-width: 480px; box-sizing: border-box;
    padding: 10px 12px; font-size: 16px; line-height: 1.4; color: #222;
    background: #fff; border: 1px solid #c9c9c9; border-radius: 8px;
}
body .aa-espace input[type="time"] { width: auto; min-width: 110px; padding: 8px 10px; font-size: 16px; border: 1px solid #c9c9c9; border-radius: 8px; background: #fff; color: #222; }
body .aa-espace textarea { min-height: 160px; resize: vertical; }
body .aa-espace input:focus,
body .aa-espace textarea:focus { outline: 2px solid #2271b1; outline-offset: 1px; }
body .aa-espace a:focus-visible, body .aa-espace button:focus-visible, body .aa-espace input:focus-visible { outline: 2px solid #2271b1; outline-offset: 2px; }

/* Les regles display: des composants (inline-flex, etc.) l'emportent sur
   l'attribut hidden du navigateur : sans ceci, le second creneau ne se replie jamais. */
body .aa-espace [hidden] { display: none !important; }
body .aa-espace .aa-aide { display: block; margin: 6px 0 0; color: #666; font-size: 14px; line-height: 1.45; }
body .aa-espace .aa-erreur { display: block; margin: 6px 0 0; color: #b32d2e; font-size: 14px; font-weight: 600; }
body .aa-espace .aa-champ-case label { font-weight: 400; }

body .aa-espace .aa-mdp { display: flex; gap: 8px; max-width: 480px; }
body .aa-espace .aa-mdp input { flex: 1; min-width: 0; }
body .aa-espace .aa-mdp-voir { padding: 0 12px; border: 1px solid #c9c9c9; border-radius: 8px; background: #f6f6f6; cursor: pointer; font-size: 14px; }
body .aa-espace-lien { margin: 16px 0 0; font-size: 15px; }

body .aa-espace .aa-alert { margin: 0 0 16px; padding: 10px 14px; border-radius: 8px; border-left: 4px solid; font-size: 15px; }
body .aa-espace .aa-alert-success { background: #edf7ed; border-color: #2e7d32; color: #1e4620; }
body .aa-espace .aa-alert-info { background: #eef4fb; border-color: #2271b1; color: #133a5e; }
body .aa-espace .aa-alert-danger { background: #fcf0f0; border-color: #b32d2e; color: #5c1414; }

/* Texte pour lecteurs d'ecran (Divi ne le fournit pas toujours) */
body .aa-espace .screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Bandeau au-dessus de la fiche */
body .aa-espace-bandeau { margin: 0 0 24px; padding: 16px 20px; background: #fafafa; border: 1px solid #e3e3e3; border-radius: 12px; }
body .aa-espace-bandeau p { margin: 0 0 6px; padding: 0; }
body .aa-espace-bonjour { font-size: 18px; font-weight: 600; }
body .aa-espace-fiches { margin: 6px 0; }

/* Blocs modifiables */
body .aa-edition-barre { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 14px; }
body .aa-edition-barre .aa-alert { flex-basis: 100%; margin: 0; }
body .aa-edition-crayon { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid currentColor; border-radius: 8px; font-size: 14px; font-weight: 600; text-decoration: none; }
body .aa-edition-crayon svg { width: 16px; height: 16px; }
body .aa-edition-invitation { flex-basis: 100%; margin: 0; color: #666; font-style: italic; }
body .aa-edition-panneau { margin: 16px 0 0; padding: 20px; background: #fafafa; border: 1px solid #e3e3e3; border-radius: 12px; }
body .aa-edition-panneau h3 { margin: 0 0 14px; padding: 0; font-size: 18px; }
body .aa-edition-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 8px 0 0; }

/* Horaires */
body .aa-h-table { width: 100%; border-collapse: collapse; margin: 0 0 8px; border: 0; }
body .aa-h-table th,
body .aa-h-table td { padding: 8px 10px 8px 0; vertical-align: top; text-align: left; border: 0; border-bottom: 1px solid #ececec; }
body .aa-h-table th { white-space: nowrap; font-weight: 600; }
body .aa-h-creneau { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 14px 6px 0; }
body .aa-h-jour.aa-h-est-ferme .aa-h-creneau { opacity: .4; }
body .aa-h-ajouter { padding: 4px 10px; font-size: 14px; border: 1px dashed #999; border-radius: 8px; background: transparent; cursor: pointer; }
body .aa-h-copier { padding: 6px 12px; font-size: 14px; border: 1px solid #c9c9c9; border-radius: 8px; background: #fff; cursor: pointer; }

@media (max-width: 600px) {
    body .aa-espace-boite { margin: 20px auto; padding: 20px 16px; }
    body .aa-h-table, body .aa-h-table tbody, body .aa-h-table tr, body .aa-h-table th, body .aa-h-table td { display: block; }
    body .aa-h-table tr { padding: 10px 0; border-bottom: 1px solid #ececec; }
    body .aa-h-table th, body .aa-h-table td { border: 0; padding: 4px 0; }
}

/* Reponses aux avis (1.13.0) */
body .aa-reponse-zone { margin: 12px 0 0; }
body .aa-reponse-zone .aa-edition-panneau { margin-top: 8px; }
@media (max-width: 600px) {
    body .aa-reponse-zone .aa-edition-panneau { padding: 14px 12px; }
}
