/* ==========================================================================
   1. INSTALLATION DES POLICES (INTER)
   ========================================================================== */
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* ==========================================================================
     2. VARIABLES DE DESIGN (DESIGN TOKENS)
     ========================================================================== */
:root {
  /* COULEURS DU LOGO (RGBA FONCÉES) */
  --vert-inst-fonce: rgba(0, 55, 30, 1); /* Vert forêt profond */
  --vert-feuille: rgba(76, 175, 80, 1); /* Vert accent (survol/icônes) */
  --or-fonce: rgba(180, 140, 0, 1); /* Doré institutionnel */

  /* HIÉRARCHIE DES NOIRS */
  --noir-titre: rgba(10, 10, 10, 1); /* Noir intense pour l'autorité */
  --noir-corps: rgba(60, 60, 60, 1); /* Gris anthracite pour la lecture */

  /* COULEURS D'ACCENT & FOND */
  --blanc-pur: #ffffff;
  --blanc-fond: #f8f9fa;
  --rouge-live: #ff3b30;

  /* UNITÉS RELATIVES (Base 16px) */
  --font-base: 1rem; /* 16px */
  --space-m: 1rem; /* 16px */
  --space-l: 1.5rem; /* 24px */
  --radius: 0.5rem; /* 8px */
  --touch-target: 3rem; /* 48px (Hauteur idéale tactile) */
}

/* ==========================================================================
     3. RESET & STRUCTURE DE BASE (MOBILE-FIRST)
     ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  /* Permet aux unités rem de se baser sur la taille choisie par l'utilisateur */
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  font-size: var(--font-base);
  line-height: 1.6;
  background-color: var(--blanc-fond);
  color: var(--noir-corps); /* Texte principal plus doux pour les yeux */
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
     4. TYPOGRAPHIE & TITRES (DIFFÉRENCIATION)
     ========================================================================== */
h1,
h2,
h3,
h4 {
  color: var(--noir-titre); /* Noir plus profond pour les titres */
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-m);
}

h1 {
  font-size: 1.75rem;
} /* ~28px */
h2 {
  font-size: 1.5rem;
} /* ~24px */
h3 {
  font-size: 1.25rem;
} /* ~20px */

p {
  margin-bottom: var(--space-m);
}

/* ==========================================================================
     5. ÉLÉMENTS D'INTERACTION (TACTILE OPTIMISÉ)
     ========================================================================== */
a {
  color: var(--vert-inst-fonce);
  text-decoration: none;
  transition: color 0.3s ease;
}

/* Boutons adaptés aux pouces sur mobile */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%; /* Pleine largeur sur mobile */
  min-height: var(--touch-target);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-primary {
  background-color: var(--vert-inst-fonce);
  color: var(--blanc-pur);
}

.btn-secondary {
  background-color: var(--or-fonce);
  color: var(--blanc-pur);
}

/* ==========================================================================
     6. CONTENEURS & SECTIONS
     ========================================================================== */
.container {
  width: 100%;
  padding-left: var(--space-m);
  padding-right: var(--space-m);
}

section {
  padding: 2.5rem 0; /* Espacement vertical entre blocs de contenu */
}

img {
  max-width: 100%; /* Empêche les images de déborder sur mobile */
  height: auto;
  display: block;
}

/* ==========================================================================
   STRUCTURE DU CONTENU PRINCIPAL
   ========================================================================== */
main {
  display: block; /* Force le rendu correct sur les anciens navigateurs */
  width: 100%;
  min-height: 80vh; /* Garantit que le footer reste en bas même si la page est vide */
  padding-top: var(--space-l); /* Espace sous le header */
  padding-bottom: var(--space-l); /* Espace au-dessus du footer */
}

/* Optionnel : Si vous voulez que tout le contenu de main soit centré par défaut */
main .container {
  display: flex;
  flex-direction: column;
  gap: var(--space-l); /* Espacement automatique entre les sections du main */
}

/* ==========================================================================
   7. FORMULAIRES (INPUTS, SELECTS, TEXTAREAS)
   ========================================================================== */

/* Structure globale du formulaire */
form {
  display: flex;
  flex-direction: column;
  gap: var(--space-m); /* Espace automatique entre les champs sur mobile */
  width: 100%;
}

/* Groupement Label + Input */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Libellés (Labels) */
label {
  font-size: 0.9rem;
  font-weight: 600; /* Inter-SemiBold */
  color: var(--noir-titre);
}

/* Champs de saisie (Inputs, Selects, Textareas) */
input,
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  min-height: var(--touch-target); /* 48px pour le confort tactile */
  padding: 0.75rem 1rem;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  color: var(--noir-corps);
  background-color: var(--blanc-pur);
  border: 1.5px solid rgba(0, 0, 0, 0.1); /* Bordure discrète par défaut */
  border-radius: var(--radius);
  appearance: none; /* Supprime le style par défaut des navigateurs */
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* État de focus (Quand on clique dans le champ) */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(
    --vert-inst-fonce
  ); /* Rappel de la couleur institutionnelle */
  box-shadow: 0 0 0 3px rgba(0, 55, 30, 0.1); /* Halo discret autour du champ */
}

/* Style spécifique pour les zones de texte longues */
textarea {
  min-height: 120px;
  resize: vertical; /* Permet à l'utilisateur d'agrandir seulement en hauteur */
}

/* Placeholder (Texte d'exemple gris clair) */
::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

/* Style pour les erreurs (si vous utilisez du JS pour valider) */
.input-error {
  border-color: var(--rouge-live) !important;
}

.error-message {
  color: var(--rouge-live);
  font-size: 0.85rem;
  margin-top: -0.5rem;
}


/*=======================================================================
                 BARRE STICKY BAS MOBILE 
    ========================================================================*/
/* Barre fixe collée en bas */
.mairie-toolbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background: #fff;
    display: flex;
    border-top: 1px solid #ddd;
    z-index: 9999;
  }
  
  /* Chaque bouton à 25% */
  .toolbar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #333;
  }
  
  /* Style des SVG */
  .toolbar-item svg {
    width: 26px;
    height: 26px;
    
  }
  
  /* Point rouge Radio qui clignote */
  .radio-dot {
    width: 16px;
    height: 16px;
    background-color: #ff0000;
    border-radius: 50%;
    margin-bottom: 8px;
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.6);
    animation: pulse-red 1s infinite;
  }
  
  /* Texte sous les icônes */
  .toolbar-item span {
    font-size: 0.7rem;
  }
  
  .live-text { color: #ff0000; }
  
  /* Animation du clignotement */
  @keyframes pulse-red {
    0% { transform: scale(0.9); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.5; }
    100% { transform: scale(0.9); opacity: 1; }
  }
  
/* Masquer sur ordinateur (Desktop) */
@media (min-width: 1024px) {
    .sticky-actions { display: none; }
}


