/*
 Theme Name:     Lilananda Child Theme
 Theme URI:      https://www.lilananda.fr
 Description:    Thème enfant du site Lilananda (Divi), avec back-office de maintenance.
 Author:         Yves Charvis
 Author URI:     https://yvescharvis.fr
 Template:       Divi
 Version:        1.2.0
 Tested up to:   7.0
 Update URI:     https://updater.iv4services.fr/?dm_update=1&action=get_metadata&slug=lilananda
 Text Domain:    lilananda-child
 License:        GPL v2 or later
 License URI:    http://www.gnu.org/licenses/gpl-2.0.html
 Tags:           responsive, accessibility-ready, divi
*/

/* ============================================
   VARIABLES CSS (Design System)
   ============================================ */
:root {
  /* Couleurs principales */
  --color-primary: #1a5f7a;
  --color-secondary: #c9a227;
  --color-accent: #e8b04a;
  
  /* Neutres */
  --color-text: #333333;
  --color-text-light: #666666;
  --color-background: #ffffff;
  --color-surface: #f5f5f5;
  
  /* Typographie */
  --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
  
  /* Espacements */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;
  
  /* Bordures */
  --border-radius: 8px;
  --border-color: #e0e0e0;
  
  /* Ombres */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
}

/* ============================================
   RESET MINIMAL (spécifique au thème)
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Images responsives */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Liens */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-secondary);
}

/* Titres */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  margin-top: 0;
  margin-bottom: var(--spacing-md);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

/* Paragraphes */
p {
  margin-top: 0;
  margin-bottom: var(--spacing-md);
}

/* Listes */
ul, ol {
  padding-left: var(--spacing-lg);
  margin-top: 0;
  margin-bottom: var(--spacing-md);
}

/* Tableaux */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--spacing-md);
}

th, td {
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--border-color);
}

th {
  background-color: var(--color-surface);
  font-weight: 600;
}

/* ============================================
   UTILITAIRES
   ============================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }

/* ============================================
   SPÉCIFICITÉS DIVI (overrides)
   ============================================ */

/* Page container - padding de base */
#page-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header Divi */
#main-header {
  background-color: var(--color-background);
  box-shadow: var(--shadow-sm);
}

/* Footer Divi */
#main-footer {
  background-color: var(--color-surface);
  padding-top: var(--spacing-xl);
  padding-bottom: var(--spacing-lg);
  margin-top: auto;
}

/* Boutons Divi - style personnalisé */
.et_pb_button,
button.et_pb_button {
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: all var(--transition-normal);
}

.et_pb_button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Cartes / Modules Divi */
.et_pb_section,
.et_pb_row {
  padding-top: var(--spacing-lg);
  padding-bottom: var(--spacing-lg);
}

/* Images dans le contenu */
.entry-content img,
.et_pb_post_content img {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  margin: var(--spacing-md) 0;
}

/* Formulaires Divi */
.et_pb_contact_form input,
.et_pb_contact_form textarea {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: var(--spacing-sm) var(--spacing-md);
  transition: border-color var(--transition-fast);
}

.et_pb_contact_form input:focus,
.et_pb_contact_form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26, 95, 122, 0.1);
}

/* ============================================
   ACCESSIBILITÉ
   ============================================ */
*:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: var(--spacing-sm) var(--spacing-md);
  z-index: 9999;
}

.skip-link:focus {
  top: 0;
}

/* ============================================
   RESPONSIVE (mobile first)
   ============================================ */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  
  .et_pb_section,
  .et_pb_row {
    padding-top: var(--spacing-md);
    padding-bottom: var(--spacing-md);
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  
  body {
    font-size: 14px;
  }
}

/* ============================================
   TITRE DE SECOURS (accessibilité / référencement)
   Posé par SeoProvider uniquement quand la page
   ne contient aucun titre de premier niveau.
   ============================================ */
.lilananda-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
